17aec1d6eScindi /*
27aec1d6eScindi  * CDDL HEADER START
37aec1d6eScindi  *
47aec1d6eScindi  * The contents of this file are subject to the terms of the
574a31ce6Stimh  * Common Development and Distribution License (the "License").
674a31ce6Stimh  * You may not use this file except in compliance with the License.
77aec1d6eScindi  *
87aec1d6eScindi  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97aec1d6eScindi  * or http://www.opensolaris.org/os/licensing.
107aec1d6eScindi  * See the License for the specific language governing permissions
117aec1d6eScindi  * and limitations under the License.
127aec1d6eScindi  *
137aec1d6eScindi  * When distributing Covered Code, include this CDDL HEADER in each
147aec1d6eScindi  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157aec1d6eScindi  * If applicable, add the following below this CDDL HEADER, with the
167aec1d6eScindi  * fields enclosed by brackets "[]" replaced with your own identifying
177aec1d6eScindi  * information: Portions Copyright [yyyy] [name of copyright owner]
187aec1d6eScindi  *
197aec1d6eScindi  * CDDL HEADER END
207aec1d6eScindi  */
217aec1d6eScindi 
227aec1d6eScindi /*
237aec1d6eScindi  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
247aec1d6eScindi  * Use is subject to license terms.
257aec1d6eScindi  */
26*c5591576SRob Johnston /*
27*c5591576SRob Johnston  * Copyright 2020 Joyent, Inc.
28*c5591576SRob Johnston  */
297aec1d6eScindi 
307aec1d6eScindi #ifndef	_TOPO_BUILTIN_H
317aec1d6eScindi #define	_TOPO_BUILTIN_H
327aec1d6eScindi 
337aec1d6eScindi #ifdef	__cplusplus
347aec1d6eScindi extern "C" {
357aec1d6eScindi #endif
367aec1d6eScindi 
377aec1d6eScindi #include <topo_tree.h>
387aec1d6eScindi #include <topo_module.h>
39*c5591576SRob Johnston #include <topo_digraph.h>
407aec1d6eScindi 
41*c5591576SRob Johnston #define	TOPO_BLTIN_TYPE_TREE		1
42*c5591576SRob Johnston #define	TOPO_BLTIN_TYPE_DIGRAPH		2
437aec1d6eScindi /*
447aec1d6eScindi  * topo_builtin.h
457aec1d6eScindi  *
467aec1d6eScindi  * This header file provides prototypes for any built-in scheme enumerators
477aec1d6eScindi  * that are compiled directly into topo.  Prototypes for their init and
487aec1d6eScindi  * fini routines can be added here and corresponding linkage information to
497aec1d6eScindi  * these functions should be added to the table found in topo_builtin.c.
507aec1d6eScindi  */
517aec1d6eScindi 
527aec1d6eScindi typedef struct topo_builtin {
537aec1d6eScindi 	const char *bltin_name;
540eb822a1Scindi 	topo_version_t bltin_version;
550eb822a1Scindi 	int (*bltin_init)(topo_mod_t *, topo_version_t version);
567aec1d6eScindi 	void (*bltin_fini)(topo_mod_t *);
57*c5591576SRob Johnston 	uint_t bltin_type;
587aec1d6eScindi } topo_builtin_t;
597aec1d6eScindi 
607aec1d6eScindi extern int topo_builtin_create(topo_hdl_t *, const char *);
617aec1d6eScindi 
627aec1d6eScindi #ifdef	__cplusplus
637aec1d6eScindi }
647aec1d6eScindi #endif
657aec1d6eScindi 
667aec1d6eScindi #endif	/* _TOPO_BUILTIN_H */
67