summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/ribmgr.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: Log to the logging systemdimitri staessens2017-02-081-5/+5
| | | | | | | | | | This removes the logfile and outputs log messages to the logging system. The creation of the logfiles (as well as the ap_init() call) were moved into ipcp_init() to simplify the IPCP creation and shutdown. Fixes #25 Fixes #27
* ipcpd, lib: Revise normal IPCPdimitri staessens2017-02-061-1615/+48
| | | | | | | | | | This PR updates the normal IPCP to use the new RIB. The old ribmgr is removed and replaced by a stub that needs to be implemented. All components (dir, fmgr, frct) were adapted to the new RIB API. A lot of functionality was moved outside of the ribmgr, such as the addr_auth, which is now a component of the IPCP. The address is also stored to the ipcpi struct. The irm tool has an option to set the gam policy of the rib manager.
* ipcpd: normal: Create policies for GAMSander Vrijders2017-01-121-2/+11
| | | | | This allows the selection of a policy for the graph adjacency manager. Currently we only support constructing a complete graph.
* Merge remote-tracking branch 'upstream/be' into be-gamSander Vrijders2017-01-091-7/+7
|\
| * lib: Revise implementation of listdimitri staessens2017-01-091-7/+7
| | | | | | | | Adds LGPL license to the ouroboros lists.
* | ipcpd: normal: Add graph adjacency managerSander Vrijders2017-01-091-3/+3
|/ | | | | This commit adds the graph adjacency manager to the normal IPCP, which sets up N-1 flows to other members.
* ipcpd: Initialize rnodes in ribmgr_ro_createdimitri staessens2017-01-041-3/+4
| | | | Fixes warnings by some compilers about possibly uninitialized access.
* ipcpd: Fix uninitialized variables in ribmgrdimitri staessens2017-01-041-3/+7
|
* ipcpd: Refactor of normal IPCPdimitri staessens2017-01-041-103/+174
| | | | | | | | | | | | | | Reorganizes the normal IPCP a bit to make sure internal components do not need to access the state of the IPCP. The IPCP has now a thread calling accept and delegating it to the correct component based on the AE name (this used to be in the fmgr). Internal components are initialized upon enrollment or bootstrap of the IPCP. If a step fails, the IPCP goes back to the INIT state, if all components boot correctly, it goes to the operational state. RIB synchronization is still done by sending a CDAP start/stop and syncing with a ribmgr state, but needs revision later on.
* ipcpd: Fix memleak in ribmgrdimitri staessens2016-12-281-0/+12
|
* ipcpd: Rename normal/path to normal/pathnamedimitri staessens2016-12-281-1/+1
|
* Merged in dstaesse/ouroboros/be-normal (pull request #327)Sander Vrijders2016-12-241-0/+2
|\ | | | | | | ipcpd: Fix missing return in ribmgr
| * ipcpd: Fix missing return in ribmgrdimitri staessens2016-12-241-0/+2
| |
* | 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-306/+195
| | | | | Refactors the normal IPCP fmgr and ribmgr, and modifies the API for cdap so that no callbacks are needed.
* Merged in sandervrijders/ouroboros/be-operational-state (pull request #319)dimitri staessens2016-12-061-1/+1
|\ | | | | | | ipcpd: Change IPCP_RUNNING to IPCP_OPERATIONAL
| * ipcpd: Change IPCP_RUNNING to IPCP_OPERATIONALSander Vrijders2016-12-061-1/+1
| | | | | | | | Changes a state of the IPCP to a more correct terminology.
* | ipcpd: normal: Fix errors on IPCP shutdownSander Vrijders2016-12-061-3/+6
|/ | | | | This fixes several bad cleanups in the normal IPCP when it is shutting down.
* ipcpd, tools: Fix compilation on 32 bit linuxdimitri staessens2016-12-031-1/+1
| | | | | Fixes issues with uint64_t not corresponding with unsigned long in printf statements. Reorganises a calculation to reduce overflows.
* ipcpd: normal: Provide directory for registered namesSander Vrijders2016-12-021-1/+78
| | | | | This adds a directory to the normal IPCP that maps names on IPCP addresses.
* ipcpd: normal: Address review commentsSander Vrijders2016-12-021-11/+9
| | | | This addresses some comments after a code review by Dimitri.
* ipcpd: Split IPCP state PENDING_ENROLSander Vrijders2016-11-301-62/+85
| | | | | | | | This will split the IPCP state PENDING_ENROL into IPCP_CONFIG and IPCP_BOOTING. IPCP_CONFIG is concerned only with configuring the IPCP with the bare essence. When in IPCP_BOOTING, the IPCP will complete its configuration by starting its policies, and thus making the IPCP completely functioning.
* ipcpd: normal: Add helper functions for pathnamesSander Vrijders2016-11-291-3/+3
| | | | | This adds some helper functions to construct pathnames. Users of the RIB manager may find these handy when constructing RIB objects.
* ipcpd: normal: Change ro_attr initializationSander Vrijders2016-11-291-81/+67
| | | | | | | This changes the way RIB object attributes are set. Previously the struct was called ro_props and it had to be allocated on the heap. Now it follows the model of pthreads closely. This commit also changes the callbacks of the RO subscribers to return void instead of int.
* ipcpd: normal: Complete flat address policySander Vrijders2016-11-291-1/+1
| | | | | This will add a check in the flat address policy to see if the address is in use or not.
* ipcpd: normal: Add timerwheel to RIB managerSander Vrijders2016-11-281-81/+219
| | | | | | | The RIB manager now keeps track of ROs it has already received. The identification of a RO it knows is kept in a struct ro id. For the deletion of these RO ids, a timerwheel to the RIB manager. It also deletes ROs if they have a specified timeout.
* ipcpd: normal: Add syncing of RIB objectsSander Vrijders2016-11-191-372/+772
| | | | | This adds the remote syncing of RIB objects. Subscribers are notified upon receipt of new/deleted/updated RIB objects.
* ipcpd: normal: Add RIB objectsSander Vrijders2016-11-151-2/+510
| | | | | This adds the ability to create/update/destroy RIB objects. Syncing with other DIF members is not yet supported.
* lib: Simplify CDAP APISander Vrijders2016-11-011-75/+61
| | | | | | 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.
* ipcpd: normal: Add policy for obtaining a flat addressSander Vrijders2016-11-011-13/+35
| | | | | | This adds a policy for obtaining a flat address, and thus also the infrastructure for policies in the IPCP. The IPCP should check if the address is available; this is currently not there yet.
* build: Comply with -Wextra compiler flagdimitri staessens2016-10-211-0/+18
| | | | | This reduces the risk for some bugs, for instance due to signed/unsigned mismatches and unused variables.
* ipcpd: normal: Improve upon the internal designSander Vrijders2016-10-121-19/+7
| | | | | | | | This commit will remove the RMT component from the normal IPCP, as some of its functionality would else be duplicated in the FMGR. Now all reading from flows, either N-1 or N+1 is done in the FMGR, then either passed to the FRCT or a lookup is performed in the PFF (not there yet) and the PDU is forwarded.
* ipcpd: normal: First version of the fast path bootstrapSander Vrijders2016-10-111-2/+24
| | | | | | | This is the first version of the fast path bootstrap in the normal IPCP. It sets up a connection with the other end, and creates the appropriate data structures. N+1 and N-1 SDUs are read and written and passed through the right components.
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-041-109/+101
| | | | | | | | | | | | 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
* ipcpd: normal: Add operations to get and set the PCISander Vrijders2016-09-071-6/+6
| | | | | | | | | This adds the operations needed in the normal IPCP to get and set the Protocol Control Information. It allows to allocate or release space in the current DU. The struct pci can be serialized into newly allocate space. Vice versa, a struct pci can be deserialized given a DU. It allows for decreasing the TTL in the DU and for calculating the CRC32. The TTL and CRC32 can now be selected when creating a new DIF.
* ipcpd, normal: Safe handling of CDAP requestsdimitri staessens2016-08-251-64/+33
| | | | Destruction of the object in the reply stage was unsafe.
* ipcpd: Revised lockingdimitri staessens2016-08-241-28/+33
| | | | | | The state lock was reverted to an rwlock to avoid interference of management functions with the fast path. IPCPs now close without calling unsafe functions in the signal handler.
* ipcpd: normal: Handle enrollment repliesSander Vrijders2016-08-191-8/+42
| | | | | | | | 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: Add condition variable to IPCP stateSander Vrijders2016-08-111-23/+23
| | | | | | | This adds a condition variable to the IPCP state, so that upon state changes any listeners to state changes can be notified. It also replaces the read/write lock with a mutex in order to be able to do so.
* ipcpd: normal: Allow exchange of static DIF informationSander Vrijders2016-08-081-20/+215
| | | | | | 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.
* ipcpd: normal: Allow initiating enrollmentSander Vrijders2016-08-011-12/+38
| | | | | | | 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-4/+261
| | | | | | 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.
* ipcpd: normal: Add main loop to normal IPCPSander Vrijders2016-07-151-2/+2
| | | | | | This adds the main loop to the normal IPCP, just like it is present in the shim IPCPs. So in essence, the normal IPCP now reacts to all operations from ipcp.h.
* ipcpd: normal: Establish N-1 management flowsSander Vrijders2016-07-141-0/+62
This adds the intial implementation of establishing management N-1 flows between normal IPCPs. On calling fmgr_mgmt_flow, a management flow will be setup to a certain destination IPCP. After flow allocation, the fd is handed to the RIB manager. The flow manager also listens for incoming flow requests. In case they are management flows, they are handed to the RIB manager, otherwise to the FRCT.