Skip to content

ostinato.protocols.svlan_pb2 module

Efficiently configure 802.1ad SVLAN attributes in Ostinato streams for precise network packet customization

To add and configure Svlan in a stream, add a protocol to the stream, set the protocol id to ost_pb.Protocol.kSvlanFieldNumber and access the Vlan object from the Protocol object's Extensions dictionary using the key svlan_pb2.svlan

from ostinato.protocols import svlan_pb2
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add() = ost_pb.Protocol.kSvlanFieldNumber
my_svlan = proto.Extensions[svlan_pb2.svlan]

You can then set Svlan attributes using my_svlan.<attribute>

Back to top