p4_commands module

This module contains the L47 port classes.

The Xena L47 test execution engine has seven states: off, prepare, prepare_rdy, prerun, prerun_rdy, running and stopped. Traffic is generated in the prerun and running states only, and configuration of parameters is only valid in state off except for a few runtime options. Port traffic commands can be given with P4_TRAFFIC and port state queried by P4_STATE.

  • off - default state. Entered from stopped or prepare on OFF command. This is the only state that allows configuration commands. P_RESET is also considered a configuration command. Upon entering off state, some internal ‘’house cleaning’’’ is done. For example: freeing TCP Connections, clearing test specific counters etc.

  • prepare - this state is entered from state off on PREPARE command. Here internal data structures relevant for the test configuration are created.

  • prepare_rdy - entered automatically after activities in prepare have completed successfully.

  • prepare_fail - entered automatically from prepare, if an error occurs. An error could for example be failure to load a configured replay file.

  • prerun - entered from prepare_ready on PRERUN command. If enabled, this is where ARP and NDP requests are sent.

  • prerun_rdy - entered automatically after activities in prerun have completed.

  • running - entered either from prepare_ready or prerun_ready on ON command. This is where TCP connections are established, payload is generated and connections are closed again.

  • stopping - entered from running, prerun_ready or prerun on STOP command. Stops Rx/Tx traffic. In the stopping state, post-test data are calculated and captured packets are saved to files.

  • stopped - entered automatically after activities in stopping are complete. This is where you can read post-test statistics and extract captured packets.

Port (L47) Commands

class P4_APTITUDES[source]

Bases: object

Returns the ports aptitudes - i.e. what is possible to configure on the port in terms of features and performance.

Current schema of the BSON document:

schema = {
    'chassis': {
        'type': 'int32',
        'required': True,
        'enum': ['CHASSIS_TYPE_UNKNOWN',
                'CHASSIS_TYPE_APPLIANCE',
                'CHASSIS_TYPE_BAY',
                'CHASSIS_TYPE_COMPACT',
                'CHASSIS_TYPE_SAFIRE']
    },
    'tcp_udp': {
        'type': 'document',
        'required': True,
        'properties': {
            'cc': {
                'type': 'int32',
                'required': True,
            },
        }
    },
    'tls': {
        'type': 'document',
        'required': True,
        'properties': {
            'supported': {
                'type': 'bool',
                'required': True,
            },
            'cc': {
                'type': 'int32',
                'required': True,
            }
        }
    }
}
class GetDataAttr[source]

Bases: ResponseBodyStruct

bson

list of hex bytes, bson document containing the ports aptitudes

get()[source]

Get the ports aptitudes

Returns:

the ports aptitudes in BSON format

Return type:

P4_APTITUDES.GetDataAttr

class P4_ARP_CONFIG[source]

Bases: object

Configure the value of the ARP request transmission rate, retransmission timeout and max. retries.

class GetDataAttr[source]

Bases: ResponseBodyStruct

rate

integer, ARP Request transmission rate (requests / sec) - must be larger than 0

retrans_timeout

integer, ARP Request retransmission timeout [ms] - must be larger than 0

retries

byte, maximum ARP Request retransmission retries

class SetDataAttr[source]

Bases: RequestBodyStruct

rate

integer, ARP Request transmission rate (requests / sec) - must be larger than 0

retrans_timeout

integer, ARP Request retransmission timeout [ms] - must be larger than 0

retries

byte, maximum ARP Request retransmission retries

get()[source]

Get the ARP configuration on the port.

Returns:

the ARP configuration on the port

Return type:

P4_ARP_CONFIG.GetDataAttr

set(rate, retrans_timeout, retries)[source]

Set the ARP configuration on the port.

Parameters:
  • rate (int) – ARP Request transmission rate (requests/sec) - must be larger than 0

  • retrans_timeout (int) – ARP Request retransmission timeout [ms] - must be larger than 0

  • retries (int) – maximum ARP Request retransmission retries

class P4_ARP_COUNTERS[source]

Bases: object

Return total Port ARP protocol error statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

arp_failed_count

long integer, number of IP address that was not resolved

arp_reply_lookup_failure_count

long integer, number of ARP replies received that could not be resolved

arp_request_lookup_failure_count

long integer, number of ARP requests received that could not be resolved

arp_request_retrans_count

long integer, number of retransmitted ARP requests

arp_resolved_count

long integer, number of correct resolved IP addresses

arp_table_lookup_failure_count

long integer, number of dest IP addresses not found in the ARP table

current_time

long integer, the current time (mSec since module restart)

invalid_arp_count

long integer, total number of invalid ARP packets received

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port ARP protocol error statistics since last clear.

Returns:

