1 /* strongSwan IPsec config file parser
2 * Copyright (C) 2001-2002 Mathieu Lafon - Arkoon Network Security
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * RCSID $Id: confread.h,v 1.23 2006/04/17 10:32:36 as Exp $
17 #ifndef _IPSEC_CONFREAD_H_
18 #define _IPSEC_CONFREAD_H_
22 #include "../pluto/constants.h"
26 #include "interfaces.h"
55 typedef struct starter_end starter_end_t
;
70 bool has_client_wildcard
;
71 bool has_port_wildcard
;
75 certpolicy_t sendcert
;
85 typedef struct also also_t
;
93 typedef struct starter_conn starter_conn_t
;
102 starter_state_t state
;
104 keyexchange_t keyexchange
;
107 time_t sa_ike_life_seconds
;
108 time_t sa_ipsec_life_seconds
;
109 time_t sa_rekey_margin
;
110 unsigned long sa_keying_tries
;
111 unsigned long sa_rekey_fuzz
;
112 sa_family_t addr_family
;
113 sa_family_t tunnel_addr_family
;
115 starter_end_t left
, right
;
125 dpd_action_t dpd_action
;
128 starter_conn_t
*next
;
131 typedef struct starter_ca starter_ca_t
;
140 starter_state_t state
;
155 typedef struct starter_config starter_config_t
;
157 struct starter_config
{
165 /* pluto/charon keywords */
172 u_int crlcheckinterval
;
174 strict_t strictcrlpolicy
;
178 char *virtual_private
;
181 char *pkcs11initargs
;
182 bool pkcs11keepstate
;
192 /* information about the default route */
193 defaultroute_t defaultroute
;
195 /* number of encountered parsing errors */
199 /* do we parse also statements */
203 starter_ca_t ca_default
;
205 /* connections list (without %default) */
206 starter_ca_t
*ca_first
, *ca_last
;
209 starter_conn_t conn_default
;
211 /* connections list (without %default) */
212 starter_conn_t
*conn_first
, *conn_last
;
215 extern starter_config_t
*confread_load(const char *file
);
216 extern void confread_free(starter_config_t
*cfg
);
218 #endif /* _IPSEC_CONFREAD_H_ */