1 /* 2 * This file and its contents are supplied under the terms of the 3 * Common Development and Distribution License ("CDDL"), version 1.0. 4 * You may only use this file in accordance with the terms of version 5 * 1.0 of the CDDL. 6 * 7 * A full copy of the text of the CDDL should have accompanied this 8 * source. A copy of the CDDL is also available via the Internet at 9 * http://www.illumos.org/license/CDDL. 10 */ 11 12 /* 13 * Copyright 2020 Joyent, Inc. 14 */ 15 16 #ifndef _TOPO_DIGRAPH_XML_H 17 #define _TOPO_DIGRAPH_XML_H 18 19 #include <fm/topo_mod.h> 20 21 #include <topo_list.h> 22 #include <topo_prop.h> 23 #include <topo_method.h> 24 #include <topo_alloc.h> 25 #include <topo_error.h> 26 #include <topo_module.h> 27 #include <topo_string.h> 28 #include <topo_subr.h> 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 #define TDG_DTD "/usr/share/lib/xml/dtd/digraph-topology.dtd.1" 35 36 /* 37 * List of attribute names and values used when serializing a topo_digraph_t 38 * to XML. 39 * 40 * When deserializing an XML representation of a topo_digraph_t, the XML is 41 * first converted to an nvlist representation and then that nvlist is 42 * processed to produce a topo_digraph_t. These property names are also 43 * used as the nvpair names in that intermediate nvlist. 44 */ 45 #define TDG_XML_EDGE "edge" 46 #define TDG_XML_FMRI "fmri" 47 #define TDG_XML_SCHEME "fmri-scheme" 48 #define TDG_XML_NAME "name" 49 #define TDG_XML_NVLIST "nvlist" 50 #define TDG_XML_NVLIST_ARR "nvlist-array" 51 #define TDG_XML_NVPAIR "nvpair" 52 #define TDG_XML_INSTANCE "instance" 53 #define TDG_XML_INT8 "int8" 54 #define TDG_XML_INT16 "int16" 55 #define TDG_XML_INT32 "int32" 56 #define TDG_XML_INT32_ARR "int32-array" 57 #define TDG_XML_INT64 "int64" 58 #define TDG_XML_INT64_ARR "int64-array" 59 #define TDG_XML_OSVERSION "os-version" 60 #define TDG_XML_NODENAME "nodename" 61 #define TDG_XML_PGROUPS "property-groups" 62 #define TDG_XML_PGROUP_NAME "property-group-name" 63 #define TDG_XML_PRODUCT "product-id" 64 #define TDG_XML_PROP_NAME TOPO_PROP_VAL_NAME 65 #define TDG_XML_PROP_TYPE TOPO_PROP_VAL_TYPE 66 #define TDG_XML_PROP_VALUE TOPO_PROP_VAL_VAL 67 #define TDG_XML_PVALS "property-values" 68 #define TDG_XML_OUTEDGES "outgoing-edges" 69 #define TDG_XML_STRING "string" 70 #define TDG_XML_STRING_ARR "string-array" 71 #define TDG_XML_TOPO_DIGRAPH "topo-digraph" 72 #define TDG_XML_TSTAMP "timestamp" 73 #define TDG_XML_TYPE "type" 74 #define TDG_XML_UINT8 "uint8" 75 #define TDG_XML_UINT16 "uint16" 76 #define TDG_XML_UINT32 "uint32" 77 #define TDG_XML_UINT32_ARR "uint32-array" 78 #define TDG_XML_UINT64 "uint64" 79 #define TDG_XML_UINT64_ARR "uint64-array" 80 #define TDG_XML_VALUE "value" 81 #define TDG_XML_VERTEX "vertex" 82 #define TDG_XML_VERTICES "vertices" 83 84 #ifdef __cplusplus 85 } 86 #endif 87 88 #endif /* _TOPO_DIGRAPH_XML_H */ 89