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-2022/src/packet_io/pcap_live_mode/pio_pcap_live.h

48 lines
1.4 KiB
C

/*
**********************************************************************************************
* File: pcap_live.h
* Description: pcap live runmode api
* Authors: Liu WenTan <liuwentan@geedgenetworks.com>
* Date: 2022-07-15
* Copyright: (c) 2018-2022 Geedge Networks, Inc. All rights reserved.
***********************************************************************************************
*/
#pragma once
#include <stdint.h>
struct pio_pcap_live_instance {
};
struct pio_pcap_live_device {
};
struct pio_pcap_live_device_context {
};
/*
@brief open pcap_live device
@param pdev: pcap_live device's pointer
@param dev_name: device name, such as eth1, eth2 ...
@param nr_rxq: number of the packet receiving queues for the device
@param nr_txq: number of the packet sending queues for the device
*/
int pio_pcap_live_device_open(struct packet_io_device *pdev, const char *dev_name, uint32_t nr_rxq, uint32_t nr_txq);
/*
@brief close pcap_live device
*/
int pio_pcap_live_device_close(const void *init_data);
int pio_pcap_live_device_receive(struct packet_io_device *pdev, uint32_t rxq_id, struct packet *p[], int nr_p);
int pio_pcap_live_device_send(struct packet_io_device *pdev, uint32_t txq_id, struct packet *p[], int nr_p);
int pio_pcap_live_instance_create(struct packet_io_instance *pinst, int worker_thread_num);
void pio_pcap_live_instance_destroy(void);