NDN-DPDK
High-Speed Named Data Networking Forwarder
Loading...
Searching...
No Matches
format.h
Go to the documentation of this file.
1#ifndef NDNDPDK_PDUMP_FORMAT_H
2#define NDNDPDK_PDUMP_FORMAT_H
3
5
6#include "../core/common.h"
7#include "enum.h"
8#include <pcap/pcap.h>
9#include <pcap/sll.h>
10
16enum {
17 SLLIncoming = RTE_BE16(LINUX_SLL_HOST),
18 SLLOutgoing = RTE_BE16(LINUX_SLL_OUTGOING),
19};
20
22typedef struct __rte_packed_begin PcapngIDB {
23 rte_le32_t blockType;
24 rte_le32_t totalLength;
25 rte_le16_t linkType;
26 rte_le16_t reserved;
27 rte_le32_t snaplen;
29
31typedef struct __rte_packed_begin PcapngEPB {
32 rte_le32_t blockType;
33 rte_le32_t totalLength;
34 rte_le32_t intf;
35 rte_le32_t timeHi;
36 rte_le32_t timeLo;
37 rte_le32_t capLen;
38 rte_le32_t origLen;
40
42typedef struct __rte_packed_begin PcapngTrailer {
43 rte_le32_t totalLength;
45
47typedef struct __rte_packed_begin PcapngEPBSLL {
49 struct sll_header sll;
51static_assert(sizeof(PcapngEPBSLL) == sizeof(PcapngEPB) + SLL_HDR_LEN, "");
52
53#endif // NDNDPDK_PDUMP_FORMAT_H
struct __rte_packed_begin vlanhdr __rte_packed_end
@ SLLOutgoing
Definition format.h:18
@ SLLIncoming
Definition format.h:17
PCAPNG enhanced packet block header and tcpdump DLT_LINUX_SLL header.
Definition format.h:47
PcapngEPB epb
Definition format.h:48
struct sll_header sll
Definition format.h:49
PCAPNG enhanced packet block header.
Definition format.h:31
rte_le32_t intf
Definition format.h:34
rte_le32_t timeHi
Definition format.h:35
rte_le32_t totalLength
Definition format.h:33
rte_le32_t origLen
Definition format.h:38
rte_le32_t timeLo
Definition format.h:36
rte_le32_t capLen
Definition format.h:37
rte_le32_t blockType
Definition format.h:32
PCAPNG interface description block header.
Definition format.h:22
rte_le32_t snaplen
Definition format.h:27
rte_le32_t blockType
Definition format.h:23
rte_le16_t reserved
Definition format.h:26
rte_le32_t totalLength
Definition format.h:24
rte_le16_t linkType
Definition format.h:25
PCAPNG block trailer.
Definition format.h:42
rte_le32_t totalLength
Definition format.h:43