1 /* 2 * NAN unsynchronized service discovery (USD) 3 * Copyright (c) 2024, Qualcomm Innovation Center, Inc. 4 * 5 * This software may be distributed under the terms of the BSD license. 6 * See README for more details. 7 */ 8 9 #ifndef NAN_USD_AP_H 10 #define NAN_USD_AP_H 11 12 struct nan_subscribe_params; 13 struct nan_publish_params; 14 enum nan_service_protocol_type; 15 16 int hostapd_nan_usd_init(struct hostapd_data *hapd); 17 void hostapd_nan_usd_deinit(struct hostapd_data *hapd); 18 void hostapd_nan_usd_rx_sdf(struct hostapd_data *hapd, const u8 *src, 19 const u8 *a3, 20 unsigned int freq, const u8 *buf, size_t len); 21 void hostapd_nan_usd_flush(struct hostapd_data *hapd); 22 int hostapd_nan_usd_publish(struct hostapd_data *hapd, const char *service_name, 23 enum nan_service_protocol_type srv_proto_type, 24 const struct wpabuf *ssi, 25 struct nan_publish_params *params, bool p2p); 26 void hostapd_nan_usd_cancel_publish(struct hostapd_data *hapd, int publish_id); 27 int hostapd_nan_usd_update_publish(struct hostapd_data *hapd, int publish_id, 28 const struct wpabuf *ssi); 29 int hostapd_nan_usd_subscribe(struct hostapd_data *hapd, 30 const char *service_name, 31 enum nan_service_protocol_type srv_proto_type, 32 const struct wpabuf *ssi, 33 struct nan_subscribe_params *params, bool p2p); 34 void hostapd_nan_usd_cancel_subscribe(struct hostapd_data *hapd, 35 int subscribe_id); 36 int hostapd_nan_usd_transmit(struct hostapd_data *hapd, int handle, 37 const struct wpabuf *ssi, 38 const struct wpabuf *elems, 39 const u8 *peer_addr, u8 req_instance_id); 40 void hostapd_nan_usd_remain_on_channel_cb(struct hostapd_data *hapd, 41 unsigned int freq, 42 unsigned int duration); 43 void hostapd_nan_usd_cancel_remain_on_channel_cb(struct hostapd_data *hapd, 44 unsigned int freq); 45 void hostapd_nan_usd_tx_wait_expire(struct hostapd_data *hapd); 46 47 #endif /* NAN_USD_AP_H */ 48