total Port ARP protocol error statistics since last clear.

Return type:

P4_ARP_COUNTERS.GetDataAttr

class P4_ARP_RX_COUNTERS[source]

Bases: object

Return total Port ARP protocol receive statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

arp_reply_count

long integer, total number ARP Replies received

arp_request_count

long integer, total number ARP Requests received

current_time

long integer, the current time (mSec since module restart)

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port ARP protocol receive statistics since last clear.

Returns:

total Port ARP protocol receive statistics since last clear.

Return type:

P4_ARP_RX_COUNTERS.GetDataAttr

class P4_ARP_TX_COUNTERS[source]

Bases: object

Return total Port ARP protocol transmit statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

arp_reply_count

long integer, total number ARP Replies transmitted

arp_request_count

long integer, total number ARP Requests transmitted

current_time

long integer, the current time (mSec since module restart)

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port ARP protocol transmit statistics since last clear.

Returns:

total Port ARP protocol transmit statistics since last clear.

Return type:

P4_ARP_TX_COUNTERS.GetDataAttr

class P4_CAPABILITIES[source]

Bases: object

Report the speeds supported by the L47 port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

N100_gbps

byte, 100G speed supported

N100_mbps

byte, 100M speed supported

N10_gbps

byte, 10G speed supported

N1_gbps

byte, 1G speed supported

N25_gbps

byte, 25G speed supported

N2_5_gbps

byte, 2.5G speed supported

N40_gbps

byte, 40G speed supported

N50_gbps

byte, 50G speed supported

N5_gbps

byte, 5G speed supported

auto

byte, autoneg supported

get()[source]

Get the speeds supported by the L47 port.

Returns:

the speeds supported by the L47 port

Return type:

P4_CAPABILITIES.GetDataAttr

class P4_CAPTURE[source]

Bases: object

Starts or stops packet capture on this port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

on_off

coded byte, specifying whether to capture traffic on this port

class SetDataAttr[source]

Bases: RequestBodyStruct

on_off

coded byte, specifying whether to capture traffic on this port

get()[source]

Get packet capture state on this port.

Returns:

packet capture state on this port

Return type:

P4_CAPTURE.GetDataAttr

set(on_off)[source]

Set packet capture state on this port.

Parameters:

on_off (OnOff) – specifying whether to capture traffic on this port

set_off()

Stop packet capture on this port.

set_on()

Start packet capture on this port.

class P4_CAPTURE_GET_FIRST[source]

Bases: object

Returns the first captured frame on the port. Command is only valid when port is in state STOPPED

class GetDataAttr[source]

Bases: ResponseBodyStruct

capture_length

integer, length of captured portion of the frame

frame

list of hex bytes, the captured frame (capture_len bytes)

frame_length

integer, length of the frame

index

integer, index of frame returned

microsecond

integer, microsecond value of frame capture timestamp

second

integer, second value of frame capture timestamp

get()[source]

Get the first captured frame on the port

Returns:

the first captured frame on the port

Return type:

P4_CAPTURE_GET_FIRST.GetDataAttr

class P4_CAPTURE_GET_NEXT[source]

Bases: object

Returns the next captured frame on the port. Command is only valid when port is in state STOPPED

class GetDataAttr[source]

Bases: ResponseBodyStruct

capture_length

integer, length of captured portion of the frame

frame

hex data, the captured frame (capture_len bytes)

frame_length

integer, length of the frame

index

integer, index of frame returned

microsecond

integer, microsecond value of frame capture timestamp

second

integer, second value of frame capture timestamp

get()[source]

Get the next captured frame on the port

Returns:

the next captured frame on the port

Return type:

P4_CAPTURE_GET_NEXT.GetDataAttr

class P4_CLEAR[source]

Bases: object

Set the Port State to OFF and delete all configured Connection Groups for the port.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Set the Port State to OFF and delete all configured Connection Groups for the port.

class P4_CLEAR_COUNTERS[source]

Bases: object

Clears all run-time port counters.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Clears all run-time port counters.

class P4_DEV_NAME[source]

Bases: object

Report the name of the device (NIC) on which the port is located.

class GetDataAttr[source]

Bases: ResponseBodyStruct

name

string, name of the device (NIC) on which the port is located

get()[source]

Get the name of the device (NIC) on which the port is located.

Returns:

the name of the device (NIC) on which the port is located.

Return type:

P4_DEV_NAME.GetDataAttr

class P4_DHCP_CONFIG[source]

Bases: object

Configure DHCP Client in order to aquire a pool of ip addresses.

class GetDataAttr[source]

Bases: ResponseBodyStruct

class SetDataAttr[source]

Bases: RequestBodyStruct

get()[source]

Get the DHCP configuration.

