lwIP 2.1.0 Lightweight IP stack

Data Fields
netif Struct Reference

`#include <netif.h>`

## Data Fields
struct netif * | next
ip_addr_t | ip_addr
ip_addr_t | ip6_addr [3]
u8_t | ip6_addr_state [3]
u32_t | ip6_addr_valid_life [3]
netif_input_fn | input
netif_output_fn | output
netif_linkoutput_fn | linkoutput
netif_output_ip6_fn | output_ip6
netif_status_callback_fn | status_callback
netif_status_callback_fn | link_callback
netif_status_callback_fn | remove_callback
void * | state
u16_t | mtu
u16_t | mtu6
u8_t | hwaddr [6U]
u8_t | hwaddr_len
u8_t | flags
char | name [2]
u8_t | num
u8_t | ip6_autoconfig_enabled
u8_t | rs_count
u8_t | link_type
u32_t | link_speed
u32_t | ts
struct stats_mib2_netif_ctrs | mib2_counters
netif_igmp_mac_filter_fn | igmp_mac_filter
netif_mld_mac_filter_fn | mld_mac_filter

## Detailed Description

Generic data structure used for all lwIP network interfaces. The following fields should be filled in by the initialization function for the device driver: hwaddr_len, hwaddr[], mtu, flags

## Field Documentation

## ◆ flags

u8_t netif::flags

flags (

See also
  Flags)

## ◆ hwaddr

u8_t netif::hwaddr[6U]

link level hardware address of this interface

## ◆ hwaddr_len

u8_t netif::hwaddr_len

number of bytes used in hwaddr

## ◆ igmp_mac_filter

netif_igmp_mac_filter_fn netif::igmp_mac_filter

This function could be called to add or delete an entry in the multicast filter table of the ethernet MAC.

## ◆ input

netif_input_fn netif::input

This function is called by the network device driver to pass a packet up the TCP/IP stack.

## ◆ ip6_addr

ip_addr_t netif::ip6_addr[3]

Array of IPv6 addresses for this netif.

## ◆ ip6_addr_state

u8_t netif::ip6_addr_state[3]

The state of each IPv6 address (Tentative, Preferred, etc).

See also
  ip6_addr.h

## ◆ ip6_addr_valid_life

u32_t netif::ip6_addr_valid_life[3]

Remaining valid and preferred lifetime of each IPv6 address, in seconds. For valid lifetimes, the special value of IP6_ADDR_LIFE_STATIC (0) indicates the address is static and has no lifetimes.

## ◆ ip6_autoconfig_enabled

u8_t netif::ip6_autoconfig_enabled

is this netif enabled for IPv6 autoconfiguration

## ◆ ip_addr

ip_addr_t netif::ip_addr

IP address configuration in network byte order

## ◆ link_callback

netif_status_callback_fn netif::link_callback

This function is called when the netif link is set to up or down

## ◆ link_speed

u32_t netif::link_speed

(estimate) link speed

## ◆ link_type

u8_t netif::link_type

link type (from "snmp_ifType" enum from snmp_mib2.h)

## ◆ linkoutput

netif_linkoutput_fn netif::linkoutput

This function is called by ethernet_output() when it wants to send a packet on the interface. This function outputs the pbuf as-is on the link medium.

## ◆ mib2_counters

struct stats_mib2_netif_ctrs netif::mib2_counters

counters

## ◆ mld_mac_filter

netif_mld_mac_filter_fn netif::mld_mac_filter

This function could be called to add or delete an entry in the IPv6 multicast filter table of the ethernet MAC.

## ◆ mtu

u16_t netif::mtu

maximum transfer unit (in bytes)

## ◆ mtu6

u16_t netif::mtu6

maximum transfer unit (in bytes), updated by RA

## ◆ name

char netif::name[2]

descriptive abbreviation

## ◆ next

struct netif* netif::next

pointer to next in linked list

## ◆ num

u8_t netif::num

number of this interface. Used for Interface Identification API and NETIF related, as well as for IPv6 zones

## ◆ output

netif_output_fn netif::output

This function is called by the IP module when it wants to send a packet on the interface. This function typically first resolves the hardware address, then sends the packet. For ethernet physical layer, this is usually etharp_output()

## ◆ output_ip6

netif_output_ip6_fn netif::output_ip6

This function is called by the IPv6 module when it wants to send a packet on the interface. This function typically first resolves the hardware address, then sends the packet. For ethernet physical layer, this is usually ethip6_output()

## ◆ remove_callback

netif_status_callback_fn netif::remove_callback

This function is called when the netif has been removed

## ◆ rs_count

u8_t netif::rs_count

Number of Router Solicitation messages that remain to be sent.

## ◆ state

void* netif::state

This field can be set by the device driver and could point to state information for the device.

## ◆ status_callback

netif_status_callback_fn netif::status_callback

This function is called when the netif state is set to up or down

## ◆ ts

u32_t netif::ts

timestamp at last change made (up/down)

The documentation for this struct was generated from the following file:

- src/include/lwip/netif.h