Multihomed UDP server
Bjoern A. Zeeb
bzeeb-lists at lists.zabbadoz.net
Mon Jan 19 12:44:47 PST 2004
On Mon, 19 Jan 2004, Poul-Henning Kamp wrote:
> In message <200401192002.i0JK2SJZ058752 at khavrinen.lcs.mit.edu>, Garrett Wollman
> writes:
> ><<On Mon, 19 Jan 2004 12:58:00 +0100, "Poul-Henning Kamp" <phk at phk.freebsd.dk> said:
> >
> >> I'm considering ways to make sendmsg(2)/recvmsg(2) DTRT, and my
> >> current candidate is give them a flag bit which says "msg_name has
> >> both addresses".
> >
> >Um, they already do the right thing. That's what the IP_RECVDESTADDR
actually it is IP_RECVDSTADDR (no E).
> >option (and its dual whose name I forget right now) is all about.
>
> Yeah, I found that out. Now, where on the earth is that documented ?
You mean for FreeBSD or in ISBN 0-13-490012-X ?
For FreeBSD it is man 4 ip:
--- cite ---
If the IP_RECVDSTADDR option is enabled on a SOCK_DGRAM socket, the
recvmsg(2) call will return the destination IP address for a UDP data-
gram. The msg_control field in the msghdr structure points to a buffer
that contains a cmsghdr structure followed by the IP address. The
cmsghdr fields have the following values:
--- cite ---
--
Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT
56 69 73 69 74 http://www.zabbadoz.net/
More information about the freebsd-net
mailing list