3 * netif API (to be used from TCPIP thread)
7 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
10 * Redistribution and use in source and binary forms, with or without modification,
11 * are permitted provided that the following conditions are met:
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.
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
32 * This file is part of the lwIP TCP/IP stack.
34 * Author: Adam Dunkels <adam@sics.se>
37 #ifndef LWIP_HDR_NETIF_H
38 #define LWIP_HDR_NETIF_H
42 #define ENABLE_LOOPBACK (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF)
46 #include "lwip/ip_addr.h"
49 #include "lwip/pbuf.h"
50 #include "lwip/stats.h"
56 /* Throughout this file, IP addresses are expected to be in
57 * the same byte order as in IP_PCB. */
59 /** Must be the maximum of all used hardware address lengths
60 across all types of interfaces in use.
61 This does not have to be changed, normally. */
62 #ifndef NETIF_MAX_HWADDR_LEN
63 #define NETIF_MAX_HWADDR_LEN 6U
67 * @defgroup netif_flags Flags
72 /** Whether the network interface is 'up'. This is
73 * a software flag used to control whether this network
74 * interface is enabled and processes traffic.
75 * It must be set by the startup code before this netif can be used
76 * (also for dhcp/autoip).
78 #define NETIF_FLAG_UP 0x01U
79 /** If set, the netif has broadcast capability.
80 * Set by the netif driver in its init function. */
81 #define NETIF_FLAG_BROADCAST 0x02U
82 /** If set, the interface has an active link
83 * (set by the network interface driver).
84 * Either set by the netif driver in its init function (if the link
85 * is up at that time) or at a later point once the link comes up
86 * (if link detection is supported by the hardware). */
87 #define NETIF_FLAG_LINK_UP 0x04U
88 /** If set, the netif is an ethernet device using ARP.
89 * Set by the netif driver in its init function.
90 * Used to check input packet types and use of DHCP. */
91 #define NETIF_FLAG_ETHARP 0x08U
92 /** If set, the netif is an ethernet device. It might not use
93 * ARP or TCP/IP if it is used for PPPoE only.
95 #define NETIF_FLAG_ETHERNET 0x10U
96 /** If set, the netif has IGMP capability.
97 * Set by the netif driver in its init function. */
98 #define NETIF_FLAG_IGMP 0x20U
99 /** If set, the netif has MLD6 capability.
100 * Set by the netif driver in its init function. */
101 #define NETIF_FLAG_MLD6 0x40U
107 enum lwip_internal_netif_client_data_index
110 LWIP_NETIF_CLIENT_DATA_INDEX_DHCP,
113 LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP,
116 LWIP_NETIF_CLIENT_DATA_INDEX_IGMP,
119 LWIP_NETIF_CLIENT_DATA_INDEX_MLD6,
121 LWIP_NETIF_CLIENT_DATA_INDEX_MAX
124 #if LWIP_CHECKSUM_CTRL_PER_NETIF
125 #define NETIF_CHECKSUM_GEN_IP 0x0001
126 #define NETIF_CHECKSUM_GEN_UDP 0x0002
127 #define NETIF_CHECKSUM_GEN_TCP 0x0004
128 #define NETIF_CHECKSUM_GEN_ICMP 0x0008
129 #define NETIF_CHECKSUM_GEN_ICMP6 0x0010
130 #define NETIF_CHECKSUM_CHECK_IP 0x0100
131 #define NETIF_CHECKSUM_CHECK_UDP 0x0200
132 #define NETIF_CHECKSUM_CHECK_TCP 0x0400
133 #define NETIF_CHECKSUM_CHECK_ICMP 0x0800
134 #define NETIF_CHECKSUM_CHECK_ICMP6 0x1000
135 #define NETIF_CHECKSUM_ENABLE_ALL 0xFFFF
136 #define NETIF_CHECKSUM_DISABLE_ALL 0x0000
137 #endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */
141 /** MAC Filter Actions, these are passed to a netif's igmp_mac_filter or
142 * mld_mac_filter callback function. */
143 enum netif_mac_filter_action {
144 /** Delete a filter entry */
145 NETIF_DEL_MAC_FILTER = 0,
146 /** Add a filter entry */
147 NETIF_ADD_MAC_FILTER = 1
150 /** Function prototype for netif init functions. Set up flags and output/linkoutput
151 * callback functions in this function.
153 * @param netif The netif to initialize
155 typedef err_t (*netif_init_fn)(struct netif *netif);
156 /** Function prototype for netif->input functions. This function is saved as 'input'
157 * callback function in the netif struct. Call it when a packet has been received.
159 * @param p The received packet, copied into a pbuf
160 * @param inp The netif which received the packet
162 typedef err_t (*netif_input_fn)(struct pbuf *p, struct netif *inp);
165 /** Function prototype for netif->output functions. Called by lwIP when a packet
166 * shall be sent. For ethernet netif, set this to 'etharp_output' and set
169 * @param netif The netif which shall send a packet
170 * @param p The packet to send (p->payload points to IP header)
171 * @param ipaddr The IP address to which the packet shall be sent
173 typedef err_t (*netif_output_fn)(struct netif *netif, struct pbuf *p,
174 const ip4_addr_t *ipaddr);
175 #endif /* LWIP_IPV4*/
178 /** Function prototype for netif->output_ip6 functions. Called by lwIP when a packet
179 * shall be sent. For ethernet netif, set this to 'ethip6_output' and set
182 * @param netif The netif which shall send a packet
183 * @param p The packet to send (p->payload points to IP header)
184 * @param ipaddr The IPv6 address to which the packet shall be sent
186 typedef err_t (*netif_output_ip6_fn)(struct netif *netif, struct pbuf *p,
187 const ip6_addr_t *ipaddr);
188 #endif /* LWIP_IPV6 */
190 /** Function prototype for netif->linkoutput functions. Only used for ethernet
191 * netifs. This function is called by ARP when a packet shall be sent.
193 * @param netif The netif which shall send a packet
194 * @param p The packet to send (raw ethernet packet)
196 typedef err_t (*netif_linkoutput_fn)(struct netif *netif, struct pbuf *p);
197 /** Function prototype for netif status- or link-callback functions. */
198 typedef void (*netif_status_callback_fn)(struct netif *netif);
199 #if LWIP_IPV4 && LWIP_IGMP
200 /** Function prototype for netif igmp_mac_filter functions */
201 typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif,
202 const ip4_addr_t *group, enum netif_mac_filter_action action);
203 #endif /* LWIP_IPV4 && LWIP_IGMP */
204 #if LWIP_IPV6 && LWIP_IPV6_MLD
205 /** Function prototype for netif mld_mac_filter functions */
206 typedef err_t (*netif_mld_mac_filter_fn)(struct netif *netif,
207 const ip6_addr_t *group, enum netif_mac_filter_action action);
208 #endif /* LWIP_IPV6 && LWIP_IPV6_MLD */
210 #if LWIP_DHCP || LWIP_AUTOIP || LWIP_IGMP || LWIP_IPV6_MLD || (LWIP_NUM_NETIF_CLIENT_DATA > 0)
211 u8_t netif_alloc_client_data_id(void);
212 /** @ingroup netif_cd
213 * Set client data. Obtain ID from netif_alloc_client_data_id().
215 #define netif_set_client_data(netif, id, data) netif_get_client_data(netif, id) = (data)
216 /** @ingroup netif_cd
217 * Get client data. Obtain ID from netif_alloc_client_data_id().
219 #define netif_get_client_data(netif, id) (netif)->client_data[(id)]
220 #endif /* LWIP_DHCP || LWIP_AUTOIP || (LWIP_NUM_NETIF_CLIENT_DATA > 0) */
222 /** Generic data structure used for all lwIP network interfaces.
223 * The following fields should be filled in by the initialization
224 * function for the device driver: hwaddr_len, hwaddr[], mtu, flags */
226 /** pointer to next in linked list */
230 /** IP address configuration in network byte order */
234 #endif /* LWIP_IPV4 */
236 /** Array of IPv6 addresses for this netif. */
237 ip_addr_t ip6_addr[LWIP_IPV6_NUM_ADDRESSES];
238 /** The state of each IPv6 address (Tentative, Preferred, etc).
240 u8_t ip6_addr_state[LWIP_IPV6_NUM_ADDRESSES];
241 #if LWIP_IPV6_ADDRESS_LIFETIMES
242 /** Remaining valid and preferred lifetime of each IPv6 address, in seconds.
243 * For valid lifetimes, the special value of IP6_ADDR_LIFE_STATIC (0)
244 * indicates the address is static and has no lifetimes. */
245 u32_t ip6_addr_valid_life[LWIP_IPV6_NUM_ADDRESSES];
246 u32_t ip6_addr_pref_life[LWIP_IPV6_NUM_ADDRESSES];
247 #endif /* LWIP_IPV6_ADDRESS_LIFETIMES */
248 #endif /* LWIP_IPV6 */
249 /** This function is called by the network device driver
250 * to pass a packet up the TCP/IP stack. */
251 netif_input_fn input;
253 /** This function is called by the IP module when it wants
254 * to send a packet on the interface. This function typically
255 * first resolves the hardware address, then sends the packet.
256 * For ethernet physical layer, this is usually etharp_output() */
257 netif_output_fn output;
258 #endif /* LWIP_IPV4 */
259 /** This function is called by ethernet_output() when it wants
260 * to send a packet on the interface. This function outputs
261 * the pbuf as-is on the link medium. */
262 netif_linkoutput_fn linkoutput;
264 /** This function is called by the IPv6 module when it wants
265 * to send a packet on the interface. This function typically
266 * first resolves the hardware address, then sends the packet.
267 * For ethernet physical layer, this is usually ethip6_output() */
268 netif_output_ip6_fn output_ip6;
269 #endif /* LWIP_IPV6 */
270 #if LWIP_NETIF_STATUS_CALLBACK
271 /** This function is called when the netif state is set to up or down
273 netif_status_callback_fn status_callback;
274 #endif /* LWIP_NETIF_STATUS_CALLBACK */
275 #if LWIP_NETIF_LINK_CALLBACK
276 /** This function is called when the netif link is set to up or down
278 netif_status_callback_fn link_callback;
279 #endif /* LWIP_NETIF_LINK_CALLBACK */
280 #if LWIP_NETIF_REMOVE_CALLBACK
281 /** This function is called when the netif has been removed */
282 netif_status_callback_fn remove_callback;
283 #endif /* LWIP_NETIF_REMOVE_CALLBACK */
284 /** This field can be set by the device driver and could point
285 * to state information for the device. */
287 #ifdef netif_get_client_data
288 void* client_data[LWIP_NETIF_CLIENT_DATA_INDEX_MAX + LWIP_NUM_NETIF_CLIENT_DATA];
290 #if LWIP_IPV6_AUTOCONFIG
291 /** is this netif enabled for IPv6 autoconfiguration */
292 u8_t ip6_autoconfig_enabled;
293 #endif /* LWIP_IPV6_AUTOCONFIG */
294 #if LWIP_IPV6_SEND_ROUTER_SOLICIT
295 /** Number of Router Solicitation messages that remain to be sent. */
297 #endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */
298 #if LWIP_NETIF_HOSTNAME
299 /* the hostname for this netif, NULL is a valid value */
300 const char* hostname;
301 #endif /* LWIP_NETIF_HOSTNAME */
302 #if LWIP_CHECKSUM_CTRL_PER_NETIF
304 #endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/
305 /** maximum transfer unit (in bytes) */
307 /** number of bytes used in hwaddr */
309 /** link level hardware address of this interface */
310 u8_t hwaddr[NETIF_MAX_HWADDR_LEN];
311 /** flags (@see @ref netif_flags) */
313 #if LWIP_MANAGEMENT_CHANNEL
314 u8_t using_management_channel:1;
316 /** descriptive abbreviation */
318 /** number of this interface */
321 /** link type (from "snmp_ifType" enum from snmp_mib2.h) */
323 /** (estimate) link speed */
325 /** timestamp at last change made (up/down) */
328 struct stats_mib2_netif_ctrs mib2_counters;
329 #endif /* MIB2_STATS */
330 #if LWIP_IPV4 && LWIP_IGMP
331 /** This function could be called to add or delete an entry in the multicast
332 filter table of the ethernet MAC.*/
333 netif_igmp_mac_filter_fn igmp_mac_filter;
334 #endif /* LWIP_IPV4 && LWIP_IGMP */
335 #if LWIP_IPV6 && LWIP_IPV6_MLD
336 /** This function could be called to add or delete an entry in the IPv6 multicast
337 filter table of the ethernet MAC. */
338 netif_mld_mac_filter_fn mld_mac_filter;
339 #endif /* LWIP_IPV6 && LWIP_IPV6_MLD */
340 #if LWIP_NETIF_HWADDRHINT
342 #endif /* LWIP_NETIF_HWADDRHINT */
344 /* List of packets to be queued for ourselves. */
345 struct pbuf *loop_first;
346 struct pbuf *loop_last;
347 #if LWIP_LOOPBACK_MAX_PBUFS
348 u16_t loop_cnt_current;
349 #endif /* LWIP_LOOPBACK_MAX_PBUFS */
350 #endif /* ENABLE_LOOPBACK */
353 #if LWIP_CHECKSUM_CTRL_PER_NETIF
354 #define NETIF_SET_CHECKSUM_CTRL(netif, chksumflags) do { \
355 (netif)->chksum_flags = chksumflags; } while(0)
356 #define IF__NETIF_CHECKSUM_ENABLED(netif, chksumflag) if (((netif) == NULL) || (((netif)->chksum_flags & (chksumflag)) != 0))
357 #else /* LWIP_CHECKSUM_CTRL_PER_NETIF */
358 #define NETIF_SET_CHECKSUM_CTRL(netif, chksumflags)
359 #define IF__NETIF_CHECKSUM_ENABLED(netif, chksumflag)
360 #endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */
362 /** The list of network interfaces. */
363 extern struct netif *netif_list;
364 /** The default network interface. */
365 extern struct netif *netif_default;
367 void netif_init(void);
371 void netif_apply_pcb(struct netif *netif, struct ip_pcb *pcb);
373 struct netif *netif_add(struct netif *netif,
375 const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw,
376 #endif /* LWIP_IPV4 */
377 void *state, netif_init_fn init, netif_input_fn input);
379 void netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask,
380 const ip4_addr_t *gw);
381 #endif /* LWIP_IPV4 */
382 void netif_remove(struct netif * netif);
384 /* Returns a network interface given its name. The name is of the form
385 "et0", where the first two letters are the "name" field in the
386 netif structure, and the digit is in the num field in the same
388 struct netif *netif_find(const char *name);
390 void netif_set_default(struct netif *netif);
393 void netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr);
394 void netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask);
395 void netif_set_gw(struct netif *netif, const ip4_addr_t *gw);
396 /** @ingroup netif_ip4 */
397 #define netif_ip4_addr(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->ip_addr)))
398 /** @ingroup netif_ip4 */
399 #define netif_ip4_netmask(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->netmask)))
400 /** @ingroup netif_ip4 */
401 #define netif_ip4_gw(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->gw)))
402 /** @ingroup netif_ip4 */
403 #define netif_ip_addr4(netif) ((const ip_addr_t*)&((netif)->ip_addr))
404 /** @ingroup netif_ip4 */
405 #define netif_ip_netmask4(netif) ((const ip_addr_t*)&((netif)->netmask))
406 /** @ingroup netif_ip4 */
407 #define netif_ip_gw4(netif) ((const ip_addr_t*)&((netif)->gw))
408 #endif /* LWIP_IPV4 */
410 void netif_set_up(struct netif *netif);
411 void netif_set_down(struct netif *netif);
413 * Ask if an interface is up
415 #define netif_is_up(netif) (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0)
417 #if LWIP_NETIF_STATUS_CALLBACK
418 void netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_callback);
419 #endif /* LWIP_NETIF_STATUS_CALLBACK */
420 #if LWIP_NETIF_REMOVE_CALLBACK
421 void netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_callback);
422 #endif /* LWIP_NETIF_REMOVE_CALLBACK */
424 void netif_set_link_up(struct netif *netif);
425 void netif_set_link_down(struct netif *netif);
426 /** Ask if a link is up */
427 #define netif_is_link_up(netif) (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8_t)1 : (u8_t)0)
429 #if LWIP_NETIF_LINK_CALLBACK
430 void netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback);
431 #endif /* LWIP_NETIF_LINK_CALLBACK */
433 #if LWIP_NETIF_HOSTNAME
434 /** @ingroup netif */
435 #define netif_set_hostname(netif, name) do { if((netif) != NULL) { (netif)->hostname = name; }}while(0)
436 /** @ingroup netif */
437 #define netif_get_hostname(netif) (((netif) != NULL) ? ((netif)->hostname) : NULL)
438 #endif /* LWIP_NETIF_HOSTNAME */
441 /** @ingroup netif */
442 #define netif_set_igmp_mac_filter(netif, function) do { if((netif) != NULL) { (netif)->igmp_mac_filter = function; }}while(0)
443 #define netif_get_igmp_mac_filter(netif) (((netif) != NULL) ? ((netif)->igmp_mac_filter) : NULL)
444 #endif /* LWIP_IGMP */
446 #if LWIP_IPV6 && LWIP_IPV6_MLD
447 /** @ingroup netif */
448 #define netif_set_mld_mac_filter(netif, function) do { if((netif) != NULL) { (netif)->mld_mac_filter = function; }}while(0)
449 #define netif_get_mld_mac_filter(netif) (((netif) != NULL) ? ((netif)->mld_mac_filter) : NULL)
450 #define netif_mld_mac_filter(netif, addr, action) do { if((netif) && (netif)->mld_mac_filter) { (netif)->mld_mac_filter((netif), (addr), (action)); }}while(0)
451 #endif /* LWIP_IPV6 && LWIP_IPV6_MLD */
454 err_t netif_loop_output(struct netif *netif, struct pbuf *p);
455 void netif_poll(struct netif *netif);
456 #if !LWIP_NETIF_LOOPBACK_MULTITHREADING
457 void netif_poll_all(void);
458 #endif /* !LWIP_NETIF_LOOPBACK_MULTITHREADING */
459 #endif /* ENABLE_LOOPBACK */
461 err_t netif_input(struct pbuf *p, struct netif *inp);
464 /** @ingroup netif_ip6 */
465 #define netif_ip_addr6(netif, i) ((const ip_addr_t*)(&((netif)->ip6_addr[i])))
466 /** @ingroup netif_ip6 */
467 #define netif_ip6_addr(netif, i) ((const ip6_addr_t*)ip_2_ip6(&((netif)->ip6_addr[i])))
468 void netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6);
469 void netif_ip6_addr_set_parts(struct netif *netif, s8_t addr_idx, u32_t i0, u32_t i1, u32_t i2, u32_t i3);
470 #define netif_ip6_addr_state(netif, i) ((netif)->ip6_addr_state[i])
471 void netif_ip6_addr_set_state(struct netif* netif, s8_t addr_idx, u8_t state);
472 s8_t netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr);
473 void netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit);
474 err_t netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx);
475 err_t netif_add_ip6_address_with_route(struct netif *netif, ip6_addr_t *ip6addr,
476 u8_t prefix_len, s8_t *chosen_idx);
477 err_t netif_remove_ip6_address(struct netif *netif, ip6_addr_t *ip6addr);
478 err_t netif_remove_ip6_address_with_route(struct netif *netif, ip6_addr_t *ip6addr,
480 #define netif_set_ip6_autoconfig_enabled(netif, action) do { if(netif) { (netif)->ip6_autoconfig_enabled = (action); }}while(0)
481 #if LWIP_IPV6_ADDRESS_LIFETIMES
482 #define netif_ip6_addr_valid_life(netif, i) \
483 (((netif) != NULL) ? ((netif)->ip6_addr_valid_life[i]) : IP6_ADDR_LIFE_STATIC)
484 #define netif_ip6_addr_set_valid_life(netif, i, secs) \
485 do { if (netif != NULL) { (netif)->ip6_addr_valid_life[i] = (secs); }} while (0)
486 #define netif_ip6_addr_pref_life(netif, i) \
487 (((netif) != NULL) ? ((netif)->ip6_addr_pref_life[i]) : IP6_ADDR_LIFE_STATIC)
488 #define netif_ip6_addr_set_pref_life(netif, i, secs) \
489 do { if (netif != NULL) { (netif)->ip6_addr_pref_life[i] = (secs); }} while (0)
490 #define netif_ip6_addr_isstatic(netif, i) \
491 (netif_ip6_addr_valid_life((netif), (i)) == IP6_ADDR_LIFE_STATIC)
492 #else /* !LWIP_IPV6_ADDRESS_LIFETIMES */
493 #define netif_ip6_addr_isstatic(netif, i) (1) /* all addresses are static */
494 #endif /* !LWIP_IPV6_ADDRESS_LIFETIMES */
495 #endif /* LWIP_IPV6 */
497 #if LWIP_NETIF_HWADDRHINT
498 #define NETIF_SET_HWADDRHINT(netif, hint) ((netif)->addr_hint = (hint))
499 #else /* LWIP_NETIF_HWADDRHINT */
500 #define NETIF_SET_HWADDRHINT(netif, hint)
501 #endif /* LWIP_NETIF_HWADDRHINT */
503 u8_t netif_name_to_index(const char *name);
504 char * netif_index_to_name(u8_t idx, char *name);
505 struct netif* netif_get_by_index(u8_t index);
507 /* Interface indexes always start at 1 per RFC 3493, section 4, num starts at 0 */
508 #define netif_get_index(netif) ((netif)->num + 1)
509 #define NETIF_NO_INDEX (0)
515 #endif /* LWIP_HDR_NETIF_H */