summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/graph.h
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-03-23 15:35:19 +0000
committerdimitri staessens <dimitri.staessens@ugent.be>2017-03-23 15:35:19 +0000
commitb350f91968b05e61a362d21d55cf183af28da77a (patch)
treef4a656bb04365d27ef1ac1ae5850fbdc1de59c7d /src/ipcpd/normal/graph.h
parent22ec3addff9fd786fdd6917c5fd5800beab49d0c (diff)
parentbb30c4f0488d5d444fd316d716f59c824a01540f (diff)
downloadouroboros-b350f91968b05e61a362d21d55cf183af28da77a.tar.gz
ouroboros-b350f91968b05e61a362d21d55cf183af28da77a.zip
Merged in sandervrijders/ouroboros/be-dijkstra (pull request #416)
ipcpd: normal: Add routing table calculation
Diffstat (limited to 'src/ipcpd/normal/graph.h')
-rw-r--r--src/ipcpd/normal/graph.h23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/ipcpd/normal/graph.h b/src/ipcpd/normal/graph.h
index 9653efd7..226092c7 100644
--- a/src/ipcpd/normal/graph.h
+++ b/src/ipcpd/normal/graph.h
@@ -28,22 +28,9 @@
#include <inttypes.h>
-struct edge {
- struct list_head next;
- uint64_t dst_addr;
- qosspec_t qs;
-};
-
-struct vertex {
- struct list_head next;
- uint64_t addr;
- struct list_head edges;
-};
-
-struct graph {
- size_t nr_vertices;
- struct list_head vertices;
- pthread_mutex_t lock;
+struct routing_table {
+ uint64_t dst;
+ uint64_t nhop;
};
struct graph * graph_create(void);
@@ -64,4 +51,8 @@ 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);
+
#endif /* OUROBOROS_IPCPD_NORMAL_GRAPH_H */