Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
column-info.h File Reference
#include <epan/column-utils.h>

Go to the source code of this file.

Classes

struct  col_expr_t
 
struct  col_custom_t
 
struct  col_item_t
 
struct  epan_column_info
 

Macros

#define COLUMN_FIELD_FILTER   "_ws.col."
 

Typedefs

typedef struct _proto_node proto_tree
 

Functions

WS_DLL_PUBLIC void col_setup (column_info *cinfo, const int num_cols)
 Allocate and initialize column‑handling structures.
 
WS_DLL_PUBLIC void col_cleanup (column_info *cinfo)
 Release all column‑handling data structures.
 
void col_init (column_info *cinfo, const struct epan_session *epan)
 Initialize the data structures for constructing column data.
 
WS_DLL_PUBLIC void col_fill_in_frame_data (const frame_data *fd, column_info *cinfo, const int col, bool const fill_col_exprs)
 
WS_DLL_PUBLIC void col_fill_in (packet_info *pinfo, const bool fill_col_exprs, const bool fill_fd_colums)
 
WS_DLL_PUBLIC void col_fill_in_error (column_info *cinfo, frame_data *fdata, const bool fill_col_exprs, const bool fill_fd_colums)
 
WS_DLL_PUBLIC bool col_data_changed (void)
 
void col_custom_set_edt (struct epan_dissect *edt, column_info *cinfo)
 Set custom data type for a column in an epan_dissect structure.
 
WS_DLL_PUBLIC void col_custom_prime_edt (struct epan_dissect *edt, column_info *cinfo)
 Prime custom columns in an epan_dissect structure.
 
WS_DLL_PUBLIC char * col_custom_get_filter (struct epan_dissect *edt, column_info *cinfo, const unsigned col)
 
WS_DLL_PUBLIC bool have_custom_cols (column_info *cinfo)
 Checks if there are custom columns in the given column_info structure.
 
WS_DLL_PUBLIC bool have_field_extractors (void)
 Checks if field extractors are available.
 
WS_DLL_PUBLIC bool col_has_time_fmt (column_info *cinfo, const unsigned col)
 Check if a column has any time format.
 
WS_DLL_PUBLIC bool col_based_on_frame_data (column_info *cinfo, const unsigned col)
 Determines if a column is based on frame data.
 
void col_register_protocol (void)
 Registers the protocol columns for Wireshark.
 
void col_dissect (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 Dissects and populates columns in a packet display tree.
 

Detailed Description

Column info.

Function Documentation

◆ col_based_on_frame_data()

WS_DLL_PUBLIC bool col_based_on_frame_data ( column_info cinfo,
const unsigned  col 
)

Determines if a column is based on frame data.

Parameters
cinfoPointer to the column information structure.
colColumn index.
Returns
true If the column is based on frame data, false otherwise.

◆ col_cleanup()

WS_DLL_PUBLIC void col_cleanup ( column_info cinfo)

Release all column‑handling data structures.

Cleanup all the data structures for constructing column data; undoes the allocations that col_setup() does.

Parameters
cinfoThe column_info structure whose resources should be freed.

◆ col_custom_get_filter()

WS_DLL_PUBLIC char * col_custom_get_filter ( struct epan_dissect edt,
column_info cinfo,
const unsigned  col 
)

Get a filter expression for a custom column. This string must be g_free'd.

◆ col_custom_prime_edt()

WS_DLL_PUBLIC void col_custom_prime_edt ( struct epan_dissect edt,
column_info cinfo 
)

Prime custom columns in an epan_dissect structure.

Parameters
edtPointer to the epan_dissect structure containing the dissector information.
cinfoPointer to the column_info structure containing the column information.

◆ col_custom_set_edt()

void col_custom_set_edt ( struct epan_dissect edt,
column_info cinfo 
)

Set custom data type for a column in an epan_dissect structure.

This function updates the custom data type for each custom column in the provided column_info structure.

Parameters
edtPointer to the epan_dissect structure containing the dissector information.
cinfoPointer to the column_info structure containing the column information.

◆ col_data_changed()

WS_DLL_PUBLIC bool col_data_changed ( void  )

Check to see if our column data has changed, e.g. we have new request/response info.

◆ col_dissect()

void col_dissect ( tvbuff_t tvb,
packet_info pinfo,
proto_tree tree 
)
extern

Dissects and populates columns in a packet display tree.

This function processes a tvbuff_t containing packet data, extracts relevant information, and populates the specified proto_tree with column data based on the packet's protocol and content.

Parameters
tvbPointer to the tvbuff_t containing the packet data.
pinfoPointer to the packet_info structure containing metadata about the packet.
treePointer to the proto_tree where column data will be added.

◆ col_fill_in()

WS_DLL_PUBLIC void col_fill_in ( packet_info pinfo,
const bool  fill_col_exprs,
const bool  fill_fd_colums 
)

Fill in all (non-custom) columns of the given packet.

◆ col_fill_in_error()

WS_DLL_PUBLIC void col_fill_in_error ( column_info cinfo,
frame_data fdata,
const bool  fill_col_exprs,
const bool  fill_fd_colums 
)

Fill in columns if we got an error reading the packet. We set most columns to "???", and set the Info column to an error message.

◆ col_fill_in_frame_data()

WS_DLL_PUBLIC void col_fill_in_frame_data ( const frame_data fd,
column_info cinfo,
const int  col,
bool const  fill_col_exprs 
)

Fill in all columns of the given packet which are based on values from frame_data.

◆ col_has_time_fmt()

WS_DLL_PUBLIC bool col_has_time_fmt ( column_info cinfo,
const unsigned  col 
)

Check if a column has any time format.

Parameters
cinfoPointer to the column information structure.
colColumn index to check.
Returns
true If the column has any time format, false otherwise.

◆ col_init()

void col_init ( column_info cinfo,
const struct epan_session epan 
)
extern

Initialize the data structures for constructing column data.

Parameters
cinfoThe column_info structure to initialize.
epanThe epan_session providing context and preferences.

◆ col_register_protocol()

void col_register_protocol ( void  )

Registers the protocol columns for Wireshark.

This function initializes and registers the protocol columns used in Wireshark's packet display.

◆ col_setup()

WS_DLL_PUBLIC void col_setup ( column_info cinfo,
const int  num_cols 
)

Allocate and initialize column‑handling structures.

Prepares a column_info structure for use by the column subsystem by allocating the internal data structures required to store, format, and update column values during dissection.

Parameters
cinfoThe column_info structure to initialize.
num_colsThe number of columns to allocate space for.

◆ have_custom_cols()

WS_DLL_PUBLIC bool have_custom_cols ( column_info cinfo)

Checks if there are custom columns in the given column_info structure.

Parameters
cinfoPointer to the column_info structure to check.
Returns
true if there are custom columns, false otherwise.

◆ have_field_extractors()

WS_DLL_PUBLIC bool have_field_extractors ( void  )

Checks if field extractors are available.

Returns
true if field extractors are available, false otherwise.