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 <[email protected]>
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 dis_num;
66 uint32_t pkt_len;
67 uint32_t cap_len;
68 uint32_t cum_bytes;
69 int64_t file_off;
70 /* These two are pointers, meaning 64-bit on LP64 (64-bit UN*X) and
71 LLP64 (64-bit Windows) platforms. Put them here, one after the
72 other, so they don't require padding between them. */
73 GSList *pfd;
74 GHashTable *dependent_frames;
77 /* Keep the bitfields below to 24 bits, so this plus the previous field
78 are 32 bits. (XXX - The previous field could be a bitfield too.) */
79 unsigned int passed_dfilter : 1;
80 unsigned int dependent_of_displayed : 1;
81 /* Do NOT use packet_char_enc enum here: MSVC compiler does not handle an enum in a bit field properly */
82 unsigned int encoding : 1;
83 unsigned int visited : 1;
84 unsigned int marked : 1;
85 unsigned int ref_time : 1;
86 unsigned int ignored : 1;
87 unsigned int has_ts : 1;
88 unsigned int has_modified_block : 1;
89 unsigned int need_colorize : 1;
90 unsigned int tsprec : 4;
93 uint32_t frame_ref_num;
94 uint32_t prev_dis_num;
95} frame_data;
96DIAG_ON_PEDANTIC
97
99WS_DLL_PUBLIC int frame_data_compare(const struct epan_session *epan, const frame_data *fdata1, const frame_data *fdata2, int field);
100
101WS_DLL_PUBLIC void frame_data_reset(frame_data *fdata);
102
103WS_DLL_PUBLIC void frame_data_destroy(frame_data *fdata);
104
105WS_DLL_PUBLIC void frame_data_init(frame_data *fdata, uint32_t num,
106 const wtap_rec *rec, int64_t offset,
107 uint32_t cum_bytes);
108
109extern void frame_delta_abs_time(const struct epan_session *epan, const frame_data *fdata,
110 uint32_t prev_num, nstime_t *delta);
114WS_DLL_PUBLIC void frame_data_set_before_dissect(frame_data *fdata,
115 nstime_t *elapsed_time,
116 const frame_data **frame_ref,
117 const frame_data *prev_dis);
118
119WS_DLL_PUBLIC void frame_data_set_after_dissect(frame_data *fdata,
120 uint32_t *cum_bytes);
121
124#ifdef __cplusplus
125}
126#endif /* __cplusplus */
127
128#endif /* __FRAME_DATA__ */
129
130/*
131 * Editor modelines - https://www.wireshark.org/tools/modelines.html
132 *
133 * Local variables:
134 * c-basic-offset: 2
135 * tab-width: 8
136 * indent-tabs-mode: nil
137 * End:
138 *
139 * vi: set shiftwidth=2 tabstop=8 expandtab:
140 * :indentSize=2:tabSize=8:noTabs=true:
141 */
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:245
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:74
unsigned int passed_dfilter
Definition frame_data.h:79
uint32_t pkt_len
Definition frame_data.h:66
uint32_t prev_dis_num
Definition frame_data.h:94
nstime_t shift_offset
Definition frame_data.h:92
unsigned int need_colorize
Definition frame_data.h:89
uint32_t dis_num
Definition frame_data.h:65
GSList * pfd
Definition frame_data.h:73
const struct _color_filter * color_filter
Definition frame_data.h:75
unsigned int dependent_of_displayed
Definition frame_data.h:80
unsigned int marked
Definition frame_data.h:84
uint8_t tcp_snd_manual_analysis
Definition frame_data.h:76
int64_t file_off
Definition frame_data.h:69
uint32_t num
Definition frame_data.h:64
unsigned int visited
Definition frame_data.h:83
uint32_t frame_ref_num
Definition frame_data.h:93
uint32_t cap_len
Definition frame_data.h:67
unsigned int has_ts
Definition frame_data.h:87
unsigned int tsprec
Definition frame_data.h:90
unsigned int ignored
Definition frame_data.h:86
unsigned int encoding
Definition frame_data.h:82
uint32_t cum_bytes
Definition frame_data.h:68
unsigned int ref_time
Definition frame_data.h:85
nstime_t abs_ts
Definition frame_data.h:91
Definition packet_info.h:43
Definition epan.c:467
Definition nstime.h:26
Definition wtap.h:1432