summaryrefslogtreecommitdiff
path: root/src/ipcpd
Commit message (Collapse)AuthorAgeFilesLines
* Merged in sandervrijders/ouroboros/be-rib-sync (pull request #301)dimitri staessens2016-11-204-392/+798
|\ | | | | | | ipcpd: normal: Add syncing of RIB objects
| * ipcpd: normal: Add syncing of RIB objectsSander Vrijders2016-11-194-392/+798
| | | | | | | | | | This adds the remote syncing of RIB objects. Subscribers are notified upon receipt of new/deleted/updated RIB objects.
* | ipcpd: Fix SDU size check in LLC shimdimitri staessens2016-11-181-1/+1
|/ | | | Total SDU size (including LLC header) cannot exceed 1500 bytes.
* ipcpd: normal: Add RIB objectsSander Vrijders2016-11-153-6/+587
| | | | | This adds the ability to create/update/destroy RIB objects. Syncing with other DIF members is not yet supported.
* lib: Simplify CDAP APISander Vrijders2016-11-012-84/+61
| | | | | | This will simplify the CDAP API. Now the opcode has to be given when sending a CDAP request. Before a separate operation was provided since some of the function parameters are unused for certain commands.
* Merged in sandervrijders/ouroboros/be-addr-auth (pull request #296)dimitri staessens2016-11-0110-15/+252
|\ | | | | | | ipcpd: normal: Add policy for obtaining a flat address
| * ipcpd: normal: Add policy for obtaining a flat addressSander Vrijders2016-11-0110-15/+252
| | | | | | | | | | | | This adds a policy for obtaining a flat address, and thus also the infrastructure for policies in the IPCP. The IPCP should check if the address is available; this is currently not there yet.
* | lib, ipcpd: Improve flow allocationdimitri staessens2016-10-314-50/+74
| | | | | | | | | | | | | | 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-313-4/+0
| |
* | ipcpd: Clean shutdown when bootstrap failsdimitri staessens2016-10-314-28/+46
|/ | | | | Fixes a double free (conf->dif_name) and the handling of non-created threads when the bootstrap of an IPCP fails
* ipcpd: normal: Fix bugs in connection establishmentSander Vrijders2016-10-274-46/+58
| | | | This fixes some bugs in connection establishment over the normal IPCP.
* ipcpd: Fix bad lock in shim-udpdimitri staessens2016-10-261-11/+10
|
* lib, ipcpd: Further stabilization of flowsdimitri staessens2016-10-265-145/+18
| | | | | | | | | | | 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-ipcp-threads (pull request #283)dimitri staessens2016-10-262-31/+49
|\ | | | | | | ipcpd: Add threadpool for main loop
| * ipcpd: Add threadpool for main loopSander Vrijders2016-10-262-31/+49
| | | | | | | | | | | | | | This adds a threadpool for the main loop of the IPCPs. Before there was a single thread handling each request, which could result in starvation since performing name queries at the same time as enrolling a normal IPCP was impossible.
* | Merged in dstaesse/ouroboros/be-qos (pull request #279)Sander Vrijders2016-10-261-1/+2
|\ \ | |/ |/| | | lib: API for accepting flows with QoS
| * lib: API for accepting flows with QoSdimitri staessens2016-10-251-1/+2
| |
* | Merged in sandervrijders/ouroboros/be-directory (pull request #280)dimitri staessens2016-10-269-172/+520
|\ \ | | | | | | | | | lib, irmd, ipcpd: Add name querying to IPCPs
| * | lib, irmd, ipcpd: Add name querying to IPCPsSander Vrijders2016-10-269-172/+520
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-252-31/+35
| |/ |/| | | | | | | 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.
* | Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into bedimitri staessens2016-10-243-45/+78
|\|
| * Merged in dstaesse/ouroboros/be-fix-alloc (pull request #276)Sander Vrijders2016-10-241-0/+1
| |\ | | | | | | | | | lib: Stabilise flow allocation
| * | 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.