ieee8021_pae_mib_impl.c
Go to the documentation of this file.
1 /**
2  * @file ieee8021_pae_mib_impl.c
3  * @brief Port Access Control MIB module implementation
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2022-2024 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneEAP Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 2.4.0
29  **/
30 
31 //Switch to the appropriate trace level
32 #define TRACE_LEVEL SNMP_TRACE_LEVEL
33 
34 //Dependencies
35 #include "core/net.h"
36 #include "mibs/mib_common.h"
39 #include "core/crypto.h"
40 #include "encoding/asn1.h"
41 #include "encoding/oid.h"
43 #include "debug.h"
44 
45 //Check TCP/IP stack configuration
46 #if (IEEE8021_PAE_MIB_SUPPORT == ENABLED)
47 
48 
49 /**
50  * @brief Port Access Control MIB module initialization
51  * @return Error code
52  **/
53 
55 {
56  //Debug message
57  TRACE_INFO("Initializing Port Access Control MIB base...\r\n");
58 
59  //Clear Port Access Control MIB base
60  memset(&ieee8021PaeMibBase, 0, sizeof(ieee8021PaeMibBase));
61 
62  //Successful processing
63  return NO_ERROR;
64 }
65 
66 
67 /**
68  * @brief Lock Port Access Control MIB base
69  **/
70 
72 {
73  //Acquire exclusive access to the 802.1X authenticator context
75 }
76 
77 
78 /**
79  * @brief Unlock Port Access Control MIB base
80  **/
81 
83 {
84  //Release exclusive access to the 802.1X authenticator context
86 }
87 
88 
89 /**
90  * @brief Attach 802.1X authenticator context
91  * @param[in] context Pointer to the 802.1X authenticator context
92  * @return Error code
93  **/
94 
96 {
97  //Attach 802.1X authenticator context
99 
100  //Successful processing
101  return NO_ERROR;
102 }
103 
104 #endif
ASN.1 (Abstract Syntax Notation One)
#define AuthenticatorContext
Definition: authenticator.h:36
void authenticatorMgmtLock(AuthenticatorContext *context)
Acquire exclusive access to the 802.1X authenticator context.
void authenticatorMgmtUnlock(AuthenticatorContext *context)
Release exclusive access to the 802.1X authenticator context.
Management of the 802.1X authenticator.
General definitions for cryptographic algorithms.
Debugging facilities.
#define TRACE_INFO(...)
Definition: debug.h:95
error_t
Error codes.
Definition: error.h:43
@ NO_ERROR
Success.
Definition: error.h:44
void ieee8021PaeMibLock(void)
Lock Port Access Control MIB base.
error_t ieee8021PaeMibSetAuthenticatorContext(AuthenticatorContext *context)
Attach 802.1X authenticator context.
error_t ieee8021PaeMibInit(void)
Port Access Control MIB module initialization.
void ieee8021PaeMibUnlock(void)
Unlock Port Access Control MIB base.
Port Access Control MIB module implementation.
Ieee8021PaeMibBase ieee8021PaeMibBase
Port Access Control MIB base.
Port Access Control MIB module.
Common definitions for MIB modules.
TCP/IP stack core.
OID (Object Identifier)
AuthenticatorContext * authContext