1*852ba100SJustin Hibbits /* 2*852ba100SJustin Hibbits * Copyright 2008-2015 Freescale Semiconductor Inc. 3*852ba100SJustin Hibbits * 4*852ba100SJustin Hibbits * Redistribution and use in source and binary forms, with or without 5*852ba100SJustin Hibbits * modification, are permitted provided that the following conditions are met: 6*852ba100SJustin Hibbits * * Redistributions of source code must retain the above copyright 7*852ba100SJustin Hibbits * notice, this list of conditions and the following disclaimer. 8*852ba100SJustin Hibbits * * Redistributions in binary form must reproduce the above copyright 9*852ba100SJustin Hibbits * notice, this list of conditions and the following disclaimer in the 10*852ba100SJustin Hibbits * documentation and/or other materials provided with the distribution. 11*852ba100SJustin Hibbits * * Neither the name of Freescale Semiconductor nor the 12*852ba100SJustin Hibbits * names of its contributors may be used to endorse or promote products 13*852ba100SJustin Hibbits * derived from this software without specific prior written permission. 14*852ba100SJustin Hibbits * 15*852ba100SJustin Hibbits * 16*852ba100SJustin Hibbits * ALTERNATIVELY, this software may be distributed under the terms of the 17*852ba100SJustin Hibbits * GNU General Public License ("GPL") as published by the Free Software 18*852ba100SJustin Hibbits * Foundation, either version 2 of that License or (at your option) any 19*852ba100SJustin Hibbits * later version. 20*852ba100SJustin Hibbits * 21*852ba100SJustin Hibbits * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY 22*852ba100SJustin Hibbits * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23*852ba100SJustin Hibbits * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24*852ba100SJustin Hibbits * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY 25*852ba100SJustin Hibbits * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26*852ba100SJustin Hibbits * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27*852ba100SJustin Hibbits * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 28*852ba100SJustin Hibbits * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29*852ba100SJustin Hibbits * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30*852ba100SJustin Hibbits * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31*852ba100SJustin Hibbits */ 32*852ba100SJustin Hibbits 33*852ba100SJustin Hibbits /**************************************************************************//** 34*852ba100SJustin Hibbits @File fm_macsec_ext.h 35*852ba100SJustin Hibbits 36*852ba100SJustin Hibbits @Description FM MACSEC ... 37*852ba100SJustin Hibbits *//***************************************************************************/ 38*852ba100SJustin Hibbits #ifndef __FM_MACSEC_EXT_H 39*852ba100SJustin Hibbits #define __FM_MACSEC_EXT_H 40*852ba100SJustin Hibbits 41*852ba100SJustin Hibbits #include "std_ext.h" 42*852ba100SJustin Hibbits 43*852ba100SJustin Hibbits 44*852ba100SJustin Hibbits /**************************************************************************//** 45*852ba100SJustin Hibbits @Group FM_grp Frame Manager API 46*852ba100SJustin Hibbits 47*852ba100SJustin Hibbits @Description FM API functions, definitions and enums 48*852ba100SJustin Hibbits 49*852ba100SJustin Hibbits @{ 50*852ba100SJustin Hibbits *//***************************************************************************/ 51*852ba100SJustin Hibbits 52*852ba100SJustin Hibbits /**************************************************************************//** 53*852ba100SJustin Hibbits @Group FM_MACSEC_grp FM MACSEC 54*852ba100SJustin Hibbits 55*852ba100SJustin Hibbits @Description FM MACSEC API functions, definitions and enums 56*852ba100SJustin Hibbits 57*852ba100SJustin Hibbits @{ 58*852ba100SJustin Hibbits *//***************************************************************************/ 59*852ba100SJustin Hibbits 60*852ba100SJustin Hibbits /**************************************************************************//** 61*852ba100SJustin Hibbits @Description MACSEC Exceptions 62*852ba100SJustin Hibbits *//***************************************************************************/ 63*852ba100SJustin Hibbits typedef enum e_FmMacsecExceptions { 64*852ba100SJustin Hibbits e_FM_MACSEC_EX_SINGLE_BIT_ECC, /**< Single bit ECC error */ 65*852ba100SJustin Hibbits e_FM_MACSEC_EX_MULTI_BIT_ECC /**< Multi bit ECC error */ 66*852ba100SJustin Hibbits } e_FmMacsecExceptions; 67*852ba100SJustin Hibbits 68*852ba100SJustin Hibbits 69*852ba100SJustin Hibbits /**************************************************************************//** 70*852ba100SJustin Hibbits @Group FM_MACSEC_init_grp FM-MACSEC Initialization Unit 71*852ba100SJustin Hibbits 72*852ba100SJustin Hibbits @Description FM MACSEC Initialization Unit 73*852ba100SJustin Hibbits 74*852ba100SJustin Hibbits @{ 75*852ba100SJustin Hibbits *//***************************************************************************/ 76*852ba100SJustin Hibbits 77*852ba100SJustin Hibbits /**************************************************************************//** 78*852ba100SJustin Hibbits @Function t_FmMacsecExceptionsCallback 79*852ba100SJustin Hibbits 80*852ba100SJustin Hibbits @Description Exceptions user callback routine, will be called upon an 81*852ba100SJustin Hibbits exception passing the exception identification. 82*852ba100SJustin Hibbits 83*852ba100SJustin Hibbits @Param[in] h_App A handle to an application layer object; This handle 84*852ba100SJustin Hibbits will be passed by the driver upon calling this callback. 85*852ba100SJustin Hibbits @Param[in] exception The exception. 86*852ba100SJustin Hibbits *//***************************************************************************/ 87*852ba100SJustin Hibbits typedef void (t_FmMacsecExceptionsCallback) ( t_Handle h_App, 88*852ba100SJustin Hibbits e_FmMacsecExceptions exception); 89*852ba100SJustin Hibbits 90*852ba100SJustin Hibbits 91*852ba100SJustin Hibbits /**************************************************************************//** 92*852ba100SJustin Hibbits @Description FM MACSEC config input 93*852ba100SJustin Hibbits *//***************************************************************************/ 94*852ba100SJustin Hibbits typedef struct t_FmMacsecParams { 95*852ba100SJustin Hibbits t_Handle h_Fm; /**< A handle to the FM object related to */ 96*852ba100SJustin Hibbits bool guestMode; /**< Partition-id */ 97*852ba100SJustin Hibbits union { 98*852ba100SJustin Hibbits struct { 99*852ba100SJustin Hibbits uint8_t fmMacId; /**< FM MAC id */ 100*852ba100SJustin Hibbits } guestParams; 101*852ba100SJustin Hibbits 102*852ba100SJustin Hibbits struct { 103*852ba100SJustin Hibbits uintptr_t baseAddr; /**< Base of memory mapped FM MACSEC registers */ 104*852ba100SJustin Hibbits t_Handle h_FmMac; /**< A handle to the FM MAC object related to */ 105*852ba100SJustin Hibbits t_FmMacsecExceptionsCallback *f_Exception; /**< Exception Callback Routine */ 106*852ba100SJustin Hibbits t_Handle h_App; /**< A handle to an application layer object; This handle will 107*852ba100SJustin Hibbits be passed by the driver upon calling the above callbacks */ 108*852ba100SJustin Hibbits } nonGuestParams; 109*852ba100SJustin Hibbits }; 110*852ba100SJustin Hibbits } t_FmMacsecParams; 111*852ba100SJustin Hibbits 112*852ba100SJustin Hibbits /**************************************************************************//** 113*852ba100SJustin Hibbits @Function FM_MACSEC_Config 114*852ba100SJustin Hibbits 115*852ba100SJustin Hibbits @Description Creates descriptor for the FM MACSEC module; 116*852ba100SJustin Hibbits 117*852ba100SJustin Hibbits The routine returns a handle (descriptor) to the FM MACSEC object; 118*852ba100SJustin Hibbits This descriptor must be passed as first parameter to all other 119*852ba100SJustin Hibbits FM MACSEC function calls; 120*852ba100SJustin Hibbits 121*852ba100SJustin Hibbits No actual initialization or configuration of FM MACSEC hardware is 122*852ba100SJustin Hibbits done by this routine. 123*852ba100SJustin Hibbits 124*852ba100SJustin Hibbits @Param[in] p_FmMacsecParam Pointer to data structure of parameters. 125*852ba100SJustin Hibbits 126*852ba100SJustin Hibbits @Retval Handle to FM MACSEC object, or NULL for Failure. 127*852ba100SJustin Hibbits *//***************************************************************************/ 128*852ba100SJustin Hibbits t_Handle FM_MACSEC_Config(t_FmMacsecParams *p_FmMacsecParam); 129*852ba100SJustin Hibbits 130*852ba100SJustin Hibbits /**************************************************************************//** 131*852ba100SJustin Hibbits @Function FM_MACSEC_Init 132*852ba100SJustin Hibbits 133*852ba100SJustin Hibbits @Description Initializes the FM MACSEC module. 134*852ba100SJustin Hibbits 135*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 136*852ba100SJustin Hibbits 137*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 138*852ba100SJustin Hibbits *//***************************************************************************/ 139*852ba100SJustin Hibbits t_Error FM_MACSEC_Init(t_Handle h_FmMacsec); 140*852ba100SJustin Hibbits 141*852ba100SJustin Hibbits /**************************************************************************//** 142*852ba100SJustin Hibbits @Function FM_MACSEC_Free 143*852ba100SJustin Hibbits 144*852ba100SJustin Hibbits @Description Frees all resources that were assigned to FM MACSEC module; 145*852ba100SJustin Hibbits 146*852ba100SJustin Hibbits Calling this routine invalidates the descriptor. 147*852ba100SJustin Hibbits 148*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 149*852ba100SJustin Hibbits 150*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 151*852ba100SJustin Hibbits *//***************************************************************************/ 152*852ba100SJustin Hibbits t_Error FM_MACSEC_Free(t_Handle h_FmMacsec); 153*852ba100SJustin Hibbits 154*852ba100SJustin Hibbits 155*852ba100SJustin Hibbits /**************************************************************************//** 156*852ba100SJustin Hibbits @Group FM_MACSEC_advanced_init_grp FM-MACSEC Advanced Configuration Unit 157*852ba100SJustin Hibbits 158*852ba100SJustin Hibbits @Description Configuration functions used to change default values. 159*852ba100SJustin Hibbits 160*852ba100SJustin Hibbits @{ 161*852ba100SJustin Hibbits *//***************************************************************************/ 162*852ba100SJustin Hibbits 163*852ba100SJustin Hibbits /**************************************************************************//** 164*852ba100SJustin Hibbits @Description enum for unknown sci frame treatment 165*852ba100SJustin Hibbits *//***************************************************************************/ 166*852ba100SJustin Hibbits typedef enum e_FmMacsecUnknownSciFrameTreatment { 167*852ba100SJustin Hibbits e_FM_MACSEC_UNKNOWN_SCI_FRAME_TREATMENT_DISCARD_BOTH = 0, /**< Controlled port - Strict mode */ 168*852ba100SJustin Hibbits e_FM_MACSEC_UNKNOWN_SCI_FRAME_TREATMENT_DISCARD_UNCONTROLLED_DELIVER_OR_DISCARD_CONTROLLED, /**< If C bit clear deliver on controlled port, else discard 169*852ba100SJustin Hibbits Controlled port - Check or Disable mode */ 170*852ba100SJustin Hibbits e_FM_MACSEC_UNKNOWN_SCI_FRAME_TREATMENT_DELIVER_UNCONTROLLED_DISCARD_CONTROLLED, /**< Controlled port - Strict mode */ 171*852ba100SJustin Hibbits e_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, 172*852ba100SJustin Hibbits else discard on uncontrolled port and deliver on controlled port 173*852ba100SJustin Hibbits Controlled port - Check or Disable mode */ 174*852ba100SJustin Hibbits } e_FmMacsecUnknownSciFrameTreatment; 175*852ba100SJustin Hibbits 176*852ba100SJustin Hibbits /**************************************************************************//** 177*852ba100SJustin Hibbits @Description enum for untag frame treatment 178*852ba100SJustin Hibbits *//***************************************************************************/ 179*852ba100SJustin Hibbits typedef enum e_FmMacsecUntagFrameTreatment { 180*852ba100SJustin Hibbits e_FM_MACSEC_UNTAG_FRAME_TREATMENT_DELIVER_UNCONTROLLED_DISCARD_CONTROLLED = 0, /**< Controlled port - Strict mode */ 181*852ba100SJustin Hibbits e_FM_MACSEC_UNTAG_FRAME_TREATMENT_DISCARD_BOTH, /**< Controlled port - Strict mode */ 182*852ba100SJustin Hibbits e_FM_MACSEC_UNTAG_FRAME_TREATMENT_DISCARD_UNCONTROLLED_DELIVER_CONTROLLED_UNMODIFIED /**< Controlled port - Strict mode */ 183*852ba100SJustin Hibbits } e_FmMacsecUntagFrameTreatment; 184*852ba100SJustin Hibbits 185*852ba100SJustin Hibbits /**************************************************************************//** 186*852ba100SJustin Hibbits @Function FM_MACSEC_ConfigUnknownSciFrameTreatment 187*852ba100SJustin Hibbits 188*852ba100SJustin Hibbits @Description Change the treatment for received frames with unknown sci from its default 189*852ba100SJustin Hibbits configuration [DEFAULT_unknownSciFrameTreatment]. 190*852ba100SJustin Hibbits 191*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 192*852ba100SJustin Hibbits @Param[in] treatMode The selected mode. 193*852ba100SJustin Hibbits 194*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 195*852ba100SJustin Hibbits 196*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init(). 197*852ba100SJustin Hibbits *//***************************************************************************/ 198*852ba100SJustin Hibbits t_Error FM_MACSEC_ConfigUnknownSciFrameTreatment(t_Handle h_FmMacsec, e_FmMacsecUnknownSciFrameTreatment treatMode); 199*852ba100SJustin Hibbits 200*852ba100SJustin Hibbits /**************************************************************************//** 201*852ba100SJustin Hibbits @Function FM_MACSEC_ConfigInvalidTagsFrameTreatment 202*852ba100SJustin Hibbits 203*852ba100SJustin Hibbits @Description Change the treatment for received frames with invalid tags or 204*852ba100SJustin Hibbits a zero value PN or an invalid ICV from its default configuration 205*852ba100SJustin Hibbits [DEFAULT_invalidTagsFrameTreatment]. 206*852ba100SJustin Hibbits 207*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 208*852ba100SJustin Hibbits @Param[in] deliverUncontrolled If True deliver on the uncontrolled port, else discard; 209*852ba100SJustin Hibbits In both cases discard on the controlled port; 210*852ba100SJustin Hibbits this provide Strict, Check or Disable mode. 211*852ba100SJustin Hibbits 212*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 213*852ba100SJustin Hibbits 214*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init(). 215*852ba100SJustin Hibbits *//***************************************************************************/ 216*852ba100SJustin Hibbits t_Error FM_MACSEC_ConfigInvalidTagsFrameTreatment(t_Handle h_FmMacsec, bool deliverUncontrolled); 217*852ba100SJustin Hibbits 218*852ba100SJustin Hibbits /**************************************************************************//** 219*852ba100SJustin Hibbits @Function FM_MACSEC_ConfigEncryptWithNoChangedTextFrameTreatment 220*852ba100SJustin Hibbits 221*852ba100SJustin Hibbits @Description Change the treatment for received frames with the Encryption bit 222*852ba100SJustin Hibbits set and the Changed Text bit clear from its default configuration 223*852ba100SJustin Hibbits [DEFAULT_encryptWithNoChangedTextFrameTreatment]. 224*852ba100SJustin Hibbits 225*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 226*852ba100SJustin Hibbits @Param[in] discardUncontrolled If True discard on the uncontrolled port, else deliver; 227*852ba100SJustin Hibbits In both cases discard on the controlled port; 228*852ba100SJustin Hibbits this provide Strict, Check or Disable mode. 229*852ba100SJustin Hibbits 230*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 231*852ba100SJustin Hibbits 232*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init(). 233*852ba100SJustin Hibbits *//***************************************************************************/ 234*852ba100SJustin Hibbits t_Error FM_MACSEC_ConfigEncryptWithNoChangedTextFrameTreatment(t_Handle h_FmMacsec, bool discardUncontrolled); 235*852ba100SJustin Hibbits 236*852ba100SJustin Hibbits /**************************************************************************//** 237*852ba100SJustin Hibbits @Function FM_MACSEC_ConfigChangedTextWithNoEncryptFrameTreatment 238*852ba100SJustin Hibbits 239*852ba100SJustin Hibbits @Description Change the treatment for received frames with the Encryption bit 240*852ba100SJustin Hibbits clear and the Changed Text bit set from its default configuration 241*852ba100SJustin Hibbits [DEFAULT_changedTextWithNoEncryptFrameTreatment]. 242*852ba100SJustin Hibbits 243*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 244*852ba100SJustin Hibbits @Param[in] deliverUncontrolled If True deliver on the uncontrolled port, else discard; 245*852ba100SJustin Hibbits In both cases discard on the controlled port; 246*852ba100SJustin Hibbits this provide Strict, Check or Disable mode. 247*852ba100SJustin Hibbits 248*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 249*852ba100SJustin Hibbits 250*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init(). 251*852ba100SJustin Hibbits *//***************************************************************************/ 252*852ba100SJustin Hibbits t_Error FM_MACSEC_ConfigChangedTextWithNoEncryptFrameTreatment(t_Handle h_FmMacsec, bool deliverUncontrolled); 253*852ba100SJustin Hibbits 254*852ba100SJustin Hibbits /**************************************************************************//** 255*852ba100SJustin Hibbits @Function FM_MACSEC_ConfigUntagFrameTreatment 256*852ba100SJustin Hibbits 257*852ba100SJustin Hibbits @Description Change the treatment for received frames without the MAC security tag (SecTAG) 258*852ba100SJustin Hibbits from its default configuration [DEFAULT_untagFrameTreatment]. 259*852ba100SJustin Hibbits 260*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 261*852ba100SJustin Hibbits @Param[in] treatMode The selected mode. 262*852ba100SJustin Hibbits 263*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 264*852ba100SJustin Hibbits 265*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init(). 266*852ba100SJustin Hibbits *//***************************************************************************/ 267*852ba100SJustin Hibbits t_Error FM_MACSEC_ConfigUntagFrameTreatment(t_Handle h_FmMacsec, e_FmMacsecUntagFrameTreatment treatMode); 268*852ba100SJustin Hibbits 269*852ba100SJustin Hibbits /**************************************************************************//** 270*852ba100SJustin Hibbits @Function FM_MACSEC_ConfigOnlyScbIsSetFrameTreatment 271*852ba100SJustin Hibbits 272*852ba100SJustin Hibbits @Description Change the treatment for received frames with only SCB bit set 273*852ba100SJustin Hibbits from its default configuration [DEFAULT_onlyScbIsSetFrameTreatment]. 274*852ba100SJustin Hibbits 275*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 276*852ba100SJustin Hibbits @Param[in] deliverUncontrolled If True deliver on the uncontrolled port, else discard; 277*852ba100SJustin Hibbits In both cases discard on the controlled port; 278*852ba100SJustin Hibbits this provide Strict, Check or Disable mode. 279*852ba100SJustin Hibbits 280*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 281*852ba100SJustin Hibbits 282*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init(). 283*852ba100SJustin Hibbits *//***************************************************************************/ 284*852ba100SJustin Hibbits t_Error FM_MACSEC_ConfigOnlyScbIsSetFrameTreatment(t_Handle h_FmMacsec, bool deliverUncontrolled); 285*852ba100SJustin Hibbits 286*852ba100SJustin Hibbits /**************************************************************************//** 287*852ba100SJustin Hibbits @Function FM_MACSEC_ConfigPnExhaustionThreshold 288*852ba100SJustin Hibbits 289*852ba100SJustin Hibbits @Description It's provide the ability to configure a PN exhaustion threshold; 290*852ba100SJustin Hibbits When the NextPn crosses this value an interrupt event 291*852ba100SJustin Hibbits is asserted to warn that the active SA should re-key. 292*852ba100SJustin Hibbits 293*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 294*852ba100SJustin Hibbits @Param[in] pnExhThr If the threshold is reached, an interrupt event 295*852ba100SJustin Hibbits is asserted to re-key. 296*852ba100SJustin Hibbits 297*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 298*852ba100SJustin Hibbits 299*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init(). 300*852ba100SJustin Hibbits *//***************************************************************************/ 301*852ba100SJustin Hibbits t_Error FM_MACSEC_ConfigPnExhaustionThreshold(t_Handle h_FmMacsec, uint32_t pnExhThr); 302*852ba100SJustin Hibbits 303*852ba100SJustin Hibbits /**************************************************************************//** 304*852ba100SJustin Hibbits @Function FM_MACSEC_ConfigKeysUnreadable 305*852ba100SJustin Hibbits 306*852ba100SJustin Hibbits @Description Turn on privacy mode; All the keys and their hash values can't be read any more; 307*852ba100SJustin Hibbits Can not be cleared unless hard reset. 308*852ba100SJustin Hibbits 309*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 310*852ba100SJustin Hibbits 311*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 312*852ba100SJustin Hibbits 313*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init(). 314*852ba100SJustin Hibbits *//***************************************************************************/ 315*852ba100SJustin Hibbits t_Error FM_MACSEC_ConfigKeysUnreadable(t_Handle h_FmMacsec); 316*852ba100SJustin Hibbits 317*852ba100SJustin Hibbits /**************************************************************************//** 318*852ba100SJustin Hibbits @Function FM_MACSEC_ConfigSectagWithoutSCI 319*852ba100SJustin Hibbits 320*852ba100SJustin Hibbits @Description Promise that all generated Sectag will be without SCI included. 321*852ba100SJustin Hibbits 322*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 323*852ba100SJustin Hibbits 324*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 325*852ba100SJustin Hibbits 326*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init(). 327*852ba100SJustin Hibbits *//***************************************************************************/ 328*852ba100SJustin Hibbits t_Error FM_MACSEC_ConfigSectagWithoutSCI(t_Handle h_FmMacsec); 329*852ba100SJustin Hibbits 330*852ba100SJustin Hibbits /**************************************************************************//** 331*852ba100SJustin Hibbits @Function FM_MACSEC_ConfigException 332*852ba100SJustin Hibbits 333*852ba100SJustin Hibbits @Description Calling this routine changes the internal driver data base 334*852ba100SJustin Hibbits from its default selection of exceptions enablement; 335*852ba100SJustin Hibbits By default all exceptions are enabled. 336*852ba100SJustin Hibbits 337*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 338*852ba100SJustin Hibbits @Param[in] exception The exception to be selected. 339*852ba100SJustin Hibbits @Param[in] enable TRUE to enable interrupt, FALSE to mask it. 340*852ba100SJustin Hibbits 341*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 342*852ba100SJustin Hibbits 343*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Config() and before FM_MACSEC_Init(). 344*852ba100SJustin Hibbits *//***************************************************************************/ 345*852ba100SJustin Hibbits t_Error FM_MACSEC_ConfigException(t_Handle h_FmMacsec, e_FmMacsecExceptions exception, bool enable); 346*852ba100SJustin Hibbits 347*852ba100SJustin Hibbits /** @} */ /* end of FM_MACSEC_advanced_init_grp group */ 348*852ba100SJustin Hibbits /** @} */ /* end of FM_MACSEC_init_grp group */ 349*852ba100SJustin Hibbits 350*852ba100SJustin Hibbits 351*852ba100SJustin Hibbits /**************************************************************************//** 352*852ba100SJustin Hibbits @Group FM_MACSEC_runtime_control_grp FM-MACSEC Runtime Control Data Unit 353*852ba100SJustin Hibbits 354*852ba100SJustin Hibbits @Description FM MACSEC runtime control data unit API functions, definitions and enums. 355*852ba100SJustin Hibbits 356*852ba100SJustin Hibbits @{ 357*852ba100SJustin Hibbits *//***************************************************************************/ 358*852ba100SJustin Hibbits 359*852ba100SJustin Hibbits /**************************************************************************//** 360*852ba100SJustin Hibbits @Function FM_MACSEC_GetRevision 361*852ba100SJustin Hibbits 362*852ba100SJustin Hibbits @Description Return MACSEC HW chip revision 363*852ba100SJustin Hibbits 364*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 365*852ba100SJustin Hibbits @Param[out] p_MacsecRevision MACSEC revision as defined by the chip. 366*852ba100SJustin Hibbits 367*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 368*852ba100SJustin Hibbits 369*852ba100SJustin Hibbits @Cautions Allowed only after FM_MACSEC_Init(). 370*852ba100SJustin Hibbits *//***************************************************************************/ 371*852ba100SJustin Hibbits t_Error FM_MACSEC_GetRevision(t_Handle h_FmMacsec, uint32_t *p_MacsecRevision); 372*852ba100SJustin Hibbits 373*852ba100SJustin Hibbits /**************************************************************************//** 374*852ba100SJustin Hibbits @Function FM_MACSEC_Enable 375*852ba100SJustin Hibbits 376*852ba100SJustin Hibbits @Description This routine should be called after MACSEC is initialized for enabling all 377*852ba100SJustin Hibbits MACSEC engines according to their existing configuration. 378*852ba100SJustin Hibbits 379*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 380*852ba100SJustin Hibbits 381*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 382*852ba100SJustin Hibbits 383*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Init() and when MACSEC is disabled. 384*852ba100SJustin Hibbits *//***************************************************************************/ 385*852ba100SJustin Hibbits t_Error FM_MACSEC_Enable(t_Handle h_FmMacsec); 386*852ba100SJustin Hibbits 387*852ba100SJustin Hibbits /**************************************************************************//** 388*852ba100SJustin Hibbits @Function FM_MACSEC_Disable 389*852ba100SJustin Hibbits 390*852ba100SJustin Hibbits @Description This routine may be called when MACSEC is enabled in order to 391*852ba100SJustin Hibbits disable all MACSEC engines; The MACSEC is working in bypass mode. 392*852ba100SJustin Hibbits 393*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 394*852ba100SJustin Hibbits 395*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 396*852ba100SJustin Hibbits 397*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Init() and when MACSEC is enabled. 398*852ba100SJustin Hibbits *//***************************************************************************/ 399*852ba100SJustin Hibbits t_Error FM_MACSEC_Disable(t_Handle h_FmMacsec); 400*852ba100SJustin Hibbits 401*852ba100SJustin Hibbits /**************************************************************************//** 402*852ba100SJustin Hibbits @Function FM_MACSEC_SetException 403*852ba100SJustin Hibbits 404*852ba100SJustin Hibbits @Description Calling this routine enables/disables the specified exception. 405*852ba100SJustin Hibbits 406*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 407*852ba100SJustin Hibbits @Param[in] exception The exception to be selected. 408*852ba100SJustin Hibbits @Param[in] enable TRUE to enable interrupt, FALSE to mask it. 409*852ba100SJustin Hibbits 410*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 411*852ba100SJustin Hibbits 412*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Init(). 413*852ba100SJustin Hibbits *//***************************************************************************/ 414*852ba100SJustin Hibbits t_Error FM_MACSEC_SetException(t_Handle h_FmMacsec, e_FmMacsecExceptions exception, bool enable); 415*852ba100SJustin Hibbits 416*852ba100SJustin Hibbits #if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0)) 417*852ba100SJustin Hibbits /**************************************************************************//** 418*852ba100SJustin Hibbits @Function FM_MACSEC_DumpRegs 419*852ba100SJustin Hibbits 420*852ba100SJustin Hibbits @Description Dump internal registers. 421*852ba100SJustin Hibbits 422*852ba100SJustin Hibbits @Param[in] h_FmMacsec - FM MACSEC module descriptor. 423*852ba100SJustin Hibbits 424*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 425*852ba100SJustin Hibbits 426*852ba100SJustin Hibbits @Cautions Allowed only after FM_MACSEC_Init(). 427*852ba100SJustin Hibbits *//***************************************************************************/ 428*852ba100SJustin Hibbits t_Error FM_MACSEC_DumpRegs(t_Handle h_FmMacsec); 429*852ba100SJustin Hibbits #endif /* (defined(DEBUG_ERRORS) && ... */ 430*852ba100SJustin Hibbits 431*852ba100SJustin Hibbits #ifdef VERIFICATION_SUPPORT 432*852ba100SJustin Hibbits /********************* VERIFICATION ONLY ********************************/ 433*852ba100SJustin Hibbits /**************************************************************************//** 434*852ba100SJustin Hibbits @Function FM_MACSEC_BackdoorSet 435*852ba100SJustin Hibbits 436*852ba100SJustin Hibbits @Description Set register of the MACSEC memory map 437*852ba100SJustin Hibbits 438*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 439*852ba100SJustin Hibbits @Param[out] offset Register offset. 440*852ba100SJustin Hibbits @Param[out] value Value to write. 441*852ba100SJustin Hibbits 442*852ba100SJustin Hibbits 443*852ba100SJustin Hibbits @Return None 444*852ba100SJustin Hibbits 445*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Init(). 446*852ba100SJustin Hibbits *//***************************************************************************/ 447*852ba100SJustin Hibbits t_Error FM_MACSEC_BackdoorSet(t_Handle h_FmMacsec, uint32_t offset, uint32_t value); 448*852ba100SJustin Hibbits 449*852ba100SJustin Hibbits /**************************************************************************//** 450*852ba100SJustin Hibbits @Function FM_MACSEC_BackdoorGet 451*852ba100SJustin Hibbits 452*852ba100SJustin Hibbits @Description Read from register of the MACSEC memory map. 453*852ba100SJustin Hibbits 454*852ba100SJustin Hibbits @Param[in] h_FmMacsec FM MACSEC module descriptor. 455*852ba100SJustin Hibbits @Param[out] offset Register offset. 456*852ba100SJustin Hibbits 457*852ba100SJustin Hibbits @Return Value read 458*852ba100SJustin Hibbits 459*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_Init(). 460*852ba100SJustin Hibbits *//***************************************************************************/ 461*852ba100SJustin Hibbits uint32_t FM_MACSEC_BackdoorGet(t_Handle h_FmMacsec, uint32_t offset); 462*852ba100SJustin Hibbits #endif /* VERIFICATION_SUPPORT */ 463*852ba100SJustin Hibbits 464*852ba100SJustin Hibbits /** @} */ /* end of FM_MACSEC_runtime_control_grp group */ 465*852ba100SJustin Hibbits 466*852ba100SJustin Hibbits 467*852ba100SJustin Hibbits /**************************************************************************//** 468*852ba100SJustin Hibbits @Group FM_MACSEC_SECY_grp FM-MACSEC SecY 469*852ba100SJustin Hibbits 470*852ba100SJustin Hibbits @Description FM-MACSEC SecY API functions, definitions and enums 471*852ba100SJustin Hibbits 472*852ba100SJustin Hibbits @{ 473*852ba100SJustin Hibbits *//***************************************************************************/ 474*852ba100SJustin Hibbits 475*852ba100SJustin Hibbits typedef uint8_t macsecSAKey_t[32]; 476*852ba100SJustin Hibbits typedef uint64_t macsecSCI_t; 477*852ba100SJustin Hibbits typedef uint8_t macsecAN_t; 478*852ba100SJustin Hibbits 479*852ba100SJustin Hibbits /**************************************************************************//** 480*852ba100SJustin Hibbits @Description MACSEC SECY Cipher Suite 481*852ba100SJustin Hibbits *//***************************************************************************/ 482*852ba100SJustin Hibbits typedef enum e_FmMacsecSecYCipherSuite { 483*852ba100SJustin Hibbits e_FM_MACSEC_SECY_GCM_AES_128 = 0, /**< GCM-AES-128 */ 484*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11) 485*852ba100SJustin Hibbits e_FM_MACSEC_SECY_GCM_AES_256 /**< GCM-AES-256 */ 486*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */ 487*852ba100SJustin Hibbits } e_FmMacsecSecYCipherSuite; 488*852ba100SJustin Hibbits 489*852ba100SJustin Hibbits /**************************************************************************//** 490*852ba100SJustin Hibbits @Description MACSEC SECY Exceptions 491*852ba100SJustin Hibbits *//***************************************************************************/ 492*852ba100SJustin Hibbits typedef enum e_FmMacsecSecYExceptions { 493*852ba100SJustin Hibbits e_FM_MACSEC_SECY_EX_FRAME_DISCARDED /**< Frame Discarded */ 494*852ba100SJustin Hibbits } e_FmMacsecSecYExceptions; 495*852ba100SJustin Hibbits 496*852ba100SJustin Hibbits /**************************************************************************//** 497*852ba100SJustin Hibbits @Description MACSEC SECY Events 498*852ba100SJustin Hibbits *//***************************************************************************/ 499*852ba100SJustin Hibbits typedef enum e_FmMacsecSecYEvents { 500*852ba100SJustin Hibbits e_FM_MACSEC_SECY_EV_NEXT_PN /**< Next Packet Number exhaustion threshold reached */ 501*852ba100SJustin Hibbits } e_FmMacsecSecYEvents; 502*852ba100SJustin Hibbits 503*852ba100SJustin Hibbits /**************************************************************************//** 504*852ba100SJustin Hibbits @Collection MACSEC SECY Frame Discarded Descriptor error 505*852ba100SJustin Hibbits *//***************************************************************************/ 506*852ba100SJustin Hibbits typedef uint8_t macsecTxScFrameDiscardedErrSelect_t; /**< typedef for defining Frame Discarded Descriptor errors */ 507*852ba100SJustin Hibbits 508*852ba100SJustin Hibbits #define FM_MACSEC_SECY_TX_SC_FRM_DISCAR_ERR_NEXT_PN_ZERO 0x8000 /**< NextPn == 0 */ 509*852ba100SJustin Hibbits #define FM_MACSEC_SECY_TX_SC_FRM_DISCAR_ERR_SC_DISBALE 0x4000 /**< SC is disable */ 510*852ba100SJustin Hibbits /* @} */ 511*852ba100SJustin Hibbits 512*852ba100SJustin Hibbits /**************************************************************************//** 513*852ba100SJustin Hibbits @Function t_FmMacsecSecYExceptionsCallback 514*852ba100SJustin Hibbits 515*852ba100SJustin Hibbits @Description Exceptions user callback routine, will be called upon an 516*852ba100SJustin Hibbits exception passing the exception identification. 517*852ba100SJustin Hibbits 518*852ba100SJustin Hibbits @Param[in] h_App A handle to an application layer object; This handle 519*852ba100SJustin Hibbits will be passed by the driver upon calling this callback. 520*852ba100SJustin Hibbits @Param[in] exception The exception. 521*852ba100SJustin Hibbits *//***************************************************************************/ 522*852ba100SJustin Hibbits typedef void (t_FmMacsecSecYExceptionsCallback) ( t_Handle h_App, 523*852ba100SJustin Hibbits e_FmMacsecSecYExceptions exception); 524*852ba100SJustin Hibbits 525*852ba100SJustin Hibbits /**************************************************************************//** 526*852ba100SJustin Hibbits @Function t_FmMacsecSecYEventsCallback 527*852ba100SJustin Hibbits 528*852ba100SJustin Hibbits @Description Events user callback routine, will be called upon an 529*852ba100SJustin Hibbits event passing the event identification. 530*852ba100SJustin Hibbits 531*852ba100SJustin Hibbits @Param[in] h_App A handle to an application layer object; This handle 532*852ba100SJustin Hibbits will be passed by the driver upon calling this callback. 533*852ba100SJustin Hibbits @Param[in] event The event. 534*852ba100SJustin Hibbits *//***************************************************************************/ 535*852ba100SJustin Hibbits typedef void (t_FmMacsecSecYEventsCallback) ( t_Handle h_App, 536*852ba100SJustin Hibbits e_FmMacsecSecYEvents event); 537*852ba100SJustin Hibbits 538*852ba100SJustin Hibbits /**************************************************************************//** 539*852ba100SJustin Hibbits @Description RFC2863 MIB 540*852ba100SJustin Hibbits *//***************************************************************************/ 541*852ba100SJustin Hibbits typedef struct t_MIBStatistics { 542*852ba100SJustin Hibbits uint64_t ifInOctets; /**< Total number of byte received */ 543*852ba100SJustin Hibbits uint64_t ifInPkts; /**< Total number of packets received */ 544*852ba100SJustin Hibbits uint64_t ifInMcastPkts; /**< Total number of multicast frame received */ 545*852ba100SJustin Hibbits uint64_t ifInBcastPkts; /**< Total number of broadcast frame received */ 546*852ba100SJustin Hibbits uint64_t ifInDiscards; /**< Frames received, but discarded due to problems within the MAC RX : 547*852ba100SJustin Hibbits - InPktsNoTag, 548*852ba100SJustin Hibbits - InPktsLate, 549*852ba100SJustin Hibbits - InPktsOverrun */ 550*852ba100SJustin Hibbits uint64_t ifInErrors; /**< Number of frames received with error: 551*852ba100SJustin Hibbits - InPktsBadTag, 552*852ba100SJustin Hibbits - InPktsNoSCI, 553*852ba100SJustin Hibbits - InPktsNotUsingSA 554*852ba100SJustin Hibbits - InPktsNotValid */ 555*852ba100SJustin Hibbits uint64_t ifOutOctets; /**< Total number of byte sent */ 556*852ba100SJustin Hibbits uint64_t ifOutPkts; /**< Total number of packets sent */ 557*852ba100SJustin Hibbits uint64_t ifOutMcastPkts; /**< Total number of multicast frame sent */ 558*852ba100SJustin Hibbits uint64_t ifOutBcastPkts; /**< Total number of multicast frame sent */ 559*852ba100SJustin Hibbits uint64_t ifOutDiscards; /**< Frames received, but discarded due to problems within the MAC TX N/A! */ 560*852ba100SJustin Hibbits uint64_t ifOutErrors; /**< Number of frames transmitted with error: 561*852ba100SJustin Hibbits - FIFO Overflow Error 562*852ba100SJustin Hibbits - FIFO Underflow Error 563*852ba100SJustin Hibbits - Other */ 564*852ba100SJustin Hibbits } t_MIBStatistics; 565*852ba100SJustin Hibbits 566*852ba100SJustin Hibbits /**************************************************************************//** 567*852ba100SJustin Hibbits @Description MACSEC SecY Rx SA Statistics 568*852ba100SJustin Hibbits *//***************************************************************************/ 569*852ba100SJustin Hibbits typedef struct t_FmMacsecSecYRxSaStatistics { 570*852ba100SJustin Hibbits uint32_t inPktsOK; /**< The number of frames with resolved SCI, have passed all 571*852ba100SJustin Hibbits frame validation frame validation with the validateFrame not set to disable */ 572*852ba100SJustin Hibbits uint32_t inPktsInvalid; /**< The number of frames with resolved SCI, that have failed frame 573*852ba100SJustin Hibbits validation with the validateFrame set to check */ 574*852ba100SJustin Hibbits uint32_t inPktsNotValid; /**< The number of frames with resolved SCI, discarded on the controlled port, 575*852ba100SJustin Hibbits that have failed frame validation with the validateFrame set to strict or the c bit is set */ 576*852ba100SJustin Hibbits uint32_t inPktsNotUsingSA; /**< The number of frames received with resolved SCI and discarded on disabled or 577*852ba100SJustin Hibbits not provisioned SA with validateFrame in the strict mode or the C bit is set */ 578*852ba100SJustin Hibbits uint32_t inPktsUnusedSA; /**< The number of frames received with resolved SCI on disabled or not provisioned SA 579*852ba100SJustin Hibbits with validateFrame not in the strict mode and the C bit is cleared */ 580*852ba100SJustin Hibbits } t_FmMacsecSecYRxSaStatistics; 581*852ba100SJustin Hibbits 582*852ba100SJustin Hibbits /**************************************************************************//** 583*852ba100SJustin Hibbits @Description MACSEC SecY Tx SA Statistics 584*852ba100SJustin Hibbits *//***************************************************************************/ 585*852ba100SJustin Hibbits typedef struct t_FmMacsecSecYTxSaStatistics { 586*852ba100SJustin Hibbits uint64_t outPktsProtected; /**< The number of frames, that the user of the controlled port requested to 587*852ba100SJustin Hibbits be transmitted, which were integrity protected */ 588*852ba100SJustin Hibbits uint64_t outPktsEncrypted; /**< The number of frames, that the user of the controlled port requested to 589*852ba100SJustin Hibbits be transmitted, which were confidentiality protected */ 590*852ba100SJustin Hibbits } t_FmMacsecSecYTxSaStatistics; 591*852ba100SJustin Hibbits 592*852ba100SJustin Hibbits /**************************************************************************//** 593*852ba100SJustin Hibbits @Description MACSEC SecY Rx SC Statistics 594*852ba100SJustin Hibbits *//***************************************************************************/ 595*852ba100SJustin Hibbits typedef struct t_FmMacsecSecYRxScStatistics { 596*852ba100SJustin Hibbits uint64_t inPktsUnchecked; /**< The number of frames with resolved SCI, delivered to the user of a controlled port, 597*852ba100SJustin Hibbits that are not validated with the validateFrame set to disable */ 598*852ba100SJustin Hibbits uint64_t inPktsDelayed; /**< The number of frames with resolved SCI, delivered to the user of a controlled port, 599*852ba100SJustin Hibbits that have their PN smaller than the lowest_PN with the validateFrame set to 600*852ba100SJustin Hibbits disable or replayProtect disabled */ 601*852ba100SJustin Hibbits uint64_t inPktsLate; /**< The number of frames with resolved SCI, discarded on the controlled port, 602*852ba100SJustin Hibbits that have their PN smaller than the lowest_PN with the validateFrame set to 603*852ba100SJustin Hibbits Check or Strict and replayProtect enabled */ 604*852ba100SJustin Hibbits uint64_t inPktsOK; /**< The number of frames with resolved SCI, have passed all 605*852ba100SJustin Hibbits frame validation frame validation with the validateFrame not set to disable */ 606*852ba100SJustin Hibbits uint64_t inPktsInvalid; /**< The number of frames with resolved SCI, that have failed frame 607*852ba100SJustin Hibbits validation with the validateFrame set to check */ 608*852ba100SJustin Hibbits uint64_t inPktsNotValid; /**< The number of frames with resolved SCI, discarded on the controlled port, 609*852ba100SJustin Hibbits that have failed frame validation with the validateFrame set to strict or the c bit is set */ 610*852ba100SJustin Hibbits uint64_t inPktsNotUsingSA; /**< The number of frames received with resolved SCI and discarded on disabled or 611*852ba100SJustin Hibbits not provisioned SA with validateFrame in the strict mode or the C bit is set */ 612*852ba100SJustin Hibbits uint64_t inPktsUnusedSA; /**< The number of frames received with resolved SCI on disabled or not provisioned SA 613*852ba100SJustin Hibbits with validateFrame not in the strict mode and the C bit is cleared */ 614*852ba100SJustin Hibbits } t_FmMacsecSecYRxScStatistics; 615*852ba100SJustin Hibbits 616*852ba100SJustin Hibbits /**************************************************************************//** 617*852ba100SJustin Hibbits @Description MACSEC SecY Tx SC Statistics 618*852ba100SJustin Hibbits *//***************************************************************************/ 619*852ba100SJustin Hibbits typedef struct t_FmMacsecSecYTxScStatistics { 620*852ba100SJustin Hibbits uint64_t outPktsProtected; /**< The number of frames, that the user of the controlled port requested to 621*852ba100SJustin Hibbits be transmitted, which were integrity protected */ 622*852ba100SJustin Hibbits uint64_t outPktsEncrypted; /**< The number of frames, that the user of the controlled port requested to 623*852ba100SJustin Hibbits be transmitted, which were confidentiality protected */ 624*852ba100SJustin Hibbits } t_FmMacsecSecYTxScStatistics; 625*852ba100SJustin Hibbits 626*852ba100SJustin Hibbits /**************************************************************************//** 627*852ba100SJustin Hibbits @Description MACSEC SecY Statistics 628*852ba100SJustin Hibbits *//***************************************************************************/ 629*852ba100SJustin Hibbits typedef struct t_FmMacsecSecYStatistics { 630*852ba100SJustin Hibbits t_MIBStatistics mibCtrlStatistics; /**< Controlled port MIB statistics */ 631*852ba100SJustin Hibbits t_MIBStatistics mibNonCtrlStatistics; /**< Uncontrolled port MIB statistics */ 632*852ba100SJustin Hibbits /* Frame verification statistics */ 633*852ba100SJustin Hibbits uint64_t inPktsUntagged; /**< The number of received packets without the MAC security tag 634*852ba100SJustin Hibbits (SecTAG) with validateFrames which is not in the strict mode */ 635*852ba100SJustin Hibbits uint64_t inPktsNoTag; /**< The number of received packets discarded without the 636*852ba100SJustin Hibbits MAC security tag (SecTAG) with validateFrames which is in the strict mode */ 637*852ba100SJustin Hibbits uint64_t inPktsBadTag; /**< The number of received packets discarded with an invalid 638*852ba100SJustin Hibbits SecTAG or a zero value PN or an invalid ICV */ 639*852ba100SJustin Hibbits uint64_t inPktsUnknownSCI; /**< The number of received packets with unknown SCI with the 640*852ba100SJustin Hibbits condition : validateFrames is not in the strict mode and the 641*852ba100SJustin Hibbits C bit in the SecTAG is not set */ 642*852ba100SJustin Hibbits uint64_t inPktsNoSCI; /**< The number of received packets discarded with unknown SCI 643*852ba100SJustin Hibbits information with the condition : validateFrames is in the strict mode 644*852ba100SJustin Hibbits or the C bit in the SecTAG is set */ 645*852ba100SJustin Hibbits uint64_t inPktsOverrun; /**< The number of packets discarded because the number of 646*852ba100SJustin Hibbits received packets exceeded the cryptographic performance capabilities */ 647*852ba100SJustin Hibbits /* Frame validation statistics */ 648*852ba100SJustin Hibbits uint64_t inOctetsValidated; /**< The number of octets of plaintext recovered from received frames with 649*852ba100SJustin Hibbits resolved SCI that were integrity protected but not encrypted */ 650*852ba100SJustin Hibbits uint64_t inOctetsDecrypted; /**< The number of octets of plaintext recovered from received frames with 651*852ba100SJustin Hibbits resolved SCI that were integrity protected and encrypted */ 652*852ba100SJustin Hibbits /* Frame generation statistics */ 653*852ba100SJustin Hibbits uint64_t outPktsUntagged; /**< The number of frames, that the user of the controlled port requested to 654*852ba100SJustin Hibbits be transmitted, with protectFrame false */ 655*852ba100SJustin Hibbits uint64_t outPktsTooLong; /**< The number of frames, that the user of the controlled port requested to 656*852ba100SJustin Hibbits be transmitted, discarded due to length being larger than Maximum Frame Length (MACSEC_MFL) */ 657*852ba100SJustin Hibbits /* Frame protection statistics */ 658*852ba100SJustin Hibbits uint64_t outOctetsProtected; /**< The number of octets of User Data in transmitted frames that were 659*852ba100SJustin Hibbits integrity protected but not encrypted */ 660*852ba100SJustin Hibbits uint64_t outOctetsEncrypted; /**< The number of octets of User Data in transmitted frames that were 661*852ba100SJustin Hibbits both integrity protected and encrypted */ 662*852ba100SJustin Hibbits } t_FmMacsecSecYStatistics; 663*852ba100SJustin Hibbits 664*852ba100SJustin Hibbits 665*852ba100SJustin Hibbits /**************************************************************************//** 666*852ba100SJustin Hibbits @Description MACSEC SecY SC Params 667*852ba100SJustin Hibbits *//***************************************************************************/ 668*852ba100SJustin Hibbits typedef struct t_FmMacsecSecYSCParams { 669*852ba100SJustin Hibbits macsecSCI_t sci; /**< The secure channel identification of the SC */ 670*852ba100SJustin Hibbits e_FmMacsecSecYCipherSuite cipherSuite; /**< Cipher suite to be used for the SC */ 671*852ba100SJustin Hibbits } t_FmMacsecSecYSCParams; 672*852ba100SJustin Hibbits 673*852ba100SJustin Hibbits /**************************************************************************//** 674*852ba100SJustin Hibbits @Group FM_MACSEC_SECY_init_grp FM-MACSEC SecY Initialization Unit 675*852ba100SJustin Hibbits 676*852ba100SJustin Hibbits @Description FM-MACSEC SecY Initialization Unit 677*852ba100SJustin Hibbits 678*852ba100SJustin Hibbits @{ 679*852ba100SJustin Hibbits *//***************************************************************************/ 680*852ba100SJustin Hibbits 681*852ba100SJustin Hibbits /**************************************************************************//** 682*852ba100SJustin Hibbits @Description enum for validate frames 683*852ba100SJustin Hibbits *//***************************************************************************/ 684*852ba100SJustin Hibbits typedef enum e_FmMacsecValidFrameBehavior { 685*852ba100SJustin Hibbits e_FM_MACSEC_VALID_FRAME_BEHAVIOR_DISABLE = 0, /**< disable the validation function */ 686*852ba100SJustin Hibbits e_FM_MACSEC_VALID_FRAME_BEHAVIOR_CHECK, /**< enable the validation function but only for checking 687*852ba100SJustin Hibbits without filtering out invalid frames */ 688*852ba100SJustin Hibbits e_FM_MACSEC_VALID_FRAME_BEHAVIOR_STRICT /**< enable the validation function and also strictly filter 689*852ba100SJustin Hibbits out those invalid frames */ 690*852ba100SJustin Hibbits } e_FmMacsecValidFrameBehavior; 691*852ba100SJustin Hibbits 692*852ba100SJustin Hibbits /**************************************************************************//** 693*852ba100SJustin Hibbits @Description enum for sci insertion 694*852ba100SJustin Hibbits *//***************************************************************************/ 695*852ba100SJustin Hibbits typedef enum e_FmMacsecSciInsertionMode { 696*852ba100SJustin Hibbits e_FM_MACSEC_SCI_INSERTION_MODE_EXPLICIT_SECTAG = 0, /**< explicit sci in the sectag */ 697*852ba100SJustin Hibbits e_FM_MACSEC_SCI_INSERTION_MODE_EXPLICIT_MAC_SA, /**< mac sa is overwritten with the sci*/ 698*852ba100SJustin Hibbits e_FM_MACSEC_SCI_INSERTION_MODE_IMPLICT_PTP /**< implicit point-to-point sci (pre-shared) */ 699*852ba100SJustin Hibbits } e_FmMacsecSciInsertionMode; 700*852ba100SJustin Hibbits 701*852ba100SJustin Hibbits /**************************************************************************//** 702*852ba100SJustin Hibbits @Description FM MACSEC SecY config input 703*852ba100SJustin Hibbits *//***************************************************************************/ 704*852ba100SJustin Hibbits typedef struct t_FmMacsecSecYParams { 705*852ba100SJustin Hibbits t_Handle h_FmMacsec; /**< A handle to the FM MACSEC object */ 706*852ba100SJustin Hibbits t_FmMacsecSecYSCParams txScParams; /**< Tx SC Params */ 707*852ba100SJustin Hibbits uint32_t numReceiveChannels; /**< Number of receive channels dedicated to this SecY */ 708*852ba100SJustin Hibbits t_FmMacsecSecYExceptionsCallback *f_Exception; /**< Callback routine to be called by the driver upon SecY exception */ 709*852ba100SJustin Hibbits t_FmMacsecSecYEventsCallback *f_Event; /**< Callback routine to be called by the driver upon SecY event */ 710*852ba100SJustin Hibbits t_Handle h_App; /**< A handle to an application layer object; This handle will 711*852ba100SJustin Hibbits be passed by the driver upon calling the above callbacks */ 712*852ba100SJustin Hibbits } t_FmMacsecSecYParams; 713*852ba100SJustin Hibbits 714*852ba100SJustin Hibbits /**************************************************************************//** 715*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_Config 716*852ba100SJustin Hibbits 717*852ba100SJustin Hibbits @Description Creates descriptor for the FM MACSEC SECY module; 718*852ba100SJustin Hibbits 719*852ba100SJustin Hibbits The routine returns a handle (descriptor) to the FM MACSEC SECY object; 720*852ba100SJustin Hibbits This descriptor must be passed as first parameter to all other 721*852ba100SJustin Hibbits FM MACSEC SECY function calls; 722*852ba100SJustin Hibbits No actual initialization or configuration of FM MACSEC SecY hardware is 723*852ba100SJustin Hibbits done by this routine. 724*852ba100SJustin Hibbits 725*852ba100SJustin Hibbits @Param[in] p_FmMacsecSecYParam Pointer to data structure of parameters. 726*852ba100SJustin Hibbits 727*852ba100SJustin Hibbits @Return Handle to FM MACSEC SECY object, or NULL for Failure. 728*852ba100SJustin Hibbits *//***************************************************************************/ 729*852ba100SJustin Hibbits t_Handle FM_MACSEC_SECY_Config(t_FmMacsecSecYParams *p_FmMacsecSecYParam); 730*852ba100SJustin Hibbits 731*852ba100SJustin Hibbits /**************************************************************************//** 732*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_Init 733*852ba100SJustin Hibbits 734*852ba100SJustin Hibbits @Description Initializes the FM MACSEC SECY module. 735*852ba100SJustin Hibbits 736*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 737*852ba100SJustin Hibbits 738*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 739*852ba100SJustin Hibbits *//***************************************************************************/ 740*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_Init(t_Handle h_FmMacsecSecY); 741*852ba100SJustin Hibbits 742*852ba100SJustin Hibbits /**************************************************************************//** 743*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_Free 744*852ba100SJustin Hibbits 745*852ba100SJustin Hibbits @Description Frees all resources that were assigned to FM MACSEC SECY module. 746*852ba100SJustin Hibbits 747*852ba100SJustin Hibbits Calling this routine invalidates the descriptor. 748*852ba100SJustin Hibbits 749*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 750*852ba100SJustin Hibbits 751*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 752*852ba100SJustin Hibbits *//***************************************************************************/ 753*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_Free(t_Handle h_FmMacsecSecY); 754*852ba100SJustin Hibbits 755*852ba100SJustin Hibbits /**************************************************************************//** 756*852ba100SJustin Hibbits @Group FM_MACSEC_SECY_advanced_init_grp FM-MACSEC SecY Advanced Configuration Unit 757*852ba100SJustin Hibbits 758*852ba100SJustin Hibbits @Description Configuration functions used to change default values. 759*852ba100SJustin Hibbits 760*852ba100SJustin Hibbits @{ 761*852ba100SJustin Hibbits *//***************************************************************************/ 762*852ba100SJustin Hibbits 763*852ba100SJustin Hibbits /**************************************************************************//** 764*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_ConfigSciInsertionMode 765*852ba100SJustin Hibbits 766*852ba100SJustin Hibbits @Description Calling this routine changes the SCI-insertion-mode in the 767*852ba100SJustin Hibbits internal driver data base from its default configuration 768*852ba100SJustin Hibbits [DEFAULT_sciInsertionMode] 769*852ba100SJustin Hibbits 770*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 771*852ba100SJustin Hibbits @Param[in] sciInsertionMode Sci insertion mode 772*852ba100SJustin Hibbits 773*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 774*852ba100SJustin Hibbits 775*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init(); 776*852ba100SJustin Hibbits 777*852ba100SJustin Hibbits *//***************************************************************************/ 778*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_ConfigSciInsertionMode(t_Handle h_FmMacsecSecY, e_FmMacsecSciInsertionMode sciInsertionMode); 779*852ba100SJustin Hibbits 780*852ba100SJustin Hibbits /**************************************************************************//** 781*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_ConfigProtectFrames 782*852ba100SJustin Hibbits 783*852ba100SJustin Hibbits @Description Calling this routine changes the protect-frame mode in the 784*852ba100SJustin Hibbits internal driver data base from its default configuration 785*852ba100SJustin Hibbits [DEFAULT_protectFrames] 786*852ba100SJustin Hibbits 787*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 788*852ba100SJustin Hibbits @Param[in] protectFrames If FALSE, frames are transmitted without modification 789*852ba100SJustin Hibbits 790*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 791*852ba100SJustin Hibbits 792*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init(); 793*852ba100SJustin Hibbits 794*852ba100SJustin Hibbits *//***************************************************************************/ 795*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_ConfigProtectFrames(t_Handle h_FmMacsecSecY, bool protectFrames); 796*852ba100SJustin Hibbits 797*852ba100SJustin Hibbits /**************************************************************************//** 798*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_ConfigReplayWindow 799*852ba100SJustin Hibbits 800*852ba100SJustin Hibbits @Description Calling this routine changes the replay-window settings in the 801*852ba100SJustin Hibbits internal driver data base from its default configuration 802*852ba100SJustin Hibbits [DEFAULT_replayEnable], [DEFAULT_replayWindow] 803*852ba100SJustin Hibbits 804*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 805*852ba100SJustin Hibbits @Param[in] replayProtect; Replay protection function mode 806*852ba100SJustin Hibbits @Param[in] replayWindow; The size of the replay window 807*852ba100SJustin Hibbits 808*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 809*852ba100SJustin Hibbits 810*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init(); 811*852ba100SJustin Hibbits 812*852ba100SJustin Hibbits *//***************************************************************************/ 813*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_ConfigReplayWindow(t_Handle h_FmMacsecSecY, bool replayProtect, uint32_t replayWindow); 814*852ba100SJustin Hibbits 815*852ba100SJustin Hibbits /**************************************************************************//** 816*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_ConfigValidationMode 817*852ba100SJustin Hibbits 818*852ba100SJustin Hibbits @Description Calling this routine changes the frame-validation-behavior mode 819*852ba100SJustin Hibbits in the internal driver data base from its default configuration 820*852ba100SJustin Hibbits [DEFAULT_validateFrames] 821*852ba100SJustin Hibbits 822*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 823*852ba100SJustin Hibbits @Param[in] validateFrames Validation function mode 824*852ba100SJustin Hibbits 825*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 826*852ba100SJustin Hibbits 827*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init(); 828*852ba100SJustin Hibbits 829*852ba100SJustin Hibbits *//***************************************************************************/ 830*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_ConfigValidationMode(t_Handle h_FmMacsecSecY, e_FmMacsecValidFrameBehavior validateFrames); 831*852ba100SJustin Hibbits 832*852ba100SJustin Hibbits /**************************************************************************//** 833*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_ConfigConfidentiality 834*852ba100SJustin Hibbits 835*852ba100SJustin Hibbits @Description Calling this routine changes the confidentiality settings in the 836*852ba100SJustin Hibbits internal driver data base from its default configuration 837*852ba100SJustin Hibbits [DEFAULT_confidentialityEnable], [DEFAULT_confidentialityOffset] 838*852ba100SJustin Hibbits 839*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 840*852ba100SJustin Hibbits @Param[in] confidentialityEnable TRUE - confidentiality protection and integrity protection 841*852ba100SJustin Hibbits FALSE - no confidentiality protection, only integrity protection 842*852ba100SJustin Hibbits @Param[in] confidentialityOffset The number of initial octets of each MSDU without confidentiality protection 843*852ba100SJustin Hibbits common values are 0, 30, and 50 844*852ba100SJustin Hibbits 845*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 846*852ba100SJustin Hibbits 847*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init(); 848*852ba100SJustin Hibbits 849*852ba100SJustin Hibbits *//***************************************************************************/ 850*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_ConfigConfidentiality(t_Handle h_FmMacsecSecY, bool confidentialityEnable, uint16_t confidentialityOffset); 851*852ba100SJustin Hibbits 852*852ba100SJustin Hibbits /**************************************************************************//** 853*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_ConfigPointToPoint 854*852ba100SJustin Hibbits 855*852ba100SJustin Hibbits @Description configure this SecY to work in point-to-point mode, means that 856*852ba100SJustin Hibbits it will have only one rx sc; 857*852ba100SJustin Hibbits 858*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 859*852ba100SJustin Hibbits 860*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 861*852ba100SJustin Hibbits 862*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init(); 863*852ba100SJustin Hibbits Can be called only once in a system; only the first secY that will call this 864*852ba100SJustin Hibbits routine will be able to operate in Point-To-Point mode. 865*852ba100SJustin Hibbits *//***************************************************************************/ 866*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_ConfigPointToPoint(t_Handle h_FmMacsecSecY); 867*852ba100SJustin Hibbits 868*852ba100SJustin Hibbits /**************************************************************************//** 869*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_ConfigException 870*852ba100SJustin Hibbits 871*852ba100SJustin Hibbits @Description Calling this routine changes the internal driver data base 872*852ba100SJustin Hibbits from its default selection of exceptions enablement; 873*852ba100SJustin Hibbits By default all exceptions are enabled. 874*852ba100SJustin Hibbits 875*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 876*852ba100SJustin Hibbits @Param[in] exception The exception to be selected. 877*852ba100SJustin Hibbits @Param[in] enable TRUE to enable interrupt, FALSE to mask it. 878*852ba100SJustin Hibbits 879*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 880*852ba100SJustin Hibbits 881*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init(). 882*852ba100SJustin Hibbits *//***************************************************************************/ 883*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_ConfigException(t_Handle h_FmMacsecSecY, e_FmMacsecSecYExceptions exception, bool enable); 884*852ba100SJustin Hibbits 885*852ba100SJustin Hibbits /**************************************************************************//** 886*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_ConfigEvent 887*852ba100SJustin Hibbits 888*852ba100SJustin Hibbits @Description Calling this routine changes the internal driver data base 889*852ba100SJustin Hibbits from its default selection of events enablement; 890*852ba100SJustin Hibbits By default all events are enabled. 891*852ba100SJustin Hibbits 892*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 893*852ba100SJustin Hibbits @Param[in] event The event to be selected. 894*852ba100SJustin Hibbits @Param[in] enable TRUE to enable interrupt, FALSE to mask it. 895*852ba100SJustin Hibbits 896*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 897*852ba100SJustin Hibbits 898*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init(). 899*852ba100SJustin Hibbits *//***************************************************************************/ 900*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_ConfigEvent(t_Handle h_FmMacsecSecY, e_FmMacsecSecYEvents event, bool enable); 901*852ba100SJustin Hibbits 902*852ba100SJustin Hibbits /** @} */ /* end of FM_MACSEC_SECY_advanced_init_grp group */ 903*852ba100SJustin Hibbits /** @} */ /* end of FM_MACSEC_SECY_init_grp group */ 904*852ba100SJustin Hibbits 905*852ba100SJustin Hibbits 906*852ba100SJustin Hibbits /**************************************************************************//** 907*852ba100SJustin Hibbits @Group FM_MACSEC_SECY_runtime_control_grp FM-MACSEC SecY Runtime Control Unit 908*852ba100SJustin Hibbits 909*852ba100SJustin Hibbits @Description FM MACSEC SECY Runtime control unit API functions, definitions and enums. 910*852ba100SJustin Hibbits 911*852ba100SJustin Hibbits @{ 912*852ba100SJustin Hibbits *//***************************************************************************/ 913*852ba100SJustin Hibbits 914*852ba100SJustin Hibbits /**************************************************************************//** 915*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_CreateRxSc 916*852ba100SJustin Hibbits 917*852ba100SJustin Hibbits @Description Create a receive secure channel. 918*852ba100SJustin Hibbits 919*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 920*852ba100SJustin Hibbits @Param[in] scParams secure channel params. 921*852ba100SJustin Hibbits 922*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 923*852ba100SJustin Hibbits 924*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 925*852ba100SJustin Hibbits *//***************************************************************************/ 926*852ba100SJustin Hibbits t_Handle FM_MACSEC_SECY_CreateRxSc(t_Handle h_FmMacsecSecY, t_FmMacsecSecYSCParams *p_ScParams); 927*852ba100SJustin Hibbits 928*852ba100SJustin Hibbits /**************************************************************************//** 929*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_DeleteRxSc 930*852ba100SJustin Hibbits 931*852ba100SJustin Hibbits @Description Deleting an initialized secure channel. 932*852ba100SJustin Hibbits 933*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 934*852ba100SJustin Hibbits @Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc. 935*852ba100SJustin Hibbits 936*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 937*852ba100SJustin Hibbits 938*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_CreateRxSc(). 939*852ba100SJustin Hibbits *//***************************************************************************/ 940*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_DeleteRxSc(t_Handle h_FmMacsecSecY, t_Handle h_Sc); 941*852ba100SJustin Hibbits 942*852ba100SJustin Hibbits /**************************************************************************//** 943*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_CreateRxSa 944*852ba100SJustin Hibbits 945*852ba100SJustin Hibbits @Description Create a receive secure association for the secure channel; 946*852ba100SJustin Hibbits the SA cannot be used to receive frames until FM_MACSEC_SECY_RxSaEnableReceive is called. 947*852ba100SJustin Hibbits 948*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 949*852ba100SJustin Hibbits @Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc. 950*852ba100SJustin Hibbits @Param[in] an association number represent the SA. 951*852ba100SJustin Hibbits @Param[in] lowestPn the lowest acceptable PN value for a received frame. 952*852ba100SJustin Hibbits @Param[in] key the desired key for this SA. 953*852ba100SJustin Hibbits 954*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 955*852ba100SJustin Hibbits 956*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_CreateRxSc(). 957*852ba100SJustin Hibbits *//***************************************************************************/ 958*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_CreateRxSa(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an, uint32_t lowestPn, macsecSAKey_t key); 959*852ba100SJustin Hibbits 960*852ba100SJustin Hibbits /**************************************************************************//** 961*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_DeleteRxSa 962*852ba100SJustin Hibbits 963*852ba100SJustin Hibbits @Description Deleting an initialized secure association. 964*852ba100SJustin Hibbits 965*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 966*852ba100SJustin Hibbits @Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc. 967*852ba100SJustin Hibbits @Param[in] an association number represent the SA. 968*852ba100SJustin Hibbits 969*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 970*852ba100SJustin Hibbits 971*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 972*852ba100SJustin Hibbits *//***************************************************************************/ 973*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_DeleteRxSa(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an); 974*852ba100SJustin Hibbits 975*852ba100SJustin Hibbits /**************************************************************************//** 976*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_RxSaEnableReceive 977*852ba100SJustin Hibbits 978*852ba100SJustin Hibbits @Description Enabling the SA to receive frames. 979*852ba100SJustin Hibbits 980*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 981*852ba100SJustin Hibbits @Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc. 982*852ba100SJustin Hibbits @Param[in] an association number represent the SA. 983*852ba100SJustin Hibbits 984*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 985*852ba100SJustin Hibbits 986*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_CreateRxSa(). 987*852ba100SJustin Hibbits *//***************************************************************************/ 988*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_RxSaEnableReceive(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an); 989*852ba100SJustin Hibbits 990*852ba100SJustin Hibbits /**************************************************************************//** 991*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_RxSaDisableReceive 992*852ba100SJustin Hibbits 993*852ba100SJustin Hibbits @Description Disabling the SA from receive frames. 994*852ba100SJustin Hibbits 995*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 996*852ba100SJustin Hibbits @Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc. 997*852ba100SJustin Hibbits @Param[in] an association number represent the SA. 998*852ba100SJustin Hibbits 999*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1000*852ba100SJustin Hibbits 1001*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_CreateRxSa(). 1002*852ba100SJustin Hibbits *//***************************************************************************/ 1003*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_RxSaDisableReceive(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an); 1004*852ba100SJustin Hibbits 1005*852ba100SJustin Hibbits /**************************************************************************//** 1006*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_RxSaUpdateNextPn 1007*852ba100SJustin Hibbits 1008*852ba100SJustin Hibbits @Description Update the next packet number expected on RX; 1009*852ba100SJustin Hibbits The value of nextPN shall be set to the greater of its existing value and the 1010*852ba100SJustin Hibbits supplied of updtNextPN (802.1AE-2006 10.7.15). 1011*852ba100SJustin Hibbits 1012*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1013*852ba100SJustin Hibbits @Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc. 1014*852ba100SJustin Hibbits @Param[in] an association number represent the SA. 1015*852ba100SJustin Hibbits @Param[in] updtNextPN the next PN value for a received frame. 1016*852ba100SJustin Hibbits 1017*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1018*852ba100SJustin Hibbits 1019*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_CreateRxSa(). 1020*852ba100SJustin Hibbits *//***************************************************************************/ 1021*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_RxSaUpdateNextPn(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an, uint32_t updtNextPN); 1022*852ba100SJustin Hibbits 1023*852ba100SJustin Hibbits /**************************************************************************//** 1024*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_RxSaUpdateLowestPn 1025*852ba100SJustin Hibbits 1026*852ba100SJustin Hibbits @Description Update the lowest packet number expected on RX; 1027*852ba100SJustin Hibbits The value of lowestPN shall be set to the greater of its existing value and the 1028*852ba100SJustin Hibbits supplied of updtLowestPN (802.1AE-2006 10.7.15). 1029*852ba100SJustin Hibbits 1030*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1031*852ba100SJustin Hibbits @Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc. 1032*852ba100SJustin Hibbits @Param[in] an association number represent the SA. 1033*852ba100SJustin Hibbits @Param[in] updtLowestPN the lowest PN acceptable value for a received frame. 1034*852ba100SJustin Hibbits 1035*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1036*852ba100SJustin Hibbits 1037*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_CreateRxSa(). 1038*852ba100SJustin Hibbits *//***************************************************************************/ 1039*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_RxSaUpdateLowestPn(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an, uint32_t updtLowestPN); 1040*852ba100SJustin Hibbits 1041*852ba100SJustin Hibbits /**************************************************************************//** 1042*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_RxSaModifyKey 1043*852ba100SJustin Hibbits 1044*852ba100SJustin Hibbits @Description Modify the current key of the SA with a new one. 1045*852ba100SJustin Hibbits 1046*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1047*852ba100SJustin Hibbits @Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc. 1048*852ba100SJustin Hibbits @Param[in] an association number represent the SA. 1049*852ba100SJustin Hibbits @Param[in] key new key to replace the current key. 1050*852ba100SJustin Hibbits 1051*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1052*852ba100SJustin Hibbits 1053*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_CreateRxSa(). 1054*852ba100SJustin Hibbits *//***************************************************************************/ 1055*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_RxSaModifyKey(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an, macsecSAKey_t key); 1056*852ba100SJustin Hibbits 1057*852ba100SJustin Hibbits /**************************************************************************//** 1058*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_CreateTxSa 1059*852ba100SJustin Hibbits 1060*852ba100SJustin Hibbits @Description Create a transmit secure association for the secure channel; 1061*852ba100SJustin Hibbits the SA cannot be used to transmit frames until FM_MACSEC_SECY_TxSaSetActivate is called; 1062*852ba100SJustin Hibbits Only one SA can be active at a time. 1063*852ba100SJustin Hibbits 1064*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1065*852ba100SJustin Hibbits @Param[in] an association number represent the SA. 1066*852ba100SJustin Hibbits @Param[in] key the desired key for this SA. 1067*852ba100SJustin Hibbits 1068*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1069*852ba100SJustin Hibbits 1070*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 1071*852ba100SJustin Hibbits *//***************************************************************************/ 1072*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_CreateTxSa(t_Handle h_FmMacsecSecY, macsecAN_t an, macsecSAKey_t key); 1073*852ba100SJustin Hibbits 1074*852ba100SJustin Hibbits /**************************************************************************//** 1075*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_DeleteTxSa 1076*852ba100SJustin Hibbits 1077*852ba100SJustin Hibbits @Description Deleting an initialized secure association. 1078*852ba100SJustin Hibbits 1079*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1080*852ba100SJustin Hibbits @Param[in] an association number represent the SA. 1081*852ba100SJustin Hibbits 1082*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1083*852ba100SJustin Hibbits 1084*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 1085*852ba100SJustin Hibbits *//***************************************************************************/ 1086*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_DeleteTxSa(t_Handle h_FmMacsecSecY, macsecAN_t an); 1087*852ba100SJustin Hibbits 1088*852ba100SJustin Hibbits /**************************************************************************//** 1089*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_TxSaModifyKey 1090*852ba100SJustin Hibbits 1091*852ba100SJustin Hibbits @Description Modify the key of the inactive SA with a new one. 1092*852ba100SJustin Hibbits 1093*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1094*852ba100SJustin Hibbits @Param[in] nextActiveAn association number represent the next SA to be activated. 1095*852ba100SJustin Hibbits @Param[in] key new key to replace the current key. 1096*852ba100SJustin Hibbits 1097*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1098*852ba100SJustin Hibbits 1099*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 1100*852ba100SJustin Hibbits *//***************************************************************************/ 1101*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_TxSaModifyKey(t_Handle h_FmMacsecSecY, macsecAN_t nextActiveAn, macsecSAKey_t key); 1102*852ba100SJustin Hibbits 1103*852ba100SJustin Hibbits /**************************************************************************//** 1104*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_TxSaSetActive 1105*852ba100SJustin Hibbits 1106*852ba100SJustin Hibbits @Description Set this SA to the active SA to be used on TX for SC; 1107*852ba100SJustin Hibbits only one SA can be active at a time. 1108*852ba100SJustin Hibbits 1109*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1110*852ba100SJustin Hibbits @Param[in] an association number represent the SA. 1111*852ba100SJustin Hibbits 1112*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1113*852ba100SJustin Hibbits 1114*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 1115*852ba100SJustin Hibbits *//***************************************************************************/ 1116*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_TxSaSetActive(t_Handle h_FmMacsecSecY, macsecAN_t an); 1117*852ba100SJustin Hibbits 1118*852ba100SJustin Hibbits /**************************************************************************//** 1119*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_TxSaGetActive 1120*852ba100SJustin Hibbits 1121*852ba100SJustin Hibbits @Description Get the active SA that being used for TX. 1122*852ba100SJustin Hibbits 1123*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1124*852ba100SJustin Hibbits @Param[out] p_An the active an. 1125*852ba100SJustin Hibbits 1126*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1127*852ba100SJustin Hibbits 1128*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 1129*852ba100SJustin Hibbits *//***************************************************************************/ 1130*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_TxSaGetActive(t_Handle h_FmMacsecSecY, macsecAN_t *p_An); 1131*852ba100SJustin Hibbits 1132*852ba100SJustin Hibbits /**************************************************************************//** 1133*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_GetStatistics 1134*852ba100SJustin Hibbits 1135*852ba100SJustin Hibbits @Description get all statistics counters. 1136*852ba100SJustin Hibbits 1137*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1138*852ba100SJustin Hibbits @Param[in] p_Statistics Structure with statistics. 1139*852ba100SJustin Hibbits 1140*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1141*852ba100SJustin Hibbits 1142*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 1143*852ba100SJustin Hibbits *//***************************************************************************/ 1144*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_GetStatistics(t_Handle h_FmMacsecSecY, t_FmMacsecSecYStatistics *p_Statistics); 1145*852ba100SJustin Hibbits 1146*852ba100SJustin Hibbits /**************************************************************************//** 1147*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_RxScGetStatistics 1148*852ba100SJustin Hibbits 1149*852ba100SJustin Hibbits @Description get all statistics counters. 1150*852ba100SJustin Hibbits 1151*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1152*852ba100SJustin Hibbits @Param[in] h_Sc Rx Sc handle. 1153*852ba100SJustin Hibbits @Param[in] p_Statistics Structure with statistics. 1154*852ba100SJustin Hibbits 1155*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1156*852ba100SJustin Hibbits 1157*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 1158*852ba100SJustin Hibbits *//***************************************************************************/ 1159*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_RxScGetStatistics(t_Handle h_FmMacsecSecY, t_Handle h_Sc, t_FmMacsecSecYRxScStatistics *p_Statistics); 1160*852ba100SJustin Hibbits 1161*852ba100SJustin Hibbits /**************************************************************************//** 1162*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_RxSaGetStatistics 1163*852ba100SJustin Hibbits 1164*852ba100SJustin Hibbits @Description get all statistics counters 1165*852ba100SJustin Hibbits 1166*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1167*852ba100SJustin Hibbits @Param[in] h_Sc Rx Sc handle. 1168*852ba100SJustin Hibbits @Param[in] an association number represent the SA. 1169*852ba100SJustin Hibbits @Param[in] p_Statistics Structure with statistics. 1170*852ba100SJustin Hibbits 1171*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1172*852ba100SJustin Hibbits 1173*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 1174*852ba100SJustin Hibbits *//***************************************************************************/ 1175*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_RxSaGetStatistics(t_Handle h_FmMacsecSecY, t_Handle h_Sc, macsecAN_t an, t_FmMacsecSecYRxSaStatistics *p_Statistics); 1176*852ba100SJustin Hibbits 1177*852ba100SJustin Hibbits /**************************************************************************//** 1178*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_TxScGetStatistics 1179*852ba100SJustin Hibbits 1180*852ba100SJustin Hibbits @Description get all statistics counters. 1181*852ba100SJustin Hibbits 1182*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1183*852ba100SJustin Hibbits @Param[in] p_Statistics Structure with statistics. 1184*852ba100SJustin Hibbits 1185*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1186*852ba100SJustin Hibbits 1187*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 1188*852ba100SJustin Hibbits *//***************************************************************************/ 1189*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_TxScGetStatistics(t_Handle h_FmMacsecSecY, t_FmMacsecSecYTxScStatistics *p_Statistics); 1190*852ba100SJustin Hibbits 1191*852ba100SJustin Hibbits /**************************************************************************//** 1192*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_TxSaGetStatistics 1193*852ba100SJustin Hibbits 1194*852ba100SJustin Hibbits @Description get all statistics counters. 1195*852ba100SJustin Hibbits 1196*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1197*852ba100SJustin Hibbits @Param[in] an association number represent the SA. 1198*852ba100SJustin Hibbits @Param[in] p_Statistics Structure with statistics. 1199*852ba100SJustin Hibbits 1200*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1201*852ba100SJustin Hibbits 1202*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 1203*852ba100SJustin Hibbits *//***************************************************************************/ 1204*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_TxSaGetStatistics(t_Handle h_FmMacsecSecY, macsecAN_t an, t_FmMacsecSecYTxSaStatistics *p_Statistics); 1205*852ba100SJustin Hibbits 1206*852ba100SJustin Hibbits /**************************************************************************//** 1207*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_SetException 1208*852ba100SJustin Hibbits 1209*852ba100SJustin Hibbits @Description Calling this routine enables/disables the specified exception. 1210*852ba100SJustin Hibbits 1211*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1212*852ba100SJustin Hibbits @Param[in] exception The exception to be selected. 1213*852ba100SJustin Hibbits @Param[in] enable TRUE to enable interrupt, FALSE to mask it. 1214*852ba100SJustin Hibbits 1215*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1216*852ba100SJustin Hibbits 1217*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 1218*852ba100SJustin Hibbits *//***************************************************************************/ 1219*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_SetException(t_Handle h_FmMacsecSecY, e_FmMacsecExceptions exception, bool enable); 1220*852ba100SJustin Hibbits 1221*852ba100SJustin Hibbits /**************************************************************************//** 1222*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_SetEvent 1223*852ba100SJustin Hibbits 1224*852ba100SJustin Hibbits @Description Calling this routine enables/disables the specified event. 1225*852ba100SJustin Hibbits 1226*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1227*852ba100SJustin Hibbits @Param[in] event The event to be selected. 1228*852ba100SJustin Hibbits @Param[in] enable TRUE to enable interrupt, FALSE to mask it. 1229*852ba100SJustin Hibbits 1230*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1231*852ba100SJustin Hibbits 1232*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Config() and before FM_MACSEC_SECY_Init(). 1233*852ba100SJustin Hibbits *//***************************************************************************/ 1234*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_SetEvent(t_Handle h_FmMacsecSecY, e_FmMacsecSecYEvents event, bool enable); 1235*852ba100SJustin Hibbits 1236*852ba100SJustin Hibbits /**************************************************************************//** 1237*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_GetRxScPhysId 1238*852ba100SJustin Hibbits 1239*852ba100SJustin Hibbits @Description return the physical id of the Secure Channel. 1240*852ba100SJustin Hibbits 1241*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1242*852ba100SJustin Hibbits @Param[in] h_Sc SC handle as returned by FM_MACSEC_SECY_CreateRxSc. 1243*852ba100SJustin Hibbits @Param[out] p_ScPhysId the SC physical id. 1244*852ba100SJustin Hibbits 1245*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1246*852ba100SJustin Hibbits 1247*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_CreateRxSc(). 1248*852ba100SJustin Hibbits *//***************************************************************************/ 1249*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_GetRxScPhysId(t_Handle h_FmMacsecSecY, t_Handle h_Sc, uint32_t *p_ScPhysId); 1250*852ba100SJustin Hibbits 1251*852ba100SJustin Hibbits /**************************************************************************//** 1252*852ba100SJustin Hibbits @Function FM_MACSEC_SECY_GetTxScPhysId 1253*852ba100SJustin Hibbits 1254*852ba100SJustin Hibbits @Description return the physical id of the Secure Channel. 1255*852ba100SJustin Hibbits 1256*852ba100SJustin Hibbits @Param[in] h_FmMacsecSecY FM MACSEC SECY module descriptor. 1257*852ba100SJustin Hibbits @Param[out] p_ScPhysId the SC physical id. 1258*852ba100SJustin Hibbits 1259*852ba100SJustin Hibbits @Return E_OK on success; Error code otherwise. 1260*852ba100SJustin Hibbits 1261*852ba100SJustin Hibbits @Cautions Allowed only following FM_MACSEC_SECY_Init(). 1262*852ba100SJustin Hibbits *//***************************************************************************/ 1263*852ba100SJustin Hibbits t_Error FM_MACSEC_SECY_GetTxScPhysId(t_Handle h_FmMacsecSecY, uint32_t *p_ScPhysId); 1264*852ba100SJustin Hibbits 1265*852ba100SJustin Hibbits /** @} */ /* end of FM_MACSEC_SECY_runtime_control_grp group */ 1266*852ba100SJustin Hibbits /** @} */ /* end of FM_MACSEC_SECY_grp group */ 1267*852ba100SJustin Hibbits /** @} */ /* end of FM_MACSEC_grp group */ 1268*852ba100SJustin Hibbits /** @} */ /* end of FM_grp group */ 1269*852ba100SJustin Hibbits 1270*852ba100SJustin Hibbits 1271*852ba100SJustin Hibbits #endif /* __FM_MACSEC_EXT_H */ 1272