summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/pol
Commit message (Collapse)AuthorAgeFilesLines
* ipcpd: Include string for memset in graph.c0.11.8Dimitri Staessens2018-05-291-0/+1
| | | | | | | | The memset function was used without including <string.h>, which some compilers complain about. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Check for variable length arraysDimitri Staessens2018-05-281-20/+25
| | | | | | | | | | The clang and gcc compilers don't complain about variable length arrays using the -c89 flag unless the flag -Wvla or -Wpedantic is set. This also fixes a memleak and two false positive uninitialized variable warnings reported by the clang static analyzer in graph.c. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Fix bad memory handling in LFA policySander Vrijders2018-05-042-7/+8
| | | | | | | | | | | | | The Loop-Free Alternates policy had bad memory management in two places. In the calculation of the LFAs a table was freed in the first iteration of a loop, whereas it was still needed in the other iterations. It is now freed outside of the loop. In the alternate PFF the address structs were not freed upon shutdown, this has been added as well. It also fixes some bad initialization in the LFA calculation function. 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 free in graph implementationSander Vrijders2018-02-241-0/+2
| | | | | | | | There was a missing free in case the address was not found in the routing table when trying to add an LFA for a certain address. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@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-132-9/+9
| | | | | | | | | | | 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-0911-11/+11
| | | | | | | Happy New Year, Ouroboros. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Use the term "layer" and deprecate "shim"Dimitri Staessens2017-12-191-1/+0
| | | | | | | | | | | | | | This changes the terminology to use layer instead of DIF and deprecate the word "shim" for the IPCPs that attach to Ethernet LLC and UDP .The terminology has not yet been changed in the variable names etc. This reflects the design choices in Ouroboros to make IPCPs pure resource allocators instead of also providing an "IPC service". The Ouroboros IPCPs that attach to Ethernet and UDP implement the allocator and are thus not really shims. 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-042-62/+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-022-6/+6
| | | | | | | | | | | 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: Reset *dist on graph_routing_table failDimitri Staessens2017-11-151-0/+1
| | | | | | | | | | The *dist pointer was not reset on failure, causing the caller to try to free an unmalloced or already freed pointer. Reported-by: Nick Aerts <nick.aerts@ugent.be> Tested-by: Nick Aerts <nick.aerts@ugent.be> 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>
* lib: Deprecate ouroboros_init and ourboros_finidimitri staessens2017-10-141-1/+1
| | | | | | | | | | | | | | This commit deprecates ouroboros_init and ouroboros_fini and adds them as a constructor or destructor, causing these function to be run automatically when a program that links to the library calls and exits main(). For this to fully work, the library had to be split so that we can avoid the irmd calling these functions (the IRMd has to create the shm structures on which these calls depend). The library is split in 3 parts: libouroboros-dev, libouroboros-irm and libouroboros-common. The latter is linked to the other two so that including libouroboros-dev or libouroboros-irm will also link libouroboros-common.
* 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-294-30/+196
| | | | | | 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-263-22/+53
| | | | | 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-252-27/+24
| | | | | This keeps the index in the vertex struct so that is more easily available during Dijkstra.
* ipcpd: normal: Simplify Dijkstra implementationSander Vrijders2017-09-251-25/+17
| | | | | | This simplifies the Dijkstra implementation by immediately setting the correct next hop during Dijkstra instead of looping through the list of predecessors afterwards.
* ipcpd: normal: Simplify internal graph functionsSander Vrijders2017-09-251-38/+26
| | | | | This simplifies several internal graph functions by passing an array of bools instead of an array of vertices.
* ipcpd: normal: Return list as routing tableSander Vrijders2017-09-254-106/+197
| | | | | | 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: Mark len parameter as unused in simple_pffdimitri staessens2017-09-211-0/+4
|
* ipcpd: normal: Add alternate hop PFFSander Vrijders2017-09-213-7/+470
| | | | | This adds a PFF that returns an alternate hop as next hop in case the hop that would have been returned is down.
* ipcpd: normal: Make PFF policy-basedSander Vrijders2017-09-205-6/+249
| | | | | 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-124-179/+463
| | | | | | | | 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, ipcpd: Fix e-mail addresses in protobuf filesSander Vrijders2017-08-291-2/+2
| | | | This fixes the wrong e-mail addresses in the protobuf files.
* lib, ipcpd, irmd: Fix bugs reported by static analysisSander Vrijders2017-08-291-2/+3
| | | | This fixes several bugs as reported by the clang static analyzer.
* ipcpd: Address comments on 176698edimitri staessens2017-08-281-5/+0
|
* ipcpd: Deprecate gam as autonomous componentdimitri staessens2017-08-285-340/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-215-5/+10
| | | | | | | | | | 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-1310-10/+10
|
* ipcpd: Add DHT as directory in normal IPCPdimitri staessens2017-07-181-2/+2
| | | | | | | | | 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.
* lib, ipcpd, irmd: Add full-fledged QoSSander Vrijders2017-06-211-6/+2
| | | | | | | 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: normal: Make routing a policySander Vrijders2017-05-157-0/+1276
| | | | | | 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: Remove FRCT from normal IPCPdimitri staessens2017-05-101-1/+0
| | | | | | | 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: Build complete graph with gamdimitri staessens2017-04-201-21/+50
| | | | | The complete policy will now build a complete graph. Currently a simple timer is used to check the member list periodically.
* lib, ipcpd, irmd: Register hash instead of namedimitri staessens2017-04-131-1/+1
| | | | | | | | | All information passed over the IRMd/IPCP boundary for using IPC services (flow allocation, registration) is now hashed. This effectively fixes the shared namespace between DIFs and the IRMDs. This PR also fixes some API issues (adding const identifiers), shuffles the include headers a bit and some small bugs.
* ipcpd: normal: Add missing else clauseSander Vrijders2017-04-051-1/+1
| | | | | A missing else clause was missing in the fast path, causing the PCI to be shrunk when it should not be. A double free has also been fixed.
* irmd: Keep track of qos in irm_flowdimitri staessens2017-03-311-2/+0
| | | | This fixes the bug in handling multiple concurrent flow allocations.
* ipcpd: normal: Several bugfixesSander Vrijders2017-03-211-0/+2
| | | | These solve several bugfixes in the normal.
* ipcpd: Fill qosspec in complete gam policydimitri staessens2017-03-211-0/+3
| | | | | The temporary cube parameter must be initialized if a qosspec is passed to avoid uninitialized values for the qoscube in the prototype.
* Change email addresses to ugent.beSander Vrijders2017-03-034-7/+8
| | | | | | | 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.