summaryrefslogtreecommitdiff
path: root/src/ipcpd/shim-udp
Commit message (Collapse)AuthorAgeFilesLines
...
* ipcpd, lib, irmd: Update to use qoscube_tdimitri staessens2016-12-241-4/+4
|
* ipcpd: Change IPCP_RUNNING to IPCP_OPERATIONALSander Vrijders2016-12-061-7/+7
| | | | Changes a state of the IPCP to a more correct terminology.
* ipcpd: Split IPCP state PENDING_ENROLSander Vrijders2016-11-301-7/+7
| | | | | | | | This will split the IPCP state PENDING_ENROL into IPCP_CONFIG and IPCP_BOOTING. IPCP_CONFIG is concerned only with configuring the IPCP with the bare essence. When in IPCP_BOOTING, the IPCP will complete its configuration by starting its policies, and thus making the IPCP completely functioning.
* ipcpd, lib: Add syntax version to protobuf filesSander Vrijders2016-11-221-0/+25
| | | | | | This adds a syntax version to the protobuf files. The latest version of protobuf otherwise complains that it is missing. The GPL license is also added on files where it was missing.
* lib, ipcpd: Improve flow allocationdimitri staessens2016-10-311-22/+36
| | | | | | | All calls for opening rbuffs are now concentrated on the dev side. This allows some simplifications in the np1 calls. The ipcp_fini call will not destroy the mutex associated with the state, since the final state needs to be checked before shutting down an IPCP.
* ipcpd: Remove unnecessary include of fcntldimitri staessens2016-10-311-1/+0
|
* ipcpd: Clean shutdown when bootstrap failsdimitri staessens2016-10-311-10/+16
| | | | | Fixes a double free (conf->dif_name) and the handling of non-created threads when the bootstrap of an IPCP fails
* ipcpd: Fix bad lock in shim-udpdimitri staessens2016-10-261-11/+10
|
* lib, ipcpd: Further stabilization of flowsdimitri staessens2016-10-262-82/+4
| | | | | | | | | | | 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.
* ipcpd: shim-udp: Add check for directory entrySander Vrijders2016-10-261-0/+5
| | | | | | A check was missing in the shim UDP if the destination was already present in the directory, in which case no further queries were needed.
* Merged in sandervrijders/ouroboros/be-directory (pull request #280)dimitri staessens2016-10-261-46/+84
|\ | | | | | | lib, irmd, ipcpd: Add name querying to IPCPs
| * lib, irmd, ipcpd: Add name querying to IPCPsSander Vrijders2016-10-261-46/+84
| | | | | | | | | | | | | | | | | | 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.
* | ipcpd: Fix memory leaksdimitri staessens2016-10-251-17/+16
|/ | | | | Fixes memory leaks associated with the dif_name (which doesn't need to be maintained in shim DIFs) and the fqueue for the N + 1 flows.
* build: Remove the gethostbyname checkdimitri staessens2016-10-231-17/+0
| | | | | gethostbyname is included in POSIX 2001. Ouroboros requires at least POSIX 2001 and recommends POSIX 2008 for stable builds.
* build: Fix missing includedimitri staessens2016-10-221-0/+1
| | | | | | CheckLibraryExists was not included. Apparently the CHECK_FUNCTION_EXISTS call fails with the strict prototyping flag turned on.
* build: Compile with strict conversiondimitri staessens2016-10-222-14/+17
| | | | | 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-0/+4
| | | | | This reduces the risk for some bugs, for instance due to signed/unsigned mismatches and unused variables.
* lib: Demultiplex the fast pathdimitri staessens2016-10-211-23/+61
| | | | | | | | 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-131-0/+2
| | | | | Both the N and N-1 entity must now call flow_dealloc for the port_id to be released.
* lib: Add non-copy reading from fd for IPCPsdimitri staessens2016-10-071-1/+1
|
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-041-673/+307
| | | | | | | | | | | | 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
* Merged in dstaesse/ouroboros/be-split-fp (pull request #238)Sander Vrijders2016-09-021-3/+3
|\ | | | | | | lib: Add northbound ringbuffers
| * lib: Add northbound ringbuffersdimitri staessens2016-09-021-3/+3
| | | | | | | | Fast path is split in north and southbound paths.
* | lib: ipcp: Decouple flow_deallocdimitri staessens2016-09-021-1/+1
|/ | | | Sending a dealloc to the irmd moved to its own call.
* lib: Refactor shm_du_map to shm_rdrbuffdimitri staessens2016-08-291-12/+17
| | | | | | | | | | 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.
* ipcpd: Report pid on shutdowndimitri staessens2016-08-261-2/+2
| | | | IPCPs will report their pid on shutdown for faster debugging.
* ipcpd: Revised lockingdimitri staessens2016-08-241-179/+113
| | | | | | The state lock was reverted to an rwlock to avoid interference of management functions with the fast path. IPCPs now close without calling unsafe functions in the signal handler.
* ipcpd: shim-udp: Change nsupdate and nslookup checkSander Vrijders2016-08-161-28/+17
| | | | | | | Previously it was up to the admin to choose whether or not to enable DDNS. Now the build just checks if the executables can be found, and if they are available DDNS functionality is enabled, else it is disabled.
* ipcpd: Add condition variable to IPCP stateSander Vrijders2016-08-111-70/+70
| | | | | | | This adds a condition variable to the IPCP state, so that upon state changes any listeners to state changes can be notified. It also replaces the read/write lock with a mutex in order to be able to do so.
* ipcp, irmd, lib: Notify IRMd upon IPCP initializationSander Vrijders2016-08-101-0/+6
| | | | | | 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.
* 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-1/+1
| | | | ipcp-data was not correctly destroyed.
* build: Fix wrong inclusionSander Vrijders2016-07-261-2/+0
| | | | | | The protobuf include directory was not being correctly handed to the compiler when building. Now the include directory is added project-wide. And the protobuf package is searched for only once.
* ipcpd: Deprecate ipcp_reg/ipcp_unregdimitri staessens2016-07-081-2/+0
|
* 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: Change invalid pid to -1dimitri staessens2016-07-051-2/+2
| | | | | | | | The stack used pid 0 (the scheduler) to indicate an invalid process instance, probably as a leftover from the deprecated application process instance id. Using -1 is a better solution. Fixes #16.
* lib: Provide first implementation of revised CDAPSander Vrijders2016-07-051-3/+3
| | | | | | | | 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-10/+10
| | | | | | | | | | | | | | 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-282-21/+18
| | | | 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
* ipcpd: fix deadlock in shim-udpdimitri staessens2016-06-281-13/+25
| | | | | shim UDP would deadlock upon a dealloc call. fd_clr cannot be called under wrlock.
* ipcpd: fixes to shim-udpdimitri staessens2016-06-271-48/+60
| | | | | getsockname() can give bad behaviour when haphazardly looping fd's, added check that the fd has a flow. Replaced LOG_DBGF with LOG_DBG.
* 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, irmd, ipcp: robust mutexesdimitri staessens2016-06-211-110/+109
| | | | | | | | 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 missing unlock in shim UDPdimitri staessens2016-06-161-1/+5
| | | | Unlock missing when compiled without DNS support.