summaryrefslogtreecommitdiff
path: root/src/lib/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* lib: Revise du buff API towards a memory allocatorDimitri Staessens2018-10-261-2/+2
| | | | | | | | | This changes the API to the rdrbuff to treat it as a pool memory allocator. The head and tailspace to allocate in a buffer is now set system-wide instead of being passed as a parameter. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* Merge branch 'testing' into beSander Vrijders2018-10-111-1/+1
|\
| * lib: Disable CRC by defaultDimitri Staessens2018-10-111-1/+1
| | | | | | | | | | | | | | | | This sets the CRC check to be disabled by default, since it greatly hampers performance and is almost never needed. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* | Merge branch 'testing' into beDimitri Staessens2018-10-091-1/+0
|\|
| * lib: Define QoS specs inside header file0.12.1Sander Vrijders2018-10-091-1/+0
| | | | | | | | | | | | | | | | | | The QoS specs were defined in the source file instead of in the header file, which resulted in uninitialized structs being used, which gave rise to weird behavior in the library. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* | Merge branch 'testing' into beDimitri Staessens2018-10-061-4/+8
|\|
| * lib: Split error checking from FRCTDimitri Staessens2018-10-051-0/+2
| | | | | | | | | | | | | | | | This splits off the CRC from FRCT so it can be set independently. Ouroboros now allows raw flows with error checking. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
| * ipcpd, lib, irmd, tools: Change SDU to packetSander Vrijders2018-10-051-3/+3
| | | | | | | | | | | | | | | | This will change SDU (Service Data Unit) to packet everywhere. SDU is OSI terminology, whereas packet is Ouroboros terminology. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
| * lib: Pass qosspec at flow allocationDimitri Staessens2018-10-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | The flow allocator now passes the full qos specification to the endpoint, instead of just a cube. This is a more flexible architecture, as it makes QoS cubes internal to the layers. Adds endianness transforms for the flow allocator protocol in the normal IPCP. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* | lib: Support for rudimentary retransmissionDimitri Staessens2018-07-271-1/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | This adds rudimentary support for sending and processing acknowledgments and doing retransmission. It replaces the generic timerwheel with a specific one for retransmission. This is currently a fixed wheel allowing retransmissions to be scheduled up to about 32 seconds into the future. It currently has an 8ms resolution. This could be made configurable in the future. Failures of the flow (i.e. rtx not working) are indicated by the rxmwheel_move() function returning a fd. This is currently not yet handled (maybe just setting the state of the flow to FLOWDOWN is a better solution). The shm_rdrbuff tracks the number of users of a du_buff. One user is the full stack, each retransmission will increment the refs counter (which effectively acts as a semaphore). The refs counter is decremented when a packet is acked. The du_buff is only allowed to be removed if there is only one user left (the "stack"). When a packet is retransmitted, it is copied in the rdrbuff. This is to ensure integrity of the packet when multiple layers do retransmission and it is passed down the stack again. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Use macros for all time utility functions0.11.9Dimitri Staessens2018-06-131-1/+0
| | | | | | | | | This replaces the time utility functions with macros. This avoids using library functions in the tools and also slightly speeds up the implementation. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Revise FRCT reorderingDimitri Staessens2018-06-041-1/+0
| | | | | | | | The reordering queue is replaced by a fixed ring buffer for speed and simplicity. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Reduce default buffer size to 4096 blocksDimitri Staessens2018-02-261-2/+1
| | | | | | | | This reduces the default buffer size to 4096 blocks (about 16MB). This will avoid problems when users try a default build on smaller machines. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Revise Data Transfer component0.10.0Dimitri Staessens2018-02-131-2/+2
| | | | | | | | | | | This makes the TTL non-optional and allows the maximum (initial) value of the TTL to be specified at bootstrap (the default is set to 60). The fd in the DT PCI is now called EID (Endpoint ID). The names "dif" and "ae" have been replaced by "layer" and "component" respectively in all sources. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Use GNUInstallDirs instead of hardcoded values0.9.9Sander Vrijders2018-02-061-3/+3
| | | | | | | | This changes the build to use GNUInstallDirs instead of hardcoded values. Package maintainers can then override these defaults by passing the correct value to cmake on the command line. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib, tools: Rename application process and instanceDimitri Staessens2017-12-021-3/+3
| | | | | | | | | | | This refactors ouroboros to use "program" instead of "application process" and "process" instead of "application process instance" to align with current naming in current Operating Systems courses instead of the ISO nomenclature adopted by RINA. This change permeates through the entire implementation. Also contains some minor other refactors. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Fix setting configuration definitionsDimitri Staessens2017-11-181-0/+5
| | | | | | | | Variable in cache need to be explicitly unset else they will remain in the cache and still be defined by #cmakedefine. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Add options for debug builds with sanitizerDimitri Staessens2017-11-141-2/+2
| | | | | | | | | This adds three build types, DebugASan, DebugTSan and DebugLSan that enable the Address, Thread and Leak Sanitizer by setting the fsanitize flag to the compiler. This option is supported by both gcc and clang. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* 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>
* 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>
* lib: Use packed struct for FRCT header accessDimitri Staessens2017-11-081-1/+0
| | | | | | | | | | | | | | | 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>
* Merged in dstaesse/ouroboros/be-deprecate-ouroboros-init-fini (pull request ↵dimitri staessens2017-10-141-19/+45
|\ | | | | | | | | | | #626) Be deprecate ouroboros init fini
| * lib: Deprecate ouroboros_init and ourboros_finidimitri staessens2017-10-141-19/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | lib: Re-enable multi-block supportdimitri staessens2017-10-131-0/+2
|/ | | | | | 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.
* lib: Disable lockless rbuff by defaultSander Vrijders2017-09-221-2/+2
| | | | | This disables the lockless rbuff by default since it is less stable and tested.
* irmd: Init libgcrypt before using itdimitri staessens2017-09-201-1/+1
|
* build: Notify if FUSE is not installeddimitri staessens2017-09-191-0/+2
|
* ipcpd, lib: Add flow down eventsSander Vrijders2017-09-191-0/+2
| | | | | | | | This adds the flow down event to Ouroboros. In the shim-eth-llc, a netlink socket is opened which listens to device up/down events. For each event the flow is then adjusted with fccntl to notify the user the flow is down or back up again. In the normal IPCP an event is thrown if a write reports that the flow is down.
* lib: Provide RIB API to export internals via fusedimitri staessens2017-09-181-2/+23
| | | | | | | This adds a virtual RIB that is accessible as a filesystem that is accessed through a fuse mountpoint (configurable , default is /tmp/ouroboros). Currently, each IPCP will export its link state database.
* lib: Add reordering queue to FRCTSander Vrijders2017-09-151-0/+1
| | | | | This adds a reordering queue to FRCT so that SDUs can be delivered in-order when requested.
* build: Fix DDNS tool detection for shim-udpdimitri staessens2017-09-131-6/+5
| | | | | | This fixes output when detecting DDNS tools and homogenizes output and the APIs used to pass variables between the build system and the sources. Fixes some minor issues and typos).
* ipcpd: Revise internals of normal IPCPdimitri staessens2017-09-121-9/+2
| | | | | | | | This removes the RIB as a datastructure and CDAP as the protocol between IPCPs. CDAP, the rib and related sources are deprecated. The link-state protocol policy is udpated to use its own protocol based on a simple broadcast strategy along a tree. The neighbors struct is deprecated and moved to the library as a generic notifier component.
* build: Add systemd unit on installSander Vrijders2017-09-051-1/+1
| | | | This adds a systemd unit for the irmd on installation of Ouroboros.
* lib: Fix CRC check and add frct_clearSander Vrijders2017-08-221-1/+1
| | | | | | This adds the CRC check by default on outgoing SDUs. It fixes some errors in the serialization and deserialization of the SDU. frct_clear was added to avoid bad initialization of the array of FRCT instances.
* build: Revise the build systemdimitri staessens2017-08-211-15/+89
| | | | | | | | | | This revises the build system to have configuration per system component. System settings can now be set using cmake. The standard compliance defines were removed from configuration header and are set in the sources where needed. Also some small code refactors, such as moving the data for shims out of the ipcp structure to the respective shims were performed.
* lib: Add basic FRCT mechanismsSander Vrijders2017-08-171-0/+2
| | | | | | | | | | This adds the basic FRCT mechanisms to the library. Upon flow alloc or accept an FRCT instance is now created and used when reading or writing to the flow. The timerwheel has been refactored to allow recharging timers and removing them and is now part of the library. The first SDU sent over the connection has the DRF set and this initializes the connection. Sender and receiver inactivity timers are added.
* build: Fix compilation on OS X Sierradimitri staessens2017-08-111-14/+21
|
* build: Reset LIBGCRYPT_LIBRARIES when not founddimitri staessens2017-08-101-0/+2
|
* build, lib, ipcpd, irmd: Add support for libgcryptdimitri staessens2017-08-091-23/+44
| | | | | | | | | | | | | | | | This adds support for libgcrypt. If at least version 1.7.0 of libgcrypt is present, it may be used for secure random number generation and is used for hashing in the irmd/ipcp. The hash definitions are moved to the internal hash.h header, and defined independently of the hashes that are defined as part of the directory policy for the normal IPCP. The translation is moved from the IRMd to ipcpd/ipcp.h. The bootstrap call from the IRMd expects the IPCP to return the correct hash algorithm with a dif_info struct, which is in line with the behavior of the enroll call. This also improves how some platform checks in the build system are handled.
* build: Add check for robust mutexesSander Vrijders2017-08-031-2/+1
| | | | | | This adds a check for robust mutexes. The constant HAVE_ROBUST_MUTEX is set accordingly in config.h. It also adds some other fixes to make the prototype compile on the Hurd.
* lib: Simplify initializing flowsSander Vrijders2017-08-011-2/+1
| | | | | This refactors dev.c to have a common function called init_flow that is called whenever a flow is allocated in dev.c
* lib: Add threadpool managerdimitri staessens2017-07-261-0/+1
| | | | | | | | This adds a threadpool manager component in the library that is used in the IRMd and IPCPs. The threadpool manager now doesn't detach threads but does a join when they exit. This solves a data race in the previous implementation where some threads were not completely finished upon release of some resources.
* lib: Add secure random generatordimitri staessens2017-07-091-5/+30
| | | | | This adds a secure random number generator. It will use OS specific calls with a fallback to OpenSSL if available.
* lib, ipcpd, irmd: Add full-fledged QoSSander Vrijders2017-06-211-1/+4
| | | | | | | This adds more Quality of Service support to Ouroboros. One part is the network specific characteristics such as bandwidth, delay, ... The other part is end-to-end QoS like reliability, window based flow control, ...
* lib: Add implementation for MD5 hashesdimitri staessens2017-04-161-0/+1
|
* lib, ipcpd, irmd: Register hash instead of namedimitri staessens2017-04-131-1/+2
| | | | | | | | | All information passed over the IRMd/IPCP boundary for using IPC services (flow allocation, registration) is now hashed. This effectively fixes the shared namespace between DIFs and the IRMDs. This PR also fixes some API issues (adding const identifiers), shuffles the include headers a bit and some small bugs.
* build: Format CMakeLists.txt filesSander Vrijders2017-03-031-9/+9
| | | | The CMakeLists files are now properly indented.
* lib: Split authentication from CACEPdimitri staessens2017-02-271-12/+2
| | | | | | | By removing authentication as part of CACEP, all policies disappear. CACEP becomes a policy-free connection establishment protocol between Application Entities. Authentication can later be added cleanly as a pure policy function when needed.
* lib: Exchange protocol info during CACEPdimitri staessens2017-02-211-0/+6
| | | | | | | | | This exchanges a protocol name, a protocol version and concrete syntax for the protocol upon CACEP. For CDAP, only version 1 and GPB are supported. No lists for other supported versions or syntaxes are exchanged (but the proto file supports it). CACEP fails if there is a mismatch between the protocol names, version and syntax specified by the communicating parties.
* lib: Revise CACEPdimitri staessens2017-02-201-3/+7
| | | | | | | | | Revises CACEP policies to stateless library calls. It provides two policies: an anonymous authentication policy that will generate random credentials for the peer, and a simple authentication policy that will return a name for the peer and an address. Changes the normal IPCP to use the updates API calls.