17aec1d6eScindi /*
27aec1d6eScindi  * CDDL HEADER START
37aec1d6eScindi  *
47aec1d6eScindi  * The contents of this file are subject to the terms of the
57aec1d6eScindi  * Common Development and Distribution License, Version 1.0 only
67aec1d6eScindi  * (the "License").  You may not use this file except in compliance
77aec1d6eScindi  * with the License.
87aec1d6eScindi  *
97aec1d6eScindi  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107aec1d6eScindi  * or http://www.opensolaris.org/os/licensing.
117aec1d6eScindi  * See the License for the specific language governing permissions
127aec1d6eScindi  * and limitations under the License.
137aec1d6eScindi  *
147aec1d6eScindi  * When distributing Covered Code, include this CDDL HEADER in each
157aec1d6eScindi  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167aec1d6eScindi  * If applicable, add the following below this CDDL HEADER, with the
177aec1d6eScindi  * fields enclosed by brackets "[]" replaced with your own identifying
187aec1d6eScindi  * information: Portions Copyright [yyyy] [name of copyright owner]
197aec1d6eScindi  *
207aec1d6eScindi  * CDDL HEADER END
217aec1d6eScindi  */
227aec1d6eScindi /*
237aec1d6eScindi  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
247aec1d6eScindi  * Use is subject to license terms.
257aec1d6eScindi  */
26*2b1b28a8SRob Johnston /*
27*2b1b28a8SRob Johnston  * Copyright 2019 Joyent, Inc.
28*2b1b28a8SRob Johnston  */
30*2b1b28a8SRob Johnston #include <string.h>
317aec1d6eScindi #include <unistd.h>
327aec1d6eScindi #include <assert.h>
34*2b1b28a8SRob Johnston #include <topo_error.h>
357aec1d6eScindi #include <topo_list.h>
367aec1d6eScindi #include <topo_tree.h>
387aec1d6eScindi /*
397aec1d6eScindi  * Embedded Linked Lists
407aec1d6eScindi  *