mib2_module.h File Reference

MIB-II module. More...

#include "core/net.h"
#include "core/udp.h"
#include "core/tcp.h"
#include "ipv4/ipv4.h"
#include "mibs/mib_common.h"

Go to the source code of this file.

Data Structures

struct  Mib2SysGroup
 System group. More...
 
struct  Mib2IfEntry
 Interfaces table entry. More...
 
struct  Mib2IfGroup
 Interfaces group. More...
 
struct  Mib2IpGroup
 IP group. More...
 
struct  Mib2IcmpGroup
 ICMP group. More...
 
struct  Mib2TcpGroup
 TCP group. More...
 
struct  Mib2UdpGroup
 UDP group. More...
 
struct  Mib2SnmpGroup
 SNMP group. More...
 
struct  Mib2Base
 MIB-II base. More...
 

Macros

#define MIB2_SUPPORT   DISABLED
 
#define MIB2_SYS_GROUP_SUPPORT   ENABLED
 
#define MIB2_IF_GROUP_SUPPORT   ENABLED
 
#define MIB2_IP_GROUP_SUPPORT   ENABLED
 
#define MIB2_ICMP_GROUP_SUPPORT   ENABLED
 
#define MIB2_TCP_GROUP_SUPPORT   ENABLED
 
#define MIB2_UDP_GROUP_SUPPORT   ENABLED
 
#define MIB2_SNMP_GROUP_SUPPORT   ENABLED
 
#define MIB2_SYS_DESCR_SIZE   16
 
#define MIB2_SYS_OBJECT_ID_SIZE   16
 
#define MIB2_SYS_CONTACT_SIZE   16
 
#define MIB2_SYS_NAME_SIZE   16
 
#define MIB2_SYS_LOCATION_SIZE   16
 
#define MIB2_IF_SPECIFIC_SIZE   16
 
#define MIB2_PHYS_ADDRESS_SIZE   6
 
#define MIB2_IP_ADDRESS_SIZE   4
 
#define MIB2_IF_SET_TIME_TICKS(name, value)   mib2Base.ifGroup.name = value
 
#define MIB2_IF_INC_COUNTER32(name, value)   mib2Base.ifGroup.name += value
 
#define MIB2_IP_INC_COUNTER32(name, value)   mib2Base.ipGroup.name += value
 
#define MIB2_ICMP_INC_COUNTER32(name, value)   mib2Base.icmpGroup.name += value
 
#define MIB2_TCP_INC_COUNTER32(name, value)   mib2Base.tcpGroup.name += value
 
#define MIB2_UDP_INC_COUNTER32(name, value)   mib2Base.udpGroup.name += value
 
#define MIB2_SNMP_INC_COUNTER32(name, value)   mib2Base.snmpGroup.name += value
 

Enumerations

enum  Mib2SysService {
  MIB2_SYS_SERVICE_PHYSICAL = 0x01, MIB2_SYS_SERVICE_DATALINK = 0x02, MIB2_SYS_SERVICE_INTERNET = 0x04, MIB2_SYS_SERVICE_END_TO_END = 0x08,
  MIB2_SYS_SERVICE_APPLICATIONS = 0x40
}
 System services. More...
 
enum  Mib2IfType {
  MIB2_IF_TYPE_OTHER = 1, MIB2_IF_TYPE_ETHERNET_CSMACD = 6, MIB2_IF_TYPE_PROP_PTP_SERIAL = 22, MIB2_IF_TYPE_PPP = 23,
  MIB2_IF_TYPE_SOFT_LOOPBACK = 24, MIB2_IF_TYPE_SLIP = 28, MIB2_IF_TYPE_RS232 = 33, MIB2_IF_TYPE_PARA = 34,
  MIB2_IF_TYPE_IEEE_802_11 = 71, MIB2_IF_TYPE_HDLC = 118, MIB2_IF_TYPE_TUNNEL = 131, MIB2_IF_TYPE_L2_VLAN = 135,
  MIB2_IF_TYPE_USB = 160, MIB2_IF_TYPE_PLC = 174, MIB2_IF_TYPE_BRIDGE = 209, MIB2_IF_TYPE_IEEE_802_15_4 = 259
}
 Interface types. More...
 