Returns:

the DHCP configuration

Return type:

P4_DHCP_CONFIG.GetDataAttr

set(num_requests, retransmit_retries, timeout, base_hw_addr)[source]

Set the DHCP configuration.

Parameters:
  • num_requests (unsigned int) – Number of DHCP requests - must be larger than 0

  • retransmit_retries (unsigned int) – maximum DHCP Request retransmission retries - must be larger than 0

  • timeout (unsigned int) – retransmission timeout [ms]

  • base_hw_addr (str) – base hw address for generating DHCP requests (the first 3 bytes is being used)

class P4_DHCP_RESULT[source]

Bases: object

Get the port’s last DHCP client process result

class GetDataAttr[source]

Bases: ResponseBodyStruct

get()[source]

Get the port’s the result of the last DHCP client process

Returns:

A list that contains the response for each DHCP request that had lunched by the last DHCP client process

Return type:

P4_DHCP_RESULT.GetDataAttr

class P4_DHCP_RUN[source]

Bases: object

Run DHCP Client process to obtain a pool of address.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Run DHCP Client Process.

class P4_DHCP_STATE[source]

Bases: object

Get the last state of the DHCP Client Process.

class GetDataAttr[source]

Bases: ResponseBodyStruct

get()[source]
Get the last state of the DHCP Client Process.

The dhcp_state is an enum type of DhcpState{DHCP_STATE_UNKNOWN=0, DHCP_STATE_RUNNING=1, DHCP_STATE_COMPLETED=2, DHCP_STATE_FAILED=3}

Returns:

the last state of the DHCP Client Process.

Return type:

P4_DHCP_STATE.GetDataAttr

class P4_DHCP_VLAN[source]

Bases: object

Configure a set of VLAN tags for current DHCP Process.

class GetDataAttr[source]

Bases: ResponseBodyStruct

class SetDataAttr[source]

Bases: RequestBodyStruct

get()[source]

Get the DHCP VLAN configuration :return: Whether DHCP VLAN is configured or not :rtype: P4_DHCP_RESULT.GetDataAttr :return: A list of vlans :rtype: P4_DHCP_RESULT.GetDataAttr

set(state, vlans)[source]

Set a list of VLANs for current DHCP Process, up to 8 TCIs can be defined. The order of the VLANs is like the following: ethernet/vlan0/vlan1/../vlanN/uppler_layer(like IPv4)

Parameters:
class P4_ETH_COUNTERS[source]

Bases: object

Return total port Ethernet statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

rx_error_count

long integer, RX errors

rx_packet_lost_count

long integer, packets lost by the Ethernet driver due to RX queue overflow

tx_error_count

long integer, TX errors

get()[source]

Get total port Ethernet statistics since last clear.

Returns:

total port Ethernet statistics since last clear.

Return type:

P4_ETH_COUNTERS.GetDataAttr

class P4_ETH_QUEUE_COUNTERS[source]

Bases: object

Get the stats of the all active queues of the port

class GetDataAttr[source]

Bases: ResponseBodyStruct

get()[source]

Get the stats of the all active queues of the port :return: The current time (mSec since module restart) :rtype: P4_ETH_QUEUE_COUNTERS.GetDataAttr :return: Reference time (mSec for P4_TRAFFIC on) :rtype: P4_ETH_QUEUE_COUNTERS.GetDataAttr :return: Number of Active queues :rtype: P4_ETH_QUEUE_COUNTERS.GetDataAttr :return: A list that each contains stats of a queue :rtype: P4_ETH_QUEUE_COUNTERS.GetDataAttr

class P4_ETH_RX_COUNTERS[source]

Bases: object

Return total port Ethernet receive statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

bits_per_sec

long integer, bit/second of (layer 2) bytes received

byte_count

long integer, total number of (layer 2) bytes received

current_time

long integer, the current time (mSec since module restart)

packet_count

long integer, total number of packets received

packets_per_sec

long, integer packets/second of received packets

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total port Ethernet receive statistics since last clear.

Returns:

total port Ethernet receive statistics since last clear.

Return type:

P4_ETH_RX_COUNTERS.GetDataAttr

class P4_ETH_TX_COUNTERS[source]

Bases: object

Return total port Ethernet transmit statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

bits_per_sec

long integer, bit/second of (layer 2) bytes transmitted

byte_count

long integer, total number of (layer 2) bytes transmitted

current_time

long integer, the current time (mSec since module restart)

packet_count

long integer, total number of packets transmitted

packets_per_sec

long integer, packets/second of packets transmitted

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total port Ethernet transmit statistics since last clear.

Returns:

total port Ethernet transmit statistics since last clear.

Return type:

P4_ETH_TX_COUNTERS.GetDataAttr

