diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-03-08 15:17:58 -0800 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2018-03-15 12:19:23 +0000 |
commit | bbe5fc102821cc3fa9e661078311f681501025ef (patch) | |
tree | b61de63e63e01e4b55d59dd7ba4d46db6b484bb4 /epan/column-utils.h | |
parent | 03af5553eb1aaf38b2053e8b83a2be60097306d8 (diff) |
Epan+Qt: Invalidate cached column strings.
Add col_data_changed, which checks to see if we have updated column
info. Add col_append_frame_number, which adds a frame number and sets
col_data_changed. Call col_append_frame_number instead of
col_append_fstr from some dissectors.
Add PacketListRecord::invalidateAllRecords, which invalidates any cached
record data. Add PacketListModel::invalidateAllColumnStrings which calls
invalidateAllRecords and signals that our data has changed. Call
invalidateAllColumnStrings when we have new name resolution or column
information.
Bug: 11414
Bug: 11468
Change-Id: I2671594a722f4f9436fe1df84d43489a148e0cee
Reviewed-on: https://code.wireshark.org/review/26373
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'epan/column-utils.h')
-rw-r--r-- | epan/column-utils.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/epan/column-utils.h b/epan/column-utils.h index 28755aaf0d..3463e00801 100644 --- a/epan/column-utils.h +++ b/epan/column-utils.h @@ -132,6 +132,12 @@ WS_DLL_PUBLIC void col_fill_in(packet_info *pinfo, const gboolean fill_col_exprs */ WS_DLL_PUBLIC void col_fill_in_error(column_info *cinfo, frame_data *fdata, const gboolean fill_col_exprs, const gboolean fill_fd_colums); +/** Check to see if our column data has changed, e.g. we have new request/response info. + * + * Internal, don't use this in dissectors! + */ +WS_DLL_PUBLIC gboolean col_data_changed(void); + /* Utility routines used by packet*.c */ /** Are the columns writable? @@ -271,6 +277,17 @@ WS_DLL_PUBLIC void col_append_str_uint(column_info *cinfo, const gint col, const */ WS_DLL_PUBLIC void col_append_ports(column_info *cinfo, const gint col, port_type typ, guint16 src, guint16 dst); +/** 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 + * @param fmt_str Format string, e.g. "reassembled in %u". + * @param src the source port value to append + * @param dst the destination port value to append + */ +WS_DLL_PUBLIC void col_append_frame_number(packet_info *pinfo, const gint col, const gchar *fmt_str, guint frame_num); + /* 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. |