p_macsec_commands module

This module contains the L23 port classes (MACsec) that deal with basic information about, and configuration of L23 test ports. The L23 port command names all have the form P_MACSEC_<xxx> and require a module index id and a port index id.

Port Commands - MACsec

Port Commands - MACsec

class P_MACSEC_RXSC_AN[source]

Bases: object

RX SC’s next AN

class GetDataAttr[source]

Bases: ResponseBodyStruct

next_an

integer, the next AN

get()[source]

Get RX SC’s next AN

Returns:

RX SC’s next AN

Return type:

P_MACSEC_RXSC_AN.GetDataAttr

class P_MACSEC_RXSC_CIPHERSUITE[source]

Bases: object

The cipher suite of the port’s RX SC.

class GetDataAttr[source]

Bases: ResponseBodyStruct

cipher_suite

coded byte, the cipher suite of the port’s RX SC.

class SetDataAttr[source]

Bases: RequestBodyStruct

cipher_suite

coded byte, the cipher suite of the port’s RX SC.

get()[source]

Get the cipher suite of the port’s RX SC.

Returns:

the cipher suite of the port’s RX SC.

Return type:

P_MACSEC_RXSC_CIPHERSUITE.GetDataAttr

set(cipher_suite)[source]

Set the cipher suite of the port’s RX SC.

Parameters:

cipher_suite (MACSecCipherSuite) – the cipher suite of the port’s RX SC.

set_gcm_aes_128()

Set cipher suite to GCM_AES_128.

set_gcm_aes_256()

Set cipher suite to GCM_AES_256.

set_gcm_aes_xpn_128()

Set cipher suite to GCM_AES_XPN_128.

set_gcm_aes_xpn_256()

Set cipher suite to GCM_AES_XPN_256.

class P_MACSEC_RXSC_CONF_OFFSET[source]

Bases: object

The confidentiality offset of the port’s RX SC.

class GetDataAttr[source]

Bases: ResponseBodyStruct

offset

integer, the RX Secure Channel (SC) offset. Allowed values are 0, 30, and 50.

class SetDataAttr[source]

Bases: RequestBodyStruct

offset

integer, the RX Secure Channel (SC) offset. Allowed values are 0, 30, and 50

get()[source]

Get the RX Secure Channel (SC) offset on the port.

Returns:

the RX Secure Channel (SC) offset on the port

Return type:

P_MACSEC_RXSC_CONF_OFFSET.GetDataAttr

set(offset)[source]

Set the RX Secure Channel (SC) offset on the port.

Parameters:

offset (int) – the RX Secure Channel (SC) offset

class P_MACSEC_RXSC_CREATE[source]

Bases: object

Create a RX Secure Channel (SC) on the port.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Create a RX Secure Channel (SC) on the port.

class P_MACSEC_RXSC_DELETE[source]

Bases: object

Delete a RX Secure Channel (SC) on the port.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Delete a RX Secure Channel (SC) on the port.

class P_MACSEC_RXSC_DESCR[source]

Bases: object

The description of the port’s RX SC.

class GetDataAttr[source]

Bases: ResponseBodyStruct

description

string, the description of the RX Secure Channel (SC).

class SetDataAttr[source]

Bases: RequestBodyStruct

description

string, the description of the RX Secure Channel (SC).

get()[source]

Get the description of the RX Secure Channel (SC) on the port.

Returns:

the description of the RX Secure Channel (SC) on the port

Return type:

P_MACSEC_RXSC_DESCR.GetDataAttr

set(description)[source]

Set the description of the RX Secure Channel (SC) on the port.

Parameters:

description (str) – the description of the RX Secure Channel (SC)

class P_MACSEC_RXSC_INDICES[source]

Bases: object

Create multiple RX SCs or query the existing RX SCs on the port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

rxsc_indices

list of integers, the sub-indices of RX SCs on the port.

class SetDataAttr[source]

Bases: RequestBodyStruct

rxsc_indices

list of integers, the sub-indices of RX SCs on the port.

get()[source]

Get the full list of which RX SCs are defined for a port.

Returns:

the sub-indices of RX SCs on the port

Return type:

P_MACSEC_RXSC_INDICES.GetDataAttr

set(rxsc_indices)[source]

