output all known PA-TNC subtype names
This commit is contained in:
@@ -2,4 +2,5 @@ INCLUDES = -I$(top_srcdir)/src/libstrongswan
|
||||
|
||||
noinst_LTLIBRARIES = libtncif.la
|
||||
|
||||
libtncif_la_SOURCES = tncif.h tncifimc.h tncifimv.h tncif_names.h tncif_names.c
|
||||
libtncif_la_SOURCES = tncif.h tncifimc.h tncifimv.h tncif_names.h tncif_names.c \
|
||||
tncif_pa_subtypes.h tncif_pa_subtypes.c
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2011 Andreas Steffen
|
||||
*
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#include "tncif_pa_subtypes.h"
|
||||
|
||||
ENUM(ietf_pa_subtype_names, PA_SUBTYPE_IETF_TESTING, PA_SUBTYPE_IETF_NEA_CLIENT,
|
||||
"Testing",
|
||||
"Operating System",
|
||||
"Anti-Virus",
|
||||
"Anti-Spyware",
|
||||
"Anti-Malware",
|
||||
"Firewall",
|
||||
"IDPS",
|
||||
"VPN",
|
||||
"NEA Client"
|
||||
);
|
||||
|
||||
ENUM(pa_subtype_tcg_names, PA_SUBTYPE_TCG_PTS, PA_SUBTYPE_TCG_PTS,
|
||||
"PTS"
|
||||
);
|
||||
|
||||
ENUM_BEGIN(pa_subtype_fhh_names, PA_SUBTYPE_FHH_HOSTSCANNER, PA_SUBTYPE_FHH_DUMMY,
|
||||
"HostScanner",
|
||||
"Dummy"
|
||||
);
|
||||
ENUM_NEXT(pa_subtype_fhh_names, PA_SUBTYPE_FHH_PLATID, PA_SUBTYPE_FHH_ATTESTATION,
|
||||
PA_SUBTYPE_FHH_DUMMY,
|
||||
"PlatformID",
|
||||
"Attestation"
|
||||
);
|
||||
ENUM_NEXT(pa_subtype_fhh_names, PA_SUBTYPE_FHH_CLAMAV, PA_SUBTYPE_FHH_CLAMAV,
|
||||
PA_SUBTYPE_FHH_ATTESTATION,
|
||||
"ClamAV"
|
||||
);
|
||||
ENUM_END(pa_subtype_fhh_names, PA_SUBTYPE_FHH_CLAMAV);
|
||||
|
||||
ENUM(pa_subtype_ita_names, PA_SUBTYPE_ITA_TEST, PA_SUBTYPE_ITA_TEST,
|
||||
"Test"
|
||||
);
|
||||
|
||||
/**
|
||||
* See header
|
||||
*/
|
||||
enum_name_t* get_pa_subtype_names(pen_t pen)
|
||||
{
|
||||
switch (pen)
|
||||
{
|
||||
case PEN_IETF:
|
||||
return pa_subtype_ita_names;
|
||||
case PEN_TCG:
|
||||
return pa_subtype_tcg_names;
|
||||
case PEN_FHH:
|
||||
return pa_subtype_fhh_names;
|
||||
case PEN_ITA:
|
||||
return pa_subtype_ita_names;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Andreas Steffen, HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#ifndef TNCIF_PA_SUBTYPES_H_
|
||||
#define TNCIF_PA_SUBTYPES_H_
|
||||
|
||||
typedef enum pa_subtype_ietf_t pa_subtype_ietf_t;
|
||||
typedef enum pa_subtype_tcg_t pa_subtype_tcg_t;
|
||||
typedef enum pa_subtype_fhh_t pa_subtype_fhh_t;
|
||||
typedef enum pa_subtype_ita_t pa_subtype_ita_t;
|
||||
|
||||
#include <library.h>
|
||||
#include <pen/pen.h>
|
||||
|
||||
/**
|
||||
* PA-TNC IETF Standard Subtypes as defined in section 3.5 of RFC 5792
|
||||
*/
|
||||
enum pa_subtype_ietf_t {
|
||||
PA_SUBTYPE_IETF_TESTING = 0,
|
||||
PA_SUBTYPE_IETF_OPERATING_SYSTEM = 1,
|
||||
PA_SUBTYPE_IETF_ANTI_VIRUS = 2,
|
||||
PA_SUBTYPE_IETF_ANTI_SPYWARE = 3,
|
||||
PA_SUBTYPE_IETF_ANTI_MALWARE = 4,
|
||||
PA_SUBTYPE_IETF_FIREWALL = 5,
|
||||
PA_SUBTYPE_IETF_IDPS = 6,
|
||||
PA_SUBTYPE_IETF_VPN = 7,
|
||||
PA_SUBTYPE_IETF_NEA_CLIENT = 8
|
||||
};
|
||||
|
||||
/**
|
||||
* enum name for pa_subtype_ietf_t.
|
||||
*/
|
||||
extern enum_name_t *pa_subtype_ietf_names;
|
||||
|
||||
/**
|
||||
* PA-TNC TCG Subtypes
|
||||
*/
|
||||
enum pa_subtype_tcg_t {
|
||||
PA_SUBTYPE_TCG_PTS = 1
|
||||
};
|
||||
|
||||
/**
|
||||
* enum name for pa_subtype_tcg_t.
|
||||
*/
|
||||
extern enum_name_t *pa_subtype_tcg_names;
|
||||
|
||||
/**
|
||||
* PA-TNC FHH Subtypes
|
||||
*/
|
||||
enum pa_subtype_fhh_t {
|
||||
PA_SUBTYPE_FHH_HOSTSCANNER = 0x30,
|
||||
PA_SUBTYPE_FHH_DUMMY = 0x31,
|
||||
PA_SUBTYPE_FHH_PLATID = 0x33,
|
||||
PA_SUBTYPE_FHH_ATTESTATION = 0x34,
|
||||
PA_SUBTYPE_FHH_CLAMAV = 0x41
|
||||
};
|
||||
|
||||
/**
|
||||
* enum name for pa_subtype_fhh_t.
|
||||
*/
|
||||
extern enum_name_t *pa_subtype_fhh_names;
|
||||
|
||||
/**
|
||||
* PA-TNC ITA-HSR Subtypes
|
||||
*/
|
||||
enum pa_subtype_ita_t {
|
||||
PA_SUBTYPE_ITA_TEST = 1
|
||||
};
|
||||
|
||||
/**
|
||||
* enum name for pa_subtype_ita_t.
|
||||
*/
|
||||
extern enum_name_t *pa_subtype_ita_names;
|
||||
|
||||
/**
|
||||
* Return the pa_subtype_names for a given PEN
|
||||
*
|
||||
* @param pen Private Enterprise Number (PEN)
|
||||
* @return pa_subtype_names if found, NULL else
|
||||
*/
|
||||
extern enum_name_t* get_pa_subtype_names(pen_t pen);
|
||||
|
||||
#endif /** TNCIF_PA_SUBTYPES_H_ @}*/
|
||||
Reference in New Issue
Block a user