TSG-22348 feature: adapt maat support UUID
This commit is contained in:
@@ -6,7 +6,7 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "utils.h"
|
||||
|
||||
enum session_state
|
||||
{
|
||||
@@ -36,8 +36,7 @@ struct control_packet
|
||||
uint64_t session_id;
|
||||
enum session_state state;
|
||||
char method[32];
|
||||
uint64_t rule_ids[32];
|
||||
int rule_id_num;
|
||||
struct uuid_array rule_uuid_array;
|
||||
};
|
||||
|
||||
const char *session_state_to_string(enum session_state state);
|
||||
|
||||
@@ -33,25 +33,29 @@ extern "C"
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <uuid/uuid.h>
|
||||
|
||||
/******************************************************************************
|
||||
* mutable_array
|
||||
* uuid_array
|
||||
******************************************************************************/
|
||||
|
||||
struct mutable_array
|
||||
#define UUID_STRING_SIZE 37
|
||||
#define MAX_RULE_NUM 128
|
||||
|
||||
struct uuid_array
|
||||
{
|
||||
uint64_t elems[128];
|
||||
uuid_t uuids[MAX_RULE_NUM];
|
||||
int num;
|
||||
int size;
|
||||
};
|
||||
|
||||
void mutable_array_init(struct mutable_array *array);
|
||||
void mutable_array_add_elem(struct mutable_array *array, uint64_t elem);
|
||||
void mutable_array_del_elem(struct mutable_array *array, uint64_t elem);
|
||||
int mutable_array_is_full(struct mutable_array *array);
|
||||
int mutable_array_count_elem(struct mutable_array *array);
|
||||
int mutable_array_exist_elem(struct mutable_array *array, uint64_t elem);
|
||||
int mutable_array_index_elem(struct mutable_array *array, int index);
|
||||
void uuid_array_init(struct uuid_array *array);
|
||||
void uuid_array_append(struct uuid_array *array, uuid_t uuid);
|
||||
void uuid_array_remove(struct uuid_array *array, uuid_t uuid);
|
||||
int uuid_array_contains(struct uuid_array *array, uuid_t uuid);
|
||||
int uuid_array_is_full(struct uuid_array *array);
|
||||
int uuid_array_get_count(struct uuid_array *array);
|
||||
uuid_t *uuid_array_get_at(struct uuid_array *array, int index);
|
||||
|
||||
/******************************************************************************
|
||||
* device
|
||||
|
||||
Reference in New Issue
Block a user