2 * @file configuration.h
4 * @brief Interface configuration_t.
9 * Copyright (C) 2006 Martin Willi
10 * Hochschule fuer Technik Rapperswil
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 #ifndef CONFIGURATION_H_
24 #define CONFIGURATION_H_
26 typedef struct configuration_t configuration_t
;
31 * @brief The interface for various daemon related configs.
34 * - configuration_create()
38 struct configuration_t
{
41 * @brief Returns the retransmit timeout.
43 * A return value of zero means the request should not be
44 * retransmitted again.
46 * @param this calling object
47 * @param retransmitted number of times a message was retransmitted so far
48 * @return time in milliseconds, when to do next retransmit
50 u_int32_t (*get_retransmit_timeout
) (configuration_t
*this,
51 u_int32_t retransmitted
);
54 * @brief Returns the timeout for an half open IKE_SA in ms.
56 * Half open means that the IKE_SA is still on a not established state
58 * @param this calling object
59 * @return timeout in milliseconds (ms)
61 u_int32_t (*get_half_open_ike_sa_timeout
) (configuration_t
*this);
64 * @brief Returns the keepalive interval in s.
66 * The keepalive interval defines the idle time after which a
67 * NAT keepalive packet should be sent.
69 * @param this calling object
70 * @return interval in s
72 u_int32_t (*get_keepalive_interval
) (configuration_t
*this);
75 * @brief Returns the interval to retry a failed action again.
77 * In some situations, the protocol may be in a state where processing
78 * is not possible and an action must be retried (e.g. rekeying).
80 * @param this calling object
81 * @return interval in s
83 u_int32_t (*get_retry_interval
) (configuration_t
*this);
86 * @brief Destroys a configuration_t object.
88 * @param this calling object
90 void (*destroy
) (configuration_t
*this);
94 * @brief Creates a configuration backend.
96 * @return static_configuration_t object
100 configuration_t
*configuration_create(void);
102 #endif /*CONFIGURATION_H_*/