MACsec Intel® FPGA System Design User Guide

ID 767516
Date 3/31/2024
Public
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.