Commit Graph

252 Commits

Author SHA1 Message Date
Srivats P
1216cfbce6 Include QRegExpValidator in MacEdit to fix build break
This build break is seen only on some platform/compiler combos
2021-08-14 11:31:38 +05:30
Srivats P
c2c52d1e6d Fix incorrect display of STP Mac addresses
Use MacEdit instead of QLineEdit to fix and simplify. MacEdit is what
the Mac protocol uses.

Fixes #340
2021-04-24 20:30:30 +05:30
Srivats P
73dd198069 Add GRE protocol 2021-01-09 13:15:26 +05:30
Srivats P
a352ff3ed1 Fix frame variable count when varying frame lengths
The frame variable count should be minimum of frame count and frame
length range size.

Unrelated, in case of random payload pattern, reuse
StreamBase::frameCount() which does the same calculation.

Fixes #325
2020-10-22 20:28:26 +05:30
Srivats P
8547eb8bb8 Fix pcap import/replay inter packet timing
Changed to decimal precision for improved replay accuracy.

For inter packet time > 1s, the integer precision would set up rate as 0
instead of 0.x - this also gets fixed by this change.
2020-06-11 20:48:57 +05:30
Srivats P
1699dba1cf Change raw_input to input in generated python code 2020-06-06 12:30:53 +05:30
Srivats P
be984135ac Fix diff in pcap import of IPv4 due to ip.flags
Some Wireshark/tshark versions have ip.flags as u16 instead of u8. Code
changed to be able to handle both.

Tested with Wireshark 3.2.4 (u16) and 1.14 (u8)
2020-06-04 21:02:09 +05:30
Srivats P
4487da1ae6 Add URL to why pcap diff from error message 2020-05-18 20:58:39 +05:30
Srivats P
a1582ad67b Convert pcapng and other formats to pcap for import
Any capture format supported by tshark can now be imported by Ostinato.

Fixes #83
2020-04-07 21:18:34 +05:30
Srivats P
c335f34651 Import PDML text proto as hexdump if non-text chars 2020-04-07 21:15:27 +05:30
Srivats P
5efffb0c4b Ignore http.file_data during PDML import
This field is just a combination of other http fields
2020-04-07 21:14:44 +05:30
Srivats P
79ada3315a Ignore empty value fields during PDML import 2020-04-07 21:10:39 +05:30
Srivats P
c25256bfb5 Fix STP PCAP/PDML import
As originally written it worked only with Eth encap
2020-04-07 21:08:21 +05:30
Srivats P
63e648bbfe Fix IGMPv3 group record aux data
FieldValue, FieldFrameValue, FieldTextValue were all fixed. This used to
work earlier. I think somewhere across Qt versions, QByteArray() and
QString() changed such that it broke. Or more likely I was using those
incorrectly earlier but output was still correct which is no longer
true.

Anyway, it should be ok going forward (hopefully!)
2020-04-03 20:39:14 +05:30
Srivats P
487f3e653d Fix missing packet summary line in pcap import diff
Looks like starting somewhere in Wireshark 2.x, when we give -x to
tshark, we also need to explicitly give -P to include the one-line
summary of the packet. This one-line summary is used in the diff to find
out which packets experienced a diff.
2020-04-03 20:29:18 +05:30
Srivats P
8f510635a9 Use UInt128 for IPv6 address modes (inc, dec, rnd)
Fixes #283
2020-03-27 21:15:49 +05:30
Srivats P
acb8222beb Fix IPv6 stream config prefixLength not being saved 2020-03-27 21:15:49 +05:30
Srivats P
64fe90e5b7 Fix jumbo error being reported multiple times
Also found and fixed another related bug where the loop to check pkt
size for trunc/jumbo ran for frameCount instead of
frameSizeVariableCount() - this change will reduce preflight check time
when frameSizeVariableCount is less than frameCount

Fixes #290
2019-12-29 20:38:08 +05:30
Srivats P
44a9eada48 Fix inputMask for IGMPv3 source IP
The old mask 009.009.009.009 does not compute to valid for input 1.2.3.4
and the Qt delegate doesn't accept it with Qt5 (not the case with Qt4)

Although the new mask 000.000.000.000 cannot prevent invalid entries
like 1.2.. or 300.400.500.600, I decided it was better to accept invalid
input (which gets converted to 0.0.0.0) instead of unintentionally not
allowing valid entries.

