text
stringlengths
1
9.98k
__index_level_0__
int64
0
4.17k
/* */ #ifndef AES_I_H #define AES_I_H #include "aes.h" /* #define FULL_UNROLL */ #define AES_SMALL_TABLES extern const u32 Te0[256]; extern const u32 Te1[256]; extern const u32 Te2[256]; extern const u32 Te3[256]; extern const u32 Te4[256]; extern const u32 Td0[256]; extern const u32 Td1[256]; extern const u32 Td2...
2,852
/* */ #ifndef DES_I_H #define DES_I_H struct des3_key_s { u32 ek[3][32]; u32 dk[3][32]; }; void des_key_setup(const u8 *key, u32 *ek, u32 *dk); void des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt); void des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain); void des3_key_setup(const u8 *key, ...
2,853
/* */ #ifndef MD5_H #define MD5_H #define MD5_MAC_LEN 16 int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac); int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac); #endif /* MD5_H */
2,854
/* */ #ifndef SHA256_H #define SHA256_H #define SHA256_MAC_LEN 32 int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac); int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac); int sha256_prf(const u8 *key, s...
2,855
/* */ #ifndef SHA384_H #define SHA384_H #define SHA384_MAC_LEN 48 #define SHA512_MAC_LEN 64 int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac); int hmac_sha384(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac); int s...
2,856
/* */ #ifdef CONFIG_IEEE80211W #ifndef CCMP_H #define CCMP_H u8 * ccmp_decrypt(const u8 *tk, const u8 *hdr, const u8 *data, size_t data_len, size_t *decrypted_len, bool espnow_pkt); u8 * ccmp_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen, u8 *pn, int keyid, size_t *encrypted_len); u8 * ccmp_encr...
2,857
/* */ #ifndef SHA256_I_H #define SHA256_I_H #define SHA256_BLOCK_SIZE 64 struct sha256_state { u64 length; u32 state[8], curlen; u8 buf[SHA256_BLOCK_SIZE]; }; void sha256_init(struct sha256_state *md); int sha256_process(struct sha256_state *md, const unsigned char *in, unsigned long inlen); int sha256_don...
2,859
/* */ #ifndef AES_H #define AES_H #define AES_BLOCK_SIZE 16 void * aes_encrypt_init(const u8 *key, size_t len); int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt); void aes_encrypt_deinit(void *ctx); void * aes_decrypt_init(const u8 *key, size_t len); int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain); void...
2,860
/* */ #ifndef DH_GROUPS_H #define DH_GROUPS_H struct dh_group { int id; const u8 *generator; size_t generator_len; const u8 *prime; size_t prime_len; const u8 *order; size_t order_len; unsigned int safe_prime:1; }; const struct dh_group * dh_groups_get(int id); struct wpabuf * dh_init(const struct dh_group ...
2,861
/* */ #ifndef DH_GROUP5_H #define DH_GROUP5_H void * dh5_init(struct wpabuf **priv, struct wpabuf **publ); void * dh5_init_fixed(const struct wpabuf *priv, const struct wpabuf *publ); struct wpabuf * dh5_derive_shared(void *ctx, const struct wpabuf *peer_public, const struct wpabuf *own_private); void dh5_free...
2,862
/* */ #ifndef SHA512_I_H #define SHA512_I_H #define SHA512_BLOCK_SIZE 128 struct sha512_state { u64 length, state[8]; u32 curlen; u8 buf[SHA512_BLOCK_SIZE]; }; void sha512_init(struct sha512_state *md); int sha512_process(struct sha512_state *md, const unsigned char *in, unsigned long inlen); int sha512_do...
2,863
/* */ #ifndef SHA1_I_H #define SHA1_I_H struct SHA1Context { u32 state[5]; u32 count[2]; unsigned char buffer[64]; }; void SHA1Init(struct SHA1Context *context); void SHA1Update(struct SHA1Context *context, const void *data, u32 len); void SHA1Final(unsigned char digest[20], struct SHA1Context *context); void SH...
2,864
/* */ #ifndef SHA1_H #define SHA1_H #define SHA1_MAC_LEN 20 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac); int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac); int sha1_prf(const u8 *key, size_t ke...
2,865
/* */ #ifndef MD5_I_H #define MD5_I_H struct MD5Context { u32 buf[4]; u32 bits[2]; u8 in[64]; }; void MD5Init(struct MD5Context *context); void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len); void MD5Final(unsigned char digest[16], struct MD5Context *context); #endif /* MD...
2,866
/* */ #ifndef MS_FUNCS_H #define MS_FUNCS_H int generate_nt_response(const u8 *auth_challenge, const u8 *peer_challenge, const u8 *username, size_t username_len, const u8 *password, size_t password_len, u8 *response); int generate_nt_response_pwhash(const u8 *auth_challenge, const u8 *peer_challenge,...
2,867
/* */ #ifndef RANDOM_H #define RANDOM_H #ifdef CONFIG_NO_RANDOM_POOL #define random_init(e) do { } while (0) #define random_deinit() do { } while (0) #define random_add_randomness(b, l) do { } while (0) #define random_get_bytes(b, l) os_get_random((b), (l)) #define random_pool_ready() 1 #define random_mark_pool_read...
2,868
/* */ #ifndef AES_SIV_H #define AES_SIV_H int aes_siv_encrypt(const u8 *key, size_t key_len, const u8 *pw, size_t pwlen, size_t num_elem, const u8 *addr[], const size_t *len, u8 *out); int aes_siv_decrypt(const u8 *key, size_t key_len, const u8 *iv_crypt, size_t iv_c_len, size_t num_ele...
2,869
/* */ #ifndef EAP_TLS_COMMON_H #define EAP_TLS_COMMON_H /** */ struct eap_ssl_data { /** */ struct tls_connection *conn; /** */ struct wpabuf *tls_out; /** */ size_t tls_out_pos; /** */ size_t tls_out_limit; /** */ struct wpabuf *tls_in; /** */ size_t tls_in_left; /** */ size_t tls...
2,870
/* */ #ifndef EAP_CONFIG_H #define EAP_CONFIG_H /** */ struct eap_peer_config { /** */ u8 *identity; /** */ size_t identity_len; /** */ u8 *anonymous_identity; /** */ size_t anonymous_identity_len; /** */ u8 *password; /** */ size_t password_len; /** */ u8 *ca_cert; /** */ u8 ...
2,871
/* */ #ifndef MSCHAPV2_H #define MSCHAPV2_H #define MSCHAPV2_CHAL_LEN 16 #define MSCHAPV2_NT_RESPONSE_LEN 24 #define MSCHAPV2_AUTH_RESPONSE_LEN 20 #define MSCHAPV2_MASTER_KEY_LEN 16 const u8 * mschapv2_remove_domain(const u8 *username, size_t *len); int mschapv2_derive_response(const u8 *username, size_t usernam...
2,872
/* */ #ifndef CHAP_H #define CHAP_H #define CHAP_MD5_LEN 16 int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge, size_t challenge_len, u8 *response); #endif /* CHAP_H */
2,873
/* */ #ifndef EAP_DEFS_H #define EAP_DEFS_H /* RFC 3748 - Extensible Authentication Protocol (EAP) */ #ifdef _MSC_VER #pragma pack(push, 1) #endif /* _MSC_VER */ struct eap_hdr { u8 code; u8 identifier; be16 length; /* including code and identifier; network byte order */ /* followed by length-4 octets of data ...
2,874
txt */, EAP_TYPE_MSCHAPV2 = 26 /* draft-kamath-pppext-eap-mschapv2-00.txt */, EAP_TYPE_TLV = 33 /* draft-josefsson-pppext-eap-tls-eap-07.txt */, EAP_TYPE_TNC = 38 /* TNC IF-T v1.0-r3; note: tentative assignment; EAP_TYPE_FAST = 43 /* RFC 4851 */, EAP_TYPE_PAX = 46 /* RFC 4746 */, EAP_TYPE_PSK = 47 /* RFC 4764 */,...
2,874
/* */ #ifndef EAP_I_H #define EAP_I_H #include "utils/wpabuf.h" #include "eap.h" #include "eap_common.h" #include "eap_config.h" /* RFC 4137 - EAP Peer state machine */ typedef enum { DECISION_FAIL, DECISION_COND_SUCC, DECISION_UNCOND_SUCC } EapDecision; typedef enum { METHOD_NONE, METHOD_INIT, METHOD_CONT, MET...
2,875
/* */ #ifndef EAP_COMMON_H #define EAP_COMMON_H #include "utils/wpabuf.h" int eap_hdr_len_valid(const struct wpabuf *msg, size_t min_payload); const u8 * eap_hdr_validate(int vendor, EapType eap_type, const struct wpabuf *msg, size_t *plen); struct wpabuf * eap_msg_alloc(int vendor, EapType type, size_t payl...
2,876
/* */ #ifndef EAP_TTLS_H #define EAP_TTLS_H struct ttls_avp { be32 avp_code; be32 avp_length; /* 8-bit flags, 24-bit length; /* optional 32-bit Vendor-ID */ /* Data */ }; struct ttls_avp_vendor { be32 avp_code; be32 avp_length; /* 8-bit flags, 24-bit length; be32 vendor_id; /* Data */ }; #define AVP_FLAGS_...
2,877
/* */ #ifndef EAP_PEAP_COMMON_H #define EAP_PEAP_COMMON_H int peap_prfplus(int version, const u8 *key, size_t key_len, const char *label, const u8 *seed, size_t seed_len, u8 *buf, size_t buf_len); #endif /* EAP_PEAP_COMMON_H */
2,878
/* */ #ifndef EAP_TLS_H #define EAP_TLS_H #include "eap_i.h" #include "eap_common.h" #include "eap.h" #include "utils/wpabuf.h" void * eap_tls_init(struct eap_sm *sm); void eap_tls_deinit(struct eap_sm *sm, void *priv); struct wpabuf * eap_tls_process(struct eap_sm *sm, void *priv, ...
2,879
/* */ #ifndef EAP_METHODS_H #define EAP_METHODS_H #include "eap_defs.h" #include "eap_config.h" const struct eap_method * eap_peer_get_eap_method(int vendor, EapType method); const struct eap_method * eap_peer_get_methods(size_t *count); u32 eap_get_phase2_type(const char *name, int *vendor); struct eap_method_typ...
2,880
/* */ #ifndef EAP_H #define EAP_H #include "common/defs.h" #include "eap_peer/eap_defs.h" struct eap_sm; struct eap_method_type { int vendor; EapType method; }; extern u8 *g_wpa_anonymous_identity; extern int g_wpa_anonymous_identity_len; extern u8 *g_wpa_username; extern int g_wpa_username_len; extern const u8...
2,881
/* */ #ifndef EAP_TLV_COMMON_H #define EAP_TLV_COMMON_H /* EAP-TLV TLVs (draft-josefsson-ppext-eap-tls-eap-10.txt) */ #define EAP_TLV_RESULT_TLV 3 /* Acknowledged Result */ #define EAP_TLV_NAK_TLV 4 #define EAP_TLV_ERROR_CODE_TLV 5 #define EAP_TLV_CONNECTION_BINDING_TLV 6 #define EAP_TLV_VENDOR_SPECIFIC_TLV 7 #defin...
2,882
2.7 - Intermediate-Result TLV */ struct eap_tlv_intermediate_result_tlv { be16 tlv_type; be16 length; be16 status; /* Followed by optional TLVs */ } STRUCT_PACKED; /* RFC 4851, Section 4.2.8 - Crypto-Binding TLV */ struct eap_tlv_crypto_binding_tlv { be16 tlv_type; be16 length; u8 reserved; u8 version; u8 rec...
2,882
/* */ #ifndef EAP_FAST_H #define EAP_FAST_H #define EAP_FAST_VERSION 1 #define EAP_FAST_KEY_LEN 64 #define EAP_FAST_SIMCK_LEN 40 #define EAP_FAST_SKS_LEN 40 #define EAP_FAST_CMK_LEN 20 #define TLS_EXT_PAC_OPAQUE 35 /* */ #define PAC_TYPE_PAC_KEY 1 #define PAC_TYPE_PAC_OPAQUE 2 #define PAC_TYPE_CRED_LIFETIME 3 #de...
2,883
/* */ #ifndef EAP_FAST_PAC_H #define EAP_FAST_PAC_H #include "eap_peer/eap_fast_common.h" struct eap_fast_pac { struct eap_fast_pac *next; u8 pac_key[EAP_FAST_PAC_KEY_LEN]; u8 *pac_opaque; size_t pac_opaque_len; u8 *pac_info; size_t pac_info_len; u8 *a_id; size_t a_id_len; u8 *i_id; size_t i_id_len; u8 ...
2,884
/* */ #ifndef DRIVER_H #define DRIVER_H #define WPA_SUPPLICANT_DRIVER_VERSION 4 #include "common/defs.h" #include "common/ieee802_11_defs.h" #include "common/wpa_common.h" #include "utils/list.h" struct wpa_bss; struct wpa_supplicant; /** */ struct wpa_scan_res { unsigned int flags; u8 bssid[ETH_ALEN]; int chan...
2,885
c */ void wpa_scan_results_free(struct wpa_scan_results *res); int wpa_drv_send_action(struct wpa_supplicant *wpa_s, unsigned int chan, unsigned int wait, const u8 *data, size_t data_len, int no_cck); void wpa_supplicant_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, char *ssid); #endif /* DR...
2,885
/* */ #ifndef EAP_I_H #define EAP_I_H #include "utils/wpabuf.h" #include "eap_server/eap.h" #include "eap_peer/eap_common.h" /* RFC 4137 - EAP Standalone Authenticator */ /** */ struct eap_method { int vendor; enum eap_type method; const char *name; void * (*init)(struct eap_sm *sm); void * (*initPickUp)(st...
2,886
..) PRINTF_FORMAT(2, 3); void eap_sm_process_nak(struct eap_sm *sm, const u8 *nak_list, size_t len); #endif /* EAP_I_H */
2,886
/* */ #ifndef EAP_SERVER_METHODS_H #define EAP_SERVER_METHODS_H #include "eap_peer/eap_defs.h" const struct eap_method * eap_server_get_eap_method(int vendor, enum eap_type method); struct eap_method * eap_server_method_alloc(int version, int vendor, enum eap_type method, const char *nam...
2,887
/* */ #ifndef EAP_H #define EAP_H #include "common/defs.h" #include "utils/list.h" #include "eap_peer/eap_defs.h" #include "eap_server/eap_methods.h" #include "utils/wpabuf.h" struct eap_sm; #define EAP_TTLS_AUTH_PAP 1 #define EAP_TTLS_AUTH_CHAP 2 #define EAP_TTLS_AUTH_MSCHAP 4 #define EAP_TTLS_AUTH_MSCHAPV2 8 st...
2,888
1X-2004 */ #ifndef ESP_SUPPLICANT /* AAA interface to full authenticator variables */ bool aaaEapReq; bool aaaEapNoReq; bool aaaSuccess; bool aaaFail; struct wpabuf *aaaEapReqData; u8 *aaaEapKeyData; size_t aaaEapKeyDataLen; bool aaaEapKeyAvailable; int aaaMethodTimeout; /* Full authenticator to AAA interf...
2,888
/* */ #ifndef HOSTAPD_H #define HOSTAPD_H #include "common/defs.h" #include "ap/ap_config.h" struct wpa_driver_ops; struct wpa_ctrl_dst; struct radius_server_data; struct upnp_wps_device_sm; struct hostapd_data; struct sta_info; struct hostap_sta_driver_data; struct ieee80211_ht_capabilities; struct full_dynamic_vl...
2,889
/* */ #ifndef WPS_HOSTAPD_H #define WPS_HOSTAPD_H #ifdef CONFIG_WPS int hostapd_init_wps(struct hostapd_data *hapd, struct wps_data *wps_data, struct wps_context *wps); int hostapd_init_wps_complete(struct hostapd_data *hapd); void hostapd_deinit_wps(struct hostapd_data *hapd); void hostapd_update_wps(struct hostap...
2,890
/* */ #ifndef PMKSA_CACHE_H #define PMKSA_CACHE_H #include "ap/ieee802_1x.h" /** */ struct rsn_pmksa_cache_entry { struct rsn_pmksa_cache_entry *next, *hnext; u8 pmkid[PMKID_LEN]; u8 pmk[PMK_LEN_MAX]; size_t pmk_len; os_time_t expiration; int akmp; /* WPA_KEY_MGMT_* */ u8 spa[ETH_ALEN]; u8 *identity; size...
2,891
/* */ #ifndef IEEE802_1X_H #define IEEE802_1X_H struct hostapd_data; struct sta_info; struct eapol_state_machine; struct hostapd_config; struct hostapd_bss_config; struct hostapd_radius_attr; struct radius_msg; void ieee802_1x_receive(struct hostapd_data *hapd, const u8 *sa, const u8 *buf, size_t len); void iee...
2,892
/* */ #ifndef IEEE802_11_H #define IEEE802_11_H enum wpa_validate_result; int auth_sae_queued_addr(struct hostapd_data *hapd, const u8 *addr); int auth_sae_queue(struct hostapd_data *hapd, u8 *buf, size_t len, u8 *bssid, u16 status, u32 auth_transaction); int handle_auth_sae(struct hostapd_data *hapd, struct sta_inf...
2,894
/* */ #ifndef COMEBACK_TOKEN_H #define COMEBACK_TOKEN_H int check_comeback_token(const u8 *comeback_key, u16 *comeback_pending_idx, const u8 *addr, const u8 *token, size_t token_len); struct wpabuf * auth_build_token_req(struct os_reltime *last_comeback_key_update, u8 *comeback_key, u16 comeback_idx, ...
2,895
/* */ #ifndef HOSTAPD_CONFIG_H #define HOSTAPD_CONFIG_H #include "common/defs.h" #include "common/wpa_common.h" #define MAX_STA_COUNT 10 #define MAX_VLAN_ID 4094 typedef u8 macaddr[ETH_ALEN]; struct mac_acl_entry { macaddr addr; int vlan_id; }; struct hostapd_radius_servers; struct ft_remote_r0kh; struct ft_re...
2,896
1 ms, i.e., 10 = 1 ms */ }; #define MAX_ROAMING_CONSORTIUM_LEN 15 struct hostapd_roaming_consortium { u8 len; u8 oi[MAX_ROAMING_CONSORTIUM_LEN]; }; struct hostapd_lang_string { u8 lang[3]; u8 name_len; u8 name[252]; }; #define MAX_NAI_REALMS 10 #define MAX_NAI_REALMLEN 255 #define MAX_NAI_EAP_METHODS 5 #defin...
2,896
11 authentication int wpa; /* bitfield of WPA_PROTO_WPA, WPA_PROTO_RSN */ int wpa_key_mgmt; #ifdef CONFIG_IEEE80211W enum mfp_options ieee80211w; /* dot11AssociationSAQueryMaximumTimeout (in TUs) */ unsigned int assoc_sa_query_max_timeout; /* dot11AssociationSAQueryRetryTimeout (in TUs) */ int assoc_sa_query_re...
2,896
. */ enum { LONG_PREAMBLE = 0, SHORT_PREAMBLE = 1 } preamble; int *supported_rates; int *basic_rates; const struct wpa_driver_ops *driver; int ap_table_max_size; int ap_table_expiration_time; char country[3]; /* first two octets: country code as described in */ int ieee80211d; /* */ int ht_...
2,896
/* */ #ifndef WPA_AUTH_I_H #define WPA_AUTH_I_H /* max(dot11RSNAConfigGroupUpdateCount,dot11RSNAConfigPairwiseUpdateCount) */ #define RSNA_MAX_EAPOL_RETRIES 4 struct wpa_group; struct wpa_stsl_negotiation { struct wpa_stsl_negotiation *next; u8 initiator[ETH_ALEN]; u8 peer[ETH_ALEN]; }; struct wpa_state_machi...
2,897
11i */ Boolean PTKRequest; /* not in IEEE 802.11i state machine */ Boolean has_GTK; Boolean PtkGroupInit; /* init request for PTK Group state machine */ u8 *last_rx_eapol_key; /* starting from IEEE 802.1X header */ size_t last_rx_eapol_key_len; unsigned int changed:1; unsigned int in_step_loop:1; unsigned int...
2,897
/* */ #ifndef WPA_AUTH_IE_H #define WPA_AUTH_IE_H struct wpa_eapol_ie_parse { const u8 *wpa_ie; size_t wpa_ie_len; const u8 *rsn_ie; size_t rsn_ie_len; const u8 *pmkid; const u8 *gtk; size_t gtk_len; const u8 *mac_addr; size_t mac_addr_len; #ifdef CONFIG_IEEE80211W const u8 *igtk; size_t igtk_len; #endif ...
2,898
/* */ #ifndef STA_INFO_H #define STA_INFO_H /* STA flags */ #define WLAN_STA_AUTH BIT(0) #define WLAN_STA_ASSOC BIT(1) #define WLAN_STA_PS BIT(2) #define WLAN_STA_TIM BIT(3) #define WLAN_STA_PERM BIT(4) #define WLAN_STA_AUTHORIZED BIT(5) #define WLAN_STA_PENDING_POLL BIT(6) /* pending activity poll not ACKed */ #def...
2,899
1X related data */ struct eapol_state_machine *eapol_sm; struct wpa_state_machine *wpa_sm; char *identity; /* User-Name from RADIUS */ u16 auth_alg; #ifdef CONFIG_INTERWORKING #define GAS_DIALOG_MAX 8 /* Max concurrent dialog number */ struct gas_dialog_info *gas_dialog; u8 gas_dialog_next; #endif /* CONFIG_INT...
2,899
*/ #define AP_MAX_INACTIVITY_AFTER_DEAUTH (1 * 5) struct hostapd_data; int ap_for_each_sta(struct hostapd_data *hapd, int (*cb)(struct hostapd_data *hapd, struct sta_info *sta, void *ctx), void *ctx); struct sta_info * ap_get_sta(struct hostapd_data *hapd, const u8 *sta); void ap_sta_hash_add(s...
2,899
/* */ #ifndef EAPOL_AUTH_SM_H #define EAPOL_AUTH_SM_H #define EAPOL_SM_PREAUTH BIT(0) #define EAPOL_SM_WAIT_START BIT(1) #define EAPOL_SM_USES_WPA BIT(2) #define EAPOL_SM_FROM_PMKSA_CACHE BIT(3) struct eapol_auth_config { const struct eap_config *eap_cfg; int eap_reauth_period; int wpa; int individual_wep_key_l...
2,900
/* */ #ifndef EAPOL_AUTH_SM_I_H #define EAPOL_AUTH_SM_I_H #include "common/defs.h" /* IEEE Std 802.1X-2004, Ch. 8.2 */ typedef enum { ForceUnauthorized = 1, ForceAuthorized = 3, Auto = 2 } PortTypes; typedef enum { Unauthorized = 2, Authorized = 1 } PortState; typedef enum { Both = 0, In = 1 } ControlledDirection...
2,901
.65535 */ #define AUTH_PAE_DEFAULT_quietPeriod 60 unsigned int reAuthMax; /* default 2 */ #define AUTH_PAE_DEFAULT_reAuthMax 2 /* counters */ Counter authEntersConnecting; Counter authEapLogoffsWhileConnecting; Counter authEntersAuthenticating; Counter authAuthSuccessesWhileAuthenticating; Counter authAuthTimeou...
2,901
1X */ u8 addr[ETH_ALEN]; /* Supplicant address */ int flags; /* EAPOL_SM_* */ /* EAPOL/AAA EAP full authenticator interface */ struct eap_eapol_interface *eap_if; int radius_identifier; /* TODO: check when the last messages can be released */ struct radius_msg *last_recv_radius; u8 last_eap_id; /* last used ...
2,901
/* */ #ifndef ELOOP_H #define ELOOP_H /** */ #define ELOOP_ALL_CTX (void *) -1 /** */ typedef enum { EVENT_TYPE_READ = 0, EVENT_TYPE_WRITE, EVENT_TYPE_EXCEPTION } eloop_event_type; /** */ typedef void (*eloop_sock_handler)(int sock, void *eloop_ctx, void *sock_ctx); /** */ typedef void (*eloop_event_handle...
2,902
/* */ #ifndef BASE64_H #define BASE64_H char * base64_encode(const void *src, size_t len, size_t *out_len); unsigned char * base64_decode(const char *src, size_t len, size_t *out_len); char * base64_url_encode(const void *src, size_t len, size_t *out_len); unsigned char * base64_url_decode(const char *src, size_t le...
2,903
/* */ #ifndef UUID_H #define UUID_H #define UUID_LEN 16 int uuid_str2bin(const char *str, u8 *bin); int uuid_bin2str(const u8 *bin, char *str, size_t max_len); int is_nil_uuid(const u8 *uuid); #endif /* UUID_H */
2,904
/* */ #ifndef EXT_PASSWORD_H #define EXT_PASSWORD_H struct ext_password_data; #ifdef CONFIG_EXT_PASSWORD struct ext_password_data * ext_password_init(const char *backend, const char *params); void ext_password_deinit(struct ext_password_data *data); struct wpabuf * ext_password_get(struct ext_password_d...
2,905
/* */ #ifndef DL_LIST_H #define DL_LIST_H #include /** */ struct dl_list { struct dl_list *next; struct dl_list *prev; }; static inline void dl_list_init(struct dl_list *list) { list->next = list; list->prev = list; } static inline void dl_list_add(struct dl_list *list, struct dl_list *item) { item->next =...
2,906
NULL : \ dl_list_entry((list)->next, type, member)) #define dl_list_last(list, type, member) \ (dl_list_empty((list)) ? NULL : \ dl_list_entry((list)->prev, type, member)) #define dl_list_for_each(item, list, type, member) \ for (item = dl_list_entry((list)->next, type, member); \ &item->member != (list)...
2,906
/* */ #ifndef COMMON_H #define COMMON_H #if defined(__ets__) #endif /* ets */ #include "os.h" #include "esp_bit_defs.h" #include "list.h" /* Define platform specific variable type macros */ #if defined(ESP_PLATFORM) #include typedef uint64_t u64; typedef uint32_t u32; typedef uint16_t u16; typedef uint8_t u8; type...
2,907
WPA_BYTE_SWAP_DEFINED */ #define SSID_MAX_LEN 32 struct wpa_ssid_value { u8 ssid[SSID_MAX_LEN]; size_t ssid_len; }; /* Macros for handling unaligned memory accesses */ static inline u16 WPA_GET_BE16(const u8 *a) { return (a[0] > 8; a[1] = val & 0xff; } static inline u16 WPA_GET_LE16(const u8 *a) { return (a[1...
2,907
1X) */ #endif /* ETH_P_PAE */ #ifndef ETH_P_EAPOL #define ETH_P_EAPOL ETH_P_PAE #endif /* ETH_P_EAPOL */ #ifndef ETH_P_RSN_PREAUTH #define ETH_P_RSN_PREAUTH 0x88c7 #endif /* ETH_P_RSN_PREAUTH */ #ifndef ETH_P_RRB #define ETH_P_RRB 0x890D #endif /* ETH_P_RRB */ #ifdef __GNUC__ #define PRINTF_FORMAT(a,b) __attribute__ ...
2,907
..); int wpa_snprintf_hex_sep(char *buf, size_t buf_size, const u8 *data, size_t len, char sep); int wpa_snprintf_hex(char *buf, size_t buf_size, const u8 *data, size_t len); int wpa_snprintf_hex_uppercase(char *buf, size_t buf_size, const u8 *data, size_t len); int hwaddr_mask_txt(char *buf, size_t len,...
2,907
(a[0] | a[1] | a[2] | a[3] | a[4] | a[5]); } static inline int is_broadcast_ether_addr(const u8 *a) { return (a[0] & a[1] & a[2] & a[3] & a[4] & a[5]) == 0xff; } static inline int is_multicast_ether_addr(const u8 *a) { return a[0] & 0x01; } #define broadcast_ether_addr (const u8 *) "\xff\xff\xff\xff\xff\xff" #in...
2,907
/* */ #ifndef JSON_H #define JSON_H struct json_token { enum json_type { JSON_VALUE, JSON_OBJECT, JSON_ARRAY, JSON_STRING, JSON_NUMBER, JSON_BOOLEAN, JSON_NULL, } type; enum json_parsing_state { JSON_EMPTY, JSON_STARTED, JSON_WAITING_VALUE, JSON_COMPLETED, } state; char *name; char *strin...
2,908
/* */ #ifndef CONST_TIME_H #define CONST_TIME_H #if defined(__clang__) #define NO_UBSAN_UINT_OVERFLOW \ __attribute__((no_sanitize("unsigned-integer-overflow"))) #else #define NO_UBSAN_UINT_OVERFLOW #endif /** */ static inline unsigned int const_time_fill_msb(unsigned int val) { /* Move the MSB to LSB and mult...
2,909
/* */ #ifndef STATE_MACHINE_H #define STATE_MACHINE_H /** */ #define SM_STATE(machine, state) \ static void sm_ ## machine ## _ ## state ## _Enter(STATE_MACHINE_DATA *sm, \ int global) /** */ #define SM_ENTRY(machine, state) \ if (!global || sm->machine ## _state != machine ## _ ## state) { \ sm->changed = TRUE...
2,910
/* */ #ifndef EXT_PASSWORD_I_H #define EXT_PASSWORD_I_H #include "ext_password.h" struct ext_password_backend { const char *name; void * (*init)(const char *params); void (*deinit)(void *ctx); struct wpabuf * (*get)(void *ctx, const char *name); }; struct wpabuf * ext_password_alloc(size_t len); #endif /* EXT...
2,911
/* */ #ifndef BITFIELD_H #define BITFIELD_H struct bitfield; struct bitfield * bitfield_alloc(size_t max_bits); void bitfield_free(struct bitfield *bf); void bitfield_set(struct bitfield *bf, size_t bit); void bitfield_clear(struct bitfield *bf, size_t bit); int bitfield_is_set(struct bitfield *bf, size_t bit); int...
2,912
/* */ #ifndef INCLUDES_H #define INCLUDES_H #include "supplicant_opt.h" #include "esp_private/esp_wifi_private.h" #define AES_SMALL_TABLES #define CONFIG_NO_RANDOM_POOL #define CONFIG_INTERNAL_LIBTOMMATH /* Include possible build time configuration before including anything else */ #ifndef __ets__ #include #inclu...
2,913
h" #elif CONFIG_IDF_TARGET_ESP32C3 #include "esp32c3/rom/ets_sys.h" #elif CONFIG_IDF_TARGET_ESP32C2 #include "esp32c2/rom/ets_sys.h" #elif CONFIG_IDF_TARGET_ESP32C6 #include "esp32c6/rom/ets_sys.h" #elif CONFIG_IDF_TARGET_ESP32C5 #include "esp32c5/rom/ets_sys.h" #elif CONFIG_IDF_TARGET_ESP32H2 #include "esp32h2/rom/ets...
2,913
/* */ #ifndef WPA_SUPPLICANT_I_H #define WPA_SUPPLICANT_I_H #include "drivers/driver.h" #include "common/ieee802_11_defs.h" /* */ struct rrm_data { /* rrm_used - indication regarding the current connection */ unsigned int rrm_used:1; /* */ void (*notify_neighbor_rep)(void *ctx, const u8 *neighbor_rep, size_...
2,914
/* */ #ifndef DEFS_H #define DEFS_H #ifdef FALSE #undef FALSE #endif #ifdef TRUE #undef TRUE #endif typedef enum { FALSE = 0, TRUE = 1 } Boolean; #define WPA_CIPHER_NONE BIT(0) #define WPA_CIPHER_WEP40 BIT(7) #define WPA_CIPHER_WEP104 BIT(8) #define WPA_CIPHER_TKIP ...
2,915
!(akm & (WPA_KEY_MGMT_IEEE8021X | WPA_KEY_MGMT_FT_IEEE8021X | WPA_KEY_MGMT_CCKM | WPA_KEY_MGMT_OSEN | WPA_KEY_MGMT_IEEE8021X_SHA256 | WPA_KEY_MGMT_IEEE8021X_SUITE_B | WPA_KEY_MGMT_IEEE8021X_SUITE_B_192)); #else return 0; #endif } static inline int wpa_key_mgmt_wpa_psk(int akm) { return...
2,915
!(akm & WPA_KEY_MGMT_IEEE8021X_SUITE_B_192); } static inline int wpa_key_mgmt_suite_b(int akm) { return !!(akm & (WPA_KEY_MGMT_IEEE8021X_SUITE_B | WPA_KEY_MGMT_IEEE8021X_SUITE_B_192)); } static inline int wpa_key_mgmt_owe(int akm) { return akm == WPA_KEY_MGMT_OWE; } static inline int wpa_key_mgmt_dpp(int akm) ...
2,915
/* */ #include "os.h" #include "esp_wifi_driver.h" #ifndef WPA_COMMON_H #define WPA_COMMON_H #define WPA_MAX_SSID_LEN 32 /* IEEE 802.11i */ #define PMKID_LEN 16 #define PMK_LEN 32 #define PMK_LEN_MAX 64 #define PMK_LEN_SUITE_B_192 48 #define WPA_REPLAY_COUNTER_LEN 8 #define WPA_NONCE_LEN 32 #define WPA_KEY_RSC_LEN ...
2,917
11, 7.3.2.25.3 RSN Capabilities */ #define WPA_CAPABILITY_PREAUTH BIT(0) #define WPA_CAPABILITY_NO_PAIRWISE BIT(1) /* B2-B3: PTKSA Replay Counter */ /* B4-B5: GTKSA Replay Counter */ #define WPA_CAPABILITY_MFPR BIT(6) #define WPA_CAPABILITY_MFPC BIT(7) #define WPA_CAPABILITY_PEERKEY_ENABLED BIT(9) #define WPA_CAPABILIT...
2,917
11i/RSN only */ #define WPA_KEY_INFO_SMK_MESSAGE BIT(13) struct wpa_eapol_key { u8 type; /* Note: key_info, key_length, and key_data_length are unaligned */ u8 key_info[2]; /* big endian */ u8 key_length[2]; /* big endian */ u8 replay_counter[WPA_REPLAY_COUNTER_LEN]; u8 key_nonce[WPA_NONCE_LEN]; u8 key_iv[16];...
2,917
/* */ #ifndef EAPOL_COMMON_H #define EAPOL_COMMON_H /* IEEE Std 802.1X-2004 */ struct ieee802_1x_hdr { u8 version; u8 type; be16 length; /* followed by length octets of data */ } STRUCT_PACKED; #define EAPOL_VERSION 2 #define SPP_AMSDU_CAP_ENABLE 1 #define SPP_AMSDU_REQ_ENABLE 1 #define SPP_AMSDU_CAP_DISA...
2,918
#ifndef RRM_H #define RRM_H #include "common/defs.h" #include "utils/list.h" #include "esp_wifi_types.h" #define RRM_NEIGHBOR_REPORT_TIMEOUT 1 /* 1 second for AP to send a report */ void wpas_rrm_reset(struct wpa_supplicant *wpa_s); void wpas_rrm_process_neighbor_rep(struct wpa_supplicant *wpa_s, const u8 *re...
2,919
/* */ #ifdef CONFIG_WPA3_SAE #ifndef SAE_H #define SAE_H #include "esp_err.h" #include "utils/includes.h" #include "utils/common.h" #include "utils/wpa_debug.h" #define SAE_KCK_LEN 32 #define SAE_PMK_LEN 32 #define SAE_PMK_LEN_MAX 64 #define SAE_PMKID_LEN 16 #define SAE_KEYSEED_KEY_LEN 32 #define SAE_MAX_PRIME_LEN ...
2,920
c */ #ifdef CONFIG_SAE_PK bool sae_pk_valid_password(const char *pw); #else /* CONFIG_SAE_PK */ static inline bool sae_pk_valid_password(const char *pw) { return false; } #endif /* CONFIG_SAE_PK */ char * sae_pk_base32_encode(const u8 *src, size_t len_bits); u8 * sae_pk_base32_decode(const char *src, size_t len, size_...
2,920
/* */ #ifndef IEEE802_11_COMMON_H #define IEEE802_11_COMMON_H #include "defs.h" #include "ieee802_11_defs.h" #include "esp_wifi_driver.h" struct element { u8 id; u8 datalen; u8 data[]; } STRUCT_PACKED; /* element iteration helpers */ #define for_each_element(_elem, _data, _datalen) \ for...
2,921
/* */ #ifndef WPA_CTRL_H #define WPA_CTRL_H #ifdef __cplusplus extern "C" { #endif /* wpa_supplicant control interface - fixed message prefixes */ /** Interactive request for identity/password/pin */ #define WPA_CTRL_REQ "CTRL-REQ-" /** Response to identity/password/pin request */ #define WPA_CTRL_RSP "CTRL-RSP-...
2,922
g., due to authentication failure) */ #define WPA_EVENT_TEMP_DISABLED "CTRL-EVENT-SSID-TEMP-DISABLED " /** Temporarily disabled network block re-enabled */ #define WPA_EVENT_REENABLED "CTRL-EVENT-SSID-REENABLED " /** New scan results available */ #define WPA_EVENT_SCAN_RESULTS "CTRL-EVENT-SCAN-RESULTS " /** wpa_supplic...
2,922
/* */ #ifndef IEEE802_11_DEFS_H #define IEEE802_11_DEFS_H #include /* IEEE 802.11 defines */ #define WLAN_FC_PVER 0x0003 #define WLAN_FC_TODS 0x0100 #define WLAN_FC_FROMDS 0x0200 #define WLAN_FC_MOREFRAG 0x0400 #define WLAN_FC_RETRY 0x0800 #define WLAN_FC_PWRMGT 0x1000 #define WLAN_FC_MOREDATA 0x2000 #define...
2,923
11-2016, 9.4.1.9, Table 9-46) */ #define WLAN_STATUS_SUCCESS 0 #define WLAN_STATUS_UNSPECIFIED_FAILURE 1 #define WLAN_STATUS_CAPS_UNSUPPORTED 10 #define WLAN_STATUS_REASSOC_NO_ASSOC 11 #define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12 #define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13 #define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 1...
2,923
11-2016, 9.4.1.7, Table 9-45) */ #define WLAN_REASON_UNSPECIFIED 1 #define WLAN_REASON_PREV_AUTH_NOT_VALID 2 #define WLAN_REASON_DEAUTH_LEAVING 3 #define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4 #define WLAN_REASON_DISASSOC_AP_BUSY 5 #define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6 #define WLAN_REASON_CLASS3_FRAME_F...
2,923
11-2016, 9.4.2.1, Table 9-77) */ #define WLAN_EID_SSID 0 #define WLAN_EID_SUPP_RATES 1 #define WLAN_EID_DS_PARAMS 3 #define WLAN_EID_CF_PARAMS 4 #define WLAN_EID_TIM 5 #define WLAN_EID_IBSS_PARAMS 6 #define WLAN_EID_COUNTRY 7 #define WLAN_EID_CHALLENGE 16 #define WLAN_EID_PWR_CONSTRAINT 32 #define WLAN_EID_PWR_CAPABILI...
2,923
11-2016, 9.4.1.11, Table 9-76) */ #define WLAN_ACTION_SPECTRUM_MGMT 0 #define WLAN_ACTION_QOS 1 #define WLAN_ACTION_DLS 2 #define WLAN_ACTION_BLOCK_ACK 3 #define WLAN_ACTION_PUBLIC 4 #define WLAN_ACTION_RADIO_MEASUREMENT 5 #define WLAN_ACTION_FT 6 #define WLAN_ACTION_HT 7 #define WLAN_ACTION_SA_QUERY 8 #define WLAN_ACT...
2,923
11-2012 Table 8-71 - Location subject definition */ enum location_subject { LOCATION_SUBJECT_LOCAL = 0, LOCATION_SUBJECT_REMOTE = 1, LOCATION_SUBJECT_3RD_PARTY = 2, }; /* */ enum lci_req_subelem { LCI_REQ_SUBELEM_AZIMUTH_REQ = 1, LCI_REQ_SUBELEM_ORIGINATOR_MAC_ADDR = 2, LCI_REQ_SUBELEM_TARGET_MAC_ADDR = 3, LCI...
2,923
.B7 */ le16 operation_mode; /* B8..B23 */ le16 param; /* B24..B39 */ u8 basic_mcs_set[16]; } STRUCT_PACKED; #ifdef _MSC_VER #pragma pack(pop) #endif /* _MSC_VER */ #define ERP_INFO_NON_ERP_PRESENT BIT(0) #define ERP_INFO_USE_PROTECTION BIT(1) #define ERP_INFO_BARKER_PREAMBLE_MODE BIT(2) #define OVERLAPPING_BSS_TR...
2,923