blob: 91e9d6139e6ae43c094c97aeadf97ca62cede271 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
/*
* 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 <fm/topo_mod.h>
#include <topo_list.h>
#include <topo_prop.h>
#include <topo_method.h>
#include <topo_alloc.h>
#include <topo_error.h>
#include <topo_file.h>
#include <topo_module.h>
#include <topo_string.h>
#include <topo_subr.h>
#include <topo_tree.h>
#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 */
|