32#ifndef __LWIP_NETIF_H__
33#define __LWIP_NETIF_H__
37#define ENABLE_LOOPBACK (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF)
41#include "lwip/ip_addr.h"
61#define NETIF_MAX_HWADDR_LEN 6U
69#define NETIF_FLAG_UP 0x01U
72#define NETIF_FLAG_BROADCAST 0x02U
75#define NETIF_FLAG_POINTTOPOINT 0x04U
78#define NETIF_FLAG_DHCP 0x08U
84#define NETIF_FLAG_LINK_UP 0x10U
88#define NETIF_FLAG_ETHARP 0x20U
92#define NETIF_FLAG_ETHERNET 0x40U
95#define NETIF_FLAG_IGMP 0x80U
156#if LWIP_NETIF_STATUS_CALLBACK
161#if LWIP_NETIF_LINK_CALLBACK
166#if LWIP_NETIF_REMOVE_CALLBACK
179 struct autoip *autoip;
181#if LWIP_NETIF_HOSTNAME
207 u32_t ifinnucastpkts;
210 u32_t ifoutucastpkts;
211 u32_t ifoutnucastpkts;
219#if LWIP_NETIF_HWADDRHINT
224 struct pbuf *loop_first;
225 struct pbuf *loop_last;
226#if LWIP_LOOPBACK_MAX_PBUFS
227 u16_t loop_cnt_current;
233#define NETIF_INIT_SNMP(netif, type, speed) \
235 (netif)->link_type = (type); \
237 (netif)->link_speed = (speed); \
239 (netif)->ifinoctets = 0; \
240 (netif)->ifinucastpkts = 0; \
241 (netif)->ifinnucastpkts = 0; \
242 (netif)->ifindiscards = 0; \
243 (netif)->ifoutoctets = 0; \
244 (netif)->ifoutucastpkts = 0; \
245 (netif)->ifoutnucastpkts = 0; \
246 (netif)->ifoutdiscards = 0
248#define NETIF_INIT_SNMP(netif, type, speed)
282#define netif_is_up(netif) (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0)
284#if LWIP_NETIF_STATUS_CALLBACK
287#if LWIP_NETIF_REMOVE_CALLBACK
294#define netif_is_link_up(netif) (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8_t)1 : (u8_t)0)
296#if LWIP_NETIF_LINK_CALLBACK
300#if LWIP_NETIF_HOSTNAME
301#define netif_set_hostname(netif, name) do { if((netif) != NULL) { (netif)->hostname = name; }}while(0)
302#define netif_get_hostname(netif) (((netif) != NULL) ? ((netif)->hostname) : NULL)
306#define netif_set_igmp_mac_filter(netif, function) do { if((netif) != NULL) { (netif)->igmp_mac_filter = function; }}while(0)
307#define netif_get_igmp_mac_filter(netif) (((netif) != NULL) ? ((netif)->igmp_mac_filter) : NULL)
313#if !LWIP_NETIF_LOOPBACK_MULTITHREADING
314void netif_poll_all(
void);
318#if LWIP_NETIF_HWADDRHINT
319#define NETIF_SET_HWADDRHINT(netif, hint) ((netif)->addr_hint = (hint))
321#define NETIF_SET_HWADDRHINT(netif, hint)
void dhcp(struct packet *packet)
GLenum GLenum GLenum input
typedefPACK_STRUCT_END struct ip_addr ip_addr_t
static void WINAPI status_callback(HINTERNET handle, DWORD_PTR ctx, DWORD status, LPVOID info, DWORD info_len)
void netif_set_netmask(struct netif *netif, ip_addr_t *netmask)
struct netif * netif_list
err_t(* netif_init_fn)(struct netif *netif)
void netif_set_link_down(struct netif *netif)
void netif_set_addr(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw)
struct netif * netif_default
void(* netif_status_callback_fn)(struct netif *netif)
err_t(* netif_output_fn)(struct netif *netif, struct pbuf *p, ip_addr_t *ipaddr)
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_down(struct netif *netif)
struct netif * netif_find(char *name)
void netif_remove(struct netif *netif)
void netif_set_gw(struct netif *netif, ip_addr_t *gw)
err_t(* netif_input_fn)(struct pbuf *p, struct netif *inp)
err_t(* netif_linkoutput_fn)(struct netif *netif, struct pbuf *p)
#define NETIF_MAX_HWADDR_LEN
void netif_set_default(struct netif *netif)
void netif_set_link_up(struct netif *netif)
void netif_set_ipaddr(struct netif *netif, ip_addr_t *ipaddr)
err_t(* netif_igmp_mac_filter_fn)(struct netif *netif, ip_addr_t *group, u8_t action)
void netif_set_up(struct netif *netif)
u8_t hwaddr[NETIF_MAX_HWADDR_LEN]
netif_linkoutput_fn linkoutput