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() proto.protocol_id.id = ost_pb.Protocol.kDot2LlcFieldNumber my_dot3 = proto.Extensions[dot3_pb2.dot3] my_llc = proto.Extensions[llc_pb2.llc]