class P4_FW_VER[source]

Bases: object

Report the firmware version of the port (NIC).

class GetDataAttr[source]

Bases: ResponseBodyStruct

major

integer, Major firmware version

minor

integer, Minor firmware version

get()[source]

Get the firmware version of the port (NIC).

Returns:

the firmware version of the port (NIC)

Return type:

P4_FW_VER.GetDataAttr

class P4_ICMP_COUNTERS[source]

Bases: object

Return total Port ICMP protocol error statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

invalid_icmp_count

long integer, total number of unknown or invalid ICMP packets received

invalid_icmpv6_count

long integer, total number of unknown or invalid ICMPv6 packets received

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

unknown_icmp_count

long integer, total number of unknown or unsupported ICMP packets received

unknown_icmpv6_count

long integer, total number of unknown or unsupported ICMPv6 packets received

get()[source]

Get total Port ICMP protocol error statistics since last clear.

Returns:

total Port ICMP protocol error statistics since last clear.

Return type:

P4_ICMP_COUNTERS.GetDataAttr

class P4_ICMP_RX_COUNTERS[source]

Bases: object

Return total Port ICMP protocol receive statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

icmp_dest_unknown_count

long integer, total number of ICMP Destination unknown received

icmp_echo_reply_count

long integer, total number of ICMP Echo replies received

icmp_echo_request_count

long integer, total number of ICMP Echo requests received

icmp_time_excessive_count

long integer, total number of ICMP Time exceeded received

icmpv6_count

long integer, total number of ICMPv6 packets received

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port ICMP protocol receive statistics since last clear.

Returns:

total Port ICMP protocol receive statistics since last clear.

Return type:

P4_ICMP_RX_COUNTERS.GetDataAttr

class P4_ICMP_TX_COUNTERS[source]

Bases: object

Return total Port ICMP protocol transmit statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

icmp_dest_unknown_count

long integer, total number of ICMP Destination unknown transmitted

icmp_echo_reply_count

long integer, total number of ICMP Echo replies transmitted

icmp_echo_request_count

long integer, total number of ICMP Echo requests transmitted

icmp_time_excessive_count

long integer, total number of ICMP Time exceeded transmitted

icmpv6_count

long integer, total number of ICMPv6 packets transmitted

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port ICMP protocol transmit statistics since last clear.

Returns:

total Port ICMP protocol transmit statistics since last clear.

Return type:

P4_ICMP_TX_COUNTERS.GetDataAttr

class P4_IPV4_COUNTERS[source]

Bases: object

Return total Port IPv4 protocol error statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

checksum_error_count

long integer, total number of IPv4 packets which ip header checksum error

current_time

long integer, the current time (mSec since module restart)

invalid_packet_count

long integer, total number of IPv4 packets which are malformed

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

unknown_packet_count

long integer, total number of IPv4 packets with unknown protocol

get()[source]

Get total Port IPv4 protocol error statistics since last clear.

Returns:

total Port IPv4 protocol error statistics since last clear.

Return type:

P4_IPV4_COUNTERS.GetDataAttr

class P4_IPV4_RX_COUNTERS[source]

Bases: object

Return total Port IPv4 protocol receive statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

packet_count

long integer, total number of IPv4 packets received

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port IPv4 protocol receive statistics since last clear.

Returns:

total Port IPv4 protocol receive statistics since last clear.

Return type:

P4_IPV4_RX_COUNTERS.GetDataAttr

class P4_IPV4_TX_COUNTERS[source]

Bases: object

Return total Port IPv4 protocol transmit statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

packet_count

long integer, total number of IPv4 packets transmitted

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port IPv4 protocol transmit statistics since last clear.

Returns:

total Port IPv4 protocol transmit statistics since last clear.

Return type:

P4_IPV4_TX_COUNTERS.GetDataAttr

class P4_IPV6_COUNTERS[source]

Bases: object

Return total Port IPv6 protocol error statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

invalid_packet_count

long integer, total number of ipv6 packets which are malformed

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

unknown_packet_count

long integer, total number of ipv6 packets with unknown protocol

get()[source]

Get total Port IPv6 protocol error statistics since last clear.

Returns:

total Port IPv6 protocol error statistics since last clear.

Return type:

P4_IPV6_COUNTERS.GetDataAttr

class P4_IPV6_RX_COUNTERS[source]

Bases: object

Return total Port IPv6 protocol receive statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

packet_count

long integer, total number of IPv6 packets received

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port IPv6 protocol receive statistics since last clear.

Returns:

total Port IPv6 protocol receive statistics since last clear.

Return type:

P4_IPV6_RX_COUNTERS.GetDataAttr

class P4_IPV6_TX_COUNTERS[source]

