[Twisted-Python] sniffing multicast traffic
Lars Ivar Igesund
larsivi at gmail.com
Wed Mar 10 05:48:25 EST 2010
my experience (not with Twisted, but with multicast), is that
multicast often fail to be properly routed (this may be a restriction
on OS, switch, etc). That you see the multicasts on using tshark is no
indication on the routing working properly, as it will catch all
information in promiscous mode, whether routed there or not.
Two possible solutions (that may or may not be easy to in conjunction
with Twisted) are:
* Route the multicasts explicitly
* Make the listening socket bind explicitly to the network interface
where you expect/see the multicast. This is the solution I have used
myself, but may require using low level socket functionality. Binding
to localhost (all interfaces at once) or similar did not work for me.
On Wed, Mar 10, 2010 at 11:35 AM, Ben Barker <ben at bbarker.co.uk> wrote:
> Hello - I wonder if someone can help:
> We have some status info being sent by various machines using
> multicast addressed udp packets. I have been attempting to use twisted
> to write a python script that will passively monitor on the relevant
> port for any udp packets with the specified multicast address, which I
> can then parse the payloads of as required.
> I have been looking at the examples here:
> But I seem to have trouble getting them to receive anything at all.
> I have managed to use tshark to display the packets :
> tshark -i eth0 -x -l -f udp
> so I know the data is there (coming isn on address 22.214.171.124, port 901)
> Any suggestions?
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
More information about the Twisted-Python