#include "lwip/opt.h"
#include "lwip/err.h"
#include "lwip/ip_addr.h"
#include "lwip/def.h"
#include "lwip/pbuf.h"
#include "lwip/stats.h"
Go to the source code of this file.
#define IF__NETIF_CHECKSUM_ENABLED |
( |
|
netif, |
|
|
|
chksumflag |
|
) |
| |
#define NETIF_FLAG_BROADCAST 0x02U |
If set, the netif has broadcast capability. Set by the netif driver in its init function.
Definition at line 80 of file netif.h.
#define NETIF_FLAG_ETHARP 0x08U |
If set, the netif is an ethernet device using ARP. Set by the netif driver in its init function. Used to check input packet types and use of DHCP.
Definition at line 90 of file netif.h.
#define NETIF_FLAG_ETHERNET 0x10U |
If set, the netif is an ethernet device. It might not use ARP or TCP/IP if it is used for PPPoE only.
Definition at line 94 of file netif.h.
#define NETIF_FLAG_IGMP 0x20U |
If set, the netif has IGMP capability. Set by the netif driver in its init function.
Definition at line 97 of file netif.h.
#define NETIF_FLAG_LINK_UP 0x04U |
If set, the interface has an active link (set by the network interface driver). Either set by the netif driver in its init function (if the link is up at that time) or at a later point once the link comes up (if link detection is supported by the hardware).
Definition at line 86 of file netif.h.
#define NETIF_FLAG_MLD6 0x40U |
If set, the netif has MLD6 capability. Set by the netif driver in its init function.
Definition at line 100 of file netif.h.
#define NETIF_FLAG_UP 0x01U |
Whether the network interface is 'up'. This is a software flag used to control whether this network interface is enabled and processes traffic. It must be set by the startup code before this netif can be used (also for dhcp/autoip).
Definition at line 77 of file netif.h.
Ask if a link is up
Definition at line 368 of file netif.h.
Ask if an interface is up
Definition at line 356 of file netif.h.
#define NETIF_MAX_HWADDR_LEN 6U |
Must be the maximum of all used hardware address lengths across all types of interfaces in use. This does not have to be changed, normally.
Definition at line 68 of file netif.h.
#define NETIF_SET_CHECKSUM_CTRL |
( |
|
netif, |
|
|
|
chksumflags |
|
) |
| |
#define NETIF_SET_HWADDRHINT |
( |
|
netif, |
|
|
|
hint |
|
) |
| |
Function prototype for netif init functions. Set up flags and output/linkoutput callback functions in this function.
- Parameters
-
netif | The netif to initialize |
Definition at line 124 of file netif.h.
Function prototype for netif->input functions. This function is saved as 'input' callback function in the netif struct. Call it when a packet has been received.
- Parameters
-
p | The received packet, copied into a pbuf |
inp | The netif which received the packet |
Definition at line 131 of file netif.h.
Function prototype for netif->linkoutput functions. Only used for ethernet netifs. This function is called by ARP when a packet shall be sent.
- Parameters
-
netif | The netif which shall send a packet |
p | The packet to send (raw ethernet packet) |
Definition at line 165 of file netif.h.
typedef void(* netif_status_callback_fn) (struct netif *netif) |
Function prototype for netif status- or link-callback functions.
Definition at line 167 of file netif.h.
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.
Definition at line 184 of file netif.c.
struct netif* netif_find |
( |
const char * |
name | ) |
|
Find a network interface by searching for its name
- Parameters
-
name | the name of the netif (like netif->name) plus concatenated number in ascii representation (e.g. 'en0') |
Definition at line 389 of file netif.c.
void netif_remove |
( |
struct netif * |
netif | ) |
|
Remove a network interface from the list of lwIP netifs.
- Parameters
-
netif | the network interface to remove |
Definition at line 319 of file netif.c.
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)
- Parameters
-
netif | the default network interface |
Definition at line 511 of file netif.c.
void netif_set_down |
( |
struct netif * |
netif | ) |
|
Bring an interface down, disabling any traffic processing.
Definition at line 587 of file netif.c.
void netif_set_link_down |
( |
struct netif * |
netif | ) |
|
Called by a driver when its link goes down
Definition at line 660 of file netif.c.
void netif_set_link_up |
( |
struct netif * |
netif | ) |
|
Called by a driver when its link goes up
Definition at line 632 of file netif.c.
void netif_set_up |
( |
struct netif * |
netif | ) |
|
Bring an interface up, available for processing traffic.
Definition at line 530 of file netif.c.
struct netif* netif_default |
The default network interface.
Definition at line 85 of file netif.c.
The list of network interfaces.
Definition at line 84 of file netif.c.