summaryrefslogtreecommitdiff
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | dev: Revise fqueue API and add man pagesdimitri staessens2017-08-292-30/+30
|/
* lib, ipcpd, irmd: Fix bugs reported by static analysisSander Vrijders2017-08-296-8/+20
| | | | This fixes several bugs as reported by the clang static analyzer.
* Merged in dstaesse/ouroboros/be-deprecate-gam (pull request #572)dimitri staessens2017-08-286-33/+91
|\ | | | | | | Be deprecate gam
| * tools: Add tool to connect IPCP componentsdimitri staessens2017-08-283-20/+84
| | | | | | | | | | | | | | | | | | | | | | | | This enables user-written tools to instruct IPCPs to establish and tear down connections (a.k.a. adjacencies) between its internal components (Management and Data Transfer). For more info, do "irm ipcp connect" or "irm ipcp disconnect" on the command line. This commit exposes a deletion bug in the RIB where FSO's fail to unpack/parse. This will be fixed when the RIB is deprecated.
| * ipcpd: Deprecate gam as autonomous componentdimitri staessens2017-08-284-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The graph adjacency manager has been deprecated in favor of providing an external interface into the connectivity manager so that adjacencies can be controlled from the command line, user scripts or user applications. The gam and its associated policies were removed from the normal IPCP and the IRM configuration tools. The "/members" part of the RIB was deprecated. Removal of the gam means that initial connectivity based on changes in the RIB can't be provided, so some changes were required throughout the normal IPCP. The enrollment procedure was revised to establish its own connectivity. First, it gets boot information from a peer by establishing a connection to the remote enrollment component and downloading the IPCP configuratoin. This is now done using its own protocol buffers message in anticipation of deprecation of the RIB and CDAP for communication within a DIF. After the boot information is downloaded, it establishes a data transfer flow for enrolling the directory (DHT). After the DHT has enrolled, it signals the peer to that enrollment is done, and the data transfer connection is torn down. Signaling connections is done via the nbs struct, which is now passed to the connmgr, which enables control of the connectivity graph from external sources.
* | lib: Add configuration message to FRCTSander Vrijders2017-08-262-95/+173
|/ | | | | This adds the configuration message to FRCT, which allows for configuring the connection.
* lib: Fix bad locking in frcti_readSander Vrijders2017-08-251-1/+1
| | | | A read lock was taken when a write lock was needed.
* lib, ipcpd, irmd: Fix several memleaksSander Vrijders2017-08-232-1/+2
| | | | | This fixes several memleaks as reported by valgrind. It also fixes some calls to close() with -1.
* 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.