summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal
Commit message (Collapse)AuthorAgeFilesLines
* ipcpd: Fix double finalization after some failuresdimitri staessens2017-09-071-5/+4
| | | | | When enroll or bootstrap failed, finalize_components could be called twice, resulting in double frees or use-after-free.
* ipcpd: normal: Avoid redefining a typedefSander Vrijders2017-09-061-2/+1
| | | | | This avoids a redefinition of a typedef which is a C11 feature, and thus not supported by clang when the c89 switch is enabled.
* ipcpd: normal: Simplify enroll APISander Vrijders2017-09-015-12/+10
| | | | | | | This will remove the dst parameter from enroll_boot, since it was only being used in logging. It also turns some other debug logs into info logs, and makes the component names as they are used in logs all lowercase.
* ipcpd: Fix thread leaks in normal IPCPdimitri staessens2017-08-292-2/+2
|
* ipcpd: Fix missing unlock in dhtdimitri staessens2017-08-291-1/+2
|
* Merged in dstaesse/ouroboros/be-dht (pull request #577)dimitri staessens2017-08-291-16/+23
|\ | | | | | | ipcpd: Fix state in dht lookup at lookup_wait
| * ipcpd: Fix state in dht lookup at lookup_waitdimitri staessens2017-08-291-16/+23
| | | | | | | | | | | | | | | | | | | | | | The correct state was returned but not set internally in the lookup_struct, causing lookup_wait to return a lookup in LU_PENDING if the wait timedout. This also unlocks the IRMd during register calls and fixes some cleanup if lookup_wait gets interrupted. Fixes #48
* | Merged in sandervrijders/ouroboros/be-fix-authors (pull request #575)Sander Vrijders2017-08-293-6/+6
|\ \ | |/ |/| | | lib, ipcpd: Fix e-mail addresses in protobuf files
| * lib, ipcpd: Fix e-mail addresses in protobuf filesSander Vrijders2017-08-293-6/+6
| | | | | | | | This fixes the wrong e-mail addresses in the protobuf files.
* | dev: Revise fqueue API and add man pagesdimitri staessens2017-08-291-9/+9
|/
* lib, ipcpd, irmd: Fix bugs reported by static analysisSander Vrijders2017-08-292-3/+5
| | | | This fixes several bugs as reported by the clang static analyzer.
* ipcpd: Address comments on 176698edimitri staessens2017-08-285-10/+4
|
* tools: Add tool to connect IPCP componentsdimitri staessens2017-08-287-31/+136
| | | | | | | | | | | | 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-2832-1270/+856
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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, ipcpd, irmd: Fix several memleaksSander Vrijders2017-08-232-1/+5
| | | | | This fixes several memleaks as reported by valgrind. It also fixes some calls to close() with -1.
* ipcpd: Fix data race in connmgrdimitri staessens2017-08-221-0/+5
| | | | The removal of the mutex and signal in 198b709 was a mistake.
* ipcpd: Improve locking in connmgrdimitri staessens2017-08-223-66/+93
|
* build: Revise the build systemdimitri staessens2017-08-2121-23/+60
| | | | | | | | | | 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.
* ipcpd: Fix missing clock_gettime in flow allocatordimitri staessens2017-08-161-0/+2
|
* ipcpd: Refactor normal IPCP failure handlingdimitri staessens2017-08-161-35/+24
|
* build: Replace fsf snail mail with contact URLdimitri staessens2017-08-1348-51/+48
|
* Merged in dstaesse/ouroboros/be-tpm (pull request #550)dimitri staessens2017-08-131-7/+28
|\ | | | | | | lib: Fix instability in threadpool manager
| * ipcpd: Fix tracking of outstanding DHT requestsdimitri staessens2017-08-131-7/+28
| | | | | | | | | | | | The DHT failed when receiving multiple responses in a short timeframe. The lookup struct now keeps track of the number of outstanding requests.
* | build: Fix compilation on OS X Sierradimitri staessens2017-08-111-0/+4
|/
* lib, ipcpd, tools: Fix enum assignmentsSander Vrijders2017-08-101-1/+1
| | | | This fixes several assignments to the wrong enum type.
* build, lib, ipcpd, irmd: Add support for libgcryptdimitri staessens2017-08-091-1/+0
| | | | | | | | | | | | | | | | 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.
* ipcpd: Fix assignment of fd's in flow allocatorDimitri Staessens2017-08-081-2/+4
|
* ipcpd: Fix finding values in DHTDimitri Staessens2017-08-051-5/+18
| | | | | | | | | The DHT lookup would stop if a node returned no new useful information (i.e. the value for the key or unknown nodes closer to the key) without waiting for other pending requests that could still return useful information. Now it correctly tracks the number of outstanding requests or returns if it doesn't get a response for KAD_T_RESP seconds. This fixes multi-hop flow allocation over the normal.
* Merge remote-tracking branch 'origin/testing-deadlines' into beDimitri Staessens2017-08-031-4/+12
|\
| * ipcpd: Fix pthread_cond_timedwait deadlinesdimitri staessens2017-08-031-4/+12
| | | | | | | | | | | | This fixes pthread_condtimedwaits in the flow allocator of all IPCPs that had bad deadlines set (the interval instead of the actual absolute time).
* | ipcpd: Fix registration bug in DHTdimitri staessens2017-07-291-2/+2
| |
* | ipcpd: Add multithreading to schedulerdimitri staessens2017-07-291-25/+43
| | | | | | | | | | | | | | | | The scheduler in the normal IPCP is now multithreaded. While useful in itself for scalability, it currently solves thread starvation in case of executing post_sdu operations that may require a response. This could be further revised in the future to split the SDU handling threads from the component tasks.
* | ipcpd: Cleanup sdb after unpackeddimitri staessens2017-07-291-6/+3
| |
* | ipcpd: Harmonize logs in directorydimitri staessens2017-07-291-1/+5
| |
* | ipcpd: Some fixes in DHTdimitri staessens2017-07-291-13/+10
| | | | | | | | | | | | | | Fixes a memory leak when the DHT is destroyed during a send_msg. Fixes a deadlock when destroying the DHT with a pending lookup. Removes some debug logs that clutter output due to expected redundant FIND_VALUE responses.
* | ipcpd: Retry sending DHT response messagesdimitri staessens2017-07-241-4/+16
| | | | | | | | | | | | | | This will make the remote retry sending responses when the DT component can't send the message. This is most useful at enrollment, when the remote's routing table may need to wait a bit on the routing component for a path to the new member,
* | ipcpd: Fix DHT lookup processingdimitri staessens2017-07-201-20/+25
| | | | | | | | | | Not all returned contacts were processed when a FIND_NODE or FIND_VALUE message was returned.
* | ipcpd: Add DHT as directory in normal IPCPdimitri staessens2017-07-1815-160/+2742
|/ | | | | | | | | This implements a Distributed Hash Table (DHT) based on the Kademlia protocol, with default parameters set as used in the BitTorrent Mainline DHT. This initial implementation is almost feature complete, except for some things to be done after a testing period: caching and stale peer bumping, and setting the expiration timeout via the IRM tool.
* ipcpd: Check connmgr acceptor thread at createdimitri staessens2017-07-121-1/+2
|
* lib, ipcpd, irmd: Add full-fledged QoSSander Vrijders2017-06-214-9/+5
| | | | | | | 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, ...
* ipcpd: Fix flow allocation over normaldimitri staessens2017-06-192-3/+1
|
* ipcpd: Start DT component before flow allocatordimitri staessens2017-05-241-15/+15
|
* ipcpd: Allow registering protocol machines with DTdimitri staessens2017-05-244-119/+176
| | | | | | Other protocol machines now have to register on top of the DT AE. This allows multiple instances of the same protocol machine and avoids preallocating fds for each protocol machine instance.
* ipcpd: normal: Make routing a policySander Vrijders2017-05-1514-337/+490
| | | | | | 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-75/+58
| | | | | | 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-1015-709/+91
| | | | | | | 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.
* ipcpd: Don't send deallocation messagesdimitri staessens2017-05-022-39/+0
| | | | | | | The flow resources are Delta-t protocol machines that will time out and free their resources without any required signaling. Flows can be cleaned locally when the application requests it and all FRCT instances have timed out and released their resources.
* ipcpd: Fix sending fa dealloc messagedimitri staessens2017-04-292-18/+31
| | | | | | | The frct instance was previously destroyed before sending the message, resulting in the destination address being 0 and the message getting dropped. Some fixes in the normal for deallocation, but will require further revision once all data transfer protocols are in place.
* ipcpd: Fix some bugs for the normal splitdimitri staessens2017-04-284-39/+46
|
* Merged in sandervrijders/ouroboros/be-frct-api (pull request #497)Sander Vrijders2017-04-2815-680/+647
|\ | | | | | | ipcpd: normal: Split connection establishment