#include "includes.h"
#include "common.h"
#include "base64.h"
#include "uuid.h"
#include "eloop.h"
#include "httpread.h"
#include "http_client.h"
#include "http_server.h"
#include "upnp_xml.h"
#include "wps_i.h"
#include "wps_upnp.h"
#include "wps_upnp_i.h"
#include "wps_er.h"
Go to the source code of this file.
Functions | |
static void | http_put_date (struct wpabuf *buf) |
static struct wps_er_sta * | wps_er_add_sta_data (struct wps_er_ap *ap, const u8 *addr, struct wps_parse_attr *attr, int probe_req) |
void | wps_er_ap_add (struct wps_er *er, const u8 *uuid, struct in_addr *addr, const char *location, int max_age) |
static void | wps_er_ap_event (struct wps_context *wps, struct wps_er_ap *ap, enum wps_event event) |
static void | wps_er_ap_free (struct wps_er_ap *ap) |
static struct wps_er_ap * | wps_er_ap_get (struct wps_er *er, struct in_addr *addr, const u8 *uuid) |
static struct wps_er_ap * | wps_er_ap_get_id (struct wps_er *er, unsigned int id) |
static void | wps_er_ap_get_m1 (struct wps_er_ap *ap, struct wpabuf *m1) |
static void | wps_er_ap_learn (struct wps_er_ap *ap, const char *dev_info) |
static void | wps_er_ap_learn_m1 (struct wps_er_ap *ap, struct wpabuf *m1) |
static void | wps_er_ap_process (struct wps_er_ap *ap, struct wpabuf *msg) |
static void | wps_er_ap_put_message (struct wps_er_ap *ap, const struct wpabuf *msg) |
void | wps_er_ap_remove (struct wps_er *er, struct in_addr *addr) |
static void | wps_er_ap_remove_all (struct wps_er *er) |
static void | wps_er_ap_remove_entry (struct wps_er *er, struct wps_er_ap *ap) |
static void | wps_er_ap_settings_cb (void *ctx, const struct wps_credential *cred) |
static void | wps_er_ap_timeout (void *eloop_data, void *user_ctx) |
static void | wps_er_ap_unsubscribe (struct wps_er *er, struct wps_er_ap *ap) |
static void | wps_er_ap_unsubscribed (struct wps_er *er, struct wps_er_ap *ap) |
static int | wps_er_build_dev_password_id (struct wpabuf *msg, u16 dev_passwd_id) |
static int | wps_er_build_sel_reg_config_methods (struct wpabuf *msg, u16 sel_reg_config_methods) |
static int | wps_er_build_selected_registrar (struct wpabuf *msg, int sel_reg) |
void | wps_er_deinit (struct wps_er *er, void(*cb)(void *ctx), void *ctx) |
static void | wps_er_deinit_finish (void *eloop_data, void *user_ctx) |
static void | wps_er_get_device_info (struct wps_er_ap *ap) |
static int | wps_er_get_sid (struct wps_er_ap *ap, char *sid) |
static void | wps_er_http_dev_desc_cb (void *ctx, struct http_client *c, enum http_client_event event) |
static void | wps_er_http_event (struct wps_er *er, struct http_request *req, unsigned int ap_id) |
static void | wps_er_http_get_dev_info_cb (void *ctx, struct http_client *c, enum http_client_event event) |
static void | wps_er_http_notify (struct wps_er *er, struct http_request *req) |
static void | wps_er_http_put_message_cb (void *ctx, struct http_client *c, enum http_client_event event) |
static void | wps_er_http_put_wlan_response_cb (void *ctx, struct http_client *c, enum http_client_event event) |
static void | wps_er_http_req (void *ctx, struct http_request *req) |
static void | wps_er_http_resp_not_found (struct http_request *req) |
static void | wps_er_http_resp_ok (struct http_request *req) |
static void | wps_er_http_set_sel_reg_cb (void *ctx, struct http_client *c, enum http_client_event event) |
static void | wps_er_http_subscribe_cb (void *ctx, struct http_client *c, enum http_client_event event) |
static void | wps_er_http_unsubscribe_cb (void *ctx, struct http_client *c, enum http_client_event event) |
struct wps_er * | wps_er_init (struct wps_context *wps, const char *ifname) |
int | wps_er_learn (struct wps_er *er, const u8 *uuid, const u8 *pin, size_t pin_len) |
static void | wps_er_parse_device_description (struct wps_er_ap *ap, struct wpabuf *reply) |
int | wps_er_pbc (struct wps_er *er, const u8 *uuid) |
static void | wps_er_process_wlanevent (struct wps_er_ap *ap, struct wpabuf *event) |
static void | wps_er_process_wlanevent_eap (struct wps_er_ap *ap, const u8 *addr, struct wpabuf *msg) |
static void | wps_er_process_wlanevent_probe_req (struct wps_er_ap *ap, const u8 *addr, struct wpabuf *msg) |
void | wps_er_refresh (struct wps_er *er) |
static int | wps_er_send_get_device_info (struct wps_er_ap *ap, void(*m1_handler)(struct wps_er_ap *ap, struct wpabuf *m1)) |
static void | wps_er_send_set_sel_reg (struct wps_er_ap *ap, struct wpabuf *msg) |
void | wps_er_set_sel_reg (struct wps_er *er, int sel_reg, u16 dev_passwd_id, u16 sel_reg_config_methods) |
static void | wps_er_soap_end (struct wpabuf *buf, const char *name, char *len_ptr, char *body_ptr) |
static struct wpabuf * | wps_er_soap_hdr (const struct wpabuf *msg, const char *name, const char *arg_name, const char *path, const struct sockaddr_in *dst, char **len_ptr, char **body_ptr) |
static void | wps_er_sta_event (struct wps_context *wps, struct wps_er_sta *sta, enum wps_event event) |
static void | wps_er_sta_free (struct wps_er_sta *sta) |
static struct wps_er_sta * | wps_er_sta_get (struct wps_er_ap *ap, const u8 *addr) |
static void | wps_er_sta_process (struct wps_er_sta *sta, struct wpabuf *msg, enum wsc_op_code op_code) |
static void | wps_er_sta_remove_all (struct wps_er_ap *ap) |
static void | wps_er_sta_send_msg (struct wps_er_sta *sta, struct wpabuf *msg) |
static void | wps_er_sta_start (struct wps_er_sta *sta, struct wpabuf *msg) |
static void | wps_er_sta_timeout (void *eloop_data, void *user_ctx) |
static void | wps_er_subscribe (struct wps_er_ap *ap) |
Variables | |
static const char * | soap_postfix = "</s:Body>\n</s:Envelope>\n" |
static const char * | soap_prefix = "<s:Body>\n" |
static const char * | urn_wfawlanconfig = "urn:schemas-wifialliance-org:service:WFAWLANConfig:1" |
static void http_put_date | ( | struct wpabuf * | buf | ) | [static] |
static struct wps_er_sta* wps_er_add_sta_data | ( | struct wps_er_ap * | ap, |
const u8 * | addr, | ||
struct wps_parse_attr * | attr, | ||
int | probe_req | ||
) | [static, read] |
void wps_er_ap_add | ( | struct wps_er * | er, |
const u8 * | uuid, | ||
struct in_addr * | addr, | ||
const char * | location, | ||
int | max_age | ||
) |
static void wps_er_ap_event | ( | struct wps_context * | wps, |
struct wps_er_ap * | ap, | ||
enum wps_event | event | ||
) | [static] |
static void wps_er_ap_free | ( | struct wps_er_ap * | ap | ) | [static] |
static struct wps_er_ap* wps_er_ap_get | ( | struct wps_er * | er, |
struct in_addr * | addr, | ||
const u8 * | uuid | ||
) | [static, read] |
static struct wps_er_ap* wps_er_ap_get_id | ( | struct wps_er * | er, |
unsigned int | id | ||
) | [static, read] |
static void wps_er_ap_get_m1 | ( | struct wps_er_ap * | ap, |
struct wpabuf * | m1 | ||
) | [static] |
static void wps_er_ap_learn | ( | struct wps_er_ap * | ap, |
const char * | dev_info | ||
) | [static] |
static void wps_er_ap_learn_m1 | ( | struct wps_er_ap * | ap, |
struct wpabuf * | m1 | ||
) | [static] |
static void wps_er_ap_process | ( | struct wps_er_ap * | ap, |
struct wpabuf * | msg | ||
) | [static] |
static void wps_er_ap_put_message | ( | struct wps_er_ap * | ap, |
const struct wpabuf * | msg | ||
) | [static] |
void wps_er_ap_remove | ( | struct wps_er * | er, |
struct in_addr * | addr | ||
) |
static void wps_er_ap_remove_all | ( | struct wps_er * | er | ) | [static] |
static void wps_er_ap_remove_entry | ( | struct wps_er * | er, |
struct wps_er_ap * | ap | ||
) | [static] |
static void wps_er_ap_settings_cb | ( | void * | ctx, |
const struct wps_credential * | cred | ||
) | [static] |
static void wps_er_ap_timeout | ( | void * | eloop_data, |
void * | user_ctx | ||
) | [static] |
static void wps_er_ap_unsubscribe | ( | struct wps_er * | er, |
struct wps_er_ap * | ap | ||
) | [static] |
static void wps_er_ap_unsubscribed | ( | struct wps_er * | er, |
struct wps_er_ap * | ap | ||
) | [static] |
static int wps_er_build_dev_password_id | ( | struct wpabuf * | msg, |
u16 | dev_passwd_id | ||
) | [static] |
static int wps_er_build_sel_reg_config_methods | ( | struct wpabuf * | msg, |
u16 | sel_reg_config_methods | ||
) | [static] |
static int wps_er_build_selected_registrar | ( | struct wpabuf * | msg, |
int | sel_reg | ||
) | [static] |
void wps_er_deinit | ( | struct wps_er * | er, |
void(*)(void *ctx) | cb, | ||
void * | ctx | ||
) |
static void wps_er_deinit_finish | ( | void * | eloop_data, |
void * | user_ctx | ||
) | [static] |
static void wps_er_get_device_info | ( | struct wps_er_ap * | ap | ) | [static] |
static int wps_er_get_sid | ( | struct wps_er_ap * | ap, |
char * | sid | ||
) | [static] |
static void wps_er_http_dev_desc_cb | ( | void * | ctx, |
struct http_client * | c, | ||
enum http_client_event | event | ||
) | [static] |
static void wps_er_http_event | ( | struct wps_er * | er, |
struct http_request * | req, | ||
unsigned int | ap_id | ||
) | [static] |
static void wps_er_http_get_dev_info_cb | ( | void * | ctx, |
struct http_client * | c, | ||
enum http_client_event | event | ||
) | [static] |
static void wps_er_http_notify | ( | struct wps_er * | er, |
struct http_request * | req | ||
) | [static] |
static void wps_er_http_put_message_cb | ( | void * | ctx, |
struct http_client * | c, | ||
enum http_client_event | event | ||
) | [static] |
static void wps_er_http_put_wlan_response_cb | ( | void * | ctx, |
struct http_client * | c, | ||
enum http_client_event | event | ||
) | [static] |
static void wps_er_http_req | ( | void * | ctx, |
struct http_request * | req | ||
) | [static] |
static void wps_er_http_resp_not_found | ( | struct http_request * | req | ) | [static] |
static void wps_er_http_resp_ok | ( | struct http_request * | req | ) | [static] |
static void wps_er_http_set_sel_reg_cb | ( | void * | ctx, |
struct http_client * | c, | ||
enum http_client_event | event | ||
) | [static] |
static void wps_er_http_subscribe_cb | ( | void * | ctx, |
struct http_client * | c, | ||
enum http_client_event | event | ||
) | [static] |
static void wps_er_http_unsubscribe_cb | ( | void * | ctx, |
struct http_client * | c, | ||
enum http_client_event | event | ||
) | [static] |
struct wps_er* wps_er_init | ( | struct wps_context * | wps, |
const char * | ifname | ||
) | [read] |
int wps_er_learn | ( | struct wps_er * | er, |
const u8 * | uuid, | ||
const u8 * | pin, | ||
size_t | pin_len | ||
) |
static void wps_er_parse_device_description | ( | struct wps_er_ap * | ap, |
struct wpabuf * | reply | ||
) | [static] |
int wps_er_pbc | ( | struct wps_er * | er, |
const u8 * | uuid | ||
) |
static void wps_er_process_wlanevent | ( | struct wps_er_ap * | ap, |
struct wpabuf * | event | ||
) | [static] |
static void wps_er_process_wlanevent_eap | ( | struct wps_er_ap * | ap, |
const u8 * | addr, | ||
struct wpabuf * | msg | ||
) | [static] |
static void wps_er_process_wlanevent_probe_req | ( | struct wps_er_ap * | ap, |
const u8 * | addr, | ||
struct wpabuf * | msg | ||
) | [static] |
void wps_er_refresh | ( | struct wps_er * | er | ) |
static int wps_er_send_get_device_info | ( | struct wps_er_ap * | ap, |
void(*)(struct wps_er_ap *ap, struct wpabuf *m1) | m1_handler | ||
) | [static] |
static void wps_er_send_set_sel_reg | ( | struct wps_er_ap * | ap, |
struct wpabuf * | msg | ||
) | [static] |
void wps_er_set_sel_reg | ( | struct wps_er * | er, |
int | sel_reg, | ||
u16 | dev_passwd_id, | ||
u16 | sel_reg_config_methods | ||
) |
static void wps_er_soap_end | ( | struct wpabuf * | buf, |
const char * | name, | ||
char * | len_ptr, | ||
char * | body_ptr | ||
) | [static] |
static struct wpabuf* wps_er_soap_hdr | ( | const struct wpabuf * | msg, |
const char * | name, | ||
const char * | arg_name, | ||
const char * | path, | ||
const struct sockaddr_in * | dst, | ||
char ** | len_ptr, | ||
char ** | body_ptr | ||
) | [static, read] |
static void wps_er_sta_event | ( | struct wps_context * | wps, |
struct wps_er_sta * | sta, | ||
enum wps_event | event | ||
) | [static] |
static void wps_er_sta_free | ( | struct wps_er_sta * | sta | ) | [static] |
static struct wps_er_sta* wps_er_sta_get | ( | struct wps_er_ap * | ap, |
const u8 * | addr | ||
) | [static, read] |
static void wps_er_sta_process | ( | struct wps_er_sta * | sta, |
struct wpabuf * | msg, | ||
enum wsc_op_code | op_code | ||
) | [static] |
static void wps_er_sta_remove_all | ( | struct wps_er_ap * | ap | ) | [static] |
static void wps_er_sta_send_msg | ( | struct wps_er_sta * | sta, |
struct wpabuf * | msg | ||
) | [static] |
static void wps_er_sta_start | ( | struct wps_er_sta * | sta, |
struct wpabuf * | msg | ||
) | [static] |
static void wps_er_sta_timeout | ( | void * | eloop_data, |
void * | user_ctx | ||
) | [static] |
static void wps_er_subscribe | ( | struct wps_er_ap * | ap | ) | [static] |
const char* soap_postfix = "</s:Body>\n</s:Envelope>\n" [static] |
const char* soap_prefix = "<s:Body>\n" [static] |
const char* urn_wfawlanconfig = "urn:schemas-wifialliance-org:service:WFAWLANConfig:1" [static] |