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
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
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
1c2e833c4a
Don't trigger ARP/NDP if already resolved
2019-03-11 18:25:07 +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
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
Srivats P
7ea8c96543
Populate Ack for every RPC
...
Also make error strings in Ack and RPC failure consistent
2019-02-16 20:38:25 +05:30
Srivats P
8b9cceb7ed
HostDev: Return smac/dmac resolve failure via RPC
2019-02-09 17:16:31 +05:30
Srivats P
88b3c287d0
Track smac/dmac resolve failures when building packet list
2019-02-05 18:31:43 +05:30
Srivats P
2726192b9c
HostDev: Print interfaceInfo for debug purposes
2019-01-15 19:07:55 +05:30
Srivats P
86150a7e46
HostDev: Create Host Device even if no IP is configured
2019-01-14 18:26:24 +05:30
Srivats P
bac7fba1de
HostDev: Fix Win crash if a NIC doesn't have IP address
2019-01-14 18:10:47 +05:30
Srivats P
178b942d6e
HostDev: Start/stop emulation based on no. of deviceGroups
...
Host Devices are included in deviceCount() but not in deviceGroupCount()
and emulation is not applicable to Host devices
2018-12-23 21:54:38 +05:30
Srivats P
7e476a8361
HostDev: Return QString to avoid accessing out of scope variable
...
errMsg used toLocal8Bit() which uses a temporary stack variable which
could go out of scope if the function is not inlined by compiler, so
avoid it by returning QString and use qPrintable
2018-12-23 21:50:46 +05:30
Srivats P
edd326fb24
HostDev: Refactor device list(s) ops
...
Use function(s) to hide the insertion/removal from multiple internal
lists
2018-12-23 21:49:21 +05:30
Srivats P
e6592c03a2
HostDev: Fix another bunch of FIXME/TODOs
2018-12-12 22:00:09 +05:30
Srivats P
112c3ff788
HostDev: Fix typo causing Linux build break
2018-12-11 21:27:57 +05:30
Srivats P
545f740676
HostDev: Fixed a bunch of FIXME/TODOs
2018-12-11 18:57:53 +05:30
Srivats P
12d6713491
Fix MacOS build break due to missing SA_SIZE definition
2018-12-10 18:00:00 +05:30
Srivats P
5956de4f6f
HostDev: Add BSD host device
2018-12-08 11:40:57 +05:30
Srivats P
d8bae11144
HostDev: Fix MacOS build break
2018-10-31 21:19:01 +05:30
Srivats P
7696f7d8f9
HostDev: Add BSD interface info
2018-10-31 19:59:08 +05:30
Srivats P
db446966f7
HostDev: Fix symbol clash between net/if.h and libnl use of linux/if.h
2018-09-08 13:18:46 +05:30
Srivats P
a1155b0022
HostDev: Fix IPv6 gw search code
2018-09-08 17:08:53 +05:30
Srivats P
c5c071ee56
HostDev: Fix linux scope in qmake .pro
2018-09-02 21:06:08 +05:30
Srivats P
73043f6fe6
HostDev: Added Linux host device code
2018-09-02 19:45:08 +05:30
Srivats P
f58c4e309c
HostDev: Add IPv6 support for Windows hosts
2018-08-15 10:51:04 +05:30
Srivats P
ffa0fdaa74
HostDev: Use unused constants
2018-07-31 22:24:31 +05:30
Srivats P
86ab58ae8c
HostDev: Remove unused constants
2018-07-31 22:04:10 +05:30
Srivats P
34323bb187
Merge branch 'master' of D:/srivatsp/projects/ostinato/master into hostdev
2018-07-31 20:27:40 +05:30
Srivats P
fce1df8dab
HostDev: Print both code and string for errors (win32)
2018-07-31 18:11:29 +05:30
Srivats P
1b74c55fee
HostDev: Squelch unused warning
2018-07-27 18:54:21 +05:30
Srivats P
205663e59e
Enable c++11 for drone server
2018-07-27 17:25:43 +05:30
Srivats P
fc31e52f61
HostDev: #ifdef Windows code
2018-07-26 21:20:58 +05:30
Srivats P
bc972e4476
HostDev: Added infra and windows IPv4 implementation
2018-07-26 20:53:33 +05:30
Srivats P
0d5e836d3f
HostDev: Refactored Device into base Device and EmulDevice
2018-07-19 18:54:01 +05:30
Srivats P
9a4e7e7550
Silence warnings
2018-05-22 21:48:21 +05:30
Bernhard Ehlers
1d8bb9f4df
Fix warnings about DumpView::dataChanged and struct StatsTuple
2018-05-21 21:31:44 +02:00
Srivats P
016694f1fe
Use %ll instead of PRI since Windows dev env has been upgraded
2018-05-20 13:33:38 +05:30
Srivats P
e1194a1db3
Check for active stream count when building interleaved packet list
2018-05-10 21:34:51 +05:30
Srivats P
1cddfbf2ec
Use Windows' connection name as the port description
...
... instead of the PCAP returned description. This allows for a better
UX since user can more easily identify which port is which.
This will work only Windows Vista and higher since IPHLPAPI.DLL has
published APIs only for these versions. Older windows versions such as
XP will continue to use the PCAP returned description
Fixes #222
2018-05-07 22:05:04 +05:30
Srivats P
a16eefbff4
Treat warnings as errors and fix existing warnings
2018-04-20 20:50:51 +05:30
Srivats P
90fe2080c1
Debug Xcode build failure 8/...
2018-03-19 20:14:30 +05:30
Srivats P
7a61d14243
Fix Travis build issues
2018-03-16 21:59:34 +05:30
Srivats P
9f4b70c5a8
Port server code from Qt4 to Qt5
...
Verification/testing of porting changes is pending
2018-03-15 19:34:42 +05:30
Srivats P
f82cf933b4
Print PCAP library version at drone startup
2018-02-08 22:39:22 +05:30
Srivats P
f756ead433
Add Tx/Rx bps to GUI stats window
...
bps stats are derived from the Bps stats and represent line rate taking
into account the per packet overhead on the line with the following
assumptions -
* Link type is Ethernet
* Bps (and total Bytes) stats don't include the 4-byte FCS
Fixes #241
2018-01-31 16:03:34 +05:30
Srivats P
c0f94ec58c
Use static linking on win32
2017-12-07 19:04:18 +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
57e8fe7236
UX: Report more drone startup errors
...
* Changed drone exit code from -1 to 1 'coz typically exit codes are
between 0 and 255
* Detect and report drone TCP port bind failure
* In all the following drone errors are reported (including previous
commits) -
* Drone already running (TCP port bind failure)
* Drone executable not found
* Packet.dll not found (Win32 only)
* The following conditions should NOT be reported
* Start/Stop Ostinato
* Stop before 5sec
* Stop after 5sec
2017-09-26 19:59:49 +05:30
Srivats P
a2b349e5b7
Inform user about Drone version incompatibility
2017-09-25 21:26:57 +05:30
Srivats P
d58b614e67
sign: Exclude ICMP packets from Rx Stream Stats
2017-02-16 21:32:01 +05:30
Srivats P
13e28cff68
sign: Fix Tx stream stats counted as Rx on some platforms
...
On platforms that don't support filtering IN/OUT using
pcap_setdirection() - e.g. Windows, adjust Rx stats appropriately
2017-01-09 18:57:38 +05:30
Srivats P
8f97a69220
sign: Refactor StreamStatsTracking methods
...
Start/StopStreamStatsTracking() methods made private helper functions
specific to PcapPort. AbstractPort::setStreamStatsTracking() virtual
function should be implemented by subclasses as required
2016-12-07 18:19:09 +05:30
Srivats P
35c56b9181
sign: Calculate stream stats only if configured
...
Stream Stats Rx and Tx both are calculated only if 'Track Stream Stats'
is configured on the port
2016-12-06 21:41:47 +05:30
Srivats P
028843c55a
sign: Refactor AbstractPort::setStreamSatsTracking
...
Move start/stop stream stats tracking inside setStreamStatsTracking. In
future, maybe convert setStreamStatsTracking to virtual function?
2016-12-06 18:30:26 +05:30
Srivats P
de503d8d96
sign: Fix crash when doing TX on a streamless port
...
Ensure packetListSize_ is non zero to avoid division by zero. Also reset
packetListSize_ to 0 in the constructor - call clearPacketList() to do
this
2016-11-29 18:20:00 +05:30
Srivats P
b622cc8e72
sign: add #define and #include for PRIu64
2016-11-27 13:35:59 +05:30
Srivats P
4f8ee757b3
sign: print Tx stream stats related vars for debug
2016-11-27 12:35:33 +05:30
Srivats P
bf161811b4
sign: Add Stream Stats button to GUI port config
2016-11-21 18:39:55 +05:30
Srivats P
7366e5d2e6
sign: fix yet another build break
2016-11-18 21:29:45 +05:30
Srivats P
b4beda7c30
sign: NOCAPTURE_LOCAL is not reqd since we don't tx on this handle
2016-11-18 21:12:56 +05:30
Srivats P
e7ed15fc89
sign: fix loopback problem (tx pkts rcvd by rxstats thread) on non-Windows platforms
2016-11-18 20:57:50 +05:30
Srivats P
c45bbdaa10
sign: fix non-Windows build break
2016-11-18 20:51:30 +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
defdc218bd
sign: fix the tx stream stats calculation and update associated test case
2016-11-15 22:23:55 +05:30
Srivats P
f8575ef101
sign: post tx stream stats collection; testing pending
2016-11-13 19:11:24 +05:30
Srivats P
afcb4126b5
sign: port stream tx stats are updated when TxThread finishes; actual Tx stream stats collection by TxThread is still pending
2016-11-11 21:22:07 +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
bf92ea09df
sign: TDD test script for stream stats
2016-11-06 21:28:31 +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
9de3f96b20
sign: Do not allow port TxMode/StreamsType to be changed while tx is on
2016-10-27 21:44:08 +05:30
Srivats P
a79bbb1fcd
sign: signed tx stats infra; actual tx signing pending
2016-10-23 17:24:23 +05:30
Srivats P
31c2cd2dcb
sign: refactored tx stats into a new PcapTxStats class
2016-10-19 18:52:35 +05:30
Srivats P
831b5c0916
Interleaved mode updatePacketList - just clear list if there are no streams. Fixes #195
2016-09-21 20:26:08 +05:30
Srivats P
523258442c
Precalculate mask and subnet for use during emulation rx/tx
2016-09-17 14:34:44 +05:30
Srivats P
f86ce2603d
Bugfix: use default gateway for off subnet destinations in all cases - fixes #196
2016-09-17 12:16:53 +05:30
Srivats P
12351d6304
sign: Refactored PortTransmitter into PcapTransmitter and PcapTxThread classes. Also broke out PacketSequence and Timestamp stuff into their own files. No change in functionality.
2016-09-13 19:05:24 +05:30
Srivats P
eba14bf9a3
sign: fix build break for non Windows platforms
2016-09-06 20:49:07 +05:30
Srivats P
20fa1dcb69
sign: refactor (Pcap)PortTransmitter into a separate file
2016-09-06 18:50:08 +05:30
Srivats P
10559c2a56
sign: stats infra extended for sign stats
2016-08-22 23:26:33 +05:30
Srivats P
fdceca71e8
Resolve for mcast dstIp should return mcast dmac
...
Fixes #192
2016-08-15 21:20:19 +05:30
Srivats P
cd100aa6e0
Drone checks for updated software version at startup
2016-06-07 21:11:38 +05:30
Srivats P
4a2c0066b9
Use explicit Recursive ReadWrite lock (needed by Qt >= 4.4); fixes #186
2016-06-03 18:54:14 +05:30
Srivats P
2acfb3f25a
Fix warnings introduced by recent feature development
2016-06-01 20:51:29 +05:30
Srivats P
b6a6b776e1
Open Session - Drone on Windows now sends actual /Device/NPF_XXXX as port names - client sets up the ifX style alias and uses that all places; this was needed for comparison of port names while opening sessions for Drones running on Windows
2016-05-18 18:37:48 +05:30
Srivats P
8b80b4c3ef
Device Emulation (contd.): Checked and decided on a couple of FIXMEs/TODOs
2016-03-24 18:47:43 +05:30
Srivats P
fbb56720ba
Device Emulation (contd.): Renamed Device List and Device Neighbor List fields so that the names are better reflective of what they contain
2016-03-22 20:18:53 +05:30
Srivats P
72bab2737f
Device Emulation (contd.): 'Resolve Neighbors' will now resend ARP/NDP requests for unresolved entries
2016-03-17 20:12:13 +05:30
Srivats P
259dafa3e9
Device Emulation (contd.): Fixed bug where DeviceNeighborList.device_index did not match the correct device in PortDeviceList
2016-03-15 18:15:35 +05:30
Srivats P
7561b09c1e
Device Emulation (contd.): Implemented display of NDP Cache Device Detail; also fixed missing clear of NDP cache on server
2016-03-14 21:16:46 +05:30
Srivats P
db8ad92738
Device Emulation (contd.): Assign a random mac address to a DeviceGroup at alloc time to ensure unique device keys when enumerating devices from device groups
2016-03-07 21:40:48 +05:30
Srivats P
600bdc1946
Device Emulation (contd.): Add check for duplicate/non-existing devices when deviceManager enumerates devices
2016-03-07 18:42:14 +05:30
Srivats P
3040c72181
Device Emulation (contd.): Optimize getDeviceMac() and getNeighborMac() to return 0 if no devices are configured
2016-01-28 21:21:24 +05:30
Srivats P
f6c852495d
Device Emulation (contd.): resolveNeighbors() now resolves the device gateway also in addition to looking at transmit packet content to figure out which IPs to resolve
2016-01-28 20:01:19 +05:30
Srivats P
754a9ac20e
Merge branch 'master' into emul
2016-01-27 18:46:07 +05:30
Srivats P
4f6195b8ba
Bugfix: On Linux, if a port is unusable for any reason (e.g. if pcap_open failed), it is deleted - at this time, it should also be removed from the allPorts_ list otherwise subsequent traversal of the list accesses the freed LinuxPort object leading to crash.
...
Fixes #174
2016-01-14 20:09:42 +05:30
Srivats P
07dd945f50
Device Emulation (contd.): Lookup NDP Cache for IPv6 neighbor mac
2016-01-13 21:15:47 +05:30
Srivats P
21197146e2
Device Emulation (contd.): Create/Update NDP entry when NS with source TLV received; check for NDP entry when sending IPv6 packet
2016-01-12 21:02:19 +05:30
Srivats P
46a09a82e4
Device Emulation (contd.): Reduced pcap timeout to improve ping response times
2016-01-12 19:08:01 +05:30
Srivats P
3afcb72b8d
Device Emulation (contd.): Implemented IPv6 ping (echo) reply
2016-01-12 19:03:52 +05:30
Srivats P
f88f8ebd38
Device Emulation (contd.): Fix incorrect capture filter
2016-01-08 21:59:34 +05:30
Srivats P
04147076c4
Device Emulation (contd.): Implemented responding IPv6 NS with NA
2016-01-08 20:01:42 +05:30
Srivats P
eff603304e
Device Emulation (contd.): Receive, parse IPv6 Neigh Advt and update NDP Table
2016-01-06 18:10:28 +05:30
Srivats P
d9be523827
Device Emulation (contd.) - Implemented sending of IPv6 Neighbor Solicitation packets for IPv6 resolution
2016-01-01 20:17:54 +05:30
Srivats P
0b573d572e
Device Emulation (contd.) - added intelligence for single or dual ip stack; fixed pktBuf memory leak
2016-01-01 11:59:31 +05:30
Srivats P
aaf6dbcbf2
Device Emulation (contd.) - Implemented IPv6 device creation and deletion
2015-12-31 20:17:56 +05:30
Srivats P
ea44e55e78
Feature (contd.): Device Emulation - Test case and code to support sending ping echo reply in response to received ping echo request
2015-12-23 21:18:25 +05:30
Srivats P
03f427ce91
Feature (contd.): Device Emulation - Test case and code to support non default vlan TPID
2015-12-20 19:33:02 +05:30
Srivats P
71d04b63bc
Feature (contd.): Device Emulation - refactored and moved EncapEmulation as a native field of DeviceGroup instead of a extension - now the device_count comment of "per encap" makes more sense with encap at the same level as device_count
2015-12-16 20:48:17 +05:30
Srivats P
ad1fb5fc37
Feature (contd.): Device Emulation - fixed problems in code and in test case for multi-tagged vlans
2015-12-14 21:04:58 +05:30
Srivats P
447b175516
Merge branch 'master' into emul
2015-12-05 21:47:56 +05:30
Srivats P
8a8242fbda
CI: Fix BSD/OSX compilation by adding missing #include
2015-12-05 19:22:06 +05:30
Srivats P
c022290da1
Merge branch 'master' of https://github.com/pstavirs/ostinato into emul
...
Conflicts:
server/pcapport.cpp
2015-12-01 21:00:41 +05:30
Srivats P
bed034a08b
Merge branch 'master' into emul
2015-12-01 19:16:24 +05:30
Srivats P
dc28dfefd6
Feature (contd.): Device Emulation - sort the device list returned by getDeviceList() RPC
2015-11-29 21:18:31 +05:30
Srivats P
3a5396c865
Feature (contd.): Device Emulation - Got rid of a bunch of FIXMEs and all trailing whitespace (in the code added for this feature)
2015-11-14 17:06:43 +05:30
Srivats P
7daf75c95a
Feature (contd.): Device Emulation - added getDeviceList() RPC
2015-11-11 13:05:15 +05:30
Srivats P
492a207ede
Feature (contd.): Device Emulation - reorganized/renamed some emulation RPCs and messages
2015-11-11 10:52:29 +05:30
Srivats P
280d4bedaa
Feature (contd.): Device Emulation - Mac protocol can now 'resolve' src/dst mac corresponding to the packet from the Device Emulation infra
2015-11-10 19:40:32 +05:30
Srivats P
efdfa7f95d
Feature: Ostinato client now accepts hostnames for drones and does DNS resolution for the same; IPv6 addresses are also accepted. Introduced Drone setting to listen to specific or 'any' IPv4 (or IPv6) address
...
Fixes #152
2015-11-06 18:57:07 +05:30
Srivats P
01e8524491
Regression Fix: Fix compilation issue on Windows introduced by the RateAccuracy feature
2015-11-06 18:53:27 +05:30
Srivats P
9302e5f17c
Feature (contd.): Device Emulation - added resolveNeighbors() and related RPC code and implementation to send out ARP Requests and build the ARP Table on each device
2015-11-04 18:50:08 +05:30
Srivats P
06182a435c
Bugfix: Introduced RateAccuracy setting for Drone to conserve CPU at the cost of accuracy
...
Fixes #151
2015-10-12 18:11:30 +05:30
Srivats P
8c41b536a4
Feature (contd.): Device Emulation - fixed bug where we receive back a transmitted emulation packet
2015-10-03 21:27:15 +05:30
Srivats P
fcfcfe6887
Feature (contd.): Device Emulation - Removed 'mode' from both vlan and device; will reintroduce or replace with something else when needed
2015-10-03 20:15:20 +05:30
Srivats P
0c98e30a93
Feature (contd.): Device Emulation - added test cases for multiple ip4 devices with and without VLANs; fixed bugs discovered via these cases
2015-10-03 13:18:44 +05:30
Srivats P
246bc95c74
Feature (contd.): Device Emulation - user now configures a device group instead of a single device for easier creation of multiple devices; refactored and redistributed functionality between DeviceManager and Device; external functionality wise same as last commit; added initial code for vlans but not tested
2015-09-20 17:49:15 +05:30
Srivats P
ab433dc22b
Feature: Device Emulation - first cut working code
2015-09-14 18:19:52 +05:30
Srivats P
449facd119
Fix PacketSet parameters' calculation when sending bursts so that actual transmit rate matches configured rate
...
Fixes issue #157
2015-09-08 18:46:56 +05:30
Srivats P.
25ef8dd1e4
Infra: Added code to disable notifications for python-ostinato scripts since python-ostinato does not expect and hence does not know how to deal with notifications
...
Updates issue 144
2015-05-01 21:41:04 +05:30
Srivats P.
fbaf6edcdf
Bugfix: Use 'smart' pointer to refcount and auto-destruct to avoid notification memory leaks
...
Updates issue 144
2015-04-28 18:45:35 +05:30
Srivats P.
ad6baea4af
Infra: On a port modify, all clients are sent notifications of the same - they can request for port config again to get latest config
...
Updates issue 144
2015-04-24 20:53:00 +05:30
Srivats P.
a9da643fb2
Feature: Reserve Ports for cooperative use of shared drone. If a port is reserved the GUI will display the username of the owner but others can still view and control the port; in other words, we just potentially prevent unintentional usage of other people's ports, users still need to play nice with each other!
...
Fixes issue 144
2015-04-16 22:20:07 +05:30