summaryrefslogtreecommitdiffstats
path: root/lib/graph.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2016-09-07 06:05:07 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2016-09-07 06:05:07 +0200
commit1eb5e8dcd17d84959a46a2d837ae719fc8eb3516 (patch)
treefb78e60a3278d4727ecf74874698cb21275ee0e9 /lib/graph.h
parentlib: Refactor command_parse.y for graph ds (diff)
downloadfrr-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.h15
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.
*