Skip to content

ostinato.protocols.dot3_pb2 module

Configure 802.3 Ethernet attributes using Ostinato dot3 protocol in Ostinato streams for network packet customization

To add and configure Dot3 in a stream, add a protocol to the stream, set the protocol id to ost_pb.Protocol.kDot3FieldNumber and access the Dot3 object from the Protocol object's Extensions dictionary using the key dot3_pb2.dot3

from ostinato.protocols import dot3_pb2
...
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add()
proto.protocol_id.id = ost_pb.Protocol.kDot3FieldNumber
my_dot3 = proto.Extensions[dot3_pb2.dot3]
You can then set Dot3 attributes using my_dot3.<attribute>

Dot3 class

Class attributes

is_override_length

Dot3.is_override_length : boolean
Optional. If not set, defaults to False.

length

Dot3.length : long
Optional. If not set, defaults to 0.

Back to top