Commit Graph

928 Commits

Author SHA1 Message Date
Srivats P
2966884fc8 Bump to version 1.0 - 11 years 'n 13 releases in the making! 2019-09-07 12:31:53 +05:30
Srivats P
8ea2e91b47 Add Qt widgets lib for PCAP import tests build
QtWidgets is required since we have ported the code to Qt5
2019-09-06 21:18:05 +05:30
Srivats P
518c7b804b Change logo icon to the full logo instead of a quadrant
* Changed Main Window icon - should change icon in taskbar also
* Changed Windows Icon
* Changed MacOS Icon
2019-08-28 21:37:45 +05:30
Srivats P
a88cfe35bb Increase main window height to make room for stats 2019-08-28 18:26:09 +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
c8a4c3eee9 Restore XTreeView functionality
I thought Qt5 had fixed this behaviour 'bug', but apparently not. So we
still need XTreeView - for Qt5 also.
2019-08-24 12:14:50 +05:30
Srivats P
36e0a64f81 Revert "Use persistent model index in devices widget"
This reverts commit 46dd028a33.

The above commit caused a regression - issue #281

As seen in valgrind, crash was caused by portModel reset writing into
a freed block - presumably pertaining to persistent indexes. The block
was freed by the persistent index itself earlier when it was set to
invalid - so the model should not have been accessing that.

The application code seems correct - maybe the Qt code has a bug?
Unlikely but not impossible. For now go back to using QModelIndex
instead of QPersistentModelIndex

Fixes #281
2019-08-24 11:59:41 +05:30
Srivats P
3e46c1b991 Include <typeinfo> header for using typeid 2019-08-18 13:13:39 +05:30
Srivats P
635ca18bce Fix duplicate deletion of host devices
Since host devices are also included in the deviceList_, they are already
being deleted. Deleting them again causes a segfault.
2019-08-18 12:30:41 +05:30
Srivats P
46dd028a33 Use persistent model index in devices widget 2019-08-10 18:55:23 +05:30
Srivats P
64d1525f50 Fix infinite loop when stopping capture etc.
On some platforms and/or some libpcap verisons, libpcap doesn't support a
timeout which makes interactive stop not possible. So we now use a UNIX
signal to break out. Obviously this works only on *nix platforms - which
includes MacOS. For now the problem is not seen on Windows with WinPCAP,
so we should be fine. May need to revisit when we add Npcap support.

Fixes #215, #234
2019-08-10 13:26:04 +05:30
Srivats P
ea69335d29 Check we have interface info before printing it 2019-07-28 10:42:11 +05:30
Srivats P
1db768afba Remove QThreadX since we have ported to Qt5 2019-07-28 10:42:11 +05:30
Srivats P
e123934c73 Suppress deprecated declarations till next release
Qt5.13 has deprecated a bunch of Qt APIs that we are using - postponing
this activity till next release
2019-07-27 11:46:17 +05:30
Srivats P
6974f4016f Replace the deprecated qSort with std::sort 2019-07-26 21:24:25 +05:30
Srivats P
0a2154d31b Re-add about.png icon that was removed by mistake 2019-07-10 21:07:38 +05:30
Srivats P
23bc0c6890 Add 2019 to copyright years in About dialog 2019-07-10 20:39:58 +05:30
Srivats P
6e551017f4 Show all ports in port stats window at startup
If one or more ports were reserved, these were not shown at client
startup
2019-07-04 19:17:22 +05:30
Srivats P
98378b52e6 Fix ClearAllStats with View Reserved Ports Only 2019-07-04 19:00:13 +05:30
Srivats P
5e565167f2 Fix build break due to fprintf in previous commit 2019-07-02 19:14:38 +05:30
Srivats P
f24a6719fa Disable logs by default in release mode
Enable logs if '-d' command-line option is given.

Additional command-line options -
-v : print version
-h : print usage

