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()
proto.protocol_id.id = ost_pb.Protocol.kSvlanFieldNumber
my_svlan = proto.Extensions[svlan_pb2.svlan]
my_svlan.<attribute>