Skip to content

ostinato.protocols.ip6over6_pb2 module

Ip6over6 is a combination of Ip6 followed by Ip6.

To add and configure Ip6over6 in a stream, add a protocol to the stream, set the protocol id to ost_pb.Protocol.kIp6over6FieldNumber and access the Ip6over6 object from the Protocol object's Extensions dictionary using the key ip6over6_pb2.ip6over6. The outer and inner Ip6 objects can then be accessed using the Ip6over6 object's Extensions dictionary using the keys ip6over6_pb2.ip6_outer and ip6over6_pb2.ip6_inner respectively.

from ostinato.protocols import ip6over6_pb2
...
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add()
proto.protocol_id.id = ost_pb.Protocol.kIp6over6FieldNumber
my_ip6over6 = proto.Extensions[ip6over6_pb2.ip6over6]
my_ip6_outer = my_ip6over6.Extensions[ip6over6_pb2.ip6_outer]
my_ip6_inner = my_ip6over6.Extensions[ip6over6_pb2.ip6_inner]

You can then set outer and inner Ip6 attributes using my_ip6_outer.<attribute> and my_ip6_inner.<attribute> respectively.

Back to top