Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-03 Thread Rob Landley
--- Philippe Troin <[EMAIL PROTECTED]> wrote: > Rob Landley <[EMAIL PROTECTED]> writes: > The source IP address (as returned by getsockname()) > is only set when > the socket is connected... It follows the same > logic: for a multihomed > machine, we know which interface will be used only > when

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-03 Thread Philippe Troin
Rob Landley <[EMAIL PROTECTED]> writes: > --- Philippe Troin <[EMAIL PROTECTED]> wrote: > > All the code I've encountered which actually needed > > to perform > > broadcast on all interfaces was sending > > subnet-directed broadcasts by > > hand on all interfaces. > > Bind to a socket to a local

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-03 Thread Rob Landley
--- Paul Flinders <[EMAIL PROTECTED]> wrote: > > Rob Landley <[EMAIL PROTECTED]> writes: > > 3) Java sucks in many ways. Today's way is that ... > > There is no way to query the current machine's > > interfaces without resorting to > > native code. > > I faced this problem a while ago - in the

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-03 Thread Paul Flinders
Rob Landley <[EMAIL PROTECTED]> writes: > 3) Java sucks in many ways. Today's way is that it > never occurred to Sun that a machine might have more > than one IP address assigned to it, so > InetAddress.getLocalHost() returns exactly one > address. Unfortunately, just about EVERY machine has >

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-03 Thread Rob Landley
--- Philippe Troin <[EMAIL PROTECTED]> wrote: > Rob Landley <[EMAIL PROTECTED]> writes: > > So the question is, is the stack's behavior right? > If > > not, what's involved in fixing it, and if so, is > it > > documented anywhere? > > I think historically, BSD stacks were routing >

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-03 Thread Rob Landley
--- Philippe Troin [EMAIL PROTECTED] wrote: Rob Landley [EMAIL PROTECTED] writes: So the question is, is the stack's behavior right? If not, what's involved in fixing it, and if so, is it documented anywhere? I think historically, BSD stacks were routing 255.255.255.255 to the

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-03 Thread Paul Flinders
Rob Landley [EMAIL PROTECTED] writes: 3) Java sucks in many ways. Today's way is that it never occurred to Sun that a machine might have more than one IP address assigned to it, so InetAddress.getLocalHost() returns exactly one address. Unfortunately, just about EVERY machine has two

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-03 Thread Rob Landley
--- Paul Flinders [EMAIL PROTECTED] wrote: Rob Landley [EMAIL PROTECTED] writes: 3) Java sucks in many ways. Today's way is that ... There is no way to query the current machine's interfaces without resorting to native code. I faced this problem a while ago - in the end I cheated

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-03 Thread Philippe Troin
Rob Landley [EMAIL PROTECTED] writes: --- Philippe Troin [EMAIL PROTECTED] wrote: All the code I've encountered which actually needed to perform broadcast on all interfaces was sending subnet-directed broadcasts by hand on all interfaces. Bind to a socket to a local port and query

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-03 Thread Rob Landley
--- Philippe Troin [EMAIL PROTECTED] wrote: Rob Landley [EMAIL PROTECTED] writes: The source IP address (as returned by getsockname()) is only set when the socket is connected... It follows the same logic: for a multihomed machine, we know which interface will be used only when we know

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-02 Thread Rob Landley
--- "Richard B. Johnson" <[EMAIL PROTECTED]> wrote: > Using an IP packet of 255.255.255.255 doesn't mean > it's a broadcast > packet. It is going to your default gateway because > it is outside > your netmask, which guarantees that it is not a > broadcast. 1) No, it's still a broadcast packet

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-02 Thread Philippe Troin
Rob Landley <[EMAIL PROTECTED]> writes: > --- Jeff Garzik <[EMAIL PROTECTED]> wrote: > > Rob Landley wrote: > > > Under 2.2.16, broadcast packets addressed to > > > 255.255.255.255 do not go out to all interfaces in > > a > > > machine with multiple network cards. They're > > getting > > >

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-02 Thread Rob Landley
--- Jeff Garzik <[EMAIL PROTECTED]> wrote: > Rob Landley wrote: > > Under 2.2.16, broadcast packets addressed to > > 255.255.255.255 do not go out to all interfaces in > a > > machine with multiple network cards. They're > getting > > routed out the default gateway's interface > instead. > >

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-02 Thread Jeff Garzik
Rob Landley wrote: > Under 2.2.16, broadcast packets addressed to > 255.255.255.255 do not go out to all interfaces in a > machine with multiple network cards. They're getting > routed out the default gateway's interface instead. Are the network cards on the same network? -- Jeff Garzik

255.255.255.255 won't broadcast to multiple NICs

2000-11-02 Thread Rob Landley
Under 2.2.16, broadcast packets addressed to 255.255.255.255 do not go out to all interfaces in a machine with multiple network cards. They're getting routed out the default gateway's interface instead. If I ifconfig eth1 down (which has the gateway behind it), I start getting "no route to

255.255.255.255 won't broadcast to multiple NICs

2000-11-02 Thread Rob Landley
Under 2.2.16, broadcast packets addressed to 255.255.255.255 do not go out to all interfaces in a machine with multiple network cards. They're getting routed out the default gateway's interface instead. If I ifconfig eth1 down (which has the gateway behind it), I start getting "no route to

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-02 Thread Jeff Garzik
Rob Landley wrote: Under 2.2.16, broadcast packets addressed to 255.255.255.255 do not go out to all interfaces in a machine with multiple network cards. They're getting routed out the default gateway's interface instead. Are the network cards on the same network? -- Jeff Garzik

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-02 Thread Rob Landley
--- Jeff Garzik [EMAIL PROTECTED] wrote: Rob Landley wrote: Under 2.2.16, broadcast packets addressed to 255.255.255.255 do not go out to all interfaces in a machine with multiple network cards. They're getting routed out the default gateway's interface instead. Are the network

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-02 Thread Philippe Troin
Rob Landley [EMAIL PROTECTED] writes: --- Jeff Garzik [EMAIL PROTECTED] wrote: Rob Landley wrote: Under 2.2.16, broadcast packets addressed to 255.255.255.255 do not go out to all interfaces in a machine with multiple network cards. They're getting routed out the default

Re: 255.255.255.255 won't broadcast to multiple NICs

2000-11-02 Thread Rob Landley
--- "Richard B. Johnson" [EMAIL PROTECTED] wrote: Using an IP packet of 255.255.255.255 doesn't mean it's a broadcast packet. It is going to your default gateway because it is outside your netmask, which guarantees that it is not a broadcast. 1) No, it's still a broadcast packet when it