xref: /titanic_50/usr/src/lib/libtnfprobe/tnf_args.h (revision 2df1fe9ca32bb227b9158c67f5c00b54c20b10fd)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  *      Copyright (c) 1994, by Sun Microsytems, Inc.
24  */
25 
26 #ifndef _TNF_ARGS_H
27 #define	_TNF_ARGS_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 #include <tnf/probe.h>
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /*
38  * In process interface for getting probe arguments and types and attributes
39  */
40 
41 #define	tnf_probe_get_int(x) 		(*((int *)(x)))
42 #define	tnf_probe_get_uint(x) 		(*((unsigned int *)(x)))
43 #define	tnf_probe_get_long(x) 		(*((long *)(x)))
44 #define	tnf_probe_get_ulong(x) 		(*((unsigned long *)(x)))
45 #define	tnf_probe_get_longlong(x) 	(*((long long *)(x)))
46 #define	tnf_probe_get_ulonglong(x) 	(*((unsigned long long *)(x)))
47 #define	tnf_probe_get_float(x) 		(*((float *)(x)))
48 #define	tnf_probe_get_double(x) 	(*((double *)(x)))
49 
50 char * tnf_probe_get_chars(void *);
51 
52 int tnf_probe_get_num_args(tnf_probe_control_t *);
53 
54 void *tnf_probe_get_arg_indexed(tnf_probe_control_t *, int, void *);
55 
56 tnf_arg_kind_t tnf_probe_get_type_indexed(tnf_probe_control_t *, int);
57 
58 const char * tnf_probe_get_value(tnf_probe_control_t *, char *, ulong_t *);
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif /* _TNF_ARGS_H */
65