Bases: object

Return total Port IPv6 protocol transmit statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

packet_count

long integer, total number of IPv6 packets transmitted

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port IPv6 protocol transmit statistics since last clear.

Returns:

total Port IPv6 protocol transmit statistics since last clear.

Return type:

P4_IPV6_TX_COUNTERS.GetDataAttr

class P4_LICENSE_INFO[source]

Bases: object

Returns the information on the license assigned to the port - if any.

class GetDataAttr[source]

Bases: ResponseBodyStruct

expiration

long integer, if a license is assigned to the port and it is not permanent, specifies the expiration date of the license - in seconds since Jan 1, 1970.

permanency

coded byte, if a license is assigned to the port, specifies if the license is permanent

present

coded byte, specifies if a license is assigned to the port

speed

coded byte, if a license is assigned to the port, specifies the speed of the license

get()[source]

Get the information on the license assigned to the port.

Returns:

the information on the license assigned to the port

Return type:

P4_LICENSE_INFO.GetDataAttr

class P4_MAX_PACKET_RATE[source]

Bases: object

Specifies the maximum number of packets per second allowed to be transmitted on the port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mode

coded byte, specifies the mode of the max. pps mechanism

rate

integer, maximum number of packets per second to transmit on this port

time_window

integer, time window [us] to measure the pps rate

class SetDataAttr[source]

Bases: RequestBodyStruct

mode

coded byte, specifies the mode of the max. pps mechanism

rate

integer, maximum number of packets per second to transmit on this port

time_window

integer, time window [us] to measure the pps rate

get()[source]

Get the maximum number of packets per second allowed to be transmitted on the port.

Returns:

the maximum number of packets per second allowed to be transmitted on the port.

Return type:

P4_MAX_PACKET_RATE.GetDataAttr

set(mode, rate, time_window)[source]

Set the maximum number of packets per second allowed to be transmitted on the port.

Parameters:
  • mode (AutoOrManual) – specifies the mode of the max. pps mechanism

  • rate (int) – maximum number of packets per second to transmit on this port

  • time_window (int) – time window [us] to measure the pps rate

set_automatic(rate, time_window)

Set port max packet rate mode to Automatic.

set_manual(rate, time_window)

Set port max packet rate mode to Manual.

class P4_NDP_CONFIG[source]

Bases: object

Configure the value of the NDP Neighbor Solicitation transmission rate, retransmission timeout and max. retries.

class GetDataAttr[source]

Bases: ResponseBodyStruct

rate

integer, NDP Neighbor Solicitation transmission rate (requests / sec) - must be larger than 0

retrans_timeout

integer, NDP Neighbor Solicitation retransmission timeout [ms] - must be larger than 0

retries

byte, Max. NDP Neighbor Solicitation retransmission retries

class SetDataAttr[source]

Bases: RequestBodyStruct

rate

integer, NDP Neighbor Solicitation transmission rate (requests / sec) - must be larger than 0

retrans_timeout

integer, NDP Neighbor Solicitation retransmission timeout [ms] - must be larger than 0

retries

byte, Max. NDP Neighbor Solicitation retransmission retries

get()[source]

Get the NDP configuration on the port.

Returns:

the NDP configuration on the port

Return type:

P4_NDP_CONFIG.GetDataAttr

set(rate, retrans_timeout, retries)[source]

Set the NDP configuration on the port.

Parameters:
  • rate (int) – NDP Neighbor Solicitation transmission rate (requests/sec) - must be larger than 0

  • retrans_timeout (int) – NDP Neighbor Solicitation retransmission timeout [ms] - must be larger than 0

  • retries (int) – maximum NDP Neighbor Solicitation retransmission retries

class P4_NDP_COUNTERS[source]

Bases: object

Return total Port NDP protocol error statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

invalid_ndp_count

long integer, total number of invalid NDP packets received

ndp_failed_count

long integer, number of IP address that was not resolved

ndp_reply_lookup_failure_count

long integer, number of NDP replies received that could not be resolved

ndp_request_lookup_failure_count

long integer, number of NDP requests received that could not be resolved

ndp_request_retrans_count

long integer, number of retransmitted NDP requests

ndp_resolved_count

long integer, number of correct resolved IP addresses

ndp_table_lookup_failure_count

long integer, number of dest IP addresses not found in the NDP table

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port NDP protocol error statistics since last clear.

Returns:

total Port NDP protocol error statistics since last clear.

Return type:

P4_NDP_COUNTERS.GetDataAttr

class P4_NDP_RX_COUNTERS[source]

Bases: object

Return total Port NDP protocol receive statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

ndp_reply_count

long integer, total number NDP Replies received

ndp_request_count

