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  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2019 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.6
29  **/
30 
31 #ifndef _MIB2_IMPL_H
32 #define _MIB2_IMPL_H
33 
34 //Dependencies
35 #include "core/net.h"
36 #include "mibs/mib2_module.h"
37 
38 //C++ guard
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 //MIB-II related functions
44 error_t mib2Init(void);
45 
46 error_t mib2GetSysDescr(const MibObject *object, const uint8_t *oid,
47  size_t oidLen, MibVariant *value, size_t *valueLen);
48 
49 error_t mib2GetSysObjectID(const MibObject *object, const uint8_t *oid,
50  size_t oidLen, MibVariant *value, size_t *valueLen);
51 
52 error_t mib2GetSysUpTime(const MibObject *object, const uint8_t *oid,
53  size_t oidLen, MibVariant *value, size_t *valueLen);
54 
55 error_t mib2SetSysContact(const MibObject *object, const uint8_t *oid,
56  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
57 
58 error_t mib2GetSysContact(const MibObject *object, const uint8_t *oid,
59  size_t oidLen, MibVariant *value, size_t *valueLen);
60 
61 error_t mib2SetSysName(const MibObject *object, const uint8_t *oid,
62  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
63 
64 error_t mib2GetSysName(const MibObject *object, const uint8_t *oid,
65  size_t oidLen, MibVariant *value, size_t *valueLen);
66 
67 error_t mib2SetSysLocation(const MibObject *object, const uint8_t *oid,
68  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
69 
70 error_t mib2GetSysLocation(const MibObject *object, const uint8_t *oid,
71  size_t oidLen, MibVariant *value, size_t *valueLen);
72 
73 error_t mib2SetIfEntry(const MibObject *object, const uint8_t *oid,
74  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
75 
76 error_t mib2GetIfEntry(const MibObject *object, const uint8_t *oid,
77  size_t oidLen, MibVariant *value, size_t *valueLen);
78 
79 error_t mib2GetNextIfEntry(const MibObject *object, const uint8_t *oid,
80  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
81 
82 error_t mib2GetIpAddrEntry(const MibObject *object, const uint8_t *oid,
83  size_t oidLen, MibVariant *value, size_t *valueLen);
84 
85 error_t mib2GetNextIpAddrEntry(const MibObject *object, const uint8_t *oid,
86  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
87 
88 error_t mib2SetIpNetToMediaEntry(const MibObject *object, const uint8_t *oid,
89  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
90 
91 error_t mib2GetIpNetToMediaEntry(const MibObject *object, const uint8_t *oid,
92  size_t oidLen, MibVariant *value, size_t *valueLen);
93 
94 error_t mib2GetNextIpNetToMediaEntry(const MibObject *object, const uint8_t *oid,
95  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
96 
97 error_t mib2GetTcpCurrEstab(const MibObject *object, const uint8_t *oid,
98  size_t oidLen, MibVariant *value, size_t *valueLen);
99 
100 error_t mib2SetTcpConnEntry(const MibObject *object, const uint8_t *oid,
101  size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit);
102 
103 error_t mib2GetTcpConnEntry(const MibObject *object, const uint8_t *oid,
104  size_t oidLen, MibVariant *value, size_t *valueLen);
105 
106 error_t mib2GetNextTcpConnEntry(const MibObject *object, const uint8_t *oid,
107  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
108 
109 error_t mib2GetUdpEntry(const MibObject *object, const uint8_t *oid,
110  size_t oidLen, MibVariant *value, size_t *valueLen);
111 
112 error_t mib2GetNextUdpEntry(const MibObject *object, const uint8_t *oid,
113  size_t oidLen, uint8_t *nextOid, size_t *nextOidLen);
114 
115 //C++ guard
116 #ifdef __cplusplus
117 }
118 #endif
119 
120 #endif
MIB-II module.
int bool_t
Definition: compiler_port.h:49
error_t mib2SetSysLocation(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
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:979
__start_packed struct @205 MibVariant
Variant data type.
error_t mib2GetSysContact(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
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:1479
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:640
error_t mib2GetSysName(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
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:186
error_t
Error codes.
Definition: error.h:42
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:858
uint8_t oid[1]
Definition: mib_common.h:186
error_t mib2GetSysObjectID(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
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:1030
error_t mib2GetSysLocation(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
error_t mib2SetSysName(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 mib2GetIpAddrEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipAddrEntry object value.
Definition: mib2_impl.c:534
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:479
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:758
#define MibObject
Definition: mib_common.h:46
error_t mib2Init(void)
MIB-II module initialization.
Definition: mib2_impl.c:50
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:740
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:1371
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:161
uint8_t value[]
Definition: dtls_misc.h:150
TCP/IP stack core.
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:204
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:1048
error_t mib2SetSysContact(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
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:1216