Dependents:   TimeZoneDemo EthernetJackTestCode MMEx_Challenge ntp_mem ... more

Committer:
segundo
Date:
Tue Nov 09 20:54:15 2010 +0000
Revision:
0:ac1725ba162c

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
segundo 0:ac1725ba162c 1 /*
segundo 0:ac1725ba162c 2 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
segundo 0:ac1725ba162c 3 * All rights reserved.
segundo 0:ac1725ba162c 4 *
segundo 0:ac1725ba162c 5 * Redistribution and use in source and binary forms, with or without modification,
segundo 0:ac1725ba162c 6 * are permitted provided that the following conditions are met:
segundo 0:ac1725ba162c 7 *
segundo 0:ac1725ba162c 8 * 1. Redistributions of source code must retain the above copyright notice,
segundo 0:ac1725ba162c 9 * this list of conditions and the following disclaimer.
segundo 0:ac1725ba162c 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
segundo 0:ac1725ba162c 11 * this list of conditions and the following disclaimer in the documentation
segundo 0:ac1725ba162c 12 * and/or other materials provided with the distribution.
segundo 0:ac1725ba162c 13 * 3. The name of the author may not be used to endorse or promote products
segundo 0:ac1725ba162c 14 * derived from this software without specific prior written permission.
segundo 0:ac1725ba162c 15 *
segundo 0:ac1725ba162c 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
segundo 0:ac1725ba162c 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
segundo 0:ac1725ba162c 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
segundo 0:ac1725ba162c 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
segundo 0:ac1725ba162c 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
segundo 0:ac1725ba162c 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
segundo 0:ac1725ba162c 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
segundo 0:ac1725ba162c 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
segundo 0:ac1725ba162c 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
segundo 0:ac1725ba162c 25 * OF SUCH DAMAGE.
segundo 0:ac1725ba162c 26 *
segundo 0:ac1725ba162c 27 * This file is part of the lwIP TCP/IP stack.
segundo 0:ac1725ba162c 28 *
segundo 0:ac1725ba162c 29 * Author: Adam Dunkels <adam@sics.se>
segundo 0:ac1725ba162c 30 *
segundo 0:ac1725ba162c 31 */
segundo 0:ac1725ba162c 32 #ifndef __LWIP_NETIF_H__
segundo 0:ac1725ba162c 33 #define __LWIP_NETIF_H__
segundo 0:ac1725ba162c 34
segundo 0:ac1725ba162c 35 #include "lwip/opt.h"
segundo 0:ac1725ba162c 36
segundo 0:ac1725ba162c 37 #define ENABLE_LOOPBACK (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF)
segundo 0:ac1725ba162c 38
segundo 0:ac1725ba162c 39 #include "lwip/err.h"
segundo 0:ac1725ba162c 40
segundo 0:ac1725ba162c 41 #include "lwip/ip_addr.h"
segundo 0:ac1725ba162c 42
segundo 0:ac1725ba162c 43 #include "lwip/def.h"
segundo 0:ac1725ba162c 44 #include "lwip/pbuf.h"
segundo 0:ac1725ba162c 45 #if LWIP_DHCP
segundo 0:ac1725ba162c 46 struct dhcp;
segundo 0:ac1725ba162c 47 #endif
segundo 0:ac1725ba162c 48 #if LWIP_AUTOIP
segundo 0:ac1725ba162c 49 struct autoip;
segundo 0:ac1725ba162c 50 #endif
segundo 0:ac1725ba162c 51
segundo 0:ac1725ba162c 52 #ifdef __cplusplus
segundo 0:ac1725ba162c 53 extern "C" {
segundo 0:ac1725ba162c 54 #endif
segundo 0:ac1725ba162c 55
segundo 0:ac1725ba162c 56 /* Throughout this file, IP addresses are expected to be in
segundo 0:ac1725ba162c 57 * the same byte order as in IP_PCB. */
segundo 0:ac1725ba162c 58
segundo 0:ac1725ba162c 59 /* must be the maximum of all used hardware address lengths
segundo 0:ac1725ba162c 60 across all types of interfaces in use */
segundo 0:ac1725ba162c 61 #define NETIF_MAX_HWADDR_LEN 6U
segundo 0:ac1725ba162c 62
segundo 0:ac1725ba162c 63 /* Whether the network interface is 'up'. This is
segundo 0:ac1725ba162c 64 * a software flag used to control whether this network
segundo 0:ac1725ba162c 65 * interface is enabled and processes traffic.
segundo 0:ac1725ba162c 66 * It is set by the startup code (for static IP configuration) or
segundo 0:ac1725ba162c 67 * by dhcp/autoip when an address has been assigned.
segundo 0:ac1725ba162c 68 */
segundo 0:ac1725ba162c 69 #define NETIF_FLAG_UP 0x01U
segundo 0:ac1725ba162c 70 /* If set, the netif has broadcast capability.
segundo 0:ac1725ba162c 71 * Set by the netif driver in its init function. */
segundo 0:ac1725ba162c 72 #define NETIF_FLAG_BROADCAST 0x02U
segundo 0:ac1725ba162c 73 /* If set, the netif is one end of a point-to-point connection.
segundo 0:ac1725ba162c 74 * Set by the netif driver in its init function. */
segundo 0:ac1725ba162c 75 #define NETIF_FLAG_POINTTOPOINT 0x04U
segundo 0:ac1725ba162c 76 /* If set, the interface is configured using DHCP.
segundo 0:ac1725ba162c 77 * Set by the DHCP code when starting or stopping DHCP. */
segundo 0:ac1725ba162c 78 #define NETIF_FLAG_DHCP 0x08U
segundo 0:ac1725ba162c 79 /* If set, the interface has an active link
segundo 0:ac1725ba162c 80 * (set by the network interface driver).
segundo 0:ac1725ba162c 81 * Either set by the netif driver in its init function (if the link
segundo 0:ac1725ba162c 82 * is up at that time) or at a later point once the link comes up
segundo 0:ac1725ba162c 83 * (if link detection is supported by the hardware). */
segundo 0:ac1725ba162c 84 #define NETIF_FLAG_LINK_UP 0x10U
segundo 0:ac1725ba162c 85 /* If set, the netif is an ethernet device using ARP.
segundo 0:ac1725ba162c 86 * Set by the netif driver in its init function.
segundo 0:ac1725ba162c 87 * Used to check input packet types and use of DHCP. */
segundo 0:ac1725ba162c 88 #define NETIF_FLAG_ETHARP 0x20U
segundo 0:ac1725ba162c 89 /* If set, the netif is an ethernet device. It might not use
segundo 0:ac1725ba162c 90 * ARP or TCP/IP if it is used for PPPoE only.
segundo 0:ac1725ba162c 91 */
segundo 0:ac1725ba162c 92 #define NETIF_FLAG_ETHERNET 0x40U
segundo 0:ac1725ba162c 93 /* If set, the netif has IGMP capability.
segundo 0:ac1725ba162c 94 * Set by the netif driver in its init function. */
segundo 0:ac1725ba162c 95 #define NETIF_FLAG_IGMP 0x80U
segundo 0:ac1725ba162c 96
segundo 0:ac1725ba162c 97 /* Function prototype for netif init functions. Set up flags and output/linkoutput
segundo 0:ac1725ba162c 98 * callback functions in this function.
segundo 0:ac1725ba162c 99 *
segundo 0:ac1725ba162c 100 * @param netif The netif to initialize
segundo 0:ac1725ba162c 101 */
segundo 0:ac1725ba162c 102 typedef err_t (*netif_init_fn)(struct netif *netif);
segundo 0:ac1725ba162c 103 /* Function prototype for netif->input functions. This function is saved as 'input'
segundo 0:ac1725ba162c 104 * callback function in the netif struct. Call it when a packet has been received.
segundo 0:ac1725ba162c 105 *
segundo 0:ac1725ba162c 106 * @param p The received packet, copied into a pbuf
segundo 0:ac1725ba162c 107 * @param inp The netif which received the packet
segundo 0:ac1725ba162c 108 */
segundo 0:ac1725ba162c 109 typedef err_t (*netif_input_fn)(struct pbuf *p, struct netif *inp);
segundo 0:ac1725ba162c 110 /* Function prototype for netif->output functions. Called by lwIP when a packet
segundo 0:ac1725ba162c 111 * shall be sent. For ethernet netif, set this to 'etharp_output' and set
segundo 0:ac1725ba162c 112 * 'linkoutput'.
segundo 0:ac1725ba162c 113 *
segundo 0:ac1725ba162c 114 * @param netif The netif which shall send a packet
segundo 0:ac1725ba162c 115 * @param p The packet to send (p->payload points to IP header)
segundo 0:ac1725ba162c 116 * @param ipaddr The IP address to which the packet shall be sent
segundo 0:ac1725ba162c 117 */
segundo 0:ac1725ba162c 118 typedef err_t (*netif_output_fn)(struct netif *netif, struct pbuf *p,
segundo 0:ac1725ba162c 119 ip_addr_t *ipaddr);
segundo 0:ac1725ba162c 120 /* Function prototype for netif->linkoutput functions. Only used for ethernet
segundo 0:ac1725ba162c 121 * netifs. This function is called by ARP when a packet shall be sent.
segundo 0:ac1725ba162c 122 *
segundo 0:ac1725ba162c 123 * @param netif The netif which shall send a packet
segundo 0:ac1725ba162c 124 * @param p The packet to send (raw ethernet packet)
segundo 0:ac1725ba162c 125 */
segundo 0:ac1725ba162c 126 typedef err_t (*netif_linkoutput_fn)(struct netif *netif, struct pbuf *p);
segundo 0:ac1725ba162c 127 /* Function prototype for netif status- or link-callback functions. */
segundo 0:ac1725ba162c 128 typedef void (*netif_status_callback_fn)(struct netif *netif);
segundo 0:ac1725ba162c 129 /* Function prototype for netif igmp_mac_filter functions */
segundo 0:ac1725ba162c 130 typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif,
segundo 0:ac1725ba162c 131 ip_addr_t *group, u8_t action);
segundo 0:ac1725ba162c 132
segundo 0:ac1725ba162c 133 /* Generic data structure used for all lwIP network interfaces.
segundo 0:ac1725ba162c 134 * The following fields should be filled in by the initialization
segundo 0:ac1725ba162c 135 * function for the device driver: hwaddr_len, hwaddr[], mtu, flags */
segundo 0:ac1725ba162c 136 struct netif {
segundo 0:ac1725ba162c 137 /* pointer to next in linked list */
segundo 0:ac1725ba162c 138 struct netif *next;
segundo 0:ac1725ba162c 139
segundo 0:ac1725ba162c 140 /* IP address configuration in network byte order */
segundo 0:ac1725ba162c 141 ip_addr_t ip_addr;
segundo 0:ac1725ba162c 142 ip_addr_t netmask;
segundo 0:ac1725ba162c 143 ip_addr_t gw;
segundo 0:ac1725ba162c 144
segundo 0:ac1725ba162c 145 /* This function is called by the network device driver
segundo 0:ac1725ba162c 146 * to pass a packet up the TCP/IP stack. */
segundo 0:ac1725ba162c 147 netif_input_fn input;
segundo 0:ac1725ba162c 148 /* This function is called by the IP module when it wants
segundo 0:ac1725ba162c 149 * to send a packet on the interface. This function typically
segundo 0:ac1725ba162c 150 * first resolves the hardware address, then sends the packet. */
segundo 0:ac1725ba162c 151 netif_output_fn output;
segundo 0:ac1725ba162c 152 /* This function is called by the ARP module when it wants
segundo 0:ac1725ba162c 153 * to send a packet on the interface. This function outputs
segundo 0:ac1725ba162c 154 * the pbuf as-is on the link medium. */
segundo 0:ac1725ba162c 155 netif_linkoutput_fn linkoutput;
segundo 0:ac1725ba162c 156 #if LWIP_NETIF_STATUS_CALLBACK
segundo 0:ac1725ba162c 157 /* This function is called when the netif state is set to up or down
segundo 0:ac1725ba162c 158 */
segundo 0:ac1725ba162c 159 netif_status_callback_fn status_callback;
segundo 0:ac1725ba162c 160 #endif /* LWIP_NETIF_STATUS_CALLBACK */
segundo 0:ac1725ba162c 161 #if LWIP_NETIF_LINK_CALLBACK
segundo 0:ac1725ba162c 162 /* This function is called when the netif link is set to up or down
segundo 0:ac1725ba162c 163 */
segundo 0:ac1725ba162c 164 netif_status_callback_fn link_callback;
segundo 0:ac1725ba162c 165 #endif /* LWIP_NETIF_LINK_CALLBACK */
segundo 0:ac1725ba162c 166 /* This field can be set by the device driver and could point
segundo 0:ac1725ba162c 167 * to state information for the device. */
segundo 0:ac1725ba162c 168 void *state;
segundo 0:ac1725ba162c 169 #if LWIP_DHCP
segundo 0:ac1725ba162c 170 /* the DHCP client state information for this netif */
segundo 0:ac1725ba162c 171 struct dhcp *dhcp;
segundo 0:ac1725ba162c 172 #endif /* LWIP_DHCP */
segundo 0:ac1725ba162c 173 #if LWIP_AUTOIP
segundo 0:ac1725ba162c 174 /* the AutoIP client state information for this netif */
segundo 0:ac1725ba162c 175 struct autoip *autoip;
segundo 0:ac1725ba162c 176 #endif
segundo 0:ac1725ba162c 177 #if LWIP_NETIF_HOSTNAME
segundo 0:ac1725ba162c 178 /* the hostname for this netif, NULL is a valid value */
segundo 0:ac1725ba162c 179 char* hostname;
segundo 0:ac1725ba162c 180 #endif /* LWIP_NETIF_HOSTNAME */
segundo 0:ac1725ba162c 181 /* maximum transfer unit (in bytes) */
segundo 0:ac1725ba162c 182 u16_t mtu;
segundo 0:ac1725ba162c 183 /* number of bytes used in hwaddr */
segundo 0:ac1725ba162c 184 u8_t hwaddr_len;
segundo 0:ac1725ba162c 185 /* link level hardware address of this interface */
segundo 0:ac1725ba162c 186 u8_t hwaddr[NETIF_MAX_HWADDR_LEN];
segundo 0:ac1725ba162c 187 /* flags (see NETIF_FLAG_ above) */
segundo 0:ac1725ba162c 188 u8_t flags;
segundo 0:ac1725ba162c 189 /* descriptive abbreviation */
segundo 0:ac1725ba162c 190 char name[2];
segundo 0:ac1725ba162c 191 /* number of this interface */
segundo 0:ac1725ba162c 192 u8_t num;
segundo 0:ac1725ba162c 193 #if LWIP_SNMP
segundo 0:ac1725ba162c 194 /* link type (from "snmp_ifType" enum from snmp.h) */
segundo 0:ac1725ba162c 195 u8_t link_type;
segundo 0:ac1725ba162c 196 /* (estimate) link speed */
segundo 0:ac1725ba162c 197 u32_t link_speed;
segundo 0:ac1725ba162c 198 /* timestamp at last change made (up/down) */
segundo 0:ac1725ba162c 199 u32_t ts;
segundo 0:ac1725ba162c 200 /* counters */
segundo 0:ac1725ba162c 201 u32_t ifinoctets;
segundo 0:ac1725ba162c 202 u32_t ifinucastpkts;
segundo 0:ac1725ba162c 203 u32_t ifinnucastpkts;
segundo 0:ac1725ba162c 204 u32_t ifindiscards;
segundo 0:ac1725ba162c 205 u32_t ifoutoctets;
segundo 0:ac1725ba162c 206 u32_t ifoutucastpkts;
segundo 0:ac1725ba162c 207 u32_t ifoutnucastpkts;
segundo 0:ac1725ba162c 208 u32_t ifoutdiscards;
segundo 0:ac1725ba162c 209 #endif /* LWIP_SNMP */
segundo 0:ac1725ba162c 210 #if LWIP_IGMP
segundo 0:ac1725ba162c 211 /* This function could be called to add or delete a entry in the multicast
segundo 0:ac1725ba162c 212 filter table of the ethernet MAC.*/
segundo 0:ac1725ba162c 213 netif_igmp_mac_filter_fn igmp_mac_filter;
segundo 0:ac1725ba162c 214 #endif /* LWIP_IGMP */
segundo 0:ac1725ba162c 215 #if LWIP_NETIF_HWADDRHINT
segundo 0:ac1725ba162c 216 u8_t *addr_hint;
segundo 0:ac1725ba162c 217 #endif /* LWIP_NETIF_HWADDRHINT */
segundo 0:ac1725ba162c 218 #if ENABLE_LOOPBACK
segundo 0:ac1725ba162c 219 /* List of packets to be queued for ourselves. */
segundo 0:ac1725ba162c 220 struct pbuf *loop_first;
segundo 0:ac1725ba162c 221 struct pbuf *loop_last;
segundo 0:ac1725ba162c 222 #if LWIP_LOOPBACK_MAX_PBUFS
segundo 0:ac1725ba162c 223 u16_t loop_cnt_current;
segundo 0:ac1725ba162c 224 #endif /* LWIP_LOOPBACK_MAX_PBUFS */
segundo 0:ac1725ba162c 225 #endif /* ENABLE_LOOPBACK */
segundo 0:ac1725ba162c 226 };
segundo 0:ac1725ba162c 227
segundo 0:ac1725ba162c 228 #if LWIP_SNMP
segundo 0:ac1725ba162c 229 #define NETIF_INIT_SNMP(netif, type, speed) \
segundo 0:ac1725ba162c 230 /* use "snmp_ifType" enum from snmp.h for "type", snmp_ifType_ethernet_csmacd by example */ \
segundo 0:ac1725ba162c 231 (netif)->link_type = (type); \
segundo 0:ac1725ba162c 232 /* your link speed here (units: bits per second) */ \
segundo 0:ac1725ba162c 233 (netif)->link_speed = (speed); \
segundo 0:ac1725ba162c 234 (netif)->ts = 0; \
segundo 0:ac1725ba162c 235 (netif)->ifinoctets = 0; \
segundo 0:ac1725ba162c 236 (netif)->ifinucastpkts = 0; \
segundo 0:ac1725ba162c 237 (netif)->ifinnucastpkts = 0; \
segundo 0:ac1725ba162c 238 (netif)->ifindiscards = 0; \
segundo 0:ac1725ba162c 239 (netif)->ifoutoctets = 0; \
segundo 0:ac1725ba162c 240 (netif)->ifoutucastpkts = 0; \
segundo 0:ac1725ba162c 241 (netif)->ifoutnucastpkts = 0; \
segundo 0:ac1725ba162c 242 (netif)->ifoutdiscards = 0
segundo 0:ac1725ba162c 243 #else /* LWIP_SNMP */
segundo 0:ac1725ba162c 244 #define NETIF_INIT_SNMP(netif, type, speed)
segundo 0:ac1725ba162c 245 #endif /* LWIP_SNMP */
segundo 0:ac1725ba162c 246
segundo 0:ac1725ba162c 247
segundo 0:ac1725ba162c 248 /* The list of network interfaces. */
segundo 0:ac1725ba162c 249 extern struct netif *netif_list;
segundo 0:ac1725ba162c 250 /* The default network interface. */
segundo 0:ac1725ba162c 251 extern struct netif *netif_default;
segundo 0:ac1725ba162c 252
segundo 0:ac1725ba162c 253 void netif_init(void);
segundo 0:ac1725ba162c 254
segundo 0:ac1725ba162c 255 struct netif *netif_add(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask,
segundo 0:ac1725ba162c 256 ip_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input);
segundo 0:ac1725ba162c 257
segundo 0:ac1725ba162c 258 void
segundo 0:ac1725ba162c 259 netif_set_addr(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask,
segundo 0:ac1725ba162c 260 ip_addr_t *gw);
segundo 0:ac1725ba162c 261 void netif_remove(struct netif * netif);
segundo 0:ac1725ba162c 262
segundo 0:ac1725ba162c 263 /* Returns a network interface given its name. The name is of the form
segundo 0:ac1725ba162c 264 "et0", where the first two letters are the "name" field in the
segundo 0:ac1725ba162c 265 netif structure, and the digit is in the num field in the same
segundo 0:ac1725ba162c 266 structure. */
segundo 0:ac1725ba162c 267 struct netif *netif_find(char *name);
segundo 0:ac1725ba162c 268
segundo 0:ac1725ba162c 269 void netif_set_default(struct netif *netif);
segundo 0:ac1725ba162c 270
segundo 0:ac1725ba162c 271 void netif_set_ipaddr(struct netif *netif, ip_addr_t *ipaddr);
segundo 0:ac1725ba162c 272 void netif_set_netmask(struct netif *netif, ip_addr_t *netmask);
segundo 0:ac1725ba162c 273 void netif_set_gw(struct netif *netif, ip_addr_t *gw);
segundo 0:ac1725ba162c 274
segundo 0:ac1725ba162c 275 void netif_set_up(struct netif *netif);
segundo 0:ac1725ba162c 276 void netif_set_down(struct netif *netif);
segundo 0:ac1725ba162c 277 /* Ask if an interface is up */
segundo 0:ac1725ba162c 278 #define netif_is_up(netif) (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0)
segundo 0:ac1725ba162c 279
segundo 0:ac1725ba162c 280 #if LWIP_NETIF_STATUS_CALLBACK
segundo 0:ac1725ba162c 281 void netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_callback);
segundo 0:ac1725ba162c 282 #endif /* LWIP_NETIF_STATUS_CALLBACK */
segundo 0:ac1725ba162c 283
segundo 0:ac1725ba162c 284 void netif_set_link_up(struct netif *netif);
segundo 0:ac1725ba162c 285 void netif_set_link_down(struct netif *netif);
segundo 0:ac1725ba162c 286 /* Ask if a link is up */
segundo 0:ac1725ba162c 287 #define netif_is_link_up(netif) (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8_t)1 : (u8_t)0)
segundo 0:ac1725ba162c 288
segundo 0:ac1725ba162c 289 #if LWIP_NETIF_LINK_CALLBACK
segundo 0:ac1725ba162c 290 void netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback);
segundo 0:ac1725ba162c 291 #endif /* LWIP_NETIF_LINK_CALLBACK */
segundo 0:ac1725ba162c 292
segundo 0:ac1725ba162c 293 #if LWIP_NETIF_HOSTNAME
segundo 0:ac1725ba162c 294 #define netif_set_hostname(netif, name) do { if((netif) != NULL) { (netif)->hostname = name; }}while(0)
segundo 0:ac1725ba162c 295 #define netif_get_hostname(netif) (((netif) != NULL) ? ((netif)->hostname) : NULL)
segundo 0:ac1725ba162c 296 #endif /* LWIP_NETIF_HOSTNAME */
segundo 0:ac1725ba162c 297
segundo 0:ac1725ba162c 298 #if LWIP_IGMP
segundo 0:ac1725ba162c 299 #define netif_set_igmp_mac_filter(netif, function) do { if((netif) != NULL) { (netif)->igmp_mac_filter = function; }}while(0)
segundo 0:ac1725ba162c 300 #define netif_get_igmp_mac_filter(netif) (((netif) != NULL) ? ((netif)->igmp_mac_filter) : NULL)
segundo 0:ac1725ba162c 301 #endif /* LWIP_IGMP */
segundo 0:ac1725ba162c 302
segundo 0:ac1725ba162c 303 #if ENABLE_LOOPBACK
segundo 0:ac1725ba162c 304 err_t netif_loop_output(struct netif *netif, struct pbuf *p, ip_addr_t *dest_ip);
segundo 0:ac1725ba162c 305 void netif_poll(struct netif *netif);
segundo 0:ac1725ba162c 306 #if !LWIP_NETIF_LOOPBACK_MULTITHREADING
segundo 0:ac1725ba162c 307 void netif_poll_all(void);
segundo 0:ac1725ba162c 308 #endif /* !LWIP_NETIF_LOOPBACK_MULTITHREADING */
segundo 0:ac1725ba162c 309 #endif /* ENABLE_LOOPBACK */
segundo 0:ac1725ba162c 310
segundo 0:ac1725ba162c 311 #ifdef __cplusplus
segundo 0:ac1725ba162c 312 }
segundo 0:ac1725ba162c 313 #endif
segundo 0:ac1725ba162c 314
segundo 0:ac1725ba162c 315 #endif /* __LWIP_NETIF_H__ */