enum  Mib2IfAdminStatus { MIB2_IF_ADMIN_STATUS_UP = 1, MIB2_IF_ADMIN_STATUS_DOWN = 2, MIB2_IF_ADMIN_STATUS_TESTING = 3 }
 The desired state of the interface. More...
 
enum  Mib2IfOperStatus { MIB2_IF_OPER_STATUS_UP = 1, MIB2_IF_OPER_STATUS_DOWN = 2, MIB2_IF_OPER_STATUS_TESTING = 3 }
 The operational state of the interface. More...
 
enum  Mib2IpForwarding { MIB2_IP_FORWARDING_ENABLED = 1, MIB2_IP_FORWARDING_DISABLED = 2 }
 IP forwarding state. More...
 
enum  Mib2IpNetToMediaType { MIB2_IP_NET_TO_MEDIA_TYPE_OTHER = 1, MIB2_IP_NET_TO_MEDIA_TYPE_INVALID = 2, MIB2_IP_NET_TO_MEDIA_TYPE_DYNAMIC = 3, MIB2_IP_NET_TO_MEDIA_TYPE_STATIC = 4 }
 Type of mapping. More...
 
enum  Mib2TcpRtoAlgorithm { MIB2_TCP_RTO_ALGORITHM_OTHER = 1, MIB2_TCP_RTO_ALGORITHM_CONSTANT = 2, MIB2_TCP_RTO_ALGORITHM_RSRE = 3, MIB2_TCP_RTO_ALGORITHM_VANJ = 4 }
 RTO calculation algorithm. More...
 
enum  Mib2TcpConnState {
  MIB2_TCP_CONN_STATE_CLOSED = 1, MIB2_TCP_CONN_STATE_LISTEN = 2, MIB2_TCP_CONN_STATE_SYN_SENT = 3, MIB2_TCP_CONN_STATE_SYN_RECEIVED = 4,
  MIB2_TCP_CONN_STATE_ESTABLISHED = 5, MIB2_TCP_CONN_STATE_FIN_WAIT_1 = 6, MIB2_TCP_CONN_STATE_FIN_WAIT_2 = 7, MIB2_TCP_CONN_STATE_CLOSE_WAIT = 8,
  MIB2_TCP_CONN_STATE_LAST_ACK = 9, MIB2_TCP_CONN_STATE_CLOSING = 10, MIB2_TCP_CONN_STATE_TIME_WAIT = 11, MIB2_TCP_CONN_STATE_DELETE_TCB = 12
}
 TCP connection states. More...
 
enum  Mib2EnableAuthenTraps { MIB2_AUTHEN_TRAPS_ENABLED = 1, MIB2_AUTHEN_TRAPS_DISABLED = 2 }
 Enabled/disabled state of authentication failure traps. More...
 

Variables

Mib2Base mib2Base
 MIB-II base. More...
 
const MibObject mib2Objects []
 MIB-II objects. More...
 
const MibModule mib2Module
 MIB-II module. More...
 

Detailed Description

MIB-II module.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file mib2_module.h.

Macro Definition Documentation

◆ MIB2_ICMP_GROUP_SUPPORT

#define MIB2_ICMP_GROUP_SUPPORT   ENABLED

Definition at line 71 of file mib2_module.h.

◆ MIB2_ICMP_INC_COUNTER32

#define MIB2_ICMP_INC_COUNTER32 (   name,
  value 
)    mib2Base.icmpGroup.name += value

Definition at line 171 of file mib2_module.h.

◆ MIB2_IF_GROUP_SUPPORT

#define MIB2_IF_GROUP_SUPPORT   ENABLED

Definition at line 57 of file mib2_module.h.

◆ MIB2_IF_INC_COUNTER32

#define MIB2_IF_INC_COUNTER32 (   name,
  value 
)    mib2Base.ifGroup.name += value

Definition at line 156 of file mib2_module.h.

◆ MIB2_IF_SET_TIME_TICKS

