lwIP 2.1.2 Lightweight IP stack

Data Structures | Macros | Enumerations
MIB2 statistics
APIs » "raw" APIs » Network interface (NETIF)

## Data Structures
struct | stats_mib2_netif_ctrs

## Macros
#define | MIB2_STATS_NETIF_INC(n, x) do { ++(n)->mib2_counters.x; } while(0)
#define | MIB2_STATS_NETIF_ADD(n, x, val) do { (n)->mib2_counters.x += (val); } while(0)
#define | MIB2_INIT_NETIF(netif, type, speed)

## Enumerations
enum | snmp_ifType

## Detailed Description

## Macro Definition Documentation

## ◆ MIB2_INIT_NETIF

#define MIB2_INIT_NETIF | ( |  | netif,
|  |  | type,
|  |  | speed
| ) |  |

Value:
do { \
(netif)->link_type = (type); \
(netif)->link_speed = (speed);\
(netif)->ts = 0; \
(netif)->mib2_counters.ifinoctets = 0; \
(netif)->mib2_counters.ifinucastpkts = 0; \
(netif)->mib2_counters.ifinnucastpkts = 0; \
(netif)->mib2_counters.ifindiscards = 0; \
(netif)->mib2_counters.ifinerrors = 0; \
(netif)->mib2_counters.ifinunknownprotos = 0; \
(netif)->mib2_counters.ifoutoctets = 0; \
(netif)->mib2_counters.ifoutucastpkts = 0; \
(netif)->mib2_counters.ifoutnucastpkts = 0; \
(netif)->mib2_counters.ifoutdiscards = 0; \
(netif)->mib2_counters.ifouterrors = 0; } while(0)
stats_mib2_netif_ctrs::ifoutoctets
u32_t ifoutoctets
Definition: stats.h:212
stats_mib2_netif_ctrs::ifinnucastpkts
u32_t ifinnucastpkts
Definition: stats.h:194
netif::link_type
u8_t link_type
Definition: netif.h:361
netif::ts
u32_t ts
Definition: netif.h:365
stats_mib2_netif_ctrs::ifouterrors
u32_t ifouterrors
Definition: stats.h:228
stats_mib2_netif_ctrs::ifoutnucastpkts
u32_t ifoutnucastpkts
Definition: stats.h:220
netif
Definition: netif.h:260
netif::link_speed
u32_t link_speed
Definition: netif.h:363
stats_mib2_netif_ctrs::ifinerrors
u32_t ifinerrors
Definition: stats.h:203
netif::mib2_counters
struct stats_mib2_netif_ctrs mib2_counters
Definition: netif.h:367
stats_mib2_netif_ctrs::ifinoctets
u32_t ifinoctets
Definition: stats.h:188

Init MIB2 statistic counters in netif

Parameters

  netif | Netif to init
  type | one of enum snmp_ifType
  speed | your link speed here (units: bits per second)

## ◆ MIB2_STATS_NETIF_ADD

#define MIB2_STATS_NETIF_ADD | ( |  | n,
|  |  | x,
|  |  | val
| ) |  | do { (n)->mib2_counters.x += (val); } while(0)

Add value to stats member for SNMP MIB2 stats (struct stats_mib2_netif_ctrs)

## ◆ MIB2_STATS_NETIF_INC

#define MIB2_STATS_NETIF_INC | ( |  | n,
|  |  | x
| ) |  | do { ++(n)->mib2_counters.x; } while(0)

Increment stats member for SNMP MIB2 stats (struct stats_mib2_netif_ctrs)

## Enumeration Type Documentation

## ◆ snmp_ifType

enum snmp_ifType

See also
  RFC1213, "MIB-II, 6. Definitions"