Re: OT: getting the protocol family of a file descriptor
- From: Dag-Erling Smørgrav <des@xxxxxx>
- Date: Thu, 31 Jan 2008 16:31:32 +0100
"Heiko Wundram (Beenic)" <wundram@xxxxxxxxxx> writes:
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 ;-)).
This is the correct way to do it, I don't understand why you think it
might not work in the future.
Is there any other "better" way to get at the domain (protocol family)
of a socket?
Why should there be a better way?
DES
--
Dag-Erling Smørgrav - des@xxxxxx
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: OT: getting the protocol family of a file descriptor
- From: Heiko Wundram (Beenic)
- Re: OT: getting the protocol family of a file descriptor
- References:
- OT: getting the protocol family of a file descriptor
- From: Heiko Wundram (Beenic)
- OT: getting the protocol family of a file descriptor
- Prev by Date: Re: [OT] Q: what would you choose for a VCS today
- Next by Date: Re: OT: getting the protocol family of a file descriptor
- Previous by thread: Re: OT: getting the protocol family of a file descriptor
- Next by thread: Re: OT: getting the protocol family of a file descriptor
- Index(es):
Relevant Pages
|
|