From owner-freebsd-arch Tue Mar 19 1:45:29 2002 Delivered-To: freebsd-arch@freebsd.org Received: from alcanet.com.au (mail2.alcanet.com.au [203.62.196.17]) by hub.freebsd.org (Postfix) with ESMTP id C4C2F37B405 for ; Tue, 19 Mar 2002 01:45:25 -0800 (PST) Received: from mfg1.cim.alcatel.com.au (IDENT:root@localhost.localdomain [127.0.0.1]) by alcanet.com.au (8.12.1/8.12.1/Alcanet1.2) with ESMTP id g2J9irIR020975; Tue, 19 Mar 2002 20:44:54 +1100 Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37641) with ESMTP id <01KFK3TE6RGWVFP7CW@cim.alcatel.com.au>; Tue, 19 Mar 2002 20:44:45 +1100 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.6/8.11.6) id g2J9ii246085; Tue, 19 Mar 2002 20:44:44 +1100 Content-return: prohibited Date: Tue, 19 Mar 2002 20:44:44 +1100 From: Peter Jeremy Subject: Re: proposition for new socket syscalls {send,recv}fromto In-reply-to: <3C800A80.96CEA9D2@caldera.com>; from sergey@caldera.com on Fri, Mar 01, 2002 at 06:10:56PM -0500 To: Sergey Babkin Cc: arch@FreeBSD.ORG, chawla@caldera.com Mail-Followup-To: Sergey Babkin , arch@FreeBSD.ORG, chawla@caldera.com Message-id: <20020319204443.A46069@gsmx07.alcatel.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i References: <3C800A80.96CEA9D2@caldera.com> 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 [Catching up on old mail] On Fri, Mar 01, 2002 at 06:10:56PM -0500, Sergey Babkin wrote: >In the high-availability clusters it's convenient and typical to assign >an IP address to a logical server (or service). This logical server >may be moved between the physical hosts as neccessary (for example, >if a physical host fails or needs to be shut down for maintenance). >So this addres gets added to an interface of the current physical >host as an alias. Here comes the bad part: this alias happens to be >on the same subnet as the primary address of this interface, and this >may cause a confusion about the source address of the packets coming out >of this host. You might like to look at how (eg) Compaq handles this. I've used TruCluster on Tru64 4.0D/4.0F - it uses this approach and basically ignores the ensuing problems :-(. The clustering code in Tru64 5.x (which I haven't used yet) may do a better job. > But for the UDP servers (for example, tftp or BIND) >there is an issue: This can also affect things like CORBA and FTP where there are multiple TCP connections with the server either setting up or specifying how to set up the secondary connections. I've also had problems convincing SAMBA to behave the way I want it to. >How can we fix this situation ? Everything would become a lot simpler >if we have the calls: > >ssize_t >recvfromto(int s, void *buf, size_t len, int flags, > struct sockaddr *from, int *fromlen, > struct sockaddr *to, int *tolen) ... >ssize_t >sendfromto(int s, void *buf, size_t len, int flags, > const struct sockaddr *from, int fromlen, > const struct sockaddr *to, int tolen) Other than using 'socklen_t *' instead of 'int *' for the former, these look like a good idea. They appear to be easy to use and easy/cheap to implement. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message