NDN-DPDK
High-Speed Named Data Networking Forwarder
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
format.h
Go to the documentation of this file.
1 #ifndef NDNDPDK_PDUMP_FORMAT_H
2 #define NDNDPDK_PDUMP_FORMAT_H
3 
6 #include "../core/common.h"
7 #include "enum.h"
8 #include <pcap/pcap.h>
9 #include <pcap/sll.h>
10 
16 enum {
17  SLLIncoming = RTE_BE16(LINUX_SLL_HOST),
18  SLLOutgoing = RTE_BE16(LINUX_SLL_OUTGOING),
19 };
20 
22 typedef struct 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 
31 typedef struct 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 
42 typedef struct PcapngTrailer {
43  rte_le32_t totalLength;
45 
47 typedef struct PcapngEPBSLL {
49  struct sll_header sll;
51 static_assert(sizeof(PcapngEPBSLL) == sizeof(PcapngEPB) + SLL_HDR_LEN, "");
52 
53 #endif // NDNDPDK_PDUMP_FORMAT_H
struct vlanhdr __rte_packed
struct PcapngEPBSLL PcapngEPBSLL
PCAPNG enhanced packet block header and tcpdump DLT_LINUX_SLL header.
struct PcapngIDB PcapngIDB
PCAPNG interface description block header.
@ SLLOutgoing
Definition: format.h:18
@ SLLIncoming
Definition: format.h:17
struct PcapngEPB PcapngEPB
PCAPNG enhanced packet block header.
struct PcapngTrailer PcapngTrailer
PCAPNG block trailer.
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