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