2021-11-26 03:31:05 +00:00
|
|
|
/** @file
|
2001-04-01 07:32:35 +00:00
|
|
|
* Definitions for column utility structures and routines
|
2022-08-06 13:31:23 +00:00
|
|
|
* Utility routines used by packet*.c
|
2001-04-01 07:32:35 +00:00
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2001-04-01 07:32:35 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 20:41:00 +00:00
|
|
|
*
|
2018-02-08 16:59:17 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2001-04-01 07:32:35 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __COLUMN_UTILS_H__
|
|
|
|
#define __COLUMN_UTILS_H__
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
2001-11-21 23:16:26 +00:00
|
|
|
#include "packet_info.h"
|
2013-03-01 23:53:11 +00:00
|
|
|
#include "ws_symbol_export.h"
|
2001-04-01 07:32:35 +00:00
|
|
|
|
2007-01-18 18:43:30 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2022-08-06 13:31:23 +00:00
|
|
|
#define COL_MAX_LEN 2048
|
|
|
|
#define COL_MAX_INFO_LEN 4096
|
column: Update custom column regex
When splitting a possibly multifield custom column expression
into components, don't match "or" unless it's a word by itself,
i.e. is surrounded by space. "||" by itself is fine as a token.
This is necessary if we allow more complicated filters to match
than just single fields separated by "||" or "or". Also split
at space at the beginning or end of a string (since we don't
always guarantee that whitespace is stripped.)
When spliting into components, only split on "||" and " or " that
are not inside parenthesis. Splitting on operators inside parentheses
results in components which are not fields or valid filter expressions
and has never worked, e.g. splitting "(tcp.srcport or tcp.dstport)"
into "(tcp.srcport" and "tcp.dstport)".
TEST_OR has the lowest possible operator precedence (see
commit 34ad6bb47887fab144c8e2547dce58152111abb0), so this works,
and also justifies using OR instead of AND for multifield custom
columns.
This means that, e.g., "tcp.srcport or tcp.dstport" will be treated
as a multifield custom column expression that returns the values
for both of the fields, whereas "(tcp.srcport or tcp.dstport)" will
be ultimately treated as a single logical test that returns true
if one of the fields exist and false if neither do. Until tests
and other non single-field expressions are supported, the latter
won't work, but it never has worked.
Related to #7752, #10154, #15990, #18588, and #16181.
2024-02-08 01:01:53 +00:00
|
|
|
|
|
|
|
/* A regex to split possibly multifield custom columns into components
|
|
|
|
*
|
|
|
|
* Split on operator "||" (with optional space around it) and on "or"
|
|
|
|
* (which must have space around it to avoid matching in the middle of
|
|
|
|
* a word, field in the "synphasor" protocol, etc. This is somewhat too
|
|
|
|
* strict, as "or" adjacent to parentheses ought to be fine so long
|
|
|
|
* as the filter matches the grammar, like "(tcp.port)or(udp.port)",
|
|
|
|
* but that's the cost of using regex instead of the real parser.)
|
|
|
|
* Also split on space at the beginning or end of the expression (in
|
|
|
|
* lieu of always stripping whitespace at the beginning and end, but it
|
|
|
|
* does mean that we have to ignore any empty tokens in the result.)
|
|
|
|
*
|
|
|
|
* Use negative lookahead to avoid matching "||" or "or" that are contained
|
|
|
|
* within parentheses. Don't match if a close parenthesis comes before an
|
|
|
|
* open parenthesis. The regex doesn't help with unmatched parentheses, but
|
|
|
|
* such an expression already won't satisfy the grammar and won't compile.
|
|
|
|
*/
|
|
|
|
#define COL_CUSTOM_PRIME_REGEX "(?:^ *| *\\|\\| *| +or +| *$)(?![^(]*\\))"
|
2022-08-06 13:31:23 +00:00
|
|
|
|
2013-12-03 23:49:51 +00:00
|
|
|
struct epan_dissect;
|
|
|
|
|
2014-12-23 10:25:10 +00:00
|
|
|
/**
|
2010-08-30 05:39:02 +00:00
|
|
|
* Helper routines for column utility structures and routines.
|
|
|
|
*/
|
|
|
|
|
2013-12-22 10:41:27 +00:00
|
|
|
struct epan_column_info;
|
|
|
|
typedef struct epan_column_info column_info;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* All of the possible columns in summary listing.
|
|
|
|
*
|
|
|
|
* NOTE1: The entries MUST remain in this order, or else you need to reorder
|
|
|
|
* the slist[] and dlist[] arrays in column.c to match!
|
|
|
|
*
|
|
|
|
* NOTE2: Please add the COL_XYZ entry in the appropriate spot, such that the
|
|
|
|
* dlist[] array remains in alphabetical order!
|
|
|
|
*/
|
|
|
|
enum {
|
2023-04-29 12:15:26 +00:00
|
|
|
COL_ABS_YMD_TIME, /**< 0) Absolute date, as YYYY-MM-DD, and time */
|
|
|
|
COL_ABS_YDOY_TIME, /**< 1) Absolute date, as YYYY/DOY, and time */
|
|
|
|
COL_ABS_TIME, /**< 2) Absolute time */
|
|
|
|
COL_CUMULATIVE_BYTES, /**< 3) Cumulative number of bytes */
|
|
|
|
COL_CUSTOM, /**< 4) Custom column (any filter name's contents) */
|
|
|
|
COL_DELTA_TIME, /**< 5) Delta time */
|
|
|
|
COL_DELTA_TIME_DIS, /**< 6) Delta time displayed*/
|
|
|
|
COL_RES_DST, /**< 7) Resolved dest */
|
|
|
|
COL_UNRES_DST, /**< 8) Unresolved dest */
|
|
|
|
COL_RES_DST_PORT, /**< 9) Resolved dest port */
|
|
|
|
COL_UNRES_DST_PORT, /**< 10) Unresolved dest port */
|
|
|
|
COL_DEF_DST, /**< 11) Destination address */
|
|
|
|
COL_DEF_DST_PORT, /**< 12) Destination port */
|
|
|
|
COL_EXPERT, /**< 13) Expert Info */
|
|
|
|
COL_IF_DIR, /**< 14) FW-1 monitor interface/direction */
|
|
|
|
COL_FREQ_CHAN, /**< 15) IEEE 802.11 (and WiMax?) - Channel */
|
|
|
|
COL_DEF_DL_DST, /**< 16) Data link layer dest address */
|
|
|
|
COL_DEF_DL_SRC, /**< 17) Data link layer source address */
|
|
|
|
COL_RES_DL_DST, /**< 18) Resolved DL dest */
|
|
|
|
COL_UNRES_DL_DST, /**< 19) Unresolved DL dest */
|
|
|
|
COL_RES_DL_SRC, /**< 20) Resolved DL source */
|
|
|
|
COL_UNRES_DL_SRC, /**< 21) Unresolved DL source */
|
|
|
|
COL_RSSI, /**< 22) IEEE 802.11 - received signal strength */
|
|
|
|
COL_TX_RATE, /**< 23) IEEE 802.11 - TX rate in Mbps */
|
|
|
|
COL_DSCP_VALUE, /**< 24) IP DSCP Value */
|
|
|
|
COL_INFO, /**< 25) Description */
|
|
|
|
COL_RES_NET_DST, /**< 26) Resolved net dest */
|
|
|
|
COL_UNRES_NET_DST, /**< 27) Unresolved net dest */
|
|
|
|
COL_RES_NET_SRC, /**< 28) Resolved net source */
|
|
|
|
COL_UNRES_NET_SRC, /**< 29) Unresolved net source */
|
|
|
|
COL_DEF_NET_DST, /**< 30) Network layer dest address */
|
|
|
|
COL_DEF_NET_SRC, /**< 31) Network layer source address */
|
|
|
|
COL_NUMBER, /**< 32) Packet list item number */
|
|
|
|
COL_PACKET_LENGTH, /**< 33) Packet length in bytes */
|
|
|
|
COL_PROTOCOL, /**< 34) Protocol */
|
|
|
|
COL_REL_TIME, /**< 35) Relative time */
|
|
|
|
COL_DEF_SRC, /**< 36) Source address */
|
|
|
|
COL_DEF_SRC_PORT, /**< 37) Source port */
|
|
|
|
COL_RES_SRC, /**< 38) Resolved source */
|
|
|
|
COL_UNRES_SRC, /**< 39) Unresolved source */
|
|
|
|
COL_RES_SRC_PORT, /**< 40) Resolved source port */
|
|
|
|
COL_UNRES_SRC_PORT, /**< 41) Unresolved source port */
|
|
|
|
COL_UTC_YMD_TIME, /**< 42) UTC date, as YYYY-MM-DD, and time */
|
|
|
|
COL_UTC_YDOY_TIME, /**< 43) UTC date, as YYYY/DOY, and time */
|
|
|
|
COL_UTC_TIME, /**< 44) UTC time */
|
|
|
|
COL_CLS_TIME, /**< 45) Command line-specified time (default relative) */
|
|
|
|
NUM_COL_FMTS /**< 46) Should always be last */
|
2013-12-22 10:41:27 +00:00
|
|
|
};
|
|
|
|
|
2005-10-02 14:56:27 +00:00
|
|
|
/** Are the columns writable?
|
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
2016-06-14 15:55:08 +00:00
|
|
|
* @param col the writable column, -1 for checking the state of all columns
|
2005-10-02 14:56:27 +00:00
|
|
|
* @return TRUE if it's writable, FALSE if not
|
|
|
|
*/
|
2022-10-21 12:37:42 +00:00
|
|
|
WS_DLL_PUBLIC gboolean col_get_writable(column_info *cinfo, const gint col);
|
2005-10-02 14:56:27 +00:00
|
|
|
|
2009-09-08 19:00:54 +00:00
|
|
|
/** Set the columns writable.
|
2005-10-02 14:56:27 +00:00
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
2016-06-14 15:55:08 +00:00
|
|
|
* @param col the column to set, -1 for all
|
2005-10-02 14:56:27 +00:00
|
|
|
* @param writable TRUE if it's writable, FALSE if not
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_set_writable(column_info *cinfo, const gint col, const gboolean writable);
|
2005-10-02 14:56:27 +00:00
|
|
|
|
2009-09-08 19:00:54 +00:00
|
|
|
/** Sets a fence for the current column content,
|
|
|
|
* so this content won't be affected by further col_... function calls.
|
2005-10-02 14:56:27 +00:00
|
|
|
*
|
|
|
|
* This can be useful if a protocol is more than once in a single packet,
|
|
|
|
* e.g. multiple HTTP calls in a single TCP packet.
|
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_set_fence(column_info *cinfo, const gint col);
|
2005-10-02 14:56:27 +00:00
|
|
|
|
2013-12-18 14:18:45 +00:00
|
|
|
/** Clears a fence for the current column content
|
|
|
|
*
|
|
|
|
* This can be useful if a protocol wants to remove whatever
|
|
|
|
* a previous protocol has added to the column.
|
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_clear_fence(column_info *cinfo, const gint col);
|
2013-12-18 14:18:45 +00:00
|
|
|
|
2013-02-25 20:43:06 +00:00
|
|
|
/** Gets the text of a column element.
|
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
*
|
|
|
|
* @return the text string
|
|
|
|
*/
|
2015-09-03 14:55:39 +00:00
|
|
|
WS_DLL_PUBLIC const gchar *col_get_text(column_info *cinfo, const gint col);
|
2013-02-25 20:43:06 +00:00
|
|
|
|
2005-10-02 14:56:27 +00:00
|
|
|
/** Clears the text of a column element.
|
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_clear(column_info *cinfo, const gint col);
|
2005-10-02 14:56:27 +00:00
|
|
|
|
2022-10-21 12:37:42 +00:00
|
|
|
/** Set (replace) the text of a column element, the text won't be formatted or copied.
|
|
|
|
*
|
|
|
|
* Use this for simple static strings like protocol names. Don't use for untrusted strings
|
|
|
|
* or strings that may contain unprintable characters.
|
2005-10-02 14:56:27 +00:00
|
|
|
*
|
|
|
|
* Usually used to set const strings!
|
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
* @param str the string to set
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_set_str(column_info *cinfo, const gint col, const gchar * str);
|
2005-10-02 14:56:27 +00:00
|
|
|
|
2022-10-21 12:37:42 +00:00
|
|
|
/** Add (replace) the text of a column element, the text will be formatted and copied.
|
|
|
|
*
|
|
|
|
* Unprintable characters according to isprint() are escaped.
|
2005-10-02 14:56:27 +00:00
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
* @param str the string to add
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_add_str(column_info *cinfo, const gint col, const gchar *str);
|
2005-10-02 14:56:27 +00:00
|
|
|
|
2014-05-13 23:56:23 +00:00
|
|
|
/* terminator argument for col_add_lstr() function */
|
|
|
|
#define COL_ADD_LSTR_TERMINATOR (const char *) -1
|
2022-10-21 12:37:42 +00:00
|
|
|
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_add_lstr(column_info *cinfo, const gint el, const gchar *str, ...);
|
2014-05-13 23:56:23 +00:00
|
|
|
|
2005-10-02 14:56:27 +00:00
|
|
|
/** Add (replace) the text of a column element, the text will be formatted and copied.
|
2022-10-21 12:37:42 +00:00
|
|
|
*
|
|
|
|
* Unprintable characters according to isprint() are escaped.
|
2005-10-02 14:56:27 +00:00
|
|
|
*
|
|
|
|
* Same function as col_add_str() but using a printf-like format string.
|
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
* @param format the format string
|
|
|
|
* @param ... the variable number of parameters
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_add_fstr(column_info *cinfo, const gint col, const gchar *format, ...)
|
2010-01-25 13:20:53 +00:00
|
|
|
G_GNUC_PRINTF(3, 4);
|
2005-10-02 14:56:27 +00:00
|
|
|
|
2022-10-21 12:37:42 +00:00
|
|
|
/** Append the given text to a column element, the text will be formatted and copied.
|
|
|
|
*
|
|
|
|
* Unprintable characters according to isprint() are escaped.
|
2005-10-02 14:56:27 +00:00
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
* @param str the string to append
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_append_str(column_info *cinfo, const gint col, const gchar *str);
|
2005-10-02 14:56:27 +00:00
|
|
|
|
2015-10-04 01:52:10 +00:00
|
|
|
/** Append <abbrev>=<val> to a column element, the text will be copied.
|
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
* @param abbrev the string to append
|
|
|
|
* @param val the value to append
|
2015-10-05 12:51:58 +00:00
|
|
|
* @param sep an optional separator to _prepend_ to abbrev
|
2015-10-04 01:52:10 +00:00
|
|
|
*/
|
2015-10-05 12:51:58 +00:00
|
|
|
WS_DLL_PUBLIC void col_append_str_uint(column_info *cinfo, const gint col, const gchar *abbrev, guint32 val, const gchar *sep);
|
|
|
|
|
2015-10-15 01:44:04 +00:00
|
|
|
/** Append a transport port pair to a column element, the text will be copied.
|
2015-10-05 12:51:58 +00:00
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
2015-10-15 01:44:04 +00:00
|
|
|
* @param typ the port type to resolve, e.g. PT_UDP
|
|
|
|
* @param src the source port value to append
|
|
|
|
* @param dst the destination port value to append
|
2015-10-05 12:51:58 +00:00
|
|
|
*/
|
2015-10-15 01:44:04 +00:00
|
|
|
WS_DLL_PUBLIC void col_append_ports(column_info *cinfo, const gint col, port_type typ, guint16 src, guint16 dst);
|
2015-10-04 01:52:10 +00:00
|
|
|
|
2018-03-08 23:17:58 +00:00
|
|
|
/** Append a frame number and signal that we have updated
|
|
|
|
* column information.
|
|
|
|
*
|
|
|
|
* @param pinfo the current packet info
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
2018-03-16 20:25:53 +00:00
|
|
|
* @param fmt_str format string, e.g. "reassembled in %u".
|
|
|
|
* @param frame_num frame number
|
2018-03-08 23:17:58 +00:00
|
|
|
*/
|
|
|
|
WS_DLL_PUBLIC void col_append_frame_number(packet_info *pinfo, const gint col, const gchar *fmt_str, guint frame_num);
|
|
|
|
|
2014-06-21 21:06:54 +00:00
|
|
|
/* Append the given strings (terminated by COL_ADD_LSTR_TERMINATOR) to a column element,
|
|
|
|
*
|
|
|
|
* Same result as col_append_str() called for every string element.
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_append_lstr(column_info *cinfo, const gint el, const gchar *str, ...);
|
2014-06-21 21:06:54 +00:00
|
|
|
|
2005-10-02 14:56:27 +00:00
|
|
|
/** Append the given text to a column element, the text will be formatted and copied.
|
2022-10-21 12:37:42 +00:00
|
|
|
*
|
|
|
|
* Unprintable characters according to isprint() are escaped.
|
2005-10-02 14:56:27 +00:00
|
|
|
*
|
|
|
|
* Same function as col_append_str() but using a printf-like format string.
|
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
* @param format the format string
|
|
|
|
* @param ... the variable number of parameters
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_append_fstr(column_info *cinfo, const gint col, const gchar *format, ...)
|
2010-01-25 13:20:53 +00:00
|
|
|
G_GNUC_PRINTF(3, 4);
|
2005-10-02 14:56:27 +00:00
|
|
|
|
|
|
|
/** Prepend the given text to a column element, the text will be formatted and copied.
|
2022-10-21 12:37:42 +00:00
|
|
|
*
|
|
|
|
* Unprintable characters according to isprint() are escaped.
|
2005-10-02 14:56:27 +00:00
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
* @param format the format string
|
|
|
|
* @param ... the variable number of parameters
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_prepend_fstr(column_info *cinfo, const gint col, const gchar *format, ...)
|
2010-01-25 13:20:53 +00:00
|
|
|
G_GNUC_PRINTF(3, 4);
|
2005-10-02 14:56:27 +00:00
|
|
|
|
2022-10-21 12:37:42 +00:00
|
|
|
/** Prepend the given text to a column element, the text will be formatted and copied.
|
|
|
|
*
|
|
|
|
* Unprintable characters according to isprint() are escaped.
|
|
|
|
*
|
2005-10-04 13:34:52 +00:00
|
|
|
* This function is similar to col_prepend_fstr() but this function will
|
|
|
|
* unconditionally set a fence to the end of the prepended data even if there
|
|
|
|
* were no fence before.
|
2009-02-15 15:02:55 +00:00
|
|
|
* The col_prepend_fstr() will only prepend the data before the fence IF
|
2005-10-04 13:34:52 +00:00
|
|
|
* there is already a fence created. This function will create a fence in case
|
|
|
|
* it does not yet exist.
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_prepend_fence_fstr(column_info *cinfo, const gint col, const gchar *format, ...)
|
2010-01-25 13:20:53 +00:00
|
|
|
G_GNUC_PRINTF(3, 4);
|
2005-10-04 13:34:52 +00:00
|
|
|
|
2005-10-02 14:56:27 +00:00
|
|
|
/** Append the given text (prepended by a separator) to a column element.
|
2022-10-21 12:37:42 +00:00
|
|
|
*
|
|
|
|
* Unprintable characters according to isprint() are escaped.
|
2005-10-02 14:56:27 +00:00
|
|
|
*
|
|
|
|
* Much like col_append_str() but will prepend the given separator if the column isn't empty.
|
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
* @param sep the separator string or NULL for default: ", "
|
|
|
|
* @param str the string to append
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_append_sep_str(column_info *cinfo, const gint col, const gchar *sep,
|
2004-02-05 23:57:15 +00:00
|
|
|
const gchar *str);
|
2005-10-02 14:56:27 +00:00
|
|
|
|
|
|
|
/** Append the given text (prepended by a separator) to a column element.
|
2022-10-21 12:37:42 +00:00
|
|
|
*
|
|
|
|
* Unprintable characters according to isprint() are escaped.
|
2005-10-02 14:56:27 +00:00
|
|
|
*
|
|
|
|
* Much like col_append_fstr() but will prepend the given separator if the column isn't empty.
|
|
|
|
*
|
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
* @param sep the separator string or NULL for default: ", "
|
|
|
|
* @param format the format string
|
|
|
|
* @param ... the variable number of parameters
|
|
|
|
*/
|
2019-01-28 16:04:45 +00:00
|
|
|
WS_DLL_PUBLIC void col_append_sep_fstr(column_info *cinfo, const gint col, const gchar *sep,
|
2005-10-02 14:56:27 +00:00
|
|
|
const gchar *format, ...)
|
2010-01-25 13:20:53 +00:00
|
|
|
G_GNUC_PRINTF(4, 5);
|
2005-10-02 14:56:27 +00:00
|
|
|
|
2007-10-03 14:02:08 +00:00
|
|
|
/** Set the given (relative) time to a column element.
|
|
|
|
*
|
2016-01-26 04:01:46 +00:00
|
|
|
* Used by dissectors to set the time in a column
|
2009-09-08 19:00:54 +00:00
|
|
|
*
|
2007-10-03 14:02:08 +00:00
|
|
|
* @param cinfo the current packet row
|
|
|
|
* @param col the column to use, e.g. COL_INFO
|
|
|
|
* @param ts the time to set in the column
|
2009-09-08 19:00:54 +00:00
|
|
|
* @param fieldname the fieldname to use for creating a filter (when
|
2007-10-03 14:02:08 +00:00
|
|
|
* applying/preparing/copying as filter)
|
|
|
|
*/
|
2022-10-21 12:37:42 +00:00
|
|
|
WS_DLL_PUBLIC void col_set_time(column_info *cinfo, const int col,
|
2012-12-26 05:57:06 +00:00
|
|
|
const nstime_t *ts, const char *fieldname);
|
2007-10-03 14:02:08 +00:00
|
|
|
|
2013-07-21 20:48:30 +00:00
|
|
|
WS_DLL_PUBLIC void set_fd_time(const struct epan_session *epan, frame_data *fd, gchar *buf);
|
2011-09-19 05:15:58 +00:00
|
|
|
|
2007-01-18 18:43:30 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
2001-04-01 07:32:35 +00:00
|
|
|
|
|
|
|
#endif /* __COLUMN_UTILS_H__ */
|