ostinato.protocols.arp_pb2 module

To add and configure Arp in a stream, add a protocol to the stream, set the protocol id to ost_pb.Protocol.kArpFieldNumber and access the Arp object from the Protocol object's Extensions dictionary using the key arp_pb2.arp

from ostinato.protocols import arp_pb2
...
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add()
proto.protocol_id.id = ost_pb.Protocol.kArpFieldNumber
my_arp = proto.Extensions[arp_pb2.arp]

You can then set Arp attributes using my_arp.<attribute>

Arp class

Class constants

HwAddrMode

Arp.kFixed 
Arp.kIncrement 
Arp.kDecrement

ProtoAddrMode

Arp.kFixedHost 
Arp.kIncrementHost 
Arp.kDecrementHost 
Arp.kRandomHost

Class attributes

hw_type

Arp.hw_type : long

Optional. If not set, defaults to 1.

proto_type

Arp.proto_type : long

Optional. If not set, defaults to 2048.

hw_addr_len

Arp.hw_addr_len : long

Optional. If not set, defaults to 6.

proto_addr_len

Arp.proto_addr_len : long

Optional. If not set, defaults to 4.

op_code

Arp.op_code : long

Optional. If not set, defaults to 1.

sender_hw_addr

Arp.sender_hw_addr : long

Optional. If not set, defaults to 0.

sender_hw_addr_mode

Arp.sender_hw_addr_mode : HwAddrMode

Optional. If not set, defaults to kFixed.

See HwAddrMode

sender_hw_addr_count

Arp.sender_hw_addr_count : long

Optional. If not set, defaults to 16.

sender_proto_addr

Arp.sender_proto_addr : long

Optional. If not set, defaults to 0.

sender_proto_addr_mode

Arp.sender_proto_addr_mode : ProtoAddrMode

Optional. If not set, defaults to kFixedHost.

See ProtoAddrMode

sender_proto_addr_count

Arp.sender_proto_addr_count : long

Optional. If not set, defaults to 16.

sender_proto_addr_mask

Arp.sender_proto_addr_mask : int

Optional. If not set, defaults to 4294967040.

target_hw_addr

Arp.target_hw_addr : long

Optional. If not set, defaults to 0.

target_hw_addr_mode

Arp.target_hw_addr_mode : HwAddrMode

Optional. If not set, defaults to kFixed.

See HwAddrMode

target_hw_addr_count

Arp.target_hw_addr_count : long

Optional. If not set, defaults to 16.

target_proto_addr

Arp.target_proto_addr : long

Optional. If not set, defaults to 0.

target_proto_addr_mode

Arp.target_proto_addr_mode : ProtoAddrMode

Optional. If not set, defaults to kFixedHost.

See ProtoAddrMode

target_proto_addr_count

Arp.target_proto_addr_count : long

Optional. If not set, defaults to 16.

target_proto_addr_mask

Arp.target_proto_addr_mask : int

Optional. If not set, defaults to 4294967040.

results matching ""

    No results matching ""