Creates a new empty RX SC for each value that is not already in use, and deletes each RX SC that is not mentioned in the list.

Parameters:

rxsc_indices (List[int]) – the sub-indices of RX SCs on the port

class P_MACSEC_RXSC_LOWEST_PN[source]

Bases: object

The lowest PN number of the port’s RX SC expects to receive.

class GetDataAttr[source]

Bases: ResponseBodyStruct

lowest_pn

hex, The lowest PN number of the port’s RX SC expects to receive. Default to 1, maximum 2^64. Allowed to be 0.

class SetDataAttr[source]

Bases: RequestBodyStruct

lowest_pn

hex, The lowest PN number of the port’s RX SC expects to receive. Default to 1, maximum 2^64. Allowed to be 0.

get()[source]

Get the lowest PN number of the port’s RX SC expects to receive

Returns:

the lowest PN number of the port’s RX SC expects to receive

Return type:

P_MACSEC_RXSC_LOWEST_PN.GetDataAttr

set(lowest_pn)[source]

Set the lowest PN number of the port’s RX SC expects to receive

Parameters:

lowest_pn (int) – The lowest PN number of the port’s RX SC expects to receive. Default to 1, maximum 2^64.

class P_MACSEC_RXSC_NEXT_PN[source]

Bases: object

The next PN number of the port’s RX SC expects to receive.

class GetDataAttr[source]

Bases: ResponseBodyStruct

next_pn

hex, The next PN number of the port’s RX SC expects to receive. Default to 1, maximum 2^64. Allowed to be 0.

class SetDataAttr[source]

Bases: RequestBodyStruct

next_pn

hex, The next PN number of the port’s RX SC expects to receive. Default to 1, maximum 2^64. Allowed to be 0.

get()[source]

Get the next PN number of the port’s RX SC expects to receive

Returns:

the next PN number of the port’s RX SC expects to receive

Return type:

P_MACSEC_RXSC_NEXT_PN.GetDataAttr

set(value)[source]

Set the next PN number of the port’s RX SC expects to receive

Parameters:

value (int) – The next PN number of the port’s RX SC expects to receive. Default to 1, maximum 2^64.

class P_MACSEC_RXSC_PN[source]

Bases: object

RX SC’s next PN

class GetDataAttr[source]

Bases: ResponseBodyStruct

pn

hex, 8-byte long, the latest recovered PN for the Rx SC

get()[source]

Get RX SC’s next PN

Returns:

RX SC’s next PN

Return type:

P_MACSEC_RXSC_PN.GetDataAttr

class P_MACSEC_RXSC_SAK_VALUE[source]

Bases: object

Configure the value of a SAK key on the port’s RX SC.

class GetDataAttr[source]

Bases: ResponseBodyStruct

sak_key_value

integer, the SAK key. Default to all-zero. Allowed to be empty.

class SetDataAttr[source]

Bases: RequestBodyStruct

sak_key_value

integer, the SAK key. Default to all-zero. Allowed to be empty.

get()[source]

Get the SAK key.

Returns:

the the SAK key.

Return type:

P_MACSEC_RXSC_SAK_VALUE.GetDataAttr

set(sak_key_value)[source]

Set the SAK key.

Parameters:

sak_key_value (Hex) – the SAK key.

class P_MACSEC_RXSC_SCI[source]

Bases: object

The SCI of the port’s RX SC.

class GetDataAttr[source]

Bases: ResponseBodyStruct

sci

hex 8 bytes, the SCI of the port’s RX SC.

class SetDataAttr[source]

Bases: RequestBodyStruct

sci

hex 8 bytes, the SCI of the port’s RX SC.

get()[source]

Get the SCI of the port’s RX SC.

Returns:

the SCI of the port’s RX SC.

Return type:

P_MACSEC_RXSC_SCI.GetDataAttr

set(sci)[source]

Set the SCI of the port’s RX SC.

Parameters:

sci (int) – The SCI of the port’s RX SC.

class P_MACSEC_RXSC_STATS[source]

Bases: object

SC/stream-level MACsec RX counters

class GetDataAttr[source]

Bases: ResponseBodyStruct

bits_sec

long integer, number of MACsec L2 bits received of the previous second.

bytes_sec

long integer, number of MACsec L2 bytes received of the previous second.

