eth_p_oui.h 958 B

12345678910111213141516171819202122232425262728
  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. #ifndef ETH_P_OUI_H
  9. #define ETH_P_OUI_H
  10. struct eth_p_oui_ctx;
  11. struct hostapd_data;
  12. /* rx_callback only gets payload after OUI passed as buf */
  13. struct eth_p_oui_ctx *
  14. eth_p_oui_register(struct hostapd_data *hapd, const char *ifname, u8 oui_suffix,
  15. void (*rx_callback)(void *ctx, const u8 *src_addr,
  16. const u8 *dst_addr, u8 oui_suffix,
  17. const u8 *buf, size_t len),
  18. void *rx_callback_ctx);
  19. void eth_p_oui_unregister(struct eth_p_oui_ctx *eth_p_oui);
  20. int eth_p_oui_send(struct eth_p_oui_ctx *ctx, const u8 *src_addr,
  21. const u8 *dst_addr, const u8 *buf, size_t len);
  22. void eth_p_oui_deliver(struct eth_p_oui_ctx *ctx, const u8 *src_addr,
  23. const u8 *dst_addr, const u8 *buf, size_t len);
  24. #endif /* ETH_P_OUI_H */