starter: Use new parser to read config file
[strongswan.git] / src / starter / ipsec-parser.h
1 /* strongSwan config file parser
2 * Copyright (C) 2001-2002 Mathieu Lafon - Arkoon Network Security
3 *
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>.
8 *
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
12 * for more details.
13 */
14
15 #ifndef _IPSEC_PARSER_H_
16 #define _IPSEC_PARSER_H_
17
18 #include "keywords.h"
19
20 typedef struct kw_list kw_list_t;
21
22 struct kw_list {
23 kw_entry_t *entry;
24 char *value;
25 kw_list_t *next;
26 };
27
28 typedef struct section_list section_list_t;
29
30 struct section_list {
31 char *name;
32 kw_list_t *kw;
33 section_list_t *next;
34 };
35
36 typedef struct config_parsed config_parsed_t;
37
38 struct config_parsed {
39 kw_list_t *config_setup;
40 section_list_t *conn_first, *conn_last;
41 section_list_t *ca_first, *ca_last;
42 };
43
44 config_parsed_t *parser_load_conf (const char *file);
45 void parser_free_conf (config_parsed_t *cfg);
46
47 #endif /* _IPSEC_PARSER_H_ */
48