1 /* packet_list_record.h
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0+*/
9 #ifndef PACKET_LIST_RECORD_H
10 #define PACKET_LIST_RECORD_H
18 #include <epan/column-info.h>
19 #include <epan/packet.h>
30 class PacketListRecord
33 PacketListRecord(frame_data *frameData);
35 // Allocate our records using wmem.
36 static void *operator new(size_t size);
37 static void operator delete(void *) {}
39 // Return the string value for a column. Data is cached if possible.
40 const QByteArray columnString(capture_file *cap_file, int column, bool colorized = false);
41 frame_data *frameData() const { return fdata_; }
42 // packet_list->col_to_text in gtk/packet_list_store.c
43 static int textColumn(int column) { return cinfo_column_.value(column, -1); }
44 bool colorized() { return colorized_; }
45 struct conversation *conversation() { return conv_; }
47 int columnTextSize(const char *str);
48 static void resetColumns(column_info *cinfo);
49 void resetColorized();
50 inline int lineCount() { return lines_; }
51 inline int lineCountChanged() { return line_count_changed_; }
53 static void clearStringPool();
56 /** The column text for some columns */
57 ColumnTextList *col_text_;
61 bool line_count_changed_;
62 static QMap<int, int> cinfo_column_;
64 /** Data versions. Used to invalidate col_text_ */
65 static unsigned col_data_ver_;
67 /** Has this record been colorized? */
70 /** Conversation. Used by RelatedPacketDelegate */
71 struct conversation *conv_;
73 void dissect(capture_file *cap_file, bool dissect_color = false);
74 void cacheColumnStrings(column_info *cinfo);
76 static struct _GStringChunk *string_pool_;
80 #endif // PACKET_LIST_RECORD_H
88 * indent-tabs-mode: nil
91 * ex: set shiftwidth=4 tabstop=8 expandtab:
92 * :indentSize=4:tabSize=8:noTabs=true: