p4g_commands module

This module contains the L47 connection group classes that deal with configuration of TCP connections and are specific to L47. The commands have the form P4G_<xxx> and require a module index id and a port index id, and a connection group index id.

A Connection Group (CG) is the basic building block when creating L47 traffic. A CG consists of a number of TCP connections - between one and millions. A CG has a role, which is either client or server. In order to create TCP connections between two ports on a L47 chassis, two matching CGs must be configured - one on each port - one configured as client and the other configured as server.

The number of connections in a CG, is defined by the server range and the client range. A server/client range is a number of TCP connection endpoints defined by a number of IP addresses and a number of TCP ports. A server/client range is configured by specifying a start IP address, a number of IP addresses, a start TCP port and a number of TCP addresses. The number of clients is the number of client IP addresses times the number of client TCP ports, and the same goes for the number of servers. The number of TCP connections in a CG is the number of clients times the number of servers, that is TCP connections are created from all clients in the CG to all servers in the CG.

Note

Connection Group index must start from 0.

Note

When configuring a CG, both client AND server range must be configured on both CGs - that is, the server CG must also know the client range and vice versa.

A CG must be configured with a Load Profile, which is an envelope over the TCP connection’s lifetime. A connection in the CG goes through three phases. A load profile defines a start time and a duration of each of these phases. During the ramp-up phase connections are established at a rate defined by the number of connections divided by the ramp-up duration. During the steady-state phase connections may transmit and receive payload data, depending on the configuration of test application and test scenario for the CG. During the ramp-down phase connections are closed at a rate defined by the number of connections divided by the ramp-up duration, if they were not already closed as a result of the traffic scenario configured.

Note

Just like client and server range, both the client and server CGs must be configured with the load profile.

Next the CG must be configured with a test application, which defines what kind of traffic is transported in the TCP payload. Currently there are two kinds of test applications:

  • NONE, which means that no payload is sent on the TCP connections. This test application is suitable for a test, where the only purpose is to measure TCP connection open and close rates.

  • RAW, which means that the TCP connections transmit and receive user defined raw data. The contents of the raw TCP payload can be configured using the P4G_RAW_PAYLOAD command. Raw TCP payload can also be specified as random and incrementing data.

Using test application RAW, the CG must also be configured with a test scenario, which defines the data flow between the TCP client and server. Currently the following test scenarios can be configured: download, upload, and both.

By combining several CGs on a port, it is possible to create more complex traffic scenarios and more complex load profile shapes than the individual CG allows.

Port (L47) Connection Group Commands

class P4G_APP_REPLAY_COUNTERS[source]

Bases: object

Returns NAT collisions of a replay application.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

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

nat_collision_count

long integer, number of NAT collisions

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get NAT collisions of a replay application.

Returns:

NAT collisions of a replay application.

Return type:

P4G_APP_REPLAY_COUNTERS.GetDataAttr

class P4G_APP_TRANSACTION_COUNTERS[source]

Bases: object

Returns request/response transaction statistics.

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)

transaction_count

long integer, number of completed request/response transactions

transaction_per_second

long integer, number of completed transactions/second

get()[source]

Get request/response transaction statistics.

Returns:

request/response transaction statistics.

Return type:

P4G_APP_TRANSACTION_COUNTERS.GetDataAttr

class P4G_APP_TRANSACTION_HIST[source]

Bases: object

Returns a histogram over completed request/response transactions per connection, with start and interval values as configured by P4G_TRANSACTION_HIST_CONF`.

class GetDataAttr[source]

Bases: ResponseBodyStruct

avg_transaction_per_con

long integer, average number of transactions per connection.

bin_00

integer, number of connections with number of transactions within the given interval.

bin_01

integer, number of connections with number of transactions within the given interval.

bin_02

integer, number of connections with number of transactions within the given interval.

bin_03

integer, number of connections with number of transactions within the given interval.

bin_04

integer, number of connections with number of transactions within the given interval.

bin_05

integer, number of connections with number of transactions within the given interval.

bin_06

integer, number of connections with number of transactions within the given interval.

bin_07

integer, number of connections with number of transactions within the given interval.

bin_08

integer, number of connections with number of transactions within the given interval.

bin_09

integer, number of connections with number of transactions within the given interval.

bin_10

integer, number of connections with number of transactions within the given interval.

bin_11

integer, number of connections with number of transactions within the given interval.

bin_12

integer, number of connections with number of transactions within the given interval.

bin_13

integer, number of connections with number of transactions within the given interval.

bin_14

integer, number of connections with number of transactions within the given interval.

bin_15

integer, number of connections with number of transactions within the given interval.

bin_16

integer, number of connections with number of transactions within the given interval.

bin_17

integer, number of connections with number of transactions within the given interval.

bin_18

integer, number of connections with number of transactions within the given interval.

bin_19

integer, number of connections with number of transactions within the given interval.

bin_20

integer, number of connections with number of transactions within the given interval.

bin_21

integer, number of connections with number of transactions within the given interval.

bin_22

integer, number of connections with number of transactions within the given interval.

bin_23

integer, number of connections with number of transactions within the given interval.

bin_24

integer, number of connections with number of transactions within the given interval.

bin_25

integer, number of connections with number of transactions within the given interval.

bin_26

integer, number of connections with number of transactions within the given interval.

bin_27

integer, number of connections with number of transactions within the given interval.

bin_28

integer, number of connections with number of transactions within the given interval.

bin_29

integer, number of connections with number of transactions within the given interval.

bin_30

integer, number of connections with number of transactions within the given interval.

bin_31

integer, number of connections with number of transactions within the given interval.

connection_count

integer, number of connections.

interval

long integer, histogram interval size

max_transaction_per_con

long integer, maximum number of transactions per connection.

min_transaction_per_con

long integer, minimum number of transactions per connection.

start

long integer, start value of first histogram interval

get()[source]

Get a histogram over completed request/response transactions per connection.

Returns:

a histogram over completed request/response transactions per connection

Return type:

P4G_APP_TRANSACTION_HIST.GetDataAttr

class P4G_CLEAR_COUNTERS[source]

Bases: object

Clears all run-time statistics for the Connection Group.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Clears all run-time statistics for the Connection Group.

class P4G_CLEAR_POST_STAT[source]

Bases: object

Clears all TCP Connection Group post-test statistics.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Clears all TCP Connection Group post-test statistics.

class P4G_CLIENT_RANGE[source]

Bases: object

Specifies a number of client sockets (ip address, port number)

class GetDataAttr[source]

Bases: ResponseBodyStruct

address_count

integer, the number of ip addresses

ipv4_address

address, the start ip address of the address range

max_address_count

integer, the maximum number of ip addresses that this Connection Group will use, when connection incarnation is set to REINCARNATE

port_count

integer, the number of ports

start_port

integer, the start port number, of the port range

class SetDataAttr[source]

Bases: RequestBodyStruct

address_count

integer, the number of ip addresses

ipv4_address

address, the start ip address of the address range

max_address_count

integer, the maximum number of ip addresses that this Connection Group will use, when connection incarnation is set to REINCARNATE

port_count

integer, the number of ports

start_port

integer, the start port number, of the port range

get()[source]

Get the number of client sockets (ip address, port number)

Returns:

the number of client sockets (ip address, port number)

Return type:

P4G_CLIENT_RANGE.GetDataAttr

set(ipv4_address, address_count, start_port, port_count, max_address_count)[source]

Set the number of client sockets (ip address, port number)

Parameters:
  • ipv4_address (ipaddress.IPv4Address) – the start IP address of the address range

  • address_count (int) – the number of IP addresses

  • start_port (int) – the starting port number of the port range

  • port_count (int) – the number of ports

  • max_address_count (int) – the maximum number of IP addresses that this Connection Group will use, when connection incarnation is set to REINCARNATE

class P4G_COMMENT[source]

Bases: object

The description of a Connection Group.

class GetDataAttr[source]

Bases: ResponseBodyStruct

comment

string, the description of the Connection Group.

class SetDataAttr[source]

Bases: RequestBodyStruct

comment

string, the description of the Connection Group.

get()[source]

Get the description of a Connection Group.

Returns:

the description of a Connection Group.

Return type:

P4G_COMMENT.GetDataAttr

set(comment)[source]

Set the description of a Connection Group.

Parameters:

comment (str) – the description of a Connection Group.

class P4G_CREATE[source]

Bases: object

Creates an empty Connection Group with the specified sub-index value.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Creates an empty Connection Group with the specified sub-index value.

class P4G_DELETE[source]

Bases: object

Deletes a Connection Group with the specified sub-index value.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Deletes a Connection Group with the specified sub-index value.

class P4G_ENABLE[source]

Bases: object

Enable/disable/suppress a previously created Connection Group with the specified sub-index value.

class GetDataAttr[source]

Bases: ResponseBodyStruct

status

coded byte, specifies the state of the Connection Group.

class SetDataAttr[source]

Bases: RequestBodyStruct

status

coded byte, specifies the state of the Connection Group.

get()[source]

Get the state of a Connection Group on a port.

Returns:

the state of a Connection Group on a port.

Return type:

P4G_ENABLE.GetDataAttr

set(status)[source]

Enable/disable/suppress a previously created Connection Group with the specified sub-index value.

Parameters:

status (OnOffWithSuppress) – specifies the state of the Connection Group.

set_off()

Disable a Connection Group of with the specified index.

set_on()

Enable a Connection Group of with the specified index.

set_suppress()

Suppress a Connection Group of with the specified index.

class P4G_INDICES[source]

Bases: object

The full list of Connection Groups on this port. These are the sub-index that are used for the parameters that specify TCP connection behavior.

class GetDataAttr[source]

Bases: ResponseBodyStruct

group_identifiers

list of integers, list of indices identifying Connection Groups.

class SetDataAttr[source]

Bases: RequestBodyStruct

group_identifiers

list of integers, list of indices identifying Connection Groups.

get()[source]

Get full list of Connection Groups on this port.

Returns:

full list of Connection Groups on this port.

Return type:

P4G_INDICES.GetDataAttr

set(group_identifiers)[source]

Create Connection Groups with the indices on the port.

Parameters:

group_identifiers (List[int]) – list of indices identifying Connection Groups.

class P4G_IPV4_CLIENT_ADDRESS_POOL[source]

Bases: object

Configure the group’s client to use ip addresses from this pool

class SetDataAttr[source]

Bases: RequestBodyStruct

set(concurrent_address_count, start_port, port_count, address_pool)[source]

Set a pool of ip addresses for the client role of this group

Parameters:
  • concurrent_address_count (int) – the number of concurrent ip addresses, this value should be less than the number of addresses in the address pool

  • start_port (int) – the starting port number of the port range

  • port_count (int) – the number of ports

  • address_pool (List[GroupAddressElem]) –

    • IP address

    • Subnet Mask

    • MAC address

class P4G_IPV4_SERVER_ADDRESS_POOL[source]

Bases: object

Configure the group’s server to use ip addresses from this pool

class SetDataAttr[source]

Bases: RequestBodyStruct

set(concurrent_address_count, start_port, port_count, address_pool)[source]

Set a pool of ip addresses for the server role of this group

Parameters:
  • concurrent_address_count (int) – the number of concurrent ip addresses, this value should be less than the number of addresses in the address pool

  • start_port (int) – the starting port number of the port range

  • port_count (int) – the number of ports

  • address_pool (List[GroupAddressElem]) –

    • IP address

    • Subnet Mask

    • MAC address

class P4G_IPV6_CLIENT_RANGE[source]

Bases: object

Specifies the number of client sockets (IPv6 address, port number).

class GetDataAttr[source]

Bases: ResponseBodyStruct

address_count

integer, the number of ip addresses

ipv6_address

16 hex bytes, the start ip address of the address range

max_address_count

long integer, the maximum number of ip addresses that this Connection Group will use, when connection incarnation is set to REINCARNATE

port_count

integer, the number of ports

start_port

integer, the start port number, of the port range

class SetDataAttr[source]

Bases: RequestBodyStruct

address_count

integer, the number of ip addresses

ipv6_address

16 hex bytes, the start ip address of the address range

max_address_count

long integer, the maximum number of ip addresses that this Connection Group will use, when connection incarnation is set to REINCARNATE

port_count

integer, the number of ports

start_port

integer, the start port number, of the port range

get()[source]

Get the number of client sockets (IPv6 address, port number).

Returns:

the number of client sockets (IPv6 address, port number).

Return type:

P4G_IPV6_CLIENT_RANGE.GetDataAttr

set(ipv6_address, address_count, start_port, port_count, max_address_count)[source]

Set the number of client sockets (IPv6 address, port number).

Parameters:
  • ipv6_address (ipaddress.IPv6Address) – the start ip address of the address range

  • address_count (int) – the number of IPv6 addresses

  • start_port (int) – the start port number of the port range

  • port_count (int) – the number of ports

  • max_address_count (int) – the maximum number of IPv6 addresses that this Connection Group will use, when connection incarnation is set to REINCARNATE

class P4G_IPV6_FLOW_LABEL[source]

Bases: object

Configure the value of the flow label field of the IPv6 header.

class GetDataAttr[source]

Bases: ResponseBodyStruct

flow_label

4 hex bytes, value of the traffic class field (only lowest 20 bits are valid)

class SetDataAttr[source]

Bases: RequestBodyStruct

flow_label

4 hex bytes, value of the traffic class field (only lowest 20 bits are valid)

get()[source]

Get the value of the flow label field of the IPv6 header.

Returns:

the value of the flow label field of the IPv6 header.

Return type:

P4G_IPV6_FLOW_LABEL.GetDataAttr

set(flow_label)[source]

Set the value of the flow label field of the IPv6 header.

Parameters:

flow_label (Hex) – value of the traffic class field (only lowest 20 bits are valid)

class P4G_IPV6_SERVER_RANGE[source]

Bases: object

Specifies the number of server sockets (IPv6 address, port number)

class GetDataAttr[source]

Bases: ResponseBodyStruct

address_count

integer, the number of ip addresses

ipv6_address

hex bytes, the start ip address of the address range

port_count

integer, the number of ports

start_port

integer, the start port number, of the port range

class SetDataAttr[source]

Bases: RequestBodyStruct

address_count

integer, the number of ip addresses

ipv6_address

hex bytes, the start ip address of the address range

port_count

integer, the number of ports

start_port

integer, the start port number, of the port range

get()[source]

Get the number of server sockets (IPv6 address, port number).

Returns:

the number of server sockets (IPv6 address, port number)

Return type:

P4G_IPV6_SERVER_RANGE.GetDataAttr

set(ipv6_address, address_count, start_port, port_count)[source]

Set the number of server sockets (IPv6 address, port number).

Parameters:
  • ipv6_address (ipaddress.IPv6Address) – the start IPv6 address of the address range

  • address_count (int) – the number of IPv6 addresses

  • start_port (int) – the start port number of the port range

  • port_count (int) – the number of ports

class P4G_IPV6_TRAFFIC_CLASS[source]

Bases: object

Configure the value of the traffic class field of the IPv6 header.

class GetDataAttr[source]

Bases: ResponseBodyStruct

traffic_class

hex byte, value of the traffic class field

class SetDataAttr[source]

Bases: RequestBodyStruct

traffic_class

hex byte, value of the traffic class field

get()[source]

Get the value of the traffic class field of the IPv6 header.

Returns:

the value of the traffic class field of the IPv6 header.

Return type:

P4G_IPV6_TRAFFIC_CLASS.GetDataAttr

set(traffic_class)[source]

Set the value of the traffic class field of the IPv6 header.

Parameters:

traffic_class (Hex) – value of the traffic class field

class P4G_IP_DS_MASK[source]

Bases: object

Specify a bit mask to be applied to the DS field. If the fixed value is fixed, the current (calculated) value is curr, and the mask is mask, then the effective DS will be calculated as follows: (fixed AND (NOT mask)) OR (curr AND mask) or in C syntax (fixed & (~mask)) | (curr & mask)

class GetDataAttr[source]

Bases: ResponseBodyStruct

ds_mask

hex byte, the DS mask to be used.

class SetDataAttr[source]

Bases: RequestBodyStruct

ds_mask

hex byte, the DS mask to be used.

get()[source]

Get the bit mask to be applied to the DS field.

Returns:

the bit mask to be applied to the DS field

Return type:

P4G_IP_DS_MASK.GetDataAttr

set(ds_mask)[source]

Set the bit mask to be applied to the DS field.

Parameters:

ds_mask (Hex) – the DS mask to be used.

class P4G_IP_DS_MINMAX[source]

Bases: object

Configure the min and max values of the range for the calculated part of the DS value. Both values are included in the range. Relevant when P4G_IP_DS_TYPE` is set to INCREMENT or RANDOM.

class GetDataAttr[source]

Bases: ResponseBodyStruct

ds_max

hex byte, maximum value for the calculated part of DS

ds_min

hex byte, minimum value for the calculated part of DS

