diff options
Diffstat (limited to 'tacplus-daemon/statistics.h')
-rw-r--r-- | tacplus-daemon/statistics.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/tacplus-daemon/statistics.h b/tacplus-daemon/statistics.h new file mode 100644 index 0000000..ce722a3 --- /dev/null +++ b/tacplus-daemon/statistics.h @@ -0,0 +1,50 @@ +/* + TACACS+ D-Bus Daemon code + + Copyright (c) 2019 AT&T Intellectual Property. + Copyright (c) 2015-2016 Brocade Communications Systems, Inc. + + SPDX-License-Identifier: GPL-2.0-only +*/ + +#include <stdlib.h> + +struct statistics { + int authen_requests; + int authen_replies; + int author_requests; + int author_replies; + int acct_requests; + int acct_replies; + int failed_connects; + int unknown_replies; +}; + + +extern int create_statistics(int); +extern void free_statistics(); + +/* Authentication stats */ +extern void inc_authen_requests(int); +extern void inc_authen_replies(int); +extern int get_authen_requests(int); +extern int get_authen_replies(int); + +/* Authorization stats */ +extern void inc_author_requests(int); +extern void inc_author_replies(int); +extern int get_author_requests(int); +extern int get_author_replies(int); + +/* Accounting stats */ +extern void inc_acct_requests(int); +extern void inc_acct_replies(int); +extern int get_acct_requests(int); +extern int get_acct_replies(int); + +/* Misc stats */ +extern void inc_failed_connects(int); +extern int get_failed_connects(int); + +extern void inc_unknown_replies(int); +extern int get_unknown_replies(int); |