Wireshark 4.7.2
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Frame Data

Classes

struct  _frame_data
 Frame data structure. More...

Typedefs

typedef DIAG_OFF_PEDANTIC struct _frame_data frame_data
 Frame data structure.

Enumerations

enum  packet_char_enc { PACKET_CHAR_ENC_CHAR_ASCII = 0 , PACKET_CHAR_ENC_CHAR_EBCDIC = 1 }
 Types of character encodings. More...

Functions

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)
 Compare two frame_data structs by a given field.
WS_DLL_PUBLIC void frame_data_reset (frame_data *fdata)
 Reset a frame_data struct to its initial state without freeing it.
WS_DLL_PUBLIC void frame_data_destroy (frame_data *fdata)
 Free all resources owned by a frame_data struct.
WS_DLL_PUBLIC void frame_data_aggregation_free (frame_data *fdata)
 Free the aggregation data associated with a frame_data struct.
WS_DLL_PUBLIC void frame_data_init (frame_data *fdata, uint32_t num, const wtap_rec *rec, int64_t offset, uint32_t cum_bytes)
 Initialize a frame_data struct for a newly read frame.
bool frame_rel_first_frame_time (const struct epan_session *epan, const frame_data *fdata, nstime_t *delta)
 Compute the time delta from the first frame to this frame.
bool frame_rel_time (const struct epan_session *epan, const frame_data *fdata, nstime_t *delta)
 Compute the time delta from the capture start to this frame.
bool frame_rel_start_time (const struct epan_session *epan, const frame_data *fdata, nstime_t *delta)
 Compute the time delta from the first displayed frame to this frame.
bool frame_delta_time_prev_captured (const struct epan_session *epan, const frame_data *fdata, nstime_t *delta)
 Compute the time delta from the previous captured frame to this frame.
bool frame_delta_time_prev_displayed (const struct epan_session *epan, const frame_data *fdata, nstime_t *delta)
 Compute the time delta from the previous displayed frame to this frame.
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)
 Set frame_data fields before dissection.
WS_DLL_PUBLIC void frame_data_set_after_dissect (frame_data *fdata, uint32_t *cum_bytes)
 Set frame_data fields after dissection.

Detailed Description

Enumeration Type Documentation

◆ packet_char_enc

Types of character encodings.

Todo
XXX - some of this stuff is used only while a packet is being dissected; should we keep that stuff in the "packet_info" structure, instead, to save memory?
Enumerator
PACKET_CHAR_ENC_CHAR_ASCII 

ASCII

PACKET_CHAR_ENC_CHAR_EBCDIC 

EBCDIC

Function Documentation

◆ frame_data_aggregation_free()

WS_DLL_PUBLIC void frame_data_aggregation_free ( frame_data * fdata)

Free the aggregation data associated with a frame_data struct.

Parameters
fdataThe frame_data whose aggregation data to free.

◆ frame_data_compare()

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 )

Compare two frame_data structs by a given field.

Parameters
epanThe epan session context.
fdata1The first frame_data to compare.
fdata2The second frame_data to compare.
fieldThe field ID to compare on.
Returns
Negative if fdata1 < fdata2, 0 if equal, positive if fdata1 > fdata2.

◆ frame_data_destroy()

WS_DLL_PUBLIC void frame_data_destroy ( frame_data * fdata)

Free all resources owned by a frame_data struct.

Parameters
fdataThe frame_data to destroy.

◆ frame_data_init()

WS_DLL_PUBLIC void frame_data_init ( frame_data * fdata,
uint32_t num,
const wtap_rec * rec,
int64_t offset,
uint32_t cum_bytes )

Initialize a frame_data struct for a newly read frame.

Parameters
fdataThe frame_data to initialize.
numThe frame number.
recThe wtap record for this frame.
offsetThe file offset of this frame.
cum_bytesThe cumulative byte count before this frame.

◆ frame_data_reset()

WS_DLL_PUBLIC void frame_data_reset ( frame_data * fdata)

Reset a frame_data struct to its initial state without freeing it.

Parameters
fdataThe frame_data to reset.

◆ frame_data_set_after_dissect()

WS_DLL_PUBLIC void frame_data_set_after_dissect ( frame_data * fdata,
uint32_t * cum_bytes )

Set frame_data fields after dissection.

Parameters
fdataThe frame_data to update.
cum_bytesThe running cumulative byte count; updated to include this frame.

◆ frame_data_set_before_dissect()

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 )

Set frame_data fields before dissection.

Parameters
fdataThe frame_data to update.
elapsed_timeThe elapsed capture time; updated with this frame's timestamp.
frame_refPointer to the reference frame pointer; updated if this frame becomes the new reference.
prev_disThe most recently displayed frame, or NULL if none.

◆ frame_delta_time_prev_captured()

bool frame_delta_time_prev_captured ( const struct epan_session * epan,
const frame_data * fdata,
nstime_t * delta )
extern

Compute the time delta from the previous captured frame to this frame.

Parameters
epanThe epan session context.
fdataThe frame_data for the current frame.
deltaOutput pointer for the computed time delta.
Returns
true if the delta was computed successfully, false otherwise.

◆ frame_delta_time_prev_displayed()

bool frame_delta_time_prev_displayed ( const struct epan_session * epan,
const frame_data * fdata,
nstime_t * delta )
extern

Compute the time delta from the previous displayed frame to this frame.

Parameters
epanThe epan session context.
fdataThe frame_data for the current frame.
deltaOutput pointer for the computed time delta.
Returns
true if the delta was computed successfully, false otherwise.

◆ frame_rel_first_frame_time()

bool frame_rel_first_frame_time ( const struct epan_session * epan,
const frame_data * fdata,
nstime_t * delta )
extern

Compute the time delta from the first frame to this frame.

Parameters
epanThe epan session context.
fdataThe frame_data for the current frame.
deltaOutput pointer for the computed time delta.
Returns
true if the delta was computed successfully, false otherwise.

◆ frame_rel_start_time()

bool frame_rel_start_time ( const struct epan_session * epan,
const frame_data * fdata,
nstime_t * delta )
extern

Compute the time delta from the first displayed frame to this frame.

Parameters
epanThe epan session context.
fdataThe frame_data for the current frame.
deltaOutput pointer for the computed time delta.
Returns
true if the delta was computed successfully, false otherwise.

◆ frame_rel_time()

bool frame_rel_time ( const struct epan_session * epan,
const frame_data * fdata,
nstime_t * delta )
extern

Compute the time delta from the capture start to this frame.

Parameters
epanThe epan session context.
fdataThe frame_data for the current frame.
deltaOutput pointer for the computed time delta.
Returns
true if the delta was computed successfully, false otherwise.