frames_sec

long integer, number of MACsec frames received of the previous second.

total_bits

long integer, number of MACsec L2 bits received since last cleared.

total_bytes

long integer, number of MACsec L2 bytes received since last cleared.

total_delayed_frames

long integer, the number of frames with the PN lower than the minmum expected since cleared.

total_frames

long integer, number of MACsec frames received since last cleared.

total_icv_check_failed_frames

long integer, the number of frames with ICV check failed recevied since cleared.

total_ok_frames

long integer, the number of good MACsec frames received since cleared.

get()[source]

Get port-level MACsec RX counters

Returns:

port-level MACsec RX counters

Return type:

P_MACSEC_RX_STATS.GetDataAttr

class P_MACSEC_RXSC_TPLDID[source]

Bases: object

Associate a TPLD ID with the RX SC.

class GetDataAttr[source]

Bases: ResponseBodyStruct

tpld_id

integer, the TPLD ID to associate with the RX SC.

class SetDataAttr[source]

Bases: RequestBodyStruct

tpld_id

integer, the TPLD ID to associate with the RX SC.

get()[source]

Get the TPLD ID to associate with the RX SC.

Returns:

the TPLD ID to associate with the RX SC.

Return type:

P_MACSEC_RXSC_TPLDID.GetDataAttr

set(tpld_id)[source]

Set the TPLD ID to associate with the RX SC.

Parameters:

tpld_id (int) – the TPLD ID to associate with the RX SC.

class P_MACSEC_RXSC_XPN_SALT[source]

Bases: object

The XPN salt of the port’s RX SC when XPN cipher suite is in use.

class GetDataAttr[source]

Bases: ResponseBodyStruct

xpn_salt

hex 12 bytes, XPN salt of the port’s RX SC when XPN cipher suite is in use.

class SetDataAttr[source]

Bases: RequestBodyStruct

xpn_salt

hex 12 bytes, XPN salt of the port’s RX SC when XPN cipher suite is in use.

get()[source]

Get XPN salt of the port’s RX SC when XPN cipher suite is in use.

Returns:

the SCI of the port’s RX SC.

Return type:

P_MACSEC_TXSC_XPN_SALT.GetDataAttr

set(xpn_salt)[source]

Set XPN salt of the port’s RX SC when XPN cipher suite is in use.

Parameters:

xpn_salt (int) – XPN salt of the port’s RX SC when XPN cipher suite is in use.

class P_MACSEC_RXSC_XPN_SSCI[source]

Bases: object

The XPN Short SCI of the port’s RX SC when XPN cipher suite is in use.

class GetDataAttr[source]

Bases: ResponseBodyStruct

xpn_ssci

hex 4 bytes, The XPN Short SCI of the port’s RX SC when XPN cipher suite is in use

class SetDataAttr[source]

Bases: RequestBodyStruct

xpn_ssci

hex 4 bytes, The XPN Short SCI of the port’s RX SC when XPN cipher suite is in use

get()[source]

Get the XPN Short SCI of the port’s RX SC when XPN cipher suite is in use

Returns:

the SCI of the port’s RX SC.

Return type:

P_MACSEC_RXSC_XPN_SSCI.GetDataAttr

set(xpn_ssci)[source]

Set the XPN Short SCI of the port’s RX SC when XPN cipher suite is in use

Parameters:

xpn_ssci (int) – the XPN Short SCI of the port’s RX SC when XPN cipher suite is in use

class P_MACSEC_RX_CLEAR[source]

Bases: object

Clear the MACsec RX counters of the port.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Clear the MACsec RX counters of the port.

class P_MACSEC_RX_ENABLE[source]

Bases: object

This will enable/disable the MACSec functionality on the RX side. With it ON, the RX port will try to decode the received packets. If it is OFF, the port will not try to decode any received packets.

class GetDataAttr[source]

Bases: ResponseBodyStruct

on_off

coded byte, enable or disable MACsec on the RX port.

class SetDataAttr[source]

Bases: RequestBodyStruct

on_off

coded byte, enable or disable MACsec on the RX port.

get()[source]

Get the RX port MACSec state.

Returns:

the RX port MACSec stat

Return type:

PS_MACSEC_ENABLE.GetDataAttr

set(on_off)[source]

