From owner-cvs-all Mon Oct 21 14:16:10 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5ECB737B401; Mon, 21 Oct 2002 14:16:09 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 8DA3743E77; Mon, 21 Oct 2002 14:16:07 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 21 Oct 2002 22:16:06 +0100 (BST) 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 In-Reply-To: Your message of "Mon, 21 Oct 2002 13:40:02 PDT." <200210212040.g9LKe2kL031650@repoman.freebsd.org> Date: Mon, 21 Oct 2002 22:16:06 +0100 From: Ian Dowse Message-ID: <200210212216.aa20253@salmon.maths.tcd.ie> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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