summaryrefslogtreecommitdiff
path: root/src/irmd
Commit message (Collapse)AuthorAgeFilesLines
...
* irmd: Handle death of IPCP gracefullydimitri staessens2017-02-043-12/+30
| | | | | | | 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
|
* irmd: Fix memleak attempting double bootstrapdimitri staessens2017-01-291-8/+6
| | | | | | When trying to double bootstrap, the entry name was strdup'd before the bootstrap leaking the previous name. Now it bootstraps first and sets the name after a successful bootstrap only.
* Merge remote-tracking branch 'upstream/be' into be-gamSander Vrijders2017-01-0911-32/+32
|\
| * build: Update licenses and copyrightdimitri staessens2017-01-0913-13/+13
| | | | | | | | | | 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-094-22/+22
| | | | | | | | Adds LGPL license to the ouroboros lists.
* | ipcpd: Let IPCPs bind a nameSander Vrijders2017-01-093-13/+13
|/ | | | | | | This allows IPCPs to bind a name, so that they can announce their name to neighbors which can then allocate a flow to them. Registering of the name happens by an administrator. It also moves the irmd_api to common ground, since it is used by all IPCPs.
* irmd: Change return value of register functionsSander Vrijders2017-01-051-51/+30
| | | | | | | This changes the return value of the register and unregister functions. If they were able to reg/unreg some entries a positive value is returned, otherwise an error. Some spelling errors in the IRMd have also been fixed.
* lib, ipcpd, irmd: Proof of concept QoSdimitri staessens2017-01-033-16/+25
| | | | | | | | | | Now correctly relays the qoscube end-to-end in the stack. A simple function specifying the cube in the spec is used for initial testing. The translation is now done in dev.c, but it could be moved elsewhere when qos cabability matures and the need arises.
* 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
|