TSG-13684 tsg-service-chaining-engine使用VLAN封装Packet并执行Traffic Mirroring
This commit is contained in:
@@ -7,7 +7,7 @@ extern "C"
|
||||
#endif
|
||||
|
||||
#include "utils.h"
|
||||
#include "raw_packet.h"
|
||||
#include "data_packet.h"
|
||||
#include <linux/if_ether.h>
|
||||
|
||||
enum traffic_type
|
||||
@@ -45,12 +45,12 @@ enum action_reason
|
||||
ACTION_FORWAED_DUE_SELECTED_SF = 0x20,
|
||||
};
|
||||
|
||||
enum package_method
|
||||
enum encapsulate_method
|
||||
{
|
||||
PACKAGE_METHOD_NONE = 0,
|
||||
PACKAGE_METHOD_LAYER2_SWITCH = 1,
|
||||
PACKAGE_METHOD_LAYER3_SWITCH = 2,
|
||||
PACKAGE_METHOD_VXLAN_G = 3,
|
||||
ENCAPSULATE_METHOD_NONE = 0,
|
||||
ENCAPSULATE_METHOD_LAYER2_SWITCH = 1,
|
||||
ENCAPSULATE_METHOD_LAYER3_SWITCH = 2,
|
||||
ENCAPSULATE_METHOD_VXLAN_G = 3,
|
||||
};
|
||||
|
||||
enum health_check_method
|
||||
@@ -73,7 +73,7 @@ struct health_check
|
||||
|
||||
struct connectivity
|
||||
{
|
||||
enum package_method method;
|
||||
enum encapsulate_method method;
|
||||
int int_vlan_tag;
|
||||
int ext_vlan_tag;
|
||||
char dest_ip[64];
|
||||
@@ -123,7 +123,7 @@ const char *traffic_type_to_string(enum traffic_type traffic_type);
|
||||
const char *forward_type_to_string(enum forward_type forward_type);
|
||||
const char *session_action_to_string(enum session_action session_action);
|
||||
const char *action_reason_to_string(enum action_reason action_reason);
|
||||
const char *package_method_to_string(enum package_method package_method);
|
||||
const char *encapsulate_method_to_string(enum encapsulate_method encap_method);
|
||||
|
||||
struct selected_chaining *selected_chaining_create(int chaining_size, uint64_t session_id, char *session_addr);
|
||||
void selected_chaining_destory(struct selected_chaining *chaining);
|
||||
@@ -140,7 +140,7 @@ void policy_enforcer_destory(struct policy_enforcer *enforcer);
|
||||
// return -1 : error
|
||||
int policy_enforcer_register(struct policy_enforcer *enforcer);
|
||||
int policy_enforce_chaining_size(struct policy_enforcer *enforcer);
|
||||
void policy_enforce_select_chainings(struct policy_enforcer *enforcer, struct selected_chainings *chainings, struct session_ctx *s_ctx, struct raw_pkt_parser *parser, uint64_t rule_id, int dir_is_i2e);
|
||||
void policy_enforce_select_chainings(struct policy_enforcer *enforcer, struct selected_chainings *chainings, struct session_ctx *s_ctx, struct data_packet *data_pkt, uint64_t rule_id, int dir_is_i2e);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user