2 * Copyright (C) 2010 Sansar Choinyambuu
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 pb_access_recommendation_msg pb_access_recommendation_msg
18 * @{ @ingroup tnccs_20
21 #ifndef PB_ACCESS_RECOMMENDATION_MSG_H_
22 #define PB_ACCESS_RECOMMENDATION_MSG_H_
24 typedef enum pb_access_recommendation_code_t pb_access_recommendation_code_t
;
25 typedef struct pb_access_recommendation_msg_t pb_access_recommendation_msg_t
;
27 #include "pb_tnc_msg.h"
30 * PB Access Recommendation Codes as defined in section 4.7 of RFC 5793
32 enum pb_access_recommendation_code_t
{
33 PB_REC_ACCESS_ALLOWED
= 1,
34 PB_REC_ACCESS_DENIED
= 2,
35 PB_REC_QUARANTINED
= 3,
39 * enum name for pb_access_recommendation_code_t.
41 extern enum_name_t
*pb_access_recommendation_code_names
;
45 * Class representing the PB-Access-Recommendation message type.
47 struct pb_access_recommendation_msg_t
{
50 * PB-TNC Message interface
52 pb_tnc_msg_t pb_interface
;
55 * Get PB Access Recommendation
57 * @return PB Access Recommendation
59 u_int16_t (*get_access_recommendation
)(pb_access_recommendation_msg_t
*this);
63 * Create a PB-Access-Recommendation message from parameters
65 * @param recommendation Access Recommendation code
67 pb_tnc_msg_t
* pb_access_recommendation_msg_create(u_int16_t recommendation
);
70 * Create an unprocessed PB-Access-Recommendation message from raw data
72 * @param data PB-Access-Recommendation message data
74 pb_tnc_msg_t
* pb_access_recommendation_msg_create_from_data(chunk_t data
);
76 #endif /** PB_PA_MSG_H_ @}*/