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