summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/fmgr.c
Commit message (Collapse)AuthorAgeFilesLines
* ipcpd: normal: Add Flow State Objects to RIBSander Vrijders2017-03-131-4/+19
| | | | | | | This makes the routing component create a Flow State Database (FSDB). An FSDB contains Flow State Objects (FSOs). An FSO is created when a neighbor is added, it is deleted when a neighbor is removed and its QoS is updated when a neighbor's QoS changes.
* 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.
* ipcpd: normal: Refactor application entities and add neighbors structSander Vrijders2017-03-031-112/+171
| | | | | | | | | | | | | | | | | | | | This refactors the different Application Entities of the normal IPCP. They all listen to and use the connection manager to establish new application connections. This commit also adds a neighbors struct to the normal IPCP. It contains neighbor structs that contain application connection. Notifiers can be registered in case a neighbor changes (added, removed, QoS changed). The flow manager has an instance of this neighbors struct and listens to these events to update its flow set. The routing component also listens to these events so that it can update the FSDB if needed. The flow manager now also creates the PFF instances and the routing instances per QoS cube. The RIB manager also uses this an instance of the neighbors struct and listens to neighbor events as well.
* ipcpd: normal: Add connection managerSander Vrijders2017-03-021-1/+1
| | | | | | | This adds the connection manager which allows the different AEs of the normal IPCP to register with it. An AE can then use the connection manager to allocate a flow to a neighbor, or to wait for a new connection from a neighbor.
* lib: Split authentication from CACEPdimitri staessens2017-02-271-11/+0
| | | | | | | By removing authentication as part of CACEP, all policies disappear. CACEP becomes a policy-free connection establishment protocol between Application Entities. Authentication can later be added cleanly as a pure policy function when needed.
* lib: Remove application entity nameSander Vrijders2017-02-241-4/+1
| | | | | The AE name should not be passed over the layer boundaries. If an application has more than one AE it should exchange this in CACEP.
* Revise CACEP APIdimitri staessens2017-02-241-9/+9
| | | | | | The information passed to CACEP is split between the information about the connection and the information to be used during the authentication exchange.
* ipcpd: Move RIB configuration to common headerdimitri staessens2017-02-171-3/+4
| | | | | Moves the definitions of paths in the RIB for the normal IPCP to a header ribconfig.h to avoid repetition.
* ipcpd: Fix leaking name in cacep_infodimitri staessens2017-02-101-0/+1
|
* lib: Log to the logging systemdimitri staessens2017-02-081-21/+21
| | | | | | | | | | 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: Revise PCI manipulation in normaldimitri staessens2017-02-071-31/+11
| | | | | | | | | | | The pci function will store offsets to avoid having to recalculate them every time. TTL handling is removed from the fmgr, the TTL is automatically decreased when deserializing the PCI (or set to 1 if there is no TTL present so the PDU will be forwarded). The deserialisation function now takes a pointer to a struct pci as input to avoid memory allocation and release each time a PDU is processed. Some checks have been replaced with assert() and return values replaced with void where it makes sense.
* ipcpd, lib: Revise normal IPCPdimitri staessens2017-02-061-39/+61
| | | | | | | | | | 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/+2
| | | | | This allows the selection of a policy for the graph adjacency manager. Currently we only support constructing a complete graph.
* ipcpd: normal: Use new list APISander Vrijders2017-01-111-3/+3
| | | | | After a previous commit the API of the linked list was changed. This updates the files that were not yet merged upstream.
* ipcpd: normal: Add graph adjacency managerSander Vrijders2017-01-091-73/+124
| | | | | This commit adds the graph adjacency manager to the normal IPCP, which sets up N-1 flows to other members.
* ipcpd: normal: Fix bad unlockSander Vrijders2017-01-041-2/+0
| | | | This removes a bad unlock in the flow manager.
* Merged in dstaesse/ouroboros/be-normal-refactor (pull request #333)Sander Vrijders2017-01-041-2/+2
|\ | | | | | | ipcpd: Fix uninitialized variables in ribmgr
| * ipcpd: Fix bug in fmgrdimitri staessens2017-01-041-2/+2
| |
* | Merged in dstaesse/ouroboros/be-normal-refactor (pull request #331)Sander Vrijders2017-01-041-92/+10
|\| | | | | | | ipcpd: Refactor normal ipcp, initial commit
| * ipcpd: Refactor of normal IPCPdimitri staessens2017-01-041-92/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | lib, ipcpd, irmd: Proof of concept QoSdimitri staessens2017-01-031-5/+6
|/ | | | | | | | | | Now correctly relays the qoscube end-to-end in the stack. A simple function specifying the cube in the spec is used for initial testing. The translation is now done in dev.c, but it could be moved elsewhere when qos cabability matures and the need arises.
* ipcpd: Wait for operational state to start fmgrdimitri staessens2016-12-281-13/+3
| | | | | | The main thread will wait for the IPCP_OPERATIONAL state before starting the fmgr main thread by calling fmgr_init(), instead of the fmgr itself waiting for that state.
* ipcpd: Rename normal/path to normal/pathnamedimitri staessens2016-12-281-1/+1
|
* 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-238/+152
| | | | | 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-3/+3
| | | | | | | | | | | | | | | | 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.
* Merged in sandervrijders/ouroboros/be-operational-state (pull request #319)dimitri staessens2016-12-061-2/+2
|\ | | | | | | ipcpd: Change IPCP_RUNNING to IPCP_OPERATIONAL
| * ipcpd: Change IPCP_RUNNING to IPCP_OPERATIONALSander Vrijders2016-12-061-2/+2
| | | | | | | | Changes a state of the IPCP to a more correct terminology.
* | ipcpd: normal: Fix errors on IPCP shutdownSander Vrijders2016-12-061-3/+3
|/ | | | | This fixes several bad cleanups in the normal IPCP when it is shutting down.
* ipcpd: normal: Provide directory for registered namesSander Vrijders2016-12-021-19/+50
| | | | | This adds a directory to the normal IPCP that maps names on IPCP addresses.
* ipcpd: Split IPCP state PENDING_ENROLSander Vrijders2016-11-301-2/+2
| | | | | | | | 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: Fix bugs in connection establishmentSander Vrijders2016-10-271-42/+17
| | | | This fixes some bugs in connection establishment over the normal IPCP.
* lib: API for accepting flows with QoSdimitri staessens2016-10-251-1/+2
|
* build: Comply with -Wextra compiler flagdimitri staessens2016-10-211-0/+7
| | | | | This reduces the risk for some bugs, for instance due to signed/unsigned mismatches and unused variables.
* Merged in dstaesse/ouroboros/be-demux (pull request #267)Sander Vrijders2016-10-211-65/+78
|\ | | | | | | lib: Demultiplex the fast path
| * lib: Demultiplex the fast pathdimitri staessens2016-10-211-65/+78
| | | | | | | | | | | | | | | | The fast path will now use an incoming ring buffer per flow per process. This necessitated the development of a new method for the asynchronous io call, which is now based on an event queue system for scalability (fqueue). The ipcpd's and tools have been updated to this API.
* | ipcpd: normal: Avoid allocating flow over unenrolled IPCP.Sander Vrijders2016-10-171-0/+10
|/ | | | | There was no check to see if the normal IPCP was enrolled or not when a flow allocation request is done.
* ipcpd: normal: Improve upon the internal designSander Vrijders2016-10-121-235/+356
| | | | | | | | 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-53/+150
| | | | | | | 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-128/+74
| | | | | | | | | | | | 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
* Merged in dstaesse/ouroboros/be-split-fp (pull request #238)Sander Vrijders2016-09-021-2/+2
|\ | | | | | | lib: Add northbound ringbuffers
| * lib: Add northbound ringbuffersdimitri staessens2016-09-021-2/+2
| | | | | | | | Fast path is split in north and southbound paths.
* | lib: ipcp: Decouple flow_deallocdimitri staessens2016-09-021-1/+1
|/ | | | Sending a dealloc to the irmd moved to its own call.
* ipcpd, normal: Safe handling of CDAP requestsdimitri staessens2016-08-251-2/+4
| | | | Destruction of the object in the reply stage was unsafe.
* ipcpd: normal: Fix uninitialized valueSander Vrijders2016-08-251-6/+9
| | | | This removes the ret value which was not being set correctly.
* Merged in dstaesse/ouroboros/be-ipcp-locks (pull request #221)Sander Vrijders2016-08-241-9/+8
|\ | | | | | | ipcpd: Revised locking
| * ipcpd: Revised lockingdimitri staessens2016-08-241-9/+8
| | | | | | | | | | | | 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: Add initial steps for N+1 flow allocationSander Vrijders2016-08-231-15/+358
|/ | | | | | | | | | | This adds the initial framework for flow allocation between two N+1 endpoints. The FMGR will receive flow allocation requests and will create a connection as a result, addressed to the right address, it will also pass a flow allocation message to this address. Upon receipt on the other side, the FMGR will be receive a flow allocation message and a pointer to a new connection. The FMGR can then accept or destroy the connection. This commit also introduces the RMT function, which is needed by the FRCT to forward its SDUs on the right file descriptor.
* irmd, lib: Rebuild the IRMd data modeldimitri staessens2016-08-211-9/+0
| | | | | | | | | | | | | | | | | | | | | | The complete data model inside the IRMd has been restructured. The bind operation was revised to allow binding of AP and AP instances and register those names with different DIFs (see "irm bind" for details). Server applications require to call ap_init with a server name argument, client application that do not the be reachable over any DIF can call ap_init(NULL). Calling ap_init for a client with a specified name will not have adverse consequences for the application, but will consume unnecessary resources in the IRMd. Application servers can now be started at any point after the IRMd has been started. Starting servers, binding AP names and registering names in DIFs can be performed in any order that does not defy temporal logic. Supports naming instances by their pid. In case of IPCP Instances created with the IRM tool, the name assigned during "irm ipcp create" can be used. All the changes required updates in the tools.
* ipcpd: Fix bootstrap with api_binddimitri staessens2016-08-121-0/+9
| | | | | Calling api_bind during bootstrap caused the IRMd to lock up. api_bind is now called after the normal completes bootstrapping.