Multihomed UDP server
Poul-Henning Kamp
phk at phk.freebsd.dk
Mon Jan 19 04:30:26 PST 2004
In message <400BC9E5.8010609 at stewart.chicago.il.us>, "Randall R. Stewart (home)
" writes:
>>>On Mon, 19 Jan 2004, 12:07+0100, Poul-Henning Kamp wrote:
>>>>Simple question:
>>>>
>>>>Very simple UDP server daemon.
>>>>
>>>>Many clients (connect(2)'ing a socket for each is not an option)
>>>>
>>>>Multihomed machine.
>>>>
>>>>What's the simple trick to replying with the same source-IP as the
>>>>client used as destination-IP ?
>>
>>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".
Following the code it seems that it is in fact possible to do with
sendmsg(2)/recvmsg(2) already, and my test shows that at least the
receive side works.
I challenge anybody to point out where this is mentioned in the docs,
and once people give up I'll tell how to do it :-)
>Poul:
>
>One of the problems I think that is fundamental to BSD and
>multi-homing is the lack of supports for multiple-default routes.
I agree.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-net
mailing list