Path: blob/main/sys/contrib/ncsw/inc/Peripherals/fm_macsec_ext.h
48375 views
/*1* Copyright 2008-2015 Freescale Semiconductor Inc.2*3* Redistribution and use in source and binary forms, with or without4* modification, are permitted provided that the following conditions are met:5* * Redistributions of source code must retain the above copyright6* notice, this list of conditions and the following disclaimer.7* * Redistributions in binary form must reproduce the above copyright8* notice, this list of conditions and the following disclaimer in the9* documentation and/or other materials provided with the distribution.10* * Neither the name of Freescale Semiconductor nor the11* names of its contributors may be used to endorse or promote products12* derived from this software without specific prior written permission.13*14*15* ALTERNATIVELY, this software may be distributed under the terms of the16* GNU General Public License ("GPL") as published by the Free Software17* Foundation, either version 2 of that License or (at your option) any18* later version.19*20* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY21* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED22* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE23* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY24* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES25* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;26* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND27* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT28* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS29* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.30*/3132/**************************************************************************//**33@File fm_macsec_ext.h3435@Description FM MACSEC ...36*//***************************************************************************/37#ifndef __FM_MACSEC_EXT_H38#define __FM_MACSEC_EXT_H3940#include "std_ext.h"414243/**************************************************************************//**44@Group FM_grp Frame Manager API4546@Description FM API functions, definitions and enums4748@{49*//***************************************************************************/5051/**************************************************************************//**52@Group FM_MACSEC_grp FM MACSEC5354@Description FM MACSEC API functions, definitions and enums5556@{57*//***************************************************************************/5859/**************************************************************************//**60@Description MACSEC Exceptions61*//***************************************************************************/62typedef enum e_FmMacsecExceptions {63e_FM_MACSEC_EX_SINGLE_BIT_ECC, /**< Single bit ECC error */64e_FM_MACSEC_EX_MULTI_BIT_ECC /**< Multi bit ECC error */65} e_FmMacsecExceptions;666768/**************************************************************************//**69@Group FM_MACSEC_init_grp FM-MACSEC Initialization Unit7071@Description FM MACSEC Initialization Unit7273@{74*//***************************************************************************/7576/**************************************************************************//**77@Function t_FmMacsecExceptionsCallback7879@Description Exceptions user callback routine, will be called upon an80exception passing the exception identification.8182@Param[in] h_App A handle to an application layer object; This handle83will be passed by the driver upon calling this callback.84@Param[in] exception The exception.85*//***************************************************************************/86typedef void (t_FmMacsecExceptionsCallback) ( t_Handle h_App,87e_FmMacsecExceptions exception);888990/**************************************************************************//**91@Description FM MACSEC config input92*//***************************************************************************/93typedef struct t_FmMacsecParams {94t_Handle h_Fm; /**< A handle to the FM object related to */95bool guestMode; /**< Partition-id */96union {97struct {98uint8_t fmMacId; /**< FM MAC id */99} guestParams;100101struct {102uintptr_t baseAddr; /**< Base of memory mapped FM MACSEC registers */103t_Handle h_FmMac; /**< A handle to the FM MAC object related to */104t_FmMacsecExceptionsCallback *f_Exception; /**< Exception Callback Routine */105t_Handle h_App; /**< A handle to an application layer object; This handle will106be passed by the driver upon calling the above callbacks */107} nonGuestParams;108};109} t_FmMacsecParams;110111/**************************************************************************//**112@Function FM_MACSEC_Config113114@Description Creates descriptor for the FM MACSEC module;115116The routine returns a handle (descriptor) to the FM MACSEC object;117This descriptor must be passed as first parameter to all other118FM MACSEC function calls;119120No actual initialization or configuration of FM MACSEC hardware is121done by this routine.122123@Param[in] p_FmMacsecParam Pointer to data structure of parameters.124125@Retval Handle to FM MACSEC object, or NULL for Failure.126*//***************************************************************************/127t_Handle FM_MACSEC_Config(t_FmMacsecParams *p_FmMacsecParam);128129/**************************************************************************//**130@Function FM_MACSEC_Init131132@Description Initializes the FM MACSEC module.133134@Param[in] h_FmMacsec FM MACSEC module descriptor.135136@Return E_OK on success; Error code otherwise.137*//***************************************************************************/138t_Error FM_MACSEC_Init(t_Handle h_FmMacsec);139140/**************************************************************************//**141@Function FM_MACSEC_Free142143@Description Frees all resources that were assigned to FM MACSEC module;144145Calling this routine invalidates the descriptor.146147@Param[in] h_FmMacsec FM MACSEC module descriptor.148149@Return E_OK on success; Error code otherwise.150*//***************************************************************************/151t_Error FM_MACSEC_Free(t_Handle h_FmMacsec);152153154/**************************************************************************//**155@Group FM_MACSEC_advanced_init_grp FM-MACSEC Advanced Configuration Unit156157@Description Configuration functions used to change default values.158159@{160*//***************************************************************************/161162/**************************************************************************//**163@Description enum for unknown sci frame treatment164*//***************************************************************************/165typedef enum e_FmMacsecUnknownSciFrameTreatment {166e_FM_MACSEC_UNKNOWN_SCI_FRAME_TREATMENT_DISCARD_BOTH = 0, /**< Controlled port - Strict mode */167e_FM_MACSEC_UNKNOWN_SCI_FRAME_TREATMENT_DISCARD_UNCONTROLLED_DELIVER_OR_DISCARD_CONTROLLED, /**< If C bit clear deliver on controlled port, else discard168Controlled port - Check or Disable mode */169e_FM_MACSEC_UNKNOWN_SCI_FRAME_TREATMENT_DELIVER_UNCONTROLLED_DISCARD_CONTROLLED, /**< Controlled port - Strict mode */170e_FM_MACSEC_UNKNOWN_SCI_FRAME_TREATMENT_DELIVER_OR_DISCARD_UNCONTROLLED_DELIVER_OR_DISCARD_CONTROLLED /**< If C bit set deliver on uncontrolled port and discard on controlled port,171else discard on uncontrolled port and deliver on controlled port172Controlled port - Check or Disable mode */173} e_FmMacsecUnknownSciFrameTreatment;174175/**************************************************************************//**176@Description enum for untag frame treatment177*//***************************************************************************/178typedef enum e_FmMacsecUntagFrameTreatment {179e_FM_MACSEC_UNTAG_FRAME_TREATMENT_DELIVER_UNCONTROLLED_DISCARD_CONTROLLED = 0, /**< Controlled port - Strict mode */180e_FM_MACSEC_UNTAG_FRAME_TREATMENT_DISCARD_BOTH, /**< Controlled port - Strict mode */181e_FM_MACSEC_UNTAG_FRAME_TREATMENT_DISCARD_UNCONTROLLED_DELIVER_CONTROLLED_UNMODIFIED /**< Controlled port - Strict mode */182} e_FmMacsecUntagFrameTreatment;183184/**************************************************************************//**185@Function FM_MACSEC_ConfigUnknownSciFrameTreatment186187@Description Change the treatment for received frames with unknown sci from its default188configuration [DEFAULT_unknownSciFrameTreatment].189190@Param[in] h_FmMacsec FM MACSEC module descriptor.191@Param[in] treatMode The selected mode.192193@Return E_OK on success; Error code otherwise.194195@Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init().196*//***************************************************************************/197t_Error FM_MACSEC_ConfigUnknownSciFrameTreatment(t_Handle h_FmMacsec, e_FmMacsecUnknownSciFrameTreatment treatMode);198199/**************************************************************************//**200@Function FM_MACSEC_ConfigInvalidTagsFrameTreatment201202@Description Change the treatment for received frames with invalid tags or203a zero value PN or an invalid ICV from its default configuration204[DEFAULT_invalidTagsFrameTreatment].205206@Param[in] h_FmMacsec FM MACSEC module descriptor.207@Param[in] deliverUncontrolled If True deliver on the uncontrolled port, else discard;208In both cases discard on the controlled port;209this provide Strict, Check or Disable mode.210211@Return E_OK on success; Error code otherwise.212213@Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init().214*//***************************************************************************/215t_Error FM_MACSEC_ConfigInvalidTagsFrameTreatment(t_Handle h_FmMacsec, bool deliverUncontrolled);216217/**************************************************************************//**218@Function FM_MACSEC_ConfigEncryptWithNoChangedTextFrameTreatment219220@Description Change the treatment for received frames with the Encryption bit221set and the Changed Text bit clear from its default configuration222[DEFAULT_encryptWithNoChangedTextFrameTreatment].223224@Param[in] h_FmMacsec FM MACSEC module descriptor.225@Param[in] discardUncontrolled If True discard on the uncontrolled port, else deliver;226In both cases discard on the controlled port;227this provide Strict, Check or Disable mode.228229@Return E_OK on success; Error code otherwise.230231@Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init().232*//***************************************************************************/233t_Error FM_MACSEC_ConfigEncryptWithNoChangedTextFrameTreatment(t_Handle h_FmMacsec, bool discardUncontrolled);234235/**************************************************************************//**236@Function FM_MACSEC_ConfigChangedTextWithNoEncryptFrameTreatment237238@Description Change the treatment for received frames with the Encryption bit239clear and the Changed Text bit set from its default configuration240[DEFAULT_changedTextWithNoEncryptFrameTreatment].241242@Param[in] h_FmMacsec FM MACSEC module descriptor.243@Param[in] deliverUncontrolled If True deliver on the uncontrolled port, else discard;244In both cases discard on the controlled port;245this provide Strict, Check or Disable mode.246247@Return E_OK on success; Error code otherwise.248249@Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init().250*//***************************************************************************/251t_Error FM_MACSEC_ConfigChangedTextWithNoEncryptFrameTreatment(t_Handle h_FmMacsec, bool deliverUncontrolled);252253/**************************************************************************//**254@Function FM_MACSEC_ConfigUntagFrameTreatment255256@Description Change the treatment for received frames without the MAC security tag (SecTAG)257from its default configuration [DEFAULT_untagFrameTreatment].258259@Param[in] h_FmMacsec FM MACSEC module descriptor.260@Param[in] treatMode The selected mode.261262@Return E_OK on success; Error code otherwise.263264@Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init().265*//***************************************************************************/266t_Error FM_MACSEC_ConfigUntagFrameTreatment(t_Handle h_FmMacsec, e_FmMacsecUntagFrameTreatment treatMode);267268/**************************************************************************//**269@Function FM_MACSEC_ConfigOnlyScbIsSetFrameTreatment270271@Description Change the treatment for received frames with only SCB bit set272from its default configuration [DEFAULT_onlyScbIsSetFrameTreatment].273274@Param[in] h_FmMacsec FM MACSEC module descriptor.275@Param[in] deliverUncontrolled If True deliver on the uncontrolled port, else discard;276In both cases discard on the controlled port;277this provide Strict, Check or Disable mode.278279@Return E_OK on success; Error code otherwise.280281@Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init().282*//***************************************************************************/283t_Error FM_MACSEC_ConfigOnlyScbIsSetFrameTreatment(t_Handle h_FmMacsec, bool deliverUncontrolled);284285/**************************************************************************//**286@Function FM_MACSEC_ConfigPnExhaustionThreshold287288@Description It's provide the ability to configure a PN exhaustion threshold;289When the NextPn crosses this value an interrupt event290is asserted to warn that the active SA should re-key.291292@Param[in] h_FmMacsec FM MACSEC module descriptor.293@Param[in] pnExhThr If the threshold is reached, an interrupt event294is asserted to re-key.295296@Return E_OK on success; Error code otherwise.297298@Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init().299*//***************************************************************************/300t_Error FM_MACSEC_ConfigPnExhaustionThreshold(t_Handle h_FmMacsec, uint32_t pnExhThr);301302/**************************************************************************//**303@Function FM_MACSEC_ConfigKeysUnreadable304305@Description Turn on privacy mode; All the keys and their hash values can't be read any more;306Can not be cleared unless hard reset.307308@Param[in] h_FmMacsec FM MACSEC module descriptor.309310@Return E_OK on success; Error code otherwise.311312@Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init().313*//***************************************************************************/314t_Error FM_MACSEC_ConfigKeysUnreadable(t_Handle h_FmMacsec);315316/**************************************************************************//**317@Function FM_MACSEC_ConfigSectagWithoutSCI318319@Description Promise that all generated Sectag will be without SCI included.320321@Param[in] h_FmMacsec FM MACSEC module descriptor.322323@Return E_OK on success; Error code otherwise.324325@Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init().326*//***************************************************************************/327t_Error FM_MACSEC_ConfigSectagWithoutSCI(t_Handle h_FmMacsec);328329/**************************************************************************//**330@Function FM_MACSEC_ConfigException331332@Description Calling this routine changes the internal driver data base333from its default selection of exceptions enablement;334By default all exceptions are enabled.335336@Param[in] h_FmMacsec FM MACSEC module descriptor.337@Param[in] exception The exception to be selected.338@Param[in] enable TRUE to enable interrupt, FALSE to mask it.339340@Return E_OK on success; Error code otherwise.341342@Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init().343*//***************************************************************************/344t_Error FM_MACSEC_ConfigException(t_Handle h_FmMacsec, e_FmMacsecExceptions exception, bool enable);345346/** @} */ /* end of FM_MACSEC_advanced_init_grp group */347/** @} */ /* end of FM_MACSEC_init_grp group */348349350/**************************************************************************//**351@Group FM_MACSEC_runtime_control_grp FM-MACSEC Runtime Control Data Unit352353@Description FM MACSEC runtime control data unit API functions, definitions and enums.354355@{356*//***************************************************************************/357358/**************************************************************************//**359@Function FM_MACSEC_GetRevision360361@Description Return MACSEC HW chip revision362363@Param[in] h_FmMacsec FM MACSEC module descriptor.364@Param[out] p_MacsecRevision MACSEC revision as defined by the chip.365366@Return E_OK on success; Error code otherwise.367368@Cautions Allowed only after FM_MACSEC_Init().369*//***************************************************************************/370t_Error FM_MACSEC_GetRevision(t_Handle h_FmMacsec, uint32_t *p_MacsecRevision);371372/**************************************************************************//**373@Function FM_MACSEC_Enable374375@Description This routine should be called after MACSEC is initialized for enabling all376MACSEC engines according to their existing configuration.377378@Param[in] h_FmMacsec FM MACSEC module descriptor.379380@Return E_OK on success; Error code otherwise.381382@Cautions Allowed only following FM_MACSEC_Init() and when MACSEC is disabled.383*//***************************************************************************/384t_Error FM_MACSEC_Enable(t_Handle h_FmMacsec);385386/**************************************************************************//**387@Function FM_MACSEC_Disable388389@Description This routine may be called when MACSEC is enabled in order to390disable all MACSEC engines; The MACSEC is working in bypass mode.391392@Param[in] h_FmMacsec FM MACSEC module descriptor.393394@Return E_OK on success; Error code otherwise.395396@Cautions Allowed only following FM_MACSEC_Init() and when MACSEC is enabled.397*//***************************************************************************/398t_Error FM_MACSEC_Disable(t_Handle h_FmMacsec);399400/**************************************************************************//**401@Function FM_MACSEC_SetException402403@Description Calling this routine enables/disables the specified exception.404405@Param[in] h_FmMacsec FM MACSEC module descriptor.406@Param[in] exception The exception to be selected.407@Param[in] enable TRUE to enable interrupt, FALSE to mask it.408409@Return E_OK on success; Error code otherwise.410411@Cautions Allowed only following FM_MACSEC_Init().412*//***************************************************************************/413t_Error FM_MACSEC_SetException(t_Handle h_FmMacsec, e_FmMacsecExceptions exception, bool enable);414415#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))416/**************************************************************************//**417@Function FM_MACSEC_DumpRegs418419@Description Dump internal registers.420421@Param[in] h_FmMacsec - FM MACSEC module descriptor.422423@Return E_OK on success; Error code otherwise.424425@Cautions Allowed only after FM_MACSEC_Init().426*//***************************************************************************/427t_Error FM_MACSEC_DumpRegs(t_Handle h_FmMacsec);428#endif /* (defined(DEBUG_ERRORS) && ... */429430#ifdef VERIFICATION_SUPPORT431/********************* VERIFICATION ONLY ********************************/432/**************************************************************************//**433@Function FM_MACSEC_BackdoorSet434435@Description Set register of the MACSEC memory map436437@Param[in] h_FmMacsec FM MACSEC module descriptor.438@Param[out] offset Register offset.439@Param[out] value Value to write.440441442@Return None443444@Cautions Allowed only following FM_MACSEC_Init().445*//***************************************************************************/446t_Error FM_MACSEC_BackdoorSet(t_Handle h_FmMacsec, uint32_t offset, uint32_t value);447448/**************************************************************************//**449@Function FM_MACSEC_BackdoorGet450451@Description Read from register of the MACSEC memory map.452453@Param[in] h_FmMacsec FM MACSEC module descriptor.454@Param[out] offset Register offset.455456@Return Value read457458@Cautions Allowed only following FM_MACSEC_Init().459*//***************************************************************************/460uint32_t FM_MACSEC_BackdoorGet(t_Handle h_FmMacsec, uint32_t offset);461#endif /* VERIFICATION_SUPPORT */462463/** @} */ /* end of FM_MACSEC_runtime_control_grp group */464465466/**************************************************************************//**467@Group FM_MACSEC_SECY_grp FM-MACSEC SecY468469@Description FM-MACSEC SecY API functions, definitions and enums470471@{472*//***************************************************************************/473474typedef uint8_t macsecSAKey_t[32];475typedef uint64_t macsecSCI_t;476typedef uint8_t macsecAN_t;477478/**************************************************************************//**479@Description MACSEC SECY Cipher Suite480*//***************************************************************************/481typedef enum e_FmMacsecSecYCipherSuite {482e_FM_MACSEC_SECY_GCM_AES_128 = 0, /**< GCM-AES-128 */483#if (DPAA_VERSION >= 11)484e_FM_MACSEC_SECY_GCM_AES_256 /**< GCM-AES-256 */485#endif /* (DPAA_VERSION >= 11) */486} e_FmMacsecSecYCipherSuite;487488/**************************************************************************//**489@Description MACSEC SECY Exceptions490*//***************************************************************************/491typedef enum e_FmMacsecSecYExceptions {492e_FM_MACSEC_SECY_EX_FRAME_DISCARDED /**< Frame Discarded */493} e_FmMacsecSecYExceptions;494495/**************************************************************************//**496@Description MACSEC SECY Events497*//***************************************************************************/498typedef enum e_FmMacsecSecYEvents {499e_FM_MACSEC_SECY_EV_NEXT_PN /**< Next Packet Number exhaustion threshold reached */500} e_FmMacsecSecYEvents;501502/**************************************************************************//**503@Collection MACSEC SECY Frame Discarded Descriptor error504*//***************************************************************************/505typedef uint8_t macsecTxScFrameDiscardedErrSelect_t; /**< typedef for defining Frame Discarded Descriptor errors */506507#define FM_MACSEC_SECY_TX_SC_FRM_DISCAR_ERR_NEXT_PN_ZERO 0x8000 /**< NextPn == 0 */508#define FM_MACSEC_SECY_TX_SC_FRM_DISCAR_ERR_SC_DISBALE 0x4000 /**< SC is disable */509/* @} */510511/**************************************************************************//**512@Function t_FmMacsecSecYExceptionsCallback513514@Description Exceptions user callback routine, will be called upon an515exception passing the exception identification.516517@Param[in] h_App A handle to an application layer object; This handle518will be passed by the driver upon calling this callback.519@Param[in] exception The exception.520*//***************************************************************************/521typedef void (t_FmMacsecSecYExceptionsCallback) ( t_Handle h_App,522e_FmMacsecSecYExceptions exception);523524/**************************************************************************//**525@Function t_FmMacsecSecYEventsCallback526527@Description Events user callback routine, will be called upon an528event passing the event identification.529530@Param[in] h_App A handle to an application layer object; This handle531will be passed by the driver upon calling this callback.532@Param[in] event The event.533*//***************************************************************************/534typedef void (t_FmMacsecSecYEventsCallback) ( t_Handle h_App,535e_FmMacsecSecYEvents event);536537/**************************************************************************//**538@Description RFC2863 MIB539*//***************************************************************************/540typedef struct t_MIBStatistics {541uint64_t ifInOctets; /**< Total number of byte received */542uint64_t ifInPkts; /**< Total number of packets received */543uint64_t ifInMcastPkts; /**< Total number of multicast frame received */544uint64_t ifInBcastPkts; /**< Total number of broadcast frame received */545uint64_t ifInDiscards; /**< Frames received, but discarded due to problems within the MAC RX :546- InPktsNoTag,547- InPktsLate,548- InPktsOverrun */549uint64_t ifInErrors; /**< Number of frames received with error:550- InPktsBadTag,551- InPktsNoSCI,552- InPktsNotUsingSA553- InPktsNotValid */554uint64_t ifOutOctets; /**< Total number of byte sent */555uint64_t ifOutPkts; /**< Total number of packets sent */556uint64_t ifOutMcastPkts; /**< Total number of multicast frame sent */557uint64_t ifOutBcastPkts; /**< Total number of multicast frame sent */558uint64_t ifOutDiscards; /**< Frames received, but discarded due to problems within the MAC TX N/A! */559uint64_t ifOutErrors; /**< Number of frames transmitted with error:560- FIFO Overflow Error561- FIFO Underflow Error562- Other */563} t_MIBStatistics;564565/**************************************************************************//**566@Description MACSEC SecY Rx SA Statistics567*//***************************************************************************/568typedef struct t_FmMacsecSecYRxSaStatistics {569uint32_t inPktsOK; /**< The number of frames with resolved SCI, have passed all570frame validation frame validation with the validateFrame not set to disable */571uint32_t inPktsInvalid; /**< The number of frames with resolved SCI, that have failed frame572validation with the validateFrame set to check */573uint32_t inPktsNotValid; /**< The number of frames with resolved SCI, discarded on the controlled port,574that have failed frame validation with the validateFrame set to strict or the c bit is set */575uint32_t inPktsNotUsingSA; /**< The number of frames received with resolved SCI and discarded on disabled or576not provisioned SA with validateFrame in the strict mode or the C bit is set */577uint32_t inPktsUnusedSA; /**< The number of frames received with resolved SCI on disabled or not provisioned SA578with validateFrame not in the strict mode and the C bit is cleared */579} t_FmMacsecSecYRxSaStatistics;580581/**************************************************************************//**582@Description MACSEC SecY Tx SA Statistics583*//***************************************************************************/584typedef struct t_FmMacsecSecYTxSaStatistics {585uint64_t outPktsProtected; /**< The number of frames, that the user of the controlled port requested to586be transmitted, which were integrity protected */587uint64_t outPktsEncrypted; /**< The number of frames, that the user of the controlled port requested to588be transmitted, which were confidentiality protected */589} t_FmMacsecSecYTxSaStatistics;590591/**************************************************************************//**592@Description MACSEC SecY Rx SC Statistics593*//***************************************************************************/594typedef struct t_FmMacsecSecYRxScStatistics {595uint64_t inPktsUnchecked; /**< The number of frames with resolved SCI, delivered to the user of a controlled port,596that are not validated with the validateFrame set to disable */597uint64_t inPktsDelayed; /**< The number of frames with resolved SCI, delivered to the user of a controlled port,598that have their PN smaller than the lowest_PN with the validateFrame set to599disable or replayProtect disabled */600uint64_t inPktsLate; /**< The number of frames with resolved SCI, discarded on the controlled port,601that have their PN smaller than the lowest_PN with the validateFrame set to602Check or Strict and replayProtect enabled */603uint64_t inPktsOK; /**< The number of frames with resolved SCI, have passed all604frame validation frame validation with the validateFrame not set to disable */605uint64_t inPktsInvalid; /**< The number of frames with resolved SCI, that have failed frame606validation with the validateFrame set to check */607uint64_t inPktsNotValid; /**< The number of frames with resolved SCI, discarded on the controlled port,608that have failed frame validation with the validateFrame set to strict or the c bit is set */609uint64_t inPktsNotUsingSA; /**< The number of frames received with resolved SCI and discarded on disabled or610not provisioned SA with validateFrame in the strict mode or the C bit is set */611uint64_t inPktsUnusedSA; /**< The number of frames received with resolved SCI on disabled or not provisioned SA612with validateFrame not in the strict mode and the C bit is cleared */613} t_FmMacsecSecYRxScStatistics;614615/**************************************************************************//**616@Description MACSEC SecY Tx SC Statistics617*//***************************************************************************/618typedef struct t_FmMacsecSecYTxScStatistics {619uint64_t outPktsProtected; /**< The number of frames, that the user of the controlled port requested to620be transmitted, which were integrity protected */621uint64_t outPktsEncrypted; /**< The number of frames, that the user of the controlled port requested to622be transmitted, which were confidentiality protected */623} t_FmMacsecSecYTxScStatistics;624625/**************************************************************************//**626@Description MACSEC SecY Statistics627*//***************************************************************************/628typedef struct t_FmMacsecSecYStatistics {629t_MIBStatistics mibCtrlStatistics; /**< Controlled port MIB statistics */630t_MIBStatistics mibNonCtrlStatistics; /**< Uncontrolled port MIB statistics */631/* Frame verification statistics */632uint64_t inPktsUntagged; /**< The number of received packets without the MAC security tag633(SecTAG) with validateFrames which is not in the strict mode */634uint64_t inPktsNoTag; /**< The number of received packets discarded without the635MAC security tag (SecTAG) with validateFrames which is in the strict mode */636uint64_t inPktsBadTag; /**< The number of received packets discarded with an invalid637SecTAG or a zero value PN or an invalid ICV */638uint64_t inPktsUnknownSCI; /**< The number of received packets with unknown SCI with the639condition : validateFrames is not in the strict mode and the640C bit in the SecTAG is not set */641uint64_t inPktsNoSCI; /**< The number of received packets discarded with unknown SCI642information with the condition : validateFrames is in the strict mode643or the C bit in the SecTAG is set */644uint64_t inPktsOverrun; /**< The number of packets discarded because the number of645received packets exceeded the cryptographic performance capabilities */646/* Frame validation statistics */647uint64_t inOctetsValidated; /**< The number of octets of plaintext recovered from received frames with648resolved SCI that were integrity protected but not encrypted */649uint64_t inOctetsDecrypted; /**< The number of octets of plaintext recovered from received frames with650resolved SCI that were integrity protected and encrypted */651/* Frame generation statistics */652uint64_t outPktsUntagged; /**< The number of frames, that the user of the controlled port requested to653be transmitted, with protectFrame false */654uint64_t outPktsTooLong; /**< The number of frames, that the user of the controlled port requested to655be transmitted, discarded due to length being larger than Maximum Frame Length (MACSEC_MFL) */656/* Frame protection statistics */657uint64_t outOctetsProtected; /**< The number of octets of User Data in transmitted frames that were658integrity protected but not encrypted */659uint64_t outOctetsEncrypted; /**< The number of octets of User Data in transmitted frames that were660both integrity protected and encrypted */661} t_FmMacsecSecYStatistics;662663664/**************************************************************************//**665@Description MACSEC SecY SC Params666*//***************************************************************************/667typedef struct t_FmMacsecSecYSCParams {668macsecSCI_t sci; /**< The secure channel identification of the SC */669e_FmMacsecSecYCipherSuite cipherSuite; /**< Cipher suite to be used for the SC */670} t_FmMacsecSecYSCParams;671672/**************************************************************************//**673@Group FM_MACSEC_SECY_init_grp FM-MACSEC SecY Initialization Unit674675@Description FM-MACSEC SecY Initialization Unit676677@{678*//***************************************************************************/679680/**************************************************************************//**681@Description enum for validate frames682*//***************************************************************************/683typedef enum e_FmMacsecValidFrameBehavior {684e_FM_MACSEC_VALID_FRAME_BEHAVIOR_DISABLE = 0, /**< disable the validation function */685e_FM_MACSEC_VALID_FRAME_BEHAVIOR_CHECK, /**< enable the validation function but only for checking686without filtering out invalid frames */687e_FM_MACSEC_VALID_FRAME_BEHAVIOR_STRICT /**< enable the validation function and also strictly filter688out those invalid frames */689} e_FmMacsecValidFrameBehavior;690691/**************************************************************************//**692@Description enum for sci insertion693*//***************************************************************************/694typedef enum e_FmMacsecSciInsertionMode {695e_FM_MACSEC_SCI_INSERTION_MODE_EXPLICIT_SECTAG = 0, /**< explicit sci in the sectag */696e_FM_MACSEC_SCI_INSERTION_MODE_EXPLICIT_MAC_SA, /**< mac sa is overwritten with the sci*/697e_FM_MACSEC_SCI_INSERTION_MODE_IMPLICT_PTP /**< implicit point-to-point sci (pre-shared) */698} e_FmMacsecSciInsertionMode;699700/**************************************************************************//**701@Description FM MACSEC SecY config input702*//***************************************************************************/703typedef struct t_FmMacsecSecYParams {704t_Handle h_FmMacsec; /**< A handle to the FM MACSEC object */705t_FmMacsecSecYSCParams txScParams; /**< Tx SC Params */706uint32_t numReceiveChannels; /**< Number of receive channels dedicated to this SecY */707t_FmMacsecSecYExceptionsCallback *f_Exception; /**< Callback routine to be called by the driver upon SecY exception */708t_FmMacsecSecYEventsCallback *f_Event; /**< Callback routine to be called by the driver upon SecY event */709t_Handle h_App; /**< A handle to an application layer object; This handle will710be passed by the driver upon calling the above callbacks */711} t_FmMacsecSecYParams;712713/**************************************************************************//**714@Function FM_MACSEC_SECY_Config715716@Description Creates descriptor for the FM MACSEC SECY module;717718The routine returns a handle (descriptor) to the FM MACSEC SECY object;719This descriptor must be passed as first parameter to all other720FM MACSEC SECY function calls;721No actual initialization or configuration of FM MACSEC SecY hardware is722done by this routine.723724@Param[in] p_FmMacsecSecYParam Pointer to data structure of parameters.725726@Return Handle to FM MACSEC SECY object, or NULL for Failure.727*//***************************************************************************/728t_Handle FM_MACSEC_SECY_Config(t_FmMacsecSecYParams *p_FmMacsecSecYParam);729730/**************************************************************************//**731@Function FM_MACSEC_SECY_Init732733@Description Initializes the FM MACSEC SECY module.734735@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.736737@Return E_OK on success; Error code otherwise.738*//***************************************************************************/739t_Error FM_MACSEC_SECY_Init(t_Handle h_FmMacsecSecY);740741/**************************************************************************//**742@Function FM_MACSEC_SECY_Free743744@Description Frees all resources that were assigned to FM MACSEC SECY module.745746Calling this routine invalidates the descriptor.747748@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.749750@Return E_OK on success; Error code otherwise.751*//***************************************************************************/752t_Error FM_MACSEC_SECY_Free(t_Handle h_FmMacsecSecY);753754/**************************************************************************//**755@Group FM_MACSEC_SECY_advanced_init_grp FM-MACSEC SecY Advanced Configuration Unit756757@Description Configuration functions used to change default values.758759@{760*//***************************************************************************/761762/**************************************************************************//**763@Function FM_MACSEC_SECY_ConfigSciInsertionMode764765@Description Calling this routine changes the SCI-insertion-mode in the766internal driver data base from its default configuration767[DEFAULT_sciInsertionMode]768769@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.770@Param[in] sciInsertionMode Sci insertion mode771772@Return E_OK on success; Error code otherwise.773774@Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init();775776*//***************************************************************************/777t_Error FM_MACSEC_SECY_ConfigSciInsertionMode(t_Handle h_FmMacsecSecY, e_FmMacsecSciInsertionMode sciInsertionMode);778779/**************************************************************************//**780@Function FM_MACSEC_SECY_ConfigProtectFrames781782@Description Calling this routine changes the protect-frame mode in the783internal driver data base from its default configuration784[DEFAULT_protectFrames]785786@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.787@Param[in] protectFrames If FALSE, frames are transmitted without modification788789@Return E_OK on success; Error code otherwise.790791@Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init();792793*//***************************************************************************/794t_Error FM_MACSEC_SECY_ConfigProtectFrames(t_Handle h_FmMacsecSecY, bool protectFrames);795796/**************************************************************************//**797@Function FM_MACSEC_SECY_ConfigReplayWindow798799@Description Calling this routine changes the replay-window settings in the800internal driver data base from its default configuration801[DEFAULT_replayEnable], [DEFAULT_replayWindow]802803@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.804@Param[in] replayProtect; Replay protection function mode805@Param[in] replayWindow; The size of the replay window806807@Return E_OK on success; Error code otherwise.808809@Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init();810811*//***************************************************************************/812t_Error FM_MACSEC_SECY_ConfigReplayWindow(t_Handle h_FmMacsecSecY, bool replayProtect, uint32_t replayWindow);813814/**************************************************************************//**815@Function FM_MACSEC_SECY_ConfigValidationMode816817@Description Calling this routine changes the frame-validation-behavior mode818in the internal driver data base from its default configuration819[DEFAULT_validateFrames]820821@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.822@Param[in] validateFrames Validation function mode823824@Return E_OK on success; Error code otherwise.825826@Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init();827828*//***************************************************************************/829t_Error FM_MACSEC_SECY_ConfigValidationMode(t_Handle h_FmMacsecSecY, e_FmMacsecValidFrameBehavior validateFrames);830831/**************************************************************************//**832@Function FM_MACSEC_SECY_ConfigConfidentiality833834@Description Calling this routine changes the confidentiality settings in the835internal driver data base from its default configuration836[DEFAULT_confidentialityEnable], [DEFAULT_confidentialityOffset]837838@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.839@Param[in] confidentialityEnable TRUE - confidentiality protection and integrity protection840FALSE - no confidentiality protection, only integrity protection841@Param[in] confidentialityOffset The number of initial octets of each MSDU without confidentiality protection842common values are 0, 30, and 50843844@Return E_OK on success; Error code otherwise.845846@Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init();847848*//***************************************************************************/849t_Error FM_MACSEC_SECY_ConfigConfidentiality(t_Handle h_FmMacsecSecY, bool confidentialityEnable, uint16_t confidentialityOffset);850851/**************************************************************************//**852@Function FM_MACSEC_SECY_ConfigPointToPoint853854@Description configure this SecY to work in point-to-point mode, means that855it will have only one rx sc;856857@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.858859@Return E_OK on success; Error code otherwise.860861@Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init();862Can be called only once in a system; only the first secY that will call this863routine will be able to operate in Point-To-Point mode.864*//***************************************************************************/865t_Error FM_MACSEC_SECY_ConfigPointToPoint(t_Handle h_FmMacsecSecY);866867/**************************************************************************//**868@Function FM_MACSEC_SECY_ConfigException869870@Description Calling this routine changes the internal driver data base871from its default selection of exceptions enablement;872By default all exceptions are enabled.873874@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.875@Param[in] exception The exception to be selected.876@Param[in] enable TRUE to enable interrupt, FALSE to mask it.877878@Return E_OK on success; Error code otherwise.879880@Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init().881*//***************************************************************************/882t_Error FM_MACSEC_SECY_ConfigException(t_Handle h_FmMacsecSecY, e_FmMacsecSecYExceptions exception, bool enable);883884/**************************************************************************//**885@Function FM_MACSEC_SECY_ConfigEvent886887@Description Calling this routine changes the internal driver data base888from its default selection of events enablement;889By default all events are enabled.890891@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.892@Param[in] event The event to be selected.893@Param[in] enable TRUE to enable interrupt, FALSE to mask it.894895@Return E_OK on success; Error code otherwise.896897@Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init().898*//***************************************************************************/899t_Error FM_MACSEC_SECY_ConfigEvent(t_Handle h_FmMacsecSecY, e_FmMacsecSecYEvents event, bool enable);900901/** @} */ /* end of FM_MACSEC_SECY_advanced_init_grp group */902/** @} */ /* end of FM_MACSEC_SECY_init_grp group */903904905/**************************************************************************//**906@Group FM_MACSEC_SECY_runtime_control_grp FM-MACSEC SecY Runtime Control Unit907908@Description FM MACSEC SECY Runtime control unit API functions, definitions and enums.909910@{911*//***************************************************************************/912913/**************************************************************************//**914@Function FM_MACSEC_SECY_CreateRxSc915916@Description Create a receive secure channel.917918@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.919@Param[in] scParams secure channel params.920921@Return E_OK on success; Error code otherwise.922923@Cautions Allowed only following FM_MACSEC_SECY_Init().924*//***************************************************************************/925t_Handle FM_MACSEC_SECY_CreateRxSc(t_Handle h_FmMacsecSecY, t_FmMacsecSecYSCParams *p_ScParams);926927/**************************************************************************//**928@Function FM_MACSEC_SECY_DeleteRxSc929930@Description Deleting an initialized secure channel.931932@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.933@Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc.934935@Return E_OK on success; Error code otherwise.936937@Cautions Allowed only following FM_MACSEC_SECY_CreateRxSc().938*//***************************************************************************/939t_Error FM_MACSEC_SECY_DeleteRxSc(t_Handle h_FmMacsecSecY, t_Handle h_Sc);940941/**************************************************************************//**942@Function FM_MACSEC_SECY_CreateRxSa943944@Description Create a receive secure association for the secure channel;945the SA cannot be used to receive frames until FM_MACSEC_SECY_RxSaEnableReceive is called.946947@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.948@Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc.949@Param[in] an association number represent the SA.950@Param[in] lowestPn the lowest acceptable PN value for a received frame.951@Param[in] key the desired key for this SA.952953@Return E_OK on success; Error code otherwise.954955@Cautions Allowed only following FM_MACSEC_SECY_CreateRxSc().956*//***************************************************************************/957t_Error FM_MACSEC_SECY_CreateRxSa(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an, uint32_t lowestPn, macsecSAKey_t key);958959/**************************************************************************//**960@Function FM_MACSEC_SECY_DeleteRxSa961962@Description Deleting an initialized secure association.963964@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.965@Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc.966@Param[in] an association number represent the SA.967968@Return E_OK on success; Error code otherwise.969970@Cautions Allowed only following FM_MACSEC_SECY_Init().971*//***************************************************************************/972t_Error FM_MACSEC_SECY_DeleteRxSa(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an);973974/**************************************************************************//**975@Function FM_MACSEC_SECY_RxSaEnableReceive976977@Description Enabling the SA to receive frames.978979@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.980@Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc.981@Param[in] an association number represent the SA.982983@Return E_OK on success; Error code otherwise.984985@Cautions Allowed only following FM_MACSEC_SECY_CreateRxSa().986*//***************************************************************************/987t_Error FM_MACSEC_SECY_RxSaEnableReceive(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an);988989/**************************************************************************//**990@Function FM_MACSEC_SECY_RxSaDisableReceive991992@Description Disabling the SA from receive frames.993994@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.995@Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc.996@Param[in] an association number represent the SA.997998@Return E_OK on success; Error code otherwise.9991000@Cautions Allowed only following FM_MACSEC_SECY_CreateRxSa().1001*//***************************************************************************/1002t_Error FM_MACSEC_SECY_RxSaDisableReceive(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an);10031004/**************************************************************************//**1005@Function FM_MACSEC_SECY_RxSaUpdateNextPn10061007@Description Update the next packet number expected on RX;1008The value of nextPN shall be set to the greater of its existing value and the1009supplied of updtNextPN (802.1AE-2006 10.7.15).10101011@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1012@Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc.1013@Param[in] an association number represent the SA.1014@Param[in] updtNextPN the next PN value for a received frame.10151016@Return E_OK on success; Error code otherwise.10171018@Cautions Allowed only following FM_MACSEC_SECY_CreateRxSa().1019*//***************************************************************************/1020t_Error FM_MACSEC_SECY_RxSaUpdateNextPn(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an, uint32_t updtNextPN);10211022/**************************************************************************//**1023@Function FM_MACSEC_SECY_RxSaUpdateLowestPn10241025@Description Update the lowest packet number expected on RX;1026The value of lowestPN shall be set to the greater of its existing value and the1027supplied of updtLowestPN (802.1AE-2006 10.7.15).10281029@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1030@Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc.1031@Param[in] an association number represent the SA.1032@Param[in] updtLowestPN the lowest PN acceptable value for a received frame.10331034@Return E_OK on success; Error code otherwise.10351036@Cautions Allowed only following FM_MACSEC_SECY_CreateRxSa().1037*//***************************************************************************/1038t_Error FM_MACSEC_SECY_RxSaUpdateLowestPn(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an, uint32_t updtLowestPN);10391040/**************************************************************************//**1041@Function FM_MACSEC_SECY_RxSaModifyKey10421043@Description Modify the current key of the SA with a new one.10441045@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1046@Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc.1047@Param[in] an association number represent the SA.1048@Param[in] key new key to replace the current key.10491050@Return E_OK on success; Error code otherwise.10511052@Cautions Allowed only following FM_MACSEC_SECY_CreateRxSa().1053*//***************************************************************************/1054t_Error FM_MACSEC_SECY_RxSaModifyKey(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an, macsecSAKey_t key);10551056/**************************************************************************//**1057@Function FM_MACSEC_SECY_CreateTxSa10581059@Description Create a transmit secure association for the secure channel;1060the SA cannot be used to transmit frames until FM_MACSEC_SECY_TxSaSetActivate is called;1061Only one SA can be active at a time.10621063@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1064@Param[in] an association number represent the SA.1065@Param[in] key the desired key for this SA.10661067@Return E_OK on success; Error code otherwise.10681069@Cautions Allowed only following FM_MACSEC_SECY_Init().1070*//***************************************************************************/1071t_Error FM_MACSEC_SECY_CreateTxSa(t_Handle h_FmMacsecSecY, macsecAN_t an, macsecSAKey_t key);10721073/**************************************************************************//**1074@Function FM_MACSEC_SECY_DeleteTxSa10751076@Description Deleting an initialized secure association.10771078@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1079@Param[in] an association number represent the SA.10801081@Return E_OK on success; Error code otherwise.10821083@Cautions Allowed only following FM_MACSEC_SECY_Init().1084*//***************************************************************************/1085t_Error FM_MACSEC_SECY_DeleteTxSa(t_Handle h_FmMacsecSecY, macsecAN_t an);10861087/**************************************************************************//**1088@Function FM_MACSEC_SECY_TxSaModifyKey10891090@Description Modify the key of the inactive SA with a new one.10911092@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1093@Param[in] nextActiveAn association number represent the next SA to be activated.1094@Param[in] key new key to replace the current key.10951096@Return E_OK on success; Error code otherwise.10971098@Cautions Allowed only following FM_MACSEC_SECY_Init().1099*//***************************************************************************/1100t_Error FM_MACSEC_SECY_TxSaModifyKey(t_Handle h_FmMacsecSecY, macsecAN_t nextActiveAn, macsecSAKey_t key);11011102/**************************************************************************//**1103@Function FM_MACSEC_SECY_TxSaSetActive11041105@Description Set this SA to the active SA to be used on TX for SC;1106only one SA can be active at a time.11071108@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1109@Param[in] an association number represent the SA.11101111@Return E_OK on success; Error code otherwise.11121113@Cautions Allowed only following FM_MACSEC_SECY_Init().1114*//***************************************************************************/1115t_Error FM_MACSEC_SECY_TxSaSetActive(t_Handle h_FmMacsecSecY, macsecAN_t an);11161117/**************************************************************************//**1118@Function FM_MACSEC_SECY_TxSaGetActive11191120@Description Get the active SA that being used for TX.11211122@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1123@Param[out] p_An the active an.11241125@Return E_OK on success; Error code otherwise.11261127@Cautions Allowed only following FM_MACSEC_SECY_Init().1128*//***************************************************************************/1129t_Error FM_MACSEC_SECY_TxSaGetActive(t_Handle h_FmMacsecSecY, macsecAN_t *p_An);11301131/**************************************************************************//**1132@Function FM_MACSEC_SECY_GetStatistics11331134@Description get all statistics counters.11351136@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1137@Param[in] p_Statistics Structure with statistics.11381139@Return E_OK on success; Error code otherwise.11401141@Cautions Allowed only following FM_MACSEC_SECY_Init().1142*//***************************************************************************/1143t_Error FM_MACSEC_SECY_GetStatistics(t_Handle h_FmMacsecSecY, t_FmMacsecSecYStatistics *p_Statistics);11441145/**************************************************************************//**1146@Function FM_MACSEC_SECY_RxScGetStatistics11471148@Description get all statistics counters.11491150@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1151@Param[in] h_Sc Rx Sc handle.1152@Param[in] p_Statistics Structure with statistics.11531154@Return E_OK on success; Error code otherwise.11551156@Cautions Allowed only following FM_MACSEC_SECY_Init().1157*//***************************************************************************/1158t_Error FM_MACSEC_SECY_RxScGetStatistics(t_Handle h_FmMacsecSecY, t_Handle h_Sc, t_FmMacsecSecYRxScStatistics *p_Statistics);11591160/**************************************************************************//**1161@Function FM_MACSEC_SECY_RxSaGetStatistics11621163@Description get all statistics counters11641165@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1166@Param[in] h_Sc Rx Sc handle.1167@Param[in] an association number represent the SA.1168@Param[in] p_Statistics Structure with statistics.11691170@Return E_OK on success; Error code otherwise.11711172@Cautions Allowed only following FM_MACSEC_SECY_Init().1173*//***************************************************************************/1174t_Error FM_MACSEC_SECY_RxSaGetStatistics(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an, t_FmMacsecSecYRxSaStatistics *p_Statistics);11751176/**************************************************************************//**1177@Function FM_MACSEC_SECY_TxScGetStatistics11781179@Description get all statistics counters.11801181@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1182@Param[in] p_Statistics Structure with statistics.11831184@Return E_OK on success; Error code otherwise.11851186@Cautions Allowed only following FM_MACSEC_SECY_Init().1187*//***************************************************************************/1188t_Error FM_MACSEC_SECY_TxScGetStatistics(t_Handle h_FmMacsecSecY, t_FmMacsecSecYTxScStatistics *p_Statistics);11891190/**************************************************************************//**1191@Function FM_MACSEC_SECY_TxSaGetStatistics11921193@Description get all statistics counters.11941195@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1196@Param[in] an association number represent the SA.1197@Param[in] p_Statistics Structure with statistics.11981199@Return E_OK on success; Error code otherwise.12001201@Cautions Allowed only following FM_MACSEC_SECY_Init().1202*//***************************************************************************/1203t_Error FM_MACSEC_SECY_TxSaGetStatistics(t_Handle h_FmMacsecSecY, macsecAN_t an, t_FmMacsecSecYTxSaStatistics *p_Statistics);12041205/**************************************************************************//**1206@Function FM_MACSEC_SECY_SetException12071208@Description Calling this routine enables/disables the specified exception.12091210@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1211@Param[in] exception The exception to be selected.1212@Param[in] enable TRUE to enable interrupt, FALSE to mask it.12131214@Return E_OK on success; Error code otherwise.12151216@Cautions Allowed only following FM_MACSEC_SECY_Init().1217*//***************************************************************************/1218t_Error FM_MACSEC_SECY_SetException(t_Handle h_FmMacsecSecY, e_FmMacsecExceptions exception, bool enable);12191220/**************************************************************************//**1221@Function FM_MACSEC_SECY_SetEvent12221223@Description Calling this routine enables/disables the specified event.12241225@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1226@Param[in] event The event to be selected.1227@Param[in] enable TRUE to enable interrupt, FALSE to mask it.12281229@Return E_OK on success; Error code otherwise.12301231@Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init().1232*//***************************************************************************/1233t_Error FM_MACSEC_SECY_SetEvent(t_Handle h_FmMacsecSecY, e_FmMacsecSecYEvents event, bool enable);12341235/**************************************************************************//**1236@Function FM_MACSEC_SECY_GetRxScPhysId12371238@Description return the physical id of the Secure Channel.12391240@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1241@Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc.1242@Param[out] p_ScPhysId the SC physical id.12431244@Return E_OK on success; Error code otherwise.12451246@Cautions Allowed only following FM_MACSEC_SECY_CreateRxSc().1247*//***************************************************************************/1248t_Error FM_MACSEC_SECY_GetRxScPhysId(t_Handle h_FmMacsecSecY, t_Handle h_Sc, uint32_t *p_ScPhysId);12491250/**************************************************************************//**1251@Function FM_MACSEC_SECY_GetTxScPhysId12521253@Description return the physical id of the Secure Channel.12541255@Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor.1256@Param[out] p_ScPhysId the SC physical id.12571258@Return E_OK on success; Error code otherwise.12591260@Cautions Allowed only following FM_MACSEC_SECY_Init().1261*//***************************************************************************/1262t_Error FM_MACSEC_SECY_GetTxScPhysId(t_Handle h_FmMacsecSecY, uint32_t *p_ScPhysId);12631264/** @} */ /* end of FM_MACSEC_SECY_runtime_control_grp group */1265/** @} */ /* end of FM_MACSEC_SECY_grp group */1266/** @} */ /* end of FM_MACSEC_grp group */1267/** @} */ /* end of FM_grp group */126812691270#endif /* __FM_MACSEC_EXT_H */127112721273