xref: /freebsd/contrib/wpa/src/ap/accounting.h (revision e28a4053b110e06768631ac8401ed4a3c05e68a5)
1*e28a4053SRui Paulo /*
2*e28a4053SRui Paulo  * hostapd / RADIUS Accounting
3*e28a4053SRui Paulo  * Copyright (c) 2002-2005, Jouni Malinen <j@w1.fi>
4*e28a4053SRui Paulo  *
5*e28a4053SRui Paulo  * This program is free software; you can redistribute it and/or modify
6*e28a4053SRui Paulo  * it under the terms of the GNU General Public License version 2 as
7*e28a4053SRui Paulo  * published by the Free Software Foundation.
8*e28a4053SRui Paulo  *
9*e28a4053SRui Paulo  * Alternatively, this software may be distributed under the terms of BSD
10*e28a4053SRui Paulo  * license.
11*e28a4053SRui Paulo  *
12*e28a4053SRui Paulo  * See README and COPYING for more details.
13*e28a4053SRui Paulo  */
14*e28a4053SRui Paulo 
15*e28a4053SRui Paulo #ifndef ACCOUNTING_H
16*e28a4053SRui Paulo #define ACCOUNTING_H
17*e28a4053SRui Paulo 
18*e28a4053SRui Paulo void accounting_sta_interim(struct hostapd_data *hapd, struct sta_info *sta);
19*e28a4053SRui Paulo #ifdef CONFIG_NO_ACCOUNTING
20*e28a4053SRui Paulo static inline void accounting_sta_start(struct hostapd_data *hapd,
21*e28a4053SRui Paulo 					struct sta_info *sta)
22*e28a4053SRui Paulo {
23*e28a4053SRui Paulo }
24*e28a4053SRui Paulo 
25*e28a4053SRui Paulo static inline void accounting_sta_stop(struct hostapd_data *hapd,
26*e28a4053SRui Paulo 				       struct sta_info *sta)
27*e28a4053SRui Paulo {
28*e28a4053SRui Paulo }
29*e28a4053SRui Paulo 
30*e28a4053SRui Paulo static inline int accounting_init(struct hostapd_data *hapd)
31*e28a4053SRui Paulo {
32*e28a4053SRui Paulo 	return 0;
33*e28a4053SRui Paulo }
34*e28a4053SRui Paulo 
35*e28a4053SRui Paulo static inline void accounting_deinit(struct hostapd_data *hapd)
36*e28a4053SRui Paulo {
37*e28a4053SRui Paulo }
38*e28a4053SRui Paulo #else /* CONFIG_NO_ACCOUNTING */
39*e28a4053SRui Paulo void accounting_sta_start(struct hostapd_data *hapd, struct sta_info *sta);
40*e28a4053SRui Paulo void accounting_sta_stop(struct hostapd_data *hapd, struct sta_info *sta);
41*e28a4053SRui Paulo int accounting_init(struct hostapd_data *hapd);
42*e28a4053SRui Paulo void accounting_deinit(struct hostapd_data *hapd);
43*e28a4053SRui Paulo #endif /* CONFIG_NO_ACCOUNTING */
44*e28a4053SRui Paulo 
45*e28a4053SRui Paulo #endif /* ACCOUNTING_H */
46