1: /*
2: * Copyright (C) 2012 Tobias Brunner
3: * HSR Hochschule fuer Technik Rapperswil
4: *
5: * This program is free software; you can redistribute it and/or modify it
6: * under the terms of the GNU General Public License as published by the
7: * Free Software Foundation; either version 2 of the License, or (at your
8: * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9: *
10: * This program is distributed in the hope that it will be useful, but
11: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13: * for more details.
14: */
15:
16: /**
17: * @defgroup ipsec_event_listener ipsec_event_listener
18: * @{ @ingroup libipsec
19: */
20:
21: #ifndef IPSEC_EVENT_LISTENER_H_
22: #define IPSEC_EVENT_LISTENER_H_
23:
24: typedef struct ipsec_event_listener_t ipsec_event_listener_t;
25:
26: #include <library.h>
27:
28: /**
29: * Listener interface for IPsec events
30: *
31: * All methods are optional.
32: */
33: struct ipsec_event_listener_t {
34:
35: /**
36: * Called when the lifetime of an IPsec SA expired
37: *
38: * @param protocol protocol of the expired SA
39: * @param spi spi of the expired SA
40: * @param dst destination address of expired SA
41: * @param hard TRUE if this is a hard expire, FALSE otherwise
42: */
43: void (*expire)(uint8_t protocol, uint32_t spi, host_t *dst, bool hard);
44: };
45:
46: #endif /** IPSEC_EVENT_LISTENER_H_ @}*/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>