summaryrefslogtreecommitdiffstats
path: root/tests/pcap-hdr.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:02:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:02:34 +0000
commitfadeddfbb2aa38a980dd959b5ec1ffba7afd43cb (patch)
treea7bde6111c84ea64619656a38fba50909fa0bf60 /tests/pcap-hdr.h
parentInitial commit. (diff)
downloadlldpd-upstream.tar.xz
lldpd-upstream.zip
Adding upstream version 1.0.18.upstream/1.0.18upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/pcap-hdr.h')
-rw-r--r--tests/pcap-hdr.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/pcap-hdr.h b/tests/pcap-hdr.h
new file mode 100644
index 0000000..a08905b
--- /dev/null
+++ b/tests/pcap-hdr.h
@@ -0,0 +1,25 @@
+#ifndef _PCAP_HDR_H
+#define _PCAP_HDR_H
+
+#include <stdint.h>
+
+/* See:
+ * http://wiki.wireshark.org/Development/LibpcapFileFormat
+ */
+struct pcap_hdr {
+ uint32_t magic_number; /* magic number */
+ uint16_t version_major; /* major version number */
+ uint16_t version_minor; /* minor version number */
+ uint32_t thiszone; /* GMT to local correction */
+ uint32_t sigfigs; /* accuracy of timestamps */
+ uint32_t snaplen; /* max length of captured packets, in octets */
+ uint32_t network; /* data link type */
+};
+struct pcaprec_hdr {
+ uint32_t ts_sec; /* timestamp seconds */
+ uint32_t ts_usec; /* timestamp microseconds */
+ uint32_t incl_len; /* number of octets of packet saved in file */
+ uint32_t orig_len; /* actual length of packet */
+};
+
+#endif