Drone only:
-p <port-number> : use given port number for the RPC service
2019-07-02 18:25:31 +05:30
Srivats P
3fca24396d Report "Apply" time in logs 2019-07-02 18:24:55 +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
913ef5c0ee Add start/stop tx buttons to stream list window 2019-06-19 22:22:01 +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
6817d3f870 Resolve neighbors before build as part of "apply" 2019-05-31 18:34:07 +05:30
Srivats P
edc7ed677c Mark sync complete after build finish during apply
Since build is now the last step during "apply", use that to mark sync
complete. Since build will always be called irrespective of whether any
changes were made to devices/streams, we can now send the stream RPCs
only if required.

Additionally log RPC calls only if they are actually made.
2019-05-28 19:02:50 +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
a4bd6212ef Merge branch 'master' of D:/srivatsp/projects/ostinato/master 2019-05-22 18:51:25 +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
52b522f92a Show new version availability in a message box 2019-05-22 18:49:51 +05:30
Srivats P
13eed5f528
Merge pull request #275 from pstavirs/hostdev
Hostdev
2019-04-11 21:38:42 +05:30
Srivats P
cd9758f165 Merge branch 'master' into hostdev 2019-04-11 18:56:49 +05:30
Srivats P
677d56bf32 Don't inline sumUInt128 since it's used elsewhere as well 2019-04-04 21:38:47 +05:30
Srivats P
a2190f9a9f Don't install modeltest during 'make install' 2019-04-04 21:38:04 +05:30
Srivats P
75c8f44079 Fix MacOS specific Hostdev bugs
* Fix SA_SIZE definition for MacOS
* Use sdl_index instead of rtm_index as the ifIndex
* Remove the embedded ifIndex in link local addresses
* Extract default IPv6 gateway correctly
2019-04-03 20:41:46 +05:30
Srivats P
0fb81e4d8e Send ARP/NDP request from emuldevice if unresolved 2019-03-12 19:04:59 +05:30
Srivats P
2614eb8645 Retrieve devices at startup even if no device groups
Now that we have host devices, we can have devices without having a
device group
2019-03-11 19:15:08 +05:30
Srivats P
1c2e833c4a Don't trigger ARP/NDP if already resolved 2019-03-11 18:25:07 +05:30
Srivats P
2cd64061d1 Fix warning - no matching signal
For slot MainWindow::on_actionOpenSession_triggered(QString)
2019-02-26 18:12:18 +05:30
Srivats P
4a1b41670c Wrap LogsWindow contents 2019-02-25 21:45:39 +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
983a155ccf Update Qt icon for Help | About Qt menu item 2019-02-22 21:54:51 +05:30
Srivats P
0d1b4be682 Connect to local portgroup later in the app startup sequence
This allows drone to init itself and wait for connections before we
attempt to connect to it

Fixes #266
2019-02-22 20:34:59 +05:30
Srivats P
00bc01898d Show a progress dialog during Apply
The most time spent during apply is during packet rebuilding.
Unfortunately, there is no feedback from the drone to know the actual
progress, so this is just a busy indicator for now.

I tried to put a jump url to the FAQ on why it takes time, but 'coz the
app cursor is a "wait cursor", user cannot click on any widgets/elements
inside the dialog box - so this won't work.

Iterate on this dialog and what it displays based on user feedback.
2019-02-22 18:58:13 +05:30
Srivats P
44357178c4 Rename var 'fail' as 'error'
This better reflects the following -
RPC fail : complete failure of the RPC; no changes were made
RPC error: partial failure of the RPC; some changes were made, some had
           errors
2019-02-21 20:57:24 +05:30
Srivats P
9003d339bc Display all RPC failures and errors in the logs window 2019-02-21 20:51:18 +05:30
Srivats P
adfe1380da Print drone version/revision first thing at startup
Currently these are printed at the end of init when we start waiting for
client connections - this was done so that this info doesn't get lost in
the barrage of init logs. The downside is if there is a crash during
init, we don't get to know the version/revision from the logs. With this
change this info is printed twice - first thing when we start and just
after init when we start waiting for client connections
2019-02-18 18:16:36 +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