]> git.ipfire.org Git - thirdparty/strongswan.git/blob - src/libimcv/ita/ita_attr_settings.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libimcv / ita / ita_attr_settings.h
1 /*
2 * Copyright (C) 2012 Andreas Steffen
3 *
4 * Copyright (C) secunet Security Networks AG
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
17 /**
18 * @defgroup ita_attr_settings ita_attr_settings
19 * @{ @ingroup ita_attr
20 */
21
22 #ifndef ITA_ATTR_SETTINGS_H_
23 #define ITA_ATTR_SETTINGS_H_
24
25 typedef struct ita_attr_settings_t ita_attr_settings_t;
26
27 #include "pa_tnc/pa_tnc_attr.h"
28
29 /**
30 * Class implementing the ITA Settings PA-TNC attribute.
31 *
32 */
33 struct ita_attr_settings_t {
34
35 /**
36 * Public PA-TNC attribute interface
37 */
38 pa_tnc_attr_t pa_tnc_attribute;
39
40 /**
41 * Add a setting to the list
42 *
43 * @param name name of the setting
44 * @param value value of the setting
45 */
46 void (*add)(ita_attr_settings_t *this, char *name, chunk_t value);
47
48 /**
49 * Return an enumerator over all name/value pairs
50 *
51 * @return enumerator returns char **name, chunk_t *value
52 */
53 enumerator_t* (*create_enumerator)(ita_attr_settings_t *this);
54 };
55
56 /**
57 * Creates an ita_attr_settings_t object with an empty settings list
58 */
59 pa_tnc_attr_t* ita_attr_settings_create(void);
60
61 /**
62 * Creates an ita_attr_settings_t object from received data
63 *
64 * @param length Total length of attribute value
65 * @param value Unparsed attribute value (might be a segment)
66 */
67 pa_tnc_attr_t* ita_attr_settings_create_from_data(size_t length, chunk_t value);
68
69 #endif /** ITA_ATTR_SETTINGS_H_ @}*/