16 #define UPNP_MULTICAST_ADDRESS "239.255.255.250"
17 #define UPNP_MULTICAST_PORT 1900
20 #define UPNP_SUBSCRIBE_SEC_MIN 1800
22 #define UPNP_SUBSCRIBE_SEC (UPNP_SUBSCRIBE_SEC_MIN + 1)
25 #define UPNP_WPS_DEVICE_XML_FILE "wps_device.xml"
26 #define UPNP_WPS_SCPD_XML_FILE "wps_scpd.xml"
27 #define UPNP_WPS_DEVICE_CONTROL_FILE "wps_control"
28 #define UPNP_WPS_DEVICE_EVENT_FILE "wps_event"
30 #define MULTICAST_MAX_READ 1600
37 enum advertisement_type_enum {
52 enum advertisement_type_enum type;
55 struct sockaddr_in client;
66 char *domain_and_port;
68 struct sockaddr_in saddr;
69 unsigned num_failures;
82 unsigned next_subscriber_sequence;
94 int last_event_failed;
97 u8 selected_registrar;
100 u8 authorized_macs[WPS_MAX_AUTHORIZED_MACS][ETH_ALEN];
128 u8 mac_addr[ETH_ALEN];
133 int ssdp_sd_registered;
134 unsigned advertise_count;
136 struct dl_list msearch_replies;
141 int event_send_all_queued;
145 enum upnp_wps_wlanevent_type wlanevent_type;
146 os_time_t last_event_sec;
147 unsigned int num_events_in_sec;
151 void format_date(
struct wpabuf *buf);
153 const char *callback_urls);
155 const u8 uuid[UUID_LEN]);
158 const u8 uuid[UUID_LEN]);
160 int get_netif_info(
const char *net_if,
unsigned *ip_addr,
char **ip_addr_text,
170 int ssdp_listener_open(
void);
172 int ssdp_open_multicast_sock(u32 ip_addr,
const char *forced_ifname);
186 int upnp_er_set_selected_registrar(
struct wps_registrar *reg,
188 const struct wpabuf *msg);
Definition: http_server.c:25
Definition: wps_upnp.h:26
void ssdp_listener_stop(struct upnp_wps_device_sm *sm)
Stop SSDP listered.
Definition: wps_upnp_ssdp.c:673
int add_ssdp_network(const char *net_if)
Add routing entry for SSDP.
Definition: wps_upnp_ssdp.c:806
Definition: wps_registrar.c:137
int advertisement_state_machine_start(struct upnp_wps_device_sm *sm)
Start SSDP advertisements.
Definition: wps_upnp_ssdp.c:340
Definition: wps_upnp_i.h:123
HTTP for WPS Copyright (c) 2006-2007 Sony Corporation Copyright (c) 2008-2009 Atheros Communications ...
Definition: wps_upnp_i.h:105
int get_netif_info(const char *net_if, unsigned *ip_addr, char **ip_addr_text, u8 mac[ETH_ALEN])
Get hw and IP addresses for network device.
Definition: wps_upnp.c:894
Doubly-linked list.
Definition: list.h:12
int ssdp_open_multicast(struct upnp_wps_device_sm *sm)
Open socket for sending multicast SSDP messages.
Definition: wps_upnp_ssdp.c:941
struct subscription * subscription_start(struct upnp_wps_device_sm *sm, const char *callback_urls)
Remember a UPnP control point to send events to.
Definition: wps_upnp.c:691
Definition: wps_upnp_i.h:50
void msearchreply_state_machine_stop(struct advertisement_state_machine *a)
Stop M-SEARCH reply state machine.
Definition: wps_upnp_ssdp.c:375
Definition: wps_upnp.h:17
int ssdp_listener_start(struct upnp_wps_device_sm *sm)
Set up for receiving discovery (UDP) packets.
Definition: wps_upnp_ssdp.c:777
void advertisement_state_machine_stop(struct upnp_wps_device_sm *sm, int send_byebye)
Stop SSDP advertisements.
Definition: wps_upnp_ssdp.c:227
Definition: wps_upnp_i.h:78
Definition: wps_upnp_event.c:47
Definition: wps_upnp_i.h:64
int event_add(struct subscription *s, const struct wpabuf *data, int probereq)
Add a new event to a queue.
Definition: wps_upnp_event.c:372
Long term WPS context data.
Definition: wps.h:623