class SetDataAttr[source]

Bases: RequestBodyStruct

ds_max

hex byte, maximum value for the calculated part of DS

ds_min

hex byte, minimum value for the calculated part of DS

get()[source]

Get the min and max values of the range for the calculated part of the DS value.

Returns:

the min and max values of the range for the calculated part of the DS value.

Return type:

P4G_IP_DS_MINMAX.GetDataAttr

set(ds_min, ds_max)[source]

Set the min and max values of the range for the calculated part of the DS value.

Parameters:
  • ds_min (Hex) – minimum value for the calculated part of DS

  • ds_max (Hex) – maximum value for the calculated part of DS

class P4G_IP_DS_STEP[source]

Bases: object

Specifies the incrementing step size for the calculated part of the DS value. Relevant when P4G_IP_DS_TYPE` is set to INCREMENT.

class GetDataAttr[source]

Bases: ResponseBodyStruct

ds_step

hex byte, the incrementing step size for DS.

class SetDataAttr[source]

Bases: RequestBodyStruct

ds_step

hex byte, the incrementing step size for DS.

get()[source]

Get the incrementing step size for the calculated part of the DS value.

Returns:

the incrementing step size for the calculated part of the DS value.

Return type:

P4G_IP_DS_STEP.GetDataAttr

set(ds_step)[source]

Set the incrementing step size for the calculated part of the DS value.

Parameters:

ds_step (Hex) – the incrementing step size for DS.

class P4G_IP_DS_TYPE[source]

Bases: object

Configure the mode of the DS field of the IP header of this Connection Group.

class GetDataAttr[source]

Bases: ResponseBodyStruct

ds_type

coded byte, specifying how to fill out the DS field

class SetDataAttr[source]

Bases: RequestBodyStruct

ds_type

coded byte, specifying how to fill out the DS field

get()[source]

Get the value of the DS field of the IP header of this Connection Group.

Returns:

the mode of the DS field

Return type:

P4G_IP_DS_TYPE.GetDataAttr

set(ds_type)[source]

Set the value of the DS field of the IP header of this Connection Group.

Parameters:

ds_type (MSSType) – specifying how to fill out the DS field

set_fixed()

Use fixed value for DS.

set_increment()

Use incrementing values for DS.

set_random()

Use pseudorandom values for DS.

class P4G_IP_DS_VALUE[source]

Bases: object

Specify the (FIXED) value used for DS.

class GetDataAttr[source]

Bases: ResponseBodyStruct

ds_value

hex byte, the fixed DS value to be used

class SetDataAttr[source]

Bases: RequestBodyStruct

ds_value

hex byte, the fixed DS value to be used

get()[source]

Get the fixed DS value.

Returns:

value of the DS field

Return type:

P4G_IP_DS_VALUE.GetDataAttr

set(ds_value)[source]

Set the fixed DS value.

Parameters:

ds_value (Hex) – the fixed DS value to be used

class P4G_IP_VERSION[source]

Bases: object

Specifies either IPv4 or IPv6.

class GetDataAttr[source]

Bases: ResponseBodyStruct

version_number

coded byte, IP version

class SetDataAttr[source]

Bases: RequestBodyStruct

version_number

coded byte, IP version

get()[source]

Get the IP version of a Connection Group.

Returns:

the IP version of a Connection Group.

Return type:

P4G_IP_VERSION.GetDataAttr

set(version_number)[source]

Set the IP version of a Connection Group.

Parameters:

version_number (L47IPVersion) – IP version

set_ipv4()

Set IP version to IPv4.

set_ipv6()

Set IP version to IPv6.

class P4G_L2_CLIENT_MAC[source]

Bases: object

Configure the client MAC address. This is either a single static MAC address or an embedding of the four byte IPv4 address into the lower 4 bytes of the 6 byte MAC address.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mac_address

six hex bytes, the MAC address specified as hexadecimal

mode

coded byte, whether to embed the IP address or not

class SetDataAttr[source]

Bases: RequestBodyStruct

mac_address

six hex bytes, the MAC address specified as hexadecimal

mode

coded byte, whether to embed the IP address or not

get()[source]

Get the client MAC address.

Returns:

the client MAC address

Return type:

P4G_L2_CLIENT_MAC.GetDataAttr

set(mac_address, mode)[source]

Set the client MAC address.

Parameters:
  • mac_address (Hex) – the MAC address specified as hexadecimal

  • mode (EmbedIP) – whether to embed the IP address in MAC

set_dont_embed_ip(mac_address, *, mode=EmbedIP.DONT_EMBED_IP)

Not embed IP address in MAC address.

set_embed_ip(mac_address, *, mode=EmbedIP.EMBED_IP)

Embed IP address in MAC address.

class P4G_L2_GW[source]

Bases: object

Specify a default gateway for IPv4.

class GetDataAttr[source]

Bases: ResponseBodyStruct

ipv4_address

address, ip address of gateway

mac_address

six hex bytes, the MAC address of the gateway

class SetDataAttr[source]

Bases: RequestBodyStruct

ipv4_address

address, ip address of gateway

mac_address

six hex bytes, the MAC address of the gateway

get()[source]

Get the settings of the default gateway for IPv4.

Returns:

IPv4 address and MAC address of the default gateway for IPv4.

Return type:

P4G_L2_GW.GetDataAttr

set(ipv4_address, mac_address)[source]

Set a default gateway for IPv4.

Parameters:
  • ipv4_address (ipaddress.IPv4Address) – IPv5 address of the gateway

  • mac_address (Hex) – the MAC address of the gateway

class P4G_L2_IPV6_GW[source]

Bases: object

Specify a default gateway for IPv6.

class GetDataAttr[source]

Bases: ResponseBodyStruct

ipv6_address

16 hex bytes, the 16 bytes of IPv6 address of gateway

mac_address

six hex bytes, the MAC address of the gateway

class SetDataAttr[source]

Bases: RequestBodyStruct

ipv6_address

16 hex bytes, the 16 bytes of IPv6 address of gateway

mac_address

six hex bytes, the MAC address of the gateway

get()[source]

Get the settings of the default gateway for IPv6.

Returns:

IPv6 address and MAC address of the default gateway for IPv6.

Return type:

P4G_L2_IPV6_GW.GetDataAttr

set(ipv6_address, mac_address)[source]

Set the default gateway for IPv6.

Parameters:
  • ipv6_address (ipaddress.IPv6Address) – the 16 bytes of IPv6 address of gateway

  • mac_address (Hex) – the MAC address of the gateway

class P4G_L2_SERVER_MAC[source]

Bases: object

Configure the server MAC address. This is either a single static MAC address or an embedding of the four byte IPv4 address into the lower 4 bytes of the 6 byte MAC address.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mac_address

six hex bytes, the MAC address specified as hexadecimal

mode

coded byte, whether to embed the ip address or not

class SetDataAttr[source]

Bases: RequestBodyStruct

mac_address

six hex bytes, the MAC address specified as hexadecimal

mode

coded byte, whether to embed the ip address or not

get()[source]

Get the server MAC address.

Returns:

the server MAC address

Return type:

P4G_L2_SERVER_MAC.GetDataAttr

set(mac_address, mode)[source]

Set the server MAC address.

Parameters:
  • mac_address (Hex) – the MAC address specified as hexadecimal

  • mode (EmbedIP) – whether to embed the IP address in MAC

set_dont_embed_ip(mac_address, *, mode=EmbedIP.DONT_EMBED_IP)

Not embed IP address in MAC address.

set_embed_ip(mac_address, *, mode=EmbedIP.EMBED_IP)

Embed IP address in MAC address.

class P4G_L2_USE_ADDRESS_RES[source]

Bases: object

Specify whether to use ARP and NDP to resolve hardware (MAC) addresses in the pre_run phase.

class GetDataAttr[source]

Bases: ResponseBodyStruct

is_enabled

coded byte, specifying whether to use ARP and NDP or not

class SetDataAttr[source]

Bases: RequestBodyStruct

is_enabled

coded byte, specifying whether to use ARP and NDP or not

get()[source]

Get the status of using ARP and NDP to resolve hardware (MAC) addresses.

Returns:

specifying whether to use ARP and NDP to resolve hardware (MAC) addresses.

Return type:

P4G_L2_USE_ADDRESS_RES.GetDataAttr

set(is_enabled)[source]

Set the status of using ARP and NDP to resolve hardware (MAC) addresses.

Parameters:

is_enabled (YesNo) – specifying whether to use ARP and NDP to resolve hardware (MAC) addresses.

set_no()

Disable using ARP and NDP to resolve hardware (MAC) addresses.

set_yes()

Enable using ARP and NDP to resolve hardware (MAC) addresses.

class P4G_L2_USE_GW[source]

Bases: object

Specify whether to use the resolved default gateway’s MAC address as the destination MAC address in the packets.

class GetDataAttr[source]

Bases: ResponseBodyStruct

is_enabled

coded byte, specifying whether to use gateway MAC or not

class SetDataAttr[source]

Bases: RequestBodyStruct

is_enabled

coded byte, specifying whether to use gateway MAC or not

get()[source]

Get the status of using the resolved default gateway’s MAC address as the destination MAC address in the packets.

Returns:

the status of using the resolved default gateway’s MAC address as the destination MAC address in the packets

Return type:

P4G_L2_USE_GW.GetDataAttr

set(is_enabled)[source]

Set the status of using the resolved default gateway’s MAC address as the destination MAC address in the packets.

Parameters:

is_enabled (YesNo) – specifying whether to use gateway’s MAC address as the destination MAC address in the packets.

set_no()

Disable using gateway’s MAC address as the destination MAC address.

set_yes()

Enable using gateway’s MAC address as the destination MAC address.

class P4G_L4_PROTOCOL[source]

Bases: object

Specifies either TCP or UDP as Layer 4 protocol.

class GetDataAttr[source]

Bases: ResponseBodyStruct

protocol_type

coded byte, layer 4 protocol.

class SetDataAttr[source]

Bases: RequestBodyStruct

protocol_type

coded byte, layer 4 protocol.

get()[source]

Get the Layer 4 protocol used by the Connection Group.

Returns:

the Layer 4 protocol used by the Connection Group.

Return type:

P4G_L4_PROTOCOL.GetDataAttr

set(protocol_type)[source]

Set the Layer 4 protocol used by the Connection Group.

Parameters:

protocol_type (L47ProtocolType) – the Layer 4 protocol

set_tcp()

Use TCP as the Layer 4 protocol of the Connection Group.

set_udp()

Use UDP as the Layer 4 protocol of the Connection Group.

class P4G_LP_SHAPE[source]

Bases: object

Specifies a load profile time duration. Time is measured from the beginning of the test when P€G_TRAFFIC is set to ON.

class GetDataAttr[source]

Bases: ResponseBodyStruct

rampdown_duration

integer, ramp-down phase duration.

rampup_duration

integer, ramp-up phase duration.

star_time

integer, ramp-up start time.

steady_duration

integer, steady phase duration.

class SetDataAttr[source]

Bases: RequestBodyStruct

rampdown_duration

integer, ramp-down phase duration.

rampup_duration

integer, ramp-up phase duration.

star_time

integer, ramp-up start time.

steady_duration

integer, steady phase duration.

get()[source]

Get the load profile time duration.

Returns:

the load profile time duration

Return type:

P4G_LP_SHAPE.GetDataAttr

set(star_time, rampup_duration, steady_duration, rampdown_duration)[source]

Set the load profile time duration.

Parameters:
  • star_time (int) – ramp-up start time

  • rampup_duration (int) – ramp-up phase duration

  • steady_duration (int) – steady phase duration

  • rampdown_duration (int) – ramp-down phase duration

class P4G_LP_TIME_SCALE[source]

Bases: object

Specifies the time scale of the load profile.

class GetDataAttr[source]

Bases: ResponseBodyStruct

timescale

coded byte, specifying the time scale.

class SetDataAttr[source]

Bases: RequestBodyStruct

timescale

coded byte, specifying the time scale.

get()[source]

Get the time scale of the load profile.

Returns:

the time scale of the load profile.

Return type:

P4G_LP_TIME_SCALE.GetDataAttr

set(timescale)[source]

Set the time scale of the load profile.

Parameters:

timescale (Timescale) – specifying the time scale.

set_hours()

Set the time scale of the load profile to Hours.

set_minutes()

Set the time scale of the load profile to Minutes.

set_msecs()

Set the time scale of the load profile to Milliseconds.

set_seconds()

Set the time scale of the load profile to Seconds.

class P4G_NAT[source]

Bases: object

Specify whether to support DUT Source NAT functionality. NAT should be enabled on both Client and Server ports that belong to the same Connection Group.

class GetDataAttr[source]

Bases: ResponseBodyStruct

on_off

coded byte, specifying whether to enable NAT

class SetDataAttr[source]

Bases: RequestBodyStruct

on_off

coded byte, specifying whether to enable NAT

get()[source]

Get whether to support DUT Source NAT functionality.

Returns:

whether to support DUT Source NAT functionality.

Return type:

P4G_NAT.GetDataAttr

set(on_off)[source]

Set whether to support DUT Source NAT functionality.

Parameters:

on_off (OnOff) – specifying whether to enable Source NAT support

set_off()

Disable source NAT support.

set_on()

Enable source NAT support.

class P4G_PAYLOAD_HIST_CONF[source]

Bases: object

Sets the start value and the interval size for the payload histograms.

class GetDataAttr[source]

Bases: ResponseBodyStruct

interval

long integer, histogram interval size in bytes

start

long integer, start value of first histogram interval in bytes

class SetDataAttr[source]

Bases: RequestBodyStruct

interval

long integer, histogram interval size in bytes

start

long integer, start value of first histogram interval in bytes

get()[source]

Get the start value and the interval size for the payload histograms.

Returns:

the start value and the interval size for the payload histograms.

Return type:

P4G_PAYLOAD_HIST_CONF.GetDataAttr

set(start, interval)[source]

Set the start value and the interval size for the payload histograms.

Parameters:
  • start (int) – start value of first histogram interval in bytes

  • interval (int) – histogram interval size in bytes

class P4G_RAW_BURSTY_CONF[source]

Bases: object

Specifies active and inactive periods of bursty transmission in milliseconds. The burst period starts with the active part.

class GetDataAttr[source]

Bases: ResponseBodyStruct

active_duration

integer, specifies the duration in milliseconds of the active part of the burst period.

inactive_duration

integer, specifies the duration in milliseconds of the inactive part of the burst period.

class SetDataAttr[source]

Bases: RequestBodyStruct

active_duration

integer, specifies the duration in milliseconds of the active part of the burst period.

inactive_duration

integer, specifies the duration in milliseconds of the inactive part of the burst period.

get()[source]

Get active and inactive periods of bursty transmission in milliseconds.

Returns:

active and inactive period of bursty transmission in milliseconds.

Return type:

P4G_RAW_BURSTY_CONF.GetDataAttr

set(active_duration, inactive_duration)[source]

Set active and inactive periods of bursty transmission in milliseconds.

Parameters:
  • active_duration (int) – specifies the duration in milliseconds of the active part of the burst period.

  • inactive_duration (int) – specifies the duration in milliseconds of the inactive part of the burst period.

class P4G_RAW_BURSTY_TX[source]

Bases: object

Enables or disables bursty transmission.

class GetDataAttr[source]

Bases: ResponseBodyStruct

bursty

coded byte, whether bursty transmission is on or off.

class SetDataAttr[source]

Bases: RequestBodyStruct

bursty

coded byte, whether bursty transmission is on or off.

get()[source]

Get whether to use bursty transmission.

Returns:

whether to use bursty transmission.

Return type:

P4G_RAW_BURSTY_TX.GetDataAttr

set(bursty)[source]

Set whether to use bursty transmission.

Parameters:

bursty (OnOff) – whether bursty transmission is on or off.

set_off()

Disable bursty transmission.

set_on()

Enable bursty transmission.

class P4G_RAW_CLOSE_CONN[source]

Bases: object

Specify how to close TCP connection when all payload has been transmitted.

In raw test scenario DOWNLOAD, the server can close the connection, when all payload has been transmitted.

In raw test scenario UPLOAD, the client can close the connection, when all payload has been transmitted. In any case, both server and client Connection Groups must be configured with the same value of this parameter.

In raw test scenario BOTH (bidirectional), this parameter is N/A and will be ignored.

In a transaction scenario, where P4G_RAW_HAS_DOWNLOAD_REQ` is set to YES, both client and server can close the connection, when the last transaction has been completed.

When P4G_RAW_CONN_INCARNATION` is set to IMMORTAL or REINCARNATE, and this command is set to NONE, connections will be closed after ‘connection lifetime’, set by P4G_RAW_CONN_LIFETIME`.

Note

