$search

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
#define WEB_CONNECTION_MAX_READ   8000
#define WEB_CONNECTION_TIMEOUT_SEC   30

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
static const char * http_server_hdr
static const char * soap_error_postfix
static const char * soap_error_prefix
static const char * soap_postfix
static const char * soap_prefix
static const char * urn_wfawlanconfig
static const char * wps_device_xml_postfix
static const char * wps_device_xml_prefix
static const char wps_scpd_xml []

Define Documentation

#define MAX_WEB_CONNECTIONS   10

Definition at line 30 of file wps_upnp_web.c.

#define WEB_CONNECTION_MAX_READ   8000

Definition at line 29 of file wps_upnp_web.c.

#define WEB_CONNECTION_TIMEOUT_SEC   30

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 [static]
Initial value:
        "Connection: close\r\n"

Definition at line 37 of file wps_upnp_web.c.

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

Definition at line 35 of file wps_upnp_web.c.

const char* soap_error_postfix [static]
Initial value:
        "<errorDescription>Error</errorDescription>\n"
        "</UPnPError>\n"
        "</detail>\n"
        "</s:Fault>\n"

Definition at line 631 of file wps_upnp_web.c.

const char* soap_error_prefix [static]
Initial value:
        "<s:Fault>\n"
        "<faultcode>s:Client</faultcode>\n"
        "<faultstring>UPnPError</faultstring>\n"
        "<detail>\n"
        "<UPnPError xmlns=\"urn:schemas-upnp-org:control-1-0\">\n"

Definition at line 625 of file wps_upnp_web.c.

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

Definition at line 622 of file wps_upnp_web.c.

const char* soap_prefix [static]
Initial value:
        "<?xml version=\"1.0\"?>\n"
        "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" "
        "s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n"
        "<s:Body>\n"

Definition at line 617 of file wps_upnp_web.c.

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

Definition at line 33 of file wps_upnp_web.c.

const char* wps_device_xml_postfix [static]
Initial value:
        "<serviceList>\n"
        "<service>\n"
        "<serviceType>urn:schemas-wifialliance-org:service:WFAWLANConfig:1"
        "</serviceType>\n"
        "<serviceId>urn:wifialliance-org:serviceId:WFAWLANConfig1</serviceId>"
        "\n"
        "<SCPDURL>" UPNP_WPS_SCPD_XML_FILE "</SCPDURL>\n"
        "<controlURL>" UPNP_WPS_DEVICE_CONTROL_FILE "</controlURL>\n"
        "<eventSubURL>" UPNP_WPS_DEVICE_EVENT_FILE "</eventSubURL>\n"
        "</service>\n"
        "</serviceList>\n"
        "</device>\n"
        "</root>\n"

Definition at line 163 of file wps_upnp_web.c.

const char* wps_device_xml_prefix [static]
Initial value:
        "<?xml version=\"1.0\"?>\n"
        "<root xmlns=\"urn:schemas-upnp-org:device-1-0\">\n"
        "<specVersion>\n"
        "<major>1</major>\n"
        "<minor>0</minor>\n"
        "</specVersion>\n"
        "<device>\n"
        "<deviceType>urn:schemas-wifialliance-org:device:WFADevice:1"
        "</deviceType>\n"

Definition at line 152 of file wps_upnp_web.c.

const char wps_scpd_xml[] [static]

Definition at line 45 of file wps_upnp_web.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Fri Mar 1 16:00:54 2013