wpa_supplicant / hostapd 2.0

wps_er.h

Go to the documentation of this file.
00001 
00010 #ifndef WPS_ER_H
00011 #define WPS_ER_H
00012 
00013 #include "utils/list.h"
00014 
00015 struct wps_er_sta {
00016         struct dl_list list;
00017         struct wps_er_ap *ap;
00018         u8 addr[ETH_ALEN];
00019         u16 config_methods;
00020         u8 uuid[WPS_UUID_LEN];
00021         u8 pri_dev_type[8];
00022         u16 dev_passwd_id;
00023         int m1_received;
00024         char *manufacturer;
00025         char *model_name;
00026         char *model_number;
00027         char *serial_number;
00028         char *dev_name;
00029         struct wps_data *wps;
00030         struct http_client *http;
00031         struct wps_credential *cred;
00032 };
00033 
00034 struct wps_er_ap {
00035         struct dl_list list;
00036         struct wps_er *er;
00037         struct dl_list sta; /* list of STAs/Enrollees using this AP */
00038         struct in_addr addr;
00039         char *location;
00040         struct http_client *http;
00041         struct wps_data *wps;
00042 
00043         u8 uuid[WPS_UUID_LEN];
00044         u8 pri_dev_type[8];
00045         u8 wps_state;
00046         u8 mac_addr[ETH_ALEN];
00047         char *friendly_name;
00048         char *manufacturer;
00049         char *manufacturer_url;
00050         char *model_description;
00051         char *model_name;
00052         char *model_number;
00053         char *model_url;
00054         char *serial_number;
00055         char *udn;
00056         char *upc;
00057 
00058         char *scpd_url;
00059         char *control_url;
00060         char *event_sub_url;
00061 
00062         int subscribed;
00063         u8 sid[WPS_UUID_LEN];
00064         unsigned int id;
00065 
00066         struct wps_credential *ap_settings;
00067 
00068         void (*m1_handler)(struct wps_er_ap *ap, struct wpabuf *m1);
00069 };
00070 
00071 struct wps_er_ap_settings {
00072         struct dl_list list;
00073         u8 uuid[WPS_UUID_LEN];
00074         struct wps_credential ap_settings;
00075 };
00076 
00077 struct wps_er {
00078         struct wps_context *wps;
00079         char ifname[17];
00080         u8 mac_addr[ETH_ALEN]; /* mac addr of network i.f. we use */
00081         char *ip_addr_text; /* IP address of network i.f. we use */
00082         unsigned ip_addr; /* IP address of network i.f. we use (host order) */
00083         int multicast_sd;
00084         int ssdp_sd;
00085         struct dl_list ap;
00086         struct dl_list ap_unsubscribing;
00087         struct dl_list ap_settings;
00088         struct http_server *http_srv;
00089         int http_port;
00090         unsigned int next_ap_id;
00091         unsigned int event_id;
00092         int deinitializing;
00093         void (*deinit_done_cb)(void *ctx);
00094         void *deinit_done_ctx;
00095         struct in_addr filter_addr;
00096         int skip_set_sel_reg;
00097         const u8 *set_sel_reg_uuid_filter;
00098 };
00099 
00100 
00101 /* wps_er.c */
00102 void wps_er_ap_add(struct wps_er *er, const u8 *uuid, struct in_addr *addr,
00103                    const char *location, int max_age);
00104 void wps_er_ap_remove(struct wps_er *er, struct in_addr *addr);
00105 int wps_er_ap_cache_settings(struct wps_er *er, struct in_addr *addr);
00106 
00107 /* wps_er_ssdp.c */
00108 int wps_er_ssdp_init(struct wps_er *er);
00109 void wps_er_ssdp_deinit(struct wps_er *er);
00110 void wps_er_send_ssdp_msearch(struct wps_er *er);
00111 
00112 #endif /* WPS_ER_H */
00113 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines