1
/* FreeS/WAN config file parser (confread.h)
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.14 2004/12/01 07:33:14 ken Exp $
17
#ifndef _IPSEC_CONFREAD_H_
18
#define _IPSEC_CONFREAD_H_
24
#include "pluto/constants.h" /* FIXME: ugly include */
28
/* define an upper limit to number of times also= can be used */
31
typedef char *ksf[KEY_STRINGS_MAX];
32
typedef int knf[KEY_NUMERIC_MAX];
33
typedef bool str_set[KEY_STRINGS_MAX];
34
typedef bool int_set[KEY_NUMERIC_MAX];
37
sa_family_t addr_family;
38
enum keyword_host addrtype;
39
ip_address addr, nexthop;
44
unsigned char *rsakey1;
45
unsigned char *rsakey2;
48
bool has_client_wildcard;
61
TAILQ_ENTRY(starter_conn) link;
71
bool manualkey; /* TRUE if this conn is going to be manually keyed */
76
struct starter_end left, right;
80
enum keyword_auto desired_state;
96
struct starter_config {
103
bool strictcrlpolicy;
107
unsigned int keep_alive;
110
char *virtual_private;
116
struct starter_conn conn_default;
119
/* connections list (without %default) */
120
TAILQ_HEAD(, starter_conn) conns;
123
struct starter_config *confread_load(const char *file, char **perr);
125
void confread_free(struct starter_config *cfg);
127
#endif /* _IPSEC_CONFREAD_H_ */