lwIP 2.1.0 Lightweight IP stack

Functions | Variables
netif.c File Reference
`#include "lwip/opt.h"`
`#include <string.h>`
`#include <stdlib.h>`
`#include "lwip/def.h"`
`#include "lwip/ip_addr.h"`
`#include "lwip/ip6_addr.h"`
`#include "lwip/netif.h"`
`#include "lwip/priv/tcp_priv.h"`
`#include "lwip/udp.h"`
`#include "lwip/priv/raw_priv.h"`
`#include "lwip/snmp.h"`
`#include "lwip/igmp.h"`
`#include "lwip/etharp.h"`
`#include "lwip/stats.h"`
`#include "lwip/sys.h"`
`#include "lwip/ip.h"`
`#include "lwip/tcpip.h"`
`#include "netif/ethernet.h"`
`#include "lwip/autoip.h"`
`#include "lwip/dhcp.h"`
`#include "lwip/dhcp6.h"`
`#include "lwip/mld6.h"`
`#include "lwip/nd6.h"`

## Functions
err_t | netif_input (struct pbuf *p, struct netif *inp)
struct netif * | netif_add_noaddr (struct netif *netif, void *state, netif_init_fn init, netif_input_fn input)
struct netif * | netif_add (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input)
void | netif_set_ipaddr (struct netif *netif, const ip4_addr_t *ipaddr)
void | netif_set_netmask (struct netif *netif, const ip4_addr_t *netmask)
void | netif_set_gw (struct netif *netif, const ip4_addr_t *gw)
void | netif_set_addr (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw)
void | netif_remove (struct netif *netif)
void | netif_set_default (struct netif *netif)
void | netif_set_up (struct netif *netif)
void | netif_set_down (struct netif *netif)
void | netif_set_status_callback (struct netif *netif, netif_status_callback_fn status_callback)
void | netif_set_remove_callback (struct netif *netif, netif_status_callback_fn remove_callback)
void | netif_set_link_up (struct netif *netif)
void | netif_set_link_down (struct netif *netif)
void | netif_set_link_callback (struct netif *netif, netif_status_callback_fn link_callback)
err_t | netif_loop_output (struct netif *netif, struct pbuf *p)
void | netif_poll (struct netif *netif)
u8_t | netif_alloc_client_data_id (void)
void | netif_ip6_addr_set (struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6)
void | netif_ip6_addr_set_state (struct netif *netif, s8_t addr_idx, u8_t state)
s8_t | netif_get_ip6_addr_match (struct netif *netif, const ip6_addr_t *ip6addr)
void | netif_create_ip6_linklocal_address (struct netif *netif, u8_t from_mac_48bit)
err_t | netif_add_ip6_address (struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx)
u8_t | netif_name_to_index (const char *name)
char * | netif_index_to_name (u8_t idx, char *name)
struct netif * | netif_get_by_index (u8_t idx)
struct netif * | netif_find (const char *name)
void | netif_add_ext_callback (netif_ext_callback_t *callback, netif_ext_callback_fn fn)
void | netif_remove_ext_callback (netif_ext_callback_t *callback)
void | netif_invoke_ext_callback (struct netif *netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t *args)

## Variables
struct netif * | netif_list
struct netif * | netif_default

## Detailed Description

lwIP network interface abstraction

## Function Documentation

## ◆ netif_get_ip6_addr_match()

s8_t netif_get_ip6_addr_match | ( | struct netif * | netif,
|  | const ip6_addr_t * | ip6addr
| ) |  |

Checks if a specific local address is present on the netif and returns its index. Depending on its state, it may or may not be assigned to the interface (as per RFC terminology).

The given address may or may not be zoned (i.e., have a zone index other than IP6_NO_ZONE). If the address is zoned, it must have the correct zone for the given netif, or no match will be found.

Parameters

  netif | the netif to check
  ip6addr | the IPv6 address to find

Returns
  >= 0: address found, this is its index -1: address not found on this netif

## ◆ netif_invoke_ext_callback()

void netif_invoke_ext_callback | ( | struct netif * | netif,
|  | netif_nsc_reason_t | reason,
|  | const netif_ext_callback_args_t * | args
| ) |  |

Invoke extended netif status event

Parameters

  netif | netif that is affected by change
  reason | change reason
  args | depends on reason, see reason description

## ◆ netif_poll()

void netif_poll | ( | struct netif * | netif | ) |

Call netif_poll() in the main loop of your application. This is to prevent reentering non-reentrant functions like tcp_input(). Packets passed to netif_loop_output() are put on a list that is passed to netif->input() by netif_poll().

## Variable Documentation

## ◆ netif_default

struct netif* netif_default

The default network interface.

## ◆ netif_list

struct netif* netif_list

The list of network interfaces.