summaryrefslogtreecommitdiff
path: root/src/ipcpd/common
Commit message (Collapse)AuthorAgeFilesLines
* lib: Rename CACEP to CEP and set conngmr timeout0.21.2Dimitri Staessens2024-02-263-31/+42
| | | | | | | | | | | | | | | | The Common Application Connection Establishment Protocol (CACEP) is a RINA construct associated with the Common Distributed Application Protocol (CDAP). We dropped CDAP as O7s sees connection establishment as common to all applications (though it can be a nop). The wiki already refers to this as (O7s) Connection Establishment Protocol (CEP). The connection manager will now timeout waiting for CEP messages to avoid hanging forever, configurable at build time via CONNMGR_RCV_TIMEOUT. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* ipcpd: Clean up connection when cancelling connectDimitri Staessens2024-02-231-1/+8
| | | | | | | | The connection element was not free'd on shutdown during a connect operation. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* irmd: Revise IRMd internalsDimitri Staessens2024-02-191-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a full revision of the IRMd internal implementation. The registry is now a proper subcomponent managing its own internal lock (a single mutex). Some tests are added for the registry and its data structures. Some macros for tests are added in <ouroboros/test.h>. Flow allocation is now more symmetric between the client side (alloc) and server size (accept). Each will create a flow in pending state (ALLOC_PENDING/ACCEPT_PENDING) that is potentially fulfilled by an IPCP using respond_alloc and respond_accept primitives. Deallocation is split in flow_dealloc (application side) and ipcp_flow_dealloc (IPCP side) to get the flow in DEALLOC_PENDING and DEALLOCATED state. Cleanup of failed flow allocation is now properly handled instead of relying on the sanitizer thread. The new sanitizer only needs to monitor crashed processes. On shutdown, the IRMd will now detect hanging processes and SIGKILL them and clean up their fuse mountpoints if needed. A lot of other things have been cleaned up and shuffled around a bit. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* build: Update licenses to 2024Dimitri Staessens2024-01-135-5/+5
| | | | | | | Slow but steady. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* ipcpd: Revise loggingDimitri Staessens2023-08-302-51/+80
| | | | | | | | This revises the logging in the IPCPs to be a more consistent and reduce duplicate messages in nested functions. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib: Move protobuf definitions to pb/ directoryDimitri Staessens2023-08-301-1/+0
| | | | | | | | | | This moves the protobuf definition in the library to a pb/ directory. Also renames the protobuf files and does a quick review of the #define guards in the include library to specify _LIB_ for internal/non-public library headers. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* ipcpd: Add IDs to enrollmentDimitri Staessens2023-08-232-126/+138
| | | | | | | | The enrollment messages now have a 64-bit ID to easier track enrollments in the logs in larger scale tests. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* ipcpd: Fix long log line in enrollmentDimitri Staessens2023-03-181-1/+2
| | | | | Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* irmd: Add configuration file supportDimitri Staessens2023-03-082-153/+92
| | | | | | | | | | | | | | | | | | | | | This adds initial support for configuration files using the C99 TOML parser (to be installed separately from https://github.com/cktan/tomlc99). The default location for the IRMd configuration file is /etc/ouroboros/irmd.conf. This is configurable at build time. An example file will be installed in the configuration directory with the name irmd.conf.example. Config file support can be disabled using the DISABLE_CONFIGFILE build option. There were some refactors and changes to the configuration messages and protobuf files. This works towards consolidation of protobuf C as an option for more generic handling of serialization/deserialization of various messages. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* ipcpd: refactor IPCP configurationDimitri Staessens2023-02-131-23/+27
| | | | | | | | | | The ipcp configuration struct now has internal structures for the different IPCPs and for IPCP components of the unicast IPCP. Split the very long IPCP main loop into individual handler functions. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* build: Update copyright to 2023Dimitri Staessens2023-02-135-5/+5
| | | | | | | 2022 was a rather slow year... Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* build: Update copyright to 2022Dimitri Staessens2022-04-035-5/+5
| | | | | | | Growing pains. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* ipcpd: Check return value of enroll_packDimitri Staessens2022-02-181-2/+2
| | | | | | | Better to check the error code than the out parameter. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib, ipcpd, irmd: Wrap pthread unlocks for cleanupDimitri Staessens2021-06-231-3/+2
| | | | | | | | | | | | This add an ouroboros/pthread.h header that wraps the pthread_..._unlock() functions for cleanup using pthread_cleanup_push() as this casting is not safe (and there were definitely bad casts in the code). The close() function is now also wrapped for cleanup in ouroboros/sockets.h. This allows enabling more compiler checks. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* build: Move connmgr and enrolment to common groundDimitri Staessens2021-03-285-0/+1070
The connection manager and enrolment components of the unicast and broadcast IPCP have a lot in common, as conjectured in the paper. The initial implementation of the broadcast IPCP just duplicated the code. This moves the shared functionality to common ground. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>