1*a90b9d01SCy Schubert /* 2*a90b9d01SCy Schubert * NAN unsynchronized service discovery (USD) 3*a90b9d01SCy Schubert * Copyright (c) 2024, Qualcomm Innovation Center, Inc. 4*a90b9d01SCy Schubert * 5*a90b9d01SCy Schubert * This software may be distributed under the terms of the BSD license. 6*a90b9d01SCy Schubert * See README for more details. 7*a90b9d01SCy Schubert */ 8*a90b9d01SCy Schubert 9*a90b9d01SCy Schubert #ifndef NAN_USD_H 10*a90b9d01SCy Schubert #define NAN_USD_H 11*a90b9d01SCy Schubert 12*a90b9d01SCy Schubert struct nan_subscribe_params; 13*a90b9d01SCy Schubert struct nan_publish_params; 14*a90b9d01SCy Schubert enum nan_service_protocol_type; 15*a90b9d01SCy Schubert 16*a90b9d01SCy Schubert int wpas_nan_usd_init(struct wpa_supplicant *wpa_s); 17*a90b9d01SCy Schubert void wpas_nan_usd_deinit(struct wpa_supplicant *wpa_s); 18*a90b9d01SCy Schubert void wpas_nan_usd_rx_sdf(struct wpa_supplicant *wpa_s, const u8 *src, 19*a90b9d01SCy Schubert unsigned int freq, const u8 *buf, size_t len); 20*a90b9d01SCy Schubert void wpas_nan_usd_flush(struct wpa_supplicant *wpa_s); 21*a90b9d01SCy Schubert int wpas_nan_usd_publish(struct wpa_supplicant *wpa_s, const char *service_name, 22*a90b9d01SCy Schubert enum nan_service_protocol_type srv_proto_type, 23*a90b9d01SCy Schubert const struct wpabuf *ssi, 24*a90b9d01SCy Schubert struct nan_publish_params *params); 25*a90b9d01SCy Schubert void wpas_nan_usd_cancel_publish(struct wpa_supplicant *wpa_s, int publish_id); 26*a90b9d01SCy Schubert int wpas_nan_usd_update_publish(struct wpa_supplicant *wpa_s, int publish_id, 27*a90b9d01SCy Schubert const struct wpabuf *ssi); 28*a90b9d01SCy Schubert int wpas_nan_usd_subscribe(struct wpa_supplicant *wpa_s, 29*a90b9d01SCy Schubert const char *service_name, 30*a90b9d01SCy Schubert enum nan_service_protocol_type srv_proto_type, 31*a90b9d01SCy Schubert const struct wpabuf *ssi, 32*a90b9d01SCy Schubert struct nan_subscribe_params *params); 33*a90b9d01SCy Schubert void wpas_nan_usd_cancel_subscribe(struct wpa_supplicant *wpa_s, 34*a90b9d01SCy Schubert int subscribe_id); 35*a90b9d01SCy Schubert int wpas_nan_usd_transmit(struct wpa_supplicant *wpa_s, int handle, 36*a90b9d01SCy Schubert const struct wpabuf *ssi, const struct wpabuf *elems, 37*a90b9d01SCy Schubert const u8 *peer_addr, u8 req_instance_id); 38*a90b9d01SCy Schubert void wpas_nan_usd_remain_on_channel_cb(struct wpa_supplicant *wpa_s, 39*a90b9d01SCy Schubert unsigned int freq, 40*a90b9d01SCy Schubert unsigned int duration); 41*a90b9d01SCy Schubert void wpas_nan_usd_cancel_remain_on_channel_cb(struct wpa_supplicant *wpa_s, 42*a90b9d01SCy Schubert unsigned int freq); 43*a90b9d01SCy Schubert void wpas_nan_usd_tx_wait_expire(struct wpa_supplicant *wpa_s); 44*a90b9d01SCy Schubert int * wpas_nan_usd_all_freqs(struct wpa_supplicant *wpa_s); 45*a90b9d01SCy Schubert 46*a90b9d01SCy Schubert #endif /* NAN_USD_H */ 47