xref: /freebsd-src/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.h (revision 416ba5c74546f32a993436a99516d35008e9f384)
16ff6d951SJohn Birrell /*
26ff6d951SJohn Birrell  * CDDL HEADER START
36ff6d951SJohn Birrell  *
46ff6d951SJohn Birrell  * The contents of this file are subject to the terms of the
56ff6d951SJohn Birrell  * Common Development and Distribution License, Version 1.0 only
66ff6d951SJohn Birrell  * (the "License").  You may not use this file except in compliance
76ff6d951SJohn Birrell  * with the License.
86ff6d951SJohn Birrell  *
96ff6d951SJohn Birrell  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
106ff6d951SJohn Birrell  * or http://www.opensolaris.org/os/licensing.
116ff6d951SJohn Birrell  * See the License for the specific language governing permissions
126ff6d951SJohn Birrell  * and limitations under the License.
136ff6d951SJohn Birrell  *
146ff6d951SJohn Birrell  * When distributing Covered Code, include this CDDL HEADER in each
156ff6d951SJohn Birrell  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
166ff6d951SJohn Birrell  * If applicable, add the following below this CDDL HEADER, with the
176ff6d951SJohn Birrell  * fields enclosed by brackets "[]" replaced with your own identifying
186ff6d951SJohn Birrell  * information: Portions Copyright [yyyy] [name of copyright owner]
196ff6d951SJohn Birrell  *
206ff6d951SJohn Birrell  * CDDL HEADER END
216ff6d951SJohn Birrell  */
226ff6d951SJohn Birrell /*
236ff6d951SJohn Birrell  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
246ff6d951SJohn Birrell  * Use is subject to license terms.
256ff6d951SJohn Birrell  */
268e648814SRui Paulo /*
278e648814SRui Paulo  * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
288e648814SRui Paulo  */
296ff6d951SJohn Birrell 
306ff6d951SJohn Birrell #ifndef	_DT_MODULE_H
316ff6d951SJohn Birrell #define	_DT_MODULE_H
326ff6d951SJohn Birrell 
336ff6d951SJohn Birrell #include <dt_impl.h>
346ff6d951SJohn Birrell 
356ff6d951SJohn Birrell #ifdef	__cplusplus
366ff6d951SJohn Birrell extern "C" {
376ff6d951SJohn Birrell #endif
386ff6d951SJohn Birrell 
396ff6d951SJohn Birrell extern dt_module_t *dt_module_create(dtrace_hdl_t *, const char *);
406ff6d951SJohn Birrell extern int dt_module_load(dtrace_hdl_t *, dt_module_t *);
416ff6d951SJohn Birrell extern void dt_module_unload(dtrace_hdl_t *, dt_module_t *);
426ff6d951SJohn Birrell extern void dt_module_destroy(dtrace_hdl_t *, dt_module_t *);
436ff6d951SJohn Birrell 
446ff6d951SJohn Birrell extern dt_module_t *dt_module_lookup_by_name(dtrace_hdl_t *, const char *);
456ff6d951SJohn Birrell extern dt_module_t *dt_module_lookup_by_ctf(dtrace_hdl_t *, ctf_file_t *);
466ff6d951SJohn Birrell 
47*8436cb81SMark Johnston #ifdef __FreeBSD__
48*8436cb81SMark Johnston extern dt_kmodule_t *dt_kmodule_lookup(dtrace_hdl_t *, const char *);
49*8436cb81SMark Johnston #endif
50*8436cb81SMark Johnston 
518e648814SRui Paulo extern int dt_module_hasctf(dtrace_hdl_t *, dt_module_t *);
526ff6d951SJohn Birrell extern ctf_file_t *dt_module_getctf(dtrace_hdl_t *, dt_module_t *);
536ff6d951SJohn Birrell extern dt_ident_t *dt_module_extern(dtrace_hdl_t *, dt_module_t *,
546ff6d951SJohn Birrell     const char *, const dtrace_typeinfo_t *);
556ff6d951SJohn Birrell 
566ff6d951SJohn Birrell extern const char *dt_module_modelname(dt_module_t *);
578e648814SRui Paulo extern int dt_module_getlibid(dtrace_hdl_t *, dt_module_t *,
588e648814SRui Paulo     const ctf_file_t *);
598e648814SRui Paulo extern ctf_file_t *dt_module_getctflib(dtrace_hdl_t *, dt_module_t *,
608e648814SRui Paulo     const char *);
616ff6d951SJohn Birrell 
626ff6d951SJohn Birrell #ifdef	__cplusplus
636ff6d951SJohn Birrell }
646ff6d951SJohn Birrell #endif
656ff6d951SJohn Birrell 
666ff6d951SJohn Birrell #endif	/* _DT_MODULE_H */
67