Protocols
--------- - 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
This commit is contained in:
parent
1357f495ac
commit
4c2df3c5a7
BIN
client/icons/arrow_down.png
Normal file
BIN
client/icons/arrow_down.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 379 B |
BIN
client/icons/arrow_right.png
Normal file
BIN
client/icons/arrow_right.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 349 B |
BIN
client/icons/arrow_up.png
Normal file
BIN
client/icons/arrow_up.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 372 B |
BIN
client/icons/delete.png
Normal file
BIN
client/icons/delete.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 715 B |
@ -1,5 +1,8 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/" >
|
<qresource prefix="/" >
|
||||||
|
<file>icons/arrow_down.png</file>
|
||||||
|
<file>icons/arrow_right.png</file>
|
||||||
|
<file>icons/arrow_up.png</file>
|
||||||
<file>icons/bullet_error.png</file>
|
<file>icons/bullet_error.png</file>
|
||||||
<file>icons/bullet_green.png</file>
|
<file>icons/bullet_green.png</file>
|
||||||
<file>icons/bullet_orange.png</file>
|
<file>icons/bullet_orange.png</file>
|
||||||
@ -7,6 +10,7 @@
|
|||||||
<file>icons/bullet_yellow.png</file>
|
<file>icons/bullet_yellow.png</file>
|
||||||
<file>icons/control_play.png</file>
|
<file>icons/control_play.png</file>
|
||||||
<file>icons/control_stop.png</file>
|
<file>icons/control_stop.png</file>
|
||||||
|
<file>icons/delete.png</file>
|
||||||
<file>icons/magnifier.png</file>
|
<file>icons/magnifier.png</file>
|
||||||
<file>icons/portgroup_add.png</file>
|
<file>icons/portgroup_add.png</file>
|
||||||
<file>icons/portgroup_connect.png</file>
|
<file>icons/portgroup_connect.png</file>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -29,10 +29,13 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
QButtonGroup *bgFrameType;
|
QButtonGroup *bgFrameType;
|
||||||
|
QButtonGroup *bgVlan;
|
||||||
QButtonGroup *bgL3Proto;
|
QButtonGroup *bgL3Proto;
|
||||||
QButtonGroup *bgL4Proto;
|
QButtonGroup *bgL4Proto;
|
||||||
|
QButtonGroup *bgPayloadProto;
|
||||||
|
|
||||||
QStringListModel *mpAvailableProtocolsModel;
|
QStringListModel *mpAvailableProtocolsModel;
|
||||||
|
QStringListModel *mpSelectedProtocolsModel;
|
||||||
|
|
||||||
Port& mPort;
|
Port& mPort;
|
||||||
uint mCurrentStreamIndex;
|
uint mCurrentStreamIndex;
|
||||||
@ -40,6 +43,8 @@ private:
|
|||||||
Stream *mpStream;
|
Stream *mpStream;
|
||||||
ProtocolListIterator *_iter;
|
ProtocolListIterator *_iter;
|
||||||
|
|
||||||
|
bool isUpdateInProgress;
|
||||||
|
|
||||||
PacketModel *mpPacketModel;
|
PacketModel *mpPacketModel;
|
||||||
ModelTest *mpPacketModelTester;
|
ModelTest *mpPacketModelTester;
|
||||||
|
|
||||||
@ -47,7 +52,6 @@ private:
|
|||||||
// for the various tab widgets so that it can be restored when the dialog
|
// for the various tab widgets so that it can be restored when the dialog
|
||||||
// is opened the next time
|
// is opened the next time
|
||||||
static int lastTopLevelTabIndex;
|
static int lastTopLevelTabIndex;
|
||||||
static int lastProtoTabIndex;
|
|
||||||
|
|
||||||
void setupUiExtra();
|
void setupUiExtra();
|
||||||
void updateSelectedProtocols();
|
void updateSelectedProtocols();
|
||||||
@ -56,15 +60,37 @@ private:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_cmbPktLenMode_currentIndexChanged(QString mode);
|
void on_cmbPktLenMode_currentIndexChanged(QString mode);
|
||||||
void on_pbPrev_clicked();
|
void update_NumPacketsAndNumBursts();
|
||||||
void on_pbNext_clicked();
|
|
||||||
|
|
||||||
void updateContents();
|
|
||||||
|
|
||||||
void on_twTopLevel_currentChanged(int index);
|
void on_twTopLevel_currentChanged(int index);
|
||||||
void on_twProto_currentChanged(int index);
|
void on_tbSelectProtocols_currentChanged(int index);
|
||||||
|
|
||||||
void update_NumPacketsAndNumBursts();
|
// "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();
|
void on_pbOk_clicked();
|
||||||
};
|
};
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>636</width>
|
<width>524</width>
|
||||||
<height>589</height>
|
<height>458</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
@ -35,8 +35,8 @@ QLineEdit:enabled[inputMask = "HH HH HH HH HH HH; "] { background-color: #ccccff
|
|||||||
<property name="modal" >
|
<property name="modal" >
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item>
|
<item row="0" column="0" >
|
||||||
<widget class="QTabWidget" name="twTopLevel" >
|
<widget class="QTabWidget" name="twTopLevel" >
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
<string/>
|
<string/>
|
||||||
@ -46,7 +46,7 @@ QLineEdit:enabled[inputMask = "HH HH HH HH HH HH; "] { background-color: #ccccff
|
|||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="packetConfigTab" >
|
<widget class="QWidget" name="packetConfigTab" >
|
||||||
<attribute name="title" >
|
<attribute name="title" >
|
||||||
<string>Packet Config</string>
|
<string>Protocol Selection</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
@ -56,7 +56,7 @@ QLineEdit:enabled[inputMask = "HH HH HH HH HH HH; "] { background-color: #ccccff
|
|||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
<width>171</width>
|
<width>241</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -164,237 +164,366 @@ QLineEdit:enabled[inputMask = "HH HH HH HH HH HH; "] { background-color: #ccccff
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2" >
|
<item row="1" column="0" colspan="2" >
|
||||||
<widget class="QTabWidget" name="twProto" >
|
<widget class="QToolBox" name="tbSelectProtocols" >
|
||||||
<property name="currentIndex" >
|
<property name="currentIndex" >
|
||||||
<number>4</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_7" >
|
<widget class="QWidget" name="page" >
|
||||||
<attribute name="title" >
|
<property name="geometry" >
|
||||||
<string>Protocols</string>
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>465</width>
|
||||||
|
<height>226</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<attribute name="label" >
|
||||||
|
<string>Simple</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" >
|
||||||
|
<item rowspan="2" row="0" column="0" >
|
||||||
|
<widget class="QGroupBox" name="gbFrameType" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>Frame Type</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" >
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbFtNone" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>None (Mac Only)</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbFtEthernet2" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Ethernet II</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbFt802Dot3Raw" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>802.3 Raw</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbFt802Dot3Llc" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>802.3 LLC</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbFtLlcSnap" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>802.3 LLC SNAP</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbFtOther" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Other</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" >
|
||||||
|
<widget class="QGroupBox" name="gbVlan" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="title" >
|
||||||
|
<string>VLAN</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" >
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbVlanNone" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>None</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbVlanSingle" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Single Tag</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbVlanDouble" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Double Tag</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2" colspan="2" >
|
||||||
|
<widget class="QGroupBox" name="gbL3Proto" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>L3</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" >
|
||||||
|
<item row="0" column="0" >
|
||||||
|
<widget class="QRadioButton" name="rbL3None" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>None</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" >
|
||||||
|
<widget class="QRadioButton" name="rbL3Ipv4" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>IPv4</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2" >
|
||||||
|
<widget class="QRadioButton" name="rbL3Ipv6" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>IPv6</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<widget class="QRadioButton" name="rbL3Arp" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>ARP</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" >
|
||||||
|
<widget class="QRadioButton" name="rbL3Other" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Other</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" colspan="2" >
|
||||||
|
<widget class="QGroupBox" name="gbL4Proto" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>L4</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" >
|
||||||
|
<item row="0" column="0" >
|
||||||
|
<widget class="QRadioButton" name="rbL4None" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>None</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" >
|
||||||
|
<widget class="QRadioButton" name="rbL4Icmp" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>ICMP</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2" >
|
||||||
|
<widget class="QRadioButton" name="rbL4Igmp" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>IGMP</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<widget class="QRadioButton" name="rbL4Tcp" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>TCP</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" >
|
||||||
|
<widget class="QRadioButton" name="rbL4Udp" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>UDP</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2" >
|
||||||
|
<widget class="QRadioButton" name="rbL4Other" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Other</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3" >
|
||||||
|
<widget class="QGroupBox" name="gbPayloadProto" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>Payload</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" >
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbPayloadPattern" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Pattern</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbPayloadOther" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Other</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" >
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>107</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="page_2" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>250</width>
|
||||||
|
<height>135</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<attribute name="label" >
|
||||||
|
<string>Advanced</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gbFrameType" >
|
<widget class="QLabel" name="label" >
|
||||||
<property name="title" >
|
<property name="text" >
|
||||||
<string>Frame Type</string>
|
<string>Available Protocols</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
|
||||||
<item row="0" column="0" >
|
|
||||||
<widget class="QRadioButton" name="rbFtNone" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>None</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" >
|
|
||||||
<widget class="QRadioButton" name="rbFtEthernet2" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Ethernet II</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" >
|
|
||||||
<widget class="QRadioButton" name="rbFt802Dot3Raw" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>802.3 Raw</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" >
|
|
||||||
<widget class="QRadioButton" name="rbFt802Dot3Llc" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>802.3 LLC</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" >
|
|
||||||
<widget class="QRadioButton" name="rbFtLlcSnap" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>LLC SNAP</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gbVlan" >
|
<widget class="QListView" name="lvAllProtocols" >
|
||||||
<property name="enabled" >
|
<property name="dragEnabled" >
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="title" >
|
<property name="selectionMode" >
|
||||||
<string>VLAN</string>
|
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable" >
|
<property name="selectionBehavior" >
|
||||||
<bool>false</bool>
|
<enum>QAbstractItemView::SelectRows</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="cbCVlan" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>CVLAN</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="cbSVlan" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>SVLAN</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gbL3Proto" >
|
<spacer>
|
||||||
<property name="title" >
|
<property name="orientation" >
|
||||||
<string>L3</string>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<property name="sizeHint" >
|
||||||
<item row="0" column="0" >
|
<size>
|
||||||
<widget class="QRadioButton" name="rbL3None" >
|
<width>20</width>
|
||||||
<property name="text" >
|
<height>40</height>
|
||||||
<string>None</string>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked" >
|
</spacer>
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" >
|
|
||||||
<widget class="QRadioButton" name="rbL3Ipv4" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>IPv4</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2" >
|
|
||||||
<widget class="QRadioButton" name="rbL3Ipv6" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>IPv6</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" >
|
|
||||||
<widget class="QRadioButton" name="rbL3Arp" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>ARP</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" >
|
|
||||||
<widget class="QRadioButton" name="rbL3Other" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Other</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gbL4Proto" >
|
<widget class="QToolButton" name="tbAdd" >
|
||||||
<property name="title" >
|
<property name="enabled" >
|
||||||
<string>L4</string>
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>></string>
|
||||||
|
</property>
|
||||||
|
<property name="icon" >
|
||||||
|
<iconset resource="ostinato.qrc" >:/icons/arrow_right.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
|
||||||
<item row="0" column="0" >
|
|
||||||
<widget class="QRadioButton" name="rbL4None" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>None</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" >
|
|
||||||
<widget class="QRadioButton" name="rbL4Icmp" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>ICMP</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2" >
|
|
||||||
<widget class="QRadioButton" name="rbL4Igmp" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>IGMP</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" >
|
|
||||||
<widget class="QRadioButton" name="rbL4Tcp" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>TCP</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" >
|
|
||||||
<widget class="QRadioButton" name="rbL4Udp" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>UDP</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2" >
|
|
||||||
<widget class="QRadioButton" name="rbL4Other" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Other</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -404,8 +533,8 @@ QLineEdit:enabled[inputMask = "HH HH HH HH HH HH; "] { background-color: #ccccff
|
|||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
<width>182</width>
|
<width>20</width>
|
||||||
<height>16</height>
|
<height>40</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
@ -413,126 +542,78 @@ QLineEdit:enabled[inputMask = "HH HH HH HH HH HH; "] { background-color: #ccccff
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="title" >
|
<item>
|
||||||
<string>Advanced Protocol Selection</string>
|
<widget class="QLabel" name="label_2" >
|
||||||
</property>
|
<property name="text" >
|
||||||
<property name="checkable" >
|
<string>Selected Protocols</string>
|
||||||
<bool>true</bool>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<property name="checked" >
|
</item>
|
||||||
<bool>false</bool>
|
<item>
|
||||||
</property>
|
<layout class="QHBoxLayout" >
|
||||||
<layout class="QHBoxLayout" >
|
<item>
|
||||||
<item>
|
<widget class="QToolButton" name="tbUp" >
|
||||||
<layout class="QHBoxLayout" >
|
<property name="enabled" >
|
||||||
<item>
|
<bool>false</bool>
|
||||||
<layout class="QVBoxLayout" >
|
</property>
|
||||||
<item>
|
<property name="text" >
|
||||||
<widget class="QLabel" name="label" >
|
<string>^</string>
|
||||||
<property name="text" >
|
</property>
|
||||||
<string>Available Protocols</string>
|
<property name="icon" >
|
||||||
</property>
|
<iconset resource="ostinato.qrc" >:/icons/arrow_up.png</iconset>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
<item>
|
</item>
|
||||||
<widget class="QListView" name="lvAllProtocols" />
|
<item>
|
||||||
</item>
|
<widget class="QToolButton" name="tbDown" >
|
||||||
</layout>
|
<property name="enabled" >
|
||||||
</item>
|
<bool>false</bool>
|
||||||
<item>
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<property name="text" >
|
||||||
<item>
|
<string>v</string>
|
||||||
<spacer>
|
</property>
|
||||||
<property name="orientation" >
|
<property name="icon" >
|
||||||
<enum>Qt::Vertical</enum>
|
<iconset resource="ostinato.qrc" >:/icons/arrow_down.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
</widget>
|
||||||
<size>
|
</item>
|
||||||
<width>20</width>
|
<item>
|
||||||
<height>40</height>
|
<widget class="QToolButton" name="tbDelete" >
|
||||||
</size>
|
<property name="enabled" >
|
||||||
</property>
|
<bool>false</bool>
|
||||||
</spacer>
|
</property>
|
||||||
</item>
|
<property name="text" >
|
||||||
<item>
|
<string>-</string>
|
||||||
<widget class="QToolButton" name="toolButton" >
|
</property>
|
||||||
<property name="text" >
|
<property name="icon" >
|
||||||
<string>></string>
|
<iconset resource="ostinato.qrc" >:/icons/delete.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButton_2" >
|
<spacer>
|
||||||
<property name="text" >
|
<property name="orientation" >
|
||||||
<string><</string>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="sizeHint" >
|
||||||
</item>
|
<size>
|
||||||
<item>
|
<width>40</width>
|
||||||
<spacer>
|
<height>20</height>
|
||||||
<property name="orientation" >
|
</size>
|
||||||
<enum>Qt::Vertical</enum>
|
</property>
|
||||||
</property>
|
</spacer>
|
||||||
<property name="sizeHint" >
|
</item>
|
||||||
<size>
|
</layout>
|
||||||
<width>20</width>
|
</item>
|
||||||
<height>40</height>
|
<item>
|
||||||
</size>
|
<widget class="QListView" name="lvSelectedProtocols" >
|
||||||
</property>
|
<property name="selectionBehavior" >
|
||||||
</spacer>
|
<enum>QAbstractItemView::SelectRows</enum>
|
||||||
</item>
|
</property>
|
||||||
</layout>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
</layout>
|
||||||
<layout class="QVBoxLayout" >
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Selected Protocols</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QListView" name="lvSelectedProtocols" />
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tab_4" >
|
|
||||||
<attribute name="title" >
|
|
||||||
<string>L2</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" />
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tab_8" >
|
|
||||||
<attribute name="title" >
|
|
||||||
<string>L3</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tab_6" >
|
|
||||||
<attribute name="title" >
|
|
||||||
<string>L4</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QHBoxLayout" />
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tab" >
|
|
||||||
<attribute name="title" >
|
|
||||||
<string>Protocol Data</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<item>
|
|
||||||
<widget class="QToolBox" name="tbProtocolData" >
|
|
||||||
<property name="currentIndex" >
|
|
||||||
<number>-1</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@ -540,6 +621,20 @@ QLineEdit:enabled[inputMask = "HH HH HH HH HH HH; "] { background-color: #ccccff
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_2" >
|
||||||
|
<attribute name="title" >
|
||||||
|
<string>Protocol Data</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QHBoxLayout" >
|
||||||
|
<item>
|
||||||
|
<widget class="QToolBox" name="tbProtocolData" >
|
||||||
|
<property name="currentIndex" >
|
||||||
|
<number>-1</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
<widget class="QWidget" name="streamControlTab" >
|
<widget class="QWidget" name="streamControlTab" >
|
||||||
<attribute name="title" >
|
<attribute name="title" >
|
||||||
<string>Stream Control</string>
|
<string>Stream Control</string>
|
||||||
@ -925,7 +1020,7 @@ QLineEdit:enabled[inputMask = "HH HH HH HH HH HH; "] { background-color: #ccccff
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="0" >
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pbPrev" >
|
<widget class="QPushButton" name="pbPrev" >
|
||||||
@ -989,7 +1084,55 @@ QLineEdit:enabled[inputMask = "HH HH HH HH HH HH; "] { background-color: #ccccff
|
|||||||
<tabstop>lePktLen</tabstop>
|
<tabstop>lePktLen</tabstop>
|
||||||
<tabstop>lePktLenMin</tabstop>
|
<tabstop>lePktLenMin</tabstop>
|
||||||
<tabstop>lePktLenMax</tabstop>
|
<tabstop>lePktLenMax</tabstop>
|
||||||
<tabstop>twProto</tabstop>
|
<tabstop>rbFtNone</tabstop>
|
||||||
|
<tabstop>rbFtEthernet2</tabstop>
|
||||||
|
<tabstop>rbFt802Dot3Raw</tabstop>
|
||||||
|
<tabstop>rbFt802Dot3Llc</tabstop>
|
||||||
|
<tabstop>rbFtLlcSnap</tabstop>
|
||||||
|
<tabstop>rbFtOther</tabstop>
|
||||||
|
<tabstop>rbVlanNone</tabstop>
|
||||||
|
<tabstop>rbVlanSingle</tabstop>
|
||||||
|
<tabstop>rbVlanDouble</tabstop>
|
||||||
|
<tabstop>rbL3None</tabstop>
|
||||||
|
<tabstop>rbL3Ipv4</tabstop>
|
||||||
|
<tabstop>rbL3Ipv6</tabstop>
|
||||||
|
<tabstop>rbL3Arp</tabstop>
|
||||||
|
<tabstop>rbL3Other</tabstop>
|
||||||
|
<tabstop>rbL4None</tabstop>
|
||||||
|
<tabstop>rbL4Icmp</tabstop>
|
||||||
|
<tabstop>rbL4Igmp</tabstop>
|
||||||
|
<tabstop>rbL4Tcp</tabstop>
|
||||||
|
<tabstop>rbL4Udp</tabstop>
|
||||||
|
<tabstop>rbL4Other</tabstop>
|
||||||
|
<tabstop>rbPayloadPattern</tabstop>
|
||||||
|
<tabstop>rbPayloadOther</tabstop>
|
||||||
|
<tabstop>pbPrev</tabstop>
|
||||||
|
<tabstop>pbNext</tabstop>
|
||||||
|
<tabstop>pbOk</tabstop>
|
||||||
|
<tabstop>pbCancel</tabstop>
|
||||||
|
<tabstop>rbSendBursts</tabstop>
|
||||||
|
<tabstop>leNumPackets</tabstop>
|
||||||
|
<tabstop>leNumBursts</tabstop>
|
||||||
|
<tabstop>lePacketsPerBurst</tabstop>
|
||||||
|
<tabstop>rbActionStop</tabstop>
|
||||||
|
<tabstop>rbActionGotoNext</tabstop>
|
||||||
|
<tabstop>rbActionGotoStream</tabstop>
|
||||||
|
<tabstop>leStreamId</tabstop>
|
||||||
|
<tabstop>rbModeFixed</tabstop>
|
||||||
|
<tabstop>rbModeContinuous</tabstop>
|
||||||
|
<tabstop>lePacketsPerSec</tabstop>
|
||||||
|
<tabstop>leBurstsPerSec</tabstop>
|
||||||
|
<tabstop>leGapIsg</tabstop>
|
||||||
|
<tabstop>leGapIpg</tabstop>
|
||||||
|
<tabstop>leGapIbg</tabstop>
|
||||||
|
<tabstop>tvPacketTree</tabstop>
|
||||||
|
<tabstop>tbDown</tabstop>
|
||||||
|
<tabstop>tbDelete</tabstop>
|
||||||
|
<tabstop>lvSelectedProtocols</tabstop>
|
||||||
|
<tabstop>rbSendPackets</tabstop>
|
||||||
|
<tabstop>tbUp</tabstop>
|
||||||
|
<tabstop>lvAllProtocols</tabstop>
|
||||||
|
<tabstop>tbAdd</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="ostinato.qrc" />
|
<include location="ostinato.qrc" />
|
||||||
|
133
common/comboprotocol.h
Normal file
133
common/comboprotocol.h
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
#ifndef _COMBO_PROTOCOL_H
|
||||||
|
#define _COMBO_PROTOCOL_H
|
||||||
|
|
||||||
|
#include "abstractprotocol.h"
|
||||||
|
|
||||||
|
template <class ProtoA, class ProtoB>
|
||||||
|
class ComboProtocol : public AbstractProtocol
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
ProtoA *protoA;
|
||||||
|
ProtoB *protoB;
|
||||||
|
QWidget *configForm;
|
||||||
|
|
||||||
|
public:
|
||||||
|
ComboProtocol(StreamBase *stream)
|
||||||
|
{
|
||||||
|
protoA = new ProtoA(stream);
|
||||||
|
protoB = new ProtoB(stream);
|
||||||
|
configForm = NULL;
|
||||||
|
}
|
||||||
|
virtual ~ComboProtocol()
|
||||||
|
{
|
||||||
|
delete protoA;
|
||||||
|
delete protoB;
|
||||||
|
delete configForm;
|
||||||
|
}
|
||||||
|
|
||||||
|
static ComboProtocol* createInstance(StreamBase *stream)
|
||||||
|
{
|
||||||
|
return new ComboProtocol<ProtoA, ProtoB>(stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual quint32 protocolNumber() const
|
||||||
|
{
|
||||||
|
return 0; //FIXME
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void protoDataCopyInto(OstProto::Protocol &protocol) const
|
||||||
|
{
|
||||||
|
// FIXME
|
||||||
|
}
|
||||||
|
virtual void protoDataCopyFrom(const OstProto::Protocol &protocol)
|
||||||
|
{
|
||||||
|
// FIXME
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual QString name() const
|
||||||
|
{
|
||||||
|
return protoA->name() + "/" + protoB->name();
|
||||||
|
}
|
||||||
|
virtual QString shortName() const
|
||||||
|
{
|
||||||
|
return protoA->shortName() + "/" + protoB->shortName();
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual quint32 protocolId(ProtocolIdType type) const
|
||||||
|
{
|
||||||
|
return protoA->protocolId(type);
|
||||||
|
}
|
||||||
|
//quint32 payloadProtocolId(ProtocolIdType type) const;
|
||||||
|
|
||||||
|
virtual int fieldCount() const
|
||||||
|
{
|
||||||
|
return protoA->fieldCount() + protoB->fieldCount();
|
||||||
|
}
|
||||||
|
//virtual int metaFieldCount() const;
|
||||||
|
//int frameFieldCount() const;
|
||||||
|
|
||||||
|
virtual FieldFlags fieldFlags(int index) const
|
||||||
|
{
|
||||||
|
if (index < protoA->fieldCount())
|
||||||
|
return protoA->fieldFlags(index);
|
||||||
|
else
|
||||||
|
return protoB->fieldFlags(index);
|
||||||
|
}
|
||||||
|
virtual QVariant fieldData(int index, FieldAttrib attrib,
|
||||||
|
int streamIndex = 0) const
|
||||||
|
{
|
||||||
|
if (index < protoA->fieldCount())
|
||||||
|
return protoA->fieldData(index);
|
||||||
|
else
|
||||||
|
return protoB->fieldData(index);
|
||||||
|
}
|
||||||
|
virtual bool setFieldData(int index, const QVariant &value,
|
||||||
|
FieldAttrib attrib = FieldValue)
|
||||||
|
{
|
||||||
|
if (index < protoA->fieldCount())
|
||||||
|
return protoA->fieldData(index);
|
||||||
|
else
|
||||||
|
return protoB->fieldData(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
QByteArray protocolFrameValue(int streamIndex = 0,
|
||||||
|
bool forCksum = false) const;
|
||||||
|
virtual int protocolFrameSize() const;
|
||||||
|
int protocolFrameOffset() const;
|
||||||
|
int protocolFramePayloadSize() const;
|
||||||
|
|
||||||
|
virtual quint32 protocolFrameCksum(int streamIndex = 0,
|
||||||
|
CksumType cksumType = CksumIp) const;
|
||||||
|
quint32 protocolFrameHeaderCksum(int streamIndex = 0,
|
||||||
|
CksumType cksumType = CksumIp) const;
|
||||||
|
quint32 protocolFramePayloadCksum(int streamIndex = 0,
|
||||||
|
CksumType cksumType = CksumIp) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
virtual QWidget* configWidget()
|
||||||
|
{
|
||||||
|
if (configForm == NULL)
|
||||||
|
{
|
||||||
|
QVBoxLayout *layout = new VBoxLayout;
|
||||||
|
|
||||||
|
configForm = new QWidget;
|
||||||
|
layout->addWidget(protoA->configWidget());
|
||||||
|
layout->addWidget(protoB->configWidget());
|
||||||
|
configForm->setLayout(layout);
|
||||||
|
}
|
||||||
|
return configForm;
|
||||||
|
}
|
||||||
|
virtual void loadConfigWidget()
|
||||||
|
{
|
||||||
|
protoA->loadConfigWidget();
|
||||||
|
protoB->loadConfigWidget();
|
||||||
|
}
|
||||||
|
virtual void storeConfigWidget()
|
||||||
|
{
|
||||||
|
protoA->storeConfigWidget();
|
||||||
|
protoB->storeConfigWidget();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -118,7 +118,10 @@ bool Dot3Protocol::setFieldData(int index, const QVariant &value,
|
|||||||
QWidget* Dot3Protocol::configWidget()
|
QWidget* Dot3Protocol::configWidget()
|
||||||
{
|
{
|
||||||
if (configForm == NULL)
|
if (configForm == NULL)
|
||||||
|
{
|
||||||
configForm = new Dot3ConfigForm;
|
configForm = new Dot3ConfigForm;
|
||||||
|
loadConfigWidget();
|
||||||
|
}
|
||||||
return configForm;
|
return configForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,10 @@ bool Eth2Protocol::setFieldData(int index, const QVariant &value,
|
|||||||
QWidget* Eth2Protocol::configWidget()
|
QWidget* Eth2Protocol::configWidget()
|
||||||
{
|
{
|
||||||
if (configForm == NULL)
|
if (configForm == NULL)
|
||||||
|
{
|
||||||
configForm = new Eth2ConfigForm;
|
configForm = new Eth2ConfigForm;
|
||||||
|
loadConfigWidget();
|
||||||
|
}
|
||||||
return configForm;
|
return configForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -604,7 +604,10 @@ quint32 Ip4Protocol::protocolFrameCksum(int streamIndex,
|
|||||||
QWidget* Ip4Protocol::configWidget()
|
QWidget* Ip4Protocol::configWidget()
|
||||||
{
|
{
|
||||||
if (configForm == NULL)
|
if (configForm == NULL)
|
||||||
|
{
|
||||||
configForm = new Ip4ConfigForm;
|
configForm = new Ip4ConfigForm;
|
||||||
|
loadConfigWidget();
|
||||||
|
}
|
||||||
return configForm;
|
return configForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,13 +31,13 @@ message Ip4 {
|
|||||||
optional fixed32 src_ip = 14;
|
optional fixed32 src_ip = 14;
|
||||||
optional IpAddrMode src_ip_mode = 15 [default = e_im_fixed];
|
optional IpAddrMode src_ip_mode = 15 [default = e_im_fixed];
|
||||||
optional uint32 src_ip_count = 16 [default = 16];
|
optional uint32 src_ip_count = 16 [default = 16];
|
||||||
optional fixed32 src_ip_mask = 17 [default = 0xFFFFFFFF];
|
optional fixed32 src_ip_mask = 17 [default = 0xFFFFFF00];
|
||||||
|
|
||||||
// Destination IP
|
// Destination IP
|
||||||
optional fixed32 dst_ip = 18;
|
optional fixed32 dst_ip = 18;
|
||||||
optional IpAddrMode dst_ip_mode = 19 [default = e_im_fixed];
|
optional IpAddrMode dst_ip_mode = 19 [default = e_im_fixed];
|
||||||
optional uint32 dst_ip_count = 20 [default = 16];
|
optional uint32 dst_ip_count = 20 [default = 16];
|
||||||
optional fixed32 dst_ip_mask = 21 [default = 0xFFFFFFFF];
|
optional fixed32 dst_ip_mask = 21 [default = 0xFFFFFF00];
|
||||||
|
|
||||||
// TODO: Options
|
// TODO: Options
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,10 @@ bool LlcProtocol::setFieldData(int index, const QVariant &value,
|
|||||||
QWidget* LlcProtocol::configWidget()
|
QWidget* LlcProtocol::configWidget()
|
||||||
{
|
{
|
||||||
if (configForm == NULL)
|
if (configForm == NULL)
|
||||||
|
{
|
||||||
configForm = new LlcConfigForm;
|
configForm = new LlcConfigForm;
|
||||||
|
loadConfigWidget();
|
||||||
|
}
|
||||||
return configForm;
|
return configForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,7 +243,10 @@ bool MacProtocol::setFieldData(int index, const QVariant &value,
|
|||||||
QWidget* MacProtocol::configWidget()
|
QWidget* MacProtocol::configWidget()
|
||||||
{
|
{
|
||||||
if (configForm == NULL)
|
if (configForm == NULL)
|
||||||
|
{
|
||||||
configForm = new MacConfigForm;
|
configForm = new MacConfigForm;
|
||||||
|
loadConfigWidget();
|
||||||
|
}
|
||||||
return configForm;
|
return configForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ message Mac {
|
|||||||
optional uint32 dst_mac_step = 4 [default = 1];
|
optional uint32 dst_mac_step = 4 [default = 1];
|
||||||
|
|
||||||
// Src Mac
|
// Src Mac
|
||||||
optional uint32 src_mac = 5;
|
optional uint64 src_mac = 5;
|
||||||
optional MacAddrMode src_mac_mode = 6 [default = e_mm_fixed];
|
optional MacAddrMode src_mac_mode = 6 [default = e_mm_fixed];
|
||||||
optional uint32 src_mac_count = 7 [default = 16];
|
optional uint32 src_mac_count = 7 [default = 16];
|
||||||
optional uint32 src_mac_step = 8 [default = 1];
|
optional uint32 src_mac_step = 8 [default = 1];
|
||||||
|
335
common/mac.ui
335
common/mac.ui
@ -5,193 +5,170 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>512</width>
|
<width>391</width>
|
||||||
<height>104</height>
|
<height>116</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item>
|
<item row="0" column="1" >
|
||||||
<widget class="QGroupBox" name="groupBox" >
|
<widget class="QLabel" name="label_6" >
|
||||||
<property name="title" >
|
<property name="text" >
|
||||||
<string>MAC</string>
|
<string>Address</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
|
||||||
<item row="0" column="0" >
|
|
||||||
<widget class="QLabel" name="label" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Destination</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" >
|
|
||||||
<widget class="QLineEdit" name="leDstMac" >
|
|
||||||
<property name="minimumSize" >
|
|
||||||
<size>
|
|
||||||
<width>120</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="inputMask" >
|
|
||||||
<string>>HH HH HH HH HH HH; </string>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string> </string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2" >
|
|
||||||
<widget class="QLabel" name="label_2" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Mode</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3" >
|
|
||||||
<widget class="QComboBox" name="cmbDstMacMode" >
|
|
||||||
<item>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Fixed</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Increment</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Decrement</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="4" >
|
|
||||||
<widget class="QLabel" name="label_4" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Count</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="5" >
|
|
||||||
<widget class="QLineEdit" name="leDstMacCount" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="cursorPosition" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="6" >
|
|
||||||
<widget class="QLabel" name="label_5" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Step</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="7" >
|
|
||||||
<widget class="QLineEdit" name="leDstMacStep" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="cursorPosition" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" >
|
|
||||||
<widget class="QLabel" name="label_3" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Source </string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" >
|
|
||||||
<widget class="QLineEdit" name="leSrcMac" >
|
|
||||||
<property name="inputMask" >
|
|
||||||
<string>>HH HH HH HH HH HH; </string>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string> </string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2" >
|
|
||||||
<widget class="QLabel" name="label_8" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Mode</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3" >
|
|
||||||
<widget class="QComboBox" name="cmbSrcMacMode" >
|
|
||||||
<item>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Fixed</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Increment</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Decrement</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="4" >
|
|
||||||
<widget class="QLabel" name="label_7" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Count</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="5" >
|
|
||||||
<widget class="QLineEdit" name="leSrcMacCount" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="6" >
|
|
||||||
<widget class="QLabel" name="label_6" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Step</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="7" >
|
|
||||||
<widget class="QLineEdit" name="leSrcMacStep" >
|
|
||||||
<property name="enabled" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="cursorPosition" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="2" >
|
||||||
|
<widget class="QLabel" name="label_2" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Mode</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3" >
|
||||||
|
<widget class="QLabel" name="label_4" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Count</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="4" >
|
||||||
|
<widget class="QLabel" name="label_5" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Step</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<widget class="QLabel" name="label" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Destination</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" >
|
||||||
|
<widget class="QLineEdit" name="leDstMac" >
|
||||||
|
<property name="minimumSize" >
|
||||||
|
<size>
|
||||||
|
<width>120</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="inputMask" >
|
||||||
|
<string>>HH HH HH HH HH HH; </string>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string> </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2" >
|
||||||
|
<widget class="QComboBox" name="cmbDstMacMode" >
|
||||||
|
<item>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Fixed</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Increment</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Decrement</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3" >
|
||||||
|
<widget class="QLineEdit" name="leDstMacCount" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="cursorPosition" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4" >
|
||||||
|
<widget class="QLineEdit" name="leDstMacStep" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="cursorPosition" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" >
|
||||||
|
<widget class="QLabel" name="label_3" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Source</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" >
|
||||||
|
<widget class="QLineEdit" name="leSrcMac" >
|
||||||
|
<property name="inputMask" >
|
||||||
|
<string>>HH HH HH HH HH HH; </string>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string> </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2" >
|
||||||
|
<widget class="QComboBox" name="cmbSrcMacMode" >
|
||||||
|
<item>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Fixed</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Increment</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Decrement</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3" >
|
||||||
|
<widget class="QLineEdit" name="leSrcMacCount" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="4" >
|
||||||
|
<widget class="QLineEdit" name="leSrcMacStep" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="cursorPosition" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" >
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
@ -28,6 +28,7 @@ PROTOS += \
|
|||||||
udp.proto
|
udp.proto
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
abstractprotocol.h \
|
abstractprotocol.h \
|
||||||
|
comboprotocol.h \
|
||||||
protocolmanager.h \
|
protocolmanager.h \
|
||||||
protocollist.h \
|
protocollist.h \
|
||||||
protocollistiterator.h \
|
protocollistiterator.h \
|
||||||
|
@ -126,6 +126,11 @@ QVariant PayloadProtocol::fieldData(int index, FieldAttrib attrib,
|
|||||||
|
|
||||||
dataLen = mpStream->frameLen() - protocolFrameOffset();
|
dataLen = mpStream->frameLen() - protocolFrameOffset();
|
||||||
dataLen -= SZ_FCS;
|
dataLen -= SZ_FCS;
|
||||||
|
|
||||||
|
// FIXME: Hack! Bad! Bad! Very Bad!!!
|
||||||
|
if (dataLen <= 0)
|
||||||
|
dataLen = 1;
|
||||||
|
|
||||||
fv.resize(dataLen+4);
|
fv.resize(dataLen+4);
|
||||||
switch(data.pattern_mode())
|
switch(data.pattern_mode())
|
||||||
{
|
{
|
||||||
@ -180,7 +185,10 @@ bool PayloadProtocol::setFieldData(int index, const QVariant &value,
|
|||||||
QWidget* PayloadProtocol::configWidget()
|
QWidget* PayloadProtocol::configWidget()
|
||||||
{
|
{
|
||||||
if (configForm == NULL)
|
if (configForm == NULL)
|
||||||
|
{
|
||||||
configForm = new PayloadConfigForm;
|
configForm = new PayloadConfigForm;
|
||||||
|
loadConfigWidget();
|
||||||
|
}
|
||||||
return configForm;
|
return configForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +155,10 @@ bool SampleProtocol::setFieldData(int index, const QVariant &value,
|
|||||||
QWidget* SampleProtocol::configWidget()
|
QWidget* SampleProtocol::configWidget()
|
||||||
{
|
{
|
||||||
if (configForm == NULL)
|
if (configForm == NULL)
|
||||||
configFrom = new SampleConfigForm;
|
{
|
||||||
|
configForm = new SampleConfigForm;
|
||||||
|
loadConfigWidget();
|
||||||
|
}
|
||||||
|
|
||||||
return configForm;
|
return configForm;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,10 @@ bool SnapProtocol::setFieldData(int index, const QVariant &value,
|
|||||||
QWidget* SnapProtocol::configWidget()
|
QWidget* SnapProtocol::configWidget()
|
||||||
{
|
{
|
||||||
if (configForm == NULL)
|
if (configForm == NULL)
|
||||||
|
{
|
||||||
configForm = new SnapConfigForm;
|
configForm = new SnapConfigForm;
|
||||||
|
loadConfigWidget();
|
||||||
|
}
|
||||||
return configForm;
|
return configForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,7 +384,10 @@ bool TcpProtocol::setFieldData(int index, const QVariant &value,
|
|||||||
QWidget* TcpProtocol::configWidget()
|
QWidget* TcpProtocol::configWidget()
|
||||||
{
|
{
|
||||||
if (configForm == NULL)
|
if (configForm == NULL)
|
||||||
|
{
|
||||||
configForm = new TcpConfigForm;
|
configForm = new TcpConfigForm;
|
||||||
|
loadConfigWidget();
|
||||||
|
}
|
||||||
return configForm;
|
return configForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,7 +261,10 @@ bool UdpProtocol::setFieldData(int index, const QVariant &value,
|
|||||||
QWidget* UdpProtocol::configWidget()
|
QWidget* UdpProtocol::configWidget()
|
||||||
{
|
{
|
||||||
if (configForm == NULL)
|
if (configForm == NULL)
|
||||||
|
{
|
||||||
configForm = new UdpConfigForm;
|
configForm = new UdpConfigForm;
|
||||||
|
loadConfigWidget();
|
||||||
|
}
|
||||||
return configForm;
|
return configForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,7 +203,10 @@ bool VlanProtocol::setFieldData(int index, const QVariant &value,
|
|||||||
QWidget* VlanProtocol::configWidget()
|
QWidget* VlanProtocol::configWidget()
|
||||||
{
|
{
|
||||||
if (configForm == NULL)
|
if (configForm == NULL)
|
||||||
|
{
|
||||||
configForm = new VlanConfigForm;
|
configForm = new VlanConfigForm;
|
||||||
|
loadConfigWidget();
|
||||||
|
}
|
||||||
return configForm;
|
return configForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,6 +214,7 @@ void VlanProtocol::loadConfigWidget()
|
|||||||
{
|
{
|
||||||
configWidget();
|
configWidget();
|
||||||
|
|
||||||
|
configForm->cbTpidOverride->setChecked(data.is_override_tpid());
|
||||||
configForm->leTpid->setText(uintToHexStr(fieldData(vlan_tpid, FieldValue).toUInt(), 2));
|
configForm->leTpid->setText(uintToHexStr(fieldData(vlan_tpid, FieldValue).toUInt(), 2));
|
||||||
configForm->cmbPrio->setCurrentIndex(fieldData(vlan_prio, FieldValue).toUInt());
|
configForm->cmbPrio->setCurrentIndex(fieldData(vlan_prio, FieldValue).toUInt());
|
||||||
configForm->cmbCfiDei->setCurrentIndex(fieldData(vlan_cfiDei, FieldValue).toUInt());
|
configForm->cmbCfiDei->setCurrentIndex(fieldData(vlan_cfiDei, FieldValue).toUInt());
|
||||||
|
Loading…
Reference in New Issue
Block a user