Annotation of embedaddon/strongswan/src/libcharon/plugins/stroke/stroke_counter.h, revision 1.1.1.1
1.1 misho 1: /*
2: * Copyright (C) 2017 Tobias Brunner
3: * HSR Hochschule fuer Technik Rapperswil
4: *
5: * Copyright (C) 2012 Martin Willi
6: * Copyright (C) 2012 revosec AG
7: *
8: * This program is free software; you can redistribute it and/or modify it
9: * under the terms of the GNU General Public License as published by the
10: * Free Software Foundation; either version 2 of the License, or (at your
11: * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
12: *
13: * This program is distributed in the hope that it will be useful, but
14: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16: * for more details.
17: */
18:
19: /**
20: * @defgroup stroke_counter stroke_counter
21: * @{ @ingroup stroke
22: */
23:
24: #ifndef STROKE_COUNTER_H_
25: #define STROKE_COUNTER_H_
26:
27: #include <library.h>
28:
29: typedef struct stroke_counter_t stroke_counter_t;
30:
31: /**
32: * Interface for counter values for different IKE events.
33: */
34: struct stroke_counter_t {
35:
36: /**
37: * Print counter values to an output stream.
38: *
39: * @param out output stream to write to
40: * @param name connection name to get counters for, NULL for global
41: */
42: void (*print)(stroke_counter_t *this, FILE *out, char *name);
43:
44: /**
45: * Reset global or connection specific counters.
46: *
47: * @param name name of connection counters to reset, NULL for global
48: */
49: void (*reset)(stroke_counter_t *this, char *name);
50:
51: /**
52: * Destroy a stroke_counter_t.
53: */
54: void (*destroy)(stroke_counter_t *this);
55: };
56:
57: /**
58: * Create a stroke_counter instance.
59: */
60: stroke_counter_t *stroke_counter_create();
61:
62: #endif /** STROKE_COUNTER_H_ @}*/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>