xref: /freebsd/contrib/wpa/src/ap/nan_usd_ap.h (revision a90b9d0159070121c221b966469c3e36d912bf82)
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_AP_H
10*a90b9d01SCy Schubert #define NAN_USD_AP_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 hostapd_nan_usd_init(struct hostapd_data *hapd);
17*a90b9d01SCy Schubert void hostapd_nan_usd_deinit(struct hostapd_data *hapd);
18*a90b9d01SCy Schubert void hostapd_nan_usd_rx_sdf(struct hostapd_data *hapd, const u8 *src,
19*a90b9d01SCy Schubert 			    unsigned int freq, const u8 *buf, size_t len);
20*a90b9d01SCy Schubert void hostapd_nan_usd_flush(struct hostapd_data *hapd);
21*a90b9d01SCy Schubert int hostapd_nan_usd_publish(struct hostapd_data *hapd, 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 hostapd_nan_usd_cancel_publish(struct hostapd_data *hapd, int publish_id);
26*a90b9d01SCy Schubert int hostapd_nan_usd_update_publish(struct hostapd_data *hapd, int publish_id,
27*a90b9d01SCy Schubert 				   const struct wpabuf *ssi);
28*a90b9d01SCy Schubert int hostapd_nan_usd_subscribe(struct hostapd_data *hapd,
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 hostapd_nan_usd_cancel_subscribe(struct hostapd_data *hapd,
34*a90b9d01SCy Schubert 				      int subscribe_id);
35*a90b9d01SCy Schubert int hostapd_nan_usd_transmit(struct hostapd_data *hapd, int handle,
36*a90b9d01SCy Schubert 			     const struct wpabuf *ssi,
37*a90b9d01SCy Schubert 			     const struct wpabuf *elems,
38*a90b9d01SCy Schubert 			     const u8 *peer_addr, u8 req_instance_id);
39*a90b9d01SCy Schubert void hostapd_nan_usd_remain_on_channel_cb(struct hostapd_data *hapd,
40*a90b9d01SCy Schubert 					  unsigned int freq,
41*a90b9d01SCy Schubert 					  unsigned int duration);
42*a90b9d01SCy Schubert void hostapd_nan_usd_cancel_remain_on_channel_cb(struct hostapd_data *hapd,
43*a90b9d01SCy Schubert 						 unsigned int freq);
44*a90b9d01SCy Schubert void hostapd_nan_usd_tx_wait_expire(struct hostapd_data *hapd);
45*a90b9d01SCy Schubert 
46*a90b9d01SCy Schubert #endif /* NAN_USD_AP_H */
47