Fixes #292
2019-12-29 19:53:56 +05:30
Srivats P
884990d03c 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
2019-08-25 10:48:46 +05:30
Srivats P
c43f7d1769 Typecast to quint64 before passing to qToBigEndian
For 64-bit arch, Qt defines quint64 as unsigned long long (and quint32 as unsigned int), but Protobuf's google::protobuf::uint64 is defined as unsigned long. Now Qt defines qbswap only for the Qt defined 8/16/32/64 integer types aka q[u]intXXX. So qbswap<unsigned long long> and qbswap<unsigned int> is defined but not qbswap<unsigned long>.

mld.cpp was using qToBigEndian (which uses qbswap in turn) with a protobuf uint64 triggering the undefined references on some 64bit platforms.

Fixes #265
2019-06-26 22:42:09 +05:30
Srivats P
bb079b9508 Use Qt5's prettyProductName to get system info 2019-06-06 21:36:12 +05:30
Srivats P
64d4b38f41 Add protocol error checks to preflight check
Also commented out stream transmit duration check that was causing false
positives
2019-06-05 11:39:09 +05:30
Srivats P
7cf323202f Add new build() RPC
Make build an explicit RPC so that clients can call resolveNeighbor
before build
2019-05-28 18:46:58 +05:30
Srivats P
dbbb7597a4 Add Check for updates to main menu
Results will be displayed in a message box - if we have a new version or
if we are running the latest version.

Update check at startup will show message box only once in 5 days, other
times it will be shown in the status bar. If we are already on latest
version, nothing is shown.
2019-05-22 18:49:51 +05:30
Srivats P
2b8940ac49 HostDev: Change default mac mode to resolve
Note - this will cause regressions in current API scripts if fixed was
assumed as default. Fix is to explicitly specify fixed
2019-02-25 21:03:28 +05:30
Srivats P
fcca47e652 Rename kRpcFail as kRpcError
Distinguish RPC Failure and RPC Error - the latter is in case of partial
failures

Also make Ack.status required - missed out in last commit
2019-02-16 20:54:11 +05:30
Srivats P
1f6af2e4cc HostDev: Fix build break 2019-02-09 18:00:10 +05:30
Srivats P
f951d1040c HostDev: Fix build break 2019-02-09 17:35:53 +05:30
Srivats P
8b9cceb7ed HostDev: Return smac/dmac resolve failure via RPC 2019-02-09 17:16:31 +05:30
Srivats P
90d93d52e1 Merge branch 'master' into hostdev 2019-02-05 20:34:00 +05:30
Srivats P
88b3c287d0 Track smac/dmac resolve failures when building packet list 2019-02-05 18:31:43 +05:30
Srivats P
545f740676 HostDev: Fixed a bunch of FIXME/TODOs 2018-12-11 18:57:53 +05:30
Srivats P
48721cece4 Import IP options into ip4.options instead of a new HexDump protocol
ip4.options was not supported earlier, so we used to import into a new
hexdump protocol. Now that IPv4 options field is supported, use that
instead
2018-10-04 18:33:38 +05:30
Srivats P
6cac41ab40 Set numPackets for imported streams to 1
Earlier the default value for num_packets was 1 and the imported streams
therefore also had the same. However, when the default value got changed
to 10, the num_packets for imported streams should have been explicitly
set to 1 - this was missed out and has been fixed now
2018-10-04 18:07:50 +05:30
Srivats P
495b99beda Use streamIndex in PseudoIpCksum calculation
This bug was introduced while fixing #271
2018-09-17 17:26:51 +05:30
Srivats P
9c319f97e5 Bugfix: Don't pad HexDump unless it's the last protocol 2018-09-14 18:29:23 +05:30
Srivats P
488a2ea730 Bugfix: Fix incorrect cksums
Presence of IPv6 Extension Headers was causing incorrect TCP/UDP/ICMP
cksums. Verified that with these changes, cksums are correct for all
combinations of L3 and L4 headers with/without options/extHdrs

