2 * Copyright (C) 2006 Mike McCauley
3 * Copyright (C) 2010 Andreas Steffen, 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
22 * Called by the IMC to inform a TNCC about the set of message types the IMC
25 TNC_Result
TNC_TNCC_ReportMessageTypes(TNC_IMCID imc_id
,
26 TNC_MessageTypeList supported_types
,
27 TNC_UInt32 type_count
)
29 return charon
->imcs
->set_message_types(charon
->imcs
, imc_id
,
30 supported_types
, type_count
);
34 * Called by the IMC to ask a TNCC to retry an Integrity Check Handshake
36 TNC_Result
TNC_TNCC_RequestHandshakeRetry(TNC_IMCID imc_id
,
37 TNC_ConnectionID connection_id
,
38 TNC_RetryReason reason
)
40 DBG2(DBG_TNC
,"TNCC_RequestHandshakeRetry not supported yet");
41 return TNC_RESULT_CANT_RESPOND
;
45 * Called by the IMC when an IMC-IMV message is to be sent
47 TNC_Result
TNC_TNCC_SendMessage(TNC_IMCID imc_id
,
48 TNC_ConnectionID connection_id
,
49 TNC_BufferReference message
,
50 TNC_UInt32 message_len
,
51 TNC_MessageType message_type
)
53 return charon
->tnccs
->send_message(charon
->tnccs
, connection_id
, message
,
54 message_len
, message_type
);
58 * Called by the IMC when it needs a function pointer
60 TNC_Result
TNC_TNCC_BindFunction(TNC_IMCID id
,
62 void **function_pointer
)
64 if (streq(function_name
, "TNC_TNCC_ReportMessageTypes"))
66 *function_pointer
= (void*)TNC_TNCC_ReportMessageTypes
;
68 else if (streq(function_name
, "TNC_TNCC_RequestHandshakeRetry"))
70 *function_pointer
= (void*)TNC_TNCC_RequestHandshakeRetry
;
72 else if (streq(function_name
, "TNC_TNCC_SendMessage"))
74 *function_pointer
= (void*)TNC_TNCC_SendMessage
;
78 return TNC_RESULT_INVALID_PARAMETER
;
80 return TNC_RESULT_SUCCESS
;