long integer, total number NDP Requests received

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port NDP protocol receive statistics since last clear.

Returns:

total Port NDP protocol receive statistics since last clear.

Return type:

P4_NDP_RX_COUNTERS.GetDataAttr

class P4_NDP_TX_COUNTERS[source]

Bases: object

Return total Port NDP protocol transmit statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

ndp_reply_count

long integer, total number NDP Replies transmitted

ndp_request_count

long integer, total number NDP Requests transmitted

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port NDP protocol transmit statistics since last clear.

Returns:

total Port NDP protocol transmit statistics since last clear.

Return type:

P4_NDP_TX_COUNTERS.GetDataAttr

class P4_PCI_INFO[source]

Bases: object

Report the port PCI info.

class GetDataAttr[source]

Bases: ResponseBodyStruct

device_id

four hex bytes, PCI Device ID

rev

integer, Revision

sub_device_id

four hex bytes, PCI Subsystem Device ID

sub_vendor_id

four hex bytes, PCI Subsystem Vendor ID

vendor_id

four hex bytes, PCI Vendor ID

get()[source]

Get the port PCI info.

Returns:

the port PCI info

Return type:

P4_PCI_INFO.GetDataAttr

class P4_PORT_COUNTERS[source]

Bases: object

Return total port transmit error statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

invalid_eth_count

long integer, total number of invalid (e.g. short) Ethernet packets received

mismatch_vlan_error_count

long integer, total number of packets with mismatching vlan info received

pkt_rate_limit_count

long integer, number of times that number of packets transmitted has been limited by the maximum packet rate limiter.

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

unknown_eth_count

long integer, total number of unknown or unsupported Ethernet packets received

get()[source]

Get total port transmit error statistics since last clear.

Returns:

total port transmit error statistics since last clear.

Return type:

P4_PORT_COUNTERS.GetDataAttr

class P4_PORT_RX_COUNTERS[source]

Bases: object

Return total port receive statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

bits_per_sec

long integer, bit/second of (layer 1) bits received.

byte_count

long integer, total number of (layer 1) bytes received.

current_time

long integer, the current time (mSec since module restart)

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

vlan_packet_count

long integer, total number of 802.1Q VLAN tagged packets received

get()[source]

Get total port receive statistics since last clear.

Returns:

total port receive statistics since last clear.

Return type:

P4_PORT_RX_COUNTERS.GetDataAttr

class P4_PORT_TX_COUNTERS[source]

Bases: object

Return total port transmit statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

bits_per_sec

long integer, bit/second of (layer 1) bits transmitted.

byte_count

long integer, total number of (layer 1) bytes received.

current_time

long integer, the current time (mSec since module restart)

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

vlan_packet_count

long integer, total number of 802.1Q VLAN tagged packets transmitted

get()[source]

Get total port transmit statistics since last clear.

Returns:

total port transmit statistics since last clear.

Return type:

P4_PORT_TX_COUNTERS.GetDataAttr

class P4_PORT_TYPE[source]

Bases: object

Report the port type. The different possible ports are divided into types.

class GetDataAttr[source]

Bases: ResponseBodyStruct

type_number

integer, enumerated port type

type_string

string, textual representation of the port type

get()[source]

Get the L47 port type.

Returns:

the L47 port type

Return type:

P4_PORT_TYPE.GetDataAttr

class P4_RX_MTU[source]

Bases: object

Return histogram over received (layer 3) packets sizes in 1 byte intervals. Each bin represents a packet size in the interval [576..1500] bytes.

class GetDataAttr[source]

Bases: ResponseBodyStruct

bins

925 x byte, ‘1’ if any packets were received with the specified layer 3 size, otherwise ‘0’.

get()[source]

Get histogram over received (layer 3) packets sizes in 1 byte intervals.

Returns:

histogram over received (layer 3) packets sizes in 1 byte intervals.

Return type:

P4_RX_MTU.GetDataAttr

class P4_RX_PACKET_SIZE[source]

Bases: object

Return a histogram over received (layer 2) packets sizes in 100 bytes intervals.

class GetDataAttr[source]

Bases: ResponseBodyStruct

bin_00

long integer, number of packets received with a (layer 2) size in the given interval.

bin_01

long integer, number of packets received with a (layer 2) size in the given interval.

bin_02

long integer, number of packets received with a (layer 2) size in the given interval.

bin_03

long integer, number of packets received with a (layer 2) size in the given interval.

bin_04

long integer, number of packets received with a (layer 2) size in the given interval.

bin_05

long integer, number of packets received with a (layer 2) size in the given interval.

bin_06

long integer, number of packets received with a (layer 2) size in the given interval.

bin_07

long integer, number of packets received with a (layer 2) size in the given interval.