Set the RX port MACSec stat.

Parameters:

on_off (OnOff) – the RX port MACSec stat

set_off()

Disable the RX port MACSec.

set_on()

Enable the RX port MACSec.

class P_MACSEC_RX_STATS[source]

Bases: object

Port-level MACsec RX counters

class GetDataAttr[source]

Bases: ResponseBodyStruct

bits_sec

long integer, number of MACsec L2 bits received of the previous second.

bytes_sec

long integer, number of MACsec L2 bytes received of the previous second.

frames_sec

long integer, number of MACsec frames received of the previous second.

total_bits

long integer, number of MACsec L2 bits received since last cleared.

total_bytes

long integer, number of MACsec L2 bytes received since last cleared.

total_delayed_frames

long integer, the number of frames with the PN lower than the minmum expected since cleared.

total_frames

long integer, number of MACsec frames received since last cleared.

total_icv_check_failed_frames

long integer, the number of frames with ICV check failed recevied since cleared.

total_ok_frames

long integer, the number of good MACsec frames received since cleared.

get()[source]

Get port-level MACsec RX counters

Returns:

port-level MACsec RX counters

Return type:

P_MACSEC_RX_STATS.GetDataAttr

class P_MACSEC_TXSC_CIPHERSUITE[source]

Bases: object

The cipher suite of the port’s TX SC.

class GetDataAttr[source]

Bases: ResponseBodyStruct

cipher_suite

coded byte, the cipher suite of the port’s TX SC.

class SetDataAttr[source]

Bases: RequestBodyStruct

cipher_suite

coded byte, the cipher suite of the port’s TX SC.

get()[source]

Get the cipher suite of the port’s TX SC.

Returns:

the cipher suite of the port’s TX SC.

Return type:

P_MACSEC_TXSC_CIPHERSUITE.GetDataAttr

set(cipher_suite)[source]

Set the cipher suite of the port’s TX SC.

Parameters:

cipher_suite (MACSecCipherSuite) – the cipher suite of the port’s TX SC.

set_gcm_aes_128()

Set cipher suite to GCM_AES_128.

set_gcm_aes_256()

Set cipher suite to GCM_AES_256.

set_gcm_aes_xpn_128()

Set cipher suite to GCM_AES_XPN_128.

set_gcm_aes_xpn_256()

Set cipher suite to GCM_AES_XPN_256.

class P_MACSEC_TXSC_CONF_OFFSET[source]

Bases: object

The confidentiality offset of the port’s TX SC.

class GetDataAttr[source]

Bases: ResponseBodyStruct

offset

integer, the TX Secure Channel (SC) offset. Allowed values are 0, 30, and 50

class SetDataAttr[source]

Bases: RequestBodyStruct

offset

integer, the TX Secure Channel (SC) offset. Allowed values are 0, 30, and 50

get()[source]

Get the TX Secure Channel (SC) offset on the port.

Returns:

the TX Secure Channel (SC) offset on the port

Return type:

P_MACSEC_TXSC_CONF_OFFSET.GetDataAttr

set(offset)[source]

Set the TX Secure Channel (SC) offset on the port.

Parameters:

offset (int) – the TX Secure Channel (SC) offset

class P_MACSEC_TXSC_CREATE[source]

Bases: object

Create a TX Secure Channel (SC) on the port.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Create a TX Secure Channel (SC) on the port.

class P_MACSEC_TXSC_DELETE[source]

Bases: object

Delete a TX Secure Channel (SC) on the port.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Delete a TX Secure Channel (SC) on the port.

class P_MACSEC_TXSC_DESCR[source]

Bases: object

The description of the port’s TX SC.

class GetDataAttr[source]

Bases: ResponseBodyStruct

description

string, the description of the TX Secure Channel (SC).

class SetDataAttr[source]

Bases: RequestBodyStruct

description

string, the description of the TX Secure Channel (SC).

get()[source]

Get the description of the TX Secure Channel (SC) on the port.

Returns:

the description of the TX Secure Channel (SC) on the port

Return type:

P_MACSEC_TXSC_DESCR.GetDataAttr

set(description)[source]

Set the description of the TX Secure Channel (SC) on the port.

Parameters:

description (str) – the description of the TX Secure Channel (SC)

