summaryrefslogtreecommitdiff
path: root/src/ipcpd/local
Commit message (Collapse)AuthorAgeFilesLines
...
* | ipcpd: Fix locking problem in local IPCPSander Vrijders2016-08-101-2/+2
|/ | | | | A lock was not being taken to check the state, but then it was released if the state was not IPCP_NULL, resulting in a segfault.
* ipcpd: Fix memleakdimitri staessens2016-08-051-0/+2
| | | | The entry from the ringbuffer was never freed, causing memleak per SDU.
* ipcpd: Fix memory leaksdimitri staessens2016-08-041-5/+2
| | | | ipcp-data was not correctly destroyed.
* ipcpd: normal: Provide initial steps for enrollmentSander Vrijders2016-07-271-1/+0
| | | | | | This provides the normal IPCP with bootstrapping and the initial steps for enrollment. Next step is actually reacting to an enrollment request and sending the data transfer constants.
* ipcpd: Deprecate ipcp_reg/ipcp_unregdimitri staessens2016-07-081-2/+0
|
* ouroboros: Use ouroboros errno.hdimitri staessens2016-07-071-1/+1
| | | | | All includes of <errno.h> within ouroboros are replaced with the ouroboros errno.
* lib: Add lockfiledimitri staessens2016-07-071-0/+1
| | | | | | | | | | | | The pid of the IRMd is stored in a lockfile in shared memory. This makes checking if the IRMd is running independent of the configuration, as previously the IRMd pid was stored at the end of the shm_du_map, which could not be read by an IRMd that would be compiled with different configuration options. Also corrects some unnecessary includes Fixes #21.
* irmd, ipcps: Close logfile on exitdimitri staessens2016-07-071-5/+10
| | | | | | | IRMd and ipcps will now close the logfile upon exit. Also corrects exit(1) to exit(EXIT_FAILURE) and exit(0) to exit(EXIT_SUCCESS).
* Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into be-clean-exitdimitri staessens2016-07-061-3/+3
|\
| * lib, irmd, ipcpd: Provide the feature to write to logsSander Vrijders2016-07-061-3/+3
| | | | | | | | | | | | | | | | | | | | Writing output to log files is now enabled by default. Logs are written to <INSTALL_PREFIX>/var/log/ouroboros, which is created on install. There is a log file for the irmd and one per IPCP. To still get (colored) output on stdout, provide the --stdout switch when starting the irmd. Fixes #17
* | lib: shm_du_map: Clean sdus upon exitdimitri staessens2016-07-061-1/+1
|/ | | | | | | | When an application closes the shm_du_map, it will clean all remaining sdu's for that application. Adds a function to clean the shm_du_map on close. Fixes #20.
* lib: Provide first implementation of revised CDAPSander Vrijders2016-07-051-1/+1
| | | | | | | | This commit introduces a first version of the revised CDAP specification. CACEP (for authentication purposes) has been separated from CDAP. Application developers may use CDAP if they find it useful. Within Ouroboros CDAP will be used to perform operations on the RIB of an IPCP.
* lib: robust locking in shared memory and crash recoverydimitri staessens2016-07-021-1/+1
| | | | | | | | | | | | | | This PR enhances the shared memory providing recovery if a process crashes. It adds a SHM_DU_TIMEOUT_MICROS variable, setting an expiration time for SDU's when shared memory is full. If an application doesn't read a blocking SDU within this time, the shared memory will be cleansed of all SDU's for this application and the application's rbuff will be cleared. Some refactoring of the API's. Fixed wrong pthread checks in IRMd. Fixes #13 Fixes #14
* lib, irmd, ipcpd: Change pid to apiSander Vrijders2016-06-281-10/+10
| | | | Changes the variable name as well to API instead of PID.
* lib, irmd, ipcpd: Change of IRM APISander Vrijders2016-06-281-24/+5
| | | | | | | | | | | | | | This changes the IRM API after discussions with Dimitri. The register operation is now split into a bind and register operation. The same for unregister; unbind and unregister. PIDs are now used as the application instance name. A name for a PID is only provided for scriptability in bash. It is therefore also no longer passed down to the IPCP. Every operation on an IPCP through the IRM API has to use the PID. Quering of the PIDs by name is possible. The IRM tool has been updated to use this new API as well. A subcommand 'ipcp' has been added for operations that take effect on IPCPs only. Fixes #12
* build: correct sandboxingdimitri staessens2016-06-271-1/+1
| | | | | paths cannot start with "/" or PREFIX will be omitted. PREFIX must be set before the project() call.
* build: Fix installation prefixSander Vrijders2016-06-271-1/+1
| | | | | | The installation prefix was taking a trailing backslash, while it is common not to do so. Fixed it so that any trailing backslash is removed by the compilation and installation scripts.
* lib: Add errnos specific for OuroborosSander Vrijders2016-06-221-1/+1
| | | | | | | This adds error numbers specificly for Ouroboros. It also refactors some of the header files that are installed. Fixes #2
* lib, irmd, ipcp: robust mutexesdimitri staessens2016-06-211-61/+60
| | | | | | | | Update to POSIX 200112L to allow use of robust mutexes in the shm_du_map. Removed the implementation of the rw_lock in favor of pthread_rwlock_t. Placeholder for the shm_du_map_sanitize function.
* build: Change install directories and set correct permissionsSander Vrijders2016-06-201-1/+1
| | | | | | | | | This sets the correct install directories for all the binaries, library and header files. It also sets the right permissions on the sockets and shared memory so that regular users can also use the ouroboros library. Root privileges are required to run the irmd. Fixes #7
* ipcpd: fixed locking and cleanupdimitri staessens2016-06-161-1/+4
| | | | | The ipcpds didn't unlock the flows lock when the dst_name is unbeknownst to the IRMd.
* Fixed comments on #122dimitri staessens2016-06-141-1/+1
|
* ipdpd: fixed flow deallocation in local ipcpddimitri staessens2016-06-141-1/+3
| | | | | Now correctly deallocates the local fd if the remote already deallocated the flow.
* lib, irmd, tools, ipcpd: updates to dev API.dimitri staessens2016-06-131-4/+2
| | | | | | | | | | | | | | | The registration function has been moved to the irm tool, applications now need to be registered by an administrator. Currently only supports one instance per registered name, and an AP can be registered under only one name. The irmd can now start a registered server application on demand. For the full functionality of the tool, execute "irm register". AP name removed from flow allocation. Flow allocation does not send the source ap name as it is quite useless. The accept() call now only returns the AE name.
* ipcpd: fixes shutdown lockup in local and shim-udpdimitri staessens2016-05-291-6/+5
|
* ipcpd: cleanup of IPC processesdimitri staessens2016-05-281-4/+8
| | | | | | | This stops IPC processes from hanging due to bad locks. It first informs all threads that the IPCP is shutting down, then cancels all threads. Cancellation is still required because threads may be in accept() or receivefrom().
* build: fixed typo in ipcpd/local/dimitri staessens2016-05-281-1/+1
|
* ipcpd: IPCP over local memorydimitri staessens2016-05-282-0/+682
This introduces an IPC process that relays data between two local AP's over the shm_du_map. Only configuration it has is a DIF name. It required small modification elsewhere: lib: added support for the IPCP_LOCAL type irm: added support for the IPCP_LOCAL type dif_config: added the IPCP_LOCAL type tools: added support for the IPCP_LOCAL type