Re: UDP broadcast source address when > 1 NIC
- From: "Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx>
- Date: Thu, 25 Aug 2005 11:44:06 +0200
Try to put the question in
microsoft.public.development.device.drivers NG
Arkady
"Dave Lowther" <davel@xxxxxxxxx> wrote in message
news:uR7AWKIqFHA.3980@xxxxxxxxxxxxxxxxxxxxxxx
> "Dave Lowther" <davel@xxxxxxxxx> wrote
>> My PC (XP Pro SP2) has two Ethernet interfaces, 10.0.0.6 and
>> 192.168.0.200, both IPs are static.
>>
>> When I broadcast a UDP datagram using sendto() and a destination of
>> 255.255.255.255, it sends the UDP datagram out on both Ethernet
>> interfaces which is what I wanted.
>>
>> Unfortunately it uses the same IP source address (192.168.0.200) on both
>> interfaces, which isn't what I wanted.
>
> I'd still like to know whether the above is expected behaviour or not ?
>
> Since my OP I've implemented a solution like this which works fine but
> seems over complicated:
> o Enumerate the network interfaces and make a list of all IP (addresses,
> masks) on the PC
> o From the above list, make a list of subnet broadcast addresses and
> remove any duplicates
> o Do a sendto() for each subnet broadcast address in the above list.
>
> Now my broadcasts get sent with the 'correct' source IP address and the
> receivers can reply ok.
>
> Dave.
>
>
.
- References:
- UDP broadcast source address when > 1 NIC
- From: Dave Lowther
- Re: UDP broadcast source address when > 1 NIC
- From: Dave Lowther
- UDP broadcast source address when > 1 NIC
- Prev by Date: Re: File Transfer Using UDP within LAN
- Next by Date: Re: Is there is a bug in non-blocking Socket.LocalEndpoint on clie
- Previous by thread: Re: UDP broadcast source address when > 1 NIC
- Next by thread: Re: Getting subnet mask
- Index(es):
Relevant Pages
|