TSG-13684 tsg-service-chaining-engine使用VLAN封装Packet并执行Traffic Mirroring
This commit is contained in:
@@ -8,19 +8,35 @@ extern "C"
|
||||
|
||||
#include <marsio.h>
|
||||
|
||||
// only for gtest
|
||||
/******************************************************************************
|
||||
* Packet IO API for gtest
|
||||
******************************************************************************/
|
||||
|
||||
int mbuff_get_metadata(marsio_buff_t *rx_buff, struct metadata *meta);
|
||||
int mbuff_set_metadata(marsio_buff_t *tx_buff, struct metadata *meta);
|
||||
void vlan_encapsulate(marsio_buff_t *mbuff, int vlan_id, int replace_orig_vlan_header);
|
||||
struct mr_instance *packet_io_get_mr_instance(struct packet_io *handle);
|
||||
|
||||
/******************************************************************************
|
||||
* Packet IO API for global
|
||||
******************************************************************************/
|
||||
|
||||
struct packet_io *packet_io_create(const char *profile, int thread_num, cpu_set_t *coremask);
|
||||
void packet_io_destory(struct packet_io *handle);
|
||||
|
||||
/******************************************************************************
|
||||
* Packet IO API for thread
|
||||
******************************************************************************/
|
||||
|
||||
// return 0 for success
|
||||
// return -1 for error
|
||||
int packet_io_thread_init(struct packet_io *handle, struct thread_ctx *thread_ctx);
|
||||
void packet_io_thread_wait(struct packet_io *handle, struct thread_ctx *thread_ctx, int timeout_ms);
|
||||
|
||||
// return n_packet_recved
|
||||
int packet_io_thread_polling_nf(struct packet_io *handle, struct thread_ctx *thread_ctx);
|
||||
int packet_io_thread_polling_endpoint(struct packet_io *handle, struct thread_ctx *thread_ctx);
|
||||
int packet_io_thread_polling_endpoint_l3(struct packet_io *handle, struct thread_ctx *thread_ctx);
|
||||
int packet_io_thread_polling_endpoint_l2(struct packet_io *handle, struct thread_ctx *thread_ctx);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user