]> git.ipfire.org Git - thirdparty/strongswan.git/blob - src/libtnccs/plugins/tnccs_20/messages/pb_access_recommendation_msg.h
Moved tnc-tnccs, tnc-imc, tnccs-11, tnccs-20 and tnccs-dynamic libcharon plugins...
[thirdparty/strongswan.git] / src / libtnccs / plugins / tnccs_20 / messages / pb_access_recommendation_msg.h
1 /*
2 * Copyright (C) 2010 Sansar Choinyambuu
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 pb_access_recommendation_msg pb_access_recommendation_msg
18 * @{ @ingroup tnccs_20
19 */
20
21 #ifndef PB_ACCESS_RECOMMENDATION_MSG_H_
22 #define PB_ACCESS_RECOMMENDATION_MSG_H_
23
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;
26
27 #include "pb_tnc_msg.h"
28
29 /**
30 * PB Access Recommendation Codes as defined in section 4.7 of RFC 5793
31 */
32 enum pb_access_recommendation_code_t {
33 PB_REC_ACCESS_ALLOWED = 1,
34 PB_REC_ACCESS_DENIED = 2,
35 PB_REC_QUARANTINED = 3,
36 };
37
38 /**
39 * enum name for pb_access_recommendation_code_t.
40 */
41 extern enum_name_t *pb_access_recommendation_code_names;
42
43
44 /**
45 * Class representing the PB-Access-Recommendation message type.
46 */
47 struct pb_access_recommendation_msg_t {
48
49 /**
50 * PB-TNC Message interface
51 */
52 pb_tnc_msg_t pb_interface;
53
54 /**
55 * Get PB Access Recommendation
56 *
57 * @return PB Access Recommendation
58 */
59 u_int16_t (*get_access_recommendation)(pb_access_recommendation_msg_t *this);
60 };
61
62 /**
63 * Create a PB-Access-Recommendation message from parameters
64 *
65 * @param recommendation Access Recommendation code
66 */
67 pb_tnc_msg_t* pb_access_recommendation_msg_create(u_int16_t recommendation);
68
69 /**
70 * Create an unprocessed PB-Access-Recommendation message from raw data
71 *
72 * @param data PB-Access-Recommendation message data
73 */
74 pb_tnc_msg_t* pb_access_recommendation_msg_create_from_data(chunk_t data);
75
76 #endif /** PB_PA_MSG_H_ @}*/