Set mac mode to fixed for pcap imported streams

We need to explicitly set it to fixed 'coz the default has changed from
fixed to resolve.

Fixes #282
This commit is contained in:
Srivats P 2019-08-25 10:48:46 +05:30
parent c8a4c3eee9
commit 884990d03c
2 changed files with 11 additions and 0 deletions

View File

@ -122,3 +122,12 @@ void PdmlEthProtocol::unknownFieldHandler(QString name, int /*pos*/,
#endif
}
void PdmlEthProtocol::postProtocolHandler(OstProto::Protocol *pbProto,
OstProto::Stream* /*stream*/)
{
OstProto::Mac *mac = pbProto->MutableExtension(OstProto::mac);
mac->set_dst_mac_mode(OstProto::Mac::e_mm_fixed);
mac->set_src_mac_mode(OstProto::Mac::e_mm_fixed);
}

View File

@ -30,6 +30,8 @@ public:
virtual void unknownFieldHandler(QString name, int pos, int size,
const QXmlStreamAttributes &attributes,
OstProto::Protocol *pbProto, OstProto::Stream *stream);
virtual void postProtocolHandler(OstProto::Protocol *pbProto,
OstProto::Stream *stream);
protected:
PdmlEthProtocol();