diff options
author | Sander Vrijders <[email protected]> | 2017-03-23 15:51:42 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-03-23 16:32:12 +0100 |
commit | bb30c4f0488d5d444fd316d716f59c824a01540f (patch) | |
tree | f4a656bb04365d27ef1ac1ae5850fbdc1de59c7d /src/ipcpd/normal/graph.h | |
parent | 22ec3addff9fd786fdd6917c5fd5800beab49d0c (diff) | |
download | ouroboros-bb30c4f0488d5d444fd316d716f59c824a01540f.tar.gz ouroboros-bb30c4f0488d5d444fd316d716f59c824a01540f.zip |
ipcpd: normal: Add routing table calculation
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.
Diffstat (limited to 'src/ipcpd/normal/graph.h')
-rw-r--r-- | src/ipcpd/normal/graph.h | 23 |
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 */ |