implemented the RFC 5792 PA-TNC protocol and an example IMC/IMV pair
[strongswan.git] / src / libimcv / ita / ita_attr_command.h
1 /*
2 * Copyright (C) 2011 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_commandt ita_attr_command
18 * @{ @ingroup ita_attr_command
19 */
20
21 #ifndef ITA_ATTR_COMMAND_H_
22 #define ITA_ATTR_COMMAND_H_
23
24 typedef struct ita_attr_command_t ita_attr_command_t;
25
26 #include "pa_tnc/pa_tnc_attr.h"
27
28 #define ITA_ATTR_COMMAND 0x01
29
30 /**
31 * Class implementing the ITA Command PA-TNC attribute.
32 *
33 */
34 struct ita_attr_command_t {
35
36 /**
37 * Public PA-TNC attribute interface
38 */
39 pa_tnc_attr_t pa_tnc_attribute;
40
41 /**
42 * Get the ITA command string
43 *
44 * @return ITA command string
45 */
46 char* (*get_command)(ita_attr_command_t *this);
47 };
48
49 /**
50 * Creates an ita_attr_command_t object from a command string
51 *
52 * @param command ITA command string
53 */
54 pa_tnc_attr_t* ita_attr_command_create(char *command);
55
56 /**
57 * Creates an ita_attr_command_t object from received data
58 *
59 * @param command ITA command string
60 */
61 pa_tnc_attr_t* ita_attr_command_create_from_data(chunk_t value);
62
63 #endif /** ITA_ATTR_COMMAND_H_ @}*/