diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2018-09-14 09:47:39 +0200 |
---|---|---|
committer | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-09-14 10:15:55 +0200 |
commit | a0ea1751683d7fb242b9a8076b05058f21dfe052 (patch) | |
tree | 436c8fb4832b15b4b06af56ee0303a47ccb48aa7 /src/ipcpd/normal/pol/graph.h | |
parent | 1c7dcc2d37dc5a41379ca08b523bda58a51f11de (diff) | |
download | ouroboros-a0ea1751683d7fb242b9a8076b05058f21dfe052.tar.gz ouroboros-a0ea1751683d7fb242b9a8076b05058f21dfe052.zip |
ipcpd: Simplify routing algorithm selection
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 <sander.vrijders@ugent.be>
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Diffstat (limited to 'src/ipcpd/normal/pol/graph.h')
-rw-r--r-- | src/ipcpd/normal/pol/graph.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ipcpd/normal/pol/graph.h b/src/ipcpd/normal/pol/graph.h index 13657fd0..7cd14ad6 100644 --- a/src/ipcpd/normal/pol/graph.h +++ b/src/ipcpd/normal/pol/graph.h @@ -28,6 +28,11 @@ #include <inttypes.h> +enum routing_algo { + ROUTING_SIMPLE = 0, + ROUTING_LFA +}; + struct nhop { struct list_head next; uint64_t nhop; @@ -53,13 +58,10 @@ int graph_del_edge(struct graph * graph, uint64_t d_addr); int graph_routing_table(struct graph * graph, + enum routing_algo algo, uint64_t s_addr, struct list_head * table); -int graph_routing_table_lfa(struct graph * graph, - uint64_t s_addr, - struct list_head * table); - void graph_free_routing_table(struct graph * graph, struct list_head * table); |