--------- - all protocols on allocation of a configWidget, also populate it before returning from configWidget() - VLAN TPID override is now correctly saved and restored from/to its widget (vlan.cpp) - Payload protocol returns a minimum frame value of 1 byte size (Hack to avoid crash in stream config dialog when sum of all protocol frame sizes is greater than the frame length - small layout changes in mac widget (mac.ui) - src/dst ip mask changed from 255.255.255.255 to 255.255.255.0 (ip4.proto) - src mac changed from u32 to u64 (mac.proto) - "Combo Protocol" protocol container introduced to define newer protocols as a combination of existing protocols e.g. dot2 = dot3 + llc - THIS IS NOT YET COMPLETE (comboprotocol.h) Client/StreamConfigDialog ------------------------- - Advanced Protocol Selection implemented - Simple Protocol Selection rewritten to work alongside Advanced - Payload Widget is treated like any other protocol - hence it is not placedinto the dialog specially - Any protocol selection change (in Simple/Advanced mode) immediately triggers change in the Stream's protocolList - Protocol Widgets now are arranged in a toolBox on a top level tab of the dialog instead of a nested tabWidget - Vlan selection (Simple Mode) uses Radio buttons instead of checkboxes - Double Tagged (SVlan + CVlan) now works via Simple Mode
100 lines
2.3 KiB
C++
100 lines
2.3 KiB
C++
#ifndef _STREAM_CONFIG_DIALOG_H
|
|
#define _STREAM_CONFIG_DIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include "ui_streamconfigdialog.h"
|
|
#include "port.h"
|
|
#include "stream.h"
|
|
#include "packetmodel.h"
|
|
#include "modeltest.h"
|
|
|
|
#define MAX_MAC_ITER_COUNT 256
|
|
#define MIN_PKT_LEN 64
|
|
#define MAX_PKT_LEN 1522
|
|
|
|
/*
|
|
** TODO
|
|
** \todo Improve HexStr handling
|
|
**
|
|
*/
|
|
|
|
|
|
class StreamConfigDialog : public QDialog, public Ui::StreamConfigDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
StreamConfigDialog(Port &port, uint streamIndex, QWidget *parent = 0);
|
|
~StreamConfigDialog();
|
|
|
|
private:
|
|
|
|
QButtonGroup *bgFrameType;
|
|
QButtonGroup *bgVlan;
|
|
QButtonGroup *bgL3Proto;
|
|
QButtonGroup *bgL4Proto;
|
|
QButtonGroup *bgPayloadProto;
|
|
|
|
QStringListModel *mpAvailableProtocolsModel;
|
|
QStringListModel *mpSelectedProtocolsModel;
|
|
|
|
Port& mPort;
|
|
uint mCurrentStreamIndex;
|
|
|
|
Stream *mpStream;
|
|
ProtocolListIterator *_iter;
|
|
|
|
bool isUpdateInProgress;
|
|
|
|
PacketModel *mpPacketModel;
|
|
ModelTest *mpPacketModelTester;
|
|
|
|
// The following static variables are used to track the "selected" tab
|
|
// for the various tab widgets so that it can be restored when the dialog
|
|
// is opened the next time
|
|
static int lastTopLevelTabIndex;
|
|
|
|
void setupUiExtra();
|
|
void updateSelectedProtocols();
|
|
void LoadCurrentStream();
|
|
void StoreCurrentStream();
|
|
|
|
private slots:
|
|
void on_cmbPktLenMode_currentIndexChanged(QString mode);
|
|
void update_NumPacketsAndNumBursts();
|
|
|
|
void on_twTopLevel_currentChanged(int index);
|
|
void on_tbSelectProtocols_currentChanged(int index);
|
|
|
|
// "Simple" Protocol Selection related
|
|
bool skipProtocols(int layer);
|
|
|
|
void updateFrameTypeProtocol(int id);
|
|
void updateVlanProtocol(int id);
|
|
void updateL3Protocol(int id);
|
|
void updateL4Protocol(int id);
|
|
void updatePayloadProtocol(int id);
|
|
|
|
void updateSelectProtocolsSimpleWidget();
|
|
|
|
// "Advanced" Protocol Selection related
|
|
void when_lvAllProtocols_selectionChanged(
|
|
const QItemSelection &selected, const QItemSelection &deselected);
|
|
void when_lvSelectedProtocols_currentChanged(
|
|
const QModelIndex ¤t, const QModelIndex &previous);
|
|
|
|
void on_tbAdd_clicked();
|
|
void on_tbDelete_clicked();
|
|
void on_tbUp_clicked();
|
|
void on_tbDown_clicked();
|
|
|
|
void updateSelectProtocolsAdvancedWidget();
|
|
|
|
void on_pbPrev_clicked();
|
|
void on_pbNext_clicked();
|
|
|
|
void on_pbOk_clicked();
|
|
};
|
|
|
|
#endif
|
|
|