Add packet IO module
* support marsio
* support dumpfile ( 1 thread read dumpfile & N thread handle packet)
This commit is contained in:
33
src/packet_io/packet_io_marsio.h
Normal file
33
src/packet_io/packet_io_marsio.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef _PACKET_IO_MARSIO_H
|
||||
#define _PACKET_IO_MARSIO_H
|
||||
|
||||
#ifdef __cpluscplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "packet.h"
|
||||
|
||||
struct packet_io_marsio_confg
|
||||
{
|
||||
char app_symbol[64];
|
||||
char dev_symbol[64];
|
||||
uint8_t nr_threads;
|
||||
uint16_t cpu_mask[MAX_THREAD_NUM];
|
||||
};
|
||||
|
||||
struct packet_io_marsio;
|
||||
|
||||
struct packet_io_marsio *packet_io_marsio_create(struct packet_io_marsio_confg *config);
|
||||
void packet_io_marsio_destory(struct packet_io_marsio *handle);
|
||||
struct packet_io_stat *packet_io_marsio_stat(struct packet_io_marsio *handle);
|
||||
|
||||
int packet_io_marsio_init(struct packet_io_marsio *handle, uint16_t thread_id);
|
||||
int packet_io_marsio_recv(struct packet_io_marsio *handle, uint16_t thread_id, struct packet **pkt);
|
||||
void packet_io_marsio_send(struct packet_io_marsio *handle, uint16_t thread_id, struct packet *pkt);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user