Defines | Functions | Variables
wps_upnp_web.c File Reference
#include "includes.h"
#include "common.h"
#include "base64.h"
#include "uuid.h"
#include "httpread.h"
#include "http_server.h"
#include "wps_i.h"
#include "wps_upnp.h"
#include "wps_upnp_i.h"
#include "upnp_xml.h"
Include dependency graph for wps_upnp_web.c:

Go to the source code of this file.

Defines

#define MAX_WEB_CONNECTIONS   10 /* max simultaneous web connects */
#define WEB_CONNECTION_MAX_READ   8000 /* Max we'll read for TCP request */
#define WEB_CONNECTION_TIMEOUT_SEC   30 /* Drop web connection after t.o. */

Functions

static struct subscriptionfind_er (struct upnp_wps_device_sm *sm, struct sockaddr_in *cli)
static int find_er_addr (struct subscription *s, struct sockaddr_in *cli)
static void format_wps_device_xml (struct upnp_wps_device_sm *sm, struct wpabuf *buf)
static void http_put_date (struct wpabuf *buf)
static void http_put_empty (struct wpabuf *buf, enum http_reply_code code)
static void http_put_reply_code (struct wpabuf *buf, enum http_reply_code code)
static void web_connection_check_data (void *ctx, struct http_request *req)
static void web_connection_parse_get (struct upnp_wps_device_sm *sm, struct http_request *hreq, char *filename)
static void web_connection_parse_post (struct upnp_wps_device_sm *sm, struct sockaddr_in *cli, struct http_request *req, const char *filename)
static void web_connection_parse_subscribe (struct upnp_wps_device_sm *sm, struct http_request *req, const char *filename)
static void web_connection_parse_unsubscribe (struct upnp_wps_device_sm *sm, struct http_request *req, const char *filename)
static void web_connection_send_reply (struct http_request *req, enum http_reply_code ret, const char *action, int action_len, const struct wpabuf *reply, const char *replyname)
static void web_connection_unimplemented (struct http_request *req)
static const char * web_get_action (struct http_request *req, size_t *action_len)
int web_listener_start (struct upnp_wps_device_sm *sm)
void web_listener_stop (struct upnp_wps_device_sm *sm)
static enum http_reply_code web_process_get_device_info (struct upnp_wps_device_sm *sm, struct wpabuf **reply, const char **replyname)
static enum http_reply_code web_process_put_message (struct upnp_wps_device_sm *sm, char *data, struct wpabuf **reply, const char **replyname)
static enum http_reply_code web_process_put_wlan_response (struct upnp_wps_device_sm *sm, char *data, struct wpabuf **reply, const char **replyname)
static enum http_reply_code web_process_set_selected_registrar (struct upnp_wps_device_sm *sm, struct sockaddr_in *cli, char *data, struct wpabuf **reply, const char **replyname)

Variables

static const char * http_connection_close = "Connection: close\r\n"
static const char * http_server_hdr = "Server: unspecified, UPnP/1.0, unspecified\r\n"
static const char * soap_error_postfix = "</s:Fault>\n"
static const char * soap_error_prefix = "<UPnPError xmlns=\"urn:schemas-upnp-org:control-1-0\">\n"
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 const char * wps_device_xml_postfix = "</root>\n"
static const char * wps_device_xml_prefix = "</deviceType>\n"
static const char wps_scpd_xml [] = "</scpd>\n"

Define Documentation

#define MAX_WEB_CONNECTIONS   10 /* max simultaneous web connects */

Definition at line 30 of file wps_upnp_web.c.

#define WEB_CONNECTION_MAX_READ   8000 /* Max we'll read for TCP request */

Definition at line 29 of file wps_upnp_web.c.

#define WEB_CONNECTION_TIMEOUT_SEC   30 /* Drop web connection after t.o. */

Definition at line 28 of file wps_upnp_web.c.


Function Documentation

static struct subscription* find_er ( struct upnp_wps_device_sm sm,
struct sockaddr_in *  cli 
) [static, read]

Definition at line 575 of file wps_upnp_web.c.

static int find_er_addr ( struct subscription s,
struct sockaddr_in *  cli 
) [static]

Definition at line 563 of file wps_upnp_web.c.

static void format_wps_device_xml ( struct upnp_wps_device_sm sm,
struct wpabuf buf 
) [static]

Definition at line 182 of file wps_upnp_web.c.

static void http_put_date ( struct wpabuf buf) [static]

Definition at line 265 of file wps_upnp_web.c.

static void http_put_empty ( struct wpabuf buf,
enum http_reply_code  code 
) [static]

Definition at line 273 of file wps_upnp_web.c.

static void http_put_reply_code ( struct wpabuf buf,
enum http_reply_code  code 
) [static]

Definition at line 241 of file wps_upnp_web.c.

static void web_connection_check_data ( void *  ctx,
struct http_request req 
) [static]

Definition at line 1195 of file wps_upnp_web.c.

static void web_connection_parse_get ( struct upnp_wps_device_sm sm,
struct http_request hreq,
char *  filename 
) [static]

Definition at line 301 of file wps_upnp_web.c.

static void web_connection_parse_post ( struct upnp_wps_device_sm sm,
struct sockaddr_in *  cli,
struct http_request req,
const char *  filename 
) [static]

Definition at line 800 of file wps_upnp_web.c.

static void web_connection_parse_subscribe ( struct upnp_wps_device_sm sm,
struct http_request req,
const char *  filename 
) [static]

Definition at line 865 of file wps_upnp_web.c.

static void web_connection_parse_unsubscribe ( struct upnp_wps_device_sm sm,
struct http_request req,
const char *  filename 
) [static]

Definition at line 1076 of file wps_upnp_web.c.

static void web_connection_send_reply ( struct http_request req,
enum http_reply_code  ret,
const char *  action,
int  action_len,
const struct wpabuf reply,
const char *  replyname 
) [static]

Definition at line 637 of file wps_upnp_web.c.

static void web_connection_unimplemented ( struct http_request req) [static]

Definition at line 1179 of file wps_upnp_web.c.

static const char* web_get_action ( struct http_request req,
size_t *  action_len 
) [static]

Definition at line 743 of file wps_upnp_web.c.

int web_listener_start ( struct upnp_wps_device_sm sm)

Definition at line 1254 of file wps_upnp_web.c.

void web_listener_stop ( struct upnp_wps_device_sm sm)

Definition at line 1247 of file wps_upnp_web.c.

static enum http_reply_code web_process_get_device_info ( struct upnp_wps_device_sm sm,
struct wpabuf **  reply,
const char **  replyname 
) [static]

Definition at line 406 of file wps_upnp_web.c.

static enum http_reply_code web_process_put_message ( struct upnp_wps_device_sm sm,
char *  data,
struct wpabuf **  reply,
const char **  replyname 
) [static]

Definition at line 450 of file wps_upnp_web.c.

static enum http_reply_code web_process_put_wlan_response ( struct upnp_wps_device_sm sm,
char *  data,
struct wpabuf **  reply,
const char **  replyname 
) [static]

Definition at line 482 of file wps_upnp_web.c.

static enum http_reply_code web_process_set_selected_registrar ( struct upnp_wps_device_sm sm,
struct sockaddr_in *  cli,
char *  data,
struct wpabuf **  reply,
const char **  replyname 
) [static]

Definition at line 587 of file wps_upnp_web.c.


Variable Documentation

const char* http_connection_close = "Connection: close\r\n" [static]

Definition at line 37 of file wps_upnp_web.c.

const char* http_server_hdr = "Server: unspecified, UPnP/1.0, unspecified\r\n" [static]

Definition at line 35 of file wps_upnp_web.c.

const char* soap_error_postfix = "</s:Fault>\n" [static]

Definition at line 631 of file wps_upnp_web.c.

const char* soap_error_prefix = "<UPnPError xmlns=\"urn:schemas-upnp-org:control-1-0\">\n" [static]

Definition at line 625 of file wps_upnp_web.c.

const char* soap_postfix = "</s:Body>\n</s:Envelope>\n" [static]

Definition at line 622 of file wps_upnp_web.c.

const char* soap_prefix = "<s:Body>\n" [static]

Definition at line 617 of file wps_upnp_web.c.

const char* urn_wfawlanconfig = "urn:schemas-wifialliance-org:service:WFAWLANConfig:1" [static]

Definition at line 33 of file wps_upnp_web.c.

const char* wps_device_xml_postfix = "</root>\n" [static]

Definition at line 163 of file wps_upnp_web.c.

const char* wps_device_xml_prefix = "</deviceType>\n" [static]

Definition at line 152 of file wps_upnp_web.c.

const char wps_scpd_xml[] = "</scpd>\n" [static]

Definition at line 45 of file wps_upnp_web.c.



wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:25:19