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 |
|---|---|---|---|---|---|---|---|
wps_process_res wps_process_wsc_done(wps_data *wps, const wpabuf *msg) {
u8 *pbc_ignore_uuid;
long v4;
wps_credential cred;
wps_parse_attr attr;
unsigned long v7;
v7 = __readfsqword(0x28u);
wpa_printf(2, "WPS: Received WSC_Done");
if (wps->state == RECV_DONE || wps->wps->wps_upnp && wps->ext_reg) {
... | static enum wps_process_res wps_process_wsc_done(struct wps_data *wps,
const struct wpabuf *msg) {
struct wps_parse_attr attr;
wpa_printf(MSG_DEBUG, "WPS: Received WSC_Done");
if (wps->state != RECV_DONE && (!wps->wps->wps_upnp || !wps->ext_reg)) {
wpa_printf... | wps_process_wsc_done | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_pwd_auth_fail(hostapd_data *hapd, void *ctx) {
if (!*(_DWORD *)ctx || !hapd->conf->ap_pin || !hapd->wps)
return 0;
wpa_printf(2, "WPS: AP PIN authentication failure number %u (%u consecutive)",
++hapd->ap_pin_failures, ++hapd->ap_pin_failures_consecutive);
if (hapd->ap_pin_failures <= 2)
... | static int wps_pwd_auth_fail(struct hostapd_data *hapd, void *ctx) {
struct wps_event_pwd_auth_fail *data = ctx;
if (!data->enrollee || hapd->conf->ap_pin == NULL || hapd->wps == NULL)
return 0;
hapd->ap_pin_failures++;
hapd->ap_pin_failures_consecutive++;
wpa_printf(MSG_DEBUG,
"WPS: AP PIN... | wps_pwd_auth_fail | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_pwd_auth_fail_event(wps_context *wps, int enrollee, int part,
const u8 *mac_addr) {
wps_event_data data;
unsigned long v7;
v7 = __readfsqword(0x28u);
if (wps->event_cb) {
memset(&data, 0, sizeof(data));
data.ap.uuid = (const u8 *)__PAIR64__(part, enrollee);
dat... | void wps_pwd_auth_fail_event(struct wps_context *wps, int enrollee, int part,
const u8 *mac_addr) {
union wps_event_data data;
if (wps->event_cb == NULL)
return;
os_memset(&data, 0, sizeof(data));
data.pwd_auth_fail.enrollee = enrollee;
data.pwd_auth_fail.part = part;
os_m... | wps_pwd_auth_fail_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_add_authorized_mac(wps_registrar *reg, const u8 *addr) {
int i;
int ia;
wpa_printf(2, "WPS: Add authorized MAC %02x:%02x:%02x:%02x:%02x:%02x", *addr,
addr[1], addr[2], addr[3], addr[4], addr[5]);
for (i = 0; i <= 4; ++i) {
if (!memcmp(reg->authorized_macs[i], addr, 6u)) {
... | static void wps_registrar_add_authorized_mac(struct wps_registrar *reg,
const u8 *addr) {
int i;
wpa_printf(MSG_DEBUG, "WPS: Add authorized MAC " MACSTR, MAC2STR(addr));
for (i = 0; i < WPS_MAX_AUTHORIZED_MACS; i++)
if (os_memcmp(reg->authorized_macs[i], addr, ETH_... | wps_registrar_add_authorized_mac | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_add_nfc_password_token(wps_registrar *reg,
const u8 *oob_dev_pw,
size_t oob_dev_pw_len) {
u16 id;
if (oob_dev_pw_len <= 0x15 || oob_dev_pw_len > 0x36)
return -1;
id = WPA_GET_BE16_17(oob_dev_pw + 20);
wpa_pr... | int wps_registrar_add_nfc_password_token(struct wps_registrar *reg,
const u8 *oob_dev_pw,
size_t oob_dev_pw_len) {
const u8 *pos, *hash, *dev_pw;
u16 id;
size_t dev_pw_len;
if (oob_dev_pw_len < WPS_OOB_PUBKEY_HASH_LEN + 2 ||
... | wps_registrar_add_nfc_password_token | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_add_nfc_pw_token(wps_registrar *reg, const u8 *pubkey_hash,
u16 pw_id, const u8 *dev_pw,
size_t dev_pw_len,
int pk_hash_provided_oob) {
wps_nfc_pw_token *token;
if (dev_pw_len > 0x20)
retu... | int wps_registrar_add_nfc_pw_token(struct wps_registrar *reg,
const u8 *pubkey_hash, u16 pw_id,
const u8 *dev_pw, size_t dev_pw_len,
int pk_hash_provided_oob) {
struct wps_nfc_pw_token *token;
if (dev_pw_len > ... | wps_registrar_add_nfc_pw_token | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_add_pbc_session(wps_registrar *reg, const u8 *addr,
const u8 *uuid_e) {
long v3;
os_time_t usec;
wps_pbc_session *pbc;
wps_pbc_session *pbca;
wps_pbc_session *prev;
wps_pbc_session *preva;
os_reltime now;
unsigned long v11;
v11 = __readfsqword(0x2... | static void wps_registrar_add_pbc_session(struct wps_registrar *reg,
const u8 *addr, const u8 *uuid_e) {
struct wps_pbc_session *pbc, *prev = NULL;
struct os_reltime now;
os_get_reltime(&now);
pbc = reg->pbc_sessions;
while (pbc) {
if (os_memcmp(pbc->addr, addr,... | wps_registrar_add_pbc_session | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_add_pin(wps_registrar *reg, const u8 *addr, const u8 *uuid,
const u8 *pin, size_t pin_len, int timeout) {
long v7;
wps_uuid_pin *p;
p = (wps_uuid_pin *)os_zalloc(0x58u);
if (!p)
return -1;
if (addr)
memcpy(p->enrollee_addr, addr, sizeof(p->enrollee_addr));
... | int wps_registrar_add_pin(struct wps_registrar *reg, const u8 *addr,
const u8 *uuid, const u8 *pin, size_t pin_len,
int timeout) {
struct wps_uuid_pin *p;
p = os_zalloc(sizeof(*p));
if (p == NULL)
return -1;
if (addr)
os_memcpy(p->enrollee_addr, addr,... | wps_registrar_add_pin | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_button_pushed(wps_registrar *reg, const u8 *p2p_dev_addr) {
if (p2p_dev_addr || !wps_registrar_pbc_overlap(reg, 0, 0)) {
wpa_printf(2, "WPS: Button pushed - PBC mode started");
reg->force_pbc_overlap = 0;
reg->selected_registrar = 1;
reg->pbc = 1;
if (p2p_dev_addr)
memcpy(r... | int wps_registrar_button_pushed(struct wps_registrar *reg,
const u8 *p2p_dev_addr) {
if (p2p_dev_addr == NULL && wps_registrar_pbc_overlap(reg, NULL, NULL)) {
wpa_printf(MSG_DEBUG, "WPS: PBC overlap - do not start PBC "
"mode");
wps_pbc_overlap_event(r... | wps_registrar_button_pushed | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_complete(wps_registrar *registrar, const u8 *uuid_e,
const u8 *dev_pw, size_t dev_pw_len) {
long v4;
if (registrar->pbc) {
wps_registrar_remove_pbc_session(registrar, uuid_e, 0);
wps_registrar_pbc_completed(registrar);
os_get_reltime(®istrar->pbc_ignore... | void wps_registrar_complete(struct wps_registrar *registrar, const u8 *uuid_e,
const u8 *dev_pw, size_t dev_pw_len) {
if (registrar->pbc) {
wps_registrar_remove_pbc_session(registrar, uuid_e, NULL);
wps_registrar_pbc_completed(registrar);
#ifdef WPS_WORKAROUNDS
os_get_reltime(&... | wps_registrar_complete | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_config_ap(wps_registrar *reg, wps_credential *cred) {
wpa_printf(2, "WPS: encr_type=0x%x", cred->encr_type);
if ((cred->encr_type & 0xD) != 0) {
if ((cred->encr_type & 0xC) == 4) {
wpa_printf(2, "WPS: Upgrade encr_type TKIP -> TKIP+AES");
cred->encr_type |= 8u;
}
if ((cred-... | int wps_registrar_config_ap(struct wps_registrar *reg,
struct wps_credential *cred) {
wpa_printf(MSG_DEBUG, "WPS: encr_type=0x%x", cred->encr_type);
if (!(cred->encr_type & (WPS_ENCR_NONE | WPS_ENCR_TKIP | WPS_ENCR_AES))) {
if (cred->encr_type & WPS_ENCR_WEP) {
wpa_printf(MSG_I... | wps_registrar_config_ap | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_deinit(wps_registrar *reg) {
if (reg) {
eloop_cancel_timeout((eloop_timeout_handler)wps_registrar_pbc_timeout, reg,
0);
eloop_cancel_timeout(
(eloop_timeout_handler)wps_registrar_set_selected_timeout, reg, 0);
wps_registrar_flush(reg);
wpabuf_clear_f... | void wps_registrar_deinit(struct wps_registrar *reg) {
if (reg == NULL)
return;
eloop_cancel_timeout(wps_registrar_pbc_timeout, reg, NULL);
eloop_cancel_timeout(wps_registrar_set_selected_timeout, reg, NULL);
wps_registrar_flush(reg);
wpabuf_clear_free(reg->extra_cred);
bin_clear_free(reg->multi_ap_back... | wps_registrar_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_expire_pins(wps_registrar *reg) {
wps_uuid_pin *pin;
wps_uuid_pin *prev;
os_reltime now;
unsigned long v4;
v4 = __readfsqword(0x28u);
os_get_reltime(&now);
pin = (wps_uuid_pin *)reg->pins.next;
prev = (wps_uuid_pin *)pin->list.next;
while (pin != (wps_uuid_pin *)®->pins) {
i... | static void wps_registrar_expire_pins(struct wps_registrar *reg) {
struct wps_uuid_pin *pin, *prev;
struct os_reltime now;
os_get_reltime(&now);
dl_list_for_each_safe(pin, prev, ®->pins, struct wps_uuid_pin, list) {
if ((pin->flags & PIN_EXPIRES) &&
os_reltime_before(&pin->expiration, &now)) {
... | wps_registrar_expire_pins | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_flush(wps_registrar *reg) {
if (reg) {
wps_free_pins(®->pins);
wps_free_nfc_pw_tokens(®->nfc_pw_tokens, 0);
wps_free_pbc_sessions(reg->pbc_sessions);
reg->pbc_sessions = 0;
wps_free_devices(reg->devices);
reg->devices = 0;
reg->pbc_ignore_start.sec = 0;
}
} | void wps_registrar_flush(struct wps_registrar *reg) {
if (reg == NULL)
return;
wps_free_pins(®->pins);
wps_free_nfc_pw_tokens(®->nfc_pw_tokens, 0);
wps_free_pbc_sessions(reg->pbc_sessions);
reg->pbc_sessions = NULL;
wps_free_devices(reg->devices);
reg->devices = NULL;
#ifdef WPS_WORKAROUNDS
re... | wps_registrar_flush | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_free_pending_m2(wps_context *wps) {
upnp_pending_message *p;
upnp_pending_message *prev;
upnp_pending_message *p2;
prev = 0;
p = wps->upnp_msgs;
while (p) {
if (p->type == wps_msg_type_WPS_M2 || p->type == wps_msg_type_WPS_M2D) {
if (prev)
prev->next = p->next;
el... | static void wps_registrar_free_pending_m2(struct wps_context *wps) {
struct upnp_pending_message *p, *p2, *prev = NULL;
p = wps->upnp_msgs;
while (p) {
if (p->type == WPS_M2 || p->type == WPS_M2D) {
if (prev == NULL)
wps->upnp_msgs = p->next;
else
prev->next = p->next;
wpa_pr... | wps_registrar_free_pending_m2 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_get_info(wps_registrar *reg, const u8 *addr, char *buf,
size_t buflen) {
const char *serial_number;
const char *model_number;
const char *model_name;
const char *manufacturer;
const char *device_name;
char *v10;
int len;
int ret;
wps_registrar_device *d;
... | int wps_registrar_get_info(struct wps_registrar *reg, const u8 *addr, char *buf,
size_t buflen) {
struct wps_registrar_device *d;
int len = 0, ret;
char uuid[40];
char devtype[WPS_DEV_TYPE_BUFSIZE];
d = wps_device_get(reg, addr);
if (d == NULL)
return 0;
if (uuid_bin2str(d-... | wps_registrar_get_info | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *wps_registrar_get_msg(wps_data *wps, wsc_op_code *op_code) {
wps_msg_type type;
wpabuf *msg;
wpabuf *msga;
upnp_pending_message *p;
upnp_pending_message *prev;
if (wps->int_reg || !wps->wps->wps_upnp)
goto LABEL_41;
prev = 0;
if (wps->ext_reg > 1)
wps_registrar_free_pending_m2(wps->wps)... | struct wpabuf *wps_registrar_get_msg(struct wps_data *wps,
enum wsc_op_code *op_code) {
struct wpabuf *msg;
#ifdef CONFIG_WPS_UPNP
if (!wps->int_reg && wps->wps->wps_upnp) {
struct upnp_pending_message *p, *prev = NULL;
if (wps->ext_reg > 1)
wps_registrar_free_pen... | wps_registrar_get_msg | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const u8 *wps_registrar_get_pin(wps_registrar *reg, const u8 *uuid,
size_t *pin_len) {
long v3;
int wildcard;
wps_uuid_pin *pin;
wps_uuid_pin *pina;
wps_uuid_pin *found;
found = 0;
wildcard = 0;
wps_registrar_expire_pins(reg);
for (pin = (wps_uuid_pin *)reg->pins.next;... | static const u8 *wps_registrar_get_pin(struct wps_registrar *reg,
const u8 *uuid, size_t *pin_len) {
struct wps_uuid_pin *pin, *found = NULL;
int wildcard = 0;
wps_registrar_expire_pins(reg);
dl_list_for_each(pin, ®->pins, struct wps_uuid_pin, list) {
if (!pin->wi... | wps_registrar_get_pin | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wps_registrar *wps_registrar_init(wps_context *wps,
const wps_registrar_config *cfg) {
wps_registrar *reg;
reg = (wps_registrar *)os_zalloc(0x148u);
if (!reg)
return 0;
dl_list_init_9(®->pins);
dl_list_init_9(®->nfc_pw_tokens);
reg->wps = wps;
reg->new_psk_cb =... | struct wps_registrar *
wps_registrar_init(struct wps_context *wps,
const struct wps_registrar_config *cfg) {
struct wps_registrar *reg = os_zalloc(sizeof(*reg));
if (reg == NULL)
return NULL;
dl_list_init(®->pins);
dl_list_init(®->nfc_pw_tokens);
reg->wps = wps;
reg->new_psk_cb... | wps_registrar_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_invalidate_pin(wps_registrar *reg, const u8 *uuid) {
wps_uuid_pin *pin;
wps_uuid_pin *prev;
pin = (wps_uuid_pin *)reg->pins.next;
prev = (wps_uuid_pin *)pin->list.next;
while (pin != (wps_uuid_pin *)®->pins) {
if (!memcmp(pin->uuid, uuid, 0x10u)) {
wpa_hexdump(2, "WPS: Invalida... | int wps_registrar_invalidate_pin(struct wps_registrar *reg, const u8 *uuid) {
struct wps_uuid_pin *pin, *prev;
dl_list_for_each_safe(pin, prev, ®->pins, struct wps_uuid_pin, list) {
if (os_memcmp(pin->uuid, uuid, WPS_UUID_LEN) == 0) {
wpa_hexdump(MSG_DEBUG, "WPS: Invalidated PIN for UUID", pin->uuid,
... | wps_registrar_invalidate_pin | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_invalidate_unused(wps_registrar *reg) {
wps_uuid_pin *pin;
for (pin = (wps_uuid_pin *)reg->pins.next; pin != (wps_uuid_pin *)®->pins;
pin = (wps_uuid_pin *)pin->list.next) {
if (pin->wildcard_uuid == 1 && (pin->flags & 1) == 0) {
wpa_printf(2, "WPS: Invalidate previously conf... | static void wps_registrar_invalidate_unused(struct wps_registrar *reg) {
struct wps_uuid_pin *pin;
dl_list_for_each(pin, ®->pins, struct wps_uuid_pin, list) {
if (pin->wildcard_uuid == 1 && !(pin->flags & PIN_LOCKED)) {
wpa_printf(MSG_DEBUG, "WPS: Invalidate previously "
"c... | wps_registrar_invalidate_unused | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_invalidate_wildcard_pin(wps_registrar *reg, const u8 *dev_pw,
size_t dev_pw_len) {
wps_uuid_pin *pin;
wps_uuid_pin *prev;
pin = (wps_uuid_pin *)reg->pins.next;
prev = (wps_uuid_pin *)pin->list.next;
while (pin != (wps_uuid_pin *)®->pins) {
if... | static int wps_registrar_invalidate_wildcard_pin(struct wps_registrar *reg,
const u8 *dev_pw,
size_t dev_pw_len) {
struct wps_uuid_pin *pin, *prev;
dl_list_for_each_safe(pin, prev, ®->pins, struct wps_uuid_pin, lis... | wps_registrar_invalidate_wildcard_pin | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_p2p_dev_addr_match(wps_data *wps) { return 1; } | static int wps_registrar_p2p_dev_addr_match(struct wps_data *wps) {
#ifdef CONFIG_P2P
struct wps_registrar *reg = wps->wps->registrar;
if (is_zero_ether_addr(reg->p2p_dev_addr))
return 1;
if (os_memcmp(reg->p2p_dev_addr, wps->p2p_dev_addr, ETH_ALEN) != 0) {
wpa_printf(MSG_DEBUG,
"WPS: No ... | wps_registrar_p2p_dev_addr_match | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_pbc_completed(wps_registrar *reg) {
wpa_printf(2, "WPS: PBC completed - stopping PBC mode");
eloop_cancel_timeout((eloop_timeout_handler)wps_registrar_pbc_timeout, reg,
0);
wps_registrar_stop_pbc(reg);
wps_pbc_disable_event(reg->wps);
} | static void wps_registrar_pbc_completed(struct wps_registrar *reg) {
wpa_printf(MSG_DEBUG, "WPS: PBC completed - stopping PBC mode");
eloop_cancel_timeout(wps_registrar_pbc_timeout, reg, NULL);
wps_registrar_stop_pbc(reg);
wps_pbc_disable_event(reg->wps);
} | wps_registrar_pbc_completed | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_pbc_overlap(wps_registrar *reg, const u8 *addr,
const u8 *uuid_e) {
int count;
wps_pbc_session *pbc;
wps_pbc_session *first;
os_reltime now;
unsigned long v9;
v9 = __readfsqword(0x28u);
count = 0;
first = 0;
os_get_reltime(&now);
wpa_printf(2, "WPS: C... | int wps_registrar_pbc_overlap(struct wps_registrar *reg, const u8 *addr,
const u8 *uuid_e) {
int count = 0;
struct wps_pbc_session *pbc;
struct wps_pbc_session *first = NULL;
struct os_reltime now;
os_get_reltime(&now);
wpa_printf(MSG_DEBUG, "WPS: Checking active PBC sessions... | wps_registrar_pbc_overlap | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_pbc_timeout(void *eloop_ctx, void *timeout_ctx) {
wpa_printf(2, "WPS: PBC timed out - disable PBC mode");
wps_pbc_timeout_event(*(wps_context **)eloop_ctx);
wps_registrar_stop_pbc((wps_registrar *)eloop_ctx);
} | static void wps_registrar_pbc_timeout(void *eloop_ctx, void *timeout_ctx) {
struct wps_registrar *reg = eloop_ctx;
wpa_printf(MSG_DEBUG, "WPS: PBC timed out - disable PBC mode");
wps_pbc_timeout_event(reg->wps);
wps_registrar_stop_pbc(reg);
} | wps_registrar_pbc_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_pin_completed(wps_registrar *reg) {
wpa_printf(2, "WPS: PIN completed using internal Registrar");
eloop_cancel_timeout(
(eloop_timeout_handler)wps_registrar_set_selected_timeout, reg, 0);
reg->selected_registrar = 0;
wps_registrar_selected_registrar_changed(reg, 0);
} | static void wps_registrar_pin_completed(struct wps_registrar *reg) {
wpa_printf(MSG_DEBUG, "WPS: PIN completed using internal Registrar");
eloop_cancel_timeout(wps_registrar_set_selected_timeout, reg, NULL);
reg->selected_registrar = 0;
wps_registrar_selected_registrar_changed(reg, 0);
} | wps_registrar_pin_completed | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_probe_req_rx(wps_registrar *reg, const u8 *addr,
const wpabuf *wps_data, int p2p_wildcard) {
void (*enrollee_seen_cb)(void *, const u8 *, const u8 *, const u8 *, u16, u16,
u8, const char *);
long v5;
int v6;
u16 v7;
int skip_add;
... | void wps_registrar_probe_req_rx(struct wps_registrar *reg, const u8 *addr,
const struct wpabuf *wps_data,
int p2p_wildcard) {
struct wps_parse_attr attr;
int skip_add = 0;
wpa_hexdump_buf(MSG_MSGDUMP, "WPS: Probe Request with WPS data received",
... | wps_registrar_probe_req_rx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wps_process_res wps_registrar_process_msg(wps_data *wps, wsc_op_code op_code,
const wpabuf *msg) {
size_t v3;
wps_process_res ret;
wps_parse_attr attr;
unsigned long v8;
v8 = __readfsqword(0x28u);
v3 = wpabuf_len_44(msg);
wpa_printf(2, "WPS: Processing received m... | enum wps_process_res wps_registrar_process_msg(struct wps_data *wps,
enum wsc_op_code op_code,
const struct wpabuf *msg) {
enum wps_process_res ret;
wpa_printf(MSG_DEBUG,
"WPS: Processing received message (le... | wps_registrar_process_msg | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_remove_authorized_mac(wps_registrar *reg, const u8 *addr) {
int i;
wpa_printf(2, "WPS: Remove authorized MAC %02x:%02x:%02x:%02x:%02x:%02x",
*addr, addr[1], addr[2], addr[3], addr[4], addr[5]);
for (i = 0; i <= 4 && memcmp(reg->authorized_macs, addr, 6u); ++i)
;
if (i == 5) ... | static void wps_registrar_remove_authorized_mac(struct wps_registrar *reg,
const u8 *addr) {
int i;
wpa_printf(MSG_DEBUG, "WPS: Remove authorized MAC " MACSTR, MAC2STR(addr));
for (i = 0; i < WPS_MAX_AUTHORIZED_MACS; i++) {
if (os_memcmp(reg->authorized_macs, ad... | wps_registrar_remove_authorized_mac | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_remove_nfc_pw_token(wps_registrar *reg,
wps_nfc_pw_token *token) {
wps_registrar_remove_authorized_mac(reg, &byte_1E9562);
wps_registrar_selected_registrar_changed(reg, 0);
if ((*((_BYTE *)token + 36) & 1) != 0)
free(token);
} | void wps_registrar_remove_nfc_pw_token(struct wps_registrar *reg,
struct wps_nfc_pw_token *token) {
wps_registrar_remove_authorized_mac(reg, (u8 *)"\xff\xff\xff\xff\xff\xff");
wps_registrar_selected_registrar_changed(reg, 0);
if (token->peer_pk_hash_known)
os_free(token... | wps_registrar_remove_nfc_pw_token | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_remove_pbc_session(wps_registrar *reg, const u8 *uuid_e,
const u8 *p2p_dev_addr) {
wps_pbc_session *pbc;
wps_pbc_session *prev;
wps_pbc_session *tmp;
prev = 0;
pbc = reg->pbc_sessions;
while (pbc) {
if (!memcmp(pbc->uuid_e, uuid_e, 0x10u) ||
... | static void wps_registrar_remove_pbc_session(struct wps_registrar *reg,
const u8 *uuid_e,
const u8 *p2p_dev_addr) {
struct wps_pbc_session *pbc, *prev = NULL, *tmp;
pbc = reg->pbc_sessions;
while (pbc) {
if (os_memcmp(p... | wps_registrar_remove_pbc_session | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_remove_pin(wps_registrar *reg, wps_uuid_pin *pin) {
const u8 *addr;
u8 bcast[6];
unsigned long v4;
v4 = __readfsqword(0x28u);
memset(bcast, 255, sizeof(bcast));
if (is_zero_ether_addr_9(pin->enrollee_addr))
addr = bcast;
else
addr = pin->enrollee_addr;
wps_registrar_remove_au... | static void wps_registrar_remove_pin(struct wps_registrar *reg,
struct wps_uuid_pin *pin) {
u8 *addr;
u8 bcast[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
if (is_zero_ether_addr(pin->enrollee_addr))
addr = bcast;
else
addr = pin->enrollee_addr;
wps_registrar... | wps_registrar_remove_pin | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_sel_reg_add(wps_registrar *reg, subscription *s) {
int i;
int j;
wpa_printf(
2, "WPS: External Registrar selected (dev_pw_id=%d config_methods=0x%x)",
s->dev_password_id, s->config_methods);
reg->sel_reg_union = 1;
if (reg->sel_reg_dev_password_id_override != 4)
reg->sel_re... | static void wps_registrar_sel_reg_add(struct wps_registrar *reg,
struct subscription *s) {
int i, j;
wpa_printf(MSG_DEBUG,
"WPS: External Registrar selected (dev_pw_id=%d "
"config_methods=0x%x)",
s->dev_password_id, s->config_methods);
... | wps_registrar_sel_reg_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_sel_reg_union(wps_registrar *reg) {
subscr_addr *next;
int v2;
char *v3;
subscription *s;
subscr_addr *sa;
if (reg->wps->wps_upnp) {
for (s = (subscription *)reg->wps->wps_upnp->subscriptions.next;
s != (subscription *)®->wps->wps_upnp->subscriptions;
s = (subscr... | static void wps_registrar_sel_reg_union(struct wps_registrar *reg) {
#ifdef CONFIG_WPS_UPNP
struct subscription *s;
if (reg->wps->wps_upnp == NULL)
return;
dl_list_for_each(s, ®->wps->wps_upnp->subscriptions, struct subscription,
list) {
struct subscr_addr *sa;
sa = dl_list_fir... | wps_registrar_sel_reg_union | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_selected_registrar_changed(wps_registrar *reg,
u16 dev_pw_id) {
u16 config_methods;
u16 methods;
unsigned long v4;
v4 = __readfsqword(0x28u);
wpa_printf(2, "WPS: Selected registrar information changed");
reg->sel_reg_union = reg->selected_reg... | void wps_registrar_selected_registrar_changed(struct wps_registrar *reg,
u16 dev_pw_id) {
wpa_printf(MSG_DEBUG, "WPS: Selected registrar information changed");
reg->sel_reg_union = reg->selected_registrar;
reg->sel_reg_dev_password_id_override = -1;
reg->sel_reg_co... | wps_registrar_selected_registrar_changed | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_set_selected_timeout(void *eloop_ctx, void *timeout_ctx) {
wpa_printf(2,
"WPS: Selected Registrar timeout - unselect internal Registrar");
*((_DWORD *)eloop_ctx + 3) = 0;
*((_DWORD *)eloop_ctx + 2) = 0;
wps_registrar_expire_pins((wps_registrar *)eloop_ctx);
wps_registrar_select... | static void wps_registrar_set_selected_timeout(void *eloop_ctx,
void *timeout_ctx) {
struct wps_registrar *reg = eloop_ctx;
wpa_printf(MSG_DEBUG, "WPS: Selected Registrar timeout - "
"unselect internal Registrar");
reg->selected_registrar = 0... | wps_registrar_set_selected_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_skip_overlap(wps_data *wps) { return 0; } | static int wps_registrar_skip_overlap(struct wps_data *wps) {
#ifdef CONFIG_P2P
struct wps_registrar *reg = wps->wps->registrar;
if (is_zero_ether_addr(reg->p2p_dev_addr))
return 0;
if (os_memcmp(reg->p2p_dev_addr, wps->p2p_dev_addr, ETH_ALEN) == 0) {
wpa_printf(MSG_DEBUG, "WPS: Skip PBC overlap due to ... | wps_registrar_skip_overlap | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_registrar_stop_pbc(wps_registrar *reg) {
reg->selected_registrar = 0;
reg->pbc = 0;
memset(reg->p2p_dev_addr, 0, sizeof(reg->p2p_dev_addr));
wps_registrar_remove_authorized_mac(reg, &byte_1E9562);
wps_registrar_selected_registrar_changed(reg, 0);
} | static void wps_registrar_stop_pbc(struct wps_registrar *reg) {
reg->selected_registrar = 0;
reg->pbc = 0;
os_memset(reg->p2p_dev_addr, 0, ETH_ALEN);
wps_registrar_remove_authorized_mac(reg, (u8 *)"\xff\xff\xff\xff\xff\xff");
wps_registrar_selected_registrar_changed(reg, 0);
} | wps_registrar_stop_pbc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_unlock_pin(wps_registrar *reg, const u8 *uuid) {
wps_uuid_pin *pin;
for (pin = (wps_uuid_pin *)reg->pins.next;;
pin = (wps_uuid_pin *)pin->list.next) {
if (pin == (wps_uuid_pin *)®->pins)
return -1;
if (!memcmp(pin->uuid, uuid, 0x10u))
break;
}
if (pin->wildcard_... | int wps_registrar_unlock_pin(struct wps_registrar *reg, const u8 *uuid) {
struct wps_uuid_pin *pin;
dl_list_for_each(pin, ®->pins, struct wps_uuid_pin, list) {
if (os_memcmp(pin->uuid, uuid, WPS_UUID_LEN) == 0) {
if (pin->wildcard_uuid == 3) {
wpa_printf(MSG_DEBUG, "WPS: Invalidating used "
... | wps_registrar_unlock_pin | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_update_multi_ap(wps_registrar *reg,
const u8 *multi_ap_backhaul_ssid,
size_t multi_ap_backhaul_ssid_len,
const u8 *multi_ap_backhaul_network_key,
size_t multi_ap_back... | int wps_registrar_update_multi_ap(struct wps_registrar *reg,
const u8 *multi_ap_backhaul_ssid,
size_t multi_ap_backhaul_ssid_len,
const u8 *multi_ap_backhaul_network_key,
size_t multi_... | wps_registrar_update_multi_ap | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_registrar_wps_cancel(wps_registrar *reg) {
if (reg->pbc) {
wpa_printf(2, "WPS: PBC is set - cancelling it");
wps_registrar_pbc_timeout(reg, 0);
eloop_cancel_timeout((eloop_timeout_handler)wps_registrar_pbc_timeout, reg,
0);
return 1;
} else if (reg->selected_registra... | int wps_registrar_wps_cancel(struct wps_registrar *reg) {
if (reg->pbc) {
wpa_printf(MSG_DEBUG, "WPS: PBC is set - cancelling it");
wps_registrar_pbc_timeout(reg, NULL);
eloop_cancel_timeout(wps_registrar_pbc_timeout, reg, NULL);
return 1;
} else if (reg->selected_registrar) {
wpa_printf(MSG_DE... | wps_registrar_wps_cancel | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_reload_config(void *eloop_data, void *user_ctx) {
wpa_printf(2, "WPS: Reload configuration data");
if (!*(_QWORD *)eloop_data ||
(**(int (***)(void *))eloop_data)(eloop_data) < 0)
wpa_printf(4, "WPS: Failed to reload the updated configuration");
} | static void wps_reload_config(void *eloop_data, void *user_ctx) {
struct hostapd_iface *iface = eloop_data;
wpa_printf(MSG_DEBUG, "WPS: Reload configuration data");
if (iface->interfaces == NULL ||
iface->interfaces->reload_config(iface) < 0) {
wpa_printf(MSG_WARNING, "WPS: Failed to reload the updated... | wps_reload_config | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_remove_nfc_pw_token(wps_nfc_pw_token *token) {
dl_list_del_11(&token->list);
bin_clear_free(token, 0x80u);
} | static void wps_remove_nfc_pw_token(struct wps_nfc_pw_token *token) {
dl_list_del(&token->list);
bin_clear_free(token, sizeof(*token));
} | wps_remove_nfc_pw_token | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_remove_pin(wps_uuid_pin *pin) {
dl_list_del_11(&pin->list);
wps_free_pin(pin);
} | static void wps_remove_pin(struct wps_uuid_pin *pin) {
dl_list_del(&pin->list);
wps_free_pin(pin);
} | wps_remove_pin | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_set_attr(wps_parse_attr *attr, u16 type, const u8 *pos, u16 len) {
switch (type) {
case 0x1001u:
if (len == 2) {
attr->ap_channel = pos;
return 0;
}
wpa_printf(2, "WPS: Invalid AP Channel length %u", len);
return -1;
case 0x1002u:
if (len == 2) {
attr->assoc_state = p... | static int wps_set_attr(struct wps_parse_attr *attr, u16 type, const u8 *pos,
u16 len) {
switch (type) {
case ATTR_VERSION:
if (len != 1) {
wpa_printf(MSG_DEBUG, "WPS: Invalid Version length %u", len);
return -1;
}
attr->version = pos;
break;
case ATTR_MSG_TYPE:... | wps_set_attr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_set_ie(wps_registrar *reg) {
wps_response_type v2;
int i;
size_t count;
wpabuf *beacon;
wpabuf *probe;
size_t vendor_len;
const u8 *auth_macs;
unsigned long v9;
v9 = __readfsqword(0x28u);
vendor_len = 0;
if (!reg->set_ie_cb)
return 0;
for (i = 0; i <= 9; ++i) {
if (reg->wps->dev... | static int wps_set_ie(struct wps_registrar *reg) {
struct wpabuf *beacon;
struct wpabuf *probe;
const u8 *auth_macs;
size_t count;
size_t vendor_len = 0;
int i;
if (reg->set_ie_cb == NULL)
return 0;
for (i = 0; i < MAX_WPS_VENDOR_EXTENSIONS; i++) {
if (reg->wps->dev.vendor_ext[i]) {
vend... | wps_set_ie | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_set_pushbutton(u16 *methods, u16 conf_methods) {
u16 v2;
v2 = *methods;
LOBYTE(v2) = *methods | 0x80;
*methods = v2;
if ((conf_methods & 0x280) == 0x280)
*methods |= 0x280u;
if ((conf_methods & 0x480) == 0x480)
*methods |= 0x480u;
if ((*methods & 0x280) != 0x280 && (*methods & 0x480) != ... | static void wps_set_pushbutton(u16 *methods, u16 conf_methods) {
*methods |= WPS_CONFIG_PUSHBUTTON;
if ((conf_methods & WPS_CONFIG_VIRT_PUSHBUTTON) == WPS_CONFIG_VIRT_PUSHBUTTON)
*methods |= WPS_CONFIG_VIRT_PUSHBUTTON;
if ((conf_methods & WPS_CONFIG_PHY_PUSHBUTTON) == WPS_CONFIG_PHY_PUSHBUTTON)
*methods |... | wps_set_pushbutton | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_set_vendor_ext_wfa_subelem(wps_parse_attr *attr, u8 id, u8 len,
const u8 *pos) {
wpa_printf(0, "WPS: WFA subelement id=%u len=%u", id, len);
switch (id) {
case 0u:
if (len == 1) {
attr->version2 = pos;
return 0;
}
wpa_printf(2, "WPS: Invalid Versi... | static int wps_set_vendor_ext_wfa_subelem(struct wps_parse_attr *attr, u8 id,
u8 len, const u8 *pos) {
wpa_printf(MSG_EXCESSIVE, "WPS: WFA subelement id=%u len=%u", id, len);
switch (id) {
case WFA_ELEM_VERSION2:
if (len != 1) {
wpa_printf(MSG_DEBUG,
... | wps_set_vendor_ext_wfa_subelem | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_sta_cred_cb(wps_data *wps) {
if ((wps->cred.auth_type & 0x20) != 0) {
wps->cred.auth_type = 32;
} else if ((wps->cred.auth_type & 2) != 0) {
wps->cred.auth_type = 2;
}
if ((wps->cred.encr_type & 8) != 0) {
wps->cred.encr_type = 8;
} else if ((wps->cred.encr_type & 4) != 0) {
wps->cred... | static void wps_sta_cred_cb(struct wps_data *wps) {
if (wps->cred.auth_type & WPS_AUTH_WPA2PSK)
wps->cred.auth_type = WPS_AUTH_WPA2PSK;
else if (wps->cred.auth_type & WPS_AUTH_WPAPSK)
wps->cred.auth_type = WPS_AUTH_WPAPSK;
if (wps->cred.encr_type & WPS_ENCR_AES)
wps->cred.encr_type = WPS_ENCR_AES;
... | wps_sta_cred_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_stop_registrar(hostapd_data *hapd, void *ctx) {
if (hapd != *(hostapd_data **)ctx && hapd->wps)
wps_registrar_complete(hapd->wps->registrar, *((const u8 **)ctx + 1),
*((const u8 **)ctx + 2), *((_QWORD *)ctx + 3));
return 0;
} | static int wps_stop_registrar(struct hostapd_data *hapd, void *ctx) {
struct wps_stop_reg_data *data = ctx;
if (hapd != data->current_hapd && hapd->wps != NULL)
wps_registrar_complete(hapd->wps->registrar, data->uuid_e, data->dev_pw,
data->dev_pw_len);
return 0;
} | wps_stop_registrar | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_success_event(wps_context *wps, const u8 *mac_addr) {
wps_event_data data;
unsigned long v3;
v3 = __readfsqword(0x28u);
if (wps->event_cb) {
memset(&data, 0, sizeof(data));
data.success = *(wps_event_success *)mac_addr;
wps->event_cb(wps->cb_ctx, wps_event_WPS_EV_SUCCESS, &data);
}
} | void wps_success_event(struct wps_context *wps, const u8 *mac_addr) {
union wps_event_data data;
if (wps->event_cb == NULL)
return;
os_memset(&data, 0, sizeof(data));
os_memcpy(data.success.peer_macaddr, mac_addr, ETH_ALEN);
wps->event_cb(wps->cb_ctx, WPS_EV_SUCCESS, &data);
} | wps_success_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_update_ie(hostapd_data *hapd, void *ctx) {
if (hapd->wps)
wps_registrar_update_ie(hapd->wps->registrar);
return 0;
} | static int wps_update_ie(struct hostapd_data *hapd, void *ctx) {
if (hapd->wps)
wps_registrar_update_ie(hapd->wps->registrar);
return 0;
} | wps_update_ie | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_upnp_event_add(subscription *s, const wpabuf *data, int probereq) {
unsigned int next_subscriber_sequence;
unsigned int len;
wps_event_ *e;
wps_event_ *ea;
len = dl_list_len_4(&s->event_queue);
if (len > 0x13) {
wpa_printf(2, "WPS UPnP: Too many events queued for subscriber %p", s);
if (pro... | int wps_upnp_event_add(struct subscription *s, const struct wpabuf *data,
int probereq) {
struct wps_event_ *e;
unsigned int len;
len = dl_list_len(&s->event_queue);
if (len >= MAX_EVENTS_QUEUED) {
wpa_printf(MSG_DEBUG,
"WPS UPnP: Too many events queued for "
... | wps_upnp_event_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_upnp_event_delete_all(subscription *s) {
wps_event_ *e;
while (1) {
e = event_dequeue(s);
if (!e)
break;
event_delete(e);
}
if (s->current_event)
event_delete(s->current_event);
} | void wps_upnp_event_delete_all(struct subscription *s) {
struct wps_event_ *e;
while ((e = event_dequeue(s)) != NULL)
event_delete(e);
if (s->current_event) {
event_delete(s->current_event);
}
} | wps_upnp_event_delete_all | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_upnp_event_send_all_later(upnp_wps_device_sm *sm) {
if (!sm->event_send_all_queued) {
sm->event_send_all_queued = 1;
eloop_register_timeout(
0, 0, (eloop_timeout_handler)event_send_all_later_handler, 0, sm);
}
} | void wps_upnp_event_send_all_later(struct upnp_wps_device_sm *sm) {
if (sm->event_send_all_queued)
return;
sm->event_send_all_queued = 1;
eloop_register_timeout(EVENT_DELAY_SECONDS, EVENT_DELAY_MSEC,
event_send_all_later_handler, NULL, sm);
} | wps_upnp_event_send_all_later | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_upnp_event_send_stop_all(upnp_wps_device_sm *sm) {
if (sm->event_send_all_queued)
eloop_cancel_timeout((eloop_timeout_handler)event_send_all_later_handler, 0,
sm);
sm->event_send_all_queued = 0;
} | void wps_upnp_event_send_stop_all(struct upnp_wps_device_sm *sm) {
if (sm->event_send_all_queued)
eloop_cancel_timeout(event_send_all_later_handler, NULL, sm);
sm->event_send_all_queued = 0;
} | wps_upnp_event_send_stop_all | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void wps_upnp_peer_del(upnp_wps_peer *peer) {
dl_list_del_14(&peer->list);
if (peer->wps)
wps_deinit(peer->wps);
free(peer);
} | static void wps_upnp_peer_del(struct upnp_wps_peer *peer) {
dl_list_del(&peer->list);
if (peer->wps)
wps_deinit(peer->wps);
os_free(peer);
} | wps_upnp_peer_del | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int wps_workaround_cred_key(wps_credential *cred) {
if ((cred->auth_type & 0x22) != 0 && cred->key_len > 8 &&
cred->key_len <= 0x3F && !cred->key[cred->key_len - 1]) {
wpa_printf(
2, "WPS: Workaround - remove NULL termination from ASCII passphrase");
--cred->key_len;
}
if ((cred->auth_type &... | static int wps_workaround_cred_key(struct wps_credential *cred) {
if (cred->auth_type & (WPS_AUTH_WPAPSK | WPS_AUTH_WPA2PSK) &&
cred->key_len > 8 && cred->key_len < 64 &&
cred->key[cred->key_len - 1] == 0) {
#ifdef CONFIG_WPS_STRICT
wpa_printf(MSG_INFO, "WPS: WPA/WPA2-Personal passphrase uses "
... | wps_workaround_cred_key | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void x_snoop_deinit(hostapd_data *hapd) {
hostapd_drv_br_set_net_param(
hapd, drv_br_net_param_DRV_BR_NET_PARAM_GARP_ACCEPT, 0);
hostapd_drv_br_port_set_attr(hapd, drv_br_port_attr_DRV_BR_PORT_ATTR_PROXYARP,
0);
hostapd_drv_br_port_set_attr(
hapd, drv_br_port_attr_DRV_BR... | void x_snoop_deinit(struct hostapd_data *hapd) {
hostapd_drv_br_set_net_param(hapd, DRV_BR_NET_PARAM_GARP_ACCEPT, 0);
hostapd_drv_br_port_set_attr(hapd, DRV_BR_PORT_ATTR_PROXYARP, 0);
hostapd_drv_br_port_set_attr(hapd, DRV_BR_PORT_ATTR_HAIRPIN_MODE, 0);
} | x_snoop_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
l2_packet_data *x_snoop_get_l2_packet(hostapd_data *hapd,
void (*handler)(void *, const u8 *,
const u8 *, size_t),
l2_packet_filter_type type) {
int *v3;
char *v4;
l2_packet_data *l2;
... | struct l2_packet_data *x_snoop_get_l2_packet(
struct hostapd_data *hapd,
void (*handler)(void *ctx, const u8 *src_addr, const u8 *buf, size_t len),
enum l2_packet_filter_type type) {
struct hostapd_bss_config *conf = hapd->conf;
struct l2_packet_data *l2;
l2 = l2_packet_init(conf->bridge, NULL, ETH_P... | x_snoop_get_l2_packet | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int x_snoop_init(hostapd_data *hapd) {
hostapd_bss_config *conf;
conf = hapd->conf;
if (conf->isolate) {
if (conf->bridge[0]) {
if (hostapd_drv_br_port_set_attr(
hapd, drv_br_port_attr_DRV_BR_PORT_ATTR_HAIRPIN_MODE, 1u)) {
wpa_printf(2,
"x_snoop: Failed to enabl... | int x_snoop_init(struct hostapd_data *hapd) {
struct hostapd_bss_config *conf = hapd->conf;
if (!conf->isolate) {
wpa_printf(MSG_DEBUG, "x_snoop: ap_isolate must be enabled for x_snoop");
return -1;
}
if (conf->bridge[0] == '\0') {
wpa_printf(MSG_DEBUG, "x_snoop: Bridge must be configured for x_sn... | x_snoop_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void x_snoop_mcast_to_ucast_convert_send(hostapd_data *hapd, sta_info *sta,
u8 *buf, size_t len) {
int addr;
short addr_4;
if ((*buf & 1) != 0) {
wpa_printf(0,
"x_snoop: Multicast-to-unicast conversion "
"%02x:%02x:%02x:%02x:%02x:%02x -> ... | void x_snoop_mcast_to_ucast_convert_send(struct hostapd_data *hapd,
struct sta_info *sta, u8 *buf,
size_t len) {
int res;
u8 addr[ETH_ALEN];
u8 *dst_addr = buf;
if (!(dst_addr[0] & 0x01))
return;
wpa_printf(MSG_EXCESSIVE,
... | x_snoop_mcast_to_ucast_convert_send | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void xml_add_tagged_data(wpabuf *buf, const char *tag, const char *data) {
int v3;
wpabuf_printf(buf, "<%s>", tag);
v3 = strlen(data);
xml_data_encode(buf, data, v3);
wpabuf_printf(buf, "</%s>\n", tag);
} | void xml_add_tagged_data(struct wpabuf *buf, const char *tag,
const char *data) {
wpabuf_printf(buf, "<%s>", tag);
xml_data_encode(buf, data, os_strlen(data));
wpabuf_printf(buf, "</%s>\n", tag);
} | xml_add_tagged_data | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void xml_data_encode(wpabuf *buf, const char *data, int len) {
char c;
int i;
for (i = 0; i < len; ++i) {
c = data[i];
switch (c) {
case '<':
wpabuf_put_str_4(buf, "<");
break;
case '>':
wpabuf_put_str_4(buf, ">");
break;
case '&':
wpabuf_put_str_4(buf, "&a... | void xml_data_encode(struct wpabuf *buf, const char *data, int len) {
int i;
for (i = 0; i < len; i++) {
u8 c = ((u8 *)data)[i];
if (c == '<') {
wpabuf_put_str(buf, "<");
continue;
}
if (c == '>') {
wpabuf_put_str(buf, ">");
continue;
}
if (c == '&') {
wpa... | xml_data_encode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *xml_get_base64_item(const char *data, const char *name,
http_reply_code *ret) {
size_t v4;
size_t len;
char *msg;
unsigned char *decoded;
wpabuf *buf;
unsigned long v10;
v10 = __readfsqword(0x28u);
msg = xml_get_first_item(data, name);
if (msg) {
v4 = strlen(ms... | struct wpabuf *xml_get_base64_item(const char *data, const char *name,
enum http_reply_code *ret) {
char *msg;
struct wpabuf *buf;
unsigned char *decoded;
size_t len;
msg = xml_get_first_item(data, name);
if (msg == NULL) {
*ret = UPNP_ARG_VALUE_INVALID;
return NU... | xml_get_base64_item | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
char *xml_get_first_item(const char *doc, const char *item) {
int match_len;
const char *tag;
const char *tagname;
const char *end;
const char *match;
char *value;
unsigned long v10;
v10 = __readfsqword(0x28u);
match = item;
match_len = strlen(item);
do {
if (xml_next_tag(doc, &tag, &tagname,... | char *xml_get_first_item(const char *doc, const char *item) {
const char *match = item;
int match_len = os_strlen(item);
const char *tag, *tagname, *end;
char *value;
for (;;) {
if (xml_next_tag(doc, &tag, &tagname, &end))
return NULL;
doc = end;
if (!os_strncasecmp(tagname, match, match_le... | xml_get_first_item | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int xml_next_tag(const char *in, const char **out, const char **out_tagname,
const char **end) {
const char *inb;
while (*in && *in != 60)
++in;
if (*in != 60)
return 1;
inb = in + 1;
*out = inb;
if (*inb == 47)
++inb;
*out_tagname = inb;
while (((*__ctype_b_loc())[*inb] & ... | int xml_next_tag(const char *in, const char **out, const char **out_tagname,
const char **end) {
while (*in && *in != '<')
in++;
if (*in != '<')
return 1;
*out = ++in;
if (*in == '/')
in++;
*out_tagname = in;
while (isalnum(*in) || *in == '-')
in++;
if (*in == ':')
*ou... | xml_next_tag | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void xor(u8 *a, const u8 *b) {
const u8 *v2;
u8 v3;
u8 *v4;
int i;
for (i = 0; i <= 15; ++i) {
v2 = b++;
v3 = *v2;
v4 = a++;
*v4 ^= v3;
}
} | static void xor(u8 *a, const u8 *b) {
int i;
for (i = 0; i < AES_BLOCK_SIZE; i++)
*a++ ^= *b++;
} | xor | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void xorend(u8 *a, int alen, const u8 *b, int blen) {
int i;
if (alen >= blen) {
for (i = 0; i < blen; ++i)
a[alen - blen + i] ^= b[i];
}
} | static void xorend(u8 *a, int alen, const u8 *b, int blen) {
int i;
if (alen < blen)
return;
for (i = 0; i < blen; i++)
a[alen - blen + i] ^= b[i];
} | xorend | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
TNC_Result TNC_9048_LogMessage(TNC_IMCID imcID, TNC_UInt32 severity,
const char *message) {
wpa_printf(2,
"TNC: TNC_9048_LogMessage(imcID=%lu severity==%lu message='%s')",
imcID, severity, message);
return 0;
} | static TNC_Result TNC_9048_LogMessage(TNC_IMCID imcID, TNC_UInt32 severity,
const char *message) {
wpa_printf(MSG_DEBUG,
"TNC: TNC_9048_LogMessage(imcID=%lu "
"severity==%lu message='%s')",
imcID, severity, message);
return TNC_RESULT_SUCC... | TNC_9048_LogMessage | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
TNC_Result TNC_9048_UserMessage(TNC_IMCID imcID, TNC_ConnectionID connectionID,
const char *message) {
wpa_printf(
2, "TNC: TNC_9048_UserMessage(imcID=%lu connectionID==%lu message='%s')",
imcID, connectionID, message);
return 0;
} | static TNC_Result TNC_9048_UserMessage(TNC_IMCID imcID,
TNC_ConnectionID connectionID,
const char *message) {
wpa_printf(MSG_DEBUG,
"TNC: TNC_9048_UserMessage(imcID=%lu "
"connectionID==%lu message='%s')",
... | TNC_9048_UserMessage | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
TNC_Result TNC_TNCC_BindFunction(TNC_IMCID imcID, char *functionName,
void **pOutfunctionPointer) {
wpa_printf(2, "TNC: TNC_TNCC_BindFunction(imcID=%lu, functionName='%s')",
imcID, functionName);
if (imcID > 9 || !tnc_imc[imcID])
return 6;
if (!pOutfunctionPointer... | static TNC_Result TNC_TNCC_BindFunction(TNC_IMCID imcID, char *functionName,
void **pOutfunctionPointer) {
wpa_printf(MSG_DEBUG,
"TNC: TNC_TNCC_BindFunction(imcID=%lu, "
"functionName='%s')",
(unsigned long)imcID, functionName);
if (imc... | TNC_TNCC_BindFunction | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
TNC_Result TNC_TNCC_ReportMessageTypes(TNC_IMCID imcID,
TNC_MessageTypeList supportedTypes,
TNC_UInt32 typeCount) {
TNC_UInt32 i;
tnc_if_imc *imc;
wpa_printf(2, "TNC: TNC_TNCC_ReportMessageTypes(imcID=%lu typeCount=%lu)",
... | static TNC_Result
TNC_TNCC_ReportMessageTypes(TNC_IMCID imcID, TNC_MessageTypeList supportedTypes,
TNC_UInt32 typeCount) {
TNC_UInt32 i;
struct tnc_if_imc *imc;
wpa_printf(MSG_DEBUG,
"TNC: TNC_TNCC_ReportMessageTypes(imcID=%lu "
"typeCount=%lu)",
... | TNC_TNCC_ReportMessageTypes | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
TNC_Result TNC_TNCC_RequestHandshakeRetry(TNC_IMCID imcID,
TNC_ConnectionID connectionID,
TNC_RetryReason reason) {
wpa_printf(2, "TNC: TNC_TNCC_RequestHandshakeRetry");
if (imcID <= 9 && tnc_imc[imcID])
return 0;
else
ret... | static TNC_Result TNC_TNCC_RequestHandshakeRetry(TNC_IMCID imcID,
TNC_ConnectionID connectionID,
TNC_RetryReason reason) {
wpa_printf(MSG_DEBUG, "TNC: TNC_TNCC_RequestHandshakeRetry");
if (imcID >= TNC_MAX_IMC_ID || t... | TNC_TNCC_RequestHandshakeRetry | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
TNC_Result TNC_TNCC_SendMessage(TNC_IMCID imcID, TNC_ConnectionID connectionID,
TNC_BufferReference message,
TNC_UInt32 messageLength,
TNC_MessageType messageType) {
u8 *v6;
int v7;
int messageTypea;
size_t b64len;
... | static TNC_Result TNC_TNCC_SendMessage(TNC_IMCID imcID,
TNC_ConnectionID connectionID,
TNC_BufferReference message,
TNC_UInt32 messageLength,
TNC_MessageType messag... | TNC_TNCC_SendMessage | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void add_arg(wpabuf *xml, const char *name, const char *type,
const char *direction) {
wpabuf_printf(xml, "<arg name=\"%s\"", name);
if (type)
wpabuf_printf(xml, " type=\"%s\"", type);
if (direction)
wpabuf_printf(xml, " direction=\"%s\"", direction);
wpabuf_put_str_8(xml, "/>");
} | static void add_arg(struct wpabuf *xml, const char *name, const char *type,
const char *direction) {
wpabuf_printf(xml, "<arg name=\"%s\"", name);
if (type)
wpabuf_printf(xml, " type=\"%s\"", type);
if (direction)
wpabuf_printf(xml, " direction=\"%s\"", direction);
wpabuf_put_str(xml... | add_arg | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int add_associated_sta(hostapd_data *hapd, sta_info *sta, int reassoc) {
int v3;
int v4;
size_t he_capab_len;
ieee80211_he_capabilities *p_he_cap;
ieee80211_vht_capabilities *p_vht_cap;
ieee80211_ht_capabilities *p_ht_cap;
const char *v9;
int set;
ieee80211_vht_capabilities vht_cap;
ieee80211_ht_cap... | static int add_associated_sta(struct hostapd_data *hapd, struct sta_info *sta,
int reassoc) {
struct ieee80211_ht_capabilities ht_cap;
struct ieee80211_vht_capabilities vht_cap;
struct ieee80211_he_capabilities he_cap;
int set = 1;
wpa_printf(MSG_DEBUG,
"Add associa... | add_associated_sta | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int add_buf(wpabuf **dst, const wpabuf *src) {
size_t v3;
if (!src)
return 0;
v3 = wpabuf_len_44(src);
if (wpabuf_resize(dst, v3))
return -1;
wpabuf_put_buf_15(*dst, src);
return 0;
} | static int add_buf(struct wpabuf **dst, const struct wpabuf *src) {
if (!src)
return 0;
if (wpabuf_resize(dst, wpabuf_len(src)) != 0)
return -1;
wpabuf_put_buf(*dst, src);
return 0;
} | add_buf | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int add_buf_data(wpabuf **dst, const u8 *data, size_t len) {
if (!data || !len)
return 0;
if (wpabuf_resize(dst, len))
return -1;
wpabuf_put_data_37(*dst, data, len);
return 0;
} | static int add_buf_data(struct wpabuf **dst, const u8 *data, size_t len) {
if (!data || !len)
return 0;
if (wpabuf_resize(dst, len) != 0)
return -1;
wpabuf_put_data(*dst, data, len);
return 0;
} | add_buf_data | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void add_child_nodes(wpabuf *xml, DBusConnection *con, const char *path) {
int i;
char **children[2];
children[1] = (char **)__readfsqword(0x28u);
dbus_connection_list_registered(con, path, children);
for (i = 0; children[0][i]; ++i)
wpabuf_printf(xml, "<node name=\"%s\"/>", children[0][i]);
dbus_free_... | static void add_child_nodes(struct wpabuf *xml, DBusConnection *con,
const char *path) {
char **children;
int i;
dbus_connection_list_registered(con, path, &children);
for (i = 0; children[i]; i++)
wpabuf_printf(xml, "<node name=\"%s\"/>", children[i]);
dbus_free_string_array(... | add_child_nodes | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void add_entry(wpabuf *xml, const char *type, const char *name,
const wpa_dbus_argument *args, int include_dir) {
const char *v5;
const wpa_dbus_argument *arg;
if (args && args->name) {
wpabuf_printf(xml, "<%s name=\"%s\">", type, name);
for (arg = args; arg && arg->name; ++arg) {
if... | static void add_entry(struct wpabuf *xml, const char *type, const char *name,
const struct wpa_dbus_argument *args, int include_dir) {
const struct wpa_dbus_argument *arg;
if (args == NULL || args->name == NULL) {
wpabuf_printf(xml, "<%s name=\"%s\"/>", type, name);
return;
}
wpab... | add_entry | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void add_freq(int *freqs, int *num_freqs, int freq) {
int i;
for (i = 0; i < *num_freqs; ++i) {
if (freq == freqs[i])
return;
}
freqs[(*num_freqs)++] = freq;
} | void add_freq(int *freqs, int *num_freqs, int freq) {
int i;
for (i = 0; i < *num_freqs; i++) {
if (freqs[i] == freq)
return;
}
freqs[*num_freqs] = freq;
(*num_freqs)++;
} | add_freq | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void add_ifidx(wpa_driver_nl80211_data *drv, int ifidx, int ifidx_reason) {
int i;
drv_nl80211_if_info *old;
wpa_printf(2, "nl80211: Add own interface ifindex %d (ifidx_reason %d)",
ifidx, ifidx_reason);
if (have_ifidx(drv, ifidx, ifidx_reason)) {
wpa_printf(2, "nl80211: ifindex %d already in ... | static void add_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx,
int ifidx_reason) {
int i;
struct drv_nl80211_if_info *old;
wpa_printf(MSG_DEBUG,
"nl80211: Add own interface ifindex %d (ifidx_reason %d)", ifidx,
ifidx_reason);
if (have_ifidx(drv, ifidx, ifi... | add_ifidx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
interfaces *add_interface(dl_list *list, const char *dbus_interface) {
interfaces *iface;
interfaces *ifacea;
for (iface = (interfaces *)list->next; list != (dl_list *)iface;
iface = (interfaces *)iface->list.next) {
if (!strcmp(iface->dbus_interface, dbus_interface))
return iface;
}
ifacea ... | static struct interfaces *add_interface(struct dl_list *list,
const char *dbus_interface) {
struct interfaces *iface;
dl_list_for_each(iface, list, struct interfaces, list) {
if (os_strcmp(iface->dbus_interface, dbus_interface) == 0)
return iface;
}
iface = os... | add_interface | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void add_interfaces(dl_list *list, wpabuf *xml) {
size_t v2;
int v3;
int v4;
interfaces *iface;
interfaces *n;
iface = (interfaces *)list->next;
n = (interfaces *)list->next->next;
while (list != (dl_list *)iface) {
v2 = wpabuf_len_68(iface->xml) + 20;
if (v2 >= wpabuf_tailroom_6(xml)) {
... | static void add_interfaces(struct dl_list *list, struct wpabuf *xml) {
struct interfaces *iface, *n;
dl_list_for_each_safe(iface, n, list, struct interfaces, list) {
if (wpabuf_len(iface->xml) + 20 < wpabuf_tailroom(xml)) {
wpabuf_put_buf(xml, iface->xml);
wpabuf_put_str(xml, "</interface>");
}... | add_interfaces | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void add_introspectable_interface(wpabuf *xml) {
wpabuf_printf(xml,
"<interface name=\"%s\"><method name=\"%s\"><arg name=\"data\" "
"type=\"s\" direction=\"out\"/></method></interface>",
"org.freedesktop.DBus.Introspectable", "Introspect");
} | static void add_introspectable_interface(struct wpabuf *xml) {
wpabuf_printf(xml,
"<interface name=\"%s\">"
"<method name=\"%s\">"
"<arg name=\"data\" type=\"s\" direction=\"out\"/>"
"</method>"
"</interface>",
WPA_DBUS_IN... | add_introspectable_interface | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
size_t add_multi_ap_ie(u8 *buf, size_t len, u8 value) {
if (len <= 8)
return 0;
*buf = -35;
buf[1] = 7;
WPA_PUT_BE24_12(buf + 2, 0x506F9Au);
buf[5] = 27;
buf[6] = 6;
buf[7] = 1;
buf[8] = value;
return 9;
} | size_t add_multi_ap_ie(u8 *buf, size_t len, u8 value) {
u8 *pos = buf;
if (len < 9)
return 0;
*pos++ = WLAN_EID_VENDOR_SPECIFIC;
*pos++ = 7;
WPA_PUT_BE24(pos, OUI_WFA);
pos += 3;
*pos++ = MULTI_AP_OUI_TYPE;
*pos++ = MULTI_AP_SUB_ELEM_TYPE;
*pos++ = 1;
*pos++ = value;
return pos - buf;
} | add_multi_ap_ie | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void add_properties_interface(wpabuf *xml) {
wpabuf_printf(xml, "<interface name=\"%s\">",
"org.freedesktop.DBus.Properties");
wpabuf_printf(xml, "<method name=\"%s\">", "Get");
add_arg(xml, "interface", "s", "in");
add_arg(xml, "propname", "s", "in");
add_arg(xml, "value", "v", "out");
wpab... | static void add_properties_interface(struct wpabuf *xml) {
wpabuf_printf(xml, "<interface name=\"%s\">", WPA_DBUS_PROPERTIES_INTERFACE);
wpabuf_printf(xml, "<method name=\"%s\">", WPA_DBUS_PROPERTIES_GET);
add_arg(xml, "interface", "s", "in");
add_arg(xml, "propname", "s", "in");
add_arg(xml, "value", "v", "... | add_properties_interface | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void add_property(wpabuf *xml, const wpa_dbus_property_desc *dsc) {
const char *v2;
const char *v3;
if (dsc->setter)
v2 = "write";
else
v2 = (const char *)&unk_295E8D;
if (dsc->getter)
v3 = "read";
else
v3 = (const char *)&unk_295E8D;
wpabuf_printf(xml, "<property name=\"%s\" type=\"%s\" ... | static void add_property(struct wpabuf *xml,
const struct wpa_dbus_property_desc *dsc) {
wpabuf_printf(xml,
"<property name=\"%s\" type=\"%s\" "
"access=\"%s%s\"/>",
dsc->dbus_property, dsc->type, dsc->getter ? "read" : "",
dsc->... | add_property | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void add_survey(nlattr **sinfo, u32 ifidx, dl_list *survey_list) {
freq_survey *survey;
survey = (freq_survey *)os_zalloc(0x48u);
if (survey) {
survey->ifidx = ifidx;
survey->freq = nla_get_u32(sinfo[1]);
survey->filled = 0;
if (sinfo[2]) {
survey->nf = nla_get_u8(sinfo[2]);
survey->f... | static void add_survey(struct nlattr **sinfo, u32 ifidx,
struct dl_list *survey_list) {
struct freq_survey *survey;
survey = os_zalloc(sizeof(struct freq_survey));
if (!survey)
return;
survey->ifidx = ifidx;
survey->freq = nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]);
surve... | add_survey | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dbus_bool_t add_timeout(DBusTimeout *timeout, void *data) {
unsigned int v3;
if ((unsigned int)dbus_timeout_get_enabled(timeout)) {
v3 = 1000 * dbus_timeout_get_interval(timeout);
eloop_register_timeout(0, v3, (eloop_timeout_handler)process_timeout, data,
timeout);
dbus_timeo... | static dbus_bool_t add_timeout(DBusTimeout *timeout, void *data) {
struct wpas_dbus_priv *priv = data;
if (!dbus_timeout_get_enabled(timeout))
return TRUE;
eloop_register_timeout(0, dbus_timeout_get_interval(timeout) * 1000,
process_timeout, priv, timeout);
dbus_timeout_set_data(... | add_timeout | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dbus_bool_t add_watch(DBusWatch *watch, void *data) {
char flags;
int fd;
if (!(unsigned int)dbus_watch_get_enabled(watch))
return 1;
flags = dbus_watch_get_flags(watch);
fd = dbus_watch_get_unix_fd(watch);
if (eloop_register_sock(fd, EVENT_TYPE_EXCEPTION,
(eloop_sock_handler)... | static dbus_bool_t add_watch(DBusWatch *watch, void *data) {
struct wpas_dbus_priv *priv = data;
unsigned int flags;
int fd;
if (!dbus_watch_get_enabled(watch))
return TRUE;
flags = dbus_watch_get_flags(watch);
fd = dbus_watch_get_unix_fd(watch);
if (eloop_register_sock(fd, EVENT_TYPE_EXCEPTION, pr... | add_watch | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void add_wpas_interfaces(wpabuf *xml, wpa_dbus_object_desc *obj_dsc) {
dl_list ifaces;
unsigned long v3;
v3 = __readfsqword(0x28u);
dl_list_init_14(&ifaces);
extract_interfaces(&ifaces, obj_dsc);
add_interfaces(&ifaces, xml);
} | static void add_wpas_interfaces(struct wpabuf *xml,
struct wpa_dbus_object_desc *obj_dsc) {
struct dl_list ifaces;
dl_list_init(&ifaces);
extract_interfaces(&ifaces, obj_dsc);
add_interfaces(&ifaces, xml);
} | add_wpas_interfaces | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int additional_roaming_consortiums(wpa_bss *bss) {
const u8 *ie;
ie = wpa_bss_get_ie(bss, 0x6Fu);
if (ie && ie[1])
return ie[2];
else
return 0;
} | static int additional_roaming_consortiums(struct wpa_bss *bss) {
const u8 *ie;
ie = wpa_bss_get_ie(bss, WLAN_EID_ROAMING_CONSORTIUM);
if (ie == NULL || ie[1] == 0)
return 0;
return ie[2];
} | additional_roaming_consortiums | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int addr_in_list(const u8 *addr, const u8 *list, size_t num) {
size_t i;
for (i = 0; i < num; ++i) {
if (match_mac_mask(&list[12 * i], addr, &list[12 * i + 6]))
return 1;
}
return 0;
} | static int addr_in_list(const u8 *addr, const u8 *list, size_t num) {
size_t i;
for (i = 0; i < num; i++) {
const u8 *a = list + i * ETH_ALEN * 2;
const u8 *m = a + ETH_ALEN;
if (match_mac_mask(a, addr, m))
return 1;
}
return 0;
} | addr_in_list | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
char *alloc_int_str(int val) {
int res;
char *buf;
buf = (char *)malloc(0x14u);
if (!buf)
return 0;
res = snprintf(buf, 0x14u, "%d", val);
if (os_snprintf_error(0x14u, res)) {
free(buf);
return 0;
}
return buf;
} | static char *alloc_int_str(int val) {
const unsigned int bufsize = 20;
char *buf;
int res;
buf = os_malloc(bufsize);
if (buf == NULL)
return NULL;
res = os_snprintf(buf, bufsize, "%d", val);
if (os_snprintf_error(bufsize, res)) {
os_free(buf);
buf = NULL;
}
return buf;
} | alloc_int_str | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
char *alloc_strdup(const char *str) {
if (str)
return strdup(str);
else
return 0;
} | static char *alloc_strdup(const char *str) {
if (str == NULL)
return NULL;
return os_strdup(str);
} | alloc_strdup | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *allocate_scs_buf(scs_desc_elem *desc_elem, unsigned int num_scs_desc) {
unsigned int i;
unsigned int j;
size_t buf_len;
const tclas_element *tclas_elem;
wpabuf *buf;
size_t elen;
buf_len = 3;
for (i = 0; i < num_scs_desc; ++i) {
buf_len += 4LL;
if (desc_elem->request_type != scs_request... | static struct wpabuf *allocate_scs_buf(struct scs_desc_elem *desc_elem,
unsigned int num_scs_desc) {
struct wpabuf *buf;
size_t buf_len = 0;
unsigned int i, j;
buf_len = 3;
for (i = 0; i < num_scs_desc; i++, desc_elem++) {
struct tclas_element *tclas_elem;
buf... | allocate_scs_buf | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
chan_allowed allow_channel(hostapd_hw_modes *mode, u8 op_class, u8 chan,
unsigned int *flags) {
bool v4;
bool v5;
bool is_6ghz;
int i;
v4 = op_class > 0x82u && op_class <= 0x88u;
is_6ghz = v4;
for (i = 0; i < mode->num_channels; ++i) {
v5 = mode->channels[i].freq > 5934 && ... | static enum chan_allowed allow_channel(struct hostapd_hw_modes *mode,
u8 op_class, u8 chan,
unsigned int *flags) {
int i;
bool is_6ghz = op_class >= 131 && op_class <= 136;
for (i = 0; i < mode->num_channels; i++) {
bool chan_is_6g... | allow_channel | 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.