updated Doxyfile
[strongswan.git] / src / charon / config / attributes / attribute_manager.h
1 /*
2 * Copyright (C) 2008 Martin Willi
3 * Hochschule fuer Technik Rapperswil
4 *
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>.
9 *
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
13 * for more details.
14 *
15 * $Id$
16 */
17
18 /**
19 * @defgroup attribute_manager attribute_manager
20 * @{ @ingroup attributes
21 */
22
23 #ifndef ATTRIBUTE_MANAGER_H_
24 #define ATTRIBUTE_MANAGER_H_
25
26 #include <config/attributes/attribute_provider.h>
27
28 typedef struct attribute_manager_t attribute_manager_t;
29
30 /**
31 * Provide configuration attributes to include in CFG Payloads.
32 */
33 struct attribute_manager_t {
34
35 /**
36 * Acquire a virtual IP address to assign to a peer.
37 *
38 * @param pool pool name to acquire address from
39 * @param id peer identity to get address for
40 * @param auth authorization infos of peer
41 * @param requested IP in configuration request
42 * @return allocated address, NULL to serve none
43 */
44 host_t* (*acquire_address)(attribute_manager_t *this,
45 char *pool, identification_t *id,
46 auth_info_t *auth, host_t *requested);
47
48 /**
49 * Release a previously acquired address.
50 *
51 * @param pool pool name from which the address was acquired
52 * @param address address to release
53 * @param id peer identity to get address for
54 */
55 void (*release_address)(attribute_manager_t *this,
56 char *pool, host_t *address, identification_t *id);
57
58 /**
59 * Register an attribute provider to the manager.
60 *
61 * @param provider attribute provider to register
62 */
63 void (*add_provider)(attribute_manager_t *this,
64 attribute_provider_t *provider);
65 /**
66 * Unregister an attribute provider from the manager.
67 *
68 * @param provider attribute provider to unregister
69 */
70 void (*remove_provider)(attribute_manager_t *this,
71 attribute_provider_t *provider);
72 /**
73 * Destroy a attribute_manager instance.
74 */
75 void (*destroy)(attribute_manager_t *this);
76 };
77
78 /**
79 * Create a attribute_manager instance.
80 */
81 attribute_manager_t *attribute_manager_create();
82
83 #endif /** ATTRIBUTE_MANAGER_H_ @}*/