2 * FST module - FST Session related definitions
3 * Copyright (c) 2014, Qualcomm Atheros, Inc.
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
12 #define FST_DEFAULT_SESSION_TIMEOUT_TU 255 /* u8 */
17 enum fst_session_state;
19 int fst_session_global_init(void);
20 void fst_session_global_deinit(void);
21 void fst_session_global_on_iface_detached(struct fst_iface *iface);
23 fst_session_global_get_first_by_group(struct fst_group *g);
25 struct fst_session * fst_session_create(struct fst_group *g);
26 void fst_session_set_iface(struct fst_session *s, struct fst_iface *iface,
28 void fst_session_set_llt(struct fst_session *s, u32 llt);
29 void fst_session_set_peer_addr(struct fst_session *s, const u8 *addr,
31 int fst_session_initiate_setup(struct fst_session *s);
32 int fst_session_respond(struct fst_session *s, u8 status_code);
33 int fst_session_initiate_switch(struct fst_session *s);
34 void fst_session_handle_action(struct fst_session *s, struct fst_iface *iface,
35 const struct ieee80211_mgmt *mgmt,
37 int fst_session_tear_down_setup(struct fst_session *s);
38 void fst_session_reset(struct fst_session *s);
39 void fst_session_delete(struct fst_session *s);
41 struct fst_group * fst_session_get_group(struct fst_session *s);
42 struct fst_iface * fst_session_get_iface(struct fst_session *s, Boolean is_old);
43 const u8 * fst_session_get_peer_addr(struct fst_session *s, Boolean is_old);
44 u32 fst_session_get_id(struct fst_session *s);
45 u32 fst_session_get_llt(struct fst_session *s);
46 enum fst_session_state fst_session_get_state(struct fst_session *s);
48 struct fst_session *fst_session_get_by_id(u32 id);
50 typedef void (*fst_session_enum_clb)(struct fst_group *g, struct fst_session *s,
53 void fst_session_enum(struct fst_group *g, fst_session_enum_clb clb, void *ctx);
55 void fst_session_on_action_rx(struct fst_iface *iface,
56 const struct ieee80211_mgmt *mgmt, size_t len);
59 int fst_session_set_str_ifname(struct fst_session *s, const char *ifname,
61 int fst_session_set_str_peer_addr(struct fst_session *s, const char *mac,
63 int fst_session_set_str_llt(struct fst_session *s, const char *llt_str);
65 #ifdef CONFIG_FST_TEST
67 #define FST_FSTS_ID_NOT_FOUND ((u32) -1)
69 int fst_test_req_send_fst_request(const char *params);
70 int fst_test_req_send_fst_response(const char *params);
71 int fst_test_req_send_ack_request(const char *params);
72 int fst_test_req_send_ack_response(const char *params);
73 int fst_test_req_send_tear_down(const char *params);
74 u32 fst_test_req_get_fsts_id(const char *params);
75 int fst_test_req_get_local_mbies(const char *request, char *buf,
78 #endif /* CONFIG_FST_TEST */
80 #endif /* FST_SESSION_H */