ostinato.protocols.udp_pb2 module¶
Configure UDP protocol attributes in Ostinato streams for customizable packet behavior, including source/destination ports, total length, and checksum.
To add and configure Udp in a stream, add a protocol to the stream, set the protocol id to ost_pb.Protocol.kUdpFieldNumber
and access the Udp object from the Protocol object's Extensions
dictionary using the key udp_pb2.udp
from ostinato.protocols import udp_pb2
...
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add()
proto.protocol_id.id = ost_pb.Protocol.kUdpFieldNumber
my_udp = proto.Extensions[udp_pb2.udp]
my_udp.<attribute>
Udp class¶
Class attributes¶
is_override_src_port¶
Udp.is_override_src_port : boolean
is_override_dst_port¶
Udp.is_override_dst_port : boolean
is_override_totlen¶
Udp.is_override_totlen : boolean
is_override_cksum¶
Udp.is_override_cksum : boolean
src_port¶
Udp.src_port : long
dst_port¶
Udp.dst_port : long
totlen¶
Udp.totlen : long
cksum¶
Udp.cksum : long