139beb93cSSam Leffler /* 239beb93cSSam Leffler * UPnP WPS Device 339beb93cSSam Leffler * Copyright (c) 2000-2003 Intel Corporation 439beb93cSSam Leffler * Copyright (c) 2006-2007 Sony Corporation 539beb93cSSam Leffler * Copyright (c) 2008-2009 Atheros Communications 639beb93cSSam Leffler * Copyright (c) 2009, Jouni Malinen <j@w1.fi> 739beb93cSSam Leffler * 839beb93cSSam Leffler * See wps_upnp.c for more details on licensing and code history. 939beb93cSSam Leffler */ 1039beb93cSSam Leffler 1139beb93cSSam Leffler #ifndef WPS_UPNP_H 1239beb93cSSam Leffler #define WPS_UPNP_H 1339beb93cSSam Leffler 14*780fb4a2SCy Schubert #include "utils/list.h" 15*780fb4a2SCy Schubert 1639beb93cSSam Leffler struct upnp_wps_device_sm; 1739beb93cSSam Leffler struct wps_context; 1839beb93cSSam Leffler struct wps_data; 1939beb93cSSam Leffler 2039beb93cSSam Leffler struct upnp_wps_peer { 21*780fb4a2SCy Schubert struct dl_list list; 2239beb93cSSam Leffler struct wps_data *wps; 2339beb93cSSam Leffler }; 2439beb93cSSam Leffler 2539beb93cSSam Leffler enum upnp_wps_wlanevent_type { 2639beb93cSSam Leffler UPNP_WPS_WLANEVENT_TYPE_PROBE = 1, 2739beb93cSSam Leffler UPNP_WPS_WLANEVENT_TYPE_EAP = 2 2839beb93cSSam Leffler }; 2939beb93cSSam Leffler 3039beb93cSSam Leffler struct upnp_wps_device_ctx { 3139beb93cSSam Leffler int (*rx_req_put_wlan_response)( 3239beb93cSSam Leffler void *priv, enum upnp_wps_wlanevent_type ev_type, 3339beb93cSSam Leffler const u8 *mac_addr, const struct wpabuf *msg, 3439beb93cSSam Leffler enum wps_msg_type msg_type); 35e28a4053SRui Paulo 36e28a4053SRui Paulo char *ap_pin; 3739beb93cSSam Leffler }; 3839beb93cSSam Leffler 3939beb93cSSam Leffler struct upnp_wps_device_sm * 4039beb93cSSam Leffler upnp_wps_device_init(struct upnp_wps_device_ctx *ctx, struct wps_context *wps, 41f05cddf9SRui Paulo void *priv, char *net_if); 42f05cddf9SRui Paulo void upnp_wps_device_deinit(struct upnp_wps_device_sm *sm, void *priv); 4339beb93cSSam Leffler 4439beb93cSSam Leffler int upnp_wps_device_send_wlan_event(struct upnp_wps_device_sm *sm, 4539beb93cSSam Leffler const u8 from_mac_addr[ETH_ALEN], 4639beb93cSSam Leffler enum upnp_wps_wlanevent_type ev_type, 4739beb93cSSam Leffler const struct wpabuf *msg); 4839beb93cSSam Leffler int upnp_wps_subscribers(struct upnp_wps_device_sm *sm); 49e28a4053SRui Paulo int upnp_wps_set_ap_pin(struct upnp_wps_device_sm *sm, const char *ap_pin); 5039beb93cSSam Leffler 5139beb93cSSam Leffler #endif /* WPS_UPNP_H */ 52