Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
PacketListRecord Class Reference

Represents a single record within the packet list. More...

#include <packet_list_record.h>

Public Member Functions

 PacketListRecord (frame_data *frameData)
 Constructs a PacketListRecord.
 
virtual ~PacketListRecord ()
 Destroys the PacketListRecord.
 
void ensureColorized (capture_file *cap_file)
 Ensure that the record is colorized.
 
const QString columnString (capture_file *cap_file, int column, bool colorized=false)
 Return the string value for a column. Data is cached if possible.
 
frame_dataframeData () const
 Gets the underlying frame data.
 
bool colorized ()
 Checks if the record is currently colorized up to date.
 
unsigned int conversation ()
 Retrieves the conversation index.
 
const GSList * matchingColorFilters () const
 Get list of all matching color filters.
 
bool hasMultipleColors () const
 Check if packet has multiple color matches.
 
int colorFilterCount () const
 Get count of matching color filters.
 
int columnTextSize (const char *str)
 Calculates the size of the column text.
 
void invalidateColorized ()
 Invalidates the current colorized state, forcing a re-evaluation.
 
void invalidateRecord ()
 Removes this specific record from the column text cache.
 
int lineCount ()
 Gets the number of lines this record spans.
 
int lineCountChanged ()
 Gets whether the line count has changed.
 
void setRow (int row)
 Sets the logical row index for this record.
 
int row () const
 Gets the logical row index of this record.
 
uint32_t expertSeverity () const
 Gets the highest expert information severity found in the packet.
 

Static Public Member Functions

static int textColumn (int column)
 packet_list->col_to_text in gtk/packet_list_store.c
 
static void invalidateAllRecords ()
 Clears the column text cache for all records.
 
static void setMaxCache (int cost)
 Sets the maximum capacity of the column text cache.
 
static void resetColumns (column_info *cinfo)
 Resets the columns configuration.
 
static void resetColorization ()
 Increments the global color version to reset colorization for all.
 
static void setDissectionPaused (bool paused)
 Sets whether packet dissection is currently paused.
 

Detailed Description

Represents a single record within the packet list.

Constructor & Destructor Documentation

◆ PacketListRecord()

PacketListRecord::PacketListRecord ( frame_data frameData)

Constructs a PacketListRecord.

Parameters
frameDataPointer to the frame data for this record.

Member Function Documentation

◆ colorFilterCount()

int PacketListRecord::colorFilterCount ( ) const
inline

Get count of matching color filters.

Returns
The number of matched color filters.

◆ colorized()

bool PacketListRecord::colorized ( )
inline

Checks if the record is currently colorized up to date.

Returns
True if properly colorized, false otherwise.

◆ columnString()

const QString PacketListRecord::columnString ( capture_file cap_file,
int  column,
bool  colorized = false 
)

Return the string value for a column. Data is cached if possible.

Parameters
cap_fileThe capture file containing the packet.
columnThe column index.
colorizedWhether to fetch the colorized string.
Returns
The string value for the specified column.

◆ columnTextSize()

int PacketListRecord::columnTextSize ( const char *  str)

Calculates the size of the column text.

Parameters
strThe string to measure.
Returns
The text size in appropriate units.

◆ conversation()

unsigned int PacketListRecord::conversation ( )
inline

Retrieves the conversation index.

Returns
The conversation index.

◆ ensureColorized()

void PacketListRecord::ensureColorized ( capture_file cap_file)

Ensure that the record is colorized.

Parameters
cap_fileThe capture file containing the packet.

◆ expertSeverity()

uint32_t PacketListRecord::expertSeverity ( ) const
inline

Gets the highest expert information severity found in the packet.

Returns
The expert severity level.

◆ frameData()

frame_data * PacketListRecord::frameData ( ) const
inline

Gets the underlying frame data.

Returns
Pointer to the frame data.

◆ hasMultipleColors()

bool PacketListRecord::hasMultipleColors ( ) const
inline

Check if packet has multiple color matches.

Returns
True if there are multiple matches, false otherwise.

◆ lineCount()

int PacketListRecord::lineCount ( )
inline

Gets the number of lines this record spans.

Returns
The line count.

◆ lineCountChanged()

int PacketListRecord::lineCountChanged ( )
inline

Gets whether the line count has changed.

Returns
Non-zero if changed, zero otherwise.

◆ matchingColorFilters()

const GSList * PacketListRecord::matchingColorFilters ( ) const
inline

Get list of all matching color filters.

Returns
Pointer to the GSList of matching color filters.

◆ resetColumns()

void PacketListRecord::resetColumns ( column_info cinfo)
static

Resets the columns configuration.

Parameters
cinfoPointer to the new column information.

◆ row()

int PacketListRecord::row ( ) const
inline

Gets the logical row index of this record.

Returns
The row index.

◆ setDissectionPaused()

static void PacketListRecord::setDissectionPaused ( bool  paused)
inlinestatic

Sets whether packet dissection is currently paused.

Parameters
pausedTrue to pause dissection, false to resume.

◆ setMaxCache()

static void PacketListRecord::setMaxCache ( int  cost)
inlinestatic

Sets the maximum capacity of the column text cache.

In Qt 6, QCache maxCost is a qsizetype, but the QAbstractItemModel number of rows is still an int, so we're limited to INT_MAX anyway.

Parameters
costThe maximum cost (capacity) for the cache.

◆ setRow()

void PacketListRecord::setRow ( int  row)
inline

Sets the logical row index for this record.

Parameters
rowThe row index.

◆ textColumn()

static int PacketListRecord::textColumn ( int  column)
inlinestatic

packet_list->col_to_text in gtk/packet_list_store.c

Parameters
columnThe column index.
Returns
The corresponding text column.

The documentation for this class was generated from the following files: