input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
wpabuf *ikev2_build_sa_auth(ikev2_responder_data *data) {
wpabuf *msg;
wpabuf *plain;
msg = wpabuf_alloc(data->IDr_len + 1028);
if (!msg)
return 0;
ikev2_build_hdr(data, msg, 0x23u, 0x2Eu, 1u);
plain = wpabuf_alloc(data->IDr_len + 1000);
if (plain) {
if (ikev2_build_idr(data, plain, 0x27u) ||
... | static struct wpabuf *ikev2_build_sa_auth(struct ikev2_responder_data *data) {
struct wpabuf *msg, *plain;
msg = wpabuf_alloc(sizeof(struct ikev2_hdr) + data->IDr_len + 1000);
if (msg == NULL)
return NULL;
ikev2_build_hdr(data, msg, IKE_SA_AUTH, IKEV2_PAYLOAD_ENCRYPTED, 1);
plain = wpabuf_alloc(data->ID... | ikev2_build_sa_auth | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *ikev2_build_sa_init(ikev2_responder_data *data) {
u8 v2;
wpabuf *msg;
wpabuf *plain;
if (os_get_random(data->r_spi, 8u))
return 0;
wpa_hexdump(2, "IKEV2: IKE_SA Responder's SPI", data->r_spi, 8u);
data->r_nonce_len = 16;
if (random_get_bytes(data->r_nonce, data->r_nonce_len))
return 0;
... | static struct wpabuf *ikev2_build_sa_init(struct ikev2_responder_data *data) {
struct wpabuf *msg;
if (os_get_random(data->r_spi, IKEV2_SPI_LEN))
return NULL;
wpa_hexdump(MSG_DEBUG, "IKEV2: IKE_SA Responder's SPI", data->r_spi,
IKEV2_SPI_LEN);
data->r_nonce_len = IKEV2_NONCE_MIN_LEN;
if (r... | ikev2_build_sa_init | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_build_sar1(ikev2_responder_data *data, wpabuf *msg, u8 next_payload) {
unsigned short v3;
unsigned short v4;
unsigned short v5;
ikev2_payload_hdr *phdr;
ikev2_proposal *p;
ikev2_transform *t;
ikev2_transform *ta;
ikev2_transform *tb;
ikev2_transform *tc;
wpa_printf(2, "IKEV2: Adding SAr1 ... | static int ikev2_build_sar1(struct ikev2_responder_data *data,
struct wpabuf *msg, u8 next_payload) {
struct ikev2_payload_hdr *phdr;
size_t plen;
struct ikev2_proposal *p;
struct ikev2_transform *t;
wpa_printf(MSG_DEBUG, "IKEV2: Adding SAr1 payload");
phdr = wpabuf_put(msg, si... | ikev2_build_sar1 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_derive_auth_data(int prf_alg, const wpabuf *sign_msg, const u8 *ID,
size_t ID_len, u8 ID_type, ikev2_keys *keys,
int initiator, const u8 *shared_secret,
size_t shared_secret_len, const u8 *nonce,
size_t... | int ikev2_derive_auth_data(int prf_alg, const struct wpabuf *sign_msg,
const u8 *ID, size_t ID_len, u8 ID_type,
struct ikev2_keys *keys, int initiator,
const u8 *shared_secret, size_t shared_secret_len,
const u8 ... | ikev2_derive_auth_data | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_derive_keys(ikev2_responder_data *data) {
size_t prime_len;
size_t v3;
int ret;
const ikev2_integ_alg *integ;
const ikev2_prf_alg *prf;
const ikev2_encr_alg *encr;
wpabuf *shared;
size_t buf_len;
u8 *buf;
u8 *pos;
u8 *posa;
size_t pad_len;
u8 *pad;
const u8 *addr[2];
size_t len[2... | static int ikev2_derive_keys(struct ikev2_responder_data *data) {
u8 *buf, *pos, *pad, skeyseed[IKEV2_MAX_HASH_LEN];
size_t buf_len, pad_len;
struct wpabuf *shared;
const struct ikev2_integ_alg *integ;
const struct ikev2_prf_alg *prf;
const struct ikev2_encr_alg *encr;
int ret;
const u8 *addr[2];
size... | ikev2_derive_keys | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_parse_payloads(ikev2_payloads *payloads, u8 next_payload,
const u8 *pos, const u8 *end) {
unsigned int plen;
unsigned int pdatalen;
const u8 *pdata;
memset(payloads, 0, sizeof(ikev2_payloads));
while (next_payload) {
wpa_printf(2, "IKEV2: Processing payload %u", next_pa... | int ikev2_parse_payloads(struct ikev2_payloads *payloads, u8 next_payload,
const u8 *pos, const u8 *end) {
const struct ikev2_payload_hdr *phdr;
os_memset(payloads, 0, sizeof(*payloads));
while (next_payload != IKEV2_PAYLOAD_NO_NEXT_PAYLOAD) {
unsigned int plen, pdatalen, left;
... | ikev2_parse_payloads | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_parse_proposal(ikev2_proposal_data *prop, const u8 *pos,
const u8 *end) {
unsigned int i;
signed int proposal_len;
unsigned int num;
int tlen;
const u8 *ppos;
const u8 *pend;
if (end - pos <= 7) {
wpa_printf(3, "IKEV2: Too short proposal");
return -1;
}
prop... | static int ikev2_parse_proposal(struct ikev2_proposal_data *prop, const u8 *pos,
const u8 *end) {
const u8 *pend, *ppos;
int proposal_len;
unsigned int i, num;
const struct ikev2_proposal *p;
if (end - pos < (int)sizeof(*p)) {
wpa_printf(MSG_INFO, "IKEV2: Too short proposa... | ikev2_parse_proposal | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_parse_transform(ikev2_proposal_data *prop, const u8 *pos,
const u8 *end) {
int v4;
u16 v5;
const u8 *posa;
u16 transform_id;
unsigned int transform_len;
const u8 *tend;
if (end - pos <= 7) {
wpa_printf(3, "IKEV2: Too short transform");
return -1;
}
transfor... | static int ikev2_parse_transform(struct ikev2_proposal_data *prop,
const u8 *pos, const u8 *end) {
int transform_len;
const struct ikev2_transform *t;
u16 transform_id;
const u8 *tend;
if (end - pos < (int)sizeof(*t)) {
wpa_printf(MSG_INFO, "IKEV2: Too short transform");
... | ikev2_parse_transform | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_process_auth(ikev2_responder_data *data, const u8 *auth,
size_t auth_len) {
ikev2_responder_data_$1338765C29CDF0D11D96E6293B9185C4 peer_auth;
size_t auth_lena;
const u8 *autha;
u8 auth_method;
if (auth) {
if (auth_len > 3) {
auth_method = *auth;
autha = auth +... | static int ikev2_process_auth(struct ikev2_responder_data *data, const u8 *auth,
size_t auth_len) {
u8 auth_method;
if (auth == NULL) {
wpa_printf(MSG_INFO, "IKEV2: No Authentication Payload");
return -1;
}
if (auth_len < 4) {
wpa_printf(MSG_INFO, "IKEV2: Too short Au... | ikev2_process_auth | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_process_auth_cert(ikev2_responder_data *data, u8 method,
const u8 *auth, size_t auth_len) {
if (method == 1)
return 0;
wpa_printf(3, "IKEV2: Unsupported authentication method %d", method);
return -1;
} | static int ikev2_process_auth_cert(struct ikev2_responder_data *data, u8 method,
const u8 *auth, size_t auth_len) {
if (method != AUTH_RSA_SIGN) {
wpa_printf(MSG_INFO,
"IKEV2: Unsupported authentication "
"method %d",
method);
ret... | ikev2_process_auth_cert | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_process_auth_secret(ikev2_responder_data *data, u8 method,
const u8 *auth, size_t auth_len) {
const ikev2_prf_alg *prf;
u8 auth_data[24];
unsigned long v9;
v9 = __readfsqword(0x28u);
if (method == 2) {
if (ikev2_derive_auth_data(data->proposal.prf, data->i_sign_msg... | static int ikev2_process_auth_secret(struct ikev2_responder_data *data,
u8 method, const u8 *auth,
size_t auth_len) {
u8 auth_data[IKEV2_MAX_HASH_LEN];
const struct ikev2_prf_alg *prf;
if (method != AUTH_SHARED_KEY_MIC) {
wpa_printf(MS... | ikev2_process_auth_secret | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_process_cert(ikev2_responder_data *data, const u8 *cert,
size_t cert_len) {
if (cert) {
if (cert_len) {
wpa_printf(2, "IKEV2: Cert Encoding %d", *cert);
wpa_hexdump(1, "IKEV2: Certificate Data", cert + 1, cert_len - 1);
return 0;
} else {
wpa_printf(3, ... | static int ikev2_process_cert(struct ikev2_responder_data *data, const u8 *cert,
size_t cert_len) {
u8 cert_encoding;
if (cert == NULL) {
if (data->peer_auth == PEER_AUTH_CERT) {
wpa_printf(MSG_INFO, "IKEV2: No Certificate received");
return -1;
}
return 0;
}... | ikev2_process_cert | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_process_idi(ikev2_responder_data *data, const u8 *idi,
size_t idi_len) {
size_t idi_lena;
u8 id_type;
if (idi) {
if (idi_len > 3) {
id_type = *idi;
idi_lena = idi_len - 4;
wpa_printf(2, "IKEV2: IDi ID Type %d", *idi);
wpa_hexdump_ascii(2, "IKEV2: IDi", ... | static int ikev2_process_idi(struct ikev2_responder_data *data, const u8 *idi,
size_t idi_len) {
u8 id_type;
if (idi == NULL) {
wpa_printf(MSG_INFO, "IKEV2: No IDi received");
return -1;
}
if (idi_len < 4) {
wpa_printf(MSG_INFO, "IKEV2: Too short IDi payload");
ret... | ikev2_process_idi | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_process_kei(ikev2_responder_data *data, const u8 *kei,
size_t kei_len) {
u16 group;
if (kei) {
if (kei_len > 0x63) {
group = WPA_GET_BE16_13(kei);
wpa_printf(2, "IKEV2: KEi DH Group #%u", group);
if (group == data->proposal.dh) {
if (data->dh) {
... | static int ikev2_process_kei(struct ikev2_responder_data *data, const u8 *kei,
size_t kei_len) {
u16 group;
if (kei == NULL) {
wpa_printf(MSG_INFO, "IKEV2: KEi not received");
return -1;
}
if (kei_len < 4 + 96) {
wpa_printf(MSG_INFO, "IKEV2: Too short Key Exchange Payl... | ikev2_process_kei | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_process_ni(ikev2_responder_data *data, const u8 *ni, size_t ni_len) {
if (ni) {
if (ni_len > 0xF && ni_len <= 0x100) {
data->i_nonce_len = ni_len;
memcpy(data->i_nonce, ni, ni_len);
wpa_hexdump(1, "IKEV2: Ni", data->i_nonce, data->i_nonce_len);
return 0;
} else {
wpa_pr... | static int ikev2_process_ni(struct ikev2_responder_data *data, const u8 *ni,
size_t ni_len) {
if (ni == NULL) {
wpa_printf(MSG_INFO, "IKEV2: Ni not received");
return -1;
}
if (ni_len < IKEV2_NONCE_MIN_LEN || ni_len > IKEV2_NONCE_MAX_LEN) {
wpa_printf(MSG_INFO, "IKEV2: Inv... | ikev2_process_ni | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_process_sa_auth(ikev2_responder_data *data, const ikev2_hdr *hdr,
ikev2_payloads *pl) {
int ret;
size_t decrypted_len;
u8 *decrypted;
unsigned long v8;
v8 = __readfsqword(0x28u);
decrypted = ikev2_decrypt_payload(data->proposal.encr, data->proposal.integ,
... | static int ikev2_process_sa_auth(struct ikev2_responder_data *data,
const struct ikev2_hdr *hdr,
struct ikev2_payloads *pl) {
u8 *decrypted;
size_t decrypted_len;
int ret;
decrypted = ikev2_decrypt_payload(data->proposal.encr, data->proposal.int... | ikev2_process_sa_auth | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_process_sa_auth_decrypted(ikev2_responder_data *data, u8 next_payload,
u8 *payload, size_t payload_len) {
ikev2_payloads pl;
unsigned long v8;
v8 = __readfsqword(0x28u);
wpa_printf(2, "IKEV2: Processing decrypted payloads");
if (ikev2_parse_payloads(&pl, next_pay... | static int ikev2_process_sa_auth_decrypted(struct ikev2_responder_data *data,
u8 next_payload, u8 *payload,
size_t payload_len) {
struct ikev2_payloads pl;
wpa_printf(MSG_DEBUG, "IKEV2: Processing decrypted payloads");
if (ike... | ikev2_process_sa_auth_decrypted | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_process_sa_init(ikev2_responder_data *data, const ikev2_hdr *hdr,
ikev2_payloads *pl) {
if (ikev2_process_sai1(data, pl->sa, pl->sa_len) < 0 ||
ikev2_process_kei(data, pl->ke, pl->ke_len) < 0 ||
ikev2_process_ni(data, pl->nonce, pl->nonce_len) < 0) {
return -1;
}
... | static int ikev2_process_sa_init(struct ikev2_responder_data *data,
const struct ikev2_hdr *hdr,
struct ikev2_payloads *pl) {
if (ikev2_process_sai1(data, pl->sa, pl->sa_len) < 0 ||
ikev2_process_kei(data, pl->ke, pl->ke_len) < 0 ||
ikev2_p... | ikev2_process_sa_init | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_process_sai1(ikev2_responder_data *data, const u8 *sai1,
size_t sai1_len) {
int found;
int plen;
const u8 *pos;
const u8 *end;
ikev2_proposal_data prop;
unsigned long v10;
v10 = __readfsqword(0x28u);
found = 0;
if (sai1) {
memset(&prop, 0, sizeof(prop));
prop.... | static int ikev2_process_sai1(struct ikev2_responder_data *data, const u8 *sai1,
size_t sai1_len) {
struct ikev2_proposal_data prop;
const u8 *pos, *end;
int found = 0;
if (sai1 == NULL) {
wpa_printf(MSG_INFO, "IKEV2: SAi1 not received");
return -1;
}
os_memset(&prop,... | ikev2_process_sai1 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *ikev2_responder_build(ikev2_responder_data *data) {
wpabuf *result;
switch (data->state) {
case SA_INIT:
result = ikev2_build_sa_init(data);
break;
case SA_AUTH:
result = ikev2_build_sa_auth(data);
break;
case CHILD_SA:
result = 0;
break;
case NOTIFY:
result = ikev2_buil... | struct wpabuf *ikev2_responder_build(struct ikev2_responder_data *data) {
switch (data->state) {
case SA_INIT:
return ikev2_build_sa_init(data);
case SA_AUTH:
return ikev2_build_sa_auth(data);
case CHILD_SA:
return NULL;
case NOTIFY:
return ikev2_build_notify(data);
case IKEV2_DONE:
case I... | ikev2_responder_build | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void ikev2_responder_deinit(ikev2_responder_data *data) {
ikev2_free_keys(&data->keys);
wpabuf_free(data->i_dh_public);
wpabuf_free(data->r_dh_private);
free(data->IDi);
free(data->IDr);
free(data->shared_secret);
wpabuf_free(data->i_sign_msg);
wpabuf_free(data->r_sign_msg);
free(data->key_pad);
} | void ikev2_responder_deinit(struct ikev2_responder_data *data) {
ikev2_free_keys(&data->keys);
wpabuf_free(data->i_dh_public);
wpabuf_free(data->r_dh_private);
os_free(data->IDi);
os_free(data->IDr);
os_free(data->shared_secret);
wpabuf_free(data->i_sign_msg);
wpabuf_free(data->r_sign_msg);
os_free(da... | ikev2_responder_deinit | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_responder_process(ikev2_responder_data *data, const wpabuf *buf) {
size_t v2;
const u8 *v4;
size_t v5;
u32 message_id;
u32 length;
const ikev2_hdr *hdr;
const u8 *end;
ikev2_payloads pl;
unsigned long v11;
v11 = __readfsqword(0x28u);
v2 = wpabuf_len_34(buf);
wpa_printf(1, "IKEV2: Rece... | int ikev2_responder_process(struct ikev2_responder_data *data,
const struct wpabuf *buf) {
const struct ikev2_hdr *hdr;
u32 length, message_id;
const u8 *pos, *end;
struct ikev2_payloads pl;
wpa_printf(MSG_MSGDUMP, "IKEV2: Received message (len %lu)",
(unsigned long)w... | ikev2_responder_process | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void ikev2_update_hdr(wpabuf *msg) {
u32 v1;
ikev2_hdr *hdr;
hdr = (ikev2_hdr *)wpabuf_mhead_6(msg);
v1 = wpabuf_len_36(msg);
WPA_PUT_BE32_17(hdr->length, v1);
} | void ikev2_update_hdr(struct wpabuf *msg) {
struct ikev2_hdr *hdr;
hdr = wpabuf_mhead(msg);
WPA_PUT_BE32(hdr->length, wpabuf_len(msg));
} | ikev2_update_hdr | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int ikev2_validate_rx_state(ikev2_responder_data *data, u8 exchange_type,
u32 message_id) {
ikev2_responder_data_$C30DED4CAD751995D6FCDF0CF6FAC30D state;
state = data->state;
if (data->state <= (unsigned int)IKEV2_FAILED) {
if ((unsigned int)state >= NOTIFY)
return -1;
i... | static int ikev2_validate_rx_state(struct ikev2_responder_data *data,
u8 exchange_type, u32 message_id) {
switch (data->state) {
case SA_INIT:
if (exchange_type != IKE_SA_INIT) {
wpa_printf(MSG_INFO,
"IKEV2: Unexpected Exchange Type "
"... | ikev2_validate_rx_state | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int in_array(int *array, int val) {
int i;
if (!array)
return 0;
for (i = 0; array[i]; ++i) {
if (val == array[i])
return 1;
}
return 0;
} | static int in_array(int *array, int val) {
int i;
if (array == NULL)
return 0;
for (i = 0; array[i]; i++) {
if (array[i] == val)
return 1;
}
return 0;
} | in_array | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void int_array_add_unique(int **res, int a) {
size_t reslen;
int *n;
for (reslen = 0; *res && (*res)[reslen]; ++reslen) {
if (a == (*res)[reslen])
return;
}
if (reslen <= 0xFFFFFFFFFFFFFFFDLL &&
(n = (int *)os_realloc_array_1(*res, reslen + 2, 4u)) != 0) {
n[reslen] = a;
n[reslen + 1]... | void int_array_add_unique(int **res, int a) {
size_t reslen, max_size;
int *n;
for (reslen = 0; *res && (*res)[reslen]; reslen++) {
if ((*res)[reslen] == a)
return;
}
max_size = (size_t)-1;
if (reslen > max_size - 2) {
os_free(*res);
*res = NULL;
return;
}
n = os_realloc_array(*... | int_array_add_unique | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void int_array_concat(int **res, const int *a) {
size_t i;
size_t reslen;
unsigned long alen;
int *n;
reslen = int_array_len(*res);
alen = int_array_len(a);
if (alen < -1LL - reslen &&
(n = (int *)os_realloc_array_1(*res, reslen + alen + 1, 4u)) != 0) {
for (i = 0; i <= alen; ++i)
n[resle... | void int_array_concat(int **res, const int *a) {
size_t reslen, alen, i, max_size;
int *n;
reslen = int_array_len(*res);
alen = int_array_len(a);
max_size = (size_t)-1;
if (alen >= max_size - reslen) {
os_free(*res);
*res = NULL;
return;
}
n = os_realloc_array(*res, reslen + alen + 1, size... | int_array_concat | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int integrate_with_eloop(wpas_dbus_priv *priv) {
if ((unsigned int)dbus_connection_set_watch_functions(
priv->con, add_watch, remove_watch, watch_toggled, priv, 0) &&
(unsigned int)dbus_connection_set_timeout_functions(
priv->con, add_timeout, remove_timeout, timeout_toggled, priv, 0)) {
... | static int integrate_with_eloop(struct wpas_dbus_priv *priv) {
if (!dbus_connection_set_watch_functions(priv->con, add_watch, remove_watch,
watch_toggled, priv, NULL) ||
!dbus_connection_set_timeout_functions(priv->con, add_timeout,
... | integrate_with_eloop | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
unsigned int interpolate_rate(int snr, int snr0, int snr1, int rate0,
int rate1) {
return (snr - snr0) * (rate1 - rate0) / (snr1 - snr0) + rate0;
} | static unsigned int interpolate_rate(int snr, int snr0, int snr1, int rate0,
int rate1) {
return rate0 + (snr - snr0) * (rate1 - rate0) / (snr1 - snr0);
} | interpolate_rate | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void interworking_anqp_resp_cb(void *ctx, const u8 *dst, u8 dialog_token,
gas_query_result result, const wpabuf *adv_proto,
const wpabuf *resp, u16 status_code) {
wpa_printf(2,
"ANQP: Response callback dst=%02x:%02x:%02x:%02x:%02x:%02x "
... | static void interworking_anqp_resp_cb(void *ctx, const u8 *dst, u8 dialog_token,
enum gas_query_result result,
const struct wpabuf *adv_proto,
const struct wpabuf *resp,
... | interworking_anqp_resp_cb | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int interworking_anqp_send_req(wpa_supplicant *wpa_s, wpa_bss *bss) {
size_t v2;
size_t v3;
size_t v4;
size_t v5;
size_t v6;
int ret;
_BOOL4 all;
int res;
size_t num_info_ids;
wpabuf *extra;
u8 *len_pos;
wpabuf *buf;
u16 info_ids[12];
unsigned long v16;
v16 = __readfsqword(0x28u);
ret =... | static int interworking_anqp_send_req(struct wpa_supplicant *wpa_s,
struct wpa_bss *bss) {
struct wpabuf *buf;
int ret = 0;
int res;
u16 info_ids[8];
size_t num_info_ids = 0;
struct wpabuf *extra = NULL;
int all = wpa_s->fetch_all_anqp;
wpa_msg(wpa_s, MSG_DEBUG, "I... | interworking_anqp_send_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int interworking_connect(wpa_supplicant *wpa_s, wpa_bss *bss, int only_add) {
wpabuf *nai_realm;
u8 *v5;
const char *v6;
int method;
nai_realm_eap_auth_inner_non_eap inner_non_eap;
eap_type v9;
u16 count;
u16 i;
int excluded;
wpa_cred *cred;
wpa_cred *cred_rc;
wpa_cred *cred_3gpp;
nai_realm_ea... | int interworking_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
int only_add) {
struct wpa_cred *cred, *cred_rc, *cred_3gpp;
struct wpa_ssid *ssid;
struct nai_realm *realm;
struct nai_realm_eap *eap = NULL;
u16 count, i;
char buf[100];
int excluded = 0, *excl = &exclud... | interworking_connect | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int interworking_connect_3gpp(wpa_supplicant *wpa_s, wpa_cred *cred,
wpa_bss *bss, int only_add) {
return -1;
} | static int interworking_connect_3gpp(struct wpa_supplicant *wpa_s,
struct wpa_cred *cred, struct wpa_bss *bss,
int only_add) {
#ifdef INTERWORKING_3GPP
struct wpa_ssid *ssid;
int eap_type;
int res;
char prefix;
if (bss->anqp == NULL ||... | interworking_connect_3gpp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int interworking_connect_roaming_consortium(wpa_supplicant *wpa_s,
wpa_cred *cred, wpa_bss *bss,
int only_add) {
wpabuf *roaming_consortium;
_BOOL4 v6;
unsigned int i;
wpa_ssid *ssid;
const u8 *ie;
const wpabuf *anqp;
... | static int interworking_connect_roaming_consortium(struct wpa_supplicant *wpa_s,
struct wpa_cred *cred,
struct wpa_bss *bss,
int only_add) {
struct wpa_ssid *ssid;
... | interworking_connect_roaming_consortium | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void interworking_continue_anqp(void *eloop_ctx, void *sock_ctx) {
interworking_next_anqp_fetch((wpa_supplicant *)eloop_ctx);
} | static void interworking_continue_anqp(void *eloop_ctx, void *sock_ctx) {
struct wpa_supplicant *wpa_s = eloop_ctx;
interworking_next_anqp_fetch(wpa_s);
} | interworking_continue_anqp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpa_cred *interworking_credentials_available(wpa_supplicant *wpa_s,
wpa_bss *bss, int *excluded) {
wpa_cred *cred;
if (excluded)
*excluded = 0;
cred = interworking_credentials_available_helper(wpa_s, bss, 0, excluded);
if (cred)
return cred;
else
retur... | static struct wpa_cred *
interworking_credentials_available(struct wpa_supplicant *wpa_s,
struct wpa_bss *bss, int *excluded) {
struct wpa_cred *cred;
if (excluded)
*excluded = 0;
cred = interworking_credentials_available_helper(wpa_s, bss, 0, excluded);
if (cred)
ret... | interworking_credentials_available | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpa_cred *interworking_credentials_available_3gpp(wpa_supplicant *wpa_s,
wpa_bss *bss, int ignore_bw,
int *excluded) {
return 0;
} | static struct wpa_cred *
interworking_credentials_available_3gpp(struct wpa_supplicant *wpa_s,
struct wpa_bss *bss, int ignore_bw,
int *excluded) {
struct wpa_cred *selected = NULL;
#ifdef INTERWORKING_3GPP
struct wpa_cred *cred;
int ... | interworking_credentials_available_3gpp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpa_cred *interworking_credentials_available_helper(wpa_supplicant *wpa_s,
wpa_bss *bss, int ignore_bw,
int *excluded) {
int excluded1;
int excluded2;
wpa_cred *cred;
wpa_cred *cred2;
unsigned long v11;
... | static struct wpa_cred *
interworking_credentials_available_helper(struct wpa_supplicant *wpa_s,
struct wpa_bss *bss, int ignore_bw,
int *excluded) {
struct wpa_cred *cred, *cred2;
int excluded1, excluded2 = 0;
if (disallowed_bss... | interworking_credentials_available_helper | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpa_cred *interworking_credentials_available_realm(wpa_supplicant *wpa_s,
wpa_bss *bss, int ignore_bw,
int *excluded) {
u16 count;
u16 i;
int is_excluded;
wpa_cred *cred;
wpa_cred *selected;
nai_realm *real... | static struct wpa_cred *
interworking_credentials_available_realm(struct wpa_supplicant *wpa_s,
struct wpa_bss *bss, int ignore_bw,
int *excluded) {
struct wpa_cred *cred, *selected = NULL;
struct nai_realm *realm;
u16 count, i;
i... | interworking_credentials_available_realm | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpa_cred *interworking_credentials_available_roaming_consortium(
wpa_supplicant *wpa_s, wpa_bss *bss, int ignore_bw, int *excluded) {
wpabuf *roaming_consortium;
int is_excluded;
wpa_cred *cred;
wpa_cred *selected;
const u8 *ie;
const wpabuf *anqp;
selected = 0;
is_excluded = 0;
ie = wpa_bss_get_... | static struct wpa_cred *interworking_credentials_available_roaming_consortium(
struct wpa_supplicant *wpa_s, struct wpa_bss *bss, int ignore_bw,
int *excluded) {
struct wpa_cred *cred, *selected = NULL;
const u8 *ie;
const struct wpabuf *anqp;
int is_excluded = 0;
ie = wpa_bss_get_ie(bss, WLAN_EID_RO... | interworking_credentials_available_roaming_consortium | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int interworking_fetch_anqp(wpa_supplicant *wpa_s) {
if ((*((_BYTE *)wpa_s + 3464) & 1) != 0 ||
(*((_BYTE *)wpa_s + 3464) & 2) != 0)
return 0;
*((_BYTE *)wpa_s + 3464) &= ~2u;
*((_BYTE *)wpa_s + 3464) |= 0x20u;
*((_BYTE *)wpa_s + 3464) &= ~0x40u;
interworking_start_fetch_anqp(wpa_s);
return 0;
} | int interworking_fetch_anqp(struct wpa_supplicant *wpa_s) {
if (wpa_s->fetch_anqp_in_progress || wpa_s->network_select)
return 0;
wpa_s->network_select = 0;
wpa_s->fetch_all_anqp = 1;
wpa_s->fetch_osu_info = 0;
interworking_start_fetch_anqp(wpa_s);
return 0;
} | interworking_fetch_anqp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int interworking_find_network_match(wpa_supplicant *wpa_s) {
wpa_supplicant *bss;
wpa_ssid *ssid;
for (bss = (wpa_supplicant *)wpa_s->bss.next;
bss != (wpa_supplicant *)&wpa_s->bss;
bss = (wpa_supplicant *)bss->global) {
for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) {
if (!wpas_... | static int interworking_find_network_match(struct wpa_supplicant *wpa_s) {
struct wpa_bss *bss;
struct wpa_ssid *ssid;
dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) {
for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) {
if (wpas_network_disabled(wpa_s, ssid) || ssid->mode != WPAS_MODE_I... | interworking_find_network_match | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int interworking_home_sp(wpa_supplicant *wpa_s, wpabuf *domain_names) {
int res;
wpa_cred *cred;
if (!domain_names || !wpa_s->conf->cred)
return -1;
for (cred = wpa_s->conf->cred; cred; cred = cred->next) {
res = interworking_home_sp_cred(wpa_s, cred, domain_names);
if (res)
return res;
}
... | static int interworking_home_sp(struct wpa_supplicant *wpa_s,
struct wpabuf *domain_names) {
struct wpa_cred *cred;
if (domain_names == NULL || wpa_s->conf->cred == NULL)
return -1;
for (cred = wpa_s->conf->cred; cred; cred = cred->next) {
int res = interworking_home_sp_c... | interworking_home_sp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int interworking_home_sp_cred(wpa_supplicant *wpa_s, wpa_cred *cred,
wpabuf *domain_names) {
size_t i;
if (!domain_names || !cred->domain)
return -1;
for (i = 0; i < cred->num_domain; ++i) {
wpa_msg(wpa_s, 2, "Interworking: Search for match with home SP FQDN %s",
... | int interworking_home_sp_cred(struct wpa_supplicant *wpa_s,
struct wpa_cred *cred,
struct wpabuf *domain_names) {
size_t i;
int ret = -1;
#ifdef INTERWORKING_3GPP
char nai[100], *realm;
char *imsi = NULL;
int mnc_len = 0;
if (cred->imsi)
imsi ... | interworking_home_sp_cred | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpa_bss_anqp *interworking_match_anqp_info(wpa_supplicant *wpa_s,
wpa_bss *bss) {
wpa_bss *other;
if (is_zero_ether_addr_7(bss->hessid))
return 0;
for (other = (wpa_bss *)wpa_s->bss.next; other != (wpa_bss *)&wpa_s->bss;
other = (wpa_bss *)other->list.next) {... | static struct wpa_bss_anqp *
interworking_match_anqp_info(struct wpa_supplicant *wpa_s,
struct wpa_bss *bss) {
struct wpa_bss *other;
if (is_zero_ether_addr(bss->hessid))
return NULL;
dl_list_for_each(other, &wpa_s->bss, struct wpa_bss, list) {
if (other == bss)
contin... | interworking_match_anqp_info | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void interworking_next_anqp_fetch(wpa_supplicant *wpa_s) {
int found;
wpa_bss *bss;
found = 0;
wpa_printf(2,
"Interworking: next_anqp_fetch - fetch_anqp_in_progress=%d "
"fetch_osu_icon_in_progress=%d",
*((_BYTE *)wpa_s + 3464) & 1, *((_BYTE *)wpa_s + 3465) & 1);
if (!e... | static void interworking_next_anqp_fetch(struct wpa_supplicant *wpa_s) {
struct wpa_bss *bss;
int found = 0;
wpa_printf(MSG_DEBUG,
"Interworking: next_anqp_fetch - "
"fetch_anqp_in_progress=%d fetch_osu_icon_in_progress=%d",
wpa_s->fetch_anqp_in_progress, wpa_s->fetch_osu_i... | interworking_next_anqp_fetch | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void interworking_parse_rx_anqp_resp(wpa_supplicant *wpa_s, wpa_bss *bss,
const u8 *sa, u16 info_id, const u8 *data,
size_t slen, u8 dialog_token) {
u8 *v7;
u32 v8;
int v9;
size_t slenb;
size_t slenc;
u8 type;
bool protected_respons... | static void interworking_parse_rx_anqp_resp(struct wpa_supplicant *wpa_s,
struct wpa_bss *bss, const u8 *sa,
u16 info_id, const u8 *data,
size_t slen, u8 dialog_token) {
const u8 *pos = ... | interworking_parse_rx_anqp_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void interworking_parse_venue_url(wpa_supplicant *wpa_s, const u8 *data,
size_t len) {
u8 *v3;
u8 *v4;
u8 slen;
u8 num;
const u8 *pos;
const u8 *posa;
const u8 *posb;
const u8 *end;
char url[264];
unsigned long v12;
v12 = __readfsqword(0x28u);
pos = data;
end... | static void interworking_parse_venue_url(struct wpa_supplicant *wpa_s,
const u8 *data, size_t len) {
const u8 *pos = data, *end = data + len;
char url[255];
while (end - pos >= 2) {
u8 slen, num;
slen = *pos++;
if (slen < 1 || slen > end - pos) {
wpa_pr... | interworking_parse_venue_url | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void interworking_process_assoc_resp(wpa_supplicant_0 *wpa_s, const u8 *ies,
size_t ies_len) {
ieee802_11_elems elems;
unsigned long v4;
v4 = __readfsqword(0x28u);
if (ies && ieee802_11_parse_elems(ies, ies_len, &elems, 1) != ParseFailed) {
if (elems.qos_map_set)
... | static void interworking_process_assoc_resp(struct wpa_supplicant *wpa_s,
const u8 *ies, size_t ies_len) {
struct ieee802_11_elems elems;
if (ies == NULL)
return;
if (ieee802_11_parse_elems(ies, ies_len, &elems, 1) == ParseFailed)
return;
if (elems.qos_map_... | interworking_process_assoc_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void interworking_reconnect(wpa_supplicant *wpa_s) {
unsigned int tried;
if (wpa_s->wpa_state > (unsigned int)wpa_states_WPA_SCANNING) {
wpa_supplicant_cancel_sched_scan(wpa_s);
*((_BYTE *)wpa_s + 3630) |= 0x20u;
wpa_supplicant_deauthenticate(wpa_s, 3u);
}
wpa_s->disconnected = 0;
wpa_s->reassoci... | static void interworking_reconnect(struct wpa_supplicant *wpa_s) {
unsigned int tried;
if (wpa_s->wpa_state >= WPA_AUTHENTICATING) {
wpa_supplicant_cancel_sched_scan(wpa_s);
wpa_s->own_disconnect_req = 1;
wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
}
wpa_s->disconnected = 0;
... | interworking_reconnect | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void interworking_scan_res_handler(wpa_supplicant *wpa_s,
wpa_scan_results *scan_res) {
wpa_msg(wpa_s, 2, "Interworking: Scan results available - start ANQP fetch");
interworking_start_fetch_anqp(wpa_s);
} | static void interworking_scan_res_handler(struct wpa_supplicant *wpa_s,
struct wpa_scan_results *scan_res) {
wpa_msg(wpa_s, MSG_DEBUG,
"Interworking: Scan results available - start ANQP fetch");
interworking_start_fetch_anqp(wpa_s);
} | interworking_scan_res_handler | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int interworking_select(wpa_supplicant *wpa_s, int auto_select, int *freqs) {
interworking_stop_fetch_anqp(wpa_s);
*((_BYTE *)wpa_s + 3464) |= 2u;
*((_BYTE *)wpa_s + 3464) &= ~8u;
*((_BYTE *)wpa_s + 3464) =
(4 * (auto_select != 0)) | *((_BYTE *)wpa_s + 3464) & 0xFB;
*((_BYTE *)wpa_s + 3464) &= ~0x20u;
... | int interworking_select(struct wpa_supplicant *wpa_s, int auto_select,
int *freqs) {
interworking_stop_fetch_anqp(wpa_s);
wpa_s->network_select = 1;
wpa_s->auto_network_select = 0;
wpa_s->auto_select = !!auto_select;
wpa_s->fetch_all_anqp = 0;
wpa_s->fetch_osu_info = 0;
wpa_msg(wpa... | interworking_select | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void interworking_select_network(wpa_supplicant *wpa_s) {
wpabuf *domain_name;
int excluded;
unsigned int count;
int res;
int bh_0;
int bss_load;
int conn_capab;
wpa_bss *bss;
wpa_bss *selected;
wpa_bss *selected_home;
wpa_bss *selected2;
wpa_bss *selected2_home;
const char *type;
wpa_cred *... | static void interworking_select_network(struct wpa_supplicant *wpa_s) {
struct wpa_bss *bss, *selected = NULL, *selected_home = NULL;
struct wpa_bss *selected2 = NULL, *selected2_home = NULL;
unsigned int count = 0;
const char *type;
int res;
struct wpa_cred *cred, *selected_cred = NULL;
struct wpa_cred *... | interworking_select_network | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int interworking_set_eap_params(wpa_ssid *ssid, wpa_cred *cred, int ttls) {
_BOOL4 v3;
size_t v5;
int res;
char *anon;
char *pos;
size_t buflen_0;
size_t buflen;
size_t buflen_1;
char *id;
if (cred->eap_method) {
v3 = !cred->eap_method->vendor && cred->eap_method->method == 21;
ttls = v3;
... | static int interworking_set_eap_params(struct wpa_ssid *ssid,
struct wpa_cred *cred, int ttls) {
if (cred->eap_method) {
ttls = cred->eap_method->vendor == EAP_VENDOR_IETF &&
cred->eap_method->method == EAP_TYPE_TTLS;
os_free(ssid->eap.eap_methods);
ssid-... | interworking_set_eap_params | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int interworking_set_hs20_params(wpa_supplicant *wpa_s, wpa_ssid *ssid) {
const char *v2;
const char *v3;
const char *v4;
const char *key_mgmt;
wpa_driver_capa capa;
unsigned long v8;
v8 = __readfsqword(0x28u);
key_mgmt = 0;
if (!wpa_drv_get_capa_0(wpa_s, &capa) &&
(capa.key_mgmt_iftype[0] & 0x... | static int interworking_set_hs20_params(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid) {
const char *key_mgmt = NULL;
#ifdef CONFIG_IEEE80211R
int res;
struct wpa_driver_capa capa;
res = wpa_drv_get_capa(wpa_s, &capa);
if (res == 0 &&
capa.key_mgmt_iftype[W... | interworking_set_hs20_params | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void interworking_start_fetch_anqp(wpa_supplicant *wpa_s) {
wpa_bss *bss;
for (bss = (wpa_bss *)wpa_s->bss.next; bss != (wpa_bss *)&wpa_s->bss;
bss = (wpa_bss *)bss->list.next)
bss->flags &= ~0x40u;
*((_BYTE *)wpa_s + 3464) |= 1u;
eloop_register_timeout(
0, 0, (eloop_timeout_handler)interworki... | void interworking_start_fetch_anqp(struct wpa_supplicant *wpa_s) {
struct wpa_bss *bss;
dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) bss->flags &=
~WPA_BSS_ANQP_FETCH_TRIED;
wpa_s->fetch_anqp_in_progress = 1;
eloop_register_timeout(0, 0, interworking_continue_anqp, wpa_s, NULL);
} | interworking_start_fetch_anqp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void interworking_stop_fetch_anqp(wpa_supplicant *wpa_s) {
if ((*((_BYTE *)wpa_s + 3464) & 1) != 0)
*((_BYTE *)wpa_s + 3464) &= ~1u;
} | void interworking_stop_fetch_anqp(struct wpa_supplicant *wpa_s) {
if (!wpa_s->fetch_anqp_in_progress)
return;
wpa_s->fetch_anqp_in_progress = 0;
} | interworking_stop_fetch_anqp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
be16 ip_checksum(const void *buf, size_t len) {
uint16_t *v2;
u32 sum;
sum = 0;
while (len > 1) {
v2 = (uint16_t *)buf;
buf = (char *)buf + 2;
sum += ntohs(*v2);
len -= 2LL;
}
if (len)
sum += ntohs(*(_WORD *)buf << 8);
return htons(~(((unsigned int)(HIWORD(sum) + (unsigned short)sum) ... | static be16 ip_checksum(const void *buf, size_t len) {
u32 sum = 0;
const u16 *pos;
for (pos = buf; len >= 2; len -= 2)
sum += ntohs(*pos++);
if (len)
sum += ntohs(*pos << 8);
sum = (sum >> 16) + (sum & 0xffff);
sum += sum >> 16;
return htons(~sum);
} | ip_checksum | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int is_hs20_network(wpa_supplicant *wpa_s, wpa_ssid *ssid, wpa_bss *bss) {
if (!wpa_s->conf->hs20 || !ssid)
return 0;
if (ssid->parent_cred)
return 1;
if (bss && !wpa_bss_get_vendor_ie(bss, 0x506F9A10u))
return 0;
if ((ssid->key_mgmt & 1) == 0)
return 0;
if ((ssid->pairwise_cipher & 0x10) != 0... | int is_hs20_network(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
struct wpa_bss *bss) {
if (!wpa_s->conf->hs20 || !ssid)
return 0;
if (ssid->parent_cred)
return 1;
if (bss && !wpa_bss_get_vendor_ie(bss, HS20_IE_VENDOR_TYPE))
return 0;
if (!(ssid->key_mgmt & WPA_KEY_MGM... | is_hs20_network | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int is_in_chanlist(hostapd_iface *iface, hostapd_channel_data *chan) {
if (iface->conf->acs_ch_list.num)
return freq_range_list_includes(&iface->conf->acs_ch_list, chan->chan);
else
return 1;
} | static int is_in_chanlist(struct hostapd_iface *iface,
struct hostapd_channel_data *chan) {
if (!iface->conf->acs_ch_list.num)
return 1;
return freq_range_list_includes(&iface->conf->acs_ch_list, chan->chan);
} | is_in_chanlist | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
bool is_p2p_pending_bss(wpa_supplicant *wpa_s, wpa_bss *bss) { return 0; } | static bool is_p2p_pending_bss(struct wpa_supplicant *wpa_s,
struct wpa_bss *bss) {
#ifdef CONFIG_P2P
u8 addr[ETH_ALEN];
if (os_memcmp(bss->bssid, wpa_s->pending_join_iface_addr, ETH_ALEN) == 0)
return true;
if (!is_zero_ether_addr(wpa_s->pending_join_dev_addr) &&
p2p_par... | is_p2p_pending_bss | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int is_signature_correct(DBusMessage *message,
const wpa_dbus_method_desc *method_dsc) {
int ret;
char *pos;
wpa_dbus_argument *arg;
const char *sig;
char registered_sig[256];
_QWORD v8[2];
v8[1] = __readfsqword(0x28u);
sig = (const char *)dbus_message_get_signature(message);
... | static int is_signature_correct(DBusMessage *message,
const struct wpa_dbus_method_desc *method_dsc) {
#define MAX_SIG_LEN 256
char registered_sig[MAX_SIG_LEN], *pos;
const char *sig = dbus_message_get_signature(message);
int ret;
const struct wpa_dbus_argument *arg;
pos = re... | is_signature_correct | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int json_check_tree_state(json_token *token) {
char *name;
if (!token)
return 0;
if (json_check_tree_state(token->child) < 0 ||
json_check_tree_state(token->sibling) < 0)
return -1;
if (token->state == json_parsing_state_JSON_COMPLETED)
return 0;
if (token->name)
name = token->name;
e... | static int json_check_tree_state(struct json_token *token) {
if (!token)
return 0;
if (json_check_tree_state(token->child) < 0 ||
json_check_tree_state(token->sibling) < 0)
return -1;
if (token->state != JSON_COMPLETED) {
wpa_printf(MSG_DEBUG, "JSON: Unexpected token state %d (name=%s type=%d)",... | json_check_tree_state | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void json_end_array(wpabuf *json) { wpabuf_put_u8_52(json, 0x5Du); } | void json_end_array(struct wpabuf *json) { wpabuf_put_u8(json, ']'); } | json_end_array | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void json_end_object(wpabuf *json) { wpabuf_put_u8_52(json, 0x7Du); } | void json_end_object(struct wpabuf *json) { wpabuf_put_u8(json, '}'); } | json_end_object | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void json_print_token(json_token *token, int depth, char *buf, size_t buflen) {
char *name;
const char *v5;
int ret;
size_t len;
if (token) {
len = strlen(buf);
if (token->name)
name = token->name;
else
name = (char *)&unk_29E21C;
v5 = json_type_str(token->type);
ret = snprint... | static void json_print_token(struct json_token *token, int depth, char *buf,
size_t buflen) {
size_t len;
int ret;
if (!token)
return;
len = os_strlen(buf);
ret = os_snprintf(buf + len, buflen - len, "[%d:%s:%s]", depth,
json_type_str(token->type), token->... | json_print_token | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void json_start_array(wpabuf *json, const char *name) {
if (name)
wpabuf_printf(json, "\"%s\":", name);
wpabuf_put_u8_52(json, 0x5Bu);
} | void json_start_array(struct wpabuf *json, const char *name) {
if (name)
wpabuf_printf(json, "\"%s\":", name);
wpabuf_put_u8(json, '[');
} | json_start_array | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void json_start_object(wpabuf *json, const char *name) {
if (name)
wpabuf_printf(json, "\"%s\":", name);
wpabuf_put_u8_52(json, 0x7Bu);
} | void json_start_object(struct wpabuf *json, const char *name) {
if (name)
wpabuf_printf(json, "\"%s\":", name);
wpabuf_put_u8(json, '{');
} | json_start_object | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void json_value_sep(wpabuf *json) { wpabuf_put_u8_52(json, 0x2Cu); } | void json_value_sep(struct wpabuf *json) { wpabuf_put_u8(json, ','); } | json_value_sep | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void l2_packet_receive(int sock, void *eloop_ctx, void *sock_ctx) {
int *v3;
char *v4;
u8 *last_hash;
long v6;
socklen_t fromlen;
int res;
l2_packet_data *l2;
const l2_ethhdr *eth;
const u8 *addr[1];
size_t len[1];
sockaddr_ll ll;
u8 hash[20];
u8 buf[2300];
unsigned long v16;
v16 = __read... | static void l2_packet_receive(int sock, void *eloop_ctx, void *sock_ctx) {
struct l2_packet_data *l2 = eloop_ctx;
u8 buf[2300];
int res;
struct sockaddr_ll ll;
socklen_t fromlen;
os_memset(&ll, 0, sizeof(ll));
fromlen = sizeof(ll);
res = recvfrom(sock, buf, sizeof(buf), 0, (struct sockaddr *)&ll, &from... | l2_packet_receive | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void license() {
printf(
"%s\n\n%s%s%s%s%s\n",
"wpa_supplicant v2.10\nCopyright (c) 2003-2022, Jouni Malinen <j@w1.fi> "
"and contributors",
byte_29ED55,
"This software may be distributed under the terms of the BSD license.\n"
"\n"
"Redistribution and use in source and binary... | static void license(void) {
#ifndef CONFIG_NO_STDOUT_DEBUG
printf("%s\n\n%s%s%s%s%s\n", wpa_supplicant_version,
wpa_supplicant_full_license1, wpa_supplicant_full_license2,
wpa_supplicant_full_license3, wpa_supplicant_full_license4,
wpa_supplicant_full_license5);
#endif
} | license | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int linux_write_system_file(const char *path, unsigned int val) {
int len;
int fd;
char buf[56];
unsigned long v6;
v6 = __readfsqword(0x28u);
len = snprintf(buf, 0x32u, off_2ADD80, val);
if (os_snprintf_error_39(0x32u, len))
return -1;
fd = open(path, 1);
if (fd < 0)
return -1;
if (write(fd... | static int linux_write_system_file(const char *path, unsigned int val) {
char buf[50];
int fd, len;
len = os_snprintf(buf, sizeof(buf), "%u\n", val);
if (os_snprintf_error(sizeof(buf), len))
return -1;
fd = open(path, O_WRONLY);
if (fd < 0)
return -1;
if (write(fd, buf, len) < 0) {
wpa_prin... | linux_write_system_file | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int list_groups(const char *cmd, char *buf, size_t buflen) {
const char *id_3;
int ret;
int res;
fst_group *g;
ret = 0;
for (g = (fst_group *)&fst_global_groups_list.next[-3];
&g->global_groups_lentry != &fst_global_groups_list;
g = (fst_group *)&g->global_groups_lentry.next[-3]) {
id_3 =... | static int list_groups(const char *cmd, char *buf, size_t buflen) {
struct fst_group *g;
int ret = 0;
foreach_fst_group(g) {
int res;
res = os_snprintf(buf + ret, buflen - ret, "%s\n", fst_group_get_id(g));
if (os_snprintf_error(buflen - ret, res))
break;
ret += res;
}
return ret;
} | list_groups | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int list_ifaces(const char *group_id, char *buf, size_t buflen) {
u32 llt;
int v5;
int v6;
int v7;
int v8;
const char *name_3;
int v10;
int v11;
int priority_0;
int ret;
int res;
fst_iface *f;
fst_group *g;
const u8 *iface_addr;
ret = 0;
g = get_fst_group_by_id(group_id);
if (g) {
... | static int list_ifaces(const char *group_id, char *buf, size_t buflen) {
struct fst_group *g;
struct fst_iface *f;
int ret = 0;
g = get_fst_group_by_id(group_id);
if (!g) {
fst_printf(MSG_WARNING, "CTRL: Cannot find group '%s'", group_id);
return os_snprintf(buf, buflen, "FAIL\n");
}
foreach_fst... | list_ifaces | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
bool llid_in_use(wpa_supplicant *wpa_s, u16 llid) {
sta_info *sta;
for (sta = (*wpa_s->ifmsh->bss)->sta_list; sta; sta = sta->next) {
if (llid == sta->my_lid)
return 1;
}
return 0;
} | static bool llid_in_use(struct wpa_supplicant *wpa_s, u16 llid) {
struct sta_info *sta;
struct hostapd_data *hapd = wpa_s->ifmsh->bss[0];
for (sta = hapd->sta_list; sta; sta = sta->next) {
if (sta->my_lid == llid)
return true;
}
return false;
} | llid_in_use | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
int i;
int iface_count;
int exitcode;
int c;
wpa_interface *ifaces;
wpa_interface *iface;
wpa_interface *ifacea;
wpa_interface *ifaceb;
wpa_global *global;
wpa_params params;
unsigned long v14;
v14 = __readfsqword(0x28u);
exitcode = -... | int main(int argc, char *argv[]) {
int c, i;
struct wpa_interface *ifaces, *iface;
int iface_count, exitcode = -1;
struct wpa_params params;
struct wpa_global *global;
if (os_program_init())
return -1;
os_memset(¶ms, 0, sizeof(params));
params.wpa_debug_level = MSG_INFO;
iface = ifaces = os... | main | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int match_mac_mask(const u8 *addr_a, const u8 *addr_b, const u8 *mask) {
size_t i;
for (i = 0; i <= 5; ++i) {
if (((unsigned char)(addr_b[i] ^ addr_a[i]) & mask[i]) != 0)
return 0;
}
return 1;
} | static int match_mac_mask(const u8 *addr_a, const u8 *addr_b, const u8 *mask) {
size_t i;
for (i = 0; i < ETH_ALEN; i++) {
if ((addr_a[i] & mask[i]) != (addr_b[i] & mask[i]))
return 0;
}
return 1;
} | match_mac_mask | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
bool matches_local(wpa_supplicant *wpa_s, ieee802_11_elems *elems) {
mesh_conf *mconf;
mconf = wpa_s->ifmsh->mconf;
if (elems->mesh_config_len <= 4u)
return 0;
return mconf->meshid_len == elems->mesh_id_len &&
!memcmp(mconf, elems->mesh_id, elems->mesh_id_len) &&
mconf->mesh_pp_id == *ele... | static bool matches_local(struct wpa_supplicant *wpa_s,
struct ieee802_11_elems *elems) {
struct mesh_conf *mconf = wpa_s->ifmsh->mconf;
if (elems->mesh_config_len < 5)
return false;
return (mconf->meshid_len == elems->mesh_id_len &&
os_memcmp(mconf->meshid, elems->mesh_i... | matches_local | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int matching_ciphers(wpa_ssid *ssid, wpa_ie_data *ie, int freq) {
if (!ie->has_group)
ie->group_cipher = wpa_default_rsn_cipher(freq);
if (!ie->has_pairwise)
ie->pairwise_cipher = wpa_default_rsn_cipher(freq);
return (ie->group_cipher & ssid->group_cipher) != 0 &&
(ie->pairwise_cipher & ssid->pai... | static int matching_ciphers(struct wpa_ssid *ssid, struct wpa_ie_data *ie,
int freq) {
if (!ie->has_group)
ie->group_cipher = wpa_default_rsn_cipher(freq);
if (!ie->has_pairwise)
ie->pairwise_cipher = wpa_default_rsn_cipher(freq);
return (ie->group_cipher & ssid->group_cipher) ... | matching_ciphers | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
unsigned int max_he_rate(const minsnr_bitrate_entry *table, int snr) {
const minsnr_bitrate_entry *entry;
const minsnr_bitrate_entry *prev;
for (entry = table; entry->minsnr != -1 && snr >= entry->minsnr; ++entry)
;
if (entry == table)
return 0;
prev = entry - 1;
if (entry->minsnr == -1)
return... | static unsigned int max_he_rate(const struct minsnr_bitrate_entry table[],
int snr) {
const struct minsnr_bitrate_entry *prev, *entry = table;
while (entry->minsnr != -1 && snr >= entry->minsnr)
entry++;
if (entry == table)
return 0;
prev = entry - 1;
if (entry->minsnr... | max_he_rate | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
unsigned int max_ht20_rate(int snr, bool vht) {
return max_rate(vht20_table, snr, vht);
} | static unsigned int max_ht20_rate(int snr, bool vht) {
return max_rate(vht20_table, snr, vht);
} | max_ht20_rate | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
unsigned int max_ht40_rate(int snr, bool vht) {
return max_rate(vht40_table, snr, vht);
} | static unsigned int max_ht40_rate(int snr, bool vht) {
return max_rate(vht40_table, snr, vht);
} | max_ht40_rate | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
unsigned int max_rate(const minsnr_bitrate_entry *table, int snr, bool vht) {
const minsnr_bitrate_entry *entry;
const minsnr_bitrate_entry *prev;
for (entry = table; entry->minsnr != -1 && snr >= entry->minsnr &&
(vht || entry - table <= 8);
++entry)
;
if (entry == table)
... | static unsigned int max_rate(const struct minsnr_bitrate_entry table[], int snr,
bool vht) {
const struct minsnr_bitrate_entry *prev, *entry = table;
while ((entry->minsnr != -1) && (snr >= entry->minsnr) &&
(vht || entry - table <= vht_mcs))
entry++;
if (entry == table)... | max_rate | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
unsigned int max_vht160_rate(int snr) { return max_rate(vht160_table, snr, 1); } | static unsigned int max_vht160_rate(int snr) {
return max_rate(vht160_table, snr, 1);
} | max_vht160_rate | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
unsigned int max_vht80_rate(int snr) { return max_rate(vht80_table, snr, 1); } | static unsigned int max_vht80_rate(int snr) {
return max_rate(vht80_table, snr, 1);
} | max_vht80_rate | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *mb_ies_by_info(mb_ies_info *info) {
u8 i;
u8 ia;
wpabuf *mb_ies;
size_t mb_ies_size;
mb_ies = 0;
if (info->nof_ies) {
mb_ies_size = 0;
for (i = 0; i < info->nof_ies; ++i)
mb_ies_size += info->ies[i].ie_len + 2;
mb_ies = wpabuf_alloc(mb_ies_size);
if (mb_ies) {
for (ia = ... | struct wpabuf *mb_ies_by_info(struct mb_ies_info *info) {
struct wpabuf *mb_ies = NULL;
WPA_ASSERT(info != NULL);
if (info->nof_ies) {
u8 i;
size_t mb_ies_size = 0;
for (i = 0; i < info->nof_ies; i++)
mb_ies_size += 2 + info->ies[i].ie_len;
mb_ies = wpabuf_alloc(mb_ies_size);
if (mb_... | mb_ies_by_info | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
size_t mbo_add_ie(u8 *buf, size_t len, const u8 *attr, size_t attr_len) {
if (len >= attr_len + 6) {
*buf = -35;
buf[1] = attr_len + 4;
WPA_PUT_BE24_12(buf + 2, 0x506F9Au);
buf[5] = 22;
memcpy(buf + 6, attr, attr_len);
return attr_len + 6;
} else {
wpa_printf(2,
"MBO: Not ... | size_t mbo_add_ie(u8 *buf, size_t len, const u8 *attr, size_t attr_len) {
if (len < 6 + attr_len) {
wpa_printf(MSG_DEBUG,
"MBO: Not enough room in buffer for MBO IE: buf len = %zu, "
"attr_len = %zu",
len, attr_len);
return 0;
}
*buf++ = WLAN_EID_VENDOR_SPECI... | mbo_add_ie | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void mbo_ap_check_sta_assoc(hostapd_data *hapd, sta_info *sta,
ieee802_11_elems *elems) {
u8 ie_len;
const u8 *pos;
size_t len;
const u8 *attr;
const u8 *end;
if (hapd->conf->mbo_enabled && elems->mbo) {
pos = elems->mbo + 4;
len = elems->mbo_len - 4;
wpa_hexdump(2, ... | void mbo_ap_check_sta_assoc(struct hostapd_data *hapd, struct sta_info *sta,
struct ieee802_11_elems *elems) {
const u8 *pos, *attr, *end;
size_t len;
if (!hapd->conf->mbo_enabled || !elems->mbo)
return;
pos = elems->mbo + 4;
len = elems->mbo_len - 4;
wpa_hexdump(MSG_DEBUG,... | mbo_ap_check_sta_assoc | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int mbo_ap_get_info(sta_info *sta, char *buf, size_t buflen) {
const char *v4;
u8 i;
unsigned int count;
int ret;
int reta;
int retb;
int retc;
char *pos;
mbo_non_pref_chan_info *info;
char *pos2;
char *end;
end = &buf[buflen];
count = 0;
if (!sta->cell_capa)
return 0;
ret = snprintf(... | int mbo_ap_get_info(struct sta_info *sta, char *buf, size_t buflen) {
char *pos = buf, *end = buf + buflen;
int ret;
struct mbo_non_pref_chan_info *info;
u8 i;
unsigned int count = 0;
if (!sta->cell_capa)
return 0;
ret = os_snprintf(pos, end - pos, "mbo_cell_capa=%u\n", sta->cell_capa);
if (os_snp... | mbo_ap_get_info | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void mbo_ap_parse_non_pref_chan(sta_info *sta, const u8 *buf, size_t len) {
const char *v3;
int ret;
mbo_non_pref_chan_info *tmp;
char *pos;
size_t i;
size_t num_chan;
mbo_non_pref_chan_info *info;
char channels[200];
_QWORD v12[2];
v12[0] = __readfsqword(0x28u);
if (len > 3) {
num_chan = len... | static void mbo_ap_parse_non_pref_chan(struct sta_info *sta, const u8 *buf,
size_t len) {
struct mbo_non_pref_chan_info *info, *tmp;
char channels[200], *pos, *end;
size_t num_chan, i;
int ret;
if (len <= 3)
return;
num_chan = len - 3;
info = os_zalloc(sizeof(*... | mbo_ap_parse_non_pref_chan | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void mbo_ap_sta_free(sta_info *sta) {
mbo_non_pref_chan_info *info;
mbo_non_pref_chan_info *prev;
info = sta->non_pref_chan;
sta->non_pref_chan = 0;
while (info) {
prev = info;
info = info->next;
free(prev);
}
} | void mbo_ap_sta_free(struct sta_info *sta) {
struct mbo_non_pref_chan_info *info, *prev;
info = sta->non_pref_chan;
sta->non_pref_chan = NULL;
while (info) {
prev = info;
info = info->next;
os_free(prev);
}
} | mbo_ap_sta_free | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void mbo_ap_wnm_notif_req_cell_capa(sta_info *sta, const u8 *buf, size_t len) {
if (len) {
wpa_printf(2,
"MBO: STA %02x:%02x:%02x:%02x:%02x:%02x updated cellular data "
"capability: %u",
sta->addr[0], sta->addr[1], sta->addr[2], sta->addr[3],
sta->addr[4... | static void mbo_ap_wnm_notif_req_cell_capa(struct sta_info *sta, const u8 *buf,
size_t len) {
if (len < 1)
return;
wpa_printf(MSG_DEBUG,
"MBO: STA " MACSTR " updated cellular data capability: %u",
MAC2STR(sta->addr), buf[0]);
sta->cell_capa ... | mbo_ap_wnm_notif_req_cell_capa | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void mbo_ap_wnm_notif_req_elem(sta_info *sta, u8 type, const u8 *buf,
size_t len, int *first_non_pref_chan) {
if (type == 2) {
if (*first_non_pref_chan) {
*first_non_pref_chan = 0;
mbo_ap_sta_free(sta);
}
mbo_ap_parse_non_pref_chan(sta, buf, len);
} else if (ty... | static void mbo_ap_wnm_notif_req_elem(struct sta_info *sta, u8 type,
const u8 *buf, size_t len,
int *first_non_pref_chan) {
switch (type) {
case WFA_WNM_NOTIF_SUBELEM_NON_PREF_CHAN_REPORT:
if (*first_non_pref_chan) {
*first_non_p... | mbo_ap_wnm_notif_req_elem | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void mbo_ap_wnm_notification_req(hostapd_data *hapd, const u8 *addr,
const u8 *buf, size_t len) {
u8 ie_len;
int first_non_pref_chan;
const u8 *pos;
sta_info *sta;
const u8 *end;
unsigned long v11;
v11 = __readfsqword(0x28u);
first_non_pref_chan = 1;
if (hapd->conf->m... | void mbo_ap_wnm_notification_req(struct hostapd_data *hapd, const u8 *addr,
const u8 *buf, size_t len) {
const u8 *pos, *end;
u8 ie_len;
struct sta_info *sta;
int first_non_pref_chan = 1;
if (!hapd->conf->mbo_enabled)
return;
sta = ap_get_sta(hapd, addr);
if (!sta)
... | mbo_ap_wnm_notification_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const u8 *mbo_attr_from_mbo_ie(const u8 *mbo_ie, mbo_attr_id attr) {
u8 ie_len;
ie_len = mbo_ie[1];
if (ie_len > 3u)
return get_ie(mbo_ie + 6, ie_len - 4, attr);
else
return 0;
} | const u8 *mbo_attr_from_mbo_ie(const u8 *mbo_ie, enum mbo_attr_id attr) {
const u8 *mbo;
u8 ie_len = mbo_ie[1];
if (ie_len < MBO_IE_HEADER - 2)
return NULL;
mbo = mbo_ie + MBO_IE_HEADER;
return get_ie(mbo, 2 + ie_len - MBO_IE_HEADER, attr);
} | mbo_attr_from_mbo_ie | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *mbo_build_anqp_buf(wpa_supplicant *wpa_s, wpa_bss *bss,
u32 mbo_subtypes) {
u8 i;
wpabuf *anqp_buf;
u8 *len_pos;
if (wpa_bss_get_vendor_ie(bss, 0x506F9A16u)) {
anqp_buf = wpabuf_alloc(0xBu);
if (anqp_buf) {
len_pos = gas_anqp_add_element(anqp_buf, 0xDDDDu);
... | struct wpabuf *mbo_build_anqp_buf(struct wpa_supplicant *wpa_s,
struct wpa_bss *bss, u32 mbo_subtypes) {
struct wpabuf *anqp_buf;
u8 *len_pos;
u8 i;
if (!wpa_bss_get_vendor_ie(bss, MBO_IE_VENDOR_TYPE)) {
wpa_printf(
MSG_INFO,
"MBO: " MACSTR
" does n... | mbo_build_anqp_buf | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const u8 *mbo_get_attr_from_ies(const u8 *ies, size_t ies_len,
mbo_attr_id attr) {
const u8 *mbo_ie;
mbo_ie = get_vendor_ie(ies, ies_len, 0x506F9A16u);
if (mbo_ie)
return mbo_attr_from_mbo_ie(mbo_ie, attr);
else
return 0;
} | const u8 *mbo_get_attr_from_ies(const u8 *ies, size_t ies_len,
enum mbo_attr_id attr) {
const u8 *mbo_ie;
mbo_ie = get_vendor_ie(ies, ies_len, MBO_IE_VENDOR_TYPE);
if (!mbo_ie)
return NULL;
return mbo_attr_from_mbo_ie(mbo_ie, attr);
} | mbo_get_attr_from_ies | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void mbo_parse_rx_anqp_resp(wpa_supplicant *wpa_s, wpa_bss *bss, const u8 *sa,
const u8 *data, size_t slen) {
if (slen) {
if (*data == 2) {
if (slen != 1)
wpa_msg(wpa_s, 3,
"RX-MBO-ANQP %02x:%02x:%02x:%02x:%02x:%02x cell_conn_pref=%u",
*sa,... | void mbo_parse_rx_anqp_resp(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
const u8 *sa, const u8 *data, size_t slen) {
const u8 *pos = data;
u8 subtype;
if (slen < 1)
return;
subtype = *pos++;
slen--;
switch (subtype) {
case MBO_ANQP_SUBTYPE_CELL_CONN_PREF:
if (... | mbo_parse_rx_anqp_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int mesh_attr_text(const u8 *ies, size_t ies_len, char *buf, char *end) {
int v5;
int v6;
int bufa;
int bss_basic_rate_set_len;
int i;
int ia;
int ib;
int ret;
int reta;
int retb;
int retc;
int retd;
char *posa;
char *mesh_id;
u8 *bss_basic_rate_set;
ieee802_11_elems elems;
unsigned lo... | static int mesh_attr_text(const u8 *ies, size_t ies_len, char *buf, char *end) {
struct ieee802_11_elems elems;
char *mesh_id, *pos = buf;
u8 *bss_basic_rate_set;
int bss_basic_rate_set_len, ret, i;
if (ieee802_11_parse_elems(ies, ies_len, &elems, 0) == ParseFailed)
return -1;
if (elems.mesh_id_len < ... | mesh_attr_text | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void mesh_auth_timer(void *eloop_ctx, void *user_data) {
hostapd_data *hapd;
if (**((_DWORD **)user_data + 90) != 3) {
wpa_printf(
2,
"AUTH: Re-authenticate with %02x:%02x:%02x:%02x:%02x:%02x (attempt "
"%d) ",
*((unsigned char *)user_data + 16), *((unsigned char *)user_data + 1... | void mesh_auth_timer(void *eloop_ctx, void *user_data) {
struct wpa_supplicant *wpa_s = eloop_ctx;
struct sta_info *sta = user_data;
struct hostapd_data *hapd;
if (sta->sae->state != SAE_ACCEPTED) {
wpa_printf(MSG_DEBUG, "AUTH: Re-authenticate with " MACSTR " (attempt %d) ",
MAC2STR(sta->add... | mesh_auth_timer | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.