summaryrefslogtreecommitdiff
path: root/src/lib/shm_flow_set.c
Commit message (Collapse)AuthorAgeFilesLines
* build: Update email addressesDimitri Staessens2021-01-031-2/+2
| | | | | | | | The ugent email addresses are shut down, updated to Ouroboros mail addresses. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* build: Update copyright to 2021Dimitri Staessens2021-01-031-1/+1
| | | | | | | Happy New Year, Ouroboros! Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* irmd: Fix cleanup of shm_flow_set0.17.1Dimitri Staessens2020-03-201-1/+1
| | | | | | | | | The shm_flowset destroy was using the irmd pid, resulting in wrong unlinks. The irmd was not cleaning up the process table, resulting in shm leaks if there were still running processes on exit. 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>
* ipcpd: Fix use after free and uninitalized valueSander Vrijders2019-06-211-2/+2
| | | | | | | | | | This fixes a use after free in an error condition, and makes sure that pid is set in the flow_set early on, so flow_set_destroy won't create a prefix with an uninitialized pid in case of an error in shm_flow_set_create. Signed-off-by: Sander Vrijders <sander@ouroboros.rocks> Signed-off-by: Dimitri Staessens <dimitri@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>
* irmd: Manage shm_flow_set from IRMdDimitri Staessens2018-12-221-84/+63
| | | | | | | | | This moves the creation and destruction of shm_flow_set shared memory structures from the init to the IRMd. Now the management of all shared data objects is performed by the IRMd. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Rename port_id to flow_idDimitri Staessens2018-10-051-20/+20
| | | | | | | Renames port_id to flow_id according to updated nomenclature. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Check return values init functionsSander Vrijders2018-09-281-19/+25
| | | | | | | | | This will check the return values of init functions so that the code is more robust. It also removes a duplicate init in the timerwheel, checks for buffer overflows in the RIB and checks string lengths. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* lib: Add event types to fqueueDimitri Staessens2018-05-141-16/+22
| | | | | | | | | | | The event type of the current event in the fqueue can now be requested using the fqueue_type() command. Currently events for packets (FLOW_PKT), flows (FLOW_UP, FLOW_DOWN) and allocation (FLOW_ALLOC, FLOW_DEALLOC) are specified. The implementation only tracks FLOW_PKT at this point. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Fix bad unlinking of old shared memorySander Vrijders2018-04-251-5/+1
| | | | | | | | | | A previous commit tried to stat the shared memory file in case it was already there, but stat does not seem to work for shared memory files. This simply omits the O_EXCL attribute upon creation of the shared memory file, since pids are unique anyway. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* lib: Unlink old flow set shared memorySander Vrijders2018-04-251-0/+4
| | | | | | | | | This unlinks previously allocated flow set shared memory. It could be lingering in case an application with the same pid was SIGKILLED, and didn't clean up its flow set shared memory. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@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>
* lib, tools: Rename application process and instanceDimitri Staessens2017-12-021-23/+23
| | | | | | | | | | | This refactors ouroboros to use "program" instead of "application process" and "process" instead of "application process instance" to align with current naming in current Operating Systems courses instead of the ISO nomenclature adopted by RINA. This change permeates through the entire implementation. Also contains some minor other refactors. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Fix timeout value of flow_event_waitSander Vrijders2017-08-221-1/+1
| | | | | shm_flow_set_wait was called with a timeout even though flow_event_wait was called with timeout NULL.
* build: Revise the build systemdimitri staessens2017-08-211-12/+31
| | | | | | | | | | 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-8/+3
| | | | | | | | | | 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
|
* build: Add check for robust mutexesSander Vrijders2017-08-031-3/+3
| | | | | | This adds a check for robust mutexes. The constant HAVE_ROBUST_MUTEX is set accordingly in config.h. It also adds some other fixes to make the prototype compile on the Hurd.
* lib: Revise flow allocation APIdimitri staessens2017-03-311-1/+2
| | | | | | 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.
* Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into beSander Vrijders2017-03-211-1/+2
|\
| * Change email addresses to ugent.beSander Vrijders2017-03-031-1/+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.
* | irmd: Fix timeouts in reg_entrydimitri staessens2017-03-211-2/+0
|/ | | | | This fixes bad timedwaits for the state of the reg_entry. Also slightly revised timedwaits throughout the prototype.
* 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.
* 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.
* lib: Remove logs from stable sourcesdimitri staessens2016-12-031-88/+60
| | | | | This removes log output in applications and some size_t printf errors when compiling on 32 bit machines.
* lib: Have flow_event_wait return non-zero valuedimitri staessens2016-10-301-9/+9
| | | | | | 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: Revert bad fqueue modificationdimitri staessens2016-10-221-1/+3
| | | | | An untested (and wrong) modification to the fqueue was mistakenly added to a previous commit. This corrects the bad code.
* build: Compile with strict conversiondimitri staessens2016-10-221-23/+22
| | | | | This has the code checked with -Wcast-qual and -Wconversion flags. These flags were removed because SWIG generated code fails.
* lib: Move rbuff creation/destruction to IRMddimitri staessens2016-10-211-1/+0
| | | | | This stabilises flow allocation now that the rbuffs are created upon flow allocation. Only the IRMd can sync this process sufficiently.
* lib: Demultiplex the fast pathdimitri staessens2016-10-211-0/+408
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.