Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jan 2008 09:23:15 +0100
From:      "Heiko Wundram (Beenic)" <wundram@beenic.net>
To:        freebsd-hackers@freebsd.org
Subject:   OT: getting the protocol family of a file descriptor
Message-ID:  <200801310923.16029.wundram@beenic.net>

next in thread | raw e-mail | index | archive | help
Hey all!

I'm currently in the need to get the protocol family that was used to creat=
e a=20
socket (and passed via a unix domain socket to another program), and I've n=
ot=20
really come up with a proper scheme other than to use getsockname and=20
retrieve sa_family from the resulting socket (which currently matches the=20
socket domain and historically has, but why take the chances ;-)).

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

=2D-=20
Heiko Wundram
Product & Application Development
=2D------------------------------------
Office Germany - EXPO PARK HANNOVER
=20
Beenic Networks GmbH
Mail=E4nder Stra=DFe 2
30539 Hannover
=20
=46on        +49 511 / 590 935 - 15
=46ax        +49 511 / 590 935 - 29
Mobil      +49 172 / 43 737 34
Mail       wundram@beenic.net


Beenic Networks GmbH
=2D------------------------------------
Sitz der Gesellschaft: Hannover
Gesch=E4ftsf=FChrer: Jorge Delgado
Registernummer: HRB 61869
Registergericht: Amtsgericht Hannover



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