Classes | Defines | Enumerations | Functions
wps_upnp_i.h File Reference
#include "utils/list.h"
#include "http.h"
Include dependency graph for wps_upnp_i.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  advertisement_state_machine
struct  subscr_addr
struct  subscription
struct  upnp_wps_device_sm

Defines

#define MULTICAST_MAX_READ   1600 /* max bytes we'll read for UPD request */
#define UPNP_MULTICAST_ADDRESS   "239.255.255.250" /* for UPnP multicasting */
#define UPNP_MULTICAST_PORT   1900 /* UDP port to monitor for UPnP */
#define UPNP_SUBSCRIBE_SEC   (UPNP_SUBSCRIBE_SEC_MIN + 1)
#define UPNP_SUBSCRIBE_SEC_MIN   1800
#define UPNP_WPS_DEVICE_CONTROL_FILE   "wps_control"
#define UPNP_WPS_DEVICE_EVENT_FILE   "wps_event"
#define UPNP_WPS_DEVICE_XML_FILE   "wps_device.xml"
#define UPNP_WPS_SCPD_XML_FILE   "wps_scpd.xml"

Enumerations

enum  advertisement_type_enum { ADVERTISE_UP = 0, ADVERTISE_DOWN = 1, MSEARCH_REPLY = 2 }

Functions

int add_ssdp_network (const char *net_if)
int advertisement_state_machine_start (struct upnp_wps_device_sm *sm)
void advertisement_state_machine_stop (struct upnp_wps_device_sm *sm, int send_byebye)
int event_add (struct subscription *s, const struct wpabuf *data)
void event_delete_all (struct subscription *s)
void event_send_all_later (struct upnp_wps_device_sm *sm)
void event_send_stop_all (struct upnp_wps_device_sm *sm)
void format_date (struct wpabuf *buf)
int get_netif_info (const char *net_if, unsigned *ip_addr, char **ip_addr_text, u8 mac[ETH_ALEN])
void msearchreply_state_machine_stop (struct advertisement_state_machine *a)
int send_wpabuf (int fd, struct wpabuf *buf)
int ssdp_listener_open (void)
int ssdp_listener_start (struct upnp_wps_device_sm *sm)
void ssdp_listener_stop (struct upnp_wps_device_sm *sm)
int ssdp_open_multicast (struct upnp_wps_device_sm *sm)
int ssdp_open_multicast_sock (u32 ip_addr)
void subscription_destroy (struct subscription *s)
struct subscriptionsubscription_find (struct upnp_wps_device_sm *sm, const u8 uuid[UUID_LEN])
struct subscriptionsubscription_renew (struct upnp_wps_device_sm *sm, const u8 uuid[UUID_LEN])
struct subscriptionsubscription_start (struct upnp_wps_device_sm *sm, const char *callback_urls)
void upnp_er_remove_notification (struct subscription *s)
int upnp_er_set_selected_registrar (struct wps_registrar *reg, struct subscription *s, const struct wpabuf *msg)
int web_listener_start (struct upnp_wps_device_sm *sm)
void web_listener_stop (struct upnp_wps_device_sm *sm)

Define Documentation

#define MULTICAST_MAX_READ   1600 /* max bytes we'll read for UPD request */

Definition at line 31 of file wps_upnp_i.h.

#define UPNP_MULTICAST_ADDRESS   "239.255.255.250" /* for UPnP multicasting */

Definition at line 17 of file wps_upnp_i.h.

#define UPNP_MULTICAST_PORT   1900 /* UDP port to monitor for UPnP */

Definition at line 18 of file wps_upnp_i.h.

Definition at line 23 of file wps_upnp_i.h.

#define UPNP_SUBSCRIBE_SEC_MIN   1800

Definition at line 21 of file wps_upnp_i.h.

#define UPNP_WPS_DEVICE_CONTROL_FILE   "wps_control"

Definition at line 28 of file wps_upnp_i.h.

#define UPNP_WPS_DEVICE_EVENT_FILE   "wps_event"

Definition at line 29 of file wps_upnp_i.h.

#define UPNP_WPS_DEVICE_XML_FILE   "wps_device.xml"

Definition at line 26 of file wps_upnp_i.h.

#define UPNP_WPS_SCPD_XML_FILE   "wps_scpd.xml"

Definition at line 27 of file wps_upnp_i.h.


Enumeration Type Documentation

Enumerator:
ADVERTISE_UP 
ADVERTISE_DOWN 
MSEARCH_REPLY 

Definition at line 38 of file wps_upnp_i.h.


