1 /* strongSwan IPsec config file parser
2 * Copyright (C) 2001-2002 Mathieu Lafon
3 * Arkoon Network Security
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>.
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
16 #ifndef _IPSEC_CONFREAD_H_
17 #define _IPSEC_CONFREAD_H_
24 #include "interfaces.h"
53 typedef struct starter_end starter_end_t
;
72 bool has_client_wildcard
;
73 bool has_port_wildcard
;
77 certpolicy_t sendcert
;
88 typedef struct also also_t
;
96 typedef struct starter_conn starter_conn_t
;
105 starter_state_t state
;
107 keyexchange_t keyexchange
;
109 u_int32_t eap_vendor
;
112 time_t sa_ike_life_seconds
;
113 time_t sa_ipsec_life_seconds
;
114 time_t sa_rekey_margin
;
115 unsigned long sa_keying_tries
;
116 unsigned long sa_rekey_fuzz
;
117 sa_family_t addr_family
;
118 sa_family_t tunnel_addr_family
;
120 starter_end_t left
, right
;
130 dpd_action_t dpd_action
;
134 char *me_mediated_by
;
137 starter_conn_t
*next
;
140 typedef struct starter_ca starter_ca_t
;
149 starter_state_t state
;
165 typedef struct starter_config starter_config_t
;
167 struct starter_config
{
175 /* pluto/charon keywords */
180 char *plutostderrlog
;
183 u_int crlcheckinterval
;
185 strict_t strictcrlpolicy
;
189 u_int force_keepalive
;
190 char *virtual_private
;
192 char *pkcs11initargs
;
193 bool pkcs11keepstate
;
203 /* information about the default route */
204 defaultroute_t defaultroute
;
206 /* number of encountered parsing errors */
210 /* do we parse also statements */
214 starter_ca_t ca_default
;
216 /* connections list (without %default) */
217 starter_ca_t
*ca_first
, *ca_last
;
220 starter_conn_t conn_default
;
222 /* connections list (without %default) */
223 starter_conn_t
*conn_first
, *conn_last
;
226 extern starter_config_t
*confread_load(const char *file
);
227 extern void confread_free(starter_config_t
*cfg
);
229 #endif /* _IPSEC_CONFREAD_H_ */