summaryrefslogtreecommitdiff
path: root/src/irmd
Commit message (Collapse)AuthorAgeFilesLines
...
* irmd: Hide reg_entry internal lockdimitri staessens2016-12-283-84/+97
|
* ouroboros: Correct license statementsdimitri staessens2016-12-2413-39/+26
| | | | | This corrects the license statements on all files. Installed headers are LGPLv2.1, the rest of the code is GPLv2.
* ipcpd, lib, irmd: Update to use qoscube_tdimitri staessens2016-12-242-12/+15
|
* src, tools: Set/get timeout and get qos for flowsdimitri staessens2016-12-121-5/+5
| | | | | | | | | | | | | | | | Receiver timeouts can now be set on a flow using the flow_set_timeout function. Specifying NULL disables the timeout. The flow_get_timeout function gets the value for the timeout. This commit also deprecates fcntl in favor of flow_get_flags and flow_set_flags functions. struct qos_spec is typedef'd as a qosspec_t. The tools and cdap.c are updated to use the new API. Fixes a bug in operf client where the client's writer thread wouldn't cancel on SIGINT.
* irmd, ipcp: Call select on FreeBSDdimitri staessens2016-12-081-1/+11
| | | | | | *BSD accept() doesn't timeout on the timeval set by setsockopt SO_RCVTIMEO. The irmd and ipcp will now call select on the irmd fd with the same timeout.
* lib, irmd: Ensure rbuffs are empty upon destructiondimitri staessens2016-11-301-6/+34
| | | | Also cleans up the flow_set if an AP-I dies abruptly.
* lib: Remove dst_api field from rdrbuff blocksdimitri staessens2016-11-171-1/+42
| | | | | | Now that we have an rbuff per flow per AP, there is no more need to keep the dst_api in the rdrbuff. This also simplifies the sanitizer in the irmd.
* irmd: Refactor irm_flowdimitri staessens2016-11-163-86/+48
| | | | | Creation and destruction of the rbuffs is now completely handled in the irm_flow.
* irmd: Fix shutdowndimitri staessens2016-11-161-1/+0
| | | | | The IRMd should not send messages to the IPCPs after its mainloop terminated. IPCPs should cleanup al state when they get the SIGTERM.
* irmd: Fix irmd state checkdimitri staessens2016-10-301-1/+1
|
* irmd: Fix check in irm_flowdimitri staessens2016-10-271-1/+1
|
* irmd: Fix cleanup of pending flowsdimitri staessens2016-10-272-3/+19
|
* lib, ipcpd: Further stabilization of flowsdimitri staessens2016-10-261-5/+5
| | | | | | | | | | | The steps for flow deallocation have been further refined. An operation ipcp_flow_fini() which wait for all SDUs to be read from a flow has been added. The shim IPCPs and the local IPCP have been adapted to this new API. Deallocation messages have been removed from the shim IPCPs, since there is insufficient state synchronisation between them to make this work reliably.
* irmd: Fix wrong unlocksSander Vrijders2016-10-261-2/+2
| | | | This fixes 2 wrong unlocks in the bind API method.
* Merged in sandervrijders/ouroboros/be-directory (pull request #280)dimitri staessens2016-10-265-100/+79
|\ | | | | | | lib, irmd, ipcpd: Add name querying to IPCPs
| * lib, irmd, ipcpd: Add name querying to IPCPsSander Vrijders2016-10-265-100/+79
| | | | | | | | | | | | | | | | | | 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.
* | irmd: Add log messages for flow allocationdimitri staessens2016-10-261-2/+9
|/ | | | | | In the rewrite of the flow allocator for per-port ring buffers, the messages were removed because they were not accurate anymore. This adds messages when a port is allocated.
* lib: Stabilise flow allocationdimitri staessens2016-10-231-4/+3
| | | | | | | Deallocation was reverted to a synchronoous operation between the AP, IRMd and IPCP in order to avoid inconsistent states of the port_id. Fixes some memory leaks, particularly the shm_flow_set is now closed upon deallocation.
* irmd, tools: Fix missing initializersdimitri staessens2016-10-221-1/+3
| | | | | | | | | | | The BSD compiler requires explicit initializers for all fields with the -Wmissing-field-initializers flag enabled On branch be-fix-build # Changes to be committed: # modified: src/irmd/main.c # modified: src/tools/irm/irm.c # modified: src/tools/irm/irm_bind.c # modified: src/tools/irm/irm_ipcp.c # modified: src/tools/irm/irm_unbind.c # # Untracked files: # killouroboros.sh # start.sh #
* build: Compile with strict conversiondimitri staessens2016-10-223-12/+32
| | | | | This has the code checked with -Wcast-qual and -Wconversion flags. These flags were removed because SWIG generated code fails.
* build: Comply with -Wextra compiler flagdimitri staessens2016-10-211-2/+6
| | | | | This reduces the risk for some bugs, for instance due to signed/unsigned mismatches and unused variables.
* lib: Move rbuff creation/destruction to IRMddimitri staessens2016-10-213-23/+68
| | | | | 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-212-14/+13
| | | | | | | | 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.
* lib: Fix flow deallocation logicdimitri staessens2016-10-133-16/+28
| | | | | Both the N and N-1 entity must now call flow_dealloc for the port_id to be released.
* lib, dev: Add asynchronous deallocationdimitri staessens2016-10-071-27/+18
| | | | | Flow deallocation from the application will immediately return (void call). The IRMd will not send a reply message.
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-047-127/+582
| | | | | | | | | | | | 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: Set umask for file creation permissionsdimitri staessens2016-09-071-1/+0
| | | | | Permissions are now set correctly upon creation, removing the need to call fchmod.
* irmd: Fix register with unenrolled IPCPs in systemdimitri staessens2016-09-061-0/+3
| | | | | If there are unregistered IPCPs (no DIF name set) the lookup should skip over them without segfaulting.
* lib: Add northbound ringbuffersdimitri staessens2016-09-021-5/+9
| | | | Fast path is split in north and southbound paths.
* irmd: Fix registering AP-I before binddimitri staessens2016-09-011-2/+7
|
* irmd: Fix binding after registeringdimitri staessens2016-08-311-0/+5
| | | | | Flow will now allocate correctly when the name is registered in a DIF before it is bound to an AP.
* lib: Refactor shm_du_map to shm_rdrbuffdimitri staessens2016-08-291-23/+25
| | | | | | | | | | The shm_du_map is renamed to shm_rdrbuff to reflect the Random Deletion Ringbuffer used in the implementation. The close_on_exit call is removed and SDUs are cleaned up by the application in the ap_fini() call. This required a non-blocking peek() operation in the shm_ap_rbuff. Some initial implementation for future support of qos cubes has been added to the shm_rdrbuff.
* irmd: Add state checks to api_entrydimitri staessens2016-08-272-2/+10
| | | | Prevents double destruction.
* irmd: Revise shutdown proceduredimitri staessens2016-08-261-13/+14
| | | | | Flows are deallocated first, then the socket is closed to prevent IPCPs hanging on the connect.
* irmd: Remove stale sourcesdimitri staessens2016-08-252-191/+0
|
* irmd: Fix bad lockdimitri staessens2016-08-251-5/+14
|
* irmd: Fix wrong lookupdimitri staessens2016-08-233-1/+22
| | | | ap_table had no function to look for entries by apn.
* irmd: Fix reaping child processesdimitri staessens2016-08-231-3/+4
|
* irmd: Fix cleaning dead AP-Idimitri staessens2016-08-231-2/+1
| | | | | The reg_entry_del_api must be called to correctly set the flow handling state instead of just clearing the entry from the list.
* irmd, ipcp: Unlink file for UNIX socketsdimitri staessens2016-08-221-0/+3
|
* irmd: Add cleanup for new data modeldimitri staessens2016-08-211-54/+60
|
* irmd, lib: Rebuild the IRMd data modeldimitri staessens2016-08-2110-727/+1225
| | | | | | | | | | | | | | | | | | | | | | 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.
* Merged in dstaesse/ouroboros/be-api-bind (pull request #203)Sander Vrijders2016-08-104-4/+233
|\ | | | | | | lib, irmd: Bind AP instances to AP_subsets
| * lib, irmd: Bind AP instances to AP_subsetsdimitri staessens2016-08-104-4/+233
| | | | | | | | | | | | | | This call will allow grouping AP instances of a certain AP together which are configured identically. Adds the bind operation to dev and updates the applications to make use of this call. Flow_alloc is now only called with the pid and doesn't send the apn anymore.
* | lib, irmd, ipcp: Add socket timeoutSander Vrijders2016-08-101-7/+10
|/ | | | | | This will add a timeout to the socket so that a process won't be blocked by the actions of the process with which it is communicating over the socket.
* Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into be-bugfixingdimitri staessens2016-08-101-2/+61
|\
| * Merged in sandervrijders/ouroboros/be-create-ipcp (pull request #200)dimitri staessens2016-08-101-2/+48
| |\ | | | | | | | | | ipcp, irmd, lib: Notify IRMd upon IPCP initialization
| | * ipcp, irmd, lib: Notify IRMd upon IPCP initializationSander Vrijders2016-08-101-2/+48
| | | | | | | | | | | | | | | | | | This will notify the IRMd when the IPCP is initialized and ready to receive messages. Previously a bootstrap could fail since the IPCP was not listening to the socket yet.
| * | Merged in sandervrijders/ouroboros/be-bootstrap (pull request #199)dimitri staessens2016-08-101-0/+13
| |\ \ | | | | | | | | | | | | Several small fixes and enhancements
| | * | irmd: Remove IPCP from list upon errorSander Vrijders2016-08-101-0/+13
| | |/ | | | | | | | | | | | | | | | | | | If an IPCP crashes (due to a segfault for instance), it is removed from the spawned apis list. However, if it was an IPCP it should also be removed from the IPCPs list, since else on shutdown, the irmd will try to destroy the IPCP that crashed.