Skip to content

ostinato.protocols.dot2llc_pb2 module

Configure 802.2 LLC streams within Ostinato for precise customization of network packets. This involves setting specific attributes for 802.3 and LLC protocols to tailor packet behavior

Dot2Llc is a combination of Dot3 followed by Llc.

To add and configure Dot2Llc in a stream, add a protocol to the stream and set the protocol id to ost_pb.Protocol.kDot2LlcFieldNumber. However, unlike other protocols, the Dot2Llc object accessed via the Protocol object's Extensions dictionary using the key dot2llc_pb2.dot2Llc does not have any attributes of its own. Instead you need to access the individual Dot3 and Llc objects from the Protocol object's Extensions dictionary using their respective keys.

from ostinato.protocols import dot3_pb2, llc_pb2
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add() = ost_pb.Protocol.kDot2LlcFieldNumber
my_dot3 = proto.Extensions[dot3_pb2.dot3]
my_llc = proto.Extensions[]

You can then set Dot3 attributes and Llc attributes using my_dot3.<attribute> and my_llc.<attribute> respectively.

Back to top