1189251Ssam/*
2189251Ssam * UPnP WPS Device
3189251Ssam * Copyright (c) 2000-2003 Intel Corporation
4189251Ssam * Copyright (c) 2006-2007 Sony Corporation
5189251Ssam * Copyright (c) 2008-2009 Atheros Communications
6189251Ssam * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
7189251Ssam *
8189251Ssam * See wps_upnp.c for more details on licensing and code history.
9189251Ssam */
10189251Ssam
11189251Ssam#ifndef WPS_UPNP_H
12189251Ssam#define WPS_UPNP_H
13189251Ssam
14189251Ssamstruct upnp_wps_device_sm;
15189251Ssamstruct wps_context;
16189251Ssamstruct wps_data;
17189251Ssam
18189251Ssamstruct upnp_wps_peer {
19189251Ssam	struct wps_data *wps;
20189251Ssam};
21189251Ssam
22189251Ssamenum upnp_wps_wlanevent_type {
23189251Ssam	UPNP_WPS_WLANEVENT_TYPE_PROBE = 1,
24189251Ssam	UPNP_WPS_WLANEVENT_TYPE_EAP = 2
25189251Ssam};
26189251Ssam
27189251Ssamstruct upnp_wps_device_ctx {
28189251Ssam	int (*rx_req_put_wlan_response)(
29189251Ssam		void *priv, enum upnp_wps_wlanevent_type ev_type,
30189251Ssam		const u8 *mac_addr, const struct wpabuf *msg,
31189251Ssam		enum wps_msg_type msg_type);
32214734Srpaulo
33214734Srpaulo	char *ap_pin;
34189251Ssam};
35189251Ssam
36189251Ssamstruct upnp_wps_device_sm *
37189251Ssamupnp_wps_device_init(struct upnp_wps_device_ctx *ctx, struct wps_context *wps,
38252726Srpaulo		     void *priv, char *net_if);
39252726Srpaulovoid upnp_wps_device_deinit(struct upnp_wps_device_sm *sm, void *priv);
40189251Ssam
41189251Ssamint upnp_wps_device_send_wlan_event(struct upnp_wps_device_sm *sm,
42189251Ssam				    const u8 from_mac_addr[ETH_ALEN],
43189251Ssam				    enum upnp_wps_wlanevent_type ev_type,
44189251Ssam				    const struct wpabuf *msg);
45189251Ssamint upnp_wps_subscribers(struct upnp_wps_device_sm *sm);
46214734Srpauloint upnp_wps_set_ap_pin(struct upnp_wps_device_sm *sm, const char *ap_pin);
47189251Ssam
48189251Ssam#endif /* WPS_UPNP_H */
49