summaryrefslogtreecommitdiff
path: root/src/lib/cdap.c
Commit message (Collapse)AuthorAgeFilesLines
* ipcpd: Revise internals of normal IPCPdimitri staessens2017-09-121-868/+0
| | | | | | | | 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.
* lib: Add fccntl configuration commanddimitri staessens2017-08-311-1/+0
| | | | | | | 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".
* dev: Revise fqueue API and add man pagesdimitri staessens2017-08-291-7/+7
|
* lib, ipcpd, irmd: Fix bugs reported by static analysisSander Vrijders2017-08-291-0/+1
| | | | This fixes several bugs as reported by the clang static analyzer.
* build: Revise the build systemdimitri staessens2017-08-211-1/+2
| | | | | | | | | | 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.
* build: Replace fsf snail mail with contact URLdimitri staessens2017-08-131-2/+1
|
* 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.
* lib: Some fixes in CDAPdimitri staessens2017-03-311-1/+10
|
* lib: Fix double typedefdimitri staessens2017-03-311-2/+0
|
* lib: Cancel outstanding CDAP requests on destroydimitri staessens2017-03-311-0/+1
|
* lib: Fix invalid access in CDAPSander Vrijders2017-03-301-2/+5
| | | | This fixes an invalid access to an object that was already freed.
* lib: Fix heap-use-after-free in CDAPdimitri staessens2017-03-301-1/+1
|
* lib: Revise handling CDAP messagesdimitri staessens2017-03-291-62/+104
| | | | | | | | | | | | | Fixes a number of issues in CDAP. CDAP keeps track if a message is being processed, and moves it to the end of the request list if it is. It will now correctly wait for new messages. The invoke_ids are generated locally per CDAP instance, invoke_ids can't be used to track incoming requests, we need to keep track of the fd. The keys are now identifiers (taken from the same local pool as the invoke_ids) that are used to track requests.
* lib: Fix invoke_ids and failure handling in CDAPdimitri staessens2017-03-251-41/+18
| | | | | When something fails, the successfully sent CDAP messages should be reported back. Invoke_ids were not correctly released.
* lib: Fix memleaks in cdapdimitri staessens2017-03-221-8/+23
|
* lib: Fix CDAP with multiple fdsdimitri staessens2017-03-141-14/+51
|
* lib: Fix typo in cdapdimitri staessens2017-03-031-2/+2
|
* lib: Manage multiple flows with a single CDAP instancedimitri staessens2017-03-031-108/+233
| | | | | | | | You can now add multiple flows to a CDAP instance. This will simplify sending messages to different peers (e.g. for syncing the RIB). A request will now return an array of keys terminated by CDAP_KEY_INVALID. Removes the enum from the CDAP proto file to just take the opcode as an integer.
* Change email addresses to ugent.beSander Vrijders2017-03-031-1/+2
| | | | | | | Our mailserver was migrated from intec.ugent.be to the central ugent.be emailserver. This PR updates the header files to reflect this change as well. Some header files were also homogenized if the parameters within the functions were badly aligned.
* cdap: Take void * for send operationsdimitri staessens2017-02-101-11/+15
| | | | This facilitates sending arbitrary variables over CDAP.
* build: Update licenses and copyrightdimitri staessens2017-01-091-10/+11
| | | | | Copyright is set to 2016 - 2017. License text on includes and sources in the library are changed to indicate the LGPLv2.1 license.
* lib: Revise implementation of listdimitri staessens2017-01-091-3/+3
| | | | Adds LGPL license to the ouroboros lists.
* lib: Fix leaks in cdapdimitri staessens2016-12-281-14/+19
| | | | | Fixes a memleak of cdap_req structs and correcly releases invoke_ids if the cdap_request_send operation fails during its execution.
* ouroboros: Correct license statementsdimitri staessens2016-12-241-3/+2
| | | | | This corrects the license statements on all files. Installed headers are LGPLv2.1, the rest of the code is GPLv2.
* ipcpd, lib: Refactor normal ipcp and cdapdimitri staessens2016-12-241-137/+394
| | | | | Refactors the normal IPCP fmgr and ribmgr, and modifies the API for cdap so that no callbacks are needed.
* src, tools: Set/get timeout and get qos for flowsdimitri staessens2016-12-121-1/+1
| | | | | | | | | | | | | | | | Receiver timeouts can now be set on a flow using the flow_set_timeout function. Specifying NULL disables the timeout. The flow_get_timeout function gets the value for the timeout. This commit also deprecates fcntl in favor of flow_get_flags and flow_set_flags functions. struct qos_spec is typedef'd as a qosspec_t. The tools and cdap.c are updated to use the new API. Fixes a bug in operf client where the client's writer thread wouldn't cancel on SIGINT.
* lib: Simplify CDAP APISander Vrijders2016-11-011-125/+68
| | | | | | This will simplify the CDAP API. Now the opcode has to be given when sending a CDAP request. Before a separate operation was provided since some of the function parameters are unused for certain commands.
* build: Compile with strict conversiondimitri staessens2016-10-221-2/+3
| | | | | This has the code checked with -Wcast-qual and -Wconversion flags. These flags were removed because SWIG generated code fails.
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-041-0/+1
| | | | | | | | | | | | IPCPs can now use ap_init() to initialize the memory. All flows are accessed using flow descriptors, this greatly simplifies IPCP development. Reverts the fast path to a single ap_rbuff per process. Splits lib/ipcp into irmd/ipcp and lib/ipcp-dev. Adds a lib/shim-dev holding tailored functions for shims. Moves the buffer_t to utils.h. Fixes the shim-eth-llc length field. Removes the flow from shared.h. Fixes #4 Fixes #5
* lib, cdap: Fix message handlerdimitri staessens2016-08-291-1/+1
| | | | When getting a DELETE opcode, create was called instead of delete.
* cdap: Fix destructiondimitri staessens2016-08-271-6/+3
| | | | | Destroying NULL should succeed. Resources need to be freed even if flow_dealloc fails.
* ipcpd: normal: Handle enrollment repliesSander Vrijders2016-08-191-61/+92
| | | | | | | | This adds a condition variable with a timeout to the CDAP request so that we can respond correctly to the answer from the remote. It also adds a timeout to the condition variable waiting on completion of enrollment. Furthermore, for every CDAP callback a new thread is now spawned, to avoid deadlocking in case a callback is stuck.
* ipcpd: normal: Allow exchange of static DIF informationSander Vrijders2016-08-081-118/+63
| | | | | | This adds the functionality of exchanging the static DIF information between 2 DIF members. After exchange the enrollment is stopped, and the IPCP that initiated enrollment transitions to the enrolled state.
* lib, tools: Add POSIX version to source filesSander Vrijders2016-08-081-0/+1
| | | | | Sometimes the POSIX version was not set in source files. This caused the compiler to not find the timespec struct, since we are using C89.
* ipcpd: normal: Allow initiating enrollmentSander Vrijders2016-08-011-0/+4
| | | | | | | This will add more functionality for enrolling two normal IPCPs with each other. Some bugs were fixed in CDAP. Now on enrolling, an IPCP will send a START message to the other IPCP. Next step is syncing the RIBs.
* ipcpd: normal: Provide initial steps for enrollmentSander Vrijders2016-07-271-23/+23
| | | | | | This provides the normal IPCP with bootstrapping and the initial steps for enrollment. Next step is actually reacting to an enrollment request and sending the data transfer constants.
* lib, irmd: Fix clang and CI compilation errorsSander Vrijders2016-07-051-14/+22
| | | | | | This commit fixes some errors reported during compilation that were undiscovered by my gcc compiler but found by clang, and errors not found on my system but found by the CI platform.
* lib: Provide first implementation of revised CDAPSander Vrijders2016-07-051-0/+430
| | | | | | | | This commit introduces a first version of the revised CDAP specification. CACEP (for authentication purposes) has been separated from CDAP. Application developers may use CDAP if they find it useful. Within Ouroboros CDAP will be used to perform operations on the RIB of an IPCP.
* Initial build infrastructureSander Vrijders2016-02-111-0/+0
Contains the initial build infrastructure. Cmake was chosen for portability reasons.