This parameter is N/A when P4G_L4_PROTOCOL` is configured as UDP.

class GetDataAttr[source]

Bases: ResponseBodyStruct

who_close

coded byte, specifying who closes the connection

class SetDataAttr[source]

Bases: RequestBodyStruct

who_close

coded byte, specifying who closes the connection

get()[source]

Get how to close TCP connection when all payload has been transmitted.

Returns:

how to close TCP connection when all payload has been transmitted

Return type:

P4G_RAW_CLOSE_CONN.GetDataAttr

set(who_close)[source]

Set how to close TCP connection when all payload has been transmitted.

Parameters:

who_close (WhoClose) – specifying how to close TCP connection

set_client()

Client closes the connection after last byte is receiver/transmitted.

set_none()

Keep the connection open after last byte is transmitted.

set_server()

Server closes the connection after last byte is transmitted.

class P4G_RAW_CONN_INCARNATION[source]

Bases: object

Defines the lifecycle of a connection and how new connections should be established as old connections are closed.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mode

coded byte, defines the lifecycle of connections

class SetDataAttr[source]

Bases: RequestBodyStruct

mode

coded byte, defines the lifecycle of connections

get()[source]

Get the lifecycle of a connection and how new connections should be established.

Returns:

the lifecycle of a connection and how new connections should be established.

Return type:

P4G_RAW_CONN_INCARNATION.GetDataAttr

set(mode)[source]

Set the lifecycle of a connection and how new connections should be established.

Parameters:

mode (LifecycleMode) – connection lifecycle mode

set_immortal()

Connections are established during the ramp-up phase of the load profile, and are closed after the configured lifetime (configured by P4G_RAW_CONN_LIFETIME`). As connections close, new connections are established, attempting to keep the concurrent number of established connections constant. A new connection will have the same IP address as the connection it replaces, but will have a new TCP port number. This will simulate that the user (defined by the client IP address) is living on, and creates new connections as old connections close.

set_once()

Connections are established during the ramp-up phase and not closed until the ramp-down phase of the load profile. That is, each configured connection only exists once.

set_reincarnate()

Connections are established during the ramp-up phase of the load profile, and are closed after the configured lifetime (configured by P4G_RAW_CONN_LIFETIME`). As connections close, new connections are established, attempting to keep the concurrent number of established connections constant. A new connection will have the same TCP port number as the connection it replaces, but will have a new IP address. This will simulate that the user (defined by the client IP address) ceases to exist, and new users appear as old users die.

class P4G_RAW_CONN_LIFETIME[source]

Bases: object

Defines the lifetime of a connection, when P4G_RAW_CONN_INCARNATION` is set to IMMORTAL or REINCARNATE.

class GetDataAttr[source]

Bases: ResponseBodyStruct

lifetime

integer, time from a connection is established until it will be closed.

timescale

coded byte, specifying the time scale

class SetDataAttr[source]

Bases: RequestBodyStruct

lifetime

integer, time from a connection is established until it will be closed.

timescale

coded byte, specifying the time scale

get()[source]

Get the lifetime of a connection.

Returns:

the lifetime of a connection

Return type:

P4G_RAW_CONN_LIFETIME.GetDataAttr

set(timescale, lifetime)[source]

Set the lifetime of a connection.

Parameters:
  • timescale (Timescale) – specifying the time scale

  • lifetime (int) – time from a connection is established until it will be closed.

set_hours(lifetime)

Set the time scale of a connection lifetime to hours.

set_minutes(lifetime)

Set the time scale of a connection lifetime to minutes.

set_msecs(lifetime)

Set the time scale of a connection lifetime to milliseconds.

set_seconds(lifetime)

Set the time scale of a connection lifetime to seconds.

class P4G_RAW_CONN_REPETITIONS[source]

Bases: object

Defines how many times a new connection should be created, after an old connection has been closed, when P4G_RAW_CONN_INCARNATION` is set to IMMORTAL or REINCARNATE.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mode

coded byte, repetition mode.

repetition_count

integer, number of repetitions

class SetDataAttr[source]

Bases: RequestBodyStruct

mode

coded byte, repetition mode.

repetition_count

integer, number of repetitions

get()[source]

Get how many times a new connection should be created after an old connection is closed.

Returns:

how many times a new connection should be created after an old connection is closed.

Return type:

P4G_RAW_CONN_REPETITIONS.GetDataAttr

set(mode, repetition_count)[source]

Set how many times a new connection should be created after an old connection is closed.

Parameters:
  • mode (InfiniteOrFinite) – repetition mode.

  • repetition_count (int) – number of repetitions

set_finite(repetition_count)

Each configured connection is closed and re-established repetitions number of times.

set_infinite(repetition_count)

New connections are generated as long as the load profile allows.

class P4G_RAW_DOWNLOAD_REQUEST[source]

Bases: object

Specify the content of the download request sent by the client and expected by the server as hex bytes.

Note

This parameter is N/A when P4G_L4_PROTOCOL is configured as UDP.

class GetDataAttr[source]

Bases: ResponseBodyStruct

content

list of hex bytes, specifying the request content.

length

integer, specifying the number of bytes to write. Maximum request length is 1024 bytes.

class SetDataAttr[source]

Bases: RequestBodyStruct

content

list of hex bytes, specifying the request content.

length

integer, specifying the number of bytes to write. Maximum request length is 1024 bytes.

get()[source]

Get the content of the download request sent by the client and expected by the server as hex bytes.

Returns:

the content of the download request sent by the client and expected by the server as hex bytes.

Return type:

P4G_RAW_DOWNLOAD_REQUEST.GetDataAttr

set(length, content)[source]

Set the content of the download request sent by the client and expected by the server as hex bytes.

Parameters:
  • length (int) – specifying the number of bytes to write. Maximum request length is 1024 bytes.

  • content (Hex) – specifying the request content.

class P4G_RAW_HAS_DOWNLOAD_REQ[source]

Bases: object

Specify whether the server waits for a request from the client before it starts transmitting.

Note

This parameter is N/A when P4G_L4_PROTOCOL` is configured as UDP.

class GetDataAttr[source]

Bases: ResponseBodyStruct

on_off

coded byte, expect request before sending payload or not

class SetDataAttr[source]

Bases: RequestBodyStruct

on_off

coded byte, expect request before sending payload or not

get()[source]

Get whether the server waits for a request from the client before it starts transmitting.

Returns:

whether the server waits for a request from the client before it starts transmitting.

Return type:

P4G_RAW_HAS_DOWNLOAD_REQ.GetDataAttr

set(on_off)[source]

Set whether the server waits for a request from the client before it starts transmitting.

Parameters:

on_off (YesNo) – whether the server waits for a request from the client before it starts transmitting.

set_no()

The server does not wait for a request from the client before it starts transmitting.

set_yes()

The server waits for a request from the client before it starts transmitting.

class P4G_RAW_PAYLOAD[source]

Bases: object

Specify raw payload as hex bytes. This command can be called several times to build a custom payload.

class GetDataAttr[source]

Bases: ResponseBodyStruct

content

list of hex bytes, specifying the payload

length

integer, number of bytes to write

offset

integer, the offset in the payload buffer where data is to be written

class SetDataAttr[source]

Bases: RequestBodyStruct

content

list of hex bytes, specifying the payload

length

integer, number of bytes to write

offset

integer, the offset in the payload buffer where data is to be written

get()[source]

Get the payload as hex bytes.

Returns:

the payload as hex bytes

Return type:

P4G_RAW_PAYLOAD.GetDataAttr

set(offset, length, content)[source]

Set the payload as hex bytes.

Parameters:
  • offset (int) – the offset in the payload buffer where data is to be written

  • length (int) – number of bytes to write

  • content (Hex) – specifying the payload

class P4G_RAW_PAYLOAD_REPEAT_LEN[source]

Bases: object

Specify the length of the raw payload, which is defined by one or more P4G_RAW_PAYLOAD` commands, to repeat.

P4G_RAW_PAYLOAD_REPEAT_LEN` number of bytes will be repeated until P4G_RAW_PAYLOAD_TOTAL_LEN` bytes are transmitted on the connection.

class GetDataAttr[source]

Bases: ResponseBodyStruct

length

integer, specifying the length of the custom payload

class SetDataAttr[source]

Bases: RequestBodyStruct

length

integer, specifying the repeat length of the custom payload

get()[source]

Get the length of the raw payload to repeat.

Returns:

the length of the raw payload to repeat

Return type:

P4G_RAW_PAYLOAD_REPEAT_LEN.GetDataAttr

set(length)[source]

Set the length of the raw payload to repeat.

Parameters:

length (int) – the length of the raw payload to repeat

class P4G_RAW_PAYLOAD_TOTAL_LEN[source]

Bases: object

Configure the total amount of payload to transmit on one connection.

class GetDataAttr[source]

Bases: ResponseBodyStruct

length

long integer, size of the payload

mode

coded byte, generation mode.

class SetDataAttr[source]

Bases: RequestBodyStruct

length

long integer, size of the payload

mode

coded byte, generation mode.

get()[source]

Get the total amount of payload to transmit on one connection.

Returns:

the total amount of payload to transmit on one connection

Return type:

P4G_RAW_PAYLOAD_TOTAL_LEN.GetDataAttr

set(mode, length)[source]

Set the total amount of payload to transmit on one connection.

Parameters:
set_finite(length)

Stop generating payload after length bytes are transmitted.

set_infinite(length)

Generates payload as long as test is running.

class P4G_RAW_PAYLOAD_TYPE[source]

Bases: object

Specify the payload generation method.

class GetDataAttr[source]

Bases: ResponseBodyStruct

gen_method

coded byte, payload generation method

class SetDataAttr[source]

Bases: RequestBodyStruct

gen_method

coded byte, payload generation method

get()[source]

Get the payload generation method.

Returns:

payload generation method

Return type:

P4G_RAW_PAYLOAD_TYPE.GetDataAttr

set(gen_method)[source]

Set the payload generation method.

Parameters:

gen_method (PayloadGenerationMethod) – payload generation method

set_fixed()

Payload has a fixed value - as specified by the P4G_RAW_PAYLOAD` command.

set_increment()

Payload consist of incrementing bytes.

set_longrandom()

Payload consists of pseudo random bytes with a repeat cycle of 4 GB.

set_random()

Payload consists of pseudo random bytes with a repeat cycle of 1 MB.

class P4G_RAW_REQUEST_REPEAT[source]

Bases: object

Specify the number of request/response transactions to perform - if P4G_RAW_HAS_DOWNLOAD_REQ` is set to YES.

Note

This parameter is N/A when P4G_L4_PROTOCOL` is configured as UDP.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mode

coded byte, specifying the transaction mode.

repeat

integer, number of request/response transactions to perform , if mode is FINITE.

class SetDataAttr[source]

Bases: RequestBodyStruct

mode

coded byte, specifying the transaction mode.

repeat

integer, number of request/response transactions to perform , if mode is FINITE.

get()[source]

Get the number of request/response transactions to perform.

Returns:

the number of request/response transactions to perform

Return type:

P4G_RAW_REQUEST_REPEAT.GetDataAttr

set(mode, repeat)[source]

Set the number of request/response transactions to perform.

Parameters:
  • mode (InfiniteOrFinite) – specifying the transaction mode.

  • repeat (int) – number of request/response transactions to perform , if mode is FINITE.

set_finite(repeat)

Stop generating request/response transactions after a number of cycles

set_infinite(repeat)

Repeats request/response transactions as long as test is running.

class P4G_RAW_RX_PAYLOAD_LEN[source]

Bases: object

Specify the length of the payload the Client should expect to receive before sending the next download request to the Server. Should be configured identical to the P4G_RAW_PAYLOAD_TOTAL_LEN` for the Server. If mode is set to INFINITE, effectively no request/response repetitions will be performed.

Note

This parameter is N/A when P4G_L4_PROTOCOL` is configured as UDP.

class GetDataAttr[source]

Bases: ResponseBodyStruct

length

long integer, number of payload bytes the client should receive before sending the next request, if mode is FINITE.

mode

coded byte, specifying the payload length mode

class SetDataAttr[source]

Bases: RequestBodyStruct

length

long integer, number of payload bytes the client should receive before sending the next request, if mode is FINITE.

mode

coded byte, specifying the payload length mode

get()[source]

Get the length of the payload the Client should expect to receive before sending the next download request to the Server.

Returns:

the length of the payload the Client should expect to receive before sending the next download request to the Server.

Return type:

P4G_RAW_RX_PAYLOAD_LEN.GetDataAttr

set(mode, length)[source]

Set the length of the payload the Client should expect to receive before sending the next download request to the Server.

Parameters:
  • mode (InfiniteOrFinite) – specifying the payload length mode

  • length (int) – number of payload bytes the client should receive before sending the next request, if mode is FINITE.

set_finite(length)

Expects a number of bytes of payload defined by the command.

set_infinite(length)

Expects payload as long as test is running.

class P4G_RAW_TEST_SCENARIO[source]

Bases: object

Configure the traffic direction scenario for RAW mode.

class GetDataAttr[source]

Bases: ResponseBodyStruct

scenario

coded byte, traffic scenario

class SetDataAttr[source]

Bases: RequestBodyStruct

scenario

coded byte, traffic scenario

get()[source]

Get the traffic scenario for RAW mode.

Returns:

the traffic scenario for RAW mode.

Return type:

P4G_RAW_TEST_SCENARIO.GetDataAttr

set(scenario)[source]

Set the traffic scenario for RAW mode.

Parameters:

scenario (TrafficScenario) – traffic scenario

set_both()

Payload is transmitted in both directions.

set_download()

Server transmits payload to client.

set_echo()

Client transmits payload to server, server echoes the payload back

set_upload()

Client transmits payload to server.

class P4G_RAW_TX_DURING_RAMP[source]

Bases: object

Specify if TCP payload transmission should take place during ramp-up and ramp-down.

Note

For UDP connections payload transmission will always take place during ramp-up and ramp-down, and this parameter is therefore N/A.

class GetDataAttr[source]

Bases: ResponseBodyStruct

should_close_conn_ramp_down

coded byte, whether TCP payload transmission should take place during ramp down.

should_close_conn_ramp_up

coded byte, whether TCP payload transmission should take place during ramp up.

class SetDataAttr[source]

Bases: RequestBodyStruct

should_close_conn_ramp_down

coded byte, whether TCP payload transmission should take place during ramp down.

should_close_conn_ramp_up

coded byte, whether TCP payload transmission should take place during ramp up.

get()[source]

Get whether TCP payload transmission should take place during ramp-up and ramp-down.

Returns:

whether TCP payload transmission should take place during ramp-up and ramp-down.

Return type:

P4G_RAW_TX_DURING_RAMP.GetDataAttr

set(should_close_conn_ramp_up, should_close_conn_ramp_down)[source]

Set whether TCP payload transmission should take place during ramp-up and ramp-down.

Parameters:
  • should_close_conn_ramp_up (YesNo) – whether TCP payload transmission should take place during ramp-up.

  • should_close_conn_ramp_down (YesNo) – whether TCP payload transmission should take place during ramp-down.

class P4G_RAW_TX_TIME_OFFSET[source]

Bases: object

Specify a time offset to the transmit start and stop time, if P4G_TX_DURING_RAMP` is set to NO for ramp-up and ramp-down respectively.

class GetDataAttr[source]

Bases: ResponseBodyStruct

start_offset

integer, specify time in milliseconds from ramp-up has completed to start of payload transmit.

stop_offset

integer, specify time in milliseconds from stop of payload transmit to start of ramp-down.

class SetDataAttr[source]

Bases: RequestBodyStruct

start_offset

integer, specify time in milliseconds from ramp-up has completed to start of payload transmit.

stop_offset

integer, specify time in milliseconds from stop of payload transmit to start of ramp-down.

get()[source]

Get the time offset to the transmit start and stop time.

Returns:

the time offset to the transmit start and stop time

Return type:

P4G_RAW_TX_TIME_OFFSET.GetDataAttr

set(start_offset, stop_offset)[source]

Set the time offset to the transmit start and stop time.

Parameters:
  • start_offset (int) – specify time in milliseconds from ramp-up has completed to start of payload transmit.

  • stop_offset (int) – specify time in milliseconds from stop of payload transmit to start of ramp-down.

class P4G_RAW_UTILIZATION[source]

Bases: object

Specify the link layer bandwidth utilization for all the generated traffic from the specified Raw Connection Group.

class GetDataAttr[source]

Bases: ResponseBodyStruct

utilization

integer, utilization specified in ppm.

class SetDataAttr[source]

Bases: RequestBodyStruct

utilization

integer, utilization specified in ppm.

get()[source]

Get the link layer bandwidth utilization for all the generated traffic from the specified Raw Connection Group.

Returns:

the link layer bandwidth utilization for all the generated traffic from the specified Raw Connection Group.

Return type:

P4G_RAW_UTILIZATION.GetDataAttr

set(utilization)[source]

Set the link layer bandwidth utilization for all the generated traffic from the specified Raw Connection Group.

Parameters:

utilization (int) – utilization specified in ppm.

class P4G_RECALC_PAYLOAD_HIST[source]

Bases: object

Recalculates connection payload histograms (retrieved with: P4G_TCP_RX_TOTAL_BYTES_HIST`, P4G_TCP_RX_GOOD_BYTES_HIST`, P4G_TCP_TX_TOTAL_BYTES_HIST` and P4G_TCP_TX_GOOD_BYTES_HIST`). Used in case payload histogram configuration has been changed (using P4G_PAYLOAD_HIST_CONF`)

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Recalculates connection payload histograms.

