|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Tap data model for the Conversations statistics dialog. More...
#include <atap_data_model.h>
Public Member Functions | |
| ConversationDataModel (int protoId, QString filter, QObject *parent=nullptr) | |
| Construct a ConversationDataModel for a given protocol and filter. | |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| Return the number of columns, including any TCP extended columns. | |
| QVariant | headerData (int section, Qt::Orientation orientation=Qt::Horizontal, int role=Qt::DisplayRole) const override |
| Return header data for the conversation table. | |
| QVariant | data (const QModelIndex &idx, int role=Qt::DisplayRole) const override |
| Return data for a cell in the conversation table. | |
| void | doDataUpdate () |
| Recalculate derived values (throughput, duration) after a tap update. | |
| conv_item_t * | itemForRow (int row) |
Return the raw conv_item_t for a given table row. | |
| bool | showConversationId (int row=0) const |
| Return whether a conversation ID column should be shown. | |
| void | setResolveNames (bool resolve) override |
| Enable or disable address name resolution for all address cells. | |
| void | useAbsoluteTime (bool absolute) override |
| Switch timestamp display between absolute and relative time. | |
| void | useNanosecondTimestamps (bool nanoseconds) override |
| Enable or disable nanosecond precision in timestamp display. | |
Public Member Functions inherited from ATapDataModel | |
| ATapDataModel (dataModelType type, int protoId, QString filter, QObject *parent=nullptr) | |
| Construct a new ATapDataModel object. | |
| virtual | ~ATapDataModel () |
| Destructor. | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| Number of rows under the given parent in this model, which is the total number of rows for the empty QModelIndex, and 0 for any valid parent index (as no row has children; this is a flat table.) | |
| QString | tap () const |
| Returns the name for the tap being used. | |
| int | protoId () const |
| The protocol id for the tap. | |
| void | setFilter (QString filter) |
| Set the filter string. | |
| QString | filter () const |
| Return a filter set for the model. | |
| bool | resolveNames () const |
| Is the model set to resolve names in address and ports columns. | |
| bool | allowsNameResolution () const |
| Does the model allow names to be resolved. | |
| void | setMachineReadable (bool machineReadable) |
| Sets whether the data should be presented in a machine-readable format. | |
| void | limitToDisplayFilter (bool limit) |
| Limits the data model to the currently active display filter. | |
| bool | portsAreHidden () const |
| Are ports hidden for this model. | |
| bool | isFilterApplied () const |
| Checks if a display filter has to be applied. | |
| bool | enableTap () |
| Enable tapping in this model. | |
| void | disableTap () |
| Disable the tapping for this model. | |
| dataModelType | modelType () const |
| Return the model type. | |
| conv_hash_t * | hash () |
| Return the conversation hash table for this model. | |
| void | updateFlags (unsigned flag) |
| Update the flags. | |
Additional Inherited Members | |
Signals inherited from ATapDataModel | |
| void | tapListenerChanged (bool enable) |
| Signal emitted when the tap listener state changes. | |
Public Attributes inherited from ATapDataModel | |
| conv_hash_t | hash_ |
Protected Member Functions inherited from ATapDataModel | |
| virtual tap_packet_cb | conversationPacketHandler () |
| Retrieves the callback function used to handle conversation packets. | |
| void | resetData () |
| Resets the internal model data. | |
| void | updateData (GArray *data) |
| Updates the model with new data. | |
| register_ct_t * | registerTable () const |
| Gets the conversation registration table for this tap. | |
Static Protected Member Functions inherited from ATapDataModel | |
| static void | tapReset (void *tapdata) |
| Callback to reset the tap data. | |
| static void | tapDraw (void *tap_data) |
| Callback to draw or update the tap data. | |
Protected Attributes inherited from ATapDataModel | |
| dataModelType | _type |
| GArray * | storage_ |
| QString | _filter |
| bool | _absoluteTime |
| bool | _nanoseconds |
| bool | _resolveNames |
| bool | _machineReadable |
| bool | _disableTap |
| double | _minRelStartTime |
| double | _maxRelStopTime |
| unsigned | _tapFlags |
Tap data model for the Conversations statistics dialog.
Collects per-conversation traffic statistics via the ATapDataModel tap infrastructure and exposes them as a table with address, port, packet count, byte count, timing, and throughput columns. An optional extended TCP column block is appended when the selected protocol is TCP.
Column indices for the standard conversation statistics table.
CONV_INDEX_COLUMN is a virtual column (equal to CONV_NUM_COLUMNS) used to store the internal conversation index and is never displayed.
Additional column indices for the TCP extended column block.
These columns are appended after CONV_INDEX_COLUMN when the selected protocol is TCP.
| Enumerator | |
|---|---|
| CONV_TCP_EXT_COLUMN_A | First TCP extended column. |
| CONV_TCP_EXT_NUM_COLUMNS | Total columns including TCP extensions. |
| CONV_TCP_EXT_INDEX_COLUMN | Virtual index for TCP ext block. |
|
explicit |
Construct a ConversationDataModel for a given protocol and filter.
| protoId | The protocol ID whose conversation tap should be registered. |
| filter | Optional display filter string; empty means no filter. |
| parent | The parent QObject. |
|
overridevirtual |
Return the number of columns, including any TCP extended columns.
| parent | Unused; present for API compatibility. |
Implements ATapDataModel.
|
overridevirtual |
Return data for a cell in the conversation table.
| idx | The model index of the cell to query. |
| role | The data role (Qt::DisplayRole, Qt::UserRole, etc.). |
Implements ATapDataModel.
| void ConversationDataModel::doDataUpdate | ( | ) |
Recalculate derived values (throughput, duration) after a tap update.
Called after the tap has finished processing a batch of packets to update computed columns such as CONV_COLUMN_BPS_AB and CONV_COLUMN_DURATION.
|
overridevirtual |
Return header data for the conversation table.
| section | Column index. |
| orientation | Must be Qt::Horizontal. |
| role | The data role; typically Qt::DisplayRole. |
Implements ATapDataModel.
| conv_item_t * ConversationDataModel::itemForRow | ( | int | row | ) |
Return the raw conv_item_t for a given table row.
| row | Zero-based row index. |
conv_item_t for row, or nullptr if row is out of range.
|
overridevirtual |
Enable or disable address name resolution for all address cells.
| resolve | true to resolve addresses to hostnames; false to show raw addresses. |
Implements ATapDataModel.
| bool ConversationDataModel::showConversationId | ( | int | row = 0 | ) | const |
Return whether a conversation ID column should be shown.
The conversation ID column is only meaningful for protocols that assign explicit conversation identifiers (e.g. stream index for TCP).
| row | Zero-based row index used to probe the data; defaults to 0. |
row.
|
overridevirtual |
Switch timestamp display between absolute and relative time.
| absolute | true for absolute (wall-clock) timestamps; false for relative timestamps. |
Implements ATapDataModel.
|
overridevirtual |
Enable or disable nanosecond precision in timestamp display.
| nanoseconds | true to show nanosecond-resolution timestamps; false for microsecond resolution. |
Implements ATapDataModel.