wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gas_query.h
Go to the documentation of this file.
1 
6 #ifndef GAS_QUERY_H
7 #define GAS_QUERY_H
8 
9 struct gas_query;
10 
11 #ifdef CONFIG_GAS
12 
13 struct gas_query * gas_query_init(struct wpa_supplicant *wpa_s);
14 void gas_query_deinit(struct gas_query *gas);
15 int gas_query_rx(struct gas_query *gas, const u8 *da, const u8 *sa,
16  const u8 *bssid, u8 categ, const u8 *data, size_t len,
17  int freq);
18 
23 enum gas_query_result {
24  GAS_QUERY_SUCCESS,
25  GAS_QUERY_FAILURE,
26  GAS_QUERY_TIMEOUT,
27  GAS_QUERY_PEER_ERROR,
28  GAS_QUERY_INTERNAL_ERROR,
29  GAS_QUERY_CANCELLED,
30  GAS_QUERY_DELETED_AT_DEINIT
31 };
32 
33 int gas_query_req(struct gas_query *gas, const u8 *dst, int freq,
34  struct wpabuf *req,
35  void (*cb)(void *ctx, const u8 *dst, u8 dialog_token,
36  enum gas_query_result result,
37  const struct wpabuf *adv_proto,
38  const struct wpabuf *resp, u16 status_code),
39  void *ctx);
40 void gas_query_cancel(struct gas_query *gas, const u8 *dst, u8 dialog_token);
41 
42 #else /* CONFIG_GAS */
43 
44 static inline struct gas_query * gas_query_init(struct wpa_supplicant *wpa_s)
45 {
46  return (void *) 1;
47 }
48 
49 static inline void gas_query_deinit(struct gas_query *gas)
50 {
51 }
52 
53 #endif /* CONFIG_GAS */
54 
55 
56 #endif /* GAS_QUERY_H */
struct gas_query * gas_query_init(struct wpa_supplicant *wpa_s)
Initialize GAS query component.
Definition: gas_query.c:81
Definition: wpabuf.h:16
void gas_query_deinit(struct gas_query *gas)
Deinitialize GAS query component.
Definition: gas_query.c:163
Internal GAS query data.
Definition: gas_query.c:54
int gas_query_req(struct gas_query *gas, const u8 *dst, int freq, struct wpabuf *req, void(*cb)(void *ctx, const u8 *dst, u8 dialog_token, enum gas_query_result result, const struct wpabuf *adv_proto, const struct wpabuf *resp, u16 status_code), void *ctx)
Request a GAS query.
Definition: gas_query.c:649
Internal data for wpa_supplicant interface.
Definition: wpa_supplicant_i.h:451
int gas_query_rx(struct gas_query *gas, const u8 *da, const u8 *sa, const u8 *bssid, u8 categ, const u8 *data, size_t len, int freq)
Indicate reception of a Public Action or Protected Dual frame.
Definition: gas_query.c:434
void gas_query_cancel(struct gas_query *gas, const u8 *dst, u8 dialog_token)
Cancel a pending GAS query.
Definition: gas_query.c:709