#pragma once

#ifdef __cplusplus
extern "C"
{
#endif

#include "packet_io.h"

void *pcap_io_new(const struct packet_io_config *cfg);
void pcap_io_free(void *handle);
int pcap_io_isbreak(void *handle);

int pcap_io_init(void *handle, uint16_t thr_idx);
uint16_t pcap_io_input(void *handle, uint16_t thr_idx, struct packet *pkts, uint16_t nr_pkts);
void pcap_io_output(void *handle, uint16_t thr_idx, struct packet *pkts, uint16_t nr_pkts);
void pcap_io_drop(void *handle, uint16_t thr_idx, struct packet *pkts, uint16_t nr_pkts);
uint16_t pcap_io_inject(void *handle, uint16_t thr_idx, struct packet *pkts, uint16_t nr_pkts);
void pcap_io_yield(void *handle, uint16_t thr_idx);
struct packet_io_stat *pcap_io_stat(void *handle, uint16_t thr_idx);

#ifdef __cplusplus
}
#endif
