summaryrefslogtreecommitdiff
path: root/src/irmd/registry.c
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* include: Remove _DEFAULT_SOURCE in endian.hDimitri Staessens2018-09-271-0/+4
| | | | | | | | This removes the _DEFAULT_SOURCE definition in the endian header as it should not be there. This avoids double and conflicting definitions. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Simplify reg/unreg APIDimitri Staessens2018-03-221-10/+21
| | | | | | | | | | | | | | | | | | | | The reg/unreg API is simplified to registering and unregistering a single name with a single IPCP. The functionality associated with registering names was moved from the IRMd to the irm tool. The function to list IPCPs was simplified to return all IPCPs in the system with their basic properties needed for management. The above changes led to some needed changes in the irm tool and the management functions that were depending on the previous behaviour of list_ipcps. Command line functionality to list IPCPs in the system is also added to the irm tool. Some older code was refactored. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* irmd: Remove obsolete layer to name mappingsDimitri Staessens2018-03-211-93/+0
| | | | | | | | The IRMd kept a mapping from layer names to registered names, but this is obsolete since the introduction of the query functionality. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Revise Data Transfer component0.10.0Dimitri Staessens2018-02-131-34/+34
| | | | | | | | | | | This makes the TTL non-optional and allows the maximum (initial) value of the TTL to be specified at bootstrap (the default is set to 60). The fd in the DT PCI is now called EID (Endpoint ID). The names "dif" and "ae" have been replaced by "layer" and "component" respectively in all sources. 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>
* lib, tools: Rename application process and instanceDimitri Staessens2017-12-021-48/+48
| | | | | | | | | | | 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>
* irmd: Fix false alarm when registering before bindDimitri Staessens2017-11-271-1/+1
| | | | | | | | When registering a name in a dif before binding a program to it without auto, the IRMd would erroneously log that the binding failed. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Cancel tpm threads instead of marking exitdimitri staessens2017-09-301-23/+36
| | | | | | | | | This makes the threadpool use pthread_cancel instead of setting an exit flag that threadpool managed threads check periodically. This drastically reduces CPU consumption in the irmd when running a lot of applications. It requires cancellation handlers in the ipcp and irmd to be implemented to ensure safe cancellation during operation and shutdown.
* lib, ipcpd, irmd: Fix bugs reported by static analysisSander Vrijders2017-08-291-19/+31
| | | | This fixes several bugs as reported by the clang static analyzer.
* build: Revise the build systemdimitri staessens2017-08-211-1/+4
| | | | | | | | | | 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
|
* ipcpd: Allow specifying the hash algorithm to usedimitri staessens2017-04-161-2/+2
| | | | Currently CRC32, MD5, and SHA3 (224, 256, 384 and 512 bit) are supported.
* lib, ipcpd, irmd: Register hash instead of namedimitri staessens2017-04-131-15/+42
| | | | | | | | | 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, irmd, ipcpd: Stabilize flow allocationdimitri staessens2017-04-041-19/+42
|
* irmd: Keep track of qos in irm_flowdimitri staessens2017-03-311-2/+0
| | | | This fixes the bug in handling multiple concurrent flow allocations.
* irmd: Fix shutdown with active acceptdimitri staessens2017-03-291-0/+1
|
* Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into beSander Vrijders2017-03-211-2/+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.
| * lib: Remove application entity nameSander Vrijders2017-02-241-1/+0
| | | | | | | | | | 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.
* | irmd: Fix timeouts in reg_entrydimitri staessens2017-03-211-3/+3
|/ | | | | This fixes bad timedwaits for the state of the reg_entry. Also slightly revised timedwaits throughout the prototype.
* irmd: Allow time for AP to call flow_accept()dimitri staessens2017-02-121-20/+109
| | | | | | | | When there is a burst of successive flow allocations for a certain name, each such request will block a thread in the IRMD for IRMD_REQ_ARR_TIMEOUT ms to allow the application some time to respond. This refactors some parts of the IRMd.
* lib: Log to the logging systemdimitri staessens2017-02-081-7/+7
| | | | | | | | | | This removes the logfile and outputs log messages to the logging system. The creation of the logfiles (as well as the ap_init() call) were moved into ipcp_init() to simplify the IPCP creation and shutdown. Fixes #25 Fixes #27
* irmd: Handle death of IPCP gracefullydimitri staessens2017-02-041-10/+24
| | | | | | | If an IPCP SEGVs abruptly, the sanitizer in the IRMd would also cause a SEGV because of looping over a registry linked list inside another safe loop over the same list. A function is added to the registry to avoid this.
* irmd: Fix memleak in registrydimitri staessens2017-02-031-0/+1
|
* 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.
* lib: Revise implementation of listdimitri staessens2017-01-091-9/+9
| | | | Adds LGPL license to the ouroboros lists.
* irmd: Hide reg_entry internal lockdimitri staessens2016-12-281-0/+51
|
* 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, irmd, ipcpd: Add name querying to IPCPsSander Vrijders2016-10-261-41/+4
| | | | | | | | | This adds the ability to query IPCPs if a name can be reached through them, e.g. if a name is available in a DIF. This means that in the shim-udp a DNS query is performed, in the shim-eth-llc an ARP-like query has been added, in the local a check is done to see if the name is registered, and in the normal currently no application is reachable through it.
* build: Compile with strict conversiondimitri staessens2016-10-221-1/+1
| | | | | This has the code checked with -Wcast-qual and -Wconversion flags. These flags were removed because SWIG generated code fails.
* irmd, lib: Rebuild the IRMd data modeldimitri staessens2016-08-211-340/+164
| | | | | | | | | | | | | | | | | | | | | | The complete data model inside the IRMd has been restructured. The bind operation was revised to allow binding of AP and AP instances and register those names with different DIFs (see "irm bind" for details). Server applications require to call ap_init with a server name argument, client application that do not the be reachable over any DIF can call ap_init(NULL). Calling ap_init for a client with a specified name will not have adverse consequences for the application, but will consume unnecessary resources in the IRMd. Application servers can now be started at any point after the IRMd has been started. Starting servers, binding AP names and registering names in DIFs can be performed in any order that does not defy temporal logic. Supports naming instances by their pid. In case of IPCP Instances created with the IRM tool, the name assigned during "irm ipcp create" can be used. All the changes required updates in the tools.
* irmd: Graceful shutdowndimitri staessens2016-08-101-2/+0
| | | | | | Threads from the threadpool will now check the state of the IRMd and exit gracefully without a need to cancel them. This avoids the unsafe call of pthread_cancel in the signal handler.
* irmd: Fix some locking issuesdimitri staessens2016-08-091-0/+3
|
* lib: Various fixesdimitri staessens2016-08-091-0/+4
| | | | | Fix missing set of api upon flow_alloc. Various locking fixes.
* irmd: Refactor and bugfixesdimitri staessens2016-08-081-110/+3
| | | | | | | Refactors the IRMd to extract reg_api and irm_flow structures to their own sources. Fixes some locking bugs.
* irmd: registry: Fix double freedimitri staessens2016-08-051-3/+0
| | | | The req_ae_name is freed when the unpacked message is cleaned up.
* tools: oping: Fix division by zerodimitri staessens2016-08-041-1/+1
| | | | | When killing the oping client before it sent an SDU, some bad operations were being performed.
* irmd: Fix shutdowndimitri staessens2016-07-271-13/+8
| | | | | | | | When a pending accept is shutdown on irmd exit, there are no more threads running, but it should also change the state to NULL. This is now correctly handled in the cleanup of the cancellation point. Also fixed a busy wait with a condition variable.
* irmd: Revised flow allocationdimitri staessens2016-07-271-41/+107
| | | | | | | | | Flow allocation requests and registered api states revised so all states are tracked with a condition variable. This is a more reliable approach and improves stability of flow allocation. Some other refactoring was also done, such as renaming port_map_entry to irm_flow and hiding some internal structures of the registry.
* irmd: Fix accessing reg_api struct after destroydimitri staessens2016-07-151-35/+14
| | | | | The destroy now only frees after all threads stopped using the object. Also fixes a SEGV when trying to allocate a flow to a remote name.
* irmd: Refactor of registrydimitri staessens2016-07-111-217/+295
| | | | | | Easier names for the functions.The registry now uses a single list to keep track of applications (bindings), moved the auto_exec state per binding.
* irmd: Prioritize local ipcp for local flowsdimitri staessens2016-07-071-0/+57
| | | | | | | | | | For locally registered processes, the IRMd will first look for the local, then the normal, then the shim-udp. It will look for a normal, a shim-eth-llc and ultimately a shim-udp for non-local destinations. It does not yet check if a remote destination is actually known in a DIF. Fixes #18.
* ouroboros: Use ouroboros errno.hdimitri staessens2016-07-071-1/+1
| | | | | All includes of <errno.h> within ouroboros are replaced with the ouroboros errno.
* irmd: Rename registry functionsdimitri staessens2016-07-061-6/+6
| | | | | Reflects that the functions (dis)associate an application instance from/with a name and not remove it from the registry entirely.
* lib: Change invalid pid to -1dimitri staessens2016-07-051-9/+4
| | | | | | | | The stack used pid 0 (the scheduler) to indicate an invalid process instance, probably as a leftover from the deprecated application process instance id. Using -1 is a better solution. Fixes #16.
* irmd: Move registry to its own sourcesdimitri staessens2016-07-051-0/+593
All registry functionality has been extracted from the IRMd to improve modularity and legibility of the code.