diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-09-07 06:05:07 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-09-07 06:05:07 +0200 |
commit | 1eb5e8dcd17d84959a46a2d837ae719fc8eb3516 (patch) | |
tree | fb78e60a3278d4727ecf74874698cb21275ee0e9 /lib/graph.h | |
parent | lib: Refactor command_parse.y for graph ds (diff) | |
download | frr-1eb5e8dcd17d84959a46a2d837ae719fc8eb3516.tar.xz frr-1eb5e8dcd17d84959a46a2d837ae719fc8eb3516.zip |
lib: Continue matching system refactor
Most things back to working, all CLI units refactored
to use improved graph implementation.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/graph.h')
-rw-r--r-- | lib/graph.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/graph.h b/lib/graph.h index 7c0f84800..bccbbb94a 100644 --- a/lib/graph.h +++ b/lib/graph.h @@ -27,26 +27,23 @@ #include "vector.h" -/** - * Graph structure. - */ struct graph { - vector nodes; // all nodes in the graph -} + vector nodes; +}; -/** - * Graph node / vertex. - */ struct graph_node { vector from; // nodes which have edges to this node vector to; // nodes which this node has edges to void *data; // node data - void (*del) (void *data) // deletion callback + void (*del) (void *data); // deletion callback }; +struct graph * +graph_new (void); + /** * Creates a new node. * |