summaryrefslogtreecommitdiff
path: root/tacplus-daemon/statistics.h
blob: ce722a3fafeb20b6c2fc6b8d608c76833647377c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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);