ostinato.protocols.vlan_pb2 module

To add and configure Vlan in a stream, add a protocol to the stream, set the protocol id to ost_pb.Protocol.kVlanFieldNumber and access the Vlan object from the Protocol object's Extensions dictionary using the key vlan_pb2.vlan

from ostinato.protocols import vlan_pb2
...
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add()
proto.protocol_id.id = ost_pb.Protocol.kVlanFieldNumber
my_vlan = proto.Extensions[vlan_pb2.vlan]

You can then set Vlan attributes using my_vlan.<attribute>

Vlan class

Class attributes

is_override_tpid

Vlan.is_override_tpid : boolean

Optional. If not set, defaults to False.

tpid

Vlan.tpid : long

Optional. If not set, defaults to 0.

vlan_tag

Vlan.vlan_tag : long

Optional. If not set, defaults to 0.

results matching ""

    No results matching ""