OT: getting the protocol family of a file descriptor
Julian Elischer
julian at elischer.org
Thu Jan 31 01:04:58 PST 2008
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?
>
More information about the freebsd-hackers
mailing list