Microchip® Advanced Software Framework

netif Struct Reference

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

#include <netif.h>

Data Fields

struct autoipautoip
 the AutoIP client state information for this netif More...
 
struct dhcpdhcp
 the DHCP client state information for this netif More...
 
u8_t flags
 flags (see NETIF_FLAG_ above) More...
 
ip_addr_t gw
 
u8_t hwaddr [NETIF_MAX_HWADDR_LEN]
 link level hardware address of this interface More...
 
u8_t hwaddr_len
 number of bytes used in hwaddr More...
 
netif_input_fn input
 This function is called by the network device driver to pass a packet up the TCP/IP stack. More...
 
ip6_addr_t ip6_addr [LWIP_IPV6_NUM_ADDRESSES]
 Array of IPv6 addresses for this netif. More...
 
u8_t ip6_addr_state [LWIP_IPV6_NUM_ADDRESSES]
 The state of each IPv6 address (Tentative, Preferred, etc). More...
 
u8_t ip6_autoconfig_enabled
 is this netif enabled for IPv6 autoconfiguration More...
 
ip_addr_t ip_addr
 IP address configuration in network byte order. More...
 
netif_linkoutput_fn linkoutput
 This function is called by the ARP module when it wants to send a packet on the interface. More...
 
netif_mld_mac_filter_fn mld_mac_filter
 This function could be called to add or delete an entry in the IPv6 multicast filter table of the ethernet MAC. More...
 
u16_t mtu
 maximum transfer unit (in bytes) More...
 
char name [2]
 descriptive abbreviation More...
 
ip_addr_t netmask
 
struct netifnext
 pointer to next in linked list More...
 
u8_t num
 number of this interface More...
 
netif_output_fn output
 This function is called by the IP module when it wants to send a packet on the interface. More...
 
netif_output_ip6_fn output_ip6
 This function is called by the IPv6 module when it wants to send a packet on the interface. More...
 
u8_t rs_count
 Number of Router Solicitation messages that remain to be sent. More...
 
voidstate
 This field can be set by the device driver and could point to state information for the device. More...
 
netif_status_callback_fn status_callback
 This function is called when the netif state is set to up or down. More...
 

netif_input_fn netif::input

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

Referenced by netif_add(), and winc_netif_rx_callback().

ip6_addr_t netif::ip6_addr[LWIP_IPV6_NUM_ADDRESSES]

Array of IPv6 addresses for this netif.

Referenced by nd6_tmr(), netif_add(), and netif_create_ip6_linklocal_address().

u8_t netif::ip6_addr_state[LWIP_IPV6_NUM_ADDRESSES]

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

See Also
ip6_addr.h

Referenced by nd6_tmr(), and netif_create_ip6_linklocal_address().

u8_t netif::ip6_autoconfig_enabled

is this netif enabled for IPv6 autoconfiguration

Referenced by nd6_tmr(), and netif_add().

netif_linkoutput_fn netif::linkoutput

This function is called by the ARP module when it wants to send a packet on the interface.

This function outputs the pbuf as-is on the link medium.

Referenced by etharp_arp_input(), etharp_raw(), etharp_send_ip(), ethip6_send(), and winc_netif_init().

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.

Referenced by mld6_joingroup(), mld6_leavegroup(), mld6_stop(), netif_add(), and winc_netif_init().

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.

Referenced by ip_frag(), and winc_netif_init().

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.

Referenced by ip6_output_if_src(), netif_add(), and winc_netif_init().

u8_t netif::rs_count

Number of Router Solicitation messages that remain to be sent.

Referenced by nd6_input(), nd6_tmr(), netif_add(), and netif_set_up().

void* netif::state

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

Referenced by etharp_cleanup_netif(), etharp_find_addr(), etharp_update_arp_entry(), nd6_tmr(), netif_add(), and winc_netif_init().

netif_status_callback_fn netif::status_callback

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

Referenced by netif_add(), and netif_set_status_callback().