summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/graph.c
Commit message (Collapse)AuthorAgeFilesLines
* ipcpd: normal: Make routing a policySander Vrijders2017-05-151-517/+0
| | | | | | 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: normal: Fix logsSander Vrijders2017-03-311-8/+0
| | | | | This removes some logs in the graph component and replaces prints of uin64_t variables with an architecture agnostic variant.
* ipcpd: normal: Make graph undirectedSander Vrijders2017-03-291-6/+32
| | | | | | This turns the directed graph into an undirected one. Only one side of the flow creates an FSDB entry. The graph structure creates an edge object for every vertex involved when an edge is updated or removed.
* ipcpd: normal: Fix wrong update to indexSander Vrijders2017-03-281-2/+2
| | | | | The index j in the function that transforms the list of predecessors to a routing table was incremented at the wrong time.
* ipcpd: normal: Remove graph_add_edge operationSander Vrijders2017-03-281-56/+30
| | | | | | This removes the graph_add_edge operation of the graph component. The routing component now only listens to RO_MODIFY events, and updates the graph accordingly.
* lib, ipcpd: Fix bugs in ro setsSander Vrijders2017-03-281-6/+8
| | | | | This fixes several bugs in the ro sets, rib. And it fixes several bugs in the graph and routing component of the normal IPCP.
* ipcpd: normal: Fix negative mallocSander Vrijders2017-03-241-0/+11
| | | | | This adds a check to prevent a negative malloc in case the graph structure is empty.
* ipcpd: normal: Fix while loopSander Vrijders2017-03-241-0/+7
| | | | | The next vertex was not taken at the end of the Dijkstra calculation loop.
* ipcpd: normal: Fix segfault in dijkstra calculationSander Vrijders2017-03-241-1/+2
| | | | | | | This fixes a dumb segfault in the dijkstra calculation. If an entry can be removed from the table it was set to NULL. However, if the table is completely empty, the index was -1, resulting in an illegal access into the table.
* ipcpd: normal: Add routing table calculationSander Vrijders2017-03-231-6/+231
| | | | | | This adds routing table calculation to the graph component. The routing instances can then periodically ask the graph component for the routing table, and update their PFFs accordingly.
* ipcpd: normal: Fix memory leaksSander Vrijders2017-03-221-0/+2
| | | | This fixes some memleaks as reported by valgrind.
* ipcpd: normal: Add graph structureSander Vrijders2017-03-141-0/+277
This adds a graph structure which will be updated by routing when it is notified about a new RIB event. The routing can then use this graph as input for calculating the shortest path to a destination.