Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * hostapd / RADIUS Accounting |
| 3 | * Copyright (c) 2002-2005, Jouni Malinen <j@w1.fi> |
| 4 | * |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 5 | * This software may be distributed under the terms of the BSD license. |
| 6 | * See README for more details. |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef ACCOUNTING_H |
| 10 | #define ACCOUNTING_H |
| 11 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 12 | #ifdef CONFIG_NO_ACCOUNTING |
Dmitry Shmidt | b97e428 | 2016-02-08 10:16:07 -0800 | [diff] [blame] | 13 | static inline int accounting_sta_get_id(struct hostapd_data *hapd, |
| 14 | struct sta_info *sta) |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 15 | { |
Dmitry Shmidt | b97e428 | 2016-02-08 10:16:07 -0800 | [diff] [blame] | 16 | return 0; |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 17 | } |
| 18 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 19 | static inline void accounting_sta_start(struct hostapd_data *hapd, |
| 20 | struct sta_info *sta) |
| 21 | { |
| 22 | } |
| 23 | |
| 24 | static inline void accounting_sta_stop(struct hostapd_data *hapd, |
| 25 | struct sta_info *sta) |
| 26 | { |
| 27 | } |
| 28 | |
| 29 | static inline int accounting_init(struct hostapd_data *hapd) |
| 30 | { |
| 31 | return 0; |
| 32 | } |
| 33 | |
| 34 | static inline void accounting_deinit(struct hostapd_data *hapd) |
| 35 | { |
| 36 | } |
| 37 | #else /* CONFIG_NO_ACCOUNTING */ |
Dmitry Shmidt | b97e428 | 2016-02-08 10:16:07 -0800 | [diff] [blame] | 38 | int accounting_sta_get_id(struct hostapd_data *hapd, struct sta_info *sta); |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 39 | void accounting_sta_start(struct hostapd_data *hapd, struct sta_info *sta); |
| 40 | void accounting_sta_stop(struct hostapd_data *hapd, struct sta_info *sta); |
| 41 | int accounting_init(struct hostapd_data *hapd); |
| 42 | void accounting_deinit(struct hostapd_data *hapd); |
| 43 | #endif /* CONFIG_NO_ACCOUNTING */ |
| 44 | |
| 45 | #endif /* ACCOUNTING_H */ |