summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/pol/graph.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd/normal/pol/graph.h')
-rw-r--r--src/ipcpd/normal/pol/graph.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/ipcpd/normal/pol/graph.h b/src/ipcpd/normal/pol/graph.h
index 8d092524..7340ecb9 100644
--- a/src/ipcpd/normal/pol/graph.h
+++ b/src/ipcpd/normal/pol/graph.h
@@ -28,9 +28,15 @@
#include <inttypes.h>
+struct nhop {
+ struct list_head next;
+ uint64_t nhop;
+};
+
struct routing_table {
- uint64_t dst;
- uint64_t nhop;
+ struct list_head next;
+ uint64_t dst;
+ struct list_head nhops;
};
struct graph * graph_create(void);
@@ -46,8 +52,11 @@ int graph_del_edge(struct graph * graph,
uint64_t s_addr,
uint64_t d_addr);
-ssize_t graph_routing_table(struct graph * graph,
- uint64_t s_addr,
- struct routing_table *** table);
+int graph_routing_table(struct graph * graph,
+ uint64_t s_addr,
+ struct list_head * table);
+
+void graph_free_routing_table(struct graph * graph,
+ struct list_head * table);
#endif /* OUROBOROS_IPCPD_NORMAL_GRAPH_H */