views:

588

answers:

3

I'm working on a project that discovers/configures remote devices using UDP broadcasts. These devices may not have IP addresses configured yet, at least no to match the network they are connected to. Currently we use a single sendto with a target address of 255.255.255.255. This works fine in most cases but on Vista machines with multiple NICs the broadcast only seems to be sent out one of the interfaces. How can I get Vista to send the broadcast to all interfaces?

+2  A: 

I've personally never seen any system generate a packet for every interface in response to a single sendto call.

A better option would be to enumerate the network interfaces, determine the correct link-local broadcast and send a separate packet individually via each interface.

Alnitak
I'm not sure link local addresses will work since not all devices have IP's configured for the link's subnet.
megabytephreak
+1  A: 

Enumerate the interfaces and then send the packet once on each interface.

WaldenL
A: 

We have the exact same problem, only we can't use subnet broadcasts, as we want to configure them. If a device has a wrong IP (outside our range), sending a subnet broadcast to it will never be accepted by its IP stack. Nasty problem, unless we allow DHCP...

Actually, we have the same issues
megabytephreak