Commit Graph

270 Commits

Author SHA1 Message Date
Srivats P
318fe124bf Suggest disabling intelligent import if pcap diff 2024-02-02 17:02:04 +05:30
Srivats P
b3ac5f8d5d Add support for RARP 2024-01-19 15:53:00 +05:30
Srivats P
23ee0e6f00 Extract libostfilegui out of libostfile
libostfile now has no GUI dependencies
2023-11-16 11:53:52 +05:30
Srivats P
f3dccb9484 Move spinBoxDelegate back to ostprotogui
This was mistakenly moved to ostfile when it was extracted from
ostprotogui
2023-11-16 11:53:52 +05:30
Srivats P
8f89c577ef Extract file format UI code into separate files 2023-11-16 11:53:52 +05:30
Srivats P
71435869cf Rename pcapfileformatoptions to pcapoptionsdialog 2023-11-16 11:53:52 +05:30
Srivats P
f779b0138b Extract pcapfileformatoptions into separate files 2023-11-16 11:53:52 +05:30
Srivats P
8c58d8610f Prep to move PcapOptions UI into separate files
This commit only creates a copy of pcapfileformat.* files for better
history tracking. The actual code move will happen in next commit.
2023-11-16 11:53:52 +05:30
Srivats P
c285e91d4a Extract libostfile from libprotogui
All .pro file changes only

libostfile still has GUI dependency due to PCAP import options UI.
Need to see if we can remove that - maybe extract into a separate
libostfilegui.
2023-11-16 11:53:52 +05:30
Srivats P
f5350663cd Prepare to extract libostfile from libostprotogui
This commit only copies ostprotogui as ostfile to track changes. Actual
changes will be made in subsequent commits
2023-11-16 11:53:52 +05:30
Srivats P
fff61d7773 Add assert version checks for upcoming 1.3.0 2023-10-11 12:57:25 +05:30
Srivats P
49cb7c40e0 Check and warn about stream stats for ICMP streams
Stream stats are not supportedd for ICMP packets
2023-10-03 11:39:46 +05:30
Srivats P
3bcd31a1ea Use IPv4AddrValidator for IPv4 protocol config UI 2023-07-17 16:10:07 +05:30
Srivats P
5eb2ad1979 Calculate per stream jitter using latency values
We calculate "average jitter".

The changes include only the server side, not the client/GUI side which will
be done in a future commit.
2023-06-26 13:01:11 +05:30
Srivats P
2941c7ec22 Fix crash for top speed tx with ttag in seq mode
Crash was due to loopDelay being 0 in case of topSpeed. For ttags, we
recalculatue loopDelay based on max line rate and avg pkt size.

The problem doesn't exist in interleaved mode because minGap and duration
are non-zero in the top speed tx case.
2023-06-20 11:59:56 +05:30
Srivats P
598e6bf243 Merge changes made in base code for turbo/latency 2023-06-15 12:32:20 +05:30
Srivats P
bafdd948f8 Make win32 specific changes for per-stream latency
There are 2 changes -
1. Encode txPort in ttag packets and use it at TxTtagStats and
RxPcapStats to identify Tx and Rx packets respectively
2. Don't use pcap_sendqueue_transmit() if stream timing is in use -
since we can't modify TTAG packets inside that API
2023-05-26 11:31:52 +05:30
Srivats P
8583299a1c Compile out timing debug prints
They can be compiled in if required
2023-05-26 11:31:52 +05:30
Srivats P
bfdcee2baa Recompute L4 checksum on-the-fly for TTag packets 2023-05-26 11:31:52 +05:30
Srivats P
c2967b663d Calculate L4 checksum offset for TTag packets 2023-05-26 11:31:52 +05:30
Srivats P
70b5e60440 Rename delay as latency in Protobuf/RPC
The GUI uses the term 'latency', so it's better if the API alsos use the same
term instead of 'delay'
2023-05-26 11:31:52 +05:30
Srivats P
ab713ce043 Integrate StreamTiming with the code
Bugs found during integration were fixed and minor code improvements were made
such as using consts, const params, renaming members etc.
2023-05-26 11:31:52 +05:30
Srivats P
21ce331c43 Create a Tx Ttag tracker thread
For now we are just debug printing timestamp with T-TagId and GUID. We
need to store this tuple and compare when we Rx the same - this will be
in a upcoming commit.
2023-05-26 11:31:52 +05:30
Srivats P
fdf8c77350 Change T-Tag on the fly 2023-05-26 11:31:52 +05:30
Srivats P
159cd7c0da Add T-Tag placeholder in sign protocol 2023-05-26 11:31:52 +05:30
Srivats P
e2369c02bc Fix value for str/bytes field when save as Python
Protobuf string type should be treated as a Python unicode string usable
in both Python 2.x and Python 3.x. Since we are now using unicode strings,
force encoding as utf-8.

Protobuf bytes type should be treated as a Python byte string. Use hex
values in byte literal even for printable characters, for a better UX.

