summaryrefslogtreecommitdiff
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* 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-1211-2944/+132
| | | | | | | | 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: Add per instance FRCT lockSander Vrijders2017-09-011-21/+35
| | | | | This adds a per instance FRCT lock, since it was taking a write lock, thereby severely impacting parallelism in dev.c
* lib: Add fccntl configuration commanddimitri staessens2017-08-314-156/+133
| | | | | | | This replaces the flow_set_* commands with a single fccntl command that can configure flows and the FRCT instance. For more details, see "man 3 fccntl".
* irmd: Fix deleting corrupt shm fileSander Vrijders2017-08-291-0/+12
| | | | | This will delete the rdrbuff also when it has been corrupted before. Otherwise the irmd won't start, as experienced on my desktop.
* Merged in sandervrijders/ouroboros/be-fix-authors (pull request #575)Sander Vrijders2017-08-295-10/+10
|\ | | | | | | lib, ipcpd: Fix e-mail addresses in protobuf files
| * lib, ipcpd: Fix e-mail addresses in protobuf filesSander Vrijders2017-08-295-10/+10
| | | | | | | | This fixes the wrong e-mail addresses in the protobuf files.
* | 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
|