X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_port%2Frte_port_source_sink.h;h=be585a77170031b554342c1118fff191d301efaa;hb=9a8ad786c718b57383473f5f2730ef4282b3e59d;hp=0f9be7997ea7ea89deb5319600b09be2b0376b2c;hpb=ef3403fb6f9a3c4b730d2e4fbe7ddc0291ffa992;p=dpdk.git diff --git a/lib/librte_port/rte_port_source_sink.h b/lib/librte_port/rte_port_source_sink.h index 0f9be7997e..be585a7717 100644 --- a/lib/librte_port/rte_port_source_sink.h +++ b/lib/librte_port/rte_port_source_sink.h @@ -1,7 +1,7 @@ /*- * BSD LICENSE * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * Copyright(c) 2010-2016 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,12 +53,29 @@ extern "C" { struct rte_port_source_params { /** Pre-initialized buffer pool */ struct rte_mempool *mempool; + + /** The full path of the pcap file to read packets from */ + const char *file_name; + /** The number of bytes to be read from each packet in the + * pcap file. If this value is 0, the whole packet is read; + * if it is bigger than packet size, the generated packets + * will contain the whole packet */ + uint32_t n_bytes_per_pkt; }; /** source port operations */ extern struct rte_port_in_ops rte_port_source_ops; -/** sink port parameters: NONE */ +/** sink port parameters */ +struct rte_port_sink_params { + /** The full path of the pcap file to write the packets to */ + const char *file_name; + /** The maximum number of packets write to the pcap file. + * If this value is 0, the "infinite" write will be carried + * out. + */ + uint32_t max_n_pkts; +}; /** sink port operations */ extern struct rte_port_out_ops rte_port_sink_ops;