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  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2020 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 1.9.8
29  **/
30 
31 #ifndef _IP_MIB_IMPL_H
32 #define _IP_MIB_IMPL_H
33 
34 //Dependencies
35 #include "mibs/mib_common.h"
36 
37 //C++ guard
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 //IP MIB related functions
43 error_t ipMibInit(void);
44 
45 error_t ipMibSetIpv4InterfaceEntry(const MibObject *object, const uint8_t *oid,
46  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
47 
48 error_t ipMibGetIpv4InterfaceEntry(const MibObject *object, const uint8_t *oid,
49  size_t oidLen, MibVariant *value, size_t *valueLen);
50 
51 error_t ipMibGetNextIpv4InterfaceEntry(const MibObject *object, const uint8_t *oid,
52  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
53 
54 error_t ipMibSetIpv6InterfaceEntry(const MibObject *object, const uint8_t *oid,
55  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
56 
57 error_t ipMibGetIpv6InterfaceEntry(const MibObject *object, const uint8_t *oid,
58  size_t oidLen, MibVariant *value, size_t *valueLen);
59 
60 error_t ipMibGetNextIpv6InterfaceEntry(const MibObject *object, const uint8_t *oid,
61  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
62 
63 error_t ipMibGetIpSystemStatsEntry(const MibObject *object, const uint8_t *oid,
64  size_t oidLen, MibVariant *value, size_t *valueLen);
65 
66 error_t ipMibGetNextIpSystemStatsEntry(const MibObject *object, const uint8_t *oid,
67  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
68 
69 error_t ipMibGetIpIfStatsEntry(const MibObject *object, const uint8_t *oid,
70  size_t oidLen, MibVariant *value, size_t *valueLen);
71 
72 error_t ipMibGetNextIpIfStatsEntry(const MibObject *object, const uint8_t *oid,
73  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
74 
75 error_t ipMibGetIpAddressPrefixEntry(const MibObject *object, const uint8_t *oid,
76  size_t oidLen, MibVariant *value, size_t *valueLen);
77 
78 error_t ipMibGetNextIpAddressPrefixEntry(const MibObject *object, const uint8_t *oid,
79  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
80 
81 error_t ipMibSetIpAddressSpinLock(const MibObject *object, const uint8_t *oid,
82  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
83 
84 error_t ipMibGetIpAddressSpinLock(const MibObject *object, const uint8_t *oid,
85  size_t oidLen, MibVariant *value, size_t *valueLen);
86 
87 error_t ipMibSetIpAddressEntry(const MibObject *object, const uint8_t *oid,
88  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
89 
90 error_t ipMibGetIpAddressEntry(const MibObject *object, const uint8_t *oid,
91  size_t oidLen, MibVariant *value, size_t *valueLen);
92 
93 error_t ipMibGetNextIpAddressEntry(const MibObject *object, const uint8_t *oid,
94  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
95 
96 error_t ipMibSetIpNetToPhysicalEntry(const MibObject *object, const uint8_t *oid,
97  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
98 
99 error_t ipMibGetIpNetToPhysicalEntry(const MibObject *object, const uint8_t *oid,
100  size_t oidLen, MibVariant *value, size_t *valueLen);
101 
102 error_t ipMibGetNextIpNetToPhysicalEntry(const MibObject *object, const uint8_t *oid,
103  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
104 
105 error_t ipMibGetIpv6ScopeZoneIndexEntry(const MibObject *object, const uint8_t *oid,
106  size_t oidLen, MibVariant *value, size_t *valueLen);
107 
108 error_t ipMibGetNextIpv6ScopeZoneIndexEntry(const MibObject *object, const uint8_t *oid,
109  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
110 
111 error_t ipMibGetIpDefaultRouterEntry(const MibObject *object, const uint8_t *oid,
112  size_t oidLen, MibVariant *value, size_t *valueLen);
113 
114 error_t ipMibGetNextIpDefaultRouterEntry(const MibObject *object, const uint8_t *oid,
115  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
116 
117 error_t ipMibSetIpv6RouterAdvertSpinLock(const MibObject *object, const uint8_t *oid,
118  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
119 
120 error_t ipMibGetIpv6RouterAdvertSpinLock(const MibObject *object, const uint8_t *oid,
121  size_t oidLen, MibVariant *value, size_t *valueLen);
122 
123 error_t ipMibSetIpv6RouterAdvertEntry(const MibObject *object, const uint8_t *oid,
124  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
125 
126 error_t ipMibGetIpv6RouterAdvertEntry(const MibObject *object, const uint8_t *oid,
127  size_t oidLen, MibVariant *value, size_t *valueLen);
128 
129 error_t ipMibGetNextIpv6RouterAdvertEntry(const MibObject *object, const uint8_t *oid,
130  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
131 
132 error_t ipMibGetIcmpStatsEntry(const MibObject *object, const uint8_t *oid,
133  size_t oidLen, MibVariant *value, size_t *valueLen);
134 
135 error_t ipMibGetNextIcmpStatsEntry(const MibObject *object, const uint8_t *oid,
136  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
137 
138 error_t ipMibGetIcmpMsgStatsEntry(const MibObject *object, const uint8_t *oid,
139  size_t oidLen, MibVariant *value, size_t *valueLen);
140 
141 error_t ipMibGetNextIcmpMsgStatsEntry(const MibObject *object, const uint8_t *oid,
142  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
143 
144 //C++ guard
145 #ifdef __cplusplus
146 }
147 #endif
148 
149 #endif
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:3291
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:124
int bool_t
Definition: compiler_port.h:49
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:3343
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:1762
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:245
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:263
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:1702
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:1103
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:2288
error_t
Error codes.
Definition: error.h:42
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:3583
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:2306
uint8_t value[]
Definition: tcp.h:332
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:3361
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:2115
uint8_t oid[1]
Definition: mib_common.h:186
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:2889
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:3524
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:2731
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:374
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:3678
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:427
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:106
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:797
__start_packed struct @103 MibVariant
Variant data type.
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:727
Common definitions for MIB modules.
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:2522
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:190
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:1744
#define MibObject
Definition: mib_common.h:46
error_t ipMibInit(void)
IP MIB module initialization.
Definition: ip_mib_impl.c:59
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:1442
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:2836
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:3748
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:3072
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:1184
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:3844
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:3315
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:1721