25 lines
958 B
C
25 lines
958 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
#include "packet_io.h"
|
|
|
|
struct marsio_io;
|
|
struct marsio_io *marsio_io_new(const char *app_symbol, const char *dev_symbol, uint16_t *cpu_mask, uint16_t nr_threads);
|
|
void marsio_io_free(struct marsio_io *handle);
|
|
|
|
int marsio_io_init(struct marsio_io *handle, uint16_t thr_idx);
|
|
uint16_t marsio_io_input(struct marsio_io *handle, uint16_t thr_idx, struct packet *pkts, uint16_t nr_pkts);
|
|
void marsio_io_output(struct marsio_io *handle, uint16_t thr_idx, struct packet *pkts, uint16_t nr_pkts);
|
|
void marsio_io_drop(struct marsio_io *handle, uint16_t thr_idx, struct packet *pkts, uint16_t nr_pkts);
|
|
uint16_t marsio_io_inject(struct marsio_io *handle, uint16_t thr_idx, struct packet *pkts, uint16_t nr_pkts);
|
|
void marsio_io_yield(struct marsio_io *handle, uint16_t thr_idx, uint64_t timeout_ms);
|
|
struct packet_io_stat *marsio_io_stat(struct marsio_io *handle, uint16_t thr_idx);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|