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 onOFFcommand. This is the only state that allows configuration commands.P_RESETis 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 onPREPAREcommand. 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 fromprepare_readyonPRERUNcommand. If enabled, this is where ARP and NDP requests are sent.prerun_rdy- entered automatically after activities in prerun have completed.running- entered either fromprepare_readyorprerun_readyonONcommand. This is where TCP connections are established, payload is generated and connections are closed again.stopping- entered fromrunning,prerun_readyorprerunonSTOPcommand. Stops Rx/Tx traffic. In thestoppingstate, post-test data are calculated and captured packets are saved to files.stopped- entered automatically after activities instoppingare complete. This is where you can read post-test statistics and extract captured packets.
Port (L47) Commands
- class P4_APTITUDES[source]
Bases:
objectReturns 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
- class P4_ARP_CONFIG[source]
Bases:
objectConfigure 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:
- class P4_ARP_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_ARP_RX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_ARP_TX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_CAPABILITIES[source]
Bases:
objectReport 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
- class P4_CAPTURE[source]
Bases:
objectStarts 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:
- 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:
objectReturns 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
- class P4_CAPTURE_GET_NEXT[source]
Bases:
objectReturns 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
- class P4_CLEAR[source]
Bases:
objectSet the Port State to OFF and delete all configured Connection Groups for the port.
- class P4_DEV_NAME[source]
Bases:
objectReport 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
- class P4_DHCP_CONFIG[source]
Bases:
objectConfigure DHCP Client in order to aquire a pool of ip addresses.
- 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:
objectGet the port’s last DHCP client process result
- class P4_DHCP_STATE[source]
Bases:
objectGet the last state of the DHCP Client Process.
- class P4_DHCP_VLAN[source]
Bases:
objectConfigure a set of VLAN tags for current DHCP Process.
- 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:
state (DhcpVlanState) – Enable/Disable Vlan configuration
vlans (List[subtypes.VlanTag]) – specifying a list of VlanTag
- class P4_ETH_COUNTERS[source]
Bases:
objectReturn 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
- class P4_ETH_QUEUE_COUNTERS[source]
Bases:
objectGet the stats of the all active queues of the port
- 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:
objectReturn 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)
- class P4_ETH_TX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_FW_VER[source]
Bases:
objectReport the firmware version of the port (NIC).
- class GetDataAttr[source]
Bases:
ResponseBodyStruct- major
integer, Major firmware version
- minor
integer, Minor firmware version
- class P4_ICMP_COUNTERS[source]
Bases:
objectReturn 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
- class P4_ICMP_RX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_ICMP_TX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_IPV4_COUNTERS[source]
Bases:
objectReturn 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
- class P4_IPV4_RX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_IPV4_TX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_IPV6_COUNTERS[source]
Bases:
objectReturn 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
- class P4_IPV6_RX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_IPV6_TX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_LICENSE_INFO[source]
Bases:
objectReturns 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
- class P4_MAX_PACKET_RATE[source]
Bases:
objectSpecifies 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:
- 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:
objectConfigure 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:
- class P4_NDP_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_NDP_RX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_NDP_TX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_PCI_INFO[source]
Bases:
objectReport 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
- class P4_PORT_COUNTERS[source]
Bases:
objectReturn 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
- class P4_PORT_RX_COUNTERS[source]
Bases:
objectReturn 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
- class P4_PORT_TX_COUNTERS[source]
Bases:
objectReturn 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
- class P4_PORT_TYPE[source]
Bases:
objectReport 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
- class P4_RX_MTU[source]
Bases:
objectReturn 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’.
- class P4_RX_PACKET_SIZE[source]
Bases:
objectReturn 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)
- class P4_SPEEDSELECTION[source]
Bases:
objectSets 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
- 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:
objectDisplay the current state of the L47 port.
- class GetDataAttr[source]
Bases:
ResponseBodyStruct- state
coded byte, specifying the current state for this port.
- class P4_STATE_STATUS[source]
Bases:
objectReturns 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
- class P4_TCP_COUNTERS[source]
Bases:
objectReturn 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
- class P4_TCP_RX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_TCP_TX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_TRAFFIC[source]
Bases:
objectGives 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:
objectReturn 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’.
- class P4_TX_PACKET_SIZE[source]
Bases:
objectReturn 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)
- class P4_UDP_COUNTERS[source]
Bases:
objectReturn 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
- class P4_UDP_RX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_UDP_TX_COUNTERS[source]
Bases:
objectReturn 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)
- class P4_VLAN_OFFLOAD[source]
Bases:
objectSpecifies 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
- 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.