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 |
|---|---|---|---|---|---|---|---|
void supp_cancel_auth_timeout(void *ctx) {
wpa_printf(2, "SUPP: %s", "supp_cancel_auth_timeout");
} | static void supp_cancel_auth_timeout(void *ctx) {
wpa_printf(MSG_DEBUG, "SUPP: %s", __func__);
} | supp_cancel_auth_timeout | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void supp_deauthenticate(void *ctx, u16 reason_code) {
wpa_printf(2, "SUPP: %s (TODO)", "supp_deauthenticate");
} | static void supp_deauthenticate(void *ctx, u16 reason_code) {
wpa_printf(MSG_DEBUG, "SUPP: %s (TODO)", __func__);
} | supp_deauthenticate | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int supp_ether_send(void *ctx, const u8 *dest, u16 proto, const u8 *buf,
size_t len) {
int encrypt;
wpa_supplicant *wpa_s;
wpa_s = (wpa_supplicant *)**((_QWORD **)ctx + 1);
encrypt = *((_DWORD *)ctx + 34) & 0x20;
wpa_printf(2,
"SUPP: %s(dest=%02x:%02x:%02x:%02x:%02x:%02x prot... | static int supp_ether_send(void *ctx, const u8 *dest, u16 proto, const u8 *buf,
size_t len) {
struct ibss_rsn_peer *peer = ctx;
struct wpa_supplicant *wpa_s = peer->ibss_rsn->wpa_s;
int encrypt = peer->authentication_status & IBSS_RSN_REPORTED_PTK;
wpa_printf(MSG_DEBUG,
... | supp_ether_send | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int supp_get_beacon_ie(void *ctx) {
wpa_printf(2, "SUPP: %s", "supp_get_beacon_ie");
wpa_sm_set_ap_rsnxe(*((wpa_sm **)ctx + 3), 0, 0);
return wpa_sm_set_ap_rsn_ie(*((wpa_sm **)ctx + 3), &wpa_ie, 0x16u);
} | static int supp_get_beacon_ie(void *ctx) {
struct ibss_rsn_peer *peer = ctx;
wpa_printf(MSG_DEBUG, "SUPP: %s", __func__);
wpa_sm_set_ap_rsnxe(peer->supp, NULL, 0);
return wpa_sm_set_ap_rsn_ie(peer->supp,
(u8 *)"\x30\x14\x01\x00"
"\x00\x0f\xac\x... | supp_get_beacon_ie | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void *supp_get_network_ctx(void *ctx) {
return wpa_supplicant_get_ssid(**((wpa_supplicant ***)ctx + 1));
} | static void *supp_get_network_ctx(void *ctx) {
struct ibss_rsn_peer *peer = ctx;
return wpa_supplicant_get_ssid(peer->ibss_rsn->wpa_s);
} | supp_get_network_ctx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpa_states supp_get_state(void *ctx) { return *((_DWORD *)ctx + 8); } | static enum wpa_states supp_get_state(void *ctx) {
struct ibss_rsn_peer *peer = ctx;
return peer->supp_state;
} | supp_get_state | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int supp_mlme_setprotection(void *ctx, const u8 *addr, int protection_type,
int key_type) {
wpa_printf(2,
"SUPP: %s(addr=%02x:%02x:%02x:%02x:%02x:%02x protection_type=%d "
"key_type=%d)",
"supp_mlme_setprotection", *addr, addr[1], addr[2], addr[3],
... | static int supp_mlme_setprotection(void *ctx, const u8 *addr,
int protection_type, int key_type) {
wpa_printf(MSG_DEBUG,
"SUPP: %s(addr=" MACSTR " protection_type=%d "
"key_type=%d)",
__func__, MAC2STR(addr), protection_type, key_type);
retur... | supp_mlme_setprotection | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void supp_reconnect(void *ctx) {
wpa_printf(2, "SUPP: %s (TODO)", "supp_reconnect");
} | static void supp_reconnect(void *ctx) {
wpa_printf(MSG_DEBUG, "SUPP: %s (TODO)", __func__);
} | supp_reconnect | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int supp_set_key(void *ctx, wpa_alg alg, const u8 *addr, int key_idx,
int set_tx, const u8 *seq, size_t seq_len, const u8 *key,
size_t key_len, key_flag key_flag) {
const u8 *addra;
addra = addr;
wpa_printf(2,
"SUPP: %s(alg=%d addr=%02x:%02x:%02x:%02x:%02x:%02x key_... | static int supp_set_key(void *ctx, enum wpa_alg alg, const u8 *addr,
int key_idx, int set_tx, const u8 *seq, size_t seq_len,
const u8 *key, size_t key_len, enum key_flag key_flag) {
struct ibss_rsn_peer *peer = ctx;
wpa_printf(MSG_DEBUG,
"SUPP: %s(alg=%d... | supp_set_key | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void supp_set_state(void *ctx, wpa_states state) {
*((_DWORD *)ctx + 8) = state;
} | static void supp_set_state(void *ctx, enum wpa_states state) {
struct ibss_rsn_peer *peer = ctx;
peer->supp_state = state;
} | supp_set_state | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
size_t tclas_elem_len(const tclas_element *elem) {
ip_version ip_ver;
if (elem->classifier_type == 4) {
ip_ver = elem->frame_classifier.type4_param.ip_version;
if (ip_ver == ip_version_IPV4) {
return 22;
} else {
if (ip_ver != ip_version_IPV6) {
wpa_printf(5, "%s: Incorrect IP versi... | static size_t tclas_elem_len(const struct tclas_element *elem) {
size_t buf_len = 0;
buf_len += 2 + 1 + 1;
if (elem->classifier_type == 4) {
enum ip_version ip_ver;
buf_len += 1 + 1 + 1 + 2 + 2 + 1;
ip_ver = elem->frame_classifier.type4_param.ip_version;
if (ip_ver == IPV4) {
buf_len += 4... | tclas_elem_len | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tdls_nonce_set(const u8 *nonce) {
int i;
for (i = 0; i <= 31; ++i) {
if (nonce[i])
return 1;
}
return 0;
} | static int tdls_nonce_set(const u8 *nonce) {
int i;
for (i = 0; i < WPA_NONCE_LEN; i++) {
if (nonce[i])
return 1;
}
return 0;
} | tdls_nonce_set | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tls_cipher_suite_mac_sha1(u16 cs_0) {
return tls_cipher_suite_match(sha1_cs_3, 0x54u, cs_0);
} | static int tls_cipher_suite_mac_sha1(u16 cs) {
static const u16 sha1_cs[] = {
0x0005, 0x0007, 0x000a, 0x000d, 0x0010, 0x0013, 0x0016, 0x001b, 0x002f,
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038,
0x0039, 0x003a, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0084,
... | tls_cipher_suite_mac_sha1 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tls_cipher_suite_mac_sha256(u16 cs_0) {
return tls_cipher_suite_match(sha256_cs_2, 0x73u, cs_0);
} | static int tls_cipher_suite_mac_sha256(u16 cs) {
static const u16 sha256_cs[] = {
0x003c, 0x003d, 0x003e, 0x003f, 0x0040, 0x0067, 0x0068, 0x0069, 0x006a,
0x006b, 0x006c, 0x006d, 0x009c, 0x009e, 0x00a0, 0x00a2, 0x00a4, 0x00a6,
0x00a8, 0x00aa, 0x00ac, 0x00ae, 0x00b2, 0x00b6, 0x00ba, 0x00bb, 0x00bc,
... | tls_cipher_suite_mac_sha256 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tls_cipher_suite_mac_sha384(u16 cs_0) {
return tls_cipher_suite_match(sha384_cs_1, 0x4Au, cs_0);
} | static int tls_cipher_suite_mac_sha384(u16 cs) {
static const u16 sha384_cs[] = {
0x009d, 0x009f, 0x00a1, 0x00a3, 0x00a5, 0x00a7, 0x00a9, 0x00ab, 0x00ad,
0x00af, 0x00b3, 0x00b7, 0x1302, 0xc024, 0xc026, 0xc028, 0xc02a, 0xc02c,
0xc02e, 0xc030, 0xc032, 0xc038, 0xc03d, 0xc03f, 0xc041, 0xc043, 0xc045,
... | tls_cipher_suite_mac_sha384 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tls_cipher_suite_match(const u16 *list, size_t count, u16 cs_0) {
size_t i;
for (i = 0; i < count; ++i) {
if (cs_0 == list[i])
return 1;
}
return 0;
} | static int tls_cipher_suite_match(const u16 *list, size_t count, u16 cs) {
size_t i;
for (i = 0; i < count; i++) {
if (list[i] == cs)
return 1;
}
return 0;
} | tls_cipher_suite_match | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *tls_connection_decrypt(void *tls_ctx, tls_connection *conn,
const wpabuf *in_data) {
unsigned int v3;
const void *v4;
size_t v6;
unsigned int v7;
void *v8;
int res;
wpabuf *buf;
v3 = wpabuf_len_60(in_data);
v4 = wpabuf_head_62(in_data);
if ((int)BIO_write(conn... | struct wpabuf *tls_connection_decrypt(void *tls_ctx,
struct tls_connection *conn,
const struct wpabuf *in_data) {
int res;
struct wpabuf *buf;
res = BIO_write(conn->ssl_in, wpabuf_head(in_data), wpabuf_len(in_data));
if (res < 0) {
... | tls_connection_decrypt | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *tls_connection_encrypt(void *tls_ctx, tls_connection *conn,
const wpabuf *in_data) {
unsigned int v4;
const void *v5;
size_t v6;
unsigned int v7;
void *v8;
int res;
wpabuf *buf;
if (!conn)
return 0;
if ((int)BIO_ctrl(conn->ssl_in, 1, 0, 0) >= 0 &&
(int... | struct wpabuf *tls_connection_encrypt(void *tls_ctx,
struct tls_connection *conn,
const struct wpabuf *in_data) {
int res;
struct wpabuf *buf;
if (conn == NULL)
return NULL;
if ((res = BIO_reset(conn->ssl_in)) < 0 ||
(res = ... | tls_connection_encrypt | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
tls_connection *tls_connection_init(void *ssl_ctx) {
os_time_t usec;
long v3;
long v4;
SSL_CTX *ssl;
tls_context *context;
X509_STORE *new_cert_store;
tls_connection *conn;
os_reltime now;
unsigned long v10;
v10 = __readfsqword(0x28u);
ssl = *(SSL_CTX **)ssl_ctx;
context = (tls_context *)SSL_CT... | struct tls_connection *tls_connection_init(void *ssl_ctx) {
struct tls_data *data = ssl_ctx;
SSL_CTX *ssl = data->ssl;
struct tls_connection *conn;
long options;
X509_STORE *new_cert_store;
struct os_reltime now;
struct tls_context *context = SSL_CTX_get_app_data(ssl);
if (data->crl_reload_interval > 0... | tls_connection_init | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tls_connection_set_cipher_list(void *tls_ctx, tls_connection *conn,
u8 *ciphers) {
int v4;
int ret;
char *pos;
unsigned char *c;
char buf[500];
_BYTE v9[12];
*(_QWORD *)&v9[4] = __readfsqword(0x28u);
if (!conn || !conn->ssl || !ciphers)
return -1;
buf[0] = 0... | int tls_connection_set_cipher_list(void *tls_ctx, struct tls_connection *conn,
u8 *ciphers) {
char buf[500], *pos, *end;
u8 *c;
int ret;
if (conn == NULL || conn->ssl == NULL || ciphers == NULL)
return -1;
buf[0] = '\0';
pos = buf;
end = pos + sizeof(buf);
c = c... | tls_connection_set_cipher_list | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tls_match_suffix_helper(X509 *cert, const char *match, size_t match_len,
int full) {
const char *v4;
const char *v5;
const char *v7;
const char *v8;
unsigned int i;
stack_index_t j;
int dns_name;
const stack_st_GENERAL_NAME *ext;
GENERAL_NAME *gen;
X509_NAME *name;
... | static int tls_match_suffix_helper(X509 *cert, const char *match,
size_t match_len, int full) {
GENERAL_NAME *gen;
void *ext;
int i;
stack_index_t j;
int dns_name = 0;
X509_NAME *name;
wpa_printf(MSG_DEBUG, "TLS: Match domain against %s%s", full ? "" : "suffix ",
... | tls_match_suffix_helper | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void tls_msg_cb(int write_p, int version, int content_type, const void *buf,
size_t len, SSL *ssl, void *arg) {
const char *v7;
const char *v8;
const char *v9;
if (write_p == 2) {
wpa_printf(2, "OpenSSL: session ver=0x%x content_type=%d", version,
content_type);
wpa_hexdu... | static void tls_msg_cb(int write_p, int version, int content_type,
const void *buf, size_t len, SSL *ssl, void *arg) {
struct tls_connection *conn = arg;
const u8 *pos = buf;
if (write_p == 2) {
wpa_printf(MSG_DEBUG, "OpenSSL: session ver=0x%x content_type=%d", version,
... | tls_msg_cb | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tls_parse_pkcs12(tls_data *data, SSL *ssl, PKCS12 *p12,
const char *passwd) {
long subject_name;
long v6;
const char *passwda;
int res;
int resa;
EVP_PKEY *pkey;
X509 *cert;
stack_st_X509 *certs;
char buf[264];
unsigned long v15;
passwda = passwd;
v15 = __readfsqword(0x... | static int tls_parse_pkcs12(struct tls_data *data, SSL *ssl, PKCS12 *p12,
const char *passwd) {
EVP_PKEY *pkey;
X509 *cert;
STACK_OF(X509) * certs;
int res = 0;
char buf[256];
pkey = NULL;
cert = NULL;
certs = NULL;
if (!passwd)
passwd = "";
if (!PKCS12_parse(p12, pa... | tls_parse_pkcs12 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tls_verify_cb(int preverify_ok, X509_STORE_CTX *x509_ctx) {
unsigned int v3;
long subject_name;
long v5;
int preverify_oka;
int err;
int len_0;
int depth;
const char *check_cert_subject;
const char *err_str;
X509 *err_cert;
SSL *ssl;
tls_connection *conn;
tls_context *context;
char *matc... | static int tls_verify_cb(int preverify_ok, X509_STORE_CTX *x509_ctx) {
char buf[256];
X509 *err_cert;
int err, depth;
SSL *ssl;
struct tls_connection *conn;
struct tls_context *context;
char *match, *altmatch, *suffix_match, *domain_match;
const char *check_cert_subject;
const char *err_str;
err_ce... | tls_verify_cb | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *tncc_build_soh(int ver) {
u16 v2;
size_t v3;
u16 v4;
wpabuf *buf;
u8 *tlv_len;
u8 *tlv_len2;
u8 *outer_len;
u8 *inner_len;
u8 *ssoh_len;
unsigned short end;
u8 correlation_id[24];
unsigned long v13;
v13 = __readfsqword(0x28u);
if (os_get_random(correlation_id, 0x18u))
return 0;
... | static struct wpabuf *tncc_build_soh(int ver) {
struct wpabuf *buf;
u8 *tlv_len, *tlv_len2, *outer_len, *inner_len, *ssoh_len, *end;
u8 correlation_id[24];
char *machinename = "wpa_supplicant@w1.fi";
if (os_get_random(correlation_id, sizeof(correlation_id)))
return NULL;
wpa_hexdump(MSG_DEBUG, "TNC: S... | tncc_build_soh | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 *tncc_copy_send_buf(tncc_data *tncc, u8 *pos) {
tnc_if_imc *imc;
for (imc = tncc->imc; imc; imc = imc->next) {
if (imc->imc_send) {
memcpy(pos, imc->imc_send, imc->imc_send_len);
pos += imc->imc_send_len;
free(imc->imc_send);
imc->imc_send = 0;
imc->imc_send_len = 0;
}
}
... | u8 *tncc_copy_send_buf(struct tncc_data *tncc, u8 *pos) {
struct tnc_if_imc *imc;
for (imc = tncc->imc; imc; imc = imc->next) {
if (imc->imc_send == NULL)
continue;
os_memcpy(pos, imc->imc_send, imc->imc_send_len);
pos += imc->imc_send_len;
os_free(imc->imc_send);
imc->imc_send = NULL;
... | tncc_copy_send_buf | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void tncc_deinit(tncc_data *tncc) {
tnc_if_imc *imc;
tnc_if_imc *prev;
imc = tncc->imc;
while (imc) {
tncc_unload_imc(imc);
prev = imc;
imc = imc->next;
free(prev);
}
free(tncc);
} | void tncc_deinit(struct tncc_data *tncc) {
struct tnc_if_imc *imc, *prev;
imc = tncc->imc;
while (imc) {
tncc_unload_imc(imc);
prev = imc;
imc = imc->next;
os_free(prev);
}
os_free(tncc);
} | tncc_deinit | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
unsigned char *tncc_get_base64(char *start, size_t *decoded_len) {
size_t v3;
char *pos;
char *posa;
char *pos2;
unsigned char *decoded;
pos = strstr(start, "<Base64>");
if (!pos)
return 0;
posa = pos + 8;
pos2 = strstr(posa, "</Base64>");
if (!pos2)
return 0;
*pos2 = 0;
v3 = strlen(pos... | static unsigned char *tncc_get_base64(char *start, size_t *decoded_len) {
char *pos, *pos2;
unsigned char *decoded;
pos = os_strstr(start, "<Base64>");
if (pos == NULL)
return NULL;
pos += 8;
pos2 = os_strstr(pos, "</Base64>");
if (pos2 == NULL)
return NULL;
*pos2 = '\0';
decoded = base64_d... | tncc_get_base64 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
tncc_process_res tncc_get_recommendation(char *start) {
char saved;
tncc_process_res recom;
char *pos;
char *posa;
char *posb;
char *pos2;
pos = strstr(start, "<TNCCS-Recommendation ");
if (!pos)
return tncc_process_res_TNCCS_RECOMMENDATION_ERROR;
posa = strstr(pos + 21, " type=");
if (!posa)
... | static enum tncc_process_res tncc_get_recommendation(char *start) {
char *pos, *pos2, saved;
int recom;
pos = os_strstr(start, "<TNCCS-Recommendation ");
if (pos == NULL)
return TNCCS_RECOMMENDATION_ERROR;
pos += 21;
pos = os_strstr(pos, " type=");
if (pos == NULL)
return TNCCS_RECOMMENDATION_ER... | tncc_get_recommendation | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void *tncc_get_sym(void *handle, char *func) { return dlsym(handle, func); } | static void *tncc_get_sym(void *handle, char *func) {
void *fptr;
#ifdef CONFIG_NATIVE_WINDOWS
#ifdef _WIN32_WCE
fptr = GetProcAddressA(handle, func);
#else
fptr = GetProcAddress(handle, func);
#endif
#else
fptr = dlsym(handle, func);
#endif
return fptr;
} | tncc_get_sym | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tncc_get_type(char *start, unsigned int *type) {
char *pos;
pos = strstr(start, "<Type>");
if (!pos)
return -1;
*type = strtoul(pos + 6, 0, 16);
return 0;
} | static int tncc_get_type(char *start, unsigned int *type) {
char *pos = os_strstr(start, "<Type>");
if (pos == NULL)
return -1;
pos += 6;
*type = strtoul(pos, NULL, 16);
return 0;
} | tncc_get_type | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
char *tncc_if_tnccs_end() {
char *buf;
buf = (char *)malloc(0x64u);
if (!buf)
return 0;
snprintf(buf, 0x64u, "\n</TNCCS-Batch>");
return buf;
} | char *tncc_if_tnccs_end(void) {
char *buf = os_malloc(100);
if (buf == NULL)
return NULL;
os_snprintf(buf, 100, IF_TNCCS_END);
return buf;
} | tncc_if_tnccs_end | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
char *tncc_if_tnccs_start(tncc_data *tncc) {
char *buf;
buf = (char *)malloc(0x3E8u);
if (!buf)
return 0;
snprintf(
buf, 0x3E8u,
"<?xml version=\"1.0\"?>\n"
"<TNCCS-Batch BatchId=\"%d\" Recipient=\"TNCS\" "
"xmlns=\"http://www.trustedcomputinggroup.org/IWG/TNC/1_0/IF_TNCCS#\" "
... | char *tncc_if_tnccs_start(struct tncc_data *tncc) {
char *buf = os_malloc(1000);
if (buf == NULL)
return NULL;
tncc->last_batchid++;
os_snprintf(buf, 1000, IF_TNCCS_START, tncc->last_batchid);
return buf;
} | tncc_if_tnccs_start | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tncc_imc_begin_handshake(tnc_if_imc *imc) {
TNC_Result res;
wpa_printf(2, "TNC: Calling TNC_IMC_BeginHandshake for IMC '%s'", imc->name);
res = imc->BeginHandshake(imc->imcID, imc->connectionID);
wpa_printf(2, "TNC: TNC_IMC_BeginHandshake: %lu", res);
if (res)
return -1;
else
return 0;
} | static int tncc_imc_begin_handshake(struct tnc_if_imc *imc) {
TNC_Result res;
wpa_printf(MSG_DEBUG,
"TNC: Calling TNC_IMC_BeginHandshake for IMC "
"'%s'",
imc->name);
res = imc->BeginHandshake(imc->imcID, imc->connectionID);
wpa_printf(MSG_DEBUG, "TNC: TNC_IMC_BeginHandsh... | tncc_imc_begin_handshake | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tncc_imc_initialize(tnc_if_imc *imc) {
TNC_Version imc_ver;
TNC_Result res;
unsigned long v4;
v4 = __readfsqword(0x28u);
wpa_printf(2, "TNC: Calling TNC_IMC_Initialize for IMC '%s'", imc->name);
res = imc->Initialize(imc->imcID, 1, 1, &imc_ver);
wpa_printf(2, "TNC: TNC_IMC_Initialize: res=%lu imc_ver... | static int tncc_imc_initialize(struct tnc_if_imc *imc) {
TNC_Result res;
TNC_Version imc_ver;
wpa_printf(MSG_DEBUG, "TNC: Calling TNC_IMC_Initialize for IMC '%s'",
imc->name);
res = imc->Initialize(imc->imcID, TNC_IFIMC_VERSION_1, TNC_IFIMC_VERSION_1,
&imc_ver);
wpa_print... | tncc_imc_initialize | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tncc_imc_notify_connection_change(tnc_if_imc *imc,
TNC_ConnectionState state) {
TNC_Result res;
if (!imc->NotifyConnectionChange)
return 0;
wpa_printf(2, "TNC: Calling TNC_IMC_NotifyConnectionChange(%d) for IMC '%s'",
state, imc->name);
res = imc->Noti... | static int tncc_imc_notify_connection_change(struct tnc_if_imc *imc,
TNC_ConnectionState state) {
TNC_Result res;
if (imc->NotifyConnectionChange == NULL)
return 0;
wpa_printf(MSG_DEBUG,
"TNC: Calling TNC_IMC_NotifyConnectionChange(%d)"
... | tncc_imc_notify_connection_change | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tncc_imc_provide_bind_function(tnc_if_imc *imc) {
TNC_Result res;
wpa_printf(2, "TNC: Calling TNC_IMC_ProvideBindFunction for IMC '%s'",
imc->name);
res = imc->ProvideBindFunction(
imc->imcID, (TNC_TNCC_BindFunctionPointer)TNC_TNCC_BindFunction);
wpa_printf(2, "TNC: TNC_IMC_ProvideBindFu... | static int tncc_imc_provide_bind_function(struct tnc_if_imc *imc) {
TNC_Result res;
wpa_printf(MSG_DEBUG,
"TNC: Calling TNC_IMC_ProvideBindFunction for "
"IMC '%s'",
imc->name);
res = imc->ProvideBindFunction(imc->imcID, TNC_TNCC_BindFunction);
wpa_printf(MSG_DEBUG, "TNC:... | tncc_imc_provide_bind_function | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tncc_imc_resolve_funcs(tnc_if_imc *imc) {
void *handle;
handle = imc->dlhandle;
imc->Initialize =
(TNC_Result (*)(TNC_IMCID, TNC_Version, TNC_Version,
TNC_Version *))tncc_get_sym(handle, "TNC_IMC_Initialize");
if (imc->Initialize) {
imc->BeginHandshake =
(TNC_Result ... | static int tncc_imc_resolve_funcs(struct tnc_if_imc *imc) {
void *handle = imc->dlhandle;
imc->Initialize = tncc_get_sym(handle, "TNC_IMC_Initialize");
if (imc->Initialize == NULL) {
wpa_printf(MSG_ERROR, "TNC: IMC does not export "
"TNC_IMC_Initialize");
return -1;
}
imc->... | tncc_imc_resolve_funcs | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tncc_imc_terminate(tnc_if_imc *imc) {
TNC_Result res;
if (!imc->Terminate)
return 0;
wpa_printf(2, "TNC: Calling TNC_IMC_Terminate for IMC '%s'", imc->name);
res = imc->Terminate(imc->imcID);
wpa_printf(2, "TNC: TNC_IMC_Terminate: %lu", res);
if (res)
return -1;
else
return 0;
} | static int tncc_imc_terminate(struct tnc_if_imc *imc) {
TNC_Result res;
if (imc->Terminate == NULL)
return 0;
wpa_printf(MSG_DEBUG, "TNC: Calling TNC_IMC_Terminate for IMC '%s'",
imc->name);
res = imc->Terminate(imc->imcID);
wpa_printf(MSG_DEBUG, "TNC: TNC_IMC_Terminate: %lu", (unsigned lon... | tncc_imc_terminate | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
tncc_data *tncc_init() {
tnc_if_imc *imc;
tncc_data *tncc;
tncc = (tncc_data *)os_zalloc(0x10u);
if (!tncc)
return 0;
if (tncc_read_config(tncc) >= 0) {
for (imc = tncc->imc; imc; imc = imc->next) {
if (tncc_load_imc(imc)) {
wpa_printf(5, "TNC: Failed to load IMC '%s'", imc->name);
... | struct tncc_data *tncc_init(void) {
struct tncc_data *tncc;
struct tnc_if_imc *imc;
tncc = os_zalloc(sizeof(*tncc));
if (tncc == NULL)
return NULL;
if (tncc_read_config(tncc) < 0) {
wpa_printf(MSG_ERROR, "TNC: Failed to read TNC configuration");
goto failed;
}
for (imc = tncc->imc; imc; imc... | tncc_init | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void tncc_init_connection(tncc_data *tncc) {
tnc_if_imc *imc;
for (imc = tncc->imc; imc; imc = imc->next) {
tncc_imc_notify_connection_change(imc, 0);
tncc_imc_notify_connection_change(imc, 1u);
free(imc->imc_send);
imc->imc_send = 0;
imc->imc_send_len = 0;
tncc_imc_begin_handshake(imc);
... | void tncc_init_connection(struct tncc_data *tncc) {
struct tnc_if_imc *imc;
for (imc = tncc->imc; imc; imc = imc->next) {
tncc_imc_notify_connection_change(imc, TNC_CONNECTION_STATE_CREATE);
tncc_imc_notify_connection_change(imc, TNC_CONNECTION_STATE_HANDSHAKE);
os_free(imc->imc_send);
imc->imc_se... | tncc_init_connection | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tncc_load_imc(tnc_if_imc *imc) {
char *v2;
if (imc->path) {
wpa_printf(2, "TNC: Opening IMC: %s (%s)", imc->name, imc->path);
imc->dlhandle = dlopen(imc->path, 1);
if (imc->dlhandle) {
if (tncc_imc_resolve_funcs(imc) >= 0) {
if (tncc_imc_initialize(imc) >= 0 &&
tncc_imc_pr... | static int tncc_load_imc(struct tnc_if_imc *imc) {
if (imc->path == NULL) {
wpa_printf(MSG_DEBUG, "TNC: No IMC configured");
return -1;
}
wpa_printf(MSG_DEBUG, "TNC: Opening IMC: %s (%s)", imc->name, imc->path);
#ifdef CONFIG_NATIVE_WINDOWS
#ifdef UNICODE
{
TCHAR *lib = wpa_strdup_tchar(imc->path);... | tncc_load_imc | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void tncc_notify_recommendation(tncc_data *tncc, tncc_process_res res) {
TNC_ConnectionState state;
tnc_if_imc *imc;
if (res == tncc_process_res_TNCCS_RECOMMENDATION_ISOLATE) {
state = 3;
} else {
if (res > tncc_process_res_TNCCS_RECOMMENDATION_ISOLATE) {
LABEL_9:
state = 4;
goto LABEL_... | static void tncc_notify_recommendation(struct tncc_data *tncc,
enum tncc_process_res res) {
TNC_ConnectionState state;
struct tnc_if_imc *imc;
switch (res) {
case TNCCS_RECOMMENDATION_ALLOW:
state = TNC_CONNECTION_STATE_ACCESS_ALLOWED;
break;
case TNCCS_RECOMMEN... | tncc_notify_recommendation | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
tnc_if_imc *tncc_parse_imc(char *start, char *end, int *error) {
int i;
char *pos2;
tnc_if_imc *imc;
char *pos;
for (i = 0; i <= 9 && tnc_imc[i]; ++i)
;
if (i <= 9) {
imc = (tnc_if_imc *)os_zalloc(0x88u);
if (imc) {
imc->imcID = i;
wpa_printf(2, "TNC: Configured IMC: %s", start);
... | static struct tnc_if_imc *tncc_parse_imc(char *start, char *end, int *error) {
struct tnc_if_imc *imc;
char *pos, *pos2;
int i;
for (i = 0; i < TNC_MAX_IMC_ID; i++) {
if (tnc_imc[i] == NULL)
break;
}
if (i >= TNC_MAX_IMC_ID) {
wpa_printf(MSG_DEBUG, "TNC: Too many IMCs");
return NULL;
}
... | tncc_parse_imc | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
tncc_process_res tncc_process_if_tnccs(tncc_data *tncc, const u8 *msg,
size_t len) {
unsigned int type;
tncc_process_res res;
int recommendation_msg;
unsigned int batch_id;
size_t decoded_len;
char *start;
char *pos;
unsigned char *decoded;
char *xml;
char *xml... | enum tncc_process_res tncc_process_if_tnccs(struct tncc_data *tncc,
const u8 *msg, size_t len) {
char *buf, *start, *end, *pos, *pos2, *payload;
unsigned int batch_id;
unsigned char *decoded;
size_t decoded_len;
enum tncc_process_res res = TNCCS_PROCESS_OK_NO_RECOMM... | tncc_process_if_tnccs | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *tncc_process_soh_request(int ver, const u8 *data, size_t len) {
wpa_hexdump(2, "TNC: SoH Request", data, len);
if (len <= 0xB)
return 0;
if (WPA_GET_BE16_15(data) != 7)
return 0;
if (WPA_GET_BE16_15(data + 2) <= 7u)
return 0;
if (WPA_GET_BE32_15(data + 4) != 311)
return 0;
if (WPA_GE... | struct wpabuf *tncc_process_soh_request(int ver, const u8 *data, size_t len) {
const u8 *pos;
wpa_hexdump(MSG_DEBUG, "TNC: SoH Request", data, len);
if (len < 12)
return NULL;
pos = data;
if (WPA_GET_BE16(pos) != EAP_TLV_VENDOR_SPECIFIC_TLV)
return NULL;
pos += 2;
if (WPA_GET_BE16(pos) < 8)
... | tncc_process_soh_request | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void tncc_send_to_imcs(tncc_data *tncc, unsigned int type, const u8 *msg,
size_t len) {
tnc_if_imc *imc;
TNC_Result res;
wpa_hexdump_ascii(1, "TNC: Message to IMC(s)", msg, len);
for (imc = tncc->imc; imc; imc = imc->next) {
if (imc->ReceiveMessage) {
if (tncc_supported_type(im... | static void tncc_send_to_imcs(struct tncc_data *tncc, unsigned int type,
const u8 *msg, size_t len) {
struct tnc_if_imc *imc;
TNC_Result res;
wpa_hexdump_ascii(MSG_MSGDUMP, "TNC: Message to IMC(s)", msg, len);
for (imc = tncc->imc; imc; imc = imc->next) {
if (imc->ReceiveMess... | tncc_send_to_imcs | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int tncc_supported_type(tnc_if_imc *imc, unsigned int type) {
unsigned int svendor;
unsigned int ssubtype;
size_t i;
if (!imc || !imc->supported_types)
return 0;
for (i = 0; i < imc->num_supported_types; ++i) {
svendor = imc->supported_types[i] >> 8;
ssubtype = (unsigned char)imc->supported_types... | static int tncc_supported_type(struct tnc_if_imc *imc, unsigned int type) {
size_t i;
unsigned int vendor, subtype;
if (imc == NULL || imc->supported_types == NULL)
return 0;
vendor = type >> 8;
subtype = type & 0xff;
for (i = 0; i < imc->num_supported_types; i++) {
unsigned int svendor, ssubtype... | tncc_supported_type | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
size_t tncc_total_send_len(tncc_data *tncc) {
tnc_if_imc *imc;
size_t len;
len = 0;
for (imc = tncc->imc; imc; imc = imc->next)
len += imc->imc_send_len;
return len;
} | size_t tncc_total_send_len(struct tncc_data *tncc) {
struct tnc_if_imc *imc;
size_t len = 0;
for (imc = tncc->imc; imc; imc = imc->next)
len += imc->imc_send_len;
return len;
} | tncc_total_send_len | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void tncc_unload_imc(tnc_if_imc *imc) {
tncc_imc_terminate(imc);
tnc_imc[imc->imcID] = 0;
if (imc->dlhandle)
dlclose(imc->dlhandle);
free(imc->name);
free(imc->path);
free(imc->supported_types);
free(imc->imc_send);
} | static void tncc_unload_imc(struct tnc_if_imc *imc) {
tncc_imc_terminate(imc);
tnc_imc[imc->imcID] = NULL;
if (imc->dlhandle) {
#ifdef CONFIG_NATIVE_WINDOWS
FreeLibrary(imc->dlhandle);
#else
dlclose(imc->dlhandle);
#endif
}
os_free(imc->name);
os_free(imc->path);
os_free(imc->supported_types);
... | tncc_unload_imc | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void update_channel_utilization(void *eloop_data, void *user_data) {
unsigned int sec;
unsigned int usec;
hostapd_data *hapd;
hostapd_iface *iface;
unsigned long v7;
v7 = __readfsqword(0x28u);
hapd = (hostapd_data *)eloop_data;
iface = *(hostapd_iface **)eloop_data;
if (*((_DWORD *)eloop_data + 646) ... | static void update_channel_utilization(void *eloop_data, void *user_data) {
struct hostapd_data *hapd = eloop_data;
unsigned int sec, usec;
int err;
struct hostapd_iface *iface = hapd->iface;
if (!(hapd->beacon_set_done && hapd->started))
return;
err = hostapd_drv_get_survey(hapd, hapd->iface->freq);
... | update_channel_utilization | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void update_sta_ht(hostapd_data *hapd, sta_info *sta) {
u16 ht_capab;
ht_capab = sta->ht_capabilities->ht_capabilities_info;
wpa_printf(
2, "HT: STA %02x:%02x:%02x:%02x:%02x:%02x HT Capabilities Info: 0x%04x",
sta->addr[0], sta->addr[1], sta->addr[2], sta->addr[3], sta->addr[4],
sta->addr[5], h... | static void update_sta_ht(struct hostapd_data *hapd, struct sta_info *sta) {
u16 ht_capab;
ht_capab = le_to_host16(sta->ht_capabilities->ht_capabilities_info);
wpa_printf(MSG_DEBUG,
"HT: STA " MACSTR " HT Capabilities Info: "
"0x%04x",
MAC2STR(sta->addr), ht_capab);
if ((... | update_sta_ht | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void update_sta_no_ht(hostapd_data *hapd, sta_info *sta) {
if ((*((_BYTE *)sta + 355) & 0x10) == 0) {
*((_BYTE *)sta + 355) |= 0x10u;
++hapd->iface->num_sta_no_ht;
}
if (hapd->iconf->ieee80211n)
wpa_printf(2,
"%s STA %02x:%02x:%02x:%02x:%02x:%02x - no HT, num of non-HT "
... | static void update_sta_no_ht(struct hostapd_data *hapd, struct sta_info *sta) {
if (!sta->no_ht_set) {
sta->no_ht_set = 1;
hapd->iface->num_sta_no_ht++;
}
if (hapd->iconf->ieee80211n) {
wpa_printf(MSG_DEBUG,
"%s STA " MACSTR " - no HT, num of "
"non-HT stations %d",
... | update_sta_no_ht | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void usage() {
const char *v0;
int i;
printf(
"%s\n"
"\n"
"%s\n"
"usage:\n"
" wpa_supplicant [-BddhKLqqstuvW] [-P<pid file>] [-g<global ctrl>] \\\n"
" [-G<group>] \\\n"
" -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] "
"[-p<driver_param>] \\\n"
... | static void usage(void) {
int i;
printf("%s\n\n%s\n"
"usage:\n"
" wpa_supplicant [-BddhKLqq"
#ifdef CONFIG_DEBUG_SYSLOG
"s"
#endif
"t"
#ifdef CONFIG_CTRL_IFACE_DBUS_NEW
"u"
#endif
"vW] [-P<pid file>] "
"[-g<global ctrl>] \\\n"
" [-G<gro... | usage | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
char *uscore_to_dbus(const char *uscore) {
size_t v1;
char v3;
char *v4;
dbus_bool_t last_was_uscore;
const char *p;
char *s;
char *str;
p = uscore;
last_was_uscore = 1;
v1 = strlen(uscore);
str = (char *)os_zalloc(v1 + 1);
s = str;
if (!str)
return 0;
while (p && *p) {
if (*p == 95... | static char *uscore_to_dbus(const char *uscore) {
const char *p = uscore;
char *str, *s;
dbus_bool_t last_was_uscore = TRUE;
s = str = os_zalloc(os_strlen(uscore) + 1);
if (!str)
return NULL;
while (p && *p) {
if (*p == '_') {
last_was_uscore = TRUE;
} else {
*s++ = last_was_uscore ... | uscore_to_dbus | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int use_anti_clogging(hostapd_data *hapd) {
unsigned int open;
sta_info *sta;
open = 0;
if (!hapd->conf->anti_clogging_threshold)
return 1;
for (sta = hapd->sta_list; sta; sta = sta->next) {
if (sta->sae && (sta->sae->state == sae_state_SAE_COMMITTED ||
sta->sae->state == sae_sta... | static int use_anti_clogging(struct hostapd_data *hapd) {
struct sta_info *sta;
unsigned int open = 0;
if (hapd->conf->anti_clogging_threshold == 0)
return 1;
for (sta = hapd->sta_list; sta; sta = sta->next) {
#ifdef CONFIG_SAE
if (sta->sae &&
(sta->sae->state == SAE_COMMITTED || sta->sae->sta... | use_anti_clogging | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int utf8_to_ucs2(const u8 *utf8_string, size_t utf8_string_len, u8 *ucs2_buffer,
size_t ucs2_buffer_size, size_t *ucs2_string_size) {
u8 c;
u8 c2;
size_t i;
size_t j;
i = 0;
j = 0;
while (i < utf8_string_len) {
c = utf8_string[i];
if (j >= ucs2_buffer_size)
return -1;
i... | static int utf8_to_ucs2(const u8 *utf8_string, size_t utf8_string_len,
u8 *ucs2_buffer, size_t ucs2_buffer_size,
size_t *ucs2_string_size) {
size_t i, j;
for (i = 0, j = 0; i < utf8_string_len; i++) {
u8 c = utf8_string[i];
if (j >= ucs2_buffer_size) {
... | utf8_to_ucs2 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int valid_channel_list(const char *val) {
while (*val) {
if ((*val <= 47 || *val > 57) && *val != 47 && *val != 44)
return 0;
++val;
}
return 1;
} | static int valid_channel_list(const char *val) {
while (*val) {
if (!((*val >= '0' && *val <= '9') || *val == '/' || *val == ','))
return 0;
val++;
}
return 1;
} | valid_channel_list | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int vendor_reply_handler(nl_msg *msg, void *arg) {
long v2;
unsigned int v4;
long v5;
size_t v6;
size_t v7;
const void *v8;
int rem;
nlattr *nl;
genlmsghdr *gnlh;
wpabuf *buf;
nlattr *nl_vendor_reply;
nlattr *tb[302];
unsigned long v15;
v15 = __readfsqword(0x28u);
v2 = nlmsg_hdr(msg);
g... | static int vendor_reply_handler(struct nl_msg *msg, void *arg) {
struct nlattr *tb[NL80211_ATTR_MAX + 1];
struct nlattr *nl_vendor_reply, *nl;
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct wpabuf *buf = arg;
int rem;
if (!buf)
return NL_SKIP;
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_at... | vendor_reply_handler | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
chan_allowed verify_160mhz(hostapd_hw_modes *mode, u8 op_class, u8 channel) {
u8 center_chan;
unsigned int flags;
unsigned int i;
unsigned int no_ir;
const u8 *center_channels;
size_t num_chan;
u8 center_channels_5ghz[3];
u8 center_channels_6ghz[7];
unsigned long v13;
v13 = __readfsqword(0x28u);
... | static enum chan_allowed verify_160mhz(struct hostapd_hw_modes *mode,
u8 op_class, u8 channel) {
u8 center_chan;
unsigned int i;
unsigned int no_ir = 0;
const u8 *center_channels;
size_t num_chan;
const u8 center_channels_5ghz[] = {50, 114, 163};
const u8 center_chan... | verify_160mhz | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
chan_allowed verify_80mhz(hostapd_hw_modes *mode, u8 op_class, u8 channel) {
u8 center_chan;
unsigned int flags;
unsigned int i;
unsigned int no_ir;
const u8 *center_channels;
size_t num_chan;
u8 center_channels_5ghz[7];
u8 center_channels_6ghz[14];
unsigned long v13;
v13 = __readfsqword(0x28u);
... | static enum chan_allowed verify_80mhz(struct hostapd_hw_modes *mode,
u8 op_class, u8 channel) {
u8 center_chan;
unsigned int i;
unsigned int no_ir = 0;
const u8 *center_channels;
size_t num_chan;
const u8 center_channels_5ghz[] = {42, 58, 106, 122, 138, 155, 171};
con... | verify_80mhz | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
chan_allowed verify_channel(hostapd_hw_modes *mode, u8 op_class, u8 channel,
u8 bw) {
unsigned int flag;
chan_allowed res;
chan_allowed res2;
unsigned long v10;
v10 = __readfsqword(0x28u);
flag = 0;
res = allow_channel(mode, op_class, channel, &flag);
res2 = res;
if (bw ==... | enum chan_allowed verify_channel(struct hostapd_hw_modes *mode, u8 op_class,
u8 channel, u8 bw) {
unsigned int flag = 0;
enum chan_allowed res, res2;
res2 = res = allow_channel(mode, op_class, channel, &flag);
if (bw == BW40MINUS || (bw == BW40 && (((channel - 1) / 4) % 2))) {
... | verify_channel | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int vht_supported(const hostapd_hw_modes_0 *mode) {
return (mode->flags & 2) == 0 || (mode->vht_mcs_set[0] & 3) != 3;
} | int vht_supported(const struct hostapd_hw_modes *mode) {
if (!(mode->flags & HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN)) {
return 1;
}
return (mode->vht_mcs_set[0] & 0x3) != 3;
} | vht_supported | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wakeup_main(void *data) {
raise(29);
*((_DWORD *)data + 2) = 1;
} | static void wakeup_main(void *data) {
struct wpas_dbus_priv *priv = data;
raise(SIGPOLL);
priv->should_dispatch = 1;
} | wakeup_main | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void watch_toggled(DBusWatch *watch, void *data) {
if ((unsigned int)dbus_watch_get_enabled(watch))
add_watch(watch, data);
else
remove_watch(watch, data);
} | static void watch_toggled(DBusWatch *watch, void *data) {
if (dbus_watch_get_enabled(watch))
add_watch(watch, data);
else
remove_watch(watch, data);
} | watch_toggled | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wext_19_iw_point(wpa_driver_wext_data *drv, u16 cmd) {
return drv->we_version_compiled > 18 &&
(cmd == 0x8B1B || cmd == 0x8B2B || cmd == 0x8C05 || cmd == 0x8C02);
} | static int wext_19_iw_point(struct wpa_driver_wext_data *drv, u16 cmd) {
return drv->we_version_compiled > 18 &&
(cmd == SIOCGIWESSID || cmd == SIOCGIWENCODE || cmd == IWEVGENIE ||
cmd == IWEVCUSTOM);
} | wext_19_iw_point | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wext_add_hostap(wpa_driver_wext_data *drv) {
int n;
int ret;
dirent **names;
char buf[200];
unsigned long v7;
v7 = __readfsqword(0x28u);
ret = -1;
snprintf(buf, 0xC8u, "/sys/class/net/%s/device/net", drv->ifname);
n = scandir(
buf, &names, 0,
(int (*)(const struct dirent **, const str... | static int wext_add_hostap(struct wpa_driver_wext_data *drv) {
char buf[200];
int n;
struct dirent **names;
int ret = -1;
snprintf(buf, sizeof(buf), "/sys/class/net/%s/device/net", drv->ifname);
n = scandir(buf, &names, NULL, alphasort);
if (n < 0)
return -1;
while (n--) {
if (ret < 0 && wext_... | wext_add_hostap | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wext_check_hostap(wpa_driver_wext_data *drv) {
char *pos;
const char *posa;
long res;
char ifname2[32];
char path[208];
char buf[200];
unsigned long v7;
v7 = __readfsqword(0x28u);
snprintf(path, 0xC8u, "/sys/class/net/%s/device/driver", drv->ifname);
res = readlink(path, buf, 0xC7u);
if (res... | static void wext_check_hostap(struct wpa_driver_wext_data *drv) {
char path[200], buf[200], *pos;
ssize_t res;
snprintf(path, sizeof(path), "/sys/class/net/%s/device/driver", drv->ifname);
res = readlink(path, buf, sizeof(buf) - 1);
if (res > 0) {
buf[res] = '\0';
pos = strrchr(buf, '/');
if (pos... | wext_check_hostap | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wext_get_phy_name(wpa_driver_wext_data *drv) {
int *v1;
char *v2;
int *v3;
char *v4;
int f;
int rv;
char *pos;
char buf[104];
unsigned long v9;
v9 = __readfsqword(0x28u);
drv->phyname[0] = 0;
snprintf(buf, 0x59u, "/sys/class/net/%s/phy80211/name", drv->ifname);
f = open(buf, 0);
if (f ... | static void wext_get_phy_name(struct wpa_driver_wext_data *drv) {
char buf[90], *pos;
int f, rv;
drv->phyname[0] = '\0';
snprintf(buf, sizeof(buf) - 1, "/sys/class/net/%s/phy80211/name",
drv->ifname);
f = open(buf, O_RDONLY);
if (f < 0) {
wpa_printf(MSG_DEBUG, "Could not open file %s: %s", ... | wext_get_phy_name | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *wext_get_radio_name(void *priv) { return (char *)priv + 41; } | static const char *wext_get_radio_name(void *priv) {
struct wpa_driver_wext_data *drv = priv;
return drv->phyname;
} | wext_get_radio_name | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wext_get_scan_custom(iw_event *iwe, wext_scan_data *res, char *custom,
char *end) {
int bytes;
int bytes_0;
int bytes_1;
size_t clen;
u8 *tmp;
u8 *tmpa;
u8 bin[8];
unsigned long v12;
v12 = __readfsqword(0x28u);
clen = iwe->u.essid.length;
if (clen <= end - custom) {... | static void wext_get_scan_custom(struct iw_event *iwe,
struct wext_scan_data *res, char *custom,
char *end) {
size_t clen;
u8 *tmp;
clen = iwe->u.data.length;
if (clen > (size_t)(end - custom))
return;
if (clen > 7 && os_strncmp(custom, "... | wext_get_scan_custom | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wext_get_scan_encode(iw_event *iwe, wext_scan_data *res) {
if ((iwe->u.essid.flags & 0x8000u) == 0)
res->res.caps |= 0x10u;
} | static void wext_get_scan_encode(struct iw_event *iwe,
struct wext_scan_data *res) {
if (!(iwe->u.data.flags & IW_ENCODE_DISABLED))
res->res.caps |= IEEE80211_CAP_PRIVACY;
} | wext_get_scan_encode | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wext_get_scan_freq(iw_event *iwe, wext_scan_data *res) {
int divi;
int i;
divi = (int)&loc_F4240;
if (iwe->u.freq.e)
goto LABEL_8;
if (res->res.freq)
return;
if (iwe->u.nwid.value > 0 && iwe->u.nwid.value <= 13) {
res->res.freq = 5 * iwe->u.nwid.value + 2407;
return;
}
if (iwe->u.n... | static void wext_get_scan_freq(struct iw_event *iwe,
struct wext_scan_data *res) {
int divi = 1000000, i;
if (iwe->u.freq.e == 0) {
if (res->res.freq)
return;
if (iwe->u.freq.m >= 1 && iwe->u.freq.m <= 13) {
res->res.freq = 2407 + 5 * iwe->u.freq.m;
return... | wext_get_scan_freq | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wext_get_scan_iwevgenie(iw_event *iwe, wext_scan_data *res, char *custom,
char *end) {
char *gend;
u8 *tmp;
if (iwe->u.essid.length) {
gend = &custom[iwe->u.essid.length];
if (gend <= end) {
tmp = (u8 *)realloc(res->ie, res->ie_len + iwe->u.essid.length);
if ... | static void wext_get_scan_iwevgenie(struct iw_event *iwe,
struct wext_scan_data *res, char *custom,
char *end) {
char *genie, *gpos, *gend;
u8 *tmp;
if (iwe->u.data.length == 0)
return;
gpos = genie = custom;
gend = genie + iwe->u.d... | wext_get_scan_iwevgenie | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wext_get_scan_mode(iw_event *iwe, wext_scan_data *res) {
if (iwe->u.nwid.value == 1) {
res->res.caps |= 2u;
} else if (iwe->u.nwid.value == 3 || iwe->u.nwid.value == 2) {
res->res.caps |= 1u;
}
} | static void wext_get_scan_mode(struct iw_event *iwe,
struct wext_scan_data *res) {
if (iwe->u.mode == IW_MODE_ADHOC)
res->res.caps |= IEEE80211_CAP_IBSS;
else if (iwe->u.mode == IW_MODE_MASTER || iwe->u.mode == IW_MODE_INFRA)
res->res.caps |= IEEE80211_CAP_ESS;
} | wext_get_scan_mode | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wext_get_scan_qual(wpa_driver_wext_data *drv, iw_event *iwe,
wext_scan_data *res) {
res->res.qual = iwe->u.qual.qual;
res->res.noise = iwe->u.qual.noise;
res->res.level = iwe->u.qual.level;
if ((iwe->u.name[3] & 0x10) != 0)
res->res.flags |= 1u;
if ((iwe->u.name[3] & 0x20) != ... | static void wext_get_scan_qual(struct wpa_driver_wext_data *drv,
struct iw_event *iwe,
struct wext_scan_data *res) {
res->res.qual = iwe->u.qual.qual;
res->res.noise = iwe->u.qual.noise;
res->res.level = iwe->u.qual.level;
if (iwe->u.qual.updated & I... | wext_get_scan_qual | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wext_get_scan_rate(iw_event *iwe, wext_scan_data *res, char *pos,
char *end) {
int maxrate;
char *custom;
signed long clen;
custom = pos + 8;
clen = iwe->len;
if (clen <= (unsigned long)(end - (pos + 8))) {
maxrate = 0;
while (clen > 7) {
if (maxrate < (int)*(_QWO... | static void wext_get_scan_rate(struct iw_event *iwe, struct wext_scan_data *res,
char *pos, char *end) {
int maxrate;
char *custom = pos + IW_EV_LCP_LEN;
struct iw_param p;
size_t clen;
clen = iwe->len;
if (clen > (size_t)(end - custom))
return;
maxrate = 0;
while (((... | wext_get_scan_rate | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wext_get_scan_ssid(iw_event *iwe, wext_scan_data *res, char *custom,
char *end) {
int ssid_len;
ssid_len = iwe->u.essid.length;
if (iwe->u.essid.length <= end - custom && iwe->u.essid.flags &&
iwe->u.essid.length && iwe->u.essid.length <= 0x20u) {
memcpy(res->ssid, custom, ... | static void wext_get_scan_ssid(struct iw_event *iwe, struct wext_scan_data *res,
char *custom, char *end) {
int ssid_len = iwe->u.essid.length;
if (ssid_len > end - custom)
return;
if (iwe->u.essid.flags && ssid_len > 0 && ssid_len <= IW_ESSID_MAX_SIZE) {
os_memcpy(res->ssid... | wext_get_scan_ssid | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wext_hostap_ifname(wpa_driver_wext_data *drv, const char *ifname) {
int v3;
int ret;
int type;
FILE *f;
const char *res;
char buf[200];
unsigned long v9;
v9 = __readfsqword(0x28u);
if (!strcmp(ifname, ".") || !strcmp(ifname, ".."))
return -1;
ret = snprintf(buf, 0xC8u, "/sys/class/net/%s/de... | static int wext_hostap_ifname(struct wpa_driver_wext_data *drv,
const char *ifname) {
char buf[200], *res;
int type, ret;
FILE *f;
if (strcmp(ifname, ".") == 0 || strcmp(ifname, "..") == 0)
return -1;
ret = snprintf(buf, sizeof(buf), "/sys/class/net/%s/device/net/%s/type",
... | wext_hostap_ifname | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wiphy_info_cipher_suites(wiphy_info_data *info, nlattr *tb) {
unsigned int v2;
unsigned int enc;
unsigned int v4;
unsigned int v5;
unsigned int v6;
unsigned int v7;
int i;
int num;
u32 c;
u32 *ciphers;
if (tb) {
num = (unsigned long)(int)nla_len(tb) >> 2;
ciphers = (u32 *)nla_data(tb... | static void wiphy_info_cipher_suites(struct wiphy_info_data *info,
struct nlattr *tb) {
int i, num;
u32 *ciphers;
if (tb == NULL)
return;
num = nla_len(tb) / sizeof(u32);
ciphers = nla_data(tb);
for (i = 0; i < num; i++) {
u32 c = ciphers[i];
wpa_printf(MS... | wiphy_info_cipher_suites | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wiphy_info_ext_feature_flags(wiphy_info_data *info, nlattr *tb) {
u64 flags2;
int len;
wpa_driver_capa *capa;
u8 *ext_features;
capa = info->capa;
if (tb) {
ext_features = (u8 *)nla_data(tb);
len = nla_len(tb);
if (ext_feature_isset(
ext_features, len,
nl80211_ext_f... | static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info,
struct nlattr *tb) {
struct wpa_driver_capa *capa = info->capa;
u8 *ext_features;
int len;
if (tb == NULL)
return;
ext_features = nla_data(tb);
len = nla_len(tb);
if (ext_feature_isset(ex... | wiphy_info_ext_feature_flags | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wired_init_sockets(wpa_driver_wired_data *drv, u8 *own_addr) {
uint16_t v2;
int *v3;
char *v4;
int *v6;
char *v7;
int *v8;
char *v9;
int *v10;
char *v11;
int *v12;
char *v13;
int *v14;
char *v15;
int *v16;
char *v17;
int *v18;
char *v19;
int *v20;
char *v21;
int n;
sockaddr... | static int wired_init_sockets(struct wpa_driver_wired_data *drv, u8 *own_addr) {
#ifdef __linux__
struct ifreq ifr;
struct sockaddr_ll addr;
struct sockaddr_in addr2;
int n = 1;
drv->common.sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_PAE));
if (drv->common.sock < 0) {
wpa_printf(MSG_ERROR, "socket[P... | wired_init_sockets | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wmm_ac_add_ts(wpa_supplicant *wpa_s, const u8 *addr,
const wmm_tspec_element *tspec) {
u8 v3;
u8 up;
u8 ac;
u8 dir;
u8 tsid;
le16 admitted_time;
ts_dir_idx idx;
int ret;
wmm_tspec_element *_tspec;
admitted_time = tspec->medium_time;
up = wmm_ac_get_user_priority(tspec);
ac... | static int wmm_ac_add_ts(struct wpa_supplicant *wpa_s, const u8 *addr,
const struct wmm_tspec_element *tspec) {
struct wmm_tspec_element *_tspec;
int ret;
u16 admitted_time = le_to_host16(tspec->medium_time);
u8 up = wmm_ac_get_user_priority(tspec);
u8 ac = up_to_ac[up];
u8 dir = wm... | wmm_ac_add_ts | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wmm_ac_addts_req_timeout(void *eloop_ctx, void *timeout_ctx) {
int user_priority;
u8 tsid;
user_priority = wmm_ac_get_user_priority(
(const wmm_tspec_element *)((char *)timeout_ctx + 7));
tsid = wmm_ac_get_tsid((const wmm_tspec_element *)((char *)timeout_ctx + 7));
wpa_printf(2, "Timeout getting A... | static void wmm_ac_addts_req_timeout(void *eloop_ctx, void *timeout_ctx) {
struct wpa_supplicant *wpa_s = eloop_ctx;
struct wmm_ac_addts_request *addts_req = timeout_ctx;
wpa_printf(MSG_DEBUG, "Timeout getting ADDTS response (tsid=%d up=%d)",
wmm_ac_get_tsid(&addts_req->tspec),
wmm_ac_g... | wmm_ac_addts_req_timeout | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wmm_ac_addts_request *
wmm_ac_build_addts_req(wpa_supplicant *wpa_s,
const wmm_ac_ts_setup_params *params,
const u8 *address) {
u8 uapsd;
wmm_ac_addts_request *addts_req;
uapsd = (*(_BYTE *)&wpa_s->wmm_ac_assoc_info
->ac_params[(unsigned char)up_to_ac... | static struct wmm_ac_addts_request *
wmm_ac_build_addts_req(struct wpa_supplicant *wpa_s,
const struct wmm_ac_ts_setup_params *params,
const u8 *address) {
struct wmm_ac_addts_request *addts_req;
struct wmm_tspec_element *tspec;
u8 ac = up_to_ac[params->user_priority]... | wmm_ac_build_addts_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wmm_ac_clear_saved_tspecs(wpa_supplicant *wpa_s) {
if (wpa_s->last_tspecs) {
wpa_printf(2, "WMM AC: Clear saved tspecs");
free(wpa_s->last_tspecs);
wpa_s->last_tspecs = 0;
wpa_s->last_tspecs_count = 0;
}
} | void wmm_ac_clear_saved_tspecs(struct wpa_supplicant *wpa_s) {
if (wpa_s->last_tspecs) {
wpa_printf(MSG_DEBUG, "WMM AC: Clear saved tspecs");
os_free(wpa_s->last_tspecs);
wpa_s->last_tspecs = NULL;
wpa_s->last_tspecs_count = 0;
}
} | wmm_ac_clear_saved_tspecs | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wmm_ac_ctrl_addts(wpa_supplicant *wpa_s, char *cmd) {
char *context;
char *token;
wmm_ac_ts_setup_params params;
unsigned long v6;
v6 = __readfsqword(0x28u);
context = 0;
*(_QWORD *)¶ms.tsid = 0xFF000000FFLL;
memset(¶ms.user_priority, 0, 24);
while (1) {
token = str_token(cmd, " ", &c... | static int wmm_ac_ctrl_addts(struct wpa_supplicant *wpa_s, char *cmd) {
char *token, *context = NULL;
struct wmm_ac_ts_setup_params params = {
.tsid = 0xff,
.direction = 0xff,
};
while ((token = str_token(cmd, " ", &context))) {
if (sscanf(token, "tsid=%i", ¶ms.tsid) == 1 ||
sscanf(... | wmm_ac_ctrl_addts | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wmm_ac_ctrl_delts(wpa_supplicant *wpa_s, char *cmd) {
u8 v2;
v2 = atoi(cmd);
return wpas_wmm_ac_delts(wpa_s, v2);
} | static int wmm_ac_ctrl_delts(struct wpa_supplicant *wpa_s, char *cmd) {
u8 tsid = atoi(cmd);
return wpas_wmm_ac_delts(wpa_s, tsid);
} | wmm_ac_ctrl_delts | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wmm_ac_deinit(wpa_supplicant *wpa_s) {
int i;
for (i = 0; i <= 3; ++i)
wmm_ac_del_ts(wpa_s, i, 7);
wmm_ac_del_req(wpa_s, 1);
free(wpa_s->wmm_ac_assoc_info);
wpa_s->wmm_ac_assoc_info = 0;
} | static void wmm_ac_deinit(struct wpa_supplicant *wpa_s) {
int i;
for (i = 0; i < WMM_AC_NUM; i++)
wmm_ac_del_ts(wpa_s, i, TS_DIR_IDX_ALL);
wmm_ac_del_req(wpa_s, 1);
os_free(wpa_s->wmm_ac_assoc_info);
wpa_s->wmm_ac_assoc_info = NULL;
} | wmm_ac_deinit | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wmm_ac_del_req(wpa_supplicant *wpa_s, int failed) {
u8 tsid;
wmm_ac_addts_request *req;
req = wpa_s->addts_request;
if (req) {
if (failed) {
tsid = wmm_ac_get_tsid(&req->tspec);
wpa_msg(wpa_s, 3, "TSPEC-REQ-FAILED tsid=%u", tsid);
}
eloop_cancel_timeout((eloop_timeout_handler)wmm_a... | static void wmm_ac_del_req(struct wpa_supplicant *wpa_s, int failed) {
struct wmm_ac_addts_request *req = wpa_s->addts_request;
if (!req)
return;
if (failed)
wpa_msg(wpa_s, MSG_INFO, WMM_AC_EVENT_TSPEC_REQ_FAILED "tsid=%u",
wmm_ac_get_tsid(&req->tspec));
eloop_cancel_timeout(wmm_ac_addts_... | wmm_ac_del_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wmm_ac_del_ts(wpa_supplicant *wpa_s, u8 ac, int dir_bitmap) {
ts_dir_idx idx;
for (idx = ts_dir_idx_TS_DIR_IDX_UPLINK;
(unsigned int)idx <= ts_dir_idx_TS_DIR_IDX_BIDI; ++idx) {
if ((((unsigned int)dir_bitmap >> idx) & 1) != 0)
wmm_ac_del_ts_idx(wpa_s, ac, idx);
}
} | static void wmm_ac_del_ts(struct wpa_supplicant *wpa_s, u8 ac, int dir_bitmap) {
enum ts_dir_idx idx;
for (idx = 0; idx < TS_DIR_IDX_COUNT; idx++) {
if (!(dir_bitmap & BIT(idx)))
continue;
wmm_ac_del_ts_idx(wpa_s, ac, idx);
}
} | wmm_ac_del_ts | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wmm_ac_del_ts_idx(wpa_supplicant *wpa_s, u8 ac, ts_dir_idx dir) {
u8 tsid;
wmm_tspec_element *tspec;
tspec = wpa_s->tspecs[ac][dir];
if (tspec) {
tsid = wmm_ac_get_tsid(tspec);
wpa_printf(2, "WMM AC: Del TS ac=%d tsid=%d", ac, tsid);
if (wmm_ac_get_direction(tspec) != 1)
wpa_drv_del_ts(w... | static void wmm_ac_del_ts_idx(struct wpa_supplicant *wpa_s, u8 ac,
enum ts_dir_idx dir) {
struct wmm_tspec_element *tspec = wpa_s->tspecs[ac][dir];
u8 tsid;
if (!tspec)
return;
tsid = wmm_ac_get_tsid(tspec);
wpa_printf(MSG_DEBUG, "WMM AC: Del TS ac=%d tsid=%d", ac, tsid);
... | wmm_ac_del_ts_idx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 wmm_ac_direction_to_idx(u8 direction) {
if (direction == 3)
return 2;
if (direction > 3u)
goto LABEL_9;
if (!direction)
return 0;
if (direction == 1)
return 1;
LABEL_9:
wpa_printf(5, "Invalid direction: %d", direction);
return 0;
} | static u8 wmm_ac_direction_to_idx(u8 direction) {
switch (direction) {
case WMM_AC_DIR_UPLINK:
return TS_DIR_IDX_UPLINK;
case WMM_AC_DIR_DOWNLINK:
return TS_DIR_IDX_DOWNLINK;
case WMM_AC_DIR_BIDIRECTIONAL:
return TS_DIR_IDX_BIDI;
default:
wpa_printf(MSG_ERROR, "Invalid direction: %d", directio... | wmm_ac_direction_to_idx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int wmm_ac_find_tsid(wpa_supplicant *wpa_s, u8 tsid, ts_dir_idx *dir) {
int ac;
ts_dir_idx idx;
ac = 0;
LABEL_11:
if (ac > 3)
return -1;
for (idx = ts_dir_idx_TS_DIR_IDX_UPLINK;; ++idx) {
if ((unsigned int)idx > ts_dir_idx_TS_DIR_IDX_BIDI) {
++ac;
goto LABEL_11;
}
if (wpa_s->tspec... | static int wmm_ac_find_tsid(struct wpa_supplicant *wpa_s, u8 tsid,
enum ts_dir_idx *dir) {
int ac;
enum ts_dir_idx idx;
for (ac = 0; ac < WMM_AC_NUM; ac++) {
for (idx = 0; idx < TS_DIR_IDX_COUNT; idx++) {
if (wpa_s->tspecs[ac][idx] &&
wmm_ac_get_tsid(wpa_s->tspecs[... | wmm_ac_find_tsid | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 wmm_ac_get_direction(const wmm_tspec_element *tspec) {
return (tspec->ts_info[0] >> 5) & 3;
} | static u8 wmm_ac_get_direction(const struct wmm_tspec_element *tspec) {
return (tspec->ts_info[0] >> 5) & 0x03;
} | wmm_ac_get_direction | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 wmm_ac_get_tsid(const wmm_tspec_element *tspec) {
return (tspec->ts_info[0] >> 1) & 0xF;
} | static inline u8 wmm_ac_get_tsid(const struct wmm_tspec_element *tspec) {
return (tspec->ts_info[0] >> 1) & 0x0f;
} | wmm_ac_get_tsid | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 wmm_ac_get_tspecs_count(wpa_supplicant *wpa_s) {
int ac;
int dir;
u8 tspecs_count;
tspecs_count = 0;
for (ac = 0; ac <= 3; ++ac) {
for (dir = 0; dir <= 2; ++dir) {
if (wpa_s->tspecs[ac][dir])
++tspecs_count;
}
}
return tspecs_count;
} | static u8 wmm_ac_get_tspecs_count(struct wpa_supplicant *wpa_s) {
int ac, dir, tspecs_count = 0;
for (ac = 0; ac < WMM_AC_NUM; ac++) {
for (dir = 0; dir < TS_DIR_IDX_COUNT; dir++) {
if (wpa_s->tspecs[ac][dir])
tspecs_count++;
}
}
return tspecs_count;
} | wmm_ac_get_tspecs_count | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 wmm_ac_get_user_priority(const wmm_tspec_element *tspec) {
return (tspec->ts_info[1] >> 3) & 7;
} | static u8 wmm_ac_get_user_priority(const struct wmm_tspec_element *tspec) {
return (tspec->ts_info[1] >> 3) & 0x07;
} | wmm_ac_get_user_priority | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wmm_ac_handle_addts_resp(wpa_supplicant *wpa_s, const u8 *sa,
const u8 resp_dialog_token, const u8 status_code,
const wmm_tspec_element *tspec) {
u8 tsid;
u8 dir;
u8 up;
u8 ac;
int replace_tspecs;
wmm_ac_addts_request *req;
req = wpa_s->add... | static void wmm_ac_handle_addts_resp(struct wpa_supplicant *wpa_s, const u8 *sa,
const u8 resp_dialog_token,
const u8 status_code,
const struct wmm_tspec_element *tspec) {
struct wmm_ac_addts_request *req = ... | wmm_ac_handle_addts_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void wmm_ac_handle_delts(wpa_supplicant *wpa_s, const u8 *sa,
const wmm_tspec_element *tspec) {
u8 tsid;
ts_dir_idx idx;
int ac;
unsigned long v6;
v6 = __readfsqword(0x28u);
tsid = wmm_ac_get_tsid(tspec);
wpa_printf(2,
"WMM AC: DELTS frame has been received TSID=%u "... | static void wmm_ac_handle_delts(struct wpa_supplicant *wpa_s, const u8 *sa,
const struct wmm_tspec_element *tspec) {
int ac;
u8 tsid;
enum ts_dir_idx idx;
tsid = wmm_ac_get_tsid(tspec);
wpa_printf(MSG_DEBUG,
"WMM AC: DELTS frame has been received TSID=%u addr=" M... | wmm_ac_handle_delts | 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.