updated Copyright info
[strongswan.git] / src / libimcv / ita / ita_attr.c
1 /*
2 * Copyright (C) 2011-2012 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 #include "ita_attr.h"
17 #include "ita/ita_attr_command.h"
18 #include "ita/ita_attr_dummy.h"
19
20 ENUM(ita_attr_names, ITA_ATTR_COMMAND, ITA_ATTR_DUMMY,
21 "Command",
22 "Dummy",
23 );
24
25 /**
26 * See header
27 */
28 pa_tnc_attr_t* ita_attr_create_from_data(u_int32_t type, chunk_t value)
29 {
30 switch (type)
31 {
32 case ITA_ATTR_COMMAND:
33 return ita_attr_command_create_from_data(value);
34 case ITA_ATTR_DUMMY:
35 return ita_attr_dummy_create_from_data(value);
36 default:
37 return NULL;
38 }
39 }