Following protocols now allow overriding of their type/length/protocolId fields - Ethernet II, 802.3, LLC, SNAP, IPv4. Since new fields have been added to the .proto files, the Ostinato native file format revision number has been bumped
Fixes Issue 20
This commit is contained in:
parent
8d85fd30de
commit
f140717f81
@ -17,17 +17,18 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <qendian.h>
|
|
||||||
#include <QHostAddress>
|
|
||||||
|
|
||||||
#include "dot3.h"
|
#include "dot3.h"
|
||||||
#include "streambase.h"
|
#include "streambase.h"
|
||||||
|
|
||||||
|
#include <QHostAddress>
|
||||||
|
#include <QIntValidator>
|
||||||
|
#include <qendian.h>
|
||||||
|
|
||||||
Dot3ConfigForm::Dot3ConfigForm(QWidget *parent)
|
Dot3ConfigForm::Dot3ConfigForm(QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
leLength->setValidator(new QIntValidator(0, 16384, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
Dot3Protocol::Dot3Protocol(StreamBase *stream, AbstractProtocol *parent)
|
Dot3Protocol::Dot3Protocol(StreamBase *stream, AbstractProtocol *parent)
|
||||||
@ -80,6 +81,29 @@ int Dot3Protocol::fieldCount() const
|
|||||||
return dot3_fieldCount;
|
return dot3_fieldCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AbstractProtocol::FieldFlags Dot3Protocol::fieldFlags(int index) const
|
||||||
|
{
|
||||||
|
AbstractProtocol::FieldFlags flags;
|
||||||
|
|
||||||
|
flags = AbstractProtocol::fieldFlags(index);
|
||||||
|
|
||||||
|
switch (index)
|
||||||
|
{
|
||||||
|
case dot3_length:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case dot3_is_override_length:
|
||||||
|
flags &= ~FrameField;
|
||||||
|
flags |= MetaField;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
|
||||||
QVariant Dot3Protocol::fieldData(int index, FieldAttrib attrib,
|
QVariant Dot3Protocol::fieldData(int index, FieldAttrib attrib,
|
||||||
int streamIndex) const
|
int streamIndex) const
|
||||||
{
|
{
|
||||||
@ -92,24 +116,23 @@ QVariant Dot3Protocol::fieldData(int index, FieldAttrib attrib,
|
|||||||
return QString("Length");
|
return QString("Length");
|
||||||
case FieldValue:
|
case FieldValue:
|
||||||
{
|
{
|
||||||
quint16 len;
|
quint16 len = data.is_override_length() ?
|
||||||
|
data.length() : protocolFramePayloadSize(streamIndex);
|
||||||
len = protocolFramePayloadSize(streamIndex);
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
case FieldTextValue:
|
case FieldTextValue:
|
||||||
{
|
{
|
||||||
quint16 len;
|
quint16 len = data.is_override_length() ?
|
||||||
|
data.length() : protocolFramePayloadSize(streamIndex);
|
||||||
|
|
||||||
len = protocolFramePayloadSize(streamIndex);
|
|
||||||
return QString("%1").arg(len);
|
return QString("%1").arg(len);
|
||||||
}
|
}
|
||||||
case FieldFrameValue:
|
case FieldFrameValue:
|
||||||
{
|
{
|
||||||
quint16 len;
|
quint16 len = data.is_override_length() ?
|
||||||
|
data.length() : protocolFramePayloadSize(streamIndex);
|
||||||
QByteArray fv;
|
QByteArray fv;
|
||||||
|
|
||||||
len = protocolFramePayloadSize(streamIndex);
|
|
||||||
fv.resize(2);
|
fv.resize(2);
|
||||||
qToBigEndian(len, (uchar*) fv.data());
|
qToBigEndian(len, (uchar*) fv.data());
|
||||||
return fv;
|
return fv;
|
||||||
@ -121,17 +144,58 @@ QVariant Dot3Protocol::fieldData(int index, FieldAttrib attrib,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Meta fields
|
||||||
|
case dot3_is_override_length:
|
||||||
|
{
|
||||||
|
switch(attrib)
|
||||||
|
{
|
||||||
|
case FieldValue:
|
||||||
|
return data.is_override_length();
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
qFatal("%s: unimplemented case %d in switch", __PRETTY_FUNCTION__,
|
||||||
|
index);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return AbstractProtocol::fieldData(index, attrib, streamIndex);
|
return AbstractProtocol::fieldData(index, attrib, streamIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Dot3Protocol::setFieldData(int /*index*/, const QVariant &/*value*/,
|
bool Dot3Protocol::setFieldData(int index, const QVariant &value,
|
||||||
FieldAttrib /*attrib*/)
|
FieldAttrib attrib)
|
||||||
{
|
{
|
||||||
return false;
|
bool isOk = false;
|
||||||
|
|
||||||
|
if (attrib != FieldValue)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
switch (index)
|
||||||
|
{
|
||||||
|
case dot3_length:
|
||||||
|
{
|
||||||
|
uint len = value.toUInt(&isOk);
|
||||||
|
if (isOk)
|
||||||
|
data.set_length(len);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case dot3_is_override_length:
|
||||||
|
{
|
||||||
|
bool ovr = value.toBool();
|
||||||
|
data.set_is_override_length(ovr);
|
||||||
|
isOk = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
qFatal("%s: unimplemented case %d in switch", __PRETTY_FUNCTION__,
|
||||||
|
index);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return isOk;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Dot3Protocol::isProtocolFrameValueVariable() const
|
bool Dot3Protocol::isProtocolFrameValueVariable() const
|
||||||
@ -153,16 +217,18 @@ void Dot3Protocol::loadConfigWidget()
|
|||||||
{
|
{
|
||||||
configWidget();
|
configWidget();
|
||||||
|
|
||||||
|
configForm->cbOverrideLength->setChecked(
|
||||||
|
fieldData(dot3_is_override_length, FieldValue).toBool());
|
||||||
configForm->leLength->setText(
|
configForm->leLength->setText(
|
||||||
fieldData(dot3_length, FieldValue).toString());
|
fieldData(dot3_length, FieldValue).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dot3Protocol::storeConfigWidget()
|
void Dot3Protocol::storeConfigWidget()
|
||||||
{
|
{
|
||||||
bool isOk;
|
|
||||||
|
|
||||||
configWidget();
|
configWidget();
|
||||||
|
|
||||||
data.set_length(configForm->leLength->text().toULong(&isOk));
|
setFieldData(dot3_is_override_length,
|
||||||
|
configForm->cbOverrideLength->isChecked());
|
||||||
|
setFieldData(dot3_length,configForm->leLength->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,9 @@ private:
|
|||||||
{
|
{
|
||||||
dot3_length,
|
dot3_length,
|
||||||
|
|
||||||
|
// Meta-fields
|
||||||
|
dot3_is_override_length,
|
||||||
|
|
||||||
dot3_fieldCount
|
dot3_fieldCount
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -60,6 +63,7 @@ public:
|
|||||||
|
|
||||||
virtual int fieldCount() const;
|
virtual int fieldCount() const;
|
||||||
|
|
||||||
|
virtual AbstractProtocol::FieldFlags fieldFlags(int index) const;
|
||||||
virtual QVariant fieldData(int index, FieldAttrib attrib,
|
virtual QVariant fieldData(int index, FieldAttrib attrib,
|
||||||
int streamIndex = 0) const;
|
int streamIndex = 0) const;
|
||||||
virtual bool setFieldData(int index, const QVariant &value,
|
virtual bool setFieldData(int index, const QVariant &value,
|
||||||
|
@ -23,7 +23,8 @@ package OstProto;
|
|||||||
|
|
||||||
// 802.3
|
// 802.3
|
||||||
message Dot3 {
|
message Dot3 {
|
||||||
optional uint32 length = 1;
|
optional bool is_override_length = 2;
|
||||||
|
optional uint32 length = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
extend Protocol {
|
extend Protocol {
|
||||||
|
@ -5,28 +5,25 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>131</width>
|
<width>181</width>
|
||||||
<height>72</height>
|
<height>98</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item>
|
<item row="0" column="0" >
|
||||||
<widget class="QGroupBox" name="groupBox" >
|
<widget class="QGroupBox" name="groupBox" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>802.3</string>
|
<string>802.3</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lblLength" >
|
<widget class="QCheckBox" name="cbOverrideLength" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Length</string>
|
<string>Length</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
|
||||||
<cstring>leLength</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -39,7 +36,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1" >
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -52,8 +49,38 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>cbOverrideLength</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>leLength</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>55</x>
|
||||||
|
<y>39</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>84</x>
|
||||||
|
<y>43</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -83,6 +83,29 @@ int Eth2Protocol::fieldCount() const
|
|||||||
return eth2_fieldCount;
|
return eth2_fieldCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AbstractProtocol::FieldFlags Eth2Protocol::fieldFlags(int index) const
|
||||||
|
{
|
||||||
|
AbstractProtocol::FieldFlags flags;
|
||||||
|
|
||||||
|
flags = AbstractProtocol::fieldFlags(index);
|
||||||
|
|
||||||
|
switch (index)
|
||||||
|
{
|
||||||
|
case eth2_type:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case eth2_is_override_type:
|
||||||
|
flags &= ~FrameField;
|
||||||
|
flags |= MetaField;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
|
||||||
QVariant Eth2Protocol::fieldData(int index, FieldAttrib attrib,
|
QVariant Eth2Protocol::fieldData(int index, FieldAttrib attrib,
|
||||||
int streamIndex) const
|
int streamIndex) const
|
||||||
{
|
{
|
||||||
@ -90,21 +113,27 @@ QVariant Eth2Protocol::fieldData(int index, FieldAttrib attrib,
|
|||||||
{
|
{
|
||||||
case eth2_type:
|
case eth2_type:
|
||||||
{
|
{
|
||||||
quint16 type;
|
|
||||||
switch(attrib)
|
switch(attrib)
|
||||||
{
|
{
|
||||||
case FieldName:
|
case FieldName:
|
||||||
return QString("Type");
|
return QString("Type");
|
||||||
case FieldValue:
|
case FieldValue:
|
||||||
type = payloadProtocolId(ProtocolIdEth);
|
{
|
||||||
|
quint16 type = data.is_override_type() ?
|
||||||
|
data.type() : payloadProtocolId(ProtocolIdEth);
|
||||||
return type;
|
return type;
|
||||||
|
}
|
||||||
case FieldTextValue:
|
case FieldTextValue:
|
||||||
type = payloadProtocolId(ProtocolIdEth);
|
{
|
||||||
|
quint16 type = data.is_override_type() ?
|
||||||
|
data.type() : payloadProtocolId(ProtocolIdEth);
|
||||||
return QString("0x%1").arg(type, 4, BASE_HEX, QChar('0'));
|
return QString("0x%1").arg(type, 4, BASE_HEX, QChar('0'));
|
||||||
|
}
|
||||||
case FieldFrameValue:
|
case FieldFrameValue:
|
||||||
{
|
{
|
||||||
QByteArray fv;
|
QByteArray fv;
|
||||||
type = payloadProtocolId(ProtocolIdEth);
|
quint16 type = data.is_override_type() ?
|
||||||
|
data.type() : payloadProtocolId(ProtocolIdEth);
|
||||||
fv.resize(2);
|
fv.resize(2);
|
||||||
qToBigEndian((quint16) type, (uchar*) fv.data());
|
qToBigEndian((quint16) type, (uchar*) fv.data());
|
||||||
return fv;
|
return fv;
|
||||||
@ -114,7 +143,23 @@ QVariant Eth2Protocol::fieldData(int index, FieldAttrib attrib,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Meta fields
|
||||||
|
case eth2_is_override_type:
|
||||||
|
{
|
||||||
|
switch(attrib)
|
||||||
|
{
|
||||||
|
case FieldValue:
|
||||||
|
return data.is_override_type();
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
qFatal("%s: unimplemented case %d in switch", __PRETTY_FUNCTION__,
|
||||||
|
index);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,8 +181,18 @@ bool Eth2Protocol::setFieldData(int index, const QVariant &value,
|
|||||||
uint type = value.toUInt(&isOk);
|
uint type = value.toUInt(&isOk);
|
||||||
if (isOk)
|
if (isOk)
|
||||||
data.set_type(type);
|
data.set_type(type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case eth2_is_override_type:
|
||||||
|
{
|
||||||
|
bool ovr = value.toBool();
|
||||||
|
data.set_is_override_type(ovr);
|
||||||
|
isOk = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
qFatal("%s: unimplemented case %d in switch", __PRETTY_FUNCTION__,
|
||||||
|
index);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return isOk;
|
return isOk;
|
||||||
@ -157,6 +212,8 @@ void Eth2Protocol::loadConfigWidget()
|
|||||||
{
|
{
|
||||||
configWidget();
|
configWidget();
|
||||||
|
|
||||||
|
configForm->cbOverrideType->setChecked(
|
||||||
|
fieldData(eth2_is_override_type, FieldValue).toBool());
|
||||||
configForm->leType->setText(uintToHexStr(
|
configForm->leType->setText(uintToHexStr(
|
||||||
fieldData(eth2_type, FieldValue).toUInt(), 2));
|
fieldData(eth2_type, FieldValue).toUInt(), 2));
|
||||||
}
|
}
|
||||||
@ -167,6 +224,8 @@ void Eth2Protocol::storeConfigWidget()
|
|||||||
|
|
||||||
configWidget();
|
configWidget();
|
||||||
|
|
||||||
|
setFieldData(eth2_is_override_type,
|
||||||
|
configForm->cbOverrideType->isChecked());
|
||||||
data.set_type(configForm->leType->text().remove(QChar(' ')).toULong(&isOk, 16));
|
data.set_type(configForm->leType->text().remove(QChar(' ')).toULong(&isOk, 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,8 @@ private:
|
|||||||
{
|
{
|
||||||
eth2_type = 0,
|
eth2_type = 0,
|
||||||
|
|
||||||
|
eth2_is_override_type,
|
||||||
|
|
||||||
eth2_fieldCount
|
eth2_fieldCount
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -60,8 +62,9 @@ public:
|
|||||||
|
|
||||||
virtual ProtocolIdType protocolIdType() const;
|
virtual ProtocolIdType protocolIdType() const;
|
||||||
|
|
||||||
virtual int fieldCount() const;
|
virtual int fieldCount() const;
|
||||||
|
|
||||||
|
virtual AbstractProtocol::FieldFlags fieldFlags(int index) const;
|
||||||
virtual QVariant fieldData(int index, FieldAttrib attrib,
|
virtual QVariant fieldData(int index, FieldAttrib attrib,
|
||||||
int streamIndex = 0) const;
|
int streamIndex = 0) const;
|
||||||
virtual bool setFieldData(int index, const QVariant &value,
|
virtual bool setFieldData(int index, const QVariant &value,
|
||||||
|
@ -23,7 +23,9 @@ package OstProto;
|
|||||||
|
|
||||||
// Ethernet II
|
// Ethernet II
|
||||||
message Eth2 {
|
message Eth2 {
|
||||||
optional uint32 type = 1;
|
optional bool is_override_type = 2;
|
||||||
|
|
||||||
|
optional uint32 type = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
extend Protocol {
|
extend Protocol {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>267</width>
|
<width>190</width>
|
||||||
<height>64</height>
|
<height>64</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -14,13 +14,10 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QLabel" name="lblType" >
|
<widget class="QCheckBox" name="cbOverrideType" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Ethernet Type</string>
|
<string>Ethernet Type</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
|
||||||
<cstring>leType</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" >
|
<item row="0" column="1" >
|
||||||
@ -46,7 +43,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" >
|
<item row="1" column="0" colspan="2" >
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@ -62,5 +59,22 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>cbOverrideType</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>leType</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>98</x>
|
||||||
|
<y>27</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>118</x>
|
||||||
|
<y>27</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -49,7 +49,7 @@ private:
|
|||||||
// Native file format version
|
// Native file format version
|
||||||
static const uint kFileFormatVersionMajor = 0;
|
static const uint kFileFormatVersionMajor = 0;
|
||||||
static const uint kFileFormatVersionMinor = 1;
|
static const uint kFileFormatVersionMinor = 1;
|
||||||
static const uint kFileFormatVersionRevision = 2;
|
static const uint kFileFormatVersionRevision = 3;
|
||||||
|
|
||||||
void initFileMetaData(OstProto::FileMetaData &metaData);
|
void initFileMetaData(OstProto::FileMetaData &metaData);
|
||||||
};
|
};
|
||||||
|
@ -166,6 +166,7 @@ AbstractProtocol::FieldFlags Ip4Protocol::fieldFlags(int index) const
|
|||||||
case ip4_isOverrideVer:
|
case ip4_isOverrideVer:
|
||||||
case ip4_isOverrideHdrLen:
|
case ip4_isOverrideHdrLen:
|
||||||
case ip4_isOverrideTotLen:
|
case ip4_isOverrideTotLen:
|
||||||
|
case ip4_isOverrideProto:
|
||||||
case ip4_isOverrideCksum:
|
case ip4_isOverrideCksum:
|
||||||
case ip4_srcAddrMode:
|
case ip4_srcAddrMode:
|
||||||
case ip4_srcAddrCount:
|
case ip4_srcAddrCount:
|
||||||
@ -381,17 +382,20 @@ QVariant Ip4Protocol::fieldData(int index, FieldAttrib attrib,
|
|||||||
return QString("Protocol");
|
return QString("Protocol");
|
||||||
case FieldValue:
|
case FieldValue:
|
||||||
{
|
{
|
||||||
unsigned char id = payloadProtocolId(ProtocolIdIp);
|
unsigned char id = data.is_override_proto() ?
|
||||||
|
data.proto() : payloadProtocolId(ProtocolIdIp);
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
case FieldFrameValue:
|
case FieldFrameValue:
|
||||||
{
|
{
|
||||||
unsigned char id = payloadProtocolId(ProtocolIdIp);
|
unsigned char id = data.is_override_proto() ?
|
||||||
|
data.proto() : payloadProtocolId(ProtocolIdIp);
|
||||||
return QByteArray(1, (char) id);
|
return QByteArray(1, (char) id);
|
||||||
}
|
}
|
||||||
case FieldTextValue:
|
case FieldTextValue:
|
||||||
{
|
{
|
||||||
unsigned char id = payloadProtocolId(ProtocolIdIp);
|
unsigned char id = data.is_override_proto() ?
|
||||||
|
data.proto() : payloadProtocolId(ProtocolIdIp);
|
||||||
return QString("0x%1").
|
return QString("0x%1").
|
||||||
arg(id, 2, BASE_HEX, QChar('0'));
|
arg(id, 2, BASE_HEX, QChar('0'));
|
||||||
}
|
}
|
||||||
@ -559,6 +563,7 @@ QVariant Ip4Protocol::fieldData(int index, FieldAttrib attrib,
|
|||||||
case ip4_isOverrideVer:
|
case ip4_isOverrideVer:
|
||||||
case ip4_isOverrideHdrLen:
|
case ip4_isOverrideHdrLen:
|
||||||
case ip4_isOverrideTotLen:
|
case ip4_isOverrideTotLen:
|
||||||
|
case ip4_isOverrideProto:
|
||||||
case ip4_isOverrideCksum:
|
case ip4_isOverrideCksum:
|
||||||
|
|
||||||
case ip4_srcAddrMode:
|
case ip4_srcAddrMode:
|
||||||
@ -669,6 +674,8 @@ void Ip4Protocol::loadConfigWidget()
|
|||||||
configForm->cbIpFlagsMf->setChecked((data.flags() & IP_FLAG_MF) > 0);
|
configForm->cbIpFlagsMf->setChecked((data.flags() & IP_FLAG_MF) > 0);
|
||||||
|
|
||||||
configForm->leIpTtl->setText(QString().setNum(data.ttl()));
|
configForm->leIpTtl->setText(QString().setNum(data.ttl()));
|
||||||
|
|
||||||
|
configForm->cbIpProtocolOverride->setChecked(data.is_override_proto());
|
||||||
configForm->leIpProto->setText(uintToHexStr(
|
configForm->leIpProto->setText(uintToHexStr(
|
||||||
fieldData(ip4_proto, FieldValue).toUInt(), 1));
|
fieldData(ip4_proto, FieldValue).toUInt(), 1));
|
||||||
|
|
||||||
@ -712,6 +719,8 @@ void Ip4Protocol::storeConfigWidget()
|
|||||||
data.set_flags(ff);
|
data.set_flags(ff);
|
||||||
|
|
||||||
data.set_ttl(configForm->leIpTtl->text().toULong(&isOk));
|
data.set_ttl(configForm->leIpTtl->text().toULong(&isOk));
|
||||||
|
|
||||||
|
data.set_is_override_proto(configForm->cbIpProtocolOverride->isChecked());
|
||||||
data.set_proto(configForm->leIpProto->text().remove(QChar(' ')).toULong(&isOk, 16));
|
data.set_proto(configForm->leIpProto->text().remove(QChar(' ')).toULong(&isOk, 16));
|
||||||
|
|
||||||
data.set_is_override_cksum(configForm->cbIpCksumOverride->isChecked());
|
data.set_is_override_cksum(configForm->cbIpCksumOverride->isChecked());
|
||||||
|
@ -64,6 +64,7 @@ private:
|
|||||||
ip4_isOverrideVer,
|
ip4_isOverrideVer,
|
||||||
ip4_isOverrideHdrLen,
|
ip4_isOverrideHdrLen,
|
||||||
ip4_isOverrideTotLen,
|
ip4_isOverrideTotLen,
|
||||||
|
ip4_isOverrideProto,
|
||||||
ip4_isOverrideCksum,
|
ip4_isOverrideCksum,
|
||||||
|
|
||||||
ip4_srcAddrMode,
|
ip4_srcAddrMode,
|
||||||
|
@ -33,7 +33,8 @@ message Ip4 {
|
|||||||
optional bool is_override_ver = 1;
|
optional bool is_override_ver = 1;
|
||||||
optional bool is_override_hdrlen = 2;
|
optional bool is_override_hdrlen = 2;
|
||||||
optional bool is_override_totlen = 3;
|
optional bool is_override_totlen = 3;
|
||||||
optional bool is_override_cksum = 4;
|
optional bool is_override_proto = 30;
|
||||||
|
optional bool is_override_cksum = 4;
|
||||||
|
|
||||||
optional uint32 ver_hdrlen = 5 [default = 0x45];
|
optional uint32 ver_hdrlen = 5 [default = 0x45];
|
||||||
optional uint32 tos = 6;
|
optional uint32 tos = 6;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>493</width>
|
<width>507</width>
|
||||||
<height>308</height>
|
<height>308</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -137,18 +137,14 @@ Length (x4)</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" >
|
|
||||||
<widget class="QLabel" name="label_27" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Protocol</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1" >
|
<item row="3" column="1" >
|
||||||
<widget class="QLineEdit" name="leIpProto" >
|
<widget class="QLineEdit" name="leIpProto" >
|
||||||
<property name="enabled" >
|
<property name="enabled" >
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="inputMask" >
|
||||||
|
<string>>HH; </string>
|
||||||
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
@ -171,6 +167,13 @@ Length (x4)</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="0" >
|
||||||
|
<widget class="QCheckBox" name="cbIpProtocolOverride" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Override Protocol</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="3" >
|
<item row="1" column="0" colspan="3" >
|
||||||
@ -399,6 +402,34 @@ Length (x4)</string>
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>cbIpVersionOverride</tabstop>
|
||||||
|
<tabstop>leIpVersion</tabstop>
|
||||||
|
<tabstop>cbIpHdrLenOverride</tabstop>
|
||||||
|
<tabstop>leIpHdrLen</tabstop>
|
||||||
|
<tabstop>leIpTos</tabstop>
|
||||||
|
<tabstop>cbIpLengthOverride</tabstop>
|
||||||
|
<tabstop>leIpLength</tabstop>
|
||||||
|
<tabstop>leIpId</tabstop>
|
||||||
|
<tabstop>leIpFragOfs</tabstop>
|
||||||
|
<tabstop>cbIpFlagsDf</tabstop>
|
||||||
|
<tabstop>cbIpFlagsMf</tabstop>
|
||||||
|
<tabstop>leIpTtl</tabstop>
|
||||||
|
<tabstop>cbIpProtocolOverride</tabstop>
|
||||||
|
<tabstop>leIpProto</tabstop>
|
||||||
|
<tabstop>cbIpCksumOverride</tabstop>
|
||||||
|
<tabstop>leIpCksum</tabstop>
|
||||||
|
<tabstop>leIpSrcAddr</tabstop>
|
||||||
|
<tabstop>cmbIpSrcAddrMode</tabstop>
|
||||||
|
<tabstop>leIpSrcAddrCount</tabstop>
|
||||||
|
<tabstop>leIpSrcAddrMask</tabstop>
|
||||||
|
<tabstop>leIpDstAddr</tabstop>
|
||||||
|
<tabstop>cmbIpDstAddrMode</tabstop>
|
||||||
|
<tabstop>leIpDstAddrCount</tabstop>
|
||||||
|
<tabstop>leIpDstAddrMask</tabstop>
|
||||||
|
<tabstop>leIpOptions</tabstop>
|
||||||
|
<tabstop>tbIpOptionsEdit</tabstop>
|
||||||
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
@ -424,8 +455,8 @@ Length (x4)</string>
|
|||||||
<slot>setEnabled(bool)</slot>
|
<slot>setEnabled(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel" >
|
<hint type="sourcelabel" >
|
||||||
<x>118</x>
|
<x>113</x>
|
||||||
<y>43</y>
|
<y>67</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel" >
|
<hint type="destinationlabel" >
|
||||||
<x>166</x>
|
<x>166</x>
|
||||||
@ -440,12 +471,12 @@ Length (x4)</string>
|
|||||||
<slot>setEnabled(bool)</slot>
|
<slot>setEnabled(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel" >
|
<hint type="sourcelabel" >
|
||||||
<x>79</x>
|
<x>89</x>
|
||||||
<y>97</y>
|
<y>118</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel" >
|
<hint type="destinationlabel" >
|
||||||
<x>172</x>
|
<x>236</x>
|
||||||
<y>97</y>
|
<y>119</y>
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
@ -456,8 +487,8 @@ Length (x4)</string>
|
|||||||
<slot>setEnabled(bool)</slot>
|
<slot>setEnabled(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel" >
|
<hint type="sourcelabel" >
|
||||||
<x>345</x>
|
<x>387</x>
|
||||||
<y>122</y>
|
<y>140</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel" >
|
<hint type="destinationlabel" >
|
||||||
<x>406</x>
|
<x>406</x>
|
||||||
@ -465,5 +496,21 @@ Length (x4)</string>
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>cbIpProtocolOverride</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>leIpProto</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>363</x>
|
||||||
|
<y>95</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>398</x>
|
||||||
|
<y>94</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
154
common/llc.cpp
154
common/llc.cpp
@ -83,6 +83,33 @@ int LlcProtocol::fieldCount() const
|
|||||||
return llc_fieldCount;
|
return llc_fieldCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AbstractProtocol::FieldFlags LlcProtocol::fieldFlags(int index) const
|
||||||
|
{
|
||||||
|
AbstractProtocol::FieldFlags flags;
|
||||||
|
|
||||||
|
flags = AbstractProtocol::fieldFlags(index);
|
||||||
|
|
||||||
|
switch (index)
|
||||||
|
{
|
||||||
|
case llc_dsap:
|
||||||
|
case llc_ssap:
|
||||||
|
case llc_ctl:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case llc_is_override_dsap:
|
||||||
|
case llc_is_override_ssap:
|
||||||
|
case llc_is_override_ctl:
|
||||||
|
flags &= ~FrameField;
|
||||||
|
flags |= MetaField;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
|
||||||
QVariant LlcProtocol::fieldData(int index, FieldAttrib attrib,
|
QVariant LlcProtocol::fieldData(int index, FieldAttrib attrib,
|
||||||
int streamIndex) const
|
int streamIndex) const
|
||||||
{
|
{
|
||||||
@ -90,9 +117,9 @@ QVariant LlcProtocol::fieldData(int index, FieldAttrib attrib,
|
|||||||
quint8 dsap, ssap, ctl;
|
quint8 dsap, ssap, ctl;
|
||||||
|
|
||||||
id = payloadProtocolId(ProtocolIdLlc);
|
id = payloadProtocolId(ProtocolIdLlc);
|
||||||
dsap = (id >> 16) & 0xFF;
|
dsap = data.is_override_dsap() ? data.dsap() : (id >> 16) & 0xFF;
|
||||||
ssap = (id >> 8) & 0xFF;
|
ssap = data.is_override_ssap() ? data.ssap() : (id >> 8) & 0xFF;
|
||||||
ctl = (id >> 0) & 0xFF;
|
ctl = data.is_override_ctl() ? data.ctl() : (id >> 0) & 0xFF;
|
||||||
|
|
||||||
switch (index)
|
switch (index)
|
||||||
{
|
{
|
||||||
@ -142,17 +169,109 @@ QVariant LlcProtocol::fieldData(int index, FieldAttrib attrib,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
// Meta fields
|
||||||
|
case llc_is_override_dsap:
|
||||||
|
{
|
||||||
|
switch(attrib)
|
||||||
|
{
|
||||||
|
case FieldValue:
|
||||||
|
return data.is_override_dsap();
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case llc_is_override_ssap:
|
||||||
|
{
|
||||||
|
switch(attrib)
|
||||||
|
{
|
||||||
|
case FieldValue:
|
||||||
|
return data.is_override_ssap();
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case llc_is_override_ctl:
|
||||||
|
{
|
||||||
|
switch(attrib)
|
||||||
|
{
|
||||||
|
case FieldValue:
|
||||||
|
return data.is_override_ctl();
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
qFatal("%s: unimplemented case %d in switch", __PRETTY_FUNCTION__,
|
||||||
|
index);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return AbstractProtocol::fieldData(index, attrib, streamIndex);
|
return AbstractProtocol::fieldData(index, attrib, streamIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LlcProtocol::setFieldData(int /*index*/, const QVariant &/*value*/,
|
bool LlcProtocol::setFieldData(int index, const QVariant &value,
|
||||||
FieldAttrib /*attrib*/)
|
FieldAttrib attrib)
|
||||||
{
|
{
|
||||||
return false;
|
bool isOk = false;
|
||||||
|
|
||||||
|
if (attrib != FieldValue)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
switch (index)
|
||||||
|
{
|
||||||
|
case llc_dsap:
|
||||||
|
{
|
||||||
|
uint dsap = value.toUInt(&isOk) & 0xFF;
|
||||||
|
if (isOk)
|
||||||
|
data.set_dsap(dsap);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case llc_ssap:
|
||||||
|
{
|
||||||
|
uint ssap = value.toUInt(&isOk) & 0xFF;
|
||||||
|
if (isOk)
|
||||||
|
data.set_ssap(ssap);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case llc_ctl:
|
||||||
|
{
|
||||||
|
uint ctl = value.toUInt(&isOk) & 0xFF;
|
||||||
|
if (isOk)
|
||||||
|
data.set_ctl(ctl);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case llc_is_override_dsap:
|
||||||
|
{
|
||||||
|
bool ovr = value.toBool();
|
||||||
|
data.set_is_override_dsap(ovr);
|
||||||
|
isOk = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case llc_is_override_ssap:
|
||||||
|
{
|
||||||
|
bool ovr = value.toBool();
|
||||||
|
data.set_is_override_ssap(ovr);
|
||||||
|
isOk = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case llc_is_override_ctl:
|
||||||
|
{
|
||||||
|
bool ovr = value.toBool();
|
||||||
|
data.set_is_override_ctl(ovr);
|
||||||
|
isOk = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
qFatal("%s: unimplemented case %d in switch", __PRETTY_FUNCTION__,
|
||||||
|
index);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return isOk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -173,10 +292,18 @@ void LlcProtocol::loadConfigWidget()
|
|||||||
|
|
||||||
configWidget();
|
configWidget();
|
||||||
|
|
||||||
|
configForm->cbOverrideDsap->setChecked(
|
||||||
|
fieldData(llc_is_override_dsap, FieldValue).toBool());
|
||||||
configForm->leDsap->setText(uintToHexStr(
|
configForm->leDsap->setText(uintToHexStr(
|
||||||
fieldData(llc_dsap, FieldValue).toUInt(), 1));
|
fieldData(llc_dsap, FieldValue).toUInt(), 1));
|
||||||
|
|
||||||
|
configForm->cbOverrideSsap->setChecked(
|
||||||
|
fieldData(llc_is_override_ssap, FieldValue).toBool());
|
||||||
configForm->leSsap->setText(uintToHexStr(
|
configForm->leSsap->setText(uintToHexStr(
|
||||||
fieldData(llc_ssap, FieldValue).toUInt(), 1));
|
fieldData(llc_ssap, FieldValue).toUInt(), 1));
|
||||||
|
|
||||||
|
configForm->cbOverrideControl->setChecked(
|
||||||
|
fieldData(llc_is_override_ctl, FieldValue).toBool());
|
||||||
configForm->leControl->setText(uintToHexStr(
|
configForm->leControl->setText(uintToHexStr(
|
||||||
fieldData(llc_ctl, FieldValue).toUInt(), 1));
|
fieldData(llc_ctl, FieldValue).toUInt(), 1));
|
||||||
#undef uintToHexStr
|
#undef uintToHexStr
|
||||||
@ -188,8 +315,17 @@ void LlcProtocol::storeConfigWidget()
|
|||||||
|
|
||||||
configWidget();
|
configWidget();
|
||||||
|
|
||||||
data.set_dsap(configForm->leDsap->text().toULong(&isOk, BASE_HEX));
|
setFieldData(llc_is_override_dsap,
|
||||||
data.set_ssap(configForm->leSsap->text().toULong(&isOk, BASE_HEX));
|
configForm->cbOverrideDsap->isChecked());
|
||||||
data.set_ctl(configForm->leControl->text().toULong(&isOk, BASE_HEX));
|
setFieldData(llc_dsap, configForm->leDsap->text().toUInt(&isOk, BASE_HEX));
|
||||||
|
|
||||||
|
setFieldData(llc_is_override_ssap,
|
||||||
|
configForm->cbOverrideSsap->isChecked());
|
||||||
|
setFieldData(llc_ssap, configForm->leSsap->text().toUInt(&isOk, BASE_HEX));
|
||||||
|
|
||||||
|
setFieldData(llc_is_override_ctl,
|
||||||
|
configForm->cbOverrideControl->isChecked());
|
||||||
|
setFieldData(llc_ctl,
|
||||||
|
configForm->leControl->text().toUInt(&isOk, BASE_HEX));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +46,11 @@ private:
|
|||||||
llc_ssap,
|
llc_ssap,
|
||||||
llc_ctl,
|
llc_ctl,
|
||||||
|
|
||||||
|
// Meta fields
|
||||||
|
llc_is_override_dsap,
|
||||||
|
llc_is_override_ssap,
|
||||||
|
llc_is_override_ctl,
|
||||||
|
|
||||||
llc_fieldCount
|
llc_fieldCount
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -65,8 +70,9 @@ public:
|
|||||||
|
|
||||||
virtual ProtocolIdType protocolIdType() const;
|
virtual ProtocolIdType protocolIdType() const;
|
||||||
|
|
||||||
virtual int fieldCount() const;
|
virtual int fieldCount() const;
|
||||||
|
|
||||||
|
virtual AbstractProtocol::FieldFlags fieldFlags(int index) const;
|
||||||
virtual QVariant fieldData(int index, FieldAttrib attrib,
|
virtual QVariant fieldData(int index, FieldAttrib attrib,
|
||||||
int streamIndex = 0) const;
|
int streamIndex = 0) const;
|
||||||
virtual bool setFieldData(int index, const QVariant &value,
|
virtual bool setFieldData(int index, const QVariant &value,
|
||||||
|
@ -22,9 +22,13 @@ import "protocol.proto";
|
|||||||
package OstProto;
|
package OstProto;
|
||||||
|
|
||||||
message Llc {
|
message Llc {
|
||||||
optional uint32 dsap = 1;
|
optional bool is_override_dsap = 4;
|
||||||
optional uint32 ssap = 2;
|
optional bool is_override_ssap = 5;
|
||||||
optional uint32 ctl = 3;
|
optional bool is_override_ctl = 6;
|
||||||
|
|
||||||
|
optional uint32 dsap = 1;
|
||||||
|
optional uint32 ssap = 2;
|
||||||
|
optional uint32 ctl = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
extend Protocol {
|
extend Protocol {
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>304</width>
|
<width>396</width>
|
||||||
<height>72</height>
|
<height>98</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
@ -18,21 +18,18 @@
|
|||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item>
|
<item row="0" column="0" >
|
||||||
<widget class="QGroupBox" name="groupBox" >
|
<widget class="QGroupBox" name="groupBox" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>LLC</string>
|
<string>LLC</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lblDsap" >
|
<widget class="QCheckBox" name="cbOverrideDsap" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>DSAP</string>
|
<string>DSAP</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
|
||||||
<cstring>leDsap</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -46,13 +43,10 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lblSsap" >
|
<widget class="QCheckBox" name="cbOverrideSsap" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>SSAP</string>
|
<string>SSAP</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
|
||||||
<cstring>leSsap</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -66,13 +60,10 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lblControl" >
|
<widget class="QCheckBox" name="cbOverrideControl" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Control</string>
|
<string>Control</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
|
||||||
<cstring>leControl</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -88,21 +79,83 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1" >
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>20</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>cbOverrideDsap</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>leDsap</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>54</x>
|
||||||
|
<y>34</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>92</x>
|
||||||
|
<y>33</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>cbOverrideSsap</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>leSsap</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>167</x>
|
||||||
|
<y>34</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>192</x>
|
||||||
|
<y>33</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>cbOverrideControl</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>leControl</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>285</x>
|
||||||
|
<y>34</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>310</x>
|
||||||
|
<y>33</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
144
common/snap.cpp
144
common/snap.cpp
@ -22,6 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||||||
|
|
||||||
#include "snap.h"
|
#include "snap.h"
|
||||||
|
|
||||||
|
quint32 kStdOui = 0x000000;
|
||||||
|
|
||||||
SnapConfigForm::SnapConfigForm(QWidget *parent)
|
SnapConfigForm::SnapConfigForm(QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
{
|
{
|
||||||
@ -89,11 +91,36 @@ quint32 SnapProtocol::protocolId(ProtocolIdType type) const
|
|||||||
return AbstractProtocol::protocolId(type);
|
return AbstractProtocol::protocolId(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
int SnapProtocol::fieldCount() const
|
int SnapProtocol::fieldCount() const
|
||||||
{
|
{
|
||||||
return snap_fieldCount;
|
return snap_fieldCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AbstractProtocol::FieldFlags SnapProtocol::fieldFlags(int index) const
|
||||||
|
{
|
||||||
|
AbstractProtocol::FieldFlags flags;
|
||||||
|
|
||||||
|
flags = AbstractProtocol::fieldFlags(index);
|
||||||
|
|
||||||
|
switch (index)
|
||||||
|
{
|
||||||
|
case snap_oui:
|
||||||
|
case snap_type:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case snap_is_override_oui:
|
||||||
|
case snap_is_override_type:
|
||||||
|
flags &= ~FrameField;
|
||||||
|
flags |= MetaField;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
|
||||||
QVariant SnapProtocol::fieldData(int index, FieldAttrib attrib,
|
QVariant SnapProtocol::fieldData(int index, FieldAttrib attrib,
|
||||||
int streamIndex) const
|
int streamIndex) const
|
||||||
{
|
{
|
||||||
@ -105,14 +132,21 @@ QVariant SnapProtocol::fieldData(int index, FieldAttrib attrib,
|
|||||||
case FieldName:
|
case FieldName:
|
||||||
return QString("OUI");
|
return QString("OUI");
|
||||||
case FieldValue:
|
case FieldValue:
|
||||||
return data.oui();
|
{
|
||||||
|
quint32 oui = data.is_override_oui() ? data.oui() : kStdOui;
|
||||||
|
return oui;
|
||||||
|
}
|
||||||
case FieldTextValue:
|
case FieldTextValue:
|
||||||
return QString("%1").arg(data.oui(), 6, BASE_HEX, QChar('0'));
|
{
|
||||||
|
quint32 oui = data.is_override_oui() ? data.oui() : kStdOui;
|
||||||
|
return QString("%1").arg(oui, 6, BASE_HEX, QChar('0'));
|
||||||
|
}
|
||||||
case FieldFrameValue:
|
case FieldFrameValue:
|
||||||
{
|
{
|
||||||
|
quint32 oui = data.is_override_oui() ? data.oui() : kStdOui;
|
||||||
QByteArray fv;
|
QByteArray fv;
|
||||||
fv.resize(4);
|
fv.resize(4);
|
||||||
qToBigEndian((quint32) data.oui(), (uchar*) fv.data());
|
qToBigEndian(oui, (uchar*) fv.data());
|
||||||
fv.remove(0, 1);
|
fv.remove(0, 1);
|
||||||
return fv;
|
return fv;
|
||||||
}
|
}
|
||||||
@ -129,16 +163,19 @@ QVariant SnapProtocol::fieldData(int index, FieldAttrib attrib,
|
|||||||
case FieldName:
|
case FieldName:
|
||||||
return QString("Type");
|
return QString("Type");
|
||||||
case FieldValue:
|
case FieldValue:
|
||||||
type = payloadProtocolId(ProtocolIdEth);
|
type = data.is_override_type() ?
|
||||||
|
data.type() : payloadProtocolId(ProtocolIdEth);
|
||||||
return type;
|
return type;
|
||||||
case FieldTextValue:
|
case FieldTextValue:
|
||||||
type = payloadProtocolId(ProtocolIdEth);
|
type = data.is_override_type() ?
|
||||||
|
data.type() : payloadProtocolId(ProtocolIdEth);
|
||||||
return QString("%1").arg(type, 4, BASE_HEX, QChar('0'));
|
return QString("%1").arg(type, 4, BASE_HEX, QChar('0'));
|
||||||
case FieldFrameValue:
|
case FieldFrameValue:
|
||||||
{
|
{
|
||||||
QByteArray fv;
|
QByteArray fv;
|
||||||
fv.resize(2);
|
fv.resize(2);
|
||||||
type = payloadProtocolId(ProtocolIdEth);
|
type = data.is_override_type() ?
|
||||||
|
data.type() : payloadProtocolId(ProtocolIdEth);
|
||||||
qToBigEndian(type, (uchar*) fv.data());
|
qToBigEndian(type, (uchar*) fv.data());
|
||||||
return fv;
|
return fv;
|
||||||
}
|
}
|
||||||
@ -147,19 +184,86 @@ QVariant SnapProtocol::fieldData(int index, FieldAttrib attrib,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Meta fields
|
||||||
|
case snap_is_override_oui:
|
||||||
|
{
|
||||||
|
switch(attrib)
|
||||||
|
{
|
||||||
|
case FieldValue:
|
||||||
|
return data.is_override_oui();
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case snap_is_override_type:
|
||||||
|
{
|
||||||
|
switch(attrib)
|
||||||
|
{
|
||||||
|
case FieldValue:
|
||||||
|
return data.is_override_type();
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
qFatal("%s: unimplemented case %d in switch", __PRETTY_FUNCTION__,
|
||||||
|
index);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return AbstractProtocol::fieldData(index, attrib, streamIndex);
|
return AbstractProtocol::fieldData(index, attrib, streamIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SnapProtocol::setFieldData(int /*index*/, const QVariant &/*value*/,
|
bool SnapProtocol::setFieldData(int index, const QVariant &value,
|
||||||
FieldAttrib /*attrib*/)
|
FieldAttrib attrib)
|
||||||
{
|
{
|
||||||
return false;
|
bool isOk = false;
|
||||||
}
|
|
||||||
|
|
||||||
|
if (attrib != FieldValue)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
switch (index)
|
||||||
|
{
|
||||||
|
case snap_oui:
|
||||||
|
{
|
||||||
|
uint oui = value.toUInt(&isOk);
|
||||||
|
if (isOk)
|
||||||
|
data.set_oui(oui);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case snap_type:
|
||||||
|
{
|
||||||
|
uint type = value.toUInt(&isOk);
|
||||||
|
if (isOk)
|
||||||
|
data.set_type(type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case snap_is_override_oui:
|
||||||
|
{
|
||||||
|
bool ovr = value.toBool();
|
||||||
|
data.set_is_override_oui(ovr);
|
||||||
|
isOk = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case snap_is_override_type:
|
||||||
|
{
|
||||||
|
bool ovr = value.toBool();
|
||||||
|
data.set_is_override_type(ovr);
|
||||||
|
isOk = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
qFatal("%s: unimplemented case %d in switch", __PRETTY_FUNCTION__,
|
||||||
|
index);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return isOk;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
QWidget* SnapProtocol::configWidget()
|
QWidget* SnapProtocol::configWidget()
|
||||||
{
|
{
|
||||||
@ -175,8 +279,13 @@ void SnapProtocol::loadConfigWidget()
|
|||||||
{
|
{
|
||||||
configWidget();
|
configWidget();
|
||||||
|
|
||||||
|
configForm->cbOverrideOui->setChecked(
|
||||||
|
fieldData(snap_is_override_oui, FieldValue).toBool());
|
||||||
configForm->leOui->setText(uintToHexStr(
|
configForm->leOui->setText(uintToHexStr(
|
||||||
fieldData(snap_oui, FieldValue).toUInt(), 3));
|
fieldData(snap_oui, FieldValue).toUInt(), 3));
|
||||||
|
|
||||||
|
configForm->cbOverrideType->setChecked(
|
||||||
|
fieldData(snap_is_override_type, FieldValue).toBool());
|
||||||
configForm->leType->setText(uintToHexStr(
|
configForm->leType->setText(uintToHexStr(
|
||||||
fieldData(snap_type, FieldValue).toUInt(), 2));
|
fieldData(snap_type, FieldValue).toUInt(), 2));
|
||||||
}
|
}
|
||||||
@ -184,10 +293,15 @@ void SnapProtocol::loadConfigWidget()
|
|||||||
void SnapProtocol::storeConfigWidget()
|
void SnapProtocol::storeConfigWidget()
|
||||||
{
|
{
|
||||||
bool isOk;
|
bool isOk;
|
||||||
|
|
||||||
configWidget();
|
configWidget();
|
||||||
|
|
||||||
data.set_oui(configForm->leOui->text().toULong(&isOk, BASE_HEX));
|
setFieldData(snap_is_override_oui,
|
||||||
data.set_type(configForm->leType->text().toULong(&isOk, BASE_HEX));
|
configForm->cbOverrideOui->isChecked());
|
||||||
}
|
setFieldData(snap_oui, configForm->leOui->text().remove(QChar(' '))
|
||||||
|
.toUInt(&isOk, BASE_HEX));
|
||||||
|
|
||||||
|
setFieldData(snap_is_override_type,
|
||||||
|
configForm->cbOverrideType->isChecked());
|
||||||
|
setFieldData(snap_type, configForm->leType->text().remove(QChar(' '))
|
||||||
|
.toUInt(&isOk, BASE_HEX));
|
||||||
|
}
|
||||||
|
@ -42,6 +42,10 @@ private:
|
|||||||
snap_oui = 0,
|
snap_oui = 0,
|
||||||
snap_type,
|
snap_type,
|
||||||
|
|
||||||
|
// Meta fields
|
||||||
|
snap_is_override_oui,
|
||||||
|
snap_is_override_type,
|
||||||
|
|
||||||
snap_fieldCount
|
snap_fieldCount
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -62,8 +66,9 @@ public:
|
|||||||
virtual ProtocolIdType protocolIdType() const;
|
virtual ProtocolIdType protocolIdType() const;
|
||||||
virtual quint32 protocolId(ProtocolIdType type) const;
|
virtual quint32 protocolId(ProtocolIdType type) const;
|
||||||
|
|
||||||
virtual int fieldCount() const;
|
virtual int fieldCount() const;
|
||||||
|
|
||||||
|
virtual AbstractProtocol::FieldFlags fieldFlags(int index) const;
|
||||||
virtual QVariant fieldData(int index, FieldAttrib attrib,
|
virtual QVariant fieldData(int index, FieldAttrib attrib,
|
||||||
int streamIndex = 0) const;
|
int streamIndex = 0) const;
|
||||||
virtual bool setFieldData(int index, const QVariant &value,
|
virtual bool setFieldData(int index, const QVariant &value,
|
||||||
|
@ -22,8 +22,11 @@ import "protocol.proto";
|
|||||||
package OstProto;
|
package OstProto;
|
||||||
|
|
||||||
message Snap {
|
message Snap {
|
||||||
optional uint32 oui = 1;
|
optional bool is_override_oui = 3;
|
||||||
optional uint32 type = 2;
|
optional bool is_override_type = 4;
|
||||||
|
|
||||||
|
optional uint32 oui = 1;
|
||||||
|
optional uint32 type = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
extend Protocol {
|
extend Protocol {
|
||||||
|
@ -5,22 +5,22 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>194</width>
|
<width>268</width>
|
||||||
<height>72</height>
|
<height>98</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item>
|
<item row="0" column="0" >
|
||||||
<widget class="QGroupBox" name="groupBox" >
|
<widget class="QGroupBox" name="groupBox" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>SNAP</string>
|
<string>SNAP</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lblOui" >
|
<widget class="QCheckBox" name="cbOverrideOui" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>OUI</string>
|
<string>OUI</string>
|
||||||
</property>
|
</property>
|
||||||
@ -37,7 +37,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lblType" >
|
<widget class="QCheckBox" name="cbOverrideType" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Type</string>
|
<string>Type</string>
|
||||||
</property>
|
</property>
|
||||||
@ -56,8 +56,67 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="1" >
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>cbOverrideOui</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>leOui</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>49</x>
|
||||||
|
<y>42</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>68</x>
|
||||||
|
<y>43</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>cbOverrideType</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>leType</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>161</x>
|
||||||
|
<y>34</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>183</x>
|
||||||
|
<y>33</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
Reference in New Issue
Block a user