Skip to content

ostinato.protocols.hexdump_pb2 module

Configure HexDump in your Ostinato stream to provide packet content as raw bytes. Pad with zero if required

To add and configure HexDump in a stream, add a protocol to the stream, set the protocol id to ost_pb.Protocol.kHexDumpFieldNumber and access the HexDump object from the Protocol object's Extensions dictionary using the key hexdump_pb2.hexDump

from ostinato.protocols import hexdump_pb2
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add() = ost_pb.Protocol.kHexDumpFieldNumber
my_hexDump = proto.Extensions[hexdump_pb2.hexDump]

You can then set HexDump attributes using my_hexDump.<attribute>

HexDump class

Class attributes


HexDump.content : bytes(python3)/str(python2)

Optional. If not set, defaults to "".


HexDump.pad_until_end : boolean

Optional. If not set, defaults to true.

Back to top