11 struct wps_nfc_pw_token;
41 SEND_M1, RECV_M2, SEND_M3, RECV_M4, SEND_M5, RECV_M6, SEND_M7,
42 RECV_M8, RECEIVED_M2D, WPS_MSG_DONE, RECV_ACK, WPS_FINISHED,
46 RECV_M1, SEND_M2, RECV_M3, SEND_M4, RECV_M5, SEND_M6,
47 RECV_M7, SEND_M8, RECV_DONE, SEND_M2D, RECV_M2D_ACK
50 u8 uuid_e[WPS_UUID_LEN];
51 u8 uuid_r[WPS_UUID_LEN];
52 u8 mac_addr_e[ETH_ALEN];
53 u8 nonce_e[WPS_NONCE_LEN];
54 u8 nonce_r[WPS_NONCE_LEN];
57 u8 snonce[2 * WPS_SECRET_NONCE_LEN];
58 u8 peer_hash1[WPS_HASH_LEN];
59 u8 peer_hash2[WPS_HASH_LEN];
62 struct wpabuf *dh_pubkey_e;
63 struct wpabuf *dh_pubkey_r;
64 u8 authkey[WPS_AUTHKEY_LEN];
65 u8 keywrapkey[WPS_KEYWRAPKEY_LEN];
66 u8 emsk[WPS_EMSK_LEN];
71 size_t dev_password_len;
75 size_t alt_dev_password_len;
78 u8 peer_pubkey_hash[WPS_OOB_PUBKEY_HASH_LEN];
79 int peer_pubkey_hash_set;
102 int wps_pin_revealed;
112 u16 error_indication;
121 void (*ap_settings_cb)(
void *ctx,
const struct wps_credential *cred);
122 void *ap_settings_cb_ctx;
127 u8 p2p_dev_addr[ETH_ALEN];
131 struct wps_nfc_pw_token *nfc_pw_token;
136 void wps_kdf(
const u8 *key,
const u8 *label_prefix,
size_t label_prefix_len,
137 const char *label, u8 *res,
size_t res_len);
138 int wps_derive_keys(
struct wps_data *wps);
139 void wps_derive_psk(
struct wps_data *wps,
const u8 *dev_passwd,
140 size_t dev_passwd_len);
141 struct wpabuf * wps_decrypt_encr_settings(
struct wps_data *wps,
const u8 *encr,
143 void wps_fail_event(
struct wps_context *wps,
enum wps_msg_type msg,
144 u16 config_error, u16 error_indication,
const u8 *mac_addr);
145 void wps_success_event(
struct wps_context *wps,
const u8 *mac_addr);
146 void wps_pwd_auth_fail_event(
struct wps_context *wps,
int enrollee,
int part,
148 void wps_pbc_overlap_event(
struct wps_context *wps);
149 void wps_pbc_timeout_event(
struct wps_context *wps);
150 void wps_pbc_active_event(
struct wps_context *wps);
151 void wps_pbc_disable_event(
struct wps_context *wps);
157 int wps_build_public_key(
struct wps_data *wps,
struct wpabuf *msg);
158 int wps_build_req_type(
struct wpabuf *msg,
enum wps_request_type type);
159 int wps_build_resp_type(
struct wpabuf *msg,
enum wps_response_type type);
160 int wps_build_config_methods(
struct wpabuf *msg, u16 methods);
161 int wps_build_uuid_e(
struct wpabuf *msg,
const u8 *uuid);
162 int wps_build_dev_password_id(
struct wpabuf *msg, u16
id);
163 int wps_build_config_error(
struct wpabuf *msg, u16 err);
164 int wps_build_authenticator(
struct wps_data *wps,
struct wpabuf *msg);
165 int wps_build_key_wrap_auth(
struct wps_data *wps,
struct wpabuf *msg);
166 int wps_build_encr_settings(
struct wps_data *wps,
struct wpabuf *msg,
168 int wps_build_version(
struct wpabuf *msg);
169 int wps_build_wfa_ext(
struct wpabuf *msg,
int req_to_enroll,
170 const u8 *auth_macs,
size_t auth_macs_count);
171 int wps_build_msg_type(
struct wpabuf *msg,
enum wps_msg_type msg_type);
172 int wps_build_enrollee_nonce(
struct wps_data *wps,
struct wpabuf *msg);
173 int wps_build_registrar_nonce(
struct wps_data *wps,
struct wpabuf *msg);
174 int wps_build_auth_type_flags(
struct wps_data *wps,
struct wpabuf *msg);
175 int wps_build_encr_type_flags(
struct wps_data *wps,
struct wpabuf *msg);
176 int wps_build_conn_type_flags(
struct wps_data *wps,
struct wpabuf *msg);
177 int wps_build_assoc_state(
struct wps_data *wps,
struct wpabuf *msg);
178 int wps_build_oob_dev_pw(
struct wpabuf *msg, u16 dev_pw_id,
179 const struct wpabuf *pubkey,
const u8 *dev_pw,
181 struct wpabuf * wps_ie_encapsulate(
struct wpabuf *data);
182 int wps_build_mac_addr(
struct wpabuf *msg,
const u8 *addr);
183 int wps_build_rf_bands_attr(
struct wpabuf *msg, u8 rf_bands);
184 int wps_build_ap_channel(
struct wpabuf *msg, u16 ap_channel);
187 int wps_process_authenticator(
struct wps_data *wps,
const u8 *authenticator,
188 const struct wpabuf *msg);
189 int wps_process_key_wrap_auth(
struct wps_data *wps,
struct wpabuf *msg,
190 const u8 *key_wrap_auth);
201 const struct wpabuf *msg);
208 const struct wpabuf *msg);
214 const u8 * wps_authorized_macs(
struct wps_registrar *reg,
size_t *count);
216 const u8 *addr,
const u8 *uuid_e);
217 void wps_registrar_remove_nfc_pw_token(
struct wps_registrar *reg,
218 struct wps_nfc_pw_token *token);
219 int wps_cb_new_psk(
struct wps_registrar *reg,
const u8 *mac_addr,
220 const u8 *p2p_dev_addr,
const u8 *psk,
size_t psk_len);
WPS registration protocol data.
Definition: wps_i.h:20
struct wps_context * wps
Pointer to long term WPS context.
Definition: wps_i.h:25
wsc_op_code
EAP-WSC OP-Code values.
Definition: wps.h:15
u16 config_error
Configuration Error value to be used in NACK.
Definition: wps_i.h:111
Definition: wps_registrar.c:137
int er
Whether the local end is an external registrar.
Definition: wps_i.h:37
wps_process_res
WPS message processing result.
Definition: wps.h:205
Wi-Fi Protected Setup - attribute parsing.
u8 request_type
Request Type attribute from (Re)AssocReq.
Definition: wps_i.h:85
int registrar
Whether this end is a Registrar.
Definition: wps_i.h:31
void wps_registrar_selected_registrar_changed(struct wps_registrar *reg, u16 dev_pw_id)
SetSelectedRegistrar change.
Definition: wps_registrar.c:3448
WPS Device Data.
Definition: wps.h:82
u16 encr_type
Available encryption types.
Definition: wps_i.h:91
Definition: wps_attr_parse.h:10
WPS Credential.
Definition: wps.h:44
u16 auth_type
Available authentication types.
Definition: wps_i.h:97
Long term WPS context data.
Definition: wps.h:623