hwgraph.edge(D3X)hwgraph.edge(D3X)NAME
hwgraph.edge: hwgraph_edge_add, hwgraph_edge_remove, hwgraph_edge_get,
hwgraph_traverse - operations on hwgraph edges
SYNOPSIS
#include <sys/types.h>
#include <sys/hwgraph.h>
#include <sys/ddi.h>
graph_error_t
hwgraph_edge_add(vertex_hdl_t from_vhdl,
vertex_hdl_t to_vhdl,
char *edge_name);
graph_error_t
hwgraph_edge_remove(vertex_hdl_t from_vhdl,
char *edge_name,
vertex_hdl_t *vhdl_ptr);
graph_error_t
hwgraph_edge_get(vertex_hdl_t from_vhdl,
char *edge_name,
vertex_hdl_t *vhdl_ptr);
graph_error_t
hwgraph_traverse(vertex_hdl_t from_vhdl,
char *path,
vertex_hdl_t *vhdl_ptr);
Arguments
edge_name Address of a character string containing the label of the new
or existing edge originating in from_vhdl.
from_vhdl Vertex handle of an existing vertex, the origin vertex from
which a path or edge springs.
path Address of a character string describing a sequence of one or
more edges separated by slashes, in effect a relative path in
/hw.
to_vhdl Vertex handle of an existing vertex, the destination vertex
of a new edge.
vhdl_ptr Address of a field to receive a vertex handle.
DESCRIPTION
These functions operate on the hardware graph to add a named edge from
one vertex to another, to remove a named edge that originates at a
specified vertex, and to find the destination vertex of a named edge or
of a list of edges that originates at a specified vertex.
Page 1
hwgraph.edge(D3X)hwgraph.edge(D3X)
Typical device drivers do not need to use any of these operations.
Drivers normally use such functions as hwgraph_block_device_add() to
create and connect a new vertex, and normally drivers receive the vertex
handles they need to query as arguments to their entry points such as
attach.
DIAGNOSTICS
All return GRAPH_SUCCESS if the operation completes successfully, or a
failure code as defined in hwgraph.intro(D4X) when the operation does not
complete successfully.
SEE ALSOhwgraph.dev(D3X), hwgraph.intro(D4X).
Page 2