mib2_impl.h
Go to the documentation of this file.
1 /**
2  * @file mib2_impl.h
3  * @brief MIB-II 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 _MIB2_IMPL_H
30 #define _MIB2_IMPL_H
31 
32 //Dependencies
33 #include "core/net.h"
34 #include "mibs/mib2_module.h"
35 
36 //C++ guard
37 #ifdef __cplusplus
38  extern "C" {
39 #endif
40 
41 //MIB-II related functions
42 error_t mib2Init(void);
43 
44 error_t mib2GetSysDescr(const MibObject *object, const uint8_t *oid,
45  size_t oidLen, MibVariant *value, size_t *valueLen);
46 
47 error_t mib2GetSysObjectID(const MibObject *object, const uint8_t *oid,
48  size_t oidLen, MibVariant *value, size_t *valueLen);
49 
50 error_t mib2GetSysUpTime(const MibObject *object, const uint8_t *oid,
51  size_t oidLen, MibVariant *value, size_t *valueLen);
52 
53 error_t mib2SetSysContact(const MibObject *object, const uint8_t *oid,
54  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
55 
56 error_t mib2GetSysContact(const MibObject *object, const uint8_t *oid,
57  size_t oidLen, MibVariant *value, size_t *valueLen);
58 
59 error_t mib2SetSysName(const MibObject *object, const uint8_t *oid,
60  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
61 
62 error_t mib2GetSysName(const MibObject *object, const uint8_t *oid,
63  size_t oidLen, MibVariant *value, size_t *valueLen);
64 
65 error_t mib2SetSysLocation(const MibObject *object, const uint8_t *oid,
66  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
67 
68 error_t mib2GetSysLocation(const MibObject *object, const uint8_t *oid,
69  size_t oidLen, MibVariant *value, size_t *valueLen);
70 
71 error_t mib2SetIfEntry(const MibObject *object, const uint8_t *oid,
72  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
73 
74 error_t mib2GetIfEntry(const MibObject *object, const uint8_t *oid,
75  size_t oidLen, MibVariant *value, size_t *valueLen);
76 
77 error_t mib2GetNextIfEntry(const MibObject *object, const uint8_t *oid,
78  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
79 
80 error_t mib2GetIpAddrEntry(const MibObject *object, const uint8_t *oid,
81  size_t oidLen, MibVariant *value, size_t *valueLen);
82 
83 error_t mib2GetNextIpAddrEntry(const MibObject *object, const uint8_t *oid,
84  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
85 
86 error_t mib2SetIpNetToMediaEntry(const MibObject *object, const uint8_t *oid,
87  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
88 
89 error_t mib2GetIpNetToMediaEntry(const MibObject *object, const uint8_t *oid,
90  size_t oidLen, MibVariant *value, size_t *valueLen);
91 
92 error_t mib2GetNextIpNetToMediaEntry(const MibObject *object, const uint8_t *oid,
93  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
94 
95 error_t mib2GetTcpCurrEstab(const MibObject *object, const uint8_t *oid,
96  size_t oidLen, MibVariant *value, size_t *valueLen);
97 
98 error_t mib2SetTcpConnEntry(const MibObject *object, const uint8_t *oid,
99  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
100 
101 error_t mib2GetTcpConnEntry(const MibObject *object, const uint8_t *oid,
102  size_t oidLen, MibVariant *value, size_t *valueLen);
103 
104 error_t mib2GetNextTcpConnEntry(const MibObject *object, const uint8_t *oid,
105  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
106 
107 error_t mib2GetUdpEntry(const MibObject *object, const uint8_t *oid,
108  size_t oidLen, MibVariant *value, size_t *valueLen);
109 
110 error_t mib2GetNextUdpEntry(const MibObject *object, const uint8_t *oid,
111  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
112 
113 //C++ guard
114 #ifdef __cplusplus
115  }
116 #endif
117 
118 #endif
error_t mib2SetIfEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ifEntry object value.
Definition: mib2_impl.c:184
TCP/IP stack core.
error_t mib2SetSysName(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
MIB-II module.
#define MibObject
Definition: mib_common.h:44
error_t mib2GetIpAddrEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipAddrEntry object value.
Definition: mib2_impl.c:532
error_t mib2SetSysContact(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
error_t mib2GetSysDescr(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
error_t mib2GetIfEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ifEntry object value.
Definition: mib2_impl.c:202
error_t mib2SetSysLocation(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
error_t mib2GetSysObjectID(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
error_t mib2GetNextIfEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ifEntry object.
Definition: mib2_impl.c:477
error_t mib2SetIpNetToMediaEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipNetToMediaEntry object value.
Definition: mib2_impl.c:714
error_t mib2GetTcpConnEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get tcpConnEntry object value.
Definition: mib2_impl.c:1022
error_t mib2Init(void)
MIB-II module initialization.
Definition: mib2_impl.c:48
error_t mib2GetNextIpAddrEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipAddrEntry object.
Definition: mib2_impl.c:626
error_t mib2GetNextTcpConnEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next tcpConnEntry object.
Definition: mib2_impl.c:1190
error_t mib2GetNextIpNetToMediaEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipNetToMediaEntry object.
Definition: mib2_impl.c:832
error_t mib2GetTcpCurrEstab(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get tcpCurrEstab object value.
Definition: mib2_impl.c:953
error_t mib2GetSysUpTime(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get sysUpTime object value.
Definition: mib2_impl.c:159
error_t mib2GetIpNetToMediaEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipNetToMediaEntry object value.
Definition: mib2_impl.c:732
error_t
Error codes.
Definition: error.h:40
__start_packed struct @208 MibVariant
Variant data type.
uint8_t value[]
Definition: dtls_misc.h:141
error_t mib2SetTcpConnEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set tcpConnEntry object value.
Definition: mib2_impl.c:1004
error_t mib2GetSysContact(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
error_t mib2GetSysLocation(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
uint8_t oid[1]
Definition: mib_common.h:184
error_t mib2GetUdpEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get udpEntry object value.
Definition: mib2_impl.c:1345
error_t mib2GetNextUdpEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next udpEntry object.
Definition: mib2_impl.c:1453
int bool_t
Definition: compiler_port.h:47
error_t mib2GetSysName(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)