Port AUTOIP to new netif client data API

This commit is contained in:
Dirk Ziegelmeier
2016-08-17 21:26:08 +02:00
parent 1db9631e7d
commit c62bfd8146
5 changed files with 87 additions and 73 deletions

View File

@@ -75,7 +75,6 @@ struct autoip
};
#define autoip_init() /* Compatibility define, no init needed. */
void autoip_set_struct(struct netif *netif, struct autoip *autoip);
/** Remove a struct autoip previously set to the netif using autoip_set_struct() */
#define autoip_remove_struct(netif) do { (netif)->autoip = NULL; } while (0)
@@ -85,6 +84,10 @@ void autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr);
void autoip_tmr(void);
void autoip_network_changed(struct netif *netif);
u8_t autoip_supplied_address(const struct netif *netif);
void autoip_init(void);
/* for lwIP internal use by ip4.c */
u8_t autoip_accept_packet(struct netif *netif, const ip4_addr_t *addr);
#ifdef __cplusplus
}

View File

@@ -49,10 +49,6 @@
#include "lwip/pbuf.h"
#include "lwip/stats.h"
#if LWIP_AUTOIP
struct autoip;
#endif
#ifdef __cplusplus
extern "C" {
#endif
@@ -241,10 +237,6 @@ struct netif {
/** This field can be set by the device driver and could point
* to state information for the device. */
void *state;
#if LWIP_AUTOIP
/** the AutoIP client state information for this netif */
struct autoip *autoip;
#endif
#if LWIP_NUM_NETIF_CLIENT_DATA > 0
void* client_data[LWIP_NUM_NETIF_CLIENT_DATA];
#endif