From owner-freebsd-arch Mon Mar 4 9: 6:19 2002 Delivered-To: freebsd-arch@freebsd.org Received: from avocet.prod.itd.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by hub.freebsd.org (Postfix) with ESMTP id 869B637B416 for ; Mon, 4 Mar 2002 09:06:12 -0800 (PST) Received: from pool0036.cvx22-bradley.dialup.earthlink.net ([209.179.198.36] helo=mindspring.com) by avocet.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16hvuc-0001Ce-00 for arch@freebsd.org; Mon, 04 Mar 2002 09:06:11 -0800 Message-ID: <3C83A974.96E2895C@mindspring.com> Date: Mon, 04 Mar 2002 09:05:56 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: arch@freebsd.org Subject: Re: proposition for new socket syscalls {send,recv}fromto Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > I agree that these calls are necessary and should have been presend from > > the start, but you seem to be unaware of the usual way of implementing > > UDP servers that are aware of multihoming, such as BIND. They typically > > use SIOCGIFADDR to read the list of interfaces on the machine then bind > > a socket to each one. The server can choose the appropriate socket to > > use according to the source address that is required. However this > > doesn't deal all that well with a dynamically changing list of interface > > addresses... > > Hm, from looking at the BIND code it seems to reload the list of interfaces > periodically, so it can handle the changing list of interfaces. And it has > a fair amount of code dealing with it. But not all the servers do this: > for instance, tftpd does not. On the receive side, the problem isn't interfaces so much as it is IP addresses. Specifically, the problem is that it's binding to the IP addresses in the first place, rather than binding to the interfaces, regardless of which IP addresses are or are not on them. From the original posting about the failover scenario with IP takeover, the takeover issue would be resolved, in the receive case by simply binding to the interface rather than addresses. IP addresses could then come and go, and the daemon would get the packets when the IP was there, and not when the IP wasn't. I've often wanted this capability on dialup gateway machines, where the daemons would not require restart, if the bind were this way, and the local host name was not cached data from an interface probe (e.g. sendmail's idea of the name to give in the EHLO on outbound or the name to give in the greeting on inbound). On the send case, the main issue is, I think, responses. In fact, I can't easily come up with a non-hacking case where there is not a packet on a know interface that is eliciting a reply on an unknown interface that is not handled by response only. This implies that a receive of the packet with source information -- something which is already handled in the context of the existing API -- is enough, if there is a "sendfrom" which took the receive context for the reply; I would want the sendfrom, however, to verify that the address it was sending from was in fact local. Another issue that occurst to me, but is only slightly related to the API issue, if at all, is that it should be possible to add an option to the "ifconfig" of an address or alias, such that the local machine did not ARP for the IP address. Specifically, for DSR (Direct SErver Return), this is a requirement to avoid confusing Cisco, Extreme Networks, and other switches. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message