lwIP  2.0.2
Lightweight IP stack
netif.c File Reference
#include "lwip/opt.h"
#include <string.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/raw.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/mld6.h"
#include "lwip/nd6.h"

Functions

err_t netif_input (struct pbuf *p, struct netif *inp)
 
struct netifnetif_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_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)
 
struct netifnetif_find (const char *name)
 
void netif_set_ipaddr (struct netif *netif, const ip4_addr_t *ipaddr)
 
void netif_set_gw (struct netif *netif, const ip4_addr_t *gw)
 
void netif_set_netmask (struct netif *netif, const ip4_addr_t *netmask)
 
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)
 

Variables

struct netifnetif_list
 
struct netifnetif_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 address is assigned to the netif and returns its index.

Parameters
netifthe netif to check
ip6addrthe IPv6 address to find
Returns
>= 0: address found, this is its index -1: address not found on this netif

◆ 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.