summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | irmd: Fix wrong unlocksSander Vrijders2016-10-261-2/+2
| | | | | | | | This fixes 2 wrong unlocks in the bind API method.
* | tools: irm: Bind IPCP name to IPCP-ISander Vrijders2016-10-263-3/+18
|/ | | | | | This will invoke the bind operation when using the irm tool to create a new IPCP. The new IPCP will be bound to the IPCP name as specified by the administrator.
* Merged in sandervrijders/ouroboros/be-ipcp-threads (pull request #283)dimitri staessens2016-10-263-33/+50
|\ | | | | | | ipcpd: Add threadpool for main loop
| * ipcpd: Add threadpool for main loopSander Vrijders2016-10-263-33/+50
| | | | | | | | | | | | | | 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-265-5/+12
|\ \ | |/ |/| | | lib: API for accepting flows with QoS
| * lib: API for accepting flows with QoSdimitri staessens2016-10-255-5/+12
| |
* | Merged in sandervrijders/ouroboros/be-directory (pull request #280)dimitri staessens2016-10-2615-276/+604
|\ \ | | | | | | | | | lib, irmd, ipcpd: Add name querying to IPCPs
| * | lib, irmd, ipcpd: Add name querying to IPCPsSander Vrijders2016-10-2615-276/+604
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | irmd: Add log messages for flow allocationdimitri staessens2016-10-261-2/+9
| | | | | | | | | | | | | | | | | | In the rewrite of the flow allocator for per-port ring buffers, the messages were removed because they were not accurate anymore. This adds messages when a port is allocated.
* | | 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-oping (pull request #277)Sander Vrijders2016-10-243-17/+26
| |\ \ | | |/ | |/| | | | tools: Fix memory leaks in oping
| * | Merged in dstaesse/ouroboros/be-fix-alloc (pull request #276)Sander Vrijders2016-10-244-42/+26
| |\ \ | | | | | | | | | | | | 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
| |_|/ |/| |
* | | tools: Fix memory leaks in opingdimitri staessens2016-10-243-17/+26
| |/ |/|
* | lib: Stabilise flow allocationdimitri staessens2016-10-234-42/+26
|/ | | | | | | 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-232-9/+3
| | | | | 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.
* tools: Fix setting flags in oping tooldimitri staessens2016-10-231-1/+1
|
* ipcpd: Fix unused variabledimitri staessens2016-10-231-1/+4
|
* lib: Fix closing applications with active flowsdimitri staessens2016-10-221-1/+2
| | | | The rdrbuff was previously closed before the remaining SDUs were removed.
* lib: Revert bad fqueue modificationdimitri staessens2016-10-222-2/+5
| | | | | An untested (and wrong) modification to the fqueue was mistakenly added to a previous commit. This corrects the bad code.
* irmd, tools: Fix missing initializersdimitri staessens2016-10-225-16/+18
| | | | | | | | | | | The BSD compiler requires explicit initializers for all fields with the -Wmissing-field-initializers flag enabled On branch be-fix-build # Changes to be committed: # modified: src/irmd/main.c # modified: src/tools/irm/irm.c # modified: src/tools/irm/irm_bind.c # modified: src/tools/irm/irm_ipcp.c # modified: src/tools/irm/irm_unbind.c # # Untracked files: # killouroboros.sh # start.sh #
* lib: Fix wrong comparisondimitri staessens2016-10-221-2/+2
| | | | FLOW_O_RDONLY is 0, so the previous statement would always be false.
* 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-2251-268/+296
| | | | | 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-2122-13/+114
| | | | | 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-2119-1070/+1537
|\ | | | | | | lib: Demultiplex the fast path
| * lib: Move rbuff creation/destruction to IRMddimitri staessens2016-10-216-84/+105
| | | | | | | | | | This stabilises flow allocation now that the rbuffs are created upon flow allocation. Only the IRMd can sync this process sufficiently.
| * lib: Demultiplex the fast pathdimitri staessens2016-10-2117-1051/+1497
| | | | | | | | | | | | | | | | 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-162-0/+19
| | | | | | | 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-153-49/+49
|
* lib: Fix initialisation of flow_setdimitri staessens2016-10-151-2/+3
| | | | The safe copy was not correctly initialised.
* lib: Fix flow deallocation logicdimitri staessens2016-10-137-34/+35
| | | | | 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.
* Merge remote-tracking branch 'upstream/be' into be-connectionSander Vrijders2016-10-126-93/+177
|\
| * lib: Track SDUs in the fast pathdimitri staessens2016-10-113-88/+174
| | | | | | | | | | | | This will allow to finalize deallocating flows until all SDUs have been processed. Read and write calls will now block when a flow was deallocated. Replaces NULL checks in the fast path with asserts.
| * lib: Add a type for struct flow_setdimitri staessens2016-10-093-5/+3
| | | | | | | | | | | | The struct flow_set can now be accessed in applications as flow_set_t. Fixes some malformed lines and homogenizes output when receiving bad SDUs in the oping tool.
* | 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-073-10/+45
|
* lib, dev: Add asynchronous deallocationdimitri staessens2016-10-074-55/+72
| | | | | Flow deallocation from the application will immediately return (void call). The IRMd will not send a reply message.
* lib: Fix shutdown with pending SDUsdimitri staessens2016-10-062-2/+4
| | | | | The SDU's were not correctly removed upon shutdown, peek should be pop.
* ipcpd: Filter traffic on shim-eth-llcdimitri staessens2016-10-063-7/+31
| | | | 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-052-7/+4
| | | | | | 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-0432-2763/+1975
| | | | | | | | | | | | 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
* lib: Fix shm for evil devicesdimitri staessens2016-09-083-6/+6
| | | | | | Cupertino's finest don't seem to support a write call with a filedescriptor that points to a shared memory file. ENOTSUP is not mentioned in their manpage either. Classic.