1/* 2 * Generic Snooping for Proxy ARP 3 * Copyright (c) 2014, Qualcomm Atheros, Inc. 4 * 5 * This software may be distributed under the terms of the BSD license. 6 * See README for more details. 7 */ 8 9#ifndef X_SNOOP_H 10#define X_SNOOP_H 11 12#include "l2_packet/l2_packet.h" 13 14#ifdef CONFIG_PROXYARP 15 16int x_snoop_init(struct hostapd_data *hapd); 17struct l2_packet_data * 18x_snoop_get_l2_packet(struct hostapd_data *hapd, 19 void (*handler)(void *ctx, const u8 *src_addr, 20 const u8 *buf, size_t len), 21 enum l2_packet_filter_type type); 22void x_snoop_mcast_to_ucast_convert_send(struct hostapd_data *hapd, 23 struct sta_info *sta, u8 *buf, 24 size_t len); 25void x_snoop_deinit(struct hostapd_data *hapd); 26 27#else /* CONFIG_PROXYARP */ 28 29static inline int x_snoop_init(struct hostapd_data *hapd) 30{ 31 return 0; 32} 33 34static inline struct l2_packet_data * 35x_snoop_get_l2_packet(struct hostapd_data *hapd, 36 void (*handler)(void *ctx, const u8 *src_addr, 37 const u8 *buf, size_t len), 38 enum l2_packet_filter_type type) 39{ 40 return NULL; 41} 42 43static inline void 44x_snoop_mcast_to_ucast_convert_send(struct hostapd_data *hapd, 45 struct sta_info *sta, void *buf, 46 size_t len) 47{ 48} 49 50static inline void x_snoop_deinit(struct hostapd_data *hapd) 51{ 52} 53 54#endif /* CONFIG_PROXYARP */ 55 56#endif /* X_SNOOP_H */ 57