tncs.c File Reference

EAP-TNC - TNCS (IF-IMV, IF-TNCCS, and IF-TNCCS-SOH). More...

#include "includes.h"
#include <dlfcn.h>
#include "common.h"
#include "base64.h"
#include "tncs.h"
#include "eap_common/eap_tlv_common.h"
#include "eap_common/eap_defs.h"
Include dependency graph for tncs.c:

Go to the source code of this file.

Data Structures

struct  tnc_if_imv
struct  tncs_data
struct  tncs_data::conn_imv
struct  tncs_global

Defines

#define TNC_CONFIG_FILE   "/etc/tnc_config"
#define IF_TNCCS_START
#define IF_TNCCS_END   "\n</TNCCS-Batch>"
#define TNC_RESULT_SUCCESS   0
#define TNC_RESULT_NOT_INITIALIZED   1
#define TNC_RESULT_ALREADY_INITIALIZED   2
#define TNC_RESULT_NO_COMMON_VERSION   3
#define TNC_RESULT_CANT_RETRY   4
#define TNC_RESULT_WONT_RETRY   5
#define TNC_RESULT_INVALID_PARAMETER   6
#define TNC_RESULT_CANT_RESPOND   7
#define TNC_RESULT_ILLEGAL_OPERATION   8
#define TNC_RESULT_OTHER   9
#define TNC_RESULT_FATAL   10
#define TNC_CONNECTION_STATE_CREATE   0
#define TNC_CONNECTION_STATE_HANDSHAKE   1
#define TNC_CONNECTION_STATE_ACCESS_ALLOWED   2
#define TNC_CONNECTION_STATE_ACCESS_ISOLATED   3
#define TNC_CONNECTION_STATE_ACCESS_NONE   4
#define TNC_CONNECTION_STATE_DELETE   5
#define TNC_IFIMV_VERSION_1   1
#define TNC_VENDORID_ANY   ((TNC_VendorID) 0xffffff)
#define TNC_SUBTYPE_ANY   ((TNC_Subtype) 0xff)
#define TNC_TNCCS_RECOMMENDATION   0x00000001
#define TNC_TNCCS_ERROR   0x00000002
#define TNC_TNCCS_PREFERREDLANGUAGE   0x00000003
#define TNC_TNCCS_REASONSTRINGS   0x00000004
#define TNC_MAX_IMV_ID   10

Typedefs

typedef unsigned long TNC_UInt32
typedef unsigned char * TNC_BufferReference
typedef TNC_UInt32 TNC_IMVID
typedef TNC_UInt32 TNC_ConnectionID
typedef TNC_UInt32 TNC_ConnectionState
typedef TNC_UInt32 TNC_RetryReason
typedef TNC_UInt32 TNC_IMV_Action_Recommendation
typedef TNC_UInt32 TNC_IMV_Evaluation_Result
typedef TNC_UInt32 TNC_MessageType
typedef TNC_MessageType * TNC_MessageTypeList
typedef TNC_UInt32 TNC_VendorID
typedef TNC_UInt32 TNC_Subtype
typedef TNC_UInt32 TNC_Version
typedef TNC_UInt32 TNC_Result
typedef TNC_UInt32 TNC_AttributeID
typedef TNC_Result(* TNC_TNCS_BindFunctionPointer )(TNC_IMVID imvID, char *functionName, void **pOutfunctionPointer)

Enumerations

enum  IMV_Action_Recommendation { TNC_IMV_ACTION_RECOMMENDATION_ALLOW, TNC_IMV_ACTION_RECOMMENDATION_NO_ACCESS, TNC_IMV_ACTION_RECOMMENDATION_ISOLATE, TNC_IMV_ACTION_RECOMMENDATION_NO_RECOMMENDATION }
enum  IMV_Evaluation_Result {
  TNC_IMV_EVALUATION_RESULT_COMPLIANT, TNC_IMV_EVALUATION_RESULT_NONCOMPLIANT_MINOR, TNC_IMV_EVALUATION_RESULT_NONCOMPLIANT_MAJOR, TNC_IMV_EVALUATION_RESULT_ERROR,
  TNC_IMV_EVALUATION_RESULT_DONT_KNOW
}

Functions

TNC_Result TNC_TNCS_ReportMessageTypes (TNC_IMVID imvID, TNC_MessageTypeList supportedTypes, TNC_UInt32 typeCount)
TNC_Result TNC_TNCS_SendMessage (TNC_IMVID imvID, TNC_ConnectionID connectionID, TNC_BufferReference message, TNC_UInt32 messageLength, TNC_MessageType messageType)
TNC_Result TNC_TNCS_RequestHandshakeRetry (TNC_IMVID imvID, TNC_ConnectionID connectionID, TNC_RetryReason reason)
TNC_Result TNC_TNCS_ProvideRecommendation (TNC_IMVID imvID, TNC_ConnectionID connectionID, TNC_IMV_Action_Recommendation recommendation, TNC_IMV_Evaluation_Result evaluation)
TNC_Result TNC_TNCS_GetAttribute (TNC_IMVID imvID, TNC_ConnectionID connectionID, TNC_AttributeID attribureID, TNC_UInt32 bufferLength, TNC_BufferReference buffer, TNC_UInt32 *pOutValueLength)
TNC_Result TNC_TNCS_SetAttribute (TNC_IMVID imvID, TNC_ConnectionID connectionID, TNC_AttributeID attribureID, TNC_UInt32 bufferLength, TNC_BufferReference buffer)
TNC_Result TNC_TNCS_BindFunction (TNC_IMVID imvID, char *functionName, void **pOutFunctionPointer)
void tncs_init_connection (struct tncs_data *tncs)
size_t tncs_total_send_len (struct tncs_data *tncs)
u8 * tncs_copy_send_buf (struct tncs_data *tncs, u8 *pos)
char * tncs_if_tnccs_start (struct tncs_data *tncs)
char * tncs_if_tnccs_end (void)
enum tncs_process_res tncs_process_if_tnccs (struct tncs_data *tncs, const u8 *msg, size_t len)
struct tncs_datatncs_init (void)
void tncs_deinit (struct tncs_data *tncs)
int tncs_global_init (void)
void tncs_global_deinit (void)
struct wpabuftncs_build_soh_request (void)
struct wpabuftncs_process_soh (const u8 *soh_tlv, size_t soh_tlv_len, int *failure)

Detailed Description

EAP-TNC - TNCS (IF-IMV, IF-TNCCS, and IF-TNCCS-SOH).

Copyright
Copyright (c) 2007-2008, Jouni Malinen <j@w1.fi>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Alternatively, this software may be distributed under the terms of BSD license.

See README and COPYING for more details.

Definition in file tncs.c.


Define Documentation

#define IF_TNCCS_START
Value:
"<?xml version=\"1.0\"?>\n" \
"<TNCCS-Batch BatchId=\"%d\" Recipient=\"TNCS\" " \
"xmlns=\"http://www.trustedcomputinggroup.org/IWG/TNC/1_0/IF_TNCCS#\" " \
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " \
"xsi:schemaLocation=\"http://www.trustedcomputinggroup.org/IWG/TNC/1_0/" \
"IF_TNCCS# https://www.trustedcomputinggroup.org/XML/SCHEMA/TNCCS_1.0.xsd\">\n"

Definition at line 30 of file tncs.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 21 23:21:47 2009 for hostapd by  doxygen 1.6.1