ccf31d346acc4197bf9fc038fbb25fafdd8b47e2
[strongswan.git] / src / libcharon / plugins / tnccs_11 / messages / imc_imv_msg.h
1 /*
2 * Copyright (C) 2010 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 imc_imv_msg imc_imv_msg
18 * @{ @ingroup tnccs_11
19 */
20
21 #ifndef IMC_IMV_MSG_H_
22 #define IMC_IMV_MSG_H_
23
24 typedef struct imc_imv_msg_t imc_imv_msg_t;
25
26 #include "tnccs_msg.h"
27
28 #include <tnc/tncif.h>
29
30 /**
31 * Classs representing the PB-PA message type.
32 */
33 struct imc_imv_msg_t {
34
35 /**
36 * TNCCS Message interface
37 */
38 tnccs_msg_t tnccs_msg_interface;
39
40 /**
41 * Get IMC-IMV message type
42 *
43 * @return IMC-IMV message type
44 */
45 TNC_MessageType (*get_msg_type)(imc_imv_msg_t *this);
46
47 /**
48 * Get IMC-IMV message body
49 *
50 * @return IMC-IMV message body
51 */
52 chunk_t (*get_msg_body)(imc_imv_msg_t *this);
53 };
54
55 /**
56 * Create an IMC-IMV message from XML-encoded message node
57 *
58 * @param msg_node XML-encoded message node
59 */
60 tnccs_msg_t *imc_imv_msg_create_from_node(xmlNodePtr node);
61
62 /**
63 * Create an IMC-IMV message from parameters
64 *
65 * @param msg_type IMC-IMV message type
66 * @param msg_body IMC-IMV message body
67 */
68 tnccs_msg_t *imc_imv_msg_create(TNC_MessageType msg_type, chunk_t msg_body);
69
70 #endif /** IMC_IMV_MSG_H_ @}*/