class P_MACSEC_TXSC_ENCRYPT[source]

Bases: object

The encryption mode of the port’s TX SC.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mode

byte, the encryption mode of the port’s TX SC

class SetDataAttr[source]

Bases: RequestBodyStruct

mode

byte, the encryption mode of the port’s TX SC

get()[source]

Get the encryption mode of the port’s TX SC

Returns:

the encryption mode of the port’s TX SC

Return type:

P_MACSEC_TXSC_ENCRYPT.GetDataAttr

set(mode)[source]

Set the encryption mode.

Parameters:

mode (MACSecEncryptionMode) – the encryption mode.

set_encrypt_integrity()

Set encryption mode to encryption and integrity.

set_integrity_only()

Set encryption mode to integrity only.

class P_MACSEC_TXSC_INDICES[source]

Bases: object

Create multiple TX SCs or query the existing TX SCs on the port.

class GetDataAttr[source]

Bases: ResponseBodyStruct

txsc_indices

list of integers, the sub-indices of TX SCs on the port.

class SetDataAttr[source]

Bases: RequestBodyStruct

txsc_indices

list of integers, the sub-indices of TX SCs on the port.

get()[source]

Get the full list of which TX SCs are defined for a port.

Returns:

the sub-indices of TX SCs on the port

Return type:

P_MACSEC_TXSC_INDICES.GetDataAttr

set(txsc_indices)[source]

Creates a new empty TX SC for each value that is not already in use, and deletes each TX SC that is not mentioned in the list.

Parameters:

txsc_indices (List[int]) – the sub-indices of TX SCs on the port

class P_MACSEC_TXSC_NEXT_AN[source]

Bases: object

The next AN number of the port’s TX SC expects to receive.

class GetDataAttr[source]

Bases: ResponseBodyStruct

next_an

integer, The next AN number of the port’s TX SC expects to receive. Allowed to be 0.

class SetDataAttr[source]

Bases: RequestBodyStruct

next_an

integer, The next AN number of the port’s TX SC expects to receive. Allowed to be 0.

get()[source]

Get the next AN number of the port’s TX SC expects to receive

Returns:

the next AN number of the port’s TX SC expects to receive

Return type:

P_MACSEC_TXSC_NEXT_AN.GetDataAttr

set(next_an)[source]

Set the next AN number of the port’s TX SC expects to receive

Parameters:

next_an (int) – The next AN number of the port’s TX SC expects to receive.

class P_MACSEC_TXSC_NEXT_PN[source]

Bases: object

The next PN number of the port’s TX SC expects to receive.

class GetDataAttr[source]

Bases: ResponseBodyStruct

next_pn

hex, The next PN number of the port’s TX SC expects to receive. Default to 1, maximum 2^64. Allowed to be 0.

class SetDataAttr[source]

Bases: RequestBodyStruct

next_pn

hex, The next PN number of the port’s TX SC expects to receive. Default to 1, maximum 2^64. Allowed to be 0.

get()[source]

Get the next PN number of the port’s TX SC expects to receive

NextPN is a monotonically incrementing 32 or 64 bit counter that is never zero.

Returns:

the next PN number of the port’s TX SC expects to receive

Return type:

P_MACSEC_TXSC_NEXT_PN.GetDataAttr

set(next_pn)[source]

Set the next PN number of the port’s TX SC expects to receive

NextPN is a monotonically incrementing 32 or 64 bit counter that is never zero.

Parameters:

next_pn (int) – The next PN number of the port’s TX SC expects to receive. Default to 1, maximum 2^64.

class P_MACSEC_TXSC_REKEY_MODE[source]

Bases: object

The rekey mode of the port’s TX SC defines when to switch to the next SAK.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mode

byte, the rekey mode of the port’s TX SC

value

integer, defines the packet number that triggers the rekey. This value will be ignored if the mode is set to PN_EXHAUSTION

class SetDataAttr[source]

Bases: RequestBodyStruct

mode

byte, the rekey mode of the port’s TX SC

value

integer, defines the packet number that triggers the rekey. This value will be ignored if the mode is set to PN_EXHAUSTION

get()[source]

Get the rekey mode of the port’s TX SC

Returns:

the rekey mode of the port’s TX SC

Return type:

P_MACSEC_TXSC_REKEY_MODE.GetDataAttr

