summaryrefslogtreecommitdiff
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* lib: Make sender and receiver inactivity simple checksSander Vrijders2017-08-231-153/+68
| | | | | | This makes the sender and receiver inactivity timers into simple checks that compare when the last SDU was sent to the current time to set the receiver or sender inactivity.
* lib: Remove bad assertionSander Vrijders2017-08-231-1/+0
| | | | | Timeout was asserted not to be NULL, but sometimes timeout can be NULL and is a valid parameter when NULL.
* lib: Fix timeout value of flow_event_waitSander Vrijders2017-08-222-5/+7
| | | | | shm_flow_set_wait was called with a timeout even though flow_event_wait was called with timeout NULL.
* lib: Fix calling frct_clear in wrong functionSander Vrijders2017-08-221-2/+2
| | | | frct_clear was called in ouroboros_fini instead of ouroboros_init.
* lib: Fix CRC check and add frct_clearSander Vrijders2017-08-223-16/+41
| | | | | | 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.
* Merged in sandervrijders/ouroboros/be-tw (pull request #560)Sander Vrijders2017-08-224-164/+25
|\ | | | | | | Be tw
| * lib: Make timerwheel a passive componentSander Vrijders2017-08-223-162/+23
| | | | | | | | | | | | This turns the timerwheel into a passive component since it is used by application using the library. The user of the timerwheel now has to call timerwheel_move to advance the timerwheel.
| * lib: Fix check for robust mutexesSander Vrijders2017-08-221-2/+2
| | | | | | | | | | There was an else clause matched with the wrong if statement, resulting in robust mutexes being enabled even in glibc 2.25.
* | lib, irmd: Use static buffer for messagesdimitri staessens2017-08-221-19/+11
|/
* build: Revise the build systemdimitri staessens2017-08-2126-115/+246
| | | | | | | | | | 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-1710-112/+988
| | | | | | | | | | 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.
* lib: Check system-specific call firstdimitri staessens2017-08-171-6/+6
| | | | The build failed on OS X if an old version of libgrypt is installed.
* build: Replace fsf snail mail with contact URLdimitri staessens2017-08-1344-80/+44
|
* lib: Fix data race on fqueues bitmapdimitri staessens2017-08-131-126/+143
| | | | | | This locks the process when allocating and destroying flow_sets. The flows_lock has been renamed to lock. Refactors and fixes a memleak in ouroboros_init.
* lib: Fix TPM thread count on failuredimitri staessens2017-08-131-1/+1
|
* Merged in dstaesse/ouroboros/be-tpm (pull request #550)dimitri staessens2017-08-131-31/+57
|\ | | | | | | lib: Fix instability in threadpool manager
| * lib: Fix instability in threadpool managerdimitri staessens2017-08-121-31/+57
| | | | | | | | | | | | The threadpool manager now tracks threads to prevent cyclic behaviour where too many threads shut down and the TPM responds with creating additional threads.
* | build: Fix compilation on OS X Sierradimitri staessens2017-08-118-34/+42
|/
* build: Reset LIBGCRYPT_LIBRARIES when not founddimitri staessens2017-08-101-0/+2
|
* build, lib, ipcpd, irmd: Add support for libgcryptdimitri staessens2017-08-093-28/+65
| | | | | | | | | | | | | | | | 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-036-29/+28
| | | | | | 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-013-325/+81
| | | | | 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-262-0/+267
| | | | | | | | 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: Fix destruction of CDAP instancesdimitri staessens2017-07-201-8/+11
| | | | | | | The received message list was not correctly freed upon destruction of the CDAP object. There was also still a rare case in which thread cancellation would keep a lock, blocking the IPCP shutdown, which is also fixed.
* lib: Fix processing state in CDAPdimitri staessens2017-07-201-7/+19
| | | | | | The processing state was not correctly reset at all points in the loop, causing CDAP to block the IPCP on shutdown in some cases. This also adds a missing unlock and reorders some other unlocks.
* lib: Wait for fqueue loop at cdap_del_flowdimitri staessens2017-07-161-62/+80
| | | | | | | The enrollment calls dealloc immediately after cdap_del_flow(), but the CDAP instance may still have that fd in its fqueue loop. cdap_del_flow will now wait for an fqueue loop to end before returning, to make sure the flow is not needed anymore.
* ipcpd, lib, irmd: Hardcode shim hash algorithmsSander Vrijders2017-07-121-1/+1
| | | | | | | This will hardcode the shim hash algorithms as they don't have an enrollment phase. Fixes #44
* irmd: Shutdown sanitizer without cancellationdimitri staessens2017-07-121-6/+25
|
* lib: Fix formatting in irm.cdimitri staessens2017-07-121-2/+1
|
* lib: Make read_msg static in cacep.cdimitri staessens2017-07-121-2/+2
|
* lib: Add secure random generatordimitri staessens2017-07-092-5/+81
| | | | | This adds a secure random number generator. It will use OS specific calls with a fallback to OpenSSL if available.
* lib: Fix bug and add test for time_utilsdimitri staessens2017-07-053-6/+173
|
* lib: Handle errors when creating cdap_req structsdimitri staessens2017-07-041-2/+13
|
* lib: Fix memleak in FRCT enrollmentdimitri staessens2017-07-031-0/+3
|
* lib, ipcpd, irmd: Add full-fledged QoSSander Vrijders2017-06-215-33/+253
| | | | | | | 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: include missing headers in dev.cdimitri staessens2017-06-211-8/+8
| | | | | The dev.c source file had some missing include headers. This PR fixes inconsistencies between the definitions and declarations in ipcp-dev.h
* lib, irmd: Handle case fallthrough in gcc 7dimitri staessens2017-06-041-0/+1
|
* lib: Fix bug in bitmapdimitri staessens2017-05-242-8/+18
|
* lib: Fix some bugs in dev.cdimitri staessens2017-05-231-45/+55
| | | | | | | Fixed releasing an allocated fd on failure. As the sending of dealloc messages has been deprecated, dealloc was simplified by removing a stale block of code (replaced with an assertion). Fixed reading some variables without a necessary lock.
* ipcpd: normal: Make routing a policySander Vrijders2017-05-152-3/+6
| | | | | | This makes the routing component into a policy since different approaches may exist to do this, depending on how high the rank of the DIF is.
* ipcpd: Allow specifying fixed syntaxdimitri staessens2017-05-154-64/+61
| | | | | | This commits adds the functions and messages to specify a fixed protocol syntax during CACEP. It also revises the messages for specifying the DT protocol syntax from the irm tool.
* ipcpd: Remove FRCT from normal IPCPdimitri staessens2017-05-101-1/+1
| | | | | | | In order to ensure 100% reliable transfer, the protocol state machine that takes care of retransmission and SDU ordering has to be in the application. Flow allocation in the normal now uses fds. The PDU_type field was deprecated and AE's within the DIF can use reserved fds.
* lib: Remove obsolete lock in dev.cdimitri staessens2017-04-281-135/+5
|
* ipcpd: Add capability reportingdimitri staessens2017-04-271-2/+4
| | | | | | | | The IPCP will now report the DIF name and the hash value to the IRMd as a dif_info struct. This can later be extended to add further capability reporting. Some bugfixes in normal. Fixes #24
* lib: Add call to reserve blocks in rdrbuffdimitri staessens2017-04-262-7/+46
| | | | | | | This adds a call ipcp_sdb_reserve to reserve memory in the rdrbuff without directly writing to a flow. The ipcp_flow_del function was renamed to ipcp_sdb_release. The functions operating on sdbs are moved to their own header.
* lib: Fix bad lock in ribdimitri staessens2017-04-201-2/+3
|
* lib: Fix compilation error in hash.cSander Vrijders2017-04-191-0/+2
| | | | | If compiled as release build, an error would be generated as the control reaches the end of a non-void function.
* ipcpd: Allow specifying the hash algorithm to usedimitri staessens2017-04-163-10/+64
| | | | Currently CRC32, MD5, and SHA3 (224, 256, 384 and 512 bit) are supported.
* lib: Add implementation for MD5 hashesdimitri staessens2017-04-164-0/+409
|
* lib: Fix minor things in sha3 implementationdimitri staessens2017-04-162-1/+40
|