ostinato.protocols.tcp_pb2 module¶
Configure TCP protocol attributes for packet stream customization in Ostinato. Access and set parameters such as source and destination ports, sequence numbers, checksums, flags, and more using the Tcp object
To add and configure Tcp in a stream, add a protocol to the stream, set the protocol id to ost_pb.Protocol.kTcpFieldNumber
and access the Tcp object from the Protocol object's Extensions
dictionary using the key tcp_pb2.tcp
from ostinato.protocols import tcp_pb2
...
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add()
proto.protocol_id.id = ost_pb.Protocol.kTcpFieldNumber
my_tcp = proto.Extensions[tcp_pb2.tcp]
my_tcp.<attribute>
Tcp class¶
Class attributes¶
is_override_src_port¶
Tcp.is_override_src_port : boolean
is_override_dst_port¶
Tcp.is_override_dst_port : boolean
is_override_hdrlen¶
Tcp.is_override_hdrlen : boolean
is_override_cksum¶
Tcp.is_override_cksum : boolean
src_port¶
Tcp.src_port : long
dst_port¶
Tcp.dst_port : long
seq_num¶
Tcp.seq_num : long
ack_num¶
Tcp.ack_num : long
hdrlen_rsvd¶
Tcp.hdrlen_rsvd : long
flags¶
Tcp.flags : long
window¶
Tcp.window : long
cksum¶
Tcp.cksum : long
urg_ptr¶
Tcp.urg_ptr : long