accounting.h 1.3 KB

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