2009-01-29 17:47:02 +01:00
|
|
|
/*
|
|
|
|
* UPnP WPS Device
|
|
|
|
* Copyright (c) 2000-2003 Intel Corporation
|
|
|
|
* Copyright (c) 2006-2007 Sony Corporation
|
|
|
|
* Copyright (c) 2008-2009 Atheros Communications
|
|
|
|
* Copyright (c) 2009, Jouni Malinen <j@w1.fi>
|
|
|
|
*
|
|
|
|
* See wps_upnp.c for more details on licensing and code history.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WPS_UPNP_H
|
|
|
|
#define WPS_UPNP_H
|
|
|
|
|
2015-11-30 15:57:11 +01:00
|
|
|
#include "utils/list.h"
|
|
|
|
|
2009-01-29 17:47:02 +01:00
|
|
|
struct upnp_wps_device_sm;
|
|
|
|
struct wps_context;
|
|
|
|
struct wps_data;
|
|
|
|
|
|
|
|
struct upnp_wps_peer {
|
2015-11-30 15:57:11 +01:00
|
|
|
struct dl_list list;
|
2009-01-29 17:47:02 +01:00
|
|
|
struct wps_data *wps;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum upnp_wps_wlanevent_type {
|
|
|
|
UPNP_WPS_WLANEVENT_TYPE_PROBE = 1,
|
|
|
|
UPNP_WPS_WLANEVENT_TYPE_EAP = 2
|
|
|
|
};
|
|
|
|
|
|
|
|
struct upnp_wps_device_ctx {
|
2009-02-06 20:44:19 +01:00
|
|
|
int (*rx_req_put_wlan_response)(
|
2009-01-29 17:47:02 +01:00
|
|
|
void *priv, enum upnp_wps_wlanevent_type ev_type,
|
2009-02-06 20:39:32 +01:00
|
|
|
const u8 *mac_addr, const struct wpabuf *msg,
|
|
|
|
enum wps_msg_type msg_type);
|
2009-12-12 15:47:39 +01:00
|
|
|
|
|
|
|
char *ap_pin;
|
2009-01-29 17:47:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct upnp_wps_device_sm *
|
|
|
|
upnp_wps_device_init(struct upnp_wps_device_ctx *ctx, struct wps_context *wps,
|
2010-11-11 13:50:13 +01:00
|
|
|
void *priv, char *net_if);
|
|
|
|
void upnp_wps_device_deinit(struct upnp_wps_device_sm *sm, void *priv);
|
2009-01-29 17:47:02 +01:00
|
|
|
|
|
|
|
int upnp_wps_device_send_wlan_event(struct upnp_wps_device_sm *sm,
|
|
|
|
const u8 from_mac_addr[ETH_ALEN],
|
|
|
|
enum upnp_wps_wlanevent_type ev_type,
|
|
|
|
const struct wpabuf *msg);
|
|
|
|
int upnp_wps_subscribers(struct upnp_wps_device_sm *sm);
|
2010-08-24 15:35:37 +02:00
|
|
|
int upnp_wps_set_ap_pin(struct upnp_wps_device_sm *sm, const char *ap_pin);
|
2009-01-29 17:47:02 +01:00
|
|
|
|
|
|
|
#endif /* WPS_UPNP_H */
|