- function to get dh_group_number added
[strongswan.git] / Source / charon / configuration_manager.h
1 /**
2 * @file configuration_manager.h
3 *
4 * @brief Manages all configuration aspects of the daemon.
5 *
6 */
7
8 /*
9 * Copyright (C) 2005 Jan Hutter, Martin Willi
10 * Hochschule fuer Technik Rapperswil
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 * for more details.
21 */
22
23 #ifndef CONFIGURATION_MANAGER_H_
24 #define CONFIGURATION_MANAGER_H_
25
26 #include "types.h"
27 #include "utils/linked_list.h"
28 #include "utils/host.h"
29 #include "payloads/transform_substructure.h"
30
31 /**
32 * @brief Manages all configuration aspects of the daemon.
33 *
34 */
35 typedef struct configuration_manager_s configuration_manager_t;
36
37 struct configuration_manager_s {
38
39 status_t (*get_remote_host) (configuration_manager_t *this, char *name, host_t **host);
40
41 status_t (*get_local_host) (configuration_manager_t *this, char *name, host_t **host);
42
43 status_t (*get_dh_group_number) (configuration_manager_t *this, char *name, u_int16_t *dh_group_number, u_int16_t priority);
44
45 status_t (*get_proposals_for_host) (configuration_manager_t *this, host_t *host, linked_list_iterator_t *list);
46
47 status_t (*select_proposals_for_host) (configuration_manager_t *this, host_t *host, linked_list_iterator_t *in, linked_list_iterator_t *out);
48
49 status_t (*is_dh_group_allowed_for_host) (configuration_manager_t *this, host_t *host, diffie_hellman_group_t group, bool *allowed);
50
51 status_t (*destroy) (configuration_manager_t *this);
52 };
53
54 /**
55 * Creates the mighty configuration manager
56 *
57 * @return
58 * - pointer to created manager object if succeeded
59 * - NULL if memory allocation failed
60 */
61 configuration_manager_t *configuration_manager_create();
62
63 #endif /*CONFIGURATION_MANAGER_H_*/