From 822c8f60b72cca97fb2c86db37835a60917d1c7e Mon Sep 17 00:00:00 2001 From: Daniel Gollub Date: Mon, 11 Nov 2019 15:07:38 +0100 Subject: DANOS Import --- tacplus-daemon/statistics.h | 50 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tacplus-daemon/statistics.h (limited to 'tacplus-daemon/statistics.h') 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 + +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); -- cgit v1.2.3