Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Oct 2002 22:16:06 +0100
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/share/man/man4 ip.4 src/sys/netinet in.h udp_usrreq.c 
Message-ID:   <200210212216.aa20253@salmon.maths.tcd.ie>
In-Reply-To: Your message of "Mon, 21 Oct 2002 13:40:02 PDT." <200210212040.g9LKe2kL031650@repoman.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200210212040.g9LKe2kL031650@repoman.freebsd.org>, Ian Dowse writes:
>  Log:
>  Implement a new IP_SENDSRCADDR ancillary message type that permits
>  a server process bound to a wildcard UDP socket to select the IP
>  address from which outgoing packets are sent on a per-datagram
>  basis. When combined with IP_RECVDSTADDR, such a server process can
>  guarantee to reply to an incoming request using the same source IP
>  address as the destination IP address of the request, without having
>  to open one socket per server IP address.

There's an example program which uses this at:

	http://www.maths.tcd.ie/~iedowse/FreeBSD/sendsrcaddr.c

It is just a simple UDP server that listens on a specified port and
echos back any received datagrams to the sender, but on multi-homed
hosts it will always reply from the address to which the incoming
datagram was directed.

That completes my netinet/ changes. I'm not aware of any outstanding
issues, but the changes were complex enough that I could have
easily overlooked something, so please let me know if anything
socket-related stops working.

Ian

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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