bin_08

long integer, number of packets received with a (layer 2) size in the given interval.

bin_09

long integer, number of packets received with a (layer 2) size in the given interval.

bin_10

long integer, number of packets received with a (layer 2) size in the given interval.

bin_11

long integer, number of packets received with a (layer 2) size in the given interval.

bin_12

long integer, number of packets received with a (layer 2) size in the given interval.

bin_13

long integer, number of packets received with a (layer 2) size in the given interval.

bin_14

long integer, number of packets received with a (layer 2) size in the given interval.

bin_15

long integer, number of packets received with a (layer 2) size in the given interval.

current_time

long integer, the current time (mSec since module restart)

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get a histogram over received (layer 2) packets sizes in 100 bytes intervals.

Returns:

a histogram over received (layer 2) packets sizes in 100 bytes intervals.

Return type:

P4_RX_PACKET_SIZE.GetDataAttr

class P4_SPEEDSELECTION[source]

Bases: object

Sets the port speed. The selected speed must be one of the speeds supported by the port, which can be retrieved with P4_CAPABILITIES.

class GetDataAttr[source]

Bases: ResponseBodyStruct

speed

coded byte, specifies the speed of the port

class SetDataAttr[source]

Bases: RequestBodyStruct

speed

coded byte, specifies the speed of the port

get()[source]

Get the port speed mode.

Returns:

the port speed mode.

Return type:

P4_SPEEDSELECTION.GetDataAttr

set(speed)[source]

Set the port speed mode.

Parameters:

speed (L47PortSpeed) – specifies the speed mode of the port

set_auto()

Set the port speed mode to Auto.

set_f100g()

Set the port speed mode to 100 Gbit/s.

set_f100m()

Set the port speed mode to 100 Mbit/s.

set_f10g()

Set the port speed mode to 10 Gbit/s.

set_f1g()

Set the port speed mode to 1 Gbit/s.

set_f25g()

Set the port speed mode to 25 Gbit/s.

set_f2_5g()

Set the port speed mode to 2.5 Gbit/s.

set_f40g()

Set the port speed mode to 40 Gbit/s.

set_f50g()

Set the port speed mode to 50 Gbit/s.

set_f5g()

Set the port speed mode to 5 Gbit/s.

class P4_STATE[source]

Bases: object

Display the current state of the L47 port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

state

coded byte, specifying the current state for this port.

get()[source]

Get the current state of the L47 port.

Returns:

the current state of the L47 port

Return type:

P4_STATE.GetDataAttr

class P4_STATE_STATUS[source]

Bases: object

Returns status of the last port state change. If the port state has changed to PREPARE_FAIL, the status contains information about the reason for the fail. Currently the status will be “OK”in all other states.

class GetDataAttr[source]

Bases: ResponseBodyStruct

status

string, status for the last port state change

get()[source]

Get status of the last port state change.

Returns:

status of the last port state change

Return type:

P4_STATE_STATUS.GetDataAttr

class P4_TCP_COUNTERS[source]

Bases: object

Return total Port TCP protocol error statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

checksum_error_count

long integer, total number of tcp packets which tcp header checksum error

current_time

long integer, the current time (mSec since module restart)

invalid_tcp_count

long integer, total number of TCP packets which are malformed

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

tcp_lookup_failure_count

long integer, number of TCP packets received that could not be resolved

get()[source]

Get total Port TCP protocol error statistics since last clear.

Returns:

total Port TCP protocol error statistics since last clear.

Return type:

P4_TCP_COUNTERS.GetDataAttr

class P4_TCP_RX_COUNTERS[source]

Bases: object

Return total Port TCP protocol receive statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

packet_count

long integer, total number of TCP packets received

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port TCP protocol receive statistics since last clear.

Returns:

total Port TCP protocol receive statistics since last clear.

Return type:

P4_TCP_RX_COUNTERS.GetDataAttr

class P4_TCP_TX_COUNTERS[source]

Bases: object

Return total Port TCP protocol transmit statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

packet_count

long integer, total number of TCP packets transmitted

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port TCP protocol transmit statistics since last clear.

Returns:

total Port TCP protocol transmit statistics since last clear.

Return type:

P4_TCP_TX_COUNTERS.GetDataAttr

class P4_TRAFFIC[source]

Bases: object

Gives a traffic state command to a L47 port.

class SetDataAttr[source]

Bases: RequestBodyStruct

traffic_state

coded byte, the traffic state command issued to the port.

set(traffic_state)[source]

Set L47 port traffic state.

Parameters:

traffic_state (L47TrafficState) – the traffic state command issued to the port

set_off()

Set L47 port traffic state to Off.

set_on()

Set L47 port traffic state to On.

set_prepare()

