Commit Graph

200 Commits

Author SHA1 Message Date
Srivats P
9d42ed12cc Use a invalid GUID instead of 0 as default
If a packet does not have a sign/guid, use an invalid guid instead of 0
as the default, so that these packets get tracked against the invalid
guid which can be excluded while updating the port's stream stats.
2022-06-27 13:43:47 +05:30
Srivats P
843733567a Reoganize code using subrepo for Ostinato (part 2)
This commit includes all the new and modified files
2022-06-27 13:43:46 +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