Fixes #271
2018-09-13 12:32:36 +05:30
Srivats P
4924d7fe60 Bugfix: Encode hexdump and IPv4 options correctly
Using QString().fromStdString() caused conversion to Unicode via utf8
instead of using the plain binary data
2018-09-13 12:29:13 +05:30
Srivats P
73043f6fe6 HostDev: Added Linux host device code 2018-09-02 19:45:08 +05:30
Srivats P
8adb3d79aa Add custom TOS/DSCP config widget for IPv4/IPv6
Fixes #45
2018-05-18 22:19:54 +05:30
Srivats P
a16eefbff4 Treat warnings as errors and fix existing warnings 2018-04-20 20:50:51 +05:30
Srivats P
db231054da Fix Qt4 to Qt5 porting issues with debug build
Also update modeltest to Qt5
2018-03-27 20:02:36 +05:30
Srivats P
e3c2f37956 Support Qt5.2 since Travis uses Trusty/Qt5.2 2018-03-15 20:03:22 +05:30
Srivats P
f801982830 Port common, rpc and client code to Qt5
Still pending
* server port to Qt5
* verify/test the port
2018-03-14 21:58:56 +05:30
Srivats P
b6c46e27e9 Warn when tx time < 1s not <=1s in preflight check 2018-02-22 20:49:14 +05:30
Srivats P
8350f1ec6a Fix payload protocol frame value variable identification 2018-02-08 22:39:22 +05:30
Srivats P
cd6948b18c Add preflight check for variableCount > frameCount 2018-02-08 22:39:22 +05:30
Srivats P
ece4ce35ea Make mac address editing more intuitive and easier
Fixes #248
2018-01-31 22:03:04 +05:30
Srivats P
6dd6511269 Merge branch 'master' into sign 2017-12-03 12:59:26 +05:30
Srivats P
81e7e735bc sign: Resolve a few FIXMEs
* Rename track_stream_stats to is_tracking_stream_stats for consistency
with other bool params
* Change signature magic value to CODA
* Resolve notify memory leak
2017-12-03 11:26:09 +05:30
Srivats P
e05fa5a690 UI improvements/fixes for Mac protocol
* Change count/step to IntEdit with suitable minimums
* Change mac address to MacEdit

