2 * Copyright (C) 2013 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 pb_pdp_referral_msg pb_pdp_referral_msg
18 * @{ @ingroup tnccs_20
21 #ifndef PB_PDP_REFERRAL_MSG_H_
22 #define PB_PDP_REFERRAL_MSG_H_
24 typedef enum pb_pdp_identifier_type_t pb_pdp_identifier_type_t
;
25 typedef struct pb_pdp_referral_msg_t pb_pdp_referral_msg_t
;
27 #include "messages/pb_tnc_msg.h"
32 * PB-TNC PDP Identifier Types as defined in section 3.1.1.2 of the
33 * TCG TNC PDP Discovery and Validation Specification 1.0
35 enum pb_pdp_identifier_type_t
{
42 * enum name for pb_pdp_identifier_type_t.
44 extern enum_name_t
*pb_pdp_identifier_type_names
;
47 * Class representing the PB-Remediation-Parameters message type.
49 struct pb_pdp_referral_msg_t
{
52 * PB-TNC Message interface
54 pb_tnc_msg_t pb_interface
;
57 * Get the PDP Identifier Type (Vendor ID and Type)
59 * @return PDP Identifier Type
61 pen_type_t (*get_identifier_type
)(pb_pdp_referral_msg_t
*this);
64 * Get the PDP Identifier Value
66 * @return PDP Identifier Value
68 chunk_t (*get_identifier
)(pb_pdp_referral_msg_t
*this);
71 * Get the PDP Identifier Value
73 * @param protocol PT transport protocol
74 * @param port PT port the PDP is listening on
75 * @return Fully Qualified Domain Name of PDP
77 chunk_t (*get_fqdn
)(pb_pdp_referral_msg_t
*this, u_int8_t
*protocol
,
83 * Create a general PB-PDP-Referral message
85 * @param identifier_type PDP Identifier Type
86 * @param identifier PDP Identifier
88 pb_tnc_msg_t
* pb_pdp_referral_msg_create(pen_type_t identifier_type
,
92 * Create a PB-PDP-Referral message of TCG Type PDP FQDN Identifier
94 * @param fqdn Fully Qualified Domain Name of PDP
95 * @param port PT-TLS port the PDP is listening on
97 pb_tnc_msg_t
* pb_pdp_referral_msg_create_from_fqdn(chunk_t fqdn
, u_int16_t port
);
100 * Create an unprocessed PB-PDP-Referral message from raw data
102 * @param data PB-PDP-Referral message data
104 pb_tnc_msg_t
* pb_pdp_referral_msg_create_from_data(chunk_t data
);
106 #endif /** PB_PA_MSG_H_ @}*/