ReactOS 0.4.16-dev-1-gcf26321
|
#include "lwip/opt.h"
#include "lwip/err.h"
#include "lwip/ip_addr.h"
#include "lwip/def.h"
#include "lwip/pbuf.h"
Go to the source code of this file.
Classes | |
struct | netif |
Macros | |
#define | ENABLE_LOOPBACK (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF) |
#define | NETIF_MAX_HWADDR_LEN 6U |
#define | NETIF_FLAG_UP 0x01U |
#define | NETIF_FLAG_BROADCAST 0x02U |
#define | NETIF_FLAG_POINTTOPOINT 0x04U |
#define | NETIF_FLAG_DHCP 0x08U |
#define | NETIF_FLAG_LINK_UP 0x10U |
#define | NETIF_FLAG_ETHARP 0x20U |
#define | NETIF_FLAG_ETHERNET 0x40U |
#define | NETIF_FLAG_IGMP 0x80U |
#define | NETIF_INIT_SNMP(netif, type, speed) |
#define | netif_is_up(netif) (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0) |
#define | netif_is_link_up(netif) (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8_t)1 : (u8_t)0) |
#define | NETIF_SET_HWADDRHINT(netif, hint) |
Typedefs | |
typedef err_t(* | netif_init_fn) (struct netif *netif) |
typedef err_t(* | netif_input_fn) (struct pbuf *p, struct netif *inp) |
typedef err_t(* | netif_output_fn) (struct netif *netif, struct pbuf *p, ip_addr_t *ipaddr) |
typedef err_t(* | netif_linkoutput_fn) (struct netif *netif, struct pbuf *p) |
typedef void(* | netif_status_callback_fn) (struct netif *netif) |
typedef err_t(* | netif_igmp_mac_filter_fn) (struct netif *netif, ip_addr_t *group, u8_t action) |
Functions | |
void | netif_init (void) |
struct netif * | netif_add (struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input) |
void | netif_set_addr (struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *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, ip_addr_t *ipaddr) |
void | netif_set_netmask (struct netif *netif, ip_addr_t *netmask) |
void | netif_set_gw (struct netif *netif, ip_addr_t *gw) |
void | netif_set_up (struct netif *netif) |
void | netif_set_down (struct netif *netif) |
void | netif_set_link_up (struct netif *netif) |
void | netif_set_link_down (struct netif *netif) |
Variables | |
struct netif * | netif_list |
struct netif * | netif_default |
#define ENABLE_LOOPBACK (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF) |
#define NETIF_FLAG_BROADCAST 0x02U |
#define NETIF_FLAG_DHCP 0x08U |
#define NETIF_FLAG_ETHARP 0x20U |
#define NETIF_FLAG_ETHERNET 0x40U |
#define NETIF_FLAG_IGMP 0x80U |
#define NETIF_FLAG_LINK_UP 0x10U |
#define NETIF_FLAG_POINTTOPOINT 0x04U |
#define NETIF_FLAG_UP 0x01U |
Function prototype for netif->output functions. Called by lwIP when a packet shall be sent. For ethernet netif, set this to 'etharp_output' and set 'linkoutput'.
netif | The netif which shall send a packet |
p | The packet to send (p->payload points to IP header) |
ipaddr | The IP address to which the packet shall be sent |
struct netif * netif_add | ( | struct netif * | netif, |
ip_addr_t * | ipaddr, | ||
ip_addr_t * | netmask, | ||
ip_addr_t * | gw, | ||
void * | state, | ||
netif_init_fn | init, | ||
netif_input_fn | input | ||
) |
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. |
Definition at line 139 of file netif.c.
Referenced by default_netif_add(), netif_init(), and TCPRegisterInterface().
Definition at line 106 of file netif.c.
Referenced by lwip_init().
Remove a network interface from the list of lwIP netifs.
netif | the network interface to remove |
Definition at line 235 of file netif.c.
Referenced by default_netif_remove(), and TCPUnregisterInterface().
void netif_set_addr | ( | struct netif * | netif, |
ip_addr_t * | ipaddr, | ||
ip_addr_t * | netmask, | ||
ip_addr_t * | 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 |
Definition at line 221 of file netif.c.
Referenced by netif_add(), and TCPUpdateInterfaceIPInformation().
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 |
Definition at line 430 of file netif.c.
Referenced by default_netif_add(), netif_remove(), and TCPUpdateInterfaceIPInformation().
Bring an interface down, disabling any traffic processing.
Definition at line 490 of file netif.c.
Referenced by netif_remove(), and TCPUpdateInterfaceIPInformation().
Change the default gateway for a network interface
netif | the network interface to change |
gw | the new default gateway |
Definition at line 388 of file netif.c.
Referenced by netif_set_addr().
Change the IP address of a network interface
netif | the network interface to change |
ipaddr | the new IP address |
Definition at line 323 of file netif.c.
Referenced by netif_set_addr().
Called by a driver when its link goes down
Definition at line 574 of file netif.c.
Referenced by TCPUpdateInterfaceLinkStatus().
Called by a driver when its link goes up
Definition at line 535 of file netif.c.
Referenced by TCPUpdateInterfaceLinkStatus().
Change the netmask of a network interface
netif | the network interface to change |
netmask | the new netmask |
Definition at line 409 of file netif.c.
Referenced by netif_set_addr().
Bring an interface up, available for processing traffic.
Definition at line 453 of file netif.c.
Referenced by default_netif_add(), netif_init(), and TCPUpdateInterfaceIPInformation().
The default network interface.
Definition at line 76 of file netif.c.
Referenced by default_netif_add(), default_netif_remove(), ip_route(), netif_remove(), netif_set_default(), and START_TEST().
The list of network interfaces.
Definition at line 75 of file netif.c.
Referenced by ip_input(), ip_route(), netif_add(), netif_find(), netif_remove(), tcp_teardown(), and test_tcp_init_netif().