hostapd
wps.h
1 /*
2  * Wi-Fi Protected Setup
3  * Copyright (c) 2007-2016, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef WPS_H
10 #define WPS_H
11 
12 #include "common/ieee802_11_defs.h"
13 #include "wps_defs.h"
14 
18 enum wsc_op_code {
19  WSC_UPnP = 0 /* No OP Code in UPnP transport */,
20  WSC_Start = 0x01,
21  WSC_ACK = 0x02,
22  WSC_NACK = 0x03,
23  WSC_MSG = 0x04,
24  WSC_Done = 0x05,
25  WSC_FRAG_ACK = 0x06
26 };
27 
28 struct wps_registrar;
29 struct upnp_wps_device_sm;
30 struct wps_er;
31 struct wps_parse_attr;
32 
48  u8 ssid[SSID_MAX_LEN];
49  size_t ssid_len;
50  u16 auth_type;
51  u16 encr_type;
52  u8 key_idx;
53  u8 key[64];
54  size_t key_len;
55  u8 mac_addr[ETH_ALEN];
56  const u8 *cred_attr;
57  size_t cred_attr_len;
58 };
59 
60 #define WPS_DEV_TYPE_LEN 8
61 #define WPS_DEV_TYPE_BUFSIZE 21
62 #define WPS_SEC_DEV_TYPE_MAX_LEN 128
63 /* maximum number of advertised WPS vendor extension attributes */
64 #define MAX_WPS_VENDOR_EXTENSIONS 10
65 /* maximum size of WPS Vendor extension attribute */
66 #define WPS_MAX_VENDOR_EXT_LEN 1024
67 /* maximum number of parsed WPS vendor extension attributes */
68 #define MAX_WPS_PARSE_VENDOR_EXT 10
69 
86  u8 mac_addr[ETH_ALEN];
87  char *device_name;
88  char *manufacturer;
89  char *model_name;
90  char *model_number;
91  char *serial_number;
92  u8 pri_dev_type[WPS_DEV_TYPE_LEN];
93 #define WPS_SEC_DEVICE_TYPES 5
94  u8 sec_dev_type[WPS_SEC_DEVICE_TYPES][WPS_DEV_TYPE_LEN];
95  u8 num_sec_dev_types;
96  u32 os_version;
97  u8 rf_bands;
98  u16 config_methods;
99  struct wpabuf *vendor_ext_m1;
100  struct wpabuf *vendor_ext[MAX_WPS_VENDOR_EXTENSIONS];
101 
102  int p2p;
103 };
104 
108 struct wps_config {
112  struct wps_context *wps;
113 
118 
122  const u8 *pin;
123 
127  size_t pin_len;
128 
132  int pbc;
133 
137  const struct wpabuf *assoc_wps_ie;
138 
148 
152  const u8 *peer_addr;
153 
162 
167 
176  const u8 *p2p_dev_addr;
177 
185 
189  const u8 *peer_pubkey_hash;
190 };
191 
192 struct wps_data * wps_init(const struct wps_config *cfg);
193 
194 void wps_deinit(struct wps_data *data);
195 
199 enum wps_process_res {
203  WPS_DONE,
204 
208  WPS_CONTINUE,
209 
213  WPS_FAILURE,
214 
219  WPS_PENDING
220 };
221 enum wps_process_res wps_process_msg(struct wps_data *wps,
222  enum wsc_op_code op_code,
223  const struct wpabuf *msg);
224 
225 struct wpabuf * wps_get_msg(struct wps_data *wps, enum wsc_op_code *op_code);
226 
227 int wps_is_selected_pbc_registrar(const struct wpabuf *msg);
228 int wps_is_selected_pin_registrar(const struct wpabuf *msg);
229 int wps_ap_priority_compar(const struct wpabuf *wps_a,
230  const struct wpabuf *wps_b);
231 int wps_is_addr_authorized(const struct wpabuf *msg, const u8 *addr,
232  int ver1_compat);
233 const u8 * wps_get_uuid_e(const struct wpabuf *msg);
234 int wps_is_20(const struct wpabuf *msg);
235 
236 struct wpabuf * wps_build_assoc_req_ie(enum wps_request_type req_type);
237 struct wpabuf * wps_build_assoc_resp_ie(void);
238 struct wpabuf * wps_build_probe_req_ie(u16 pw_id, struct wps_device_data *dev,
239  const u8 *uuid,
240  enum wps_request_type req_type,
241  unsigned int num_req_dev_types,
242  const u8 *req_dev_types);
243 
244 
260  int (*new_psk_cb)(void *ctx, const u8 *mac_addr, const u8 *p2p_dev_addr,
261  const u8 *psk, size_t psk_len);
262 
274  int (*set_ie_cb)(void *ctx, struct wpabuf *beacon_ie,
275  struct wpabuf *probe_resp_ie);
276 
287  void (*pin_needed_cb)(void *ctx, const u8 *uuid_e,
288  const struct wps_device_data *dev);
289 
301  void (*reg_success_cb)(void *ctx, const u8 *mac_addr,
302  const u8 *uuid_e, const u8 *dev_pw,
303  size_t dev_pw_len);
304 
320  void (*set_sel_reg_cb)(void *ctx, int sel_reg, u16 dev_passwd_id,
321  u16 sel_reg_config_methods);
322 
334  void (*enrollee_seen_cb)(void *ctx, const u8 *addr, const u8 *uuid_e,
335  const u8 *pri_dev_type, u16 config_methods,
336  u16 dev_password_id, u8 request_type,
337  const char *dev_name);
338 
342  void *cb_ctx;
343 
353 
362  const u8 *extra_cred;
363 
368 
380 
385 
389  int dualband;
390 
398 };
399 
400 
404 enum wps_event {
408  WPS_EV_M2D,
409 
413  WPS_EV_FAIL,
414 
418  WPS_EV_SUCCESS,
419 
423  WPS_EV_PWD_AUTH_FAIL,
424 
428  WPS_EV_PBC_OVERLAP,
429 
433  WPS_EV_PBC_TIMEOUT,
434 
438  WPS_EV_PBC_ACTIVE,
439 
443  WPS_EV_PBC_DISABLE,
444 
448  WPS_EV_ER_AP_ADD,
449 
453  WPS_EV_ER_AP_REMOVE,
454 
458  WPS_EV_ER_ENROLLEE_ADD,
459 
463  WPS_EV_ER_ENROLLEE_REMOVE,
464 
468  WPS_EV_ER_AP_SETTINGS,
469 
473  WPS_EV_ER_SET_SELECTED_REGISTRAR,
474 
478  WPS_EV_AP_PIN_SUCCESS
479 };
480 
488  struct wps_event_m2d {
489  u16 config_methods;
490  const u8 *manufacturer;
491  size_t manufacturer_len;
492  const u8 *model_name;
493  size_t model_name_len;
494  const u8 *model_number;
495  size_t model_number_len;
496  const u8 *serial_number;
497  size_t serial_number_len;
498  const u8 *dev_name;
499  size_t dev_name_len;
500  const u8 *primary_dev_type; /* 8 octets */
501  u16 config_error;
502  u16 dev_password_id;
503  } m2d;
504 
509  struct wps_event_fail {
510  int msg;
511  u16 config_error;
512  u16 error_indication;
513  u8 peer_macaddr[ETH_ALEN];
514  } fail;
515 
517  u8 peer_macaddr[ETH_ALEN];
518  } success;
519 
521  int enrollee;
522  int part;
523  u8 peer_macaddr[ETH_ALEN];
524  } pwd_auth_fail;
525 
527  const u8 *uuid;
528  const u8 *mac_addr;
529  const char *friendly_name;
530  const char *manufacturer;
531  const char *manufacturer_url;
532  const char *model_description;
533  const char *model_name;
534  const char *model_number;
535  const char *model_url;
536  const char *serial_number;
537  const char *upc;
538  const u8 *pri_dev_type;
539  u8 wps_state;
540  } ap;
541 
543  const u8 *uuid;
544  const u8 *mac_addr;
545  int m1_received;
546  u16 config_methods;
547  u16 dev_passwd_id;
548  const u8 *pri_dev_type;
549  const char *dev_name;
550  const char *manufacturer;
551  const char *model_name;
552  const char *model_number;
553  const char *serial_number;
554  } enrollee;
555 
557  const u8 *uuid;
558  const struct wps_credential *cred;
559  } ap_settings;
560 
562  const u8 *uuid;
563  int sel_reg;
564  u16 dev_passwd_id;
565  u16 sel_reg_config_methods;
566  enum {
567  WPS_ER_SET_SEL_REG_START,
568  WPS_ER_SET_SEL_REG_DONE,
569  WPS_ER_SET_SEL_REG_FAILED
570  } state;
571  } set_sel_reg;
572 };
573 
582  struct upnp_pending_message *next;
583  u8 addr[ETH_ALEN];
584  struct wpabuf *msg;
585  enum wps_msg_type type;
586 };
587 
594 struct wps_context {
598  int ap;
599 
604 
608  enum wps_state wps_state;
609 
614 
618  u8 uuid[16];
619 
627  u8 ssid[SSID_MAX_LEN];
628 
632  size_t ssid_len;
633 
637  struct wps_device_data dev;
638 
642  void *dh_ctx;
643 
648 
652  struct wpabuf *dh_pubkey;
653 
660 
665 
670 
675 
680 
685 
690 
707 
712 
719  u8 psk[32];
720 
724  int psk_set;
725 
733 
738 
743 
748 
753 
757  char *model_url;
758 
762  char *upc;
763 
770  int (*cred_cb)(void *ctx, const struct wps_credential *cred);
771 
778  void (*event_cb)(void *ctx, enum wps_event event,
779  union wps_event_data *data);
780 
786  int (*rf_band_cb)(void *ctx);
787 
791  void *cb_ctx;
792 
793  struct upnp_wps_device_sm *wps_upnp;
794 
795  /* Pending messages from UPnP PutWLANResponse */
796  struct upnp_pending_message *upnp_msgs;
797 
798  u16 ap_nfc_dev_pw_id;
799  struct wpabuf *ap_nfc_dh_pubkey;
800  struct wpabuf *ap_nfc_dh_privkey;
801  struct wpabuf *ap_nfc_dev_pw;
802 };
803 
804 struct wps_registrar *
805 wps_registrar_init(struct wps_context *wps,
806  const struct wps_registrar_config *cfg);
807 void wps_registrar_deinit(struct wps_registrar *reg);
808 int wps_registrar_add_pin(struct wps_registrar *reg, const u8 *addr,
809  const u8 *uuid, const u8 *pin, size_t pin_len,
810  int timeout);
811 int wps_registrar_invalidate_pin(struct wps_registrar *reg, const u8 *uuid);
812 int wps_registrar_wps_cancel(struct wps_registrar *reg);
813 int wps_registrar_unlock_pin(struct wps_registrar *reg, const u8 *uuid);
814 int wps_registrar_button_pushed(struct wps_registrar *reg,
815  const u8 *p2p_dev_addr);
816 void wps_registrar_complete(struct wps_registrar *registrar, const u8 *uuid_e,
817  const u8 *dev_pw, size_t dev_pw_len);
818 void wps_registrar_probe_req_rx(struct wps_registrar *reg, const u8 *addr,
819  const struct wpabuf *wps_data,
820  int p2p_wildcard);
821 int wps_registrar_update_ie(struct wps_registrar *reg);
822 int wps_registrar_get_info(struct wps_registrar *reg, const u8 *addr,
823  char *buf, size_t buflen);
824 int wps_registrar_config_ap(struct wps_registrar *reg,
825  struct wps_credential *cred);
826 int wps_registrar_add_nfc_pw_token(struct wps_registrar *reg,
827  const u8 *pubkey_hash, u16 pw_id,
828  const u8 *dev_pw, size_t dev_pw_len,
829  int pk_hash_provided_oob);
830 int wps_registrar_add_nfc_password_token(struct wps_registrar *reg,
831  const u8 *oob_dev_pw,
832  size_t oob_dev_pw_len);
833 void wps_registrar_flush(struct wps_registrar *reg);
834 
835 int wps_build_credential_wrap(struct wpabuf *msg,
836  const struct wps_credential *cred);
837 
838 unsigned int wps_pin_checksum(unsigned int pin);
839 unsigned int wps_pin_valid(unsigned int pin);
840 int wps_generate_pin(unsigned int *pin);
841 int wps_pin_str_valid(const char *pin);
842 void wps_free_pending_msgs(struct upnp_pending_message *msgs);
843 
844 struct wpabuf * wps_get_oob_cred(struct wps_context *wps, int rf_band,
845  int channel);
846 int wps_oob_use_cred(struct wps_context *wps, struct wps_parse_attr *attr);
847 int wps_attr_text(struct wpabuf *data, char *buf, char *end);
848 const char * wps_ei_str(enum wps_error_indication ei);
849 
850 struct wps_er * wps_er_init(struct wps_context *wps, const char *ifname,
851  const char *filter);
852 void wps_er_refresh(struct wps_er *er);
853 void wps_er_deinit(struct wps_er *er, void (*cb)(void *ctx), void *ctx);
854 void wps_er_set_sel_reg(struct wps_er *er, int sel_reg, u16 dev_passwd_id,
855  u16 sel_reg_config_methods);
856 int wps_er_pbc(struct wps_er *er, const u8 *uuid, const u8 *addr);
857 const u8 * wps_er_get_sta_uuid(struct wps_er *er, const u8 *addr);
858 int wps_er_learn(struct wps_er *er, const u8 *uuid, const u8 *addr,
859  const u8 *pin, size_t pin_len);
860 int wps_er_set_config(struct wps_er *er, const u8 *uuid, const u8 *addr,
861  const struct wps_credential *cred);
862 int wps_er_config(struct wps_er *er, const u8 *uuid, const u8 *addr,
863  const u8 *pin, size_t pin_len,
864  const struct wps_credential *cred);
865 struct wpabuf * wps_er_config_token_from_cred(struct wps_context *wps,
866  struct wps_credential *cred);
867 struct wpabuf * wps_er_nfc_config_token(struct wps_er *er, const u8 *uuid,
868  const u8 *addr);
869 struct wpabuf * wps_er_nfc_handover_sel(struct wps_er *er,
870  struct wps_context *wps, const u8 *uuid,
871  const u8 *addr, struct wpabuf *pubkey);
872 
873 int wps_dev_type_str2bin(const char *str, u8 dev_type[WPS_DEV_TYPE_LEN]);
874 char * wps_dev_type_bin2str(const u8 dev_type[WPS_DEV_TYPE_LEN], char *buf,
875  size_t buf_len);
876 void uuid_gen_mac_addr(const u8 *mac_addr, u8 *uuid);
877 u16 wps_config_methods_str2bin(const char *str);
878 struct wpabuf * wps_build_nfc_pw_token(u16 dev_pw_id,
879  const struct wpabuf *pubkey,
880  const struct wpabuf *dev_pw);
881 struct wpabuf * wps_nfc_token_build(int ndef, int id, struct wpabuf *pubkey,
882  struct wpabuf *dev_pw);
883 int wps_nfc_gen_dh(struct wpabuf **pubkey, struct wpabuf **privkey);
884 struct wpabuf * wps_nfc_token_gen(int ndef, int *id, struct wpabuf **pubkey,
885  struct wpabuf **privkey,
886  struct wpabuf **dev_pw);
887 struct wpabuf * wps_build_nfc_handover_req(struct wps_context *ctx,
888  struct wpabuf *nfc_dh_pubkey);
889 struct wpabuf * wps_build_nfc_handover_sel(struct wps_context *ctx,
890  struct wpabuf *nfc_dh_pubkey,
891  const u8 *bssid, int freq);
892 struct wpabuf * wps_build_nfc_handover_req_p2p(struct wps_context *ctx,
893  struct wpabuf *nfc_dh_pubkey);
894 struct wpabuf * wps_build_nfc_handover_sel_p2p(struct wps_context *ctx,
895  int nfc_dev_pw_id,
896  struct wpabuf *nfc_dh_pubkey,
897  struct wpabuf *nfc_dev_pw);
898 
899 /* ndef.c */
900 struct wpabuf * ndef_parse_wifi(const struct wpabuf *buf);
901 struct wpabuf * ndef_build_wifi(const struct wpabuf *buf);
902 struct wpabuf * ndef_parse_p2p(const struct wpabuf *buf);
903 struct wpabuf * ndef_build_p2p(const struct wpabuf *buf);
904 
905 #ifdef CONFIG_WPS_STRICT
906 int wps_validate_beacon(const struct wpabuf *wps_ie);
907 int wps_validate_beacon_probe_resp(const struct wpabuf *wps_ie, int probe,
908  const u8 *addr);
909 int wps_validate_probe_req(const struct wpabuf *wps_ie, const u8 *addr);
910 int wps_validate_assoc_req(const struct wpabuf *wps_ie);
911 int wps_validate_assoc_resp(const struct wpabuf *wps_ie);
912 int wps_validate_m1(const struct wpabuf *tlvs);
913 int wps_validate_m2(const struct wpabuf *tlvs);
914 int wps_validate_m2d(const struct wpabuf *tlvs);
915 int wps_validate_m3(const struct wpabuf *tlvs);
916 int wps_validate_m4(const struct wpabuf *tlvs);
917 int wps_validate_m4_encr(const struct wpabuf *tlvs, int wps2);
918 int wps_validate_m5(const struct wpabuf *tlvs);
919 int wps_validate_m5_encr(const struct wpabuf *tlvs, int wps2);
920 int wps_validate_m6(const struct wpabuf *tlvs);
921 int wps_validate_m6_encr(const struct wpabuf *tlvs, int wps2);
922 int wps_validate_m7(const struct wpabuf *tlvs);
923 int wps_validate_m7_encr(const struct wpabuf *tlvs, int ap, int wps2);
924 int wps_validate_m8(const struct wpabuf *tlvs);
925 int wps_validate_m8_encr(const struct wpabuf *tlvs, int ap, int wps2);
926 int wps_validate_wsc_ack(const struct wpabuf *tlvs);
927 int wps_validate_wsc_nack(const struct wpabuf *tlvs);
928 int wps_validate_wsc_done(const struct wpabuf *tlvs);
929 int wps_validate_upnp_set_selected_registrar(const struct wpabuf *tlvs);
930 #else /* CONFIG_WPS_STRICT */
931 static inline int wps_validate_beacon(const struct wpabuf *wps_ie){
932  return 0;
933 }
934 
935 static inline int wps_validate_beacon_probe_resp(const struct wpabuf *wps_ie,
936  int probe, const u8 *addr)
937 {
938  return 0;
939 }
940 
941 static inline int wps_validate_probe_req(const struct wpabuf *wps_ie,
942  const u8 *addr)
943 {
944  return 0;
945 }
946 
947 static inline int wps_validate_assoc_req(const struct wpabuf *wps_ie)
948 {
949  return 0;
950 }
951 
952 static inline int wps_validate_assoc_resp(const struct wpabuf *wps_ie)
953 {
954  return 0;
955 }
956 
957 static inline int wps_validate_m1(const struct wpabuf *tlvs)
958 {
959  return 0;
960 }
961 
962 static inline int wps_validate_m2(const struct wpabuf *tlvs)
963 {
964  return 0;
965 }
966 
967 static inline int wps_validate_m2d(const struct wpabuf *tlvs)
968 {
969  return 0;
970 }
971 
972 static inline int wps_validate_m3(const struct wpabuf *tlvs)
973 {
974  return 0;
975 }
976 
977 static inline int wps_validate_m4(const struct wpabuf *tlvs)
978 {
979  return 0;
980 }
981 
982 static inline int wps_validate_m4_encr(const struct wpabuf *tlvs, int wps2)
983 {
984  return 0;
985 }
986 
987 static inline int wps_validate_m5(const struct wpabuf *tlvs)
988 {
989  return 0;
990 }
991 
992 static inline int wps_validate_m5_encr(const struct wpabuf *tlvs, int wps2)
993 {
994  return 0;
995 }
996 
997 static inline int wps_validate_m6(const struct wpabuf *tlvs)
998 {
999  return 0;
1000 }
1001 
1002 static inline int wps_validate_m6_encr(const struct wpabuf *tlvs, int wps2)
1003 {
1004  return 0;
1005 }
1006 
1007 static inline int wps_validate_m7(const struct wpabuf *tlvs)
1008 {
1009  return 0;
1010 }
1011 
1012 static inline int wps_validate_m7_encr(const struct wpabuf *tlvs, int ap,
1013  int wps2)
1014 {
1015  return 0;
1016 }
1017 
1018 static inline int wps_validate_m8(const struct wpabuf *tlvs)
1019 {
1020  return 0;
1021 }
1022 
1023 static inline int wps_validate_m8_encr(const struct wpabuf *tlvs, int ap,
1024  int wps2)
1025 {
1026  return 0;
1027 }
1028 
1029 static inline int wps_validate_wsc_ack(const struct wpabuf *tlvs)
1030 {
1031  return 0;
1032 }
1033 
1034 static inline int wps_validate_wsc_nack(const struct wpabuf *tlvs)
1035 {
1036  return 0;
1037 }
1038 
1039 static inline int wps_validate_wsc_done(const struct wpabuf *tlvs)
1040 {
1041  return 0;
1042 }
1043 
1044 static inline int wps_validate_upnp_set_selected_registrar(
1045  const struct wpabuf *tlvs)
1046 {
1047  return 0;
1048 }
1049 #endif /* CONFIG_WPS_STRICT */
1050 
1051 #endif /* WPS_H */
int use_psk_key
use_psk_key - Use PSK format key in Credential
Definition: wps.h:161
const u8 * extra_cred
extra_cred: Additional Credential attribute(s)
Definition: wps.h:362
void * cb_ctx
cb_ctx: Higher layer context data for Registrar callbacks
Definition: wps.h:342
struct wps_event_m2d - M2D event data
Definition: wps.h:488
char * model_description
model_description - Model Description (recommended for UPnP)
Definition: wps.h:752
char * upc
upc - Universal Product Code (optional for UPnP)
Definition: wps.h:762
struct wps_data - WPS registration protocol data
Definition: wps_i.h:23
size_t pin_len
pin_len - Length on pin in octets
Definition: wps.h:127
size_t ssid_len
ssid_len - Length of ssid in octets
Definition: wps.h:632
struct upnp_pending_message - Pending PutWLANResponse messages : Pointer to next pending message or N...
Definition: wps.h:581
struct wps_context * wps
wps - Pointer to long term WPS context
Definition: wps_i.h:27
u16 auth_types
auth_types - Authentication types (bit field of WPS_AUTH_*)
Definition: wps.h:679
const u8 * peer_pubkey_hash
peer_pubkey_hash - Peer public key hash or NULL if not known
Definition: wps.h:189
int ap
ap - Whether the local end is an access point
Definition: wps.h:598
Definition: wps_registrar.c:141
Definition: wps_er.h:76
int registrar
registrar - Whether this end is a Registrar
Definition: wps.h:117
int dualband
dualband - Whether this is a concurrent dualband AP
Definition: wps.h:389
Definition: wps.h:526
Definition: wpabuf.h:20
Definition: wps_upnp_i.h:123
char * friendly_name
friendly_name - Friendly Name (required for UPnP)
Definition: wps.h:742
int disable_auto_conf
disable_auto_conf - Disable auto-configuration on first registration
Definition: wps.h:379
struct wps_config - WPS configuration for a single registration protocol run
Definition: wps.h:108
u16 dev_pw_id
dev_pw_id - Device Password ID for Enrollee when PIN is used
Definition: wps.h:166
u16 ap_auth_type
ap_auth_type - Current AP authentication types (WPS_AUTH_*)
Definition: wps.h:689
int pbc
pbc - Whether this is protocol run uses PBC
Definition: wps.h:132
int ap_setup_locked
ap_setup_locked - Whether AP setup is locked (only used at AP)
Definition: wps.h:613
union wps_event_data - WPS event data
Definition: wps.h:484
struct wps_event_fail - Registration failure information : enum wps_msg_type
Definition: wps.h:509
struct wps_device_data - WPS Device Data : Device MAC address : Device Name (0..32 octets encoded in ...
Definition: wps.h:85
struct wps_registrar * registrar
registrar - Pointer to WPS registrar data from wps_registrar_init()
Definition: wps.h:603
int psk_set
psk_set - Whether psk value is set
Definition: wps.h:724
void * dh_ctx
dh_ctx - Context data for Diffie-Hellman operation
Definition: wps.h:642
size_t network_key_len
network_key_len - Length of network_key in octets
Definition: wps.h:711
u16 config_methods
config_methods - Enabled configuration methods
Definition: wps.h:659
const u8 * peer_addr
peer_addr: MAC address of the peer in AP; NULL if not AP
Definition: wps.h:152
struct wpabuf * dh_pubkey
dh_pubkey_oob - Diffie-Hellman public key
Definition: wps.h:652
int pbc_in_m1
pbc_in_m1 - Do not remove PushButton config method in M1 (AP)
Definition: wps.h:184
struct wpabuf * dh_privkey
dh_privkey - Diffie-Hellman private key
Definition: wps.h:647
const u8 * p2p_dev_addr
p2p_dev_addr - P2P Device Address from (Re)Association Request
Definition: wps.h:176
int force_per_enrollee_psk
force_per_enrollee_psk - Force per-Enrollee random PSK
Definition: wps.h:397
u16 ap_encr_type
encr_types - Current AP encryption type (WPS_ENCR_*)
Definition: wps.h:684
u16 encr_types
encr_types - Enabled encryption types (bit field of WPS_ENCR_*)
Definition: wps.h:664
Definition: wps_attr_parse.h:14
size_t extra_cred_len
extra_cred_len: Length of extra_cred in octets
Definition: wps.h:367
char * manufacturer_url
manufacturer_url - Manufacturer URL (optional for UPnP)
Definition: wps.h:747
u8 * network_key
network_key - The current Network Key (PSK) or NULL to generate new
Definition: wps.h:706
struct wps_context * wps
wps - Pointer to long term WPS context
Definition: wps.h:112
struct wps_credential - WPS Credential : SSID : Length of SSID : Authentication Type (WPS_AUTH_OPEN...
Definition: wps.h:47
struct wps_registrar_config - WPS Registrar configuration
Definition: wps.h:248
u16 encr_types_wpa
encr_types_wpa - Enabled encryption types for WPA (WPS_ENCR_*)
Definition: wps.h:674
u16 encr_types_rsn
encr_types_rsn - Enabled encryption types for RSN (WPS_ENCR_*)
Definition: wps.h:669
u8 * ap_settings
ap_settings - AP Settings override for M7 (only used at AP)
Definition: wps.h:732
const u8 * pin
pin - Enrollee Device Password (NULL for Registrar or PBC)
Definition: wps.h:122
size_t ap_settings_len
ap_settings_len - Length of ap_settings in octets
Definition: wps.h:737
char * model_url
model_url - Model URL (optional for UPnP)
Definition: wps.h:757
int skip_cred_build
skip_cred_build: Do not build credential
Definition: wps.h:352
const struct wps_credential * new_ap_settings
new_ap_settings - New AP settings (NULL if not used)
Definition: wps.h:147
struct wps_context - Long term WPS context data
Definition: wps.h:594
void * cb_ctx
cb_ctx: Higher layer context data for callbacks
Definition: wps.h:791
const struct wpabuf * assoc_wps_ie
assoc_wps_ie: (Re)AssocReq WPS IE (in AP; NULL if not AP)
Definition: wps.h:137
int static_wep_only
static_wep_only - Whether the BSS supports only static WEP
Definition: wps.h:384