Tizen RT Libs&Environment
v1.1 D4
|
![]() |
Files | |
file | netif.h |
netif API (to be used from lwIP TCPIP thread) | |
Data Structures | |
struct | netif |
Macros | |
#define | MAX_NET_DEV_MTU 1500 |
#define | ENABLE_LOOPBACK (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF) |
#define | IP_ADDR0 192 |
#define | IP_ADDR1 168 |
#define | IP_ADDR2 2 |
#define | IP_ADDR3 10 |
#define | NETMASK_ADDR0 255 |
#define | NETMASK_ADDR1 255 |
#define | NETMASK_ADDR2 255 |
#define | NETMASK_ADDR3 0 |
#define | GW_ADDR0 192 |
#define | GW_ADDR1 168 |
#define | GW_ADDR2 2 |
#define | GW_ADDR3 1 |
#define | EXTERN extern |
#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 | MAC_ADDRLEN 0 |
#define | MAC_HDRLEN 0 |
#define | NETIF_INIT_SNMP(netif, type, speed) |
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_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). More... | |
struct netif * | netif_find (const char *name) |
Find a network interface by searching for its name. More... | |
void | netif_set_up (struct netif *netif) |
Bring an interface up, available for processing traffic. More... | |
void | netif_set_down (struct netif *netif) |
Bring an interface down, disabling any traffic processing. More... | |
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 |
#define NETIF_MAX_HWADDR_LEN 6U |
typedef err_t(* netif_input_fn) (struct pbuf *p, struct netif *inp) |
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_find | ( | const char * | name | ) |
Find a network interface by searching for its name.
Returns a network interface given its name. The name is of the form "et0", where the first two letters are the "name" field in the netif structure, and the digit is in the num field in the same structure.
#include <net/lwip/netif.h>
name | the name of the netif (like netif->name) plus concatenated number in ascii representation (e.g. 'en0') |
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).
#include <net/lwip/netif.h>
[in] | netif | the network interface to change |
[in] | ipaddr | the new IP address |
[in] | netmask | the new netmask |
[in] | gw | the new default gateway |
void netif_set_down | ( | struct netif * | netif | ) |
Bring an interface down, disabling any traffic processing.
#include <net/lwip/netif.h>
[in] | netif | the network interface to change |
void netif_set_up | ( | struct netif * | netif | ) |
Bring an interface up, available for processing traffic.
#include <net/lwip/netif.h>
[in] | netif | the network interface to change |
struct netif* netif_default |
The default network interface.
struct netif* netif_list |
To be removed Later once netif_list is used in netlib API's List of registered Ethernet device drivers The list of network interfaces.