diff options
author | Sander Vrijders <[email protected]> | 2017-09-26 13:27:14 +0000 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2017-09-26 13:27:14 +0000 |
commit | ddba836eb79ace3bd80ea6af69801f402cbffd20 (patch) | |
tree | 20938deaefbca8607128b8fa9e37adb64aa0e659 /src/ipcpd/normal/pol/graph.h | |
parent | 9c8d57ce793fff0b2c42c4cfc0d8ab97d554e1d8 (diff) | |
parent | 5d01c511fc1c31fdeee6bb515be0ca300854ba21 (diff) | |
download | ouroboros-ddba836eb79ace3bd80ea6af69801f402cbffd20.tar.gz ouroboros-ddba836eb79ace3bd80ea6af69801f402cbffd20.zip |
Merged in sandervrijders/ouroboros/be-routing (pull request #617)
Be routing
Diffstat (limited to 'src/ipcpd/normal/pol/graph.h')
-rw-r--r-- | src/ipcpd/normal/pol/graph.h | 19 |
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 */ |