TSG-13684 tsg-service-chaining-engine使用VLAN封装Packet并执行Traffic Mirroring

This commit is contained in:
luwenpeng
2023-10-18 10:08:10 +08:00
parent 18561bc4fe
commit 0753e8018c
57 changed files with 1784 additions and 1175 deletions

View File

@@ -11,7 +11,7 @@ extern "C"
#define LOG_TAG_SCE "SCE"
#define LOG_TAG_POLICY "POLICY"
#define LOG_TAG_PKTIO "PACKET_IO"
#define LOG_TAG_RAWPKT "RAW_PACKET"
#define LOG_TAG_RAWPKT "DATA_PACKET"
#define LOG_TAG_CTRLPKT "CTRL_PACKET"
#define LOG_TAG_METRICS "G_METRICS"
#define LOG_TAG_SF_METRICS "SF_METRICS"
@@ -36,23 +36,23 @@ extern "C"
#include <netinet/in.h>
/******************************************************************************
* fixed_num_array
* mutable_array
******************************************************************************/
struct fixed_num_array
struct mutable_array
{
uint64_t elems[128];
int num;
int size;
};
void fixed_num_array_init(struct fixed_num_array *array);
void fixed_num_array_add_elem(struct fixed_num_array *array, uint64_t elem);
void fixed_num_array_del_elem(struct fixed_num_array *array, uint64_t elem);
int fixed_num_array_is_full(struct fixed_num_array *array);
int fixed_num_array_count_elem(struct fixed_num_array *array);
int fixed_num_array_exist_elem(struct fixed_num_array *array, uint64_t elem);
int fixed_num_array_index_elem(struct fixed_num_array *array, int index);
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);
/******************************************************************************
* sids