Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Nov 1998 18:49:52 -0800 (PST)
From:      a sun <asun@saul9.u.washington.edu>
To:        wollman@khavrinen.lcs.mit.edu
Cc:        stb@hanse.de, freebsd-net@FreeBSD.ORG
Subject:   Re: multicast handling in FreeBSD
Message-ID:  <199811110249.SAA31398@saul9.u.washington.edu>
In-Reply-To: <199811110111.UAA22828@khavrinen.lcs.mit.edu> (message from Garrett Wollman on Tue, 10 Nov 1998 20:11:20 -0500 (EST))
References:  <199811102210.OAA11742@saul9.u.washington.edu> <Pine.BSF.3.96.981110233528.25849E-100000@transit.hanse.de> <199811110111.UAA22828@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
   >> least, argues that you keep the old interface around. from the
   >> application level, the new interface looks slightly more complicated
   >> and somewhat arbitrary.

   From the application level there is absolutely no difference -- other
   than the requirement to actually construct a valid sockaddr.

do you really intend everyone who uses a program that sets multicast
addresses to recompile when they upgrade FreeBSD? that's what the
change requires. actually, i'm a little confused on why you can't keep
the same interface. can't you propagate the changes down to the actual
interface? i guess i'm unfamiliar with how FreeBSD does it, but doing
multicast stuff with aliased interfaces on linux, for example, seems
to work without too much trouble. 

if you're not going to allow the old way of doing multicast
assignments, i would at the very least like a feature #define that
will allow me to test for it. i hope you realize that i'll have to do
something silly like the following for FreeBSD:

       err = -1;
#ifdef BSD_NEW_MULTICAST
       ifreq.ifr_addr = new_sa;
       err = ioctl(fd, SIOCADDMULTI, &ifreq);
#endif

       /* looks like we compiled on a newer FreeBSD, but we're running
        * on an older one. */
       if (err < 0) {
          ifreq.ifr_addr = old_sa;
          err = ioctl(fd, SIOCADDMULTI, &ifreq);
       }
     
       /* hmm. maybe we compiled on an older FreeBSD, but we're
       running on a newer one */
       if (err < 0) {
          syslog(LOG_INFO, "sorry. you need to recompile.");
       }


that's what i mean about "more complicated and somewhat arbitrary." 

-a

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811110249.SAA31398>