ip_mib_module.h
Go to the documentation of this file.
1 /**
2  * @file ip_mib_module.h
3  * @brief IP MIB module
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2026 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneTCP 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.6.0
29  **/
30 
31 #ifndef _IP_MIB_MODULE_H
32 #define _IP_MIB_MODULE_H
33 
34 //Dependencies
35 #include "mibs/mib_common.h"
36 
37 //IP MIB module support
38 #ifndef IP_MIB_SUPPORT
39  #define IP_MIB_SUPPORT DISABLED
40 #elif (IP_MIB_SUPPORT != ENABLED && IP_MIB_SUPPORT != DISABLED)
41  #error IP_MIB_SUPPORT parameter is not valid
42 #endif
43 
44 //C++ guard
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 
50 /**
51  * @brief IP forwarding state
52  **/
53 
54 typedef enum
55 {
59 
60 
61 /**
62  * @brief IP status
63  **/
64 
65 typedef enum
66 {
70 
71 
72 /**
73  * @brief IP address type
74  **/
75 
76 typedef enum
77 {
82 
83 
84 /**
85  * @brief IP address origin
86  **/
87 
88 typedef enum
89 {
95 
96 /**
97  * @brief IP address status
98  **/
99 
100 typedef enum
101 {
111 
112 
113 /**
114  * @brief Prefix origin
115  **/
116 
117 typedef enum
118 {
124 
125 
126 /**
127  * @brief Type of mapping
128  **/
129 
130 typedef enum
131 {
138 
139 
140 /**
141  * @brief Entry state
142  **/
143 
144 typedef enum
145 {
154 
155 
156 /**
157  * @brief Router preferences
158  **/
159 
160 typedef enum
161 {
167 
168 
169 /**
170  * @brief IP MIB base
171  **/
172 
173 typedef struct
174 {
177 #if (IPV4_SUPPORT == ENABLED)
178  int32_t ipForwarding;
179  int32_t ipDefaultTTL;
180  int32_t ipReasmTimeout;
182 #endif
183 #if (IPV6_SUPPORT == ENABLED)
188 #endif
189 } IpMibBase;
190 
191 
192 //IP MIB related constants
193 extern IpMibBase ipMibBase;
194 extern const MibObject ipMibObjects[];
195 extern const MibModule ipMibModule;
196 
197 //C++ guard
198 #ifdef __cplusplus
199 }
200 #endif
201 
202 #endif
@ IP_MIB_ROUTER_PREFERENCE_MEDIUM
@ IP_MIB_ROUTER_PREFERENCE_RESERVED
@ IP_MIB_PREFIX_ORIGIN_MANUAL
IpMibAddrType
IP address type.
Definition: ip_mib_module.h:77
@ IP_MIB_ADDR_STATUS_TENTATIVE
@ IP_MIB_NET_TO_PHYS_TYPE_INVALID
int32_t ipv6RouterAdvertSpinLock
int32_t ipAddressSpinLock
@ IP_MIB_ADDR_TYPE_UNICAST
Definition: ip_mib_module.h:78
int32_t ipReasmTimeout
@ IP_MIB_ADDR_TYPE_BROADCAST
Definition: ip_mib_module.h:80
@ IP_MIB_NET_TO_PHYS_STATE_PROBE
@ IP_MIB_ADDR_ORIGIN_RANDOM
Definition: ip_mib_module.h:93
@ IP_MIB_NET_TO_PHYS_STATE_UNKNOWN
@ IP_MIB_NET_TO_PHYS_STATE_INVALID
IpMibPrefixOrigin
Prefix origin.
@ IP_MIB_IP_FORWARDING_ENABLED
Definition: ip_mib_module.h:56
int32_t ipv6IpForwarding
int32_t ipv6IpDefaultHopLimit
IpMibAddrOrigin
IP address origin.
Definition: ip_mib_module.h:89
IpMibRouterPreference
Router preferences.
@ IP_MIB_PREFIX_ORIGIN_ROUTER_ADV
uint32_t ipv6InterfaceTableLastChange
@ IP_MIB_ADDR_STATUS_PREFERRED
@ IP_MIB_ADDR_STATUS_INACCESSIBLE
@ IP_MIB_ADDR_STATUS_OPTIMISTIC
IpMibIpStatus
IP status.
Definition: ip_mib_module.h:66
@ IP_MIB_NET_TO_PHYS_STATE_INCOMPLETE
@ IP_MIB_ADDR_ORIGIN_DHCP
Definition: ip_mib_module.h:91
@ IP_MIB_ADDR_ORIGIN_LINK_LAYER
Definition: ip_mib_module.h:92
@ IP_MIB_NET_TO_PHYS_STATE_REACHABLE
@ IP_MIB_NET_TO_PHYS_TYPE_LOCAL
@ IP_MIB_ADDR_STATUS_DUPLICATE
IpMibBase ipMibBase
IP MIB base.
Definition: ip_mib_module.c:60
MIB module.
Definition: mib_common.h:292
@ IP_MIB_NET_TO_PHYS_STATE_STALE
uint32_t ipIfStatsTableLastChange
int32_t ipDefaultTTL
@ IP_MIB_ROUTER_PREFERENCE_LOW
IpMibNetToPhysState
Entry state.
IpMibNetToPhysType
Type of mapping.
@ IP_MIB_ROUTER_PREFERENCE_HIGH
Common definitions for MIB modules.
IpMibAddrStatus
IP address status.
IpMibIpForwarding
IP forwarding state.
Definition: ip_mib_module.h:55
IP MIB base.
const MibObject ipMibObjects[]
IP MIB objects.
Definition: ip_mib_module.c:67
@ IP_MIB_IP_STATUS_UP
Definition: ip_mib_module.h:67
int32_t ipForwarding
#define MibObject
Definition: mib_common.h:46
@ IP_MIB_IP_STATUS_DOWN
Definition: ip_mib_module.h:68
@ IP_MIB_NET_TO_PHYS_TYPE_STATIC
const MibModule ipMibModule
IP MIB module.
@ IP_MIB_ADDR_TYPE_ANYCAST
Definition: ip_mib_module.h:79
@ IP_MIB_PREFIX_ORIGIN_DHCP
@ IP_MIB_IP_FORWARDING_DISABLED
Definition: ip_mib_module.h:57
uint32_t ipv4InterfaceTableLastChange
@ IP_MIB_ADDR_ORIGIN_MANUAL
Definition: ip_mib_module.h:90
@ IP_MIB_NET_TO_PHYS_TYPE_OTHER
@ IP_MIB_NET_TO_PHYS_TYPE_DYNAMIC
@ IP_MIB_NET_TO_PHYS_STATE_DELAY
@ IP_MIB_PREFIX_ORIGIN_WELL_KNOWN
@ IP_MIB_ADDR_STATUS_DEPRECATED
@ IP_MIB_ADDR_STATUS_UNKNOWN
@ IP_MIB_ADDR_STATUS_INVALID