TSG-16531 PacketAdapter适配容器环境,使用mrzcpd收包,通过RAW Socket注RST包

This commit is contained in:
luwenpeng
2023-08-09 18:47:16 +08:00
parent 1063574ca0
commit e34aa3f5e2
65 changed files with 4379 additions and 1174 deletions

View File

@@ -0,0 +1,35 @@
#ifndef _PACKET_IO_H
#define _PACKET_IO_H
#ifdef __cpluscplus
extern "C"
{
#endif
#include <marsio.h>
#define MAX_THREAD_NUM 128
enum action
{
ACTION_BYPASS = 0x1,
ACTION_DROP = 0x2,
};
struct packet_io;
typedef enum action packet_handle_cb(const char *data, int len, void *args);
void packet_io_set_callback(struct packet_io *handle, packet_handle_cb *cb, void *args);
struct packet_io *packet_io_create(const char *profile);
void packet_io_destory(struct packet_io *handle);
int packet_io_thread_init(struct packet_io *handle, int thread_index);
void packet_io_thread_wait(struct packet_io *handle, int thread_index, int timeout_ms);
int packet_io_thread_polling(struct packet_io *handle, int thread_index);
int packet_io_thread_number(struct packet_io *handle);
#ifdef __cpluscplus
}
#endif
#endif