#define MIB2_IF_SET_TIME_TICKS (   name,
  value 
)    mib2Base.ifGroup.name = value

Definition at line 155 of file mib2_module.h.

◆ MIB2_IF_SPECIFIC_SIZE

#define MIB2_IF_SPECIFIC_SIZE   16

Definition at line 134 of file mib2_module.h.

◆ MIB2_IP_ADDRESS_SIZE

#define MIB2_IP_ADDRESS_SIZE   4

Definition at line 148 of file mib2_module.h.

◆ MIB2_IP_GROUP_SUPPORT

#define MIB2_IP_GROUP_SUPPORT   ENABLED

Definition at line 64 of file mib2_module.h.

◆ MIB2_IP_INC_COUNTER32

#define MIB2_IP_INC_COUNTER32 (   name,
  value 
)    mib2Base.ipGroup.name += value

Definition at line 164 of file mib2_module.h.

◆ MIB2_PHYS_ADDRESS_SIZE

#define MIB2_PHYS_ADDRESS_SIZE   6

Definition at line 141 of file mib2_module.h.

◆ MIB2_SNMP_GROUP_SUPPORT

#define MIB2_SNMP_GROUP_SUPPORT   ENABLED

Definition at line 92 of file mib2_module.h.

◆ MIB2_SNMP_INC_COUNTER32

#define MIB2_SNMP_INC_COUNTER32 (   name,
  value 
)    mib2Base.snmpGroup.name += value

Definition at line 192 of file mib2_module.h.

◆ MIB2_SUPPORT

#define MIB2_SUPPORT   DISABLED

Definition at line 43 of file mib2_module.h.

◆ MIB2_SYS_CONTACT_SIZE

#define MIB2_SYS_CONTACT_SIZE   16

Definition at line 113 of file mib2_module.h.

◆ MIB2_SYS_DESCR_SIZE

#define MIB2_SYS_DESCR_SIZE   16

Definition at line 99 of file mib2_module.h.

◆ MIB2_SYS_GROUP_SUPPORT

#define MIB2_SYS_GROUP_SUPPORT   ENABLED

Definition at line 50 of file mib2_module.h.

◆ MIB2_SYS_LOCATION_SIZE

#define MIB2_SYS_LOCATION_SIZE   16

Definition at line 127 of file mib2_module.h.

◆ MIB2_SYS_NAME_SIZE

#define MIB2_SYS_NAME_SIZE   16

Definition at line 120 of file mib2_module.h.

◆ MIB2_SYS_OBJECT_ID_SIZE

#define MIB2_SYS_OBJECT_ID_SIZE   16

Definition at line 106 of file mib2_module.h.

◆ MIB2_TCP_GROUP_SUPPORT

#define MIB2_TCP_GROUP_SUPPORT   ENABLED

Definition at line 78 of file mib2_module.h.

◆ MIB2_TCP_INC_COUNTER32

#define MIB2_TCP_INC_COUNTER32 (   name,
  value 
)    mib2Base.tcpGroup.name += value

Definition at line 178 of file mib2_module.h.

◆ MIB2_UDP_GROUP_SUPPORT

#define MIB2_UDP_GROUP_SUPPORT   ENABLED

Definition at line 85 of file mib2_module.h.

◆ MIB2_UDP_INC_COUNTER32

#define MIB2_UDP_INC_COUNTER32 (   name,
  value 
)    mib2Base.udpGroup.name += value

Definition at line 185 of file mib2_module.h.

Enumeration Type Documentation

◆ Mib2EnableAuthenTraps

Enabled/disabled state of authentication failure traps.

Enumerator
MIB2_AUTHEN_TRAPS_ENABLED 
MIB2_AUTHEN_TRAPS_DISABLED 

Definition at line 328 of file mib2_module.h.

◆ Mib2IfAdminStatus

The desired state of the interface.

Enumerator
MIB2_IF_ADMIN_STATUS_UP 
MIB2_IF_ADMIN_STATUS_DOWN 
MIB2_IF_ADMIN_STATUS_TESTING 

Definition at line 246 of file mib2_module.h.

◆ Mib2IfOperStatus

