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
int tls_global_private_key(tls_data *data, const char *private_key, const char *private_key_passwd) { SSL_CTX *ssl_ctx; ssl_ctx = data->ssl; if (!private_key) return 0; if (tls_use_private_key_file(data, 0, private_key, private_key_passwd) && tls_read_pkcs12(data, 0, privat...
static int tls_global_private_key(struct tls_data *data, const char *private_key, const char *private_key_passwd) { SSL_CTX *ssl_ctx = data->ssl; if (private_key == NULL) return 0; if (tls_use_private_key_file(data, NULL, private_key, priva...
tls_global_private_key
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_global_set_params(void *tls_ctx, const tls_connection_params *params) { const char *v2; tls_context *v4; SSL_CTX *ssl_ctx; unsigned long err; ssl_ctx = *(SSL_CTX **)tls_ctx; while (1) { err = ERR_get_error(); if (!err) break; v2 = (const char *)ERR_error_string(err, 0); wpa_pr...
int tls_global_set_params(void *tls_ctx, const struct tls_connection_params *params) { struct tls_data *data = tls_ctx; SSL_CTX *ssl_ctx = data->ssl; unsigned long err; while ((err = ERR_get_error())) { wpa_printf(MSG_INFO, "%s: Clearing pending SSL error: %s", __func__, ...
tls_global_set_params
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_global_set_verify(void *ssl_ctx, int check_crl, int strict) { int flags; X509_STORE *cs_0; if (check_crl) { cs_0 = (X509_STORE *)SSL_CTX_get_cert_store(*(_QWORD *)ssl_ctx); if (!cs_0) { tls_show_errors( 3, "tls_global_set_verify", "Failed to get certificate store when en...
int tls_global_set_verify(void *ssl_ctx, int check_crl, int strict) { int flags; if (check_crl) { struct tls_data *data = ssl_ctx; X509_STORE *cs = SSL_CTX_get_cert_store(data->ssl); if (cs == NULL) { tls_show_errors(MSG_INFO, __func__, "Failed to get " ...
tls_global_set_verify
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void *tls_init(const tls_config *conf) { long v2; SSL_CTX *ssl; tls_context *context; const char *ciphers; tls_data *data; if (tls_openssl_ref_count) { context = tls_context_new(conf); if (!context) return 0; } else { openssl_load_legacy_provider(); context = tls_context_new(conf); ...
void *tls_init(const struct tls_config *conf) { struct tls_data *data; SSL_CTX *ssl; struct tls_context *context; const char *ciphers; if (tls_openssl_ref_count == 0) { void openssl_load_legacy_provider(void); openssl_load_legacy_provider(); tls_global = context = tls_context_new(conf); if ...
tls_init
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_load_ca_der(tls_data *data, const char *ca_cert) { long v2; long cert_store; int ret; SSL_CTX *ssl_ctx; X509_LOOKUP *lookup; unsigned long err; ssl_ctx = data->ssl; ret = 0; v2 = X509_LOOKUP_file(); cert_store = SSL_CTX_get_cert_store(ssl_ctx); lookup = (X509_LOOKUP *)X509_STORE_add_looku...
static int tls_load_ca_der(struct tls_data *data, const char *ca_cert) { SSL_CTX *ssl_ctx = data->ssl; X509_LOOKUP *lookup; int ret = 0; lookup = X509_STORE_add_lookup(SSL_CTX_get_cert_store(ssl_ctx), X509_LOOKUP_file()); if (lookup == NULL) { tls_show_errors(MSG_WARNING,...
tls_load_ca_der
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_match_altsubject(X509 *cert, const char *match) { int type; const char *posa; char *end; size_t len; do { if (!strncmp(match, "EMAIL:", 6u)) { type = 1; posa = match + 6; } else if (!strncmp(match, "DNS:", 4u)) { type = 2; posa = match + 4; } else { if (strnc...
static int tls_match_altsubject(X509 *cert, const char *match) { int type; const char *pos, *end; size_t len; pos = match; do { if (os_strncmp(pos, "EMAIL:", 6) == 0) { type = GEN_EMAIL; pos += 6; } else if (os_strncmp(pos, "DNS:", 4) == 0) { type = GEN_DNS; pos += 4; } el...
tls_match_altsubject
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_match_altsubject_component(X509 *cert, int type, const char *value, size_t len) { int found; stack_index_t i; const stack_st_GENERAL_NAME *ext; GENERAL_NAME *gen; found = 0; ext = (const stack_st_GENERAL_NAME *)X509_get_ext_d2i(cert, 85, 0, 0); for (i = 0; ext &...
static int tls_match_altsubject_component(X509 *cert, int type, const char *value, size_t len) { GENERAL_NAME *gen; void *ext; int found = 0; stack_index_t i; ext = X509_get_ext_d2i(cert, NID_subject_alt_name, NULL, NULL); for (i = 0; ext && i < sk_GENERAL_NAME_nu...
tls_match_altsubject_component
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_match_dn_field(X509 *cert, const char *match) { tls_dn_field_order_cnt dn_cnt; const char *last; const char *token; char field[264]; unsigned long v7; v7 = __readfsqword(0x28u); last = 0; memset(&dn_cnt, 0, sizeof(dn_cnt)); while (1) { token = cstr_token(match, "/", &last); if (!token...
static int tls_match_dn_field(X509 *cert, const char *match) { const char *token, *last = NULL; char field[256]; struct tls_dn_field_order_cnt dn_cnt; os_memset(&dn_cnt, 0, sizeof(dn_cnt)); while ((token = cstr_token(match, "/", &last))) { if (last - token >= (int)sizeof(field)) { wpa_printf(MSG_E...
tls_match_dn_field
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_match_suffix(X509 *cert, const char *match, int full) { const char *last; const char *token; unsigned long v7; v7 = __readfsqword(0x28u); last = 0; while (1) { token = cstr_token(match, ";", &last); if (!token) break; if (tls_match_suffix_helper(cert, token, last - token, full)) ...
static int tls_match_suffix(X509 *cert, const char *match, int full) { #ifdef CONFIG_NATIVE_WINDOWS return -1; #else const char *token, *last = NULL; while ((token = cstr_token(match, ";", &last))) { if (tls_match_suffix_helper(cert, token, last - token, full)) return 1; } return 0; #endif }
tls_match_suffix
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_passwd_cb(char *buf, int size, int rwflag, void *password) { if (!password) return 0; os_strlcpy(buf, (const char *)password, size); return strlen(buf); }
static int tls_passwd_cb(char *buf, int size, int rwflag, void *password) { if (!password) return 0; os_strlcpy(buf, (const char *)password, size); return os_strlen(buf); }
tls_passwd_cb
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_read_pkcs12(tls_data *data, SSL *ssl, const char *private_key, const char *passwd) { FILE *f; PKCS12 *p12; f = fopen(private_key, "rb"); if (!f) return -1; p12 = (PKCS12 *)d2i_PKCS12_fp(f, 0); fclose(f); if (p12) return tls_parse_pkcs12(data, ssl, p12, passwd); tls_s...
static int tls_read_pkcs12(struct tls_data *data, SSL *ssl, const char *private_key, const char *passwd) { #ifdef PKCS12_FUNCS FILE *f; PKCS12 *p12; f = fopen(private_key, "rb"); if (f == NULL) return -1; p12 = d2i_PKCS12_fp(f, NULL); fclose(f); if (p12 == NULL) { tls...
tls_read_pkcs12
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_read_pkcs12_blob(tls_data *data, SSL *ssl, const u8 *blob, size_t len, const char *passwd) { const u8 *bloba; SSL *ssla; tls_data *dataa; PKCS12 *p12; dataa = data; ssla = ssl; bloba = blob; p12 = (PKCS12 *)d2i_PKCS12(0, &bloba, len); if (p12) return tls_parse_pkc...
static int tls_read_pkcs12_blob(struct tls_data *data, SSL *ssl, const u8 *blob, size_t len, const char *passwd) { #ifdef PKCS12_FUNCS PKCS12 *p12; p12 = d2i_PKCS12(NULL, (const unsigned char **)&blob, len); if (p12 == NULL) { tls_show_errors(MSG_INFO, __func__, "Failed to use...
tls_read_pkcs12_blob
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_session_ticket_ext_cb(SSL *s, const unsigned char *data, int len, void *arg) { if (!arg || !*((_QWORD *)arg + 13)) return 0; wpa_printf(2, "OpenSSL: %s: length=%d", "tls_session_ticket_ext_cb", len); free(*((void **)arg + 15)); *((_QWORD *)arg + 15) = 0; wpa_hexdump(2...
static int tls_session_ticket_ext_cb(SSL *s, const unsigned char *data, int len, void *arg) { struct tls_connection *conn = arg; if (conn == NULL || conn->session_ticket_cb == NULL) return 0; wpa_printf(MSG_DEBUG, "OpenSSL: %s: length=%d", __func__, len); os_free(conn...
tls_session_ticket_ext_cb
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_set_conn_flags(tls_connection *conn, unsigned int flags, const char *openssl_ciphers) { int version; const char *ciphers; const char *ciphers_0; SSL *ssl; EC_KEY *ecdh; int nid[1]; unsigned long v11; v11 = __readfsqword(0x28u); ssl = conn->ssl; if ((flags & 4) != 0) ...
static int tls_set_conn_flags(struct tls_connection *conn, unsigned int flags, const char *openssl_ciphers) { SSL *ssl = conn->ssl; #ifdef SSL_OP_NO_TICKET if (flags & TLS_CONN_DISABLE_SESSION_TICKET) SSL_set_options(ssl, SSL_OP_NO_TICKET); else SSL_clear_options(ssl, SSL_OP...
tls_set_conn_flags
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tls_show_errors(int level, const char *func, const char *txt) { long error; const char *v4; const char *v5; unsigned long err; error = ERR_get_error(); v4 = (const char *)ERR_error_string(error, 0); wpa_printf(level, "OpenSSL: %s - %s %s", func, txt, v4); while (1) { err = ERR_get_error(); ...
static void tls_show_errors(int level, const char *func, const char *txt) { unsigned long err; wpa_printf(level, "OpenSSL: %s - %s %s", func, txt, ERR_error_string(ERR_get_error(), NULL)); while ((err = ERR_get_error())) { wpa_printf(MSG_INFO, "OpenSSL: pending error: %s", ERR_er...
tls_show_errors
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_use_private_key_file(tls_data *data, SSL *ssl, const char *private_key, const char *private_key_passwd) { int ret; EVP_PKEY *pkey; BIO *bio; BIO *bioa; bio = (BIO *)BIO_new_file(private_key, "r"); if (!bio) return -1; pkey = (EVP_PKEY *)d2i_PrivateKey_bio(bio, 0);...
static int tls_use_private_key_file(struct tls_data *data, SSL *ssl, const char *private_key, const char *private_key_passwd) { #ifndef OPENSSL_NO_STDIO BIO *bio; EVP_PKEY *pkey; int ret; bio = BIO_new_file(private_key, "r"); if (!bio) ...
tls_use_private_key_file
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tncs_batch_ending(tncs_data *tncs) { tnc_if_imv *imv; TNC_Result res; for (imv = tncs->imv; imv; imv = imv->next) { if (imv->BatchEnding) { wpa_printf(2, "TNC: Call BatchEnding for IMV '%s'", imv->name); res = imv->BatchEnding(imv->imvID, tncs->connectionID); wpa_printf(2, "TNC: BatchE...
static void tncs_batch_ending(struct tncs_data *tncs) { struct tnc_if_imv *imv; TNC_Result res; for (imv = tncs->imv; imv; imv = imv->next) { if (imv->BatchEnding == NULL) continue; wpa_printf(MSG_DEBUG, "TNC: Call BatchEnding for IMV '%s'", imv->name); res = imv->BatchEnding(imv->imvID, tncs-...
tncs_batch_ending
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
wpabuf *tncs_build_soh_request() { wpabuf *buf; buf = wpabuf_alloc(0xCu); if (!buf) return 0; wpabuf_put_be16_13(buf, 7u); wpabuf_put_be16_13(buf, 8u); wpabuf_put_be32_8(buf, 0x137u); wpabuf_put_be16_13(buf, 2u); wpabuf_put_be16_13(buf, 0); return buf; }
struct wpabuf *tncs_build_soh_request(void) { struct wpabuf *buf; buf = wpabuf_alloc(8 + 4); if (buf == NULL) return NULL; wpabuf_put_be16(buf, EAP_TLV_VENDOR_SPECIFIC_TLV); wpabuf_put_be16(buf, 8); wpabuf_put_be32(buf, EAP_VENDOR_MICROSOFT); wpabuf_put_be16(buf, 0x02); wpabuf_put_be16(buf, 0); ...
tncs_build_soh_request
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
u8 *tncs_copy_send_buf(tncs_data *tncs, u8 *pos) { int i; size_t len; for (i = 0; i <= 9; ++i) { if (tncs->imv_data[i].imv_send) { memcpy(pos, tncs->imv_data[i].imv_send, tncs->imv_data[i].imv_send_len); pos += tncs->imv_data[i].imv_send_len; free(tncs->imv_data[i].imv_send); tncs->im...
u8 *tncs_copy_send_buf(struct tncs_data *tncs, u8 *pos) { int i; for (i = 0; i < TNC_MAX_IMV_ID; i++) { if (tncs->imv_data[i].imv_send == NULL) continue; os_memcpy(pos, tncs->imv_data[i].imv_send, tncs->imv_data[i].imv_send_len); pos += tncs->imv_data[i].imv_send_len; os_free(tncs->imv_data[...
tncs_copy_send_buf
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tncs_deinit(tncs_data *tncs) { int i; tncs_data *prev; tncs_data *conn; if (tncs) { for (i = 0; i <= 9; ++i) free(tncs->imv_data[i].imv_send); prev = 0; for (conn = tncs_global_data->connections; conn; conn = conn->next) { if (conn == tncs) { if (prev) prev->next ...
void tncs_deinit(struct tncs_data *tncs) { int i; struct tncs_data *prev, *conn; if (tncs == NULL) return; for (i = 0; i < TNC_MAX_IMV_ID; i++) os_free(tncs->imv_data[i].imv_send); prev = NULL; conn = tncs_global_data->connections; while (conn) { if (conn == tncs) { if (prev) ...
tncs_deinit
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
tncs_process_res tncs_derive_recommendation(tncs_data *tncs) { IMV_Action_Recommendation rec; tnc_if_imv *imv; tnc_if_imv *imva; TNC_ConnectionState state; char *txt; TNC_IMV_Action_Recommendation irec; wpa_printf(2, "TNC: No more messages from IMVs"); if (tncs->done) return tncs_process_res_TNCCS_...
static enum tncs_process_res tncs_derive_recommendation(struct tncs_data *tncs) { enum IMV_Action_Recommendation rec; struct tnc_if_imv *imv; TNC_ConnectionState state; char *txt; wpa_printf(MSG_DEBUG, "TNC: No more messages from IMVs"); if (tncs->done) return TNCCS_PROCESS_OK_NO_RECOMMENDATION; tn...
tncs_derive_recommendation
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tncs_free_imv(tnc_if_imv *imv) { free(imv->name); free(imv->path); free(imv->supported_types); }
static void tncs_free_imv(struct tnc_if_imv *imv) { os_free(imv->name); os_free(imv->path); os_free(imv->supported_types); }
tncs_free_imv
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
unsigned char *tncs_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 *tncs_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...
tncs_get_base64
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
tncs_data *tncs_get_conn(TNC_ConnectionID connectionID) { tncs_data *tncs; if (!tncs_global_data) return 0; for (tncs = tncs_global_data->connections; tncs; tncs = tncs->next) { if (connectionID == tncs->connectionID) return tncs; } wpa_printf(2, "TNC: Connection ID %lu not found", connectionID...
static struct tncs_data *tncs_get_conn(TNC_ConnectionID connectionID) { struct tncs_data *tncs; if (tncs_global_data == NULL) return NULL; tncs = tncs_global_data->connections; while (tncs) { if (tncs->connectionID == connectionID) return tncs; tncs = tncs->next; } wpa_printf(MSG_DEBUG,...
tncs_get_conn
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
tnc_if_imv *tncs_get_imv(TNC_IMVID imvID) { tnc_if_imv *imv; if (imvID > 9 || !tncs_global_data) return 0; for (imv = tncs_global_data->imv; imv; imv = imv->next) { if (imvID == imv->imvID) return imv; } return 0; }
static struct tnc_if_imv *tncs_get_imv(TNC_IMVID imvID) { struct tnc_if_imv *imv; if (imvID >= TNC_MAX_IMV_ID || tncs_global_data == NULL) return NULL; imv = tncs_global_data->imv; while (imv) { if (imv->imvID == imvID) return imv; imv = imv->next; } return NULL; }
tncs_get_imv
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void *tncs_get_sym(void *handle, char *func) { return dlsym(handle, func); }
static void *tncs_get_sym(void *handle, char *func) { void *fptr; fptr = dlsym(handle, func); return fptr; }
tncs_get_sym
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tncs_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 tncs_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; }
tncs_get_type
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tncs_global_deinit() { tnc_if_imv *imv; tnc_if_imv *prev; if (tncs_global_data) { imv = tncs_global_data->imv; while (imv) { tncs_unload_imv(imv); prev = imv; imv = imv->next; free(prev); } free(tncs_global_data); tncs_global_data = 0; } }
void tncs_global_deinit(void) { struct tnc_if_imv *imv, *prev; if (tncs_global_data == NULL) return; imv = tncs_global_data->imv; while (imv) { tncs_unload_imv(imv); prev = imv; imv = imv->next; os_free(prev); } os_free(tncs_global_data); tncs_global_data = NULL; }
tncs_global_deinit
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tncs_global_init() { tnc_if_imv *imv; if (tncs_global_data) return 0; tncs_global_data = (tncs_global *)os_zalloc(0x18u); if (!tncs_global_data) return -1; if (tncs_read_config(tncs_global_data) >= 0) { for (imv = tncs_global_data->imv; imv; imv = imv->next) { if (tncs_load_imv(imv)) { ...
int tncs_global_init(void) { struct tnc_if_imv *imv; if (tncs_global_data) return 0; tncs_global_data = os_zalloc(sizeof(*tncs_global_data)); if (tncs_global_data == NULL) return -1; if (tncs_read_config(tncs_global_data) < 0) { wpa_printf(MSG_ERROR, "TNC: Failed to read TNC configuration"); ...
tncs_global_init
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
char *tncs_if_tnccs_end() { char *buf; buf = (char *)malloc(0x64u); if (!buf) return 0; snprintf(buf, 0x64u, "\n</TNCCS-Batch>"); return buf; }
char *tncs_if_tnccs_end(void) { char *buf = os_malloc(100); if (buf == NULL) return NULL; os_snprintf(buf, 100, IF_TNCCS_END); return buf; }
tncs_if_tnccs_end
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
char *tncs_if_tnccs_start(tncs_data *tncs) { 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 *tncs_if_tnccs_start(struct tncs_data *tncs) { char *buf = os_malloc(1000); if (buf == NULL) return NULL; tncs->last_batchid++; os_snprintf(buf, 1000, IF_TNCCS_START, tncs->last_batchid); return buf; }
tncs_if_tnccs_start
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tncs_imv_initialize(tnc_if_imv *imv) { TNC_Version imv_ver; TNC_Result res; unsigned long v4; v4 = __readfsqword(0x28u); wpa_printf(2, "TNC: Calling TNC_IMV_Initialize for IMV '%s'", imv->name); res = imv->Initialize(imv->imvID, 1, 1, &imv_ver); wpa_printf(2, "TNC: TNC_IMV_Initialize: res=%lu imv_ver...
static int tncs_imv_initialize(struct tnc_if_imv *imv) { TNC_Result res; TNC_Version imv_ver; wpa_printf(MSG_DEBUG, "TNC: Calling TNC_IMV_Initialize for IMV '%s'", imv->name); res = imv->Initialize(imv->imvID, TNC_IFIMV_VERSION_1, TNC_IFIMV_VERSION_1, &imv_ver); wpa_print...
tncs_imv_initialize
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tncs_imv_notify_connection_change(tnc_if_imv *imv, TNC_ConnectionID conn, TNC_ConnectionState state) { TNC_Result res; if (!imv->NotifyConnectionChange) return 0; wpa_printf(2, "TNC: Calling TNC_IMV_NotifyConnectionChange(%d) for IMV '%s'", state, imv->n...
static int tncs_imv_notify_connection_change(struct tnc_if_imv *imv, TNC_ConnectionID conn, TNC_ConnectionState state) { TNC_Result res; if (imv->NotifyConnectionChange == NULL) return 0; wpa_printf(MSG_DEBUG, ...
tncs_imv_notify_connection_change
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tncs_imv_provide_bind_function(tnc_if_imv *imv) { TNC_Result res; wpa_printf(2, "TNC: Calling TNC_IMV_ProvideBindFunction for IMV '%s'", imv->name); res = imv->ProvideBindFunction( imv->imvID, (TNC_TNCS_BindFunctionPointer)TNC_TNCS_BindFunction); wpa_printf(2, "TNC: TNC_IMV_ProvideBindFu...
static int tncs_imv_provide_bind_function(struct tnc_if_imv *imv) { TNC_Result res; wpa_printf(MSG_DEBUG, "TNC: Calling TNC_IMV_ProvideBindFunction for " "IMV '%s'", imv->name); res = imv->ProvideBindFunction(imv->imvID, TNC_TNCS_BindFunction); wpa_printf(MSG_DEBUG, "TNC:...
tncs_imv_provide_bind_function
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tncs_imv_resolve_funcs(tnc_if_imv *imv) { void *handle; handle = imv->dlhandle; imv->Initialize = (TNC_Result (*)(TNC_IMVID, TNC_Version, TNC_Version, TNC_Version *))tncs_get_sym(handle, "TNC_IMV_Initialize"); if (imv->Initialize) { imv->SolicitRecommendation = (TNC_...
static int tncs_imv_resolve_funcs(struct tnc_if_imv *imv) { void *handle = imv->dlhandle; imv->Initialize = tncs_get_sym(handle, "TNC_IMV_Initialize"); if (imv->Initialize == NULL) { wpa_printf(MSG_ERROR, "TNC: IMV does not export " "TNC_IMV_Initialize"); return -1; } imv->...
tncs_imv_resolve_funcs
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tncs_imv_terminate(tnc_if_imv *imv) { TNC_Result res; if (!imv->Terminate) return 0; wpa_printf(2, "TNC: Calling TNC_IMV_Terminate for IMV '%s'", imv->name); res = imv->Terminate(imv->imvID); wpa_printf(2, "TNC: TNC_IMV_Terminate: %lu", res); if (res) return -1; else return 0; }
static int tncs_imv_terminate(struct tnc_if_imv *imv) { TNC_Result res; if (imv->Terminate == NULL) return 0; wpa_printf(MSG_DEBUG, "TNC: Calling TNC_IMV_Terminate for IMV '%s'", imv->name); res = imv->Terminate(imv->imvID); wpa_printf(MSG_DEBUG, "TNC: TNC_IMV_Terminate: %lu", (unsigned lon...
tncs_imv_terminate
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
tncs_data *tncs_init() { TNC_ConnectionID next_conn_id; tncs_data *tncs; if (!tncs_global_data) return 0; tncs = (tncs_data *)os_zalloc(0x120u); if (!tncs) return 0; tncs->imv = tncs_global_data->imv; next_conn_id = tncs_global_data->next_conn_id; tncs_global_data->next_conn_id = next_conn_id +...
struct tncs_data *tncs_init(void) { struct tncs_data *tncs; if (tncs_global_data == NULL) return NULL; tncs = os_zalloc(sizeof(*tncs)); if (tncs == NULL) return NULL; tncs->imv = tncs_global_data->imv; tncs->connectionID = tncs_global_data->next_conn_id++; tncs->next = tncs_global_data->connecti...
tncs_init
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tncs_init_connection(tncs_data *tncs) { int i; tnc_if_imv *imv; for (imv = tncs->imv; imv; imv = imv->next) { tncs_imv_notify_connection_change(imv, tncs->connectionID, 0); tncs_imv_notify_connection_change(imv, tncs->connectionID, 1u); } for (i = 0; i <= 9; ++i) { free(tncs->imv_data[i].imv...
void tncs_init_connection(struct tncs_data *tncs) { struct tnc_if_imv *imv; int i; for (imv = tncs->imv; imv; imv = imv->next) { tncs_imv_notify_connection_change(imv, tncs->connectionID, TNC_CONNECTION_STATE_CREATE); tncs_imv_notify_connection_change(imv, tncs->conn...
tncs_init_connection
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tncs_load_imv(tnc_if_imv *imv) { char *v2; if (imv->path) { wpa_printf(2, "TNC: Opening IMV: %s (%s)", imv->name, imv->path); imv->dlhandle = dlopen(imv->path, 1); if (imv->dlhandle) { if (tncs_imv_resolve_funcs(imv) >= 0) { if (tncs_imv_initialize(imv) >= 0 && tncs_imv_pr...
static int tncs_load_imv(struct tnc_if_imv *imv) { if (imv->path == NULL) { wpa_printf(MSG_DEBUG, "TNC: No IMV configured"); return -1; } wpa_printf(MSG_DEBUG, "TNC: Opening IMV: %s (%s)", imv->name, imv->path); imv->dlhandle = dlopen(imv->path, RTLD_LAZY); if (imv->dlhandle == NULL) { wpa_printf...
tncs_load_imv
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
tnc_if_imv *tncs_parse_imv(int id, char *start, char *end, int *error) { char *pos2; tnc_if_imv *imv; char *pos; if (id <= 9) { imv = (tnc_if_imv *)os_zalloc(0x70u); if (imv) { imv->imvID = id; wpa_printf(2, "TNC: Configured IMV: %s", start); if (end > start + 1 && *start == 34) { ...
static struct tnc_if_imv *tncs_parse_imv(int id, char *start, char *end, int *error) { struct tnc_if_imv *imv; char *pos, *pos2; if (id >= TNC_MAX_IMV_ID) { wpa_printf(MSG_DEBUG, "TNC: Too many IMVs"); return NULL; } imv = os_zalloc(sizeof(*imv)); if (imv =...
tncs_parse_imv
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tncs_process(eap_tnc_data *data, wpabuf *inbuf) { size_t v2; const u8 *v3; v2 = wpabuf_len_63(inbuf); v3 = (const u8 *)wpabuf_head_63(inbuf); switch (tncs_process_if_tnccs(data->tncs, v3, v2)) { case tncs_process_res_TNCCS_PROCESS_ERROR: wpa_printf(2, "EAP-TNC: TNCS processing error"); eap_tnc...
static void tncs_process(struct eap_tnc_data *data, struct wpabuf *inbuf) { enum tncs_process_res res; res = tncs_process_if_tnccs(data->tncs, wpabuf_head(inbuf), wpabuf_len(inbuf)); switch (res) { case TNCCS_RECOMMENDATION_ALLOW: wpa_printf(MSG_DEBUG, "EAP-TNC: TNCS allowed access"); eap_tnc_set...
tncs_process
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
tncs_process_res tncs_process_if_tnccs(tncs_data *tncs, const u8 *msg, size_t len) { unsigned int type; unsigned int batch_id; size_t decoded_len; char *start; char *pos; unsigned char *decoded; char *xml; char *xmlend; char *buf; char *end; char *payload; ...
enum tncs_process_res tncs_process_if_tnccs(struct tncs_data *tncs, const u8 *msg, size_t len) { char *buf, *start, *end, *pos, *pos2, *payload; unsigned int batch_id; unsigned char *decoded; size_t decoded_len; buf = dup_binstr(msg, len); if (buf == NULL) re...
tncs_process_if_tnccs
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
wpabuf *tncs_process_soh(const u8 *soh_tlv, size_t soh_tlv_len, int *failure) { wpa_hexdump(2, "TNC: SoH TLV", soh_tlv, soh_tlv_len); *failure = 0; return 0; }
struct wpabuf *tncs_process_soh(const u8 *soh_tlv, size_t soh_tlv_len, int *failure) { wpa_hexdump(MSG_DEBUG, "TNC: SoH TLV", soh_tlv, soh_tlv_len); *failure = 0; return NULL; }
tncs_process_soh
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tncs_read_config(tncs_global *global) { int v2; int error; int id; size_t config_len; char *pos; char *line_end; tnc_if_imv *last; char *config; char *end; tnc_if_imv *imv; unsigned long v12; v12 = __readfsqword(0x28u); id = 0; last = 0; config = os_readfile("/etc/tnc_config", &config...
static int tncs_read_config(struct tncs_global *global) { char *config, *end, *pos, *line_end; size_t config_len; struct tnc_if_imv *imv, *last; int id = 0; last = NULL; config = os_readfile(TNC_CONFIG_FILE, &config_len); if (config == NULL) { wpa_printf(MSG_ERROR, "TNC: Could not ope...
tncs_read_config
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tncs_send_to_imvs(tncs_data *tncs, unsigned int type, const u8 *msg, size_t len) { tnc_if_imv *imv; TNC_Result res; wpa_hexdump_ascii(1, "TNC: Message to IMV(s)", msg, len); for (imv = tncs->imv; imv; imv = imv->next) { if (imv->ReceiveMessage) { if (tncs_supported_type(im...
static void tncs_send_to_imvs(struct tncs_data *tncs, unsigned int type, const u8 *msg, size_t len) { struct tnc_if_imv *imv; TNC_Result res; wpa_hexdump_ascii(MSG_MSGDUMP, "TNC: Message to IMV(s)", msg, len); for (imv = tncs->imv; imv; imv = imv->next) { if (imv->ReceiveMess...
tncs_send_to_imvs
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tncs_solicit_recommendation(tncs_data *tncs) { tnc_if_imv *imv; TNC_Result res; for (imv = tncs->imv; imv; imv = imv->next) { if (!tncs->imv_data[imv->imvID].recommendation_set) { wpa_printf(2, "TNC: Call SolicitRecommendation for IMV '%s'", imv->name); res = imv->SolicitRecommendation(imv->...
static void tncs_solicit_recommendation(struct tncs_data *tncs) { struct tnc_if_imv *imv; TNC_Result res; for (imv = tncs->imv; imv; imv = imv->next) { if (tncs->imv_data[imv->imvID].recommendation_set) continue; wpa_printf(MSG_DEBUG, "TNC: Call SolicitRecommendation for " ...
tncs_solicit_recommendation
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tncs_supported_type(tnc_if_imv *imv, unsigned int type) { unsigned int svendor; unsigned int ssubtype; size_t i; if (!imv || !imv->supported_types) return 0; for (i = 0; i < imv->num_supported_types; ++i) { svendor = imv->supported_types[i] >> 8; ssubtype = (unsigned char)imv->supported_types...
static int tncs_supported_type(struct tnc_if_imv *imv, unsigned int type) { size_t i; unsigned int vendor, subtype; if (imv == NULL || imv->supported_types == NULL) return 0; vendor = type >> 8; subtype = type & 0xff; for (i = 0; i < imv->num_supported_types; i++) { unsigned int svendor, ssubtype...
tncs_supported_type
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
size_t tncs_total_send_len(tncs_data *tncs) { int i; size_t len; len = 0; for (i = 0; i <= 9; ++i) len += tncs->imv_data[i].imv_send_len; if (tncs->tncs_message) len += strlen(tncs->tncs_message); return len; }
size_t tncs_total_send_len(struct tncs_data *tncs) { int i; size_t len = 0; for (i = 0; i < TNC_MAX_IMV_ID; i++) len += tncs->imv_data[i].imv_send_len; if (tncs->tncs_message) len += os_strlen(tncs->tncs_message); return len; }
tncs_total_send_len
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tncs_unload_imv(tnc_if_imv *imv) { tncs_imv_terminate(imv); if (imv->dlhandle) dlclose(imv->dlhandle); tncs_free_imv(imv); }
static void tncs_unload_imv(struct tnc_if_imv *imv) { tncs_imv_terminate(imv); if (imv->dlhandle) dlclose(imv->dlhandle); tncs_free_imv(imv); }
tncs_unload_imv
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int token_eq(const char *s1, const char *s2) { const char *v2; const char *v3; _BOOL4 v4; _BOOL4 v5; int c1; int c2; int end1; do { v2 = s1++; c1 = *v2; v3 = s2++; c2 = *v3; if (((*__ctype_b_loc())[c1] & 0x400) != 0 && ((*__ctype_b_loc())[c1] & 0x100) != 0) c1 = tolowe...
static int token_eq(const char *s1, const char *s2) { int c1; int c2; int end1 = 0; int end2 = 0; for (;;) { c1 = *s1++; c2 = *s2++; if (isalpha(c1) && isupper(c1)) c1 = tolower(c1); if (isalpha(c2) && isupper(c2)) c2 = tolower(c2); end1 = !(isalnum(c1) || c1 == '_' || c1 == '-...
token_eq
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int token_length(const char *s) { const char *sa; int c; for (sa = s;; ++sa) { c = *sa; if (((*__ctype_b_loc())[c] & 8) == 0 && c != 95 && c != 45) break; } return (_DWORD)sa - (_DWORD)s; }
static int token_length(const char *s) { const char *begin = s; for (;; s++) { int c = *s; int end = !(isalnum(c) || c == '_' || c == '-'); if (end) break; } return s - begin; }
token_length
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void ucast_to_stas(hostapd_data *hapd, const u8 *buf, size_t len) { sta_info *sta; for (sta = hapd->sta_list; sta; sta = sta->next) { if ((sta->flags & 0x20) != 0) x_snoop_mcast_to_ucast_convert_send(hapd, sta, (u8 *)buf, len); } }
static void ucast_to_stas(struct hostapd_data *hapd, const u8 *buf, size_t len) { struct sta_info *sta; for (sta = hapd->sta_list; sta; sta = sta->next) { if (!(sta->flags & WLAN_STA_AUTHORIZED)) continue; x_snoop_mcast_to_ucast_convert_send(hapd, sta, (u8 *)buf, len); } }
ucast_to_stas
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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 + 666) ...
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void update_ht_state(hostapd_data *hapd, sta_info *sta) { if ((sta->flags & 0x800) != 0 && sta->ht_capabilities) update_sta_ht(hapd, sta); else update_sta_no_ht(hapd, sta); if (hostapd_ht_operation_update(hapd->iface) > 0) ieee802_11_set_beacons(hapd->iface); }
void update_ht_state(struct hostapd_data *hapd, struct sta_info *sta) { if ((sta->flags & WLAN_STA_HT) && sta->ht_capabilities) update_sta_ht(hapd, sta); else update_sta_no_ht(hapd, sta); if (hostapd_ht_operation_update(hapd->iface) > 0) ieee802_11_set_beacons(hapd->iface); }
update_ht_state
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void update_sta_no_ht(hostapd_data *hapd, sta_info *sta) { if ((*((_BYTE *)sta + 97) & 0x10) == 0) { *((_BYTE *)sta + 97) |= 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 " "s...
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void upnp_er_remove_notification(wps_registrar *reg, subscription *s) { bool was_sel_reg; was_sel_reg = s->selected_registrar != 0; s->selected_registrar = 0; eloop_cancel_timeout((eloop_timeout_handler)upnp_er_set_selected_timeout, s, reg); if (reg) { if (was_sel_reg) wps_re...
void upnp_er_remove_notification(struct wps_registrar *reg, struct subscription *s) { bool was_sel_reg = s->selected_registrar; s->selected_registrar = 0; eloop_cancel_timeout(upnp_er_set_selected_timeout, s, reg); if (reg && was_sel_reg) wps_registrar_selected_registrar_ch...
upnp_er_remove_notification
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int upnp_er_set_selected_registrar(wps_registrar *reg, subscription *s, const wpabuf *msg) { u16 v4; u16 v5; unsigned int count; wps_parse_attr attr; unsigned long v9; v9 = __readfsqword(0x28u); wpa_hexdump_buf_11(1, "WPS: SetSelectedRegistrar attributes", msg); if (w...
int upnp_er_set_selected_registrar(struct wps_registrar *reg, struct subscription *s, const struct wpabuf *msg) { struct wps_parse_attr attr; wpa_hexdump_buf(MSG_MSGDUMP, "WPS: SetSelectedRegistrar attributes", msg); if (wps_validate_upnp_set_...
upnp_er_set_selected_registrar
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void upnp_er_set_selected_timeout(void *eloop_ctx, void *timeout_ctx) { wpa_printf(2, "WPS: SetSelectedRegistrar from ER timed out"); *((_BYTE *)eloop_ctx + 100) = 0; wps_registrar_selected_registrar_changed((wps_registrar *)timeout_ctx, 0); }
static void upnp_er_set_selected_timeout(void *eloop_ctx, void *timeout_ctx) { struct subscription *s = eloop_ctx; struct wps_registrar *reg = timeout_ctx; wpa_printf(MSG_DEBUG, "WPS: SetSelectedRegistrar from ER timed out"); s->selected_registrar = 0; wps_registrar_selected_registrar_changed(reg, 0); }
upnp_er_set_selected_timeout
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void upnp_wps_device_deinit(upnp_wps_device_sm *sm, void *priv) { upnp_wps_peer *v2; upnp_wps_device_interface *iface; upnp_wps_peer *peer; if (sm) { iface = upnp_wps_get_iface(sm, priv); if (iface) { wpa_printf(2, "WPS UPnP: Deinit interface instance %p", iface); if (dl_list_len_1(&sm->int...
void upnp_wps_device_deinit(struct upnp_wps_device_sm *sm, void *priv) { struct upnp_wps_device_interface *iface; struct upnp_wps_peer *peer; if (!sm) return; iface = upnp_wps_get_iface(sm, priv); if (iface == NULL) { wpa_printf(MSG_ERROR, "WPS UPnP: Could not find the interface " ...
upnp_wps_device_deinit
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
upnp_wps_device_sm *upnp_wps_device_init(upnp_wps_device_ctx *ctx, wps_context *wps, void *priv, char *net_if) { int start; upnp_wps_device_sm *sm; upnp_wps_device_interface *iface; start = 0; iface = (upnp_wps_device_interface...
struct upnp_wps_device_sm *upnp_wps_device_init(struct upnp_wps_device_ctx *ctx, struct wps_context *wps, void *priv, char *net_if) { struct upnp_wps_device_sm *sm; struct upnp_wps_device_interface *iface; int start = ...
upnp_wps_device_init
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void upnp_wps_device_send_event(upnp_wps_device_sm *sm) { const char *v1; int buf_size; int buf_sizea; subscription *s; subscription *tmp; wpabuf *buf; os_reltime now; unsigned long v8; v8 = __readfsqword(0x28u); if (!dl_list_empty_9(&sm->subscriptions)) { if (!os_get_reltime(&now)) { if ...
static void upnp_wps_device_send_event(struct upnp_wps_device_sm *sm) { struct wpabuf *buf; int buf_size = 0; struct subscription *s, *tmp; const char *format_head = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" "<e:propertyset xmlns:e=\"urn:schemas-upnp-org:event-1-0\">\n"; const char *format_...
upnp_wps_device_send_event
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int upnp_wps_device_send_wlan_event(upnp_wps_device_sm *sm, const u8 *from_mac_addr, upnp_wps_wlanevent_type ev_type, const wpabuf *msg) { size_t v4; size_t v5; const void *v6; int ret; int pos; size_...
int upnp_wps_device_send_wlan_event(struct upnp_wps_device_sm *sm, const u8 from_mac_addr[ETH_ALEN], enum upnp_wps_wlanevent_type ev_type, const struct wpabuf *msg) { int ret = -1; char type[2]; const u8 *m...
upnp_wps_device_send_wlan_event
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int upnp_wps_device_start(upnp_wps_device_sm *sm, char *net_if) { int v3; int v4; int v5; int v6; int v7; char *v8; int v9; if (!sm || !net_if) return -1; if (sm->started) upnp_wps_device_stop(sm); sm->multicast_sd = -1; sm->ssdp_sd = -1; sm->started = 1; sm->advertise_count = 0; if...
static int upnp_wps_device_start(struct upnp_wps_device_sm *sm, char *net_if) { if (!sm || !net_if) return -1; if (sm->started) upnp_wps_device_stop(sm); sm->multicast_sd = -1; sm->ssdp_sd = -1; sm->started = 1; sm->advertise_count = 0; if (add_ssdp_network(net_if)) goto fail; if (get_ne...
upnp_wps_device_start
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void upnp_wps_device_stop(upnp_wps_device_sm *sm) { if (sm && sm->started) { wpa_printf(2, "WPS UPnP: Stop device"); web_listener_stop(sm); ssdp_listener_stop(sm); upnp_wps_free_msearchreply(&sm->msearch_replies); upnp_wps_free_subscriptions(&sm->subscriptions, 0); advertisement_state_machine_...
static void upnp_wps_device_stop(struct upnp_wps_device_sm *sm) { if (!sm || !sm->started) return; wpa_printf(MSG_DEBUG, "WPS UPnP: Stop device"); web_listener_stop(sm); ssdp_listener_stop(sm); upnp_wps_free_msearchreply(&sm->msearch_replies); upnp_wps_free_subscriptions(&sm->subscriptions, NULL); a...
upnp_wps_device_stop
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void upnp_wps_free_msearchreply(dl_list *head) { advertisement_state_machine *a; advertisement_state_machine *tmp; a = (advertisement_state_machine *)head->next; tmp = (advertisement_state_machine *)head->next->next; while (head != (dl_list *)a) { msearchreply_state_machine_stop(a); a = tmp; tmp ...
static void upnp_wps_free_msearchreply(struct dl_list *head) { struct advertisement_state_machine *a, *tmp; dl_list_for_each_safe(a, tmp, head, struct advertisement_state_machine, list) msearchreply_state_machine_stop(a); }
upnp_wps_free_msearchreply
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void upnp_wps_free_subscriptions(dl_list *head, wps_registrar *reg) { subscription *s; subscription *tmp; s = (subscription *)head->next; tmp = (subscription *)head->next->next; while (head != (dl_list *)s) { if (!reg || reg == s->reg) { dl_list_del_12(&s->list); subscription_destroy(s); ...
static void upnp_wps_free_subscriptions(struct dl_list *head, struct wps_registrar *reg) { struct subscription *s, *tmp; dl_list_for_each_safe(s, tmp, head, struct subscription, list) { if (reg && s->reg != reg) continue; dl_list_del(&s->list); subscription_...
upnp_wps_free_subscriptions
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
upnp_wps_device_interface *upnp_wps_get_iface(upnp_wps_device_sm *sm, void *priv) { upnp_wps_device_interface *iface; for (iface = (upnp_wps_device_interface *)sm->interfaces.next; iface != (upnp_wps_device_interface *)sm; iface = (upnp_wps_device_interfa...
static struct upnp_wps_device_interface * upnp_wps_get_iface(struct upnp_wps_device_sm *sm, void *priv) { struct upnp_wps_device_interface *iface; dl_list_for_each(iface, &sm->interfaces, struct upnp_wps_device_interface, list) { if (iface->priv == priv) return iface; } return NULL;...
upnp_wps_get_iface
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int upnp_wps_set_ap_pin(upnp_wps_device_sm *sm, const char *ap_pin) { char *root_dir; upnp_wps_device_sm *iface; if (!sm) return 0; for (iface = (upnp_wps_device_sm *)sm->interfaces.next; iface != sm; iface = (upnp_wps_device_sm *)iface->interfaces.next) { free(*((void **)iface->root_dir + 1)); ...
int upnp_wps_set_ap_pin(struct upnp_wps_device_sm *sm, const char *ap_pin) { struct upnp_wps_device_interface *iface; if (sm == NULL) return 0; dl_list_for_each(iface, &sm->interfaces, struct upnp_wps_device_interface, list) { os_free(iface->ctx->ap_pin); if (ap_pin) { iface-...
upnp_wps_set_ap_pin
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int upnp_wps_subscribers(upnp_wps_device_sm *sm) { return dl_list_empty_9(&sm->subscriptions) == 0; }
int upnp_wps_subscribers(struct upnp_wps_device_sm *sm) { return !dl_list_empty(&sm->subscriptions); }
upnp_wps_subscribers
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void usage() { show_version(); fwrite("\n" "usage: hostapd [-hdBKtv] [-P <PID file>] [-e <entropy file>] \\\n" " [-g <global ctrl_iface>] [-G <group>]\\\n" " [-i <comma-separated list of interface names>]\\\n" " <configuration file(s)>\n" "\n" ...
static void usage(void) { show_version(); fprintf(stderr, "\n" "usage: hostapd [-hdBKtv] [-P <PID file>] [-e <entropy file>] " "\\\n" " [-g <global ctrl_iface>] [-G <group>]\\\n" " [-i <comma-separated list of interface names>]\\\n" " ...
usage
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int uuid_bin2str(const u8 *bin, char *str, size_t max_len) { int len; len = snprintf( str, max_len, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", *bin, bin[1], bin[2], bin[3], bin[4], bin[5], bin[6], bin[7], bin[8], bin[9], bin[10], bin[11], bin[12], bin[13], bin[1...
int uuid_bin2str(const u8 *bin, char *str, size_t max_len) { int len; len = os_snprintf(str, max_len, "%02x%02x%02x%02x-%02x%02x-%02x%02x-" "%02x%02x-%02x%02x%02x%02x%02x%02x", bin[0], bin[1], bin[2], bin[3], bin[4], bin[5], bin[6], bin...
uuid_bin2str
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int uuid_make(u8 *uuid) { if (os_get_random(uuid, 0x10u) < 0) return -1; uuid[6] &= 0xFu; uuid[6] |= 0x40u; uuid[8] &= 0x3Fu; uuid[8] |= 0x80u; return 0; }
static int uuid_make(u8 uuid[UUID_LEN]) { if (os_get_random(uuid, UUID_LEN) < 0) return -1; uuid[6] &= 0x0f; uuid[6] |= (4 << 4); uuid[8] &= 0x3f; uuid[8] |= 0x80; return 0; }
uuid_make
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int uuid_random(u8 *uuid) { long v2; os_time t; u8 hash[32]; unsigned long v5; v5 = __readfsqword(0x28u); os_get_time(&t); if (os_get_random(uuid, 0x10u) < 0 || hmac_sha256(uuid, 0x10u, (const u8 *)&t, 0x10u, hash) < 0) return -1; v2 = *(_QWORD *)&hash[8]; *(_QWORD *)uuid = *(_QWORD *)hash;...
int uuid_random(u8 *uuid) { struct os_time t; u8 hash[SHA256_MAC_LEN]; os_get_time(&t); if (os_get_random(uuid, UUID_LEN) < 0 || hmac_sha256(uuid, UUID_LEN, (const u8 *)&t, sizeof(t), hash) < 0) return -1; os_memcpy(uuid, hash, UUID_LEN); uuid[6] = (4 << 4) | (uuid[6] & 0x0f); uuid[8] = 0x80...
uuid_random
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int valid_cw(int cw) { return cw == 1 || cw == 3 || cw == 7 || cw == 15 || cw == 31 || cw == 63 || cw == 127 || cw == 255 || cw == 511 || cw == 1023 || cw == 2047 || cw == 4095 || cw == 0x1FFF || cw == 0x3FFF || cw == 0x7FFF; }
static int valid_cw(int cw) { return (cw == 1 || cw == 3 || cw == 7 || cw == 15 || cw == 31 || cw == 63 || cw == 127 || cw == 255 || cw == 511 || cw == 1023 || cw == 2047 || cw == 4095 || cw == 8191 || cw == 16383 || cw == 32767); }
valid_cw
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int vht_supported(const hostapd_hw_modes *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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int vlan_add(const char *if_name, int vid, const char *vlan_if_name) { int *v4; char *v5; int *v6; char *v7; int fd; vlan_ioctl_args if_request; unsigned long v10; v10 = __readfsqword(0x28u); wpa_printf(2, "VLAN: vlan_add(if_name=%s, vid=%d)", if_name, vid); ifconfig_up(if_name); if (strlen(if_na...
int vlan_add(const char *if_name, int vid, const char *vlan_if_name) { int fd; struct vlan_ioctl_args if_request; wpa_printf(MSG_DEBUG, "VLAN: vlan_add(if_name=%s, vid=%d)", if_name, vid); ifconfig_up(if_name); if ((os_strlen(if_name) + 1) > sizeof(if_request.device1)) { wpa_printf(MSG_ERROR, "VLAN: Int...
vlan_add
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
hostapd_vlan *vlan_add_dynamic(hostapd_data *hapd, hostapd_vlan *vlan, int vlan_id, vlan_description *vlan_desc) { char *v5; long v6; long v7; long v8; long v9; long v10; long v11; long v12; long v13; int ret; hostapd_vlan *n; char *pos; char *posa; char ifname...
struct hostapd_vlan *vlan_add_dynamic(struct hostapd_data *hapd, struct hostapd_vlan *vlan, int vlan_id, struct vlan_description *vlan_desc) { struct hostapd_vlan *n; char ifname[IFNAMSIZ + 1], *pos; int ret; if (vlan == NULL || vlan->...
vlan_add_dynamic
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void vlan_bridge_name(char *br_name, hostapd_data *hapd, hostapd_vlan *vlan, int vid) { int ret; const char *tagged_interface; tagged_interface = hapd->conf->ssid.vlan_tagged_interface; if (vlan->bridge[0]) { os_strlcpy(br_name, vlan->bridge, 0x10u); ret = 0; } else if (hapd->co...
static void vlan_bridge_name(char *br_name, struct hostapd_data *hapd, struct hostapd_vlan *vlan, int vid) { char *tagged_interface = hapd->conf->ssid.vlan_tagged_interface; int ret; if (vlan->bridge[0]) { os_strlcpy(br_name, vlan->bridge, IFNAMSIZ); ret = 0; } else if (hap...
vlan_bridge_name
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int vlan_compare(vlan_description *a, vlan_description *b) { _BOOL4 v2; _BOOL4 v3; int i; int a_empty; v2 = !a || !a->notempty; a_empty = v2; v3 = !b || !b->notempty; if (a_empty && v3) return 0; if (a_empty || v3) return 1; if (a->untagged != b->untagged) return 1; for (i = 0; i <= 3...
int vlan_compare(struct vlan_description *a, struct vlan_description *b) { int i; const int a_empty = !a || !a->notempty; const int b_empty = !b || !b->notempty; if (a_empty && b_empty) return 0; if (a_empty || b_empty) return 1; if (a->untagged != b->untagged) return 1; for (i = 0; i < MAX_N...
vlan_compare
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void vlan_deinit(hostapd_data *hapd) { vlan_dynamic_remove(hapd, hapd->conf->vlan); full_dynamic_vlan_deinit(hapd->full_dynamic_vlan); hapd->full_dynamic_vlan = 0; }
void vlan_deinit(struct hostapd_data *hapd) { vlan_dynamic_remove(hapd, hapd->conf->vlan); #ifdef CONFIG_FULL_DYNAMIC_VLAN full_dynamic_vlan_deinit(hapd->full_dynamic_vlan); hapd->full_dynamic_vlan = NULL; #endif }
vlan_deinit
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void vlan_dellink(const char *ifname, hostapd_data *hapd) { int *v2; char *v3; int i; int notempty; int untagged; hostapd_vlan *prev; hostapd_vlan *vlan; hostapd_vlan *first; int *tagged; char br_name[24]; unsigned long v12; v12 = __readfsqword(0x28u); vlan = hapd->conf->vlan; wpa_printf(2,...
void vlan_dellink(const char *ifname, struct hostapd_data *hapd) { struct hostapd_vlan *first, *prev, *vlan = hapd->conf->vlan; wpa_printf(MSG_DEBUG, "VLAN: vlan_dellink(%s)", ifname); first = prev = vlan; while (vlan) { if (os_strcmp(ifname, vlan->ifname) != 0) { prev = vlan; vlan = vlan->ne...
vlan_dellink
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void vlan_dellink_tagged(int vlan_naming, const char *tagged_interface, const char *br_name, int vid, hostapd_data *hapd) { int ret; char clean; char vlan_ifname[24]; unsigned long v10; v10 = __readfsqword(0x28u); if (vlan_naming == 1) ret = snprintf(vlan_ifname, 0x10u, "%s.%d"...
static void vlan_dellink_tagged(int vlan_naming, const char *tagged_interface, const char *br_name, int vid, struct hostapd_data *hapd) { char vlan_ifname[IFNAMSIZ]; int clean; int ret; if (vlan_naming == DYNAMIC_VLAN_NAMING_WITH_DEVICE) ret =...
vlan_dellink_tagged
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int vlan_dynamic_add(hostapd_data *hapd, hostapd_vlan *vlan) { int *v2; char *v3; while (vlan) { if (vlan->vlan_id != -1) { if (vlan_if_add(hapd, vlan, 1)) { v2 = __errno_location(); v3 = strerror(*v2); wpa_printf(5, "VLAN: Could not add VLAN %s: %s", vlan->ifname, v3); ...
static int vlan_dynamic_add(struct hostapd_data *hapd, struct hostapd_vlan *vlan) { while (vlan) { if (vlan->vlan_id != VLAN_ID_WILDCARD) { if (vlan_if_add(hapd, vlan, 1)) { wpa_printf(MSG_ERROR, "VLAN: Could not add VLAN %s: %s", vlan->ifname, strerror...
vlan_dynamic_add
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void vlan_dynamic_remove(hostapd_data *hapd, hostapd_vlan *vlan) { hostapd_vlan *next; while (vlan) { next = vlan->next; if (vlan->vlan_id != -1) vlan_dellink(vlan->ifname, hapd); vlan = next; } }
static void vlan_dynamic_remove(struct hostapd_data *hapd, struct hostapd_vlan *vlan) { struct hostapd_vlan *next; while (vlan) { next = vlan->next; #ifdef CONFIG_FULL_DYNAMIC_VLAN if (vlan->vlan_id != VLAN_ID_WILDCARD) vlan_dellink(vlan->ifname, hapd); #else if ...
vlan_dynamic_remove
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void vlan_event_receive(int sock, void *eloop_ctx, void *sock_ctx) { int *v3; char *v4; int nlmsg_type; socklen_t fromlen; int left; int len; int plen; nlmsghdr *h; hostapd_data *hapd; sockaddr_nl from; char buf[8192]; unsigned long v14; v14 = __readfsqword(0x28u); hapd = (hostapd_data *)el...
static void vlan_event_receive(int sock, void *eloop_ctx, void *sock_ctx) { char buf[8192]; int left; struct sockaddr_nl from; socklen_t fromlen; struct nlmsghdr *h; struct hostapd_data *hapd = eloop_ctx; fromlen = sizeof(from); left = recvfrom(sock, buf, sizeof(buf), MSG_DONTWAIT, (s...
vlan_event_receive
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void vlan_get_bridge(const char *br_name, hostapd_data *hapd, int vid) { _BOOL4 v3; int vlan_naming; const char *tagged_interface; tagged_interface = hapd->conf->ssid.vlan_tagged_interface; vlan_naming = hapd->conf->ssid.vlan_naming; v3 = br_addbr(br_name) == 0; dyn_iface_get(hapd, br_name, v3); ifconf...
static void vlan_get_bridge(const char *br_name, struct hostapd_data *hapd, int vid) { char *tagged_interface = hapd->conf->ssid.vlan_tagged_interface; int vlan_naming = hapd->conf->ssid.vlan_naming; dyn_iface_get(hapd, br_name, br_addbr(br_name) ? 0 : DVLAN_CLEAN_BR); ifconfig_up(...
vlan_get_bridge
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int vlan_if_add(hostapd_data *hapd, hostapd_vlan *vlan, int existsok) { int ret; if (iface_exists(vlan->ifname)) { if (!existsok) return -1; ret = 0; } else { ret = hostapd_vlan_if_add(hapd, vlan->ifname); } if (ret) return ret; ifconfig_up(vlan->ifname); if (hapd->wpa_auth) ret...
static int vlan_if_add(struct hostapd_data *hapd, struct hostapd_vlan *vlan, int existsok) { int ret; #ifdef CONFIG_WEP int i; for (i = 0; i < NUM_WEP_KEYS; i++) { if (!hapd->conf->ssid.wep.key[i]) continue; wpa_printf(MSG_ERROR, "VLAN: Refusing to set up VLAN iface %s with W...
vlan_if_add
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int vlan_if_remove(hostapd_data *hapd, hostapd_vlan *vlan) { int ret; ret = wpa_auth_release_group(hapd->wpa_auth, vlan->vlan_id); if (ret) wpa_printf(5, "WPA deinitialization for VLAN %d failed (%d)", vlan->vlan_id, ret); return hostapd_vlan_if_remove(hapd, vlan->ifname); }
int vlan_if_remove(struct hostapd_data *hapd, struct hostapd_vlan *vlan) { int ret; ret = wpa_auth_release_group(hapd->wpa_auth, vlan->vlan_id); if (ret) wpa_printf(MSG_ERROR, "WPA deinitialization for VLAN %d failed (%d)", vlan->vlan_id, ret); return hostapd_vlan_if_remove(hapd, vlan->ifna...
vlan_if_remove
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int vlan_init(hostapd_data *hapd) { int ret; hostapd_vlan *vlan; hapd->full_dynamic_vlan = full_dynamic_vlan_init(hapd); if ((hapd->conf->ssid.dynamic_vlan || hapd->conf->ssid.per_sta_vif) && !hapd->conf->vlan) { vlan = (hostapd_vlan *)os_zalloc(0xC8u); if (!vlan) { wpa_printf(5, "Out of me...
int vlan_init(struct hostapd_data *hapd) { #ifdef CONFIG_FULL_DYNAMIC_VLAN hapd->full_dynamic_vlan = full_dynamic_vlan_init(hapd); #endif if ((hapd->conf->ssid.dynamic_vlan != DYNAMIC_VLAN_DISABLED || hapd->conf->ssid.per_sta_vif) && !hapd->conf->vlan) { struct hostapd_vlan *vlan; int ret; ...
vlan_init
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void vlan_newlink(const char *ifname, hostapd_data *hapd) { int i; int untagged; hostapd_vlan *vlan; int *tagged; char br_name[24]; unsigned long v7; v7 = __readfsqword(0x28u); wpa_printf(2, "VLAN: vlan_newlink(%s)", ifname); for (vlan = hapd->conf->vlan; vlan && (vlan->configured || strcmp(if...
void vlan_newlink(const char *ifname, struct hostapd_data *hapd) { char br_name[IFNAMSIZ]; struct hostapd_vlan *vlan; int untagged, *tagged, i, notempty; wpa_printf(MSG_DEBUG, "VLAN: vlan_newlink(%s)", ifname); for (vlan = hapd->conf->vlan; vlan; vlan = vlan->next) { if (vlan->configured || os_strcmp(if...
vlan_newlink
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void vlan_newlink_tagged(int vlan_naming, const char *tagged_interface, const char *br_name, int vid, hostapd_data *hapd) { int clean; int ret; char vlan_ifname[24]; unsigned long v11; v11 = __readfsqword(0x28u); if (vlan_naming == 1) ret = snprintf(vlan_ifname, 0x10u, "%s.%d",...
static void vlan_newlink_tagged(int vlan_naming, const char *tagged_interface, const char *br_name, int vid, struct hostapd_data *hapd) { char vlan_ifname[IFNAMSIZ]; int clean; int ret; if (vlan_naming == DYNAMIC_VLAN_NAMING_WITH_DEVICE) ret =...
vlan_newlink_tagged
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void vlan_put_bridge(const char *br_name, hostapd_data *hapd, int vid) { const char *tagged_interface; tagged_interface = hapd->conf->ssid.vlan_tagged_interface; if (tagged_interface) vlan_dellink_tagged(hapd->conf->ssid.vlan_naming, tagged_interface, br_name, vid, hapd); if ((dyn_i...
static void vlan_put_bridge(const char *br_name, struct hostapd_data *hapd, int vid) { int clean; char *tagged_interface = hapd->conf->ssid.vlan_tagged_interface; int vlan_naming = hapd->conf->ssid.vlan_naming; if (tagged_interface) vlan_dellink_tagged(vlan_naming, tagged_interf...
vlan_put_bridge
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0