Functions | |
struct netif * | netif_add (struct netif *netif, struct ip_addr *ipaddr, struct ip_addr *netmask, struct ip_addr *gw, void *state, err_t(*init)(struct netif *netif), err_t(*input)(struct pbuf *p, struct netif *netif)) |
void | netif_set_addr (struct netif *netif, struct ip_addr *ipaddr, struct ip_addr *netmask, struct ip_addr *gw) |
void | netif_remove (struct netif *netif) |
struct netif * | netif_find (char *name) |
void | netif_set_ipaddr (struct netif *netif, struct ip_addr *ipaddr) |
void | netif_set_gw (struct netif *netif, struct ip_addr *gw) |
void | netif_set_netmask (struct netif *netif, struct ip_addr *netmask) |
void | netif_set_default (struct netif *netif) |
void | netif_set_up (struct netif *netif) |
void | netif_set_down (struct netif *netif) |
u8_t | netif_is_up (struct netif *netif) |
void | netif_set_status_callback (struct netif *netif, void(*status_callback)(struct netif *netif)) |
void | netif_set_link_up (struct netif *netif) |
void | netif_set_link_down (struct netif *netif) |
u8_t | netif_is_link_up (struct netif *netif) |
void | netif_set_link_callback (struct netif *netif, void(*link_callback)(struct netif *netif)) |
Variables | |
struct netif * | netif_list |
struct netif * | netif_default |
struct netif* netif_add | ( | struct netif * | netif, | |
struct ip_addr * | ipaddr, | |||
struct ip_addr * | netmask, | |||
struct ip_addr * | gw, | |||
void * | state, | |||
err_t(*)(struct netif *netif) | init, | |||
err_t(*)(struct pbuf *p, struct netif *netif) | input | |||
) | [read] |
Add a network interface to the list of lwIP netifs.
netif | a pre-allocated netif structure | |
ipaddr | IP address for the new netif | |
netmask | network mask for the new netif | |
gw | default gateway IP address for the new netif | |
state | opaque data passed to the new netif | |
init | callback function that initializes the interface | |
input | callback function that is called to pass ingress packets up in the protocol layer stack. |
struct netif* netif_find | ( | char * | name | ) | [read] |
Find a network interface by searching for its name
name | the name of the netif (like netif->name) plus concatenated number in ascii representation (e.g. 'en0') |
u8_t netif_is_link_up | ( | struct netif * | netif | ) |
Ask if a link is up
u8_t netif_is_up | ( | struct netif * | netif | ) |
Ask if an interface is up
void netif_remove | ( | struct netif * | netif | ) |
Remove a network interface from the list of lwIP netifs.
netif | the network interface to remove |
void netif_set_addr | ( | struct netif * | netif, | |
struct ip_addr * | ipaddr, | |||
struct ip_addr * | netmask, | |||
struct ip_addr * | gw | |||
) |
Change IP address configuration for a network interface (including netmask and default gateway).
netif | the network interface to change | |
ipaddr | the new IP address | |
netmask | the new netmask | |
gw | the new default gateway |
void netif_set_default | ( | struct netif * | netif | ) |
Set a network interface as the default network interface (used to output all packets for which no specific route is found)
netif | the default network interface |
void netif_set_down | ( | struct netif * | netif | ) |
Bring an interface down, disabling any traffic processing.
void netif_set_gw | ( | struct netif * | netif, | |
struct ip_addr * | gw | |||
) |
Change the default gateway for a network interface
netif | the network interface to change | |
gw | the new default gateway |
void netif_set_ipaddr | ( | struct netif * | netif, | |
struct ip_addr * | ipaddr | |||
) |
Change the IP address of a network interface
netif | the network interface to change | |
ipaddr | the new IP address |
Set callback to be called when link is brought up/down
void netif_set_link_down | ( | struct netif * | netif | ) |
Called by a driver when its link goes down
void netif_set_link_up | ( | struct netif * | netif | ) |
Called by a driver when its link goes up
For Ethernet network interfaces, we would like to send a "gratuitous ARP"; this is an ARP packet sent by a node in order to spontaneously cause other nodes to update an entry in their ARP cache. From RFC 3220 "IP Mobility Support for IPv4" section 4.6.
void netif_set_netmask | ( | struct netif * | netif, | |
struct ip_addr * | netmask | |||
) |
Change the netmask of a network interface
netif | the network interface to change | |
netmask | the new netmask |
void netif_set_status_callback | ( | struct netif * | netif, | |
void(*)(struct netif *netif) | status_callback | |||
) |
Set callback to be called when interface is brought up/down
void netif_set_up | ( | struct netif * | netif | ) |
Bring an interface up, available for processing traffic.
For Ethernet network interfaces, we would like to send a "gratuitous ARP"; this is an ARP packet sent by a node in order to spontaneously cause other nodes to update an entry in their ARP cache. From RFC 3220 "IP Mobility Support for IPv4" section 4.6.
struct netif* netif_default |
The default network interface.
struct netif* netif_list |
The list of network interfaces.