TuyaOS
netif.h
浏览该文件的文档.
1
6/*
7 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without modification,
11 * are permitted provided that the following conditions are met:
12 *
13 * 1. Redistributions of source code must retain the above copyright notice,
14 * this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 * 3. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
22 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
24 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
30 * OF SUCH DAMAGE.
31 *
32 * This file is part of the lwIP TCP/IP stack.
33 *
34 * Author: Adam Dunkels <adam@sics.se>
35 *
36 */
37#ifndef LWIP_HDR_NETIF_H
38#define LWIP_HDR_NETIF_H
39
40#include "lwip/opt.h"
41
42#define ENABLE_LOOPBACK (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF)
43
44#include "lwip/err.h"
45
46#include "lwip/ip_addr.h"
47
48#include "lwip/def.h"
49#include "lwip/pbuf.h"
50#include "lwip/stats.h"
51
52#ifdef __cplusplus
53extern "C" {
54#endif
55
56/* Throughout this file, IP addresses are expected to be in
57 * the same byte order as in IP_PCB. */
58
62#ifndef NETIF_MAX_HWADDR_LEN
63#define NETIF_MAX_HWADDR_LEN 6U
64#endif
65
70#define NETIF_NAMESIZE 6
71
84#define NETIF_FLAG_UP 0x01U
87#define NETIF_FLAG_BROADCAST 0x02U
93#define NETIF_FLAG_LINK_UP 0x04U
97#define NETIF_FLAG_ETHARP 0x08U
101#define NETIF_FLAG_ETHERNET 0x10U
104#define NETIF_FLAG_IGMP 0x20U
107#define NETIF_FLAG_MLD6 0x40U
108
113enum lwip_internal_netif_client_data_index
114{
115#if LWIP_IPV4
116#if LWIP_DHCP
117 LWIP_NETIF_CLIENT_DATA_INDEX_DHCP,
118#endif
119#if LWIP_AUTOIP
120 LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP,
121#endif
122#if LWIP_IGMP
123 LWIP_NETIF_CLIENT_DATA_INDEX_IGMP,
124#endif
125#endif /* LWIP_IPV4 */
126#if LWIP_IPV6
127#if LWIP_IPV6_DHCP6
128 LWIP_NETIF_CLIENT_DATA_INDEX_DHCP6,
129#endif
130#if LWIP_IPV6_MLD
131 LWIP_NETIF_CLIENT_DATA_INDEX_MLD6,
132#endif
133#endif /* LWIP_IPV6 */
134 LWIP_NETIF_CLIENT_DATA_INDEX_MAX
135};
136
137#if LWIP_CHECKSUM_CTRL_PER_NETIF
138#define NETIF_CHECKSUM_GEN_IP 0x0001
139#define NETIF_CHECKSUM_GEN_UDP 0x0002
140#define NETIF_CHECKSUM_GEN_TCP 0x0004
141#define NETIF_CHECKSUM_GEN_ICMP 0x0008
142#define NETIF_CHECKSUM_GEN_ICMP6 0x0010
143#define NETIF_CHECKSUM_CHECK_IP 0x0100
144#define NETIF_CHECKSUM_CHECK_UDP 0x0200
145#define NETIF_CHECKSUM_CHECK_TCP 0x0400
146#define NETIF_CHECKSUM_CHECK_ICMP 0x0800
147#define NETIF_CHECKSUM_CHECK_ICMP6 0x1000
148#define NETIF_CHECKSUM_ENABLE_ALL 0xFFFF
149#define NETIF_CHECKSUM_DISABLE_ALL 0x0000
150#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */
151
152struct netif;
153
162
168typedef err_t (*netif_init_fn)(struct netif *netif);
178typedef err_t (*netif_input_fn)(struct pbuf *p, struct netif *inp);
179
180#if LWIP_IPV4
189typedef err_t (*netif_output_fn)(struct netif *netif, struct pbuf *p,
190 const ip4_addr_t *ipaddr);
191#endif /* LWIP_IPV4*/
192
193#if LWIP_IPV6
202typedef err_t (*netif_output_ip6_fn)(struct netif *netif, struct pbuf *p,
203 const ip6_addr_t *ipaddr);
204#endif /* LWIP_IPV6 */
205
212typedef err_t (*netif_linkoutput_fn)(struct netif *netif, struct pbuf *p);
214typedef void (*netif_status_callback_fn)(struct netif *netif);
215#if LWIP_IPV4 && LWIP_IGMP
217typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif,
218 const ip4_addr_t *group, enum netif_mac_filter_action action);
219#endif /* LWIP_IPV4 && LWIP_IGMP */
220#if LWIP_IPV6 && LWIP_IPV6_MLD
222typedef err_t (*netif_mld_mac_filter_fn)(struct netif *netif,
223 const ip6_addr_t *group, enum netif_mac_filter_action action);
224#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */
225
226#if LWIP_DHCP || LWIP_AUTOIP || LWIP_IGMP || LWIP_IPV6_MLD || LWIP_IPV6_DHCP6 || (LWIP_NUM_NETIF_CLIENT_DATA > 0)
227#if LWIP_NUM_NETIF_CLIENT_DATA > 0
228u8_t netif_alloc_client_data_id(void);
229#endif
233#define netif_set_client_data(netif, id, data) netif_get_client_data(netif, id) = (data)
237#define netif_get_client_data(netif, id) (netif)->client_data[(id)]
238#endif
239
240#if (LWIP_IPV4 && LWIP_ARP && (ARP_TABLE_SIZE > 0x7f)) || (LWIP_IPV6 && (LWIP_ND6_NUM_DESTINATIONS > 0x7f))
241typedef u16_t netif_addr_idx_t;
242#define NETIF_ADDR_IDX_MAX 0x7FFF
243#else
244typedef u8_t netif_addr_idx_t;
245#define NETIF_ADDR_IDX_MAX 0x7F
246#endif
247
248#if LWIP_NETIF_HWADDRHINT
249#define LWIP_NETIF_USE_HINTS 1
250struct netif_hint {
251 netif_addr_idx_t addr_hint;
252};
253#else /* LWIP_NETIF_HWADDRHINT */
254#define LWIP_NETIF_USE_HINTS 0
255#endif /* LWIP_NETIF_HWADDRHINT */
256
260struct netif {
261#if !LWIP_SINGLE_NETIF
263 struct netif *next;
264#endif
265
266#if LWIP_IPV4
268 ip_addr_t ip_addr;
269 ip_addr_t netmask;
270 ip_addr_t gw;
271#endif /* LWIP_IPV4 */
272#if LWIP_IPV6
274 ip_addr_t ip6_addr[LWIP_IPV6_NUM_ADDRESSES];
277 u8_t ip6_addr_state[LWIP_IPV6_NUM_ADDRESSES];
278#if LWIP_IPV6_ADDRESS_LIFETIMES
282 u32_t ip6_addr_valid_life[LWIP_IPV6_NUM_ADDRESSES];
283 u32_t ip6_addr_pref_life[LWIP_IPV6_NUM_ADDRESSES];
284#endif /* LWIP_IPV6_ADDRESS_LIFETIMES */
285#endif /* LWIP_IPV6 */
289#if LWIP_IPV4
294 netif_output_fn output;
295#endif /* LWIP_IPV4 */
300#if LWIP_IPV6
305 netif_output_ip6_fn output_ip6;
306#endif /* LWIP_IPV6 */
307#if LWIP_NETIF_STATUS_CALLBACK
310 netif_status_callback_fn status_callback;
311#endif /* LWIP_NETIF_STATUS_CALLBACK */
312#if LWIP_NETIF_LINK_CALLBACK
315 netif_status_callback_fn link_callback;
316#endif /* LWIP_NETIF_LINK_CALLBACK */
317#if LWIP_NETIF_REMOVE_CALLBACK
319 netif_status_callback_fn remove_callback;
320#endif /* LWIP_NETIF_REMOVE_CALLBACK */
323 void *state;
324#ifdef netif_get_client_data
325 void* client_data[LWIP_NETIF_CLIENT_DATA_INDEX_MAX + LWIP_NUM_NETIF_CLIENT_DATA];
326#endif
327#if LWIP_NETIF_HOSTNAME
328 /* the hostname for this netif, NULL is a valid value */
329 const char* hostname;
330#endif /* LWIP_NETIF_HOSTNAME */
331#if LWIP_CHECKSUM_CTRL_PER_NETIF
332 u16_t chksum_flags;
333#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/
335 u16_t mtu;
336#if LWIP_IPV6 && LWIP_ND6_ALLOW_RA_UPDATES
338 u16_t mtu6;
339#endif /* LWIP_IPV6 && LWIP_ND6_ALLOW_RA_UPDATES */
345 u8_t flags;
347 char name[2];
350 u8_t num;
351#if LWIP_IPV6_AUTOCONFIG
353 u8_t ip6_autoconfig_enabled;
354#endif /* LWIP_IPV6_AUTOCONFIG */
355#if LWIP_IPV6_SEND_ROUTER_SOLICIT
357 u8_t rs_count;
358#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */
359#if MIB2_STATS
361 u8_t link_type;
363 u32_t link_speed;
365 u32_t ts;
367 struct stats_mib2_netif_ctrs mib2_counters;
368#endif /* MIB2_STATS */
369#if LWIP_IPV4 && LWIP_IGMP
372 netif_igmp_mac_filter_fn igmp_mac_filter;
373#endif /* LWIP_IPV4 && LWIP_IGMP */
374#if LWIP_IPV6 && LWIP_IPV6_MLD
377 netif_mld_mac_filter_fn mld_mac_filter;
378#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */
379#if LWIP_NETIF_USE_HINTS
380 struct netif_hint *hints;
381#endif /* LWIP_NETIF_USE_HINTS */
382#if ENABLE_LOOPBACK
383 /* List of packets to be queued for ourselves. */
384 struct pbuf *loop_first;
385 struct pbuf *loop_last;
386#if LWIP_LOOPBACK_MAX_PBUFS
387 u16_t loop_cnt_current;
388#endif /* LWIP_LOOPBACK_MAX_PBUFS */
389#endif /* ENABLE_LOOPBACK */
390
391//#if ENABLE_TUYA_DHCPS
392 struct udp_pcb *dhcps_pcb;
393//#endif
394};
395
396#if LWIP_CHECKSUM_CTRL_PER_NETIF
397#define NETIF_SET_CHECKSUM_CTRL(netif, chksumflags) do { \
398 (netif)->chksum_flags = chksumflags; } while(0)
399#define IF__NETIF_CHECKSUM_ENABLED(netif, chksumflag) if (((netif) == NULL) || (((netif)->chksum_flags & (chksumflag)) != 0))
400#else /* LWIP_CHECKSUM_CTRL_PER_NETIF */
401#define NETIF_SET_CHECKSUM_CTRL(netif, chksumflags)
402#define IF__NETIF_CHECKSUM_ENABLED(netif, chksumflag)
403#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */
404
405#if LWIP_SINGLE_NETIF
406#define NETIF_FOREACH(netif) if (((netif) = netif_default) != NULL)
407#else /* LWIP_SINGLE_NETIF */
409extern struct netif *netif_list;
410#define NETIF_FOREACH(netif) for ((netif) = netif_list; (netif) != NULL; (netif) = (netif)->next)
411#endif /* LWIP_SINGLE_NETIF */
413extern struct netif *netif_default;
414
415void netif_init(void);
416
417struct netif *netif_add_noaddr(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input);
418
419#if LWIP_IPV4
420struct netif *netif_add(struct netif *netif,
421 const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw,
423void netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask,
424 const ip4_addr_t *gw);
425#else /* LWIP_IPV4 */
426struct netif *netif_add(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input);
427#endif /* LWIP_IPV4 */
428void netif_remove(struct netif * netif);
429
430/* Returns a network interface given its name. The name is of the form
431 "et0", where the first two letters are the "name" field in the
432 netif structure, and the digit is in the num field in the same
433 structure. */
434struct netif *netif_find(const char *name);
435
436void netif_set_default(struct netif *netif);
437
438#if LWIP_IPV4
439void netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr);
440void netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask);
441void netif_set_gw(struct netif *netif, const ip4_addr_t *gw);
443#define netif_ip4_addr(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->ip_addr)))
445#define netif_ip4_netmask(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->netmask)))
447#define netif_ip4_gw(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->gw)))
449#define netif_ip_addr4(netif) ((const ip_addr_t*)&((netif)->ip_addr))
451#define netif_ip_netmask4(netif) ((const ip_addr_t*)&((netif)->netmask))
453#define netif_ip_gw4(netif) ((const ip_addr_t*)&((netif)->gw))
454#endif /* LWIP_IPV4 */
455
456#define netif_set_flags(netif, set_flags) do { (netif)->flags = (u8_t)((netif)->flags | (set_flags)); } while(0)
457#define netif_clear_flags(netif, clr_flags) do { (netif)->flags = (u8_t)((netif)->flags & (u8_t)(~(clr_flags) & 0xff)); } while(0)
458#define netif_is_flag_set(nefif, flag) (((netif)->flags & (flag)) != 0)
459
460void netif_set_up(struct netif *netif);
461void netif_set_down(struct netif *netif);
465#define netif_is_up(netif) (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0)
466
467#if LWIP_NETIF_STATUS_CALLBACK
468void netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_callback);
469#endif /* LWIP_NETIF_STATUS_CALLBACK */
470#if LWIP_NETIF_REMOVE_CALLBACK
471void netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_callback);
472#endif /* LWIP_NETIF_REMOVE_CALLBACK */
473
474void netif_set_link_up(struct netif *netif);
475void netif_set_link_down(struct netif *netif);
477#define netif_is_link_up(netif) (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8_t)1 : (u8_t)0)
478
479#if LWIP_NETIF_LINK_CALLBACK
480void netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback);
481#endif /* LWIP_NETIF_LINK_CALLBACK */
482
483#if LWIP_NETIF_HOSTNAME
485#define netif_set_hostname(netif, name) do { if((netif) != NULL) { (netif)->hostname = name; }}while(0)
487#define netif_get_hostname(netif) (((netif) != NULL) ? ((netif)->hostname) : NULL)
488#endif /* LWIP_NETIF_HOSTNAME */
489
490#if LWIP_IGMP
492#define netif_set_igmp_mac_filter(netif, function) do { if((netif) != NULL) { (netif)->igmp_mac_filter = function; }}while(0)
493#define netif_get_igmp_mac_filter(netif) (((netif) != NULL) ? ((netif)->igmp_mac_filter) : NULL)
494#endif /* LWIP_IGMP */
495
496#if LWIP_IPV6 && LWIP_IPV6_MLD
498#define netif_set_mld_mac_filter(netif, function) do { if((netif) != NULL) { (netif)->mld_mac_filter = function; }}while(0)
499#define netif_get_mld_mac_filter(netif) (((netif) != NULL) ? ((netif)->mld_mac_filter) : NULL)
500#define netif_mld_mac_filter(netif, addr, action) do { if((netif) && (netif)->mld_mac_filter) { (netif)->mld_mac_filter((netif), (addr), (action)); }}while(0)
501#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */
502
503#if ENABLE_LOOPBACK
504err_t netif_loop_output(struct netif *netif, struct pbuf *p);
505void netif_poll(struct netif *netif);
506#if !LWIP_NETIF_LOOPBACK_MULTITHREADING
507void netif_poll_all(void);
508#endif /* !LWIP_NETIF_LOOPBACK_MULTITHREADING */
509#endif /* ENABLE_LOOPBACK */
510
511err_t netif_input(struct pbuf *p, struct netif *inp);
512
513#if LWIP_IPV6
515#define netif_ip_addr6(netif, i) ((const ip_addr_t*)(&((netif)->ip6_addr[i])))
517#define netif_ip6_addr(netif, i) ((const ip6_addr_t*)ip_2_ip6(&((netif)->ip6_addr[i])))
518void netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6);
519void netif_ip6_addr_set_parts(struct netif *netif, s8_t addr_idx, u32_t i0, u32_t i1, u32_t i2, u32_t i3);
520#define netif_ip6_addr_state(netif, i) ((netif)->ip6_addr_state[i])
521void netif_ip6_addr_set_state(struct netif* netif, s8_t addr_idx, u8_t state);
522s8_t netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr);
523void netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit);
524err_t netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx);
525#define netif_set_ip6_autoconfig_enabled(netif, action) do { if(netif) { (netif)->ip6_autoconfig_enabled = (action); }}while(0)
526#if LWIP_IPV6_ADDRESS_LIFETIMES
527#define netif_ip6_addr_valid_life(netif, i) \
528 (((netif) != NULL) ? ((netif)->ip6_addr_valid_life[i]) : IP6_ADDR_LIFE_STATIC)
529#define netif_ip6_addr_set_valid_life(netif, i, secs) \
530 do { if (netif != NULL) { (netif)->ip6_addr_valid_life[i] = (secs); }} while (0)
531#define netif_ip6_addr_pref_life(netif, i) \
532 (((netif) != NULL) ? ((netif)->ip6_addr_pref_life[i]) : IP6_ADDR_LIFE_STATIC)
533#define netif_ip6_addr_set_pref_life(netif, i, secs) \
534 do { if (netif != NULL) { (netif)->ip6_addr_pref_life[i] = (secs); }} while (0)
535#define netif_ip6_addr_isstatic(netif, i) \
536 (netif_ip6_addr_valid_life((netif), (i)) == IP6_ADDR_LIFE_STATIC)
537#else /* !LWIP_IPV6_ADDRESS_LIFETIMES */
538#define netif_ip6_addr_isstatic(netif, i) (1) /* all addresses are static */
539#endif /* !LWIP_IPV6_ADDRESS_LIFETIMES */
540#if LWIP_ND6_ALLOW_RA_UPDATES
541#define netif_mtu6(netif) ((netif)->mtu6)
542#else /* LWIP_ND6_ALLOW_RA_UPDATES */
543#define netif_mtu6(netif) ((netif)->mtu)
544#endif /* LWIP_ND6_ALLOW_RA_UPDATES */
545#endif /* LWIP_IPV6 */
546
547#if LWIP_NETIF_USE_HINTS
548#define NETIF_SET_HINTS(netif, netifhint) (netif)->hints = (netifhint)
549#define NETIF_RESET_HINTS(netif) (netif)->hints = NULL
550#else /* LWIP_NETIF_USE_HINTS */
551#define NETIF_SET_HINTS(netif, netifhint)
552#define NETIF_RESET_HINTS(netif)
553#endif /* LWIP_NETIF_USE_HINTS */
554
555u8_t netif_name_to_index(const char *name);
556char * netif_index_to_name(u8_t idx, char *name);
557struct netif* netif_get_by_index(u8_t idx);
558
559/* Interface indexes always start at 1 per RFC 3493, section 4, num starts at 0 (internal index is 0..254)*/
560#define netif_get_index(netif) ((u8_t)((netif)->num + 1))
561#define NETIF_NO_INDEX (0)
562
568typedef u16_t netif_nsc_reason_t;
569
570/* used for initialization only */
571#define LWIP_NSC_NONE 0x0000
573#define LWIP_NSC_NETIF_ADDED 0x0001
575#define LWIP_NSC_NETIF_REMOVED 0x0002
577#define LWIP_NSC_LINK_CHANGED 0x0004
581#define LWIP_NSC_STATUS_CHANGED 0x0008
583#define LWIP_NSC_IPV4_ADDRESS_CHANGED 0x0010
585#define LWIP_NSC_IPV4_GATEWAY_CHANGED 0x0020
587#define LWIP_NSC_IPV4_NETMASK_CHANGED 0x0040
589#define LWIP_NSC_IPV4_SETTINGS_CHANGED 0x0080
591#define LWIP_NSC_IPV6_SET 0x0100
593#define LWIP_NSC_IPV6_ADDR_STATE_CHANGED 0x0200
594
598typedef union
599{
602 {
604 u8_t state;
605 } link_changed;
608 {
610 u8_t state;
611 } status_changed;
614 {
616 const ip_addr_t* old_address;
617 const ip_addr_t* old_netmask;
618 const ip_addr_t* old_gw;
619 } ipv4_changed;
622 {
626 const ip_addr_t* old_address;
627 } ipv6_set;
630 {
636 const ip_addr_t* address;
637 } ipv6_addr_state_changed;
639
649
650#if LWIP_NETIF_EXT_STATUS_CALLBACK
651struct netif_ext_callback;
652typedef struct netif_ext_callback
653{
654 netif_ext_callback_fn callback_fn;
655 struct netif_ext_callback* next;
656} netif_ext_callback_t;
657
658#define NETIF_DECLARE_EXT_CALLBACK(name) static netif_ext_callback_t name;
659void netif_add_ext_callback(netif_ext_callback_t* callback, netif_ext_callback_fn fn);
660void netif_remove_ext_callback(netif_ext_callback_t* callback);
661void netif_invoke_ext_callback(struct netif* netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t* args);
662#else
663#define NETIF_DECLARE_EXT_CALLBACK(name)
664#define netif_add_ext_callback(callback, fn)
665#define netif_remove_ext_callback(callback)
666#define netif_invoke_ext_callback(netif, reason, args)
667#endif
668
669#ifdef __cplusplus
670}
671#endif
672
673#endif /* LWIP_HDR_NETIF_H */
s8_t err_t
Definition: err.h:96
#define LWIP_IPV6_NUM_ADDRESSES
Definition: opt.h:2420
#define LWIP_NUM_NETIF_CLIENT_DATA
Definition: opt.h:1666
struct netif * netif_list
err_t(* netif_init_fn)(struct netif *netif)
Definition: netif.h:168
struct netif * netif_default
void(* netif_status_callback_fn)(struct netif *netif)
Definition: netif.h:214
void(* netif_ext_callback_fn)(struct netif *netif, netif_nsc_reason_t reason, const netif_ext_callback_args_t *args)
Definition: netif.h:648
netif_mac_filter_action
Definition: netif.h:156
@ NETIF_ADD_MAC_FILTER
Definition: netif.h:160
@ NETIF_DEL_MAC_FILTER
Definition: netif.h:158
err_t(* netif_input_fn)(struct pbuf *p, struct netif *inp)
Definition: netif.h:178
u16_t netif_nsc_reason_t
Definition: netif.h:568
err_t(* netif_linkoutput_fn)(struct netif *netif, struct pbuf *p)
Definition: netif.h:212
#define NETIF_MAX_HWADDR_LEN
Definition: netif.h:63
const ip_addr_t * old_address
Definition: netif.h:616
const ip_addr_t * address
Definition: netif.h:636
const ip_addr_t * old_address
Definition: netif.h:626
s8_t addr_index
Definition: netif.h:624
Definition: netif.h:260
u8_t flags
Definition: netif.h:345
char name[2]
Definition: netif.h:347
void * state
Definition: netif.h:323
netif_input_fn input
Definition: netif.h:288
u8_t num
Definition: netif.h:350
u16_t mtu
Definition: netif.h:335
netif_linkoutput_fn linkoutput
Definition: netif.h:299
struct netif * next
Definition: netif.h:263
u8_t hwaddr[6U]
Definition: netif.h:341
u8_t hwaddr_len
Definition: netif.h:343
Definition: pbuf.h:186
Definition: netif.h:599