set(mode, value)[source]

Set the rekey mode.

Parameters:

mode (MACSecRekeyMode) – the rekey mode.

class P_MACSEC_TXSC_SAK_VALUE[source]

Bases: object

Configure the value of a SAK key on the port’s TX SC.

class GetDataAttr[source]

Bases: ResponseBodyStruct

sak_key_value

integer, the SAK key. Default to all-zero. Allowed to be empty.

class SetDataAttr[source]

Bases: RequestBodyStruct

sak_key_value

integer, the SAK key. Default to all-zero. Allowed to be empty.

get()[source]

Get the SAK key.

Returns:

the the SAK key.

Return type:

P_MACSEC_TXSC_SAK_VALUE.GetDataAttr

set(sak_key_value)[source]

Set the SAK key.

Parameters:

sak_key_value (Hex) – the SAK key.

class P_MACSEC_TXSC_SCI[source]

Bases: object

The SCI of the port’s TX SC.

class GetDataAttr[source]

Bases: ResponseBodyStruct

sci

hex 8 bytes, the SCI of the port’s TX SC.

class SetDataAttr[source]

Bases: RequestBodyStruct

sci

hex 8 bytes, the SCI of the port’s TX SC.

get()[source]

Get the SCI of the port’s TX SC.

Returns:

the SCI of the port’s TX SC.

Return type:

P_MACSEC_TXSC_SCI.GetDataAttr

set(sci)[source]

Set the SCI of the port’s TX SC.

Parameters:

sci (int) – The SCI of the port’s TX SC.

class P_MACSEC_TXSC_SCI_MODE[source]

Bases: object

The mode of the port’s TX SCI in MACsec.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mode

coded byte, the mode of the port’s TX SCI in MACsec.

class SetDataAttr[source]

Bases: RequestBodyStruct

mode

coded byte, the mode of the port’s TX SCI in MACsec.

get()[source]

Get the mode of the port’s TX SCI in MACsec.

Returns:

the mode of the port’s TX SCI in MACsec.

Return type:

P_MACSEC_TXSC_SCI_MODE.GetDataAttr

set(mode)[source]

Set the mode of the port’s TX SCI in MACsec.

Parameters:

mode (MACSecSCIMode) – the mode of the port’s TX SCI in MACsec.

set_end_station()

Set SCI Mode to END STATION.

set_with_sci()

Set SCI Mode to WITH SCI.

class P_MACSEC_TXSC_STARTING_PN[source]

Bases: object

The starting PN number of the port’s TX SC uses.

class GetDataAttr[source]

Bases: ResponseBodyStruct

mode

byte, defining how to continue the TX PN after the start-traffic. Default to CONTINUOUS.

starting_pn

integer, the starting PN number. Default to 1, maximum 2^64. Allowed to be 0.

class SetDataAttr[source]

Bases: RequestBodyStruct

mode

byte, defining how to continue the TX PN after the start-traffic. Default to CONTINUOUS.

starting_pn

integer, the starting PN number. Default to 1, maximum 2^64. Allowed to be 0.

get()[source]

Get the starting PN number. Default to 1, maximum 2^64. Allowed to be 0.

Returns:

the starting PN number. Default to 1, maximum 2^64.

Return type:

P_MACSEC_TXSC_STARTING_PN.GetDataAttr

set(starting_pn, mode)[source]

Set the starting PN number. Default to 1, maximum 2^64. Allowed to be 0.

Parameters:
  • starting_pn (int) – the starting PN number. Default to 1, maximum 2^64.

  • mode (MACSecPNMode) – defining how to continue the TX PN after the start-traffic.

class P_MACSEC_TXSC_STATS[source]

Bases: object

SC/stream-level MACsec TX counters.

class GetDataAttr[source]

Bases: ResponseBodyStruct

bits_sec

long integer, the number of MACsec L2 bits transmitted of the previous second.

bytes_sec

long integer, the number of MACsec L2 bytes transmitted of the previous second.

frames_sec

long integer, the number of MACsec frames transmitted of the previous second.

total_bits

long integer, the number of MACsec L2 bits transmitted since last cleared.

total_bytes

long integer, the number of MACsec L2 bytes transmitted since last cleared.

total_encrypted_bits

