xref: /freebsd/contrib/wpa/src/ap/accounting.h (revision 780fb4a2fa9a9aee5ac48a60b790f567c0dc13e9)
1e28a4053SRui Paulo /*
2e28a4053SRui Paulo  * hostapd / RADIUS Accounting
3e28a4053SRui Paulo  * Copyright (c) 2002-2005, Jouni Malinen <j@w1.fi>
4e28a4053SRui Paulo  *
5f05cddf9SRui Paulo  * This software may be distributed under the terms of the BSD license.
6f05cddf9SRui Paulo  * See README for more details.
7e28a4053SRui Paulo  */
8e28a4053SRui Paulo 
9e28a4053SRui Paulo #ifndef ACCOUNTING_H
10e28a4053SRui Paulo #define ACCOUNTING_H
11e28a4053SRui Paulo 
12e28a4053SRui Paulo #ifdef CONFIG_NO_ACCOUNTING
accounting_sta_get_id(struct hostapd_data * hapd,struct sta_info * sta)13*780fb4a2SCy Schubert static inline int accounting_sta_get_id(struct hostapd_data *hapd,
14f05cddf9SRui Paulo 					struct sta_info *sta)
15f05cddf9SRui Paulo {
16*780fb4a2SCy Schubert 	return 0;
17f05cddf9SRui Paulo }
18f05cddf9SRui Paulo 
accounting_sta_start(struct hostapd_data * hapd,struct sta_info * sta)19e28a4053SRui Paulo static inline void accounting_sta_start(struct hostapd_data *hapd,
20e28a4053SRui Paulo 					struct sta_info *sta)
21e28a4053SRui Paulo {
22e28a4053SRui Paulo }
23e28a4053SRui Paulo 
accounting_sta_stop(struct hostapd_data * hapd,struct sta_info * sta)24e28a4053SRui Paulo static inline void accounting_sta_stop(struct hostapd_data *hapd,
25e28a4053SRui Paulo 				       struct sta_info *sta)
26e28a4053SRui Paulo {
27e28a4053SRui Paulo }
28e28a4053SRui Paulo 
accounting_init(struct hostapd_data * hapd)29e28a4053SRui Paulo static inline int accounting_init(struct hostapd_data *hapd)
30e28a4053SRui Paulo {
31e28a4053SRui Paulo 	return 0;
32e28a4053SRui Paulo }
33e28a4053SRui Paulo 
accounting_deinit(struct hostapd_data * hapd)34e28a4053SRui Paulo static inline void accounting_deinit(struct hostapd_data *hapd)
35e28a4053SRui Paulo {
36e28a4053SRui Paulo }
37e28a4053SRui Paulo #else /* CONFIG_NO_ACCOUNTING */
38*780fb4a2SCy Schubert int accounting_sta_get_id(struct hostapd_data *hapd, struct sta_info *sta);
39e28a4053SRui Paulo void accounting_sta_start(struct hostapd_data *hapd, struct sta_info *sta);
40e28a4053SRui Paulo void accounting_sta_stop(struct hostapd_data *hapd, struct sta_info *sta);
41e28a4053SRui Paulo int accounting_init(struct hostapd_data *hapd);
42e28a4053SRui Paulo void accounting_deinit(struct hostapd_data *hapd);
43e28a4053SRui Paulo #endif /* CONFIG_NO_ACCOUNTING */
44e28a4053SRui Paulo 
45e28a4053SRui Paulo #endif /* ACCOUNTING_H */
46