Wireshark
4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
wiretap
pcapng.h
Go to the documentation of this file.
1
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
23
/* pcapng: common block header file encoding for every block type */
24
typedef
struct
pcapng_block_header_s
{
25
uint32_t block_type;
26
uint32_t block_total_length;
27
/* x bytes block_body */
28
/* uint32_t block_total_length */
29
}
pcapng_block_header_t
;
30
31
/* pcapng: section header block file encoding */
32
typedef
struct
pcapng_section_header_block_s
{
33
/* pcapng_block_header_t */
34
uint32_t magic;
35
uint16_t version_major;
36
uint16_t version_minor;
37
uint64_t section_length;
/* might be -1 for unknown */
38
/* ... Options ... */
39
}
pcapng_section_header_block_t
;
40
41
/* pcapng: interface description block file encoding */
42
typedef
struct
pcapng_interface_description_block_s
{
43
uint16_t linktype;
44
uint16_t reserved;
45
uint32_t snaplen;
46
/* ... Options ... */
47
}
pcapng_interface_description_block_t
;
48
49
/* pcapng: interface statistics block file encoding */
50
typedef
struct
pcapng_interface_statistics_block_s
{
51
uint32_t interface_id;
52
uint32_t timestamp_high;
53
uint32_t timestamp_low;
54
/* ... Options ... */
55
}
pcapng_interface_statistics_block_t
;
56
57
/* pcapng: Decryption Secrets Block file encoding */
58
typedef
struct
pcapng_decryption_secrets_block_s
{
59
uint32_t secrets_type;
/* Secrets Type, see secrets-types.h */
60
uint32_t secrets_len;
/* Size of variable-length secrets data. */
61
/* x bytes Secrets Data. */
62
/* ... Options ... */
63
}
pcapng_decryption_secrets_block_t
;
64
65
struct
pcapng_option_header
{
66
uint16_t type;
67
uint16_t value_length;
68
};
69
70
wtap_open_return_val pcapng_open(
wtap
*wth,
int
*err,
char
**err_info);
71
72
#endif
pcapng_block_header_s
Definition
pcapng.h:24
pcapng_decryption_secrets_block_s
Definition
pcapng.h:58
pcapng_interface_description_block_s
Definition
pcapng.h:42
pcapng_interface_statistics_block_s
Definition
pcapng.h:50
pcapng_option_header
Definition
pcapng.h:65
pcapng_section_header_block_s
Definition
pcapng.h:32
wtap
Definition
wtap-int.h:37
wtap.h
Generated by
1.9.8