introduced a PA-TNC attribute manager
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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_ @}*/
|
||||
|
||||
Reference in New Issue
Block a user