summaryrefslogtreecommitdiff
path: root/src/irmd/registry.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.