2021-11-30 13:01:36 +00:00
|
|
|
/** @file
|
2012-01-04 22:13:01 +00:00
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-04-30 07:47:58 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
#ifndef BYTE_VIEW_TAB_H
|
|
|
|
#define BYTE_VIEW_TAB_H
|
|
|
|
|
2015-01-03 20:52:54 +00:00
|
|
|
#include <config.h>
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
#include <epan/packet.h>
|
|
|
|
#include <epan/proto.h>
|
|
|
|
#include <epan/tvbuff.h>
|
|
|
|
|
2017-10-30 12:58:28 +00:00
|
|
|
#include <ui/qt/utils/field_information.h>
|
|
|
|
|
2012-10-30 19:21:24 +00:00
|
|
|
#include "cfile.h"
|
|
|
|
|
2012-01-04 22:13:01 +00:00
|
|
|
#include <QTabWidget>
|
2015-02-08 20:24:19 +00:00
|
|
|
|
2017-10-30 12:58:28 +00:00
|
|
|
|
|
|
|
#include <ui/qt/widgets/byte_view_text.h>
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
class ByteViewTab : public QTabWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2015-07-29 23:24:39 +00:00
|
|
|
|
2017-10-30 12:58:28 +00:00
|
|
|
public:
|
2018-01-23 16:56:42 +00:00
|
|
|
explicit ByteViewTab(QWidget *parent = 0, epan_dissect_t *edt_fixed = 0);
|
2017-10-25 13:39:35 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
/* Set the capture file */
|
|
|
|
void setCaptureFile(capture_file *cf);
|
|
|
|
/* Creates the tabs and data, depends on an dissection which has already run */
|
2019-11-21 09:50:41 +00:00
|
|
|
void selectedFrameChanged(QList<int>);
|
2017-11-12 10:29:13 +00:00
|
|
|
/* Selects or marks a field */
|
2017-10-30 12:58:28 +00:00
|
|
|
void selectedFieldChanged(FieldInformation *);
|
2018-01-17 00:41:36 +00:00
|
|
|
/* Highlights field */
|
|
|
|
void highlightedFieldChanged(FieldInformation *);
|
2017-10-25 13:39:35 +00:00
|
|
|
|
|
|
|
signals:
|
2017-10-30 12:58:28 +00:00
|
|
|
void fieldSelected(FieldInformation *);
|
|
|
|
void fieldHighlight(FieldInformation *);
|
2020-07-01 20:35:42 +00:00
|
|
|
void byteViewSettingsChanged(void);
|
2017-10-25 13:39:35 +00:00
|
|
|
|
2012-01-04 22:13:01 +00:00
|
|
|
private:
|
2012-10-30 19:21:24 +00:00
|
|
|
capture_file *cap_file_;
|
2018-01-23 16:56:42 +00:00
|
|
|
bool is_fixed_packet_; /* true if this byte view is related to a single
|
|
|
|
packet in the packet dialog and false if the
|
|
|
|
packet dissection context can change. */
|
|
|
|
epan_dissect_t *edt_; /* Packet dissection result for the currently selected packet. */
|
2021-09-13 15:00:48 +00:00
|
|
|
bool disable_hover_;
|
2017-10-30 12:58:28 +00:00
|
|
|
|
2015-07-29 23:24:39 +00:00
|
|
|
void setTabsVisible();
|
2017-10-25 13:39:35 +00:00
|
|
|
ByteViewText * findByteViewTextForTvb(tvbuff_t * search, int * idx = 0);
|
|
|
|
void addTab(const char *name = "", tvbuff_t *tvb = NULL);
|
2015-07-29 23:24:39 +00:00
|
|
|
|
2012-01-04 22:13:01 +00:00
|
|
|
protected:
|
2017-10-30 12:58:28 +00:00
|
|
|
void tabInserted(int);
|
|
|
|
void tabRemoved(int);
|
2012-01-04 22:13:01 +00:00
|
|
|
|
2017-10-25 13:39:35 +00:00
|
|
|
private slots:
|
|
|
|
void byteViewTextHovered(int);
|
|
|
|
void byteViewTextMarked(int);
|
2017-10-30 12:58:28 +00:00
|
|
|
|
|
|
|
void connectToMainWindow();
|
2017-11-17 13:39:03 +00:00
|
|
|
|
|
|
|
void captureActive(int);
|
2012-01-04 22:13:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // BYTE_VIEW_TAB_H
|