2 * FST module - FST group object 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.
13 char group_id[IFNAMSIZ + 1];
14 struct dl_list ifaces;
17 struct dl_list global_groups_lentry;
20 struct session_transition_ie;
22 #define foreach_fst_group_iface(g, i) \
23 dl_list_for_each((i), &(g)->ifaces, struct fst_iface, group_lentry)
25 struct fst_group * fst_group_create(const char *group_id);
26 void fst_group_attach_iface(struct fst_group *g, struct fst_iface *i);
27 void fst_group_detach_iface(struct fst_group *g, struct fst_iface *i);
28 void fst_group_delete(struct fst_group *g);
30 void fst_group_update_ie(struct fst_group *g);
32 static inline Boolean fst_group_has_ifaces(struct fst_group *g)
34 return !dl_list_empty(&g->ifaces);
37 static inline struct fst_iface * fst_group_first_iface(struct fst_group *g)
39 return dl_list_first(&g->ifaces, struct fst_iface, group_lentry);
42 static inline const char * fst_group_get_id(struct fst_group *g)
47 Boolean fst_group_delete_if_empty(struct fst_group *group);
48 struct fst_iface * fst_group_get_iface_by_name(struct fst_group *g,
51 fst_group_find_new_iface_by_stie(struct fst_group *g,
52 struct fst_iface *iface,
54 const struct session_transition_ie *stie,
57 fst_group_get_new_iface_by_stie_and_mbie(
58 struct fst_group *g, const u8 *mb_ies_buff, size_t mb_ies_size,
59 const struct session_transition_ie *stie, u8 *iface_peer_addr);
60 u8 fst_group_assign_dialog_token(struct fst_group *g);
61 u32 fst_group_assign_fsts_id(struct fst_group *g);
63 extern struct dl_list fst_global_groups_list;
65 #define foreach_fst_group(g) \
66 dl_list_for_each((g), &fst_global_groups_list, \
67 struct fst_group, global_groups_lentry)
69 static inline struct fst_group * fst_first_group(void)
71 return dl_list_first(&fst_global_groups_list, struct fst_group,
72 global_groups_lentry);
75 #endif /* FST_GROUP_H */