From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Greg Troxel Newsgroups: gmane.lisp.guile.devel Subject: Re: doc getsockopt, setsockopt Date: 12 Oct 2005 10:30:48 -0400 Message-ID: References: <87k6h0g9qd.fsf@zip.com.au> <87k6gyi29b.fsf@zip.com.au> <87k6gv8kxz.fsf@zip.com.au> <87y84zfywn.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1129127677 29743 80.91.229.2 (12 Oct 2005 14:34:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Oct 2005 14:34:37 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Oct 12 16:34:36 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EPhd9-0005Aj-3K for guile-devel@m.gmane.org; Wed, 12 Oct 2005 16:30:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EPhd8-0006v1-Jb for guile-devel@m.gmane.org; Wed, 12 Oct 2005 10:30:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EPhd4-0006uj-Va for guile-devel@gnu.org; Wed, 12 Oct 2005 10:30:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EPhd3-0006uX-Db for guile-devel@gnu.org; Wed, 12 Oct 2005 10:30:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EPhd3-0006uU-8d for guile-devel@gnu.org; Wed, 12 Oct 2005 10:30:49 -0400 Original-Received: from [192.1.100.210] (helo=fnord.ir.bbn.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EPhd3-0004Rf-7l for guile-devel@gnu.org; Wed, 12 Oct 2005 10:30:49 -0400 Original-Received: by fnord.ir.bbn.com (Postfix, from userid 10853) id 6ECA45287; Wed, 12 Oct 2005 10:30:48 -0400 (EDT) Original-To: guile-devel@gnu.org In-Reply-To: <87y84zfywn.fsf@zip.com.au> Original-Lines: 39 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5271 Archived-At: Kevin Ryde writes: > Greg Troxel writes: > > > > follow the BSD way, and translate 0.0.0.x/8 in the second arg into > > setting imr_ifindex on Linux. > > > > follow the Linux way, and make it a vector of 3 and translate back > > into the 0.0.0.x/8 on BSD. > > > > I prefer the first way, since this is orginally a BSD interface and > > because it's less burdensome > > Is there a good reason for linux to split it out? Some ambiguity > resolved or something? I don't know the reasoning behind the linux decision, or whether it happened before or after BSD used ifindex. NetBSD tries very hard to have binary compatibility, so adding semantics for what are otherwise wacky addresses was easier than versioning the ioctl so the old one could still work. It's perhaps cleaner not to overload the interface address field, but IMHO the binary compat issues are more important. > > The code I submitted just puts the two addresses in the two fields; > > someone could spiff it up for ifindex support on Linux if they were so > > inclined. > > Be nice to make sure it worked at least. It's likely that it will work on Linux for joining via interface addresses, and that's 99% of the likely usage. But it could use an memset of the struct ip_mreq to 0. I didn't realize Linux had added an ifindex field when I wrote the code. -- Greg Troxel _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel