summaryrefslogtreecommitdiff
path: root/src/ipcpd
Commit message (Collapse)AuthorAgeFilesLines
...
| * | ipcpd: Fix log message and lockdimitri staessens2016-10-231-3/+2
| | | | | | | | | | | | | | | Remote requests for a flow that's locally deallocated should not generate an error. Sending messages should not be under lock.
| * | ipcpd: Improve locking in ipcp-datadimitri staessens2016-10-232-42/+76
| | | | | | | | | | | | This solves some potential data races in the shims.
* | | ipcpd: Fix memleaks in local IPCPdimitri staessens2016-10-241-11/+14
| |/ |/|
* | lib: Stabilise flow allocationdimitri staessens2016-10-231-0/+1
|/ | | | | | | 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.
* dev, ipcp: Fix setting default flow optionsdimitri staessens2016-10-231-9/+2
| | | | | The default flow options were not set when a flow allocation request arrives remotely. This went unnoticed due to a previous bug.
* 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.
* ipcpd: Fix unused variabledimitri staessens2016-10-231-1/+4
|
* 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-2214-79/+97
| | | | | 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-217-4/+50
| | | | | This reduces the risk for some bugs, for instance due to signed/unsigned mismatches and unused variables.
* Merged in dstaesse/ouroboros/be-demux (pull request #267)Sander Vrijders2016-10-215-143/+264
|\ | | | | | | lib: Demultiplex the fast path
| * lib: Demultiplex the fast pathdimitri staessens2016-10-215-143/+264
| | | | | | | | | | | | | | | | 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.
* | ipcpd: normal: Avoid allocating flow over unenrolled IPCP.Sander Vrijders2016-10-171-0/+10
|/ | | | | There was no check to see if the normal IPCP was enrolled or not when a flow allocation request is done.
* lib, dev: Implement read/write options for flowsdimitri staessens2016-10-161-0/+2
| | | | | | | Added the missing implementation of setting read/write options for flows. This allows applications to block the fast path for remotes. IPCPs can use this to block the fast path for the N + 1 flow when receiving remote deallocation requests.
* lib: Stabilize fast flow deallocation over local IPCPdimitri staessens2016-10-151-16/+19
|
* lib: Fix flow deallocation logicdimitri staessens2016-10-133-0/+6
| | | | | Both the N and N-1 entity must now call flow_dealloc for the port_id to be released.
* ipcpd: normal: Improve upon the internal designSander Vrijders2016-10-1211-574/+411
| | | | | | | | This commit will remove the RMT component from the normal IPCP, as some of its functionality would else be duplicated in the FMGR. Now all reading from flows, either N-1 or N+1 is done in the FMGR, then either passed to the FRCT or a lookup is performed in the PFF (not there yet) and the PDU is forwarded.
* ipcpd: normal: First version of the fast path bootstrapSander Vrijders2016-10-1111-209/+697
| | | | | | | This is the first version of the fast path bootstrap in the normal IPCP. It sets up a connection with the other end, and creates the appropriate data structures. N+1 and N-1 SDUs are read and written and passed through the right components.
* lib: Add non-copy reading from fd for IPCPsdimitri staessens2016-10-072-2/+2
|
* lib, dev: Add asynchronous deallocationdimitri staessens2016-10-071-4/+7
| | | | | Flow deallocation from the application will immediately return (void call). The IRMd will not send a reply message.
* ipcpd: Filter traffic on shim-eth-llcdimitri staessens2016-10-061-6/+28
| | | | Now correctly handles and drops non-ouroboros traffic.
* ipcpd: shim-eth-llc: Use correct SAP to lookup in the tableSander Vrijders2016-10-051-3/+5
| | | | | Upon deallocation, the remote's SAP was being used to lookup the fd instead of our own SAP. This resulted in strange behaviour.
* lib, ipcpd: Fix bad lockingSander Vrijders2016-10-051-5/+2
| | | | | | Some locks were taken at an inappropriate time, causing the shim-eth-llc to block indefinitely upon shutdown and causing flow allocation to halt since a response could never be given.
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-0413-2234/+1103
| | | | | | | | | | | | 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
* ipcpd: normal: Fix crapped up indentationSander Vrijders2016-09-071-48/+48
| | | | There was some crapped up indentation in the crc32 source file.
* Merged in sandervrijders/ouroboros/be-shm-pci (pull request #247)dimitri staessens2016-09-0711-133/+324
|\ | | | | | | ipcpd: normal: Add operations to get and set the PCI
| * ipcpd: normal: Add operations to get and set the PCISander Vrijders2016-09-0711-133/+324
| | | | | | | | | | | | | | | | | | This adds the operations needed in the normal IPCP to get and set the Protocol Control Information. It allows to allocate or release space in the current DU. The struct pci can be serialized into newly allocate space. Vice versa, a struct pci can be deserialized given a DU. It allows for decreasing the TTL in the DU and for calculating the CRC32. The TTL and CRC32 can now be selected when creating a new DIF.
* | ipcpd: Add missing include for FreeBSDdimitri staessens2016-09-071-0/+1
| |
* | Merged in dstaesse/ouroboros/be-split-fp (pull request #238)Sander Vrijders2016-09-025-12/+12
|\ \ | |/ |/| | | lib: Add northbound ringbuffers
| * lib: Add northbound ringbuffersdimitri staessens2016-09-025-12/+12
| | | | | | | | Fast path is split in north and southbound paths.
* | Merged in dstaesse/ouroboros/be-ipcp-dev (pull request #237)Sander Vrijders2016-09-023-3/+3
|\ \ | |/ |/| | | lib: ipcp: Decouple flow_dealloc
| * lib: ipcp: Decouple flow_deallocdimitri staessens2016-09-023-3/+3
| | | | | | | | Sending a dealloc to the irmd moved to its own call.
* | lib: Change rdrbuff API to use correct typesSander Vrijders2016-09-011-1/+1
|/ | | | | | The head and tail alloc and release operations were taking an int to identify the idx instead of a ssize_t. The size was a ssize_t instead of a size_t.
* lib, ipcp: Compile on Apple junkdimitri staessens2016-08-303-1/+7
| | | | | | Disables robust mutexes and clock attributes for condition variables for compatibility with OSX (SUSv2). Implements clock_gettime and adds some defines for OSX compatibility in time_utils.
* lib: Refactor shm_du_map to shm_rdrbuffdimitri staessens2016-08-295-57/+75
| | | | | | | | | | 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-264-8/+8
| | | | IPCPs will report their pid on shutdown for faster debugging.
* ipcpd, normal: Safe handling of CDAP requestsdimitri staessens2016-08-256-77/+282
| | | | Destruction of the object in the reply stage was unsafe.
* ipcpd: normal: Fix uninitialized valueSander Vrijders2016-08-251-6/+9
| | | | This removes the ret value which was not being set correctly.
* Merged in dstaesse/ouroboros/be-irmd-fix (pull request #222)Sander Vrijders2016-08-251-3/+4
|\ | | | | | | Fix locks
| * ipcpd, normal: Fix bad lockdimitri staessens2016-08-251-3/+4
| |
* | Merged in dstaesse/ouroboros/be-ipcp-locks (pull request #221)Sander Vrijders2016-08-248-460/+389
|\| | | | | | | ipcpd: Revised locking
| * ipcpd: Revised lockingdimitri staessens2016-08-248-460/+389
| | | | | | | | | | | | 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.
* | Merged in sandervrijders/ouroboros/be-normal-flow-alloc (pull request #219)dimitri staessens2016-08-248-33/+646
|\ \ | |/ |/| | | ipcpd: normal: Add initial steps for N+1 flow allocation
| * ipcpd: normal: Add initial steps for N+1 flow allocationSander Vrijders2016-08-238-33/+646
| | | | | | | | | | | | | | | | | | | | | | This adds the initial framework for flow allocation between two N+1 endpoints. The FMGR will receive flow allocation requests and will create a connection as a result, addressed to the right address, it will also pass a flow allocation message to this address. Upon receipt on the other side, the FMGR will be receive a flow allocation message and a pointer to a new connection. The FMGR can then accept or destroy the connection. This commit also introduces the RMT function, which is needed by the FRCT to forward its SDUs on the right file descriptor.
* | irmd, ipcp: Unlink file for UNIX socketsdimitri staessens2016-08-221-0/+6
| |
* | ipcpd: Fix potential memleaksdimitri staessens2016-08-211-2/+8
|/
* irmd, lib: Rebuild the IRMd data modeldimitri staessens2016-08-212-10/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* ipcpd: normal: Handle enrollment repliesSander Vrijders2016-08-193-11/+63
| | | | | | | | This adds a condition variable with a timeout to the CDAP request so that we can respond correctly to the answer from the remote. It also adds a timeout to the condition variable waiting on completion of enrollment. Furthermore, for every CDAP callback a new thread is now spawned, to avoid deadlocking in case a callback is stuck.
* 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: Fix bootstrap with api_binddimitri staessens2016-08-125-10/+27
| | | | | Calling api_bind during bootstrap caused the IRMd to lock up. api_bind is now called after the normal completes bootstrapping.