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