Skip to content

ostinato.protocols.igmp_pb2 module

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()
proto.protocol_id.id = ost_pb.Protocol.kIgmpFieldNumber
my_igmp = proto.Extensions[igmp_pb2.igmp]

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

Back to top