The operational state of the interface.

Enumerator
MIB2_IF_OPER_STATUS_UP 
MIB2_IF_OPER_STATUS_DOWN 
MIB2_IF_OPER_STATUS_TESTING 

Definition at line 258 of file mib2_module.h.

◆ Mib2IfType

enum Mib2IfType

Interface types.

Enumerator
MIB2_IF_TYPE_OTHER 
MIB2_IF_TYPE_ETHERNET_CSMACD 
MIB2_IF_TYPE_PROP_PTP_SERIAL 
MIB2_IF_TYPE_PPP 
MIB2_IF_TYPE_SOFT_LOOPBACK 
MIB2_IF_TYPE_SLIP 
MIB2_IF_TYPE_RS232 
MIB2_IF_TYPE_PARA 
MIB2_IF_TYPE_IEEE_802_11 
MIB2_IF_TYPE_HDLC 
MIB2_IF_TYPE_TUNNEL 
MIB2_IF_TYPE_L2_VLAN 
MIB2_IF_TYPE_USB 
MIB2_IF_TYPE_PLC 
MIB2_IF_TYPE_BRIDGE 
MIB2_IF_TYPE_IEEE_802_15_4 

Definition at line 221 of file mib2_module.h.

◆ Mib2IpForwarding

IP forwarding state.

Enumerator
MIB2_IP_FORWARDING_ENABLED 
MIB2_IP_FORWARDING_DISABLED 

Definition at line 270 of file mib2_module.h.

◆ Mib2IpNetToMediaType

Type of mapping.

Enumerator
MIB2_IP_NET_TO_MEDIA_TYPE_OTHER 
MIB2_IP_NET_TO_MEDIA_TYPE_INVALID 
MIB2_IP_NET_TO_MEDIA_TYPE_DYNAMIC 
MIB2_IP_NET_TO_MEDIA_TYPE_STATIC 

Definition at line 281 of file mib2_module.h.

◆ Mib2SysService

System services.

Enumerator
MIB2_SYS_SERVICE_PHYSICAL 
MIB2_SYS_SERVICE_DATALINK 
MIB2_SYS_SERVICE_INTERNET 
MIB2_SYS_SERVICE_END_TO_END 
MIB2_SYS_SERVICE_APPLICATIONS 

Definition at line 207 of file mib2_module.h.

◆ Mib2TcpConnState

TCP connection states.

Enumerator
MIB2_TCP_CONN_STATE_CLOSED 
MIB2_TCP_CONN_STATE_LISTEN 
MIB2_TCP_CONN_STATE_SYN_SENT 
MIB2_TCP_CONN_STATE_SYN_RECEIVED 
MIB2_TCP_CONN_STATE_ESTABLISHED 
MIB2_TCP_CONN_STATE_FIN_WAIT_1 
MIB2_TCP_CONN_STATE_FIN_WAIT_2 
MIB2_TCP_CONN_STATE_CLOSE_WAIT 
MIB2_TCP_CONN_STATE_LAST_ACK 
MIB2_TCP_CONN_STATE_CLOSING 
MIB2_TCP_CONN_STATE_TIME_WAIT 
MIB2_TCP_CONN_STATE_DELETE_TCB 

Definition at line 307 of file mib2_module.h.

◆ Mib2TcpRtoAlgorithm

RTO calculation algorithm.

Enumerator
MIB2_TCP_RTO_ALGORITHM_OTHER 
MIB2_TCP_RTO_ALGORITHM_CONSTANT 
MIB2_TCP_RTO_ALGORITHM_RSRE 
MIB2_TCP_RTO_ALGORITHM_VANJ 

Definition at line 294 of file mib2_module.h.

Variable Documentation

◆ mib2Base

Mib2Base mib2Base
extern

MIB-II base.

Definition at line 63 of file mib2_module.c.

◆ mib2Module

const MibModule mib2Module
extern

MIB-II module.

Definition at line 2210 of file mib2_module.c.

◆ mib2Objects

const MibObject mib2Objects[]
extern

MIB-II objects.

Definition at line 70 of file mib2_module.c.