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_
23 #include "ipsec-parser.h"
24 #include "interfaces.h"
42 /* shared with ike_version_t */
44 KEY_EXCHANGE_IKEV1
= 1,
45 KEY_EXCHANGE_IKEV2
= 2,
54 typedef struct starter_end starter_end_t
;
76 bool has_client_wildcard
;
77 bool has_port_wildcard
;
81 certpolicy_t sendcert
;
93 typedef struct also also_t
;
101 typedef struct starter_conn starter_conn_t
;
103 struct starter_conn
{
110 starter_state_t state
;
112 keyexchange_t keyexchange
;
114 u_int32_t eap_vendor
;
117 char *xauth_identity
;
119 time_t sa_ike_life_seconds
;
120 time_t sa_ipsec_life_seconds
;
121 time_t sa_rekey_margin
;
122 u_int64_t sa_ipsec_life_bytes
;
123 u_int64_t sa_ipsec_margin_bytes
;
124 u_int64_t sa_ipsec_life_packets
;
125 u_int64_t sa_ipsec_margin_packets
;
126 unsigned long sa_keying_tries
;
127 unsigned long sa_rekey_fuzz
;
132 sa_family_t addr_family
;
133 sa_family_t tunnel_addr_family
;
136 starter_end_t left
, right
;
146 dpd_action_t dpd_action
;
149 dpd_action_t close_action
;
154 char *me_mediated_by
;
157 starter_conn_t
*next
;
160 typedef struct starter_ca starter_ca_t
;
169 starter_state_t state
;
185 typedef struct starter_config starter_config_t
;
187 struct starter_config
{
195 /* pluto/charon keywords */
200 char *plutostderrlog
;
203 u_int crlcheckinterval
;
205 strict_t strictcrlpolicy
;
209 u_int force_keepalive
;
210 char *virtual_private
;
212 char *pkcs11initargs
;
213 bool pkcs11keepstate
;
223 /* information about the default route */
224 defaultroute_t defaultroute
;
226 /* number of encountered parsing errors */
230 /* do we parse also statements */
234 starter_ca_t ca_default
;
236 /* connections list (without %default) */
237 starter_ca_t
*ca_first
, *ca_last
;
240 starter_conn_t conn_default
;
242 /* connections list (without %default) */
243 starter_conn_t
*conn_first
, *conn_last
;
246 extern starter_config_t
*confread_load(const char *file
);
247 extern void confread_free(starter_config_t
*cfg
);
249 #endif /* _IPSEC_CONFREAD_H_ */