wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
wps_er.h
Go to the documentation of this file.
1 
5 #ifndef WPS_ER_H
6 #define WPS_ER_H
7 
8 #include "utils/list.h"
9 
10 struct wps_er_sta {
11  struct dl_list list;
12  struct wps_er_ap *ap;
13  u8 addr[ETH_ALEN];
14  u16 config_methods;
15  u8 uuid[WPS_UUID_LEN];
16  u8 pri_dev_type[8];
17  u16 dev_passwd_id;
18  int m1_received;
19  char *manufacturer;
20  char *model_name;
21  char *model_number;
22  char *serial_number;
23  char *dev_name;
24  struct wps_data *wps;
25  struct http_client *http;
26  struct wps_credential *cred;
27 };
28 
29 struct wps_er_ap {
30  struct dl_list list;
31  struct wps_er *er;
32  struct dl_list sta; /* list of STAs/Enrollees using this AP */
33  struct in_addr addr;
34  char *location;
35  struct http_client *http;
36  struct wps_data *wps;
37 
38  u8 uuid[WPS_UUID_LEN];
39  u8 pri_dev_type[8];
40  u8 wps_state;
41  u8 mac_addr[ETH_ALEN];
42  char *friendly_name;
43  char *manufacturer;
44  char *manufacturer_url;
45  char *model_description;
46  char *model_name;
47  char *model_number;
48  char *model_url;
49  char *serial_number;
50  char *udn;
51  char *upc;
52 
53  char *scpd_url;
54  char *control_url;
55  char *event_sub_url;
56 
57  int subscribed;
58  u8 sid[WPS_UUID_LEN];
59  unsigned int id;
60 
61  struct wps_credential *ap_settings;
62 
63  void (*m1_handler)(struct wps_er_ap *ap, struct wpabuf *m1);
64 };
65 
67  struct dl_list list;
68  u8 uuid[WPS_UUID_LEN];
69  struct wps_credential ap_settings;
70 };
71 
72 struct wps_er {
73  struct wps_context *wps;
74  char ifname[17];
75  int forced_ifname;
76  u8 mac_addr[ETH_ALEN]; /* mac addr of network i.f. we use */
77  char *ip_addr_text; /* IP address of network i.f. we use */
78  unsigned ip_addr; /* IP address of network i.f. we use (host order) */
79  int multicast_sd;
80  int ssdp_sd;
81  struct dl_list ap;
82  struct dl_list ap_unsubscribing;
83  struct dl_list ap_settings;
84  struct http_server *http_srv;
85  int http_port;
86  unsigned int next_ap_id;
87  unsigned int event_id;
88  int deinitializing;
89  void (*deinit_done_cb)(void *ctx);
90  void *deinit_done_ctx;
91  struct in_addr filter_addr;
92  int skip_set_sel_reg;
93  const u8 *set_sel_reg_uuid_filter;
94 };
95 
96 
97 /* wps_er.c */
98 void wps_er_ap_add(struct wps_er *er, const u8 *uuid, struct in_addr *addr,
99  const char *location, int max_age);
100 void wps_er_ap_remove(struct wps_er *er, struct in_addr *addr);
101 int wps_er_ap_cache_settings(struct wps_er *er, struct in_addr *addr);
102 
103 /* wps_er_ssdp.c */
104 int wps_er_ssdp_init(struct wps_er *er);
105 void wps_er_ssdp_deinit(struct wps_er *er);
106 void wps_er_send_ssdp_msearch(struct wps_er *er);
107 
108 #endif /* WPS_ER_H */
Definition: http_server.c:25
WPS registration protocol data.
Definition: wps_i.h:20
Definition: wps_er.h:66
struct wps_context * wps
Pointer to long term WPS context.
Definition: wps_i.h:25
Definition: wps_er.h:72
Definition: wpabuf.h:16
Definition: wps_er.h:29
Doubly-linked list.
Doubly-linked list.
Definition: list.h:12
Definition: wps_er.h:10
WPS Credential.
Definition: wps.h:44
Long term WPS context data.
Definition: wps.h:623
Definition: http_client.c:17