class P4G_RECALC_TIME_HIST[source]

Bases: object

Recalculates connection time histograms (retrieved with: P4G_TCP_ESTABLISH_HIST` and P4G_TCP_CLOSE_HIST`). Used in case time histogram configuration has been changed (using P4G_TIME_HIST_CONF`).

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Recalculates connection time histograms

class P4G_RECALC_TRANSACTION_HIST[source]

Bases: object

Recalculates transaction histograms (retrieved with: P4G_APP_TRANSACTION_HIST`). Used in case transaction histogram configuration has been changed (using P4G_TRANSACTION_HIST_CONF`)

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Recalculates transaction histograms.

class P4G_REPLAY_FILE_CLEAR[source]

Bases: object

Clears a Replay File index, so no Replay File is configured for that index.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Clears a Replay File index.

class P4G_REPLAY_FILE_INDICES[source]

Bases: object

Returns an index list of configured Replay Files for this Connection Group. These are the Replay File Index that are used for P4G_REPLAY_FILE_NAME` and P4G_REPLAY_FILE_CLEAR` commands. More than one Replay File can be configured for a Connection Group. When configuring a Replay File for a Connection Group, it must have an index.

class GetDataAttr[source]

Bases: ResponseBodyStruct

replay_file_indices

list of integers, indices of configured replay files

get()[source]

Get an index list of configured Replay Files for this Connection Group.

Returns:

an index list of configured Replay Files for this Connection Group.

Return type:

P4G_REPLAY_FILE_INDICES.GetDataAttr

class P4G_REPLAY_FILE_NAME[source]

Bases: object

More than one Replay File can be configured for a Connection Group. When configuring a Replay File for a Connection Group, it must have an index. The indices at which Replay Files are configured does not have to be continuous.

class GetDataAttr[source]

Bases: ResponseBodyStruct

file_name

string, file name (including relative path and excluding the ‘.bson’ extension).

class SetDataAttr[source]

Bases: RequestBodyStruct

file_name

string, file name (including relative path and excluding the ‘.bson’ extension).

get()[source]

Get the name of a replay file configured for the Connection Group.

Returns:

the name of a replay file configured for the Connection Group.

Return type:

P4G_REPLAY_FILE_NAME.GetDataAttr

set(file_name)[source]

Set the name of a replay file configured for the Connection Group.

Parameters:

file_name (str) – file name (including relative path and excluding the .bson extension).

class P4G_REPLAY_USER_INCARNATION[source]

Bases: object

Defines the lifecycle mode of a user and its connections, and how new users should be established as old connections are closed.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mode

coded byte, defines the lifecycle mode of connections.

class SetDataAttr[source]

Bases: RequestBodyStruct

mode

coded byte, defines the lifecycle mode of connections.

get()[source]

Get the lifecycle mode of a user and its connections.

Returns:

the lifecycle mode of a user and its connections

Return type:

P4G_REPLAY_USER_INCARNATION.GetDataAttr

set(mode)[source]

Set the lifecycle mode of a user and its connections.

Parameters:

mode (LifecycleMode) – defines the lifecycle mode of connections.

set_immortal()

Users are created and its connections are established during the ramp-up phase of the load profile. Each connection is closed when all payload in the Replay File for that connection has been transmitted. A user is destroyed when all its connections are closed. As users are destroyed, new users are created, attempting to keep the concurrent number of users constant. A new user will have the same IP address as the user he replaces, but the new connections will have new TCP/UDP port numbers. This will simulate that the user is living on, and creates new connections as old connections close.

set_once()

Users are created and its connections are established during the ramp-up phase and not closed until the ramp-down phase of the load profile. That is, each configured user only exists once.

set_reincarnate()

Users are created and its connections are established during the ramp-up phase of the load profile. Each connection is closed when all payload in the Replay File for that connection has been transmitted. A user is destroyed when all its connections are closed. As users are destroyed, new users are created, attempting to keep the concurrent number of users constant. A new user will have a different IP address than the user it replaces, but its connection will have the same TCP/UDP port numbers. This will simulate that the user ceases to exist, and new users appear as old users die.

class P4G_REPLAY_USER_REPETITIONS[source]

Bases: object

Defines how many times a new user should be created after an old user has been destroyed, when P4G_REPLAY_USER_INCARNATION` is set to IMMORTAL or REINCARNATE.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mode

coded byte, repetition mode.

repetition_count

integer, number of repetitions

class SetDataAttr[source]

Bases: RequestBodyStruct

mode

coded byte, repetition mode.

repetition_count

integer, number of repetitions

get()[source]

Get how many times a new user should be created, after an old user has been destroyed.

Returns:

how many times a new user should be created, after an old user has been destroyed

Return type:

P4G_REPLAY_USER_REPETITIONS.GetDataAttr

set(mode, repetition_count)[source]

Set how many times a new user should be created, after an old user has been destroyed.

Parameters:
  • mode (InfiniteOrFinite) – the repetition mode

  • repetition_count (int) – number of repetitions

set_finite(repetition_count)

Each configured user is destroyed and re-created repetitions number of times.

set_infinite(repetition_count)

New users are generated as long as the load profile allows.

class P4G_REPLAY_UTILIZATION[source]

Bases: object

Specify the link layer bandwidth utilization for all the generated traffic from the specified Replay Connection Group.

class GetDataAttr[source]

Bases: ResponseBodyStruct

utilization

integer, utilization specified in ppm.

class SetDataAttr[source]

Bases: RequestBodyStruct

utilization

integer, utilization specified in ppm.

get()[source]

Get the link layer bandwidth utilization for all the generated traffic from the specified Replay Connection Group.

Returns:

the link layer bandwidth utilization for all the generated traffic from the specified Replay Connection Group.

Return type:

P4G_REPLAY_UTILIZATION.GetDataAttr

set(utilization)[source]

Set the link layer bandwidth utilization for all the generated traffic from the specified Replay Connection Group.

Parameters:

utilization (int) – utilization specified in ppm.

class P4G_ROLE[source]

Bases: object

Specifies the client or server role for this Connection Group. A server passively waits for the clients to establish connections.

class GetDataAttr[source]

Bases: ResponseBodyStruct

role

coded byte, specifies the role of the Connection Group.

class SetDataAttr[source]

Bases: RequestBodyStruct

role

coded byte, specifies the role of the Connection Group.

get()[source]

Get the role of the Connection Group.

Returns:

the role of the Connection Group.

Return type:

P4G_ROLE.GetDataAttr

set(role)[source]

Set the role of the Connection Group.

Parameters:

role (Role) – the role of the Connection Group.

set_client()

Set the role of the Connection Group to Client.

set_server()

Set the role of the Connection Group to Server.

class P4G_SERVER_RANGE[source]

Bases: object

Specifies a number of server sockets (ip address, port number)

class GetDataAttr[source]

Bases: ResponseBodyStruct

address_count

integer, the number of ip addresses

ipv4_address

address, the start ip address of the address range

port_count

integer, the number of ports

start_port

integer, the start port number, of the port range

class SetDataAttr[source]

Bases: RequestBodyStruct

address_count

integer, the number of ip addresses

ipv4_address

address, the start ip address of the address range

port_count

integer, the number of ports

start_port

integer, the start port number, of the port range

get()[source]

Get the number of server sockets (ip address, port number)

Returns:

the number of server sockets (ip address, port number)

Return type:

P4G_SERVER_RANGE.GetDataAttr

set(ipv4_address, address_count, start_port, port_count)[source]

Set the number of server sockets (ip address, port number)

Parameters:
  • ipv4_address (ipaddress.IPv4Address) – the start IP address of the address range

  • address_count (int) – the number of IP addresses

  • start_port (int) – the starting port number of the port range

  • port_count (int) – the number of ports

class P4G_TCP_ACK_FREQUENCY[source]

Bases: object

Number of received packets before a pure-ACK is sent.

class GetDataAttr[source]

Bases: ResponseBodyStruct

packets_before_ack

integer, number of received packets before an ACK is sent, range between 1 and 255, default 1. When set to 1, every packet is ACKed

class SetDataAttr[source]

Bases: RequestBodyStruct

packets_before_ack

integer, number of received packets before an ACK is sent, range between 1 and 255, default 1. When set to 1, every packet is ACKed

get()[source]

Get the configuration of the number of received packets before a pure-ACK is sent.

Returns:

the configuration of the number of received packets before a pure-ACK is sent.

Return type:

P4G_TCP_ACK_FREQUENCY.GetDataAttr

set(packets_before_ack)[source]

Set the configuration of the number of received packets before a pure-ACK is sent.

Parameters:

packets_before_ack (int) – number of received packets before an ACK is sent, range between 1 and 255, default 1. When set to 1, every packet is ACKed.

class P4G_TCP_ACK_TIMEOUT[source]

Bases: object

Delayed ACK timeout in microsecondsA pure ACK for the last RX packet will be sent after P4G_TCP_ACK_TIMEOUT` microseconds in case it cannot be sent by other means, ie. a number of packets received since last ACK is less than P4G_TCP_ACK_FREQUENCY` and there is no TX packets to sent (to piggy-back an ACK)

class GetDataAttr[source]

Bases: ResponseBodyStruct

ack_timeout

integer, timeout value in microseconds, default 200000.

class SetDataAttr[source]

Bases: RequestBodyStruct

ack_timeout

integer, timeout value in microseconds, default 200000.

get()[source]

Get the Delayed ACK timeout.

Returns:

the Delayed ACK timeout

Return type:

P4G_TCP_ACK_TIMEOUT.GetDataAttr

set(ack_timeout)[source]

Set the Delayed ACK timeout.

Parameters:

ack_timeout (int) – timeout value in microseconds, default 200000.

class P4G_TCP_CLOSE_HIST[source]

Bases: object

Returns a histogram over TCP connection close times, with start and interval values as configured by P4G_TIME_HIST_CONF`.

class GetDataAttr[source]

Bases: ResponseBodyStruct

avg_connection_close_time

long integer, average connection close time in us.

bin_00

integer, number of connections with close time within the given interval.

bin_01

integer, number of connections with close time within the given interval.

bin_02

integer, number of connections with close time within the given interval.

bin_03

integer, number of connections with close time within the given interval.

bin_04

integer, number of connections with close time within the given interval.

bin_05

integer, number of connections with close time within the given interval.

bin_06

integer, number of connections with close time within the given interval.

bin_07

integer, number of connections with close time within the given interval.

bin_08

integer, number of connections with close time within the given interval.

bin_09

integer, number of connections with close time within the given interval.

bin_10

integer, number of connections with close time within the given interval.

bin_11

integer, number of connections with close time within the given interval.

bin_12

integer, number of connections with close time within the given interval.

bin_13

integer, number of connections with close time within the given interval.

bin_14

integer, number of connections with close time within the given interval.

bin_15

integer, number of connections with close time within the given interval.

bin_16

integer, number of connections with close time within the given interval.

bin_17

integer, number of connections with close time within the given interval.

bin_18

integer, number of connections with close time within the given interval.

bin_19

integer, number of connections with close time within the given interval.

bin_20

integer, number of connections with close time within the given interval.

bin_21

integer, number of connections with close time within the given interval.

bin_22

integer, number of connections with close time within the given interval.

bin_23

integer, number of connections with close time within the given interval.

bin_24

integer, number of connections with close time within the given interval.

bin_25

integer, number of connections with close time within the given interval.

bin_26

integer, number of connections with close time within the given interval.

bin_27

integer, number of connections with close time within the given interval.

bin_28

integer, number of connections with close time within the given interval.

bin_29

integer, number of connections with close time within the given interval.

bin_30

integer, number of connections with close time within the given interval.

bin_31

integer, number of connections with close time within the given interval.

connection_count

integer, number of connections closed.

interval

long integer, histogram interval size in us

max_connection_close_time

long integer, maximum connection close time in us.

min_connection_close_time

long integer, minimum connection close time in us.

start

long integer, start value of first histogram interval in us

get()[source]

Get a histogram over TCP connection close times.

Returns:

a histogram over TCP connection close times

Return type:

P4G_TCP_CLOSE_HIST.GetDataAttr

class P4G_TCP_CONGESTION_MODE[source]

Bases: object

Configure the TCP congestion control algorithm.

class GetDataAttr[source]

Bases: ResponseBodyStruct

congestion_type

coded byte, specifying congestion algorithm type

class SetDataAttr[source]

Bases: RequestBodyStruct

congestion_type

coded byte, specifying congestion algorithm type

get()[source]

Get the TCP congestion control algorithm.

Returns:

the TCP congestion control algorithm.

Return type:

P4G_TCP_CONGESTION_MODE.GetDataAttr

set(congestion_type)[source]

Set the TCP congestion control algorithm.

Parameters:

congestion_type (CongestionType) – specifying congestion algorithm type

set_new_reno()

Enable New RENO congestion control algorithm.

set_none()

Disable congestion control.

set_reno()

Enable RENO congestion control algorithm.

class P4G_TCP_DUP_THRES[source]

Bases: object

Configure the value of the TCP duplicate ACK threshold.

class GetDataAttr[source]

Bases: ResponseBodyStruct

threshold

byte, duplicate ACK threshold - must be larger than 0

class SetDataAttr[source]

Bases: RequestBodyStruct

threshold

byte, duplicate ACK threshold - must be larger than 0

get()[source]

Get the value of the TCP duplicate ACK threshold.

Returns:

the value of the TCP duplicate ACK threshold.

Return type:

P4G_TCP_DUP_THRES.GetDataAttr

set(threshold)[source]

Set the value of the TCP duplicate ACK threshold.

Parameters:

threshold (int) – duplicate ACK threshold - must be larger than 0

class P4G_TCP_ERROR_COUNTERS[source]

Bases: object

Returns a list of TCP error counters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

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

local_reset_count

long integer, number of connections reset locally by transmitting a TCP RESET

max_retrans_count

long integer, number of connections reset due to maximum number of RTO retransmits

max_syn_retrans_count

long integer, number of connections reset due to maximum number of SYN retransmits

peer_reset_count

long integer, number of connections reset by peer

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

rx_reset_count

long integer, number of TCP RESET received

rx_zero_window_count

long integer, number of Zero Window ACKs received from the peer

seg_not_send_count

long integer, number of TCP segments not send due to exhausted Tx resources

tx_reset_count

long integer, number of TCP RESET transmitted

window_full_count

long integer, number of TCP window full encountered

get()[source]

Get a list of TCP error counters.

Returns:

a list of TCP error counters.

Return type:

P4G_TCP_ERROR_COUNTERS.GetDataAttr

class P4G_TCP_ESTABLISH_HIST[source]

Bases: object

Returns a histogram over TCP connection establish times, with start and interval values as configured by P4G_TIME_HIST_CONF`.

class GetDataAttr[source]

Bases: ResponseBodyStruct

avg_connection_estab_time

long integer, average connection establish time in us.

bin_00

integer, number of connections with establish time within the given interval.

bin_01

integer, number of connections with establish time within the given interval.

bin_02

integer, number of connections with establish time within the given interval.

bin_03

integer, number of connections with establish time within the given interval.

bin_04

integer, number of connections with establish time within the given interval.

bin_05

integer, number of connections with establish time within the given interval.

bin_06

integer, number of connections with establish time within the given interval.

bin_07

integer, number of connections with establish time within the given interval.

bin_08

integer, number of connections with establish time within the given interval.

bin_09

integer, number of connections with establish time within the given interval.

bin_10

integer, number of connections with establish time within the given interval.

bin_11

integer, number of connections with establish time within the given interval.

bin_12

integer, number of connections with establish time within the given interval.

bin_13

integer, number of connections with establish time within the given interval.

bin_14

integer, number of connections with establish time within the given interval.

bin_15

integer, number of connections with establish time within the given interval.

bin_16

integer, number of connections with establish time within the given interval.

bin_17

integer, number of connections with establish time within the given interval.

bin_18

integer, number of connections with establish time within the given interval.

bin_19

integer, number of connections with establish time within the given interval.

bin_20

integer, number of connections with establish time within the given interval.

bin_21

integer, number of connections with establish time within the given interval.

bin_22

integer, number of connections with establish time within the given interval.

bin_23

integer, number of connections with establish time within the given interval.

bin_24

integer, number of connections with establish time within the given interval.

bin_25

integer, number of connections with establish time within the given interval.

bin_26

integer, number of connections with establish time within the given interval.

bin_27

integer, number of connections with establish time within the given interval.

bin_28

integer, number of connections with establish time within the given interval.

bin_29

integer, number of connections with establish time within the given interval.

bin_30

integer, number of connections with establish time within the given interval.

bin_31

integer, number of connections with establish time within the given interval.

connection_count

integer,number of connections established.

interval

long integer, histogram interval size in us

max_connection_estab_time

long integer, maximum connection establish time in us.

min_connection_estab_time

long integer, minimum connection establish time in us.

start

long integer, start value of first histogram interval in us

get()[source]

Get a histogram over TCP connection establish times.

Returns:

a histogram over TCP connection establish times

Return type:

P4G_TCP_ESTABLISH_HIST.GetDataAttr

class P4G_TCP_ICWND_CALC_METHOD[source]

Bases: object

Select the algorithm to calculate the TCP initial congestion window (ICWND).

class GetDataAttr[source]

Bases: ResponseBodyStruct

factor

integer, factor to multiply the senders MSS with, when method is set to ‘FIXED_FACTOR’. Otherwise the value is ignored.

method

coded byte, specifying the algorithm

class SetDataAttr[source]

Bases: RequestBodyStruct

factor

integer, factor to multiply the senders MSS with, when method is set to ‘FIXED_FACTOR’. Otherwise the value is ignored.

method

coded byte, specifying the algorithm

get()[source]

Get the algorithm to calculate the TCP initial congestion window (ICWND).

Returns:

the algorithm to calculate the TCP initial congestion window (ICWND).

Return type:

P4G_TCP_ICWND_CALC_METHOD.GetDataAttr

set(method, factor)[source]

Set the algorithm to calculate the TCP initial congestion window (ICWND).

Parameters:
  • method (AlgorithmMethod) – specifying the algorithm

  • factor (int) – factor to multiply the senders MSS with, when method is set to FIXED_FACTOR. Otherwise the value is ignored.

set_fixed_factor(factor)

ICWND is set to a FACTOR * SMSS (Sender’s MSS)

set_rfc2581(factor)

ICWND is set according to RFC2581

set_rfc5681(factor)

ICWND is set according to RFC5681.

class P4G_TCP_ISSTHRESH[source]

Bases: object

Configure the TCP initial slow start threshold (ISSTHRESH).

class GetDataAttr[source]

Bases: ResponseBodyStruct

mode

coded byte, specifying TCP initial slow start mode

threshold

integer, number of bytes, value ignored when mode is set to MANUAL

class SetDataAttr[source]

Bases: RequestBodyStruct

mode

coded byte, specifying TCP initial slow start mode

threshold

integer, number of bytes, value ignored when mode is set to MANUAL

get()[source]

Get the TCP initial slow start threshold (ISSTHRESH).

Returns:

the TCP initial slow start threshold (ISSTHRESH).

Return type:

P4G_TCP_ISSTHRESH.GetDataAttr

set(mode, threshold)[source]

Set the TCP initial slow start threshold (ISSTHRESH).

Parameters:
  • mode (AutoOrManual) – specifying TCP initial slow start mode

  • threshold (int) – number of bytes, value ignored when mode is set to MANUAL

set_automatic(threshold)

TCP initial slow start mode set to Automatic

set_manual(threshold)

TCP initial slow start mode set to Manual

class P4G_TCP_MSS_MINMAX[source]

Bases: object

Configure the min and max values of the range for MSS. Both values are included in the range. Relevant when P4G_TCP_MSS_TYPE is set to INCREMENT or RANDOM.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mss_max

integer, maximum value of MSS

mss_min

integer, minimum value of MSS

class SetDataAttr[source]

Bases: RequestBodyStruct

mss_max

integer, maximum value of MSS

mss_min

integer, minimum value of MSS

get()[source]

Get the min and max values of the range for TCP MSS.

Returns:

the min and max values of the range for TCP MSS

Return type:

P4G_TCP_MSS_MINMAX.GetDataAttr

set(mss_min, mss_max)[source]

Set the min and max values of the range for TCP MSS.

Parameters:
  • mss_min (int) – minimum value of MSS

  • mss_max (int) – maximum value of MSS

class P4G_TCP_MSS_TYPE[source]

Bases: object

Specifies the Maximum Segment size (MSS) type for a Connection Group. The MSS can either be fixed size identical for all connections in the Connection Group, incrementing or random. The individual MSS for a specific connection is always constant once the incrementing or random value has been created. Refer to P4G_TCP_MSS_MINMAX` command for information on how to configure min and max values.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mss_type

coded byte, specifying how MSS is set

class SetDataAttr[source]

Bases: RequestBodyStruct

mss_type

coded byte, specifying how MSS is set

get()[source]

Get the Maximum Segment size (MSS) type for a Connection Group.

Returns:

the Maximum Segment size (MSS) type for a Connection Group

Return type:

P4G_TCP_MSS_TYPE.GetDataAttr

set(mss_type)[source]

Set the Maximum Segment size (MSS) type for a Connection Group.

Parameters:

mss_type (MSSType) – specifying how MSS is set

set_fixed()

Use fixed value for TCP MSS.

set_increment()

Use incrementing value for TCP MSS.

set_random()

Use pseudorandom value for TCP MSS.

class P4G_TCP_MSS_VALUE[source]

Bases: object

Configure the fixed MSS value. Relevant when P4G_TCP_MSS_TYPE is set to FIXED.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mss

integer, fixed value of MSS

class SetDataAttr[source]

Bases: RequestBodyStruct

mss

integer, fixed value of MSS

get()[source]

Get the fixed MSS value of the Connection Group.

Returns:

the fixed MSS value of the Connection Group.

Return type:

P4G_TCP_MSS_VALUE.GetDataAttr

set(mss)[source]

Set the fixed MSS value of the Connection Group.

Parameters:

mss (int) – the fixed value of MSS (in bytes)

class P4G_TCP_RETRANSMIT_COUNTERS[source]

Bases: object

Returns a list of TCP retransmission counters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

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

fast_retrans_event_count

long integer, number of fast-retransmit events occurred

fast_retrans_segment_count

long integer, number of segments retransmitted during fast-retransmit

fin_retrans_count

long integer, number of FIN retransmitted

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

rto_retrans_event_count

long integer, number of timer based retransmit events occurred

rx_duplicate_ack_count

long integer, number of duplicate ACK received

rx_ooo_segment_count

long integer, number of out-of-order segments received

syn_retrans_count

long integer, number of SYN retransmitted

get()[source]

Get a list of TCP retransmission counters.

Returns:

a list of TCP retransmission counters.

Return type:

P4G_TCP_RETRANSMIT_COUNTERS.GetDataAttr

class P4G_TCP_RTO[source]

Bases: object

Configure the value of the TCP retransmission timeout, max retries and max backoff.

class GetDataAttr[source]

Bases: ResponseBodyStruct

backoff

byte, maximum retransmission backoff

retrans_timeout

integer, retransmission timeout [milliseconds] - must be larger than 0

retry_count

byte, maximum retransmission retries - must be larger than 0

type

coded byte, specifying RTO type

class SetDataAttr[source]

Bases: RequestBodyStruct

backoff

byte, maximum retransmission backoff

retrans_timeout

integer, retransmission timeout [milliseconds] - must be larger than 0

retry_count

byte, maximum retransmission retries - must be larger than 0

rto_type

coded byte, specifying RTO type

get()[source]

Get the value of the TCP retransmission timeout, max retries and max backoff.

Returns:

the value of the TCP retransmission timeout, max retries and max backoff.

Return type:

P4G_TCP_RTO.GetDataAttr

set(rto_type, retrans_timeout, retry_count, backoff)[source]

Set the value of the TCP retransmission timeout, max retries and max backoff.

Parameters:
  • rto_type (RTOType) – specifying RTO type

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

  • retry_count (int) – maximum retransmission retries - must be larger than 0

  • backoff (int) – maximum retransmission backoff

set_dynamic(retrans_timeout, retry_count, backoff)

RTO is dynamic and depending on round trip time (RTT)

set_static(retrans_timeout, retry_count, backoff)

RTO is constant as configured

class P4G_TCP_RTO_MINMAX[source]

Bases: object

Configure the min and max values of the TCP retransmission timeout, when rto type is set to dynamic. If the calculated rto fall outside the interval, the value is clamped to the min or max value.

class GetDataAttr[source]

Bases: ResponseBodyStruct

rto_max

integer, max retransmission timeout [us] - must be larger than 0 and greater than min.

rto_min

integer, min retransmission timeout [us] - must be larger than 0 and less than max.

class SetDataAttr[source]

Bases: RequestBodyStruct

rto_max

integer, max retransmission timeout [us] - must be larger than 0 and greater than min.

rto_min

integer, min retransmission timeout [us] - must be larger than 0 and less than max.

get()[source]

Get the min and max values of the TCP retransmission timeout.

Returns:

the min and max values of the TCP retransmission timeout

Return type:

P4G_TCP_RTO_MINMAX.GetDataAttr

set(rto_min, rto_max)[source]

Set the min and max values of the TCP retransmission timeout.

Parameters:
  • rto_min (int) – min retransmission timeout [us] - must be larger than 0 and less than max.

  • rto_max (int) – max retransmission timeout [us] - must be larger than 0 and greater than min.

class P4G_TCP_RTO_PROLONGED_MODE[source]

Bases: object

Configure TCP retransmission prolonged mode. When enabled, TCP will, after exceeding max number of retransmission retries, continue trying retransmit until success, whereafter it will operate normally.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mode

byte, specifying whether to enable/disable prolonged retransmission mode

timeout

retransmission timeout in milliseconds, when prolonged mode is enabled. When mode is set to 0, the value of the timeout is ignored, when mode is set to 1, the value of the timeout may not be 0

class SetDataAttr[source]

Bases: RequestBodyStruct

mode

byte, specifying whether to enable/disable prolonged retransmission mode

timeout

retransmission timeout in milliseconds, when prolonged mode is enabled. When mode is set to 0, the value of the timeout is ignored, when mode is set to 1, the value of the timeout may not be 0

get()[source]

Get TCP retransmission prolonged mode.

Returns:

TCP retransmission prolonged mode

Return type:

P4G_TCP_RTO_PROLONGED_MODE.GetDataAttr

set(mode, timeout)[source]

Set TCP retransmission prolonged mode.

Parameters:
  • mode (IsEnabled) – specifying whether to enable/disable prolonged retransmission mode

  • timeout (int) – retransmission timeout in milliseconds, when prolonged mode is enabled. When mode is set to 0, the value of the timeout is ignored. When mode is set to 1, the value of the timeout may not be 0.

set_disable(timeout)

Disable TCP retransmission prolonged mode.

set_enable(timeout)

Enable TCP retransmission prolonged mode.

class P4G_TCP_RTT_VALUE[source]

Bases: object

Returns values that can be used to calculate the RTT value of all connections in a Connection Group.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

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

global_rtt_count

long integer, number of RTT values accumulated in global_rtt_sum

global_rtt_sum

long integer, accumulated RTT value (microsecond) since start of test

local_rtt_count

long integer, number of RTT value accumulated in local_rtt_sum

local_rtt_sum

long integer, accumulated RTT value (microsecond) in previous 200 milliseconds

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get values that can be used to calculate the RTT value of all connections in a Connection Group.

Returns:

values that can be used to calculate the RTT value of all connections in a Connection Group.

Return type:

P4G_TCP_RTT_VALUE.GetDataAttr

class P4G_TCP_RX_GOOD_BYTES_HIST[source]

Bases: object

Returns a histogram over number of good TCP bytes received, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.

class GetDataAttr[source]

Bases: ResponseBodyStruct

avg

long integer, average good TCP bytes received on a connection.

bin_00

integer, number of connections that has received good TCP bytes within the given interval.

bin_01

integer, number of connections that has received good TCP bytes within the given interval.

bin_02

integer, number of connections that has received good TCP bytes within the given interval.

bin_03

integer, number of connections that has received good TCP bytes within the given interval.

bin_04

integer, number of connections that has received good TCP bytes within the given interval.

bin_05

integer, number of connections that has received good TCP bytes within the given interval.

bin_06

integer, number of connections that has received good TCP bytes within the given interval.

bin_07

integer, number of connections that has received good TCP bytes within the given interval.

bin_08

integer, number of connections that has received good TCP bytes within the given interval.

bin_09

integer, number of connections that has received good TCP bytes within the given interval.

bin_10

integer, number of connections that has received good TCP bytes within the given interval.

bin_11

integer, number of connections that has received good TCP bytes within the given interval.

bin_12

integer, number of connections that has received good TCP bytes within the given interval.

bin_13

integer, number of connections that has received good TCP bytes within the given interval.

bin_14

integer, number of connections that has received good TCP bytes within the given interval.

bin_15

integer, number of connections that has received good TCP bytes within the given interval.

bin_16

integer, number of connections that has received good TCP bytes within the given interval.

bin_17

integer, number of connections that has received good TCP bytes within the given interval.

bin_18

integer, number of connections that has received good TCP bytes within the given interval.

bin_19

integer, number of connections that has received good TCP bytes within the given interval.

bin_20

integer, number of connections that has received good TCP bytes within the given interval.

bin_21

integer, number of connections that has received good TCP bytes within the given interval.

bin_22

integer, number of connections that has received good TCP bytes within the given interval.

bin_23

integer, number of connections that has received good TCP bytes within the given interval.

bin_24

integer, number of connections that has received good TCP bytes within the given interval.

bin_25

integer, number of connections that has received good TCP bytes within the given interval.

bin_26

integer, number of connections that has received good TCP bytes within the given interval.

bin_27

integer, number of connections that has received good TCP bytes within the given interval.

bin_28

integer, number of connections that has received good TCP bytes within the given interval.

bin_29

integer, number of connections that has received good TCP bytes within the given interval.

bin_30

integer, number of connections that has received good TCP bytes within the given interval.

bin_31

integer, number of connections that has received good TCP bytes within the given interval.

connection_count

integer,number of connections.

interval

long integer, histogram interval size in bytes

max_byte_count

long integer, maximum good TCP bytes received on a connection.

min_byte_count

long integer, minimum good TCP bytes received on a connection.

start

long integer, start value of first histogram interval in bytes

get()[source]

Get a histogram over number of good TCP bytes received.

Returns:

a histogram over number of good TCP bytes received

Return type:

P4G_TCP_RX_GOOD_BYTES_HIST.GetDataAttr

class P4G_TCP_RX_PACKET_COUNTERS[source]

Bases: object

Returns a list of the TCP RX packet counters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

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

packet_count

long integer, number of TCP packets received

packet_per_second

long integer, number of TCP packets/second received

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get a list of the TCP RX packet counters.

Returns:

a list of the TCP RX packet counters.

Return type:

P4G_TCP_RX_PACKET_COUNTERS.GetDataAttr

class P4G_TCP_RX_PAYLOAD_COUNTERS[source]

Bases: object

Returns a list of the TCP Rx payload counters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

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

good_byte_count

long integer, number of good TCP payload bytes received

good_byte_per_second

long integer, number of good TCP payload bytes/second received

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

total_byte_count

long integer, number of total TCP payload bytes received

total_byte_per_second

long integer, number of total TCP payload bytes/second received

get()[source]

Get a list of the TCP Rx payload counters.

Returns:

a list of the TCP Rx payload counters.

Return type:

P4G_TCP_RX_PAYLOAD_COUNTERS.GetDataAttr

class P4G_TCP_RX_TOTAL_BYTES_HIST[source]

Bases: object

Returns a histogram over number of total TCP bytes received, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.

class GetDataAttr[source]

Bases: ResponseBodyStruct

avg_byte_count

long integer, average total TCP bytes received on a connection.

bin_00

integer, number of connections that has received total TCP bytes within the given interval.

bin_01

integer, number of connections that has received total TCP bytes within the given interval.

bin_02

integer, number of connections that has received total TCP bytes within the given interval.

bin_03

integer, number of connections that has received total TCP bytes within the given interval.

bin_04

integer, number of connections that has received total TCP bytes within the given interval.

bin_05

integer, number of connections that has received total TCP bytes within the given interval.

bin_06

integer, number of connections that has received total TCP bytes within the given interval.

bin_07

integer, number of connections that has received total TCP bytes within the given interval.

bin_08

integer, number of connections that has received total TCP bytes within the given interval.

bin_09

integer, number of connections that has received total TCP bytes within the given interval.

bin_10

integer, number of connections that has received total TCP bytes within the given interval.

bin_11

integer, number of connections that has received total TCP bytes within the given interval.

bin_12

integer, number of connections that has received total TCP bytes within the given interval.

bin_13

integer, number of connections that has received total TCP bytes within the given interval.

bin_14

integer, number of connections that has received total TCP bytes within the given interval.

bin_15

integer, number of connections that has received total TCP bytes within the given interval.

bin_16

integer, number of connections that has received total TCP bytes within the given interval.

bin_17

integer, number of connections that has received total TCP bytes within the given interval.

bin_18

integer, number of connections that has received total TCP bytes within the given interval.

bin_19

integer, number of connections that has received total TCP bytes within the given interval.

bin_20

integer, number of connections that has received total TCP bytes within the given interval.

bin_21

integer, number of connections that has received total TCP bytes within the given interval.

bin_22

integer, number of connections that has received total TCP bytes within the given interval.

bin_23

integer, number of connections that has received total TCP bytes within the given interval.

bin_24

integer, number of connections that has received total TCP bytes within the given interval.

bin_25

integer, number of connections that has received total TCP bytes within the given interval.

bin_26

integer, number of connections that has received total TCP bytes within the given interval.

bin_27

integer, number of connections that has received total TCP bytes within the given interval.

bin_28

integer, number of connections that has received total TCP bytes within the given interval.

bin_29

integer, number of connections that has received total TCP bytes within the given interval.

bin_30

integer, number of connections that has received total TCP bytes within the given interval.

bin_31

integer, number of connections that has received total TCP bytes within the given interval.

connection_count

integer,number of connections.

interval

long integer, histogram interval size in bytes

max_byte_count

long integer, maximum total TCP bytes received on a connection.

min_byte_count

long integer, minimum total TCP bytes received on a connection.

start

long integer, start value of first histogram interval in bytes

get()[source]

Get a histogram over number of total TCP bytes received.

Returns:

a histogram over number of total TCP bytes received

Return type:

P4G_TCP_RX_TOTAL_BYTES_HIST.GetDataAttr

class P4G_TCP_STATE_CURRENT[source]

Bases: object

Returns a list of the current TCP state counters. The counters returned corresponds the the following TCP states:

  • CLOSED

  • LISTEN

  • SYN_SENT

  • TCP_SYN_RCVD

  • ESTABLISHED

  • FIN_WAIT_1

  • FIN_WAIT_2

  • CLOSE_WAIT

  • CLOSING

  • LAST_ACK

  • TIME_WAIT

class GetDataAttr[source]

Bases: ResponseBodyStruct

close_wait

long integer, the number of connections currently in this state

closed

long integer, the number of connections currently in this state

closing

long integer, the number of connections currently in this state

current_time

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

established

long integer, the number of connections currently in this state

fin_wait_1

long integer, the number of connections currently in this state

fin_wait_2

long integer, the number of connections currently in this state

last_ack

long integer, the number of connections currently in this state

listen

long integer, the number of connections currently in this state

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

syn_rcvd

long integer, the number of connections currently in this state

syn_sent

long integer, the number of connections currently in this state

time_wait

long integer, the number of connections currently in this state

get()[source]

Get a list of the current TCP state counters

Returns:

a list of the current TCP state counters

Return type:

P4G_TCP_STATE_CURRENT.GetDataAttr

class P4G_TCP_STATE_RATE[source]

Bases: object

Returns a list of the TCP state rates measured in connections/second. The counters returned corresponds the the following TCP state rates:

  • CLOSED

  • LISTEN

  • SYN_SENT

  • TCP_SYN_RCVD

  • ESTABLISHED

  • FIN_WAIT_1

  • FIN_WAIT_2

  • CLOSE_WAIT

  • CLOSING

  • LAST_ACK

  • TIME_WAIT

class GetDataAttr[source]

Bases: ResponseBodyStruct

close_wait

long integer, the number of connections/second entering this state

closed

long integer, the number of connections/second entering this state

closing

long integer, the number of connections/second entering this state

current_time

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

established

long integer, the number of connections/second entering this state

fin_wait_1

long integer, the number of connections/second entering this state

fin_wait_2

long integer, the number of connections/second entering this state

last_ack

long integer, the number of connections/second entering this state

listen

long integer, the number of connections/second entering this state

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

syn_rcvd

long integer, the number of connections/second entering this state

syn_sent

long integer, the number of connections/second entering this state

time_wait

long integer, the number of connections/second entering this state

get()[source]

Get a list of the TCP state rates measured in connections/second.

Returns:

a list of the TCP state rates measured in connections/second

Return type:

P4G_TCP_STATE_RATE.GetDataAttr

class P4G_TCP_STATE_TOTAL[source]

Bases: object

Returns a list of the total TCP state counters. The counters returned corresponds the the following TCP states:

  • CLOSED

  • LISTEN

  • SYN_SENT

  • TCP_SYN_RCVD

  • ESTABLISHED

  • FIN_WAIT_1

  • FIN_WAIT_2

  • CLOSE_WAIT

  • CLOSING

  • LAST_ACK

  • TIME_WAIT

class GetDataAttr[source]

Bases: ResponseBodyStruct

close_wait

long integer, the total number of connections that has entered this state

closed

long integer, the total number of connections that has entered this state

closing

long integer, the total number of connections that has entered this state

current_time

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

established

long integer, the total number of connections that has entered this state

fin_wait_1

long integer, the total number of connections that has entered this state

fin_wait_2

long integer, the total number of connections that has entered this state

last_ack

long integer, the total number of connections that has entered this state

listen

long integer, the total number of connections that has entered this state

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

syn_rcvd

long integer, the total number of connections that has entered this state

syn_sent

long integer, the total number of connections that has entered this state

time_wait

long integer, the total number of connections that has entered this state

get()[source]

Get a list of the total TCP state counters.

Returns:

a list of the total TCP state counters

Return type:

P4G_TCP_STATE_TOTAL.GetDataAttr

class P4G_TCP_SYN_RTO[source]

Bases: object

Configure the value of the TCP SYN retransmission timeout, max retries and max backoff.

class GetDataAttr[source]

Bases: ResponseBodyStruct

backoff

byte, maximum SYN retransmission backoff

retrans_timeout

integer, SYN retransmission timeout [milliseconds] - must be larger than 0

retry_count

byte, maximum SYN retransmission retries - must be larger than 0

class SetDataAttr[source]

Bases: RequestBodyStruct

backoff

byte, maximum SYN retransmission backoff

retrans_timeout

integer, SYN retransmission timeout [milliseconds] - must be larger than 0

retry_count

byte, maximum SYN retransmission retries - must be larger than 0

get()[source]

Get the value of the TCP SYN retransmission timeout, max retries and max backoff.

Returns:

the value of the TCP SYN retransmission timeout, max retries and max backoff.

Return type:

P4G_TCP_SYN_RTO.GetDataAttr

set(retrans_timeout, retry_count, backoff)[source]

Set the value of the TCP SYN retransmission timeout, max retries and max backoff.

Parameters:
  • retrans_timeout (int) – SYN retransmission timeout [milliseconds] - must be larger than 0

  • retry_count (int) – maximum SYN retransmission retries - must be larger than 0

  • backoff (int) – maximum SYN retransmission backoff

class P4G_TCP_TX_GOOD_BYTES_HIST[source]

Bases: object

Returns a histogram over number of good TCP bytes transmitted, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.

class GetDataAttr[source]

Bases: ResponseBodyStruct

average

long integer, average good TCP bytes transmitted on a connection.

bin_00

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_01

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_02

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_03

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_04

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_05

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_06

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_07

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_08

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_09

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_10

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_11

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_12

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_13

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_14

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_15

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_16

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_17

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_18

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_19

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_20

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_21

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_22

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_23

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_24

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_25

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_26

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_27

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_28

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_29

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_30

integer, number of connections that has transmitted good TCP bytes within the given interval.

bin_31

integer, number of connections that has transmitted good TCP bytes within the given interval.

conn

integer,number of connections.

interval

long integer, histogram interval size in bytes

max

long integer, maximum good TCP bytes transmitted on a connection.

min

long integer, minimum good TCP bytes transmitted on a connection.

start

long integer, start value of first histogram interval in bytes

get()[source]

Get a histogram over number of good TCP bytes transmitted.

Returns:

a histogram over number of good TCP bytes transmitted

Return type:

P4G_TCP_TX_GOOD_BYTES_HIST.GetDataAttr

class P4G_TCP_TX_PACKET_COUNTERS[source]

Bases: object

Returns a list of the TCP TX packet counters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

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

packet_count

long integer, number of TCP packets transmitted

packet_per_second

long integer, number of TCP packets/second transmitted

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get a list of the TCP TX packet counters.

Returns:

a list of the TCP TX packet counters.

Return type:

P4G_TCP_TX_PACKET_COUNTERS.GetDataAttr

class P4G_TCP_TX_PAYLOAD_COUNTERS[source]

Bases: object

Returns a list of the TCP Tx payload counters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

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

good_byte_count

long integer, number of good TCP payload bytes transmitted

good_byte_per_second

long integer, number of good TCP payload bytes/second transmitted

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

total_byte_count

long integer, number of total TCP payload bytes transmitted

total_byte_per_second

long integer, number of total TCP payload bytes/second transmitted

get()[source]

Get a list of the TCP Tx payload counters.

Returns:

a list of the TCP Tx payload counters.

Return type:

P4G_TCP_TX_PAYLOAD_COUNTERS.GetDataAttr

class P4G_TCP_TX_TOTAL_BYTES_HIST[source]

Bases: object

Returns a histogram over number of total TCP bytes transmitted, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.

class GetDataAttr[source]

Bases: ResponseBodyStruct

avg_byte_count

long integer, average total TCP bytes transmitted on a connection.

bin_00

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_01

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_02

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_03

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_04

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_05

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_06

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_07

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_08

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_09

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_10

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_11

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_12

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_13

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_14

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_15

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_16

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_17

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_18

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_19

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_20

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_21

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_22

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_23

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_24

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_25

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_26

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_27

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_28

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_29

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_30

integer, number of connections that has transmitted total TCP bytes within the given interval.

bin_31

integer, number of connections that has transmitted total TCP bytes within the given interval.

connection_count

integer,number of connections.

interval

long integer, histogram interval size in bytes

max_byte_count

long integer, maximum total TCP bytes transmitted on a connection.

min_byte_count

long integer, minimum total TCP bytes transmitted on a connection.

start

long integer, start value of first histogram interval in bytes

get()[source]

Get a histogram over number of total TCP bytes transmitted.

Returns:

a histogram over number of total TCP bytes transmitted

Return type:

P4G_TCP_TX_TOTAL_BYTES_HIST.GetDataAttr

class P4G_TCP_WINDOW_SCALING[source]

Bases: object

Enable window scaling for the Connection Group. Note to use windows scaling it need to be enabled in both the client and server Connection Group. .

class GetDataAttr[source]

Bases: ResponseBodyStruct

factor

integer, default value is 0 and maximum value is 14 - ignored if window scaling is not enabled

on_off

code byte, specifying whether to enable window scaling or not

class SetDataAttr[source]

Bases: RequestBodyStruct

factor

integer, default value is 0 and maximum value is 14 - ignored if window scaling is not enabled

on_off

code byte, specifying whether to enable window scaling or not

get()[source]

Get TCP window scaling settings for the Connection Group.

Returns:

TCP window scaling settings for the Connection Group.

Return type:

P4G_TCP_WINDOW_SCALING.GetDataAttr

set(on_off, factor)[source]

Set TCP window scaling settings for the Connection Group.

Parameters:
  • on_off (YesNo) – specifying whether to enable window scaling or not

  • factor (int) – default value is 0 and maximum value is 14 - ignored if window scaling is not enabled

set_no(factor)

Disable TCP window scaling.

set_yes(factor)

Enable TCP window scaling.

class P4G_TCP_WINDOW_SIZE[source]

Bases: object

Configure the value of the TCP RWND.

class GetDataAttr[source]

Bases: ResponseBodyStruct

window_size

integer, window size in bytes

class SetDataAttr[source]

Bases: RequestBodyStruct

window_size

integer, window size in bytes

get()[source]

Get the value of the TCP RWND.

Returns:

the value of the TCP RWND.

Return type:

P4G_TCP_WINDOW_SIZE.GetDataAttr

set(window_size)[source]

Set the value of the TCP RWND.

Parameters:

window_size (int) – RWND size in bytes

class P4G_TEST_APPLICATION[source]

Bases: object

Configure the application layer mode. This command affects whether TCP payload is generated.

  • NONE means that TCP connections are created according to the client and server ranges, and ramped up/down as specified in the load profile. But no payload is transmitted.

  • RAW differs from NONE in that it transmits payload when the TCP connection is established.

  • REPLAY refers to PCAP replay.

class GetDataAttr[source]

Bases: ResponseBodyStruct

behavior

coded byte, application behavior

class SetDataAttr[source]

Bases: RequestBodyStruct

behavior

coded byte, application behavior

get()[source]

Get the application layer mode.

Returns:

the application layer mode

Return type:

P4G_TEST_APPLICATION.GetDataAttr

set(behavior)[source]

Set he application layer mode.

Parameters:

behavior (ApplicationLayerBehavior) – the application layer mode

set_none()

Application layer is set to connection-only.

set_raw()

Application layer is set to connection + payload.

set_replay()

Application layer is set to pcap replay.

class P4G_TIME_HIST_CONF[source]

Bases: object

Sets the start value and the interval size for the time histograms (P4G_TCP_ESTABLISH_HIST` and P4G_TCP_CLOSE_HIST`).

class GetDataAttr[source]

Bases: ResponseBodyStruct

interval

long integer, histogram interval size in us

start

long integer, start value of first histogram interval in us

class SetDataAttr[source]

Bases: RequestBodyStruct

interval

long integer, histogram interval size in us

start

long integer, start value of first histogram interval in us

get()[source]

Get the start value and the interval size for the time histograms.

Returns:

the start value and the interval size for the time histograms.

Return type:

P4G_TIME_HIST_CONF.GetDataAttr

set(start, interval)[source]

Set the start value and the interval size for the time histograms.

Parameters:
  • start (int) – start value of first histogram interval in microseconds

  • interval (int) – histogram interval size in microseconds

class P4G_TLS_ALERT_FATAL_COUNTERS[source]

Bases: object

Returns a list of TLS error counters. The counters returned corresponds the the following TLS warnings:

  • close_notify

  • unexpected_message

  • bad_record_mac

  • record_overflow

  • decompression_failure

  • handshake_failure

  • bad_certificate

  • unsupported_certificate

  • certificate_revoked

  • certificate_expired

  • certificate_unknown

  • illegal_parameter

  • unknown_ca

  • access_denied

  • decode_error

  • decrypt_error

  • protocol_version

  • insufficient_security

  • internal_error

  • user_canceled

  • no_renegotiation

  • unsupported_extension

  • unknown.

class GetDataAttr[source]

Bases: ResponseBodyStruct

access_denied

long integer, the total number of this error received

bad_certificate

long integer, the total number of this error received

bad_record_mac

long integer, the total number of this error received

certificate_expired

long integer, the total number of this error received

certificate_revoked

long integer, the total number of this error received

certificate_unknown

long integer, the total number of this error received

current_time

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

decode_error

long integer, the total number of this error received

decompression_failure

long integer, the total number of this error received

decrypt_error

long integer, the total number of this error received

handshake_failure

long integer, the total number of this error received

illegal_parameter

long integer, the total number of this error received

insufficient_security

long integer, the total number of this error received

internal_error

long integer, the total number of this error received

no_renegotiation

long integer, the total number of this error received

protocol_version

long integer, the total number of this error received

record_overflow

long integer, the total number of this error received

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

stats

long integer, the total number of this error received

unexpected_message

long integer, the total number of this error received

unknown

long integer, the total number of this error received

unknown_ca

long integer, the total number of this error received

unsupported_certificate

long integer, the total number of this error received

unsupported_extension

long integer, the total number of this error received

user_canceled

long integer, the total number of this error received

get()[source]

Get a list of TLS error counters.

Returns:

a list of TLS error counters

Return type:

P4G_TLS_ALERT_FATAL_COUNTERS.GetDataAttr

class P4G_TLS_ALERT_WARNING_COUNTERS[source]

Bases: object

Returns a list of TLS warning counters. The counters returned corresponds the the following TLS warnings:

  • close_notify

  • unexpected_message

  • bad_record_mac

  • record_overflow

  • decompression_failure

  • handshake_failure

  • bad_certificate

  • unsupported_certificate

  • certificate_revoked

  • certificate_expired

  • certificate_unknown

  • illegal_parameter

  • unknown_ca

  • access_denied

  • decode_error

  • decrypt_error

  • protocol_version

  • insufficient_security

  • internal_error

  • user_canceled

  • no_renegotiation

  • unsupported_extension

  • unknown.

class GetDataAttr[source]

Bases: ResponseBodyStruct

access_denied

long integer, the total number of this warning received

bad_certificate

long integer, the total number of this warning received

bad_record_mac

long integer, the total number of this warning received

certificate_expired

long integer, the total number of this warning received

certificate_revoked

long integer, the total number of this warning received

certificate_unknown

long integer, the total number of this warning received

close_notify

long integer, the total number of this warning received

current_time

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

decode_error

long integer, the total number of this warning received

decompression_failure

long integer, the total number of this warning received

decrypt_error

long integer, the total number of this warning received

handshake_failure

long integer, the total number of this warning received

illegal_parameter

long integer, the total number of this warning received

insufficient_security

long integer, the total number of this warning received

internal_error

long integer, the total number of this warning received

no_renegotiation

long integer, the total number of this warning received

protocol_version

long integer, the total number of this warning received

record_overflow

long integer, the total number of this warning received

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

unexpected_message

long integer, the total number of this warning received

unknown

long integer, the total number of this warning received

unknown_ca

long integer, the total number of this warning received

unsupported_certificate

long integer, the total number of this warning received

unsupported_extension

long integer, the total number of this warning received

user_canceled

long integer, the total number of this warning received

get()[source]

Get a list of TLS warning counters.

Returns:

a list of TLS warning counters

Return type:

P4G_TLS_ALERT_WARNING_COUNTERS.GetDataAttr

class P4G_TLS_CERTIFICATE_FILENAME[source]

Bases: object

Configure the TLS certificate.

class SetDataAttr[source]

Bases: RequestBodyStruct

filename

string, the filename of the certificate relative to the ftp tls folder

set(filename)[source]

Set the TLS certificate.

Parameters:

filename (str) – the filename of the certificate relative to the FTP TLS folder on the tester.

class P4G_TLS_CIPHER_SUITES[source]

Bases: object

Configure the list of ciphers to announce in order of priorities.

class GetDataAttr[source]

Bases: ResponseBodyStruct

ciphers

list of hex bytes, sequence of ciphers identified by theirs IANA number in order of priority.

class SetDataAttr[source]

Bases: RequestBodyStruct

ciphers

list of hex bytes, sequence of ciphers identified by theirs IANA number in order of priority.

get()[source]

Get the list of ciphers to announce in order of priorities.

Returns:

the list of ciphers to announce in order of priorities.

Return type:

P4G_TLS_CIPHER_SUITES.GetDataAttr

set(ciphers)[source]

Set the list of ciphers to announce in order of priorities.

Parameters:

ciphers (Hex) – sequence of ciphers identified by theirs IANA number in order of priority.

class P4G_TLS_CLOSE_NOTIFY[source]

Bases: object

Enable/Disable TLS sending close notify alert on connection tear-down.

class GetDataAttr[source]

Bases: ResponseBodyStruct

on_off

code byte, specifying whether to send close notify on connection tear down

class SetDataAttr[source]

Bases: RequestBodyStruct

on_off

code byte, specifying whether to send close notify on connection tear down

get()[source]

Get whether TLS sends close notify alert on connection tear-down.

Returns:

whether TLS sends close notify alert on connection tear-down.

Return type:

P4G_TLS_CLOSE_NOTIFY.GetDataAttr

set(on_off)[source]

Set whether TLS sends close notify alert on connection tear-down.

Parameters:

on_off (YesNo) – whether TLS sends close notify alert on connection tear-down.

set_no()

TLS does not send close notify alert on connection tear-down.

set_yes()

TLS sends close notify alert on connection tear-down.

class P4G_TLS_DHPARAMS_FILENAME[source]

Bases: object

Configure TLS DH parameters, if not set a default set will be used.

class SetDataAttr[source]

Bases: RequestBodyStruct

filename

string, the filename of the dhparams relative to the ftp tls folder

set(filename)[source]

Set TLS DH parameters.

Parameters:

filename (str) – the filename of the TLS DH parameters relative to the FTP TLS folder on the tester.

class P4G_TLS_ENABLE[source]

Bases: object

Enable/Disable TLS.

class GetDataAttr[source]

Bases: ResponseBodyStruct

on_off

code byte, specifying whether to enable TLS

class SetDataAttr[source]

Bases: RequestBodyStruct

on_off

code byte, specifying whether to enable TLS

get()[source]

Get whether TLS is enabled.

Returns:

whether TLS is enabled.

Return type:

P4G_TLS_ENABLE.GetDataAttr

set(on_off)[source]

Set whether TLS is enabled.

Parameters:

on_off (YesNo) – specifying whether to enable TLS

set_no()

Disable TLS.

set_yes()

Enable TLS.

class P4G_TLS_HANDSHAKE_HIST[source]

Bases: object

Returns a histogram over TLS connection handshake times, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.

class GetDataAttr[source]

Bases: ResponseBodyStruct

avg_connection_handshake_time

long integer, average connection handshake time in us.

bin_00

integer, number of connections with handshake time within the given interval.

bin_01

integer, number of connections with handshake time within the given interval.

bin_02

integer, number of connections with handshake time within the given interval.

bin_03

integer, number of connections with handshake time within the given interval.

bin_04

integer, number of connections with handshake time within the given interval.

bin_05

integer, number of connections with handshake time within the given interval.

bin_06

integer, number of connections with handshake time within the given interval.

bin_07

integer, number of connections with handshake time within the given interval.

bin_08

integer, number of connections with handshake time within the given interval.

bin_09

integer, number of connections with handshake time within the given interval.

bin_10

integer, number of connections with handshake time within the given interval.

bin_11

integer, number of connections with handshake time within the given interval.

bin_12

integer, number of connections with handshake time within the given interval.

bin_13

integer, number of connections with handshake time within the given interval.

bin_14

integer, number of connections with handshake time within the given interval.

bin_15

integer, number of connections with handshake time within the given interval.

bin_16

integer, number of connections with handshake time within the given interval.

bin_17

integer, number of connections with handshake time within the given interval.

bin_18

integer, number of connections with handshake time within the given interval.

bin_19

integer, number of connections with handshake time within the given interval.

bin_20

integer, number of connections with handshake time within the given interval.

bin_21

integer, number of connections with handshake time within the given interval.

bin_22

integer, number of connections with handshake time within the given interval.

bin_23

integer, number of connections with handshake time within the given interval.

bin_24

integer, number of connections with handshake time within the given interval.

bin_25

integer, number of connections with handshake time within the given interval.

bin_26

integer, number of connections with handshake time within the given interval.

bin_27

integer, number of connections with handshake time within the given interval.

bin_28

integer, number of connections with handshake time within the given interval.

bin_29

integer, number of connections with handshake time within the given interval.

bin_30

integer, number of connections with handshake time within the given interval.

bin_31

integer, number of connections with handshake time within the given interval.

connection_count

integer,number of connections established.

interval

long integer, histogram interval size in us

max_connection_handshake_time

long integer, maximum connection handshake time in us.

min_connection_handshake_time

long integer, minimum connection handshake time in us.

start

long integer, start value of first histogram interval in us

get()[source]

Get a histogram over TLS connection handshake times.

Returns:

a histogram over TLS connection handshake times

Return type:

P4G_TLS_HANDSHAKE_HIST.GetDataAttr

class P4G_TLS_MAX_RECORD_SIZE[source]

Bases: object

Configure the maximum outgoing TLS record size.

class GetDataAttr[source]

Bases: ResponseBodyStruct

size

integer, maximum outgoing record size in the interval ]0;16384], default value 8087.

class SetDataAttr[source]

Bases: RequestBodyStruct

size

integer, maximum outgoing record size in the interval ]0;16384], default value 8087.

get()[source]

Get the maximum outgoing TLS record size.

Returns:

the maximum outgoing TLS record size.

Return type:

P4G_TLS_MAX_RECORD_SIZE.GetDataAttr

set(size)[source]

Set the maximum outgoing TLS record size.

Parameters:

size (int) – maximum outgoing record size in the interval (0, 16384], default value 8087.

class P4G_TLS_MIN_REQ_PROTOCOL_VER[source]

Bases: object

Returns the minimum TLS protocol version required by the configured list of cipher suites. Each cipher suite has a minimum required TLS protocol version that will support the cipher suite. The minimum required TLS protocol version for a list of cipher suites is the lowest minimum required TLS protocol version of all the cipher suites in the list.

class GetDataAttr[source]

Bases: ResponseBodyStruct

tls_version

coded byte, minimum required TLS protocol version

get()[source]

Get the minimum TLS protocol version required by the configured list of cipher suites.

Returns:

the minimum TLS protocol version required by the configured list of cipher suites.

Return type:

P4G_TLS_MIN_REQ_PROTOCOL_VER.GetDataAttr

class P4G_TLS_PRIVATE_KEY_FILENAME[source]

Bases: object

Configure the private key matching the TLS certificate.

class SetDataAttr[source]

Bases: RequestBodyStruct

filename

string, the filename of the private key relative to the ftp tls folder

set(filename)[source]

Set the private key matching the TLS certificate.

Parameters:

filename (str) – the filename of the private key relative to the FTP TLS folder on the tester.

class P4G_TLS_PROTOCOL_VER[source]

Bases: object

Configures the desired TLS protocol version. More specifically the TLS version configured is the protocol version advertised by the client in the Client Hello message, and the highest TLS protocol version accepted by the server. If the protocol_version in the Client Hello message is higher than the highest protocol version accepted by the server, the TLS Handshake will fail.

class GetDataAttr[source]

Bases: ResponseBodyStruct

tls_version

coded byte, maximum supported TLS protocol version

class SetDataAttr[source]

Bases: RequestBodyStruct

tls_version

coded byte, maximum supported TLS protocol version

get()[source]

Get the highest supported TLS protocol version.

Returns:

the highest supported TLS protocol version

Return type:

P4G_TLS_PROTOCOL_VER.GetDataAttr

set(tls_version)[source]

Set the highest supported TLS protocol version.

Parameters:

tls_version (TLSVersion) – the highest supported TLS protocol version

set_sslv3()

The highest supported TLS protocol version is set to SSLv3.

set_tls10()

The highest supported TLS protocol version is set to TLS 1.0.

set_tls11()

The highest supported TLS protocol version is set to TLS 1.1.

set_tls12()

The highest supported TLS protocol version is set to TLS 1.2.

class P4G_TLS_RX_PAYLOAD_BYTES_HIST[source]

Bases: object

Returns a histogram over number of TLS Payload bytes received, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.

class GetDataAttr[source]

Bases: ResponseBodyStruct

avg_byte_count

long integer, average TLS Payload bytes received on a connection.

bin_00

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_01

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_02

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_03

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_04

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_05

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_06

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_07

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_08

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_09

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_10

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_11

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_12

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_13

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_14

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_15

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_16

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_17

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_18

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_19

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_20

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_21

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_22

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_23

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_24

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_25

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_26

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_27

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_28

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_29

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_30

integer, number of connections that has received TLS Payload bytes within the given interval.

bin_31

integer, number of connections that has received TLS Payload bytes within the given interval.

connection_count

integer,number of connections.

interval

long integer, histogram interval size in bytes

max_byte_count

long integer, maximum TLS Payload bytes received on a connection.

min_byte_count

long integer, minimum TLS Payload bytes received on a connection.

start

long integer, start value of first histogram interval in bytes

get()[source]

Get a histogram over number of TLS Payload bytes received.

Returns:

a histogram over number of TLS Payload bytes received

Return type:

P4G_TLS_RX_PAYLOAD_BYTES_HIST.GetDataAttr

class P4G_TLS_RX_PAYLOAD_COUNTERS[source]

Bases: object

Returns a list of the TLS Rx payload counters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

byte_count

long integer, number of TLS payload bytes received

byte_per_second

long integer, number of TLS payload bytes/second 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 a list of the TLS Rx payload counters.

Returns:

a list of the TLS Rx payload counters.

Return type:

P4G_TLS_RX_PAYLOAD_COUNTERS.GetDataAttr

class P4G_TLS_SERVER_NAME[source]

Bases: object

Configure the server name advertised by the client in the TLS SNI (Server Name Indication) extension. Both the client and server must be configured with the same server_name, as the server will check the server name in Client Hello message. If server name is not configured (or configured blank), the SNI extension will not be inserted in the Client Hello message.

class GetDataAttr[source]

Bases: ResponseBodyStruct

server_name

string, server name inserted in the SNI TLS extension

class SetDataAttr[source]

Bases: RequestBodyStruct

server_name

string, server name inserted in the SNI TLS extension

get()[source]

Get the server name advertised by the client in the TLS SNI.

Returns:

the server name advertised by the client in the TLS SNI

Return type:

P4G_TLS_SERVER_NAME.GetDataAttr

set(server_name)[source]

Set the server name advertised by the client in the TLS SNI.

Parameters:

server_name (str) – server name inserted in the SNI TLS extension

class P4G_TLS_STATE_CURRENT[source]

Bases: object

Returns a list of the current TLS state counters. The counters returned corresponds the the following TLS states:

  • TLS_INACTIVE

  • TLS_HANDSHAKING

  • TLS_HANDSHAKE_DONE

  • TLS_HANDSHAKE_FAILED

  • TLS_FAILED

  • TLS_INTERNAL_FAILED

  • TLS_CLOSE_NOTIFY

  • TLS_DONE

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)

tls_close_notify

long integer, the number of connections currently in this state

tls_done

long integer, the number of connections currently in this state

tls_failed

long integer, the number of connections currently in this state

tls_handshake_done

long integer, the number of connections currently in this state

tls_handshake_failed

long integer, the number of connections currently in this state

tls_handshaking

long integer, the number of connections currently in this state

tls_inactive

long integer, the number of connections currently in this state

tls_internal_failed

long integer, the number of connections currently in this state

get()[source]

Get a list of the current TLS state counters.

Returns:

a list of the current TLS state counters

Return type:

P4G_TLS_STATE_CURRENT.GetDataAttr

class P4G_TLS_STATE_RATE[source]

Bases: object

Returns a list of the TLS state rates measured in per second. The counters returned corresponds the the following TLS states:

  • TLS_INACTIVE

  • TLS_HANDSHAKING

  • TLS_HANDSHAKE_DONE

  • TLS_HANDSHAKE_FAILED

  • TLS_FAILED

  • TLS_INTERNAL_FAILED

  • TLS_CLOSE_NOTIFY

  • TLS_DONE

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)

tls_close_notify

long integer, the number of connections/second entering this state

tls_done

long integer, the number of connections/second entering this state

tls_failed

long integer, the number of connections/second entering this state

tls_handshake_done

long integer, the number of connections/second entering this state

tls_handshake_failed

long integer, the number of connections/second entering this state

tls_handshaking

long integer, the number of connections/second entering this state

tls_inactive

long integer, the number of connections/second entering this state

tls_internal_failed

long integer, the number of connections/second entering this state

get()[source]

Get a list of the TLS state rates measured in per second.

Returns:

a list of the TLS state rates measured in per second

Return type:

P4G_TLS_STATE_RATE.GetDataAttr

class P4G_TLS_STATE_TOTAL[source]

Bases: object

Returns a list of the total TLS state counters. The counters returned corresponds the the following TLS states:

  • TLS_INACTIVE

  • TLS_HANDSHAKING

  • TLS_HANDSHAKE_DONE

  • TLS_HANDSHAKE_FAILED

  • TLS_FAILED

  • TLS_INTERNAL_FAILED

  • TLS_CLOSE_NOTIFY

  • TLS_DONE

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)

tls_close_notify

long integer, the total number of connections that has entered this state

tls_done

long integer, the total number of connections that has entered this state

tls_failed

long integer, the total number of connections that has entered this state

tls_handshake_done

long integer, the total number of connections that has entered this state

tls_handshake_failed

long integer, the total number of connections that has entered this state

tls_handshaking

long integer, the total number of connections that has entered this state

tls_inactive

long integer, the total number of connections that has entered this state

tls_internal_failed

long integer, the total number of connections that has entered this state

get()[source]

Get a list of the total TLS state counters.

Returns:

a list of the total TLS state counters

Return type:

P4G_TLS_STATE_TOTAL.GetDataAttr

class P4G_TLS_TX_PAYLOAD_BYTES_HIST[source]

Bases: object

Returns a histogram over number of TLS Payload bytes transmitted, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.

class GetDataAttr[source]

Bases: ResponseBodyStruct

avg_byte_count

long integer, average TLS Payload bytes transmitted on a connection.

bin_00

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_01

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_02

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_03

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_04

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_05

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_06

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_07

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_08

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_09

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_10

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_11

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_12

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_13

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_14

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_15

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_16

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_17

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_18

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_19

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_20

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_21

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_22

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_23

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_24

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_25

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_26

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_27

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_28

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_29

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_30

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

bin_31

integer, number of connections that has transmitted TLS Payload bytes within the given interval.

connection_count

integer,number of connections.

interval

long integer, histogram interval size in bytes

max_byte_count

long integer, maximum TLS Payload bytes transmitted on a connection.

min_byte_count

long integer, minimum TLS Payload bytes transmitted on a connection.

start

long integer, start value of first histogram interval in bytes

get()[source]

Get a histogram over number of TLS Payload bytes transmitted.

Returns:

a histogram over number of TLS Payload bytes transmitted

Return type:

P4G_TLS_TX_PAYLOAD_BYTES_HIST.GetDataAttr

class P4G_TLS_TX_PAYLOAD_COUNTERS[source]

Bases: object

Returns a list of the TLS Tx payload counters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

byte_count

long integer, number of TLS payload bytes transmitted

byte_per_second

long integer, number of TLS payload bytes/second 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 a list of the TLS Tx payload counters.

Returns:

a list of the TLS Tx payload counters.

Return type:

P4G_TLS_TX_PAYLOAD_COUNTERS.GetDataAttr

class P4G_TRANSACTION_HIST_CONF[source]

Bases: object

Sets the start value and the interval size for the transaction histogram (P4G_APP_TRANSACTION_HIST`).

class GetDataAttr[source]

Bases: ResponseBodyStruct

interval

long integer, histogram interval size

start

long integer, start value of first histogram interval

class SetDataAttr[source]

Bases: RequestBodyStruct

interval

long integer, histogram interval size

start

long integer, start value of first histogram interval

get()[source]

Get the start value and the interval size for the transaction histogram.

Returns:

the start value and the interval size for the transaction histogram

Return type:

P4G_TRANSACTION_HIST_CONF.GetDataAttr

set(start, interval)[source]

Set the start value and the interval size for the transaction histogram.

Parameters:
  • start (int) – tart value of first histogram interval

  • interval (int) – histogram interval size

class P4G_UDP_PACKET_SIZE_MINMAX[source]

Bases: object

Configure the minimum and maximum values of the range for UDP packet size. Both values are included in the range. Relevant when P4G_UDP_PACKET_SIZE_TYPE is set to INCREMENT or RANDOM.

class GetDataAttr[source]

Bases: ResponseBodyStruct

size_max

integer, maximum value of UDP packet size

size_min

integer, minimum value of UDP packet size

class SetDataAttr[source]

Bases: RequestBodyStruct

size_max

integer, maximum value of UDP packet size

size_min

integer, minimum value of UDP packet size

get()[source]

Get the minimum and maximum values of the range for UDP packet size.

