DPDK 21.11.9
rte_pcapng.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2019 Microsoft Corporation
3 */
4
23#ifndef _RTE_PCAPNG_H_
24#define _RTE_PCAPNG_H_
25
26#include <stdint.h>
27#include <sys/types.h>
28#include <rte_compat.h>
29#include <rte_common.h>
30#include <rte_mempool.h>
31#include <rte_ring.h>
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37/* Opaque handle used for functions in this library. */
38typedef struct rte_pcapng rte_pcapng_t;
39
59__rte_experimental
60rte_pcapng_t *
62 const char *osname, const char *hardware,
63 const char *appname, const char *comment);
64
71__rte_experimental
72void
73rte_pcapng_close(rte_pcapng_t *self);
74
80 RTE_PCAPNG_DIRECTION_UNKNOWN = 0,
81 RTE_PCAPNG_DIRECTION_IN = 1,
82 RTE_PCAPNG_DIRECTION_OUT = 2,
83};
84
111__rte_experimental
112struct rte_mbuf *
113rte_pcapng_copy(uint16_t port_id, uint32_t queue,
114 const struct rte_mbuf *m, struct rte_mempool *mp,
115 uint32_t length, uint64_t timestamp,
116 enum rte_pcapng_direction direction);
117
118
128__rte_experimental
129uint32_t
130rte_pcapng_mbuf_size(uint32_t length);
131
153__rte_experimental
154ssize_t
155rte_pcapng_write_packets(rte_pcapng_t *self,
156 struct rte_mbuf *pkts[], uint16_t nb_pkts);
157
184__rte_experimental
185ssize_t
186rte_pcapng_write_stats(rte_pcapng_t *self, uint16_t port,
187 const char *comment,
188 uint64_t start_time, uint64_t end_time,
189 uint64_t ifrecv, uint64_t ifdrop);
190
191#ifdef __cplusplus
192}
193#endif
194
195#endif /* _RTE_PCAPNG_H_ */
__rte_experimental rte_pcapng_t * rte_pcapng_fdopen(int fd, const char *osname, const char *hardware, const char *appname, const char *comment)
rte_pcapng_direction
Definition: rte_pcapng.h:79
__rte_experimental ssize_t rte_pcapng_write_packets(rte_pcapng_t *self, struct rte_mbuf *pkts[], uint16_t nb_pkts)
__rte_experimental ssize_t rte_pcapng_write_stats(rte_pcapng_t *self, uint16_t port, const char *comment, uint64_t start_time, uint64_t end_time, uint64_t ifrecv, uint64_t ifdrop)
__rte_experimental struct rte_mbuf * rte_pcapng_copy(uint16_t port_id, uint32_t queue, const struct rte_mbuf *m, struct rte_mempool *mp, uint32_t length, uint64_t timestamp, enum rte_pcapng_direction direction)
__rte_experimental uint32_t rte_pcapng_mbuf_size(uint32_t length)
__rte_experimental void rte_pcapng_close(rte_pcapng_t *self)
uint16_t port