pkg: ship usr/lib/security/amd64/*.so links
[unleashed.git] / include / sys / tnf_probe.h
blob85a9627aec2a584a933f8fb5be72cdfeecbf7245
1 /*
2 * CDDL HEADER START
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.
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.
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]
20 * CDDL HEADER END
23 * Copyright (c) 1994, by Sun Microsytems, Inc.
26 #ifndef _SYS_TNF_PROBE_H
27 #define _SYS_TNF_PROBE_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
31 #include <sys/tnf_writer.h>
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
37 #define TNF_STRINGIFY(x) #x
38 #define TNF_STRINGVALUE(x) TNF_STRINGIFY(x)
41 * Alignment of tnf_ref32_t
44 struct _tnf_ref32_align {
45 char c;
46 tnf_ref32_t t;
48 #define TNF_REF32_ALIGN TNF_OFFSETOF(struct _tnf_ref32_align, t)
51 * Probe versioning
54 struct tnf_probe_version {
55 size_t version_size; /* sizeof(struct tnf_probe_version) */
56 size_t probe_control_size; /* sizeof(tnf_probe_control_t) */
59 extern struct tnf_probe_version __tnf_probe_version_1;
60 #pragma weak __tnf_probe_version_1
63 * Typedefs
66 typedef struct tnf_probe_control tnf_probe_control_t;
67 typedef struct tnf_probe_setup tnf_probe_setup_t;
69 /* returns pointer to buffer */
70 typedef void * (*tnf_probe_test_func_t)(void *,
71 tnf_probe_control_t *,
72 tnf_probe_setup_t *);
74 /* returns buffer pointer */
75 typedef void * (*tnf_probe_alloc_func_t)(tnf_ops_t *, /* tpd */
76 tnf_probe_control_t *,
77 tnf_probe_setup_t *);
79 typedef void (*tnf_probe_func_t)(tnf_probe_setup_t *);
82 * Probe argument block
85 struct tnf_probe_setup {
86 tnf_ops_t *tpd_p;
87 void *buffer_p;
88 tnf_probe_control_t *probe_p;
92 * Probe control block
95 struct tnf_probe_control {
96 const struct tnf_probe_version *version;
97 tnf_probe_control_t *next;
98 tnf_probe_test_func_t test_func;
99 tnf_probe_alloc_func_t alloc_func;
100 tnf_probe_func_t probe_func;
101 tnf_probe_func_t commit_func;
102 uintptr_t index;
103 const char *attrs;
104 tnf_tag_data_t ***slot_types;
105 unsigned long tnf_event_size;
108 #ifdef _KERNEL
110 #define TNF_NEXT_INIT 0
112 #else
114 #define TNF_NEXT_INIT -1
116 #endif /* _KERNEL */
119 * TNF Type extension
122 #define TNF_DECLARE_RECORD(ctype, record) \
123 typedef tnf_reference_t record##_t
125 #define TNF_DEFINE_RECORD_1(ctype, ctype_record, t1, n1)
126 #define TNF_DEFINE_RECORD_2(ctype, ctype_record, t1, n1, t2, n2)
127 #define TNF_DEFINE_RECORD_3(ctype, ctype_record, t1, n1, t2, n2, t3, n3)
128 #define TNF_DEFINE_RECORD_4(ctype, ctype_record, t1, n1, t2, n2, t3, n3, t4, n4)
129 /* CSTYLED */
130 #define TNF_DEFINE_RECORD_5(ctype, ctype_record, t1, n1, t2, n2, t3, n3, t4, n4, t5, n5)
133 * Probe Macros
136 #define TNF_PROBE_0(namearg, keysarg, detail) \
137 ((void)0)
138 #define TNF_PROBE_1(namearg, keysarg, detail, type_1, namearg_1, valarg_1) \
139 ((void)0)
140 /* CSTYLED */
141 #define TNF_PROBE_2(namearg, keysarg, detail, type_1, namearg_1, valarg_1, type_2, namearg_2, valarg_2) \
142 ((void)0)
143 /* CSTYLED */
144 #define TNF_PROBE_3(namearg, keysarg, detail, type_1, namearg_1, valarg_1, type_2, namearg_2, valarg_2, type_3, namearg_3, valarg_3) \
145 ((void)0)
146 /* CSTYLED */
147 #define TNF_PROBE_4(namearg, keysarg, detail, type_1, namearg_1, valarg_1, type_2, namearg_2, valarg_2, type_3, namearg_3, valarg_3, type_4, namearg_4, valarg_4) \
148 ((void)0)
149 /* CSTYLED */
150 #define TNF_PROBE_5(namearg, keysarg, detail, type_1, namearg_1, valarg_1, type_2, namearg_2, valarg_2, type_3, namearg_3, valarg_3, type_4, namearg_4, valarg_4, type_5, namearg_5, valarg_5) \
151 ((void)0)
154 * Debug Probe Macros (contain an additional "debug" attribute)
157 #define TNF_PROBE_0_DEBUG(namearg, keysarg, detail) \
158 ((void)0)
159 /* CSTYLED */
160 #define TNF_PROBE_1_DEBUG(namearg, keysarg, detail, type_1, namearg_1, valarg_1) \
161 ((void)0)
162 /* CSTYLED */
163 #define TNF_PROBE_2_DEBUG(namearg, keysarg, detail, type_1, namearg_1, valarg_1, type_2, namearg_2, valarg_2) \
164 ((void)0)
165 /* CSTYLED */
166 #define TNF_PROBE_3_DEBUG(namearg, keysarg, detail, type_1, namearg_1, valarg_1, type_2, namearg_2, valarg_2, type_3, namearg_3, valarg_3) \
167 ((void)0)
168 /* CSTYLED */
169 #define TNF_PROBE_4_DEBUG(namearg, keysarg, detail, type_1, namearg_1, valarg_1, type_2, namearg_2, valarg_2, type_3, namearg_3, valarg_3, type_4, namearg_4, valarg_4) \
170 ((void)0)
171 /* CSTYLED */
172 #define TNF_PROBE_5_DEBUG(namearg, keysarg, detail, type_1, namearg_1, valarg_1, type_2, namearg_2, valarg_2, type_3, namearg_3, valarg_3, type_4, namearg_4, valarg_4, type_5, namearg_5, valarg_5) \
173 ((void)0)
175 #ifdef __cplusplus
177 #endif
179 #endif /* _SYS_TNF_PROBE_H */