lwIP 2.1.3 Lightweight IP stack

Macros | Functions
netifapi.h File Reference
`#include "lwip/opt.h"`
`#include "lwip/sys.h"`
`#include "lwip/netif.h"`
`#include "lwip/dhcp.h"`
`#include "lwip/autoip.h"`
`#include "lwip/priv/tcpip_priv.h"`
`#include "lwip/priv/api_msg.h"`
`#include "lwip/prot/ethernet.h"`

## Macros
#define | netifapi_netif_remove(n) netifapi_netif_common(n, netif_remove, NULL)
#define | netifapi_netif_set_up(n) netifapi_netif_common(n, netif_set_up, NULL)
#define | netifapi_netif_set_down(n) netifapi_netif_common(n, netif_set_down, NULL)
#define | netifapi_netif_set_default(n) netifapi_netif_common(n, netif_set_default, NULL)
#define | netifapi_netif_set_link_up(n) netifapi_netif_common(n, netif_set_link_up, NULL)
#define | netifapi_netif_set_link_down(n) netifapi_netif_common(n, netif_set_link_down, NULL)
#define | netifapi_dhcp_start(n) netifapi_netif_common(n, NULL, dhcp_start)
#define | netifapi_dhcp_stop(n) netifapi_netif_common(n, dhcp_stop, NULL)
#define | netifapi_dhcp_inform(n) netifapi_netif_common(n, dhcp_inform, NULL)
#define | netifapi_dhcp_renew(n) netifapi_netif_common(n, NULL, dhcp_renew)
#define | netifapi_dhcp_release(n) netifapi_netif_common(n, NULL, dhcp_release)
#define | netifapi_dhcp_release_and_stop(n) netifapi_netif_common(n, dhcp_release_and_stop, NULL)
#define | netifapi_autoip_start(n) netifapi_netif_common(n, NULL, autoip_start)
#define | netifapi_autoip_stop(n) netifapi_netif_common(n, NULL, autoip_stop)

## Functions
err_t | netifapi_arp_add (const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, enum netifapi_arp_entry type)
err_t | netifapi_arp_remove (const ip4_addr_t *ipaddr, enum netifapi_arp_entry type)
err_t | netifapi_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)
err_t | netifapi_netif_set_addr (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw)
err_t | netifapi_netif_common (struct netif *netif, netifapi_void_fn voidfunc, netifapi_errt_fn errtfunc)
err_t | netifapi_netif_name_to_index (const char *name, u8_t *idx)
err_t | netifapi_netif_index_to_name (u8_t idx, char *name)

## Detailed Description

netif API (to be used from non-TCPIP threads)

## Function Documentation

## ◆ netifapi_arp_add()

err_t netifapi_arp_add | ( | const ip4_addr_t * | ipaddr,
|  | struct eth_addr * | ethaddr,
|  | enum netifapi_arp_entry | type
| ) |  |

Add or update an entry in the ARP cache. For an update, ipaddr is used to find the cache entry.

Parameters

  ipaddr | IPv4 address of cache entry
  ethaddr | hardware address mapped to ipaddr
  type | type of ARP cache entry

Returns
  ERR_OK: entry added/updated, else error from err_t

## ◆ netifapi_arp_remove()

err_t netifapi_arp_remove | ( | const ip4_addr_t * | ipaddr,
|  | enum netifapi_arp_entry | type
| ) |  |

Remove an entry in the ARP cache identified by ipaddr

Parameters

  ipaddr | IPv4 address of cache entry
  type | type of ARP cache entry

Returns
  ERR_OK: entry removed, else error from err_t

## ◆ netifapi_netif_common()

err_t netifapi_netif_common | ( | struct netif * | netif,
|  | netifapi_void_fn | voidfunc,
|  | netifapi_errt_fn | errtfunc
| ) |  |

call the "errtfunc" (or the "voidfunc" if "errtfunc" is NULL) in a thread-safe way by running that function inside the tcpip_thread context.

Note
  use only for functions where there is only "netif" parameter.