10 #ifndef ATAP_DATA_MODEL_H
11 #define ATAP_DATA_MODEL_H
19 #include <QAbstractListModel>
38 DISPLAY_FILTER = Qt::UserRole,
39 UNFORMATTED_DISPLAYDATA,
57 DATAMODEL_CONVERSATION,
85 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
87 virtual int columnCount(
const QModelIndex &parent = QModelIndex())
const = 0;
88 virtual QVariant headerData(
int section, Qt::Orientation orientation = Qt::Horizontal,
int role = Qt::DisplayRole)
const = 0;
89 virtual QVariant data(
const QModelIndex &idx,
int role = Qt::DisplayRole)
const = 0;
200 #ifdef HAVE_MAXMINDDB
211 void tapListenerChanged(
bool enable);
215 static void tapReset(
void *tapdata);
216 static void tapDraw(
void *tap_data);
218 virtual tap_packet_cb conversationPacketHandler();
223 void updateData(GArray * data);
234 double _minRelStartTime;
235 double _maxRelStopTime;
256 ENDP_COLUMN_PACKETS_TOTAL,
257 ENDP_COLUMN_BYTES_TOTAL,
259 ENDP_COLUMN_BYTES_AB,
261 ENDP_COLUMN_BYTES_BA,
263 ENDP_COLUMN_GEO_COUNTRY = ENDP_NUM_COLUMNS,
264 ENDP_COLUMN_GEO_CITY,
265 ENDP_COLUMN_GEO_LATITUDE,
266 ENDP_COLUMN_GEO_LONGITUDE,
267 ENDP_COLUMN_GEO_AS_NUM,
268 ENDP_COLUMN_GEO_AS_ORG,
270 } endpoint_column_type_e;
274 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
275 QVariant headerData(
int section, Qt::Orientation orientation = Qt::Horizontal,
int role = Qt::DisplayRole)
const;
276 QVariant data(
const QModelIndex &idx,
int role = Qt::DisplayRole)
const;
286 CONV_COLUMN_SRC_ADDR,
287 CONV_COLUMN_SRC_PORT,
288 CONV_COLUMN_DST_ADDR,
289 CONV_COLUMN_DST_PORT,
293 CONV_COLUMN_PACKETS_TOTAL,
294 CONV_COLUMN_BYTES_TOTAL,
296 CONV_COLUMN_BYTES_AB,
298 CONV_COLUMN_BYTES_BA,
300 CONV_COLUMN_DURATION,
304 CONV_INDEX_COLUMN = CONV_NUM_COLUMNS
305 } conversation_column_type_e;
308 CONV_TCP_EXT_COLUMN_A = CONV_INDEX_COLUMN,
309 CONV_TCP_EXT_NUM_COLUMNS,
310 CONV_TCP_EXT_INDEX_COLUMN = CONV_TCP_EXT_NUM_COLUMNS
311 } conversation_tcp_ext_column_type_e;
315 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
316 QVariant headerData(
int section, Qt::Orientation orientation = Qt::Horizontal,
int role = Qt::DisplayRole)
const;
317 QVariant data(
const QModelIndex &idx,
int role = Qt::DisplayRole)
const;
DataModel for tap user data.
Definition: atap_data_model.h:33
bool showTotalColumn() const
A total column is filled.
Definition: atap_data_model.cpp:316
bool resolveNames() const
Is the model set to resolve names in address and ports columns.
Definition: atap_data_model.cpp:223
void useAbsoluteTime(bool absolute)
Use absolute time for any column supporting it.
Definition: atap_data_model.cpp:264
bool enableTap()
Enable tapping in this model.
Definition: atap_data_model.cpp:104
ATapDataModel(dataModelType type, int protoId, QString filter, QObject *parent=nullptr)
Construct a new ATapDataModel object.
Definition: atap_data_model.cpp:36
QString tap() const
Returns the name for the tap being used.
Definition: atap_data_model.cpp:77
bool allowsNameResolution() const
Does the model allow names to be resolved.
Definition: atap_data_model.cpp:238
dataModelType modelType() const
Return the model type.
Definition: atap_data_model.cpp:306
void setFilter(QString filter)
Set the filter string.
Definition: atap_data_model.cpp:284
void setResolveNames(bool resolve)
Enable or disable if names should be resolved.
Definition: atap_data_model.cpp:228
void disableTap()
Disable the tapping for this model.
Definition: atap_data_model.cpp:131
void useNanosecondTimestamps(bool nanoseconds)
Use nanosecond timestamps if requested.
Definition: atap_data_model.cpp:274
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 ...
Definition: atap_data_model.cpp:140
bool portsAreHidden() const
Are ports hidden for this model.
Definition: atap_data_model.cpp:311
int protoId() const
The protocol id for the tap.
Definition: atap_data_model.cpp:72
QString filter() const
Return a filter set for the model.
Definition: atap_data_model.cpp:301
Definition: atap_data_model.h:281
bool showConversationId(int row=0) const
Show the conversation id if available.
Definition: atap_data_model.cpp:865
Definition: atap_data_model.h:246
Definition: conversation_table.h:53
Definition: conversation_table.h:121
Definition: conversation_table.c:24