Function Documentation

int add_ssdp_network ( const char *  net_if)

add_ssdp_network - Add routing entry for SSDP : Selected network interface name Returns: 0 on success, -1 on failure

This function assures that the multicast address will be properly handled by Linux networking code (by a modification to routing tables). This must be done per network interface. It really only needs to be done once after booting up, but it does not hurt to call this more frequently "to be safe".

Definition at line 810 of file wps_upnp_ssdp.c.

advertisement_state_machine_start - Start SSDP advertisements : WPS UPnP state machine from upnp_wps_device_init() Returns: 0 on success, -1 on failure

Definition at line 346 of file wps_upnp_ssdp.c.

void advertisement_state_machine_stop ( struct upnp_wps_device_sm sm,
int  send_byebye 
)

advertisement_state_machine_stop - Stop SSDP advertisements : WPS UPnP state machine from upnp_wps_device_init() : Send byebye advertisement messages immediately

Definition at line 234 of file wps_upnp_ssdp.c.

int event_add ( struct subscription s,
const struct wpabuf data 
)

event_add - Add a new event to a queue : Subscription : Event data (is copied; caller retains ownership) Returns: 0 on success, 1 on error

Definition at line 331 of file wps_upnp_event.c.

void event_delete_all ( struct subscription s)

Definition at line 96 of file wps_upnp_event.c.

Definition at line 302 of file wps_upnp_event.c.

void event_send_stop_all ( struct upnp_wps_device_sm sm)

Definition at line 317 of file wps_upnp_event.c.

void format_date ( struct wpabuf buf)

Definition at line 214 of file wps_upnp.c.

int get_netif_info ( const char *  net_if,
unsigned *  ip_addr,
char **  ip_addr_text,
u8  mac[ETH_ALEN] 
)

get_netif_info - Get hw and IP addresses for network device : Selected network interface name : Buffer for returning IP address in network byte order : Buffer for returning a pointer to allocated IP address text : Buffer for returning MAC address Returns: 0 on success, -1 on failure

Definition at line 852 of file wps_upnp.c.

msearchreply_state_machine_stop - Stop M-SEARCH reply state machine : Selected advertisement/reply state

Definition at line 381 of file wps_upnp_ssdp.c.

int send_wpabuf ( int  fd,
struct wpabuf buf 
)

Definition at line 427 of file wps_upnp.c.

int ssdp_listener_open ( void  )

Definition at line 733 of file wps_upnp_ssdp.c.

ssdp_listener_start - Set up for receiving discovery (UDP) packets : WPS UPnP state machine from upnp_wps_device_init() Returns: 0 on success, -1 on failure

The SSDP listener is stopped by calling ssdp_listener_stop().

Definition at line 781 of file wps_upnp_ssdp.c.

void ssdp_listener_stop ( struct upnp_wps_device_sm sm)

ssdp_listener_stop - Stop SSDP listered : WPS UPnP state machine from upnp_wps_device_init()

This function stops the SSDP listener that was started by calling ssdp_listener_start().

Definition at line 674 of file wps_upnp_ssdp.c.

ssdp_open_multicast - Open socket for sending multicast SSDP messages : WPS UPnP state machine from upnp_wps_device_init() Returns: 0 on success, -1 on failure

Definition at line 918 of file wps_upnp_ssdp.c.

int ssdp_open_multicast_sock ( u32  ip_addr)

Definition at line 861 of file wps_upnp_ssdp.c.

void subscription_destroy ( struct subscription s)

Definition at line 521 of file wps_upnp.c.

struct subscription* subscription_find ( struct upnp_wps_device_sm sm,
const u8  uuid[UUID_LEN] 
) [read]

Definition at line 549 of file wps_upnp.c.

struct subscription* subscription_renew ( struct upnp_wps_device_sm sm,
const u8  uuid[UUID_LEN] 
) [read]

Definition at line 716 of file wps_upnp.c.

struct subscription* subscription_start ( struct upnp_wps_device_sm sm,
const char *  callback_urls 
) [read]

subscription_start - Remember a UPnP control point to send events to. : WPS UPnP state machine from upnp_wps_device_init() : Callback URLs Returns: NULL on error, or pointer to new subscription structure.

Definition at line 665 of file wps_upnp.c.

Definition at line 74 of file wps_upnp_ap.c.

int upnp_er_set_selected_registrar ( struct wps_registrar reg,
struct subscription s,
const struct wpabuf msg 
)

Definition at line 34 of file wps_upnp_ap.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.



wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:26:44