input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
void json_escape_string(char *txt, size_t maxlen, const char *data,
size_t len) {
int v4;
_BYTE *v5;
_BYTE *v6;
_BYTE *v7;
_BYTE *v8;
_BYTE *v9;
char *v10;
char *txta;
size_t i;
char *end;
txta = txt;
end = &txt[maxlen];
for (i = 0; i < len && end > txta + 4; ++i) {
... | void json_escape_string(char *txt, size_t maxlen, const char *data,
size_t len) {
char *end = txt + maxlen;
size_t i;
for (i = 0; i < len; i++) {
if (txt + 4 >= end)
break;
switch (data[i]) {
case '\"':
*txt++ = '\\';
*txt++ = '\"';
break;
case '\\... | json_escape_string | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void json_free(json_token *json) {
if (json) {
json_free(json->child);
json_free(json->sibling);
free(json->name);
free(json->string);
free(json);
}
} | void json_free(struct json_token *json) {
if (!json)
return;
json_free(json->child);
json_free(json->sibling);
os_free(json->name);
os_free(json->string);
os_free(json);
} | json_free | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
json_token *json_get_member(json_token *json, const char *name) {
json_token *token;
json_token *ret;
ret = 0;
if (!json || json->type != json_type_JSON_OBJECT)
return 0;
for (token = json->child; token; token = token->sibling) {
if (token->name) {
if (!strcmp(token->name, name))
ret = ... | struct json_token *json_get_member(struct json_token *json, const char *name) {
struct json_token *token, *ret = NULL;
if (!json || json->type != JSON_OBJECT)
return NULL;
for (token = json->child; token; token = token->sibling) {
if (token->name && os_strcmp(token->name, name) == 0)
ret = token;
... | json_get_member | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *json_get_member_base64(json_token *json, const char *name) {
size_t v3;
size_t buflen;
json_token *token;
unsigned char *buf;
wpabuf *ret;
unsigned long v8;
v8 = __readfsqword(0x28u);
token = json_get_member(json, name);
if (!token || token->type != json_type_JSON_STRING)
return 0;
v3 =... | struct wpabuf *json_get_member_base64(struct json_token *json,
const char *name) {
struct json_token *token;
unsigned char *buf;
size_t buflen;
struct wpabuf *ret;
token = json_get_member(json, name);
if (!token || token->type != JSON_STRING)
return NULL;
buf = b... | json_get_member_base64 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *json_get_member_base64url(json_token *json, const char *name) {
size_t v3;
size_t buflen;
json_token *token;
unsigned char *buf;
wpabuf *ret;
unsigned long v8;
v8 = __readfsqword(0x28u);
token = json_get_member(json, name);
if (!token || token->type != json_type_JSON_STRING)
return 0;
v... | struct wpabuf *json_get_member_base64url(struct json_token *json,
const char *name) {
struct json_token *token;
unsigned char *buf;
size_t buflen;
struct wpabuf *ret;
token = json_get_member(json, name);
if (!token || token->type != JSON_STRING)
return NULL;
b... | json_get_member_base64url | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
json_token *json_parse(const char *data, size_t data_len) {
json_type v2;
json_token *v3;
json_token *v4;
int v5;
int num;
unsigned int tokens;
unsigned int depth;
const char *pos;
json_token *root;
json_token *curr_token;
json_token *token;
const char *end;
char *str;
unsigned long v16;
... | struct json_token *json_parse(const char *data, size_t data_len) {
struct json_token *root = NULL, *curr_token = NULL, *token = NULL;
const char *pos, *end;
char *str;
int num;
unsigned int depth = 0;
unsigned int tokens = 0;
pos = data;
end = data + data_len;
for (; pos < end; pos++) {
switch (... | json_parse | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int json_parse_number(const char **json_pos, const char *end, int *ret_val) {
const char *pos;
long len;
char *str;
for (pos = *json_pos; pos < end; ++pos) {
if (*pos != 45 && (*pos <= 47 || *pos > 57)) {
--pos;
break;
}
}
if (pos == end)
--pos;
if (pos < *json_pos)
return -1;... | static int json_parse_number(const char **json_pos, const char *end,
int *ret_val) {
const char *pos = *json_pos;
size_t len;
char *str;
for (; pos < end; pos++) {
if (*pos != '-' && (*pos < '0' || *pos > '9')) {
pos--;
break;
}
}
if (pos == end)
pos--;
... | json_parse_number | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
char *json_parse_string(const char **json_pos, const char *end) {
size_t v2;
int v4;
int v5;
char *v6;
char *v7;
char *v8;
char *v9;
char *v10;
char *v11;
char *v12;
int idx;
const char *pos;
char *str;
char *spos;
char *s_end;
size_t buf_len;
size_t max_len;
char *tmp;
u8 bin[2];
... | static char *json_parse_string(const char **json_pos, const char *end) {
const char *pos = *json_pos;
char *str, *spos, *s_end;
size_t max_len, buf_len;
u8 bin[2];
pos++;
max_len = end - pos + 1;
buf_len = max_len > 10 ? 10 : max_len;
str = os_malloc(buf_len);
if (!str)
return NULL;
spos = str... | json_parse_string | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void json_print_token(json_token *token, int depth, char *buf, size_t buflen) {
char *name;
const char *v5;
int ret;
size_t len;
if (token) {
len = strlen(buf);
if (token->name)
name = token->name;
else
name = (char *)&unk_202AC4;
v5 = json_type_str(token->type);
ret = snprint... | static void json_print_token(struct json_token *token, int depth, char *buf,
size_t buflen) {
size_t len;
int ret;
if (!token)
return;
len = os_strlen(buf);
ret = os_snprintf(buf + len, buflen - len, "[%d:%s:%s]", depth,
json_type_str(token->type), token->... | json_print_token | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void json_print_tree(json_token *root, char *buf, size_t buflen) {
*buf = 0;
json_print_token(root, 1, buf, buflen);
} | void json_print_tree(struct json_token *root, char *buf, size_t buflen) {
buf[0] = '\0';
json_print_token(root, 1, buf, buflen);
} | json_print_tree | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void json_start_array(wpabuf *json, const char *name) {
if (name)
wpabuf_printf(json, "\"%s\":", name);
wpabuf_put_u8_39(json, 0x5Bu);
} | void json_start_array(struct wpabuf *json, const char *name) {
if (name)
wpabuf_printf(json, "\"%s\":", name);
wpabuf_put_u8(json, '[');
} | json_start_array | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void json_start_object(wpabuf *json, const char *name) {
if (name)
wpabuf_printf(json, "\"%s\":", name);
wpabuf_put_u8_39(json, 0x7Bu);
} | void json_start_object(struct wpabuf *json, const char *name) {
if (name)
wpabuf_printf(json, "\"%s\":", name);
wpabuf_put_u8(json, '{');
} | json_start_object | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *json_type_str(json_type type) {
const char *result;
switch (type) {
case json_type_JSON_VALUE:
result = "VALUE";
break;
case json_type_JSON_OBJECT:
result = "OBJECT";
break;
case json_type_JSON_ARRAY:
result = "ARRAY";
break;
case json_type_JSON_STRING:
result = "STR... | static const char *json_type_str(enum json_type type) {
switch (type) {
case JSON_VALUE:
return "VALUE";
case JSON_OBJECT:
return "OBJECT";
case JSON_ARRAY:
return "ARRAY";
case JSON_STRING:
return "STRING";
case JSON_NUMBER:
return "NUMBER";
case JSON_BOOLEAN:
return "BOOLEAN";
... | json_type_str | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void json_value_sep(wpabuf *json) { wpabuf_put_u8_39(json, 0x2Cu); } | void json_value_sep(struct wpabuf *json) { wpabuf_put_u8(json, ','); } | json_value_sep | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *key_rx_state_txt(int s) {
if (!s)
return "NO_KEY_RECEIVE";
if (s == 1)
return "KEY_RECEIVE";
return "Unknown";
} | static inline const char *key_rx_state_txt(int s) {
switch (s) {
case KEY_RX_NO_KEY_RECEIVE:
return "NO_KEY_RECEIVE";
case KEY_RX_KEY_RECEIVE:
return "KEY_RECEIVE";
default:
return "Unknown";
}
} | key_rx_state_txt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void l2_packet_deinit(l2_packet_data *l2) {
if (l2) {
if (l2->fd >= 0) {
eloop_unregister_read_sock(l2->fd);
close(l2->fd);
}
if (l2->fd_br_rx >= 0) {
eloop_unregister_read_sock(l2->fd_br_rx);
close(l2->fd_br_rx);
}
free(l2);
}
} | void l2_packet_deinit(struct l2_packet_data *l2) {
if (l2 == NULL)
return;
if (l2->fd >= 0) {
eloop_unregister_read_sock(l2->fd);
close(l2->fd);
}
#ifndef CONFIG_NO_LINUX_PACKET_SOCKET_WAR
if (l2->fd_br_rx >= 0) {
eloop_unregister_read_sock(l2->fd_br_rx);
close(l2->fd_br_rx);
}
#endif
... | l2_packet_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int l2_packet_get_ip_addr(l2_packet_data *l2, char *buf, size_t len) {
int *v3;
char *v4;
int *v6;
char *v7;
char *v8;
int s;
sockaddr_in *saddr;
ifreq ifr;
unsigned long v13;
v13 = __readfsqword(0x28u);
s = socket(2, 2, 0);
if (s >= 0) {
memset(&ifr, 0, sizeof(ifr));
os_strlcpy(ifr.ifr... | int l2_packet_get_ip_addr(struct l2_packet_data *l2, char *buf, size_t len) {
int s;
struct ifreq ifr;
struct sockaddr_in *saddr;
size_t res;
s = socket(PF_INET, SOCK_DGRAM, 0);
if (s < 0) {
wpa_printf(MSG_ERROR, "%s: socket: %s", __func__, strerror(errno));
return -1;
}
os_memset(&ifr, 0, size... | l2_packet_get_ip_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int l2_packet_get_own_addr(l2_packet_data *l2, u8 *addr) {
memcpy(addr, l2->own_addr, 6u);
return 0;
} | int l2_packet_get_own_addr(struct l2_packet_data *l2, u8 *addr) {
os_memcpy(addr, l2->own_addr, ETH_ALEN);
return 0;
} | l2_packet_get_own_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
l2_packet_data *
l2_packet_init(const char *ifname, const u8 *own_addr, unsigned short protocol,
void (*rx_callback)(void *, const u8 *, const u8 *, size_t),
void *rx_callback_ctx, int l2_hdr) {
uint16_t v7;
int v8;
int *v9;
char *v10;
int *v11;
char *v12;
int *v13;
char *v... | struct l2_packet_data *
l2_packet_init(const char *ifname, const u8 *own_addr, unsigned short protocol,
void (*rx_callback)(void *ctx, const u8 *src_addr, const u8 *buf,
size_t len),
void *rx_callback_ctx, int l2_hdr) {
struct l2_packet_data *l2;
stru... | l2_packet_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
l2_packet_data *l2_packet_init_bridge(const char *br_ifname, const char *ifname,
const u8 *own_addr,
unsigned short protocol,
void (*rx_callback)(void *, const u8 *,
... | struct l2_packet_data *
l2_packet_init_bridge(const char *br_ifname, const char *ifname,
const u8 *own_addr, unsigned short protocol,
void (*rx_callback)(void *ctx, const u8 *src_addr,
const u8 *buf, size_t len),
... | l2_packet_init_bridge | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void l2_packet_notify_auth_start(l2_packet_data *l2) { ; } | void l2_packet_notify_auth_start(struct l2_packet_data *l2) {} | l2_packet_notify_auth_start | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void l2_packet_receive(int sock, void *eloop_ctx, void *sock_ctx) {
int *v3;
char *v4;
u8 *last_hash;
long v6;
socklen_t fromlen;
int res;
l2_packet_data *l2;
const l2_ethhdr *eth;
const u8 *addr[1];
size_t len[1];
sockaddr_ll ll;
u8 hash[20];
u8 buf[2300];
unsigned long v16;
v16 = __read... | static void l2_packet_receive(int sock, void *eloop_ctx, void *sock_ctx) {
struct l2_packet_data *l2 = eloop_ctx;
u8 buf[2300];
int res;
struct sockaddr_ll ll;
socklen_t fromlen;
os_memset(&ll, 0, sizeof(ll));
fromlen = sizeof(ll);
res = recvfrom(sock, buf, sizeof(buf), 0, (struct sockaddr *)&ll, &from... | l2_packet_receive | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void l2_packet_receive_br(int sock, void *eloop_ctx, void *sock_ctx) {
int *v3;
char *v4;
u8 *last_hash;
long v6;
socklen_t fromlen;
int res;
l2_packet_data *l2;
const u8 *addr[1];
size_t len[1];
sockaddr_ll ll;
u8 hash[20];
u8 buf[2300];
unsigned long v15;
v15 = __readfsqword(0x28u);
l2 ... | static void l2_packet_receive_br(int sock, void *eloop_ctx, void *sock_ctx) {
struct l2_packet_data *l2 = eloop_ctx;
u8 buf[2300];
int res;
struct sockaddr_ll ll;
socklen_t fromlen;
u8 hash[SHA1_MAC_LEN];
const u8 *addr[1];
size_t len[1];
l2->num_rx_br++;
os_memset(&ll, 0, sizeof(ll));
fromlen = ... | l2_packet_receive_br | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int l2_packet_send(l2_packet_data *l2, const u8 *dst_addr, u16 proto,
const u8 *buf, size_t len) {
int *v6;
char *v7;
int *v8;
char *v9;
int ret;
sockaddr_ll ll;
unsigned long v15;
v15 = __readfsqword(0x28u);
if (!l2)
return -1;
if (l2->l2_hdr) {
ret = send(l2->fd, buf, l... | int l2_packet_send(struct l2_packet_data *l2, const u8 *dst_addr, u16 proto,
const u8 *buf, size_t len) {
int ret;
if (TEST_FAIL())
return -1;
if (l2 == NULL)
return -1;
if (l2->l2_hdr) {
ret = send(l2->fd, buf, len, 0);
if (ret < 0)
wpa_printf(MSG_ERROR, "l2_packet_sen... | l2_packet_send | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int l2_packet_set_packet_filter(l2_packet_data *l2,
l2_packet_filter_type type) {
int v2;
int *v4;
char *v5;
if (type == l2_packet_filter_type_L2_PACKET_FILTER_PKTTYPE) {
v2 = setsockopt(l2->fd, 1, 26, &pkt_type_sock_filter, 0x10u);
} else {
if ((unsigned int)type > l2... | int l2_packet_set_packet_filter(struct l2_packet_data *l2,
enum l2_packet_filter_type type) {
const struct sock_fprog *sock_filter;
if (TEST_FAIL())
return -1;
switch (type) {
case L2_PACKET_FILTER_DHCP:
sock_filter = &dhcp_sock_filter;
break;
case L2_PACKET_FILTE... | l2_packet_set_packet_filter | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int line_length(const char *l) {
const char *lp;
for (lp = l; *lp && *lp != 10; ++lp)
;
if (*lp == 10)
LODWORD(lp) = (_DWORD)lp + 1;
return (_DWORD)lp - (_DWORD)l;
} | static int line_length(const char *l) {
const char *lp = l;
while (*lp && *lp != '\n')
lp++;
if (*lp == '\n')
lp++;
return lp - l;
} | line_length | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *linkmode_str(int mode) {
if (mode == 1)
return "userspace-control";
if (mode > 1)
return "?";
if (mode == -1)
return "no change";
if (mode)
return "?";
else
return "kernel-control";
} | static const char *linkmode_str(int mode) {
switch (mode) {
case -1:
return "no change";
case 0:
return "kernel-control";
case 1:
return "userspace-control";
}
return "?";
} | linkmode_str | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int linux_br_add(int sock, const char *brname) {
int *v2;
char *v3;
int saved_errno;
if (ioctl(sock, 0x89A0u, brname) >= 0)
return 0;
saved_errno = *__errno_location();
v2 = __errno_location();
v3 = strerror(*v2);
wpa_printf(2, "Could not add bridge %s: %s", brname, v3);
*__errno_location() = sav... | int linux_br_add(int sock, const char *brname) {
if (ioctl(sock, SIOCBRADDBR, brname) < 0) {
int saved_errno = errno;
wpa_printf(MSG_DEBUG, "Could not add bridge %s: %s", brname,
strerror(errno));
errno = saved_errno;
return -1;
}
return 0;
} | linux_br_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int linux_br_add_if(int sock, const char *brname, const char *ifname) {
int *v4;
char *v5;
unsigned int ifindex;
int saved_errno;
ifreq ifr;
unsigned long v10;
v10 = __readfsqword(0x28u);
ifindex = if_nametoindex(ifname);
if (!ifindex)
return -1;
memset(&ifr, 0, sizeof(ifr));
os_strlcpy(ifr.i... | int linux_br_add_if(int sock, const char *brname, const char *ifname) {
struct ifreq ifr;
int ifindex;
ifindex = if_nametoindex(ifname);
if (ifindex == 0)
return -1;
os_memset(&ifr, 0, sizeof(ifr));
os_strlcpy(ifr.ifr_name, brname, IFNAMSIZ);
ifr.ifr_ifindex = ifindex;
if (ioctl(sock, SIOCBRADDIF,... | linux_br_add_if | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int linux_br_del(int sock, const char *brname) {
int *v2;
char *v3;
if (ioctl(sock, 0x89A1u, brname) >= 0)
return 0;
v2 = __errno_location();
v3 = strerror(*v2);
wpa_printf(2, "Could not remove bridge %s: %s", brname, v3);
return -1;
} | int linux_br_del(int sock, const char *brname) {
if (ioctl(sock, SIOCBRDELBR, brname) < 0) {
wpa_printf(MSG_DEBUG, "Could not remove bridge %s: %s", brname,
strerror(errno));
return -1;
}
return 0;
} | linux_br_del | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int linux_br_del_if(int sock, const char *brname, const char *ifname) {
int *v4;
char *v5;
unsigned int ifindex;
ifreq ifr;
unsigned long v9;
v9 = __readfsqword(0x28u);
ifindex = if_nametoindex(ifname);
if (!ifindex)
return -1;
memset(&ifr, 0, sizeof(ifr));
os_strlcpy(ifr.ifr_ifrn.ifrn_name, br... | int linux_br_del_if(int sock, const char *brname, const char *ifname) {
struct ifreq ifr;
int ifindex;
ifindex = if_nametoindex(ifname);
if (ifindex == 0)
return -1;
os_memset(&ifr, 0, sizeof(ifr));
os_strlcpy(ifr.ifr_name, brname, IFNAMSIZ);
ifr.ifr_ifindex = ifindex;
if (ioctl(sock, SIOCBRDELIF,... | linux_br_del_if | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int linux_br_get(char *brname, const char *ifname) {
unsigned long res;
char *pos;
char path[128];
char brlink[136];
unsigned long v7;
v7 = __readfsqword(0x28u);
snprintf(path, 0x80u, "/sys/class/net/%s/brport/bridge", ifname);
res = readlink(path, brlink, 0x80u);
if (res >= 0x80)
return -1;
br... | int linux_br_get(char *brname, const char *ifname) {
char path[128], brlink[128], *pos;
ssize_t res;
os_snprintf(path, sizeof(path), "/sys/class/net/%s/brport/bridge", ifname);
res = readlink(path, brlink, sizeof(brlink));
if (res < 0 || (size_t)res >= sizeof(brlink))
return -1;
brlink[res] = '\0';
p... | linux_br_get | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int linux_get_ifhwaddr(int sock, const char *ifname, u8 *addr) {
int *v3;
char *v4;
ifreq ifr;
unsigned long v8;
v8 = __readfsqword(0x28u);
memset(&ifr, 0, sizeof(ifr));
os_strlcpy(ifr.ifr_ifrn.ifrn_name, ifname, 0x10u);
if (ioctl(sock, 0x8927u, &ifr)) {
v3 = __errno_location();
v4 = strerror(*... | int linux_get_ifhwaddr(int sock, const char *ifname, u8 *addr) {
struct ifreq ifr;
os_memset(&ifr, 0, sizeof(ifr));
os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
if (ioctl(sock, SIOCGIFHWADDR, &ifr)) {
wpa_printf(MSG_ERROR, "Could not get interface %s hwaddr: %s", ifname,
strerror(errno));
... | linux_get_ifhwaddr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int linux_iface_up(int sock, const char *ifname) {
int v3;
int *v4;
char *v5;
int ret;
ifreq ifr;
unsigned long v8;
v8 = __readfsqword(0x28u);
if (sock < 0)
return -1;
memset(&ifr, 0, sizeof(ifr));
os_strlcpy(ifr.ifr_ifrn.ifrn_name, ifname, 0x10u);
if (!ioctl(sock, 0x8913u, &ifr))
return ... | int linux_iface_up(int sock, const char *ifname) {
struct ifreq ifr;
int ret;
if (sock < 0)
return -1;
os_memset(&ifr, 0, sizeof(ifr));
os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) {
ret = errno ? -errno : -999;
wpa_printf(MSG_ERROR, "Could not read in... | linux_iface_up | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int linux_master_get(char *master_ifname, const char *ifname) {
unsigned long res;
char *pos;
char buf[128];
char masterlink[136];
unsigned long v7;
v7 = __readfsqword(0x28u);
snprintf(buf, 0x80u, "/sys/class/net/%s/master", ifname);
res = readlink(buf, masterlink, 0x80u);
if (res >= 0x80)
return... | int linux_master_get(char *master_ifname, const char *ifname) {
char buf[128], masterlink[128], *pos;
ssize_t res;
os_snprintf(buf, sizeof(buf), "/sys/class/net/%s/master", ifname);
res = readlink(buf, masterlink, sizeof(masterlink));
if (res < 0 || (size_t)res >= sizeof(masterlink))
return -1;
maste... | linux_master_get | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int linux_set_iface_flags(int sock, const char *ifname, int dev_up) {
int v4;
int *v5;
char *v6;
int v7;
int *v8;
char *v9;
const char *v10;
int reta;
int ret;
ifreq ifr;
unsigned long v15;
v15 = __readfsqword(0x28u);
if (sock < 0)
return -1;
memset(&ifr, 0, sizeof(ifr));
os_strlcpy(i... | int linux_set_iface_flags(int sock, const char *ifname, int dev_up) {
struct ifreq ifr;
int ret;
if (sock < 0)
return -1;
os_memset(&ifr, 0, sizeof(ifr));
os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) {
ret = errno ? -errno : -999;
wpa_printf(MSG_ERROR,... | linux_set_iface_flags | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int linux_set_ifhwaddr(int sock, const char *ifname, const u8 *addr) {
int *v3;
char *v4;
ifreq ifr;
unsigned long v8;
v8 = __readfsqword(0x28u);
memset(&ifr, 0, sizeof(ifr));
os_strlcpy(ifr.ifr_ifrn.ifrn_name, ifname, 0x10u);
memcpy(ifr.ifr_ifru.ifru_dstaddr.sa_data, addr, 6u);
ifr.ifr_ifru.ifru_add... | int linux_set_ifhwaddr(int sock, const char *ifname, const u8 *addr) {
struct ifreq ifr;
os_memset(&ifr, 0, sizeof(ifr));
os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
os_memcpy(ifr.ifr_hwaddr.sa_data, addr, ETH_ALEN);
ifr.ifr_hwaddr.sa_family = ARPHRD_ETHER;
if (ioctl(sock, SIOCSIFHWADDR, &ifr)) {
wpa_... | linux_set_ifhwaddr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int linux_write_system_file(const char *path, unsigned int val) {
int len;
int fd;
char buf[56];
unsigned long v6;
v6 = __readfsqword(0x28u);
len = snprintf(buf, 0x32u, "%u\n", val);
if (os_snprintf_error_11(0x32u, len))
return -1;
fd = open(path, 1);
if (fd < 0)
return -1;
if (write(fd, bu... | static int linux_write_system_file(const char *path, unsigned int val) {
char buf[50];
int fd, len;
len = os_snprintf(buf, sizeof(buf), "%u\n", val);
if (os_snprintf_error(sizeof(buf), len))
return -1;
fd = open(path, O_WRONLY);
if (fd < 0)
return -1;
if (write(fd, buf, len) < 0) {
wpa_prin... | linux_write_system_file | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int list_groups(const char *cmd, char *buf, size_t buflen) {
const char *id_3;
int ret;
int res;
fst_group *g;
ret = 0;
for (g = (fst_group *)&fst_global_groups_list.next[-3];
&g->global_groups_lentry != &fst_global_groups_list;
g = (fst_group *)&g->global_groups_lentry.next[-3]) {
id_3 =... | static int list_groups(const char *cmd, char *buf, size_t buflen) {
struct fst_group *g;
int ret = 0;
foreach_fst_group(g) {
int res;
res = os_snprintf(buf + ret, buflen - ret, "%s\n", fst_group_get_id(g));
if (os_snprintf_error(buflen - ret, res))
break;
ret += res;
}
return ret;
} | list_groups | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int list_ifaces(const char *group_id, char *buf, size_t buflen) {
u32 llt;
int v5;
int v6;
int v7;
int v8;
const char *name_3;
int v10;
int v11;
int priority_0;
int ret;
int res;
fst_iface *f;
fst_group *g;
const u8 *iface_addr;
ret = 0;
g = get_fst_group_by_id(group_id);
if (g) {
... | static int list_ifaces(const char *group_id, char *buf, size_t buflen) {
struct fst_group *g;
struct fst_iface *f;
int ret = 0;
g = get_fst_group_by_id(group_id);
if (!g) {
fst_printf(MSG_WARNING, "CTRL: Cannot find group '%s'", group_id);
return os_snprintf(buf, buflen, "FAIL\n");
}
foreach_fst... | list_ifaces | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void list_session_enum_cb(fst_group *g, fst_session *s, void *ctx) {
u32 id;
int v4;
id = fst_session_get_id(s);
v4 = snprintf(*(char **)ctx, *((_QWORD *)ctx + 1), " %u", id);
*(_QWORD *)ctx += v4;
*((_QWORD *)ctx + 1) -= v4;
*((_QWORD *)ctx + 2) += v4;
} | static void list_session_enum_cb(struct fst_group *g, struct fst_session *s,
void *ctx) {
struct list_sessions_cb_ctx *c = ctx;
int ret;
ret = os_snprintf(c->buf, c->buflen, " %u", fst_session_get_id(s));
c->buf += ret;
c->buflen -= ret;
c->reply_len += ret;
} | list_session_enum_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int list_sessions(const char *group_id, char *buf, size_t buflen) {
int v4;
fst_group *g;
list_sessions_cb_ctx ctx;
unsigned long v8;
v8 = __readfsqword(0x28u);
g = get_fst_group_by_id(group_id);
if (g) {
ctx.buf = buf;
ctx.buflen = buflen;
ctx.reply_len = 0;
fst_session_enum(g, (fst_sess... | static int list_sessions(const char *group_id, char *buf, size_t buflen) {
struct list_sessions_cb_ctx ctx;
struct fst_group *g;
g = get_fst_group_by_id(group_id);
if (!g) {
fst_printf(MSG_WARNING, "CTRL: Cannot find group '%s'", group_id);
return os_snprintf(buf, buflen, "FAIL\n");
}
ctx.buf = bu... | list_sessions | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int local_network_addr(upnp_wps_device_sm *sm, sockaddr_in *addr) {
return ((sm->ip_addr ^ addr->sin_addr.s_addr) & sm->netmask.s_addr) == 0;
} | static int local_network_addr(struct upnp_wps_device_sm *sm,
struct sockaddr_in *addr) {
return (addr->sin_addr.s_addr & sm->netmask.s_addr) ==
(sm->ip_addr & sm->netmask.s_addr);
} | local_network_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int mac_in_conf(hostapd_config *conf, const void *a) {
size_t i;
for (i = 0; i < conf->num_bss; ++i) {
if (!hostapd_mac_comp(conf->bss[i]->bssid, a))
return 1;
}
return 0;
} | static int mac_in_conf(struct hostapd_config *conf, const void *a) {
size_t i;
for (i = 0; i < conf->num_bss; i++) {
if (hostapd_mac_comp(conf->bss[i]->bssid, a) == 0) {
return 1;
}
}
return 0;
} | mac_in_conf | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
size_t v4;
hostapd_iface **v5;
char *v6;
size_t v7;
int ret;
int debug;
int daemonize;
int start_ifaces_in_sync;
int c;
char **if_names;
size_t if_names_size;
size_t i;
size_t j;
char *pid_file;
const char *log_file;
const char *... | int main(int argc, char *argv[]) {
struct hapd_interfaces interfaces;
int ret = 1;
size_t i, j;
int c, debug = 0, daemonize = 0;
char *pid_file = NULL;
const char *log_file = NULL;
const char *entropy_file = NULL;
char **bss_config = NULL, **tmp_bss;
size_t num_bss_configs = 0;
#ifdef CONFIG_DEBUG_LIN... | main | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int match_dn_field(const X509 *cert, int nid, const char *field,
const char *value, const tls_dn_field_order_cnt *dn_cnt) {
const u8 *v6;
_BOOL4 v7;
const u8 *v8;
_BOOL4 v9;
const char *v10;
int i;
int ret;
int match_index;
int len;
int config_dn_field_index;
X509_NAME *name;
... | static int match_dn_field(const X509 *cert, int nid, const char *field,
const char *value,
const struct tls_dn_field_order_cnt *dn_cnt) {
int i, ret = 0, len, config_dn_field_index, match_index = 0;
X509_NAME *name;
len = os_strlen(value);
name = X509_get_sub... | match_dn_field | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int match_lines_in_file(const char *path, const char **lines) {
_BOOL4 found;
int is_linestart;
_BOOL4 is_lineend;
const char **p;
size_t bufsize;
char *buf;
FILE *f;
size_t len;
found = 0;
is_linestart = 1;
bufsize = max_str_len(lines) + 3;
buf = (char *)malloc(bufsize);
if (!buf)
return... | static int match_lines_in_file(const char *path, const char **lines) {
FILE *f;
char *buf;
size_t bufsize;
int found = 0, is_linestart = 1;
bufsize = max_str_len(lines) + sizeof("\r\n");
buf = os_malloc(bufsize);
if (!buf)
return 0;
f = fopen(path, "r");
if (!f) {
os_free(buf);
return 0;... | match_lines_in_file | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
size_t max_str_len(const char **lines) {
size_t max_len;
size_t len;
max_len = 0;
while (*lines) {
len = strlen(*lines);
if (len > max_len)
max_len = len;
++lines;
}
return max_len;
} | static size_t max_str_len(const char **lines) {
const char **p;
size_t max_len = 0;
for (p = lines; *p; p++) {
size_t len = os_strlen(*p);
if (len > max_len)
max_len = len;
}
return max_len;
} | max_str_len | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *mb_ies_by_info(mb_ies_info *info) {
u8 i;
u8 ia;
wpabuf *mb_ies;
size_t mb_ies_size;
mb_ies = 0;
if (info->nof_ies) {
mb_ies_size = 0;
for (i = 0; i < info->nof_ies; ++i)
mb_ies_size += info->ies[i].ie_len + 2;
mb_ies = wpabuf_alloc(mb_ies_size);
if (mb_ies) {
for (ia = ... | struct wpabuf *mb_ies_by_info(struct mb_ies_info *info) {
struct wpabuf *mb_ies = NULL;
WPA_ASSERT(info != NULL);
if (info->nof_ies) {
u8 i;
size_t mb_ies_size = 0;
for (i = 0; i < info->nof_ies; i++)
mb_ies_size += 2 + info->ies[i].ie_len;
mb_ies = wpabuf_alloc(mb_ies_size);
if (mb_... | mb_ies_by_info | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int mb_ies_info_by_ies(mb_ies_info *info, const u8 *ies_buf, size_t ies_len) {
const element *elem;
memset(info, 0, sizeof(mb_ies_info));
if (!ies_buf)
return 0;
for (elem = (const element *)ies_buf;
&ies_buf[ies_len] - (const u8 *)elem > 1 &&
&ies_buf[ies_len] - (const u8 *)elem >= elem->dat... | int mb_ies_info_by_ies(struct mb_ies_info *info, const u8 *ies_buf,
size_t ies_len) {
const struct element *elem;
os_memset(info, 0, sizeof(*info));
if (!ies_buf)
return 0;
for_each_element_id(elem, WLAN_EID_MULTI_BAND, ies_buf, ies_len) {
if (info->nof_ies >= MAX_NOF_MB_IES_SU... | mb_ies_info_by_ies | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
size_t mbo_add_ie(u8 *buf, size_t len, const u8 *attr, size_t attr_len) {
if (len >= attr_len + 6) {
*buf = -35;
buf[1] = attr_len + 4;
WPA_PUT_BE24_1(buf + 2, 0x506F9Au);
buf[5] = 22;
memcpy(buf + 6, attr, attr_len);
return attr_len + 6;
} else {
wpa_printf(2,
"MBO: Not e... | size_t mbo_add_ie(u8 *buf, size_t len, const u8 *attr, size_t attr_len) {
if (len < 6 + attr_len) {
wpa_printf(MSG_DEBUG,
"MBO: Not enough room in buffer for MBO IE: buf len = %zu, "
"attr_len = %zu",
len, attr_len);
return 0;
}
*buf++ = WLAN_EID_VENDOR_SPECI... | mbo_add_ie | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int min_int(int a, int b) {
if (a >= b)
return b;
else
return a;
} | static inline int min_int(int a, int b) {
if (a < b)
return a;
return b;
} | min_int | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_associate_indication(hostapd_data *hapd, sta_info *sta) {
hostapd_logger(hapd, sta->addr, 0x40u, 1,
"MLME-ASSOCIATE.indication(%02x:%02x:%02x:%02x:%02x:%02x)",
sta->addr[0], sta->addr[1], sta->addr[2], sta->addr[3],
sta->addr[4], sta->addr[5]);
if (sta->a... | void mlme_associate_indication(struct hostapd_data *hapd,
struct sta_info *sta) {
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_MLME, HOSTAPD_LEVEL_DEBUG,
"MLME-ASSOCIATE.indication(" MACSTR ")", MAC2STR(sta->addr));
if (sta->auth_alg != WLAN_AUTH_FT && sta->auth_alg... | mlme_associate_indication | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *mlme_auth_alg_str(int alg) {
if (alg == 2)
return "FT";
if (alg > 2)
return "unknown";
if (!alg)
return "OPEN_SYSTEM";
if (alg == 1)
return "SHARED_KEY";
else
return "unknown";
} | static const char *mlme_auth_alg_str(int alg) {
switch (alg) {
case WLAN_AUTH_OPEN:
return "OPEN_SYSTEM";
case WLAN_AUTH_SHARED_KEY:
return "SHARED_KEY";
case WLAN_AUTH_FT:
return "FT";
}
return "unknown";
} | mlme_auth_alg_str | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_authenticate_indication(hostapd_data *hapd, sta_info *sta) {
const char *v2;
v2 = mlme_auth_alg_str(sta->auth_alg);
hostapd_logger(
hapd, sta->addr, 0x40u, 1,
"MLME-AUTHENTICATE.indication(%02x:%02x:%02x:%02x:%02x:%02x, %s)",
sta->addr[0], sta->addr[1], sta->addr[2], sta->addr[3], sta... | void mlme_authenticate_indication(struct hostapd_data *hapd,
struct sta_info *sta) {
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_MLME, HOSTAPD_LEVEL_DEBUG,
"MLME-AUTHENTICATE.indication(" MACSTR ", %s)",
MAC2STR(sta->addr), mlme_auth_alg_str(sta->... | mlme_authenticate_indication | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_deauthenticate_indication(hostapd_data *hapd, sta_info *sta,
u16 reason_code) {
hostapd_logger(
hapd, sta->addr, 0x40u, 1,
"MLME-DEAUTHENTICATE.indication(%02x:%02x:%02x:%02x:%02x:%02x, %d)",
sta->addr[0], sta->addr[1], sta->addr[2], sta->addr[3], sta->a... | void mlme_deauthenticate_indication(struct hostapd_data *hapd,
struct sta_info *sta, u16 reason_code) {
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_MLME, HOSTAPD_LEVEL_DEBUG,
"MLME-DEAUTHENTICATE.indication(" MACSTR ", %d)",
MAC2STR(sta->addr), ... | mlme_deauthenticate_indication | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_deletekeys_request(hostapd_data *hapd, sta_info *sta) {
hostapd_logger(hapd, sta->addr, 0x40u, 1,
"MLME-DELETEKEYS.request(%02x:%02x:%02x:%02x:%02x:%02x)",
sta->addr[0], sta->addr[1], sta->addr[2], sta->addr[3],
sta->addr[4], sta->addr[5]);
if (sta->wpa_s... | void mlme_deletekeys_request(struct hostapd_data *hapd, struct sta_info *sta) {
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_MLME, HOSTAPD_LEVEL_DEBUG,
"MLME-DELETEKEYS.request(" MACSTR ")", MAC2STR(sta->addr));
if (sta->wpa_sm)
wpa_remove_ptk(sta->wpa_sm);
} | mlme_deletekeys_request | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_disassociate_indication(hostapd_data *hapd, sta_info *sta,
u16 reason_code) {
hostapd_logger(
hapd, sta->addr, 0x40u, 1,
"MLME-DISASSOCIATE.indication(%02x:%02x:%02x:%02x:%02x:%02x, %d)",
sta->addr[0], sta->addr[1], sta->addr[2], sta->addr[3], sta->addr[4]... | void mlme_disassociate_indication(struct hostapd_data *hapd,
struct sta_info *sta, u16 reason_code) {
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_MLME, HOSTAPD_LEVEL_DEBUG,
"MLME-DISASSOCIATE.indication(" MACSTR ", %d)",
MAC2STR(sta->addr), reason... | mlme_disassociate_indication | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event(i802_bss *bss, nl80211_commands cmd, nlattr *frame,
nlattr *addr, nlattr *timed_out, nlattr *freq, nlattr *ack,
nlattr *cookie, nlattr *sig, nlattr *wmm, nlattr *req_ie) {
const char *v11;
int v12;
int v13;
int v14;
int v15;
int v16;
const char *v17;
int v... | static void mlme_event(struct i802_bss *bss, enum nl80211_commands cmd,
struct nlattr *frame, struct nlattr *addr,
struct nlattr *timed_out, struct nlattr *freq,
struct nlattr *ack, struct nlattr *cookie,
struct nlattr *sig, str... | mlme_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_assoc(wpa_driver_nl80211_data *drv, const u8 *frame, size_t len,
nlattr *wmm, nlattr *req_ie) {
const char *v5;
u16 status;
int ssid_len;
wpa_event_data event;
unsigned long v12;
v12 = __readfsqword(0x28u);
if ((drv->capa.flags & 0x20) != 0 || (*((_BYTE *)drv + 826) ... | static void mlme_event_assoc(struct wpa_driver_nl80211_data *drv,
const u8 *frame, size_t len, struct nlattr *wmm,
struct nlattr *req_ie) {
const struct ieee80211_mgmt *mgmt;
union wpa_event_data event;
u16 status;
int ssid_len;
if (!(drv->capa.flags ... | mlme_event_assoc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_auth(wpa_driver_nl80211_data *drv, const u8 *frame,
size_t len) {
wpa_event_data event;
unsigned long v5;
v5 = __readfsqword(0x28u);
if ((drv->capa.flags & 0x20) != 0 || (*((_BYTE *)drv + 826) & 0x10) == 0) {
wpa_printf(2, "nl80211: Authenticate event");
if (len > 0... | static void mlme_event_auth(struct wpa_driver_nl80211_data *drv,
const u8 *frame, size_t len) {
const struct ieee80211_mgmt *mgmt;
union wpa_event_data event;
if (!(drv->capa.flags & WPA_DRIVER_FLAGS_SME) && drv->force_connect_cmd) {
wpa_printf(MSG_DEBUG, "nl80211: Ignore auth ev... | mlme_event_auth | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_ch_switch(wpa_driver_nl80211_data *drv, nlattr *ifindex,
nlattr *freq, nlattr *type, nlattr *bw, nlattr *cf1,
nlattr *cf2, int finished) {
const char *v8;
int u32;
int v10;
int v11;
int v12;
int v13;
wpa_event_type v14;
long ht_enabled;... | static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv,
struct nlattr *ifindex, struct nlattr *freq,
struct nlattr *type, struct nlattr *bw,
struct nlattr *cf1, struct nlattr *cf2,
... | mlme_event_ch_switch | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_connect(wpa_driver_nl80211_data *drv, nl80211_commands cmd,
nlattr *status, nlattr *addr, nlattr *req_ie,
nlattr *resp_ie, nlattr *timed_out,
nlattr *timeout_reason, nlattr *authorized,
nlattr *key_replay_ctr... | static void
mlme_event_connect(struct wpa_driver_nl80211_data *drv,
enum nl80211_commands cmd, struct nlattr *status,
struct nlattr *addr, struct nlattr *req_ie,
struct nlattr *resp_ie, struct nlattr *timed_out,
struct nlattr *timeout_reason, s... | mlme_event_connect | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_deauth_disassoc(wpa_driver_nl80211_data *drv,
wpa_event_type type, const u8 *frame,
size_t len) {
u16 reason_code;
const u8 *bssid;
wpa_event_data event;
unsigned long v9;
v9 = __readfsqword(0x28u);
bssid = 0;
reason_code = 0... | static void mlme_event_deauth_disassoc(struct wpa_driver_nl80211_data *drv,
enum wpa_event_type type,
const u8 *frame, size_t len) {
const struct ieee80211_mgmt *mgmt;
union wpa_event_data event;
const u8 *bssid = NULL;
u16 reason_cod... | mlme_event_deauth_disassoc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_dh_event(wpa_driver_nl80211_data *drv, i802_bss *bss,
nlattr **tb) {
wpa_event_data data;
unsigned long v5;
v5 = __readfsqword(0x28u);
if (is_ap_interface(drv->nlmode) && tb[6]) {
if (tb[42]) {
memset(&data, 0, sizeof(data));
data.disassoc_info.addr = (c... | static void mlme_event_dh_event(struct wpa_driver_nl80211_data *drv,
struct i802_bss *bss, struct nlattr *tb[]) {
union wpa_event_data data;
if (!is_ap_interface(drv->nlmode))
return;
if (!tb[NL80211_ATTR_MAC] || !tb[NL80211_ATTR_IE])
return;
os_memset(&data, 0, sizeof(... | mlme_event_dh_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_disconnect(wpa_driver_nl80211_data *drv, nlattr *reason,
nlattr *addr, nlattr *by_ap) {
wpa_event_data data;
unsigned long v6;
v6 = __readfsqword(0x28u);
if ((drv->capa.flags & 0x20) != 0) {
wpa_printf(2, "nl80211: Ignore disconnect event when using userspace SME"... | static void mlme_event_disconnect(struct wpa_driver_nl80211_data *drv,
struct nlattr *reason, struct nlattr *addr,
struct nlattr *by_ap) {
union wpa_event_data data;
unsigned int locally_generated = by_ap == NULL;
if (drv->capa.flags & WPA_DRIVE... | mlme_event_disconnect | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_ft_event(wpa_driver_nl80211_data *drv, nlattr **tb) {
long v2;
wpa_event_data data;
unsigned long v4;
v4 = __readfsqword(0x28u);
memset(&data, 0, sizeof(data));
if (tb[42]) {
data.disassoc_info.addr = (const u8 *)nla_data(tb[42]);
data.ft_ies.ies_len = (int)nla_len(tb[42]);
}
if... | static void mlme_event_ft_event(struct wpa_driver_nl80211_data *drv,
struct nlattr *tb[]) {
union wpa_event_data data;
os_memset(&data, 0, sizeof(data));
if (tb[NL80211_ATTR_IE]) {
data.ft_ies.ies = nla_data(tb[NL80211_ATTR_IE]);
data.ft_ies.ies_len = nla_len(tb[NL80211_A... | mlme_event_ft_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_join_ibss(wpa_driver_nl80211_data *drv, nlattr **tb) {
const void *v2;
unsigned int freq;
wpa_event_data event;
unsigned long v5;
v5 = __readfsqword(0x28u);
if (tb[6]) {
v2 = (const void *)nla_data(tb[6]);
memcpy(drv->bssid, v2, sizeof(drv->bssid));
drv->associated = 1;
wpa_... | static void mlme_event_join_ibss(struct wpa_driver_nl80211_data *drv,
struct nlattr *tb[]) {
unsigned int freq;
union wpa_event_data event;
if (tb[NL80211_ATTR_MAC] == NULL) {
wpa_printf(MSG_DEBUG, "nl80211: No address in IBSS joined "
"event");
... | mlme_event_join_ibss | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_mgmt(i802_bss *bss, nlattr *freq, nlattr *sig, const u8 *frame,
size_t len) {
const char *v5;
u16 fc;
u16 stype;
int ssi_signal;
int rx_freq;
wpa_driver_nl80211_data *drv;
wpa_event_data event;
unsigned long v15;
v15 = __readfsqword(0x28u);
drv = bss->drv;
ssi... | static void mlme_event_mgmt(struct i802_bss *bss, struct nlattr *freq,
struct nlattr *sig, const u8 *frame, size_t len) {
struct wpa_driver_nl80211_data *drv = bss->drv;
const struct ieee80211_mgmt *mgmt;
union wpa_event_data event;
u16 fc, stype;
int ssi_signal = 0;
int rx_freq ... | mlme_event_mgmt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_mgmt_tx_status(wpa_driver_nl80211_data *drv, nlattr *cookie,
const u8 *frame, size_t len, nlattr *ack) {
const char *v5;
const char *v6;
const char *v7;
u16 fc;
u64 cookie_val;
wpa_event_data event;
unsigned long v15;
v15 = __readfsqword(0x28u);
fc = *(_... | static void mlme_event_mgmt_tx_status(struct wpa_driver_nl80211_data *drv,
struct nlattr *cookie, const u8 *frame,
size_t len, struct nlattr *ack) {
union wpa_event_data event;
const struct ieee80211_hdr *hdr = (const struct ieee80211_hdr *... | mlme_event_mgmt_tx_status | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_michael_mic_failure(i802_bss *bss, nlattr **tb) {
size_t v2;
const void *v3;
size_t v4;
const void *v5;
u8 key_id;
nl80211_key_type key_type;
wpa_event_data data;
unsigned long v9;
v9 = __readfsqword(0x28u);
wpa_printf(2, "nl80211: MLME event Michael MIC failure");
memset(&data, 0... | static void mlme_event_michael_mic_failure(struct i802_bss *bss,
struct nlattr *tb[]) {
union wpa_event_data data;
wpa_printf(MSG_DEBUG, "nl80211: MLME event Michael MIC failure");
os_memset(&data, 0, sizeof(data));
if (tb[NL80211_ATTR_MAC]) {
wpa_hexdump(MSG_DEBU... | mlme_event_michael_mic_failure | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_remain_on_channel(wpa_driver_nl80211_data *drv,
int cancel_event, nlattr **tb) {
const char *v3;
wpa_event_type v4;
unsigned int freq;
unsigned int chan_type;
unsigned int duration;
u64 cookie;
wpa_event_data data;
unsigned long v11;
v11 = __readfsqwo... | static void mlme_event_remain_on_channel(struct wpa_driver_nl80211_data *drv,
int cancel_event,
struct nlattr *tb[]) {
unsigned int freq, chan_type, duration;
union wpa_event_data data;
u64 cookie;
if (tb[NL80211_ATTR_WIPHY_FREQ]... | mlme_event_remain_on_channel | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_unprot_beacon(wpa_driver_nl80211_data *drv, const u8 *frame,
size_t len) {
wpa_event_data event;
unsigned long v4;
v4 = __readfsqword(0x28u);
if (len > 0x17) {
memset(&event, 0, sizeof(event));
event.disassoc_info.addr = frame + 10;
wpa_supplicant_event... | static void mlme_event_unprot_beacon(struct wpa_driver_nl80211_data *drv,
const u8 *frame, size_t len) {
const struct ieee80211_mgmt *mgmt;
union wpa_event_data event;
if (len < 24)
return;
mgmt = (const struct ieee80211_mgmt *)frame;
os_memset(&event, 0, sizeof(eve... | mlme_event_unprot_beacon | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_event_unprot_disconnect(wpa_driver_nl80211_data *drv,
wpa_event_type type, const u8 *frame,
size_t len) {
u16 reason_code;
wpa_event_data event;
unsigned long v8;
v8 = __readfsqword(0x28u);
reason_code = 0;
if (type == wpa_event_... | static void mlme_event_unprot_disconnect(struct wpa_driver_nl80211_data *drv,
enum wpa_event_type type,
const u8 *frame, size_t len) {
const struct ieee80211_mgmt *mgmt;
union wpa_event_data event;
u16 reason_code = 0;
if (type =... | mlme_event_unprot_disconnect | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_michaelmicfailure_indication(hostapd_data *hapd, const u8 *addr) {
hostapd_logger(
hapd, addr, 0x40u, 1,
"MLME-MichaelMICFailure.indication(%02x:%02x:%02x:%02x:%02x:%02x)", *addr,
addr[1], addr[2], addr[3], addr[4], addr[5]);
} | void mlme_michaelmicfailure_indication(struct hostapd_data *hapd,
const u8 *addr) {
hostapd_logger(hapd, addr, HOSTAPD_MODULE_MLME, HOSTAPD_LEVEL_DEBUG,
"MLME-MichaelMICFailure.indication(" MACSTR ")",
MAC2STR(addr));
} | mlme_michaelmicfailure_indication | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_reassociate_indication(hostapd_data *hapd, sta_info *sta) {
hostapd_logger(hapd, sta->addr, 0x40u, 1,
"MLME-REASSOCIATE.indication(%02x:%02x:%02x:%02x:%02x:%02x)",
sta->addr[0], sta->addr[1], sta->addr[2], sta->addr[3],
sta->addr[4], sta->addr[5]);
if (st... | void mlme_reassociate_indication(struct hostapd_data *hapd,
struct sta_info *sta) {
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_MLME, HOSTAPD_LEVEL_DEBUG,
"MLME-REASSOCIATE.indication(" MACSTR ")", MAC2STR(sta->addr));
if (sta->auth_alg != WLAN_AUTH_FT && sta->au... | mlme_reassociate_indication | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void mlme_timeout_event(wpa_driver_nl80211_data *drv, nl80211_commands cmd,
nlattr *addr) {
int v3;
int v4;
int v5;
int v6;
int v7;
unsigned char *v8;
wpa_event_type ev;
wpa_event_data event;
unsigned long v12;
v12 = __readfsqword(0x28u);
if ((unsigned int)nla_len(addr) ==... | static void mlme_timeout_event(struct wpa_driver_nl80211_data *drv,
enum nl80211_commands cmd, struct nlattr *addr) {
union wpa_event_data event;
enum wpa_event_type ev;
if (nla_len(addr) != ETH_ALEN)
return;
wpa_printf(MSG_DEBUG, "nl80211: MLME event %d; timeout with " MACS... | mlme_timeout_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *modestr(hostapd_hw_mode mode) {
if (mode == hostapd_hw_mode_HOSTAPD_MODE_IEEE80211AD)
return "802.11ad";
if ((unsigned int)mode > hostapd_hw_mode_HOSTAPD_MODE_IEEE80211AD)
return "?";
if (mode == hostapd_hw_mode_HOSTAPD_MODE_IEEE80211A)
return "802.11a";
if (mode)
return "802.11g";
... | static const char *modestr(enum hostapd_hw_mode mode) {
switch (mode) {
case HOSTAPD_MODE_IEEE80211B:
return "802.11b";
case HOSTAPD_MODE_IEEE80211G:
return "802.11g";
case HOSTAPD_MODE_IEEE80211A:
return "802.11a";
case HOSTAPD_MODE_IEEE80211AD:
return "802.11ad";
default:
return "?";
... | modestr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ms_from_time(os_reltime *last) {
os_reltime now;
os_reltime res;
unsigned long v4;
v4 = __readfsqword(0x28u);
os_get_reltime(&now);
os_reltime_sub_13(&now, last, &res);
return 1000 * LODWORD(res.sec) + SLODWORD(res.usec) / 1000;
} | static int ms_from_time(struct os_reltime *last) {
struct os_reltime now, res;
os_get_reltime(&now);
os_reltime_sub(&now, last, &res);
return res.sec * 1000 + res.usec / 1000;
} | ms_from_time | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void msearchreply_state_machine_handler(void *eloop_data, void *user_ctx) {
int v2;
char *v3;
sockaddr_in *p_client;
size_t v5;
const void *v6;
int v7;
char *v8;
int *v9;
char *v10;
int *v11;
int islast;
int next_timeout_msec;
int next_timeout_sec;
advertisement_state_machine *a;
upnp_wps_... | static void msearchreply_state_machine_handler(void *eloop_data,
void *user_ctx) {
struct advertisement_state_machine *a = user_ctx;
struct upnp_wps_device_sm *sm = eloop_data;
struct wpabuf *msg;
int next_timeout_msec = 100;
int next_timeout_sec = 0;
int islas... | msearchreply_state_machine_handler | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void msearchreply_state_machine_start(upnp_wps_device_sm *sm,
sockaddr_in *client, int mx) {
long v3;
unsigned char v4;
signed int replies;
advertisement_state_machine *a;
replies = dl_list_len_2(&sm->msearch_replies);
wpa_printf(2, "WPS UPnP: M-SEARCH reply start (%d ... | static void msearchreply_state_machine_start(struct upnp_wps_device_sm *sm,
struct sockaddr_in *client,
int mx) {
struct advertisement_state_machine *a;
int next_timeout_sec;
int next_timeout_msec;
int replies;
replies ... | msearchreply_state_machine_start | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void msearchreply_state_machine_stop(advertisement_state_machine *a) {
wpa_printf(2, "WPS UPnP: M-SEARCH stop");
dl_list_del_13(&a->list);
free(a);
} | void msearchreply_state_machine_stop(struct advertisement_state_machine *a) {
wpa_printf(MSG_DEBUG, "WPS UPnP: M-SEARCH stop");
dl_list_del(&a->list);
os_free(a);
} | msearchreply_state_machine_stop | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *ndef_build_p2p(const wpabuf *buf) {
return ndef_build_record(0xC2u, "application/vnd.wfa.p2p", 0x17u, 0, 0, buf);
} | struct wpabuf *ndef_build_p2p(const struct wpabuf *buf) {
return ndef_build_record(
FLAG_MESSAGE_BEGIN | FLAG_MESSAGE_END | FLAG_TNF_RFC2046,
p2p_handover_type, os_strlen(p2p_handover_type), NULL, 0, buf);
} | ndef_build_p2p | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *ndef_build_record(u8 flags, const void *type, u8 type_length, void *id,
u8 id_length, const wpabuf *payload) {
long v6;
u8 local_flag;
size_t total_len;
size_t payload_length;
wpabuf *record;
payload_length = wpabuf_len_45(payload);
if (payload_length > 0xFF)
v6 = 4;... | static struct wpabuf *ndef_build_record(u8 flags, const void *type,
u8 type_length, void *id, u8 id_length,
const struct wpabuf *payload) {
struct wpabuf *record;
size_t total_len;
int short_record;
u8 local_flag;
size_t payload_l... | ndef_build_record | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *ndef_build_wifi(const wpabuf *buf) {
return ndef_build_record(0xC2u, "application/vnd.wfa.wsc", 0x17u, 0, 0, buf);
} | struct wpabuf *ndef_build_wifi(const struct wpabuf *buf) {
return ndef_build_record(
FLAG_MESSAGE_BEGIN | FLAG_MESSAGE_END | FLAG_TNF_RFC2046,
wifi_handover_type, os_strlen(wifi_handover_type), NULL, 0, buf);
} | ndef_build_wifi | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *ndef_parse_p2p(const wpabuf *buf) {
return ndef_parse_records(buf, (int (*)(ndef_record *))p2p_filter);
} | struct wpabuf *ndef_parse_p2p(const struct wpabuf *buf) {
return ndef_parse_records(buf, p2p_filter);
} | ndef_parse_p2p | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ndef_parse_record(const u8 *data, u32 size, ndef_record *record) {
u8 *v4;
const u8 *v5;
const u8 *v6;
const u8 *v7;
u32 len;
const u8 *pos;
const u8 *posa;
const u8 *posb;
if (size <= 1)
return -1;
record->type_length = data[1];
if ((*data & 0x10) != 0) {
if (size <= 2)
return ... | static int ndef_parse_record(const u8 *data, u32 size,
struct ndef_record *record) {
const u8 *pos = data + 1;
if (size < 2)
return -1;
record->type_length = *pos++;
if (data[0] & FLAG_SHORT_RECORD) {
if (size < 3)
return -1;
record->payload_length = *pos++;
} e... | ndef_parse_record | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *ndef_parse_records(const wpabuf *buf, int (*filter)(ndef_record *)) {
signed int len;
const u8 *data;
ndef_record record;
unsigned long v6;
v6 = __readfsqword(0x28u);
len = wpabuf_len_45(buf);
data = (const u8 *)wpabuf_head_45(buf);
while (len > 0) {
if (ndef_parse_record(data, len, &record... | static struct wpabuf *ndef_parse_records(const struct wpabuf *buf,
int (*filter)(struct ndef_record *)) {
struct ndef_record record;
int len = wpabuf_len(buf);
const u8 *data = wpabuf_head(buf);
while (len > 0) {
if (ndef_parse_record(data, len, &record) < 0) {
... | ndef_parse_records | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *ndef_parse_wifi(const wpabuf *buf) {
return ndef_parse_records(buf, (int (*)(ndef_record *))wifi_filter);
} | struct wpabuf *ndef_parse_wifi(const struct wpabuf *buf) {
return ndef_parse_records(buf, wifi_filter);
} | ndef_parse_wifi | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ndisc_snoop_deinit(hostapd_data *hapd) {
l2_packet_deinit(hapd->sock_ndisc);
hapd->sock_ndisc = 0;
} | void ndisc_snoop_deinit(struct hostapd_data *hapd) {
l2_packet_deinit(hapd->sock_ndisc);
hapd->sock_ndisc = NULL;
} | ndisc_snoop_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ndisc_snoop_init(hostapd_data *hapd) {
int *v1;
char *v2;
hapd->sock_ndisc = x_snoop_get_l2_packet(
hapd, (void (*)(void *, const u8 *, const u8 *, size_t))handle_ndisc,
l2_packet_filter_type_L2_PACKET_FILTER_NDISC);
if (hapd->sock_ndisc)
return 0;
v1 = __errno_location();
v2 = strerror... | int ndisc_snoop_init(struct hostapd_data *hapd) {
hapd->sock_ndisc =
x_snoop_get_l2_packet(hapd, handle_ndisc, L2_PACKET_FILTER_NDISC);
if (hapd->sock_ndisc == NULL) {
wpa_printf(MSG_DEBUG,
"ndisc_snoop: Failed to initialize L2 packet processing for "
"NDISC packets: %s",
... | ndisc_snoop_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int netdev_info_handler(nl_msg *msg, void *arg) {
long v2;
unsigned int v3;
long v4;
const void *v5;
genlmsghdr *gnlh;
nlattr *tb[302];
unsigned long v10;
v10 = __readfsqword(0x28u);
v2 = nlmsg_hdr(msg);
gnlh = (genlmsghdr *)nlmsg_data(v2);
v3 = genlmsg_attrlen(gnlh, 0);
v4 = genlmsg_attrdata(g... | static int netdev_info_handler(struct nl_msg *msg, void *arg) {
struct nlattr *tb[NL80211_ATTR_MAX + 1];
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct wiphy_idx_data *info = arg;
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NULL);
if (tb[NL8... | netdev_info_handler | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void netlink_deinit(netlink_data *netlink) {
if (netlink) {
if (netlink->sock >= 0) {
eloop_unregister_read_sock(netlink->sock);
close(netlink->sock);
}
free(netlink->cfg);
free(netlink);
}
} | void netlink_deinit(struct netlink_data *netlink) {
if (netlink == NULL)
return;
if (netlink->sock >= 0) {
eloop_unregister_read_sock(netlink->sock);
close(netlink->sock);
}
os_free(netlink->cfg);
os_free(netlink);
} | netlink_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
netlink_data *netlink_init(netlink_config *cfg) {
int *v2;
char *v3;
int *v4;
char *v5;
netlink_data *netlink;
sockaddr_nl local;
unsigned long v8;
v8 = __readfsqword(0x28u);
netlink = (netlink_data *)os_zalloc(0x10u);
if (!netlink)
return 0;
netlink->sock = socket(16, 3, 0);
if (netlink->s... | struct netlink_data *netlink_init(struct netlink_config *cfg) {
struct netlink_data *netlink;
struct sockaddr_nl local;
netlink = os_zalloc(sizeof(*netlink));
if (netlink == NULL)
return NULL;
netlink->sock = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (netlink->sock < 0) {
wpa_printf(MSG_ERRO... | netlink_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void netlink_receive(int sock, void *eloop_ctx, void *sock_ctx) {
int *v3;
char *v4;
int nlmsg_type;
socklen_t fromlen;
int left;
int max_events;
nlmsghdr_0 *h;
netlink_data *netlink;
sockaddr_nl from;
char buf[8192];
unsigned long v13;
v13 = __readfsqword(0x28u);
netlink = (netlink_data *)el... | static void netlink_receive(int sock, void *eloop_ctx, void *sock_ctx) {
struct netlink_data *netlink = eloop_ctx;
char buf[8192];
int left;
struct sockaddr_nl from;
socklen_t fromlen;
struct nlmsghdr *h;
int max_events = 10;
try_again:
fromlen = sizeof(from);
left = recvfrom(sock, buf, sizeof(buf), ... | netlink_receive | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void netlink_receive_link(netlink_data *netlink,
void (*cb)(void *, ifinfomsg *, u8 *, size_t),
nlmsghdr_0 *h) {
if (cb) {
if ((unsigned long)h->nlmsg_len - 16 > 0xF)
cb(netlink->cfg->ctx, (ifinfomsg *)&h[1], (u8 *)&h[2],
h->nlmsg_len - 32LL);
}... | static void netlink_receive_link(struct netlink_data *netlink,
void (*cb)(void *ctx, struct ifinfomsg *ifi,
u8 *buf, size_t len),
struct nlmsghdr *h) {
if (cb == NULL || NLMSG_PAYLOAD(h, 0) < sizeof(struct if... | netlink_receive_link | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int netlink_send_oper_ifla(netlink_data *netlink, int ifindex, int linkmode,
int operstate) {
const char *v4;
const char *v5;
int *v6;
char *v7;
rtattr *rta;
rtattr *rtaa;
$7CA2F89FEE7EAF4A019E32EED08B9CDC req;
unsigned long v14;
v14 = __readfsqword(0x28u);
memset(&req, 0... | int netlink_send_oper_ifla(struct netlink_data *netlink, int ifindex,
int linkmode, int operstate) {
struct {
struct nlmsghdr hdr;
struct ifinfomsg ifinfo;
char opts[16];
} req;
struct rtattr *rta;
static int nl_seq;
ssize_t ret;
os_memset(&req, 0, sizeof(req));
re... | netlink_send_oper_ifla | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *next_advertisement(upnp_wps_device_sm *sm,
advertisement_state_machine *a, int *islast) {
dl_list *next;
advertisement_type_enum type;
const char *v6;
int v7;
char *NTString;
wpabuf *msg;
char uuid_string[88];
unsigned long v12;
v12 = __readfsqword(0x28u);
NTStrin... | static struct wpabuf *next_advertisement(struct upnp_wps_device_sm *sm,
struct advertisement_state_machine *a,
int *islast) {
struct wpabuf *msg;
char *NTString = "";
char uuid_string[80];
struct upnp_wps_device_interface *iface;
... | next_advertisement | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_abort_scan(i802_bss *bss) {
nl_msg *v1;
char *v2;
int ret;
wpa_driver_nl80211_data *drv;
drv = bss->drv;
wpa_printf(2, "nl80211: Abort scan");
v1 = nl80211_cmd_msg(bss, 0, 0x72u);
ret = send_and_recv_msgs(drv, v1, 0, 0, 0, 0);
if (ret) {
v2 = strerror(-ret);
wpa_printf(2, "nl80211... | static int nl80211_abort_scan(struct i802_bss *bss) {
int ret;
struct nl_msg *msg;
struct wpa_driver_nl80211_data *drv = bss->drv;
wpa_printf(MSG_DEBUG, "nl80211: Abort scan");
msg = nl80211_cmd_msg(bss, 0, NL80211_CMD_ABORT_SCAN);
ret = send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
if (ret) {
... | nl80211_abort_scan | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int nl80211_action_subscribe_ap(i802_bss *bss) {
int ret;
ret = 0;
if (nl80211_register_action_frame(bss, &byte_1CFFA6, 1u) < 0)
ret = -1;
if (nl80211_register_action_frame(bss, &byte_1CFFA8, 2u) < 0)
ret = -1;
if (nl80211_register_action_frame(bss, &byte_1CFFAB, 2u) < 0)
ret = -1;
if (nl80211_... | static int nl80211_action_subscribe_ap(struct i802_bss *bss) {
int ret = 0;
if (nl80211_register_action_frame(bss, (u8 *)"\x04", 1) < 0)
ret = -1;
if (nl80211_register_action_frame(bss, (u8 *)"\x05\x01", 2) < 0)
ret = -1;
if (nl80211_register_action_frame(bss, (u8 *)"\x05\x03", 2) < 0)
ret = -1;
... | nl80211_action_subscribe_ap | 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.