introduced a PA-TNC attribute manager

This commit is contained in:
Andreas Steffen
2011-09-10 22:39:56 +02:00
parent cf8fd42c77
commit 74eb850dc0
19 changed files with 570 additions and 207 deletions
+14
View File
@@ -14,8 +14,22 @@
*/
#include "ita_attr.h"
#include "ita/ita_attr_command.h"
ENUM(ita_attr_names, ITA_ATTR_COMMAND, ITA_ATTR_COMMAND,
"Command",
);
/**
* See header
*/
pa_tnc_attr_t* ita_attr_create_from_data(u_int32_t type, chunk_t value)
{
switch (type)
{
case ITA_ATTR_COMMAND:
return ita_attr_command_create_from_data(value);
default:
return NULL;
}
}
+10
View File
@@ -21,6 +21,8 @@
#ifndef ITA_ATTR_H_
#define ITA_ATTR_H_
#include "pa_tnc/pa_tnc_attr.h"
#include <library.h>
typedef enum ita_attr_t ita_attr_t;
@@ -37,4 +39,12 @@ enum ita_attr_t {
*/
extern enum_name_t *ita_attr_names;
/**
* Create a ITA PA-TNC attribute from data
*
* @param type attribute type
* @param value attribute value
*/
pa_tnc_attr_t* ita_attr_create_from_data(u_int32_t type, chunk_t value);
#endif /** ITA_ATTR_H_ @}*/