ip_mib_impl.h
Go to the documentation of this file.
1 /**
2  * @file ip_mib_impl.h
3  * @brief IP MIB module implementation
4  *
5  * @section License
6  *
7  * Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.
8  *
9  * This file is part of CycloneTCP Open.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  *
25  * @author Oryx Embedded SARL (www.oryx-embedded.com)
26  * @version 1.9.0
27  **/
28 
29 #ifndef _IP_MIB_IMPL_H
30 #define _IP_MIB_IMPL_H
31 
32 //Dependencies
33 #include "mibs/mib_common.h"
34 
35 //C++ guard
36 #ifdef __cplusplus
37  extern "C" {
38 #endif
39 
40 //IP MIB related functions
41 error_t ipMibInit(void);
42 
43 error_t ipMibSetIpv4InterfaceEntry(const MibObject *object, const uint8_t *oid,
44  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
45 
46 error_t ipMibGetIpv4InterfaceEntry(const MibObject *object, const uint8_t *oid,
47  size_t oidLen, MibVariant *value, size_t *valueLen);
48 
49 error_t ipMibGetNextIpv4InterfaceEntry(const MibObject *object, const uint8_t *oid,
50  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
51 
52 error_t ipMibSetIpv6InterfaceEntry(const MibObject *object, const uint8_t *oid,
53  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
54 
55 error_t ipMibGetIpv6InterfaceEntry(const MibObject *object, const uint8_t *oid,
56  size_t oidLen, MibVariant *value, size_t *valueLen);
57 
58 error_t ipMibGetNextIpv6InterfaceEntry(const MibObject *object, const uint8_t *oid,
59  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
60 
61 error_t ipMibGetIpSystemStatsEntry(const MibObject *object, const uint8_t *oid,
62  size_t oidLen, MibVariant *value, size_t *valueLen);
63 
64 error_t ipMibGetNextIpSystemStatsEntry(const MibObject *object, const uint8_t *oid,
65  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
66 
67 error_t ipMibGetIpIfStatsEntry(const MibObject *object, const uint8_t *oid,
68  size_t oidLen, MibVariant *value, size_t *valueLen);
69 
70 error_t ipMibGetNextIpIfStatsEntry(const MibObject *object, const uint8_t *oid,
71  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
72 
73 error_t ipMibGetIpAddressPrefixEntry(const MibObject *object, const uint8_t *oid,
74  size_t oidLen, MibVariant *value, size_t *valueLen);
75 
76 error_t ipMibGetNextIpAddressPrefixEntry(const MibObject *object, const uint8_t *oid,
77  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
78 
79 error_t ipMibSetIpAddressSpinLock(const MibObject *object, const uint8_t *oid,
80  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
81 
82 error_t ipMibGetIpAddressSpinLock(const MibObject *object, const uint8_t *oid,
83  size_t oidLen, MibVariant *value, size_t *valueLen);
84 
85 error_t ipMibSetIpAddressEntry(const MibObject *object, const uint8_t *oid,
86  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
87 
88 error_t ipMibGetIpAddressEntry(const MibObject *object, const uint8_t *oid,
89  size_t oidLen, MibVariant *value, size_t *valueLen);
90 
91 error_t ipMibGetNextIpAddressEntry(const MibObject *object, const uint8_t *oid,
92  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
93 
94 error_t ipMibSetIpNetToPhysicalEntry(const MibObject *object, const uint8_t *oid,
95  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
96 
97 error_t ipMibGetIpNetToPhysicalEntry(const MibObject *object, const uint8_t *oid,
98  size_t oidLen, MibVariant *value, size_t *valueLen);
99 
100 error_t ipMibGetNextIpNetToPhysicalEntry(const MibObject *object, const uint8_t *oid,
101  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
102 
103 error_t ipMibGetIpv6ScopeZoneIndexEntry(const MibObject *object, const uint8_t *oid,
104  size_t oidLen, MibVariant *value, size_t *valueLen);
105 
106 error_t ipMibGetNextIpv6ScopeZoneIndexEntry(const MibObject *object, const uint8_t *oid,
107  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
108 
109 error_t ipMibGetIpDefaultRouterEntry(const MibObject *object, const uint8_t *oid,
110  size_t oidLen, MibVariant *value, size_t *valueLen);
111 
112 error_t ipMibGetNextIpDefaultRouterEntry(const MibObject *object, const uint8_t *oid,
113  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
114 
115 error_t ipMibSetIpv6RouterAdvertSpinLock(const MibObject *object, const uint8_t *oid,
116  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
117 
118 error_t ipMibGetIpv6RouterAdvertSpinLock(const MibObject *object, const uint8_t *oid,
119  size_t oidLen, MibVariant *value, size_t *valueLen);
120 
121 error_t ipMibSetIpv6RouterAdvertEntry(const MibObject *object, const uint8_t *oid,
122  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
123 
124 error_t ipMibGetIpv6RouterAdvertEntry(const MibObject *object, const uint8_t *oid,
125  size_t oidLen, MibVariant *value, size_t *valueLen);
126 
127 error_t ipMibGetNextIpv6RouterAdvertEntry(const MibObject *object, const uint8_t *oid,
128  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
129 
130 error_t ipMibGetIcmpStatsEntry(const MibObject *object, const uint8_t *oid,
131  size_t oidLen, MibVariant *value, size_t *valueLen);
132 
133 error_t ipMibGetNextIcmpStatsEntry(const MibObject *object, const uint8_t *oid,
134  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
135 
136 error_t ipMibGetIcmpMsgStatsEntry(const MibObject *object, const uint8_t *oid,
137  size_t oidLen, MibVariant *value, size_t *valueLen);
138 
139 error_t ipMibGetNextIcmpMsgStatsEntry(const MibObject *object, const uint8_t *oid,
140  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
141 
142 //C++ guard
143 #ifdef __cplusplus
144  }
145 #endif
146 
147 #endif
error_t ipMibGetNextIpDefaultRouterEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipDefaultRouterEntry object.
Definition: ip_mib_impl.c:2688
error_t ipMibSetIpv6RouterAdvertSpinLock(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipv6RouterAdvertSpinLock object value.
Definition: ip_mib_impl.c:2881
error_t ipMibGetIpv6InterfaceEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipv6InterfaceEntry object value.
Definition: ip_mib_impl.c:261
error_t ipMibGetIpv6RouterAdvertSpinLock(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipv6RouterAdvertSpinLock object value.
Definition: ip_mib_impl.c:2905
#define MibObject
Definition: mib_common.h:44
error_t ipMibGetIpv4InterfaceEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipv4InterfaceEntry object value.
Definition: ip_mib_impl.c:122
error_t ipMibGetIpAddressEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipAddressEntry object value.
Definition: ip_mib_impl.c:1497
error_t ipMibSetIpv6InterfaceEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipv6InterfaceEntry object value.
Definition: ip_mib_impl.c:243
error_t ipMibSetIpAddressSpinLock(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipAddressSpinLock object value.
Definition: ip_mib_impl.c:1437
error_t ipMibGetIcmpStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get icmpStatsEntry object value.
Definition: ip_mib_impl.c:3161
error_t ipMibGetIpNetToPhysicalEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipNetToPhysicalEntry object value.
Definition: ip_mib_impl.c:2001
error_t ipMibGetNextIpAddressEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipAddressEntry object.
Definition: ip_mib_impl.c:1827
error_t ipMibGetNextIpIfStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipIfStatsEntry object.
Definition: ip_mib_impl.c:915
error_t ipMibGetIpv6ScopeZoneIndexEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipv6ScopeZoneIndexEntry object value.
Definition: ip_mib_impl.c:2394
error_t ipMibSetIpNetToPhysicalEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipNetToPhysicalEntry object value.
Definition: ip_mib_impl.c:1983
error_t ipMibGetIpSystemStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipSystemStatsEntry object value.
Definition: ip_mib_impl.c:421
error_t ipMibGetNextIpv6RouterAdvertEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipv6RouterAdvertEntry object.
Definition: ip_mib_impl.c:3102
error_t ipMibGetIpv6RouterAdvertEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipv6RouterAdvertEntry object value.
Definition: ip_mib_impl.c:2951
error_t ipMibGetNextIpv6InterfaceEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipv6InterfaceEntry object.
Definition: ip_mib_impl.c:368
error_t ipMibGetNextIpv4InterfaceEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipv4InterfaceEntry object.
Definition: ip_mib_impl.c:188
error_t ipMibSetIpv4InterfaceEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipv4InterfaceEntry object value.
Definition: ip_mib_impl.c:104
error_t ipMibGetNextIpNetToPhysicalEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipNetToPhysicalEntry object.
Definition: ip_mib_impl.c:2205
error_t ipMibGetNextIcmpStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next icmpStatsEntry object.
Definition: ip_mib_impl.c:3246
error_t ipMibSetIpAddressEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipAddressEntry object value.
Definition: ip_mib_impl.c:1479
error_t ipMibGetIpDefaultRouterEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipDefaultRouterEntry object value.
Definition: ip_mib_impl.c:2526
error_t
Error codes.
Definition: error.h:40
__start_packed struct @208 MibVariant
Variant data type.
error_t ipMibGetNextIpAddressPrefixEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipAddressPrefixEntry object.
Definition: ip_mib_impl.c:1213
error_t ipMibGetNextIpSystemStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipSystemStatsEntry object.
Definition: ip_mib_impl.c:629
uint8_t value[]
Definition: dtls_misc.h:141
Common definitions for MIB modules.
error_t ipMibGetIpIfStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipIfStatsEntry object value.
Definition: ip_mib_impl.c:699
error_t ipMibInit(void)
IP MIB module initialization.
Definition: ip_mib_impl.c:57
error_t ipMibGetNextIcmpMsgStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next icmpMsgStatsEntry object.
Definition: ip_mib_impl.c:3406
error_t ipMibGetIpAddressSpinLock(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipAddressSpinLock object value.
Definition: ip_mib_impl.c:1456
error_t ipMibGetIpAddressPrefixEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipAddressPrefixEntry object value.
Definition: ip_mib_impl.c:996
error_t ipMibSetIpv6RouterAdvertEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipv6RouterAdvertEntry object value.
Definition: ip_mib_impl.c:2933
uint8_t oid[1]
Definition: mib_common.h:184
error_t ipMibGetNextIpv6ScopeZoneIndexEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipv6ScopeZoneIndexEntry object.
Definition: ip_mib_impl.c:2473
error_t ipMibGetIcmpMsgStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get icmpMsgStatsEntry object value.
Definition: ip_mib_impl.c:3316
int bool_t
Definition: compiler_port.h:47