guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: doc getsockopt, setsockopt


From: Greg Troxel
Subject: Re: doc getsockopt, setsockopt
Date: 12 Oct 2005 10:30:48 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Kevin Ryde <address@hidden> writes:

> Greg Troxel <address@hidden> 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 <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]