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 eloop_register_timeout(unsigned int secs, unsigned int usecs,
eloop_timeout_handler handler, void *eloop_data,
void *user_data) {
eloop_timeout *tmp;
eloop_timeout *timeout;
os_time_t now_sec;
timeout = (eloop_timeout *)os_zalloc(0x38u);
if (!timeout)... | int eloop_register_timeout(unsigned int secs, unsigned int usecs,
eloop_timeout_handler handler, void *eloop_data,
void *user_data) {
struct eloop_timeout *timeout, *tmp;
os_time_t now_sec;
timeout = os_zalloc(sizeof(*timeout));
if (timeout == NULL)
ret... | eloop_register_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void eloop_remove_timeout(eloop_timeout *timeout) {
dl_list_del_6(&timeout->list);
free(timeout);
} | static void eloop_remove_timeout(struct eloop_timeout *timeout) {
dl_list_del(&timeout->list);
wpa_trace_remove_ref(timeout, eloop, timeout->eloop_data);
wpa_trace_remove_ref(timeout, user, timeout->user_data);
os_free(timeout);
} | eloop_remove_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int eloop_replenish_timeout(unsigned int req_secs, unsigned int req_usecs,
eloop_timeout_handler handler, void *eloop_data,
void *user_data) {
eloop_timeout *tmp;
os_reltime now;
os_reltime requested;
os_reltime remaining;
unsigned long v13;
v13 = __r... | int eloop_replenish_timeout(unsigned int req_secs, unsigned int req_usecs,
eloop_timeout_handler handler, void *eloop_data,
void *user_data) {
struct os_reltime now, requested, remaining;
struct eloop_timeout *tmp;
dl_list_for_each(tmp, &eloop.timeout, stru... | eloop_replenish_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void eloop_run() {
dl_list *next;
int *v1;
char *v2;
dl_list *v3;
int timeout_ms;
int res;
eloop_timeout *timeout;
eloop_timeout *timeouta;
void *eloop_data;
void *user_data;
eloop_timeout_handler handler;
os_reltime tv;
os_reltime now;
unsigned long v13;
v13 = __readfsqword(0x28u);
tim... | void eloop_run(void) {
#ifdef CONFIG_ELOOP_POLL
int num_poll_fds;
int timeout_ms = 0;
#endif
#ifdef CONFIG_ELOOP_SELECT
fd_set *rfds, *wfds, *efds;
struct timeval _tv;
#endif
#ifdef CONFIG_ELOOP_EPOLL
int timeout_ms = -1;
#endif
#ifdef CONFIG_ELOOP_KQUEUE
struct timespec ts;
#endif
int res;
struct os_re... | eloop_run | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int eloop_sock_table_add_sock(eloop_sock_table *table, int sock,
eloop_sock_handler handler, void *eloop_data,
void *user_data) {
size_t v6;
int *v7;
char *v8;
int new_max_sock;
size_t next;
eloop_sock *temp_table;
epoll_event *temp_events;
elo... | static int eloop_sock_table_add_sock(struct eloop_sock_table *table, int sock,
eloop_sock_handler handler,
void *eloop_data, void *user_data) {
#ifdef CONFIG_ELOOP_EPOLL
struct epoll_event *temp_events;
#endif
#ifdef CONFIG_ELOOP_KQUEUE
struc... | eloop_sock_table_add_sock | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void encrypt_ms_key(const u8 *key, size_t key_len, u16 salt,
const u8 *req_authenticator, const u8 *secret,
size_t secret_len, u8 *ebuf, size_t *elen) {
size_t v8;
u8 *v9;
int i;
int len;
int first;
u8 *pos;
const u8 *addr[3];
size_t _len[3];
u8 saltbuf[2];
u8... | static void encrypt_ms_key(const u8 *key, size_t key_len, u16 salt,
const u8 *req_authenticator, const u8 *secret,
size_t secret_len, u8 *ebuf, size_t *elen) {
int i, len, first = 1;
u8 hash[MD5_MAC_LEN], saltbuf[2], *pos;
const u8 *addr[3];
size_t _len[3];
... | encrypt_ms_key | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int encrypt_pw_block_with_password_hash(const u8 *password, size_t password_len,
const u8 *password_hash, u8 *pw_block) {
size_t ucs2_len;
size_t offset;
u8 *pos;
unsigned long v10;
v10 = __readfsqword(0x28u);
memset(pw_block, 0, 0x204u);
if (utf8_to_ucs2(password,... | int encrypt_pw_block_with_password_hash(const u8 *password, size_t password_len,
const u8 *password_hash, u8 *pw_block) {
size_t ucs2_len, offset;
u8 *pos;
os_memset(pw_block, 0, PWBLOCK_LEN);
if (utf8_to_ucs2(password, password_len, pw_block, 512, &ucs2_len) < 0 ||
... | encrypt_pw_block_with_password_hash | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int erp_parse_tlvs(const u8 *pos, const u8 *end, erp_tlvs *tlvs,
int stop_at_keyname) {
const u8 *v4;
u8 *v6;
const u8 *v7;
const u8 *posb;
const u8 *posc;
const u8 *posd;
u8 tlv_type;
u8 tlv_len;
memset(tlvs, 0, sizeof(erp_tlvs));
while (pos < end) {
v4 = pos;
posb = pos... | int erp_parse_tlvs(const u8 *pos, const u8 *end, struct erp_tlvs *tlvs,
int stop_at_keyname) {
os_memset(tlvs, 0, sizeof(*tlvs));
while (pos < end) {
u8 tlv_type, tlv_len;
tlv_type = *pos++;
switch (tlv_type) {
case EAP_ERP_TV_RRK_LIFETIME:
case EAP_ERP_TV_RMSK_LIFETIME:
... | erp_parse_tlvs | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void erp_send_finish_reauth(eap_sm *sm, eap_server_erp_key *erp, u8 id,
u8 flags, u16 seq, const char *nai) {
int cryptosuite;
u8 v7;
size_t v8;
const u8 *v9;
const char *v10;
size_t plen;
size_t hash_len;
wpabuf *msg;
u8 seed[4];
u8 hash[40];
unsigned long v20;
v20 ... | static void erp_send_finish_reauth(struct eap_sm *sm,
struct eap_server_erp_key *erp, u8 id,
u8 flags, u16 seq, const char *nai) {
size_t plen;
struct wpabuf *msg;
u8 hash[SHA256_MAC_LEN];
size_t hash_len;
u8 seed[4];
if (erp) {
swit... | erp_send_finish_reauth | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int error_handler(sockaddr_nl *nla, nlmsgerr *err, void *arg) {
size_t v4;
const char *v5;
const char *v6;
int ack_len;
signed int len;
int lena;
nlmsghdr *nlh;
nlattr *tb[5];
unsigned long v12;
v12 = __readfsqword(0x28u);
nlh = &err[-1].msg;
len = err[-1].msg.nlmsg_len;
ack_len = 36;
*(_DW... | static int error_handler(struct sockaddr_nl *nla, struct nlmsgerr *err,
void *arg) {
struct nlmsghdr *nlh = (struct nlmsghdr *)err - 1;
int len = nlh->nlmsg_len;
struct nlattr *attrs;
struct nlattr *tb[NLMSGERR_ATTR_MAX + 1];
int *ret = arg;
int ack_len = sizeof(*nlh) + sizeof(int) ... | error_handler | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void eth_p_oui_deliver(eth_p_oui_ctx *ctx, const u8 *src_addr,
const u8 *dst_addr, const u8 *buf, size_t len) {
ctx->rx_callback(ctx->rx_callback_ctx, src_addr, dst_addr, ctx->oui_suffix,
buf, len);
} | void eth_p_oui_deliver(struct eth_p_oui_ctx *ctx, const u8 *src_addr,
const u8 *dst_addr, const u8 *buf, size_t len) {
ctx->rx_callback(ctx->rx_callback_ctx, src_addr, dst_addr, ctx->oui_suffix,
buf, len);
} | eth_p_oui_deliver | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
eth_p_oui_ctx *eth_p_oui_register(
hostapd_data *hapd, const char *ifname, u8 oui_suffix,
void (*rx_callback)(void *, const u8 *, const u8 *, u8, const u8 *, size_t),
void *rx_callback_ctx) {
int found;
eth_p_oui_iface *iface;
eth_p_oui_ctx *receiver;
hapd_interfaces *interfaces;
found = 0;
rec... | struct eth_p_oui_ctx *eth_p_oui_register(
struct hostapd_data *hapd, const char *ifname, u8 oui_suffix,
void (*rx_callback)(void *ctx, const u8 *src_addr, const u8 *dst_addr,
u8 oui_suffix, const u8 *buf, size_t len),
void *rx_callback_ctx) {
struct eth_p_oui_iface *iface;
struct... | eth_p_oui_register | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int eth_p_oui_send(eth_p_oui_ctx *ctx, const u8 *src_addr, const u8 *dst_addr,
const u8 *buf, size_t len) {
int ret;
eth_p_oui_iface *iface;
size_t packet_len;
u8 *packet;
iface = ctx->iface;
packet_len = len + 20;
packet = (u8 *)os_zalloc(len + 20);
if (!packet)
return -1;
mem... | int eth_p_oui_send(struct eth_p_oui_ctx *ctx, const u8 *src_addr,
const u8 *dst_addr, const u8 *buf, size_t len) {
struct eth_p_oui_iface *iface = ctx->iface;
u8 *packet, *p;
size_t packet_len;
int ret;
struct l2_ethhdr *ethhdr;
packet_len = sizeof(*ethhdr) + sizeof(global_oui) + 1 + len... | eth_p_oui_send | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void eth_p_oui_unregister(eth_p_oui_ctx *ctx) {
eth_p_oui_iface *iface;
if (ctx) {
iface = ctx->iface;
dl_list_del_9(&ctx->list);
free(ctx);
if (dl_list_empty_6(&iface->receiver)) {
dl_list_del_9(&iface->list);
l2_packet_deinit(iface->l2);
free(iface);
}
}
} | void eth_p_oui_unregister(struct eth_p_oui_ctx *ctx) {
struct eth_p_oui_iface *iface;
if (!ctx)
return;
iface = ctx->iface;
dl_list_del(&ctx->list);
os_free(ctx);
if (dl_list_empty(&iface->receiver)) {
dl_list_del(&iface->list);
l2_packet_deinit(iface->l2);
os_free(iface);
}
} | eth_p_oui_unregister | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void eth_p_rx(void *ctx, const u8 *src_addr, const u8 *buf, size_t len) {
size_t lena;
size_t lenb;
const u8 *bufa;
const u8 *bufb;
eth_p_oui_ctx *receiver;
if (len > 0x13) {
bufa = buf + 14;
lena = len - 14;
if (!memcmp(buf + 14, global_oui, 5u)) {
bufb = bufa + 5;
lenb = lena - 5;... | static void eth_p_rx(void *ctx, const u8 *src_addr, const u8 *buf, size_t len) {
struct eth_p_oui_iface *iface = ctx;
struct eth_p_oui_ctx *receiver;
const struct l2_ethhdr *ethhdr;
if (len < sizeof(*ethhdr) + sizeof(global_oui) + 1) {
return;
}
ethhdr = (struct l2_ethhdr *)buf;
buf += sizeof(*eth... | eth_p_rx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void event_addr_failure(wps_event_ *e) {
subscription *s;
s = e->s;
wpa_printf(2, "WPS UPnP: Failed to send event %p to %s (num_failures=%u)", e,
e->addr->domain_and_port, ++e->addr->num_failures);
if (e->addr->num_failures > 9) {
wpa_printf(2, "WPS UPnP: Deleting subscription %p address %s du... | static void event_addr_failure(struct wps_event_ *e) {
struct subscription *s = e->s;
e->addr->num_failures++;
wpa_printf(MSG_DEBUG,
"WPS UPnP: Failed to send event %p to %s "
"(num_failures=%u)",
e, e->addr->domain_and_port, e->addr->num_failures);
if (e->addr->num_fail... | event_addr_failure | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *event_build_message(wps_event_ *e) {
size_t v1;
size_t v2;
size_t v4;
int v5;
wpabuf *buf;
char *b;
v1 = strlen(e->addr->path);
v2 = wpabuf_len_49(e->data);
buf = wpabuf_alloc(v1 + v2 + 1000);
if (!buf)
return 0;
wpabuf_printf(buf, "NOTIFY %s HTTP/1.1\r\n", e->addr->path);
wpabuf_pu... | static struct wpabuf *event_build_message(struct wps_event_ *e) {
struct wpabuf *buf;
char *b;
buf = wpabuf_alloc(1000 + os_strlen(e->addr->path) + wpabuf_len(e->data));
if (buf == NULL)
return NULL;
wpabuf_printf(buf, "NOTIFY %s HTTP/1.1\r\n", e->addr->path);
wpabuf_put_str(buf, "SERVER: Unspecified, ... | event_build_message | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void event_clean(wps_event_ *e) {
if (e == e->s->current_event)
e->s->current_event = 0;
http_client_free(e->http_event);
e->http_event = 0;
} | static void event_clean(struct wps_event_ *e) {
if (e->s->current_event == e)
e->s->current_event = NULL;
http_client_free(e->http_event);
e->http_event = NULL;
} | event_clean | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void event_delete(wps_event_ *e) {
wpa_printf(2, "WPS UPnP: Delete event %p", e);
event_clean(e);
wpabuf_free(e->data);
free(e);
} | static void event_delete(struct wps_event_ *e) {
wpa_printf(MSG_DEBUG, "WPS UPnP: Delete event %p", e);
event_clean(e);
wpabuf_free(e->data);
os_free(e);
} | event_delete | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wps_event_ *event_dequeue(subscription *s) {
dl_list *next;
wps_event_ *e;
if (dl_list_empty_12(&s->event_queue))
next = 0;
else
next = s->event_queue.next;
e = (wps_event_ *)next;
if (next) {
wpa_printf(2, "WPS UPnP: Dequeue event %p for subscription %p", next, s);
dl_list_del_15(&e->list)... | static struct wps_event_ *event_dequeue(struct subscription *s) {
struct wps_event_ *e;
e = dl_list_first(&s->event_queue, struct wps_event_, list);
if (e) {
wpa_printf(MSG_DEBUG,
"WPS UPnP: Dequeue event %p for "
"subscription %p",
e, s);
dl_list_del(&e->list)... | event_dequeue | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void event_http_cb(void *ctx, http_client *c, http_client_event event) {
subscription *s;
s = (subscription *)*((_QWORD *)ctx + 2);
wpa_printf(2, "WPS UPnP: HTTP client callback: e=%p c=%p event=%d", ctx, c,
event);
if (event == http_client_event_HTTP_CLIENT_INVALID_REPLY) {
wpa_printf(2, "WPS... | static void event_http_cb(void *ctx, struct http_client *c,
enum http_client_event event) {
struct wps_event_ *e = ctx;
struct subscription *s = e->s;
wpa_printf(MSG_DEBUG,
"WPS UPnP: HTTP client callback: e=%p c=%p "
"event=%d",
e, c, event);
sw... | event_http_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void event_retry(wps_event_ *e, int do_next_address) {
unsigned int retry;
subscription *s;
upnp_wps_device_sm *sm;
s = e->s;
sm = s->sm;
wpa_printf(2, "WPS UPnP: Retry event %p for subscription %p", e, s);
event_clean(e);
if (do_next_address)
wpa_printf(2, "WPS UPnP: Try address %d", ++e->retry);
... | static void event_retry(struct wps_event_ *e, int do_next_address) {
struct subscription *s = e->s;
struct upnp_wps_device_sm *sm = s->sm;
wpa_printf(MSG_DEBUG, "WPS UPnP: Retry event %p for subscription %p", e, s);
event_clean(e);
if (do_next_address) {
e->retry++;
wpa_printf(MSG_DEBUG, "WPS UPnP: ... | event_retry | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void event_send_all_later_handler(void *eloop_data, void *user_ctx) {
int nerrors;
subscription *s;
subscription *tmp;
nerrors = 0;
*((_DWORD *)user_ctx + 44) = 0;
s = (subscription *)*((_QWORD *)user_ctx + 20);
tmp = (subscription *)s->list.next;
while (s != (subscription *)((char *)user_ctx + 160)) {... | static void event_send_all_later_handler(void *eloop_data, void *user_ctx) {
struct upnp_wps_device_sm *sm = user_ctx;
struct subscription *s, *tmp;
int nerrors = 0;
sm->event_send_all_queued = 0;
dl_list_for_each_safe(s, tmp, &sm->subscriptions, struct subscription, list) {
if (s->current_event == NULL ... | event_send_all_later_handler | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int event_send_start(subscription *s) {
unsigned int v2;
unsigned int itry;
wps_event_ *e;
wpabuf *buf;
if (dl_list_empty_12(&s->addr_list) || s->current_event ||
dl_list_empty_12(&s->event_queue))
return -1;
e = event_dequeue(s);
s->current_event = e;
itry = 0;
for (e->addr = (subscr_addr ... | static int event_send_start(struct subscription *s) {
struct wps_event_ *e;
unsigned int itry;
struct wpabuf *buf;
if (dl_list_empty(&s->addr_list) || s->current_event ||
dl_list_empty(&s->event_queue))
return -1;
s->current_event = e = event_dequeue(s);
itry = 0;
dl_list_for_each(e->addr, &s... | event_send_start | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *event_to_string(wpa_event_type event) {
const char *result;
switch (event) {
case wpa_event_type_EVENT_ASSOC:
result = "ASSOC";
break;
case wpa_event_type_EVENT_DISASSOC:
result = "DISASSOC";
break;
case wpa_event_type_EVENT_MICHAEL_MIC_FAILURE:
result = "MICHAEL_MIC_FAILURE";... | const char *event_to_string(enum wpa_event_type event) {
#define E2S(n) \
case EVENT_##n: \
return #n
switch (event) {
E2S(ASSOC);
E2S(DISASSOC);
E2S(MICHAEL_MIC_FAILURE);
... | event_to_string | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ext_feature_isset(const u8 *ext_features, int ext_features_len,
nl80211_ext_feature_index ftidx) {
nl80211_ext_feature_index v3;
int v4;
v3 = ftidx;
v4 = ftidx + 7;
if (v3 < nl80211_ext_feature_index_NL80211_EXT_FEATURE_VHT_IBSS)
v3 = v4;
return ext_features_len > v3 >> 3 &&
... | static int ext_feature_isset(const u8 *ext_features, int ext_features_len,
enum nl80211_ext_feature_index ftidx) {
u8 ft_byte;
if ((int)ftidx / 8 >= ext_features_len)
return 0;
ft_byte = ext_features[ftidx / 8];
return (ft_byte & BIT(ftidx % 8)) != 0;
} | ext_feature_isset | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int family_handler(nl_msg *msg, void *arg) {
long v2;
unsigned int v3;
long v4;
unsigned int v6;
long v7;
size_t v8;
const char *group;
const char *v10;
int u32;
int i;
nlattr *mcgrp;
family_data *res;
genlmsghdr *gnlh;
nlattr *tb2[3];
nlattr *tb[11];
unsigned long v18;
v18 = __readfs... | static int family_handler(struct nl_msg *msg, void *arg) {
struct family_data *res = arg;
struct nlattr *tb[CTRL_ATTR_MAX + 1];
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct nlattr *mcgrp;
int i;
nla_parse(tb, CTRL_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NU... | family_handler | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *fc2str(u16 fc) {
int v1;
const char *result;
u16 stype;
stype = ((int)fc >> 4) & 0xF;
v1 = ((int)fc >> 2) & 3;
if (v1 == 2) {
switch (stype) {
case 0u:
result = "WLAN_FC_STYPE_DATA";
break;
case 1u:
result = "WLAN_FC_STYPE_DATA_CFACK";
break;
case 2u:
... | const char *fc2str(u16 fc) {
u16 stype = WLAN_FC_GET_STYPE(fc);
#define C2S(x) \
case x: \
return #x;
switch (WLAN_FC_GET_TYPE(fc)) {
case WLAN_FC_TYPE_MGMT:
switch (styp... | fc2str | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
subscription *find_er(upnp_wps_device_sm *sm, sockaddr_in *cli) {
subscription *s;
for (s = (subscription *)sm->subscriptions.next;
s != (subscription *)&sm->subscriptions;
s = (subscription *)s->list.next) {
if (find_er_addr(s, cli))
return s;
}
return 0;
} | static struct subscription *find_er(struct upnp_wps_device_sm *sm,
struct sockaddr_in *cli) {
struct subscription *s;
dl_list_for_each(s, &sm->subscriptions, struct subscription,
list) if (find_er_addr(s, cli)) return s;
return NULL;
} | find_er | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int find_er_addr(subscription *s, sockaddr_in *cli) {
subscr_addr *a;
for (a = (subscr_addr *)s->addr_list.next; a != (subscr_addr *)&s->addr_list;
a = (subscr_addr *)a->list.next) {
if (cli->sin_addr.s_addr == a->saddr.sin_addr.s_addr)
return 1;
}
return 0;
} | static int find_er_addr(struct subscription *s, struct sockaddr_in *cli) {
struct subscr_addr *a;
dl_list_for_each(a, &s->addr_list, struct subscr_addr, list) {
if (cli->sin_addr.s_addr == a->saddr.sin_addr.s_addr)
return 1;
}
return 0;
} | find_er_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fips186_2_prf(const u8 *seed, size_t seed_len, u8 *x, size_t xlen) {
size_t seed_lena;
int i;
int j;
int k;
u32 carry;
u32 carrya;
u32 _t[8];
u8 xkey[72];
unsigned long v15;
seed_lena = seed_len;
v15 = __readfsqword(0x28u);
if (seed_len > 0x3F)
seed_lena = 64;
else
memset(&xkey[se... | int fips186_2_prf(const u8 *seed, size_t seed_len, u8 *x, size_t xlen) {
u8 xkey[64];
u32 t[5], _t[5];
int i, j, m, k;
u8 *xpos = x;
u32 carry;
if (seed_len < sizeof(xkey))
os_memset(xkey + seed_len, 0, sizeof(xkey) - seed_len);
else
seed_len = sizeof(xkey);
os_memcpy(xkey, seed, seed_len);
... | fips186_2_prf | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void format_date(wpabuf *buf) {
time_t t;
const char *weekday_str;
const char *month_str;
tm *date;
unsigned long v5;
v5 = __readfsqword(0x28u);
weekday_str = "Sun";
month_str = "Jan";
t = time(0);
date = gmtime(&t);
if (date)
wpabuf_printf(buf, "%s, %02d %s %d %02d:%02d:%02d GMT",
... | void format_date(struct wpabuf *buf) {
const char *weekday_str = "Sun\0Mon\0Tue\0Wed\0Thu\0Fri\0Sat";
const char *month_str = "Jan\0Feb\0Mar\0Apr\0May\0Jun\0"
"Jul\0Aug\0Sep\0Oct\0Nov\0Dec";
struct tm *date;
time_t t;
t = time(NULL);
date = gmtime(&t);
if (date == NULL)
retu... | format_date | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
bool format_session_state_extra(const fst_event_extra *extra, char *buffer,
size_t size) {
fst_reason reason;
fst_initiator v5;
const char *v6;
int v7;
const char *initiator;
char reject_str[40];
unsigned long v11;
v11 = __readfsqword(0x28u);
*(_QWORD *)reject_str = 11... | static bool format_session_state_extra(const union fst_event_extra *extra,
char *buffer, size_t size) {
int len;
char reject_str[32] = FST_CTRL_PVAL_NONE;
const char *initiator = FST_CTRL_PVAL_NONE;
const struct fst_event_extra_session_state *ss;
ss = &extra->session_st... | format_session_state_extra | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void format_wps_device_xml(upnp_wps_device_interface *iface,
upnp_wps_device_sm *sm, wpabuf *buf) {
char *friendly_name;
char *manufacturer;
char *model_name;
int v6;
char *s;
char *sa;
char *sb;
char uuid_string[88];
unsigned long v12;
v12 = __readfsqword(0x28u);
wpabu... | static void format_wps_device_xml(struct upnp_wps_device_interface *iface,
struct upnp_wps_device_sm *sm,
struct wpabuf *buf) {
const char *s;
char uuid_string[80];
wpabuf_put_str(buf, wps_device_xml_prefix);
s = iface->wps->friendly_name;
... | format_wps_device_xml | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void free_beacon_data(beacon_data *beacon) {
free(beacon->head);
beacon->head = 0;
free(beacon->tail);
beacon->tail = 0;
free(beacon->probe_resp);
beacon->probe_resp = 0;
free(beacon->beacon_ies);
beacon->beacon_ies = 0;
free(beacon->proberesp_ies);
beacon->proberesp_ies = 0;
free(beacon->assocres... | static void free_beacon_data(struct beacon_data *beacon) {
os_free(beacon->head);
beacon->head = NULL;
os_free(beacon->tail);
beacon->tail = NULL;
os_free(beacon->probe_resp);
beacon->probe_resp = NULL;
os_free(beacon->beacon_ies);
beacon->beacon_ies = NULL;
os_free(beacon->proberesp_ies);
beacon->p... | free_beacon_data | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int freq_included(const unsigned int *freqs, unsigned int num,
unsigned int freq) {
while (num) {
if (freq == freqs[--num])
return 1;
}
return 0;
} | static int freq_included(const unsigned int freqs[], unsigned int num,
unsigned int freq) {
while (num > 0) {
if (freqs[--num] == freq)
return 1;
}
return 0;
} | freq_included | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int freq_range_list_parse(wpa_freq_range_list *res, const char *value) {
unsigned int count;
wpa_freq_range *freq;
wpa_freq_range *n;
char *pos2;
char *pos3;
freq = 0;
count = 0;
while (value && *value) {
if (count == -1 ||
(n = (wpa_freq_range *)os_realloc_array_5(freq, count + 1, 8u)) == ... | int freq_range_list_parse(struct wpa_freq_range_list *res, const char *value) {
struct wpa_freq_range *freq = NULL, *n;
unsigned int count = 0;
const char *pos, *pos2, *pos3;
pos = value;
while (pos && pos[0]) {
if (count == UINT_MAX) {
os_free(freq);
return -1;
}
n = os_realloc_array... | freq_range_list_parse | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
char *freq_range_list_str(const wpa_freq_range_list *list) {
const char *v2;
int v3;
const char *v4;
unsigned int i;
int res;
char *pos;
size_t maxlen;
char *buf;
char *end;
wpa_freq_range *range;
if (!list->num)
return 0;
maxlen = 30 * list->num;
buf = (char *)malloc(maxlen);
if (!buf)... | char *freq_range_list_str(const struct wpa_freq_range_list *list) {
char *buf, *pos, *end;
size_t maxlen;
unsigned int i;
int res;
if (list->num == 0)
return NULL;
maxlen = list->num * 30;
buf = os_malloc(maxlen);
if (buf == NULL)
return NULL;
pos = buf;
end = buf + maxlen;
for (i = 0; ... | freq_range_list_str | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void freq_to_start(unsigned int *freqs, unsigned int num, unsigned int freq) {
unsigned int i;
for (i = 0; i < num && freq != freqs[i]; ++i)
;
if (i) {
if (i < num) {
memmove(freqs + 1, freqs, 4LL * i);
*freqs = freq;
}
}
} | static void freq_to_start(unsigned int freqs[], unsigned int num,
unsigned int freq) {
unsigned int i;
for (i = 0; i < num; i++) {
if (freqs[i] == freq)
break;
}
if (i == 0 || i >= num)
return;
os_memmove(&freqs[1], &freqs[0], i * sizeof(freqs[0]));
freqs[0] = freq;
... | freq_to_start | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void from_unknown_sta(wpa_driver_nl80211_data *drv, u8 *buf, size_t len) {
u16 fc;
wpa_event_data event;
unsigned long v6;
v6 = __readfsqword(0x28u);
if (len > 0x17) {
fc = *(_WORD *)buf;
memset(&event, 0, sizeof(event));
event.disassoc_info.addr = get_hdr_bssid((const ieee80211_hdr *)buf, len);
... | static void from_unknown_sta(struct wpa_driver_nl80211_data *drv, u8 *buf,
size_t len) {
struct ieee80211_hdr *hdr = (void *)buf;
u16 fc;
union wpa_event_data event;
if (len < sizeof(*hdr))
return;
fc = le_to_host16(hdr->frame_control);
os_memset(&event, 0, sizeof(event))... | from_unknown_sta | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
bool fst_are_ifaces_aggregated(fst_iface *iface1, fst_iface *iface2) {
fst_group *group;
group = fst_iface_get_group(iface1);
return group == fst_iface_get_group(iface2);
} | bool fst_are_ifaces_aggregated(struct fst_iface *iface1,
struct fst_iface *iface2) {
return fst_iface_get_group(iface1) == fst_iface_get_group(iface2);
} | fst_are_ifaces_aggregated | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
fst_iface *fst_attach(const char *ifname, const u8 *own_addr,
const fst_wpa_obj *iface_obj, const fst_iface_cfg *cfg) {
const char *id;
const char *v6;
u32 llt;
int priority;
const char *name;
fst_group *v10;
const char *v11;
bool new_group;
fst_group *g;
fst_group *group;
fs... | struct fst_iface *fst_attach(const char *ifname, const u8 *own_addr,
const struct fst_wpa_obj *iface_obj,
const struct fst_iface_cfg *cfg) {
struct fst_group *g;
struct fst_group *group = NULL;
struct fst_iface *iface = NULL;
bool new_group = false;
W... | fst_attach | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_ctrl_iface_mb_info(const u8 *addr, char *buf, size_t buflen) {
unsigned int v3;
unsigned int num;
int ret;
fst_group *g;
fst_iface *f;
num = 0;
ret = 0;
for (g = (fst_group *)&fst_global_groups_list.next[-3];
&g->global_groups_lentry != &fst_global_groups_list;
g = (fst_group *)&g... | int fst_ctrl_iface_mb_info(const u8 *addr, char *buf, size_t buflen) {
struct fst_group *g;
struct fst_iface *f;
unsigned num = 0;
int ret = 0;
foreach_fst_group(g) {
foreach_fst_group_iface(g, f) {
if (fst_iface_is_connected(f, addr, true)) {
ret += print_band(num++, f, addr, buf + ret, bu... | fst_ctrl_iface_mb_info | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_ctrl_iface_notify(fst_iface *f, u32 session_id,
fst_event_type event_type,
const fst_event_extra *extra) {
const char *v4;
int v5;
int v6;
int v7;
int v8;
const char *v9;
void *wpa_obj_ctx;
const char *v11;
const char *v12;
const char *v... | static void fst_ctrl_iface_notify(struct fst_iface *f, u32 session_id,
enum fst_event_type event_type,
const union fst_event_extra *extra) {
struct fst_group *g;
char extra_str[128] = "";
const struct fst_event_extra_session_state *ss;
const st... | fst_ctrl_iface_notify | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_ctrl_iface_notify_peer_state_change(fst_iface *iface, bool connected,
const u8 *peer_addr) {
const char *name;
fst_ctrl_handle *__fst_ctrl_h;
fst_event_extra extra;
unsigned long v7;
v7 = __readfsqword(0x28u);
extra.iface_state.attached = connected;
n... | static void fst_ctrl_iface_notify_peer_state_change(struct fst_iface *iface,
bool connected,
const u8 *peer_addr) {
union fst_event_extra extra;
extra.peer_state.connected = connected;
os_strlcpy(extra.peer_st... | fst_ctrl_iface_notify_peer_state_change | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_ctrl_iface_on_event(fst_event_type event_type, fst_iface *i,
fst_session *s, const fst_event_extra *extra) {
u32 id;
if (s)
id = fst_session_get_id(s);
else
id = -1;
fst_ctrl_iface_notify(i, id, event_type, extra);
} | static void fst_ctrl_iface_on_event(enum fst_event_type event_type,
struct fst_iface *i, struct fst_session *s,
const union fst_event_extra *extra) {
u32 session_id = s ? fst_session_get_id(s) : FST_INVALID_SESSION_ID;
fst_ctrl_iface_notify(i,... | fst_ctrl_iface_on_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_ctrl_iface_on_iface_added(fst_iface *i) {
fst_ctrl_iface_on_iface_state_changed(i, 1);
return 0;
} | static int fst_ctrl_iface_on_iface_added(struct fst_iface *i) {
fst_ctrl_iface_on_iface_state_changed(i, true);
return 0;
} | fst_ctrl_iface_on_iface_added | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_ctrl_iface_on_iface_removed(fst_iface *i) {
fst_ctrl_iface_on_iface_state_changed(i, 0);
} | static void fst_ctrl_iface_on_iface_removed(struct fst_iface *i) {
fst_ctrl_iface_on_iface_state_changed(i, false);
} | fst_ctrl_iface_on_iface_removed | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_ctrl_iface_on_iface_state_changed(fst_iface *i, bool attached) {
const char *name_3;
const char *group_id;
fst_event_extra extra;
unsigned long v5;
v5 = __readfsqword(0x28u);
memset(&extra, 0, sizeof(extra));
extra.iface_state.attached = attached;
name_3 = fst_iface_get_name_3(i);
os_strlcpy... | static void fst_ctrl_iface_on_iface_state_changed(struct fst_iface *i,
bool attached) {
union fst_event_extra extra;
os_memset(&extra, 0, sizeof(extra));
extra.iface_state.attached = attached;
os_strlcpy(extra.iface_state.ifname, fst_iface_get_name(i),
... | fst_ctrl_iface_on_iface_state_changed | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_ctrl_iface_receive(const char *cmd, char *reply, size_t reply_size) {
size_t v3;
bool non_spaces_found;
const fst_ctrl_iface_receive_fst_command *c;
const char *p;
const char *temp;
for (c = commands_0;; ++c) {
if (!c->name)
return snprintf(reply, reply_size, "UNKNOWN FST COMMAND\n");
... | int fst_ctrl_iface_receive(const char *cmd, char *reply, size_t reply_size) {
static const struct fst_command {
const char *name;
unsigned has_param;
int (*process)(const char *group_id, char *buf, size_t buflen);
} commands[] = {{FST_CMD_LIST_GROUPS, 0, list_groups},
{FST_CMD_LIST_IFA... | fst_ctrl_iface_receive | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_detach(fst_iface *iface) {
const char *id;
const char *name;
fst_group *v3;
const char *v4;
fst_ctrl_handle *__fst_ctrl_h;
fst_group *group;
group = fst_iface_get_group(iface);
id = fst_group_get_id(group);
name = fst_iface_get_name(iface);
v3 = fst_iface_get_group(iface);
v4 = fst_group... | void fst_detach(struct fst_iface *iface) {
struct fst_group *group = fst_iface_get_group(iface);
fst_printf_iface(iface, MSG_DEBUG, "iface detached from group %s",
fst_group_get_id(group));
fst_session_global_on_iface_detached(iface);
foreach_fst_ctrl_call(on_iface_removed, iface);
fst_gro... | fst_detach | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_dump_mb_ies(const char *group_id, const char *ifname, wpabuf *mbies) {
const u8 *p;
size_t s;
const multi_band_ie *mbie;
p = (const u8 *)wpabuf_head_76(mbies);
for (s = wpabuf_len_76(mbies); s > 1; s -= mbie->len + 2) {
mbie = (const multi_band_ie *)p;
wpa_printf(4,
"FST: %s: ... | static void fst_dump_mb_ies(const char *group_id, const char *ifname,
struct wpabuf *mbies) {
const u8 *p = wpabuf_head(mbies);
size_t s = wpabuf_len(mbies);
while (s >= 2) {
const struct multi_band_ie *mbie = (const struct multi_band_ie *)p;
WPA_ASSERT(mbie->eid == WLAN_EID_M... | fst_dump_mb_ies | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
unsigned int fst_fill_iface_mb_ies(fst_iface *f, wpabuf *buf) {
u8 v2;
mb_band_id v3;
const u8 *addr;
unsigned int v6;
const u8 *v7;
u8 channel;
int num_modes;
int ret;
mb_band_id b;
hostapd_hw_modes *modes;
const u8 *bssid;
unsigned int bands[6];
unsigned long v17;
v17 = __readfsqword(0x28... | static unsigned fst_fill_iface_mb_ies(struct fst_iface *f, struct wpabuf *buf) {
const u8 *bssid;
bssid = fst_iface_get_bssid(f);
if (bssid) {
enum hostapd_hw_mode hw_mode;
u8 channel;
if (buf) {
fst_iface_get_channel_info(f, &hw_mode, &channel);
fst_fill_mb_ie(buf, bssid, fst_iface_get_... | fst_fill_iface_mb_ies | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_fill_mb_ie(wpabuf *buf, const u8 *bssid, const u8 *own_addr,
mb_band_id band, u8 channel) {
u8 banda;
size_t len;
multi_band_ie *mbie;
banda = band;
len = 24;
if (own_addr)
len = 30;
mbie = (multi_band_ie *)wpabuf_put(buf, len);
memset(mbie, 0, len);
mbie->eid = -98;
... | static void fst_fill_mb_ie(struct wpabuf *buf, const u8 *bssid,
const u8 *own_addr, enum mb_band_id band,
u8 channel) {
struct multi_band_ie *mbie;
size_t len = sizeof(*mbie);
if (own_addr)
len += ETH_ALEN;
mbie = wpabuf_put(buf, len);
os_memset(mbi... | fst_fill_mb_ie | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u32 fst_find_free_session_id() {
bool in_use;
u32 i;
u32 id;
fst_session *s;
id = -1;
for (i = 0; i != -1; ++i) {
in_use = 0;
for (s = (fst_session *)&global_sessions_list.next[-3];
&s->global_sessions_lentry != &global_sessions_list;
s = (fst_session *)&s->global_sessions_lentry.... | static u32 fst_find_free_session_id(void) {
u32 i, id = FST_INVALID_SESSION_ID;
struct fst_session *s;
for (i = 0; i < (u32)-1; i++) {
bool in_use = false;
foreach_fst_session(s) {
if (s->id == global_session_id) {
fst_session_global_inc_id();
in_use = true;
break;
}
... | fst_find_free_session_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
fst_session *fst_find_session_in_progress(const u8 *peer_addr, fst_group *g) {
fst_session *s;
for (s = (fst_session *)&global_sessions_list.next[-3];
&s->global_sessions_lentry != &global_sessions_list;
s = (fst_session *)&s->global_sessions_lentry.next[-3]) {
if (g == s->group &&
(!memc... | static struct fst_session *fst_find_session_in_progress(const u8 *peer_addr,
struct fst_group *g) {
struct fst_session *s;
foreach_fst_session(s) {
if (s->group == g &&
(os_memcmp(s->data.old_peer_addr, peer_addr, ETH_ALEN) == 0 ||
os_mem... | fst_find_session_in_progress | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *fst_get_str_name(unsigned int index, const char **names,
size_t names_size) {
if (names_size > index && names[index])
return names[index];
else
return "UNKNOWN";
} | const char *fst_get_str_name(unsigned index, const char *names[],
size_t names_size) {
if (index >= names_size || !names[index])
return FST_NAME_UNKNOWN;
return names[index];
} | fst_get_str_name | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
fst_ctrl_handle *fst_global_add_ctrl(const fst_ctrl *ctrl) {
void (*deinit)(void);
void (*on_group_deleted)(fst_group *);
void (*on_iface_removed)(fst_iface *);
void (*on_session_removed)(fst_session *);
fst_ctrl_handle *h;
if (!ctrl)
return 0;
h = (fst_ctrl_handle *)os_zalloc(0x58u);
if (!h)
r... | struct fst_ctrl_handle *fst_global_add_ctrl(const struct fst_ctrl *ctrl) {
struct fst_ctrl_handle *h;
if (!ctrl)
return NULL;
h = os_zalloc(sizeof(*h));
if (!h)
return NULL;
if (ctrl->init && ctrl->init()) {
os_free(h);
return NULL;
}
h->ctrl = *ctrl;
dl_list_add_tail(&fst_global_ctr... | fst_global_add_ctrl | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_global_deinit() {
fst_ctrl_handle *v0;
fst_group *group;
if (fst_global_initialized) {
fst_session_global_deinit();
while (1) {
group = fst_first_group();
if (!group)
break;
fst_group_delete(group);
}
while (1) {
v0 = dl_list_empty_16(&fst_global_ctrls_lis... | void fst_global_deinit(void) {
struct fst_group *group;
struct fst_ctrl_handle *h;
if (!fst_global_initialized)
return;
fst_session_global_deinit();
while ((group = fst_first_group()) != NULL)
fst_group_delete(group);
while ((h = dl_list_first(&fst_global_ctrls_list, struct fst_ctrl_handle,
... | fst_global_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_global_del_ctrl(fst_ctrl_handle *h) {
dl_list_del_21(&h->global_ctrls_lentry);
if (h->ctrl.deinit)
h->ctrl.deinit();
free(h);
} | void fst_global_del_ctrl(struct fst_ctrl_handle *h) {
dl_list_del(&h->global_ctrls_lentry);
if (h->ctrl.deinit)
h->ctrl.deinit();
os_free(h);
} | fst_global_del_ctrl | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_global_init() {
dl_list_init_16(&fst_global_groups_list);
dl_list_init_16(&fst_global_ctrls_list);
fst_session_global_init();
fst_global_initialized = 1;
return 0;
} | int fst_global_init(void) {
dl_list_init(&fst_global_groups_list);
dl_list_init(&fst_global_ctrls_list);
fst_session_global_init();
fst_global_initialized = 1;
return 0;
} | fst_global_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u8 fst_group_assign_dialog_token(fst_group *g) {
if (!++g->dialog_token)
++g->dialog_token;
return g->dialog_token;
} | u8 fst_group_assign_dialog_token(struct fst_group *g) {
g->dialog_token++;
if (g->dialog_token == 0)
g->dialog_token++;
return g->dialog_token;
} | fst_group_assign_dialog_token | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u32 fst_group_assign_fsts_id(fst_group *g) { return ++g->fsts_id; } | u32 fst_group_assign_fsts_id(struct fst_group *g) {
g->fsts_id++;
return g->fsts_id;
} | fst_group_assign_fsts_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_group_attach_iface(fst_group *g, fst_iface *i) {
u8 priority;
dl_list *list;
fst_iface *f;
list = &g->ifaces;
for (f = (fst_iface *)&g->ifaces.next[-10].prev;
&f->group_lentry != &g->ifaces;
f = (fst_iface *)&f->group_lentry.next[-10].prev) {
priority = fst_iface_get_priority(f);
... | void fst_group_attach_iface(struct fst_group *g, struct fst_iface *i) {
struct dl_list *list = &g->ifaces;
struct fst_iface *f;
foreach_fst_group_iface(g, f) {
if (fst_iface_get_priority(f) < fst_iface_get_priority(i))
break;
list = &f->group_lentry;
}
dl_list_add(list, &i->group_lentry);
} | fst_group_attach_iface | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
fst_group *fst_group_create(const char *group_id) {
const char *id_0;
fst_ctrl_handle *__fst_ctrl_h;
fst_group *g;
g = (fst_group *)os_zalloc(0x40u);
if (g) {
dl_list_init_17(&g->ifaces);
os_strlcpy(g->group_id, group_id, 0x11u);
dl_list_add_tail_11(&fst_global_groups_list, &g->global_groups_lent... | struct fst_group *fst_group_create(const char *group_id) {
struct fst_group *g;
g = os_zalloc(sizeof(*g));
if (g == NULL) {
fst_printf(MSG_ERROR, "%s: Cannot alloc group", group_id);
return NULL;
}
dl_list_init(&g->ifaces);
os_strlcpy(g->group_id, group_id, sizeof(g->group_id));
dl_list_add_tai... | fst_group_create | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *fst_group_create_mb_ie(fst_group *g, fst_iface *i) {
const char *v2;
fst_group *v3;
const char *v4;
const char *name_0;
fst_group *group_0;
const char *id_0;
const char *v9;
fst_group *v10;
const char *v11;
const char *v12;
const char *v13;
unsigned int nof_mbies;
unsigned int nof_ifac... | static struct wpabuf *fst_group_create_mb_ie(struct fst_group *g,
struct fst_iface *i) {
struct wpabuf *buf;
struct fst_iface *f;
unsigned int nof_mbies = 0;
unsigned int nof_ifaces_added = 0;
foreach_fst_group_iface(g, f) {
if (f == i)
continue;
nof... | fst_group_create_mb_ie | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_group_delete(fst_group *group) {
const char *id_0;
fst_ctrl_handle *__fst_ctrl_h;
fst_session *s;
dl_list_del_22(&group->global_groups_lentry);
for (__fst_ctrl_h = (fst_ctrl_handle *)&fst_global_ctrls_list.next[-5].prev;
&__fst_ctrl_h->global_ctrls_lentry != &fst_global_ctrls_list;
__f... | void fst_group_delete(struct fst_group *group) {
struct fst_session *s;
dl_list_del(&group->global_groups_lentry);
WPA_ASSERT(dl_list_empty(&group->ifaces));
foreach_fst_ctrl_call(on_group_deleted, group);
fst_printf_group(group, MSG_DEBUG, "instance deleted");
while ((s = fst_session_global_get_first_by_g... | fst_group_delete | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
bool fst_group_delete_if_empty(fst_group *group) {
bool v1;
bool is_empty;
v1 = !fst_group_has_ifaces(group) &&
!fst_session_global_get_first_by_group(group);
is_empty = v1;
if (v1)
fst_group_delete(group);
return is_empty;
} | bool fst_group_delete_if_empty(struct fst_group *group) {
bool is_empty = !fst_group_has_ifaces(group) &&
!fst_session_global_get_first_by_group(group);
if (is_empty)
fst_group_delete(group);
return is_empty;
} | fst_group_delete_if_empty | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_group_detach_iface(fst_group *g, fst_iface *i) {
dl_list_del_22(&i->group_lentry);
} | void fst_group_detach_iface(struct fst_group *g, struct fst_iface *i) {
dl_list_del(&i->group_lentry);
} | fst_group_detach_iface | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
fst_iface *fst_group_get_iface_by_name(fst_group *g, const char *ifname) {
size_t v2;
fst_iface *f;
const char *in;
for (f = (fst_iface *)&g->ifaces.next[-10].prev;
&f->group_lentry != &g->ifaces;
f = (fst_iface *)&f->group_lentry.next[-10].prev) {
in = fst_iface_get_name_0(f);
v2 = strle... | struct fst_iface *fst_group_get_iface_by_name(struct fst_group *g,
const char *ifname) {
struct fst_iface *f;
foreach_fst_group_iface(g, f) {
const char *in = fst_iface_get_name(f);
if (os_strncmp(in, ifname, os_strlen(in)) == 0)
return f;
}
return ... | fst_group_get_iface_by_name | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_group_update_ie(fst_group *g) {
const char *name_0;
fst_group *group_0;
const char *id_0;
const char *v4;
fst_group *v5;
const char *v6;
fst_iface *i;
wpabuf *mbie;
for (i = (fst_iface *)&g->ifaces.next[-10].prev;
&i->group_lentry != &g->ifaces;
i = (fst_iface *)&i->group_lentr... | void fst_group_update_ie(struct fst_group *g) {
struct fst_iface *i;
foreach_fst_group_iface(g, i) {
struct wpabuf *mbie = fst_group_create_mb_ie(g, i);
if (!mbie)
fst_printf_iface(i, MSG_WARNING, "cannot create MB IE");
fst_iface_attach_mbie(i, mbie);
fst_iface_set_ies(i, mbie);
fst_pr... | fst_group_update_ie | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_hostapd_fill_iface_obj(hostapd_data *hapd, fst_wpa_obj *iface_obj) {
iface_obj->ctx = hapd;
iface_obj->get_bssid = (const u8 *(*)(void *))fst_hostapd_get_bssid_cb;
iface_obj->get_channel_info = (void (*)(void *, hostapd_hw_mode *,
u8 *))fst_hostapd_get_channel_in... | void fst_hostapd_fill_iface_obj(struct hostapd_data *hapd,
struct fst_wpa_obj *iface_obj) {
iface_obj->ctx = hapd;
iface_obj->get_bssid = fst_hostapd_get_bssid_cb;
iface_obj->get_channel_info = fst_hostapd_get_channel_info_cb;
iface_obj->set_ies = fst_hostapd_set_ies_cb;
iface_... | fst_hostapd_fill_iface_obj | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const u8 *fst_hostapd_get_bssid_cb(void *ctx) { return (const u8 *)ctx + 29; } | static const u8 *fst_hostapd_get_bssid_cb(void *ctx) {
struct hostapd_data *hapd = ctx;
return hapd->own_addr;
} | fst_hostapd_get_bssid_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_hostapd_get_channel_info_cb(void *ctx, hostapd_hw_mode *hw_mode,
u8 *channel) {
*hw_mode =
ieee80211_freq_to_chan(*(_DWORD *)(*(_QWORD *)ctx + 2256LL), channel);
} | static void fst_hostapd_get_channel_info_cb(void *ctx,
enum hostapd_hw_mode *hw_mode,
u8 *channel) {
struct hostapd_data *hapd = ctx;
*hw_mode = ieee80211_freq_to_chan(hapd->iface->freq, channel);
} | fst_hostapd_get_channel_info_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const wpabuf *fst_hostapd_get_mb_ie_cb(void *ctx, const u8 *addr) {
sta_info *sta;
sta = ap_get_sta((hostapd_data *)ctx, addr);
if (sta)
return sta->mb_ies;
else
return 0;
} | static const struct wpabuf *fst_hostapd_get_mb_ie_cb(void *ctx,
const u8 *addr) {
struct hostapd_data *hapd = ctx;
struct sta_info *sta = ap_get_sta(hapd, addr);
return sta ? sta->mb_ies : NULL;
} | fst_hostapd_get_mb_ie_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const u8 *fst_hostapd_get_peer_first(void *ctx, fst_get_peer_ctx **get_ctx,
bool mb_only) {
*get_ctx = (fst_get_peer_ctx *)*((_QWORD *)ctx + 5);
return fst_hostapd_get_sta(get_ctx, mb_only);
} | static const u8 *fst_hostapd_get_peer_first(void *ctx,
struct fst_get_peer_ctx **get_ctx,
bool mb_only) {
struct hostapd_data *hapd = ctx;
*get_ctx = (struct fst_get_peer_ctx *)hapd->sta_list;
return fst_hostapd_get_sta(get_... | fst_hostapd_get_peer_first | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const u8 *fst_hostapd_get_peer_next(void *ctx, fst_get_peer_ctx **get_ctx,
bool mb_only) {
return fst_hostapd_get_sta(get_ctx, mb_only);
} | static const u8 *fst_hostapd_get_peer_next(void *ctx,
struct fst_get_peer_ctx **get_ctx,
bool mb_only) {
return fst_hostapd_get_sta(get_ctx, mb_only);
} | fst_hostapd_get_peer_next | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const u8 *fst_hostapd_get_sta(fst_get_peer_ctx **get_ctx, bool mb_only) {
fst_get_peer_ctx *s;
s = *get_ctx;
if (mb_only) {
while (s && !*((_QWORD *)s + 55))
s = *(fst_get_peer_ctx **)s;
}
if (s) {
*get_ctx = *(fst_get_peer_ctx **)s;
return (const u8 *)s + 16;
} else {
*get_ctx = 0;
... | static const u8 *fst_hostapd_get_sta(struct fst_get_peer_ctx **get_ctx,
bool mb_only) {
struct sta_info *s = (struct sta_info *)*get_ctx;
if (mb_only) {
for (; s && !s->mb_ies; s = s->next)
;
}
if (s) {
*get_ctx = (struct fst_get_peer_ctx *)s->next;
retu... | fst_hostapd_get_sta | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_hostapd_send_action_cb(void *ctx, const u8 *da, wpabuf *buf) {
size_t v3;
const u8 *v4;
v3 = wpabuf_len_0(buf);
v4 = (const u8 *)wpabuf_head(buf);
return hostapd_drv_send_action(
(hostapd_data *)ctx, *(_DWORD *)(*(_QWORD *)ctx + 2256LL), 0, da, v4, v3);
} | static int fst_hostapd_send_action_cb(void *ctx, const u8 *da,
struct wpabuf *buf) {
struct hostapd_data *hapd = ctx;
return hostapd_drv_send_action(hapd, hapd->iface->freq, 0, da,
wpabuf_head(buf), wpabuf_len(buf));
} | fst_hostapd_send_action_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_hostapd_set_ies_cb(void *ctx, const wpabuf *fst_ies) {
if (fst_ies != *(const wpabuf **)(*(_QWORD *)ctx + 88LL)) {
*(_QWORD *)(*(_QWORD *)ctx + 88LL) = fst_ies;
if (ieee802_11_set_beacon((hostapd_data *)ctx))
wpa_printf(4, "FST: Cannot set beacon");
}
} | static void fst_hostapd_set_ies_cb(void *ctx, const struct wpabuf *fst_ies) {
struct hostapd_data *hapd = ctx;
if (hapd->iface->fst_ies != fst_ies) {
hapd->iface->fst_ies = fst_ies;
if (ieee802_11_set_beacon(hapd))
wpa_printf(MSG_WARNING, "FST: Cannot set beacon");
}
} | fst_hostapd_set_ies_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_hostapd_update_mb_ie_cb(void *ctx, const u8 *addr, const u8 *buf,
size_t size) {
sta_info *sta;
mb_ies_info info;
unsigned long v8;
v8 = __readfsqword(0x28u);
sta = ap_get_sta((hostapd_data *)ctx, addr);
if (sta) {
if (!mb_ies_info_by_ies(&info, buf, size)) {
... | static void fst_hostapd_update_mb_ie_cb(void *ctx, const u8 *addr,
const u8 *buf, size_t size) {
struct hostapd_data *hapd = ctx;
struct sta_info *sta = ap_get_sta(hapd, addr);
if (sta) {
struct mb_ies_info info;
if (!mb_ies_info_by_ies(&info, buf, size)) {
... | fst_hostapd_update_mb_ie_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
mb_band_id fst_hw_mode_to_band(hostapd_hw_mode mode) {
if (mode == hostapd_hw_mode_HOSTAPD_MODE_IEEE80211AD)
return mb_band_id_MB_BAND_ID_WIFI_60GHZ;
if ((unsigned int)mode > hostapd_hw_mode_HOSTAPD_MODE_IEEE80211AD)
return mb_band_id_MB_BAND_ID_WIFI_2_4GHZ;
if ((unsigned int)mode <= hostapd_hw_mode_HOSTA... | enum mb_band_id fst_hw_mode_to_band(enum hostapd_hw_mode mode) {
switch (mode) {
case HOSTAPD_MODE_IEEE80211B:
case HOSTAPD_MODE_IEEE80211G:
return MB_BAND_ID_WIFI_2_4GHZ;
case HOSTAPD_MODE_IEEE80211A:
return MB_BAND_ID_WIFI_5GHZ;
case HOSTAPD_MODE_IEEE80211AD:
return MB_BAND_ID_WIFI_60GHZ;
defa... | fst_hw_mode_to_band | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_iface_attach_mbie(fst_iface *i, wpabuf *mbie) {
wpabuf_free(i->mb_ie);
i->mb_ie = mbie;
} | void fst_iface_attach_mbie(struct fst_iface *i, struct wpabuf *mbie) {
wpabuf_free(i->mb_ie);
i->mb_ie = mbie;
} | fst_iface_attach_mbie | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
fst_iface *fst_iface_create(fst_group *g, const char *ifname,
const u8 *own_addr, const fst_wpa_obj *iface_obj,
const fst_iface_cfg *cfg) {
const char *v5;
long v7;
const u8 *(*get_bssid)(void *);
int (*get_hw_modes)(void *, hostapd_hw_modes **);
int (*s... | struct fst_iface *fst_iface_create(struct fst_group *g, const char *ifname,
const u8 *own_addr,
const struct fst_wpa_obj *iface_obj,
const struct fst_iface_cfg *cfg) {
struct fst_iface *i;
i = os_zalloc(sizeof(... | fst_iface_create | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_iface_delete(fst_iface *i) {
fst_iface_set_ies_0(i, 0);
wpabuf_free(i->mb_ie);
free(i);
} | void fst_iface_delete(struct fst_iface *i) {
fst_iface_set_ies(i, NULL);
wpabuf_free(i->mb_ie);
os_free(i);
} | fst_iface_delete | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_iface_detach(const char *ifname) {
fst_group *g;
fst_iface *f;
for (g = (fst_group *)&fst_global_groups_list.next[-3];
&g->global_groups_lentry != &fst_global_groups_list;
g = (fst_group *)&g->global_groups_lentry.next[-3]) {
f = fst_group_get_iface_by_name(g, ifname);
if (f) {
... | int fst_iface_detach(const char *ifname) {
struct fst_group *g;
foreach_fst_group(g) {
struct fst_iface *f;
f = fst_group_get_iface_by_name(g, ifname);
if (f) {
fst_detach(f);
return 0;
}
}
return -EINVAL;
} | fst_iface_detach | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
mb_band_id fst_iface_get_band_id(fst_iface *i) {
u8 channel;
hostapd_hw_mode hw_mode;
unsigned long v4;
v4 = __readfsqword(0x28u);
fst_iface_get_channel_info_0(i, &hw_mode, &channel);
return fst_hw_mode_to_band(hw_mode);
} | enum mb_band_id fst_iface_get_band_id(struct fst_iface *i) {
enum hostapd_hw_mode hw_mode;
u8 channel;
fst_iface_get_channel_info(i, &hw_mode, &channel);
return fst_hw_mode_to_band(hw_mode);
} | fst_iface_get_band_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
bool fst_iface_is_connected(fst_iface *iface, const u8 *addr, bool mb_only) {
fst_get_peer_ctx *ctx;
const u8 *a;
unsigned long v7;
v7 = __readfsqword(0x28u);
for (a = fst_iface_get_peer_first_0(iface, &ctx, mb_only); a;
a = fst_iface_get_peer_next_0(iface, &ctx, mb_only)) {
if (!memcmp(addr, a, 6... | bool fst_iface_is_connected(struct fst_iface *iface, const u8 *addr,
bool mb_only) {
struct fst_get_peer_ctx *ctx;
const u8 *a = fst_iface_get_peer_first(iface, &ctx, mb_only);
for (; a != NULL; a = fst_iface_get_peer_next(iface, &ctx, mb_only))
if (os_memcmp(addr, a, ETH_ALEN) ==... | fst_iface_is_connected | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const u8 *fst_mbie_get_peer_addr(const multi_band_ie *mbie) {
const u8 *peer_addr;
peer_addr = 0;
if ((mbie->mb_ctrl & 7) == 0)
return mbie->bssid;
if ((mbie->mb_ctrl & 7) == 4 && (mbie->mb_ctrl & 8) != 0 &&
(unsigned long)mbie->len + 2 > 0x1D)
return mbie->variable;
return peer_addr;
} | static const u8 *fst_mbie_get_peer_addr(const struct multi_band_ie *mbie) {
const u8 *peer_addr = NULL;
switch (MB_CTRL_ROLE(mbie->mb_ctrl)) {
case MB_STA_ROLE_AP:
peer_addr = mbie->bssid;
break;
case MB_STA_ROLE_NON_PCP_NON_AP:
if (mbie->mb_ctrl & MB_CTRL_STA_MAC_PRESENT &&
(size_t)2 + mbi... | fst_mbie_get_peer_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const u8 *fst_mbie_get_peer_addr_for_band(const wpabuf *mbies, u8 band_id) {
const multi_band_ie *p;
size_t s;
const multi_band_ie *mbie;
p = (const multi_band_ie *)wpabuf_head_76(mbies);
for (s = wpabuf_len_76(mbies); s > 1; s -= mbie->len + 2) {
mbie = p;
if (p->eid != 0x9E) {
wpa_printf(3, "... | static const u8 *fst_mbie_get_peer_addr_for_band(const struct wpabuf *mbies,
u8 band_id) {
const u8 *p = wpabuf_head(mbies);
size_t s = wpabuf_len(mbies);
while (s >= 2) {
const struct multi_band_ie *mbie = (const struct multi_band_ie *)p;
if (mbie->eid !... | fst_mbie_get_peer_addr_for_band | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_notify_peer_connected(fst_iface *iface, const u8 *addr) {
int v2;
int v3;
int v4;
int v5;
const char *name;
fst_group *group;
const char *id;
int v9;
int v10;
if (!is_zero_ether_addr_13(addr)) {
v2 = addr[5];
v3 = addr[4];
v4 = addr[3];
v5 = addr[2];
v10 = addr[1];
... | void fst_notify_peer_connected(struct fst_iface *iface, const u8 *addr) {
if (is_zero_ether_addr(addr))
return;
#ifndef HOSTAPD
fst_group_update_ie(fst_iface_get_group(iface));
#endif
fst_printf_iface(iface, MSG_DEBUG, MACSTR " became connected", MAC2STR(addr));
fst_ctrl_iface_notify_peer_state_change(if... | fst_notify_peer_connected | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_notify_peer_disconnected(fst_iface *iface, const u8 *addr) {
int v2;
int v3;
int v4;
int v5;
const char *name;
fst_group *group;
const char *id;
int v9;
int v10;
if (!is_zero_ether_addr_13(addr)) {
v2 = addr[5];
v3 = addr[4];
v4 = addr[3];
v5 = addr[2];
v10 = addr[1];
... | void fst_notify_peer_disconnected(struct fst_iface *iface, const u8 *addr) {
if (is_zero_ether_addr(addr))
return;
#ifndef HOSTAPD
fst_group_update_ie(fst_iface_get_group(iface));
#endif
fst_printf_iface(iface, MSG_DEBUG, MACSTR " became disconnected",
MAC2STR(addr));
fst_ctrl_iface_no... | fst_notify_peer_disconnected | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_parse_attach_command(const char *cmd, char *ifname, size_t ifname_size,
fst_iface_cfg *cfg) {
bool is_valid;
int val;
char *endp;
char *pos;
unsigned long v10;
v10 = __readfsqword(0x28u);
if (fst_read_next_text_param(cmd, ifname, ifname_size, &endp) ||
fst_read_... | int fst_parse_attach_command(const char *cmd, char *ifname, size_t ifname_size,
struct fst_iface_cfg *cfg) {
char *pos;
char *endp;
bool is_valid;
int val;
if (fst_read_next_text_param(cmd, ifname, ifname_size, &endp) ||
fst_read_next_text_param(endp, cfg->group_id, sizeof(... | fst_parse_attach_command | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_parse_detach_command(const char *cmd, char *ifname,
size_t ifname_size) {
char *endp[2];
endp[1] = (char *)__readfsqword(0x28u);
return fst_read_next_text_param(cmd, ifname, ifname_size, endp);
} | int fst_parse_detach_command(const char *cmd, char *ifname,
size_t ifname_size) {
char *endp;
return fst_read_next_text_param(cmd, ifname, ifname_size, &endp);
} | fst_parse_detach_command | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_read_next_int_param(const char *params, bool *valid, char **endp) {
int ret;
ret = -1;
*valid = 0;
*endp = (char *)params;
if (*params) {
ret = strtol(params, endp, 0);
if (!**endp || ((*__ctype_b_loc())[**endp] & 0x2000) != 0)
*valid = 1;
}
return ret;
} | int fst_read_next_int_param(const char *params, bool *valid, char **endp) {
int ret = -1;
const char *curp;
*valid = false;
*endp = (char *)params;
curp = params;
if (*curp) {
ret = (int)strtol(curp, endp, 0);
if (!**endp || isspace(**endp))
*valid = true;
}
return ret;
} | fst_read_next_int_param | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_read_next_text_param(const char *params, char *buf, size_t buflen,
char **endp) {
size_t max_chars_to_copy;
for (*endp = (char *)params; ((*__ctype_b_loc())[**endp] & 0x2000) != 0;
++*endp)
;
if (!**endp || buflen <= 1)
return -22;
for (max_chars_to_copy = bu... | int fst_read_next_text_param(const char *params, char *buf, size_t buflen,
char **endp) {
size_t max_chars_to_copy;
char *cur_dest;
*endp = (char *)params;
while (isspace(**endp))
(*endp)++;
if (!**endp || buflen <= 1)
return -EINVAL;
max_chars_to_copy = buflen - 1;
... | fst_read_next_text_param | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_read_peer_addr(const char *mac, u8 *peer_addr) {
if (hwaddr_aton(mac, peer_addr)) {
wpa_printf(4, "FST: Bad peer_mac %s: invalid addr string", mac);
return -1;
} else if (is_zero_ether_addr_15(peer_addr) ||
is_multicast_ether_addr_7(peer_addr)) {
wpa_printf(4, "FST: Bad peer_mac %s:... | int fst_read_peer_addr(const char *mac, u8 *peer_addr) {
if (hwaddr_aton(mac, peer_addr)) {
fst_printf(MSG_WARNING, "Bad peer_mac %s: invalid addr string", mac);
return -1;
}
if (is_zero_ether_addr(peer_addr) || is_multicast_ether_addr(peer_addr)) {
fst_printf(MSG_WARNING, "Bad peer_mac %s: not a uni... | fst_read_peer_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *fst_reason_name(fst_reason reason) {
return fst_get_str_name(reason, reason_names, 8u);
} | const char *fst_reason_name(enum fst_reason reason) {
return fst_get_str_name(reason, reason_names, ARRAY_SIZE(reason_names));
} | fst_reason_name | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_rx_action(fst_iface *iface, const ieee80211_mgmt *mgmt, size_t len) {
if (fst_iface_is_connected(iface, mgmt->sa, 0))
fst_session_on_action_rx(iface, mgmt, len);
else
wpa_printf(2,
"FST: Ignore FST Action frame - no FST connection with "
"%02x:%02x:%02x:%02x:%02x:%02x"... | void fst_rx_action(struct fst_iface *iface, const struct ieee80211_mgmt *mgmt,
size_t len) {
if (fst_iface_is_connected(iface, mgmt->sa, false))
fst_session_on_action_rx(iface, mgmt, len);
else
wpa_printf(MSG_DEBUG,
"FST: Ignore FST Action frame - no FST connection with " M... | fst_rx_action | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
fst_session *fst_session_create(fst_group *g) {
u32 id;
fst_ctrl_handle *__fst_ctrl_h;
fst_session *s;
id = fst_find_free_session_id();
if (id == -1) {
wpa_printf(5, "FST: Cannot assign new session ID");
return 0;
} else {
s = (fst_session *)os_zalloc(0x58u);
if (s) {
s->id = id;
... | struct fst_session *fst_session_create(struct fst_group *g) {
struct fst_session *s;
u32 id;
id = fst_find_free_session_id();
if (id == FST_INVALID_SESSION_ID) {
fst_printf(MSG_ERROR, "Cannot assign new session ID");
return NULL;
}
s = os_zalloc(sizeof(*s));
if (!s) {
fst_printf(MSG_ERROR, "... | fst_session_create | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.