aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/x_snoop.h
diff options
context:
space:
mode:
authorKyeyoon Park <kyeyoonp@qca.qualcomm.com>2014-11-01 01:18:35 (GMT)
committerJouni Malinen <j@w1.fi>2014-11-19 14:14:02 (GMT)
commitc127355cb84b313e3d4ceca719ec68558c0412dc (patch)
treec31bb3720a434ff6fa39a8626f7db80c6169dd75 /src/ap/x_snoop.h
parent077f13c3e1deac64021af82406ca14499fe05cad (diff)
downloadhostap-c127355cb84b313e3d4ceca719ec68558c0412dc.zip
hostap-c127355cb84b313e3d4ceca719ec68558c0412dc.tar.gz
hostap-c127355cb84b313e3d4ceca719ec68558c0412dc.tar.bz2
AP: Add a generic "x_snoop" infrastructure for Proxy ARP
Signed-off-by: Kyeyoon Park <kyeyoonp@qca.qualcomm.com>
Diffstat (limited to 'src/ap/x_snoop.h')
-rw-r--r--src/ap/x_snoop.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/ap/x_snoop.h b/src/ap/x_snoop.h
new file mode 100644
index 0000000..67ca0c6
--- /dev/null
+++ b/src/ap/x_snoop.h
@@ -0,0 +1,46 @@
+/*
+ * Generic 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 X_SNOOP_H
+#define X_SNOOP_H
+
+#include "l2_packet/l2_packet.h"
+
+#ifdef CONFIG_PROXYARP
+
+int x_snoop_init(struct hostapd_data *hapd);
+struct l2_packet_data *
+x_snoop_get_l2_packet(struct hostapd_data *hapd,
+ void (*handler)(void *ctx, const u8 *src_addr,
+ const u8 *buf, size_t len),
+ enum l2_packet_filter_type type);
+void x_snoop_deinit(struct hostapd_data *hapd);
+
+#else /* CONFIG_PROXYARP */
+
+static inline int x_snoop_init(struct hostapd_data *hapd)
+{
+ return 0;
+}
+
+static inline struct l2_packet_data *
+x_snoop_get_l2_packet(struct hostapd_data *hapd,
+ void (*handler)(void *ctx, const u8 *src_addr,
+ const u8 *buf, size_t len),
+ enum l2_packet_filter_type type)
+{
+ return NULL;
+}
+
+static inline void x_snoop_deinit(struct hostapd_data *hapd)
+{
+}
+
+#endif /* CONFIG_PROXYARP */
+
+#endif /* X_SNOOP_H */