MACsec Intel FPGA System Design User Guide

ID 767516
Date 3/03/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

6.6.11. macsec_crypto_mode

macsec_crypto_mode

Synopsis
int macsec_crypto_mode(int port, int crypto_mode)
Description

Sets the encryption and decryption to transmit and receive port resp.

Arguments

port—physical port.

crypto_mode—
  • if crypto_mode is ENCRYPT_DECRYPT, set both TX/RX ports.
  • if crypto_mode is ENCRYPT_ONLY, set to only TX port.
  • if crypto_mode is DECRYPT_ONLY, set to only RX port.
Returns

MACSEC_OK if successful.

MACSEC_ERR_INVALID_PORT if port is not valid.

MACSEC_ERR_INVALID_CRYPTO_MODE if crypto_mode is not invalid.