summaryrefslogtreecommitdiff
path: root/src/tools/oping/oping_client.c
Commit message (Collapse)AuthorAgeFilesLines
* tools: Fix error handling in oping write threadDimitri Staessens2020-10-111-3/+0
| | | | | | | | | The function was returning under a cleanup handler, which is not allowed. We don't do anything with the return value if the write thread ends, so just stopping the thread is fine. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* tools: Stop oping client cleanly on bad writeDimitri Staessens2020-05-021-0/+1
| | | | | | | | On a bad write, the writer thread would shutdown, leaving the client hanging. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* lib: Return number of written bytes on flow_write0.17.0Dimitri Staessens2020-03-151-1/+1
| | | | | | | | | This is more in line with the write() system call and prepares for partial writes. Partial writes are disabled by default (and not yet implemented). Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* build: Update copyright to 20200.16.0Dimitri Staessens2020-01-021-1/+1
| | | | | Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* build: Update copyright to 2019Dimitri Staessens2019-02-051-1/+1
| | | | | | | Updates the copyright notice in all sources to 2019. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd, lib, irmd, tools: Change SDU to packetSander Vrijders2018-10-051-2/+2
| | | | | | | | This will change SDU (Service Data Unit) to packet everywhere. SDU is OSI terminology, whereas packet is Ouroboros terminology. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* tools: Add quiet option to opingDimitri Staessens2018-06-061-16/+19
| | | | | | | | | This adds a --quiet -Q option to oping so it will only print the statistics summary. Also fixes a division by 0 if duration is specified with interval 0. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* tools: Support qosspecs in opingDimitri Staessens2018-06-051-1/+1
| | | | | | | | The oping tool can now select a qos spec to use. Allowed specs are predefined an chosen using "raw", "best", "video" or "voice". Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* tools: Add out-of-order statistics to opingDimitri Staessens2018-06-051-3/+15
| | | | | | | | | This adds out-of-order statistics to the oping tool. A packet is considered out-of-order if its sequence number is lower than the highest sequence number already received. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* tools: Add timestamp option to opingSander Vrijders2018-06-011-0/+8
| | | | | | | | | This adds a timestamp option to oping, similar to the one in regular ping and rinaperf, so that we can more easily correlate time and latency. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* tools: Fix memleaks as reported by cppcheckSander Vrijders2018-05-251-1/+3
| | | | | | | This fixes two memleaks which were reported by cppcheck. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* tools: Disable partial reads in opingDimitri Staessens2018-05-071-0/+2
| | | | | | | | | The oping tool was using a 1500 byte buffer, but didn't account for partial reads when sending 1500 byte packets. This disables the partial reads. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Use PTHREAD_COND_CLOCK for blocking reads0.10.6Dimitri Staessens2018-03-101-2/+5
| | | | | | | | | | | The rbuff uses the PTHREAD_COND_CLOCK for its condition variables, but the flow_read was passing a time it got from the CLOCK_REALTIME_COARSE clock. This causes the blocking reads not to timeout correctly. The oping was updated to detect server timeouts and finish gracefully. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* tools: Don't cancel reader thread in oping0.10.5Dimitri Staessens2018-03-051-2/+0
| | | | | | | | The reader thread was cancelled as soon as the writer was finished, which resulted in missed responses and misreported packet loss. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Allow out-of-tree build of toolsDimitri Staessens2018-02-141-20/+8
| | | | | | | | | | This removes the dependencies for the tools on some ouroboros internal headers (endian.h and time_utils.h) so they can be built out-of-tree. The echo-app tool has been renamed oecho and the cbr tool has been renamed ocbr. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* include, src: Update copyright to 2018Dimitri Staessens2018-01-091-1/+1
| | | | | | | Happy New Year, Ouroboros. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* tools: Fix SEGV in oping clientDimitri Staessens2017-11-221-4/+8
| | | | | | | | | | | The oping client tried to cancel non-created pthreads if it was killed during flow allocation, which caused a SEGV. The threads are now stopped using a variable. Fixes bug #2. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* tools: Send time in oping packetsDimitri Staessens2017-11-191-28/+19
| | | | | | | | The oping tool now stores the time it sent the packet inside the SDU, simplifying the implementation. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* tools: Change license to 3 clause BSDDimitri Staessens2017-10-241-10/+26
| | | | | | | | | A more permissive license is needed on the tools since they serve as example code for programs built on top of the ouroboros-dev and ouroboros-irm libraries. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Add fccntl configuration commanddimitri staessens2017-08-311-2/+2
| | | | | | | This replaces the flow_set_* commands with a single fccntl command that can configure flows and the FRCT instance. For more details, see "man 3 fccntl".
* build: Revise the build systemdimitri staessens2017-08-211-4/+0
| | | | | | | | | | This revises the build system to have configuration per system component. System settings can now be set using cmake. The standard compliance defines were removed from configuration header and are set in the sources where needed. Also some small code refactors, such as moving the data for shims out of the ipcp structure to the respective shims were performed.
* build: Replace fsf snail mail with contact URLdimitri staessens2017-08-131-1/+1
|
* tools: Fix oping client outputdimitri staessens2017-04-031-2/+2
|
* tools: oping: Fix bad calculationSander Vrijders2017-04-011-1/+1
| | | | This fixes a potential overflow when calculating the packet loss.
* lib: Revise flow allocation APIdimitri staessens2017-03-311-10/+1
| | | | | | The flow_alloc_res and flow_alloc_resp calls have been removed. The flow_alloc and flow_accept calls are now both blocking and take an additional timeout argument.
* Change email addresses to ugent.beSander Vrijders2017-03-031-2/+2
| | | | | | | Our mailserver was migrated from intec.ugent.be to the central ugent.be emailserver. This PR updates the header files to reflect this change as well. Some header files were also homogenized if the parameters within the functions were badly aligned.
* lib: Remove application entity nameSander Vrijders2017-02-241-1/+1
| | | | | The AE name should not be passed over the layer boundaries. If an application has more than one AE it should exchange this in CACEP.
* tools: Fix overflow bug in opingdimitri staessens2017-02-221-9/+10
| | | | | | Sometimes the receiver thread got the SDU before the writer thread has set the sent time when testing over the local. The sent time is now written before actually sending to avoid this.
* build: Update licenses and copyrightdimitri staessens2017-01-091-1/+1
| | | | | Copyright is set to 2016 - 2017. License text on includes and sources in the library are changed to indicate the LGPLv2.1 license.
* ouroboros: Correct license statementsdimitri staessens2016-12-241-3/+2
| | | | | This corrects the license statements on all files. Installed headers are LGPLv2.1, the rest of the code is GPLv2.
* src, tools: Set/get timeout and get qos for flowsdimitri staessens2016-12-121-71/+44
| | | | | | | | | | | | | | | | Receiver timeouts can now be set on a flow using the flow_set_timeout function. Specifying NULL disables the timeout. The flow_get_timeout function gets the value for the timeout. This commit also deprecates fcntl in favor of flow_get_flags and flow_set_flags functions. struct qos_spec is typedef'd as a qosspec_t. The tools and cdap.c are updated to use the new API. Fixes a bug in operf client where the client's writer thread wouldn't cancel on SIGINT.
* tools: Fix compilation issues on 32 bit machinesdimitri staessens2016-12-021-1/+1
| | | | | | size_t is 32 bits on those machines, failing as an argument to printf. Some variables in oping and operf were changed to uint32_t and uint64_t to avoid issues.
* lib: Clean up flow if alloc_res failsdimitri staessens2016-10-271-37/+64
| | | | | | | | | If alloc_res fails all resources will be cleaned, except for the assigned flow_descriptor, which must be released with a dealloc call. Calling dealloc after a failed flow_alloc will not try to destroy the already cleaned up flow in the IRMd and IPCPs. Also fixes some memleaks in the oping client.
* tools: Fix memory leaks in opingdimitri staessens2016-10-241-6/+12
|
* build: Compile with strict conversiondimitri staessens2016-10-221-5/+5
| | | | | This has the code checked with -Wcast-qual and -Wconversion flags. These flags were removed because SWIG generated code fails.
* build: Comply with -Wextra compiler flagdimitri staessens2016-10-211-1/+6
| | | | | This reduces the risk for some bugs, for instance due to signed/unsigned mismatches and unused variables.
* lib: Demultiplex the fast pathdimitri staessens2016-10-211-8/+17
| | | | | | | | The fast path will now use an incoming ring buffer per flow per process. This necessitated the development of a new method for the asynchronous io call, which is now based on an event queue system for scalability (fqueue). The ipcpd's and tools have been updated to this API.
* lib: Add a type for struct flow_setdimitri staessens2016-10-091-2/+1
| | | | | | The struct flow_set can now be accessed in applications as flow_set_t. Fixes some malformed lines and homogenizes output when receiving bad SDUs in the oping tool.
* ipcpd: Filter traffic on shim-eth-llcdimitri staessens2016-10-061-0/+1
| | | | Now correctly handles and drops non-ouroboros traffic.
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-041-1/+2
| | | | | | | | | | | | IPCPs can now use ap_init() to initialize the memory. All flows are accessed using flow descriptors, this greatly simplifies IPCP development. Reverts the fast path to a single ap_rbuff per process. Splits lib/ipcp into irmd/ipcp and lib/ipcp-dev. Adds a lib/shim-dev holding tailored functions for shims. Moves the buffer_t to utils.h. Fixes the shim-eth-llc length field. Removes the flow from shared.h. Fixes #4 Fixes #5
* lib: dev: Provide a set of fds to flow_selectdimitri staessens2016-09-061-1/+1
| | | | | | | The flow_select call now takes as a parameter a flow_set_t, which specifies a set of flow descriptors that will unblock the select call when an SDU for one of them arrives. The select call has been moved to its own header.
* src: Fix grammar (SDU's -> SDUs)dimitri staessens2016-09-021-1/+1
|
* tools: oping: Fix wrong delay calculationdimitri staessens2016-08-061-1/+2
|
* tools: oping: Fix client cleanupdimitri staessens2016-08-041-0/+5
|
* tools: oping: Fix division by zerodimitri staessens2016-08-041-9/+14
| | | | | When killing the oping client before it sent an SDU, some bad operations were being performed.
* tools: Add a ping applicationdimitri staessens2016-08-031-0/+234
Ouoroboros ping application mimics the GNU ping application. do "oping --help" for options.