summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* build: Set libraries for OpenSSL when not foundDimitri Staessens2017-11-141-0/+1
| | | | | | | | | The build didn't reset the CMake variable for OPENSSL_LIBRARIES, causing bad input to the linker. This error showed up when trying to build on XUbuntu 17.10 without OpenSSL or libgrcypt installed. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* irmd: Don't access entry after unlockDimitri Staessens2017-11-141-1/+1
| | | | | | | | When bootstrapping an IPCP entry->api variable was accessed after the registry was unlocked for printing and info message. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Avoid duplicate definitions in librariesDimitri Staessens2017-11-131-4/+2
| | | | | | | | There were sources defined in multiple libraries. This issue was reported by the address sanitizer on FreeBSD. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Set compiler optimization for release buildDimitri Staessens2017-11-131-0/+3
| | | | | | | This automatically sets the -O3 compiler flag for release builds. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Fix detection of python for swig bindingsDimitri Staessens2017-11-101-3/+6
| | | | | | | | | | The cmake build only looked for the libraries but not the interpreter, which caused the build to fail if the library was present, but the interpreter was not installed and executable using the "python" command. The build now looks for the python interpreter as well. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Fix unused label with netmap for LLC shimDimitri Staessens2017-11-101-1/+3
| | | | | | | | When the netmap driver is used for the LLC shim, the label fail_device: was never used, resulting in a compiler error. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Use correct names for st_modes in RIBDimitri Staessens2017-11-101-6/+8
| | | | | | | | | The RIB implementation was using internal variables from the linux implementation instead of the POSIX defined macros. The POSIX defined macros require defining __USE_XOPEN to access them. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Fix FRCT sequence number network endiannessDimitri Staessens2017-11-092-4/+9
| | | | | | | | Endianness conversion from/to the network for the sequence number was missing in 68694bc. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Use packed struct for FRCT header accessDimitri Staessens2017-11-087-261/+142
| | | | | | | | | | | | | | | This replaces the variable FRCT header with a packed struct, which significantly simplifies the implementation. The shm_du_buff calls to release the head/tail are updated to return a pointer to the original head or the new tail (in symmetry to the alloc calls, which return a pointer to the new head and old tail), so that it immediately points to the structure that is needed. The frct_pci sources are removed and frct is now fully in the frct.c source file. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: List adjacencies in link-state databaseDimitri Staessens2017-11-071-4/+27
| | | | | | | The lsdb will now list management and data transfer adjacencies. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Create new SDUs for DHT join retriesDimitri Staessens2017-11-071-15/+15
| | | | | | | | | | The DHT join operation left an SDU in the rdrbuff for a couple of seconds during retries, which may cause the system to block if there is heavy traffic. This patch releases the sdb when the write fails and creates a new packet for every retry. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Refactor FRCT implementationDimitri Staessens2017-11-077-546/+572
| | | | | | | | | | | | | | | | | | | | The frct_pci and rq headers are moved from include/ouroboros to src/lib since they are only needed in the library. FRCT is moved to its own source file. FRCT takes the application PDUs, encapsulates and processes them and hands them back. This makes it easier to disable FRCT should the application want to write to a "raw" flow. An FRCT instance is now allocated upon alloc and released upon dealloc. The FRCT data structure is split into a sender and receiver connection record. Setting a new configuration will now be done upon sending the next data PDU, which will flag the DRF for a new run and use that configuration. This avoids some issues should packets arrive out-of-order, and simplifies setting a configuration. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Improve bash scriptsSander Vrijders2017-10-304-13/+18
| | | | | | | | This improves the bash scripts so they are less error prone. Mistakes were found using the parser on shellcheck.net Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* dev: Split nonblocking read and writeDimitri Staessens2017-10-303-4/+11
| | | | | | | | | | The FLOWFNONBLOCK flag now has two subflags FLOWFRNOBLOCK and FLOWFWNOBLOCK which allows setting the behavior of read and write independently. The default behavior is unchanged (blocking read and write). Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* dev: Bind python scripts to script nameDimitri Staessens2017-10-251-0/+13
| | | | | | | | | | This revises the library init script so that it checks whether the program is run by a python executable (python, python2 or python3) and announces the script name instead of the python interpreter. This enables binding python scripts. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* tools: Remove comment lines in CBRSander Vrijders2017-10-241-2/+0
| | | | | | | There were unnecessary comment lines in cbr.c, this removes them. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* tools: Change license to 3 clause BSDDimitri Staessens2017-10-2431-310/+808
| | | | | | | | | A more permissive license is needed on the tools since they serve as example code for programs built on top of the ouroboros-dev and ouroboros-irm libraries. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* tools: Refactor echo to single source fileDimitri Staessens2017-10-243-127/+73
| | | | | | | | This simplifies the echo-app tool implementation to a single source file since it's meant to be a small example application. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Fix exit bug in dev.cdimitri staessens2017-10-231-0/+4
| | | | | | | | | | If the library init() fails, the fini() call tries to access unreleased resources. The fix resets the ai struct to 0 if init() fails and checks a heap pointer for NULL before the fini() accesses internals. Signed-off-by: dimitri staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* doc: Fix documentation issues0.7dimitri staessens2017-10-172-7/+4
| | | | | | | | Removed a self-reference in ouroboros-tutorial. Fixes some style issues in ouroboros(8). Signed-off-by: dimitri staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* Merged in dstaesse/ouroboros/be-doc-ouroboros (pull request #629)dimitri staessens2017-10-1712-29/+646
|\ | | | | | | doc: Add general documentation
| * doc: Add general documentationdimitri staessens2017-10-1712-29/+646
|/ | | | | | | | | This adds user documentation for the Ouroboros User Manual in man sections 7 and 8. It consists of a general man page, a tutorial and a glossary. It also fixes and updates other manpages in the Ouroboros Programmer's Manual.
* Merged in dstaesse/ouroboros/be-build-bugs (pull request #628)dimitri staessens2017-10-141-1/+1
|\ | | | | | | build: Set bugreport URL
| * build: Set bugreport URLdimitri staessens2017-10-141-1/+1
|/
* Merged in dstaesse/ouroboros/be-deprecate-ouroboros-init-fini (pull request ↵dimitri staessens2017-10-1443-235/+123
|\ | | | | | | | | | | #626) Be deprecate ouroboros init fini
| * lib: Deprecate ouroboros_init and ourboros_finidimitri staessens2017-10-1443-235/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit deprecates ouroboros_init and ouroboros_fini and adds them as a constructor or destructor, causing these function to be run automatically when a program that links to the library calls and exits main(). For this to fully work, the library had to be split so that we can avoid the irmd calling these functions (the IRMd has to create the shm structures on which these calls depend). The library is split in 3 parts: libouroboros-dev, libouroboros-irm and libouroboros-common. The latter is linked to the other two so that including libouroboros-dev or libouroboros-irm will also link libouroboros-common.
* | Merged in dstaesse/ouroboros/be-fix-multiblock (pull request #627)dimitri staessens2017-10-144-2/+7
|\ \ | | | | | | | | | lib: Re-enable multi-block support
| * | lib: Re-enable multi-block supportdimitri staessens2017-10-134-2/+7
| | | | | | | | | | | | | | | | | | Multi-block support was forgotten during the update of the build system. This enables it again and fixes some bugs when it is disabled and larger SDUs are sent.
* | | Merged in dstaesse/ouroboros/be-shim-eth-clang (pull request #625)dimitri staessens2017-10-141-1/+9
|\ \ \ | |/ / |/| / | |/ ipcpd: Fix unreachable code in shim-eth-llc
| * ipcpd: Fix unreachable code in shim-eth-llcdimitri staessens2017-10-111-1/+9
|/ | | | | Closing the file descriptor after a while(true) loop led to clang compiler errors. This is fixed by adding a cleanup handler.
* Merged in dstaesse/ouroboros/be-fix-ls (pull request #624)dimitri staessens2017-10-071-1/+4
|\ | | | | | | ipcpd: Handle cancellation while writing LSAs
| * ipcpd: Handle cancellation while writing LSAsdimitri staessens2017-10-071-1/+4
| | | | | | | | | | | | | | | | | | | | This adds a cleanup handler to ensure the lock is released in the event that the thread is cancelled during a write. An alternative solution could be to make the flow write in a non-blocking way (only the blocking write contains an execution path that has a cancellation point). Fixes #55
* | Merged in dstaesse/ouroboros/be-irmd-version (pull request #623)dimitri staessens2017-10-072-27/+37
|\ \ | |/ |/| | | irmd: Add option to print version
| * irmd: Add option to print versiondimitri staessens2017-10-062-27/+37
|/ | | | | | | | | This adds the --version option to the IRMd. With this option it will print the version of Ouroboros to stdout and exit. Checking the version does not require root privileges. Also fixes calling log functions before log_init() and after log_fini().
* Merged in dstaesse/ouroboros/be-flow-cleanup (pull request #622)dimitri staessens2017-10-041-22/+1
|\ | | | | | | irmd: Don't destroy flows before IPCPs
| * irmd: Don't destroy flows before IPCPsdimitri staessens2017-10-041-22/+1
|/ | | | | | This allows the IPCPs to call ouroboros_fini() and clean up their buffers and drastically reduce chances of getting an assertion error that some rbuffs are not empty when shutting down the irmd.
* Merged in dstaesse/ouroboros/be-tpm-cancel (pull request #621)dimitri staessens2017-10-029-255/+261
|\ | | | | | | lib: Cancel tpm threads instead of marking exit
| * lib: Cancel tpm threads instead of marking exitdimitri staessens2017-09-309-255/+261
|/ | | | | | | | | This makes the threadpool use pthread_cancel instead of setting an exit flag that threadpool managed threads check periodically. This drastically reduces CPU consumption in the irmd when running a lot of applications. It requires cancellation handlers in the ipcp and irmd to be implemented to ensure safe cancellation during operation and shutdown.
* Merged in sandervrijders/ouroboros/be-lfas (pull request #620)Sander Vrijders2017-09-2910-60/+285
|\ | | | | | | ipcpd: normal: Add Loop-Free Alternates routing
| * ipcpd: normal: React to flow events in link state policySander Vrijders2017-09-293-4/+56
| | | | | | | | | | | | This will let the link state policy react to flow up and down events by notifying the PFFs of the routing instances of this event so they can take an appropriate action.
| * ipcpd: normal: Add Loop-Free Alternates routingSander Vrijders2017-09-298-56/+229
|/ | | | | | This adds the Loop-Free Alternates (LFA) policy. In case a link goes down a LFA may be selected to route the SDUs on without causing loops instead of the main hop that just went down.
* Merged in sandervrijders/ouroboros/be-routing (pull request #617)Sander Vrijders2017-09-264-189/+288
|\ | | | | | | Be routing
| * ipcpd: normal: Add refcount to graph edgesSander Vrijders2017-09-263-22/+53
| | | | | | | | | | This adds a refcount to the graph edges so that it is only included in the calculation if both sides announced it.
| * ipcpd: normal: Keep index in vertex structSander Vrijders2017-09-252-27/+24
| | | | | | | | | | This keeps the index in the vertex struct so that is more easily available during Dijkstra.
| * ipcpd: normal: Simplify Dijkstra implementationSander Vrijders2017-09-251-25/+17
| | | | | | | | | | | | This simplifies the Dijkstra implementation by immediately setting the correct next hop during Dijkstra instead of looping through the list of predecessors afterwards.
| * ipcpd: normal: Simplify internal graph functionsSander Vrijders2017-09-251-38/+26
| | | | | | | | | | This simplifies several internal graph functions by passing an array of bools instead of an array of vertices.
| * ipcpd: normal: Return list as routing tableSander Vrijders2017-09-254-106/+197
| | | | | | | | | | | | This returns a list as routing table instead of a pointer to a pointer to a pointer, which simplifies the looping through the routing table and makes it more extensible for future additions.
* | Merged in sandervrijders/ouroboros/be-dht-fix (pull request #618)Sander Vrijders2017-09-261-3/+3
|\ \ | | | | | | | | | ipcpd: normal: Set clock to realtime clock
| * | ipcpd: normal: Set clock to realtime clockSander Vrijders2017-09-261-3/+3
| |/ | | | | | | | | | | A pthread_cond_wait was using the pthread_cond_clock and thereby timing out constantly, consuming 100% CPU. This changes it to use the realtime clock.
* | Merged in dstaesse/ouroboros/be-sched-mul (pull request #619)dimitri staessens2017-09-263-10/+14
|\ \ | |/ |/| | | ipcpd: Add multiplier to scale scheduler threads