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 fst_session_delete(fst_session *s) {
fst_ctrl_handle *__fst_ctrl_h;
wpa_printf(3, "FST: Session %u deleted", s->id);
dl_list_del_23(&s->global_sessions_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;... | void fst_session_delete(struct fst_session *s) {
fst_printf(MSG_INFO, "Session %u deleted", s->id);
dl_list_del(&s->global_sessions_lentry);
foreach_fst_ctrl_call(on_session_removed, s);
os_free(s);
} | fst_session_delete | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_enum(fst_group *g, fst_session_enum_clb clb, void *ctx) {
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 || g == s->group)
clb(s->g... | void fst_session_enum(struct fst_group *g, fst_session_enum_clb clb,
void *ctx) {
struct fst_session *s;
foreach_fst_session(s) {
if (!g || s->group == g)
clb(s->group, s, ctx);
}
} | fst_session_enum | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *fst_session_event_type_name(fst_event_type event) {
return fst_get_str_name(event, session_event_names, 4u);
} | const char *fst_session_event_type_name(enum fst_event_type event) {
return fst_get_str_name(event, session_event_names,
ARRAY_SIZE(session_event_names));
} | fst_session_event_type_name | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
fst_session *fst_session_get_by_id(u32 id) {
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 (id == s->id)
return s;
}
return 0;
} | struct fst_session *fst_session_get_by_id(u32 id) {
struct fst_session *s;
foreach_fst_session(s) {
if (id == s->id)
return s;
}
return NULL;
} | fst_session_get_by_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
fst_group *fst_session_get_group(fst_session *s) { return s->group; } | struct fst_group *fst_session_get_group(struct fst_session *s) {
return s->group;
} | fst_session_get_group | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u32 fst_session_get_id(fst_session *s) { return s->id; } | u32 fst_session_get_id(struct fst_session *s) { return s->id; } | fst_session_get_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
fst_iface *fst_session_get_iface(fst_session *s, bool is_old) {
if (is_old)
return s->data.old_iface;
else
return s->data.new_iface;
} | struct fst_iface *fst_session_get_iface(struct fst_session *s, bool is_old) {
return is_old ? s->data.old_iface : s->data.new_iface;
} | fst_session_get_iface | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u32 fst_session_get_llt(fst_session *s) { return s->data.llt_ms; } | u32 fst_session_get_llt(struct fst_session *s) { return s->data.llt_ms; } | fst_session_get_llt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const u8 *fst_session_get_peer_addr(fst_session *s, bool is_old) {
if (is_old)
return s->data.old_peer_addr;
else
return s->data.new_peer_addr;
} | const u8 *fst_session_get_peer_addr(struct fst_session *s, bool is_old) {
return is_old ? s->data.old_peer_addr : s->data.new_peer_addr;
} | fst_session_get_peer_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
fst_session_state fst_session_get_state(fst_session *s) { return s->state; } | enum fst_session_state fst_session_get_state(struct fst_session *s) {
return s->state;
} | fst_session_get_state | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_global_deinit() { ; } | void fst_session_global_deinit(void) {
WPA_ASSERT(dl_list_empty(&global_sessions_list));
} | fst_session_global_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
fst_session *fst_session_global_get_first_by_group(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)
return s;
}
return... | struct fst_session *fst_session_global_get_first_by_group(struct fst_group *g) {
struct fst_session *s;
foreach_fst_session(s) {
if (s->group == g)
return s;
}
return NULL;
} | fst_session_global_get_first_by_group | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_global_inc_id() {
if (++global_session_id == -1)
global_session_id = 0;
} | static void fst_session_global_inc_id(void) {
global_session_id++;
if (global_session_id == FST_INVALID_SESSION_ID)
global_session_id++;
} | fst_session_global_inc_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_global_init() {
dl_list_init_18(&global_sessions_list);
return 0;
} | int fst_session_global_init(void) {
dl_list_init(&global_sessions_list);
return 0;
} | fst_session_global_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_global_on_iface_detached(fst_iface *iface) {
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 (fst_session_is_in_progress(s) &&
(iface ... | void fst_session_global_on_iface_detached(struct fst_iface *iface) {
struct fst_session *s;
foreach_fst_session(s) {
if (fst_session_is_in_progress(s) &&
(s->data.new_iface == iface || s->data.old_iface == iface))
fst_session_reset_ex(s, REASON_DETACH_IFACE);
}
} | fst_session_global_on_iface_detached | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_handle_ack_request(fst_session *s, fst_iface *iface,
const ieee80211_mgmt *mgmt,
size_t frame_len) {
const char *v4;
const char *v5;
const char *v6;
le32 fsts_id;
const char *v8;
const char *name_2;
fst_ack_res res;
... | static void fst_session_handle_ack_request(struct fst_session *s,
struct fst_iface *iface,
const struct ieee80211_mgmt *mgmt,
size_t frame_len) {
const struct fst_ack_req *req;
size_t ple... | fst_session_handle_ack_request | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_handle_ack_response(fst_session *s, fst_iface *iface,
const ieee80211_mgmt *mgmt,
size_t frame_len) {
const char *v4;
const char *v5;
const char *v6;
int v7;
const char *name_2;
size_t plen;
fst_session_state_switch... | static void fst_session_handle_ack_response(struct fst_session *s,
struct fst_iface *iface,
const struct ieee80211_mgmt *mgmt,
size_t frame_len) {
const struct fst_ack_res *res;
size_t... | fst_session_handle_ack_response | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_handle_action(fst_session *s, fst_iface *iface,
const ieee80211_mgmt *mgmt, size_t frame_len) {
const char *name_2;
switch (mgmt->u.beacon.timestamp[1]) {
case 0u:
return;
case 1u:
fst_session_handle_setup_response(s, iface, mgmt, frame_len);
break;
... | void fst_session_handle_action(struct fst_session *s, struct fst_iface *iface,
const struct ieee80211_mgmt *mgmt,
size_t frame_len) {
switch (mgmt->u.action.u.fst_action.action) {
case FST_ACTION_SETUP_REQUEST:
WPA_ASSERT(0);
break;
case FST_AC... | fst_session_handle_action | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_handle_setup_request(fst_iface *iface,
const ieee80211_mgmt *mgmt,
size_t frame_len) {
const char *name_2;
fst_group *group_2;
const char *id_2;
const char *v6;
fst_group *v7;
const char *v8;
const char *v9;
fst... | static void fst_session_handle_setup_request(struct fst_iface *iface,
const struct ieee80211_mgmt *mgmt,
size_t frame_len) {
struct fst_session *s;
const struct fst_setup_req *req;
struct fst_iface *new_iface = NULL;
struc... | fst_session_handle_setup_request | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_handle_setup_response(fst_session *s, fst_iface *iface,
const ieee80211_mgmt *mgmt,
size_t frame_len) {
const char *v4;
const char *v5;
const char *v6;
fst_group *group_2;
const char *id_2;
u32 llt_ms;
const cha... | static void fst_session_handle_setup_response(struct fst_session *s,
struct fst_iface *iface,
const struct ieee80211_mgmt *mgmt,
size_t frame_len) {
const struct fst_setup_res *res... | fst_session_handle_setup_response | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_handle_tear_down(fst_session *s, fst_iface *iface,
const ieee80211_mgmt *mgmt,
size_t frame_len) {
int v4;
const char *name_2;
fst_session_state_switch_extra evext;
unsigned long v7;
v7 = __readfsqword(0x28u);
*(_QWORD *)&... | static void fst_session_handle_tear_down(struct fst_session *s,
struct fst_iface *iface,
const struct ieee80211_mgmt *mgmt,
size_t frame_len) {
const struct fst_tear_down *td;
size_t plen = fra... | fst_session_handle_tear_down | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_initiate_setup(fst_session *s) {
u32 llt_ms;
const char *name_2;
const char *v4;
const wpabuf *mbie;
const char *v6;
u8 dialog_token;
le32 fsts_id;
int res;
fst_session *_s;
fst_session *_sa;
fst_setup_req req;
unsigned long v13;
v13 = __readfsqword(0x28u);
if (fst_session_i... | int fst_session_initiate_setup(struct fst_session *s) {
struct fst_setup_req req;
int res;
u32 fsts_id;
u8 dialog_token;
struct fst_session *_s;
if (fst_session_is_in_progress(s)) {
fst_printf_session(s, MSG_ERROR, "Session in progress");
return -EINVAL;
}
if (is_zero_ether_addr(s->data.old_pe... | fst_session_initiate_setup | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_initiate_switch(fst_session *s) {
const char *name_2;
const char *v3;
const char *v4;
u8 dialog_token;
int res;
fst_ack_req req;
unsigned long v8;
v8 = __readfsqword(0x28u);
if (fst_session_is_ready(s)) {
dialog_token = fst_group_assign_dialog_token(s->group);
name_2 = fst_ifa... | int fst_session_initiate_switch(struct fst_session *s) {
struct fst_ack_req req;
int res;
u8 dialog_token;
if (!fst_session_is_ready(s)) {
fst_printf_session(s, MSG_ERROR,
"cannot initiate switch due to wrong setup state (%d)",
s->state);
return -1;
}
... | fst_session_initiate_switch | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_is_in_progress(fst_session *s) {
return s->state != fst_session_state_FST_SESSION_STATE_INITIAL;
} | static int fst_session_is_in_progress(struct fst_session *s) {
return s->state != FST_SESSION_STATE_INITIAL;
} | fst_session_is_in_progress | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
bool fst_session_is_in_transition(fst_session *s) { return s->stt_armed; } | static bool fst_session_is_in_transition(struct fst_session *s) {
return s->stt_armed;
} | fst_session_is_in_transition | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_is_ready(fst_session *s) {
return s->state == fst_session_state_FST_SESSION_STATE_SETUP_COMPLETION &&
!fst_session_is_in_transition(s);
} | static int fst_session_is_ready(struct fst_session *s) {
return s->state == FST_SESSION_STATE_SETUP_COMPLETION &&
!fst_session_is_in_transition(s);
} | fst_session_is_ready | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_is_ready_pending(fst_session *s) {
return s->state == fst_session_state_FST_SESSION_STATE_SETUP_COMPLETION &&
fst_session_is_in_transition(s);
} | static int fst_session_is_ready_pending(struct fst_session *s) {
return s->state == FST_SESSION_STATE_SETUP_COMPLETION &&
fst_session_is_in_transition(s);
} | fst_session_is_ready_pending | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_is_switch_requested(fst_session *s) {
return s->state == fst_session_state_FST_SESSION_STATE_TRANSITION_DONE &&
fst_session_is_in_transition(s);
} | static int fst_session_is_switch_requested(struct fst_session *s) {
return s->state == FST_SESSION_STATE_TRANSITION_DONE &&
fst_session_is_in_transition(s);
} | fst_session_is_switch_requested | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_notify_ctrl(fst_session *s, fst_event_type event_type,
fst_event_extra *extra) {
fst_ctrl_handle *__fst_ctrl_h;
for (__fst_ctrl_h = (fst_ctrl_handle *)&fst_global_ctrls_list.next[-5].prev;
&__fst_ctrl_h->global_ctrls_lentry != &fst_global_ctrls_list;
__fs... | static inline void fst_session_notify_ctrl(struct fst_session *s,
enum fst_event_type event_type,
union fst_event_extra *extra) {
foreach_fst_ctrl_call(on_event, event_type, NULL, s, extra);
} | fst_session_notify_ctrl | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_on_action_rx(fst_iface *iface, const ieee80211_mgmt *mgmt,
size_t len) {
const char *v3;
fst_group *v4;
const char *v5;
const char *v6;
const char *v7;
fst_group *v8;
const char *v9;
int v10;
const char *name_2;
fst_group *group_2;
const char *id_2;
... | void fst_session_on_action_rx(struct fst_iface *iface,
const struct ieee80211_mgmt *mgmt, size_t len) {
struct fst_session *s;
if (len < IEEE80211_HDRLEN + 2 ||
mgmt->u.action.category != WLAN_ACTION_FST) {
fst_printf_iface(iface, MSG_ERROR, "invalid Action frame received");... | fst_session_on_action_rx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_reset(fst_session *s) {
fst_session_reset_ex(s, fst_reason_REASON_RESET);
} | void fst_session_reset(struct fst_session *s) {
fst_session_reset_ex(s, REASON_RESET);
} | fst_session_reset | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_reset_ex(fst_session *s, fst_reason reason) {
fst_session_state_switch_extra evext;
unsigned long v3;
v3 = __readfsqword(0x28u);
evext.to_initial.initiator = fst_initiator_FST_INITIATOR_UNDEFINED;
*(_QWORD *)&evext.to_initial.reason = (unsigned int)reason;
if (s->state == fst_session_state... | static void fst_session_reset_ex(struct fst_session *s,
enum fst_reason reason) {
union fst_session_state_switch_extra evext = {
.to_initial =
{
.reason = reason,
},
};
if (s->state == FST_SESSION_STATE_SETUP_COMPLETION ||
s->state ==... | fst_session_reset_ex | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_respond(fst_session *s, u8 status_code) {
const char *v2;
u32 llt_ms;
const char *v5;
const char *v6;
const char *name_2;
const wpabuf *mbie;
const char *v9;
const char *v10;
u8 channel;
hostapd_hw_mode hw_mode;
fst_session_state_switch_extra evext;
fst_setup_res res;
unsigned ... | int fst_session_respond(struct fst_session *s, u8 status_code) {
struct fst_setup_res res;
enum hostapd_hw_mode hw_mode;
u8 channel;
if (!fst_session_is_ready_pending(s)) {
fst_printf_session(s, MSG_ERROR, "incorrect state: %s",
fst_session_state_name(s->state));
return -EINVAL;
... | fst_session_respond | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_send_action(fst_session *s, bool old_iface, const void *payload,
size_t size, const wpabuf *extra_buf) {
fst_iface *new_iface;
const char *v6;
fst_session *new_peer_addr;
const char *v9;
const char *name_2;
u8 action;
int res;
size_t len;
fst_iface *iface;
... | static int fst_session_send_action(struct fst_session *s, bool old_iface,
const void *payload, size_t size,
const struct wpabuf *extra_buf) {
size_t len;
int res;
struct wpabuf *buf;
u8 action;
struct fst_iface *iface = old_iface ? s->data.... | fst_session_send_action | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_send_tear_down(fst_session *s) {
const char *name_2;
int res;
fst_tear_down td;
unsigned long v5;
v5 = __readfsqword(0x28u);
if (fst_session_is_in_progress(s)) {
memset(&td, 0, sizeof(td));
td.action = 2;
td.fsts_id = s->data.fsts_id;
res = fst_session_send_action(s, 1, &td,... | static int fst_session_send_tear_down(struct fst_session *s) {
struct fst_tear_down td;
int res;
if (!fst_session_is_in_progress(s)) {
fst_printf_session(s, MSG_ERROR, "No FST setup to tear down");
return -1;
}
WPA_ASSERT(s->data.old_iface != NULL);
WPA_ASSERT(s->data.new_iface != NULL);
os_mem... | fst_session_send_tear_down | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_set_iface(fst_session *s, fst_iface *iface, bool is_old) {
if (is_old)
s->data.old_iface = iface;
else
s->data.new_iface = iface;
} | void fst_session_set_iface(struct fst_session *s, struct fst_iface *iface,
bool is_old) {
if (is_old)
s->data.old_iface = iface;
else
s->data.new_iface = iface;
} | fst_session_set_iface | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_set_llt(fst_session *s, u32 llt) { s->data.llt_ms = llt; } | void fst_session_set_llt(struct fst_session *s, u32 llt) {
s->data.llt_ms = llt;
} | fst_session_set_llt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_set_peer_addr(fst_session *s, const u8 *addr, bool is_old) {
fst_session *new_peer_addr;
if (is_old)
new_peer_addr = s;
else
new_peer_addr = (fst_session *)s->data.new_peer_addr;
memcpy(new_peer_addr, addr, 6u);
} | void fst_session_set_peer_addr(struct fst_session *s, const u8 *addr,
bool is_old) {
u8 *a = is_old ? s->data.old_peer_addr : s->data.new_peer_addr;
os_memcpy(a, addr, ETH_ALEN);
} | fst_session_set_peer_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_set_state(fst_session *s, fst_session_state state,
fst_session_state_switch_extra *extra) {
const char *v3;
const char *v4;
fst_event_extra evext;
unsigned long v6;
v6 = __readfsqword(0x28u);
if (state != s->state) {
memset(&evext, 0, sizeof(evext));
evex... | static void fst_session_set_state(struct fst_session *s,
enum fst_session_state state,
union fst_session_state_switch_extra *extra) {
if (s->state != state) {
union fst_event_extra evext = {
.session_state =
{
... | fst_session_set_state | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_set_str_ifname(fst_session *s, const char *ifname,
bool is_old) {
const char *id_2;
fst_group *g;
fst_iface *i;
g = fst_session_get_group(s);
i = fst_group_get_iface_by_name(g, ifname);
if (i) {
fst_session_set_iface(s, i, is_old);
return 0;
} else {... | int fst_session_set_str_ifname(struct fst_session *s, const char *ifname,
bool is_old) {
struct fst_group *g = fst_session_get_group(s);
struct fst_iface *i;
i = fst_group_get_iface_by_name(g, ifname);
if (!i) {
fst_printf_session(s, MSG_WARNING,
"Canno... | fst_session_set_str_ifname | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_set_str_llt(fst_session *s, const char *llt_str) {
char *endp;
long llt;
unsigned long v5;
v5 = __readfsqword(0x28u);
llt = strtol(llt_str, &endp, 0);
if (*endp || (unsigned long)llt >= 0x40000000) {
wpa_printf(4,
"FST: %u (0x%08x): "
"[%02x:%02x:%02x:%02x:... | int fst_session_set_str_llt(struct fst_session *s, const char *llt_str) {
char *endp;
long int llt = strtol(llt_str, &endp, 0);
if (*endp || llt < 0 || (unsigned long int)llt > FST_MAX_LLT_MS) {
fst_printf_session(s, MSG_WARNING,
"Cannot set llt %s: Invalid llt value (1..%u expected)",... | fst_session_set_str_llt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_set_str_peer_addr(fst_session *s, const char *mac,
bool is_old) {
int res;
u8 peer_addr[6];
unsigned long v7;
v7 = __readfsqword(0x28u);
res = fst_read_peer_addr(mac, peer_addr);
if (res)
return res;
fst_session_set_peer_addr(s, peer_addr, is_old);
... | int fst_session_set_str_peer_addr(struct fst_session *s, const char *mac,
bool is_old) {
u8 peer_addr[ETH_ALEN];
int res = fst_read_peer_addr(mac, peer_addr);
if (res)
return res;
fst_session_set_peer_addr(s, peer_addr, is_old);
return 0;
} | fst_session_set_str_peer_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *fst_session_state_name(fst_session_state state) {
return fst_get_str_name(state, session_state_names, 4u);
} | const char *fst_session_state_name(enum fst_session_state state) {
return fst_get_str_name(state, session_state_names,
ARRAY_SIZE(session_state_names));
} | fst_session_state_name | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_stt_arm(fst_session *s) {
eloop_register_timeout(0, (unsigned int)&loc_7F800,
(eloop_timeout_handler)fst_session_timeout_handler, 0,
s);
s->stt_armed = 1;
} | static void fst_session_stt_arm(struct fst_session *s) {
eloop_register_timeout(0, 2 * TU_TO_US(FST_DEFAULT_SESSION_TIMEOUT_TU),
fst_session_timeout_handler, NULL, s);
s->stt_armed = true;
} | fst_session_stt_arm | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_stt_disarm(fst_session *s) {
if (s->stt_armed) {
eloop_cancel_timeout((eloop_timeout_handler)fst_session_timeout_handler, 0,
s);
s->stt_armed = 0;
}
} | static void fst_session_stt_disarm(struct fst_session *s) {
if (s->stt_armed) {
eloop_cancel_timeout(fst_session_timeout_handler, NULL, s);
s->stt_armed = false;
}
} | fst_session_stt_disarm | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_session_tear_down_setup(fst_session *s) {
int res;
fst_session_state_switch_extra evext;
unsigned long v4;
v4 = __readfsqword(0x28u);
*(_QWORD *)&evext.to_initial.reason = 0;
evext.to_initial.initiator = fst_initiator_FST_INITIATOR_LOCAL;
res = fst_session_send_tear_down(s);
fst_session_set_sta... | int fst_session_tear_down_setup(struct fst_session *s) {
int res;
union fst_session_state_switch_extra evext = {
.to_initial =
{
.reason = REASON_TEARDOWN,
.initiator = FST_INITIATOR_LOCAL,
},
};
res = fst_session_send_tear_down(s);
fst_session_set_state... | fst_session_tear_down_setup | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_session_timeout_handler(void *eloop_data, void *user_ctx) {
fst_session_state_switch_extra extra;
unsigned long v3;
v3 = __readfsqword(0x28u);
*(_QWORD *)&extra.to_initial.reason = 3;
extra.to_initial.initiator = fst_initiator_FST_INITIATOR_UNDEFINED;
wpa_printf(4,
"FST: %u (0x%08x): ... | static void fst_session_timeout_handler(void *eloop_data, void *user_ctx) {
struct fst_session *s = user_ctx;
union fst_session_state_switch_extra extra = {
.to_initial =
{
.reason = REASON_STT,
},
};
fst_printf_session(s, MSG_WARNING, "Session State Timeout");
fst_ses... | fst_session_timeout_handler | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u32 fst_test_req_get_fsts_id(const char *params) {
bool is_valid;
int sid;
char *endp;
fst_session *s;
unsigned long v6;
v6 = __readfsqword(0x28u);
if (*params != 32)
return -1;
sid = fst_read_next_int_param(params + 1, &is_valid, &endp);
if (!is_valid)
return -1;
s = fst_session_get_by_id(... | u32 fst_test_req_get_fsts_id(const char *params) {
int sid;
bool is_valid;
char *endp;
struct fst_session *s;
if (params[0] != ' ')
return FST_FSTS_ID_NOT_FOUND;
params++;
sid = fst_read_next_int_param(params, &is_valid, &endp);
if (!is_valid)
return FST_FSTS_ID_NOT_FOUND;
s = fst_session_ge... | fst_test_req_get_fsts_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_test_req_get_local_mbies(const char *request, char *buf,
size_t buflen) {
fst_group *v4;
size_t v5;
const u8 *v6;
char *endp;
fst_group *g;
fst_iface *iface;
char ifname[24];
unsigned long v12;
v12 = __readfsqword(0x28u);
if (*request != 32)
return -22;
... | int fst_test_req_get_local_mbies(const char *request, char *buf,
size_t buflen) {
char *endp;
char ifname[FST_MAX_COMMAND_WORD_NAME_LENGTH];
struct fst_group *g;
struct fst_iface *iface;
if (request[0] != ' ')
return -EINVAL;
request++;
if (fst_read_next_text_param(re... | fst_test_req_get_local_mbies | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_test_req_send_ack_request(const char *params) {
bool is_valid;
int fsts_id;
fst_ack_req req;
char *endp;
fst_group *g;
fst_session s;
unsigned long v8;
v8 = __readfsqword(0x28u);
if (*params != 32)
return -22;
fsts_id = fst_read_next_int_param(params + 1, &is_valid, &endp);
if (!is_va... | int fst_test_req_send_ack_request(const char *params) {
int fsts_id;
bool is_valid;
char *endp;
struct fst_ack_req req;
struct fst_session s;
struct fst_group *g;
if (params[0] != ' ')
return -EINVAL;
params++;
fsts_id = fst_read_next_int_param(params, &is_valid, &endp);
if (!is_valid)
retu... | fst_test_req_send_ack_request | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_test_req_send_ack_response(const char *params) {
bool is_valid;
int fsts_id;
fst_ack_res res;
char *endp;
fst_group *g;
fst_session s;
unsigned long v8;
v8 = __readfsqword(0x28u);
if (*params != 32)
return -22;
fsts_id = fst_read_next_int_param(params + 1, &is_valid, &endp);
if (!is_v... | int fst_test_req_send_ack_response(const char *params) {
int fsts_id;
bool is_valid;
char *endp;
struct fst_ack_res res;
struct fst_session s;
struct fst_group *g;
if (params[0] != ' ')
return -EINVAL;
params++;
fsts_id = fst_read_next_int_param(params, &is_valid, &endp);
if (!is_valid)
ret... | fst_test_req_send_ack_response | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_test_req_send_fst_request(const char *params) {
bool is_valid;
u8 channel;
hostapd_hw_mode hw_mode;
int fsts_id;
char *endp;
fst_group *g;
fst_setup_req req;
fst_session s;
char additional_param[24];
unsigned long v11;
v11 = __readfsqword(0x28u);
if (*params != 32)
return -22;
fst... | int fst_test_req_send_fst_request(const char *params) {
int fsts_id;
bool is_valid;
char *endp;
struct fst_setup_req req;
struct fst_session s;
struct fst_group *g;
enum hostapd_hw_mode hw_mode;
u8 channel;
char additional_param[FST_MAX_COMMAND_WORD_NAME_LENGTH];
if (params[0] != ' ')
return -E... | fst_test_req_send_fst_request | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_test_req_send_fst_response(const char *params) {
fst_group *v2;
const u8 *peer_addr;
u8 pending_setup_req_dlgt;
bool is_valid;
u8 channel;
u8 status_code;
hostapd_hw_mode hw_mode;
int fsts_id;
char *endp;
fst_group *g;
fst_session *_s;
fst_setup_res res;
fst_session s;
char response[... | int fst_test_req_send_fst_response(const char *params) {
int fsts_id;
bool is_valid;
char *endp;
struct fst_setup_res res;
struct fst_session s;
struct fst_group *g;
enum hostapd_hw_mode hw_mode;
u8 status_code;
u8 channel;
char response[FST_MAX_COMMAND_WORD_NAME_LENGTH];
struct fst_session *_s;
... | fst_test_req_send_fst_response | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int fst_test_req_send_tear_down(const char *params) {
bool is_valid;
int fsts_id;
fst_tear_down td;
char *endp;
fst_group *g;
fst_session s;
unsigned long v8;
v8 = __readfsqword(0x28u);
if (*params != 32)
return -22;
fsts_id = fst_read_next_int_param(params + 1, &is_valid, &endp);
if (!is_val... | int fst_test_req_send_tear_down(const char *params) {
int fsts_id;
bool is_valid;
char *endp;
struct fst_tear_down td;
struct fst_session s;
struct fst_group *g;
if (params[0] != ' ')
return -EINVAL;
params++;
fsts_id = fst_read_next_int_param(params, &is_valid, &endp);
if (!is_valid)
retur... | fst_test_req_send_tear_down | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void fst_update_mac_addr(fst_iface *iface, const u8 *addr) {
int v2;
int v3;
int v4;
int v5;
const char *name;
fst_group *group;
const char *id;
fst_group *v9;
int v10;
int v11;
v2 = addr[5];
v3 = addr[4];
v4 = addr[3];
v5 = addr[2];
v11 = addr[1];
v10 = *addr;
name = fst_iface_get_na... | void fst_update_mac_addr(struct fst_iface *iface, const u8 *addr) {
fst_printf_iface(iface, MSG_DEBUG, "new MAC address " MACSTR, MAC2STR(addr));
os_memcpy(iface->own_addr, addr, sizeof(iface->own_addr));
fst_group_update_ie(fst_iface_get_group(iface));
} | fst_update_mac_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ft_check_msg_2_of_4(wpa_authenticator *wpa_auth, wpa_state_machine *sm,
wpa_eapol_ie_parse *kde) {
long v4;
const char *v5;
wpa_ie_data ie;
unsigned long v8;
v8 = __readfsqword(0x28u);
if (wpa_parse_wpa_ie_rsn(kde->rsn_ie, kde->rsn_ie_len, &ie) >= 0 &&
ie.num_pmkid == 1 &&... | static int ft_check_msg_2_of_4(struct wpa_authenticator *wpa_auth,
struct wpa_state_machine *sm,
struct wpa_eapol_ie_parse *kde) {
struct wpa_ie_data ie;
struct rsn_mdie *mdie;
if (wpa_parse_wpa_ie_rsn(kde->rsn_ie, kde->rsn_ie_len, &ie) < 0 ||
i... | ft_check_msg_2_of_4 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ft_finish_pull(wpa_state_machine *sm) {
size_t v1;
const u8 *v2;
int res;
u8 *resp_ies;
size_t resp_ies_len[3];
resp_ies_len[1] = __readfsqword(0x28u);
if (sm->ft_pending_cb && sm->ft_pending_req_ies) {
v1 = wpabuf_len_17(sm->ft_pending_req_ies);
v2 = (const u8 *)wpabuf_head_16(sm->ft_pendin... | static void ft_finish_pull(struct wpa_state_machine *sm) {
int res;
u8 *resp_ies;
size_t resp_ies_len;
u16 status;
if (!sm->ft_pending_cb || !sm->ft_pending_req_ies)
return;
res = wpa_ft_process_auth_req(sm, wpabuf_head(sm->ft_pending_req_ies),
wpabuf_len(sm->ft_pending... | ft_finish_pull | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ft_get_sta_cb(wpa_state_machine *sm, void *ctx) {
if (*((_QWORD *)ctx + 1) && memcmp(*((const void **)ctx + 1), sm->addr, 6u) ||
memcmp(*(const void **)ctx, sm->ft_pending_pull_nonce, 0x10u) ||
!sm->ft_pending_cb || !sm->ft_pending_req_ies) {
return 0;
}
*((_QWORD *)ctx + 2) = sm;
return 1;
... | static int ft_get_sta_cb(struct wpa_state_machine *sm, void *ctx) {
struct ft_get_sta_ctx *info = ctx;
if ((info->s1kh_id && os_memcmp(info->s1kh_id, sm->addr, ETH_ALEN) != 0) ||
os_memcmp(info->nonce, sm->ft_pending_pull_nonce, FT_RRB_NONCE_LEN) !=
0 ||
sm->ft_pending_cb == NULL || sm->ft_pe... | ft_get_sta_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void full_dynamic_vlan_deinit(full_dynamic_vlan *priv) {
if (priv) {
eloop_unregister_read_sock(priv->s);
close(priv->s);
free(priv);
}
} | void full_dynamic_vlan_deinit(struct full_dynamic_vlan *priv) {
if (priv == NULL)
return;
eloop_unregister_read_sock(priv->s);
close(priv->s);
os_free(priv);
} | full_dynamic_vlan_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
full_dynamic_vlan *full_dynamic_vlan_init(hostapd_data *hapd) {
unsigned int v2;
int *v3;
char *v4;
int *v5;
char *v6;
full_dynamic_vlan *priv;
sockaddr_nl local;
unsigned long v9;
v9 = __readfsqword(0x28u);
priv = (full_dynamic_vlan *)os_zalloc(4u);
if (!priv)
return 0;
if (hapd->conf->ssi... | struct full_dynamic_vlan *full_dynamic_vlan_init(struct hostapd_data *hapd) {
struct sockaddr_nl local;
struct full_dynamic_vlan *priv;
priv = os_zalloc(sizeof(*priv));
if (priv == NULL)
return NULL;
vlan_set_name_type(hapd->conf->ssid.vlan_naming ==
DYNAMIC_VLAN_NAMING_WITH... | full_dynamic_vlan_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_add_adv_proto_anqp(wpabuf *buf, u8 query_resp_len_limit, u8 pame_bi) {
char v3;
wpabuf_put_u8_42(buf, 0x6Cu);
wpabuf_put_u8_42(buf, 2u);
if (pame_bi)
v3 = 0x80;
else
v3 = 0;
wpabuf_put_u8_42(buf, v3 | query_resp_len_limit & 0x7F);
wpabuf_put_u8_42(buf, 0);
} | static void gas_add_adv_proto_anqp(struct wpabuf *buf, u8 query_resp_len_limit,
u8 pame_bi) {
wpabuf_put_u8(buf, WLAN_EID_ADV_PROTO);
wpabuf_put_u8(buf, 2);
wpabuf_put_u8(buf, (query_resp_len_limit & 0x7f) | (pame_bi ? 0x80 : 0));
wpabuf_put_u8(buf, ACCESS_NETWORK_QUERY_PROT... | gas_add_adv_proto_anqp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u8 *gas_anqp_add_element(wpabuf *buf, u16 info_id) {
wpabuf_put_le16_7(buf, info_id);
return (u8 *)wpabuf_put(buf, 2u);
} | u8 *gas_anqp_add_element(struct wpabuf *buf, u16 info_id) {
wpabuf_put_le16(buf, info_id);
return wpabuf_put(buf, 2);
} | gas_anqp_add_element | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *gas_anqp_build_comeback_resp(u8 dialog_token, u16 status_code,
u8 frag_id, u8 more, u16 comeback_delay,
size_t size) {
wpabuf *buf;
buf = gas_build_comeback_resp(dialog_token, status_code, frag_id, more,
... | struct wpabuf *gas_anqp_build_comeback_resp(u8 dialog_token, u16 status_code,
u8 frag_id, u8 more,
u16 comeback_delay, size_t size) {
struct wpabuf *buf;
buf = gas_build_comeback_resp(dialog_token, status_code, frag_id, more,
... | gas_anqp_build_comeback_resp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *gas_anqp_build_comeback_resp_buf(u8 dialog_token, u16 status_code,
u8 frag_id, u8 more,
u16 comeback_delay, wpabuf *payload) {
size_t v6;
wpabuf *buf;
if (payload)
v6 = wpabuf_len_74(payload);
else
v6 = 0;
buf =... | struct wpabuf *gas_anqp_build_comeback_resp_buf(u8 dialog_token,
u16 status_code, u8 frag_id,
u8 more, u16 comeback_delay,
struct wpabuf *payload) {
struct wpabuf *buf;
bu... | gas_anqp_build_comeback_resp_buf | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *gas_anqp_build_initial_req(u8 dialog_token, size_t size) {
wpabuf *buf;
buf = gas_build_initial_req(dialog_token, size + 4);
if (!buf)
return 0;
gas_add_adv_proto_anqp(buf, 0, 0);
wpabuf_put(buf, 2u);
return buf;
} | struct wpabuf *gas_anqp_build_initial_req(u8 dialog_token, size_t size) {
struct wpabuf *buf;
buf = gas_build_initial_req(dialog_token, 4 + size);
if (buf == NULL)
return NULL;
gas_add_adv_proto_anqp(buf, 0, 0);
wpabuf_put(buf, 2);
return buf;
} | gas_anqp_build_initial_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *gas_anqp_build_initial_resp(u8 dialog_token, u16 status_code,
u16 comeback_delay, size_t size) {
wpabuf *buf;
buf = gas_build_initial_resp(dialog_token, status_code, comeback_delay,
size + 4);
if (!buf)
return 0;
gas_add_adv_proto_a... | struct wpabuf *gas_anqp_build_initial_resp(u8 dialog_token, u16 status_code,
u16 comeback_delay, size_t size) {
struct wpabuf *buf;
buf = gas_build_initial_resp(dialog_token, status_code, comeback_delay,
4 + size);
if (buf == NULL)
ret... | gas_anqp_build_initial_resp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *gas_anqp_build_initial_resp_buf(u8 dialog_token, u16 status_code,
u16 comeback_delay, wpabuf *payload) {
size_t v4;
wpabuf *buf;
if (payload)
v4 = wpabuf_len_74(payload);
else
v4 = 0;
buf = gas_anqp_build_initial_resp(dialog_token, status_code, comeback... | struct wpabuf *gas_anqp_build_initial_resp_buf(u8 dialog_token, u16 status_code,
u16 comeback_delay,
struct wpabuf *payload) {
struct wpabuf *buf;
buf = gas_anqp_build_initial_resp(dialog_token, status_code, comeback_dela... | gas_anqp_build_initial_resp_buf | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_anqp_set_element_len(wpabuf *buf, u8 *len_pos) {
u16 v2;
v2 = (unsigned short)wpabuf_put(buf, 0) - (_WORD)len_pos - 2;
WPA_PUT_LE16_21(len_pos, v2);
} | void gas_anqp_set_element_len(struct wpabuf *buf, u8 *len_pos) {
WPA_PUT_LE16(len_pos, (u8 *)wpabuf_put(buf, 0) - len_pos - 2);
} | gas_anqp_set_element_len | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_anqp_set_len(wpabuf *buf) {
int v1;
u16 v2;
size_t offset;
u8 *len;
if (buf && wpabuf_len_74(buf) > 1) {
v1 = wpabuf_head_u8_18(buf)[1];
if (v1 == 13) {
offset = 12;
} else {
if (v1 > 13)
return;
if (v1 == 10) {
offset = 7;
} else {
if (v1 ... | void gas_anqp_set_len(struct wpabuf *buf) {
u8 action;
size_t offset;
u8 *len;
if (buf == NULL || wpabuf_len(buf) < 2)
return;
action = *(wpabuf_head_u8(buf) + 1);
switch (action) {
case WLAN_PA_GAS_INITIAL_REQ:
offset = 3 + 4;
break;
case WLAN_PA_GAS_INITIAL_RESP:
offset = 7 + 4;
... | gas_anqp_set_len | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *gas_build_comeback_req(u8 dialog_token) {
return gas_build_req(0xCu, dialog_token, 0);
} | struct wpabuf *gas_build_comeback_req(u8 dialog_token) {
return gas_build_req(WLAN_PA_GAS_COMEBACK_REQ, dialog_token, 0);
} | gas_build_comeback_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *gas_build_comeback_resp(u8 dialog_token, u16 status_code, u8 frag_id,
u8 more, u16 comeback_delay, size_t size) {
return gas_build_resp(0xDu, dialog_token, status_code, frag_id, more,
comeback_delay, size);
} | struct wpabuf *gas_build_comeback_resp(u8 dialog_token, u16 status_code,
u8 frag_id, u8 more, u16 comeback_delay,
size_t size) {
return gas_build_resp(WLAN_PA_GAS_COMEBACK_RESP, dialog_token, status_code,
frag_id, mo... | gas_build_comeback_resp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *gas_build_initial_req(u8 dialog_token, size_t size) {
return gas_build_req(0xAu, dialog_token, size);
} | struct wpabuf *gas_build_initial_req(u8 dialog_token, size_t size) {
return gas_build_req(WLAN_PA_GAS_INITIAL_REQ, dialog_token, size);
} | gas_build_initial_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *gas_build_initial_resp(u8 dialog_token, u16 status_code,
u16 comeback_delay, size_t size) {
return gas_build_resp(0xBu, dialog_token, status_code, 0, 0, comeback_delay,
size);
} | struct wpabuf *gas_build_initial_resp(u8 dialog_token, u16 status_code,
u16 comeback_delay, size_t size) {
return gas_build_resp(WLAN_PA_GAS_INITIAL_RESP, dialog_token, status_code, 0,
0, comeback_delay, size);
} | gas_build_initial_resp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *gas_build_req(u8 action, u8 dialog_token, size_t size) {
wpabuf *buf;
buf = wpabuf_alloc(size + 100);
if (!buf)
return 0;
wpabuf_put_u8_42(buf, 4u);
wpabuf_put_u8_42(buf, action);
wpabuf_put_u8_42(buf, dialog_token);
return buf;
} | static struct wpabuf *gas_build_req(u8 action, u8 dialog_token, size_t size) {
struct wpabuf *buf;
buf = wpabuf_alloc(100 + size);
if (buf == NULL)
return NULL;
wpabuf_put_u8(buf, WLAN_ACTION_PUBLIC);
wpabuf_put_u8(buf, action);
wpabuf_put_u8(buf, dialog_token);
return buf;
} | gas_build_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *gas_build_resp(u8 action, u8 dialog_token, u16 status_code, u8 frag_id,
u8 more, u16 comeback_delay, size_t size) {
char v8;
wpabuf *buf;
buf = wpabuf_alloc(size + 100);
if (!buf)
return 0;
wpabuf_put_u8_42(buf, 4u);
wpabuf_put_u8_42(buf, action);
wpabuf_put_u8_42(buf, ... | static struct wpabuf *gas_build_resp(u8 action, u8 dialog_token,
u16 status_code, u8 frag_id, u8 more,
u16 comeback_delay, size_t size) {
struct wpabuf *buf;
buf = wpabuf_alloc(100 + size);
if (buf == NULL)
return NULL;
wpabuf_put_u... | gas_build_resp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
gas_dialog_info *gas_dialog_create(hostapd_data *hapd, const u8 *addr,
u8 dialog_token) {
u8 v4;
int i;
int ia;
int j;
sta_info *sta;
gas_dialog_info *dia;
sta = ap_get_sta(hapd, addr);
if (sta) {
ap_sta_replenish_timeout(hapd, sta, 5u);
} else {
wpa_printf(... | static struct gas_dialog_info *
gas_dialog_create(struct hostapd_data *hapd, const u8 *addr, u8 dialog_token) {
struct sta_info *sta;
struct gas_dialog_info *dia = NULL;
int i, j;
sta = ap_get_sta(hapd, addr);
if (!sta) {
wpa_printf(MSG_DEBUG, "ANQP: Add a temporary STA entry for "
... | gas_dialog_create | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_query_ap_deinit(gas_query_ap *gas) {
gas_query_pending *query;
gas_query_pending *next;
if (gas) {
query = (gas_query_pending *)gas->pending.next;
next = (gas_query_pending *)query->list.next;
while (query != (gas_query_pending *)&gas->pending) {
gas_query_done(gas, query,
... | void gas_query_ap_deinit(struct gas_query_ap *gas) {
struct gas_query_pending *query, *next;
if (gas == NULL)
return;
dl_list_for_each_safe(query, next, &gas->pending, struct gas_query_pending,
list)
gas_query_done(gas, query, GAS_QUERY_AP_DELETED_AT_DEINIT);
os_free(gas);
} | gas_query_ap_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
gas_query_ap *gas_query_ap_init(hostapd_data *hapd, void *msg_ctx) {
gas_query_ap *gas;
gas = (gas_query_ap *)os_zalloc(0x28u);
if (!gas)
return 0;
gas->hapd = hapd;
gas->msg_ctx = msg_ctx;
dl_list_init_13(&gas->pending);
return gas;
} | struct gas_query_ap *gas_query_ap_init(struct hostapd_data *hapd,
void *msg_ctx) {
struct gas_query_ap *gas;
gas = os_zalloc(sizeof(*gas));
if (!gas)
return NULL;
gas->hapd = hapd;
gas->msg_ctx = msg_ctx;
dl_list_init(&gas->pending);
return gas;
} | gas_query_ap_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int gas_query_ap_req(gas_query_ap *gas, const u8 *dst, int freq, wpabuf *req,
void (*cb)(void *, const u8 *, u8, gas_query_ap_result,
const wpabuf *, const wpabuf *, u16),
void *ctx) {
int dialog_token;
gas_query_pending *query;
if (!gas |... | int gas_query_ap_req(struct gas_query_ap *gas, const u8 *dst, int freq,
struct wpabuf *req,
void (*cb)(void *ctx, const u8 *dst, u8 dialog_token,
enum gas_query_ap_result result,
const struct wpabuf *adv_proto,
... | gas_query_ap_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int gas_query_ap_rx(gas_query_ap *gas, const u8 *sa, u8 categ, const u8 *data,
size_t len, int freq) {
int v7;
int v8;
int v9;
int v10;
int v11;
int v12;
int v13;
u8 frag_id;
u8 more_frags;
u8 action;
u8 dialog_token;
u16 comeback_delay;
u16 resp_len;
_BOOL4 prot;
int p... | int gas_query_ap_rx(struct gas_query_ap *gas, const u8 *sa, u8 categ,
const u8 *data, size_t len, int freq) {
struct gas_query_pending *query;
u8 action, dialog_token, frag_id = 0, more_frags = 0;
u16 comeback_delay, resp_len;
const u8 *pos, *adv_proto;
int prot, pmf;
unsigned int left;
... | gas_query_ap_rx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_query_ap_tx_status(gas_query_ap *gas, const u8 *dst, const u8 *data,
size_t data_len, int ok) {
int dur;
gas_query_pending *query;
if (gas && gas->current) {
query = gas->current;
dur = ms_from_time(&query->last_oper);
wpa_printf(2,
"GAS: TX status:... | void gas_query_ap_tx_status(struct gas_query_ap *gas, const u8 *dst,
const u8 *data, size_t data_len, int ok) {
struct gas_query_pending *query;
int dur;
if (!gas || !gas->current) {
wpa_printf(MSG_DEBUG,
"GAS: Unexpected TX status: dst=" MACSTR
" ok=... | gas_query_ap_tx_status | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int gas_query_append(gas_query_pending *query, const u8 *data, size_t len) {
if (wpabuf_resize(&query->resp, len) >= 0) {
wpabuf_put_data_40(query->resp, data, len);
return 0;
} else {
wpa_printf(2, "GAS: No memory to store the response");
return -1;
}
} | static int gas_query_append(struct gas_query_pending *query, const u8 *data,
size_t len) {
if (wpabuf_resize(&query->resp, len) < 0) {
wpa_printf(MSG_DEBUG, "GAS: No memory to store the response");
return -1;
}
wpabuf_put_data(query->resp, data, len);
return 0;
} | gas_query_append | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int gas_query_dialog_token_available(gas_query_ap *gas, const u8 *dst,
u8 dialog_token) {
gas_query_pending *q;
for (q = (gas_query_pending *)gas->pending.next;
q != (gas_query_pending *)&gas->pending;
q = (gas_query_pending *)q->list.next) {
if (!memcmp(dst, ... | static int gas_query_dialog_token_available(struct gas_query_ap *gas,
const u8 *dst, u8 dialog_token) {
struct gas_query_pending *q;
dl_list_for_each(q, &gas->pending, struct gas_query_pending, list) {
if (os_memcmp(dst, q->addr, ETH_ALEN) == 0 &&
dialog_token... | gas_query_dialog_token_available | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_query_done(gas_query_ap *gas, gas_query_pending *query,
gas_query_ap_result result) {
const char *v3;
v3 = gas_result_txt(result);
wpa_msg(gas->msg_ctx, 3,
"GAS-QUERY-DONE addr=%02x:%02x:%02x:%02x:%02x:%02x dialog_token=%u "
"freq=%d status_code=%u result=%s",
... | static void gas_query_done(struct gas_query_ap *gas,
struct gas_query_pending *query,
enum gas_query_ap_result result) {
wpa_msg(gas->msg_ctx, MSG_INFO,
GAS_QUERY_DONE "addr=" MACSTR
" dialog_token=%u freq=%d status_code=%u resul... | gas_query_done | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_query_free(gas_query_pending *query, int del_list) {
if (del_list)
dl_list_del_17(&query->list);
wpabuf_free(query->req);
wpabuf_free(query->adv_proto);
wpabuf_free(query->resp);
free(query);
} | static void gas_query_free(struct gas_query_pending *query, int del_list) {
if (del_list)
dl_list_del(&query->list);
wpabuf_free(query->req);
wpabuf_free(query->adv_proto);
wpabuf_free(query->resp);
os_free(query);
} | gas_query_free | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
gas_query_pending *gas_query_get_pending(gas_query_ap *gas, const u8 *addr,
u8 dialog_token) {
gas_query_pending *q;
for (q = (gas_query_pending *)gas->pending.next;
q != (gas_query_pending *)&gas->pending;
q = (gas_query_pending *)q->list.next) {
if (!mem... | static struct gas_query_pending *gas_query_get_pending(struct gas_query_ap *gas,
const u8 *addr,
u8 dialog_token) {
struct gas_query_pending *q;
dl_list_for_each(q, &gas->pending, struct gas_query_pending, ... | gas_query_get_pending | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int gas_query_new_dialog_token(gas_query_ap *gas, const u8 *dst) {
int dialog_token;
int dialog_tokena;
for (dialog_token = 0; dialog_token <= 255 &&
!gas_query_dialog_token_available(
gas, dst, (next_start_0 + dialog_token) % 256);
++dialog_token) {
... | static int gas_query_new_dialog_token(struct gas_query_ap *gas, const u8 *dst) {
static int next_start = 0;
int dialog_token;
for (dialog_token = 0; dialog_token < 256; dialog_token++) {
if (gas_query_dialog_token_available(gas, dst,
(next_start + dialog_token) % 256)... | gas_query_new_dialog_token | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_query_rx_comeback(gas_query_ap *gas, gas_query_pending *query,
const u8 *adv_proto, const u8 *resp, size_t len,
u8 frag_id, u8 more_frags, u16 comeback_delay) {
long v8;
size_t v9;
const void *v10;
wpa_printf(
2,
"GAS: Received comeback... | static void gas_query_rx_comeback(struct gas_query_ap *gas,
struct gas_query_pending *query,
const u8 *adv_proto, const u8 *resp,
size_t len, u8 frag_id, u8 more_frags,
u16 comeback_de... | gas_query_rx_comeback | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_query_rx_comeback_timeout(void *eloop_data, void *user_ctx) {
int dialog_token;
wpa_printf(2, "GAS: No response to comeback request received (retry=%u)",
(*((_BYTE *)user_ctx + 32) & 4) != 0);
if (user_ctx == *((void **)eloop_data + 4) &&
(*((_BYTE *)user_ctx + 32) & 4) == 0) {
di... | static void gas_query_rx_comeback_timeout(void *eloop_data, void *user_ctx) {
struct gas_query_ap *gas = eloop_data;
struct gas_query_pending *query = user_ctx;
int dialog_token;
wpa_printf(MSG_DEBUG,
"GAS: No response to comeback request received (retry=%u)",
query->retry);
if (gas... | gas_query_rx_comeback_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_query_rx_initial(gas_query_ap *gas, gas_query_pending *query,
const u8 *adv_proto, const u8 *resp, size_t len,
u16 comeback_delay) {
wpa_printf(
2,
"GAS: Received initial response from %02x:%02x:%02x:%02x:%02x:%02x "
"(dialog_token=%u come... | static void gas_query_rx_initial(struct gas_query_ap *gas,
struct gas_query_pending *query,
const u8 *adv_proto, const u8 *resp,
size_t len, u16 comeback_delay) {
wpa_printf(MSG_DEBUG,
"GAS: Received initia... | gas_query_rx_initial | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_query_timeout(void *eloop_data, void *user_ctx) {
wpa_printf(
2,
"GAS: No response received for query to %02x:%02x:%02x:%02x:%02x:%02x "
"dialog token %u",
*((unsigned char *)user_ctx + 24), *((unsigned char *)user_ctx + 25),
*((unsigned char *)user_ctx + 26), *((unsigned char *... | static void gas_query_timeout(void *eloop_data, void *user_ctx) {
struct gas_query_ap *gas = eloop_data;
struct gas_query_pending *query = user_ctx;
wpa_printf(MSG_DEBUG,
"GAS: No response received for query to " MACSTR
" dialog token %u",
MAC2STR(query->addr), query->dialo... | gas_query_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int gas_query_tx(gas_query_ap *gas, gas_query_pending *query, wpabuf *req,
unsigned int wait_time) {
int v4;
int v5;
int v6;
int v7;
int freq;
int v9;
size_t v10;
const u8 *v11;
int v13;
int v14;
int prot;
prot = pmf_in_use(gas->hapd, query->addr);
v14 = query->sa[5];
v13 =... | static int gas_query_tx(struct gas_query_ap *gas,
struct gas_query_pending *query, struct wpabuf *req,
unsigned int wait_time) {
int res, prot = pmf_in_use(gas->hapd, query->addr);
wpa_printf(MSG_DEBUG,
"GAS: Send action frame to " MACSTR " len=%u "
... | gas_query_tx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_query_tx_comeback_req(gas_query_ap *gas, gas_query_pending *query) {
unsigned int v2;
wpabuf *req;
req = gas_build_comeback_req(query->dialog_token);
if (req) {
if ((*((_BYTE *)query + 32) & 4) == 0 && (*((_BYTE *)query + 32) & 2) != 0)
v2 = 150;
else
v2 = 1000;
if (gas_query_t... | static void gas_query_tx_comeback_req(struct gas_query_ap *gas,
struct gas_query_pending *query) {
struct wpabuf *req;
unsigned int wait_time;
req = gas_build_comeback_req(query->dialog_token);
if (req == NULL) {
gas_query_done(gas, query, GAS_QUERY_AP_INTERNAL_ERROR);... | gas_query_tx_comeback_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_query_tx_comeback_req_delay(gas_query_ap *gas,
gas_query_pending *query,
u16 comeback_delay) {
int v3;
int secs;
int usecs;
v3 = comeback_delay << 10;
secs = v3 / 1000000;
usecs = v3 % 1000000;
wpa_printf(2,
"... | static void gas_query_tx_comeback_req_delay(struct gas_query_ap *gas,
struct gas_query_pending *query,
u16 comeback_delay) {
unsigned int secs, usecs;
secs = (comeback_delay * 1024) / 1000000;
usecs = comeback_delay * 1024 - ... | gas_query_tx_comeback_req_delay | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_query_tx_comeback_timeout(void *eloop_data, void *user_ctx) {
wpa_printf(
2, "GAS: Comeback timeout for request to %02x:%02x:%02x:%02x:%02x:%02x",
*((unsigned char *)user_ctx + 24), *((unsigned char *)user_ctx + 25),
*((unsigned char *)user_ctx + 26), *((unsigned char *)user_ctx + 27),
... | static void gas_query_tx_comeback_timeout(void *eloop_data, void *user_ctx) {
struct gas_query_ap *gas = eloop_data;
struct gas_query_pending *query = user_ctx;
wpa_printf(MSG_DEBUG, "GAS: Comeback timeout for request to " MACSTR,
MAC2STR(query->addr));
gas_query_tx_comeback_req(gas, query);
} | gas_query_tx_comeback_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_query_tx_initial_req(gas_query_ap *gas, gas_query_pending *query) {
if (gas_query_tx(gas, query, query->req, 0x3E8u) >= 0) {
gas->current = query;
wpa_printf(2, "GAS: Starting query timeout for dialog token %u",
query->dialog_token);
eloop_register_timeout(2u, 0, (eloop_timeout_han... | static void gas_query_tx_initial_req(struct gas_query_ap *gas,
struct gas_query_pending *query) {
if (gas_query_tx(gas, query, query->req, GAS_QUERY_WAIT_TIME_INITIAL) < 0) {
wpa_printf(MSG_DEBUG, "GAS: Failed to send Action frame to " MACSTR,
MAC2STR(query->add... | gas_query_tx_initial_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *gas_result_txt(gas_query_ap_result result) {
const char *v1;
switch (result) {
case gas_query_ap_result_GAS_QUERY_AP_SUCCESS:
v1 = "SUCCESS";
break;
case gas_query_ap_result_GAS_QUERY_AP_FAILURE:
v1 = "FAILURE";
break;
case gas_query_ap_result_GAS_QUERY_AP_TIMEOUT:
v1 = "TIMEO... | static const char *gas_result_txt(enum gas_query_ap_result result) {
switch (result) {
case GAS_QUERY_AP_SUCCESS:
return "SUCCESS";
case GAS_QUERY_AP_FAILURE:
return "FAILURE";
case GAS_QUERY_AP_TIMEOUT:
return "TIMEOUT";
case GAS_QUERY_AP_PEER_ERROR:
return "PEER_ERROR";
case GAS_QUERY_AP_I... | gas_result_txt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *gas_serv_build_gas_resp_payload(
hostapd_data *hapd, unsigned int request, const u8 *home_realm,
size_t home_realm_len, const u8 *icon_name, size_t icon_name_len,
const u16 *extra_req, unsigned int num_extra_req) {
size_t required_len;
unsigned int i;
size_t len;
wpabuf *buf;
len = 1400;
... | static struct wpabuf *gas_serv_build_gas_resp_payload(
struct hostapd_data *hapd, unsigned int request, const u8 *home_realm,
size_t home_realm_len, const u8 *icon_name, size_t icon_name_len,
const u16 *extra_req, unsigned int num_extra_req) {
struct wpabuf *buf;
size_t len;
unsigned int i;
len = 1... | gas_serv_build_gas_resp_payload | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_serv_deinit(hostapd_data *hapd) { ; } | void gas_serv_deinit(struct hostapd_data *hapd) {} | gas_serv_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void gas_serv_dialog_clear(gas_dialog_info *dia) {
wpabuf_free(dia->sd_resp);
memset(dia, 0, sizeof(gas_dialog_info));
} | void gas_serv_dialog_clear(struct gas_dialog_info *dia) {
wpabuf_free(dia->sd_resp);
os_memset(dia, 0, sizeof(*dia));
} | gas_serv_dialog_clear | 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.