summaryrefslogtreecommitdiff
path: root/include/ouroboros/flow.h
Commit message (Collapse)AuthorAgeFilesLines
* build: Fix missing newlines at end of fileDimitri Staessens2024-02-191-1/+1
| | | | | | | Some files had a newline at the end, others didn't. Now they all do. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* irmd: Revise IRMd internalsDimitri Staessens2024-02-191-2/+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 <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* include: Use common definition between lib and IRMdDimitri Staessens2024-01-311-0/+54
| | | | | | | | Some definitions/enums were different between the library and IRMd (flow_state, ipcp_state). This moves them to common ground. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-041-40/+0
| | | | | | | | | | | | IPCPs can now use ap_init() to initialize the memory. All flows are accessed using flow descriptors, this greatly simplifies IPCP development. Reverts the fast path to a single ap_rbuff per process. Splits lib/ipcp into irmd/ipcp and lib/ipcp-dev. Adds a lib/shim-dev holding tailored functions for shims. Moves the buffer_t to utils.h. Fixes the shim-eth-llc length field. Removes the flow from shared.h. Fixes #4 Fixes #5
* lib: Add errnos specific for OuroborosSander Vrijders2016-06-221-6/+0
| | | | | | | This adds error numbers specificly for Ouroboros. It also refactors some of the header files that are installed. Fixes #2
* lib, ipcpd, irmd: Add QoS cube definitionSander Vrijders2016-05-141-2/+2
| | | | | | | | | | This adds the QoS cube definition, which is an enum to select which QoS is needed in the IPCP. An application has to use the qos_spec in qos.h to define what it needs. The IRMd will map this unto a qos cube definition. Some headers are now also no longer installed on the system, since they are only to be used within the irmd and ipcps.
* lib: dev: implementation of flow_cntldimitri staessens2016-05-121-0/+3
| | | | | allows setting the oflags to make flow_read and flow_write blocking or non-blocking (FLOW_O_NONBLOCK).
* irmd: flow allocation and fast pathdimitri staessens2016-05-071-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit has a first implementation of flow allocation (the "slow path") and read/write (the "fast path") for ouroboros. It provides basic but unstable communications over the shared memory. It required a lot of changes all over the stack, and fixes a number of previously undetected issues. This PR still need heavy revision regarding data model, locking and cleanup. lib/dev: modifications to the API. It now uses an ap_init() call to set the AP name and sets the Instance ID to the pid of the process. It also binds the AP to the shared memory and creates tables for mappings in the fast path. A call to ap_fini() releases the resources. lib/shm_ap_rbuff: added ring buffer for data exchange between processes in the fast path. It passes an index in the shm_du_map. lib/shm_du_map: rewrote API to work with calls from dev.c. Garbage collector added. Tests updated to new API. ipcpd/ipcp-data: removed everything related to flows, as these are universal for all ap's and kept in ap_data (dev.c), or similar structs for shim ipcps. shim-udp: added flow allocator and read/write functions and shm elements. irmd: revised data model and structures necessary for flow allocation. tools: echo updated to new dev.h API. messaging system was updated to comply with new flow allocation messages. All exchanges use pid and port_id to bootstrap the fast path.
* lib: moved flow header and source to ipcpddimitri staessens2016-04-191-63/+0
|
* ipcpd: initial IPC processesdimitri staessens2016-04-181-6/+8
| | | | | | | | | | | Basic functions for implementation of IPC processes, and implementation of core functions of the shim IPCP over UDP. Updates to the build system to compile these IPC processes, as well as some fixes in the irmd (rudimentary capturing exit signals) and some fixes in the library, mainly relating to the messaging. Basic implementation of creation / bootstrapping / deletion of the shim UDP. Placeholders for other functions.
* lib: further fixes to flow APIdimitri staessens2016-03-301-1/+1
| | | | | FLOW_O_INVALID now defined in terms of conflicting options bugfix in setopts
* lib: api for handling flowsdimitri staessens2016-03-301-0/+61
moved the flow definition to the library and made it public. thread-safety implemented without compiler checks.