Subject: Re: Broadcasting to 255.255.255.255
To: =?ISO-8859-1?Q?Andr=E9_Wienck?= <awienck@solnet.ch>
From: Johnny Billquist <bqt@softjar.se>
List: netbsd-users
Date: 07/20/2007 11:17:42
André Wienck skrev:
> Salut,
> 
> On Fri, 20 Jul 2007 00:39:55 +0200, Johnny Billquist
> <bqt@softjar.se> wrote:
>> That, of course, depends on if you really want to direct it to a 
>> specific device. If I broadcast to 255.255.255.255, I would expect any 
>> device would be acceptable (possibly with the addition that it be a 
>> device to a medium where broadcasts make sense).
> 
> So you'd choose a random device and broadcast out? (lo0 anyone?)

That's why I also pointed out that broadcasts should make sense for the 
device. They don't make sense for lo0. And neither for ppp devices, or 
any other point-to-point device.

> And even broadcasting out all devices is most likely not the right
> thing to do. (pppoe0? Or what if more than one device is connected to
> the same network segment?)

I fail to see the problem. So what? If I have several interfaces to the 
same segment, my broadcasts will show up several times. That's hardly a 
problem. We're talking UDP. Nothing is guaranteed anyway. Packets may 
already show up a random number of times.

>> If I want a broadcast to go out on a specific device, I can do a 
>> broadcast to that device's network broadcast address.
> 
> But what if you want to talk to all hosts on device ath0, regardless of
> their network mask?

That's a kind of situation that IP can't deal with properly, and so I 
don't mind people using tricks like going through bpf if they want to do 
dirty work.

> You can't cover all situations, and you can't even cover one
> appropriately. Hence my suggestion that using bpf is the sane way to go
> here.

I'm not totally agreeing with you.

	Johnny


-- 
Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt@softjar.se             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol