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_get_peer_other_connection(struct fst_iface *iface,
52 const u8 *peer_addr, u8 band_id,
54 u8 fst_group_assign_dialog_token(struct fst_group *g);
55 u32 fst_group_assign_fsts_id(struct fst_group *g);
57 extern struct dl_list fst_global_groups_list;
59 #define foreach_fst_group(g) \
60 dl_list_for_each((g), &fst_global_groups_list, \
61 struct fst_group, global_groups_lentry)
63 static inline struct fst_group * fst_first_group(void)
65 return dl_list_first(&fst_global_groups_list, struct fst_group,
66 global_groups_lentry);
69 #endif /* FST_GROUP_H */