TSG-16531 PacketAdapter适配容器环境,使用mrzcpd收包,通过RAW Socket注RST包
This commit is contained in:
35
common/include/packet_io.h
Normal file
35
common/include/packet_io.h
Normal 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
|
||||
Reference in New Issue
Block a user