DPDK
24.11.4
Toggle main menu visibility
Loading...
Searching...
No Matches
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
18
19
#ifndef _RTE_PCAPNG_H_
20
#define _RTE_PCAPNG_H_
21
22
#include <stdint.h>
23
#include <sys/types.h>
24
25
#include <
rte_mempool.h
>
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
31
/* Opaque handle used for functions in this library. */
32
typedef
struct
rte_pcapng rte_pcapng_t;
33
53
rte_pcapng_t *
54
rte_pcapng_fdopen
(
int
fd,
55
const
char
*osname,
const
char
*hardware,
56
const
char
*appname,
const
char
*comment);
57
64
void
65
rte_pcapng_close
(rte_pcapng_t *self);
66
86
int
87
rte_pcapng_add_interface
(rte_pcapng_t *self, uint16_t port,
88
const
char
*ifname,
const
char
*ifdescr,
89
const
char
*filter);
90
95
enum
rte_pcapng_direction
{
96
RTE_PCAPNG_DIRECTION_UNKNOWN = 0,
97
RTE_PCAPNG_DIRECTION_IN = 1,
98
RTE_PCAPNG_DIRECTION_OUT = 2,
99
};
100
126
struct
rte_mbuf
*
127
rte_pcapng_copy
(uint16_t port_id, uint32_t queue,
128
const
struct
rte_mbuf
*m,
struct
rte_mempool
*mp,
129
uint32_t length,
130
enum
rte_pcapng_direction
direction,
const
char
*comment);
131
132
142
uint32_t
143
rte_pcapng_mbuf_size
(uint32_t length);
144
166
ssize_t
167
rte_pcapng_write_packets
(rte_pcapng_t *self,
168
struct
rte_mbuf
*pkts[], uint16_t nb_pkts);
169
190
ssize_t
191
rte_pcapng_write_stats
(rte_pcapng_t *self, uint16_t
port
,
192
uint64_t ifrecv, uint64_t ifdrop,
193
const
char
*comment);
194
195
#ifdef __cplusplus
196
}
197
#endif
198
199
#endif
/* _RTE_PCAPNG_H_ */
rte_mempool.h
rte_pcapng_direction
rte_pcapng_direction
Definition
rte_pcapng.h:95
rte_pcapng_fdopen
rte_pcapng_t * rte_pcapng_fdopen(int fd, const char *osname, const char *hardware, const char *appname, const char *comment)
rte_pcapng_add_interface
int rte_pcapng_add_interface(rte_pcapng_t *self, uint16_t port, const char *ifname, const char *ifdescr, const char *filter)
rte_pcapng_copy
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, enum rte_pcapng_direction direction, const char *comment)
rte_pcapng_close
void rte_pcapng_close(rte_pcapng_t *self)
rte_pcapng_write_packets
ssize_t rte_pcapng_write_packets(rte_pcapng_t *self, struct rte_mbuf *pkts[], uint16_t nb_pkts)
rte_pcapng_write_stats
ssize_t rte_pcapng_write_stats(rte_pcapng_t *self, uint16_t port, uint64_t ifrecv, uint64_t ifdrop, const char *comment)
rte_pcapng_mbuf_size
uint32_t rte_pcapng_mbuf_size(uint32_t length)
rte_mbuf
Definition
rte_mbuf_core.h:467
rte_mbuf::port
uint16_t port
Definition
rte_mbuf_core.h:514
rte_mempool
Definition
rte_mempool.h:230
lib
pcapng
rte_pcapng.h
Generated by
1.17.0