wps_upnp.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * UPnP WPS Device
  3. * Copyright (c) 2000-2003 Intel Corporation
  4. * Copyright (c) 2006-2007 Sony Corporation
  5. * Copyright (c) 2008-2009 Atheros Communications
  6. * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
  7. *
  8. * See wps_upnp.c for more details on licensing and code history.
  9. */
  10. #ifndef WPS_UPNP_H
  11. #define WPS_UPNP_H
  12. struct upnp_wps_device_sm;
  13. struct wps_context;
  14. struct wps_data;
  15. struct upnp_wps_peer {
  16. struct wps_data *wps;
  17. };
  18. enum upnp_wps_wlanevent_type {
  19. UPNP_WPS_WLANEVENT_TYPE_PROBE = 1,
  20. UPNP_WPS_WLANEVENT_TYPE_EAP = 2
  21. };
  22. struct upnp_wps_device_ctx {
  23. int (*rx_req_put_wlan_response)(
  24. void *priv, enum upnp_wps_wlanevent_type ev_type,
  25. const u8 *mac_addr, const struct wpabuf *msg,
  26. enum wps_msg_type msg_type);
  27. char *ap_pin;
  28. };
  29. struct upnp_wps_device_sm *
  30. upnp_wps_device_init(struct upnp_wps_device_ctx *ctx, struct wps_context *wps,
  31. void *priv, char *net_if);
  32. void upnp_wps_device_deinit(struct upnp_wps_device_sm *sm, void *priv);
  33. int upnp_wps_device_send_wlan_event(struct upnp_wps_device_sm *sm,
  34. const u8 from_mac_addr[ETH_ALEN],
  35. enum upnp_wps_wlanevent_type ev_type,
  36. const struct wpabuf *msg);
  37. int upnp_wps_subscribers(struct upnp_wps_device_sm *sm);
  38. int upnp_wps_set_ap_pin(struct upnp_wps_device_sm *sm, const char *ap_pin);
  39. #endif /* WPS_UPNP_H */