long integer, the number of encrypted bits transmitted since cleared, excluding the bytes in the Confidentiality Offset.

total_encrypted_bytes

long integer, the number of encrypted bytes transmitted since cleared, excluding the bytes in the Confidentiality Offset.

total_frames

long integer, the number of MACsec frames transmitted since last cleared.

total_protected_only_bits

long integer, the number of protected-only (non-encrypted) bits transmitted since cleared.

total_protected_only_bytes

long integer, the number of protected-only (non-encrypted) bytes transmitted since cleared.

get()[source]

Get SC/stream-level MACsec TX counters.

Returns:

SC/stream-level MACsec TX counters.

Return type:

P_MACSEC_TXSC_STATS.GetDataAttr

class P_MACSEC_TXSC_XPN_SALT[source]

Bases: object

The XPN salt of the port’s TX SC when XPN cipher suite is in use.

class GetDataAttr[source]

Bases: ResponseBodyStruct

xpn_salt

hex 12 bytes, XPN salt of the port’s TX SC when XPN cipher suite is in use.

class SetDataAttr[source]

Bases: RequestBodyStruct

xpn_salt

hex 12 bytes, XPN salt of the port’s TX SC when XPN cipher suite is in use.

get()[source]

Get XPN salt of the port’s TX SC when XPN cipher suite is in use.

Returns:

the SCI of the port’s TX SC.

Return type:

P_MACSEC_TXSC_XPN_SALT.GetDataAttr

set(xpn_salt)[source]

Set XPN salt of the port’s TX SC when XPN cipher suite is in use.

Parameters:

xpn_salt (int) – XPN salt of the port’s TX SC when XPN cipher suite is in use.

class P_MACSEC_TXSC_XPN_SSCI[source]

Bases: object

The XPN Short SCI of the port’s TX SC when XPN cipher suite is in use.

class GetDataAttr[source]

Bases: ResponseBodyStruct

xpn_ssci

hex 4 bytes, The XPN Short SCI of the port’s TX SC when XPN cipher suite is in use

class SetDataAttr[source]

Bases: RequestBodyStruct

xpn_ssci

hex 4 bytes, The XPN Short SCI of the port’s TX SC when XPN cipher suite is in use

get()[source]

Get the XPN Short SCI of the port’s TX SC when XPN cipher suite is in use

Returns:

the SCI of the port’s TX SC.

Return type:

P_MACSEC_TXSC_XPN_SSCI.GetDataAttr

set(xpn_ssci)[source]

Set the XPN Short SCI of the port’s TX SC when XPN cipher suite is in use

Parameters:

xpn_ssci (int) – the XPN Short SCI of the port’s TX SC when XPN cipher suite is in use

class P_MACSEC_TX_CLEAR[source]

Bases: object

Clear the MACsec TX counters of the port.

class SetDataAttr[source]

Bases: RequestBodyStruct

set()[source]

Clear the MACsec TX counters of the port.

class P_MACSEC_TX_STATS[source]

Bases: object

Port-level MACsec TX counters

class GetDataAttr[source]

Bases: ResponseBodyStruct

bits_sec

long integer, the number of MACsec L2 bits transmitted of the previous second.

bytes_sec

long integer, the number of MACsec L2 bytes transmitted of the previous second.

frames_sec

long integer, the number of MACsec frames transmitted of the previous second.

total_bits

long integer, the number of MACsec L2 bits transmitted since last cleared.

total_bytes

long integer, the number of MACsec L2 bytes transmitted since last cleared.

total_encrypted_bits

long integer, the number of encrypted bits transmitted by the port since cleared, excluding the bytes in the Confidentiality Offset.

total_encrypted_bytes

long integer, the number of encrypted bytes transmitted by the port since cleared, excluding the bytes in the Confidentiality Offset.

total_frames

long integer, the number of MACsec frames transmitted since last cleared.

total_protected_only_bits

long integer, the number of protected-only (non-encrypted) bits transmitted by the port since cleared.

total_protected_only_bytes

long integer, the number of protected-only (non-encrypted) bytes transmitted by the port since cleared.

get()[source]

Get port-level MACsec TX counters

Returns:

port-level MACsec TX counters

Return type:

P_MACSEC_TX_STATS.GetDataAttr