accounting.h revision 8d520ff1dc2da35cdca849e982051b86468016d8
1f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)/* 2f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * hostapd / RADIUS Accounting 3f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * Copyright (c) 2002-2005, Jouni Malinen <j@w1.fi> 4f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * 5f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * This program is free software; you can redistribute it and/or modify 6f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * it under the terms of the GNU General Public License version 2 as 7f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * published by the Free Software Foundation. 8f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * 9f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * Alternatively, this software may be distributed under the terms of BSD 10cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) * license. 111320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci * 12f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) * See README and COPYING for more details. 131320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci */ 14f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 15f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#ifndef ACCOUNTING_H 16a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#define ACCOUNTING_H 17f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)void accounting_sta_interim(struct hostapd_data *hapd, struct sta_info *sta); 19f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#ifdef CONFIG_NO_ACCOUNTING 206e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles)static inline void accounting_sta_start(struct hostapd_data *hapd, 216e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) struct sta_info *sta) 221320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci{ 231320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci} 241320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci 256e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles)static inline void accounting_sta_stop(struct hostapd_data *hapd, 266e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) struct sta_info *sta) 276e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles){ 286e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles)} 296e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) 306e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles)static inline int accounting_init(struct hostapd_data *hapd) 316e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles){ 326e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) return 0; 336e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles)} 346e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) 356e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles)static inline void accounting_deinit(struct hostapd_data *hapd) 366e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles){ 37f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} 38f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#else /* CONFIG_NO_ACCOUNTING */ 39f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)void accounting_sta_start(struct hostapd_data *hapd, struct sta_info *sta); 40f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)void accounting_sta_stop(struct hostapd_data *hapd, struct sta_info *sta); 41f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)int accounting_init(struct hostapd_data *hapd); 42f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void accounting_deinit(struct hostapd_data *hapd); 43f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#endif /* CONFIG_NO_ACCOUNTING */ 44f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 45f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#endif /* ACCOUNTING_H */ 46f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)