xref: /titanic_41/usr/src/uts/common/sys/tnf_com.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  *	Copyright (c) 1994, by Sun Microsytems, Inc.
24*7c478bd9Sstevel@tonic-gate  */
25*7c478bd9Sstevel@tonic-gate 
26*7c478bd9Sstevel@tonic-gate #ifndef	_SYS_TNF_COM_H
27*7c478bd9Sstevel@tonic-gate #define	_SYS_TNF_COM_H
28*7c478bd9Sstevel@tonic-gate 
29*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
30*7c478bd9Sstevel@tonic-gate 
31*7c478bd9Sstevel@tonic-gate #include <sys/types.h>
32*7c478bd9Sstevel@tonic-gate 
33*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
34*7c478bd9Sstevel@tonic-gate extern "C" {
35*7c478bd9Sstevel@tonic-gate #endif
36*7c478bd9Sstevel@tonic-gate 
37*7c478bd9Sstevel@tonic-gate /*
38*7c478bd9Sstevel@tonic-gate  * NOTE: All types are in host (not necessarily file) format.
39*7c478bd9Sstevel@tonic-gate  * Readers are responsible for endian or other transformation.
40*7c478bd9Sstevel@tonic-gate  */
41*7c478bd9Sstevel@tonic-gate 
42*7c478bd9Sstevel@tonic-gate /*
43*7c478bd9Sstevel@tonic-gate  * Magic number(s): first word of TNF file.
44*7c478bd9Sstevel@tonic-gate  *
45*7c478bd9Sstevel@tonic-gate  * A writer stores the native unsigned 32-bit integer TNF_MAGIC.
46*7c478bd9Sstevel@tonic-gate  * A same-endian reader will load it as TNF_MAGIC.
47*7c478bd9Sstevel@tonic-gate  * A different-endian reader will load it as TNF_MAGIC_1.
48*7c478bd9Sstevel@tonic-gate  */
49*7c478bd9Sstevel@tonic-gate 
50*7c478bd9Sstevel@tonic-gate #define	TNF_MAGIC		0x544e4600
51*7c478bd9Sstevel@tonic-gate #define	TNF_MAGIC_1		0x00464e54
52*7c478bd9Sstevel@tonic-gate 
53*7c478bd9Sstevel@tonic-gate /*
54*7c478bd9Sstevel@tonic-gate  * Fundamental types.  Machine dependent.
55*7c478bd9Sstevel@tonic-gate  */
56*7c478bd9Sstevel@tonic-gate 
57*7c478bd9Sstevel@tonic-gate typedef char			tnf_char_t;
58*7c478bd9Sstevel@tonic-gate typedef signed char		tnf_int8_t;
59*7c478bd9Sstevel@tonic-gate typedef unsigned char		tnf_uint8_t;
60*7c478bd9Sstevel@tonic-gate typedef short			tnf_int16_t;
61*7c478bd9Sstevel@tonic-gate typedef unsigned short		tnf_uint16_t;
62*7c478bd9Sstevel@tonic-gate typedef int			tnf_int32_t;
63*7c478bd9Sstevel@tonic-gate typedef unsigned int		tnf_uint32_t;
64*7c478bd9Sstevel@tonic-gate typedef longlong_t		tnf_int64_t;
65*7c478bd9Sstevel@tonic-gate typedef u_longlong_t		tnf_uint64_t;
66*7c478bd9Sstevel@tonic-gate typedef float			tnf_float32_t;
67*7c478bd9Sstevel@tonic-gate typedef double			tnf_float64_t;
68*7c478bd9Sstevel@tonic-gate 
69*7c478bd9Sstevel@tonic-gate /*
70*7c478bd9Sstevel@tonic-gate  * TNF references
71*7c478bd9Sstevel@tonic-gate  */
72*7c478bd9Sstevel@tonic-gate 
73*7c478bd9Sstevel@tonic-gate typedef tnf_int32_t		tnf_ref32_t; /* self-relative, 32 bits */
74*7c478bd9Sstevel@tonic-gate typedef tnf_int16_t		tnf_ref16_t; /* self-relative, 16 bits */
75*7c478bd9Sstevel@tonic-gate typedef tnf_uint16_t		tnf_abs16_t; /* absolute, 16 bits */
76*7c478bd9Sstevel@tonic-gate 
77*7c478bd9Sstevel@tonic-gate /* Generation number for tag blocks */
78*7c478bd9Sstevel@tonic-gate #define	TNF_TAG_GENERATION_NUM	0xffffffff
79*7c478bd9Sstevel@tonic-gate 
80*7c478bd9Sstevel@tonic-gate /* definition of space values */
81*7c478bd9Sstevel@tonic-gate #define	TNF_SPACE_MASK		0x80000000
82*7c478bd9Sstevel@tonic-gate #define	TNF_SPACE_PERMANENT	0x80000000
83*7c478bd9Sstevel@tonic-gate #define	TNF_SPACE_RECLAIMABLE	0x0
84*7c478bd9Sstevel@tonic-gate #define	TNF_SPACE_SIGN_BIT	0x40000000
85*7c478bd9Sstevel@tonic-gate 
86*7c478bd9Sstevel@tonic-gate /* Macros on setting or checking space values */
87*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_MAKE_PERMANENT(x)	((x) | TNF_SPACE_PERMANENT)
88*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_MAKE_RECLAIMABLE(x)	((x) & ~TNF_SPACE_MASK)
89*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_SPACE(x)	\
90*7c478bd9Sstevel@tonic-gate 	((tnf_uint32_t)(x) & TNF_SPACE_MASK)
91*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_IS_PERMANENT(x)	\
92*7c478bd9Sstevel@tonic-gate 	(TNF_REF32_SPACE(x) == TNF_SPACE_PERMANENT)
93*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_IS_RECLAIMABLE(x)	\
94*7c478bd9Sstevel@tonic-gate 	(TNF_REF32_SPACE(x) == TNF_SPACE_RECLAIMABLE)
95*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_SIGN_EXTEND(x)	\
96*7c478bd9Sstevel@tonic-gate 	((((tnf_uint32_t)(x) & TNF_SPACE_SIGN_BIT) == TNF_SPACE_SIGN_BIT) ? \
97*7c478bd9Sstevel@tonic-gate 		((tnf_ref32_t)((tnf_uint32_t)(x) | TNF_SPACE_MASK)) :   \
98*7c478bd9Sstevel@tonic-gate 		(x))
99*7c478bd9Sstevel@tonic-gate 
100*7c478bd9Sstevel@tonic-gate /* definition of references */
101*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_TYPE_MASK	0x3
102*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_T_FULL	0x0
103*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_T_FWD		TNF_REF32_T_FULL
104*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_T_PAIR	0x1
105*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_T_TAG		0x2
106*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_T_RSVD	0x3
107*7c478bd9Sstevel@tonic-gate 
108*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_REF16_MASK	0xffff
109*7c478bd9Sstevel@tonic-gate 
110*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_TAG16_SHIFT	16
111*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_TAG16_MASK	0xffff
112*7c478bd9Sstevel@tonic-gate 
113*7c478bd9Sstevel@tonic-gate #define	TNF_REF16_TYPE_MASK	0x3
114*7c478bd9Sstevel@tonic-gate 
115*7c478bd9Sstevel@tonic-gate #define	TNF_TAG16_TYPE_MASK	0x3
116*7c478bd9Sstevel@tonic-gate #define	TNF_TAG16_T_ABS		TNF_REF32_T_PAIR
117*7c478bd9Sstevel@tonic-gate #define	TNF_TAG16_T_REL		TNF_REF32_T_FWD
118*7c478bd9Sstevel@tonic-gate 
119*7c478bd9Sstevel@tonic-gate #define	TNF_NULL		0
120*7c478bd9Sstevel@tonic-gate 
121*7c478bd9Sstevel@tonic-gate /* Macros on tnf_ref32_t values: */
122*7c478bd9Sstevel@tonic-gate 
123*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_TYPE(x)	\
124*7c478bd9Sstevel@tonic-gate 	((tnf_uint32_t)(x) & TNF_REF32_TYPE_MASK)
125*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_VALUE(x)	\
126*7c478bd9Sstevel@tonic-gate 	((tnf_ref32_t)(((tnf_uint32_t)(x) & ~TNF_REF32_TYPE_MASK) & \
127*7c478bd9Sstevel@tonic-gate 					~TNF_SPACE_MASK))
128*7c478bd9Sstevel@tonic-gate 
129*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_IS_FULL(x)	(TNF_REF32_TYPE(x) == TNF_REF32_T_FULL)
130*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_IS_FWD(x)	(TNF_REF32_TYPE(x) == TNF_REF32_T_FWD)
131*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_IS_PAIR(x)	(TNF_REF32_TYPE(x) == TNF_REF32_T_PAIR)
132*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_IS_TAG(x)	(TNF_REF32_TYPE(x) == TNF_REF32_T_TAG)
133*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_IS_RSVD(x)	(TNF_REF32_TYPE(x) == TNF_REF32_T_RSVD)
134*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_IS_NULL(x)	((x) == TNF_NULL)
135*7c478bd9Sstevel@tonic-gate 
136*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_REF16(x)	\
137*7c478bd9Sstevel@tonic-gate 	((tnf_ref16_t)((tnf_uint32_t)(x) & TNF_REF32_REF16_MASK))
138*7c478bd9Sstevel@tonic-gate 
139*7c478bd9Sstevel@tonic-gate #define	TNF_REF32_TAG16(x)	\
140*7c478bd9Sstevel@tonic-gate 	((tnf_ref16_t)(((tnf_uint32_t)(x) >> TNF_REF32_TAG16_SHIFT)	\
141*7c478bd9Sstevel@tonic-gate 				& TNF_REF32_TAG16_MASK))
142*7c478bd9Sstevel@tonic-gate 
143*7c478bd9Sstevel@tonic-gate /* Macros on tnf_ref16_t values: */
144*7c478bd9Sstevel@tonic-gate 
145*7c478bd9Sstevel@tonic-gate #define	TNF_REF16_TYPE(x)	\
146*7c478bd9Sstevel@tonic-gate 	((tnf_uint32_t)(x) & TNF_REF16_TYPE_MASK)
147*7c478bd9Sstevel@tonic-gate #define	TNF_REF16_VALUE(x)	\
148*7c478bd9Sstevel@tonic-gate 	((tnf_ref16_t)((tnf_uint32_t)(x) & ~TNF_REF16_TYPE_MASK))
149*7c478bd9Sstevel@tonic-gate 
150*7c478bd9Sstevel@tonic-gate #define	TNF_TAG16_TYPE(x)	\
151*7c478bd9Sstevel@tonic-gate 	((tnf_uint32_t)(x) & TNF_TAG16_TYPE_MASK)
152*7c478bd9Sstevel@tonic-gate 
153*7c478bd9Sstevel@tonic-gate #define	TNF_TAG16_IS_REL(x)	(TNF_TAG16_TYPE(x) == TNF_TAG16_T_REL)
154*7c478bd9Sstevel@tonic-gate #define	TNF_TAG16_IS_ABS(x)	(TNF_TAG16_TYPE(x) == TNF_TAG16_T_ABS)
155*7c478bd9Sstevel@tonic-gate 
156*7c478bd9Sstevel@tonic-gate /* The two kinds of values a tag16 can have: */
157*7c478bd9Sstevel@tonic-gate 
158*7c478bd9Sstevel@tonic-gate #define	TNF_TAG16_REF16(x)	\
159*7c478bd9Sstevel@tonic-gate 	((tnf_ref16_t)((tnf_uint32_t)(x) & ~TNF_TAG16_TYPE_MASK))
160*7c478bd9Sstevel@tonic-gate #define	TNF_TAG16_ABS16(x)	\
161*7c478bd9Sstevel@tonic-gate 	((tnf_abs16_t)((tnf_uint32_t)(x) & ~TNF_TAG16_TYPE_MASK))
162*7c478bd9Sstevel@tonic-gate 
163*7c478bd9Sstevel@tonic-gate /*
164*7c478bd9Sstevel@tonic-gate  * TNF binary layouts
165*7c478bd9Sstevel@tonic-gate  */
166*7c478bd9Sstevel@tonic-gate 
167*7c478bd9Sstevel@tonic-gate struct tnf_tagged_hdr {
168*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	tag;		/* type record */
169*7c478bd9Sstevel@tonic-gate };
170*7c478bd9Sstevel@tonic-gate 
171*7c478bd9Sstevel@tonic-gate struct tnf_array_hdr {
172*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	tag;		/* type record */
173*7c478bd9Sstevel@tonic-gate 	tnf_uint32_t 	self_size;	/* total size */
174*7c478bd9Sstevel@tonic-gate };
175*7c478bd9Sstevel@tonic-gate 
176*7c478bd9Sstevel@tonic-gate struct tnf_type_hdr {
177*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	tag;		/* type record */
178*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	name;		/* string record */
179*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	properties;	/* array of type records */
180*7c478bd9Sstevel@tonic-gate };
181*7c478bd9Sstevel@tonic-gate 
182*7c478bd9Sstevel@tonic-gate struct tnf_struct_type_hdr {
183*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	tag;		/* type record */
184*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	name;		/* string record */
185*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	properties;	/* array of type records */
186*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	slot_types;	/* array of type records */
187*7c478bd9Sstevel@tonic-gate 	tnf_uint32_t	type_size;	/* size of struct */
188*7c478bd9Sstevel@tonic-gate };
189*7c478bd9Sstevel@tonic-gate 
190*7c478bd9Sstevel@tonic-gate struct tnf_array_type_hdr {
191*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	tag;		/* type record */
192*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	name;		/* string record */
193*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	properties;	/* array of type records */
194*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	slot_types;	/* array of type records */
195*7c478bd9Sstevel@tonic-gate 	tnf_uint32_t	header_size;	/* size of array header */
196*7c478bd9Sstevel@tonic-gate };
197*7c478bd9Sstevel@tonic-gate 
198*7c478bd9Sstevel@tonic-gate struct tnf_derived_type_hdr {
199*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	tag;		/* type record */
200*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	name;		/* string record */
201*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	properties;	/* array of type records */
202*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	derived_base;	/* type record */
203*7c478bd9Sstevel@tonic-gate };
204*7c478bd9Sstevel@tonic-gate 
205*7c478bd9Sstevel@tonic-gate /*
206*7c478bd9Sstevel@tonic-gate  * File header, after magic #
207*7c478bd9Sstevel@tonic-gate  */
208*7c478bd9Sstevel@tonic-gate 
209*7c478bd9Sstevel@tonic-gate #define	TNF_FILE_VERSION	1
210*7c478bd9Sstevel@tonic-gate 
211*7c478bd9Sstevel@tonic-gate typedef struct tnf_file_header {
212*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t	tag;
213*7c478bd9Sstevel@tonic-gate 	tnf_uint32_t	file_version;	/* TNF_FILE_VERSION */
214*7c478bd9Sstevel@tonic-gate 	tnf_uint32_t	file_header_size;
215*7c478bd9Sstevel@tonic-gate 	tnf_uint32_t	file_log_size;
216*7c478bd9Sstevel@tonic-gate 	tnf_uint32_t	block_header_size;
217*7c478bd9Sstevel@tonic-gate 	tnf_uint32_t	block_size;
218*7c478bd9Sstevel@tonic-gate 	tnf_uint32_t	directory_size;
219*7c478bd9Sstevel@tonic-gate 	tnf_uint32_t	block_count;
220*7c478bd9Sstevel@tonic-gate 	tnf_uint32_t	blocks_valid;
221*7c478bd9Sstevel@tonic-gate 	/* writer-specific information after this	*/
222*7c478bd9Sstevel@tonic-gate 	/* zero padding to end of block 		*/
223*7c478bd9Sstevel@tonic-gate } tnf_file_header_t;
224*7c478bd9Sstevel@tonic-gate 
225*7c478bd9Sstevel@tonic-gate /*
226*7c478bd9Sstevel@tonic-gate  * Block header
227*7c478bd9Sstevel@tonic-gate  */
228*7c478bd9Sstevel@tonic-gate 
229*7c478bd9Sstevel@tonic-gate typedef unsigned char		tnf_byte_lock_t;
230*7c478bd9Sstevel@tonic-gate 
231*7c478bd9Sstevel@tonic-gate typedef struct tnf_block_header {
232*7c478bd9Sstevel@tonic-gate 	tnf_ref32_t		tag;
233*7c478bd9Sstevel@tonic-gate 	tnf_uint32_t		generation; /* (-1) => tag block */
234*7c478bd9Sstevel@tonic-gate 	tnf_uint16_t		bytes_valid;
235*7c478bd9Sstevel@tonic-gate 	tnf_byte_lock_t		A_lock;
236*7c478bd9Sstevel@tonic-gate 	tnf_byte_lock_t		B_lock;
237*7c478bd9Sstevel@tonic-gate 	struct tnf_block_header	*next_block; /* release list */
238*7c478bd9Sstevel@tonic-gate } tnf_block_header_t;
239*7c478bd9Sstevel@tonic-gate 
240*7c478bd9Sstevel@tonic-gate /*
241*7c478bd9Sstevel@tonic-gate  * TNF type names
242*7c478bd9Sstevel@tonic-gate  */
243*7c478bd9Sstevel@tonic-gate 
244*7c478bd9Sstevel@tonic-gate #define	TNF_N_INLINE		"tnf_inline"
245*7c478bd9Sstevel@tonic-gate #define	TNF_N_TAGGED		"tnf_tagged"
246*7c478bd9Sstevel@tonic-gate 
247*7c478bd9Sstevel@tonic-gate #define	TNF_N_SCALAR		"tnf_scalar"
248*7c478bd9Sstevel@tonic-gate #define	TNF_N_CHAR		"tnf_char"
249*7c478bd9Sstevel@tonic-gate #define	TNF_N_INT8 		"tnf_int8"
250*7c478bd9Sstevel@tonic-gate #define	TNF_N_UINT8		"tnf_uint8"
251*7c478bd9Sstevel@tonic-gate #define	TNF_N_INT16		"tnf_int16"
252*7c478bd9Sstevel@tonic-gate #define	TNF_N_UINT16		"tnf_uint16"
253*7c478bd9Sstevel@tonic-gate #define	TNF_N_INT32		"tnf_int32"
254*7c478bd9Sstevel@tonic-gate #define	TNF_N_UINT32		"tnf_uint32"
255*7c478bd9Sstevel@tonic-gate #define	TNF_N_INT64		"tnf_int64"
256*7c478bd9Sstevel@tonic-gate #define	TNF_N_UINT64		"tnf_uint64"
257*7c478bd9Sstevel@tonic-gate #define	TNF_N_FLOAT32		"tnf_float32"
258*7c478bd9Sstevel@tonic-gate #define	TNF_N_FLOAT64		"tnf_float64"
259*7c478bd9Sstevel@tonic-gate 
260*7c478bd9Sstevel@tonic-gate #define	TNF_N_ARRAY		"tnf_array"
261*7c478bd9Sstevel@tonic-gate #define	TNF_N_STRING 		"tnf_string"
262*7c478bd9Sstevel@tonic-gate #define	TNF_N_TYPE_ARRAY	"tnf_type_array"
263*7c478bd9Sstevel@tonic-gate #define	TNF_N_NAME_ARRAY	"tnf_name_array"
264*7c478bd9Sstevel@tonic-gate 
265*7c478bd9Sstevel@tonic-gate #define	TNF_N_ALIGN		"tnf_align"
266*7c478bd9Sstevel@tonic-gate #define	TNF_N_DERIVED		"tnf_derived"
267*7c478bd9Sstevel@tonic-gate #define	TNF_N_DERIVED_BASE	"tnf_derived_base"
268*7c478bd9Sstevel@tonic-gate #define	TNF_N_ELEMENT_TYPE	"tnf_element_type"
269*7c478bd9Sstevel@tonic-gate #define	TNF_N_HEADER_SIZE	"tnf_header_size"
270*7c478bd9Sstevel@tonic-gate #define	TNF_N_NAME		"tnf_name"
271*7c478bd9Sstevel@tonic-gate #define	TNF_N_OPAQUE		"tnf_opaque"
272*7c478bd9Sstevel@tonic-gate #define	TNF_N_PROPERTIES	"tnf_properties"
273*7c478bd9Sstevel@tonic-gate #define	TNF_N_SELF_SIZE		"tnf_self_size"
274*7c478bd9Sstevel@tonic-gate #define	TNF_N_SIZE		"tnf_size"
275*7c478bd9Sstevel@tonic-gate #define	TNF_N_SLOT_NAMES	"tnf_slot_names"
276*7c478bd9Sstevel@tonic-gate #define	TNF_N_SLOT_TYPES	"tnf_slot_types"
277*7c478bd9Sstevel@tonic-gate #define	TNF_N_TAG		"tnf_tag"
278*7c478bd9Sstevel@tonic-gate #define	TNF_N_TAG_ARG		"tnf_tag_arg"
279*7c478bd9Sstevel@tonic-gate #define	TNF_N_TYPE_SIZE		"tnf_type_size"
280*7c478bd9Sstevel@tonic-gate 
281*7c478bd9Sstevel@tonic-gate #define	TNF_N_STRUCT		"tnf_struct"
282*7c478bd9Sstevel@tonic-gate 
283*7c478bd9Sstevel@tonic-gate #define	TNF_N_ARRAY_TYPE	"tnf_array_type"
284*7c478bd9Sstevel@tonic-gate #define	TNF_N_DERIVED_TYPE	"tnf_derived_type"
285*7c478bd9Sstevel@tonic-gate #define	TNF_N_SCALAR_TYPE	"tnf_scalar_type"
286*7c478bd9Sstevel@tonic-gate #define	TNF_N_STRUCT_TYPE	"tnf_struct_type"
287*7c478bd9Sstevel@tonic-gate #define	TNF_N_TYPE		"tnf_type"
288*7c478bd9Sstevel@tonic-gate 
289*7c478bd9Sstevel@tonic-gate /*
290*7c478bd9Sstevel@tonic-gate  * Reserved names for block and file header information
291*7c478bd9Sstevel@tonic-gate  */
292*7c478bd9Sstevel@tonic-gate 
293*7c478bd9Sstevel@tonic-gate #define	TNF_N_FILE_HEADER	"tnf_file_header"
294*7c478bd9Sstevel@tonic-gate #define	TNF_N_FILE_VERSION	"file_version"
295*7c478bd9Sstevel@tonic-gate #define	TNF_N_FILE_HEADER_SIZE	"file_header_size"
296*7c478bd9Sstevel@tonic-gate #define	TNF_N_FILE_LOGICAL_SIZE	"file_logical_size"
297*7c478bd9Sstevel@tonic-gate #define	TNF_N_BLOCK_HEADER_SIZE	"block_header_size"
298*7c478bd9Sstevel@tonic-gate #define	TNF_N_BLOCK_SIZE	"block_size"
299*7c478bd9Sstevel@tonic-gate #define	TNF_N_DIRECTORY_SIZE	"directory_size"
300*7c478bd9Sstevel@tonic-gate #define	TNF_N_BLOCK_COUNT	"block_count"
301*7c478bd9Sstevel@tonic-gate #define	TNF_N_BLOCKS_VALID	"blocks_valid"
302*7c478bd9Sstevel@tonic-gate 
303*7c478bd9Sstevel@tonic-gate #define	TNF_N_BLOCK_HEADER	"tnf_block_header"
304*7c478bd9Sstevel@tonic-gate #define	TNF_N_GENERATION	"generation"
305*7c478bd9Sstevel@tonic-gate #define	TNF_N_BYTES_VALID	"bytes_valid"
306*7c478bd9Sstevel@tonic-gate 
307*7c478bd9Sstevel@tonic-gate /*
308*7c478bd9Sstevel@tonic-gate  * Reserved names for schedule record information
309*7c478bd9Sstevel@tonic-gate  */
310*7c478bd9Sstevel@tonic-gate 
311*7c478bd9Sstevel@tonic-gate #define	TNF_N_USER_SCHEDULE	"tnf_user_schedule"
312*7c478bd9Sstevel@tonic-gate #define	TNF_N_KERNEL_SCHEDULE	"tnf_kernel_schedule"
313*7c478bd9Sstevel@tonic-gate 
314*7c478bd9Sstevel@tonic-gate #define	TNF_N_PID		"pid"
315*7c478bd9Sstevel@tonic-gate #define	TNF_N_LWPID		"lwpid"
316*7c478bd9Sstevel@tonic-gate #define	TNF_N_TID		"tid"
317*7c478bd9Sstevel@tonic-gate #define	TNF_N_TIME_BASE		"time_base"
318*7c478bd9Sstevel@tonic-gate #define	TNF_N_TIME_DELTA	"time_delta"
319*7c478bd9Sstevel@tonic-gate 
320*7c478bd9Sstevel@tonic-gate /* XXX TODO: kernel type names */
321*7c478bd9Sstevel@tonic-gate 
322*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
323*7c478bd9Sstevel@tonic-gate }
324*7c478bd9Sstevel@tonic-gate #endif
325*7c478bd9Sstevel@tonic-gate 
326*7c478bd9Sstevel@tonic-gate #endif /* _SYS_TNF_COM_H */
327