/* * This file and its contents are supplied under the terms of the * Common Development and Distribution License ("CDDL"), version 1.0. * You may only use this file in accordance with the terms of version * 1.0 of the CDDL. * * A full copy of the text of the CDDL should have accompanied this * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* * Copyright 2020 Joyent, Inc. */ #ifndef _TOPO_DIGRAPH_H #define _TOPO_DIGRAPH_H #include #include #include #include #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif struct topo_digraph { topo_list_t tdg_list; /* next/prev pointers */ const char *tdg_scheme; /* FMRI scheme */ topo_mod_t *tdg_mod; /* builtin enumerator mod */ tnode_t *tdg_rootnode; /* see topo_digraph_new() */ topo_list_t tdg_vertices; /* adjacency list */ uint_t tdg_nvertices; /* total num of vertices */ uint_t tdg_nedges; /* total num of edges */ }; struct topo_vertex { topo_list_t tvt_list; /* next/prev pointers */ tnode_t *tvt_node; topo_list_t tvt_incoming; topo_list_t tvt_outgoing; uint_t tvt_nincoming; /* total num incoming edges */ uint_t tvt_noutgoing; /* total num outgoing edges */ }; struct topo_edge { topo_list_t tve_list; /* next/prev pointers */ topo_vertex_t *tve_vertex; }; #ifdef __cplusplus } #endif #endif /* _TOPO_DIGRAPH_H */