Updated through tag hostap_2_5 from git://w1.fi/hostap.git
[mech_eap.git] / libeap / src / wps / wps_upnp_i.h
index b6e484a..f289fe6 100644 (file)
@@ -103,16 +103,26 @@ struct subscription {
 };
 
 
+struct upnp_wps_device_interface {
+       struct dl_list list;
+       struct upnp_wps_device_ctx *ctx; /* callback table */
+       struct wps_context *wps;
+       void *priv;
+
+       /* FIX: maintain separate structures for each UPnP peer */
+       struct upnp_wps_peer peer;
+};
+
 /*
- * Our instance data corresponding to one WiFi network interface
- * (multiple might share the same wired network interface!).
+ * Our instance data corresponding to the AP device. Note that there may be
+ * multiple wireless interfaces sharing the same UPnP device instance. Each
+ * such interface is stored in the list of struct upnp_wps_device_interface
+ * instances.
  *
  * This is known as an opaque struct declaration to users of the WPS UPnP code.
  */
 struct upnp_wps_device_sm {
-       struct upnp_wps_device_ctx *ctx; /* callback table */
-       struct wps_context *wps;
-       void *priv;
+       struct dl_list interfaces; /* struct upnp_wps_device_interface */
        char *root_dir;
        char *desc_url;
        int started; /* nonzero if we are active */
@@ -136,9 +146,6 @@ struct upnp_wps_device_sm {
        enum upnp_wps_wlanevent_type wlanevent_type;
        os_time_t last_event_sec;
        unsigned int num_events_in_sec;
-
-       /* FIX: maintain separate structures for each UPnP peer */
-       struct upnp_wps_peer peer;
 };
 
 /* wps_upnp.c */
@@ -151,7 +158,6 @@ void subscription_destroy(struct subscription *s);
 struct subscription * subscription_find(struct upnp_wps_device_sm *sm,
                                        const u8 uuid[UUID_LEN]);
 void subscr_addr_delete(struct subscr_addr *a);
-int send_wpabuf(int fd, struct wpabuf *buf);
 int get_netif_info(const char *net_if, unsigned *ip_addr, char **ip_addr_text,
                   u8 mac[ETH_ALEN]);
 
@@ -164,7 +170,7 @@ void ssdp_listener_stop(struct upnp_wps_device_sm *sm);
 int ssdp_listener_start(struct upnp_wps_device_sm *sm);
 int ssdp_listener_open(void);
 int add_ssdp_network(const char *net_if);
-int ssdp_open_multicast_sock(u32 ip_addr);
+int ssdp_open_multicast_sock(u32 ip_addr, const char *forced_ifname);
 int ssdp_open_multicast(struct upnp_wps_device_sm *sm);
 
 /* wps_upnp_web.c */
@@ -181,6 +187,7 @@ void event_send_stop_all(struct upnp_wps_device_sm *sm);
 int upnp_er_set_selected_registrar(struct wps_registrar *reg,
                                   struct subscription *s,
                                   const struct wpabuf *msg);
-void upnp_er_remove_notification(struct subscription *s);
+void upnp_er_remove_notification(struct wps_registrar *reg,
+                                struct subscription *s);
 
 #endif /* WPS_UPNP_I_H */