Skip to content

ostinato.protocols.igmp_pb2 module

Customize IGMP protocol attributes to control multicast group memberships within Ostinato streams. Access and modify these properties using the IGMP object

To add and configure Igmp in a stream, add a protocol to the stream, set the protocol id to ost_pb.Protocol.kIgmpFieldNumber and access the Gmp object from the Protocol object's Extensions dictionary using the key igmp_pb2.igmp

from ostinato.protocols import igmp_pb2
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add() = ost_pb.Protocol.kIgmpFieldNumber
my_igmp = proto.Extensions[igmp_pb2.igmp]

You can then set Igmp attributes using my_igmp.<attribute>

Back to top