1178479Sjb/*
2178479Sjb * CDDL HEADER START
3178479Sjb *
4178479Sjb * The contents of this file are subject to the terms of the
5178479Sjb * Common Development and Distribution License, Version 1.0 only
6178479Sjb * (the "License").  You may not use this file except in compliance
7178479Sjb * with the License.
8178479Sjb *
9178479Sjb * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10178479Sjb * or http://www.opensolaris.org/os/licensing.
11178479Sjb * See the License for the specific language governing permissions
12178479Sjb * and limitations under the License.
13178479Sjb *
14178479Sjb * When distributing Covered Code, include this CDDL HEADER in each
15178479Sjb * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16178479Sjb * If applicable, add the following below this CDDL HEADER, with the
17178479Sjb * fields enclosed by brackets "[]" replaced with your own identifying
18178479Sjb * information: Portions Copyright [yyyy] [name of copyright owner]
19178479Sjb *
20178479Sjb * CDDL HEADER END
21178479Sjb */
22178479Sjb/*
23178479Sjb * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24178479Sjb * Use is subject to license terms.
25178479Sjb */
26267941Srpaulo/*
27267941Srpaulo * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
28267941Srpaulo */
29178479Sjb
30178479Sjb#ifndef	_DT_MODULE_H
31178479Sjb#define	_DT_MODULE_H
32178479Sjb
33178479Sjb#include <dt_impl.h>
34178479Sjb
35178479Sjb#ifdef	__cplusplus
36178479Sjbextern "C" {
37178479Sjb#endif
38178479Sjb
39178479Sjbextern dt_module_t *dt_module_create(dtrace_hdl_t *, const char *);
40178479Sjbextern int dt_module_load(dtrace_hdl_t *, dt_module_t *);
41178479Sjbextern void dt_module_unload(dtrace_hdl_t *, dt_module_t *);
42178479Sjbextern void dt_module_destroy(dtrace_hdl_t *, dt_module_t *);
43178479Sjb
44178479Sjbextern dt_module_t *dt_module_lookup_by_name(dtrace_hdl_t *, const char *);
45178479Sjbextern dt_module_t *dt_module_lookup_by_ctf(dtrace_hdl_t *, ctf_file_t *);
46178479Sjb
47284085Smarkj#ifdef __FreeBSD__
48284085Smarkjextern dt_kmodule_t *dt_kmodule_lookup(dtrace_hdl_t *, const char *);
49284085Smarkj#endif
50284085Smarkj
51267941Srpauloextern int dt_module_hasctf(dtrace_hdl_t *, dt_module_t *);
52178479Sjbextern ctf_file_t *dt_module_getctf(dtrace_hdl_t *, dt_module_t *);
53178479Sjbextern dt_ident_t *dt_module_extern(dtrace_hdl_t *, dt_module_t *,
54178479Sjb    const char *, const dtrace_typeinfo_t *);
55178479Sjb
56178479Sjbextern const char *dt_module_modelname(dt_module_t *);
57267941Srpauloextern int dt_module_getlibid(dtrace_hdl_t *, dt_module_t *,
58267941Srpaulo    const ctf_file_t *);
59267941Srpauloextern ctf_file_t *dt_module_getctflib(dtrace_hdl_t *, dt_module_t *,
60267941Srpaulo    const char *);
61178479Sjb
62178479Sjb#ifdef	__cplusplus
63178479Sjb}
64178479Sjb#endif
65178479Sjb
66178479Sjb#endif	/* _DT_MODULE_H */
67