Set L47 port traffic state to Prepare.

set_prerun()

Set L47 port traffic state to Prerun.

set_stop()

Set L47 port traffic state to Stop.

class P4_TX_MTU[source]

Bases: object

Return histogram over transmitted (layer 3) packets sizes in 1 byte intervals. Each bin represents a packet size in the interval [576..1500] bytes.

class GetDataAttr[source]

Bases: ResponseBodyStruct

bins

925 x byte, ‘1’ if any packets were transmitted with the specified layer 3 size, otherwise ‘0’.

get()[source]

Get histogram over transmitted (layer 3) packets sizes in 1 byte intervals.

Returns:

histogram over transmitted (layer 3) packets sizes in 1 byte intervals.

Return type:

P4_TX_MTU.GetDataAttr

class P4_TX_PACKET_SIZE[source]

Bases: object

Return histogram over transmitted (layer 2) packets sizes in 100 bytes intervals.

class GetDataAttr[source]

Bases: ResponseBodyStruct

bin_00

long integer, number of packets received with a (layer 2) size in the given interval.

bin_01

long integer, number of packets received with a (layer 2) size in the given interval.

bin_02

long integer, number of packets received with a (layer 2) size in the given interval.

bin_03

long integer, number of packets received with a (layer 2) size in the given interval.

bin_04

long integer, number of packets received with a (layer 2) size in the given interval.

bin_05

long integer, number of packets received with a (layer 2) size in the given interval.

bin_06

long integer, number of packets received with a (layer 2) size in the given interval.

bin_07

long integer, number of packets received with a (layer 2) size in the given interval.

bin_08

long integer, number of packets received with a (layer 2) size in the given interval.

bin_09

long integer, number of packets received with a (layer 2) size in the given interval.

bin_10

long integer, number of packets received with a (layer 2) size in the given interval.

bin_11

long integer, number of packets received with a (layer 2) size in the given interval.

bin_12

long integer, number of packets received with a (layer 2) size in the given interval.

bin_13

long integer, number of packets received with a (layer 2) size in the given interval.

bin_14

long integer, number of packets received with a (layer 2) size in the given interval.

bin_15

long integer, number of packets received with a (layer 2) size in the given interval.

current_time

long integer, the current time (mSec since module restart)

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get a histogram over transmitted (layer 2) packets sizes in 100 bytes intervals.

Returns:

histogram over transmitted (layer 2) packets sizes in 100 bytes intervals.

Return type:

P4_TX_PACKET_SIZE.GetDataAttr

class P4_UDP_COUNTERS[source]

Bases: object

Return total Port UDP protocol error statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

checksum_error_count

long integer, total number of udp packets which udp header checksum error

current_time

long integer, the current time (mSec since module restart)

invalid_udp_count

long integer, total number of UDP packets which are malformed

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

udp_lookup_failure_count

long integer, number of UDP packets received that could not be resolved

get()[source]

Get total Port UDP protocol error statistics since last clear.

Returns:

total Port UDP protocol error statistics since last clear.

Return type:

P4_UDP_COUNTERS.GetDataAttr

class P4_UDP_RX_COUNTERS[source]

Bases: object

Return total Port UDP protocol receive statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

packet_count

long integer, total number of UDP packets received

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port UDP protocol receive statistics since last clear.

Returns:

total Port UDP protocol receive statistics since last clear.

Return type:

P4_UDP_RX_COUNTERS.GetDataAttr

class P4_UDP_TX_COUNTERS[source]

Bases: object

Return total Port UDP protocol transmit statistics since last clear.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

long integer, the current time (mSec since module restart)

packet_count

long integer, total number of UDP packets transmitted

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get total Port UDP protocol transmit statistics since last clear.

Returns:

total Port UDP protocol transmit statistics since last clear.

Return type:

P4_UDP_TX_COUNTERS.GetDataAttr

class P4_VLAN_OFFLOAD[source]

Bases: object

Specifies if 802.1Q VLAN tag should be inserted and stripped by the Ethernet device. If VLAN Offload is switched ON, VLAN tags will not be present in frames captured by the L47 Server.

class GetDataAttr[source]

Bases: ResponseBodyStruct

offload

coded byte, specifies if VLAN Offload is switched ON

class SetDataAttr[source]

Bases: RequestBodyStruct

offload

coded byte, specifies if VLAN Offload is switched ON

get()[source]

Get the VLAN offload status.

Returns:

VLAN offload status

Return type:

P4_VLAN_OFFLOAD.GetDataAttr

set(offload)[source]

Set the VLAN offload state.

Parameters:

offload (OnOff) – specifies if VLAN Offload is enabled

set_off()

Disable VLAN offload.

set_on()

Enable VLAN offload.