hostap/src/ap/ndisc_snoop.h
Jouni Malinen a437378f98 proxyarp: Use C library header files and CONFIG_IPV6
This replaces the use of Linux kernel header files (linux/ip.h,
linux/udp.h, linux/ipv6.h, and linux/icmpv6.h) with equivalent header
files from C library. In addition, ndisc_snoop.c is now built
conditionally on CONFIG_IPV6=y so that it is easier to handle hostapd
builds with toolchains that do not support IPv6 even if Hotspot 2.0 is
enabled in the build.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-25 16:58:21 +02:00

36 lines
838 B
C

/*
* Neighbor Discovery snooping for Proxy ARP
* Copyright (c) 2014, Qualcomm Atheros, Inc.
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*/
#ifndef NDISC_SNOOP_H
#define NDISC_SNOOP_H
#if defined(CONFIG_PROXYARP) && defined(CONFIG_IPV6)
int ndisc_snoop_init(struct hostapd_data *hapd);
void ndisc_snoop_deinit(struct hostapd_data *hapd);
void sta_ip6addr_del(struct hostapd_data *hapd, struct sta_info *sta);
#else /* CONFIG_PROXYARP && CONFIG_IPV6 */
static inline int ndisc_snoop_init(struct hostapd_data *hapd)
{
return 0;
}
static inline void ndisc_snoop_deinit(struct hostapd_data *hapd)
{
}
static inline void sta_ip6addr_del(struct hostapd_data *hapd,
struct sta_info *sta)
{
}
#endif /* CONFIG_PROXYARP && CONFIG_IPV6 */
#endif /* NDISC_SNOOP_H */