]> git.ipfire.org Git - thirdparty/strongswan.git/blob - programs/starter/parser.h
- import of strongswan-2.7.0
[thirdparty/strongswan.git] / programs / starter / 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 * RCSID $Id: parser.h,v 1.5 2006/01/17 23:43:36 as Exp $
15 */
16
17 #ifndef _IPSEC_PARSER_H_
18 #define _IPSEC_PARSER_H_
19
20 #include "keywords.h"
21
22 typedef struct kw_entry kw_entry_t;
23
24 struct kw_entry {
25 char *name;
26 kw_token_t token;
27 };
28
29 typedef struct kw_list kw_list_t;
30
31 struct kw_list {
32 kw_entry_t *entry;
33 char *value;
34 kw_list_t *next;
35 };
36
37 typedef struct section_list section_list_t;
38
39 struct section_list {
40 char *name;
41 kw_list_t *kw;
42 section_list_t *next;
43 };
44
45 typedef struct config_parsed config_parsed_t;
46
47 struct config_parsed {
48 kw_list_t *config_setup;
49 section_list_t *conn_first, *conn_last;
50 section_list_t *ca_first, *ca_last;
51 };
52
53 config_parsed_t *parser_load_conf (const char *file);
54 void parser_free_conf (config_parsed_t *cfg);
55
56 #endif /* _IPSEC_PARSER_H_ */
57