Move macros to access DHCP and AUTOIP data to headers, users may want to access the members
diff --git a/src/core/ipv4/autoip.c b/src/core/ipv4/autoip.c
index c5426ea..10db8a3 100644
--- a/src/core/ipv4/autoip.c
+++ b/src/core/ipv4/autoip.c
@@ -94,8 +94,6 @@
static err_t autoip_arp_announce(struct netif *netif);
static void autoip_start_probing(struct netif *netif);
-#define netif_autoip_data(netif) ((struct autoip*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP))
-
/**
* @ingroup autoip
* Set a statically allocated struct autoip to work with.
diff --git a/src/core/ipv4/dhcp.c b/src/core/ipv4/dhcp.c
index fadb8e7..dd35471 100644
--- a/src/core/ipv4/dhcp.c
+++ b/src/core/ipv4/dhcp.c
@@ -209,8 +209,6 @@
/* always add the DHCP options trailer to end and pad */
static void dhcp_option_trailer(struct dhcp *dhcp);
-#define netif_dhcp_data(netif) ((struct dhcp*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP))
-
/** Ensure DHCP PCB is allocated and bound */
static err_t
dhcp_inc_pcb_refcount(void)
diff --git a/src/include/lwip/autoip.h b/src/include/lwip/autoip.h
index 2f66698..1d85bcc 100644
--- a/src/include/lwip/autoip.h
+++ b/src/include/lwip/autoip.h
@@ -88,6 +88,8 @@
/* for lwIP internal use by ip4.c */
u8_t autoip_accept_packet(struct netif *netif, const ip4_addr_t *addr);
+#define netif_autoip_data(netif) ((struct autoip*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP))
+
#ifdef __cplusplus
}
#endif
diff --git a/src/include/lwip/dhcp.h b/src/include/lwip/dhcp.h
index f750328..ac1b18e 100644
--- a/src/include/lwip/dhcp.h
+++ b/src/include/lwip/dhcp.h
@@ -132,6 +132,8 @@
extern void dhcp_set_ntp_servers(u8_t num_ntp_servers, const ip4_addr_t* ntp_server_addrs);
#endif /* LWIP_DHCP_GET_NTP_SRV */
+#define netif_dhcp_data(netif) ((struct dhcp*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP))
+
#ifdef __cplusplus
}
#endif