This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
stellar-stellar/infra/packet_io/pcap_io.h
2024-10-21 10:49:41 +08:00

25 lines
703 B
C

#pragma once
#ifdef __cplusplus
extern "C"
{
#endif
#include "packet_io.h"
void *pcap_io_new(const char *toml_file);
void pcap_io_free(void *handle);
int pcap_io_isbreak(void *handle);
int pcap_io_init(void *handle, uint16_t thr_idx);
int pcap_io_recv(void *handle, uint16_t thr_idx, struct packet *pkts[], int nr_pkts);
void pcap_io_send(void *handle, uint16_t thr_idx, struct packet *pkts[], int nr_pkts);
void pcap_io_drop(void *handle, uint16_t thr_idx, struct packet *pkts[], int nr_pkts);
void pcap_io_yield(void *handle, uint16_t thr_idx);
void pcap_io_polling(void *handle, uint16_t thr_idx);
struct packet_io_stat *pcap_io_stat(void *handle, uint16_t thr_idx);
#ifdef __cplusplus
}
#endif