diff options
author | grehan <grehan@FreeBSD.org> | 2013-07-05 05:47:10 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2013-07-05 05:47:10 +0000 |
commit | 6a7baaf83640e0eaa135d2f7a3c1d4401f1683bf (patch) | |
tree | 83ae82cf8f72af4b819f49aa52acdd97f74c6328 /contrib/wpa/wpa_supplicant/gas_query.h | |
parent | 2cb5a953f0a60811764ccaca7c37b51ff007c711 (diff) | |
parent | 8e6b84b998690dcfc1a4957dc7a483ac5b600db8 (diff) | |
download | FreeBSD-src-6a7baaf83640e0eaa135d2f7a3c1d4401f1683bf.zip FreeBSD-src-6a7baaf83640e0eaa135d2f7a3c1d4401f1683bf.tar.gz |
IFC @ r252763
Diffstat (limited to 'contrib/wpa/wpa_supplicant/gas_query.h')
-rw-r--r-- | contrib/wpa/wpa_supplicant/gas_query.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/contrib/wpa/wpa_supplicant/gas_query.h b/contrib/wpa/wpa_supplicant/gas_query.h new file mode 100644 index 0000000..5c3d161 --- /dev/null +++ b/contrib/wpa/wpa_supplicant/gas_query.h @@ -0,0 +1,58 @@ +/* + * Generic advertisement service (GAS) query + * Copyright (c) 2009, Atheros Communications + * Copyright (c) 2011, Qualcomm Atheros + * + * This software may be distributed under the terms of the BSD license. + * See README for more details. + */ + +#ifndef GAS_QUERY_H +#define GAS_QUERY_H + +struct gas_query; + +#ifdef CONFIG_GAS + +struct gas_query * gas_query_init(struct wpa_supplicant *wpa_s); +void gas_query_deinit(struct gas_query *gas); +int gas_query_rx(struct gas_query *gas, const u8 *da, const u8 *sa, + const u8 *bssid, const u8 *data, size_t len, int freq); + +/** + * enum gas_query_result - GAS query result + */ +enum gas_query_result { + GAS_QUERY_SUCCESS, + GAS_QUERY_FAILURE, + GAS_QUERY_TIMEOUT, + GAS_QUERY_PEER_ERROR, + GAS_QUERY_INTERNAL_ERROR, + GAS_QUERY_CANCELLED, + GAS_QUERY_DELETED_AT_DEINIT +}; + +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); +void gas_query_cancel(struct gas_query *gas, const u8 *dst, u8 dialog_token); + +#else /* CONFIG_GAS */ + +static inline struct gas_query * gas_query_init(struct wpa_supplicant *wpa_s) +{ + return (void *) 1; +} + +static inline void gas_query_deinit(struct gas_query *gas) +{ +} + +#endif /* CONFIG_GAS */ + + +#endif /* GAS_QUERY_H */ |