#include "lwip/opt.h"
#include "lwip/err.h"
#include "lwip/ip_addr.h"
#include "lwip/inet.h"
#include "lwip/pbuf.h"
Go to the source code of this file.
|
void | netif_init (void) |
|
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_default (struct netif *netif) |
|
void | netif_set_ipaddr (struct netif *netif, struct ip_addr *ipaddr) |
|
void | netif_set_netmask (struct netif *netif, struct ip_addr *netmast) |
|
void | netif_set_gw (struct netif *netif, struct ip_addr *gw) |
|
void | netif_set_up (struct netif *netif) |
|
void | netif_set_down (struct netif *netif) |
|
u8_t | netif_is_up (struct netif *netif) |
|
◆ NETIF_FLAG_BROADCAST
#define NETIF_FLAG_BROADCAST 0x2U |
if set, the netif has broadcast capability
◆ NETIF_FLAG_DHCP
#define NETIF_FLAG_DHCP 0x08U |
if set, the interface is configured using DHCP
◆ NETIF_FLAG_LINK_UP
#define NETIF_FLAG_LINK_UP 0x10U |
if set, the interface has an active link (set by the network interface driver)
◆ NETIF_FLAG_POINTTOPOINT
#define NETIF_FLAG_POINTTOPOINT 0x4U |
if set, the netif is one end of a point-to-point connection
◆ NETIF_FLAG_UP
#define NETIF_FLAG_UP 0x1U |
TODO: define the use (where, when, whom) of netif flags whether the network interface is 'up'. this is a software flag used to control whether this network interface is enabled and processes traffic.
◆ NETIF_MAX_HWADDR_LEN
#define NETIF_MAX_HWADDR_LEN 6U |
must be the maximum of all used hardware address lengths across all types of interfaces in use
◆ netif_add()
Add a network interface to the list of lwIP netifs.
- Parameters
-
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. |
- Returns
- netif, or NULL if failed.
◆ netif_find()
struct netif* netif_find |
( |
char * |
name | ) |
|
◆ netif_init()
◆ netif_is_up()
Ask if an interface is up
◆ netif_remove()
◆ netif_set_addr()
◆ netif_set_default()
void netif_set_default |
( |
struct netif * |
netif | ) |
|
◆ netif_set_down()
Bring an interface down, disabling any traffic processing.
- Note
- : Enabling DHCP on a down interface will make it come up once configured.
- See also
- dhcp_start()
◆ netif_set_gw()
◆ netif_set_ipaddr()
◆ netif_set_netmask()
◆ netif_set_up()
Bring an interface up, available for processing traffic.
- Note
- : Enabling DHCP on a down interface will make it come up once configured.
- See also
- dhcp_start()
◆ netif_default
struct netif* netif_default |
The default network interface.
◆ netif_list
The list of network interfaces.