Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
pcapng.h
Go to the documentation of this file.
1
8
9#ifndef __W_PCAPNG_H__
10#define __W_PCAPNG_H__
11
12#include <stdint.h>
13
14#include "wtap.h"
15#include "ws_symbol_export.h"
16
17#define PCAPNG_MAGIC 0x1A2B3C4D
18#define PCAPNG_SWAPPED_MAGIC 0x4D3C2B1A
19
20#define PCAPNG_MAJOR_VERSION 1
21#define PCAPNG_MINOR_VERSION 0
22
26typedef struct pcapng_block_header_s {
27 uint32_t block_type;
29 /* x bytes of block body follow. */
30 /* uint32_t block_total_length repeated at the end of every block for reverse traversal. */
32
37 /* Preceded by pcapng_block_header_t */
38 uint32_t magic;
39 uint16_t version_major;
40 uint16_t version_minor;
41 uint64_t section_length;
42 /* ... Options ... */
44
49 uint16_t linktype;
50 uint16_t reserved;
51 uint32_t snaplen;
52 /* ... Options ... */
54
64
69 uint32_t secrets_type;
70 uint32_t secrets_len;
71 /* x bytes of Secrets Data follow. */
72 /* ... Options ... */
74
79 uint16_t type;
80 uint16_t value_length;
81};
82
91wtap_open_return_val pcapng_open(wtap *wth, int *err, char **err_info);
92
93#endif
struct pcapng_section_header_block_s pcapng_section_header_block_t
Section Header Block (SHB) body encoding in a pcapng file, marking the start of a capture section.
struct pcapng_interface_description_block_s pcapng_interface_description_block_t
Interface Description Block (IDB) body encoding in a pcapng file, describing a capture interface.
wtap_open_return_val pcapng_open(wtap *wth, int *err, char **err_info)
Opens a pcapng file.
Definition pcapng.c:3544
struct pcapng_interface_statistics_block_s pcapng_interface_statistics_block_t
Interface Statistics Block (ISB) body encoding in a pcapng file, reporting per-interface capture stat...
struct pcapng_decryption_secrets_block_s pcapng_decryption_secrets_block_t
Decryption Secrets Block (DSB) body encoding in a pcapng file, embedding key material for decrypting ...
struct pcapng_block_header_s pcapng_block_header_t
Common block header shared by every block type in a pcapng capture file.
Common block header shared by every block type in a pcapng capture file.
Definition pcapng.h:26
uint32_t block_type
Definition pcapng.h:27
uint32_t block_total_length
Definition pcapng.h:28
Decryption Secrets Block (DSB) body encoding in a pcapng file, embedding key material for decrypting ...
Definition pcapng.h:68
uint32_t secrets_type
Definition pcapng.h:69
uint32_t secrets_len
Definition pcapng.h:70
Interface Description Block (IDB) body encoding in a pcapng file, describing a capture interface.
Definition pcapng.h:48
uint16_t reserved
Definition pcapng.h:50
uint16_t linktype
Definition pcapng.h:49
uint32_t snaplen
Definition pcapng.h:51
Interface Statistics Block (ISB) body encoding in a pcapng file, reporting per-interface capture stat...
Definition pcapng.h:58
uint32_t timestamp_high
Definition pcapng.h:60
uint32_t timestamp_low
Definition pcapng.h:61
uint32_t interface_id
Definition pcapng.h:59
Option header used to encode a single TLV option appended to a pcapng block.
Definition pcapng.h:78
uint16_t value_length
Definition pcapng.h:80
uint16_t type
Definition pcapng.h:79
Section Header Block (SHB) body encoding in a pcapng file, marking the start of a capture section.
Definition pcapng.h:36
uint16_t version_major
Definition pcapng.h:39
uint32_t magic
Definition pcapng.h:38
uint16_t version_minor
Definition pcapng.h:40
uint64_t section_length
Definition pcapng.h:41
Definition wtap_module.h:58
wtap_open_return_val
For registering file types that we can open.
Definition wtap.h:1851