2 * Copyright (C) 2011 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
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>.
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
17 * @defgroup pa_tnc_msg pa_tnc_msg
24 typedef struct pa_tnc_msg_t pa_tnc_msg_t
;
26 #define PA_TNC_VERSION 0x01
28 #include "pa_tnc_attr.h"
33 * Interface for the RFC 5792 PA-TNC Posture Attribute protocol.
39 * Get the encoding of the PA-TNC message
41 * @return encoded PA-TNC message
43 chunk_t (*get_encoding
)(pa_tnc_msg_t
*this);
46 * Add a PA-TNC attribute
48 * @param attr PA-TNC attribute to be addedd
50 void (*add_attribute
)(pa_tnc_msg_t
*this, pa_tnc_attr_t
* attr
);
53 * Build the PA-TNC message
55 void (*build
)(pa_tnc_msg_t
*this);
58 * Process the PA-TNC message
60 * @return return processing status
62 status_t (*process
)(pa_tnc_msg_t
*this);
65 * Enumerates over all PA-TNC attributes
67 * @return return attribute enumerator
69 enumerator_t
* (*create_attribute_enumerator
)(pa_tnc_msg_t
*this);
72 * Enumerates over all parsing errors
74 * @return return error enumerator
76 enumerator_t
* (*create_error_enumerator
)(pa_tnc_msg_t
*this);
79 * Destroys a pa_tnc_msg_t object.
81 void (*destroy
)(pa_tnc_msg_t
*this);
85 * Create an empty PA-TNC message
87 pa_tnc_msg_t
* pa_tnc_msg_create(void);
90 * Create an unprocessed PA-TNC message from received data
92 * @param data PA-TNC message data
94 pa_tnc_msg_t
* pa_tnc_msg_create_from_data(chunk_t data
);
96 #endif /** PA_TNC_MSG_H_ @}*/