Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jan 2008 01:04:57 -0800
From:      Julian Elischer <julian@elischer.org>
To:        "Heiko Wundram (Beenic)" <wundram@beenic.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: OT: getting the protocol family of a file descriptor
Message-ID:  <47A18F39.60801@elischer.org>
In-Reply-To: <200801310923.16029.wundram@beenic.net>
References:  <200801310923.16029.wundram@beenic.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Heiko Wundram (Beenic) wrote:
> Hey all!
> 
> I'm currently in the need to get the protocol family that was used to create a 
> socket (and passed via a unix domain socket to another program), and I've not 
> really come up with a proper scheme other than to use getsockname and 
> retrieve sa_family from the resulting socket (which currently matches the 
> socket domain and historically has, but why take the chances ;-)).

and pretty much always will.

> 
> Is there any other "better" way to get at the domain (protocol family) of a 
> socket?
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47A18F39.60801>