summaryrefslogtreecommitdiff
path: root/src/lib/dev.c
Commit message (Collapse)AuthorAgeFilesLines
...
* lib, ipcpd, irmd: Fix several memleaksSander Vrijders2017-08-231-0/+1
| | | | | This fixes several memleaks as reported by valgrind. It also fixes some calls to close() with -1.
* lib: Make sender and receiver inactivity simple checksSander Vrijders2017-08-231-153/+68
| | | | | | This makes the sender and receiver inactivity timers into simple checks that compare when the last SDU was sent to the current time to set the receiver or sender inactivity.
* lib: Remove bad assertionSander Vrijders2017-08-231-1/+0
| | | | | Timeout was asserted not to be NULL, but sometimes timeout can be NULL and is a valid parameter when NULL.
* lib: Fix timeout value of flow_event_waitSander Vrijders2017-08-221-4/+6
| | | | | shm_flow_set_wait was called with a timeout even though flow_event_wait was called with timeout NULL.
* lib: Fix calling frct_clear in wrong functionSander Vrijders2017-08-221-2/+2
| | | | frct_clear was called in ouroboros_fini instead of ouroboros_init.
* lib: Fix CRC check and add frct_clearSander Vrijders2017-08-221-13/+30
| | | | | | This adds the CRC check by default on outgoing SDUs. It fixes some errors in the serialization and deserialization of the SDU. frct_clear was added to avoid bad initialization of the array of FRCT instances.
* lib: Make timerwheel a passive componentSander Vrijders2017-08-221-8/+13
| | | | | | This turns the timerwheel into a passive component since it is used by application using the library. The user of the timerwheel now has to call timerwheel_move to advance the timerwheel.
* build: Revise the build systemdimitri staessens2017-08-211-6/+9
| | | | | | | | | | 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.
* lib: Add basic FRCT mechanismsSander Vrijders2017-08-171-70/+370
| | | | | | | | | | This adds the basic FRCT mechanisms to the library. Upon flow alloc or accept an FRCT instance is now created and used when reading or writing to the flow. The timerwheel has been refactored to allow recharging timers and removing them and is now part of the library. The first SDU sent over the connection has the DRF set and this initializes the connection. Sender and receiver inactivity timers are added.
* build: Replace fsf snail mail with contact URLdimitri staessens2017-08-131-2/+1
|
* lib: Fix data race on fqueues bitmapdimitri staessens2017-08-131-126/+143
| | | | | | This locks the process when allocating and destroying flow_sets. The flows_lock has been renamed to lock. Refactors and fixes a memleak in ouroboros_init.
* lib: Simplify initializing flowsSander Vrijders2017-08-011-291/+80
| | | | | This refactors dev.c to have a common function called init_flow that is called whenever a flow is allocated in dev.c
* lib: Fix memleak in FRCT enrollmentdimitri staessens2017-07-031-0/+3
|
* lib, ipcpd, irmd: Add full-fledged QoSSander Vrijders2017-06-211-32/+84
| | | | | | | This adds more Quality of Service support to Ouroboros. One part is the network specific characteristics such as bandwidth, delay, ... The other part is end-to-end QoS like reliability, window based flow control, ...
* lib: include missing headers in dev.cdimitri staessens2017-06-211-8/+8
| | | | | The dev.c source file had some missing include headers. This PR fixes inconsistencies between the definitions and declarations in ipcp-dev.h
* lib: Fix some bugs in dev.cdimitri staessens2017-05-231-45/+55
| | | | | | | Fixed releasing an allocated fd on failure. As the sending of dealloc messages has been deprecated, dealloc was simplified by removing a stale block of code (replaced with an assertion). Fixed reading some variables without a necessary lock.
* ipcpd: Remove FRCT from normal IPCPdimitri staessens2017-05-101-1/+1
| | | | | | | In order to ensure 100% reliable transfer, the protocol state machine that takes care of retransmission and SDU ordering has to be in the application. Flow allocation in the normal now uses fds. The PDU_type field was deprecated and AE's within the DIF can use reserved fds.
* lib: Remove obsolete lock in dev.cdimitri staessens2017-04-281-135/+5
|
* lib: Add call to reserve blocks in rdrbuffdimitri staessens2017-04-261-1/+27
| | | | | | | This adds a call ipcp_sdb_reserve to reserve memory in the rdrbuff without directly writing to a flow. The ipcp_flow_del function was renamed to ipcp_sdb_release. The functions operating on sdbs are moved to their own header.
* include, lib: Rename ap_init/ap_finidimitri staessens2017-04-131-2/+2
| | | | Fixes #35
* Merged in dstaesse/ouroboros/be-hashes (pull request #479)dimitri staessens2017-04-131-3/+6
|\ | | | | | | lib, ipcpd, irmd: Register hash instead of name
| * lib, ipcpd, irmd: Register hash instead of namedimitri staessens2017-04-131-3/+6
| | | | | | | | | | | | | | | | | | All information passed over the IRMd/IPCP boundary for using IPC services (flow allocation, registration) is now hashed. This effectively fixes the shared namespace between DIFs and the IRMDs. This PR also fixes some API issues (adding const identifiers), shuffles the include headers a bit and some small bugs.
* | lib: Fix return values in ap_init()dimitri staessens2017-04-111-4/+4
|/
* dev: Return descriptive errors for flow_allocdimitri staessens2017-04-101-10/+10
|
* lib: Make timeout for flow allocation constdimitri staessens2017-04-101-5/+5
|
* lib, irmd: Implement flow allocation timeoutdimitri staessens2017-04-061-7/+24
| | | | | | Setting the timeouts on flow_alloc and flow_accept will now work. This makes some changes to the UNIX sockets used for management communication between the APs, IRMd and IPCPs.
* lib, irmd, ipcpd: Stabilize flow allocationdimitri staessens2017-04-041-28/+51
|
* lib: Fix missing assignment in flow_allocdimitri staessens2017-03-311-5/+13
|
* lib: Revise flow allocation APIdimitri staessens2017-03-311-135/+58
| | | | | | 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.
* lib: Fix locks in dev.cdimitri staessens2017-03-291-7/+5
|
* lib: Add queued SDUs when adding fd to flow_setdimitri staessens2017-03-211-0/+6
| | | | | This solves some race conditions where packets arrive on a flow before it is added to a flow_set.
* 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-22/+2
| | | | | 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.
* ipcpd: Silent shutdown of normaldimitri staessens2017-02-101-0/+5
| | | | | The acceptor will not log disconnects with IRMd. Unexpected disconnects will be reported and handled by management components.
* ipcpd, lib: Report IPCP creation failuredimitri staessens2017-02-091-33/+82
| | | | | | | | The IPCP will now respond with an ipcp_create_r message when it fails, informing the IRMd. Also adds some const qualifiers in the public headers and fixes some formatting in dev.c.
* lib: Fix reading from non-blocking flowsdimitri staessens2017-01-241-4/+3
| | | | | The -EAGAIN from a failed non-blocking flow read would trigger the assertion. This snuck in somehow (we need some unit tests for dev.c).
* lib: Fix return value and typo in fqueuedimitri staessens2017-01-201-1/+1
|
* build: Update licenses and copyrightdimitri staessens2017-01-091-10/+11
| | | | | Copyright is set to 2016 - 2017. License text on includes and sources in the library are changed to indicate the LGPLv2.1 license.
* lib, ipcpd, irmd: Proof of concept QoSdimitri staessens2017-01-031-18/+42
| | | | | | | | | | Now correctly relays the qoscube end-to-end in the stack. A simple function specifying the cube in the spec is used for initial testing. The translation is now done in dev.c, but it could be moved elsewhere when qos cabability matures and the need arises.
* include, lib: Report communication failure with the IRMddimitri staessens2016-12-281-31/+11
| | | | | | | An errno EIRMD has been added to errno.h to indicate failure to send a message tot the IRMd. The IRM tool will report such errors, which makes it easier for users to detect that the IRM was not started or has failed.
* lib: Fix shutdown in multithreaded programsdimitri staessens2016-12-241-6/+6
| | | | | If a thread with a pending flow terminates, ap_fini would wait for the condvar to destroy the flow indefinitely.
* lib: Initialise qos cube to best effortdimitri staessens2016-12-241-0/+2
| | | | | The QoS cubes were not initialized in dev.c, which sometimes caused segfaults in the fmgr when calling ipcp_flow_get_qoscube.
* 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.
* ipcpd, lib, irmd: Update to use qoscube_tdimitri staessens2016-12-241-5/+3
|
* src, tools: Set/get timeout and get qos for flowsdimitri staessens2016-12-121-36/+154
| | | | | | | | | | | | | | | | 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.
* lib: Remove dst_api field from rdrbuff blocksdimitri staessens2016-11-171-4/+1
| | | | | | Now that we have an rbuff per flow per AP, there is no more need to keep the dst_api in the rdrbuff. This also simplifies the sanitizer in the irmd.
* lib, ipcpd: Improve flow allocationdimitri staessens2016-10-311-91/+94
| | | | | | | All calls for opening rbuffs are now concentrated on the dev side. This allows some simplifications in the np1 calls. The ipcp_fini call will not destroy the mutex associated with the state, since the final state needs to be checked before shutting down an IPCP.
* lib: Have flow_event_wait return non-zero valuedimitri staessens2016-10-301-3/+17
| | | | | | Flow_event_wait will either return -EINVAL, -ETIMEDOUT or a positive integer indicating the number of SDUs in the fqueue. This allows to call the function as the condition for a non-terminating while loop.
* lib: Free fd when deallocating a flowdimitri staessens2016-10-301-0/+1
| | | | Fixes a little bug that sneaked in with the revised deallocation.
* lib: Clean up flow if alloc_res failsdimitri staessens2016-10-271-44/+65
| | | | | | | | | 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.