37 #ifndef LWIP_HDR_SNMP_H
38 #define LWIP_HDR_SNMP_H
63 snmp_ifType_regular1822,
66 snmp_ifType_rfc877_x25,
67 snmp_ifType_ethernet_csmacd,
68 snmp_ifType_iso88023_csmacd,
69 snmp_ifType_iso88024_tokenBus,
70 snmp_ifType_iso88025_tokenRing,
71 snmp_ifType_iso88026_man,
73 snmp_ifType_proteon_10Mbit,
74 snmp_ifType_proteon_80Mbit,
75 snmp_ifType_hyperchannel,
81 snmp_ifType_basicISDN,
82 snmp_ifType_primaryISDN,
83 snmp_ifType_propPointToPointSerial,
85 snmp_ifType_softwareLoopback,
87 snmp_ifType_ethernet_3Mbit,
93 snmp_ifType_frame_relay
97 #ifndef MIB2_COPY_SYSUPTIME_TO
98 #define MIB2_COPY_SYSUPTIME_TO(ptrToVal) (*(ptrToVal) = (sys_now() / 10))
105 #define MIB2_STATS_NETIF_INC(n, x) do { ++(n)->mib2_counters.x; } while(0)
110 #define MIB2_STATS_NETIF_ADD(n, x, val) do { (n)->mib2_counters.x += (val); } while(0)
119 #define MIB2_INIT_NETIF(netif, type, speed) do { \
120 (netif)->link_type = (type); \
121 (netif)->link_speed = (speed);\
123 (netif)->mib2_counters.ifinoctets = 0; \
124 (netif)->mib2_counters.ifinucastpkts = 0; \
125 (netif)->mib2_counters.ifinnucastpkts = 0; \
126 (netif)->mib2_counters.ifindiscards = 0; \
127 (netif)->mib2_counters.ifinerrors = 0; \
128 (netif)->mib2_counters.ifinunknownprotos = 0; \
129 (netif)->mib2_counters.ifoutoctets = 0; \
130 (netif)->mib2_counters.ifoutucastpkts = 0; \
131 (netif)->mib2_counters.ifoutnucastpkts = 0; \
132 (netif)->mib2_counters.ifoutdiscards = 0; \
133 (netif)->mib2_counters.ifouterrors = 0; } while(0)
135 #ifndef MIB2_COPY_SYSUPTIME_TO
136 #define MIB2_COPY_SYSUPTIME_TO(ptrToVal)
138 #define MIB2_INIT_NETIF(netif, type, speed)
139 #define MIB2_STATS_NETIF_INC(n, x)
140 #define MIB2_STATS_NETIF_ADD(n, x, val)
144 #if LWIP_MIB2_CALLBACKS
149 #if LWIP_IPV4 && LWIP_ARP
154 #define mib2_add_arp_entry(ni,ip)
155 #define mib2_remove_arp_entry(ni,ip)
177 #define mib2_netif_added(ni)
178 #define mib2_netif_removed(ni)
181 #define mib2_add_arp_entry(ni,ip)
182 #define mib2_remove_arp_entry(ni,ip)
185 #define mib2_add_ip4(ni)
186 #define mib2_remove_ip4(ni)
187 #define mib2_add_route_ip4(dflt, ni)
188 #define mib2_remove_route_ip4(dflt, ni)
191 #define mib2_udp_bind(pcb)
192 #define mib2_udp_unbind(pcb)
196 #define NETIF_INIT_SNMP MIB2_INIT_NETIF
197 #define snmp_add_ifinoctets(ni,value) MIB2_STATS_NETIF_ADD(ni, ifinoctets, value)
198 #define snmp_inc_ifinucastpkts(ni) MIB2_STATS_NETIF_INC(ni, ifinucastpkts)
199 #define snmp_inc_ifinnucastpkts(ni) MIB2_STATS_NETIF_INC(ni, ifinnucastpkts)
200 #define snmp_inc_ifindiscards(ni) MIB2_STATS_NETIF_INC(ni, ifindiscards)
201 #define snmp_inc_ifinerrors(ni) MIB2_STATS_NETIF_INC(ni, ifinerrors)
202 #define snmp_inc_ifinunknownprotos(ni) MIB2_STATS_NETIF_INC(ni, ifinunknownprotos)
203 #define snmp_add_ifoutoctets(ni,value) MIB2_STATS_NETIF_ADD(ni, ifoutoctets, value)
204 #define snmp_inc_ifoutucastpkts(ni) MIB2_STATS_NETIF_INC(ni, ifoutucastpkts)
205 #define snmp_inc_ifoutnucastpkts(ni) MIB2_STATS_NETIF_INC(ni, ifoutnucastpkts)
206 #define snmp_inc_ifoutdiscards(ni) MIB2_STATS_NETIF_INC(ni, ifoutdiscards)
207 #define snmp_inc_ifouterrors(ni) MIB2_STATS_NETIF_INC(ni, ifouterrors)
uint8_t u8_t
Definition: arch.h:125
#define mib2_netif_added(ni)
Definition: snmp.h:177
#define mib2_add_route_ip4(dflt, ni)
Definition: snmp.h:187
#define mib2_udp_unbind(pcb)
Definition: snmp.h:192
#define mib2_netif_removed(ni)
Definition: snmp.h:178
#define mib2_remove_arp_entry(ni, ip)
Definition: snmp.h:182
#define mib2_remove_route_ip4(dflt, ni)
Definition: snmp.h:188
#define mib2_udp_bind(pcb)
Definition: snmp.h:191
#define mib2_add_arp_entry(ni, ip)
Definition: snmp.h:181
#define mib2_remove_ip4(ni)
Definition: snmp.h:186
#define mib2_add_ip4(ni)
Definition: snmp.h:185