Returns:

the minimum and maximum values of the range for UDP packet size.

Return type:

P4G_UDP_PACKET_SIZE_MINMAX.GetDataAttr

set(size_min, size_max)[source]

Set the minimum and maximum values of the range for UDP packet size.

Parameters:
  • size_min (int) – the minimum value of UDP packet size

  • size_max (int) – the maximum value of UDP packet size

class P4G_UDP_PACKET_SIZE_TYPE[source]

Bases: object

Specifies the UDP packet size type for a Connection Group. The packet size can either be fixed size identical for all connections in the Connection Group, incrementing or random. The individual packet size for a specific connection is always constant once the incrementing or random value has been created. Refer to P4G_UDP_PACKET_SIZE_MINMAX` command for information on how to configure min and max values.

class GetDataAttr[source]

Bases: ResponseBodyStruct

packet_size_type

coded byte, specifying how UDP packet size is set

class SetDataAttr[source]

Bases: RequestBodyStruct

packet_size_type

coded byte, specifying how UDP packet size is set

get()[source]

Get the UDP packet size type for the Connection Group.

Returns:

the UDP packet size for the Connection Group.

Return type:

P4G_UDP_PACKET_SIZE_TYPE.GetDataAttr

set(packet_size_type)[source]

Set the UDP packet size type for the Connection Group.

Parameters:

packet_size_type (MSSType) – specifying how UDP packet size is set

set_fixed()

Use fixed value for UDP packet size.

set_increment()

Use incrementing value for UDP packet size.

set_random()

Use pseudorandom value for UDP packet size.

class P4G_UDP_PACKET_SIZE_VALUE[source]

Bases: object

Configure the fixed UDP packet size value. Relevant when P4G_UDP_PACKET_SIZE_TYPE is set to FIXED.

class GetDataAttr[source]

Bases: ResponseBodyStruct

size

integer, fixed value of UDP packet size

class SetDataAttr[source]

Bases: RequestBodyStruct

size

integer, fixed value of UDP packet size

get()[source]

Get the fixed UDP packet size value.

Returns:

the fixed UDP packet size value

Return type:

P4G_UDP_PACKET_SIZE_VALUE.GetDataAttr

set(size)[source]

Set the fixed UDP packet size value.

Parameters:

size (int) – the fixed value of UDP packet size

class P4G_UDP_RX_BYTES_HIST[source]

Bases: object

Returns a histogram over number of UDP bytes received, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.

class GetDataAttr[source]

Bases: ResponseBodyStruct

avg_byte_count

long integer, average UDP bytes received on a connection.

bin_00

integer, number of connections that has received UDP bytes within the given interval.

bin_01

integer, number of connections that has received UDP bytes within the given interval.

bin_02

integer, number of connections that has received UDP bytes within the given interval.

bin_03

integer, number of connections that has received UDP bytes within the given interval.

bin_04

integer, number of connections that has received UDP bytes within the given interval.

bin_05

integer, number of connections that has received UDP bytes within the given interval.

bin_06

integer, number of connections that has received UDP bytes within the given interval.

bin_07

integer, number of connections that has received UDP bytes within the given interval.

bin_08

integer, number of connections that has received UDP bytes within the given interval.

bin_09

integer, number of connections that has received UDP bytes within the given interval.

bin_10

integer, number of connections that has received UDP bytes within the given interval.

bin_11

integer, number of connections that has received UDP bytes within the given interval.

bin_12

integer, number of connections that has received UDP bytes within the given interval.

bin_13

integer, number of connections that has received UDP bytes within the given interval.

bin_14

integer, number of connections that has received UDP bytes within the given interval.

bin_15

integer, number of connections that has received UDP bytes within the given interval.

bin_16

integer, number of connections that has received UDP bytes within the given interval.

bin_17

integer, number of connections that has received UDP bytes within the given interval.

bin_18

integer, number of connections that has received UDP bytes within the given interval.

bin_19

integer, number of connections that has received UDP bytes within the given interval.

bin_20

integer, number of connections that has received UDP bytes within the given interval.

bin_21

integer, number of connections that has received UDP bytes within the given interval.

bin_22

integer, number of connections that has received UDP bytes within the given interval.

bin_23

integer, number of connections that has received UDP bytes within the given interval.

bin_24

integer, number of connections that has received UDP bytes within the given interval.

bin_25

integer, number of connections that has received UDP bytes within the given interval.

bin_26

integer, number of connections that has received UDP bytes within the given interval.

bin_27

integer, number of connections that has received UDP bytes within the given interval.

bin_28

integer, number of connections that has received UDP bytes within the given interval.

bin_29

integer, number of connections that has received UDP bytes within the given interval.

bin_30

integer, number of connections that has received UDP bytes within the given interval.

bin_31

integer, number of connections that has received UDP bytes within the given interval.

connection_count

integer,number of connections.

interval

long integer, histogram interval size in bytes

max_byte_count

long integer, maximum UDP bytes received on a connection.

min_byte_count

long integer, minimum UDP bytes received on a connection.

start

long integer, start value of first histogram interval in bytes

get()[source]

Get a histogram over number of UDP bytes received.

Returns:

a histogram over number of UDP bytes received

Return type:

P4G_UDP_RX_BYTES_HIST.GetDataAttr

class P4G_UDP_RX_PACKET_COUNTERS[source]

Bases: object

Returns a list of the UDP RX packet counters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

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

packet_count

long integer, number of UDP packets received

packet_per_second

long integer, number of UDP packets/second received

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get a list of the UDP RX packet counters.

Returns:

a list of the UDP RX packet counters.

Return type:

P4G_UDP_RX_PACKET_COUNTERS.GetDataAttr

class P4G_UDP_RX_PAYLOAD_COUNTERS[source]

Bases: object

Returns a list of the UDP RX payload counters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

byte_count

long integer, number of UDP payload bytes received

byte_per_second

long integer, number of UDP payload bytes/second 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 a list of the UDP RX payload counters.

Returns:

a list of the UDP RX payload counters.

Return type:

P4G_UDP_RX_PAYLOAD_COUNTERS.GetDataAttr

class P4G_UDP_STATE_CURRENT[source]

Bases: object

Returns a list of the current UDP state counters. The counters returned corresponds the the following UDP states:

  • CLOSED The connection structure has been created, but has not been ‘ramped up’ yet.

  • OPEN The connection has been ‘ramped up’, and is ready to transmit or receive data.

  • ACTIVE. The connection is actively transmitting data.

class GetDataAttr[source]

Bases: ResponseBodyStruct

active

long integer, the number of connections currently in this state

closed

long integer, the number of connections currently in this state

current_time

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

opened

long integer, the number of connections currently in this state

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get a list of the current UDP state counters.

Returns:

a list of the current UDP state counters

Return type:

P4G_UDP_STATE_CURRENT.GetDataAttr

class P4G_UDP_STATE_RATE[source]

Bases: object

Returns a list of the UDP state rates measured in connections/second. The counters returned corresponds the the following UDP state rates:

  • CLOSED The connection structure has been created, but has not been ‘ramped up’ yet.

  • OPEN The connection has been ‘ramped up’, and is ready to transmit or receive data

  • ACTIVE The connection is actively transmitting data.

class GetDataAttr[source]

Bases: ResponseBodyStruct

active

long integer, the number of connections/second entering this state

closed

long integer, the number of connections/second entering this state

current_time

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

open

long integer, the number of connections/second entering this state

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get a list of the UDP state rates measured in connections/second.

Returns:

a list of the UDP state rates measured in connections/second.

Return type:

P4G_UDP_STATE_RATE.GetDataAttr

class P4G_UDP_STATE_TOTAL[source]

Bases: object

Returns a list of the total UDP state counters. The counters returned corresponds the the following UDP states:

  • CLOSED The connection structure has been created, but has not been ‘ramped up’ yet.

  • OPEN The connection has been ‘ramped up’, and is ready to transmit or receive data.

  • ACTIVE The connection is actively transmitting data.

class GetDataAttr[source]

Bases: ResponseBodyStruct

active

long integer, the total number of connections that has entered this state

closed

long integer, the total number of connections that has entered this state

current_time

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

opened

long integer, the total number of connections that has entered this state

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get a list of the total UDP state counters.

Returns:

a list of the total UDP state counters.

Return type:

P4G_UDP_STATE_TOTAL.GetDataAttr

class P4G_UDP_TX_BYTES_HIST[source]

Bases: object

Returns a histogram over number of UDP bytes transmitted, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.

class GetDataAttr[source]

Bases: ResponseBodyStruct

avg_byte_count

long integer, average UDP bytes transmitted on a connection.

bin_00

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_01

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_02

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_03

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_04

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_05

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_06

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_07

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_08

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_09

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_10

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_11

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_12

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_13

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_14

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_15

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_16

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_17

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_18

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_19

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_20

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_21

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_22

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_23

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_24

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_25

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_26

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_27

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_28

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_29

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_30

integer, number of connections that has transmitted UDP bytes within the given interval.

bin_31

integer, number of connections that has transmitted UDP bytes within the given interval.

connection_count

integer,number of connections.

interval

long integer, histogram interval size in bytes

max_byte_count

long integer, maximum UDP bytes transmitted on a connection.

min_byte_count

long integer, minimum UDP bytes transmitted on a connection.

start

long integer, start value of first histogram interval in bytes

get()[source]

Get a histogram over number of UDP bytes transmitted.

Returns:

a histogram over number of UDP bytes transmitted

Return type:

P4G_UDP_TX_BYTES_HIST.GetDataAttr

class P4G_UDP_TX_PACKET_COUNTERS[source]

Bases: object

Returns a list of the UDP TX packet counters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

current_time

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

packet_count

long integer, number of UDP packets transmitted

packet_per_second

long integer, number of UDP packets/second transmitted

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

get()[source]

Get a list of the UDP TX packet counters.

Returns:

a list of the UDP TX packet counters.

Return type:

P4G_UDP_TX_PACKET_COUNTERS.GetDataAttr

class P4G_UDP_TX_PAYLOAD_COUNTERS[source]

Bases: object

Returns a list of the UDP TX payload counters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

byte_count

long integer, number of UDP payload bytes transmitted

byte_per_second

long integer, number of UDP payload bytes/second 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 a list of the UDP TX payload counters.

Returns:

a list of the UDP TX payload counters.

Return type:

P4G_UDP_TX_PAYLOAD_COUNTERS.GetDataAttr

class P4G_USER_STATE_CURRENT[source]

Bases: object

Returns a list of the current user state counters. A user is identified by a Client IP address. The counters returned corresponds the the following user states:

  • INIT The user has been created, but has no open connections yet.

  • ACTIVE The user has at least one open connection.

  • SUCCESS The user has successfully transmitted and received all payload.

  • FAILED The user has failed in transmitting or receiving all payload. STOPPED The user has been stopped due to ramp-down.

  • INACTIVE All the users connection is closed, but the user has not been destroyed yet.

class GetDataAttr[source]

Bases: ResponseBodyStruct

active

long integer, the number of users currently in this state

current_time

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

failed

long integer, the number of users currently in this state

inactive

long integer, the number of users currently in this state

init

long integer, the number of users currently in this state

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

stopped

long integer, the number of users currently in this state

success

long integer, the number of users currently in this state

get()[source]

Get a list of the current user state counters.

Returns:

a list of the current user state counters.

Return type:

P4G_USER_STATE_CURRENT.GetDataAttr

class P4G_USER_STATE_RATE[source]

Bases: object

Returns a list of the user state rates measured in users/second. A user is identified by a Client IP address. The counters returned corresponds the the following user states:

  • INIT The user has been created, but has no open connections yet.

  • ACTIVE The user has at least one open connection.

  • SUCCESS The user has successfully transmitted and received all payload.

  • FAILED The user has failed in transmitting or receiving all payload.

  • STOPPED The user has been stopped due to ramp-down.

  • INACTIVE All the users connection is closed, but the user has not been destroyed yet.

class GetDataAttr[source]

Bases: ResponseBodyStruct

active

long integer, the number of users/second entering this state

current_time

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

failed

long integer, the number of users/second entering this state

init

long integer, the number of users/second entering this state

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

stats

long integer, the number of users/second entering this state

stopped

long integer, the number of users/second entering this state

success

long integer, the number of users/second entering this state

get()[source]

Get a list of the user state rates measured in users/second.

Returns:

a list of the user state rates measured in users/second.

Return type:

P4G_USER_STATE_RATE.GetDataAttr

class P4G_USER_STATE_TOTAL[source]

Bases: object

Returns a list of the total user state counters. A user is identified by a Client IP address. The counters returned corresponds the the following user states:

  • INIT The user has been created, but has no open connections yet.

  • ACTIVE The user has at least one open connection.

  • SUCCESS The user has successfully transmitted and received all payload.

  • FAILED The user has failed in transmitting or receiving all payload.

  • STOPPED The user has been stopped due to ramp-down.

  • INACTIVE All the users connection is closed, but the user has not been destroyed yet.

class GetDataAttr[source]

Bases: ResponseBodyStruct

active

long integer, the total number of users that has entered this state

current_time

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

failed

long integer, the total number of users that has entered this state

inactive

long integer, the total number of users that has entered this state

init

long integer, the total number of users that has entered this state

ref_time

long integer, reference time (mSec for P4_TRAFFIC on)

stopped

long integer, the total number of users that has entered this state

success

long integer, the total number of users that has entered this state

get()[source]

Get a list of the total user state counters.

Returns:

a list of the total user state counters.

Return type:

P4G_USER_STATE_TOTAL.GetDataAttr

class P4G_VLAN_ENABLE[source]

Bases: object

Specify whether to insert a VLAN tag header upon transmit.

class GetDataAttr[source]

Bases: ResponseBodyStruct

on_off

coded byte, specifying whether to enable VLAN tag

class SetDataAttr[source]

Bases: RequestBodyStruct

on_off

coded byte, specifying whether to enable VLAN tag

get()[source]

Get whether to insert a VLAN tag header upon transmit.

Returns:

whether to insert a VLAN tag header upon transmit.

Return type:

P4G_VLAN_ENABLE.GetDataAttr

set(on_off)[source]

Set whether to insert a VLAN tag header upon transmit.

Parameters:

on_off (OnOff) – specifying whether to enable VLAN tag

set_off()

Disable VLAN tag insertion upon transmit.

set_on()

Enable VLAN tag insertion upon transmit.

class P4G_VLAN_TCI[source]

Bases: object

Specify the List of VLAN TCIs.

class GetDataAttr[source]

Bases: ResponseBodyStruct

class SetDataAttr[source]

Bases: RequestBodyStruct

get()[source]

Get the list of VLANs.

Returns:

the list of VLANs.

Return type:

P4G_VLAN_TCI.GetDataAttr

set(vlans)[source]
Set a list of VLANs.

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:

vlans (List[subtypes.VlanTag]) – specifying a list of VlanTag