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:
objectRX SC’s next AN
- class P_MACSEC_RXSC_CIPHERSUITE[source]
Bases:
objectThe 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:
- 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:
objectThe 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
- class P_MACSEC_RXSC_DESCR[source]
Bases:
objectThe 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).
- class P_MACSEC_RXSC_INDICES[source]
Bases:
objectCreate 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.
- class P_MACSEC_RXSC_LOWEST_PN[source]
Bases:
objectThe 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.
- class P_MACSEC_RXSC_NEXT_PN[source]
Bases:
objectThe 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.
- class P_MACSEC_RXSC_PN[source]
Bases:
objectRX SC’s next PN
- class GetDataAttr[source]
Bases:
ResponseBodyStruct- pn
hex, 8-byte long, the latest recovered PN for the Rx SC
- class P_MACSEC_RXSC_SAK_VALUE[source]
Bases:
objectConfigure 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.
- class P_MACSEC_RXSC_SCI[source]
Bases:
objectThe SCI of the port’s RX SC.
- class P_MACSEC_RXSC_STATS[source]
Bases:
objectSC/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.
- class P_MACSEC_RXSC_TPLDID[source]
Bases:
objectAssociate 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.
- class P_MACSEC_RXSC_XPN_SALT[source]
Bases:
objectThe 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.
- class P_MACSEC_RXSC_XPN_SSCI[source]
Bases:
objectThe 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
- class P_MACSEC_RX_ENABLE[source]
Bases:
objectThis 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.
- 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:
objectPort-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.
- class P_MACSEC_TXSC_CIPHERSUITE[source]
Bases:
objectThe 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:
- 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:
objectThe 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
- class P_MACSEC_TXSC_DESCR[source]
Bases:
objectThe 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).
- class P_MACSEC_TXSC_ENCRYPT[source]
Bases:
objectThe 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:
- 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:
objectCreate 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.
- class P_MACSEC_TXSC_NEXT_AN[source]
Bases:
objectThe 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.
- class P_MACSEC_TXSC_NEXT_PN[source]
Bases:
objectThe 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.
- class P_MACSEC_TXSC_REKEY_MODE[source]
Bases:
objectThe 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:
- set(mode, value)[source]
Set the rekey mode.
- Parameters:
mode (MACSecRekeyMode) – the rekey mode.
- class P_MACSEC_TXSC_SAK_VALUE[source]
Bases:
objectConfigure 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.
- class P_MACSEC_TXSC_SCI[source]
Bases:
objectThe SCI of the port’s TX SC.
- class P_MACSEC_TXSC_SCI_MODE[source]
Bases:
objectThe 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:
- 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:
objectThe 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:
- 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:
objectSC/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.
- class P_MACSEC_TXSC_XPN_SALT[source]
Bases:
objectThe 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.
- class P_MACSEC_TXSC_XPN_SSCI[source]
Bases:
objectThe 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
- class P_MACSEC_TX_STATS[source]
Bases:
objectPort-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.