1a864dc36Sdarran /* 2a864dc36Sdarran * CDDL HEADER START 3a864dc36Sdarran * 4a864dc36Sdarran * The contents of this file are subject to the terms of the 5a864dc36Sdarran * Common Development and Distribution License, Version 1.0 only 6a864dc36Sdarran * (the "License"). You may not use this file except in compliance 7a864dc36Sdarran * with the License. 8a864dc36Sdarran * 9a864dc36Sdarran * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10a864dc36Sdarran * or http://www.opensolaris.org/os/licensing. 11a864dc36Sdarran * See the License for the specific language governing permissions 12a864dc36Sdarran * and limitations under the License. 13a864dc36Sdarran * 14a864dc36Sdarran * When distributing Covered Code, include this CDDL HEADER in each 15a864dc36Sdarran * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16a864dc36Sdarran * If applicable, add the following below this CDDL HEADER, with the 17a864dc36Sdarran * fields enclosed by brackets "[]" replaced with your own identifying 18a864dc36Sdarran * information: Portions Copyright [yyyy] [name of copyright owner] 19a864dc36Sdarran * 20a864dc36Sdarran * CDDL HEADER END 21a864dc36Sdarran */ 22a864dc36Sdarran /* 23a864dc36Sdarran * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24a864dc36Sdarran * Use is subject to license terms. 25a864dc36Sdarran */ 26*c0855460Schristos /* 27*c0855460Schristos * Copyright (c) 2013, Joyent, Inc. All rights reserved. 28*c0855460Schristos */ 29a864dc36Sdarran 30a864dc36Sdarran #ifndef _DT_MODULE_H 31a864dc36Sdarran #define _DT_MODULE_H 32a864dc36Sdarran 33a864dc36Sdarran #include <dt_impl.h> 34a864dc36Sdarran 35a864dc36Sdarran #ifdef __cplusplus 36a864dc36Sdarran extern "C" { 37a864dc36Sdarran #endif 38a864dc36Sdarran 39a864dc36Sdarran extern dt_module_t *dt_module_create(dtrace_hdl_t *, const char *); 40a864dc36Sdarran extern int dt_module_load(dtrace_hdl_t *, dt_module_t *); 41a864dc36Sdarran extern void dt_module_unload(dtrace_hdl_t *, dt_module_t *); 42a864dc36Sdarran extern void dt_module_destroy(dtrace_hdl_t *, dt_module_t *); 43a864dc36Sdarran 44a864dc36Sdarran extern dt_module_t *dt_module_lookup_by_name(dtrace_hdl_t *, const char *); 45a864dc36Sdarran extern dt_module_t *dt_module_lookup_by_ctf(dtrace_hdl_t *, ctf_file_t *); 46a864dc36Sdarran 47*c0855460Schristos #if defined(__FreeBSD__) || defined(__NetBSD__) 48*c0855460Schristos extern dt_kmodule_t *dt_kmodule_lookup(dtrace_hdl_t *, const char *); 49*c0855460Schristos #endif 50*c0855460Schristos 51*c0855460Schristos extern int dt_module_hasctf(dtrace_hdl_t *, dt_module_t *); 52a864dc36Sdarran extern ctf_file_t *dt_module_getctf(dtrace_hdl_t *, dt_module_t *); 53a864dc36Sdarran extern dt_ident_t *dt_module_extern(dtrace_hdl_t *, dt_module_t *, 54a864dc36Sdarran const char *, const dtrace_typeinfo_t *); 55a864dc36Sdarran 56a864dc36Sdarran extern const char *dt_module_modelname(dt_module_t *); 57*c0855460Schristos extern int dt_module_getlibid(dtrace_hdl_t *, dt_module_t *, 58*c0855460Schristos const ctf_file_t *); 59*c0855460Schristos extern ctf_file_t *dt_module_getctflib(dtrace_hdl_t *, dt_module_t *, 60*c0855460Schristos const char *); 61a864dc36Sdarran 62a864dc36Sdarran #ifdef __cplusplus 63a864dc36Sdarran } 64a864dc36Sdarran #endif 65a864dc36Sdarran 66a864dc36Sdarran #endif /* _DT_MODULE_H */ 67