Problem receiving UDP broadcast packets.

Chris Angelico rosuav at gmail.com
Tue Apr 19 20:32:02 EDT 2011


On Wed, Apr 20, 2011 at 10:00 AM, Grant Edwards <invalid at invalid.invalid> wrote:
> If I send a packet to ff:ff:ff:ff:ff:ff--255.255.255.255, it's because
> I want everybody on the Ethernet segment to receive it.  If I wanted
> only people on a particular subnet (e.g. 10.0.0.0/8) to receive it, I
> would have sent it to the subnet broadcast address (e.g. 10.255.255.255).

> It seems I'm going to have to use raw sockets to do what I need to do.
> That's exactly what I was trying to avoid by using UDP: I'm replacing
> a proprietary (non IP) MAC-level protocol that was implemented using
> raw sockets.

I have to ask:

1) Why do you have two subnets on the same switch? Isn't that going to
be an eternal maintenance headache? Not that it _can't_ be done -
obviously it can - but it's likely to confuse the humans involved.

2) Can you replace that protocol at a higher level? Presumably there's
a full protocol stack with application data getting wrapped up inside
(ultimately) ethernet frames; can you cut it somewhere else and make,
say, a TCP/IP connection to the remote system?

Chris Angelico



More information about the Python-list mailing list