2 * FST module - FST interface 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 #include "utils/includes.h"
14 #include "utils/common.h"
19 struct fst_group *group;
20 struct fst_wpa_obj iface_obj;
21 u8 own_addr[ETH_ALEN];
23 char ifname[IFNAMSIZ + 1];
24 struct fst_iface_cfg cfg;
25 struct dl_list group_lentry;
28 struct fst_iface * fst_iface_create(struct fst_group *g, const char *ifname,
30 const struct fst_wpa_obj *iface_obj,
31 const struct fst_iface_cfg *cfg);
32 void fst_iface_delete(struct fst_iface *i);
34 static inline struct fst_group * fst_iface_get_group(struct fst_iface *i)
39 static inline const char * fst_iface_get_name(struct fst_iface *i)
44 static inline const u8 * fst_iface_get_addr(struct fst_iface *i)
49 static inline const char * fst_iface_get_group_id(struct fst_iface *i)
51 return i->cfg.group_id;
54 static inline u8 fst_iface_get_priority(struct fst_iface *i)
56 return i->cfg.priority;
59 static inline u32 fst_iface_get_llt(struct fst_iface *i)
64 static inline const struct wpabuf * fst_iface_get_mbie(struct fst_iface *i)
69 static inline const u8 * fst_iface_get_bssid(struct fst_iface *i)
71 return i->iface_obj.get_bssid(i->iface_obj.ctx);
74 static inline void fst_iface_get_channel_info(struct fst_iface *i,
75 enum hostapd_hw_mode *hw_mode,
78 i->iface_obj.get_channel_info(i->iface_obj.ctx, hw_mode, channel);
81 static inline int fst_iface_get_hw_modes(struct fst_iface *i,
82 struct hostapd_hw_modes **modes)
84 return i->iface_obj.get_hw_modes(i->iface_obj.ctx, modes);
87 static inline void fst_iface_set_ies(struct fst_iface *i,
88 const struct wpabuf *fst_ies)
90 i->iface_obj.set_ies(i->iface_obj.ctx, fst_ies);
93 static inline int fst_iface_send_action(struct fst_iface *i,
94 const u8 *addr, struct wpabuf *data)
96 return i->iface_obj.send_action(i->iface_obj.ctx, addr, data);
99 static inline const struct wpabuf *
100 fst_iface_get_peer_mb_ie(struct fst_iface *i, const u8 *addr)
102 return i->iface_obj.get_mb_ie(i->iface_obj.ctx, addr);
105 static inline void fst_iface_update_mb_ie(struct fst_iface *i,
107 const u8 *buf, size_t size)
109 return i->iface_obj.update_mb_ie(i->iface_obj.ctx, addr, buf, size);
112 static inline const u8 * fst_iface_get_peer_first(struct fst_iface *i,
113 struct fst_get_peer_ctx **ctx,
116 return i->iface_obj.get_peer_first(i->iface_obj.ctx, ctx, mb_only);
119 static inline const u8 * fst_iface_get_peer_next(struct fst_iface *i,
120 struct fst_get_peer_ctx **ctx,
123 return i->iface_obj.get_peer_next(i->iface_obj.ctx, ctx, mb_only);
126 Boolean fst_iface_is_connected(struct fst_iface *iface, const u8 *addr,
128 void fst_iface_attach_mbie(struct fst_iface *i, struct wpabuf *mbie);
129 enum mb_band_id fst_iface_get_band_id(struct fst_iface *i);
131 static inline void * fst_iface_get_wpa_obj_ctx(struct fst_iface *i)
133 return i->iface_obj.ctx;
136 #endif /* FST_IFACE_H */