escapeString() is no longer being used, but has been retained in the
code.
2022-12-28 19:30:50 +05:30
Srivats P
d44fdf4ae7 Add a prefix to combo protocol fields
For same protocol numbers (e.g. IP 4o4), use Outer/Inner as prefix. For
"similar" protocols like VlanStack or IP 4o6, use the protocol name as
the prefix.
2022-12-20 13:38:16 +05:30
Srivats P
42091e5221 Allow user to add a port description
If a user description is available, that is shown in the ports window
other wise the system determined description is shown.

Updates #223
2022-09-09 12:25:17 +05:30
Srivats P
94a6423a96 Add a 1.2.0 version updater test 2022-08-15 13:05:41 +05:30
Srivats P
06ad12777f Warn if sign proto may be followed by padding
For now, we check and tell the user. The actual fix should be for
sign proto to add padding before it's content, if required

Updates #313
2022-06-30 18:24:48 +05:30
Srivats P
701a058c7d Merge commit 'refs/subrepo/ostinato/fetch' into subrepo/ostinato
Update from master repo into turbo
2022-06-27 14:35:22 +05:30
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
5e7bf77b0c
Merge pull request #350 from pstavirs/streamrates
Add average rate per GUID in stream statistics
2022-06-20 17:27:24 +05:30
Srivats P
5a91dc4561 Remove TODOs from GRE implementation files 2022-05-26 17:30:29 +05:30
Srivats P
3d6f39e84d Implement override checksum for GRE 2022-05-25 15:16:33 +05:30
Srivats P
60f61ed947 Add and use UIntEdit for 32-bit GRE Key/Seq fields 2022-05-23 17:04:27 +05:30
Srivats P
25a91e52f6 Change GRE optional fields implementation
* frameFieldCount() always includes all frame fields whether or not
included in packet
* if an optional field is not included in packet
    - FieldName is still returned
    - FieldTextValue is returned as "<not-included>"
    - FieldBitWidth is 0
    - all remaining attributes are QVariant()
2022-05-23 13:18:18 +05:30
Srivats P
c8cc7a021f Merge branch 'master' into gre 2022-05-21 12:16:14 +05:30
Srivats P
329469dd6e Calculate port tx duration and send to controller
This commit only includes server side changes plus the .proto changes.

Client side UI changes are still pending.
2022-02-21 22:20:59 +05:30
Srivats P
b0a81fb231 Change recalc cksum defaults implementation
These are the existing and desired defaults -
 * GUI: recalcCksum = true
 * PCAP import test: recalcCksum = false

With the existing implementation, doing PCAP import in 'raw' mode twice
would lead to recalcCksum being checked in the dialog the second time.
This was because we were always forcing it to be true for the GUI case
without checking for anything.
2022-01-23 21:46:42 +05:30
Srivats P
735e960dcb Use nsec pcap as intermediate when opening non-pcap
When opening a non-PCAP file, we convert it to intermediate PCAP format.
Use nanosecond pcap format instead of standard microsec pcap format for
higher timestamp resolution.

Updates #238
2022-01-19 18:54:46 +05:30
Srivats P
226705f015 Use integer storage and arithmetic for nanosec pcap
quint64 has larger range than double so has better accuracy. However,
for calculating packet rate, use floating-point arithmetic since the
packet rate is a double

Updates #238
2022-01-19 18:46:09 +05:30
Srivats P
45d5e15f23 Save PCAP always in nanosecond PCAP format
Updates #238
2022-01-17 18:49:24 +05:30
Srivats P
d09d83000e Add comment specifying PDML reader needs PCAP file
Updates #238
2022-01-15 18:36:15 +05:30
Srivats P
0f322fb2d8 Read nanosec PCAP files natively in non-pdml mode
In PDML mode, nanosecond support is already present - in fact, only
nanosecond is supported not microseconds.

Updates #238
2022-01-15 16:22:28 +05:30
Srivats P
4bfd546f21 Change pcap import recalcCksum default to false
This was changed so that pcap import test produces minimal diffs like
earlier. However, for user, the import options dialog overrules this
default, so that user default remains recalcCksum as true
2021-12-12 11:06:36 +05:30
Srivats P
16b353ae30 Alloc/free Pcap import options dialog every time
The earlier code was trying to reuse the dialog but this was throwing
an unexpected error every time -

    External WM_DESTROY received for QWidgetWindow

This commit fixes this error message
2021-12-11 21:13:15 +05:30
Srivats P
dbdeee2a6f Add option to recalculate cksums during pcap import
Recalculate cksum is now the default.

This behaviour change has been done to facilitate rewriting packet
fields post PCAP import using the new Find & Replace feature. Without
this any change in fields may cause incorrect checksums.

The earlier rationale for retaining the checksums in the PCAP file
during import was to ensure replayed packet was same as the one in the
PCAP file.

User now has a choice with this option.
2021-12-11 19:27:44 +05:30
Srivats P
366022552f Update pcap import options UI as per latest QtDesigner
There are some file format changes - all cosmetic
2021-12-11 18:11:53 +05:30