[Twisted-Python] Source specific multicasting (SSM) example?

Rodney Lott rlott at evertz.com
Fri Apr 4 11:49:50 MDT 2008


Thanks for the information, Phil.

I believe the 2.6 kernels are supposed to have IGMP setup.  Not sure about the PIM-SSM, though.

My Python setup (Debian etch, python 2.4.4-2) shows similar to yours re. the socket module.

Yeah.  I sent a post here because my Googling for this stuff wasn't going anywhere.  Oh, well.  Not the end of the world.  I will just use separate IGMP groups and switch on the separate addresses.

-Rodney Lott

-----Original Message-----
From: twisted-python-bounces at twistedmatrix.com
[mailto:twisted-python-bounces at twistedmatrix.com]On Behalf Of Phil
Mayers
Sent: Friday, April 04, 2008 12:41 PM
To: Twisted general discussion
Subject: Re: [Twisted-Python] Source specific multicasting (SSM)
example?


Rodney Lott wrote:
> Hi, there.
> 
> I was wondering if there is any information or examples on how to use 
> Twisted to perform a SSM operation.  I am new to Twisted and to Python.
> 
> In C, I believe one would use the setsocketopt() to specify the joining 
> to a multicast group (G) to a specific source (S):
> 
>         setsockopt(sock,…, IP_ADD_SOURCE_MEMBERSHIP, (S, G, iface), …)

...provided your OS has IGMPv3 support (and the underlying network has 
IGMPv3 and PIM-SSM setup).

> 
> I believe that Python itself has analogous socket calls and could do 
> this using a UDP socket. 

At least on my version of Python (2.5.1, Fedora 8) there's no constant 
in the "socket" module for that:

 >>> [x for x in dir(socket) if 'member' in x.lower()]
['IP_ADD_MEMBERSHIP', 'IP_DROP_MEMBERSHIP', 'IP_MAX_MEMBERSHIPS']

Google for "python igmpv3" does not look promising... It seems as if 
this support isn't there yet.

> 
> I read the Multicast UDP example on Twisted here: 
> http://stderr.org/doc/twisted-doc/howto/udp.html#auto3
> 
> This shows how to do a normal multicast UDP situation with Twisted (i.e. 
> a process will receive UDP traffic from ALL sources registered to the 
> IGMP group). 
> 
> So, if there were UDP three sources (e.g. A, B, and C) registered to the 
> IGMP group, I would like to find a way for my client to only receive 
> data from source B.
> 
> I believe that I can get information using a SDP/SAP using a simple UDP 
> server listening on the appropriate port.  So, the only thing that I am 
> missing is how to register to a group for a specific source.  I am not 
> sure if the joinGroup() method will allow for this. 
> 
> Thanks.
> 
> -Rodney Lott
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


_______________________________________________
Twisted-Python mailing list
Twisted-Python at twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python




More information about the Twisted-Python mailing list