Fixes #224 fixes #188
2017-10-24 18:21:56 +05:30
Srivats P
c53a1866b8 UX: Show stream check results as a bulleted list 2017-09-30 22:17:06 +05:30
Srivats P
a757b9e353 UX: Warn for very short duration stream transmits
Changed the default num_packets from 1 to 10, because otherwise the
default stream values will trigger this warning, which is not a good
experience for the user
2017-09-30 19:32:27 +05:30
Srivats P
f01bdd257f Inform user that Ostinato TCP is stateless 2017-09-25 18:19:45 +05:30
Srivats P
cca2e94bb3 Detect when port config has changed and needs to APPLY'd
For now we prompt user to click Apply, in future we can use this to do a
"Auto Apply"
2017-09-14 20:38:13 +05:30
Srivats P
95f00f2673 Add documentation to python binding
Also some minor documentation for some .proto that goes into the API
guide
2017-08-14 10:43:11 +05:30
Srivats P
a8ec2f1bda Fix IPv4/IPv6 PDML import with Tshark 2.x
Fixes #219
2017-07-06 20:05:15 +05:30
Srivats P
8b2541fbaf Fix incorrect extension id for STP
There was a discrepancy between Protocol::kStpFieldNumber (209) and the
one defined in stp.proto (210) which caused protobuf reflection to fail
when queried for a descriptor corresponding to 209. Referencing the null
descriptor further in the code caused a crash.
2017-04-10 20:59:17 +05:30
Steven
a27634ab66 Corrected spelling of Destination 2017-02-23 11:33:01 -05:00
Srivats P
81bb5f54ba Bugfix: Fix failure parsing Ostinato file format 2017-01-28 10:55:07 +05:30
Srivats P
cfa7d80f7b Convert stream preflight checks to bullet points 2016-12-10 13:50:52 +05:30
Srivats P
a838d09fbd sign: Inform user when stream stats is not enabled
If Sign protocol is configured without enabling stream statistics on
port, inform user that stream statistics will not be available till
it is enabled on port
2016-12-10 13:40:28 +05:30
Srivats P
ac1356ed53 Optimize stream preflight check for performance
Loop only once for all packets of the stream
2016-12-09 18:48:08 +05:30
Srivats P
e9bdfa04ea sign: implemented rx stream stats - loopback problem to be fixed 2016-11-17 21:44:34 +05:30
Srivats P
f8575ef101 sign: post tx stream stats collection; testing pending 2016-11-13 19:11:24 +05:30
Srivats P
cffada4c07 sign: server rpc implementation of stream stats; actual collection of stream stats pending 2016-11-10 18:18:27 +05:30
Srivats P
783db4e832 sign: add stream GUID to sign protocol 2016-11-07 20:09:17 +05:30
Srivats P
bf92ea09df sign: TDD test script for stream stats 2016-11-06 21:28:31 +05:30
Srivats P
0833e5d27c sign: add stream stats related messages and RPCs 2016-11-06 11:40:53 +05:30
Srivats P
e0bf173b39 sign: remove sign stats and remnants of signed streams 2016-11-05 19:53:01 +05:30
Srivats P
1986845bae sign: remove streamsType and associated code 2016-11-05 19:41:02 +05:30
Srivats P
2f9769d0ed sign: rename byteswap.h to avoid name clash with the standard one on Linux 2016-11-05 11:33:47 +05:30
Srivats P
46449a02a3 sign: fix PayloadCksum for odd boundary between protocols 2016-11-01 16:30:13 +05:30
Srivats P
50fec9fa5a sign: fix and move swapXX into a .h file for reuse 2016-11-01 16:28:48 +05:30
Srivats P
b9fd68f71d sign: fix payload/hexdump to not assume they are the last 2016-11-01 13:18:55 +05:30
Srivats P
3ed956eebc sign: added sign protocol 2016-10-31 21:38:19 +05:30
Srivats P
15b88a480b Fix User-Agent header 2016-10-29 12:26:42 +05:30
Srivats P
c2f36c5cb3 IPv4 now supports options - configured as a hex string for now; fixes #120 2016-10-27 23:51:55 +05:30
Srivats P
a79bbb1fcd sign: signed tx stats infra; actual tx signing pending 2016-10-23 17:24:23 +05:30
Srivats P
a8f9795c85 Fix incorect logic of isNewerVersion 2016-09-17 15:21:31 +05:30
Srivats P
10559c2a56 sign: stats infra extended for sign stats 2016-08-22 23:26:33 +05:30
Srivats P
8bfeafddf9 Fix warning 2016-06-25 20:07:34 +05:30
Srivats P
75efed5ec4 Add extension while saving streams and sessions, if user doesn't specify one.
Fixes #187
2016-06-14 18:56:29 +05:30
Srivats P
5e918cf084 Fix STP protocol builder warnings 2016-06-01 20:58:26 +05:30
Srivats P
78957a019f Bugfix: Use char* for kFileMagicValue to avoid dynamic initialization and consequent ordering problems 2016-06-01 19:19:45 +05:30
Srivats P
bdbbd8f0a1 Moved Updater to common ostproto lib, Updater sends UserAgent 2016-05-31 20:23:54 +05:30
Srivats P
24fd176802 Merge pull request #184 from pstavirs/emul
Device Emulation
2016-05-25 18:57:08 +05:30
Srivats P
96ed163ab0 Merge pull request #183 from pstavirs/session
Save/Open Session
2016-05-25 18:43:07 +05:30
Srivats P
a0485cca01 Device Emulation (contd.): took decision on DeviceList+DeviceNeigh vs DeviceInfo API 2016-05-25 18:31:56 +05:30
Srivats P
6cc7231e7f Refactored StreamFileFormat and subclasses' methods to be consistent with SessionFileFormat 2016-05-20 20:30:57 +05:30
Srivats P
ff066ea657 Renamed AbstractFileFormat to StreamFileFormat and FileFormat to OstmFielFormat to be consistent with the new convention introduced with SessionFileFormat/OssnFileFormat 2016-05-19 21:54:28 +05:30
Srivats P
c8a31f3068 Refactor stream file supportedFileTypes() to accept operation - Open/Save and return fileTypes accordingly 2016-05-19 21:05:32 +05:30
Srivats P
822ee2a4b4 Save/Open Session - refactor supportedFileTypes() to accept operation - Open/Save as input parameter and return file types accordingly 2016-05-19 20:50:33 +05:30
Srivats P
29f840c91c Use .ostm as default extension for Saved Stream(s) file and use it as default filter for open stream file 2016-05-18 21:33:26 +05:30
Srivats P
8bea5636ab Open Session: Fixing problem with previous commit where valid format file was also declared invalid/unkonwn 2016-05-17 22:16:52 +05:30
Srivats P
ba754c1043 Open Session - check fileType for native file formats while identifying the file format from filename; also find size of metadata and use it when parsing just the metadata instead of the whole file 2016-05-17 20:47:10 +05:30
Srivats P
bcb5376f9d Save/Open Session - added UI and related infra to invoke OssnFileFormat; code to build sessionContent incomplete 2016-04-14 07:44:07 +05:30
Srivats P
2a77f73e9c Save/Open Session - Implemented OssnFileFormat; code to build SessionContent still pending 2016-03-29 18:55:22 +05:30
Srivats P
c98104f078 Refactored native streams file format to share code with native session file format. Added skeletal code for session/ossn file format 2016-03-28 21:23:10 +05:30