summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/pol/graph.c
Commit message (Collapse)AuthorAgeFilesLines
* build: Refactor normal to unicastDimitri Staessens2019-07-291-695/+0
| | | | | | | | This completes the renaming of the normal IPCP to the unicast IPCP in the sources, to get everything consistent with the documentation. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* build: Update copyright to 2019Dimitri Staessens2019-02-051-1/+1
| | | | | | | Updates the copyright notice in all sources to 2019. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* include: Remove _DEFAULT_SOURCE in endian.hDimitri Staessens2018-09-271-0/+4
| | | | | | | | This removes the _DEFAULT_SOURCE definition in the endian header as it should not be there. This avoids double and conflicting definitions. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* ipcpd: Simplify routing algorithm selectionSander Vrijders2018-09-141-65/+62
| | | | | | | | | | Previously there was a separate function per routing algorithm selection, when in fact the algorithms all take as input a graph and output a routing table, making it possible to place them in a single function. Signed-off-by: Sander Vrijders <[email protected]> Signed-off-by: Dimitri Staessens <[email protected]>
* 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 <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* 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 <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* ipcpd: Fix bad memory handling in LFA policySander Vrijders2018-05-041-7/+7
| | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Dimitri Staessens <[email protected]>
* 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 <[email protected]> Signed-off-by: Dimitri Staessens <[email protected]>
* include, src: Update copyright to 2018Dimitri Staessens2018-01-091-1/+1
| | | | | | | Happy New Year, Ouroboros. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib, tools: Rename application process and instanceDimitri Staessens2017-12-021-5/+5
| | | | | | | | | | | 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 <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* 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 <[email protected]> Tested-by: Nick Aerts <[email protected]> Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* ipcpd: normal: Add Loop-Free Alternates routingSander Vrijders2017-09-291-27/+172
| | | | | | 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-13/+21
| | | | | 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-26/+23
| | | | | 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-251-39/+75
| | | | | | 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.
* 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.
* 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/+517
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.