TSG-13500 tsg-service-chaining-engine扫描策略
This commit is contained in:
@@ -6,6 +6,8 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum layer_type
|
||||
{
|
||||
// 数据链路层
|
||||
@@ -43,6 +45,15 @@ enum layer_type
|
||||
LAYER_TYPE_UNKNOWN,
|
||||
};
|
||||
|
||||
enum ldbc_method
|
||||
{
|
||||
LDBC_METHOD_HASH_INT_IP = 1,
|
||||
LDBC_METHOD_HASH_EXT_IP = 2,
|
||||
LDBC_METHOD_HASH_INT_IP_AND_EXT_IP = 3,
|
||||
LDBC_METHOD_HASH_INNERMOST_INT_IP = 4,
|
||||
LDBC_METHOD_HASH_INNERMOST_EXT_IP = 5,
|
||||
};
|
||||
|
||||
enum parse_status
|
||||
{
|
||||
PARSE_STATUS_CONTINUE,
|
||||
@@ -73,6 +84,8 @@ int raw_packet_parser_get_most_outer_tuple4(struct raw_pkt_parser *handler, stru
|
||||
int raw_packet_parser_get_most_inner_address(struct raw_pkt_parser *handler, struct addr_tuple4 *addr);
|
||||
int raw_packet_parser_get_most_outer_address(struct raw_pkt_parser *handler, struct addr_tuple4 *addr);
|
||||
|
||||
uint64_t raw_packet_parser_get_hash_value(struct raw_pkt_parser *handler, enum ldbc_method method, int dir_is_internal);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
31
common/include/utils.h
Normal file
31
common/include/utils.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef _UTILS_H
|
||||
#define _UTILS_H
|
||||
|
||||
#ifdef __cpluscplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#define MIN(a, b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
#define LOG_TAG_POLICY "POLICY"
|
||||
#define LOG_TAG_UTILS "UTILS"
|
||||
|
||||
struct fixed_num_array
|
||||
{
|
||||
int 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, int elem);
|
||||
void fixed_num_array_del_elem(struct fixed_num_array *array, int elem);
|
||||
int fixed_num_array_count_elem(struct fixed_num_array *array);
|
||||
int fixed_num_array_index_elem(struct fixed_num_array *array, int index);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user