Added add_segment() method to TCG/SEG attributes
[strongswan.git] / src / libimcv / ita / ita_attr.h
1 /*
2 * Copyright (C) 2011-2014 Andreas Steffen
3 * HSR 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
16 /**
17 * @defgroup ita_attr ita_attr
18 * @{ @ingroup libimcv
19 */
20
21 #ifndef ITA_ATTR_H_
22 #define ITA_ATTR_H_
23
24 #include "pa_tnc/pa_tnc_attr.h"
25
26 #include <library.h>
27
28 typedef enum ita_attr_t ita_attr_t;
29
30 /**
31 * IETF standard PA-TNC attribute types defined by RFC 5792
32 */
33 enum ita_attr_t {
34 ITA_ATTR_COMMAND = 1,
35 ITA_ATTR_DUMMY = 2,
36 ITA_ATTR_GET_SETTINGS = 3,
37 ITA_ATTR_SETTINGS = 4,
38 ITA_ATTR_START_ANGEL = 5,
39 ITA_ATTR_STOP_ANGEL = 6,
40 ITA_ATTR_ECHO = 7,
41 ITA_ATTR_DEVICE_ID = 8
42 };
43
44 /**
45 * enum name for ita_attr_t.
46 */
47 extern enum_name_t *ita_attr_names;
48
49 /**
50 * Create a ITA PA-TNC attribute from data
51 *
52 * @param type attribute type
53 * @param length attribute length
54 * @param value attribute value or segment
55 */
56 pa_tnc_attr_t* ita_attr_create_from_data(u_int32_t type, size_t length,
57 chunk_t value);
58
59 #endif /** ITA_ATTR_H_ @}*/