/src/hostap/wpa_supplicant/nan_supplicant.h
Line | Count | Source |
1 | | /* |
2 | | * wpa_supplicant - NAN |
3 | | * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. |
4 | | * Copyright (C) 2025 Intel Corporation |
5 | | * |
6 | | * This software may be distributed under the terms of the BSD license. |
7 | | * See README for more details. |
8 | | */ |
9 | | |
10 | | #ifndef NAN_SUPPLICANT_H |
11 | | #define NAN_SUPPLICANT_H |
12 | | |
13 | | /* NAN synchronization only */ |
14 | | #ifdef CONFIG_NAN |
15 | | |
16 | | int wpas_nan_init(struct wpa_supplicant *wpa_s); |
17 | | void wpas_nan_deinit(struct wpa_supplicant *wpa_s); |
18 | | int wpas_nan_start(struct wpa_supplicant *wpa_s); |
19 | | int wpas_nan_set(struct wpa_supplicant *wpa_s, char *cmd); |
20 | | int wpas_nan_update_conf(struct wpa_supplicant *wpa_s); |
21 | | int wpas_nan_stop(struct wpa_supplicant *wpa_s); |
22 | | void wpas_nan_flush(struct wpa_supplicant *wpa_s); |
23 | | void wpas_nan_cluster_join(struct wpa_supplicant *wpa_s, |
24 | | const u8 *cluster_id, |
25 | | bool new_cluster); |
26 | | void wpas_nan_next_dw(struct wpa_supplicant *wpa_s, u32 freq); |
27 | | |
28 | | #else /* CONFIG_NAN */ |
29 | | |
30 | | static inline int wpas_nan_init(struct wpa_supplicant *wpa_s) |
31 | 0 | { |
32 | 0 | return -1; |
33 | 0 | } Unexecuted instantiation: events.c:wpas_nan_init Unexecuted instantiation: wpa_supplicant.c:wpas_nan_init |
34 | | |
35 | | static inline void wpas_nan_deinit(struct wpa_supplicant *wpa_s) |
36 | 0 | {}Unexecuted instantiation: events.c:wpas_nan_deinit Unexecuted instantiation: wpa_supplicant.c:wpas_nan_deinit |
37 | | |
38 | | static inline int wpas_nan_start(struct wpa_supplicant *wpa_s) |
39 | 0 | { |
40 | 0 | return -1; |
41 | 0 | } Unexecuted instantiation: events.c:wpas_nan_start Unexecuted instantiation: wpa_supplicant.c:wpas_nan_start |
42 | | |
43 | | static inline int wpas_nan_set(struct wpa_supplicant *wpa_s, char *cmd) |
44 | 0 | { |
45 | 0 | return -1; |
46 | 0 | } Unexecuted instantiation: events.c:wpas_nan_set Unexecuted instantiation: wpa_supplicant.c:wpas_nan_set |
47 | | |
48 | | static inline int wpas_nan_update_conf(struct wpa_supplicant *wpa_s) |
49 | 0 | { |
50 | 0 | return -1; |
51 | 0 | } Unexecuted instantiation: events.c:wpas_nan_update_conf Unexecuted instantiation: wpa_supplicant.c:wpas_nan_update_conf |
52 | | |
53 | | static inline int wpas_nan_stop(struct wpa_supplicant *wpa_s) |
54 | 0 | { |
55 | 0 | return -1; |
56 | 0 | } Unexecuted instantiation: events.c:wpas_nan_stop Unexecuted instantiation: wpa_supplicant.c:wpas_nan_stop |
57 | | |
58 | | static inline void wpas_nan_flush(struct wpa_supplicant *wpa_s) |
59 | 0 | {}Unexecuted instantiation: events.c:wpas_nan_flush Unexecuted instantiation: wpa_supplicant.c:wpas_nan_flush |
60 | | |
61 | | static inline void wpas_nan_cluster_join(struct wpa_supplicant *wpa_s, |
62 | | const u8 *cluster_id, |
63 | | bool new_cluster) |
64 | 0 | {}Unexecuted instantiation: events.c:wpas_nan_cluster_join Unexecuted instantiation: wpa_supplicant.c:wpas_nan_cluster_join |
65 | | |
66 | | static inline void wpas_nan_next_dw(struct wpa_supplicant *wpa_s, u32 freq) |
67 | 0 | {}Unexecuted instantiation: events.c:wpas_nan_next_dw Unexecuted instantiation: wpa_supplicant.c:wpas_nan_next_dw |
68 | | |
69 | | #endif /* CONFIG_NAN */ |
70 | | |
71 | | struct nan_subscribe_params; |
72 | | struct nan_publish_params; |
73 | | enum nan_service_protocol_type; |
74 | | |
75 | | /* NAN sync and USD common */ |
76 | | #if defined(CONFIG_NAN_USD) || defined(CONFIG_NAN) |
77 | | |
78 | | int wpas_nan_de_init(struct wpa_supplicant *wpa_s); |
79 | | void wpas_nan_de_deinit(struct wpa_supplicant *wpa_s); |
80 | | void wpas_nan_de_rx_sdf(struct wpa_supplicant *wpa_s, const u8 *src, |
81 | | const u8 *a3, unsigned int freq, |
82 | | const u8 *buf, size_t len, int rssi); |
83 | | void wpas_nan_de_flush(struct wpa_supplicant *wpa_s); |
84 | | int wpas_nan_publish(struct wpa_supplicant *wpa_s, const char *service_name, |
85 | | enum nan_service_protocol_type srv_proto_type, |
86 | | const struct wpabuf *ssi, |
87 | | struct nan_publish_params *params, bool p2p); |
88 | | void wpas_nan_cancel_publish(struct wpa_supplicant *wpa_s, int publish_id); |
89 | | int wpas_nan_update_publish(struct wpa_supplicant *wpa_s, int publish_id, |
90 | | const struct wpabuf *ssi); |
91 | | int wpas_nan_subscribe(struct wpa_supplicant *wpa_s, |
92 | | const char *service_name, |
93 | | enum nan_service_protocol_type srv_proto_type, |
94 | | const struct wpabuf *ssi, |
95 | | struct nan_subscribe_params *params, bool p2p); |
96 | | void wpas_nan_cancel_subscribe(struct wpa_supplicant *wpa_s, |
97 | | int subscribe_id); |
98 | | int wpas_nan_transmit(struct wpa_supplicant *wpa_s, int handle, |
99 | | const struct wpabuf *ssi, const struct wpabuf *elems, |
100 | | const u8 *peer_addr, u8 req_instance_id); |
101 | | |
102 | | #else /* CONFIG_NAN_USD || CONFIG_NAN */ |
103 | | |
104 | | static inline int wpas_nan_de_init(struct wpa_supplicant *wpa_s) |
105 | 0 | { |
106 | 0 | return 0; |
107 | 0 | } Unexecuted instantiation: events.c:wpas_nan_de_init Unexecuted instantiation: wpa_supplicant.c:wpas_nan_de_init |
108 | | |
109 | | static inline void wpas_nan_de_deinit(struct wpa_supplicant *wpa_s) |
110 | 0 | {}Unexecuted instantiation: events.c:wpas_nan_de_deinit Unexecuted instantiation: wpa_supplicant.c:wpas_nan_de_deinit |
111 | | |
112 | | static inline |
113 | | void wpas_nan_de_rx_sdf(struct wpa_supplicant *wpa_s, const u8 *src, |
114 | | const u8 *a3, unsigned int freq, |
115 | | const u8 *buf, size_t len, int rssi) |
116 | 0 | {}Unexecuted instantiation: events.c:wpas_nan_de_rx_sdf Unexecuted instantiation: wpa_supplicant.c:wpas_nan_de_rx_sdf |
117 | | |
118 | | static inline void wpas_nan_de_flush(struct wpa_supplicant *wpa_s) |
119 | 0 | {}Unexecuted instantiation: events.c:wpas_nan_de_flush Unexecuted instantiation: wpa_supplicant.c:wpas_nan_de_flush |
120 | | |
121 | | #endif /* CONFIG_NAN_USD || CONFIG_NAN */ |
122 | | |
123 | | /* NAN USD only */ |
124 | | #ifdef CONFIG_NAN_USD |
125 | | |
126 | | void wpas_nan_usd_remain_on_channel_cb(struct wpa_supplicant *wpa_s, |
127 | | unsigned int freq, |
128 | | unsigned int duration); |
129 | | void wpas_nan_usd_cancel_remain_on_channel_cb(struct wpa_supplicant *wpa_s, |
130 | | unsigned int freq); |
131 | | void wpas_nan_usd_tx_wait_expire(struct wpa_supplicant *wpa_s); |
132 | | int * wpas_nan_usd_all_freqs(struct wpa_supplicant *wpa_s); |
133 | | int wpas_nan_usd_unpause_publish(struct wpa_supplicant *wpa_s, int publish_id, |
134 | | u8 peer_instance_id, const u8 *peer_addr); |
135 | | int wpas_nan_usd_publish_stop_listen(struct wpa_supplicant *wpa_s, |
136 | | int publish_id); |
137 | | int wpas_nan_usd_subscribe_stop_listen(struct wpa_supplicant *wpa_s, |
138 | | int subscribe_id); |
139 | | void wpas_nan_usd_state_change_notif(struct wpa_supplicant *wpa_s); |
140 | | |
141 | | #else /* CONFIG_NAN_USD */ |
142 | | |
143 | | static inline |
144 | | void wpas_nan_usd_remain_on_channel_cb(struct wpa_supplicant *wpa_s, |
145 | | unsigned int freq, |
146 | | unsigned int duration) |
147 | 0 | {}Unexecuted instantiation: events.c:wpas_nan_usd_remain_on_channel_cb Unexecuted instantiation: wpa_supplicant.c:wpas_nan_usd_remain_on_channel_cb |
148 | | |
149 | | static inline |
150 | | void wpas_nan_usd_cancel_remain_on_channel_cb(struct wpa_supplicant *wpa_s, |
151 | | unsigned int freq) |
152 | 0 | {}Unexecuted instantiation: events.c:wpas_nan_usd_cancel_remain_on_channel_cb Unexecuted instantiation: wpa_supplicant.c:wpas_nan_usd_cancel_remain_on_channel_cb |
153 | | |
154 | | static inline void wpas_nan_usd_tx_wait_expire(struct wpa_supplicant *wpa_s) |
155 | 0 | {}Unexecuted instantiation: events.c:wpas_nan_usd_tx_wait_expire Unexecuted instantiation: wpa_supplicant.c:wpas_nan_usd_tx_wait_expire |
156 | | |
157 | | static inline |
158 | | int * wpas_nan_usd_all_freqs(struct wpa_supplicant *wpa_s) |
159 | 0 | { |
160 | 0 | return NULL; |
161 | 0 | } Unexecuted instantiation: events.c:wpas_nan_usd_all_freqs Unexecuted instantiation: wpa_supplicant.c:wpas_nan_usd_all_freqs |
162 | | |
163 | | static inline |
164 | | int wpas_nan_usd_unpause_publish(struct wpa_supplicant *wpa_s, int publish_id, |
165 | | u8 peer_instance_id, const u8 *peer_addr) |
166 | 0 | { |
167 | 0 | return -1; |
168 | 0 | } Unexecuted instantiation: events.c:wpas_nan_usd_unpause_publish Unexecuted instantiation: wpa_supplicant.c:wpas_nan_usd_unpause_publish |
169 | | |
170 | | static inline |
171 | | int wpas_nan_usd_publish_stop_listen(struct wpa_supplicant *wpa_s, |
172 | | int publish_id) |
173 | 0 | { |
174 | 0 | return -1; |
175 | 0 | } Unexecuted instantiation: events.c:wpas_nan_usd_publish_stop_listen Unexecuted instantiation: wpa_supplicant.c:wpas_nan_usd_publish_stop_listen |
176 | | |
177 | | static inline |
178 | | int wpas_nan_usd_subscribe_stop_listen(struct wpa_supplicant *wpa_s, |
179 | | int subscribe_id) |
180 | 0 | { |
181 | 0 | return -1; |
182 | 0 | } Unexecuted instantiation: events.c:wpas_nan_usd_subscribe_stop_listen Unexecuted instantiation: wpa_supplicant.c:wpas_nan_usd_subscribe_stop_listen |
183 | | |
184 | | static inline void wpas_nan_usd_state_change_notif(struct wpa_supplicant *wpa_s) |
185 | 0 | {}Unexecuted instantiation: events.c:wpas_nan_usd_state_change_notif Unexecuted instantiation: wpa_supplicant.c:wpas_nan_usd_state_change_notif |
186 | | |
187 | | #endif /* CONFIG_NAN_USD */ |
188 | | |
189 | | #endif /* NAN_SUPPLICANT_H */ |