summaryrefslogtreecommitdiff
path: root/src/irmd/main.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | irmd, ipcpd: Include socket in select() for FreeBSDdimitri staessens2017-04-161-1/+1
|/ | | | Fixes #41
* include, lib: Rename ap_init/ap_finidimitri staessens2017-04-131-1/+1
| | | | Fixes #35
* Merged in dstaesse/ouroboros/be-hashes (pull request #479)dimitri staessens2017-04-131-74/+114
|\ | | | | | | lib, ipcpd, irmd: Register hash instead of name
| * lib, ipcpd, irmd: Register hash instead of namedimitri staessens2017-04-131-74/+114
| | | | | | | | | | | | | | | | | | All information passed over the IRMd/IPCP boundary for using IPC services (flow allocation, registration) is now hashed. This effectively fixes the shared namespace between DIFs and the IRMDs. This PR also fixes some API issues (adding const identifiers), shuffles the include headers a bit and some small bugs.
* | irmd: Fix mixed declarationdimitri staessens2017-04-111-2/+2
|/
* irmd: Remove unnecessary state locksdimitri staessens2017-04-061-207/+36
|
* irmd: Prevent impatient user deadlock on shutdowndimitri staessens2017-04-061-0/+18
|
* lib, irmd: Implement flow allocation timeoutdimitri staessens2017-04-061-67/+115
| | | | | | Setting the timeouts on flow_alloc and flow_accept will now work. This makes some changes to the UNIX sockets used for management communication between the APs, IRMd and IPCPs.
* irmd: Initialize in stack memorydimitri staessens2017-04-041-482/+485
|
* ipcpd, irmd: Fix cleanup of thread resourcesdimitri staessens2017-04-041-23/+17
|
* lib, irmd, ipcpd: Stabilize flow allocationdimitri staessens2017-04-041-27/+42
|
* irmd: Fix thread creation orderdimitri staessens2017-04-021-1/+1
|
* irmd: Add dynamic threadpooldimitri staessens2017-04-011-31/+196
| | | | | | | | | | | This makes the IRMd add/remove worker threads dynamically. IRMD_TPM_TIMEOUT sets a timer in the threadpool manager for checking idle threads. Each time this timer expires, it will reduce the threadpool by one. IRMD_MIN_AV_THREADS is the minimum number of available worker threads. If the number of active threads goes under this threshold, the threadpool manager will create threads to get the number of threads to IRMD_MAX_AV_THREADS, unless IRMD_MAX_THREADS is reached.
* irmd: Keep track of qos in irm_flowdimitri staessens2017-03-311-10/+6
| | | | This fixes the bug in handling multiple concurrent flow allocations.
* irmd: Fix assignment bugdimitri staessens2017-03-311-2/+2
|
* lib: Revise flow allocation APIdimitri staessens2017-03-311-145/+58
| | | | | | The flow_alloc_res and flow_alloc_resp calls have been removed. The flow_alloc and flow_accept calls are now both blocking and take an additional timeout argument.
* irmd: Exit blocking threads from irm_sanitizerdimitri staessens2017-03-291-21/+25
| | | | | | Some blocking calls caused mainloops to never exit. The irm_sanitizer will now clean up those structs before exiting. This will speed up regular exit and avoids non-cancelling threads.
* irmd: Set failed flows to FLOW_NULL before destroydimitri staessens2017-03-291-0/+1
|
* irmd: Fix some missing locksdimitri staessens2017-03-221-0/+3
|
* Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into beSander Vrijders2017-03-211-15/+6
|\
| * Change email addresses to ugent.beSander Vrijders2017-03-031-2/+2
| | | | | | | | | | | | | | Our mailserver was migrated from intec.ugent.be to the central ugent.be emailserver. This PR updates the header files to reflect this change as well. Some header files were also homogenized if the parameters within the functions were badly aligned.
| * lib: Remove application entity nameSander Vrijders2017-02-241-13/+4
| | | | | | | | | | The AE name should not be passed over the layer boundaries. If an application has more than one AE it should exchange this in CACEP.
* | Merge branch 'testing' into beSander Vrijders2017-03-211-1/+1
|\ \ | |/ |/|
| * irmd: Fix timeouts in reg_entrydimitri staessens2017-03-211-1/+1
| | | | | | | | | | This fixes bad timedwaits for the state of the reg_entry. Also slightly revised timedwaits throughout the prototype.
* | Merge branch 'testing' into beSander Vrijders2017-02-241-1/+1
|\|
| * irmd: Fix bug in name comparison of IPCPsdimitri staessens2017-02-241-1/+1
| |
* | Merge branch 'testing' into beSander Vrijders2017-02-231-3/+32
|\|
| * irmd: Check IPCP name when creating an IPCPdimitri staessens2017-02-231-3/+25
| |
| * irmd: Check IPCP type before bootstrapdimitri staessens2017-02-221-0/+7
| | | | | | | | | | This prevents assertion failures in the IPCP in some cases. IPCPs can now safely assert the type.
* | irmd: Fix detection of IRMddimitri staessens2017-02-211-22/+22
|/ | | | | | | When starting two IRMds, the second one exits, but applications can't contact the first because the second instance took the UNIX socket. Now the lockfile is checked for running IRMd instances before opening the UNIX socket.
* irmd: Fix bad lockdimitri staessens2017-02-161-4/+4
|
* irmd: Allow time for AP to call flow_accept()dimitri staessens2017-02-121-16/+29
| | | | | | | | When there is a burst of successive flow allocations for a certain name, each such request will block a thread in the IRMD for IRMD_REQ_ARR_TIMEOUT ms to allow the application some time to respond. This refactors some parts of the IRMd.
* ipcpd: Silent shutdown of normaldimitri staessens2017-02-101-1/+1
| | | | | The acceptor will not log disconnects with IRMd. Unexpected disconnects will be reported and handled by management components.
* ipcpd, lib: Report IPCP creation failuredimitri staessens2017-02-091-2/+6
| | | | | | | | The IPCP will now respond with an ipcp_create_r message when it fails, informing the IRMd. Also adds some const qualifiers in the public headers and fixes some formatting in dev.c.
* lib: Log to the logging systemdimitri staessens2017-02-081-167/+155
| | | | | | | | | | This removes the logfile and outputs log messages to the logging system. The creation of the logfiles (as well as the ap_init() call) were moved into ipcp_init() to simplify the IPCP creation and shutdown. Fixes #25 Fixes #27
* irmd: Handle death of IPCP gracefullydimitri staessens2017-02-041-2/+3
| | | | | | | 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 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-091-9/+9
|\
| * build: Update licenses and copyrightdimitri staessens2017-01-091-1/+1
| | | | | | | | | | 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-091-9/+9
| | | | | | | | Adds LGPL license to the ouroboros lists.
* | ipcpd: Let IPCPs bind a nameSander Vrijders2017-01-091-2/+2
|/ | | | | | | 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-031-13/+20
| | | | | | | | | | 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-281-58/+12
|
* ouroboros: Correct license statementsdimitri staessens2016-12-241-3/+2
| | | | | This corrects the license statements on all files. Installed headers are LGPLv2.1, the rest of the code is GPLv2.
* 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-161-74/+18
| | | | | Creation and destruction of the rbuffs is now completely handled in the irm_flow.