summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/pol/link_state.c
Commit message (Collapse)AuthorAgeFilesLines
* ipcpd: Check if mgmt flow event is FLOW_PKT0.11.12Sander Vrijders2018-07-271-1/+4
| | | | | | | | | The management flows were considering every event to be a FLOW_PKT event, when in fact it could also be a flow down or up event, resulting in indefinite reads. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* ipcpd: Fix sequence number check for link state0.11.11Sander Vrijders2018-07-251-11/+11
| | | | | | | | | Commit a3903da659e introduced sequence number for the LSAs to make it more robust, but the check was not done properly, and the seqno was always changed regardless of whether it was an old LSA or not. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* ipcpd: Only forward new LSAs of the LSDBSander Vrijders2018-07-151-17/+36
| | | | | | | | | | | | This will add a sequence number to the Link State Advertisements so that upon receiving a LSA we can check if we need to forward the LSA or not. If we already have the LSA with the received seqno in the LSDB we do not forward it. This allows for setting up a management network that has loops since the spanning tree upon which the LSAs are sent is pruned on every hop. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* ipcpd: Recalculate PFF only if LSDB changedSander Vrijders2018-06-191-18/+50
| | | | | | | | | This will add a flag so the PFF is only recalculated if the LSDB has changed. It also removes the instant recalculation of the LSDB if a new neighbor is added, since this might cause instabilities. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* ipcpd: Change connection down to flow downSander Vrijders2018-06-191-1/+2
| | | | | | | | | | The DT component was flagging a connection as down and passing the fd that was down. Of course the other components expect a connection instead of just a fd. Now the connection manager will listen to flow up and down events, and flag the connection up or down if needed. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* ipcpd: Recalculate PFF upon adding new neighborSander Vrijders2018-05-031-31/+42
| | | | | | | | | | This recalculates the PFF upon adding a new neighbor, so that the network reconverges faster. It is safe to do so since it is only done by the two IPCPs that established the new flow. The PFF is also recalculated every 4 seconds. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* lib: Allow disabling partial readDimitri Staessens2018-03-191-2/+6
| | | | | | | | | | | | | | This allows disabling partial reads. It adds a flag FLOWFRNOPART that disables partial reads. Partial read is different from partial delivery (FRCTFPARTIAL), which allows delivery of fragments of an incomplete packet and thus potentially corrupted data. FLOWFRNOPART will never deliver corrupted data (unless FRCTFPARTIAL is also set). If FLOWFRNOPART is set and the buffer provided to flow_read is too small for the SDU, that SDU will be discarded and -EMSGSIZE is returned; Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Fix reading LSAs in link-state policy0.10.7Dimitri Staessens2018-03-161-2/+2
| | | | | | | | | | | The read buffer had the exact length of a link-state message. With the partial read implemented, we should then do another read() to check if there are more parts of the message (which will return 0). To avoid the additional read() call every time, the buffer was extended by 1 byte. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Fix missing lock in link-state policyDimitri Staessens2018-02-231-0/+27
| | | | | | | | The replication of the database was missing a lock. Now the database is first copied under lock and then sent. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Get RIB attributes from componentDimitri Staessens2018-02-201-29/+80
| | | | | | | | | | | | This revises the RIB so it gets the complete file attribute list from the component instead of setting some attributes in the library. This will allow setting read/write access later on in the component itself. The time of last change of lsdb entries in the file system is now set to the time of the last received Link State Update for that entry. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Revise Data Transfer component0.10.0Dimitri Staessens2018-02-131-8/+8
| | | | | | | | | | | This makes the TTL non-optional and allows the maximum (initial) value of the TTL to be specified at bootstrap (the default is set to 60). The fd in the DT PCI is now called EID (Endpoint ID). The names "dif" and "ae" have been replaced by "layer" and "component" respectively in all sources. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Replicate database on new MGMT flowDimitri Staessens2018-02-061-0/+17
| | | | | | | | This will trigger the existing member to send all entries in its database as LSAs to the new member. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* include, src: Update copyright to 2018Dimitri Staessens2018-01-091-1/+1
| | | | | | | Happy New Year, Ouroboros. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Remove protocol buffers from link stateSander Vrijders2017-12-041-33/+23
| | | | | | | | | This will remove google protocol buffers from the link state routing algorithm in the normal IPCP. It now uses packed structs, as supported by the compilers of choice. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* lib, tools: Rename application process and instanceDimitri Staessens2017-12-021-1/+1
| | | | | | | | | | | This refactors ouroboros to use "program" instead of "application process" and "process" instead of "application process instance" to align with current naming in current Operating Systems courses instead of the ISO nomenclature adopted by RINA. This change permeates through the entire implementation. Also contains some minor other refactors. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: List adjacencies in link-state databaseDimitri Staessens2017-11-071-4/+27
| | | | | | | The lsdb will now list management and data transfer adjacencies. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Handle cancellation while writing LSAsdimitri staessens2017-10-071-1/+4
| | | | | | | | | | This adds a cleanup handler to ensure the lock is released in the event that the thread is cancelled during a write. An alternative solution could be to make the flow write in a non-blocking way (only the blocking write contains an execution path that has a cancellation point). Fixes #55
* ipcpd: normal: React to flow events in link state policySander Vrijders2017-09-291-2/+53
| | | | | | This will let the link state policy react to flow up and down events by notifying the PFFs of the routing instances of this event so they can take an appropriate action.
* ipcpd: normal: Add Loop-Free Alternates routingSander Vrijders2017-09-291-2/+19
| | | | | | This adds the Loop-Free Alternates (LFA) policy. In case a link goes down a LFA may be selected to route the SDUs on without causing loops instead of the main hop that just went down.
* ipcpd: normal: Add refcount to graph edgesSander Vrijders2017-09-261-3/+3
| | | | | This adds a refcount to the graph edges so that it is only included in the calculation if both sides announced it.
* ipcpd: normal: Keep index in vertex structSander Vrijders2017-09-251-1/+1
| | | | | This keeps the index in the vertex struct so that is more easily available during Dijkstra.
* ipcpd: normal: Return list as routing tableSander Vrijders2017-09-251-15/+25
| | | | | | This returns a list as routing table instead of a pointer to a pointer to a pointer, which simplifies the looping through the routing table and makes it more extensible for future additions.
* ipcpd: normal: Make PFF policy-basedSander Vrijders2017-09-201-1/+1
| | | | | This turns the PDU Forwarding Function of the IPCP into a policy. For now only the simple PFF policy is available.
* ipcpd: Enroll DHT when creating dt connectiondimitri staessens2017-09-191-14/+18
| | | | | | | | | The DHT will now enroll or sync when a data transfer connection is added. This avoids the need to create a temporary data transfer connection during enrollment (and speeds it up considerably). The notifier system was modified to take an opaque pointer to the object that registers as a parameter.
* ipcpd: Fix src and dst in link-state advertisementsdimitri staessens2017-09-181-2/+2
|
* lib: Provide RIB API to export internals via fusedimitri staessens2017-09-181-7/+117
| | | | | | | This adds a virtual RIB that is accessible as a filesystem that is accessed through a fuse mountpoint (configurable , default is /tmp/ouroboros). Currently, each IPCP will export its link state database.
* ipcpd: Revise internals of normal IPCPdimitri staessens2017-09-121-166/+454
| | | | | | | | 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.
* ipcpd: Address comments on 176698edimitri staessens2017-08-281-5/+0
|
* ipcpd: Deprecate gam as autonomous componentdimitri staessens2017-08-281-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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-1/+1
|
* ipcpd: normal: Make routing a policySander Vrijders2017-05-151-0/+360
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.