1/*
2 * hostapd / IEEE 802 OUI Extended Ethertype
3 * Copyright (c) 2016, Jouni Malinen <j@w1.fi>
4 *
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
7 */
8
9#ifndef ETH_P_OUI_H
10#define ETH_P_OUI_H
11
12struct eth_p_oui_ctx;
13struct hostapd_data;
14
15/* rx_callback only gets payload after OUI passed as buf */
16struct eth_p_oui_ctx *
17eth_p_oui_register(struct hostapd_data *hapd, const char *ifname, u8 oui_suffix,
18		   void (*rx_callback)(void *ctx, const u8 *src_addr,
19				       const u8 *dst_addr, u8 oui_suffix,
20				       const u8 *buf, size_t len),
21		   void *rx_callback_ctx);
22void eth_p_oui_unregister(struct eth_p_oui_ctx *eth_p_oui);
23int eth_p_oui_send(struct eth_p_oui_ctx *ctx, const u8 *src_addr,
24		   const u8 *dst_addr, const u8 *buf, size_t len);
25void eth_p_oui_deliver(struct eth_p_oui_ctx *ctx, const u8 *src_addr,
26		       const u8 *dst_addr, const u8 *buf, size_t len);
27
28#endif /* ETH_P_OUI_H */
29