Date: Wed, 27 Aug 1997 10:16:12 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: louie@TransSys.COM (Louis A. Mamakos) Cc: aledm@routers.co.uk, hackers@FreeBSD.ORG Subject: Re: UDP "to" address? Message-ID: <199708271716.KAA05689@phaeton.artisoft.com> In-Reply-To: <199708261352.JAA04942@whizzo.TransSys.COM> from "Louis A. Mamakos" at Aug 26, 97 09:52:07 am
next in thread | previous in thread | raw e-mail | index | archive | help
> Typically, a portable approach to doing this is to create a socket > per interface address and bind it. Then you look at which fd the > packet was received on to determine the destination address. > > Look at named and xntpd to get a sense of this. In fact, you can > probably steal a lot of this code and apply it directly. > > There also seems to be a socket option you can set which returns the > destination address in the "control information" field specified > with recvmsg(2). I noticed the code for this in ip_input.c. This is an issue for the NFS UDP code, actually. If you get a general answer, it'd be helpful. I thin recvmsg() is probably the way to go. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708271716.KAA05689>