Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
frame_data.h
Go to the documentation of this file.
1/* frame_data.h
2 * Definitions for frame_data structures and routines
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11#ifndef __FRAME_DATA_H__
12#define __FRAME_DATA_H__
13
14#include <ws_diag_control.h>
15#include <ws_symbol_export.h>
16#include <wsutil/nstime.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif /* __cplusplus */
21
22typedef struct wtap_rec wtap_rec;
23struct _packet_info;
24struct epan_session;
25
26#define PINFO_FD_VISITED(pinfo) ((pinfo)->fd->visited)
27
41/* Types of character encodings */
42typedef enum {
43 PACKET_CHAR_ENC_CHAR_ASCII = 0, /* ASCII */
44 PACKET_CHAR_ENC_CHAR_EBCDIC = 1 /* EBCDIC */
46
61struct _color_filter; /* Forward */
62DIAG_OFF_PEDANTIC
63typedef struct _frame_data {
64 uint32_t num;
65 uint32_t pkt_len;
66 uint32_t cap_len;
67 uint32_t cum_bytes;
68 int64_t file_off;
69 /* These two are pointers, meaning 64-bit on LP64 (64-bit UN*X) and
70 LLP64 (64-bit Windows) platforms. Put them here, one after the
71 other, so they don't require padding between them. */
72 GSList *pfd;
73 GHashTable *dependent_frames;
76 /* Keep the bitfields below to 24 bits, so this plus the previous field
77 are 32 bits. (XXX - The previous field could be a bitfield too.) */
78 unsigned int passed_dfilter : 1;
79 unsigned int dependent_of_displayed : 1;
80 /* Do NOT use packet_char_enc enum here: MSVC compiler does not handle an enum in a bit field properly */
81 unsigned int encoding : 1;
82 unsigned int visited : 1;
83 unsigned int marked : 1;
84 unsigned int ref_time : 1;
85 unsigned int ignored : 1;
86 unsigned int has_ts : 1;
87 unsigned int has_modified_block : 1;
88 unsigned int need_colorize : 1;
89 unsigned int tsprec : 4;
92 uint32_t frame_ref_num;
93 uint32_t prev_dis_num;
94} frame_data;
95DIAG_ON_PEDANTIC
96
98WS_DLL_PUBLIC int frame_data_compare(const struct epan_session *epan, const frame_data *fdata1, const frame_data *fdata2, int field);
99
100WS_DLL_PUBLIC void frame_data_reset(frame_data *fdata);
101
102WS_DLL_PUBLIC void frame_data_destroy(frame_data *fdata);
103
104WS_DLL_PUBLIC void frame_data_init(frame_data *fdata, uint32_t num,
105 const wtap_rec *rec, int64_t offset,
106 uint32_t cum_bytes);
107
108extern void frame_delta_abs_time(const struct epan_session *epan, const frame_data *fdata,
109 uint32_t prev_num, nstime_t *delta);
113WS_DLL_PUBLIC void frame_data_set_before_dissect(frame_data *fdata,
114 nstime_t *elapsed_time,
115 const frame_data **frame_ref,
116 const frame_data *prev_dis);
117
118WS_DLL_PUBLIC void frame_data_set_after_dissect(frame_data *fdata,
119 uint32_t *cum_bytes);
120
123#ifdef __cplusplus
124}
125#endif /* __cplusplus */
126
127#endif /* __FRAME_DATA__ */
128
129/*
130 * Editor modelines - https://www.wireshark.org/tools/modelines.html
131 *
132 * Local variables:
133 * c-basic-offset: 2
134 * tab-width: 8
135 * indent-tabs-mode: nil
136 * End:
137 *
138 * vi: set shiftwidth=2 tabstop=8 expandtab:
139 * :indentSize=2:tabSize=8:noTabs=true:
140 */
packet_char_enc
Definition frame_data.h:42
WS_DLL_PUBLIC void frame_data_set_before_dissect(frame_data *fdata, nstime_t *elapsed_time, const frame_data **frame_ref, const frame_data *prev_dis)
Definition frame_data.c:241
DIAG_ON_PEDANTIC WS_DLL_PUBLIC int frame_data_compare(const struct epan_session *epan, const frame_data *fdata1, const frame_data *fdata2, int field)
Definition frame_data.c:96
Definition color_filters.h:33
Definition frame_data.h:63
GHashTable * dependent_frames
Definition frame_data.h:73
unsigned int passed_dfilter
Definition frame_data.h:78
uint32_t pkt_len
Definition frame_data.h:65
uint32_t prev_dis_num
Definition frame_data.h:93
nstime_t shift_offset
Definition frame_data.h:91
unsigned int need_colorize
Definition frame_data.h:88
GSList * pfd
Definition frame_data.h:72
const struct _color_filter * color_filter
Definition frame_data.h:74
unsigned int dependent_of_displayed
Definition frame_data.h:79
unsigned int marked
Definition frame_data.h:83
uint8_t tcp_snd_manual_analysis
Definition frame_data.h:75
int64_t file_off
Definition frame_data.h:68
uint32_t num
Definition frame_data.h:64
unsigned int visited
Definition frame_data.h:82
uint32_t frame_ref_num
Definition frame_data.h:92
uint32_t cap_len
Definition frame_data.h:66
unsigned int has_ts
Definition frame_data.h:86
unsigned int tsprec
Definition frame_data.h:89
unsigned int ignored
Definition frame_data.h:85
unsigned int encoding
Definition frame_data.h:81
uint32_t cum_bytes
Definition frame_data.h:67
unsigned int ref_time
Definition frame_data.h:84
nstime_t abs_ts
Definition frame_data.h:90
Definition packet_info.h:43
Definition epan.c:467
Definition nstime.h:26
Definition wtap.h:1432