1 # 1 "main.c"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "main.c"
5 /*
6  * CDDL HEADER START
7  *
8  * The contents of this file are subject to the terms of the
9  * Common Development and Distribution License (the "License").
10  * You may not use this file except in compliance with the License.
11  *
12  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13  * or http://www.opensolaris.org/os/licensing.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  *
17  * When distributing Covered Code, include this CDDL HEADER in each
18  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19  * If applicable, add the following below this CDDL HEADER, with the
20  * fields enclosed by brackets "[]" replaced with your own identifying
21  * information: Portions Copyright [yyyy] [name of copyright owner]
22  *
23  * CDDL HEADER END
24  */
25 
26 /*
27  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
28  * Use is subject to license terms.
29  */
30 
31 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
32 /* All Rights Reserved */
33 
34 
35 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
36 /*
37  * CDDL HEADER START
38  *
39  * The contents of this file are subject to the terms of the
40  * Common Development and Distribution License (the "License").
41  * You may not use this file except in compliance with the License.
42  *
43  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
44  * or http://www.opensolaris.org/os/licensing.
45  * See the License for the specific language governing permissions
46  * and limitations under the License.
47  *
48  * When distributing Covered Code, include this CDDL HEADER in each
49  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
50  * If applicable, add the following below this CDDL HEADER, with the
51  * fields enclosed by brackets "[]" replaced with your own identifying
52  * information: Portions Copyright [yyyy] [name of copyright owner]
53  *
54  * CDDL HEADER END
55  */
56 
57 /*
58  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
59  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
60  */
61 
62 /*	Copyright (c) 1988 AT&T	*/
63 /*	  All Rights Reserved  	*/
64 
65 /*
66  * User-visible pieces of the ANSI C standard I/O package.
67  */
68 
69 
70 
71 
72 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
73 /*
74  * CDDL HEADER START
75  *
76  * The contents of this file are subject to the terms of the
77  * Common Development and Distribution License (the "License").
78  * You may not use this file except in compliance with the License.
79  *
80  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
81  * or http://www.opensolaris.org/os/licensing.
82  * See the License for the specific language governing permissions
83  * and limitations under the License.
84  *
85  * When distributing Covered Code, include this CDDL HEADER in each
86  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
87  * If applicable, add the following below this CDDL HEADER, with the
88  * fields enclosed by brackets "[]" replaced with your own identifying
89  * information: Portions Copyright [yyyy] [name of copyright owner]
90  *
91  * CDDL HEADER END
92  */
93 
94 /*
95  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
96  * Copyright 2016 Joyent, Inc.
97  *
98  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
99  * Use is subject to license terms.
100  */
101 
102 
103 
104 
105 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h" 1
106 /*
107  * CDDL HEADER START
108  *
109  * The contents of this file are subject to the terms of the
110  * Common Development and Distribution License, Version 1.0 only
111  * (the "License").  You may not use this file except in compliance
112  * with the License.
113  *
114  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
115  * or http://www.opensolaris.org/os/licensing.
116  * See the License for the specific language governing permissions
117  * and limitations under the License.
118  *
119  * When distributing Covered Code, include this CDDL HEADER in each
120  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
121  * If applicable, add the following below this CDDL HEADER, with the
122  * fields enclosed by brackets "[]" replaced with your own identifying
123  * information: Portions Copyright [yyyy] [name of copyright owner]
124  *
125  * CDDL HEADER END
126  */
127 /*
128  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
129  * Use is subject to license terms.
130  */
131 /*
132  * Copyright 2015 EveryCity Ltd. All rights reserved.
133  */
134 
135 
136 
137 
138 /*
139  * This file contains definitions designed to enable different compilers
140  * to be used harmoniously on Solaris systems.
141  */
142 
143 
144 
145 
146 
147 /*
148  * Allow for version tests for compiler bugs and features.
149  */
150 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
151 /*
152  * analogous to lint's PRINTFLIKEn
153  */
154 
155 
156 
157 
158 
159 /*
160  * Handle the kernel printf routines that can take '%b' too
161  */
162 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
163 /*
164  * This one's pretty obvious -- the function never returns
165  */
166 
167 
168 /*
169  * The function is 'extern inline' and expects GNU C89 behaviour, not C99
170  * behaviour.
171  *
172  * Should only be used on 'extern inline' definitions for GCC.
173  */
174 
175 
176 
177 
178 
179 
180 /*
181  * The function has control flow such that it may return multiple times (in
182  * the manner of setjmp or vfork)
183  */
184 
185 
186 
187 
188 
189 
190 /*
191  * This is an appropriate label for functions that do not
192  * modify their arguments, e.g. strlen()
193  */
194 
195 
196 /*
197  * This is a stronger form of __pure__. Can be used for functions
198  * that do not modify their arguments and don't depend on global
199  * memory.
200  */
201 
202 
203 
204 
205 /*
206  * This attribute, attached to a variable, means that the variable is meant to
207  * be possibly unused. GCC will not produce a warning for this variable.
208  */
209 # 138 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
210 /*
211  * Shorthand versions for readability
212  */
213 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
214 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
215 /*
216  * CDDL HEADER START
217  *
218  * The contents of this file are subject to the terms of the
219  * Common Development and Distribution License (the "License").
220  * You may not use this file except in compliance with the License.
221  *
222  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
223  * or http://www.opensolaris.org/os/licensing.
224  * See the License for the specific language governing permissions
225  * and limitations under the License.
226  *
227  *
228  * When distributing Covered Code, include this CDDL HEADER in each
229  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
230  * If applicable, add the following below this CDDL HEADER, with the
231  * fields enclosed by brackets "[]" replaced with your own identifying
232  * information: Portions Copyright [yyyy] [name of copyright owner]
233  *
234  * CDDL HEADER END
235  */
236 
237 /*
238  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
239  * Use is subject to license terms.
240  * Copyright 2016 Joyent, Inc.
241  */
242 
243 
244 
245 
246 /*
247  * This header file serves to group a set of well known defines and to
248  * set these for each instruction set architecture.  These defines may
249  * be divided into two groups;  characteristics of the processor and
250  * implementation choices for Solaris on a processor.
251  *
252  * Processor Characteristics:
253  *
254  * _LITTLE_ENDIAN / _BIG_ENDIAN:
255  *	The natural byte order of the processor.  A pointer to an int points
256  *	to the least/most significant byte of that int.
257  *
258  * _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
259  *	The processor specific direction of stack growth.  A push onto the
260  *	stack increases/decreases the stack pointer, so it stores data at
261  *	successively higher/lower addresses.  (Stackless machines ignored
262  *	without regrets).
263  *
264  * _LONG_LONG_HTOL / _LONG_LONG_LTOH:
265  *	A pointer to a long long points to the most/least significant long
266  *	within that long long.
267  *
268  * _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
269  *	The C compiler assigns bit fields from the high/low to the low/high end
270  *	of an int (most to least significant vs. least to most significant).
271  *
272  * _IEEE_754:
273  *	The processor (or supported implementations of the processor)
274  *	supports the ieee-754 floating point standard.  No other floating
275  *	point standards are supported (or significant).  Any other supported
276  *	floating point formats are expected to be cased on the ISA processor
277  *	symbol.
278  *
279  * _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
280  *	The C Compiler implements objects of type `char' as `unsigned' or
281  *	`signed' respectively.  This is really an implementation choice of
282  *	the compiler writer, but it is specified in the ABI and tends to
283  *	be uniform across compilers for an instruction set architecture.
284  *	Hence, it has the properties of a processor characteristic.
285  *
286  * _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
287  * _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
288  * _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
289  *	The ABI defines alignment requirements of each of the primitive
290  *	object types.  Some, if not all, may be hardware requirements as
291  * 	well.  The values are expressed in "byte-alignment" units.
292  *
293  * _MAX_ALIGNMENT:
294  *	The most stringent alignment requirement as specified by the ABI.
295  *	Equal to the maximum of all the above _XXX_ALIGNMENT values.
296  *
297  * _MAX_ALIGNMENT_TYPE:
298  * 	The name of the C type that has the value descried in _MAX_ALIGNMENT.
299  *
300  * _ALIGNMENT_REQUIRED:
301  *	True or false (1 or 0) whether or not the hardware requires the ABI
302  *	alignment.
303  *
304  * _LONG_LONG_ALIGNMENT_32
305  *	The 32-bit ABI supported by a 64-bit kernel may have different
306  *	alignment requirements for primitive object types.  The value of this
307  *	identifier is expressed in "byte-alignment" units.
308  *
309  * _HAVE_CPUID_INSN
310  *	This indicates that the architecture supports the 'cpuid'
311  *	instruction as defined by Intel.  (Intel allows other vendors
312  *	to extend the instruction for their own purposes.)
313  *
314  *
315  * Implementation Choices:
316  *
317  * _ILP32 / _LP64:
318  *	This specifies the compiler data type implementation as specified in
319  *	the relevant ABI.  The choice between these is strongly influenced
320  *	by the underlying hardware, but is not absolutely tied to it.
321  *	Currently only two data type models are supported:
322  *
323  *	_ILP32:
324  *		Int/Long/Pointer are 32 bits.  This is the historical UNIX
325  *		and Solaris implementation.  Due to its historical standing,
326  *		this is the default case.
327  *
328  *	_LP64:
329  *		Long/Pointer are 64 bits, Int is 32 bits.  This is the chosen
330  *		implementation for 64-bit ABIs such as SPARC V9.
331  *
332  *	_I32LPx:
333  *		A compilation environment where 'int' is 32-bit, and
334  *		longs and pointers are simply the same size.
335  *
336  *	In all cases, Char is 8 bits and Short is 16 bits.
337  *
338  * _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
339  *	This specifies the form of the disk VTOC (or label):
340  *
341  *	_SUNOS_VTOC_8:
342  *		This is a VTOC form which is upwardly compatible with the
343  *		SunOS 4.x disk label and allows 8 partitions per disk.
344  *
345  *	_SUNOS_VTOC_16:
346  *		In this format the incore vtoc image matches the ondisk
347  *		version.  It allows 16 slices per disk, and is not
348  *		compatible with the SunOS 4.x disk label.
349  *
350  *	Note that these are not the only two VTOC forms possible and
351  *	additional forms may be added.  One possible form would be the
352  *	SVr4 VTOC form.  The symbol for that is reserved now, although
353  *	it is not implemented.
354  *
355  *	_SVR4_VTOC_16:
356  *		This VTOC form is compatible with the System V Release 4
357  *		VTOC (as implemented on the SVr4 Intel and 3b ports) with
358  *		16 partitions per disk.
359  *
360  *
361  * _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
362  *	This describes the type of addresses used by system DMA:
363  *
364  *	_DMA_USES_PHYSADDR:
365  *		This type of DMA, used in the x86 implementation,
366  *		requires physical addresses for DMA buffers.  The 24-bit
367  *		addresses used by some legacy boards is the source of the
368  *		"low-memory" (<16MB) requirement for some devices using DMA.
369  *
370  *	_DMA_USES_VIRTADDR:
371  *		This method of DMA allows the use of virtual addresses for
372  *		DMA transfers.
373  *
374  * _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
375  *      This indicates the presence/absence of an fdisk table.
376  *
377  *      _FIRMWARE_NEEDS_FDISK
378  *              The fdisk table is required by system firmware.  If present,
379  *              it allows a disk to be subdivided into multiple fdisk
380  *              partitions, each of which is equivalent to a separate,
381  *              virtual disk.  This enables the co-existence of multiple
382  *              operating systems on a shared hard disk.
383  *
384  *      _NO_FDISK_PRESENT
385  *              If the fdisk table is absent, it is assumed that the entire
386  *              media is allocated for a single operating system.
387  *
388  * _HAVE_TEM_FIRMWARE
389  *	Defined if this architecture has the (fallback) option of
390  *	using prom_* calls for doing I/O if a suitable kernel driver
391  *	is not available to do it.
392  *
393  * _DONT_USE_1275_GENERIC_NAMES
394  *		Controls whether or not device tree node names should
395  *		comply with the IEEE 1275 "Generic Names" Recommended
396  *		Practice. With _DONT_USE_GENERIC_NAMES, device-specific
397  *		names identifying the particular device will be used.
398  *
399  * __i386_COMPAT
400  *	This indicates whether the i386 ABI is supported as a *non-native*
401  *	mode for the platform.  When this symbol is defined:
402  *	-	32-bit xstat-style system calls are enabled
403  *	-	32-bit xmknod-style system calls are enabled
404  *	-	32-bit system calls use i386 sizes -and- alignments
405  *
406  *	Note that this is NOT defined for the i386 native environment!
407  *
408  * __x86
409  *	This is ONLY a synonym for defined(__i386) || defined(__amd64)
410  *	which is useful only insofar as these two architectures share
411  *	common attributes.  Analogous to __sparc.
412  *
413  * _PSM_MODULES
414  *	This indicates whether or not the implementation uses PSM
415  *	modules for processor support, reading /etc/mach from inside
416  *	the kernel to extract a list.
417  *
418  * _RTC_CONFIG
419  *	This indicates whether or not the implementation uses /etc/rtc_config
420  *	to configure the real-time clock in the kernel.
421  *
422  * _UNIX_KRTLD
423  *	This indicates that the implementation uses a dynamically
424  *	linked unix + krtld to form the core kernel image at boot
425  *	time, or (in the absence of this symbol) a prelinked kernel image.
426  *
427  * _OBP
428  *	This indicates the firmware interface is OBP.
429  *
430  * _SOFT_HOSTID
431  *	This indicates that the implementation obtains the hostid
432  *	from the file /etc/hostid, rather than from hardware.
433  */
434 
435 
436 
437 
438 
439 /*
440  * The following set of definitions characterize Solaris on AMD's
441  * 64-bit systems.
442  */
443 # 305 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
444 /*
445  * Define the appropriate "processor characteristics"
446  */
447 # 333 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
448 /*
449  * Define the appropriate "implementation choices".
450  */
451 # 351 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
452 /*
453  * The following set of definitions characterize the Solaris on SPARC systems.
454  *
455  * The symbol __sparc indicates any of the SPARC family of processor
456  * architectures.  This includes SPARC V7, SPARC V8 and SPARC V9.
457  *
458  * The symbol __sparcv8 indicates the 32-bit SPARC V8 architecture as defined
459  * by Version 8 of the SPARC Architecture Manual.  (SPARC V7 is close enough
460  * to SPARC V8 for the former to be subsumed into the latter definition.)
461  *
462  * The symbol __sparcv9 indicates the 64-bit SPARC V9 architecture as defined
463  * by Version 9 of the SPARC Architecture Manual.
464  *
465  * The symbols __sparcv8 and __sparcv9 are mutually exclusive, and are only
466  * relevant when the symbol __sparc is defined.
467  */
468 /*
469  * XXX Due to the existence of 5110166, "defined(__sparcv9)" needs to be added
470  * to support backwards builds.  This workaround should be removed in s10_71.
471  */
472 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
473 
474 
475 
476 
477 
478 /*
479  * Values of _POSIX_C_SOURCE
480  *
481  *		undefined   not a POSIX compilation
482  *		1	    POSIX.1-1990 compilation
483  *		2	    POSIX.2-1992 compilation
484  *		199309L	    POSIX.1b-1993 compilation (Real Time)
485  *		199506L	    POSIX.1c-1995 compilation (POSIX Threads)
486  *		200112L	    POSIX.1-2001 compilation (Austin Group Revision)
487  *		200809L     POSIX.1-2008 compilation
488  */
489 
490 
491 
492 
493 /*
494  * The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
495  * and _STDC_C99 are Sun implementation specific macros created in order to
496  * compress common standards specified feature test macros for easier reading.
497  * These macros should not be used by the application developer as
498  * unexpected results may occur. Instead, the user should reference
499  * standards(5) for correct usage of the standards feature test macros.
500  *
501  * __XOPEN_OR_POSIX     Used in cases where a symbol is defined by both
502  *                      X/Open or POSIX or in the negative, when neither
503  *                      X/Open or POSIX defines a symbol.
504  *
505  * _STRICT_STDC         __STDC__ is specified by the C Standards and defined
506  *                      by the compiler. For Sun compilers the value of
507  *                      __STDC__ is either 1, 0, or not defined based on the
508  *                      compilation mode (see cc(1)). When the value of
509  *                      __STDC__ is 1 and in the absence of any other feature
510  *                      test macros, the namespace available to the application
511  *                      is limited to only those symbols defined by the C
512  *                      Standard. _STRICT_STDC provides a more readable means
513  *                      of identifying symbols defined by the standard, or in
514  *                      the negative, symbols that are extensions to the C
515  *                      Standard. See additional comments for GNU C differences.
516  *
517  * _STDC_C99            __STDC_VERSION__ is specified by the C standards and
518  *                      defined by the compiler and indicates the version of
519  *                      the C standard. A value of 199901L indicates a
520  *                      compiler that complies with ISO/IEC 9899:1999, other-
521  *                      wise known as the C99 standard.
522  *
523  * _STDC_C11		Like _STDC_C99 except that the value of __STDC_VERSION__
524  *                      is 201112L indicating a compiler that compiles with
525  *                      ISO/IEXC 9899:2011, otherwise known as the C11 standard.
526  *
527  * _STRICT_SYMBOLS	Used in cases where symbol visibility is restricted
528  *                      by the standards, and the user has not explicitly
529  *                      relaxed the strictness via __EXTENSIONS__.
530  */
531 
532 
533 
534 
535 
536 /*
537  * ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
538  * 99899:2011 specify the following predefined macro name:
539  *
540  * __STDC__	The integer constant 1, intended to indicate a conforming
541  *		implementation.
542  *
543  * Furthermore, a strictly conforming program shall use only those features
544  * of the language and library specified in these standards. A conforming
545  * implementation shall accept any strictly conforming program.
546  *
547  * Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
548  * strictly conforming environments and __STDC__ to 0 for environments that
549  * use ANSI C semantics but allow extensions to the C standard. For non-ANSI
550  * C semantics, Sun's C compiler does not define __STDC__.
551  *
552  * The GNU C project interpretation is that __STDC__ should always be defined
553  * to 1 for compilation modes that accept ANSI C syntax regardless of whether
554  * or not extensions to the C standard are used. Violations of conforming
555  * behavior are conditionally flagged as warnings via the use of the
556  * -pedantic option. In addition to defining __STDC__ to 1, the GNU C
557  * compiler also defines __STRICT_ANSI__ as a means of specifying strictly
558  * conforming environments using the -ansi or -std=<standard> options.
559  *
560  * In the absence of any other compiler options, Sun and GNU set the value
561  * of __STDC__ as follows when using the following options:
562  *
563  *				Value of __STDC__  __STRICT_ANSI__
564  *
565  * cc -Xa (default)			0	      undefined
566  * cc -Xt (transitional)		0             undefined
567  * cc -Xc (strictly conforming)		1	      undefined
568  * cc -Xs (K&R C)		    undefined	      undefined
569  *
570  * gcc (default)			1	      undefined
571  * gcc -ansi, -std={c89, c99,...)  	1              defined
572  * gcc -traditional (K&R)	    undefined	      undefined
573  *
574  * The default compilation modes for Sun C compilers versus GNU C compilers
575  * results in a differing value for __STDC__ which results in a more
576  * restricted namespace when using Sun compilers. To allow both GNU and Sun
577  * interpretations to peacefully co-exist, we use the following Sun
578  * implementation _STRICT_STDC_ macro:
579  */
580 # 150 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
581 /*
582  * Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
583  */
584 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
585 /*
586  * Use strict symbol visibility.
587  */
588 
589 
590 
591 
592 
593 /*
594  * Large file interfaces:
595  *
596  *	_LARGEFILE_SOURCE
597  *		1		large file-related additions to POSIX
598  *				interfaces requested (fseeko, etc.)
599  *	_LARGEFILE64_SOURCE
600  *		1		transitional large-file-related interfaces
601  *				requested (seek64, stat64, etc.)
602  *
603  * The corresponding announcement macros are respectively:
604  *	_LFS_LARGEFILE
605  *	_LFS64_LARGEFILE
606  * (These are set in <unistd.h>.)
607  *
608  * Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
609  * well.
610  *
611  * The large file interfaces are made visible regardless of the initial values
612  * of the feature test macros under certain circumstances:
613  *    -	If no explicit standards-conforming environment is requested (neither
614  *	of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
615  *	__STDC__ does not imply standards conformance).
616  *    -	Extended system interfaces are explicitly requested (__EXTENSIONS__
617  * 	is defined).
618  *    -	Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
619  *	defined).  (Note that this dependency is an artifact of the current
620  *	kernel implementation and may change in future releases.)
621  */
622 # 210 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
623 /*
624  * Large file compilation environment control:
625  *
626  * The setting of _FILE_OFFSET_BITS controls the size of various file-related
627  * types and governs the mapping between file-related source function symbol
628  * names and the corresponding binary entry points.
629  *
630  * In the 32-bit environment, the default value is 32; if not set, set it to
631  * the default here, to simplify tests in other headers.
632  *
633  * In the 64-bit compilation environment, the only value allowed is 64.
634  */
635 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
636 /*
637  * Use of _XOPEN_SOURCE
638  *
639  * The following X/Open specifications are supported:
640  *
641  * X/Open Portability Guide, Issue 3 (XPG3)
642  * X/Open CAE Specification, Issue 4 (XPG4)
643  * X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
644  * X/Open CAE Specification, Issue 5 (XPG5)
645  * Open Group Technical Standard, Issue 6 (XPG6), also referred to as
646  *    IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
647  * Open Group Technical Standard, Issue 7 (XPG7), also referred to as
648  *    IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
649  *
650  * XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
651  * XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
652  *     Version 2 (SUSv2)
653  * XPG6 is the result of a merge of the X/Open and POSIX specifications
654  *     and as such is also referred to as IEEE Std. 1003.1-2001 in
655  *     addition to UNIX 03 and SUSv3.
656  * XPG7 is also referred to as UNIX 08 and SUSv4.
657  *
658  * When writing a conforming X/Open application, as per the specification
659  * requirements, the appropriate feature test macros must be defined at
660  * compile time. These are as follows. For more info, see standards(5).
661  *
662  * Feature Test Macro				     Specification
663  * ------------------------------------------------  -------------
664  * _XOPEN_SOURCE                                         XPG3
665  * _XOPEN_SOURCE && _XOPEN_VERSION = 4                   XPG4
666  * _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1           XPG4v2
667  * _XOPEN_SOURCE = 500                                   XPG5
668  * _XOPEN_SOURCE = 600  (or POSIX_C_SOURCE=200112L)      XPG6
669  * _XOPEN_SOURCE = 700  (or POSIX_C_SOURCE=200809L)      XPG7
670  *
671  * In order to simplify the guards within the headers, the following
672  * implementation private test macros have been created. Applications
673  * must NOT use these private test macros as unexpected results will
674  * occur.
675  *
676  * Note that in general, the use of these private macros is cumulative.
677  * For example, the use of _XPG3 with no other restrictions on the X/Open
678  * namespace will make the symbols visible for XPG3 through XPG6
679  * compilation environments. The use of _XPG4_2 with no other X/Open
680  * namespace restrictions indicates that the symbols were introduced in
681  * XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
682  * environments, but not for XPG3 or XPG4 compilation environments.
683  *
684  * _XPG3    X/Open Portability Guide, Issue 3 (XPG3)
685  * _XPG4    X/Open CAE Specification, Issue 4 (XPG4)
686  * _XPG4_2  X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
687  * _XPG5    X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
688  * _XPG6    Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
689  * _XPG7    Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
690  */
691 
692 /* X/Open Portability Guide, Issue 3 */
693 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
694 /*
695  * _XOPEN_VERSION is defined by the X/Open specifications and is not
696  * normally defined by the application, except in the case of an XPG4
697  * application.  On the implementation side, _XOPEN_VERSION defined with
698  * the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
699  * with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
700  * _XOPEN_VERSION  defined with a value of 500 indicates an XPG5 (UNIX 98)
701  * application and with a value of 600 indicates an XPG6 (UNIX 03)
702  * application and with a value of 700 indicates an XPG7 (UNIX 08).
703  * The appropriate version is determined by the use of the
704  * feature test macros described earlier.  The value of _XOPEN_VERSION
705  * defaults to 3 otherwise indicating support for XPG3 applications.
706  */
707 # 368 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
708 /*
709  * ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
710  * conforming environments.  ISO 9899:1999 says it does.
711  *
712  * The presence of _LONGLONG_TYPE says "long long exists" which is therefore
713  * defined in all but strictly conforming environments that disallow it.
714  */
715 # 388 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
716 /*
717  * The following macro defines a value for the ISO C99 restrict
718  * keyword so that _RESTRICT_KYWD resolves to "restrict" if
719  * an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
720  * if any other compiler is used. This allows for the use of single
721  * prototype declarations regardless of compiler version.
722  */
723 # 410 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
724 /*
725  * The following macro defines a value for the ISO C11 _Noreturn
726  * keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
727  * an ISO C11 compiler is used and "" (null string) if any other
728  * compiler is used. This allows for the use of single prototype
729  * declarations regardless of compiler version.
730  */
731 
732 
733 
734 
735 
736 
737 
738 /*
739  * The following macro indicates header support for the ANSI C++
740  * standard.  The ISO/IEC designation for this is ISO/IEC FDIS 14882.
741  */
742 
743 
744 /*
745  * The following macro indicates header support for the C99 standard,
746  * ISO/IEC 9899:1999, Programming Languages - C.
747  */
748 
749 
750 /*
751  * The following macro indicates header support for the C99 standard,
752  * ISO/IEC 9899:2011, Programming Languages - C.
753  */
754 
755 
756 /*
757  * The following macro indicates header support for DTrace. The value is an
758  * integer that corresponds to the major version number for DTrace.
759  */
760 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
761 
762 
763 
764 
765 
766 /*
767  * Do all of our 'redefine_extname' processing before
768  * declarations of the associated functions are seen.
769  * This is necessary to keep gcc happy.
770  */
771 
772 
773 /* large file compilation environment setup */
774 
775 
776 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
777 #pragma redefine_extname fopen fopen64
778 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
779 
780 
781 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
782 #pragma redefine_extname freopen freopen64
783 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
784 
785 
786 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
787 #pragma redefine_extname tmpfile tmpfile64
788 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
789 
790 
791 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
792 #pragma redefine_extname fgetpos fgetpos64
793 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
794 
795 
796 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
797 #pragma redefine_extname fsetpos fsetpos64
798 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
799 
800 
801 
802 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
803 #pragma redefine_extname fseeko fseeko64
804 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
805 
806 
807 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
808 #pragma redefine_extname ftello ftello64
809 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
810 
811 
812 
813 
814 /* In the LP64 compilation environment, all APIs are already large file */
815 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
816 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 1
817 /*
818  * CDDL HEADER START
819  *
820  * The contents of this file are subject to the terms of the
821  * Common Development and Distribution License, Version 1.0 only
822  * (the "License").  You may not use this file except in compliance
823  * with the License.
824  *
825  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
826  * or http://www.opensolaris.org/os/licensing.
827  * See the License for the specific language governing permissions
828  * and limitations under the License.
829  *
830  * When distributing Covered Code, include this CDDL HEADER in each
831  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
832  * If applicable, add the following below this CDDL HEADER, with the
833  * fields enclosed by brackets "[]" replaced with your own identifying
834  * information: Portions Copyright [yyyy] [name of copyright owner]
835  *
836  * CDDL HEADER END
837  */
838 /*
839  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
840  * Copyright 2014 PALO, Richard.
841  *
842  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
843  * Use is subject to license terms.
844  */
845 
846 /*	Copyright (c) 1988 AT&T	*/
847 /*	  All Rights Reserved  	*/
848 
849 /*
850  * An application should not include this header directly.  Instead it
851  * should be included only through the inclusion of other Sun headers.
852  *
853  * The contents of this header is limited to identifiers specified in the
854  * C Standard.  Any new identifiers specified in future amendments to the
855  * C Standard must be placed in this header.  If these new identifiers
856  * are required to also be in the C++ Standard "std" namespace, then for
857  * anything other than macro definitions, corresponding "using" directives
858  * must also be added to <stdio.h>.
859  */
860 
861 /*
862  * User-visible pieces of the ANSI C standard I/O package.
863  */
864 
865 
866 
867 
868 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
869 /*
870  * CDDL HEADER START
871  *
872  * The contents of this file are subject to the terms of the
873  * Common Development and Distribution License (the "License").
874  * You may not use this file except in compliance with the License.
875  *
876  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
877  * or http://www.opensolaris.org/os/licensing.
878  * See the License for the specific language governing permissions
879  * and limitations under the License.
880  *
881  * When distributing Covered Code, include this CDDL HEADER in each
882  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
883  * If applicable, add the following below this CDDL HEADER, with the
884  * fields enclosed by brackets "[]" replaced with your own identifying
885  * information: Portions Copyright [yyyy] [name of copyright owner]
886  *
887  * CDDL HEADER END
888  */
889 
890 /*
891  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
892  * Copyright 2016 Joyent, Inc.
893  *
894  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
895  * Use is subject to license terms.
896  */
897 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
898 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
899 /*
900  * This file and its contents are supplied under the terms of the
901  * Common Development and Distribution License ("CDDL"), version 1.0.
902  * You may only use this file in accordance with the terms of version
903  * 1.0 of the CDDL.
904  *
905  * A full copy of the text of the CDDL should have accompanied this
906  * source.  A copy of the CDDL is also available via the Internet at
907  * http://www.illumos.org/license/CDDL.
908  */
909 
910 /*
911  * Copyright 2014-2016 PALO, Richard.
912  */
913 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
914 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1
915 /*
916  * CDDL HEADER START
917  *
918  * The contents of this file are subject to the terms of the
919  * Common Development and Distribution License, Version 1.0 only
920  * (the "License").  You may not use this file except in compliance
921  * with the License.
922  *
923  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
924  * or http://www.opensolaris.org/os/licensing.
925  * See the License for the specific language governing permissions
926  * and limitations under the License.
927  *
928  * When distributing Covered Code, include this CDDL HEADER in each
929  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
930  * If applicable, add the following below this CDDL HEADER, with the
931  * fields enclosed by brackets "[]" replaced with your own identifying
932  * information: Portions Copyright [yyyy] [name of copyright owner]
933  *
934  * CDDL HEADER END
935  */
936 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
937 /*	  All Rights Reserved	*/
938 
939 
940 /*
941  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
942  *
943  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
944  * Use is subject to license terms.
945  */
946 
947 
948 
949 
950 /*
951  * An application should not include this header directly.  Instead it
952  * should be included only through the inclusion of other Sun headers.
953  *
954  * The purpose of this header is to provide the type definitions for
955  * the va_list argument used by a number of printf and printf like
956  * functions. The headers that define these various function prototypes
957  * #include this header directly. These include but are not necessarily
958  * limited to <stdio.h>, <stdio_iso.h>, <wchar_iso.h>, <strlog.h> and
959  * <syslog.h>. The type definitions included in this header are for
960  * the benefit of consumers of va_list.
961  *
962  * Any application that accepts variable argument lists must as documented,
963  * include either <varargs.h> or the preferred <stdarg.h>. Doing so will
964  * pull in the appropriate compiler protocols defined in <sys/va_impl.h>
965  * which is in turn is included by <varargs.h> and <stdarg.h>. See comments
966  * in <sys/va_impl.h> for more detailed information regarding implementation
967  * and compiler specific protocols.
968  */
969 
970 /*
971  * The common definitions exported by this header or compilers using
972  * this header are:
973  *
974  * the identifier __builtin_va_alist for the variable list pseudo parameter
975  * the type __va_alist_type for the variable list pseudo parameter
976  * the type __va_list defining the type of the variable list iterator
977  *
978  * The feature macros (e.g. __BUILTIN_VA_STRUCT) and compiler macros
979  * (__GNUC__) and processor macros (e.g. __amd64) are intended to be
980  * defined by the compilation system, not the user of the system.
981  */
982 
983 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
984 /*
985  * CDDL HEADER START
986  *
987  * The contents of this file are subject to the terms of the
988  * Common Development and Distribution License (the "License").
989  * You may not use this file except in compliance with the License.
990  *
991  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
992  * or http://www.opensolaris.org/os/licensing.
993  * See the License for the specific language governing permissions
994  * and limitations under the License.
995  *
996  *
997  * When distributing Covered Code, include this CDDL HEADER in each
998  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
999  * If applicable, add the following below this CDDL HEADER, with the
1000  * fields enclosed by brackets "[]" replaced with your own identifying
1001  * information: Portions Copyright [yyyy] [name of copyright owner]
1002  *
1003  * CDDL HEADER END
1004  */
1005 
1006 /*
1007  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1008  * Use is subject to license terms.
1009  * Copyright 2016 Joyent, Inc.
1010  */
1011 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 2
1012 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h"
1013 typedef __builtin_va_list __gnuc_va_list;
1014 /*
1015  * XX64 This seems unnecessary .. but is needed because vcmn_err is
1016  *	defined with __va_list instead of plain old va_list.
1017  *	Perhaps that should be fixed!
1018  */
1019 typedef __builtin_va_list __va_list;
1020 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1021 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h" 1
1022 /*
1023  * CDDL HEADER START
1024  *
1025  * The contents of this file are subject to the terms of the
1026  * Common Development and Distribution License, Version 1.0 only
1027  * (the "License").  You may not use this file except in compliance
1028  * with the License.
1029  *
1030  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1031  * or http://www.opensolaris.org/os/licensing.
1032  * See the License for the specific language governing permissions
1033  * and limitations under the License.
1034  *
1035  * When distributing Covered Code, include this CDDL HEADER in each
1036  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1037  * If applicable, add the following below this CDDL HEADER, with the
1038  * fields enclosed by brackets "[]" replaced with your own identifying
1039  * information: Portions Copyright [yyyy] [name of copyright owner]
1040  *
1041  * CDDL HEADER END
1042  */
1043 /*
1044  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1045  * Use is subject to license terms.
1046  */
1047 
1048 
1049 
1050 
1051 #pragma ident "%Z%%M%	%I%	%E% SMI"
1052 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h"
1053 typedef struct __FILE __FILE;
1054 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1055 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 1
1056 /*
1057  * CDDL HEADER START
1058  *
1059  * The contents of this file are subject to the terms of the
1060  * Common Development and Distribution License (the "License").
1061  * You may not use this file except in compliance with the License.
1062  *
1063  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1064  * or http://www.opensolaris.org/os/licensing.
1065  * See the License for the specific language governing permissions
1066  * and limitations under the License.
1067  *
1068  * When distributing Covered Code, include this CDDL HEADER in each
1069  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1070  * If applicable, add the following below this CDDL HEADER, with the
1071  * fields enclosed by brackets "[]" replaced with your own identifying
1072  * information: Portions Copyright [yyyy] [name of copyright owner]
1073  *
1074  * CDDL HEADER END
1075  */
1076 
1077 /*
1078  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1079  * Use is subject to license terms.
1080  */
1081 
1082 
1083 
1084 
1085 #pragma ident "%Z%%M%	%I%	%E% SMI"
1086 
1087 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1088 /*
1089  * CDDL HEADER START
1090  *
1091  * The contents of this file are subject to the terms of the
1092  * Common Development and Distribution License (the "License").
1093  * You may not use this file except in compliance with the License.
1094  *
1095  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1096  * or http://www.opensolaris.org/os/licensing.
1097  * See the License for the specific language governing permissions
1098  * and limitations under the License.
1099  *
1100  *
1101  * When distributing Covered Code, include this CDDL HEADER in each
1102  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1103  * If applicable, add the following below this CDDL HEADER, with the
1104  * fields enclosed by brackets "[]" replaced with your own identifying
1105  * information: Portions Copyright [yyyy] [name of copyright owner]
1106  *
1107  * CDDL HEADER END
1108  */
1109 
1110 /*
1111  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1112  * Use is subject to license terms.
1113  * Copyright 2016 Joyent, Inc.
1114  */
1115 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 2
1116 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h"
1117 struct __FILE /* needs to be binary-compatible with old versions */
1118 {
1119 
1120 
1121 
1122 
1123  int _cnt; /* number of available characters in buffer */
1124  unsigned char *_ptr; /* next character from/to here in buffer */
1125 
1126  unsigned char *_base; /* the buffer */
1127  unsigned char _flag; /* the state of the stream */
1128  unsigned char _magic; /* Old home of the file descriptor */
1129     /* Only fileno(3C) can retrieve the value now */
1130  unsigned __orientation:2; /* the orientation of the stream */
1131  unsigned __ionolock:1; /* turn off implicit locking */
1132  unsigned __seekable:1; /* is file seekable? */
1133  unsigned __extendedfd:1; /* enable extended FILE */
1134  unsigned __xf_nocheck:1; /* no extended FILE runtime check */
1135  unsigned __filler:10;
1136 };
1137 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1138 
1139 /*
1140  * If feature test macros are set that enable interfaces that use types
1141  * defined in <sys/types.h>, get those types by doing the include.
1142  *
1143  * Note that in asking for the interfaces associated with this feature test
1144  * macro one also asks for definitions of the POSIX types.
1145  */
1146 
1147 
1148 
1149 
1150 
1151 
1152 /*
1153  * The following typedefs are adopted from ones in <sys/types.h> (with leading
1154  * underscores added to avoid polluting the ANSI C name space).  See the
1155  * commentary there for further explanation.
1156  */
1157 
1158 typedef long long __longlong_t;
1159 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1160 typedef __FILE FILE;
1161 
1162 
1163 
1164 
1165 
1166 
1167 
1168 typedef unsigned int size_t; /* (historical version) */
1169 
1170 
1171 
1172 
1173 
1174 
1175 typedef __longlong_t fpos_t;
1176 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1177 /*
1178  * The value of _NFILE is defined in the Processor Specific ABI.  The value
1179  * is chosen for historical reasons rather than for truly processor related
1180  * attribute.  Note that the SPARC Processor Specific ABI uses the common
1181  * UNIX historical value of 20 so it is allowed to fall through.
1182  */
1183 # 156 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1184 extern __FILE __iob[60];
1185 # 191 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1186 extern int remove(const char *);
1187 extern int rename(const char *, const char *);
1188 extern FILE *tmpfile(void);
1189 extern char *tmpnam(char *);
1190 extern int fclose(FILE *);
1191 extern int fflush(FILE *);
1192 extern FILE *fopen(const char *, const char *);
1193 extern FILE *freopen(const char *,
1194    const char *, FILE *);
1195 extern void setbuf(FILE *, char *);
1196 extern int setvbuf(FILE *, char *, int,
1197    size_t);
1198 /* PRINTFLIKE2 */
1199 extern int fprintf(FILE *, const char *, ...);
1200 /* SCANFLIKE2 */
1201 extern int fscanf(FILE *, const char *, ...);
1202 /* PRINTFLIKE1 */
1203 extern int printf(const char *, ...);
1204 /* SCANFLIKE1 */
1205 extern int scanf(const char *, ...);
1206 /* PRINTFLIKE2 */
1207 extern int sprintf(char *, const char *, ...);
1208 /* SCANFLIKE2 */
1209 extern int sscanf(const char *,
1210    const char *, ...);
1211 extern int vfprintf(FILE *, const char *,
1212    __va_list);
1213 extern int vprintf(const char *, __va_list);
1214 extern int vsprintf(char *, const char *,
1215    __va_list);
1216 extern int fgetc(FILE *);
1217 extern char *fgets(char *, int, FILE *);
1218 extern int fputc(int, FILE *);
1219 extern int fputs(const char *, FILE *);
1220 
1221 
1222 extern int getc(FILE *);
1223 extern int putc(int, FILE *);
1224 
1225 
1226 
1227 extern int getchar(void);
1228 extern int putchar(int);
1229 
1230 
1231 /*
1232  * ISO/IEC C11 removed gets from the standard library. Therefore if a strict C11
1233  * environment has been requested, we remove it.
1234  */
1235 
1236 extern char *gets(char *);
1237 
1238 extern int puts(const char *);
1239 extern int ungetc(int, FILE *);
1240 extern size_t fread(void *, size_t, size_t,
1241  FILE *);
1242 extern size_t fwrite(const void *, size_t, size_t,
1243  FILE *);
1244 
1245 extern int fgetpos(FILE *, fpos_t *);
1246 extern int fsetpos(FILE *, const fpos_t *);
1247 
1248 extern int fseek(FILE *, long, int);
1249 extern long ftell(FILE *);
1250 extern void rewind(FILE *);
1251 
1252 
1253 extern void clearerr(FILE *);
1254 extern int feof(FILE *);
1255 extern int ferror(FILE *);
1256 
1257 extern void perror(const char *);
1258 
1259 
1260 extern int __filbuf(FILE *);
1261 extern int __flsbuf(int, FILE *);
1262 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1263 
1264 /*
1265  * If feature test macros are set that enable interfaces that use types
1266  * defined in <sys/types.h>, get those types by doing the include.
1267  *
1268  * Note that in asking for the interfaces associated with this feature test
1269  * macro one also asks for definitions of the POSIX types.
1270  */
1271 
1272 /*
1273  * Allow global visibility for symbols defined in
1274  * C++ "std" namespace in <iso/stdio_iso.h>.
1275  */
1276 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1277 /*
1278  * This header needs to be included here because it relies on the global
1279  * visibility of FILE and size_t in the C++ environment.
1280  */
1281 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h" 1
1282 /*
1283  * CDDL HEADER START
1284  *
1285  * The contents of this file are subject to the terms of the
1286  * Common Development and Distribution License, Version 1.0 only
1287  * (the "License").  You may not use this file except in compliance
1288  * with the License.
1289  *
1290  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1291  * or http://www.opensolaris.org/os/licensing.
1292  * See the License for the specific language governing permissions
1293  * and limitations under the License.
1294  *
1295  * When distributing Covered Code, include this CDDL HEADER in each
1296  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1297  * If applicable, add the following below this CDDL HEADER, with the
1298  * fields enclosed by brackets "[]" replaced with your own identifying
1299  * information: Portions Copyright [yyyy] [name of copyright owner]
1300  *
1301  * CDDL HEADER END
1302  */
1303 /*
1304  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1305  *
1306  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1307  * Use is subject to license terms.
1308  */
1309 
1310 /*
1311  * An application should not include this header directly.  Instead it
1312  * should be included only through the inclusion of other Sun headers.
1313  *
1314  * The contents of this header is limited to identifiers specified in
1315  * the C99 standard and in conflict with the C++ implementation of the
1316  * standard header.  The C++ standard may adopt the C99 standard at
1317  * which point it is expected that the symbols included here will
1318  * become part of the C++ std namespace.
1319  */
1320 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1321 /*
1322  * The following have been added as a result of the ISO/IEC 9899:1999
1323  * standard. For a strictly conforming C application, visibility is
1324  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
1325  * For non-strictly conforming C applications, there are no restrictions
1326  * on the C namespace.
1327  */
1328 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1329 extern int vfscanf(FILE *, const char *, __va_list);
1330 extern int vscanf(const char *, __va_list);
1331 extern int vsscanf(const char *, const char *,
1332   __va_list);
1333 
1334 
1335 
1336 
1337 extern int snprintf(char *, size_t, const char *,
1338  ...);
1339 extern int vsnprintf(char *, size_t, const char *,
1340  __va_list);
1341 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1342 # 163 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1343 typedef __longlong_t off_t;
1344 
1345 
1346 
1347 
1348 
1349 typedef __longlong_t off64_t;
1350 # 179 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1351 typedef __longlong_t fpos64_t;
1352 
1353 
1354 
1355 /*
1356  * XPG4 requires that va_list be defined in <stdio.h> "as described in
1357  * <stdarg.h>".  ANSI-C and POSIX require that the namespace of <stdio.h>
1358  * not be polluted with this name.
1359  */
1360 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1361 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1362 # 213 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1363 extern unsigned char _sibuf[], _sobuf[];
1364 
1365 
1366 /* large file compilation environment setup */
1367 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1368 extern unsigned char *_bufendtab[];
1369 extern FILE *_lastbuf;
1370 
1371 
1372 /* In the LP64 compilation environment, all APIs are already large file */
1373 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1374 typedef int ssize_t; /* (historical version) */
1375 
1376 
1377 
1378 
1379 
1380 
1381 extern char *tmpnam_r(char *);
1382 
1383 
1384 
1385 
1386 extern int fcloseall(void);
1387 extern void setbuffer(FILE *, char *, size_t);
1388 extern int setlinebuf(FILE *);
1389 /* PRINTFLIKE2 */
1390 extern int asprintf(char **, const char *, ...);
1391 /* PRINTFLIKE2 */
1392 extern int vasprintf(char **, const char *, __va_list);
1393 
1394 
1395 
1396 
1397  /* || defined(_XPG7) */
1398 extern ssize_t getdelim(char **, size_t *,
1399  int, FILE *);
1400 extern ssize_t getline(char **, size_t *,
1401  FILE *);
1402 
1403 
1404 /*
1405  * The following are known to POSIX and XOPEN, but not to ANSI-C.
1406  */
1407 
1408 
1409 
1410 extern FILE *fdopen(int, const char *);
1411 extern char *ctermid(char *);
1412 extern int fileno(FILE *);
1413 
1414 
1415 
1416 /*
1417  * The following are known to POSIX.1c, but not to ANSI-C or XOPEN.
1418  */
1419 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1420 /*
1421  * The following are known to XOPEN, but not to ANSI-C or POSIX.
1422  */
1423 
1424 
1425 extern FILE *popen(const char *, const char *);
1426 extern char *tempnam(const char *, const char *);
1427 extern int pclose(FILE *);
1428 
1429 extern int getsubopt(char **, char *const *, char **);
1430 
1431 
1432 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1433 
1434 extern char *cuserid(char *);
1435 extern int getopt(int, char *const *, const char *);
1436 extern char *optarg;
1437 extern int optind, opterr, optopt;
1438 extern int getw(FILE *);
1439 extern int putw(int, FILE *);
1440 
1441 
1442 
1443 
1444 /*
1445  * The following are defined as part of the Large File Summit interfaces.
1446  */
1447 
1448 extern int fseeko(FILE *, off_t, int);
1449 extern off_t ftello(FILE *);
1450 
1451 
1452 /*
1453  * The following are defined as part of the transitional Large File Summit
1454  * interfaces.
1455  */
1456 
1457 
1458 extern FILE *fopen64(const char *, const char *);
1459 extern FILE *freopen64(const char *, const char *, FILE *);
1460 extern FILE *tmpfile64(void);
1461 extern int fgetpos64(FILE *, fpos64_t *);
1462 extern int fsetpos64(FILE *, const fpos64_t *);
1463 extern int fseeko64(FILE *, off64_t, int);
1464 extern off64_t ftello64(FILE *);
1465 
1466 
1467 /*
1468  * XPG7 symbols
1469  */
1470 
1471 extern FILE *fmemopen(void *, size_t,
1472       const char *);
1473 extern FILE *open_memstream(char **, size_t *);
1474 # 32 "main.c" 2
1475 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 1
1476 /*
1477  * CDDL HEADER START
1478  *
1479  * The contents of this file are subject to the terms of the
1480  * Common Development and Distribution License (the "License").
1481  * You may not use this file except in compliance with the License.
1482  *
1483  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1484  * or http://www.opensolaris.org/os/licensing.
1485  * See the License for the specific language governing permissions
1486  * and limitations under the License.
1487  *
1488  * When distributing Covered Code, include this CDDL HEADER in each
1489  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1490  * If applicable, add the following below this CDDL HEADER, with the
1491  * fields enclosed by brackets "[]" replaced with your own identifying
1492  * information: Portions Copyright [yyyy] [name of copyright owner]
1493  *
1494  * CDDL HEADER END
1495  */
1496 
1497 /*
1498  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1499  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
1500  */
1501 
1502 /*	Copyright (c) 1988 AT&T	*/
1503 /*	  All Rights Reserved  	*/
1504 
1505 
1506 
1507 
1508 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 1
1509 /*
1510  * CDDL HEADER START
1511  *
1512  * The contents of this file are subject to the terms of the
1513  * Common Development and Distribution License, Version 1.0 only
1514  * (the "License").  You may not use this file except in compliance
1515  * with the License.
1516  *
1517  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1518  * or http://www.opensolaris.org/os/licensing.
1519  * See the License for the specific language governing permissions
1520  * and limitations under the License.
1521  *
1522  * When distributing Covered Code, include this CDDL HEADER in each
1523  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1524  * If applicable, add the following below this CDDL HEADER, with the
1525  * fields enclosed by brackets "[]" replaced with your own identifying
1526  * information: Portions Copyright [yyyy] [name of copyright owner]
1527  *
1528  * CDDL HEADER END
1529  */
1530 /*	Copyright (c) 1988 AT&T	*/
1531 /*	  All Rights Reserved  	*/
1532 
1533 
1534 /*
1535  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1536  * Copyright 2014 PALO, Richard.
1537  *
1538  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1539  * Use is subject to license terms.
1540  */
1541 
1542 /*
1543  * An application should not include this header directly.  Instead it
1544  * should be included only through the inclusion of other Sun headers.
1545  *
1546  * The contents of this header is limited to identifiers specified in the
1547  * C Standard.  Any new identifiers specified in future amendments to the
1548  * C Standard must be placed in this header.  If these new identifiers
1549  * are required to also be in the C++ Standard "std" namespace, then for
1550  * anything other than macro definitions, corresponding "using" directives
1551  * must also be added to <string.h>.
1552  */
1553 
1554 
1555 
1556 
1557 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1558 /*
1559  * CDDL HEADER START
1560  *
1561  * The contents of this file are subject to the terms of the
1562  * Common Development and Distribution License (the "License").
1563  * You may not use this file except in compliance with the License.
1564  *
1565  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1566  * or http://www.opensolaris.org/os/licensing.
1567  * See the License for the specific language governing permissions
1568  * and limitations under the License.
1569  *
1570  * When distributing Covered Code, include this CDDL HEADER in each
1571  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1572  * If applicable, add the following below this CDDL HEADER, with the
1573  * fields enclosed by brackets "[]" replaced with your own identifying
1574  * information: Portions Copyright [yyyy] [name of copyright owner]
1575  *
1576  * CDDL HEADER END
1577  */
1578 
1579 /*
1580  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1581  * Copyright 2016 Joyent, Inc.
1582  *
1583  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1584  * Use is subject to license terms.
1585  */
1586 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
1587 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
1588 /*
1589  * This file and its contents are supplied under the terms of the
1590  * Common Development and Distribution License ("CDDL"), version 1.0.
1591  * You may only use this file in accordance with the terms of version
1592  * 1.0 of the CDDL.
1593  *
1594  * A full copy of the text of the CDDL should have accompanied this
1595  * source.  A copy of the CDDL is also available via the Internet at
1596  * http://www.illumos.org/license/CDDL.
1597  */
1598 
1599 /*
1600  * Copyright 2014-2016 PALO, Richard.
1601  */
1602 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
1603 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
1604 extern int memcmp(const void *, const void *, size_t);
1605 extern void *memcpy(void *, const void *, size_t);
1606 extern void *memmove(void *, const void *, size_t);
1607 extern void *memset(void *, int, size_t);
1608 extern char *strcat(char *, const char *);
1609 extern int strcmp(const char *, const char *);
1610 extern char *strcpy(char *, const char *);
1611 extern int strcoll(const char *, const char *);
1612 extern size_t strcspn(const char *, const char *);
1613 extern char *strerror(int);
1614 extern size_t strlen(const char *);
1615 extern char *strncat(char *, const char *, size_t);
1616 extern int strncmp(const char *, const char *, size_t);
1617 extern char *strncpy(char *, const char *, size_t);
1618 extern size_t strspn(const char *, const char *);
1619 extern char *strtok(char *, const char *);
1620 extern size_t strxfrm(char *, const char *, size_t);
1621 
1622 /*
1623  * The C++ Standard (ISO/IEC 14882:1998) specifies that each of the
1624  * function signatures for the following functions be replaced by
1625  * two declarations, both of which have the same behavior.
1626  */
1627 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
1628 extern void *memchr(const void *, int, size_t);
1629 extern char *strchr(const char *, int);
1630 extern char *strpbrk(const char *, const char *);
1631 extern char *strrchr(const char *, int);
1632 extern char *strstr(const char *, const char *);
1633 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 2
1634 
1635 /*
1636  * Allow global visibility for symbols defined in
1637  * C++ "std" namespace in <iso/string_iso.h>.
1638  */
1639 # 72 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h"
1640 extern int strerror_r(int, char *, size_t);
1641 
1642 
1643 
1644 
1645 
1646 extern char *strtok_r(char *, const char *,
1647  char **);
1648 
1649 
1650 
1651 
1652 extern void *memccpy(void *, const void *,
1653   int, size_t);
1654 
1655 
1656 
1657 
1658 extern char *stpcpy(char *, const char *);
1659 extern char *stpncpy(char *, const char *, size_t);
1660 extern char *strndup(const char *, size_t);
1661 extern size_t strnlen(const char *, size_t);
1662 extern char *strsignal(int);
1663 
1664 
1665 
1666 typedef struct _locale *locale_t;
1667 
1668 
1669 extern int strcoll_l(const char *, const char *, locale_t);
1670 extern size_t strxfrm_l(char *, const char *,
1671     size_t, locale_t);
1672 extern int strcasecmp_l(const char *, const char *, locale_t);
1673 extern int strncasecmp_l(const char *, const char *, size_t, locale_t);
1674 extern char *strerror_l(int, locale_t);
1675 
1676 
1677 
1678 
1679 
1680 /* Note that some of these are also declared in strings.h for XPG4_2+ */
1681 extern void explicit_bzero(void *, size_t);
1682 extern int uucopy(const void *, void *, size_t);
1683 extern int uucopystr(const void *, void *, size_t);
1684 extern int ffs(int);
1685 extern int ffsl(long);
1686 extern int ffsll(long long);
1687 extern int fls(int);
1688 extern int flsl(long);
1689 extern int flsll(long long);
1690 extern void *memmem(const void *, size_t, const void *, size_t);
1691 extern char *strcasestr(const char *, const char *);
1692 extern char *strnstr(const char *, const char *, size_t);
1693 extern size_t strlcpy(char *, const char *, size_t);
1694 extern size_t strlcat(char *, const char *, size_t);
1695 extern char *strsep(char **stringp, const char *delim);
1696 extern char *strchrnul(const char *, int);
1697 extern char *strcasestr_l(const char *, const char *, locale_t);
1698 extern int strcasecmp(const char *, const char *);
1699 extern int strncasecmp(const char *, const char *, size_t);
1700 
1701 
1702 
1703 
1704 
1705 extern char *strdup(const char *);
1706 
1707 
1708 
1709 
1710 
1711 
1712 /*
1713  * gcc provides this inlining facility but Studio C does not.
1714  * We should use it exclusively once Studio C also provides it.
1715  */
1716 extern void *__builtin_alloca(size_t);
1717 # 33 "main.c" 2
1718 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 1
1719 /*
1720  * CDDL HEADER START
1721  *
1722  * The contents of this file are subject to the terms of the
1723  * Common Development and Distribution License, Version 1.0 only
1724  * (the "License").  You may not use this file except in compliance
1725  * with the License.
1726  *
1727  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1728  * or http://www.opensolaris.org/os/licensing.
1729  * See the License for the specific language governing permissions
1730  * and limitations under the License.
1731  *
1732  * When distributing Covered Code, include this CDDL HEADER in each
1733  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1734  * If applicable, add the following below this CDDL HEADER, with the
1735  * fields enclosed by brackets "[]" replaced with your own identifying
1736  * information: Portions Copyright [yyyy] [name of copyright owner]
1737  *
1738  * CDDL HEADER END
1739  */
1740 /*	Copyright (c) 1988 AT&T	*/
1741 /*	  All Rights Reserved  	*/
1742 
1743 /*
1744  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1745  *
1746  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1747  * Use is subject to license terms.
1748  */
1749 
1750 
1751 
1752 
1753 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1754 /*
1755  * CDDL HEADER START
1756  *
1757  * The contents of this file are subject to the terms of the
1758  * Common Development and Distribution License (the "License").
1759  * You may not use this file except in compliance with the License.
1760  *
1761  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1762  * or http://www.opensolaris.org/os/licensing.
1763  * See the License for the specific language governing permissions
1764  * and limitations under the License.
1765  *
1766  * When distributing Covered Code, include this CDDL HEADER in each
1767  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1768  * If applicable, add the following below this CDDL HEADER, with the
1769  * fields enclosed by brackets "[]" replaced with your own identifying
1770  * information: Portions Copyright [yyyy] [name of copyright owner]
1771  *
1772  * CDDL HEADER END
1773  */
1774 
1775 /*
1776  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1777  * Copyright 2016 Joyent, Inc.
1778  *
1779  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1780  * Use is subject to license terms.
1781  */
1782 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
1783 
1784 
1785 
1786 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
1787 /*
1788  * CDDL HEADER START
1789  *
1790  * The contents of this file are subject to the terms of the
1791  * Common Development and Distribution License (the "License").
1792  * You may not use this file except in compliance with the License.
1793  *
1794  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1795  * or http://www.opensolaris.org/os/licensing.
1796  * See the License for the specific language governing permissions
1797  * and limitations under the License.
1798  *
1799  * When distributing Covered Code, include this CDDL HEADER in each
1800  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1801  * If applicable, add the following below this CDDL HEADER, with the
1802  * fields enclosed by brackets "[]" replaced with your own identifying
1803  * information: Portions Copyright [yyyy] [name of copyright owner]
1804  *
1805  * CDDL HEADER END
1806  */
1807 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
1808 /*	  All Rights Reserved  	*/
1809 
1810 
1811 /*
1812  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
1813  * Use is subject to license terms.
1814  *
1815  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
1816  * Copyright 2016 Joyent, Inc.
1817  */
1818 
1819 
1820 
1821 
1822 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1823 /*
1824  * CDDL HEADER START
1825  *
1826  * The contents of this file are subject to the terms of the
1827  * Common Development and Distribution License (the "License").
1828  * You may not use this file except in compliance with the License.
1829  *
1830  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1831  * or http://www.opensolaris.org/os/licensing.
1832  * See the License for the specific language governing permissions
1833  * and limitations under the License.
1834  *
1835  * When distributing Covered Code, include this CDDL HEADER in each
1836  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1837  * If applicable, add the following below this CDDL HEADER, with the
1838  * fields enclosed by brackets "[]" replaced with your own identifying
1839  * information: Portions Copyright [yyyy] [name of copyright owner]
1840  *
1841  * CDDL HEADER END
1842  */
1843 
1844 /*
1845  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1846  * Copyright 2016 Joyent, Inc.
1847  *
1848  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1849  * Use is subject to license terms.
1850  */
1851 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1852 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1853 /*
1854  * CDDL HEADER START
1855  *
1856  * The contents of this file are subject to the terms of the
1857  * Common Development and Distribution License (the "License").
1858  * You may not use this file except in compliance with the License.
1859  *
1860  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1861  * or http://www.opensolaris.org/os/licensing.
1862  * See the License for the specific language governing permissions
1863  * and limitations under the License.
1864  *
1865  *
1866  * When distributing Covered Code, include this CDDL HEADER in each
1867  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1868  * If applicable, add the following below this CDDL HEADER, with the
1869  * fields enclosed by brackets "[]" replaced with your own identifying
1870  * information: Portions Copyright [yyyy] [name of copyright owner]
1871  *
1872  * CDDL HEADER END
1873  */
1874 
1875 /*
1876  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1877  * Use is subject to license terms.
1878  * Copyright 2016 Joyent, Inc.
1879  */
1880 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1881 
1882 /*
1883  * Machine dependent definitions moved to <sys/machtypes.h>.
1884  */
1885 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 1
1886 /*
1887  * CDDL HEADER START
1888  *
1889  * The contents of this file are subject to the terms of the
1890  * Common Development and Distribution License, Version 1.0 only
1891  * (the "License").  You may not use this file except in compliance
1892  * with the License.
1893  *
1894  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1895  * or http://www.opensolaris.org/os/licensing.
1896  * See the License for the specific language governing permissions
1897  * and limitations under the License.
1898  *
1899  * When distributing Covered Code, include this CDDL HEADER in each
1900  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1901  * If applicable, add the following below this CDDL HEADER, with the
1902  * fields enclosed by brackets "[]" replaced with your own identifying
1903  * information: Portions Copyright [yyyy] [name of copyright owner]
1904  *
1905  * CDDL HEADER END
1906  */
1907 /*
1908  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1909  * Use is subject to license terms.
1910  */
1911 
1912 
1913 
1914 
1915 #pragma ident "%Z%%M%	%I%	%E% SMI"
1916 
1917 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1918 /*
1919  * CDDL HEADER START
1920  *
1921  * The contents of this file are subject to the terms of the
1922  * Common Development and Distribution License (the "License").
1923  * You may not use this file except in compliance with the License.
1924  *
1925  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1926  * or http://www.opensolaris.org/os/licensing.
1927  * See the License for the specific language governing permissions
1928  * and limitations under the License.
1929  *
1930  * When distributing Covered Code, include this CDDL HEADER in each
1931  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1932  * If applicable, add the following below this CDDL HEADER, with the
1933  * fields enclosed by brackets "[]" replaced with your own identifying
1934  * information: Portions Copyright [yyyy] [name of copyright owner]
1935  *
1936  * CDDL HEADER END
1937  */
1938 
1939 /*
1940  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1941  * Copyright 2016 Joyent, Inc.
1942  *
1943  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1944  * Use is subject to license terms.
1945  */
1946 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
1947 
1948 
1949 
1950 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h" 1
1951 /*
1952  * CDDL HEADER START
1953  *
1954  * The contents of this file are subject to the terms of the
1955  * Common Development and Distribution License (the "License").
1956  * You may not use this file except in compliance with the License.
1957  *
1958  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1959  * or http://www.opensolaris.org/os/licensing.
1960  * See the License for the specific language governing permissions
1961  * and limitations under the License.
1962  *
1963  * When distributing Covered Code, include this CDDL HEADER in each
1964  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1965  * If applicable, add the following below this CDDL HEADER, with the
1966  * fields enclosed by brackets "[]" replaced with your own identifying
1967  * information: Portions Copyright [yyyy] [name of copyright owner]
1968  *
1969  * CDDL HEADER END
1970  */
1971 /*
1972  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
1973  * Use is subject to license terms.
1974  */
1975 
1976 
1977 
1978 
1979 #pragma ident "%Z%%M%	%I%	%E% SMI"
1980 
1981 
1982 
1983 
1984 
1985 /*
1986  * Machine dependent types:
1987  *
1988  *	intel ia32 Version
1989  */
1990 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h"
1991 typedef struct _label_t { long val[6]; } label_t;
1992 
1993 
1994 
1995 typedef unsigned char lock_t; /* lock work for busy wait */
1996 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
1997 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1998 
1999 /*
2000  * Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
2001  * committee's working draft for the revision of the current ISO C standard,
2002  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
2003  * required by any standard but constitute a useful, general purpose set
2004  * of type definitions which is namespace clean with respect to all standards.
2005  */
2006 
2007 
2008 
2009 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
2010 /*
2011  * CDDL HEADER START
2012  *
2013  * The contents of this file are subject to the terms of the
2014  * Common Development and Distribution License, Version 1.0 only
2015  * (the "License").  You may not use this file except in compliance
2016  * with the License.
2017  *
2018  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2019  * or http://www.opensolaris.org/os/licensing.
2020  * See the License for the specific language governing permissions
2021  * and limitations under the License.
2022  *
2023  * When distributing Covered Code, include this CDDL HEADER in each
2024  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2025  * If applicable, add the following below this CDDL HEADER, with the
2026  * fields enclosed by brackets "[]" replaced with your own identifying
2027  * information: Portions Copyright [yyyy] [name of copyright owner]
2028  *
2029  * CDDL HEADER END
2030  */
2031 /*
2032  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2033  *
2034  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2035  * Use is subject to license terms.
2036  */
2037 
2038 
2039 
2040 
2041 /*
2042  * This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
2043  * of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
2044  * Programming language - C.
2045  *
2046  * Programs/Modules should not directly include this file.  Access to the
2047  * types defined in this file should be through the inclusion of one of the
2048  * following files:
2049  *
2050  *	<sys/types.h>		Provides only the "_t" types defined in this
2051  *				file which is a subset of the contents of
2052  *				<inttypes.h>.  (This can be appropriate for
2053  *				all programs/modules except those claiming
2054  *				ANSI-C conformance.)
2055  *
2056  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
2057  *				components of <inttypes.h>.
2058  *
2059  *	<inttypes.h>		For use by applications.
2060  *
2061  * See these files for more details.
2062  */
2063 
2064 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2065 /*
2066  * CDDL HEADER START
2067  *
2068  * The contents of this file are subject to the terms of the
2069  * Common Development and Distribution License (the "License").
2070  * You may not use this file except in compliance with the License.
2071  *
2072  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2073  * or http://www.opensolaris.org/os/licensing.
2074  * See the License for the specific language governing permissions
2075  * and limitations under the License.
2076  *
2077  * When distributing Covered Code, include this CDDL HEADER in each
2078  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2079  * If applicable, add the following below this CDDL HEADER, with the
2080  * fields enclosed by brackets "[]" replaced with your own identifying
2081  * information: Portions Copyright [yyyy] [name of copyright owner]
2082  *
2083  * CDDL HEADER END
2084  */
2085 
2086 /*
2087  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2088  * Copyright 2016 Joyent, Inc.
2089  *
2090  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2091  * Use is subject to license terms.
2092  */
2093 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 2
2094 
2095 
2096 
2097 
2098 
2099 /*
2100  * Basic / Extended integer types
2101  *
2102  * The following defines the basic fixed-size integer types.
2103  *
2104  * Implementations are free to typedef them to Standard C integer types or
2105  * extensions that they support. If an implementation does not support one
2106  * of the particular integer data types below, then it should not define the
2107  * typedefs and macros corresponding to that data type.  Note that int8_t
2108  * is not defined in -Xs mode on ISAs for which the ABI specifies "char"
2109  * as an unsigned entity because there is no way to define an eight bit
2110  * signed integral.
2111  */
2112 
2113 typedef char int8_t;
2114 
2115 
2116 
2117 typedef short int16_t;
2118 typedef int int32_t;
2119 
2120 
2121 
2122 
2123 
2124 
2125 typedef long long int64_t;
2126 
2127 
2128 
2129 typedef unsigned char uint8_t;
2130 typedef unsigned short uint16_t;
2131 typedef unsigned int uint32_t;
2132 
2133 
2134 
2135 
2136 typedef unsigned long long uint64_t;
2137 
2138 
2139 
2140 /*
2141  * intmax_t and uintmax_t are to be the longest (in number of bits) signed
2142  * and unsigned integer types supported by the implementation.
2143  */
2144 
2145 typedef int64_t intmax_t;
2146 typedef uint64_t uintmax_t;
2147 
2148 
2149 
2150 
2151 
2152 /*
2153  * intptr_t and uintptr_t are signed and unsigned integer types large enough
2154  * to hold any data pointer; that is, data pointers can be assigned into or
2155  * from these integer types without losing precision.
2156  */
2157 
2158 
2159 
2160 
2161 typedef int intptr_t;
2162 typedef unsigned int uintptr_t;
2163 
2164 
2165 /*
2166  * The following define the fastest integer types that can hold the
2167  * specified number of bits.
2168  */
2169 
2170 typedef char int_fast8_t;
2171 
2172 
2173 
2174 typedef int int_fast16_t;
2175 typedef int int_fast32_t;
2176 
2177 
2178 
2179 
2180 typedef long long int_fast64_t;
2181 
2182 
2183 
2184 typedef unsigned char uint_fast8_t;
2185 typedef unsigned int uint_fast16_t;
2186 typedef unsigned int uint_fast32_t;
2187 
2188 
2189 
2190 
2191 typedef unsigned long long uint_fast64_t;
2192 
2193 
2194 
2195 /*
2196  * The following define the smallest integer types that can hold the
2197  * specified number of bits.
2198  */
2199 
2200 typedef char int_least8_t;
2201 
2202 
2203 
2204 typedef short int_least16_t;
2205 typedef int int_least32_t;
2206 
2207 
2208 
2209 
2210 typedef long long int_least64_t;
2211 
2212 
2213 
2214 /*
2215  * If these are changed, please update char16_t and char32_t in head/uchar.h.
2216  */
2217 typedef unsigned char uint_least8_t;
2218 typedef unsigned short uint_least16_t;
2219 typedef unsigned int uint_least32_t;
2220 
2221 
2222 
2223 
2224 typedef unsigned long long uint_least64_t;
2225 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
2226 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2227 /*
2228  * Strictly conforming ANSI C environments prior to the 1999
2229  * revision of the C Standard (ISO/IEC 9899:1999) do not have
2230  * the long long data type.
2231  */
2232 
2233 typedef long long longlong_t;
2234 typedef unsigned long long u_longlong_t;
2235 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2236 /*
2237  * These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
2238  * to use them instead of int32_t and uint32_t because DEC had
2239  * shipped 64-bit wide.
2240  */
2241 
2242 
2243 
2244 
2245 typedef long t_scalar_t; /* historical versions */
2246 typedef unsigned long t_uscalar_t;
2247 
2248 
2249 /*
2250  * POSIX Extensions
2251  */
2252 typedef unsigned char uchar_t;
2253 typedef unsigned short ushort_t;
2254 typedef unsigned int uint_t;
2255 typedef unsigned long ulong_t;
2256 
2257 typedef char *caddr_t; /* ?<core address> type */
2258 typedef long daddr_t; /* <disk address> type */
2259 typedef short cnt_t; /* ?<count> type */
2260 
2261 
2262 
2263 
2264 
2265 
2266 typedef int ptrdiff_t; /* (historical version) */
2267 
2268 
2269 
2270 /*
2271  * VM-related types
2272  */
2273 typedef ulong_t pfn_t; /* page frame number */
2274 typedef ulong_t pgcnt_t; /* number of pages */
2275 typedef long spgcnt_t; /* signed number of pages */
2276 
2277 typedef uchar_t use_t; /* use count for swap.  */
2278 typedef short sysid_t;
2279 typedef short index_t;
2280 typedef void *timeout_id_t; /* opaque handle from timeout(9F) */
2281 typedef void *bufcall_id_t; /* opaque handle from bufcall(9F) */
2282 
2283 /*
2284  * The size of off_t and related types depends on the setting of
2285  * _FILE_OFFSET_BITS.  (Note that other system headers define other types
2286  * related to those defined here.)
2287  *
2288  * If _LARGEFILE64_SOURCE is defined, variants of these types that are
2289  * explicitly 64 bits wide become available.
2290  */
2291 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2292 typedef u_longlong_t ino_t; /* expanded inode type	*/
2293 typedef longlong_t blkcnt_t; /* count of file blocks */
2294 typedef u_longlong_t fsblkcnt_t; /* count of file system blocks */
2295 typedef u_longlong_t fsfilcnt_t; /* count of files */
2296 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2297 typedef u_longlong_t ino64_t; /* expanded inode type	*/
2298 typedef longlong_t blkcnt64_t; /* count of file blocks */
2299 typedef u_longlong_t fsblkcnt64_t; /* count of file system blocks */
2300 typedef u_longlong_t fsfilcnt64_t; /* count of files */
2301 
2302 
2303 
2304 
2305 
2306 
2307 typedef long blksize_t; /* used for block sizes */
2308 
2309 
2310 
2311 
2312 
2313 typedef enum { B_FALSE, B_TRUE } boolean_t;
2314 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2315 /*
2316  * The {u,}pad64_t types can be used in structures such that those structures
2317  * may be accessed by code produced by compilation environments which don't
2318  * support a 64 bit integral datatype.  The intention is not to allow
2319  * use of these fields in such environments, but to maintain the alignment
2320  * and offsets of the structure.
2321  *
2322  * Similar comments for {u,}pad128_t.
2323  *
2324  * Note that these types do NOT generate any stronger alignment constraints
2325  * than those available in the underlying ABI.  See <sys/isa_defs.h>
2326  */
2327 
2328 typedef int64_t pad64_t;
2329 typedef uint64_t upad64_t;
2330 # 232 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2331 typedef union {
2332  long double _q;
2333  int32_t _l[4];
2334 } pad128_t;
2335 
2336 typedef union {
2337  long double _q;
2338  uint32_t _l[4];
2339 } upad128_t;
2340 
2341 typedef longlong_t offset_t;
2342 typedef u_longlong_t u_offset_t;
2343 typedef u_longlong_t len_t;
2344 typedef u_longlong_t diskaddr_t;
2345 
2346 
2347 
2348 
2349 /*
2350  * Definitions remaining from previous partial support for 64-bit file
2351  * offsets.  This partial support for devices greater than 2gb requires
2352  * compiler support for long long.
2353  */
2354 
2355 typedef union {
2356  offset_t _f; /* Full 64 bit offset value */
2357  struct {
2358   int32_t _l; /* lower 32 bits of offset value */
2359   int32_t _u; /* upper 32 bits of offset value */
2360  } _p;
2361 } lloff_t;
2362 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2363 typedef union {
2364  longlong_t _f; /* Full 64 bit disk address value */
2365  struct {
2366   int32_t _l; /* lower 32 bits of disk address value */
2367   int32_t _u; /* upper 32 bits of disk address value */
2368  } _p;
2369 } lldaddr_t;
2370 # 295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2371 typedef uint_t k_fltset_t; /* kernel fault set type */
2372 
2373 /*
2374  * The following type is for various kinds of identifiers.  The
2375  * actual type must be the same for all since some system calls
2376  * (such as sigsend) take arguments that may be any of these
2377  * types.  The enumeration type idtype_t defined in sys/procset.h
2378  * is used to indicate what type of id is being specified --
2379  * a process id, process group id, session id, scheduling class id,
2380  * user id, group id, project id, task id or zone id.
2381  */
2382 
2383 
2384 
2385 typedef long id_t; /* (historical version) */
2386 
2387 
2388 typedef id_t lgrp_id_t; /* lgroup ID */
2389 
2390 /*
2391  * Type useconds_t is an unsigned integral type capable of storing
2392  * values at least in the range of zero to 1,000,000.
2393  */
2394 typedef uint_t useconds_t; /* Time, in microseconds */
2395 
2396 
2397 
2398 typedef long suseconds_t; /* signed # of microseconds */
2399 
2400 
2401 /*
2402  * Typedefs for dev_t components.
2403  */
2404 
2405 
2406 
2407 
2408 typedef ulong_t major_t; /* (historical version) */
2409 typedef ulong_t minor_t; /* (historical version) */
2410 
2411 
2412 /*
2413  * The data type of a thread priority.
2414  */
2415 typedef short pri_t;
2416 
2417 /*
2418  * The data type for a CPU flags field.  (Can be extended to larger unsigned
2419  * types, if needed, limited by ability to update atomically.)
2420  */
2421 typedef ushort_t cpu_flag_t;
2422 
2423 /*
2424  * For compatibility reasons the following typedefs (prefixed o_)
2425  * can't grow regardless of the EFT definition. Although,
2426  * applications should not explicitly use these typedefs
2427  * they may be included via a system header definition.
2428  * WARNING: These typedefs may be removed in a future
2429  * release.
2430  *		ex. the definitions in s5inode.h (now obsoleted)
2431  *			remained small to preserve compatibility
2432  *			in the S5 file system type.
2433  */
2434 typedef ushort_t o_mode_t; /* old file attribute type */
2435 typedef short o_dev_t; /* old device type	*/
2436 typedef ushort_t o_uid_t; /* old UID type		*/
2437 typedef o_uid_t o_gid_t; /* old GID type		*/
2438 typedef short o_nlink_t; /* old file link type	*/
2439 typedef short o_pid_t; /* old process id type	*/
2440 typedef ushort_t o_ino_t; /* old inode type	*/
2441 
2442 
2443 /*
2444  * POSIX and XOPEN Declarations
2445  */
2446 typedef int key_t; /* IPC key type		*/
2447 
2448 
2449 
2450 typedef ulong_t mode_t; /* (historical version) */
2451 
2452 
2453 
2454 
2455 typedef unsigned int uid_t; /* UID type		*/
2456 
2457 
2458 typedef uid_t gid_t; /* GID type		*/
2459 
2460 typedef uint32_t datalink_id_t;
2461 typedef uint32_t vrid_t;
2462 
2463 typedef id_t taskid_t;
2464 typedef id_t projid_t;
2465 typedef id_t poolid_t;
2466 typedef id_t zoneid_t;
2467 typedef id_t ctid_t;
2468 
2469 /*
2470  * POSIX definitions are same as defined in thread.h and synch.h.
2471  * Any changes made to here should be reflected in corresponding
2472  * files as described in comments.
2473  */
2474 typedef uint_t pthread_t; /* = thread_t in thread.h */
2475 typedef uint_t pthread_key_t; /* = thread_key_t in thread.h */
2476 
2477 /* "Magic numbers" tagging synchronization object types */
2478 
2479 
2480 
2481 
2482 
2483 typedef struct _pthread_mutex { /* = mutex_t in synch.h */
2484  struct {
2485   uint16_t __pthread_mutex_flag1;
2486   uint8_t __pthread_mutex_flag2;
2487   uint8_t __pthread_mutex_ceiling;
2488   uint16_t __pthread_mutex_type;
2489   uint16_t __pthread_mutex_magic;
2490  } __pthread_mutex_flags;
2491  union {
2492   struct {
2493    uint8_t __pthread_mutex_pad[8];
2494   } __pthread_mutex_lock64;
2495   struct {
2496    uint32_t __pthread_ownerpid;
2497    uint32_t __pthread_lockword;
2498   } __pthread_mutex_lock32;
2499   upad64_t __pthread_mutex_owner64;
2500  } __pthread_mutex_lock;
2501  upad64_t __pthread_mutex_data;
2502 } pthread_mutex_t;
2503 
2504 typedef struct _pthread_cond { /* = cond_t in synch.h */
2505  struct {
2506   uint8_t __pthread_cond_flag[4];
2507   uint16_t __pthread_cond_type;
2508   uint16_t __pthread_cond_magic;
2509  } __pthread_cond_flags;
2510  upad64_t __pthread_cond_data;
2511 } pthread_cond_t;
2512 
2513 /*
2514  * UNIX 98 Extension
2515  */
2516 typedef struct _pthread_rwlock { /* = rwlock_t in synch.h */
2517  int32_t __pthread_rwlock_readers;
2518  uint16_t __pthread_rwlock_type;
2519  uint16_t __pthread_rwlock_magic;
2520  pthread_mutex_t __pthread_rwlock_mutex;
2521  pthread_cond_t __pthread_rwlock_readercv;
2522  pthread_cond_t __pthread_rwlock_writercv;
2523 } pthread_rwlock_t;
2524 
2525 /*
2526  * SUSV3
2527  */
2528 typedef struct {
2529  uint32_t __pthread_barrier_count;
2530  uint32_t __pthread_barrier_current;
2531  upad64_t __pthread_barrier_cycle;
2532  upad64_t __pthread_barrier_reserved;
2533  pthread_mutex_t __pthread_barrier_lock;
2534  pthread_cond_t __pthread_barrier_cond;
2535 } pthread_barrier_t;
2536 
2537 typedef pthread_mutex_t pthread_spinlock_t;
2538 
2539 /*
2540  * attributes for threads, dynamically allocated by library
2541  */
2542 typedef struct _pthread_attr {
2543  void *__pthread_attrp;
2544 } pthread_attr_t;
2545 
2546 /*
2547  * attributes for mutex, dynamically allocated by library
2548  */
2549 typedef struct _pthread_mutexattr {
2550  void *__pthread_mutexattrp;
2551 } pthread_mutexattr_t;
2552 
2553 /*
2554  * attributes for cond, dynamically allocated by library
2555  */
2556 typedef struct _pthread_condattr {
2557  void *__pthread_condattrp;
2558 } pthread_condattr_t;
2559 
2560 /*
2561  * pthread_once
2562  */
2563 typedef struct _once {
2564  upad64_t __pthread_once_pad[4];
2565 } pthread_once_t;
2566 
2567 /*
2568  * UNIX 98 Extensions
2569  * attributes for rwlock, dynamically allocated by library
2570  */
2571 typedef struct _pthread_rwlockattr {
2572  void *__pthread_rwlockattrp;
2573 } pthread_rwlockattr_t;
2574 
2575 /*
2576  * SUSV3
2577  * attributes for pthread_barrier_t, dynamically allocated by library
2578  */
2579 typedef struct {
2580  void *__pthread_barrierattrp;
2581 } pthread_barrierattr_t;
2582 
2583 typedef ulong_t dev_t; /* expanded device type */
2584 
2585 
2586 
2587 
2588 
2589 typedef ulong_t nlink_t; /* (historical version) */
2590 typedef long pid_t; /* (historical version) */
2591 # 537 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2592 typedef long time_t; /* time of day in seconds */
2593 
2594 
2595 
2596 
2597 typedef long clock_t; /* relative time in a specified resolution */
2598 
2599 
2600 
2601 
2602 typedef int clockid_t; /* clock identifier type */
2603 
2604 
2605 
2606 
2607 typedef int timer_t; /* timer identifier type */
2608 
2609 
2610 
2611 
2612 /* BEGIN CSTYLED */
2613 typedef unsigned char unchar;
2614 typedef unsigned short ushort;
2615 typedef unsigned int uint;
2616 typedef unsigned long ulong;
2617 /* END CSTYLED */
2618 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2619 /*
2620  * The following is the value of type id_t to use to indicate the
2621  * caller's current id.  See procset.h for the type idtype_t
2622  * which defines which kind of id is being specified.
2623  */
2624 # 620 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2625 /*
2626  * The following value of type pfn_t is used to indicate
2627  * invalid page frame number.
2628  */
2629 
2630 
2631 
2632 /* BEGIN CSTYLED */
2633 typedef unsigned char u_char;
2634 typedef unsigned short u_short;
2635 typedef unsigned int u_int;
2636 typedef unsigned long u_long;
2637 typedef struct _quad { int val[2]; } quad_t; /* used by UFS */
2638 typedef quad_t quad; /* used by UFS */
2639 /* END CSTYLED */
2640 
2641 /*
2642  * Nested include for BSD/sockets source compatibility.
2643  * (The select macros used to be defined here).
2644  */
2645 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
2646 /*
2647  * CDDL HEADER START
2648  *
2649  * The contents of this file are subject to the terms of the
2650  * Common Development and Distribution License (the "License").
2651  * You may not use this file except in compliance with the License.
2652  *
2653  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2654  * or http://www.opensolaris.org/os/licensing.
2655  * See the License for the specific language governing permissions
2656  * and limitations under the License.
2657  *
2658  * When distributing Covered Code, include this CDDL HEADER in each
2659  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2660  * If applicable, add the following below this CDDL HEADER, with the
2661  * fields enclosed by brackets "[]" replaced with your own identifying
2662  * information: Portions Copyright [yyyy] [name of copyright owner]
2663  *
2664  * CDDL HEADER END
2665  */
2666 
2667 /*
2668  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2669  *
2670  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2671  *
2672  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
2673  * Use is subject to license terms.
2674  */
2675 
2676 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2677 /*	  All Rights Reserved	*/
2678 
2679 /*
2680  * University Copyright- Copyright (c) 1982, 1986, 1988
2681  * The Regents of the University of California
2682  * All Rights Reserved
2683  *
2684  * University Acknowledgment- Portions of this document are derived from
2685  * software developed by the University of California, Berkeley, and its
2686  * contributors.
2687  */
2688 
2689 
2690 
2691 
2692 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2693 /*
2694  * CDDL HEADER START
2695  *
2696  * The contents of this file are subject to the terms of the
2697  * Common Development and Distribution License (the "License").
2698  * You may not use this file except in compliance with the License.
2699  *
2700  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2701  * or http://www.opensolaris.org/os/licensing.
2702  * See the License for the specific language governing permissions
2703  * and limitations under the License.
2704  *
2705  * When distributing Covered Code, include this CDDL HEADER in each
2706  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2707  * If applicable, add the following below this CDDL HEADER, with the
2708  * fields enclosed by brackets "[]" replaced with your own identifying
2709  * information: Portions Copyright [yyyy] [name of copyright owner]
2710  *
2711  * CDDL HEADER END
2712  */
2713 
2714 /*
2715  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2716  * Copyright 2016 Joyent, Inc.
2717  *
2718  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2719  * Use is subject to license terms.
2720  */
2721 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
2722 
2723 
2724 
2725 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
2726 /*
2727  * CDDL HEADER START
2728  *
2729  * The contents of this file are subject to the terms of the
2730  * Common Development and Distribution License, Version 1.0 only
2731  * (the "License").  You may not use this file except in compliance
2732  * with the License.
2733  *
2734  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2735  * or http://www.opensolaris.org/os/licensing.
2736  * See the License for the specific language governing permissions
2737  * and limitations under the License.
2738  *
2739  * When distributing Covered Code, include this CDDL HEADER in each
2740  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2741  * If applicable, add the following below this CDDL HEADER, with the
2742  * fields enclosed by brackets "[]" replaced with your own identifying
2743  * information: Portions Copyright [yyyy] [name of copyright owner]
2744  *
2745  * CDDL HEADER END
2746  */
2747 /*
2748  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
2749  * Use is subject to license terms.
2750  */
2751 
2752 /*
2753  * Implementation-private.  This header should not be included
2754  * directly by an application.  The application should instead
2755  * include <time.h> which includes this header conditionally
2756  * depending on which feature test macros are defined. By default,
2757  * this header is included by <time.h>.  X/Open and POSIX
2758  * standards requirements result in this header being included
2759  * by <time.h> only under a restricted set of conditions.
2760  */
2761 
2762 
2763 
2764 
2765 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2766 /*
2767  * CDDL HEADER START
2768  *
2769  * The contents of this file are subject to the terms of the
2770  * Common Development and Distribution License (the "License").
2771  * You may not use this file except in compliance with the License.
2772  *
2773  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2774  * or http://www.opensolaris.org/os/licensing.
2775  * See the License for the specific language governing permissions
2776  * and limitations under the License.
2777  *
2778  * When distributing Covered Code, include this CDDL HEADER in each
2779  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2780  * If applicable, add the following below this CDDL HEADER, with the
2781  * fields enclosed by brackets "[]" replaced with your own identifying
2782  * information: Portions Copyright [yyyy] [name of copyright owner]
2783  *
2784  * CDDL HEADER END
2785  */
2786 
2787 /*
2788  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2789  * Copyright 2016 Joyent, Inc.
2790  *
2791  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2792  * Use is subject to license terms.
2793  */
2794 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 2
2795 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
2796 /*
2797  * Time expressed in seconds and nanoseconds
2798  */
2799 
2800 typedef struct timespec { /* definition per POSIX.4 */
2801  time_t tv_sec; /* seconds */
2802  long tv_nsec; /* and nanoseconds */
2803 } timespec_t;
2804 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
2805 typedef struct timespec timestruc_t; /* definition per SVr4 */
2806 
2807 /*
2808  * The following has been left in for backward compatibility. Portable
2809  * applications should not use the structure name timestruc.
2810  */
2811 
2812 
2813 
2814 
2815 
2816 /*
2817  * Timer specification
2818  */
2819 typedef struct itimerspec { /* definition per POSIX.4 */
2820  struct timespec it_interval; /* timer period */
2821  struct timespec it_value; /* timer expiration */
2822 } itimerspec_t;
2823 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
2824 
2825 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
2826 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2827 /*	  All Rights Reserved  	*/
2828 
2829 
2830 /*
2831  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
2832  * All rights reserved.  The Berkeley software License Agreement
2833  * specifies the terms and conditions for redistribution.
2834  */
2835 
2836 /*
2837  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2838  *
2839  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2840  * Use is subject to license terms.
2841  *
2842  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2843  */
2844 
2845 /*
2846  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
2847  */
2848 
2849 
2850 
2851 
2852 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2853 /*
2854  * CDDL HEADER START
2855  *
2856  * The contents of this file are subject to the terms of the
2857  * Common Development and Distribution License (the "License").
2858  * You may not use this file except in compliance with the License.
2859  *
2860  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2861  * or http://www.opensolaris.org/os/licensing.
2862  * See the License for the specific language governing permissions
2863  * and limitations under the License.
2864  *
2865  * When distributing Covered Code, include this CDDL HEADER in each
2866  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2867  * If applicable, add the following below this CDDL HEADER, with the
2868  * fields enclosed by brackets "[]" replaced with your own identifying
2869  * information: Portions Copyright [yyyy] [name of copyright owner]
2870  *
2871  * CDDL HEADER END
2872  */
2873 
2874 /*
2875  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2876  * Copyright 2016 Joyent, Inc.
2877  *
2878  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2879  * Use is subject to license terms.
2880  */
2881 # 28 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2882 
2883 /*
2884  * Structure returned by gettimeofday(2) system call,
2885  * and used in other calls.
2886  */
2887 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2888 struct timeval {
2889  time_t tv_sec; /* seconds */
2890  suseconds_t tv_usec; /* and microseconds */
2891 };
2892 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2893 struct timezone {
2894  int tz_minuteswest; /* minutes west of Greenwich */
2895  int tz_dsttime; /* type of dst correction */
2896 };
2897 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2898 /*
2899  * Needed for longlong_t type.  Placement of this due to <sys/types.h>
2900  * including <sys/select.h> which relies on the presense of the itimerval
2901  * structure.
2902  */
2903 
2904 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
2905 /*
2906  * CDDL HEADER START
2907  *
2908  * The contents of this file are subject to the terms of the
2909  * Common Development and Distribution License (the "License").
2910  * You may not use this file except in compliance with the License.
2911  *
2912  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2913  * or http://www.opensolaris.org/os/licensing.
2914  * See the License for the specific language governing permissions
2915  * and limitations under the License.
2916  *
2917  * When distributing Covered Code, include this CDDL HEADER in each
2918  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2919  * If applicable, add the following below this CDDL HEADER, with the
2920  * fields enclosed by brackets "[]" replaced with your own identifying
2921  * information: Portions Copyright [yyyy] [name of copyright owner]
2922  *
2923  * CDDL HEADER END
2924  */
2925 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2926 /*	  All Rights Reserved  	*/
2927 
2928 
2929 /*
2930  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2931  * Use is subject to license terms.
2932  *
2933  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2934  * Copyright 2016 Joyent, Inc.
2935  */
2936 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2937 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2938 /*
2939  * Operations on timevals.
2940  */
2941 # 193 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2942 /*
2943  * Names of the interval timers, and structure
2944  * defining a timer setting.
2945  */
2946 
2947 
2948 
2949     /* time and when system is running on */
2950     /* behalf of the process. */
2951 
2952     /* time profiling of multithreaded */
2953     /* programs. */
2954 
2955 
2956 struct itimerval {
2957  struct timeval it_interval; /* timer interval */
2958  struct timeval it_value; /* current value */
2959 };
2960 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2961 /*
2962  *	Definitions for commonly used resolutions.
2963  */
2964 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2965 /*
2966  * Time expressed as a 64-bit nanosecond counter.
2967  */
2968 typedef longlong_t hrtime_t;
2969 # 386 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2970 int adjtime(struct timeval *, struct timeval *);
2971 
2972 
2973 
2974 
2975 int futimesat(int, const char *, const struct timeval *);
2976 
2977 
2978 
2979 
2980 
2981 int getitimer(int, struct itimerval *);
2982 int utimes(const char *, const struct timeval *);
2983 
2984 
2985 
2986 
2987 int setitimer(int, struct itimerval *,
2988  struct itimerval *);
2989 
2990 
2991 
2992 
2993 /*
2994  * gettimeofday() and settimeofday() were included in SVr4 due to their
2995  * common use in BSD based applications.  They were to be included exactly
2996  * as in BSD, with two parameters.  However, AT&T/USL noted that the second
2997  * parameter was unused and deleted it, thereby making a routine included
2998  * for compatibility, incompatible.
2999  *
3000  * XSH4.2 (spec 1170) defines gettimeofday and settimeofday to have two
3001  * parameters.
3002  *
3003  * This has caused general disagreement in the application community as to
3004  * the syntax of these routines.  Solaris defaults to the XSH4.2 definition.
3005  * The flag _SVID_GETTOD may be used to force the SVID version.
3006  */
3007 
3008 
3009 
3010 
3011 
3012 int settimeofday(struct timeval *, void *);
3013 
3014 hrtime_t gethrtime(void);
3015 hrtime_t gethrvtime(void);
3016 # 441 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3017 int gettimeofday(struct timeval *, void *);
3018 
3019 
3020 
3021 
3022 /*
3023  * The inclusion of <time.h> is historical and was added for
3024  * backward compatibility in delta 1.2 when a number of definitions
3025  * were moved out of <sys/time.h>.  More recently, the timespec and
3026  * itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
3027  * _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
3028  * which is now included by <time.h>.  This change was due to POSIX
3029  * 1003.1b-1993 and X/Open UNIX 98 requirements.  For non-POSIX and
3030  * non-X/Open applications, including this header will still make
3031  * visible these definitions.
3032  */
3033 
3034 
3035 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
3036 /*
3037  * CDDL HEADER START
3038  *
3039  * The contents of this file are subject to the terms of the
3040  * Common Development and Distribution License (the "License").
3041  * You may not use this file except in compliance with the License.
3042  *
3043  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3044  * or http://www.opensolaris.org/os/licensing.
3045  * See the License for the specific language governing permissions
3046  * and limitations under the License.
3047  *
3048  * When distributing Covered Code, include this CDDL HEADER in each
3049  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3050  * If applicable, add the following below this CDDL HEADER, with the
3051  * fields enclosed by brackets "[]" replaced with your own identifying
3052  * information: Portions Copyright [yyyy] [name of copyright owner]
3053  *
3054  * CDDL HEADER END
3055  */
3056 /*	Copyright (c) 1988 AT&T	*/
3057 /*	  All Rights Reserved  	*/
3058 
3059 
3060 /*
3061  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3062  *
3063  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
3064  * Use is subject to license terms.
3065  */
3066 /*
3067  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
3068  * Copyright 2016 Joyent, Inc.
3069  */
3070 
3071 
3072 
3073 
3074 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3075 /*
3076  * CDDL HEADER START
3077  *
3078  * The contents of this file are subject to the terms of the
3079  * Common Development and Distribution License (the "License").
3080  * You may not use this file except in compliance with the License.
3081  *
3082  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3083  * or http://www.opensolaris.org/os/licensing.
3084  * See the License for the specific language governing permissions
3085  * and limitations under the License.
3086  *
3087  * When distributing Covered Code, include this CDDL HEADER in each
3088  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3089  * If applicable, add the following below this CDDL HEADER, with the
3090  * fields enclosed by brackets "[]" replaced with your own identifying
3091  * information: Portions Copyright [yyyy] [name of copyright owner]
3092  *
3093  * CDDL HEADER END
3094  */
3095 
3096 /*
3097  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3098  * Copyright 2016 Joyent, Inc.
3099  *
3100  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3101  * Use is subject to license terms.
3102  */
3103 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3104 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 1
3105 /*
3106  * CDDL HEADER START
3107  *
3108  * The contents of this file are subject to the terms of the
3109  * Common Development and Distribution License, Version 1.0 only
3110  * (the "License").  You may not use this file except in compliance
3111  * with the License.
3112  *
3113  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3114  * or http://www.opensolaris.org/os/licensing.
3115  * See the License for the specific language governing permissions
3116  * and limitations under the License.
3117  *
3118  * When distributing Covered Code, include this CDDL HEADER in each
3119  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3120  * If applicable, add the following below this CDDL HEADER, with the
3121  * fields enclosed by brackets "[]" replaced with your own identifying
3122  * information: Portions Copyright [yyyy] [name of copyright owner]
3123  *
3124  * CDDL HEADER END
3125  */
3126 /*	Copyright (c) 1988 AT&T	*/
3127 /*	  All Rights Reserved  	*/
3128 
3129 /*
3130  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3131  * Copyright 2014 PALO, Richard.
3132  *
3133  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3134  * Use is subject to license terms.
3135  */
3136 
3137 /*
3138  * An application should not include this header directly.  Instead it
3139  * should be included only through the inclusion of other Sun headers.
3140  *
3141  * The contents of this header is limited to identifiers specified in the
3142  * C Standard.  Any new identifiers specified in future amendments to the
3143  * C Standard must be placed in this header.  If these new identifiers
3144  * are required to also be in the C++ Standard "std" namespace, then for
3145  * anything other than macro definitions, corresponding "using" directives
3146  * must also be added to <time.h.h>.
3147  */
3148 
3149 
3150 
3151 
3152 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3153 /*
3154  * CDDL HEADER START
3155  *
3156  * The contents of this file are subject to the terms of the
3157  * Common Development and Distribution License (the "License").
3158  * You may not use this file except in compliance with the License.
3159  *
3160  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3161  * or http://www.opensolaris.org/os/licensing.
3162  * See the License for the specific language governing permissions
3163  * and limitations under the License.
3164  *
3165  * When distributing Covered Code, include this CDDL HEADER in each
3166  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3167  * If applicable, add the following below this CDDL HEADER, with the
3168  * fields enclosed by brackets "[]" replaced with your own identifying
3169  * information: Portions Copyright [yyyy] [name of copyright owner]
3170  *
3171  * CDDL HEADER END
3172  */
3173 
3174 /*
3175  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3176  * Copyright 2016 Joyent, Inc.
3177  *
3178  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3179  * Use is subject to license terms.
3180  */
3181 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
3182 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
3183 /*
3184  * This file and its contents are supplied under the terms of the
3185  * Common Development and Distribution License ("CDDL"), version 1.0.
3186  * You may only use this file in accordance with the terms of version
3187  * 1.0 of the CDDL.
3188  *
3189  * A full copy of the text of the CDDL should have accompanied this
3190  * source.  A copy of the CDDL is also available via the Internet at
3191  * http://www.illumos.org/license/CDDL.
3192  */
3193 
3194 /*
3195  * Copyright 2014-2016 PALO, Richard.
3196  */
3197 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
3198 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h"
3199 struct tm { /* see ctime(3) */
3200  int tm_sec;
3201  int tm_min;
3202  int tm_hour;
3203  int tm_mday;
3204  int tm_mon;
3205  int tm_year;
3206  int tm_wday;
3207  int tm_yday;
3208  int tm_isdst;
3209 };
3210 
3211 
3212 extern char *asctime(const struct tm *);
3213 extern clock_t clock(void);
3214 extern char *ctime(const time_t *);
3215 extern double difftime(time_t, time_t);
3216 extern struct tm *gmtime(const time_t *);
3217 extern struct tm *localtime(const time_t *);
3218 extern time_t mktime(struct tm *);
3219 extern time_t time(time_t *);
3220 extern size_t strftime(char *, size_t, const char *,
3221  const struct tm *);
3222 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3223 /*
3224  * C11 requires sys/time_impl.h for the definition of the struct timespec.
3225  */
3226 
3227 
3228 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
3229 /*
3230  * CDDL HEADER START
3231  *
3232  * The contents of this file are subject to the terms of the
3233  * Common Development and Distribution License (the "License").
3234  * You may not use this file except in compliance with the License.
3235  *
3236  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3237  * or http://www.opensolaris.org/os/licensing.
3238  * See the License for the specific language governing permissions
3239  * and limitations under the License.
3240  *
3241  * When distributing Covered Code, include this CDDL HEADER in each
3242  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3243  * If applicable, add the following below this CDDL HEADER, with the
3244  * fields enclosed by brackets "[]" replaced with your own identifying
3245  * information: Portions Copyright [yyyy] [name of copyright owner]
3246  *
3247  * CDDL HEADER END
3248  */
3249 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3250 /*	  All Rights Reserved  	*/
3251 
3252 
3253 /*
3254  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3255  * Use is subject to license terms.
3256  *
3257  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3258  * Copyright 2016 Joyent, Inc.
3259  */
3260 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3261 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
3262 /*
3263  * CDDL HEADER START
3264  *
3265  * The contents of this file are subject to the terms of the
3266  * Common Development and Distribution License, Version 1.0 only
3267  * (the "License").  You may not use this file except in compliance
3268  * with the License.
3269  *
3270  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3271  * or http://www.opensolaris.org/os/licensing.
3272  * See the License for the specific language governing permissions
3273  * and limitations under the License.
3274  *
3275  * When distributing Covered Code, include this CDDL HEADER in each
3276  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3277  * If applicable, add the following below this CDDL HEADER, with the
3278  * fields enclosed by brackets "[]" replaced with your own identifying
3279  * information: Portions Copyright [yyyy] [name of copyright owner]
3280  *
3281  * CDDL HEADER END
3282  */
3283 /*
3284  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3285  * Use is subject to license terms.
3286  */
3287 
3288 /*
3289  * Implementation-private.  This header should not be included
3290  * directly by an application.  The application should instead
3291  * include <time.h> which includes this header conditionally
3292  * depending on which feature test macros are defined. By default,
3293  * this header is included by <time.h>.  X/Open and POSIX
3294  * standards requirements result in this header being included
3295  * by <time.h> only under a restricted set of conditions.
3296  */
3297 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3298 
3299 
3300 /*
3301  * Allow global visibility for symbols defined in
3302  * C++ "std" namespace in <iso/time_iso.h>.
3303  */
3304 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3305 extern struct tm *gmtime_r(const time_t *,
3306    struct tm *);
3307 extern struct tm *localtime_r(const time_t *,
3308    struct tm *);
3309 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3310 extern char *strptime(const char *, const char *,
3311   struct tm *);
3312 
3313 
3314 
3315 
3316 
3317 /*
3318  * Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
3319  * definition of the sigevent structure.  Both require the inclusion
3320  * of <signal.h> and <time.h> when using the timer_create() function.
3321  * However, X/Open also specifies that the sigevent structure be defined
3322  * in <time.h> as described in the header <signal.h>.  This prevents
3323  * compiler warnings for applications that only include <time.h> and not
3324  * also <signal.h>.  The sigval union and the sigevent structure is
3325  * therefore defined both here and in <sys/siginfo.h> which gets included
3326  * via inclusion of <signal.h>.
3327  */
3328 
3329 
3330 union sigval {
3331  int sival_int; /* integer value */
3332  void *sival_ptr; /* pointer value */
3333 };
3334 
3335 
3336 
3337 
3338 struct sigevent {
3339  int sigev_notify; /* notification mode */
3340  int sigev_signo; /* signal number */
3341  union sigval sigev_value; /* signal value */
3342  void (*sigev_notify_function)(union sigval);
3343  pthread_attr_t *sigev_notify_attributes;
3344  int __sigev_pad2;
3345 };
3346 
3347 
3348 extern int clock_getres(clockid_t, struct timespec *);
3349 extern int clock_gettime(clockid_t, struct timespec *);
3350 extern int clock_settime(clockid_t, const struct timespec *);
3351 extern int timer_create(clockid_t, struct sigevent *,
3352   timer_t *);
3353 extern int timer_delete(timer_t);
3354 extern int timer_getoverrun(timer_t);
3355 extern int timer_gettime(timer_t, struct itimerspec *);
3356 extern int timer_settime(timer_t, int, const struct itimerspec *,
3357   struct itimerspec *);
3358 
3359 extern int nanosleep(const struct timespec *, struct timespec *);
3360 extern int clock_nanosleep(clockid_t, int,
3361  const struct timespec *, struct timespec *);
3362 
3363 
3364 
3365 
3366 
3367 
3368 extern void tzset(void);
3369 extern char *tzname[2];
3370 
3371 /* CLK_TCK marked as LEGACY in SUSv2 and removed in SUSv3 */
3372 
3373 
3374 extern long _sysconf(int); /* System Private interface to sysconf() */
3375 
3376     /* 3 is _SC_CLK_TCK */
3377 
3378 
3379 
3380 
3381 
3382 extern long timezone;
3383 extern int daylight;
3384 
3385 
3386 
3387 
3388 
3389 
3390 extern time_t timegm(struct tm *);
3391 extern int cftime(char *, char *, const time_t *);
3392 extern int ascftime(char *, const char *, const struct tm *);
3393 extern long altzone;
3394 
3395 
3396 
3397 
3398 extern struct tm *getdate(const char *);
3399 
3400 
3401 
3402 
3403 
3404 extern int getdate_err;
3405 
3406 
3407 
3408 /*
3409  * ctime_r() & asctime_r() prototypes are defined here.
3410  */
3411 
3412 /*
3413  * Previous releases of Solaris, starting at 2.3, provided definitions of
3414  * various functions as specified in POSIX.1c, Draft 6.  For some of these
3415  * functions, the final POSIX 1003.1c standard had a different number of
3416  * arguments and return values.
3417  *
3418  * The following segment of this header provides support for the standard
3419  * interfaces while supporting applications written under earlier
3420  * releases.  The application defines appropriate values of the feature
3421  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
3422  * whether it was written to expect the Draft 6 or standard versions of
3423  * these interfaces, before including this header.  This header then
3424  * provides a mapping from the source version of the interface to an
3425  * appropriate binary interface.  Such mappings permit an application
3426  * to be built from libraries and objects which have mixed expectations
3427  * of the definitions of these functions.
3428  *
3429  * For applications using the Draft 6 definitions, the binary symbol is the
3430  * same as the source symbol, and no explicit mapping is needed.  For the
3431  * standard interface, the function func() is mapped to the binary symbol
3432  * _posix_func().  The preferred mechanism for the remapping is a compiler
3433  * #pragma.  If the compiler does not provide such a #pragma, the header file
3434  * defines a static function func() which calls the _posix_func() version;
3435  * this has to be done instead of #define since POSIX specifies that an
3436  * application can #undef the symbol and still be bound to the correct
3437  * implementation.  Unfortunately, the statics confuse lint so we fallback to
3438  * #define in that case.
3439  *
3440  * NOTE: Support for the Draft 6 definitions is provided for compatibility
3441  * only.  New applications/libraries should use the standard definitions.
3442  */
3443 # 280 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3444 extern char *asctime_r(const struct tm *, char *, int);
3445 extern char *ctime_r(const time_t *, char *, int);
3446 # 295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3447 extern size_t strftime_l(char *, size_t,
3448  const char *, const struct tm *, locale_t);
3449 
3450 
3451 
3452 
3453 
3454 /*
3455  * Note, the C11 standard requires that all the various base values that are
3456  * passed into timespec_get() be non-zero. Hence why TIME_UTC starts at one.
3457  */
3458 
3459 
3460 extern int timespec_get(struct timespec *, int);
3461 # 460 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
3462 
3463 
3464 /*
3465  * The inclusion of <sys/select.h> is needed for the FD_CLR,
3466  * FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
3467  * select() prototype defined in the XOpen specifications
3468  * beginning with XSH4v2.  Placement required after definition
3469  * for itimerval.
3470  */
3471 
3472 
3473 
3474 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
3475 /*
3476  * CDDL HEADER START
3477  *
3478  * The contents of this file are subject to the terms of the
3479  * Common Development and Distribution License (the "License").
3480  * You may not use this file except in compliance with the License.
3481  *
3482  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3483  * or http://www.opensolaris.org/os/licensing.
3484  * See the License for the specific language governing permissions
3485  * and limitations under the License.
3486  *
3487  * When distributing Covered Code, include this CDDL HEADER in each
3488  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3489  * If applicable, add the following below this CDDL HEADER, with the
3490  * fields enclosed by brackets "[]" replaced with your own identifying
3491  * information: Portions Copyright [yyyy] [name of copyright owner]
3492  *
3493  * CDDL HEADER END
3494  */
3495 
3496 /*
3497  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3498  *
3499  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3500  *
3501  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3502  * Use is subject to license terms.
3503  */
3504 
3505 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3506 /*	  All Rights Reserved	*/
3507 
3508 /*
3509  * University Copyright- Copyright (c) 1982, 1986, 1988
3510  * The Regents of the University of California
3511  * All Rights Reserved
3512  *
3513  * University Acknowledgment- Portions of this document are derived from
3514  * software developed by the University of California, Berkeley, and its
3515  * contributors.
3516  */
3517 # 473 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
3518 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
3519 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3520 /*
3521  * The sigset_t type is defined in <sys/signal.h> and duplicated
3522  * in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
3523  * now allows the visibility of signal.h in this header, however
3524  * an order of inclusion problem occurs as a result of inclusion
3525  * of <sys/select.h> in <signal.h> under certain conditions.
3526  * Rather than include <sys/signal.h> here, we've duplicated
3527  * the sigset_t type instead. This type is required for the XPG6
3528  * introduced pselect() function also declared in this header.
3529  */
3530 
3531 
3532 typedef struct { /* signal set type */
3533  unsigned int __sigbits[4];
3534 } sigset_t;
3535 
3536 
3537 
3538 
3539 /*
3540  * Select uses bit masks of file descriptors in longs.
3541  * These macros manipulate such bit fields.
3542  * FD_SETSIZE may be defined by the user, but the default here
3543  * should be >= NOFILE (param.h).
3544  */
3545 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3546 typedef long fd_mask;
3547 
3548 typedef long fds_mask;
3549 
3550 /*
3551  *  The value of _NBBY needs to be consistant with the value
3552  *  of NBBY in <sys/param.h>.
3553  */
3554 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3555 typedef struct fd_set {
3556 
3557 
3558 
3559  long fds_bits[(((1024)+(((sizeof (fds_mask) * 8))-1))/((sizeof (fds_mask) * 8)))];
3560 } fd_set;
3561 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3562 extern int select(int, fd_set *, fd_set *,
3563  fd_set *, struct timeval *);
3564 
3565 
3566 extern int pselect(int, fd_set *, fd_set *,
3567  fd_set *, const struct timespec *,
3568  const sigset_t *);
3569 # 641 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3570 
3571 
3572 
3573 /*
3574  * _VOID was defined to be either void or char but this is not
3575  * required because previous SunOS compilers have accepted the void
3576  * type. However, because many system header and source files use the
3577  * void keyword, the volatile keyword, and ANSI C function prototypes,
3578  * non-ANSI compilers cannot compile the system anyway. The _VOID macro
3579  * should therefore not be used and remains for source compatibility
3580  * only.
3581  */
3582 /* CSTYLED */
3583 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
3584 
3585 
3586 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h" 1
3587 /*
3588  * CDDL HEADER START
3589  *
3590  * The contents of this file are subject to the terms of the
3591  * Common Development and Distribution License, Version 1.0 only
3592  * (the "License").  You may not use this file except in compliance
3593  * with the License.
3594  *
3595  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3596  * or http://www.opensolaris.org/os/licensing.
3597  * See the License for the specific language governing permissions
3598  * and limitations under the License.
3599  *
3600  * When distributing Covered Code, include this CDDL HEADER in each
3601  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3602  * If applicable, add the following below this CDDL HEADER, with the
3603  * fields enclosed by brackets "[]" replaced with your own identifying
3604  * information: Portions Copyright [yyyy] [name of copyright owner]
3605  *
3606  * CDDL HEADER END
3607  */
3608 /*	Copyright (c) 1988 AT&T	*/
3609 /*	  All Rights Reserved  	*/
3610 
3611 
3612 /*
3613  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3614  *
3615  * Copyright (c) 1998-1999, by Sun Microsystems, Inc.
3616  * All rights reserved.
3617  */
3618 
3619 /*
3620  * An application should not include this header directly.  Instead it
3621  * should be included only through the inclusion of other Sun headers.
3622  *
3623  * The contents of this header is limited to identifiers specified in the
3624  * C Standard.  Any new identifiers specified in future amendments to the
3625  * C Standard must be placed in this header.  If these new identifiers
3626  * are required to also be in the C++ Standard "std" namespace, then for
3627  * anything other than macro definitions, corresponding "using" directives
3628  * must also be added to <signal.h>.
3629  */
3630 
3631 
3632 
3633 
3634 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 1
3635 /*
3636  * CDDL HEADER START
3637  *
3638  * The contents of this file are subject to the terms of the
3639  * Common Development and Distribution License (the "License").
3640  * You may not use this file except in compliance with the License.
3641  *
3642  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3643  * or http://www.opensolaris.org/os/licensing.
3644  * See the License for the specific language governing permissions
3645  * and limitations under the License.
3646  *
3647  * When distributing Covered Code, include this CDDL HEADER in each
3648  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3649  * If applicable, add the following below this CDDL HEADER, with the
3650  * fields enclosed by brackets "[]" replaced with your own identifying
3651  * information: Portions Copyright [yyyy] [name of copyright owner]
3652  *
3653  * CDDL HEADER END
3654  */
3655 
3656 /*
3657  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3658  * Use is subject to license terms.
3659  */
3660 
3661 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3662 /*	  All Rights Reserved  	*/
3663 
3664 /*
3665  * An application should not include this header directly.  Instead it
3666  * should be included only through the inclusion of other Sun headers.
3667  *
3668  * The contents of this header is limited to identifiers specified in the
3669  * C Standard.  Any new identifiers specified in future amendments to the
3670  * C Standard must be placed in this header.  If these new identifiers
3671  * are required to also be in the C++ Standard "std" namespace, then for
3672  * anything other than macro definitions, corresponding "using" directives
3673  * must also be added to <sys/signal.h.h>.
3674  */
3675 
3676 
3677 
3678 
3679 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
3680 /*
3681  * CDDL HEADER START
3682  *
3683  * The contents of this file are subject to the terms of the
3684  * Common Development and Distribution License (the "License").
3685  * You may not use this file except in compliance with the License.
3686  *
3687  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3688  * or http://www.opensolaris.org/os/licensing.
3689  * See the License for the specific language governing permissions
3690  * and limitations under the License.
3691  *
3692  * When distributing Covered Code, include this CDDL HEADER in each
3693  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3694  * If applicable, add the following below this CDDL HEADER, with the
3695  * fields enclosed by brackets "[]" replaced with your own identifying
3696  * information: Portions Copyright [yyyy] [name of copyright owner]
3697  *
3698  * CDDL HEADER END
3699  */
3700 
3701 /*
3702  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
3703  *	  All Rights Reserved
3704  *
3705  */
3706 
3707 /*
3708  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3709  * Use is subject to license terms.
3710  */
3711 
3712 /*
3713  * WARNING: This is an implementation-specific header,
3714  * its contents are not guaranteed. Applications
3715  * should include <unistd.h> and not this header.
3716  */
3717 
3718 
3719 
3720 
3721 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3722 /*
3723  * CDDL HEADER START
3724  *
3725  * The contents of this file are subject to the terms of the
3726  * Common Development and Distribution License (the "License").
3727  * You may not use this file except in compliance with the License.
3728  *
3729  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3730  * or http://www.opensolaris.org/os/licensing.
3731  * See the License for the specific language governing permissions
3732  * and limitations under the License.
3733  *
3734  * When distributing Covered Code, include this CDDL HEADER in each
3735  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3736  * If applicable, add the following below this CDDL HEADER, with the
3737  * fields enclosed by brackets "[]" replaced with your own identifying
3738  * information: Portions Copyright [yyyy] [name of copyright owner]
3739  *
3740  * CDDL HEADER END
3741  */
3742 
3743 /*
3744  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3745  * Copyright 2016 Joyent, Inc.
3746  *
3747  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3748  * Use is subject to license terms.
3749  */
3750 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 2
3751 
3752 
3753 
3754 
3755 
3756 /* command names for confstr */
3757 
3758 
3759 
3760 /*
3761  * command names for large file configuration information
3762  */
3763 /* large file compilation environment configuration */
3764 
3765 
3766 
3767 
3768 /* transitional large file interface configuration */
3769 
3770 
3771 
3772 
3773 
3774 /* UNIX 98 */
3775 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3776 /* UNIX 03 */
3777 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3778 /* command names for POSIX sysconf */
3779 
3780 /* POSIX.1 names */
3781 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3782 /* SVR4 names */
3783 
3784 
3785 
3786 
3787 /* 13 reserved for SVr4-ES/MP _SC_NACLS_MAX */
3788 
3789 
3790 
3791 
3792 /* POSIX.4 names */
3793 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3794 /* XPG4 names */
3795 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3796 /* additional XSH4/XCU4 command names for sysconf */
3797 
3798 
3799 
3800 /* additional XPG4v2 (UNIX 95) command names */
3801 
3802 
3803 
3804 
3805 
3806 /* defined for XTI (XNS Issue 5) */
3807 
3808 
3809 
3810 
3811 
3812 
3813 
3814 /*
3815  * Hardware specific items
3816  * Note that not all items are supported on all architectures
3817  */
3818 # 214 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3819 /*
3820  * POSIX.1c (pthreads) names. These values are defined above
3821  * the sub-500 range. See psarc case 1995/257.
3822  */
3823 # 235 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3824 /* UNIX 98 */
3825 # 244 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3826 /* UNIX 03 */
3827 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3828 /* command names for POSIX pathconf */
3829 
3830 /* POSIX.1 names */
3831 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3832 /* POSIX.4 names */
3833 
3834 
3835 
3836 /* UNIX 03 names */
3837 # 315 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3838 /* UNIX 08 names */
3839 
3840 
3841 /*
3842  * Large File Summit names
3843  *
3844  * This value matches the MIPS ABI choice, but leaves a large gap in the
3845  * value space.
3846  */
3847 
3848 
3849 /*
3850  * Extended attributes
3851  */
3852 
3853 
3854 
3855 /*
3856  * If you add a _PC define above 101, you must change _PC_LAST (and truss).
3857  */
3858 
3859 
3860 /*
3861  * Case sensitivity values (related to _PC_CASE_BEHAVIOR)
3862  */
3863 
3864 
3865 
3866 /*
3867  * The value of 0 is returned when
3868  * ACL's are not supported
3869  */
3870 # 366 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3871 /*
3872  * Marked LEGACY in SUSv2 and removed in SUSv3. Though SUSv3 applications
3873  * should not rely on this value, it has been aligned with the current
3874  * standard to avoid confusion if used.
3875  */
3876 # 408 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3877 /* UNIX 03 names */
3878 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 2
3879 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h"
3880 /* insert new signals here, and move _SIGRTM* appropriately */
3881 
3882 
3883 extern long _sysconf(int); /* System Private interface to sysconf() */
3884 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h" 2
3885 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h"
3886 typedef int sig_atomic_t;
3887 
3888 
3889 
3890 
3891 extern void (*signal(int, void (*)(int)))(int);
3892 
3893 extern int raise(int);
3894 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
3895 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 1
3896 /*
3897  * CDDL HEADER START
3898  *
3899  * The contents of this file are subject to the terms of the
3900  * Common Development and Distribution License (the "License").
3901  * You may not use this file except in compliance with the License.
3902  *
3903  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3904  * or http://www.opensolaris.org/os/licensing.
3905  * See the License for the specific language governing permissions
3906  * and limitations under the License.
3907  *
3908  * When distributing Covered Code, include this CDDL HEADER in each
3909  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3910  * If applicable, add the following below this CDDL HEADER, with the
3911  * fields enclosed by brackets "[]" replaced with your own identifying
3912  * information: Portions Copyright [yyyy] [name of copyright owner]
3913  *
3914  * CDDL HEADER END
3915  */
3916 
3917 /*
3918  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3919  * Use is subject to license terms.
3920  */
3921 
3922 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3923 /*	  All Rights Reserved  	*/
3924 
3925 /*
3926  * University Copyright- Copyright (c) 1982, 1986, 1988
3927  * The Regents of the University of California
3928  * All Rights Reserved
3929  *
3930  * University Acknowledgment- Portions of this document are derived from
3931  * software developed by the University of California, Berkeley, and its
3932  * contributors.
3933  */
3934 
3935 
3936 
3937 
3938 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3939 /*
3940  * CDDL HEADER START
3941  *
3942  * The contents of this file are subject to the terms of the
3943  * Common Development and Distribution License (the "License").
3944  * You may not use this file except in compliance with the License.
3945  *
3946  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3947  * or http://www.opensolaris.org/os/licensing.
3948  * See the License for the specific language governing permissions
3949  * and limitations under the License.
3950  *
3951  * When distributing Covered Code, include this CDDL HEADER in each
3952  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3953  * If applicable, add the following below this CDDL HEADER, with the
3954  * fields enclosed by brackets "[]" replaced with your own identifying
3955  * information: Portions Copyright [yyyy] [name of copyright owner]
3956  *
3957  * CDDL HEADER END
3958  */
3959 
3960 /*
3961  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3962  * Copyright 2016 Joyent, Inc.
3963  *
3964  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3965  * Use is subject to license terms.
3966  */
3967 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
3968 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 1
3969 /*
3970  * CDDL HEADER START
3971  *
3972  * The contents of this file are subject to the terms of the
3973  * Common Development and Distribution License (the "License").
3974  * You may not use this file except in compliance with the License.
3975  *
3976  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3977  * or http://www.opensolaris.org/os/licensing.
3978  * See the License for the specific language governing permissions
3979  * and limitations under the License.
3980  *
3981  * When distributing Covered Code, include this CDDL HEADER in each
3982  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3983  * If applicable, add the following below this CDDL HEADER, with the
3984  * fields enclosed by brackets "[]" replaced with your own identifying
3985  * information: Portions Copyright [yyyy] [name of copyright owner]
3986  *
3987  * CDDL HEADER END
3988  */
3989 
3990 /*
3991  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3992  * Use is subject to license terms.
3993  */
3994 
3995 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3996 /*	  All Rights Reserved  	*/
3997 
3998 /*
3999  * An application should not include this header directly.  Instead it
4000  * should be included only through the inclusion of other Sun headers.
4001  *
4002  * The contents of this header is limited to identifiers specified in the
4003  * C Standard.  Any new identifiers specified in future amendments to the
4004  * C Standard must be placed in this header.  If these new identifiers
4005  * are required to also be in the C++ Standard "std" namespace, then for
4006  * anything other than macro definitions, corresponding "using" directives
4007  * must also be added to <sys/signal.h.h>.
4008  */
4009 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
4010 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4011 /*
4012  * We need <sys/siginfo.h> for the declaration of siginfo_t.
4013  */
4014 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
4015 /*
4016  * CDDL HEADER START
4017  *
4018  * The contents of this file are subject to the terms of the
4019  * Common Development and Distribution License, Version 1.0 only
4020  * (the "License").  You may not use this file except in compliance
4021  * with the License.
4022  *
4023  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4024  * or http://www.opensolaris.org/os/licensing.
4025  * See the License for the specific language governing permissions
4026  * and limitations under the License.
4027  *
4028  * When distributing Covered Code, include this CDDL HEADER in each
4029  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4030  * If applicable, add the following below this CDDL HEADER, with the
4031  * fields enclosed by brackets "[]" replaced with your own identifying
4032  * information: Portions Copyright [yyyy] [name of copyright owner]
4033  *
4034  * CDDL HEADER END
4035  */
4036 /*
4037  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4038  * Use is subject to license terms.
4039  */
4040 
4041 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4042 /*	  All Rights Reserved  	*/
4043 
4044 
4045 
4046 
4047 #pragma ident "%Z%%M%	%I%	%E% SMI"
4048 
4049 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4050 /*
4051  * CDDL HEADER START
4052  *
4053  * The contents of this file are subject to the terms of the
4054  * Common Development and Distribution License (the "License").
4055  * You may not use this file except in compliance with the License.
4056  *
4057  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4058  * or http://www.opensolaris.org/os/licensing.
4059  * See the License for the specific language governing permissions
4060  * and limitations under the License.
4061  *
4062  * When distributing Covered Code, include this CDDL HEADER in each
4063  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4064  * If applicable, add the following below this CDDL HEADER, with the
4065  * fields enclosed by brackets "[]" replaced with your own identifying
4066  * information: Portions Copyright [yyyy] [name of copyright owner]
4067  *
4068  * CDDL HEADER END
4069  */
4070 
4071 /*
4072  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4073  * Copyright 2016 Joyent, Inc.
4074  *
4075  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4076  * Use is subject to license terms.
4077  */
4078 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
4079 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4080 /*
4081  * CDDL HEADER START
4082  *
4083  * The contents of this file are subject to the terms of the
4084  * Common Development and Distribution License (the "License").
4085  * You may not use this file except in compliance with the License.
4086  *
4087  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4088  * or http://www.opensolaris.org/os/licensing.
4089  * See the License for the specific language governing permissions
4090  * and limitations under the License.
4091  *
4092  * When distributing Covered Code, include this CDDL HEADER in each
4093  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4094  * If applicable, add the following below this CDDL HEADER, with the
4095  * fields enclosed by brackets "[]" replaced with your own identifying
4096  * information: Portions Copyright [yyyy] [name of copyright owner]
4097  *
4098  * CDDL HEADER END
4099  */
4100 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4101 /*	  All Rights Reserved  	*/
4102 
4103 
4104 /*
4105  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4106  * Use is subject to license terms.
4107  *
4108  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4109  * Copyright 2016 Joyent, Inc.
4110  */
4111 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
4112 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4113 /*
4114  * The union sigval is also defined in <time.h> as per X/Open and
4115  * POSIX requirements.
4116  */
4117 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4118 /*
4119  * The sigevent structure is also defined in <time.h> as per X/Open and
4120  * POSIX requirements.
4121  */
4122 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4123 /* values of sigev_notify */
4124 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4125 /*
4126  * negative signal codes are reserved for future use for user generated
4127  * signals
4128  */
4129 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4130 /*
4131  * Get the machine dependent signal codes (SIGILL, SIGFPE, SIGSEGV, and
4132  * SIGBUS) from <sys/machsig.h>
4133  */
4134 
4135 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 1
4136 /*
4137  * CDDL HEADER START
4138  *
4139  * The contents of this file are subject to the terms of the
4140  * Common Development and Distribution License, Version 1.0 only
4141  * (the "License").  You may not use this file except in compliance
4142  * with the License.
4143  *
4144  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4145  * or http://www.opensolaris.org/os/licensing.
4146  * See the License for the specific language governing permissions
4147  * and limitations under the License.
4148  *
4149  * When distributing Covered Code, include this CDDL HEADER in each
4150  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4151  * If applicable, add the following below this CDDL HEADER, with the
4152  * fields enclosed by brackets "[]" replaced with your own identifying
4153  * information: Portions Copyright [yyyy] [name of copyright owner]
4154  *
4155  * CDDL HEADER END
4156  */
4157 /*
4158  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
4159  * Use is subject to license terms.
4160  */
4161 
4162 /*	Copyright (c) 1988 AT&T	*/
4163 /*	  All Rights Reserved  	*/
4164 
4165 
4166 
4167 
4168 
4169 #pragma ident "%Z%%M%	%I%	%E% SMI"
4170 
4171 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4172 /*
4173  * CDDL HEADER START
4174  *
4175  * The contents of this file are subject to the terms of the
4176  * Common Development and Distribution License (the "License").
4177  * You may not use this file except in compliance with the License.
4178  *
4179  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4180  * or http://www.opensolaris.org/os/licensing.
4181  * See the License for the specific language governing permissions
4182  * and limitations under the License.
4183  *
4184  * When distributing Covered Code, include this CDDL HEADER in each
4185  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4186  * If applicable, add the following below this CDDL HEADER, with the
4187  * fields enclosed by brackets "[]" replaced with your own identifying
4188  * information: Portions Copyright [yyyy] [name of copyright owner]
4189  *
4190  * CDDL HEADER END
4191  */
4192 
4193 /*
4194  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4195  * Copyright 2016 Joyent, Inc.
4196  *
4197  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4198  * Use is subject to license terms.
4199  */
4200 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 2
4201 
4202 
4203 
4204 
4205 
4206 /*
4207  * machsig.h is the machine dependent portion of siginfo.h (and is
4208  * included by siginfo.h). A version of machsig.h should exist for
4209  * each architecture. The codes for SIGILL, SIGFPU, SIGSEGV and SIGBUS
4210  * are in this file. The codes for SIGTRAP, SIGCLD(SIGCHLD), and
4211  * SIGPOLL are architecture independent and may be found in siginfo.h.
4212  */
4213 
4214 
4215 
4216 
4217 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/vm/faultcode.h" 1
4218 /*
4219  * CDDL HEADER START
4220  *
4221  * The contents of this file are subject to the terms of the
4222  * Common Development and Distribution License (the "License").
4223  * You may not use this file except in compliance with the License.
4224  *
4225  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4226  * or http://www.opensolaris.org/os/licensing.
4227  * See the License for the specific language governing permissions
4228  * and limitations under the License.
4229  *
4230  * When distributing Covered Code, include this CDDL HEADER in each
4231  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4232  * If applicable, add the following below this CDDL HEADER, with the
4233  * fields enclosed by brackets "[]" replaced with your own identifying
4234  * information: Portions Copyright [yyyy] [name of copyright owner]
4235  *
4236  * CDDL HEADER END
4237  */
4238 /*
4239  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
4240  * Use is subject to license terms.
4241  */
4242 
4243 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4244 /*	  All Rights Reserved  	*/
4245 
4246 /*
4247  * University Copyright- Copyright (c) 1982, 1986, 1988
4248  * The Regents of the University of California
4249  * All Rights Reserved
4250  *
4251  * University Acknowledgment- Portions of this document are derived from
4252  * software developed by the University of California, Berkeley, and its
4253  * contributors.
4254  */
4255 
4256 
4257 
4258 
4259 #pragma ident "%Z%%M%	%I%	%E% SMI"
4260 
4261 
4262 
4263 
4264 
4265 /*
4266  * This file describes the data type returned by vm routines
4267  * which handle faults.
4268  *
4269  * If FC_CODE(fc) == FC_OBJERR, then FC_ERRNO(fc) contains the errno value
4270  * returned by the underlying object mapped at the fault address.
4271  */
4272 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/vm/faultcode.h"
4273 typedef int faultcode_t; /* type returned by vm fault routines */
4274 
4275 extern int fc_decode(faultcode_t);
4276 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 2
4277 
4278 
4279 /*
4280  * SIGILL signal codes
4281  */
4282 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h"
4283 /*
4284  * SIGEMT signal codes
4285  */
4286 
4287 
4288 
4289 
4290 
4291 
4292 /*
4293  * SIGFPE signal codes
4294  */
4295 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h"
4296 /*
4297  * SIGSEGV signal codes
4298  */
4299 
4300 
4301 
4302 
4303 
4304 
4305 
4306 /*
4307  * SIGBUS signal codes
4308  */
4309 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
4310 
4311 /*
4312  * SIGTRAP signal codes
4313  */
4314 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4315 /*
4316  * SIGCLD signal codes
4317  */
4318 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4319 /*
4320  * SIGPOLL signal codes
4321  */
4322 # 195 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4323 /*
4324  * SIGPROF signal codes
4325  */
4326 # 215 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4327 /*
4328  * Inclusion of <sys/time_impl.h> is needed for the declaration of
4329  * timestruc_t.  However, since inclusion of <sys/time_impl.h> results
4330  * in X/Open and POSIX namespace pollution, the definition for
4331  * timestruct_t has been duplicated in a standards namespace safe header
4332  * <sys/time_std_impl.h>.  In <sys/time_std_impl.h>, the structure
4333  * name, tag, and member names, as well as the type itself, all have
4334  * leading underscores to protect namespace.
4335  */
4336 
4337 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
4338 /*
4339  * CDDL HEADER START
4340  *
4341  * The contents of this file are subject to the terms of the
4342  * Common Development and Distribution License, Version 1.0 only
4343  * (the "License").  You may not use this file except in compliance
4344  * with the License.
4345  *
4346  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4347  * or http://www.opensolaris.org/os/licensing.
4348  * See the License for the specific language governing permissions
4349  * and limitations under the License.
4350  *
4351  * When distributing Covered Code, include this CDDL HEADER in each
4352  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4353  * If applicable, add the following below this CDDL HEADER, with the
4354  * fields enclosed by brackets "[]" replaced with your own identifying
4355  * information: Portions Copyright [yyyy] [name of copyright owner]
4356  *
4357  * CDDL HEADER END
4358  */
4359 /*
4360  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4361  * Use is subject to license terms.
4362  */
4363 
4364 /*
4365  * Implementation-private.  This header should not be included
4366  * directly by an application.  The application should instead
4367  * include <time.h> which includes this header conditionally
4368  * depending on which feature test macros are defined. By default,
4369  * this header is included by <time.h>.  X/Open and POSIX
4370  * standards requirements result in this header being included
4371  * by <time.h> only under a restricted set of conditions.
4372  */
4373 # 226 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
4374 
4375 
4376 
4377 
4378 /*
4379  * The inclusion of <sys/types.h> is needed for definitions of pid_t, etc.
4380  * Placement here is due to a dependency in <sys/select.h> which is included
4381  * by <sys/types.h> for the sigevent structure.  Hence this inclusion must
4382  * follow that definition.
4383  */
4384 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4385 /*
4386  * CDDL HEADER START
4387  *
4388  * The contents of this file are subject to the terms of the
4389  * Common Development and Distribution License (the "License").
4390  * You may not use this file except in compliance with the License.
4391  *
4392  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4393  * or http://www.opensolaris.org/os/licensing.
4394  * See the License for the specific language governing permissions
4395  * and limitations under the License.
4396  *
4397  * When distributing Covered Code, include this CDDL HEADER in each
4398  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4399  * If applicable, add the following below this CDDL HEADER, with the
4400  * fields enclosed by brackets "[]" replaced with your own identifying
4401  * information: Portions Copyright [yyyy] [name of copyright owner]
4402  *
4403  * CDDL HEADER END
4404  */
4405 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4406 /*	  All Rights Reserved  	*/
4407 
4408 
4409 /*
4410  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4411  * Use is subject to license terms.
4412  *
4413  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4414  * Copyright 2016 Joyent, Inc.
4415  */
4416 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
4417 
4418 
4419 typedef struct siginfo { /* pollutes POSIX/XOPEN namespace */
4420 
4421 
4422 
4423  int si_signo; /* signal from signal.h	*/
4424  int si_code; /* code from above	*/
4425  int si_errno; /* error from errno.h	*/
4426 
4427 
4428 
4429  union {
4430 
4431   int __pad[((128 / sizeof (int)) - 3)]; /* for future growth	*/
4432 
4433   struct { /* kill(), SIGCLD, siqqueue() */
4434    pid_t __pid; /* process ID		*/
4435    union {
4436     struct {
4437      uid_t __uid;
4438 
4439 
4440      union sigval __value;
4441 
4442 
4443 
4444     } __kill;
4445     struct {
4446      clock_t __utime;
4447      int __status;
4448      clock_t __stime;
4449     } __cld;
4450    } __pdata;
4451    ctid_t __ctid; /* contract ID		*/
4452    zoneid_t __zoneid; /* zone ID		*/
4453   } __proc;
4454 
4455   struct { /* SIGSEGV, SIGBUS, SIGILL, SIGTRAP, SIGFPE */
4456    void *__addr; /* faulting address	*/
4457    int __trapno; /* illegal trap number	*/
4458    caddr_t __pc; /* instruction address	*/
4459   } __fault;
4460 
4461   struct { /* SIGPOLL, SIGXFSZ	*/
4462   /* fd not currently available for SIGPOLL */
4463    int __fd; /* file descriptor	*/
4464    long __band;
4465   } __file;
4466 
4467   struct { /* SIGPROF */
4468    caddr_t __faddr; /* last fault address	*/
4469 
4470    timestruc_t __tstamp; /* real time stamp	*/
4471 
4472 
4473 
4474    short __syscall; /* current syscall	*/
4475    char __nsysarg; /* number of arguments	*/
4476    char __fault; /* last fault type	*/
4477    long __sysarg[8]; /* syscall arguments	*/
4478    int __mstate[10]; /* see <sys/msacct.h>	*/
4479   } __prof;
4480 
4481   struct { /* SI_RCTL */
4482    int32_t __entity; /* type of entity exceeding */
4483   } __rctl;
4484  } __data;
4485 
4486 } siginfo_t;
4487 # 374 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4488 /*
4489  * XXX -- internal version is identical to siginfo_t but without the padding.
4490  * This must be maintained in sync with it.
4491  */
4492 
4493 
4494 
4495 typedef struct k_siginfo {
4496  int si_signo; /* signal from signal.h	*/
4497  int si_code; /* code from above	*/
4498  int si_errno; /* error from errno.h	*/
4499 
4500 
4501 
4502  union {
4503   struct { /* kill(), SIGCLD, siqqueue() */
4504    pid_t __pid; /* process ID		*/
4505    union {
4506     struct {
4507      uid_t __uid;
4508      union sigval __value;
4509     } __kill;
4510     struct {
4511      clock_t __utime;
4512      int __status;
4513      clock_t __stime;
4514     } __cld;
4515    } __pdata;
4516    ctid_t __ctid; /* contract ID		*/
4517    zoneid_t __zoneid; /* zone ID		*/
4518   } __proc;
4519 
4520   struct { /* SIGSEGV, SIGBUS, SIGILL, SIGTRAP, SIGFPE */
4521    void *__addr; /* faulting address	*/
4522    int __trapno; /* illegal trap number	*/
4523    caddr_t __pc; /* instruction address	*/
4524   } __fault;
4525 
4526   struct { /* SIGPOLL, SIGXFSZ	*/
4527   /* fd not currently available for SIGPOLL */
4528    int __fd; /* file descriptor	*/
4529    long __band;
4530   } __file;
4531 
4532   struct { /* SIGPROF */
4533    caddr_t __faddr; /* last fault address	*/
4534 
4535 
4536    timestruc_t __tstamp; /* real time stamp	*/
4537 
4538 
4539 
4540    short __syscall; /* current syscall	*/
4541    char __nsysarg; /* number of arguments	*/
4542    char __fault; /* last fault type	*/
4543    /* these are omitted to keep k_siginfo_t small	*/
4544    /* long	__sysarg[8]; */
4545    /* int	__mstate[10]; */
4546   } __prof;
4547 
4548   struct { /* SI_RCTL */
4549    int32_t __entity; /* type of entity exceeding */
4550   } __rctl;
4551 
4552  } __data;
4553 
4554 } k_siginfo_t;
4555 
4556 typedef struct sigqueue {
4557  struct sigqueue *sq_next;
4558  k_siginfo_t sq_info;
4559  void (*sq_func)(struct sigqueue *); /* destructor function */
4560  void *sq_backptr; /* pointer to the data structure */
4561      /* associated by sq_func()	*/
4562  int sq_external; /* comes from outside the contract */
4563 } sigqueue_t;
4564 
4565 /*  indication whether to queue the signal or not */
4566 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
4567 
4568 
4569 /* Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements */
4570 
4571 
4572 
4573 
4574 
4575 
4576 
4577 typedef struct {
4578  unsigned int __sigbits[3];
4579 } k_sigset_t;
4580 
4581 /*
4582  * The signal handler routine can have either one or three arguments.
4583  * Existing C code has used either form so not specifing the arguments
4584  * neatly finesses the problem.  C++ doesn't accept this.  To C++
4585  * "(*sa_handler)()" indicates a routine with no arguments (ANSI C would
4586  * specify this as "(*sa_handler)(void)").  One or the other form must be
4587  * used for C++ and the only logical choice is "(*sa_handler)(int)" to allow
4588  * the SIG_* defines to work.  "(*sa_sigaction)(int, siginfo_t *, void *)"
4589  * can be used for the three argument form.
4590  */
4591 
4592 /*
4593  * Note: storage overlap by sa_handler and sa_sigaction
4594  */
4595 struct sigaction {
4596  int sa_flags;
4597  union {
4598 
4599 
4600 
4601   void (*_handler)();
4602 
4603 
4604 
4605 
4606   void (*_sigaction)(int, siginfo_t *, void *);
4607 
4608  } _funcptr;
4609  sigset_t sa_mask;
4610 
4611  int sa_resv[2];
4612 
4613 };
4614 # 126 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4615 /* this is only valid for SIGCLD */
4616 
4617 
4618 
4619 
4620 
4621 
4622 
4623    /* non-conformant ANSI compilation	*/
4624 
4625 /* definitions for the sa_flags field */
4626 # 153 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4627 /* this is only valid for SIGCLD */
4628 
4629 
4630 
4631 /*
4632  * use of these symbols by applications is injurious
4633  *	to binary compatibility
4634  */
4635 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4636 /* Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements. */
4637 
4638 
4639 
4640 typedef struct sigaltstack {
4641 
4642 
4643 
4644  void *ss_sp;
4645  size_t ss_size;
4646  int ss_flags;
4647 } stack_t;
4648 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4649 /* signotify id used only by libc for mq_notify()/aio_notify() */
4650 typedef struct signotify_id { /* signotify id struct		*/
4651  pid_t sn_pid; /* pid of proc to be notified	*/
4652  int sn_index; /* index in preallocated pool	*/
4653  int sn_pad; /* reserved			*/
4654 } signotify_id_t;
4655 # 222 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4656 /* Command codes for sig_notify call */
4657 
4658 
4659 
4660 
4661 
4662 
4663 
4664 /* Added as per XPG4v2 */
4665 
4666 
4667 
4668 struct sigstack {
4669  void *ss_sp;
4670  int ss_onstack;
4671 };
4672 
4673 
4674 /*
4675  * For definition of ucontext_t; must follow struct definition
4676  * for  sigset_t
4677  */
4678 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
4679 
4680 /*
4681  * Allow global visibility for symbols defined in
4682  * C++ "std" namespace in <iso/signal_iso.h>.
4683  */
4684 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
4685 extern const char **_sys_siglistp; /* signal descriptions */
4686 extern const int _sys_siglistn; /* # of signal descriptions */
4687 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
4688 extern int kill(pid_t, int);
4689 extern int sigaction(int, const struct sigaction *,
4690  struct sigaction *);
4691 
4692 extern int sigaddset(sigset_t *, int);
4693 extern int sigdelset(sigset_t *, int);
4694 extern int sigemptyset(sigset_t *);
4695 extern int sigfillset(sigset_t *);
4696 extern int sigismember(const sigset_t *, int);
4697 
4698 extern int sigpending(sigset_t *);
4699 extern int sigprocmask(int, const sigset_t *,
4700  sigset_t *);
4701 extern int sigsuspend(const sigset_t *);
4702 
4703 
4704 
4705 
4706 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
4707 /*
4708  * CDDL HEADER START
4709  *
4710  * The contents of this file are subject to the terms of the
4711  * Common Development and Distribution License, Version 1.0 only
4712  * (the "License").  You may not use this file except in compliance
4713  * with the License.
4714  *
4715  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4716  * or http://www.opensolaris.org/os/licensing.
4717  * See the License for the specific language governing permissions
4718  * and limitations under the License.
4719  *
4720  * When distributing Covered Code, include this CDDL HEADER in each
4721  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4722  * If applicable, add the following below this CDDL HEADER, with the
4723  * fields enclosed by brackets "[]" replaced with your own identifying
4724  * information: Portions Copyright [yyyy] [name of copyright owner]
4725  *
4726  * CDDL HEADER END
4727  */
4728 /*
4729  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4730  * Use is subject to license terms.
4731  */
4732 
4733 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4734 /*	  All Rights Reserved  	*/
4735 
4736 
4737 
4738 
4739 
4740 #pragma ident "%Z%%M%	%I%	%E% SMI"
4741 
4742 
4743 
4744 
4745 
4746 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4747 /*
4748  * CDDL HEADER START
4749  *
4750  * The contents of this file are subject to the terms of the
4751  * Common Development and Distribution License (the "License").
4752  * You may not use this file except in compliance with the License.
4753  *
4754  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4755  * or http://www.opensolaris.org/os/licensing.
4756  * See the License for the specific language governing permissions
4757  * and limitations under the License.
4758  *
4759  * When distributing Covered Code, include this CDDL HEADER in each
4760  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4761  * If applicable, add the following below this CDDL HEADER, with the
4762  * fields enclosed by brackets "[]" replaced with your own identifying
4763  * information: Portions Copyright [yyyy] [name of copyright owner]
4764  *
4765  * CDDL HEADER END
4766  */
4767 
4768 /*
4769  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4770  * Copyright 2016 Joyent, Inc.
4771  *
4772  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4773  * Use is subject to license terms.
4774  */
4775 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
4776 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4777 /*
4778  * CDDL HEADER START
4779  *
4780  * The contents of this file are subject to the terms of the
4781  * Common Development and Distribution License (the "License").
4782  * You may not use this file except in compliance with the License.
4783  *
4784  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4785  * or http://www.opensolaris.org/os/licensing.
4786  * See the License for the specific language governing permissions
4787  * and limitations under the License.
4788  *
4789  * When distributing Covered Code, include this CDDL HEADER in each
4790  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4791  * If applicable, add the following below this CDDL HEADER, with the
4792  * fields enclosed by brackets "[]" replaced with your own identifying
4793  * information: Portions Copyright [yyyy] [name of copyright owner]
4794  *
4795  * CDDL HEADER END
4796  */
4797 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4798 /*	  All Rights Reserved  	*/
4799 
4800 
4801 /*
4802  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4803  * Use is subject to license terms.
4804  *
4805  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4806  * Copyright 2016 Joyent, Inc.
4807  */
4808 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
4809 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 1
4810 /*
4811  * CDDL HEADER START
4812  *
4813  * The contents of this file are subject to the terms of the
4814  * Common Development and Distribution License (the "License").
4815  * You may not use this file except in compliance with the License.
4816  *
4817  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4818  * or http://www.opensolaris.org/os/licensing.
4819  * See the License for the specific language governing permissions
4820  * and limitations under the License.
4821  *
4822  * When distributing Covered Code, include this CDDL HEADER in each
4823  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4824  * If applicable, add the following below this CDDL HEADER, with the
4825  * fields enclosed by brackets "[]" replaced with your own identifying
4826  * information: Portions Copyright [yyyy] [name of copyright owner]
4827  *
4828  * CDDL HEADER END
4829  */
4830 
4831 /*
4832  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
4833  * Use is subject to license terms.
4834  */
4835 
4836 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4837 /*	  All Rights Reserved  	*/
4838 
4839 /*
4840  * University Copyright- Copyright (c) 1982, 1986, 1988
4841  * The Regents of the University of California
4842  * All Rights Reserved
4843  *
4844  * University Acknowledgment- Portions of this document are derived from
4845  * software developed by the University of California, Berkeley, and its
4846  * contributors.
4847  */
4848 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
4849 
4850 /*
4851  *	This file defines the data needed to specify a set of
4852  *	processes.  These types are used by the sigsend, sigsendset,
4853  *	priocntl, priocntlset, waitid, evexit, and evexitset system
4854  *	calls.
4855  */
4856 
4857 
4858 
4859 
4860 
4861 /*
4862  *	The following defines the values for an identifier type.  It
4863  *	specifies the interpretation of an id value.  An idtype and
4864  *	id together define a simple set of processes.
4865  */
4866 typedef enum
4867 
4868  idtype /* pollutes XPG4.2 namespace */
4869 
4870   {
4871  P_PID, /* A process identifier.		*/
4872  P_PPID, /* A parent process identifier.		*/
4873  P_PGID, /* A process group (job control group)	*/
4874    /* identifier.				*/
4875  P_SID, /* A session identifier.		*/
4876  P_CID, /* A scheduling class identifier.	*/
4877  P_UID, /* A user identifier.			*/
4878  P_GID, /* A group identifier.			*/
4879  P_ALL, /* All processes.			*/
4880  P_LWPID, /* An LWP identifier.			*/
4881  P_TASKID, /* A task identifier.			*/
4882  P_PROJID, /* A project identifier.		*/
4883  P_POOLID, /* A pool identifier.			*/
4884  P_ZONEID, /* A zone identifier.			*/
4885  P_CTID, /* A (process) contract identifier.	*/
4886  P_CPUID, /* CPU identifier.			*/
4887  P_PSETID /* Processor set identifier		*/
4888 } idtype_t;
4889 
4890 
4891 /*
4892  *	The following defines the operations which can be performed to
4893  *	combine two simple sets of processes to form another set of
4894  *	processes.
4895  */
4896 
4897 typedef enum idop {
4898  POP_DIFF, /* Set difference.  The processes which	*/
4899    /* are in the left operand set and not	*/
4900    /* in the right operand set.		*/
4901  POP_AND, /* Set disjunction.  The processes	*/
4902    /* which are in both the left and right	*/
4903    /* operand sets.			*/
4904  POP_OR, /* Set conjunction.  The processes	*/
4905    /* which are in either the left or the	*/
4906    /* right operand sets (or both).	*/
4907  POP_XOR /* Set exclusive or.  The processes 	*/
4908    /* which are in either the left or	*/
4909    /* right operand sets but not in both.	*/
4910 } idop_t;
4911 
4912 
4913 /*
4914  *	The following structure is used to define a set of processes.
4915  *	The set is defined in terms of two simple sets of processes
4916  *	and an operator which operates on these two operand sets.
4917  */
4918 typedef struct procset {
4919  idop_t p_op; /* The operator connection the	*/
4920     /* following two operands each	*/
4921     /* of which is a simple set of	*/
4922     /* processes.			*/
4923 
4924  idtype_t p_lidtype;
4925     /* The type of the left operand	*/
4926     /* simple set.			*/
4927  id_t p_lid; /* The id of the left operand.	*/
4928 
4929  idtype_t p_ridtype;
4930     /* The type of the right	*/
4931     /* operand simple set.		*/
4932  id_t p_rid; /* The id of the right operand.	*/
4933 } procset_t;
4934 
4935 /*
4936  *	The following macro can be used to initialize a procset_t
4937  *	structure.
4938  */
4939 # 89 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
4940 extern int gsignal(int);
4941 extern int (*ssignal(int, int (*)(int)))(int);
4942 extern int sigsend(idtype_t, id_t, int);
4943 extern int sigsendset(const procset_t *, int);
4944 extern int sig2str(int, char *);
4945 extern int str2sig(const char *, int *);
4946 
4947 
4948 
4949 
4950 
4951 extern void (*bsd_signal(int, void (*)(int)))(int);
4952 extern int killpg(pid_t, int);
4953 extern int siginterrupt(int, int);
4954 extern int sigaltstack(const stack_t *, stack_t *);
4955 extern int sighold(int);
4956 extern int sigignore(int);
4957 extern int sigpause(int);
4958 extern int sigrelse(int);
4959 extern void (*sigset(int, void (*)(int)))(int);
4960 
4961 
4962 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
4963 
4964 
4965 
4966 extern int sigstack(struct sigstack *, struct sigstack *);
4967 
4968 
4969 
4970 
4971 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
4972 /*
4973  * CDDL HEADER START
4974  *
4975  * The contents of this file are subject to the terms of the
4976  * Common Development and Distribution License, Version 1.0 only
4977  * (the "License").  You may not use this file except in compliance
4978  * with the License.
4979  *
4980  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4981  * or http://www.opensolaris.org/os/licensing.
4982  * See the License for the specific language governing permissions
4983  * and limitations under the License.
4984  *
4985  * When distributing Covered Code, include this CDDL HEADER in each
4986  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4987  * If applicable, add the following below this CDDL HEADER, with the
4988  * fields enclosed by brackets "[]" replaced with your own identifying
4989  * information: Portions Copyright [yyyy] [name of copyright owner]
4990  *
4991  * CDDL HEADER END
4992  */
4993 /*
4994  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4995  * Use is subject to license terms.
4996  */
4997 
4998 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4999 /*	  All Rights Reserved  	*/
5000 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
5001 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
5002 /*
5003  * CDDL HEADER START
5004  *
5005  * The contents of this file are subject to the terms of the
5006  * Common Development and Distribution License (the "License").
5007  * You may not use this file except in compliance with the License.
5008  *
5009  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5010  * or http://www.opensolaris.org/os/licensing.
5011  * See the License for the specific language governing permissions
5012  * and limitations under the License.
5013  *
5014  * When distributing Covered Code, include this CDDL HEADER in each
5015  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5016  * If applicable, add the following below this CDDL HEADER, with the
5017  * fields enclosed by brackets "[]" replaced with your own identifying
5018  * information: Portions Copyright [yyyy] [name of copyright owner]
5019  *
5020  * CDDL HEADER END
5021  */
5022 /*	Copyright (c) 1988 AT&T	*/
5023 /*	  All Rights Reserved  	*/
5024 
5025 
5026 /*
5027  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5028  *
5029  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
5030  * Use is subject to license terms.
5031  */
5032 /*
5033  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
5034  * Copyright 2016 Joyent, Inc.
5035  */
5036 # 122 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
5037 extern int pthread_kill(pthread_t, int);
5038 extern int pthread_sigmask(int, const sigset_t *,
5039  sigset_t *);
5040 extern int sigwaitinfo(const sigset_t *,
5041  siginfo_t *);
5042 extern int sigtimedwait(const sigset_t *,
5043  siginfo_t *, const struct timespec *);
5044 extern int sigqueue(pid_t, int, const union sigval);
5045 
5046 
5047 /*
5048  * sigwait() prototype is defined here.
5049  */
5050 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
5051 extern int sigwait(sigset_t *);
5052 # 34 "main.c" 2
5053 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h" 1
5054 /*
5055  * CDDL HEADER START
5056  *
5057  * The contents of this file are subject to the terms of the
5058  * Common Development and Distribution License, Version 1.0 only
5059  * (the "License").  You may not use this file except in compliance
5060  * with the License.
5061  *
5062  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5063  * or http://www.opensolaris.org/os/licensing.
5064  * See the License for the specific language governing permissions
5065  * and limitations under the License.
5066  *
5067  * When distributing Covered Code, include this CDDL HEADER in each
5068  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5069  * If applicable, add the following below this CDDL HEADER, with the
5070  * fields enclosed by brackets "[]" replaced with your own identifying
5071  * information: Portions Copyright [yyyy] [name of copyright owner]
5072  *
5073  * CDDL HEADER END
5074  */
5075 /*	Copyright (c) 1988 AT&T	*/
5076 /*	  All Rights Reserved  	*/
5077 
5078 
5079 /*
5080  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
5081  * Use is subject to license terms.
5082  */
5083 
5084 
5085 
5086 
5087 
5088 #pragma ident "%Z%%M%	%I%	%E% SMI"
5089 
5090 /*
5091  * Error codes
5092  */
5093 
5094 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
5095 /*
5096  * CDDL HEADER START
5097  *
5098  * The contents of this file are subject to the terms of the
5099  * Common Development and Distribution License, Version 1.0 only
5100  * (the "License").  You may not use this file except in compliance
5101  * with the License.
5102  *
5103  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5104  * or http://www.opensolaris.org/os/licensing.
5105  * See the License for the specific language governing permissions
5106  * and limitations under the License.
5107  *
5108  * When distributing Covered Code, include this CDDL HEADER in each
5109  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5110  * If applicable, add the following below this CDDL HEADER, with the
5111  * fields enclosed by brackets "[]" replaced with your own identifying
5112  * information: Portions Copyright [yyyy] [name of copyright owner]
5113  *
5114  * CDDL HEADER END
5115  */
5116 /*
5117  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
5118  * Use is subject to license terms.
5119  */
5120 
5121 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
5122 /*	  All Rights Reserved  	*/
5123 
5124 /*
5125  * University Copyright- Copyright (c) 1982, 1986, 1988
5126  * The Regents of the University of California
5127  * All Rights Reserved
5128  *
5129  * University Acknowledgment- Portions of this document are derived from
5130  * software developed by the University of California, Berkeley, and its
5131  * contributors.
5132  */
5133 
5134 
5135 
5136 
5137 #pragma ident "%Z%%M%	%I%	%E% SMI"
5138 
5139 
5140 
5141 
5142 
5143 /*
5144  * Error codes
5145  */
5146 # 102 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
5147 /* Filesystem Quotas */
5148 
5149 
5150 /* Convergent Error Returns */
5151 # 116 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
5152 /* Interprocess Robust Locks */
5153 
5154 
5155 
5156 /* stream problems */
5157 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
5158 /* Interprocess Robust Locks */
5159 # 148 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
5160 /* shared library problems */
5161 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
5162 /* BSD Networking Software */
5163  /* argument errors */
5164 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
5165     /* protocol family */
5166 
5167 
5168  /* operational errors */
5169 
5170 
5171 
5172     /* of reset */
5173 
5174 
5175 
5176 
5177 
5178 /* XENIX has 135 - 142 */
5179 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
5180 /* SUN Network File System */
5181 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h" 2
5182 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h"
5183 extern int *___errno();
5184 # 35 "main.c" 2
5185 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/malloc.h" 1
5186 /*
5187  * CDDL HEADER START
5188  *
5189  * The contents of this file are subject to the terms of the
5190  * Common Development and Distribution License, Version 1.0 only
5191  * (the "License").  You may not use this file except in compliance
5192  * with the License.
5193  *
5194  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5195  * or http://www.opensolaris.org/os/licensing.
5196  * See the License for the specific language governing permissions
5197  * and limitations under the License.
5198  *
5199  * When distributing Covered Code, include this CDDL HEADER in each
5200  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5201  * If applicable, add the following below this CDDL HEADER, with the
5202  * fields enclosed by brackets "[]" replaced with your own identifying
5203  * information: Portions Copyright [yyyy] [name of copyright owner]
5204  *
5205  * CDDL HEADER END
5206  */
5207 /*
5208  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5209  */
5210 /*	Copyright (c) 1988 AT&T	*/
5211 /*	  All Rights Reserved  	*/
5212 
5213 
5214 
5215 
5216 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
5217 /*
5218  * CDDL HEADER START
5219  *
5220  * The contents of this file are subject to the terms of the
5221  * Common Development and Distribution License (the "License").
5222  * You may not use this file except in compliance with the License.
5223  *
5224  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5225  * or http://www.opensolaris.org/os/licensing.
5226  * See the License for the specific language governing permissions
5227  * and limitations under the License.
5228  *
5229  * When distributing Covered Code, include this CDDL HEADER in each
5230  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5231  * If applicable, add the following below this CDDL HEADER, with the
5232  * fields enclosed by brackets "[]" replaced with your own identifying
5233  * information: Portions Copyright [yyyy] [name of copyright owner]
5234  *
5235  * CDDL HEADER END
5236  */
5237 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
5238 /*	  All Rights Reserved  	*/
5239 
5240 
5241 /*
5242  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
5243  * Use is subject to license terms.
5244  *
5245  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
5246  * Copyright 2016 Joyent, Inc.
5247  */
5248 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/malloc.h" 2
5249 
5250 
5251 
5252 
5253 
5254 /*
5255  *	Constants defining mallopt operations
5256  */
5257 
5258 
5259 
5260     /* small blocks */
5261 
5262     /* until another allocation */
5263 /*
5264  *	structure filled by
5265  */
5266 struct mallinfo {
5267  unsigned long arena; /* total space in arena */
5268  unsigned long ordblks; /* number of ordinary blocks */
5269  unsigned long smblks; /* number of small blocks */
5270  unsigned long hblks; /* number of holding blocks */
5271  unsigned long hblkhd; /* space in holding block headers */
5272  unsigned long usmblks; /* space in small blocks in use */
5273  unsigned long fsmblks; /* space in free small blocks */
5274  unsigned long uordblks; /* space in ordinary blocks in use */
5275  unsigned long fordblks; /* space in free ordinary blocks */
5276  unsigned long keepcost; /* cost of enabling keep option */
5277 };
5278 
5279 
5280 
5281 
5282 
5283 
5284 
5285 void *malloc(size_t);
5286 void free(void *);
5287 void *realloc(void *, size_t);
5288 void *calloc(size_t, size_t);
5289 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/malloc.h"
5290 int mallopt(int, int);
5291 struct mallinfo mallinfo(void);
5292 # 36 "main.c" 2
5293 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1
5294 /*
5295  * CDDL HEADER START
5296  *
5297  * The contents of this file are subject to the terms of the
5298  * Common Development and Distribution License (the "License").
5299  * You may not use this file except in compliance with the License.
5300  *
5301  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5302  * or http://www.opensolaris.org/os/licensing.
5303  * See the License for the specific language governing permissions
5304  * and limitations under the License.
5305  *
5306  * When distributing Covered Code, include this CDDL HEADER in each
5307  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5308  * If applicable, add the following below this CDDL HEADER, with the
5309  * fields enclosed by brackets "[]" replaced with your own identifying
5310  * information: Portions Copyright [yyyy] [name of copyright owner]
5311  *
5312  * CDDL HEADER END
5313  */
5314 
5315 /*
5316  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5317  * Copyright (c) 2013 Gary Mills
5318  *
5319  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
5320  */
5321 
5322 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
5323 
5324 /*	Copyright (c) 1988 AT&T	*/
5325 /*	  All Rights Reserved  	*/
5326 
5327 
5328 
5329 
5330 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 1
5331 /*
5332  * CDDL HEADER START
5333  *
5334  * The contents of this file are subject to the terms of the
5335  * Common Development and Distribution License, Version 1.0 only
5336  * (the "License").  You may not use this file except in compliance
5337  * with the License.
5338  *
5339  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5340  * or http://www.opensolaris.org/os/licensing.
5341  * See the License for the specific language governing permissions
5342  * and limitations under the License.
5343  *
5344  * When distributing Covered Code, include this CDDL HEADER in each
5345  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5346  * If applicable, add the following below this CDDL HEADER, with the
5347  * fields enclosed by brackets "[]" replaced with your own identifying
5348  * information: Portions Copyright [yyyy] [name of copyright owner]
5349  *
5350  * CDDL HEADER END
5351  */
5352 /*
5353  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5354  * Copyright 2014 PALO, Richard.
5355  *
5356  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5357  * Use is subject to license terms.
5358  */
5359 
5360 /*	Copyright (c) 1988 AT&T	*/
5361 /*	  All Rights Reserved  	*/
5362 
5363 
5364 /*
5365  * An application should not include this header directly.  Instead it
5366  * should be included only through the inclusion of other Sun headers.
5367  *
5368  * The contents of this header is limited to identifiers specified in the
5369  * C Standard.  Any new identifiers specified in future amendments to the
5370  * C Standard must be placed in this header.  If these new identifiers
5371  * are required to also be in the C++ Standard "std" namespace, then for
5372  * anything other than macro definitions, corresponding "using" directives
5373  * must also be added to <locale.h>.
5374  */
5375 
5376 
5377 
5378 
5379 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5380 /*
5381  * CDDL HEADER START
5382  *
5383  * The contents of this file are subject to the terms of the
5384  * Common Development and Distribution License (the "License").
5385  * You may not use this file except in compliance with the License.
5386  *
5387  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5388  * or http://www.opensolaris.org/os/licensing.
5389  * See the License for the specific language governing permissions
5390  * and limitations under the License.
5391  *
5392  * When distributing Covered Code, include this CDDL HEADER in each
5393  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5394  * If applicable, add the following below this CDDL HEADER, with the
5395  * fields enclosed by brackets "[]" replaced with your own identifying
5396  * information: Portions Copyright [yyyy] [name of copyright owner]
5397  *
5398  * CDDL HEADER END
5399  */
5400 
5401 /*
5402  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5403  * Copyright 2016 Joyent, Inc.
5404  *
5405  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5406  * Use is subject to license terms.
5407  */
5408 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
5409 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
5410 /*
5411  * This file and its contents are supplied under the terms of the
5412  * Common Development and Distribution License ("CDDL"), version 1.0.
5413  * You may only use this file in accordance with the terms of version
5414  * 1.0 of the CDDL.
5415  *
5416  * A full copy of the text of the CDDL should have accompanied this
5417  * source.  A copy of the CDDL is also available via the Internet at
5418  * http://www.illumos.org/license/CDDL.
5419  */
5420 
5421 /*
5422  * Copyright 2014-2016 PALO, Richard.
5423  */
5424 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
5425 
5426 
5427 
5428 
5429 
5430 unsigned char __mb_cur_max(void);
5431 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
5432 typedef struct {
5433  int quot;
5434  int rem;
5435 } div_t;
5436 
5437 typedef struct {
5438  long quot;
5439  long rem;
5440 } ldiv_t;
5441 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
5442 /*
5443  * wchar_t is a built-in type in standard C++ and as such is not
5444  * defined here when using standard C++. However, the GNU compiler
5445  * fixincludes utility nonetheless creates its own version of this
5446  * header for use by gcc and g++. In that version it adds a redundant
5447  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
5448  * header we need to include the following magic comment:
5449  *
5450  * we must use the C++ compiler's type
5451  *
5452  * The above comment should not be removed or changed until GNU
5453  * gcc/fixinc/inclhack.def is updated to bypass this header.
5454  */
5455 
5456 
5457 
5458 
5459 
5460 
5461 typedef long wchar_t;
5462 # 120 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
5463 extern void abort(void) __attribute__((__noreturn__));
5464 extern int abs(int);
5465 extern int atexit(void (*)(void));
5466 extern double atof(const char *);
5467 extern int atoi(const char *);
5468 extern long int atol(const char *);
5469 extern void *bsearch(const void *, const void *, size_t, size_t,
5470  int (*)(const void *, const void *));
5471 
5472 
5473 
5474 
5475 
5476 
5477 extern void *calloc(size_t, size_t);
5478 extern div_t div(int, int);
5479 extern void exit(int)
5480  __attribute__((__noreturn__));
5481 extern void free(void *);
5482 extern char *getenv(const char *);
5483 extern long int labs(long);
5484 extern ldiv_t ldiv(long, long);
5485 extern void *malloc(size_t);
5486 extern int mblen(const char *, size_t);
5487 extern size_t mbstowcs(wchar_t *, const char *,
5488  size_t);
5489 extern int mbtowc(wchar_t *, const char *, size_t);
5490 extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
5491 
5492 
5493 
5494 
5495 
5496 extern int rand(void);
5497 extern void *realloc(void *, size_t);
5498 extern void srand(unsigned int);
5499 extern double strtod(const char *, char **);
5500 extern long int strtol(const char *, char **, int);
5501 extern unsigned long int strtoul(const char *,
5502  char **, int);
5503 extern int system(const char *);
5504 extern int wctomb(char *, wchar_t);
5505 extern size_t wcstombs(char *, const wchar_t *,
5506  size_t);
5507 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
5508 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 1
5509 /*
5510  * CDDL HEADER START
5511  *
5512  * The contents of this file are subject to the terms of the
5513  * Common Development and Distribution License, Version 1.0 only
5514  * (the "License").  You may not use this file except in compliance
5515  * with the License.
5516  *
5517  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5518  * or http://www.opensolaris.org/os/licensing.
5519  * See the License for the specific language governing permissions
5520  * and limitations under the License.
5521  *
5522  * When distributing Covered Code, include this CDDL HEADER in each
5523  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5524  * If applicable, add the following below this CDDL HEADER, with the
5525  * fields enclosed by brackets "[]" replaced with your own identifying
5526  * information: Portions Copyright [yyyy] [name of copyright owner]
5527  *
5528  * CDDL HEADER END
5529  */
5530 /*
5531  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5532  *
5533  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5534  * Use is subject to license terms.
5535  */
5536 
5537 /*
5538  * An application should not include this header directly.  Instead it
5539  * should be included only through the inclusion of other Sun headers.
5540  *
5541  * The contents of this header is limited to identifiers specified in
5542  * the C99 standard and in conflict with the C++ implementation of the
5543  * standard header.  The C++ standard may adopt the C99 standard at
5544  * which point it is expected that the symbols included here will
5545  * become part of the C++ std namespace.
5546  */
5547 
5548 
5549 
5550 
5551 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5552 /*
5553  * CDDL HEADER START
5554  *
5555  * The contents of this file are subject to the terms of the
5556  * Common Development and Distribution License (the "License").
5557  * You may not use this file except in compliance with the License.
5558  *
5559  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5560  * or http://www.opensolaris.org/os/licensing.
5561  * See the License for the specific language governing permissions
5562  * and limitations under the License.
5563  *
5564  * When distributing Covered Code, include this CDDL HEADER in each
5565  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5566  * If applicable, add the following below this CDDL HEADER, with the
5567  * fields enclosed by brackets "[]" replaced with your own identifying
5568  * information: Portions Copyright [yyyy] [name of copyright owner]
5569  *
5570  * CDDL HEADER END
5571  */
5572 
5573 /*
5574  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5575  * Copyright 2016 Joyent, Inc.
5576  *
5577  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5578  * Use is subject to license terms.
5579  */
5580 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 2
5581 
5582 
5583 
5584 
5585 
5586 /*
5587  * The following have been added as a result of the ISO/IEC 9899:1999
5588  * standard. For a strictly conforming C application, visibility is
5589  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
5590  * For non-strictly conforming C applications, there are no restrictions
5591  * on the C namespace.
5592  */
5593 
5594 
5595 typedef struct {
5596  long long quot;
5597  long long rem;
5598 } lldiv_t;
5599 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h"
5600 extern void _Exit(int);
5601 extern float strtof(const char *, char **);
5602 extern long double strtold(const char *, char **);
5603 
5604 
5605 extern long long atoll(const char *);
5606 extern long long llabs(long long);
5607 extern lldiv_t lldiv(long long, long long);
5608 extern long long strtoll(const char *, char **,
5609  int);
5610 extern unsigned long long strtoull(const char *,
5611  char **, int);
5612 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
5613 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 1
5614 /*
5615  * This file and its contents are supplied under the terms of the
5616  * Common Development and Distribution License ("CDDL"), version 1.0.
5617  * You may only use this file in accordance with the terms of version
5618  * 1.0 of the CDDL.
5619  *
5620  * A full copy of the text of the CDDL should have accompanied this
5621  * source.  A copy of the CDDL is also available via the Internet at
5622  * http://www.illumos.org/license/CDDL.
5623  */
5624 
5625 /*
5626  * Copyright 2016 Joyent, Inc.
5627  */
5628 
5629 /*
5630  * An application should not include this header directly.  Instead it
5631  * should be included only through the inclusion of other illumos headers.
5632  *
5633  * The contents of this header is limited to identifiers specified in
5634  * the C11 standard and in conflict with the C++ implementation of the
5635  * standard header.  The C++ standard may adopt the C11 standard at
5636  * which point it is expected that the symbols included here will
5637  * become part of the C++ std namespace.
5638  */
5639 
5640 
5641 
5642 
5643 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5644 /*
5645  * CDDL HEADER START
5646  *
5647  * The contents of this file are subject to the terms of the
5648  * Common Development and Distribution License (the "License").
5649  * You may not use this file except in compliance with the License.
5650  *
5651  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5652  * or http://www.opensolaris.org/os/licensing.
5653  * See the License for the specific language governing permissions
5654  * and limitations under the License.
5655  *
5656  * When distributing Covered Code, include this CDDL HEADER in each
5657  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5658  * If applicable, add the following below this CDDL HEADER, with the
5659  * fields enclosed by brackets "[]" replaced with your own identifying
5660  * information: Portions Copyright [yyyy] [name of copyright owner]
5661  *
5662  * CDDL HEADER END
5663  */
5664 
5665 /*
5666  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5667  * Copyright 2016 Joyent, Inc.
5668  *
5669  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5670  * Use is subject to license terms.
5671  */
5672 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 2
5673 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
5674 /*
5675  * The following have been added as a result of the ISO/IEC 9899:2011
5676  * standard. For a strictly conforming C application, visibility is
5677  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
5678  * For non-strictly conforming C applications, there are no restrictions
5679  * on the C namespace.
5680  */
5681 
5682 /*
5683  * Work around fix-includes and other bad actors with using multiple headers.
5684  */
5685 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
5686 extern void *aligned_alloc(size_t, size_t);
5687 extern int at_quick_exit(void (*)(void));
5688 extern void quick_exit(int);
5689 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
5690 
5691 
5692 
5693 
5694 
5695 /*
5696  * Allow global visibility for symbols defined in
5697  * C++ "std" namespace in <iso/stdlib_iso.h>.
5698  */
5699 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5700 /*
5701  * Allow global visibility for symbols defined in
5702  * C++ "std" namespace in <iso/stdlib_c11.h>.
5703  */
5704 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5705 /* large file compilation environment setup */
5706 
5707 
5708 
5709 
5710 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5711 #pragma redefine_extname mkstemp mkstemp64
5712 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5713 
5714 
5715 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5716 #pragma redefine_extname mkstemps mkstemps64
5717 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5718 
5719 
5720 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5721 #pragma redefine_extname mkostemp mkostemp64
5722 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5723 
5724 
5725 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5726 #pragma redefine_extname mkostemps mkostemps64
5727 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5728 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5729 /* In the LP64 compilation environment, all APIs are already large file */
5730 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5731 extern int rand_r(unsigned int *);
5732 
5733 
5734 extern void _exithandle(void);
5735 
5736 
5737 
5738 
5739 extern double drand48(void);
5740 extern double erand48(unsigned short *);
5741 extern long jrand48(unsigned short *);
5742 extern void lcong48(unsigned short *);
5743 extern long lrand48(void);
5744 extern long mrand48(void);
5745 extern long nrand48(unsigned short *);
5746 extern unsigned short *seed48(unsigned short *);
5747 extern void srand48(long);
5748 extern int putenv(char *);
5749 extern void setkey(const char *);
5750 
5751 
5752 /*
5753  * swab() has historically been in <stdlib.h> as delivered from AT&T
5754  * and continues to be visible in the default compilation environment.
5755  * As of Issue 4 of the X/Open Portability Guides, swab() was declared
5756  * in <unistd.h>. As a result, with respect to X/Open namespace the
5757  * swab() declaration in this header is only visible for the XPG3
5758  * environment.
5759  */
5760 # 182 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5761 extern void swab(const char *, char *, ssize_t);
5762 
5763 
5764 
5765 
5766 
5767 extern int mkstemp(char *);
5768 
5769 extern int mkstemps(char *, int);
5770 
5771 
5772 
5773 
5774 
5775 extern int mkstemp64(char *);
5776 
5777 extern int mkstemps64(char *, int);
5778 
5779 
5780 
5781 
5782 extern char *mkdtemp(char *);
5783 
5784 
5785 
5786 extern int mkostemp(char *, int);
5787 extern int mkostemps(char *, int, int);
5788 
5789 
5790 extern int mkostemp64(char *, int);
5791 extern int mkostemps64(char *, int, int);
5792 
5793 
5794 
5795 
5796 
5797 
5798 extern long a64l(const char *);
5799 extern char *ecvt(double, int, int *, int *);
5800 extern char *fcvt(double, int, int *, int *);
5801 extern char *gcvt(double, int, char *);
5802 extern int getsubopt(char **, char *const *, char **);
5803 extern int grantpt(int);
5804 extern char *initstate(unsigned, char *, size_t);
5805 extern char *l64a(long);
5806 extern char *mktemp(char *);
5807 extern char *ptsname(int);
5808 extern long random(void);
5809 extern char *realpath(const char *, char *);
5810 extern char *setstate(const char *);
5811 extern void srandom(unsigned);
5812 extern int unlockpt(int);
5813 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
5814 
5815 extern int ttyslot(void);
5816 extern void *valloc(size_t);
5817 
5818 
5819 
5820 
5821 
5822 
5823 extern int posix_memalign(void **, size_t, size_t);
5824 extern int posix_openpt(int);
5825 extern int setenv(const char *, const char *, int);
5826 extern int unsetenv(const char *);
5827 
5828 
5829 
5830 
5831 extern char *canonicalize_file_name(const char *);
5832 extern int clearenv(void);
5833 extern void closefrom(int);
5834 extern int daemon(int, int);
5835 extern int dup2(int, int);
5836 extern int dup3(int, int, int);
5837 extern int fdwalk(int (*)(void *, int), void *);
5838 extern char *qecvt(long double, int, int *, int *);
5839 extern char *qfcvt(long double, int, int *, int *);
5840 extern char *qgcvt(long double, int, char *);
5841 extern char *getcwd(char *, size_t);
5842 extern const char *getexecname(void);
5843 
5844 
5845 
5846 
5847 
5848 
5849 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5850 #pragma redefine_extname getlogin getloginx
5851 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5852 
5853 
5854 
5855 
5856 
5857 
5858 extern char *getlogin(void);
5859 
5860 
5861 extern int getopt(int, char *const *, const char *);
5862 extern char *optarg;
5863 extern int optind, opterr, optopt;
5864 extern char *getpass(const char *);
5865 extern char *getpassphrase(const char *);
5866 extern int getpw(uid_t, char *);
5867 extern int isatty(int);
5868 extern void *memalign(size_t, size_t);
5869 extern char *ttyname(int);
5870 extern char *mkdtemp(char *);
5871 extern const char *getprogname(void);
5872 extern void setprogname(const char *);
5873 
5874 
5875 extern char *lltostr(long long, char *);
5876 extern char *ulltostr(unsigned long long, char *);
5877 
5878 
5879 
5880 
5881 /* OpenBSD compatibility functions */
5882 
5883 
5884 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 1
5885 /*
5886  * CDDL HEADER START
5887  *
5888  * The contents of this file are subject to the terms of the
5889  * Common Development and Distribution License, Version 1.0 only
5890  * (the "License").  You may not use this file except in compliance
5891  * with the License.
5892  *
5893  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5894  * or http://www.opensolaris.org/os/licensing.
5895  * See the License for the specific language governing permissions
5896  * and limitations under the License.
5897  *
5898  * When distributing Covered Code, include this CDDL HEADER in each
5899  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5900  * If applicable, add the following below this CDDL HEADER, with the
5901  * fields enclosed by brackets "[]" replaced with your own identifying
5902  * information: Portions Copyright [yyyy] [name of copyright owner]
5903  *
5904  * CDDL HEADER END
5905  */
5906 /*
5907  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5908  *
5909  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5910  * Use is subject to license terms.
5911  */
5912 
5913 
5914 
5915 
5916 /*
5917  * This file, <inttypes.h>, is specified by the ISO C standard,
5918  * standard, ISO/IEC 9899:1999 Programming language - C and is
5919  * also defined by SUSv3.
5920  *
5921  * ISO	  International Organization for Standardization.
5922  * SUSv3  Single Unix Specification, Version 3
5923  */
5924 
5925 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5926 /*
5927  * CDDL HEADER START
5928  *
5929  * The contents of this file are subject to the terms of the
5930  * Common Development and Distribution License (the "License").
5931  * You may not use this file except in compliance with the License.
5932  *
5933  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5934  * or http://www.opensolaris.org/os/licensing.
5935  * See the License for the specific language governing permissions
5936  * and limitations under the License.
5937  *
5938  * When distributing Covered Code, include this CDDL HEADER in each
5939  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5940  * If applicable, add the following below this CDDL HEADER, with the
5941  * fields enclosed by brackets "[]" replaced with your own identifying
5942  * information: Portions Copyright [yyyy] [name of copyright owner]
5943  *
5944  * CDDL HEADER END
5945  */
5946 
5947 /*
5948  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5949  * Copyright 2016 Joyent, Inc.
5950  *
5951  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5952  * Use is subject to license terms.
5953  */
5954 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
5955 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 1
5956 /*
5957  * CDDL HEADER START
5958  *
5959  * The contents of this file are subject to the terms of the
5960  * Common Development and Distribution License, Version 1.0 only
5961  * (the "License").  You may not use this file except in compliance
5962  * with the License.
5963  *
5964  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5965  * or http://www.opensolaris.org/os/licensing.
5966  * See the License for the specific language governing permissions
5967  * and limitations under the License.
5968  *
5969  * When distributing Covered Code, include this CDDL HEADER in each
5970  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5971  * If applicable, add the following below this CDDL HEADER, with the
5972  * fields enclosed by brackets "[]" replaced with your own identifying
5973  * information: Portions Copyright [yyyy] [name of copyright owner]
5974  *
5975  * CDDL HEADER END
5976  */
5977 /*
5978  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
5979  * Use is subject to license terms.
5980  */
5981 
5982 
5983 
5984 
5985 #pragma ident "%Z%%M%	%I%	%E% SMI"
5986 
5987 /*
5988  * This header, <sys/inttypes.h>, contains (through nested inclusion) the
5989  * vast majority of the facilities specified for <inttypes.h> as defined
5990  * by the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
5991  *
5992  * Kernel/Driver developers are encouraged to include this file to access
5993  * the fixed size types, limits and utility macros. Application developers
5994  * should use the standard defined header <inttypes.h>.
5995  */
5996 
5997 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5998 /*
5999  * CDDL HEADER START
6000  *
6001  * The contents of this file are subject to the terms of the
6002  * Common Development and Distribution License (the "License").
6003  * You may not use this file except in compliance with the License.
6004  *
6005  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6006  * or http://www.opensolaris.org/os/licensing.
6007  * See the License for the specific language governing permissions
6008  * and limitations under the License.
6009  *
6010  * When distributing Covered Code, include this CDDL HEADER in each
6011  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6012  * If applicable, add the following below this CDDL HEADER, with the
6013  * fields enclosed by brackets "[]" replaced with your own identifying
6014  * information: Portions Copyright [yyyy] [name of copyright owner]
6015  *
6016  * CDDL HEADER END
6017  */
6018 
6019 /*
6020  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6021  * Copyright 2016 Joyent, Inc.
6022  *
6023  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6024  * Use is subject to license terms.
6025  */
6026 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6027 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
6028 /*
6029  * CDDL HEADER START
6030  *
6031  * The contents of this file are subject to the terms of the
6032  * Common Development and Distribution License, Version 1.0 only
6033  * (the "License").  You may not use this file except in compliance
6034  * with the License.
6035  *
6036  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6037  * or http://www.opensolaris.org/os/licensing.
6038  * See the License for the specific language governing permissions
6039  * and limitations under the License.
6040  *
6041  * When distributing Covered Code, include this CDDL HEADER in each
6042  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6043  * If applicable, add the following below this CDDL HEADER, with the
6044  * fields enclosed by brackets "[]" replaced with your own identifying
6045  * information: Portions Copyright [yyyy] [name of copyright owner]
6046  *
6047  * CDDL HEADER END
6048  */
6049 /*
6050  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6051  *
6052  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6053  * Use is subject to license terms.
6054  */
6055 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6056 
6057 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
6058 /*
6059  * CDDL HEADER START
6060  *
6061  * The contents of this file are subject to the terms of the
6062  * Common Development and Distribution License, Version 1.0 only
6063  * (the "License").  You may not use this file except in compliance
6064  * with the License.
6065  *
6066  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6067  * or http://www.opensolaris.org/os/licensing.
6068  * See the License for the specific language governing permissions
6069  * and limitations under the License.
6070  *
6071  * When distributing Covered Code, include this CDDL HEADER in each
6072  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6073  * If applicable, add the following below this CDDL HEADER, with the
6074  * fields enclosed by brackets "[]" replaced with your own identifying
6075  * information: Portions Copyright [yyyy] [name of copyright owner]
6076  *
6077  * CDDL HEADER END
6078  */
6079 /*
6080  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6081  *
6082  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6083  * Use is subject to license terms.
6084  */
6085 
6086 
6087 
6088 
6089 /*
6090  * This file, <sys/int_limits.h>, is part of the Sun Microsystems implementation
6091  * of <inttypes.h> as defined in the ISO C standard, ISO/IEC 9899:1999
6092  * Programming language - C.
6093  *
6094  * Programs/Modules should not directly include this file.  Access to the
6095  * types defined in this file should be through the inclusion of one of the
6096  * following files:
6097  *
6098  *	<limits.h>		This nested inclusion is disabled for strictly
6099  *				ANSI-C conforming compilations.  The *_MIN
6100  *				definitions are not visible to POSIX or XPG
6101  *				conforming applications (due to what may be
6102  *				a bug in the specification - this is under
6103  *				investigation)
6104  *
6105  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
6106  *				components of <inttypes.h>.
6107  *
6108  *	<inttypes.h>		For use by applications.
6109  *
6110  * See these files for more details.
6111  */
6112 
6113 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6114 /*
6115  * CDDL HEADER START
6116  *
6117  * The contents of this file are subject to the terms of the
6118  * Common Development and Distribution License (the "License").
6119  * You may not use this file except in compliance with the License.
6120  *
6121  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6122  * or http://www.opensolaris.org/os/licensing.
6123  * See the License for the specific language governing permissions
6124  * and limitations under the License.
6125  *
6126  * When distributing Covered Code, include this CDDL HEADER in each
6127  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6128  * If applicable, add the following below this CDDL HEADER, with the
6129  * fields enclosed by brackets "[]" replaced with your own identifying
6130  * information: Portions Copyright [yyyy] [name of copyright owner]
6131  *
6132  * CDDL HEADER END
6133  */
6134 
6135 /*
6136  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6137  * Copyright 2016 Joyent, Inc.
6138  *
6139  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6140  * Use is subject to license terms.
6141  */
6142 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 2
6143 
6144 
6145 
6146 
6147 
6148 /*
6149  * Limits
6150  *
6151  * The following define the limits for the types defined in <sys/int_types.h>.
6152  *
6153  * INTMAX_MIN (minimum value of the largest supported signed integer type),
6154  * INTMAX_MAX (maximum value of the largest supported signed integer type),
6155  * and UINTMAX_MAX (maximum value of the largest supported unsigned integer
6156  * type) can be set to implementation defined limits.
6157  *
6158  * NOTE : A programmer can test to see whether an implementation supports
6159  * a particular size of integer by testing if the macro that gives the
6160  * maximum for that datatype is defined. For example, if #ifdef UINT64_MAX
6161  * tests false, the implementation does not support unsigned 64 bit integers.
6162  *
6163  * The type of these macros is intentionally unspecified.
6164  *
6165  * The types int8_t, int_least8_t, and int_fast8_t are not defined for ISAs
6166  * where the ABI specifies "char" as unsigned when the translation mode is
6167  * not ANSI-C.
6168  */
6169 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
6170 /*
6171  * The following 2 macros are provided for testing whether the types
6172  * intptr_t and uintptr_t (integers large enough to hold a void *) are
6173  * defined in this header. They are needed in case the architecture can't
6174  * represent a pointer in any standard integral type.
6175  */
6176 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
6177 /* Maximum limits of ptrdiff_t defined in <sys/types.h> */
6178 
6179 
6180 
6181 
6182 
6183 
6184 /*
6185  * Maximum value of a "size_t".  SIZE_MAX was previously defined
6186  * in <limits.h>, however, the standards specify it be defined
6187  * in <stdint.h>. The <stdint.h> headers includes this header as
6188  * does <limits.h>. The value of SIZE_MAX should not deviate
6189  * from the value of ULONG_MAX defined <sys/types.h>.
6190  */
6191 
6192 
6193 
6194 
6195 
6196 
6197 /* Maximum limit of sig_atomic_t defined in <sys/types.h> */
6198 
6199 
6200 
6201 
6202 /*
6203  * Maximum limit of wchar_t. The WCHAR_* macros are also
6204  * defined in <iso/wchar_iso.h>, but inclusion of that header
6205  * will break ISO/IEC C namespace.
6206  */
6207 
6208 
6209 
6210 
6211 /* Maximum limit of wint_t */
6212 
6213 
6214 
6215 
6216 /*
6217  * It is probably a bug in the POSIX specification (IEEE-1003.1-1990) that
6218  * when including <limits.h> that the suffix _MAX is reserved but not the
6219  * suffix _MIN.  However, until that issue is resolved....
6220  */
6221 # 230 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
6222 /* Minimum value of a pointer-holding signed integer type */
6223 
6224 
6225 
6226 
6227 
6228 
6229 /* Minimum limits of ptrdiff_t defined in <sys/types.h> */
6230 
6231 
6232 
6233 
6234 
6235 
6236 /* Minimum limit of sig_atomic_t defined in <sys/types.h> */
6237 
6238 
6239 
6240 
6241 /*
6242  * Minimum limit of wchar_t. The WCHAR_* macros are also
6243  * defined in <iso/wchar_iso.h>, but inclusion of that header
6244  * will break ISO/IEC C namespace.
6245  */
6246 
6247 
6248 
6249 
6250 /* Minimum limit of wint_t */
6251 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6252 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
6253 /*
6254  * CDDL HEADER START
6255  *
6256  * The contents of this file are subject to the terms of the
6257  * Common Development and Distribution License, Version 1.0 only
6258  * (the "License").  You may not use this file except in compliance
6259  * with the License.
6260  *
6261  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6262  * or http://www.opensolaris.org/os/licensing.
6263  * See the License for the specific language governing permissions
6264  * and limitations under the License.
6265  *
6266  * When distributing Covered Code, include this CDDL HEADER in each
6267  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6268  * If applicable, add the following below this CDDL HEADER, with the
6269  * fields enclosed by brackets "[]" replaced with your own identifying
6270  * information: Portions Copyright [yyyy] [name of copyright owner]
6271  *
6272  * CDDL HEADER END
6273  */
6274 /*
6275  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6276  *
6277  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6278  * Use is subject to license terms.
6279  */
6280 
6281 
6282 
6283 
6284 /*
6285  * This file, <sys/int_const.h>, is part of the Sun Microsystems implementation
6286  * of <inttypes.h> as proposed in the ISO/JTC1/SC22/WG14 C committee's working
6287  * draft for the revision of the current ISO C standard, ISO/IEC 9899:1990
6288  * Programming language - C.
6289  *
6290  * Programs/Modules should not directly include this file.  Access to the
6291  * types defined in this file should be through the inclusion of one of the
6292  * following files:
6293  *
6294  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
6295  *				components of <inttypes.h>.
6296  *
6297  *	<inttypes.h>		For use by applications.
6298  *
6299  * See these files for more details.
6300  *
6301  * Use at your own risk.  This file will track the evolution of the revision
6302  * of the current ISO C standard.  As of February 1996, the committee is
6303  * squarely behind the fixed sized types.
6304  */
6305 
6306 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6307 /*
6308  * CDDL HEADER START
6309  *
6310  * The contents of this file are subject to the terms of the
6311  * Common Development and Distribution License (the "License").
6312  * You may not use this file except in compliance with the License.
6313  *
6314  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6315  * or http://www.opensolaris.org/os/licensing.
6316  * See the License for the specific language governing permissions
6317  * and limitations under the License.
6318  *
6319  * When distributing Covered Code, include this CDDL HEADER in each
6320  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6321  * If applicable, add the following below this CDDL HEADER, with the
6322  * fields enclosed by brackets "[]" replaced with your own identifying
6323  * information: Portions Copyright [yyyy] [name of copyright owner]
6324  *
6325  * CDDL HEADER END
6326  */
6327 
6328 /*
6329  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6330  * Copyright 2016 Joyent, Inc.
6331  *
6332  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6333  * Use is subject to license terms.
6334  */
6335 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 2
6336 
6337 
6338 
6339 
6340 
6341 /*
6342  * Constants
6343  *
6344  * The following macros create constants of the types defined in
6345  * <sys/int_types.h>. The intent is that:
6346  *	Constants defined using these macros have a specific size and
6347  *	signedness. The suffix used for int64_t and uint64_t (ll and ull)
6348  *	are for examples only. Implementations are permitted to use other
6349  *	suffixes.
6350  *
6351  * The "CSTYLED" comments are flags to an internal code style analysis tool
6352  * telling it to silently accept the line which follows.  This internal
6353  * standard requires a space between arguments, but the historical,
6354  * non-ANSI-C ``method'' of concatenation can't tolerate those spaces.
6355  */
6356 /* CSTYLED */
6357 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
6358 /* CSTYLED */
6359 
6360 
6361 
6362 
6363 /* CSTYLED */
6364 
6365 /* CSTYLED */
6366 
6367 /* CSTYLED */
6368 
6369 
6370 
6371 
6372 
6373 
6374 /* CSTYLED */
6375 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
6376 /* CSTYLED */
6377 
6378 /* CSTYLED */
6379 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6380 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 1
6381 /*
6382  * CDDL HEADER START
6383  *
6384  * The contents of this file are subject to the terms of the
6385  * Common Development and Distribution License, Version 1.0 only
6386  * (the "License").  You may not use this file except in compliance
6387  * with the License.
6388  *
6389  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6390  * or http://www.opensolaris.org/os/licensing.
6391  * See the License for the specific language governing permissions
6392  * and limitations under the License.
6393  *
6394  * When distributing Covered Code, include this CDDL HEADER in each
6395  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6396  * If applicable, add the following below this CDDL HEADER, with the
6397  * fields enclosed by brackets "[]" replaced with your own identifying
6398  * information: Portions Copyright [yyyy] [name of copyright owner]
6399  *
6400  * CDDL HEADER END
6401  */
6402 /*
6403  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6404  *
6405  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6406  * Use is subject to license terms.
6407  */
6408 
6409 
6410 
6411 
6412 /*
6413  * This file, <sys/int_fmtio.h>, is part of the Sun Microsystems implementation
6414  * of <inttypes.h> as defined by the ISO C Standard, ISO/IEC 9899:1999
6415  * Programming language - C.
6416  *
6417  * ISO  International Organization for Standardization.
6418  *
6419  * Programs/Modules should not directly include this file.  Access to the
6420  * types defined in this file should be through the inclusion of one of the
6421  * following files:
6422  *
6423  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
6424  *				components of <inttypes.h>.
6425  *
6426  *	<inttypes.h>		For use by applications.
6427  *
6428  * See these files for more details.
6429  */
6430 
6431 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6432 /*
6433  * CDDL HEADER START
6434  *
6435  * The contents of this file are subject to the terms of the
6436  * Common Development and Distribution License (the "License").
6437  * You may not use this file except in compliance with the License.
6438  *
6439  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6440  * or http://www.opensolaris.org/os/licensing.
6441  * See the License for the specific language governing permissions
6442  * and limitations under the License.
6443  *
6444  * When distributing Covered Code, include this CDDL HEADER in each
6445  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6446  * If applicable, add the following below this CDDL HEADER, with the
6447  * fields enclosed by brackets "[]" replaced with your own identifying
6448  * information: Portions Copyright [yyyy] [name of copyright owner]
6449  *
6450  * CDDL HEADER END
6451  */
6452 
6453 /*
6454  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6455  * Copyright 2016 Joyent, Inc.
6456  *
6457  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6458  * Use is subject to license terms.
6459  */
6460 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 2
6461 
6462 
6463 
6464 
6465 
6466 /*
6467  * Formatted I/O
6468  *
6469  * The following macros can be used even when an implementation has not
6470  * extended the printf/scanf family of functions.
6471  *
6472  * The form of the names of the macros is either "PRI" for printf specifiers
6473  * or "SCN" for scanf specifiers, followed by the conversion specifier letter
6474  * followed by the datatype size. For example, PRId32 is the macro for
6475  * the printf d conversion specifier with the flags for 32 bit datatype.
6476  *
6477  * An example using one of these macros:
6478  *
6479  *	uint64_t u;
6480  *	printf("u = %016" PRIx64 "\n", u);
6481  *
6482  * For the purpose of example, the definitions of the printf/scanf macros
6483  * below have the values appropriate for a machine with 8 bit shorts, 16
6484  * bit shorts, 32 bit ints, 32 or 64 bit longs depending on compilation
6485  * mode, and 64 bit long longs.
6486  */
6487 
6488 /*
6489  * fprintf macros for signed integers
6490  */
6491 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6492 /*
6493  * fprintf macros for unsigned integers
6494  */
6495 # 227 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6496 /*
6497  * fprintf macros for pointers
6498  */
6499 # 247 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6500 /*
6501  * fscanf macros for signed integers
6502  */
6503 # 282 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6504 /*
6505  * fscanf macros for unsigned integers
6506  */
6507 # 349 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6508 /*
6509  * The following macros define I/O formats for intmax_t and uintmax_t.
6510  */
6511 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6512 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
6513 
6514 
6515 
6516 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 1
6517 /*
6518  * CDDL HEADER START
6519  *
6520  * The contents of this file are subject to the terms of the
6521  * Common Development and Distribution License, Version 1.0 only
6522  * (the "License").  You may not use this file except in compliance
6523  * with the License.
6524  *
6525  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6526  * or http://www.opensolaris.org/os/licensing.
6527  * See the License for the specific language governing permissions
6528  * and limitations under the License.
6529  *
6530  * When distributing Covered Code, include this CDDL HEADER in each
6531  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6532  * If applicable, add the following below this CDDL HEADER, with the
6533  * fields enclosed by brackets "[]" replaced with your own identifying
6534  * information: Portions Copyright [yyyy] [name of copyright owner]
6535  *
6536  * CDDL HEADER END
6537  */
6538 /*
6539  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
6540  * Use is subject to license terms.
6541  */
6542 
6543 
6544 
6545 
6546 #pragma ident "%Z%%M%	%I%	%E% SMI"
6547 
6548 /*
6549  * This header is included by <stdint.h> which was introduced by
6550  * the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
6551  * The header is a subset of the <inttypes.h> header.
6552  */
6553 
6554 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
6555 /*
6556  * CDDL HEADER START
6557  *
6558  * The contents of this file are subject to the terms of the
6559  * Common Development and Distribution License, Version 1.0 only
6560  * (the "License").  You may not use this file except in compliance
6561  * with the License.
6562  *
6563  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6564  * or http://www.opensolaris.org/os/licensing.
6565  * See the License for the specific language governing permissions
6566  * and limitations under the License.
6567  *
6568  * When distributing Covered Code, include this CDDL HEADER in each
6569  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6570  * If applicable, add the following below this CDDL HEADER, with the
6571  * fields enclosed by brackets "[]" replaced with your own identifying
6572  * information: Portions Copyright [yyyy] [name of copyright owner]
6573  *
6574  * CDDL HEADER END
6575  */
6576 /*
6577  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6578  *
6579  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6580  * Use is subject to license terms.
6581  */
6582 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6583 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
6584 /*
6585  * CDDL HEADER START
6586  *
6587  * The contents of this file are subject to the terms of the
6588  * Common Development and Distribution License, Version 1.0 only
6589  * (the "License").  You may not use this file except in compliance
6590  * with the License.
6591  *
6592  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6593  * or http://www.opensolaris.org/os/licensing.
6594  * See the License for the specific language governing permissions
6595  * and limitations under the License.
6596  *
6597  * When distributing Covered Code, include this CDDL HEADER in each
6598  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6599  * If applicable, add the following below this CDDL HEADER, with the
6600  * fields enclosed by brackets "[]" replaced with your own identifying
6601  * information: Portions Copyright [yyyy] [name of copyright owner]
6602  *
6603  * CDDL HEADER END
6604  */
6605 /*
6606  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6607  *
6608  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6609  * Use is subject to license terms.
6610  */
6611 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6612 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
6613 /*
6614  * CDDL HEADER START
6615  *
6616  * The contents of this file are subject to the terms of the
6617  * Common Development and Distribution License, Version 1.0 only
6618  * (the "License").  You may not use this file except in compliance
6619  * with the License.
6620  *
6621  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6622  * or http://www.opensolaris.org/os/licensing.
6623  * See the License for the specific language governing permissions
6624  * and limitations under the License.
6625  *
6626  * When distributing Covered Code, include this CDDL HEADER in each
6627  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6628  * If applicable, add the following below this CDDL HEADER, with the
6629  * fields enclosed by brackets "[]" replaced with your own identifying
6630  * information: Portions Copyright [yyyy] [name of copyright owner]
6631  *
6632  * CDDL HEADER END
6633  */
6634 /*
6635  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6636  *
6637  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6638  * Use is subject to license terms.
6639  */
6640 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6641 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
6642 
6643 
6644 
6645 
6646 
6647 
6648 /* Inclusion of <stddef.h> breaks namespace, therefore define wchar_t */
6649 
6650 /*
6651  * wchar_t is a built-in type in standard C++ and as such is not
6652  * defined here when using standard C++. However, the GNU compiler
6653  * fixincludes utility nonetheless creates its own version of this
6654  * header for use by gcc and g++. In that version it adds a redundant
6655  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
6656  * header we need to include the following magic comment:
6657  *
6658  * we must use the C++ compiler's type
6659  *
6660  * The above comment should not be removed or changed until GNU
6661  * gcc/fixinc/inclhack.def is updated to bypass this header.
6662  */
6663 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
6664 typedef struct {
6665  intmax_t quot;
6666  intmax_t rem;
6667 } imaxdiv_t;
6668 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
6669 extern intmax_t imaxabs(intmax_t);
6670 extern imaxdiv_t imaxdiv(intmax_t, intmax_t);
6671 extern intmax_t strtoimax(const char *, char **,
6672  int);
6673 extern uintmax_t strtoumax(const char *, char **,
6674  int);
6675 extern intmax_t wcstoimax(const wchar_t *,
6676  wchar_t **, int);
6677 extern uintmax_t wcstoumax(const wchar_t *,
6678  wchar_t **, int);
6679 # 302 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
6680 extern uint32_t arc4random(void);
6681 extern void arc4random_buf(void *, size_t);
6682 extern uint32_t arc4random_uniform(uint32_t);
6683 extern void freezero(void *, size_t);
6684 extern void *recallocarray(void *, size_t, size_t, size_t);
6685 # 37 "main.c" 2
6686 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 1
6687 /*
6688  * CDDL HEADER START
6689  *
6690  * The contents of this file are subject to the terms of the
6691  * Common Development and Distribution License (the "License").
6692  * You may not use this file except in compliance with the License.
6693  *
6694  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6695  * or http://www.opensolaris.org/os/licensing.
6696  * See the License for the specific language governing permissions
6697  * and limitations under the License.
6698  *
6699  * When distributing Covered Code, include this CDDL HEADER in each
6700  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6701  * If applicable, add the following below this CDDL HEADER, with the
6702  * fields enclosed by brackets "[]" replaced with your own identifying
6703  * information: Portions Copyright [yyyy] [name of copyright owner]
6704  *
6705  * CDDL HEADER END
6706  */
6707 
6708 /*
6709  * Copyright 2014 PALO, Richard.
6710  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6711  * Copyright (c) 2013 Gary Mills
6712  *
6713  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
6714  */
6715 
6716 /*	Copyright (c) 1988 AT&T	*/
6717 /*	  All Rights Reserved  	*/
6718 
6719 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
6720 
6721 
6722 
6723 
6724 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6725 /*
6726  * CDDL HEADER START
6727  *
6728  * The contents of this file are subject to the terms of the
6729  * Common Development and Distribution License (the "License").
6730  * You may not use this file except in compliance with the License.
6731  *
6732  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6733  * or http://www.opensolaris.org/os/licensing.
6734  * See the License for the specific language governing permissions
6735  * and limitations under the License.
6736  *
6737  * When distributing Covered Code, include this CDDL HEADER in each
6738  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6739  * If applicable, add the following below this CDDL HEADER, with the
6740  * fields enclosed by brackets "[]" replaced with your own identifying
6741  * information: Portions Copyright [yyyy] [name of copyright owner]
6742  *
6743  * CDDL HEADER END
6744  */
6745 
6746 /*
6747  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6748  * Copyright 2016 Joyent, Inc.
6749  *
6750  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6751  * Use is subject to license terms.
6752  */
6753 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6754 
6755 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
6756 /*
6757  * This file and its contents are supplied under the terms of the
6758  * Common Development and Distribution License ("CDDL"), version 1.0.
6759  * You may only use this file in accordance with the terms of version
6760  * 1.0 of the CDDL.
6761  *
6762  * A full copy of the text of the CDDL should have accompanied this
6763  * source.  A copy of the CDDL is also available via the Internet at
6764  * http://www.illumos.org/license/CDDL.
6765  */
6766 
6767 /*
6768  * Copyright 2014-2016 PALO, Richard.
6769  */
6770 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6771 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6772 /*
6773  * CDDL HEADER START
6774  *
6775  * The contents of this file are subject to the terms of the
6776  * Common Development and Distribution License (the "License").
6777  * You may not use this file except in compliance with the License.
6778  *
6779  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6780  * or http://www.opensolaris.org/os/licensing.
6781  * See the License for the specific language governing permissions
6782  * and limitations under the License.
6783  *
6784  * When distributing Covered Code, include this CDDL HEADER in each
6785  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6786  * If applicable, add the following below this CDDL HEADER, with the
6787  * fields enclosed by brackets "[]" replaced with your own identifying
6788  * information: Portions Copyright [yyyy] [name of copyright owner]
6789  *
6790  * CDDL HEADER END
6791  */
6792 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6793 /*	  All Rights Reserved  	*/
6794 
6795 
6796 /*
6797  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6798  * Use is subject to license terms.
6799  *
6800  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6801  * Copyright 2016 Joyent, Inc.
6802  */
6803 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6804 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
6805 /*
6806  * CDDL HEADER START
6807  *
6808  * The contents of this file are subject to the terms of the
6809  * Common Development and Distribution License (the "License").
6810  * You may not use this file except in compliance with the License.
6811  *
6812  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6813  * or http://www.opensolaris.org/os/licensing.
6814  * See the License for the specific language governing permissions
6815  * and limitations under the License.
6816  *
6817  * When distributing Covered Code, include this CDDL HEADER in each
6818  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6819  * If applicable, add the following below this CDDL HEADER, with the
6820  * fields enclosed by brackets "[]" replaced with your own identifying
6821  * information: Portions Copyright [yyyy] [name of copyright owner]
6822  *
6823  * CDDL HEADER END
6824  */
6825 
6826 /*
6827  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
6828  *	  All Rights Reserved
6829  *
6830  */
6831 
6832 /*
6833  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6834  * Use is subject to license terms.
6835  */
6836 
6837 /*
6838  * WARNING: This is an implementation-specific header,
6839  * its contents are not guaranteed. Applications
6840  * should include <unistd.h> and not this header.
6841  */
6842 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6843 
6844 
6845 
6846 
6847 
6848 /* Symbolic constants for the "access" routine: */
6849 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6850 /* Symbolic constants for the "lseek" routine: */
6851 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6852 /* Path names: */
6853 
6854 
6855 
6856 
6857 /*
6858  * compile-time symbolic constants,
6859  * Support does not mean the feature is enabled.
6860  * Use pathconf/sysconf to obtain actual configuration value.
6861  */
6862 
6863 /* Values unchanged in UNIX 03 */
6864 
6865 
6866 
6867 
6868 
6869 /*
6870  * POSIX.1b compile-time symbolic constants.
6871  */
6872 # 134 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6873 /*
6874  * POSIX.1c compile-time symbolic constants.
6875  */
6876 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6877 /* New in UNIX 03 */
6878 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6879 /*
6880  * Support for the POSIX.1 mutex protocol attribute. For realtime applications
6881  * which need mutexes to support priority inheritance/ceiling.
6882  */
6883 # 187 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6884 /*
6885  * Large File Summit-related announcement macros.  The system supports both
6886  * the additional and transitional Large File Summit interfaces.  (The final
6887  * two macros provide a finer granularity breakdown of _LFS64_LARGEFILE.)
6888  */
6889 
6890 
6891 
6892 
6893 
6894 /* large file compilation environment setup */
6895 
6896 
6897 
6898 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6899 #pragma redefine_extname ftruncate ftruncate64
6900 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6901 
6902 
6903 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6904 #pragma redefine_extname lseek lseek64
6905 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6906 
6907 
6908 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6909 #pragma redefine_extname pread pread64
6910 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6911 
6912 
6913 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6914 #pragma redefine_extname pwrite pwrite64
6915 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6916 
6917 
6918 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6919 #pragma redefine_extname truncate truncate64
6920 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6921 
6922 
6923 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6924 #pragma redefine_extname lockf lockf64
6925 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6926 
6927 
6928 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6929 #pragma redefine_extname tell tell64
6930 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6931 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6932 /* In the LP64 compilation environment, the APIs are already large file */
6933 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6934 extern int access(const char *, int);
6935 
6936 extern int acct(const char *);
6937 
6938 extern unsigned alarm(unsigned);
6939 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6940 
6941 
6942 extern int brk(void *);
6943 
6944 extern int chdir(const char *);
6945 extern int chown(const char *, uid_t, gid_t);
6946 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6947 
6948 
6949 extern int chroot(const char *);
6950 
6951 extern int close(int);
6952 
6953 
6954 
6955 
6956 
6957 
6958 extern char *ctermid(char *);
6959 
6960 
6961 extern char *ctermid_r(char *);
6962 
6963 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6964 
6965 extern char *cuserid(char *);
6966 
6967 extern int dup(int);
6968 extern int dup2(int, int);
6969 extern int dup3(int, int, int);
6970 
6971 
6972 
6973 
6974 extern void endusershell(void);
6975 
6976 extern int execl(const char *, const char *, ...);
6977 extern int execle(const char *, const char *, ...);
6978 extern int execlp(const char *, const char *, ...);
6979 extern int execv(const char *, char *const *);
6980 extern int execve(const char *, char *const *, char *const *);
6981 extern int execvp(const char *, char *const *);
6982 extern void _exit(int)
6983  __attribute__((__noreturn__));
6984 /*
6985  * The following fattach prototype is duplicated in <stropts.h>. The
6986  * duplication is necessitated by XPG4.2 which requires the prototype
6987  * be defined in <stropts.h>.
6988  */
6989 
6990 extern int fattach(int, const char *);
6991 
6992 
6993 extern int fchdir(int);
6994 extern int fchown(int, uid_t, gid_t);
6995 
6996 
6997 extern int fchroot(int);
6998 
6999 
7000 
7001 extern int fdatasync(int);
7002 
7003 /*
7004  * The following fdetach prototype is duplicated in <stropts.h>. The
7005  * duplication is necessitated by XPG4.2 which requires the prototype
7006  * be defined in <stropts.h>.
7007  */
7008 
7009 extern int fdetach(const char *);
7010 
7011 extern pid_t fork(void);
7012 
7013 extern pid_t fork1(void);
7014 extern pid_t forkall(void);
7015 
7016 extern long fpathconf(int, int);
7017 
7018 
7019 extern int fsync(int);
7020 
7021 
7022 
7023 
7024 extern int ftruncate(int, off_t);
7025 
7026 extern char *getcwd(char *, size_t);
7027 
7028 
7029 extern int getdtablesize(void);
7030 
7031 extern gid_t getegid(void);
7032 extern uid_t geteuid(void);
7033 extern gid_t getgid(void);
7034 extern int getgroups(int, gid_t *);
7035 
7036 extern long gethostid(void);
7037 
7038 
7039 
7040 
7041 extern int gethostname(char *, int);
7042 # 372 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
7043 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
7044 
7045 extern int getpagesize(void);
7046 
7047 extern pid_t getpgid(pid_t);
7048 
7049 extern pid_t getpid(void);
7050 extern pid_t getppid(void);
7051 extern pid_t getpgrp(void);
7052 
7053 
7054 char *gettxt(const char *, const char *);
7055 
7056 
7057 extern pid_t getsid(pid_t);
7058 
7059 extern uid_t getuid(void);
7060 
7061 extern char *getusershell(void);
7062 
7063 /*
7064  * The following ioctl prototype is duplicated in <stropts.h>. The
7065  * duplication is necessitated by XPG4.2 which requires the prototype
7066  * be defined in <stropts.h>.
7067  */
7068 
7069 extern int ioctl(int, int, ...);
7070 extern int isaexec(const char *, char *const *, char *const *);
7071 extern int issetugid(void);
7072 
7073 extern int isatty(int);
7074 
7075 extern int lchown(const char *, uid_t, gid_t);
7076 
7077 extern int link(const char *, const char *);
7078 
7079 extern offset_t llseek(int, offset_t, int);
7080 
7081 
7082 
7083 
7084 extern int lockf(int, int, off_t);
7085 
7086 extern off_t lseek(int, off_t, int);
7087 
7088 
7089 extern int nice(int);
7090 
7091 
7092 extern int mincore(caddr_t, size_t, char *);
7093 
7094 extern long pathconf(const char *, int);
7095 extern int pause(void);
7096 extern int pipe(int *);
7097 extern int pipe2(int *, int);
7098 
7099 
7100 
7101 extern ssize_t pread(int, void *, size_t, off_t);
7102 
7103 
7104 extern void profil(unsigned short *, size_t, unsigned long, unsigned int);
7105 
7106 /*
7107  * pthread_atfork() is also declared in <pthread.h> as per SUSv3. The
7108  * declarations are identical. A change to either one may also require
7109  * appropriate namespace updates in order to avoid redeclaration
7110  * warnings in the case where both prototypes are exposed via inclusion
7111  * of both <pthread.h> and <unistd.h>.
7112  */
7113 
7114 
7115 
7116 extern int pthread_atfork(void (*) (void), void (*) (void), void (*) (void));
7117 
7118 
7119 
7120 extern int ptrace(int, pid_t, int, int);
7121 
7122 
7123 
7124 
7125 extern ssize_t pwrite(int, const void *, size_t, off_t);
7126 
7127 
7128 /* per RFC 3542; This is also defined in netdb.h */
7129 extern int rcmd_af(char **, unsigned short, const char *, const char *,
7130  const char *, int *, int);
7131 
7132 extern ssize_t read(int, void *, size_t);
7133 
7134 
7135 extern ssize_t readlink(const char *, char *,
7136  size_t);
7137 
7138 
7139 
7140 
7141 
7142 
7143 extern int rename(const char *, const char *);
7144 
7145 
7146 
7147 
7148 
7149 
7150 
7151 extern int resolvepath(const char *, char *, size_t);
7152 /* per RFC 3542; This is also defined in netdb.h */
7153 extern int rexec_af(char **, unsigned short, const char *, const char *,
7154  const char *, int *, int);
7155 
7156 extern int rmdir(const char *);
7157 
7158 /* per RFC 3542; This is also defined in netdb.h */
7159 extern int rresvport_af(int *, int);
7160 
7161 
7162 
7163 
7164 extern void *sbrk(intptr_t);
7165 
7166 
7167 extern int setegid(gid_t);
7168 extern int seteuid(uid_t);
7169 
7170 extern int setgid(gid_t);
7171 
7172 extern int setgroups(int, const gid_t *);
7173 extern int sethostname(char *, int);
7174 
7175 extern int setpgid(pid_t, pid_t);
7176 
7177 extern pid_t setpgrp(void);
7178 extern int setregid(gid_t, gid_t);
7179 extern int setreuid(uid_t, uid_t);
7180 
7181 extern pid_t setsid(void);
7182 extern int setuid(uid_t);
7183 
7184 extern void setusershell(void);
7185 
7186 extern unsigned sleep(unsigned);
7187 
7188 extern int stime(const time_t *);
7189 
7190 
7191 
7192 
7193 
7194 
7195 extern int symlink(const char *, const char *);
7196 extern void sync(void);
7197 # 534 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
7198 extern long sysconf(int);
7199 extern pid_t tcgetpgrp(int);
7200 extern int tcsetpgrp(int, pid_t);
7201 
7202 
7203 
7204 extern off_t tell(int);
7205 
7206 
7207 
7208 
7209 extern int truncate(const char *, off_t);
7210 
7211 extern char *ttyname(int);
7212 
7213 extern useconds_t ualarm(useconds_t, useconds_t);
7214 
7215 extern int unlink(const char *);
7216 
7217 extern char *getwd(char *);
7218 extern int usleep(useconds_t);
7219 extern pid_t vfork(void) __attribute__((__returns_twice__));
7220 #pragma unknown_control_flow(vfork)
7221 
7222 
7223 extern void vhangup(void);
7224 
7225 extern ssize_t write(int, const void *, size_t);
7226 
7227 extern void yield(void);
7228 
7229 
7230 
7231 
7232  /* || defined(_XPG7) */
7233 extern int faccessat(int, const char *, int, int);
7234 extern int fchownat(int, const char *, uid_t, gid_t, int);
7235 extern int linkat(int, const char *, int, const char *, int);
7236 extern ssize_t readlinkat(int, const char *,
7237  char *, size_t);
7238 extern int renameat(int, const char *, int, const char *);
7239 extern int symlinkat(const char *, int, const char *);
7240 extern int unlinkat(int, const char *, int);
7241 
7242 
7243 extern int get_nprocs(void);
7244 extern int get_nprocs_conf(void);
7245 
7246 
7247 /* transitional large file interface versions */
7248 
7249 
7250 extern int ftruncate64(int, off64_t);
7251 extern off64_t lseek64(int, off64_t, int);
7252 extern ssize_t pread64(int, void *, size_t, off64_t);
7253 extern ssize_t pwrite64(int, const void *, size_t, off64_t);
7254 extern off64_t tell64(int);
7255 extern int truncate64(const char *, off64_t);
7256 extern int lockf64(int, int, off64_t);
7257 
7258 
7259 /*
7260  * getlogin_r() & ttyname_r() prototypes are defined here.
7261  */
7262 
7263 /*
7264  * Previous releases of Solaris, starting at 2.3, provided definitions of
7265  * various functions as specified in POSIX.1c, Draft 6.  For some of these
7266  * functions, the final POSIX 1003.1c standard had a different number of
7267  * arguments and return values.
7268  *
7269  * The following segment of this header provides support for the standard
7270  * interfaces while supporting applications written under earlier
7271  * releases.  The application defines appropriate values of the feature
7272  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
7273  * whether it was written to expect the Draft 6 or standard versions of
7274  * these interfaces, before including this header.  This header then
7275  * provides a mapping from the source version of the interface to an
7276  * appropriate binary interface.  Such mappings permit an application
7277  * to be built from libraries and objects which have mixed expectations
7278  * of the definitions of these functions.
7279  *
7280  * For applications using the Draft 6 definitions, the binary symbol is the
7281  * same as the source symbol, and no explicit mapping is needed.  For the
7282  * standard interface, the function func() is mapped to the binary symbol
7283  * _posix_func().  The preferred mechanism for the remapping is a compiler
7284  * #pragma.  If the compiler does not provide such a #pragma, the header file
7285  * defines a static function func() which calls the _posix_func() version;
7286  * this has to be done instead of #define since POSIX specifies that an
7287  * application can #undef the symbol and still be bound to the correct
7288  * implementation.  Unfortunately, the statics confuse lint so we fallback to
7289  * #define in that case.
7290  *
7291  * NOTE: Support for the Draft 6 definitions is provided for compatibility
7292  * only.  New applications/libraries should use the standard definitions.
7293  */
7294 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
7295 
7296 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
7297 #pragma redefine_extname getlogin_r getloginx_r
7298 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
7299 
7300 
7301 
7302 
7303 
7304 
7305 extern char *getlogin_r(char *, int);
7306 
7307 extern char *ttyname_r(int, char *, int);
7308 
7309 
7310 
7311 
7312 
7313 
7314 extern int getentropy(void *, size_t);
7315 # 38 "main.c" 2
7316 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
7317 /*
7318  * CDDL HEADER START
7319  *
7320  * The contents of this file are subject to the terms of the
7321  * Common Development and Distribution License (the "License").
7322  * You may not use this file except in compliance with the License.
7323  *
7324  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7325  * or http://www.opensolaris.org/os/licensing.
7326  * See the License for the specific language governing permissions
7327  * and limitations under the License.
7328  *
7329  * When distributing Covered Code, include this CDDL HEADER in each
7330  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7331  * If applicable, add the following below this CDDL HEADER, with the
7332  * fields enclosed by brackets "[]" replaced with your own identifying
7333  * information: Portions Copyright [yyyy] [name of copyright owner]
7334  *
7335  * CDDL HEADER END
7336  */
7337 /*	Copyright (c) 1988 AT&T	*/
7338 /*	  All Rights Reserved  	*/
7339 
7340 
7341 /*
7342  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7343  *
7344  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
7345  * Use is subject to license terms.
7346  */
7347 /*
7348  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
7349  * Copyright 2016 Joyent, Inc.
7350  */
7351 # 39 "main.c" 2
7352 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 1
7353 /*
7354  * CDDL HEADER START
7355  *
7356  * The contents of this file are subject to the terms of the
7357  * Common Development and Distribution License (the "License").
7358  * You may not use this file except in compliance with the License.
7359  *
7360  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7361  * or http://www.opensolaris.org/os/licensing.
7362  * See the License for the specific language governing permissions
7363  * and limitations under the License.
7364  *
7365  * When distributing Covered Code, include this CDDL HEADER in each
7366  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7367  * If applicable, add the following below this CDDL HEADER, with the
7368  * fields enclosed by brackets "[]" replaced with your own identifying
7369  * information: Portions Copyright [yyyy] [name of copyright owner]
7370  *
7371  * CDDL HEADER END
7372  */
7373 
7374 /*
7375  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7376  *
7377  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
7378  * Use is subject to license terms.
7379  */
7380 
7381 /*	Copyright (c) 1988 AT&T	*/
7382 /*	  All Rights Reserved  	*/
7383 
7384 
7385 
7386 
7387 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7388 /*
7389  * CDDL HEADER START
7390  *
7391  * The contents of this file are subject to the terms of the
7392  * Common Development and Distribution License (the "License").
7393  * You may not use this file except in compliance with the License.
7394  *
7395  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7396  * or http://www.opensolaris.org/os/licensing.
7397  * See the License for the specific language governing permissions
7398  * and limitations under the License.
7399  *
7400  * When distributing Covered Code, include this CDDL HEADER in each
7401  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7402  * If applicable, add the following below this CDDL HEADER, with the
7403  * fields enclosed by brackets "[]" replaced with your own identifying
7404  * information: Portions Copyright [yyyy] [name of copyright owner]
7405  *
7406  * CDDL HEADER END
7407  */
7408 
7409 /*
7410  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7411  * Copyright 2016 Joyent, Inc.
7412  *
7413  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7414  * Use is subject to license terms.
7415  */
7416 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
7417 
7418 
7419 
7420 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7421 /*
7422  * CDDL HEADER START
7423  *
7424  * The contents of this file are subject to the terms of the
7425  * Common Development and Distribution License (the "License").
7426  * You may not use this file except in compliance with the License.
7427  *
7428  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7429  * or http://www.opensolaris.org/os/licensing.
7430  * See the License for the specific language governing permissions
7431  * and limitations under the License.
7432  *
7433  * When distributing Covered Code, include this CDDL HEADER in each
7434  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7435  * If applicable, add the following below this CDDL HEADER, with the
7436  * fields enclosed by brackets "[]" replaced with your own identifying
7437  * information: Portions Copyright [yyyy] [name of copyright owner]
7438  *
7439  * CDDL HEADER END
7440  */
7441 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7442 /*	  All Rights Reserved  	*/
7443 
7444 
7445 /*
7446  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7447  * Use is subject to license terms.
7448  *
7449  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7450  * Copyright 2016 Joyent, Inc.
7451  */
7452 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
7453 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 1
7454 /*
7455  * CDDL HEADER START
7456  *
7457  * The contents of this file are subject to the terms of the
7458  * Common Development and Distribution License (the "License").
7459  * You may not use this file except in compliance with the License.
7460  *
7461  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7462  * or http://www.opensolaris.org/os/licensing.
7463  * See the License for the specific language governing permissions
7464  * and limitations under the License.
7465  *
7466  * When distributing Covered Code, include this CDDL HEADER in each
7467  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7468  * If applicable, add the following below this CDDL HEADER, with the
7469  * fields enclosed by brackets "[]" replaced with your own identifying
7470  * information: Portions Copyright [yyyy] [name of copyright owner]
7471  *
7472  * CDDL HEADER END
7473  */
7474 
7475 /*
7476  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
7477  */
7478 
7479 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7480 /*	  All Rights Reserved  	*/
7481 
7482 /*
7483  * University Copyright- Copyright (c) 1982, 1986, 1988
7484  * The Regents of the University of California
7485  * All Rights Reserved
7486  *
7487  * University Acknowledgment- Portions of this document are derived from
7488  * software developed by the University of California, Berkeley, and its
7489  * contributors.
7490  */
7491 
7492 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
7493 /* Copyright 2015, Joyent, Inc. */
7494 
7495 
7496 
7497 
7498 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7499 /*
7500  * CDDL HEADER START
7501  *
7502  * The contents of this file are subject to the terms of the
7503  * Common Development and Distribution License (the "License").
7504  * You may not use this file except in compliance with the License.
7505  *
7506  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7507  * or http://www.opensolaris.org/os/licensing.
7508  * See the License for the specific language governing permissions
7509  * and limitations under the License.
7510  *
7511  * When distributing Covered Code, include this CDDL HEADER in each
7512  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7513  * If applicable, add the following below this CDDL HEADER, with the
7514  * fields enclosed by brackets "[]" replaced with your own identifying
7515  * information: Portions Copyright [yyyy] [name of copyright owner]
7516  *
7517  * CDDL HEADER END
7518  */
7519 
7520 /*
7521  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7522  * Copyright 2016 Joyent, Inc.
7523  *
7524  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7525  * Use is subject to license terms.
7526  */
7527 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 2
7528 
7529 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7530 /*
7531  * CDDL HEADER START
7532  *
7533  * The contents of this file are subject to the terms of the
7534  * Common Development and Distribution License (the "License").
7535  * You may not use this file except in compliance with the License.
7536  *
7537  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7538  * or http://www.opensolaris.org/os/licensing.
7539  * See the License for the specific language governing permissions
7540  * and limitations under the License.
7541  *
7542  * When distributing Covered Code, include this CDDL HEADER in each
7543  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7544  * If applicable, add the following below this CDDL HEADER, with the
7545  * fields enclosed by brackets "[]" replaced with your own identifying
7546  * information: Portions Copyright [yyyy] [name of copyright owner]
7547  *
7548  * CDDL HEADER END
7549  */
7550 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7551 /*	  All Rights Reserved  	*/
7552 
7553 
7554 /*
7555  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7556  * Use is subject to license terms.
7557  *
7558  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7559  * Copyright 2016 Joyent, Inc.
7560  */
7561 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 2
7562 
7563 
7564 
7565 
7566 
7567 /*
7568  * Flag values accessible to open(2) and fcntl(2)
7569  * The first five can only be set (exclusively) by open(2).
7570  */
7571 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7572     /* defines read/write file integrity */
7573 
7574 
7575 
7576 
7577 
7578 
7579 /*
7580  * Flag values accessible only to open(2).
7581  */
7582 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7583 /*
7584  * fcntl(2) requests
7585  *
7586  * N.B.: values are not necessarily assigned sequentially below.
7587  */
7588 
7589 
7590 
7591 
7592 
7593 
7594 
7595 /*
7596  * Applications that read /dev/mem must be built like the kernel.  A
7597  * new symbol "_KMEMUSER" is defined for this purpose.
7598  */
7599 # 128 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7600      /* EINVAL is fildes matches arg1 */
7601 # 137 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7602 /*
7603  * Numbers 20-22 have been removed and should not be reused.
7604  */
7605 
7606 
7607 
7608 
7609 
7610     /* manager */
7611 
7612 /*
7613  * Commands that refer to flock structures.  The argument types differ between
7614  * the large and small file environments; therefore, the #defined values must
7615  * as well.
7616  * The NBMAND forms are private and should not be used.
7617  * The FLOCK forms are also private and should not be used.
7618  */
7619 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7620 /* ILP32 large file application compilation environment version */
7621 # 190 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7622 /*
7623  * transitional large file interface version
7624  * These are only valid in a 32 bit application compiled with large files
7625  * option, for source compatibility, the 64-bit versions are mapped back
7626  * to the native versions.
7627  */
7628 # 233 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7629 /*
7630  * File segment locking set data type - information passed to system by user.
7631  */
7632 
7633 /* regular version, for both small and large file compilation environment */
7634 typedef struct flock {
7635  short l_type;
7636  short l_whence;
7637  off_t l_start;
7638  off_t l_len; /* len == 0 means until end of file */
7639  int l_sysid;
7640  pid_t l_pid;
7641  long l_pad[4]; /* reserve area */
7642 } flock_t;
7643 # 264 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7644 /* transitional large file interface version */
7645 
7646 
7647 
7648 typedef struct flock64 {
7649  short l_type;
7650  short l_whence;
7651  off64_t l_start;
7652  off64_t l_len; /* len == 0 means until end of file */
7653  int l_sysid;
7654  pid_t l_pid;
7655  long l_pad[4]; /* reserve area */
7656 } flock64_t;
7657 # 328 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7658 /*
7659  * File segment locking types.
7660  */
7661 
7662 
7663 
7664 
7665 
7666 /*
7667  * POSIX constants
7668  */
7669 
7670 /* Mask for file access modes */
7671 
7672 
7673 
7674 /*
7675  * DIRECTIO
7676  */
7677 
7678 
7679 
7680 
7681 /*
7682  * File share reservation type
7683  */
7684 typedef struct fshare {
7685  short f_access;
7686  short f_deny;
7687  int f_id;
7688 } fshare_t;
7689 
7690 /*
7691  * f_access values
7692  */
7693 
7694 
7695 
7696 
7697 
7698 
7699 /*
7700  * f_deny values
7701  */
7702 # 381 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7703 /*
7704  * Special flags for functions such as openat(), fstatat()....
7705  */
7706 
7707 
7708  /* || defined(_XPG7) */
7709 # 396 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7710 /* advice for posix_fadvise */
7711 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
7712 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7713 /* large file compilation environment setup */
7714 
7715 
7716 
7717 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7718 #pragma redefine_extname open open64
7719 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7720 
7721 
7722 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7723 #pragma redefine_extname creat creat64
7724 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7725 
7726 
7727 
7728 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7729 #pragma redefine_extname posix_fadvise posix_fadvise64
7730 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7731 
7732 
7733 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7734 #pragma redefine_extname posix_fallocate posix_fallocate64
7735 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7736 
7737 
7738 
7739 
7740 
7741 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7742 #pragma redefine_extname openat openat64
7743 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7744 
7745 
7746 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7747 #pragma redefine_extname attropen attropen64
7748 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7749 # 131 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
7750 extern int fcntl(int, int, ...);
7751 extern int open(const char *, int, ...);
7752 extern int creat(const char *, mode_t);
7753 
7754 extern int posix_fadvise(int, off_t, off_t, int);
7755 extern int posix_fallocate(int, off_t, off_t);
7756 
7757 
7758 
7759 extern int openat(int, const char *, int, ...);
7760 extern int attropen(const char *, const char *, int, ...);
7761 
7762 
7763 extern int directio(int, int);
7764 
7765 
7766 /* transitional large file interface versions */
7767 
7768 
7769 extern int open64(const char *, int, ...);
7770 extern int creat64(const char *, mode_t);
7771 
7772 extern int posix_fadvise64(int, off64_t, off64_t, int);
7773 extern int posix_fallocate64(int, off64_t, off64_t);
7774 
7775 
7776 
7777 extern int openat64(int, const char *, int, ...);
7778 extern int attropen64(const char *, const char *, int, ...);
7779 # 40 "main.c" 2
7780 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7781 /*
7782  * CDDL HEADER START
7783  *
7784  * The contents of this file are subject to the terms of the
7785  * Common Development and Distribution License (the "License").
7786  * You may not use this file except in compliance with the License.
7787  *
7788  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7789  * or http://www.opensolaris.org/os/licensing.
7790  * See the License for the specific language governing permissions
7791  * and limitations under the License.
7792  *
7793  * When distributing Covered Code, include this CDDL HEADER in each
7794  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7795  * If applicable, add the following below this CDDL HEADER, with the
7796  * fields enclosed by brackets "[]" replaced with your own identifying
7797  * information: Portions Copyright [yyyy] [name of copyright owner]
7798  *
7799  * CDDL HEADER END
7800  */
7801 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7802 /*	  All Rights Reserved  	*/
7803 
7804 
7805 /*
7806  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7807  * Use is subject to license terms.
7808  *
7809  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7810  * Copyright 2016 Joyent, Inc.
7811  */
7812 # 41 "main.c" 2
7813 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
7814 /*
7815  * CDDL HEADER START
7816  *
7817  * The contents of this file are subject to the terms of the
7818  * Common Development and Distribution License (the "License").
7819  * You may not use this file except in compliance with the License.
7820  *
7821  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7822  * or http://www.opensolaris.org/os/licensing.
7823  * See the License for the specific language governing permissions
7824  * and limitations under the License.
7825  *
7826  * When distributing Covered Code, include this CDDL HEADER in each
7827  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7828  * If applicable, add the following below this CDDL HEADER, with the
7829  * fields enclosed by brackets "[]" replaced with your own identifying
7830  * information: Portions Copyright [yyyy] [name of copyright owner]
7831  *
7832  * CDDL HEADER END
7833  */
7834 
7835 /*
7836  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7837  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
7838  */
7839 
7840 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
7841 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
7842 /*	All Rights Reserved	*/
7843 
7844 
7845 
7846 
7847 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7848 /*
7849  * CDDL HEADER START
7850  *
7851  * The contents of this file are subject to the terms of the
7852  * Common Development and Distribution License (the "License").
7853  * You may not use this file except in compliance with the License.
7854  *
7855  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7856  * or http://www.opensolaris.org/os/licensing.
7857  * See the License for the specific language governing permissions
7858  * and limitations under the License.
7859  *
7860  * When distributing Covered Code, include this CDDL HEADER in each
7861  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7862  * If applicable, add the following below this CDDL HEADER, with the
7863  * fields enclosed by brackets "[]" replaced with your own identifying
7864  * information: Portions Copyright [yyyy] [name of copyright owner]
7865  *
7866  * CDDL HEADER END
7867  */
7868 
7869 /*
7870  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7871  * Copyright 2016 Joyent, Inc.
7872  *
7873  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7874  * Use is subject to license terms.
7875  */
7876 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7877 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7878 /*
7879  * CDDL HEADER START
7880  *
7881  * The contents of this file are subject to the terms of the
7882  * Common Development and Distribution License (the "License").
7883  * You may not use this file except in compliance with the License.
7884  *
7885  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7886  * or http://www.opensolaris.org/os/licensing.
7887  * See the License for the specific language governing permissions
7888  * and limitations under the License.
7889  *
7890  * When distributing Covered Code, include this CDDL HEADER in each
7891  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7892  * If applicable, add the following below this CDDL HEADER, with the
7893  * fields enclosed by brackets "[]" replaced with your own identifying
7894  * information: Portions Copyright [yyyy] [name of copyright owner]
7895  *
7896  * CDDL HEADER END
7897  */
7898 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7899 /*	  All Rights Reserved  	*/
7900 
7901 
7902 /*
7903  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7904  * Use is subject to license terms.
7905  *
7906  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7907  * Copyright 2016 Joyent, Inc.
7908  */
7909 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7910 
7911 
7912 
7913 
7914 
7915 /*
7916  * The implementation specific header <sys/time_impl.h> includes a
7917  * definition for timestruc_t needed by the stat structure.  However,
7918  * including either <time.h>, which includes <sys/time_impl.h>, or
7919  * including <sys/time_impl.h> directly will break both X/Open and
7920  * POSIX namespace. Preceeding tag, structure, and structure member
7921  * names with underscores eliminates the namespace breakage and at the
7922  * same time, with unique type names, eliminates the possibility of
7923  * timespec_t or timestruct_t naming conflicts that could otherwise
7924  * result based on the order of inclusion of <sys/stat.h> and
7925  * <sys/time.h>.  The header <sys/time_std_impl.h> contains the
7926  * standards namespace safe versions of these definitions.
7927  */
7928 
7929 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
7930 /*
7931  * CDDL HEADER START
7932  *
7933  * The contents of this file are subject to the terms of the
7934  * Common Development and Distribution License, Version 1.0 only
7935  * (the "License").  You may not use this file except in compliance
7936  * with the License.
7937  *
7938  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7939  * or http://www.opensolaris.org/os/licensing.
7940  * See the License for the specific language governing permissions
7941  * and limitations under the License.
7942  *
7943  * When distributing Covered Code, include this CDDL HEADER in each
7944  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7945  * If applicable, add the following below this CDDL HEADER, with the
7946  * fields enclosed by brackets "[]" replaced with your own identifying
7947  * information: Portions Copyright [yyyy] [name of copyright owner]
7948  *
7949  * CDDL HEADER END
7950  */
7951 /*
7952  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
7953  * Use is subject to license terms.
7954  */
7955 
7956 /*
7957  * Implementation-private.  This header should not be included
7958  * directly by an application.  The application should instead
7959  * include <time.h> which includes this header conditionally
7960  * depending on which feature test macros are defined. By default,
7961  * this header is included by <time.h>.  X/Open and POSIX
7962  * standards requirements result in this header being included
7963  * by <time.h> only under a restricted set of conditions.
7964  */
7965 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7966 
7967 
7968 
7969 
7970 
7971 
7972 /*
7973  * stat structure, used by stat(2) and fstat(2)
7974  */
7975 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7976 /*
7977  * large file compilation environment setup
7978  */
7979 
7980 
7981 
7982 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7983 #pragma redefine_extname fstat fstat64
7984 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7985 
7986 
7987 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7988 #pragma redefine_extname stat stat64
7989 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7990 
7991 
7992 
7993 
7994 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7995 #pragma redefine_extname fstatat fstatat64
7996 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7997 
7998 
7999 
8000 
8001 
8002 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
8003 #pragma redefine_extname lstat lstat64
8004 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
8005 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
8006 /*
8007  * In the LP64 compilation environment, map large file interfaces
8008  * back to native versions where possible.
8009  */
8010 # 211 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
8011 /*
8012  * User level stat structure definitions.
8013  */
8014 # 242 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
8015 struct stat {
8016  dev_t st_dev;
8017  long st_pad1[3]; /* reserved for network id */
8018  ino_t st_ino;
8019  mode_t st_mode;
8020  nlink_t st_nlink;
8021  uid_t st_uid;
8022  gid_t st_gid;
8023  dev_t st_rdev;
8024  long st_pad2[2];
8025  off_t st_size;
8026 
8027 
8028 
8029 
8030  timestruc_t st_atim;
8031  timestruc_t st_mtim;
8032  timestruc_t st_ctim;
8033 
8034 
8035 
8036 
8037 
8038  blksize_t st_blksize;
8039  blkcnt_t st_blocks;
8040  char st_fstype[16];
8041  long st_pad4[8]; /* expansion area */
8042 };
8043 
8044 
8045 
8046 /* transitional large file interface version */
8047 # 303 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
8048 struct stat64 {
8049  dev_t st_dev;
8050  long st_pad1[3]; /* reserved for network id */
8051  ino64_t st_ino;
8052  mode_t st_mode;
8053  nlink_t st_nlink;
8054  uid_t st_uid;
8055  gid_t st_gid;
8056  dev_t st_rdev;
8057  long st_pad2[2];
8058  off64_t st_size;
8059 
8060  timestruc_t st_atim;
8061  timestruc_t st_mtim;
8062  timestruc_t st_ctim;
8063 
8064 
8065 
8066 
8067 
8068  blksize_t st_blksize;
8069  blkcnt64_t st_blocks;
8070  char st_fstype[16];
8071  long st_pad4[8]; /* expansion area */
8072 };
8073 # 401 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
8074 /* MODE MASKS */
8075 
8076 /* de facto standard definitions */
8077 
8078 
8079 
8080 
8081 
8082 
8083 /* XENIX definitions are not relevant to Solaris */
8084 # 428 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
8085 /* the following macros are for POSIX conformance */
8086 # 454 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
8087 /* POSIX.4 macros */
8088 
8089 
8090 
8091 
8092 
8093 
8094 /*
8095  * A version number is included in the x86 SVR4 stat and mknod interfaces
8096  * so that SVR4 binaries can be supported.  An LP64 kernel that supports
8097  * the i386 ABI need to be aware of this too.
8098  */
8099 # 476 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
8100  /* || defined(_XPG7) */
8101 /* for use with futimens() and utimensat() */
8102 # 486 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
8103 extern int fchmod(int, mode_t);
8104 
8105 
8106 extern int chmod(const char *, mode_t);
8107 extern int mkdir(const char *, mode_t);
8108 extern int mkfifo(const char *, mode_t);
8109 extern mode_t umask(mode_t);
8110 
8111 /* transitional large file interfaces */
8112 
8113 
8114 extern int fstat64(int, struct stat64 *);
8115 extern int stat64(const char *, struct stat64 *);
8116 extern int lstat64(const char *, struct stat64 *);
8117 
8118 
8119 extern int fstatat64(int, const char *, struct stat64 *, int);
8120 
8121 
8122 
8123 
8124 
8125  /* || defined(_XPG7) */
8126 extern int mkdirat(int, const char *, mode_t);
8127 extern int mkfifoat(int, const char *, mode_t);
8128 extern int mknodat(int, const char *, mode_t, dev_t);
8129 extern int fchmodat(int, const char *, mode_t, int);
8130 extern int futimens(int, const struct timespec[2]);
8131 extern int utimensat(int, const char *, const struct timespec[2], int);
8132 
8133 
8134 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 1
8135 /*
8136  * CDDL HEADER START
8137  *
8138  * The contents of this file are subject to the terms of the
8139  * Common Development and Distribution License (the "License").
8140  * You may not use this file except in compliance with the License.
8141  *
8142  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8143  * or http://www.opensolaris.org/os/licensing.
8144  * See the License for the specific language governing permissions
8145  * and limitations under the License.
8146  *
8147  * When distributing Covered Code, include this CDDL HEADER in each
8148  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8149  * If applicable, add the following below this CDDL HEADER, with the
8150  * fields enclosed by brackets "[]" replaced with your own identifying
8151  * information: Portions Copyright [yyyy] [name of copyright owner]
8152  *
8153  * CDDL HEADER END
8154  */
8155 
8156 /*
8157  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
8158  * Use is subject to license terms.
8159  */
8160 
8161 
8162 
8163 
8164 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
8165 /*
8166  * CDDL HEADER START
8167  *
8168  * The contents of this file are subject to the terms of the
8169  * Common Development and Distribution License (the "License").
8170  * You may not use this file except in compliance with the License.
8171  *
8172  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8173  * or http://www.opensolaris.org/os/licensing.
8174  * See the License for the specific language governing permissions
8175  * and limitations under the License.
8176  *
8177  * When distributing Covered Code, include this CDDL HEADER in each
8178  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8179  * If applicable, add the following below this CDDL HEADER, with the
8180  * fields enclosed by brackets "[]" replaced with your own identifying
8181  * information: Portions Copyright [yyyy] [name of copyright owner]
8182  *
8183  * CDDL HEADER END
8184  */
8185 
8186 /*
8187  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8188  * Copyright 2016 Joyent, Inc.
8189  *
8190  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8191  * Use is subject to license terms.
8192  */
8193 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
8194 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
8195 /*
8196  * CDDL HEADER START
8197  *
8198  * The contents of this file are subject to the terms of the
8199  * Common Development and Distribution License (the "License").
8200  * You may not use this file except in compliance with the License.
8201  *
8202  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8203  * or http://www.opensolaris.org/os/licensing.
8204  * See the License for the specific language governing permissions
8205  * and limitations under the License.
8206  *
8207  * When distributing Covered Code, include this CDDL HEADER in each
8208  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8209  * If applicable, add the following below this CDDL HEADER, with the
8210  * fields enclosed by brackets "[]" replaced with your own identifying
8211  * information: Portions Copyright [yyyy] [name of copyright owner]
8212  *
8213  * CDDL HEADER END
8214  */
8215 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8216 /*	  All Rights Reserved  	*/
8217 
8218 
8219 /*
8220  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
8221  * Use is subject to license terms.
8222  *
8223  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
8224  * Copyright 2016 Joyent, Inc.
8225  */
8226 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
8227 
8228 
8229 
8230 
8231 
8232 /*
8233  * The implementation specific header for <sys/stat.h>
8234  */
8235 
8236 
8237 
8238 
8239 
8240 extern int fstat(int, struct stat *);
8241 extern int stat(const char *, struct stat *);
8242 
8243 
8244 
8245 extern int fstatat(int, const char *, struct stat *, int);
8246 
8247 
8248 
8249 extern int lstat(const char *, struct stat *);
8250 extern int mknod(const char *, mode_t, dev_t);
8251 # 518 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
8252 # 42 "main.c" 2
8253 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
8254 /*
8255  * CDDL HEADER START
8256  *
8257  * The contents of this file are subject to the terms of the
8258  * Common Development and Distribution License (the "License").
8259  * You may not use this file except in compliance with the License.
8260  *
8261  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8262  * or http://www.opensolaris.org/os/licensing.
8263  * See the License for the specific language governing permissions
8264  * and limitations under the License.
8265  *
8266  * When distributing Covered Code, include this CDDL HEADER in each
8267  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8268  * If applicable, add the following below this CDDL HEADER, with the
8269  * fields enclosed by brackets "[]" replaced with your own identifying
8270  * information: Portions Copyright [yyyy] [name of copyright owner]
8271  *
8272  * CDDL HEADER END
8273  */
8274 
8275 /*
8276  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
8277  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
8278  */
8279 
8280 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
8281 /*	  All Rights Reserved  	*/
8282 
8283 /*
8284  * University Copyright- Copyright (c) 1982, 1986, 1988
8285  * The Regents of the University of California
8286  * All Rights Reserved
8287  *
8288  * University Acknowledgment- Portions of this document are derived from
8289  * software developed by the University of California, Berkeley, and its
8290  * contributors.
8291  */
8292 
8293 
8294 
8295 
8296 
8297 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
8298 /*
8299  * CDDL HEADER START
8300  *
8301  * The contents of this file are subject to the terms of the
8302  * Common Development and Distribution License (the "License").
8303  * You may not use this file except in compliance with the License.
8304  *
8305  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8306  * or http://www.opensolaris.org/os/licensing.
8307  * See the License for the specific language governing permissions
8308  * and limitations under the License.
8309  *
8310  * When distributing Covered Code, include this CDDL HEADER in each
8311  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8312  * If applicable, add the following below this CDDL HEADER, with the
8313  * fields enclosed by brackets "[]" replaced with your own identifying
8314  * information: Portions Copyright [yyyy] [name of copyright owner]
8315  *
8316  * CDDL HEADER END
8317  */
8318 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8319 /*	  All Rights Reserved  	*/
8320 
8321 
8322 /*
8323  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
8324  * Use is subject to license terms.
8325  *
8326  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
8327  * Copyright 2016 Joyent, Inc.
8328  */
8329 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
8330 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
8331 /*
8332  * CDDL HEADER START
8333  *
8334  * The contents of this file are subject to the terms of the
8335  * Common Development and Distribution License (the "License").
8336  * You may not use this file except in compliance with the License.
8337  *
8338  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8339  * or http://www.opensolaris.org/os/licensing.
8340  * See the License for the specific language governing permissions
8341  * and limitations under the License.
8342  *
8343  *
8344  * When distributing Covered Code, include this CDDL HEADER in each
8345  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8346  * If applicable, add the following below this CDDL HEADER, with the
8347  * fields enclosed by brackets "[]" replaced with your own identifying
8348  * information: Portions Copyright [yyyy] [name of copyright owner]
8349  *
8350  * CDDL HEADER END
8351  */
8352 
8353 /*
8354  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
8355  * Use is subject to license terms.
8356  * Copyright 2016 Joyent, Inc.
8357  */
8358 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
8359 
8360 
8361 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
8362 /*
8363  * This file and its contents are supplied under the terms of the
8364  * Common Development and Distribution License ("CDDL"), version 1.0.
8365  * You may only use this file in accordance with the terms of version
8366  * 1.0 of the CDDL.
8367  *
8368  * A full copy of the text of the CDDL should have accompanied this
8369  * source.  A copy of the CDDL is also available via the Internet at
8370  * http://www.illumos.org/license/CDDL.
8371  */
8372 
8373 /*
8374  * Copyright 2014-2016 PALO, Richard.
8375  */
8376 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
8377 
8378 
8379 
8380 
8381 
8382 /*
8383  * Fundamental variables; don't change too often.
8384  */
8385 
8386 /*
8387  * _POSIX_VDISABLE has historically been defined in <sys/param.h> since
8388  * an early merge with AT&T source.  It has also historically been defined
8389  * in <sys/termios.h>. The POSIX standard, IEEE Std. 1003.1-1988 initially
8390  * required the existence of _POSIX_VDISABLE in <sys/termios.h>.
8391  * Subsequent versions of the IEEE Standard as well as the X/Open
8392  * specifications required that _POSIX_VDISABLE be defined in <unistd.h>
8393  * while still allowing for it's existence in other headers.  With the
8394  * introduction of XPG6, _POSIX_VDISABLE can only be defined in <unistd.h>.
8395  */
8396 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
8397     /* compatibility purposes only	*/
8398     /* and will be removed in a	*/
8399     /* later release		*/
8400 
8401 /*
8402  * These define the maximum and minimum allowable values of the
8403  * configurable parameter NGROUPS_MAX.
8404  */
8405 
8406 
8407 
8408 
8409 /*
8410  * NGROUPS_MAX_DEFAULT: *MUST* match NGROUPS_MAX value in limits.h.
8411  */
8412 
8413 
8414 /*
8415  * Default process priority.  Keep it in sync with limits.h.
8416  */
8417 
8418 
8419 /*
8420  * Fundamental constants of the implementation--cannot be changed easily.
8421  */
8422 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
8423 /* REMOTE -- whether machine is primary, secondary, or regular */
8424 
8425 
8426 
8427 /*
8428  * MAXPATHLEN defines the longest permissible path length,
8429  * including the terminating null, after expanding symbolic links.
8430  * TYPICALMAXPATHLEN is used in a few places as an optimization
8431  * with a local buffer on the stack to avoid kmem_alloc().
8432  * MAXSYMLINKS defines the maximum number of symbolic links
8433  * that may be expanded in a path name. It should be set high
8434  * enough to allow all legitimate uses, but halt infinite loops
8435  * reasonably quickly.
8436  * MAXNAMELEN is the length (including the terminating null) of
8437  * the longest permissible file (component) name.
8438  */
8439 
8440 
8441 
8442 
8443 
8444 /*
8445  * MAXLINKNAMELEN defines the longest possible permitted datalink name,
8446  * including the terminating NUL.  Note that this must not be larger
8447  * than related networking constants such as LIFNAMSIZ.
8448  */
8449 
8450 
8451 
8452 
8453 
8454 
8455 /*
8456  * The following are defined to be the same as
8457  * defined in /usr/include/limits.h.  They are
8458  * needed for pipe and FIFO compatibility.
8459  */
8460 # 220 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
8461 /* macros replacing interleaving functions */
8462 
8463 
8464 
8465 /*
8466  * File system parameters and macros.
8467  *
8468  * The file system is made out of blocks of at most MAXBSIZE units,
8469  * with smaller units (fragments) only in the last direct block.
8470  * MAXBSIZE primarily determines the size of buffers in the buffer
8471  * pool. It may be made larger without any effect on existing
8472  * file systems; however making it smaller make make some file
8473  * systems unmountable.
8474  *
8475  * Note that the blocked devices are assumed to have DEV_BSIZE
8476  * "sectors" and that fragments must be some multiple of this size.
8477  */
8478 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
8479 /*	64 bit versions of btodb and dbtob */
8480 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
8481 /*
8482  * Size of arg list passed in by user.
8483  */
8484 # 287 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
8485 /*
8486  * Scale factor for scaled integers used to count
8487  * %cpu time and load averages.
8488  */
8489 
8490 
8491 
8492 /*
8493  * Delay units are in microseconds.
8494  *
8495  * XXX	These macros are not part of the DDI!
8496  */
8497 # 317 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
8498 /*
8499  * The following is to free utilities from machine dependencies within
8500  * an architecture. Must be included after definition of DEV_BSIZE.
8501  */
8502 # 471 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
8503 /*
8504  * The following are assorted machine dependent values which can be
8505  * obtained in a machine independent manner through sysconf(2) or
8506  * sysinfo(2). In order to guarantee that these provide the expected
8507  * value at all times, the System Private interface (leading underscore)
8508  * is used.
8509  */
8510 
8511 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
8512 /*
8513  * CDDL HEADER START
8514  *
8515  * The contents of this file are subject to the terms of the
8516  * Common Development and Distribution License (the "License").
8517  * You may not use this file except in compliance with the License.
8518  *
8519  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8520  * or http://www.opensolaris.org/os/licensing.
8521  * See the License for the specific language governing permissions
8522  * and limitations under the License.
8523  *
8524  * When distributing Covered Code, include this CDDL HEADER in each
8525  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8526  * If applicable, add the following below this CDDL HEADER, with the
8527  * fields enclosed by brackets "[]" replaced with your own identifying
8528  * information: Portions Copyright [yyyy] [name of copyright owner]
8529  *
8530  * CDDL HEADER END
8531  */
8532 
8533 /*
8534  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
8535  *	  All Rights Reserved
8536  *
8537  */
8538 
8539 /*
8540  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
8541  * Use is subject to license terms.
8542  */
8543 
8544 /*
8545  * WARNING: This is an implementation-specific header,
8546  * its contents are not guaranteed. Applications
8547  * should include <unistd.h> and not this header.
8548  */
8549 # 480 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
8550 
8551 
8552 
8553 
8554 
8555 
8556 extern long _sysconf(int); /* System Private interface to sysconf() */
8557 # 43 "main.c" 2
8558 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ctype.h" 1
8559 /*
8560  * CDDL HEADER START
8561  *
8562  * The contents of this file are subject to the terms of the
8563  * Common Development and Distribution License, Version 1.0 only
8564  * (the "License").  You may not use this file except in compliance
8565  * with the License.
8566  *
8567  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8568  * or http://www.opensolaris.org/os/licensing.
8569  * See the License for the specific language governing permissions
8570  * and limitations under the License.
8571  *
8572  * When distributing Covered Code, include this CDDL HEADER in each
8573  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8574  * If applicable, add the following below this CDDL HEADER, with the
8575  * fields enclosed by brackets "[]" replaced with your own identifying
8576  * information: Portions Copyright [yyyy] [name of copyright owner]
8577  *
8578  * CDDL HEADER END
8579  */
8580 /*	Copyright (c) 1988 AT&T	*/
8581 /*	  All Rights Reserved  	*/
8582 
8583 
8584 /*
8585  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8586  *
8587  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8588  * Use is subject to license terms.
8589  */
8590 
8591 
8592 
8593 
8594 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/ctype_iso.h" 1
8595 /*
8596  * CDDL HEADER START
8597  *
8598  * The contents of this file are subject to the terms of the
8599  * Common Development and Distribution License, Version 1.0 only
8600  * (the "License").  You may not use this file except in compliance
8601  * with the License.
8602  *
8603  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8604  * or http://www.opensolaris.org/os/licensing.
8605  * See the License for the specific language governing permissions
8606  * and limitations under the License.
8607  *
8608  * When distributing Covered Code, include this CDDL HEADER in each
8609  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8610  * If applicable, add the following below this CDDL HEADER, with the
8611  * fields enclosed by brackets "[]" replaced with your own identifying
8612  * information: Portions Copyright [yyyy] [name of copyright owner]
8613  *
8614  * CDDL HEADER END
8615  */
8616 /*	Copyright (c) 1988 AT&T	*/
8617 /*	  All Rights Reserved  	*/
8618 
8619 /*
8620  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8621  *
8622  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8623  * Use is subject to license terms.
8624  */
8625 
8626 /*
8627  * An application should not include this header directly.  Instead it
8628  * should be included only through the inclusion of other Sun headers.
8629  *
8630  * The contents of this header is limited to identifiers specified in the
8631  * C Standard.  Any new identifiers specified in future amendments to the
8632  * C Standard must be placed in this header.  If these new identifiers
8633  * are required to also be in the C++ Standard "std" namespace, then for
8634  * anything other than macro definitions, corresponding "using" directives
8635  * must also be added to <ctype.h>.
8636  */
8637 
8638 
8639 
8640 
8641 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
8642 /*
8643  * CDDL HEADER START
8644  *
8645  * The contents of this file are subject to the terms of the
8646  * Common Development and Distribution License (the "License").
8647  * You may not use this file except in compliance with the License.
8648  *
8649  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8650  * or http://www.opensolaris.org/os/licensing.
8651  * See the License for the specific language governing permissions
8652  * and limitations under the License.
8653  *
8654  * When distributing Covered Code, include this CDDL HEADER in each
8655  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8656  * If applicable, add the following below this CDDL HEADER, with the
8657  * fields enclosed by brackets "[]" replaced with your own identifying
8658  * information: Portions Copyright [yyyy] [name of copyright owner]
8659  *
8660  * CDDL HEADER END
8661  */
8662 
8663 /*
8664  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8665  * Copyright 2016 Joyent, Inc.
8666  *
8667  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8668  * Use is subject to license terms.
8669  */
8670 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/ctype_iso.h" 2
8671 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/ctype_iso.h"
8672 extern unsigned char __ctype[];
8673 extern unsigned int *__ctype_mask;
8674 extern int *__trans_upper;
8675 extern int *__trans_lower;
8676 
8677 
8678 
8679 
8680 
8681 /*
8682  * These used to be macros, which while more efficient, precludes operation
8683  * with thread specific locales.  The old macros will still work, but new
8684  * code compiles to use functions.  This is specifically permitted by the
8685  * various standards.  Only _tolower and _toupper were required to be
8686  * delivered in macro form.
8687  */
8688 extern int isalnum(int);
8689 extern int isalpha(int);
8690 extern int iscntrl(int);
8691 extern int isdigit(int);
8692 extern int isgraph(int);
8693 extern int islower(int);
8694 extern int isprint(int);
8695 extern int ispunct(int);
8696 extern int isspace(int);
8697 extern int isupper(int);
8698 extern int isxdigit(int);
8699 
8700 extern int isblank(int);
8701 
8702 
8703 extern int tolower(int);
8704 extern int toupper(int);
8705 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ctype.h" 2
8706 
8707 /*
8708  * Allow global visibility for symbols defined in
8709  * C++ "std" namespace in <iso/ctype_iso.h>.
8710  */
8711 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ctype.h"
8712 extern int isascii(int);
8713 extern int toascii(int);
8714 extern int _tolower(int);
8715 extern int _toupper(int);
8716 # 98 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ctype.h"
8717 extern int isalnum_l(int, locale_t);
8718 extern int isalpha_l(int, locale_t);
8719 extern int isblank_l(int, locale_t);
8720 extern int iscntrl_l(int, locale_t);
8721 extern int isdigit_l(int, locale_t);
8722 extern int isgraph_l(int, locale_t);
8723 extern int islower_l(int, locale_t);
8724 extern int isprint_l(int, locale_t);
8725 extern int ispunct_l(int, locale_t);
8726 extern int isspace_l(int, locale_t);
8727 extern int isupper_l(int, locale_t);
8728 extern int isxdigit_l(int, locale_t);
8729 extern int tolower_l(int, locale_t);
8730 extern int toupper_l(int, locale_t);
8731 # 44 "main.c" 2
8732 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h" 1
8733 /*
8734  * CDDL HEADER START
8735  *
8736  * The contents of this file are subject to the terms of the
8737  * Common Development and Distribution License (the "License").
8738  * You may not use this file except in compliance with the License.
8739  *
8740  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8741  * or http://www.opensolaris.org/os/licensing.
8742  * See the License for the specific language governing permissions
8743  * and limitations under the License.
8744  *
8745  * When distributing Covered Code, include this CDDL HEADER in each
8746  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8747  * If applicable, add the following below this CDDL HEADER, with the
8748  * fields enclosed by brackets "[]" replaced with your own identifying
8749  * information: Portions Copyright [yyyy] [name of copyright owner]
8750  *
8751  * CDDL HEADER END
8752  */
8753 
8754 /* Copyright 2013 OmniTI Computer Consulting, Inc. All rights reserved. */
8755 /*
8756  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8757  *
8758  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
8759  * Use is subject to license terms.
8760  * Copyright 2015 Joyent, Inc.  All rights reserved.
8761  */
8762 
8763 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
8764 /*	  All Rights Reserved	*/
8765 
8766 /*
8767  * University Copyright- Copyright (c) 1982, 1986, 1988
8768  * The Regents of the University of California
8769  * All Rights Reserved
8770  *
8771  * University Acknowledgment- Portions of this document are derived from
8772  * software developed by the University of California, Berkeley, and its
8773  * contributors.
8774  */
8775 
8776 
8777 
8778 
8779 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
8780 /*
8781  * CDDL HEADER START
8782  *
8783  * The contents of this file are subject to the terms of the
8784  * Common Development and Distribution License (the "License").
8785  * You may not use this file except in compliance with the License.
8786  *
8787  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8788  * or http://www.opensolaris.org/os/licensing.
8789  * See the License for the specific language governing permissions
8790  * and limitations under the License.
8791  *
8792  * When distributing Covered Code, include this CDDL HEADER in each
8793  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8794  * If applicable, add the following below this CDDL HEADER, with the
8795  * fields enclosed by brackets "[]" replaced with your own identifying
8796  * information: Portions Copyright [yyyy] [name of copyright owner]
8797  *
8798  * CDDL HEADER END
8799  */
8800 
8801 /*
8802  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8803  * Copyright 2016 Joyent, Inc.
8804  *
8805  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8806  * Use is subject to license terms.
8807  */
8808 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h" 2
8809 
8810 
8811 
8812 
8813 
8814 
8815 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
8816 /*
8817  * CDDL HEADER START
8818  *
8819  * The contents of this file are subject to the terms of the
8820  * Common Development and Distribution License (the "License").
8821  * You may not use this file except in compliance with the License.
8822  *
8823  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8824  * or http://www.opensolaris.org/os/licensing.
8825  * See the License for the specific language governing permissions
8826  * and limitations under the License.
8827  *
8828  * When distributing Covered Code, include this CDDL HEADER in each
8829  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8830  * If applicable, add the following below this CDDL HEADER, with the
8831  * fields enclosed by brackets "[]" replaced with your own identifying
8832  * information: Portions Copyright [yyyy] [name of copyright owner]
8833  *
8834  * CDDL HEADER END
8835  */
8836 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8837 /*	  All Rights Reserved  	*/
8838 
8839 
8840 /*
8841  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
8842  * Use is subject to license terms.
8843  *
8844  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
8845  * Copyright 2016 Joyent, Inc.
8846  */
8847 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h" 2
8848 
8849 
8850 /*
8851  * Protections are chosen from these bits, or-ed together.
8852  * Note - not all implementations literally provide all possible
8853  * combinations.  PROT_WRITE is often implemented as (PROT_READ |
8854  * PROT_WRITE) and (PROT_EXECUTE as PROT_READ | PROT_EXECUTE).
8855  * However, no implementation will permit a write to succeed
8856  * where PROT_WRITE has not been set.  Also, no implementation will
8857  * allow any access to succeed where prot is specified as PROT_NONE.
8858  */
8859 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
8860 /* sharing types:  must choose either SHARED or PRIVATE */
8861 
8862 
8863 
8864 
8865 /* other flags to mmap (or-ed in to MAP_SHARED or MAP_PRIVATE) */
8866 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
8867 /* these flags not yet implemented */
8868 
8869 
8870 
8871 /* these flags are used by memcntl */
8872 # 116 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
8873 /*
8874  * For the sake of backward object compatibility, we use the _MAP_NEW flag.
8875  * This flag will be automatically or'ed in by the C library for all
8876  * new mmap calls.  Previous binaries with old mmap calls will continue
8877  * to get 0 or -1 for return values.  New mmap calls will get the mapped
8878  * address as the return value if successful and -1 on errors.  By default,
8879  * new mmap calls automatically have the kernel assign the map address
8880  * unless the MAP_FIXED flag is given.
8881  */
8882 
8883 
8884 
8885 
8886 
8887 /* External flags for mmapobj syscall (Exclusive of MAP_* flags above) */
8888 
8889 
8890 
8891 
8892 
8893 /*
8894  * Values for mr_flags field of mmapobj_result_t below.
8895  * The bottom 16 bits are mutually exclusive and thus only one
8896  * of them can be set at a time.  Use MR_GET_TYPE below to check this value.
8897  * The top 16 bits are used for flags which are not mutually exclusive and
8898  * thus more than one of these flags can be set for a given mmapobj_result_t.
8899  *
8900  * MR_PADDING being set indicates that this memory range represents the user
8901  * requested padding.
8902  *
8903  * MR_HDR_ELF being set indicates that the ELF header of the mapped object
8904  * is mapped at mr_addr + mr_offset.
8905  *
8906  * MR_HDR_AOUT being set indicates that the AOUT (4.x) header of the mapped
8907  * object is mapped at mr_addr + mr_offset.
8908  */
8909 
8910 /*
8911  * External flags for mr_flags field below.
8912  */
8913 
8914 
8915 
8916 
8917 /*
8918  * Internal flags for mr_flags field below.
8919  */
8920 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
8921 typedef struct mmapobj_result {
8922  caddr_t mr_addr; /* mapping address */
8923  size_t mr_msize; /* mapping size */
8924  size_t mr_fsize; /* file size */
8925  size_t mr_offset; /* offset into file */
8926  uint_t mr_prot; /* the protections provided */
8927  uint_t mr_flags; /* info on the mapping */
8928 } mmapobj_result_t;
8929 # 194 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
8930 /*
8931  * large file compilation environment setup
8932  *
8933  * In the LP64 compilation environment, map large file interfaces
8934  * back to native versions where possible.
8935  */
8936 
8937 
8938 
8939 
8940 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
8941 #pragma redefine_extname mmap mmap64
8942 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
8943 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
8944 
8945 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
8946 #pragma redefine_extname getpagesizes getpagesizes2
8947 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
8948 
8949 
8950 
8951 
8952 
8953 /*
8954  * Except for old binaries mmap() will return the resultant
8955  * address of mapping on success and (caddr_t)-1 on error.
8956  */
8957 # 242 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
8958 extern caddr_t mmap(caddr_t, size_t, int, int, int, off_t);
8959 extern int munmap(caddr_t, size_t);
8960 extern int mprotect(caddr_t, size_t, int);
8961 extern int msync(caddr_t, size_t, int);
8962 extern int mlock(caddr_t, size_t);
8963 extern int munlock(caddr_t, size_t);
8964 extern int mincore(caddr_t, size_t, char *);
8965 extern int memcntl(caddr_t, size_t, int, caddr_t, int, int);
8966 extern int madvise(caddr_t, size_t, int);
8967 
8968 extern int getpagesizes(size_t *, int);
8969 extern int getpagesizes2(size_t *, int);
8970 extern int mmapobj(int, uint_t, mmapobj_result_t *, uint_t *, void *);
8971 /* guard visibility of uint64_t */
8972 
8973 extern int meminfo(const uint64_t *, int, const uint_t *, int, uint64_t *,
8974  uint_t *);
8975 
8976 
8977 /* transitional large file interface version */
8978 
8979 extern caddr_t mmap64(caddr_t, size_t, int, int, int, off64_t);
8980 
8981 
8982 
8983 
8984 extern int mlockall(int);
8985 extern int munlockall(void);
8986 extern int shm_open(const char *, int, mode_t);
8987 extern int shm_unlink(const char *);
8988 
8989 
8990 
8991 extern int posix_madvise(void *, size_t, int);
8992 
8993 
8994 /* mmap failure value */
8995 
8996 
8997 
8998 
8999 
9000 
9001 
9002 /*
9003  * structure for memcntl hat advise operations.
9004  */
9005 struct memcntl_mha {
9006  uint_t mha_cmd; /* command(s) */
9007  uint_t mha_flags;
9008  size_t mha_pagesize;
9009 };
9010 # 306 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
9011 /*
9012  * advice to madvise
9013  *
9014  * Note, if more than 4 bits worth of advice (eg. 16) are specified then
9015  * changes will be necessary to the struct vpage.
9016  */
9017 # 326 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
9018 /* advice to posix_madvise */
9019 /* these values must be kept in sync with the MADV_* values, above */
9020 
9021 
9022 
9023 
9024 
9025 
9026 
9027 /* flags to msync */
9028 
9029      /* modified for UNIX98 compliance */
9030 
9031 
9032 
9033 
9034 
9035 /* functions to mctl */
9036 # 353 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
9037 /* sub-commands for MC_HAT_ADVISE */
9038 
9039 
9040      /* for last bss adjacent to */
9041      /* brk area and brk area itself */
9042 
9043      /* processes main stack */
9044 
9045 
9046 
9047 
9048 /* flags to mlockall */
9049 
9050 
9051 
9052 
9053 
9054 
9055 /* definitions for meminfosys syscall */
9056 
9057 
9058 
9059 
9060 
9061 /* private structure for meminfo */
9062 typedef struct meminfo {
9063  const uint64_t *mi_inaddr; /* array of input addresses */
9064  const uint_t *mi_info_req; /* array of types of info requested */
9065  uint64_t *mi_outdata; /* array of results are placed */
9066  uint_t *mi_validity; /* array of bitwise result codes */
9067  int mi_info_count; /* number of pieces of info requested */
9068 } meminfo_t;
9069 # 399 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
9070 /*
9071  * info_req request type definitions for meminfo
9072  * request types starting with MEMINFO_V are used for Virtual addresses
9073  * and should not be mixed with MEMINFO_PLGRP which is targeted for Physical
9074  * addresses
9075  */
9076 # 415 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h"
9077 /* maximum number of addresses meminfo() can process at a time */
9078 
9079 
9080 /* maximum number of request types */
9081 # 45 "main.c" 2
9082 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/sysmacros.h" 1
9083 /*
9084  * CDDL HEADER START
9085  *
9086  * The contents of this file are subject to the terms of the
9087  * Common Development and Distribution License (the "License").
9088  * You may not use this file except in compliance with the License.
9089  *
9090  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9091  * or http://www.opensolaris.org/os/licensing.
9092  * See the License for the specific language governing permissions
9093  * and limitations under the License.
9094  *
9095  * When distributing Covered Code, include this CDDL HEADER in each
9096  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9097  * If applicable, add the following below this CDDL HEADER, with the
9098  * fields enclosed by brackets "[]" replaced with your own identifying
9099  * information: Portions Copyright [yyyy] [name of copyright owner]
9100  *
9101  * CDDL HEADER END
9102  */
9103 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9104 /*	  All Rights Reserved  	*/
9105 
9106 
9107 /*
9108  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9109  * Use is subject to license terms.
9110  *
9111  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
9112  *
9113  * Copyright 2018 Joyent Inc.
9114  */
9115 
9116 
9117 
9118 
9119 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
9120 /*
9121  * CDDL HEADER START
9122  *
9123  * The contents of this file are subject to the terms of the
9124  * Common Development and Distribution License (the "License").
9125  * You may not use this file except in compliance with the License.
9126  *
9127  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9128  * or http://www.opensolaris.org/os/licensing.
9129  * See the License for the specific language governing permissions
9130  * and limitations under the License.
9131  *
9132  * When distributing Covered Code, include this CDDL HEADER in each
9133  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9134  * If applicable, add the following below this CDDL HEADER, with the
9135  * fields enclosed by brackets "[]" replaced with your own identifying
9136  * information: Portions Copyright [yyyy] [name of copyright owner]
9137  *
9138  * CDDL HEADER END
9139  */
9140 
9141 /*
9142  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
9143  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
9144  */
9145 
9146 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
9147 /*	  All Rights Reserved  	*/
9148 
9149 /*
9150  * University Copyright- Copyright (c) 1982, 1986, 1988
9151  * The Regents of the University of California
9152  * All Rights Reserved
9153  *
9154  * University Acknowledgment- Portions of this document are derived from
9155  * software developed by the University of California, Berkeley, and its
9156  * contributors.
9157  */
9158 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/sysmacros.h" 2
9159 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 1
9160 /*
9161  * This file and its contents are supplied under the terms of the
9162  * Common Development and Distribution License ("CDDL"), version 1.0.
9163  * You may only use this file in accordance with the terms of version
9164  * 1.0 of the CDDL.
9165  *
9166  * A full copy of the text of the CDDL should have accompanied this
9167  * source.  A copy of the CDDL is also available via the Internet at
9168  * http://www.illumos.org/license/CDDL.
9169  */
9170 
9171 /*
9172  * Copyright 2017 Toomas Soome <tsoome@me.com>
9173  */
9174 
9175 
9176 
9177 
9178 /*
9179  * Commonly used macros and definitions.
9180  */
9181 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h"
9182 /*
9183  * We must not expose container_of() to userland, but we want it
9184  * to be available for early boot and for the kernel.
9185  */
9186 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/sysmacros.h" 2
9187 
9188 
9189 
9190 
9191 
9192 /*
9193  * Some macros for units conversion
9194  */
9195 /*
9196  * Disk blocks (sectors) and bytes.
9197  */
9198 
9199 
9200 
9201 
9202 
9203 /* common macros */
9204 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/sysmacros.h"
9205 /*
9206  * WARNING: The device number macros defined here should not be used by device
9207  * drivers or user software. Device drivers should use the device functions
9208  * defined in the DDI/DKI interface (see also ddi.h). Application software
9209  * should make use of the library routines available in makedev(3). A set of
9210  * new device macros are provided to operate on the expanded device number
9211  * format supported in SVR4. Macro versions of the DDI device functions are
9212  * provided for use by kernel proper routines only. Macro routines bmajor(),
9213  * major(), minor(), emajor(), eminor(), and makedev() will be removed or
9214  * their definitions changed at the next major release following SVR4.
9215  */
9216 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/sysmacros.h"
9217     /* For 3b2 hardware devices the minor is */
9218     /* restricted to 256 (0-255) */
9219 # 140 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/sysmacros.h"
9220 /* major part of a device external from the kernel (same as emajor below) */
9221 
9222 
9223 
9224 /* minor part of a device external from the kernel  (same as eminor below) */
9225 
9226 
9227 
9228 
9229 
9230 /* create old device number */
9231 
9232 
9233 
9234 /* make an new device number */
9235 
9236 
9237 
9238 
9239 /*
9240  * emajor() allows kernel/driver code to print external major numbers
9241  * eminor() allows kernel/driver code to print external minor numbers
9242  */
9243 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/sysmacros.h"
9244 /*
9245  * get external major and minor device
9246  * components from expanded device number
9247  */
9248 
9249 
9250 
9251 
9252 /*
9253  * These are versions of the kernel routines for compressing and
9254  * expanding long device numbers that don't return errors.
9255  */
9256 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/sysmacros.h"
9257 /* convert to old (SVR3.2) dev format */
9258 
9259 
9260 
9261 
9262 
9263 
9264 /* convert to new (SVR4) dev format */
9265 
9266 
9267 
9268 
9269 
9270 /*
9271  * Macro for checking power of 2 address alignment.
9272  */
9273 
9274 
9275 /*
9276  * Macros for counting and rounding.
9277  */
9278 
9279 
9280 
9281 /*
9282  * Macro to determine if value is a power of 2
9283  */
9284 
9285 
9286 /*
9287  * Macros for various sorts of alignment and rounding.  The "align" must
9288  * be a power of 2.  Often times it is a block, sector, or page.
9289  */
9290 
9291 /*
9292  * return x rounded down to an align boundary
9293  * eg, P2ALIGN(1200, 1024) == 1024 (1*align)
9294  * eg, P2ALIGN(1024, 1024) == 1024 (1*align)
9295  * eg, P2ALIGN(0x1234, 0x100) == 0x1200 (0x12*align)
9296  * eg, P2ALIGN(0x5600, 0x100) == 0x5600 (0x56*align)
9297  */
9298 
9299 
9300 /*
9301  * return x % (mod) align
9302  * eg, P2PHASE(0x1234, 0x100) == 0x34 (x-0x12*align)
9303  * eg, P2PHASE(0x5600, 0x100) == 0x00 (x-0x56*align)
9304  */
9305 
9306 
9307 /*
9308  * return how much space is left in this block (but if it's perfectly
9309  * aligned, return 0).
9310  * eg, P2NPHASE(0x1234, 0x100) == 0xcc (0x13*align-x)
9311  * eg, P2NPHASE(0x5600, 0x100) == 0x00 (0x56*align-x)
9312  */
9313 
9314 
9315 /*
9316  * return x rounded up to an align boundary
9317  * eg, P2ROUNDUP(0x1234, 0x100) == 0x1300 (0x13*align)
9318  * eg, P2ROUNDUP(0x5600, 0x100) == 0x5600 (0x56*align)
9319  */
9320 
9321 
9322 /*
9323  * return the ending address of the block that x is in
9324  * eg, P2END(0x1234, 0x100) == 0x12ff (0x13*align - 1)
9325  * eg, P2END(0x5600, 0x100) == 0x56ff (0x57*align - 1)
9326  */
9327 
9328 
9329 /*
9330  * return x rounded up to the next phase (offset) within align.
9331  * phase should be < align.
9332  * eg, P2PHASEUP(0x1234, 0x100, 0x10) == 0x1310 (0x13*align + phase)
9333  * eg, P2PHASEUP(0x5600, 0x100, 0x10) == 0x5610 (0x56*align + phase)
9334  */
9335 
9336 
9337 /*
9338  * return TRUE if adding len to off would cause it to cross an align
9339  * boundary.
9340  * eg, P2BOUNDARY(0x1234, 0xe0, 0x100) == TRUE (0x1234 + 0xe0 == 0x1314)
9341  * eg, P2BOUNDARY(0x1234, 0x50, 0x100) == FALSE (0x1234 + 0x50 == 0x1284)
9342  */
9343 
9344 
9345 
9346 /*
9347  * Return TRUE if they have the same highest bit set.
9348  * eg, P2SAMEHIGHBIT(0x1234, 0x1001) == TRUE (the high bit is 0x1000)
9349  * eg, P2SAMEHIGHBIT(0x1234, 0x3010) == FALSE (high bit of 0x3010 is 0x2000)
9350  */
9351 
9352 
9353 /*
9354  * Typed version of the P2* macros.  These macros should be used to ensure
9355  * that the result is correctly calculated based on the data type of (x),
9356  * which is passed in as the last argument, regardless of the data
9357  * type of the alignment.  For example, if (x) is of type uint64_t,
9358  * and we want to round it up to a page boundary using "PAGESIZE" as
9359  * the alignment, we can do either
9360  *	P2ROUNDUP(x, (uint64_t)PAGESIZE)
9361  * or
9362  *	P2ROUNDUP_TYPED(x, PAGESIZE, uint64_t)
9363  */
9364 # 325 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/sysmacros.h"
9365 /*
9366  * Macros to atomically increment/decrement a variable.  mutex and var
9367  * must be pointers.
9368  */
9369 
9370 
9371 
9372 /*
9373  * Macros to declare bitfields - the order in the parameter list is
9374  * Low to High - that is, declare bit 0 first.  We only support 8-bit bitfields
9375  * because if a field crosses a byte boundary it's not likely to be meaningful
9376  * without reassembly in its nonnative endianness.
9377  */
9378 # 46 "main.c" 2
9379 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/strings.h" 1
9380 /*
9381  * CDDL HEADER START
9382  *
9383  * The contents of this file are subject to the terms of the
9384  * Common Development and Distribution License, Version 1.0 only
9385  * (the "License").  You may not use this file except in compliance
9386  * with the License.
9387  *
9388  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9389  * or http://www.opensolaris.org/os/licensing.
9390  * See the License for the specific language governing permissions
9391  * and limitations under the License.
9392  *
9393  * When distributing Covered Code, include this CDDL HEADER in each
9394  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9395  * If applicable, add the following below this CDDL HEADER, with the
9396  * fields enclosed by brackets "[]" replaced with your own identifying
9397  * information: Portions Copyright [yyyy] [name of copyright owner]
9398  *
9399  * CDDL HEADER END
9400  */
9401 /*
9402  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9403  *
9404  * Copyright (c) 1995, 1996, by Sun Microsystems, Inc.
9405  * All rights reserved.
9406  */
9407 
9408 
9409 
9410 
9411 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
9412 /*
9413  * CDDL HEADER START
9414  *
9415  * The contents of this file are subject to the terms of the
9416  * Common Development and Distribution License (the "License").
9417  * You may not use this file except in compliance with the License.
9418  *
9419  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9420  * or http://www.opensolaris.org/os/licensing.
9421  * See the License for the specific language governing permissions
9422  * and limitations under the License.
9423  *
9424  * When distributing Covered Code, include this CDDL HEADER in each
9425  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9426  * If applicable, add the following below this CDDL HEADER, with the
9427  * fields enclosed by brackets "[]" replaced with your own identifying
9428  * information: Portions Copyright [yyyy] [name of copyright owner]
9429  *
9430  * CDDL HEADER END
9431  */
9432 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9433 /*	  All Rights Reserved  	*/
9434 
9435 
9436 /*
9437  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
9438  * Use is subject to license terms.
9439  *
9440  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
9441  * Copyright 2016 Joyent, Inc.
9442  */
9443 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/strings.h" 2
9444 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
9445 /*
9446  * CDDL HEADER START
9447  *
9448  * The contents of this file are subject to the terms of the
9449  * Common Development and Distribution License (the "License").
9450  * You may not use this file except in compliance with the License.
9451  *
9452  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9453  * or http://www.opensolaris.org/os/licensing.
9454  * See the License for the specific language governing permissions
9455  * and limitations under the License.
9456  *
9457  * When distributing Covered Code, include this CDDL HEADER in each
9458  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9459  * If applicable, add the following below this CDDL HEADER, with the
9460  * fields enclosed by brackets "[]" replaced with your own identifying
9461  * information: Portions Copyright [yyyy] [name of copyright owner]
9462  *
9463  * CDDL HEADER END
9464  */
9465 
9466 /*
9467  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
9468  * Copyright 2016 Joyent, Inc.
9469  *
9470  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
9471  * Use is subject to license terms.
9472  */
9473 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/strings.h" 2
9474 
9475 
9476 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 1
9477 /*
9478  * CDDL HEADER START
9479  *
9480  * The contents of this file are subject to the terms of the
9481  * Common Development and Distribution License (the "License").
9482  * You may not use this file except in compliance with the License.
9483  *
9484  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9485  * or http://www.opensolaris.org/os/licensing.
9486  * See the License for the specific language governing permissions
9487  * and limitations under the License.
9488  *
9489  * When distributing Covered Code, include this CDDL HEADER in each
9490  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9491  * If applicable, add the following below this CDDL HEADER, with the
9492  * fields enclosed by brackets "[]" replaced with your own identifying
9493  * information: Portions Copyright [yyyy] [name of copyright owner]
9494  *
9495  * CDDL HEADER END
9496  */
9497 
9498 /*
9499  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9500  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
9501  */
9502 
9503 /*	Copyright (c) 1988 AT&T	*/
9504 /*	  All Rights Reserved  	*/
9505 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/strings.h" 2
9506 
9507 
9508 
9509 
9510 
9511 
9512 extern int bcmp(const void *, const void *, size_t);
9513 extern void bcopy(const void *, void *, size_t);
9514 extern void bzero(void *, size_t);
9515 
9516 extern char *index(const char *, int);
9517 extern char *rindex(const char *, int);
9518 
9519 /*
9520  * X/Open System Interfaces and Headers, Issue 4, Version 2, defines
9521  * both <string.h> and <strings.h>.  The namespace requirements
9522  * do not permit the visibility of anything other than what is
9523  * specifically defined for each of these headers.  As a result,
9524  * inclusion of <string.h> would result in declarations not allowed
9525  * in <strings.h>, and making the following prototypes visible for
9526  * anything other than X/Open UNIX Extension would result in
9527  * conflicts with what is now in <string.h>.
9528  */
9529 # 47 "main.c" 2
9530 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
9531 /*
9532  * CDDL HEADER START
9533  *
9534  * The contents of this file are subject to the terms of the
9535  * Common Development and Distribution License (the "License").
9536  * You may not use this file except in compliance with the License.
9537  *
9538  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9539  * or http://www.opensolaris.org/os/licensing.
9540  * See the License for the specific language governing permissions
9541  * and limitations under the License.
9542  *
9543  * When distributing Covered Code, include this CDDL HEADER in each
9544  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9545  * If applicable, add the following below this CDDL HEADER, with the
9546  * fields enclosed by brackets "[]" replaced with your own identifying
9547  * information: Portions Copyright [yyyy] [name of copyright owner]
9548  *
9549  * CDDL HEADER END
9550  */
9551 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9552 /*	  All Rights Reserved  	*/
9553 
9554 /*
9555  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
9556  * Use is subject to license terms.
9557  */
9558 
9559 
9560 
9561 
9562 #pragma ident "%Z%%M%	%I%	%E% SMI"
9563 
9564 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
9565 /*
9566  * CDDL HEADER START
9567  *
9568  * The contents of this file are subject to the terms of the
9569  * Common Development and Distribution License (the "License").
9570  * You may not use this file except in compliance with the License.
9571  *
9572  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9573  * or http://www.opensolaris.org/os/licensing.
9574  * See the License for the specific language governing permissions
9575  * and limitations under the License.
9576  *
9577  * When distributing Covered Code, include this CDDL HEADER in each
9578  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9579  * If applicable, add the following below this CDDL HEADER, with the
9580  * fields enclosed by brackets "[]" replaced with your own identifying
9581  * information: Portions Copyright [yyyy] [name of copyright owner]
9582  *
9583  * CDDL HEADER END
9584  */
9585 /*	Copyright (c) 1988 AT&T	*/
9586 /*	  All Rights Reserved  	*/
9587 
9588 
9589 /*
9590  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9591  *
9592  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
9593  * Use is subject to license terms.
9594  */
9595 /*
9596  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
9597  * Copyright 2016 Joyent, Inc.
9598  */
9599 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 2
9600 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h"
9601 extern char *errstr;
9602 
9603 struct ainfo {
9604  char *local;
9605  mode_t mode;
9606  char owner[64 +1];
9607  char group[64 +1];
9608  major_t major;
9609  minor_t minor;
9610 };
9611 
9612 struct cinfo {
9613  long cksum;
9614  fsblkcnt_t size;
9615  time_t modtime;
9616 };
9617 
9618 struct pinfo {
9619  char status;
9620  char pkg[64 +1];
9621  char editflag;
9622  char aclass[64 +1];
9623  struct pinfo
9624   *next;
9625 };
9626 
9627 struct cfent {
9628  short volno;
9629  char ftype;
9630  char pkg_class[64 +1];
9631  int pkg_class_idx;
9632  char *path;
9633  struct ainfo ainfo;
9634  struct cinfo cinfo;
9635  short npkgs;
9636  struct pinfo
9637   *pinfo;
9638 };
9639 
9640 /* averify() & cverify() error codes */
9641 # 48 "main.c" 2
9642 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 1
9643 /*
9644  * CDDL HEADER START
9645  *
9646  * The contents of this file are subject to the terms of the
9647  * Common Development and Distribution License, Version 1.0 only
9648  * (the "License").  You may not use this file except in compliance
9649  * with the License.
9650  *
9651  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9652  * or http://www.opensolaris.org/os/licensing.
9653  * See the License for the specific language governing permissions
9654  * and limitations under the License.
9655  *
9656  * When distributing Covered Code, include this CDDL HEADER in each
9657  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9658  * If applicable, add the following below this CDDL HEADER, with the
9659  * fields enclosed by brackets "[]" replaced with your own identifying
9660  * information: Portions Copyright [yyyy] [name of copyright owner]
9661  *
9662  * CDDL HEADER END
9663  */
9664 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9665 /*	  All Rights Reserved  	*/
9666 
9667 
9668 
9669 
9670 
9671 #pragma ident "%Z%%M%	%I%	%E% SMI"
9672 
9673 
9674 
9675 
9676 
9677 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
9678 /*
9679  * CDDL HEADER START
9680  *
9681  * The contents of this file are subject to the terms of the
9682  * Common Development and Distribution License (the "License").
9683  * You may not use this file except in compliance with the License.
9684  *
9685  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9686  * or http://www.opensolaris.org/os/licensing.
9687  * See the License for the specific language governing permissions
9688  * and limitations under the License.
9689  *
9690  * When distributing Covered Code, include this CDDL HEADER in each
9691  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9692  * If applicable, add the following below this CDDL HEADER, with the
9693  * fields enclosed by brackets "[]" replaced with your own identifying
9694  * information: Portions Copyright [yyyy] [name of copyright owner]
9695  *
9696  * CDDL HEADER END
9697  */
9698 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9699 /*	  All Rights Reserved  	*/
9700 
9701 
9702 /*
9703  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
9704  * Use is subject to license terms.
9705  *
9706  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
9707  * Copyright 2016 Joyent, Inc.
9708  */
9709 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 2
9710 
9711 struct pkgdev {
9712  int rdonly;
9713  int mntflg;
9714  longlong_t capacity; /* number of 512-blocks on device */
9715  char *name;
9716  char *dirname;
9717  char *pathname;
9718  char *mount;
9719  char *fstyp;
9720  char *cdevice;
9721  char *bdevice;
9722  char *norewind;
9723 };
9724 # 49 "main.c" 2
9725 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
9726 /*
9727  * CDDL HEADER START
9728  *
9729  * The contents of this file are subject to the terms of the
9730  * Common Development and Distribution License, Version 1.0 only
9731  * (the "License").  You may not use this file except in compliance
9732  * with the License.
9733  *
9734  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9735  * or http://www.opensolaris.org/os/licensing.
9736  * See the License for the specific language governing permissions
9737  * and limitations under the License.
9738  *
9739  * When distributing Covered Code, include this CDDL HEADER in each
9740  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9741  * If applicable, add the following below this CDDL HEADER, with the
9742  * fields enclosed by brackets "[]" replaced with your own identifying
9743  * information: Portions Copyright [yyyy] [name of copyright owner]
9744  *
9745  * CDDL HEADER END
9746  */
9747 /*
9748  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9749  */
9750 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9751 /*	  All Rights Reserved  	*/
9752 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h"
9753 struct pkginfo {
9754  char *pkginst;
9755  char *name;
9756  char *arch;
9757  char *version;
9758  char *vendor;
9759  char *basedir;
9760  char *catg;
9761  char status;
9762 };
9763 
9764 extern char *pkgdir;
9765 
9766 extern char *pkgparam(char *, char *);
9767 extern int pkginfo(struct pkginfo *, char *, ...),
9768   pkgnmchk(char *, char *, int);
9769 # 50 "main.c" 2
9770 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkglocs.h" 1
9771 /*
9772  * CDDL HEADER START
9773  *
9774  * The contents of this file are subject to the terms of the
9775  * Common Development and Distribution License, Version 1.0 only
9776  * (the "License").  You may not use this file except in compliance
9777  * with the License.
9778  *
9779  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9780  * or http://www.opensolaris.org/os/licensing.
9781  * See the License for the specific language governing permissions
9782  * and limitations under the License.
9783  *
9784  * When distributing Covered Code, include this CDDL HEADER in each
9785  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9786  * If applicable, add the following below this CDDL HEADER, with the
9787  * fields enclosed by brackets "[]" replaced with your own identifying
9788  * information: Portions Copyright [yyyy] [name of copyright owner]
9789  *
9790  * CDDL HEADER END
9791  */
9792 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9793 /*	  All Rights Reserved  	*/
9794 # 51 "main.c" 2
9795 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 1
9796 /*
9797  * CDDL HEADER START
9798  *
9799  * The contents of this file are subject to the terms of the
9800  * Common Development and Distribution License, Version 1.0 only
9801  * (the "License").  You may not use this file except in compliance
9802  * with the License.
9803  *
9804  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9805  * or http://www.opensolaris.org/os/licensing.
9806  * See the License for the specific language governing permissions
9807  * and limitations under the License.
9808  *
9809  * When distributing Covered Code, include this CDDL HEADER in each
9810  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9811  * If applicable, add the following below this CDDL HEADER, with the
9812  * fields enclosed by brackets "[]" replaced with your own identifying
9813  * information: Portions Copyright [yyyy] [name of copyright owner]
9814  *
9815  * CDDL HEADER END
9816  */
9817 /*
9818  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
9819  * Use is subject to license terms.
9820  */
9821 
9822 /*
9823  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9824  *
9825  * Portions of this file developed by Garrett D'Amore are licensed
9826  * under the terms of the Common Development and Distribution License (CDDL)
9827  * version 1.0 only.  The use of subsequent versions of the License are
9828  * is specifically prohibited unless those terms are not in conflict with
9829  * version 1.0 of the License.  You can find this license on-line at
9830  * http://www.illumos.org/license/CDDL
9831  */
9832 
9833 
9834 
9835 
9836 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 1
9837 /*
9838  * CDDL HEADER START
9839  *
9840  * The contents of this file are subject to the terms of the
9841  * Common Development and Distribution License, Version 1.0 only
9842  * (the "License").  You may not use this file except in compliance
9843  * with the License.
9844  *
9845  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9846  * or http://www.opensolaris.org/os/licensing.
9847  * See the License for the specific language governing permissions
9848  * and limitations under the License.
9849  *
9850  * When distributing Covered Code, include this CDDL HEADER in each
9851  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9852  * If applicable, add the following below this CDDL HEADER, with the
9853  * fields enclosed by brackets "[]" replaced with your own identifying
9854  * information: Portions Copyright [yyyy] [name of copyright owner]
9855  *
9856  * CDDL HEADER END
9857  */
9858 /*
9859  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9860  * Copyright 2014 PALO, Richard.
9861  *
9862  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
9863  * Use is subject to license terms.
9864  */
9865 
9866 /*	Copyright (c) 1988 AT&T	*/
9867 /*	  All Rights Reserved  	*/
9868 
9869 
9870 /*
9871  * An application should not include this header directly.  Instead it
9872  * should be included only through the inclusion of other Sun headers.
9873  *
9874  * The contents of this header is limited to identifiers specified in the
9875  * C Standard.  Any new identifiers specified in future amendments to the
9876  * C Standard must be placed in this header.  If these new identifiers
9877  * are required to also be in the C++ Standard "std" namespace, then for
9878  * anything other than macro definitions, corresponding "using" directives
9879  * must also be added to <locale.h>.
9880  */
9881 
9882 
9883 
9884 
9885 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
9886 /*
9887  * CDDL HEADER START
9888  *
9889  * The contents of this file are subject to the terms of the
9890  * Common Development and Distribution License (the "License").
9891  * You may not use this file except in compliance with the License.
9892  *
9893  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9894  * or http://www.opensolaris.org/os/licensing.
9895  * See the License for the specific language governing permissions
9896  * and limitations under the License.
9897  *
9898  * When distributing Covered Code, include this CDDL HEADER in each
9899  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9900  * If applicable, add the following below this CDDL HEADER, with the
9901  * fields enclosed by brackets "[]" replaced with your own identifying
9902  * information: Portions Copyright [yyyy] [name of copyright owner]
9903  *
9904  * CDDL HEADER END
9905  */
9906 
9907 /*
9908  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
9909  * Copyright 2016 Joyent, Inc.
9910  *
9911  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
9912  * Use is subject to license terms.
9913  */
9914 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
9915 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
9916 /*
9917  * This file and its contents are supplied under the terms of the
9918  * Common Development and Distribution License ("CDDL"), version 1.0.
9919  * You may only use this file in accordance with the terms of version
9920  * 1.0 of the CDDL.
9921  *
9922  * A full copy of the text of the CDDL should have accompanied this
9923  * source.  A copy of the CDDL is also available via the Internet at
9924  * http://www.illumos.org/license/CDDL.
9925  */
9926 
9927 /*
9928  * Copyright 2014-2016 PALO, Richard.
9929  */
9930 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
9931 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
9932 struct lconv {
9933  char *decimal_point;
9934  char *thousands_sep;
9935  char *grouping;
9936  char *int_curr_symbol;
9937  char *currency_symbol;
9938  char *mon_decimal_point;
9939  char *mon_thousands_sep;
9940  char *mon_grouping;
9941  char *positive_sign;
9942  char *negative_sign;
9943  char int_frac_digits;
9944  char frac_digits;
9945  char p_cs_precedes;
9946  char p_sep_by_space;
9947  char n_cs_precedes;
9948  char n_sep_by_space;
9949  char p_sign_posn;
9950  char n_sign_posn;
9951 
9952 /*
9953  * New in IEEE Std 1003.1-2001 for alignment with the ISO/IEC 9899:1999
9954  * standard.  Namespace and binary compatibility dictate that visibility
9955  * of these new members be limited.  Visibility is limited to a strictly
9956  * conforming ANSI C environment (-Xc) or if _LCONV_C99 is defined.
9957  */
9958 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
9959 };
9960 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
9961 extern char *setlocale(int, const char *);
9962 extern struct lconv *localeconv(void);
9963 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
9964 
9965 
9966 
9967 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
9968 /*
9969  * CDDL HEADER START
9970  *
9971  * The contents of this file are subject to the terms of the
9972  * Common Development and Distribution License (the "License").
9973  * You may not use this file except in compliance with the License.
9974  *
9975  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9976  * or http://www.opensolaris.org/os/licensing.
9977  * See the License for the specific language governing permissions
9978  * and limitations under the License.
9979  *
9980  * When distributing Covered Code, include this CDDL HEADER in each
9981  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9982  * If applicable, add the following below this CDDL HEADER, with the
9983  * fields enclosed by brackets "[]" replaced with your own identifying
9984  * information: Portions Copyright [yyyy] [name of copyright owner]
9985  *
9986  * CDDL HEADER END
9987  */
9988 /*
9989  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9990  *
9991  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9992  * Use is subject to license terms.
9993  */
9994 
9995 
9996 
9997 
9998 
9999 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
10000 /*
10001  * CDDL HEADER START
10002  *
10003  * The contents of this file are subject to the terms of the
10004  * Common Development and Distribution License (the "License").
10005  * You may not use this file except in compliance with the License.
10006  *
10007  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10008  * or http://www.opensolaris.org/os/licensing.
10009  * See the License for the specific language governing permissions
10010  * and limitations under the License.
10011  *
10012  *
10013  * When distributing Covered Code, include this CDDL HEADER in each
10014  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10015  * If applicable, add the following below this CDDL HEADER, with the
10016  * fields enclosed by brackets "[]" replaced with your own identifying
10017  * information: Portions Copyright [yyyy] [name of copyright owner]
10018  *
10019  * CDDL HEADER END
10020  */
10021 
10022 /*
10023  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
10024  * Use is subject to license terms.
10025  * Copyright 2016 Joyent, Inc.
10026  */
10027 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 2
10028 
10029 
10030 
10031 
10032 
10033 /*
10034  * wchar_t is a built-in type in standard C++ and as such is not
10035  * defined here when using standard C++. However, the GNU compiler
10036  * fixincludes utility nonetheless creates its own version of this
10037  * header for use by gcc and g++. In that version it adds a redundant
10038  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
10039  * header we need to include the following magic comment:
10040  *
10041  * we must use the C++ compiler's type
10042  *
10043  * The above comment should not be removed or changed until GNU
10044  * gcc/fixinc/inclhack.def is updated to bypass this header.
10045  */
10046 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h"
10047 extern char *dcgettext(const char *, const char *, const int);
10048 extern char *dgettext(const char *, const char *);
10049 extern char *gettext(const char *);
10050 extern char *textdomain(const char *);
10051 extern char *bindtextdomain(const char *, const char *);
10052 
10053 /*
10054  * LI18NUX 2000 Globalization Specification Version 1.0
10055  * with Amendment 2
10056  */
10057 extern char *dcngettext(const char *, const char *,
10058  const char *, unsigned long int, int);
10059 extern char *dngettext(const char *, const char *,
10060  const char *, unsigned long int);
10061 extern char *ngettext(const char *, const char *, unsigned long int);
10062 extern char *bind_textdomain_codeset(const char *, const char *);
10063 
10064 /* Word handling functions --- requires dynamic linking */
10065 /* Warning: these are experimental and subject to change. */
10066 extern int wdinit(void);
10067 extern int wdchkind(wchar_t);
10068 extern int wdbindf(wchar_t, wchar_t, int);
10069 extern wchar_t *wddelim(wchar_t, wchar_t, int);
10070 extern wchar_t mcfiller(void);
10071 extern int mcwrap(void);
10072 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
10073 
10074 
10075 /*
10076  * Allow global visibility for symbols defined in
10077  * C++ "std" namespace in <iso/locale_iso.h>.
10078  */
10079 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
10080 /*
10081  * These were added in POSIX 2008 as part of the newlocale() specification.
10082  */
10083 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
10084 extern locale_t duplocale(locale_t);
10085 extern void freelocale(locale_t);
10086 extern locale_t newlocale(int, const char *, locale_t);
10087 extern locale_t uselocale(locale_t);
10088 
10089 
10090 extern locale_t __global_locale(void);
10091 # 52 "main.c" 2
10092 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
10093 /*
10094  * CDDL HEADER START
10095  *
10096  * The contents of this file are subject to the terms of the
10097  * Common Development and Distribution License (the "License").
10098  * You may not use this file except in compliance with the License.
10099  *
10100  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10101  * or http://www.opensolaris.org/os/licensing.
10102  * See the License for the specific language governing permissions
10103  * and limitations under the License.
10104  *
10105  * When distributing Covered Code, include this CDDL HEADER in each
10106  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10107  * If applicable, add the following below this CDDL HEADER, with the
10108  * fields enclosed by brackets "[]" replaced with your own identifying
10109  * information: Portions Copyright [yyyy] [name of copyright owner]
10110  *
10111  * CDDL HEADER END
10112  */
10113 /*
10114  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10115  *
10116  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
10117  * Use is subject to license terms.
10118  */
10119 # 53 "main.c" 2
10120 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h" 1
10121 /*
10122  * CDDL HEADER START
10123  *
10124  * The contents of this file are subject to the terms of the
10125  * Common Development and Distribution License, Version 1.0 only
10126  * (the "License").  You may not use this file except in compliance
10127  * with the License.
10128  *
10129  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10130  * or http://www.opensolaris.org/os/licensing.
10131  * See the License for the specific language governing permissions
10132  * and limitations under the License.
10133  *
10134  * When distributing Covered Code, include this CDDL HEADER in each
10135  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10136  * If applicable, add the following below this CDDL HEADER, with the
10137  * fields enclosed by brackets "[]" replaced with your own identifying
10138  * information: Portions Copyright [yyyy] [name of copyright owner]
10139  *
10140  * CDDL HEADER END
10141  */
10142 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10143 /*	  All Rights Reserved  	*/
10144 
10145 /*
10146  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10147  *
10148  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
10149  * Use is subject to license terms.
10150  */
10151 
10152 
10153 
10154 
10155 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
10156 /*
10157  * CDDL HEADER START
10158  *
10159  * The contents of this file are subject to the terms of the
10160  * Common Development and Distribution License (the "License").
10161  * You may not use this file except in compliance with the License.
10162  *
10163  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10164  * or http://www.opensolaris.org/os/licensing.
10165  * See the License for the specific language governing permissions
10166  * and limitations under the License.
10167  *
10168  * When distributing Covered Code, include this CDDL HEADER in each
10169  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10170  * If applicable, add the following below this CDDL HEADER, with the
10171  * fields enclosed by brackets "[]" replaced with your own identifying
10172  * information: Portions Copyright [yyyy] [name of copyright owner]
10173  *
10174  * CDDL HEADER END
10175  */
10176 
10177 /*
10178  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
10179  * Copyright 2016 Joyent, Inc.
10180  *
10181  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
10182  * Use is subject to license terms.
10183  */
10184 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h" 2
10185 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
10186 /*
10187  * CDDL HEADER START
10188  *
10189  * The contents of this file are subject to the terms of the
10190  * Common Development and Distribution License (the "License").
10191  * You may not use this file except in compliance with the License.
10192  *
10193  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10194  * or http://www.opensolaris.org/os/licensing.
10195  * See the License for the specific language governing permissions
10196  * and limitations under the License.
10197  *
10198  * When distributing Covered Code, include this CDDL HEADER in each
10199  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10200  * If applicable, add the following below this CDDL HEADER, with the
10201  * fields enclosed by brackets "[]" replaced with your own identifying
10202  * information: Portions Copyright [yyyy] [name of copyright owner]
10203  *
10204  * CDDL HEADER END
10205  */
10206 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10207 /*	  All Rights Reserved  	*/
10208 
10209 
10210 /*
10211  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
10212  * Use is subject to license terms.
10213  *
10214  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
10215  * Copyright 2016 Joyent, Inc.
10216  */
10217 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h" 2
10218 
10219 
10220 
10221 
10222 
10223 /*
10224  * Structure returned by statvfs(2).
10225  */
10226 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
10227 typedef struct statvfs {
10228  unsigned long f_bsize; /* fundamental file system block size */
10229  unsigned long f_frsize; /* fragment size */
10230  fsblkcnt_t f_blocks; /* total blocks of f_frsize on fs */
10231  fsblkcnt_t f_bfree; /* total free blocks of f_frsize */
10232  fsblkcnt_t f_bavail; /* free blocks avail to non-superuser */
10233  fsfilcnt_t f_files; /* total file nodes (inodes) */
10234  fsfilcnt_t f_ffree; /* total free file nodes */
10235  fsfilcnt_t f_favail; /* free nodes avail to non-superuser */
10236  unsigned long f_fsid; /* file system id (dev for now) */
10237  char f_basetype[16]; /* target fs type name, */
10238       /* null-terminated */
10239  unsigned long f_flag; /* bit-mask of flags */
10240  unsigned long f_namemax; /* maximum file name length */
10241  char f_fstr[32]; /* filesystem-specific string */
10242 
10243  unsigned long f_filler[16]; /* reserved for future expansion */
10244 
10245 } statvfs_t;
10246 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
10247 /* transitional large file interface version */
10248 
10249 typedef struct statvfs64 {
10250  unsigned long f_bsize; /* preferred file system block size */
10251  unsigned long f_frsize; /* fundamental file system block size */
10252  fsblkcnt64_t f_blocks; /* total blocks of f_frsize */
10253  fsblkcnt64_t f_bfree; /* total free blocks of f_frsize */
10254  fsblkcnt64_t f_bavail; /* free blocks avail to non-superuser */
10255  fsfilcnt64_t f_files; /* total # of file nodes (inodes) */
10256  fsfilcnt64_t f_ffree; /* total # of free file nodes */
10257  fsfilcnt64_t f_favail; /* free nodes avail to non-superuser */
10258  unsigned long f_fsid; /* file system id (dev for now) */
10259  char f_basetype[16]; /* target fs type name, */
10260       /* null-terminated */
10261  unsigned long f_flag; /* bit-mask of flags */
10262  unsigned long f_namemax; /* maximum file name length */
10263  char f_fstr[32]; /* filesystem-specific string */
10264 
10265  unsigned long f_filler[16]; /* reserved for future expansion */
10266 
10267 } statvfs64_t;
10268 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
10269 /*
10270  * Flag definitions.
10271  */
10272 
10273 
10274 
10275 
10276 
10277 
10278 /*
10279  * large file compilation environment setup
10280  */
10281 
10282 
10283 
10284 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
10285 #pragma redefine_extname statvfs statvfs64
10286 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
10287 
10288 
10289 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
10290 #pragma redefine_extname fstatvfs fstatvfs64
10291 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
10292 # 190 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
10293 int statvfs(const char *, statvfs_t *);
10294 int fstatvfs(int, statvfs_t *);
10295 
10296 /* transitional large file interface versions */
10297 
10298 
10299 int statvfs64(const char *, statvfs64_t *);
10300 int fstatvfs64(int, statvfs64_t *);
10301 # 54 "main.c" 2
10302 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/utsname.h" 1
10303 /*
10304  * CDDL HEADER START
10305  *
10306  * The contents of this file are subject to the terms of the
10307  * Common Development and Distribution License, Version 1.0 only
10308  * (the "License").  You may not use this file except in compliance
10309  * with the License.
10310  *
10311  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10312  * or http://www.opensolaris.org/os/licensing.
10313  * See the License for the specific language governing permissions
10314  * and limitations under the License.
10315  *
10316  * When distributing Covered Code, include this CDDL HEADER in each
10317  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10318  * If applicable, add the following below this CDDL HEADER, with the
10319  * fields enclosed by brackets "[]" replaced with your own identifying
10320  * information: Portions Copyright [yyyy] [name of copyright owner]
10321  *
10322  * CDDL HEADER END
10323  */
10324 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10325 /*	  All Rights Reserved  	*/
10326 
10327 
10328 /*
10329  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10330  *
10331  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
10332  * Use is subject to license terms.
10333  */
10334 
10335 
10336 
10337 
10338 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
10339 /*
10340  * CDDL HEADER START
10341  *
10342  * The contents of this file are subject to the terms of the
10343  * Common Development and Distribution License (the "License").
10344  * You may not use this file except in compliance with the License.
10345  *
10346  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10347  * or http://www.opensolaris.org/os/licensing.
10348  * See the License for the specific language governing permissions
10349  * and limitations under the License.
10350  *
10351  * When distributing Covered Code, include this CDDL HEADER in each
10352  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10353  * If applicable, add the following below this CDDL HEADER, with the
10354  * fields enclosed by brackets "[]" replaced with your own identifying
10355  * information: Portions Copyright [yyyy] [name of copyright owner]
10356  *
10357  * CDDL HEADER END
10358  */
10359 
10360 /*
10361  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
10362  * Copyright 2016 Joyent, Inc.
10363  *
10364  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
10365  * Use is subject to license terms.
10366  */
10367 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/utsname.h" 2
10368 
10369 
10370 
10371 
10372 
10373 
10374     /* Must be at least 257 to	*/
10375     /* support Internet hostnames.	*/
10376 
10377 
10378 
10379 
10380 
10381 
10382 
10383 struct utsname {
10384  char sysname[257];
10385  char nodename[257];
10386  char release[257];
10387  char version[257];
10388  char machine[257];
10389 };
10390 
10391 
10392 extern struct utsname utsname;
10393 
10394 
10395 
10396 
10397 
10398 
10399 extern int uname(struct utsname *);
10400 extern int _uname(struct utsname *);
10401 
10402 
10403 extern int nuname(struct utsname *);
10404 
10405 extern int _nuname(struct utsname *);
10406 
10407 /*
10408  * On i386 in SVID.2 uname() returns a utsname structure with 8 byte members,
10409  * and nuname() returns the real struct utsname.  In SVID.3 uname and nuname
10410  * are equivalent.  Anyone who includes this header gets the SVID.3 behaviour.
10411  * The SVID.2 behaviour exists solely for compatibility, and is what is
10412  * implemented by the libc uname/_uname entrypoints.
10413  */
10414 
10415 
10416 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/utsname.h"
10417 #pragma redefine_extname uname _nuname
10418 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/utsname.h"
10419 
10420 
10421 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/utsname.h"
10422 #pragma redefine_extname _uname _nuname
10423 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/utsname.h"
10424 # 55 "main.c" 2
10425 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 1
10426 /*
10427  * CDDL HEADER START
10428  *
10429  * The contents of this file are subject to the terms of the
10430  * Common Development and Distribution License (the "License").
10431  * You may not use this file except in compliance with the License.
10432  *
10433  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10434  * or http://www.opensolaris.org/os/licensing.
10435  * See the License for the specific language governing permissions
10436  * and limitations under the License.
10437  *
10438  * When distributing Covered Code, include this CDDL HEADER in each
10439  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10440  * If applicable, add the following below this CDDL HEADER, with the
10441  * fields enclosed by brackets "[]" replaced with your own identifying
10442  * information: Portions Copyright [yyyy] [name of copyright owner]
10443  *
10444  * CDDL HEADER END
10445  */
10446 
10447 /*
10448  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
10449  */
10450 
10451 
10452 
10453 
10454 
10455 /*
10456  * Module:	instzones_api.h
10457  * Group:	libinstzones
10458  * Description:	This module contains the libinstzones API data structures,
10459  *		constants, and function prototypes.
10460  */
10461 
10462 /*
10463  * required includes
10464  */
10465 
10466 /* System includes */
10467 
10468 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1
10469 /*
10470  * CDDL HEADER START
10471  *
10472  * The contents of this file are subject to the terms of the
10473  * Common Development and Distribution License, Version 1.0 only
10474  * (the "License").  You may not use this file except in compliance
10475  * with the License.
10476  *
10477  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10478  * or http://www.opensolaris.org/os/licensing.
10479  * See the License for the specific language governing permissions
10480  * and limitations under the License.
10481  *
10482  * When distributing Covered Code, include this CDDL HEADER in each
10483  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10484  * If applicable, add the following below this CDDL HEADER, with the
10485  * fields enclosed by brackets "[]" replaced with your own identifying
10486  * information: Portions Copyright [yyyy] [name of copyright owner]
10487  *
10488  * CDDL HEADER END
10489  */
10490 /*	Copyright (c) 1988 AT&T	*/
10491 /*	  All Rights Reserved	*/
10492 
10493 /*
10494  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10495  *
10496  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
10497  * Use is subject to license terms.
10498  */
10499 
10500 
10501 
10502 
10503 /*
10504  * This header defines the ISO C 1989, ISO C++ 1998, and ISO C 1999
10505  * variable argument definitions.  For legacy support, it also defines
10506  * the pre-standard variable argument definitions.
10507  *
10508  * The varargs definitions within this header are defined in terms of
10509  * implementation definitions.  These implementation definitions reside
10510  * in <sys/va_list.h>.  This organization enables protected use of
10511  * the implementation by other standard headers without introducing
10512  * names into the users' namespace.
10513  */
10514 
10515 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 1
10516 /*
10517  * CDDL HEADER START
10518  *
10519  * The contents of this file are subject to the terms of the
10520  * Common Development and Distribution License, Version 1.0 only
10521  * (the "License").  You may not use this file except in compliance
10522  * with the License.
10523  *
10524  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10525  * or http://www.opensolaris.org/os/licensing.
10526  * See the License for the specific language governing permissions
10527  * and limitations under the License.
10528  *
10529  * When distributing Covered Code, include this CDDL HEADER in each
10530  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10531  * If applicable, add the following below this CDDL HEADER, with the
10532  * fields enclosed by brackets "[]" replaced with your own identifying
10533  * information: Portions Copyright [yyyy] [name of copyright owner]
10534  *
10535  * CDDL HEADER END
10536  */
10537 /*	Copyright (c) 1988 AT&T	*/
10538 /*	  All Rights Reserved  	*/
10539 
10540 
10541 /*
10542  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
10543  * Use is subject to license terms.
10544  */
10545 
10546 /*
10547  * An application should not include this header directly.  Instead it
10548  * should be included only through the inclusion of other Sun headers.
10549  *
10550  * The contents of this header is limited to identifiers specified in the
10551  * C Standard.  Any new identifiers specified in future amendments to the
10552  * C Standard must be placed in this header.  If these new identifiers
10553  * are required to also be in the C++ Standard "std" namespace, then for
10554  * anything other than macro definitions, corresponding "using" directives
10555  * must also be added to <stdarg.h>.
10556  */
10557 
10558 
10559 
10560 
10561 #pragma ident "%Z%%M%	%I%	%E% SMI"
10562 
10563 /*
10564  * This header defines the ISO C 1989 and ISO C++ 1998 variable
10565  * argument definitions.
10566  *
10567  * The varargs definitions within this header are defined in terms of
10568  * implementation definitions.  These implementation definitions reside
10569  * in <sys/va_impl.h>.  This organization enables protected use of
10570  * the implementation by other standard headers without introducing
10571  * names into the users' namespace.
10572  */
10573 
10574 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 1
10575 /*
10576  * CDDL HEADER START
10577  *
10578  * The contents of this file are subject to the terms of the
10579  * Common Development and Distribution License, Version 1.0 only
10580  * (the "License").  You may not use this file except in compliance
10581  * with the License.
10582  *
10583  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10584  * or http://www.opensolaris.org/os/licensing.
10585  * See the License for the specific language governing permissions
10586  * and limitations under the License.
10587  *
10588  * When distributing Covered Code, include this CDDL HEADER in each
10589  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10590  * If applicable, add the following below this CDDL HEADER, with the
10591  * fields enclosed by brackets "[]" replaced with your own identifying
10592  * information: Portions Copyright [yyyy] [name of copyright owner]
10593  *
10594  * CDDL HEADER END
10595  */
10596 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10597 /*	  All Rights Reserved	*/
10598 
10599 
10600 /*
10601  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10602  *
10603  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
10604  * Use is subject to license terms.
10605  */
10606 
10607 
10608 
10609 
10610 /*
10611  * An application should not include this header directly.  Instead it
10612  * should be included only through the inclusion of other Sun headers,
10613  * specifically <stdarg.h> and <varargs.h>.
10614  *
10615  * This header serves two purposes.
10616  *
10617  * First, it provides a common set of definitions that implementations
10618  * of the various standards for variable argument lists may use.  These
10619  * various standards are implemented in <varargs.h>, <stdarg.h>,
10620  * <iso/stdarg_iso.h>, <iso/stdarg_c99.h>, and <sys/varargs.h>.
10621  *
10622  * Second, it provides varying implementations of the common definitions,
10623  * depending upon the compiler.
10624  */
10625 
10626 /*
10627  * The common definitions exported by this header or compilers using
10628  * this header are:
10629  *
10630  * the macro __va_start(list, name) starting the list iteration
10631  * the macro __va_arg(list, type) getting the current arg and iterating
10632  * the macro __va_copy(to, from) to bookmark the list iteration
10633  * the macro __va_end(list) to end the iteration
10634  *
10635  * In addition, the following are exported via inclusion of <sys/va_list.h>:
10636  *
10637  * the identifier __builtin_va_alist for the variable list pseudo parameter
10638  * the type __va_alist_type for the variable list pseudo parameter
10639  * the type __va_list defining the type of the variable list iterator
10640  */
10641 
10642 /*
10643  * This header uses feature macros (e.g. __BUILTIN_VA_ARG_INCR and
10644  * __BUILTIN_VA_STRUCT), compiler macros (e.g. __GNUC__), and processor
10645  * macros (e.g. __sparc) to determine the protocol appropriate to the
10646  * current compilation.  It is intended that the compilation system
10647  * define the feature, processor, and compiler macros, not the user of
10648  * the system.
10649  */
10650 
10651 /*
10652  * Many compilation systems depend upon the use of special functions
10653  * built into the the compilation system to handle variable argument
10654  * lists.  These built-in symbols may include one or more of the
10655  * following:
10656  *
10657  *      __builtin_va_alist
10658  *      __builtin_va_start
10659  *      __builtin_va_arg_incr
10660  *      __builtin_stdarg_start
10661  *      __builtin_va_end
10662  *      __builtin_va_arg
10663  *      __builtin_va_copy
10664  */
10665 
10666 /*
10667  * The following are defined in <sys/va_list.h>:
10668  *
10669  *      __va_alist_type
10670  *      __va_void()
10671  *      __va_ptr_base
10672  *      ISA definitions via inclusion of <sys/isa_defs.h>
10673  *
10674  * Inclusion of this header also makes visible the symbols in <sys/va_list.h>.
10675  * This header is included in <varargs.h>, <sys/varargs.h> and in <stdarg.h>
10676  * via inclusion of <iso/stdarg_iso.h>.
10677  */
10678 
10679 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1
10680 /*
10681  * CDDL HEADER START
10682  *
10683  * The contents of this file are subject to the terms of the
10684  * Common Development and Distribution License, Version 1.0 only
10685  * (the "License").  You may not use this file except in compliance
10686  * with the License.
10687  *
10688  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10689  * or http://www.opensolaris.org/os/licensing.
10690  * See the License for the specific language governing permissions
10691  * and limitations under the License.
10692  *
10693  * When distributing Covered Code, include this CDDL HEADER in each
10694  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10695  * If applicable, add the following below this CDDL HEADER, with the
10696  * fields enclosed by brackets "[]" replaced with your own identifying
10697  * information: Portions Copyright [yyyy] [name of copyright owner]
10698  *
10699  * CDDL HEADER END
10700  */
10701 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10702 /*	  All Rights Reserved	*/
10703 
10704 
10705 /*
10706  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10707  *
10708  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
10709  * Use is subject to license terms.
10710  */
10711 # 106 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 2
10712 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 2
10713 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h"
10714 typedef __va_list va_list;
10715 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2
10716 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 1
10717 /*
10718  * CDDL HEADER START
10719  *
10720  * The contents of this file are subject to the terms of the
10721  * Common Development and Distribution License, Version 1.0 only
10722  * (the "License").  You may not use this file except in compliance
10723  * with the License.
10724  *
10725  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10726  * or http://www.opensolaris.org/os/licensing.
10727  * See the License for the specific language governing permissions
10728  * and limitations under the License.
10729  *
10730  * When distributing Covered Code, include this CDDL HEADER in each
10731  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10732  * If applicable, add the following below this CDDL HEADER, with the
10733  * fields enclosed by brackets "[]" replaced with your own identifying
10734  * information: Portions Copyright [yyyy] [name of copyright owner]
10735  *
10736  * CDDL HEADER END
10737  */
10738 /*	Copyright (c) 1988 AT&T	*/
10739 /*	  All Rights Reserved	*/
10740 
10741 
10742 /*
10743  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
10744  * Use is subject to license terms.
10745  */
10746 
10747 
10748 
10749 
10750 #pragma ident "%Z%%M%	%I%	%E% SMI"
10751 
10752 /*
10753  * An application should not include this header directly.  Instead it
10754  * should be included only through the inclusion of other Sun headers.
10755  *
10756  * This header defines the va_copy variable argument macro, which is
10757  * new in ISO C 1999, and thus not present in ISO C 1989 and ISO C++
10758  * 1998.  Because this macro is a long-standing Solaris extension, it
10759  * is also permitted in other contexts.
10760  *
10761  * The varargs definitions within this header are defined in terms of
10762  * implementation definitions.  These implementation definitions reside
10763  * in <sys/va_list.h>.  This organization enables protected use of
10764  * the implementation by other standard headers without introducing
10765  * names into the users' namespace.
10766  */
10767 
10768 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
10769 /*
10770  * CDDL HEADER START
10771  *
10772  * The contents of this file are subject to the terms of the
10773  * Common Development and Distribution License (the "License").
10774  * You may not use this file except in compliance with the License.
10775  *
10776  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10777  * or http://www.opensolaris.org/os/licensing.
10778  * See the License for the specific language governing permissions
10779  * and limitations under the License.
10780  *
10781  * When distributing Covered Code, include this CDDL HEADER in each
10782  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10783  * If applicable, add the following below this CDDL HEADER, with the
10784  * fields enclosed by brackets "[]" replaced with your own identifying
10785  * information: Portions Copyright [yyyy] [name of copyright owner]
10786  *
10787  * CDDL HEADER END
10788  */
10789 
10790 /*
10791  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
10792  * Copyright 2016 Joyent, Inc.
10793  *
10794  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
10795  * Use is subject to license terms.
10796  */
10797 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 2
10798 
10799 
10800 
10801 
10802 
10803 /*
10804  * va_copy was initially a Solaris extension to provide a portable
10805  * way to perform a variable argument list ``bookmarking'' function.
10806  * It is now specified in the ISO/IEC 9899:1999 standard.
10807  */
10808 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2
10809 
10810 /*
10811  * Allow global visibility for symbols defined in
10812  * C++ "std" namespace in <iso/stdarg_iso.h>.
10813  */
10814 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
10815 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
10816 /*
10817  * CDDL HEADER START
10818  *
10819  * The contents of this file are subject to the terms of the
10820  * Common Development and Distribution License (the "License").
10821  * You may not use this file except in compliance with the License.
10822  *
10823  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10824  * or http://www.opensolaris.org/os/licensing.
10825  * See the License for the specific language governing permissions
10826  * and limitations under the License.
10827  *
10828  * When distributing Covered Code, include this CDDL HEADER in each
10829  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10830  * If applicable, add the following below this CDDL HEADER, with the
10831  * fields enclosed by brackets "[]" replaced with your own identifying
10832  * information: Portions Copyright [yyyy] [name of copyright owner]
10833  *
10834  * CDDL HEADER END
10835  */
10836 
10837 /*
10838  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10839  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
10840  */
10841 
10842 /*	Copyright (c) 1988 AT&T	*/
10843 /*	  All Rights Reserved  	*/
10844 
10845 /*
10846  * User-visible pieces of the ANSI C standard I/O package.
10847  */
10848 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
10849 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 1
10850 /*
10851  * CDDL HEADER START
10852  *
10853  * The contents of this file are subject to the terms of the
10854  * Common Development and Distribution License (the "License").
10855  * You may not use this file except in compliance with the License.
10856  *
10857  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10858  * or http://www.opensolaris.org/os/licensing.
10859  * See the License for the specific language governing permissions
10860  * and limitations under the License.
10861  *
10862  * When distributing Covered Code, include this CDDL HEADER in each
10863  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10864  * If applicable, add the following below this CDDL HEADER, with the
10865  * fields enclosed by brackets "[]" replaced with your own identifying
10866  * information: Portions Copyright [yyyy] [name of copyright owner]
10867  *
10868  * CDDL HEADER END
10869  */
10870 
10871 /*
10872  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10873  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
10874  */
10875 
10876 /*	Copyright (c) 1988 AT&T	*/
10877 /*	  All Rights Reserved  	*/
10878 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
10879 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/termios.h" 1
10880 /*
10881  * CDDL HEADER START
10882  *
10883  * The contents of this file are subject to the terms of the
10884  * Common Development and Distribution License, Version 1.0 only
10885  * (the "License").  You may not use this file except in compliance
10886  * with the License.
10887  *
10888  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10889  * or http://www.opensolaris.org/os/licensing.
10890  * See the License for the specific language governing permissions
10891  * and limitations under the License.
10892  *
10893  * When distributing Covered Code, include this CDDL HEADER in each
10894  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10895  * If applicable, add the following below this CDDL HEADER, with the
10896  * fields enclosed by brackets "[]" replaced with your own identifying
10897  * information: Portions Copyright [yyyy] [name of copyright owner]
10898  *
10899  * CDDL HEADER END
10900  */
10901 /*	Copyright (c) 1988 AT&T	*/
10902 /*	  All Rights Reserved  	*/
10903 
10904 
10905 
10906 
10907 
10908 #pragma ident "%Z%%M%	%I%	%E% SMI"
10909 
10910 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h" 1
10911 /*
10912  * CDDL HEADER START
10913  *
10914  * The contents of this file are subject to the terms of the
10915  * Common Development and Distribution License (the "License").
10916  * You may not use this file except in compliance with the License.
10917  *
10918  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10919  * or http://www.opensolaris.org/os/licensing.
10920  * See the License for the specific language governing permissions
10921  * and limitations under the License.
10922  *
10923  * When distributing Covered Code, include this CDDL HEADER in each
10924  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10925  * If applicable, add the following below this CDDL HEADER, with the
10926  * fields enclosed by brackets "[]" replaced with your own identifying
10927  * information: Portions Copyright [yyyy] [name of copyright owner]
10928  *
10929  * CDDL HEADER END
10930  */
10931 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10932 /*	  All Rights Reserved  	*/
10933 
10934 
10935 /*
10936  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10937  *
10938  * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
10939  */
10940 
10941 
10942 
10943 
10944 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
10945 /*
10946  * CDDL HEADER START
10947  *
10948  * The contents of this file are subject to the terms of the
10949  * Common Development and Distribution License (the "License").
10950  * You may not use this file except in compliance with the License.
10951  *
10952  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10953  * or http://www.opensolaris.org/os/licensing.
10954  * See the License for the specific language governing permissions
10955  * and limitations under the License.
10956  *
10957  * When distributing Covered Code, include this CDDL HEADER in each
10958  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10959  * If applicable, add the following below this CDDL HEADER, with the
10960  * fields enclosed by brackets "[]" replaced with your own identifying
10961  * information: Portions Copyright [yyyy] [name of copyright owner]
10962  *
10963  * CDDL HEADER END
10964  */
10965 
10966 /*
10967  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
10968  * Copyright 2016 Joyent, Inc.
10969  *
10970  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
10971  * Use is subject to license terms.
10972  */
10973 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h" 2
10974 
10975 
10976 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ttydev.h" 1
10977 /*
10978  * CDDL HEADER START
10979  *
10980  * The contents of this file are subject to the terms of the
10981  * Common Development and Distribution License, Version 1.0 only
10982  * (the "License").  You may not use this file except in compliance
10983  * with the License.
10984  *
10985  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10986  * or http://www.opensolaris.org/os/licensing.
10987  * See the License for the specific language governing permissions
10988  * and limitations under the License.
10989  *
10990  * When distributing Covered Code, include this CDDL HEADER in each
10991  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10992  * If applicable, add the following below this CDDL HEADER, with the
10993  * fields enclosed by brackets "[]" replaced with your own identifying
10994  * information: Portions Copyright [yyyy] [name of copyright owner]
10995  *
10996  * CDDL HEADER END
10997  */
10998 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10999 /*	  All Rights Reserved  	*/
11000 
11001 
11002 
11003 
11004 
11005 #pragma ident "%Z%%M%	%I%	%E% SMI"
11006 
11007 
11008 
11009 
11010 
11011 /*
11012  * Terminal definitions related to underlying hardware.
11013  */
11014 
11015 /*
11016  * Speeds
11017  */
11018 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h" 2
11019 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
11020 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
11021 /*	  All Rights Reserved  	*/
11022 
11023 
11024 /*
11025  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
11026  * All rights reserved.  The Berkeley software License Agreement
11027  * specifies the terms and conditions for redistribution.
11028  */
11029 
11030 /*
11031  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11032  *
11033  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
11034  * Use is subject to license terms.
11035  *
11036  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
11037  */
11038 
11039 /*
11040  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
11041  */
11042 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h" 2
11043 
11044 
11045 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
11046 /*
11047  * CDDL HEADER START
11048  *
11049  * The contents of this file are subject to the terms of the
11050  * Common Development and Distribution License (the "License").
11051  * You may not use this file except in compliance with the License.
11052  *
11053  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11054  * or http://www.opensolaris.org/os/licensing.
11055  * See the License for the specific language governing permissions
11056  * and limitations under the License.
11057  *
11058  * When distributing Covered Code, include this CDDL HEADER in each
11059  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11060  * If applicable, add the following below this CDDL HEADER, with the
11061  * fields enclosed by brackets "[]" replaced with your own identifying
11062  * information: Portions Copyright [yyyy] [name of copyright owner]
11063  *
11064  * CDDL HEADER END
11065  */
11066 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
11067 /*	  All Rights Reserved  	*/
11068 
11069 
11070 /*
11071  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
11072  * Use is subject to license terms.
11073  *
11074  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
11075  * Copyright 2016 Joyent, Inc.
11076  */
11077 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h" 2
11078 
11079 
11080 
11081 
11082 
11083 /*
11084  * _POSIX_VDISABLE has been defined in <sys/termios.h> since the
11085  * introduction of the header. The POSIX standard, IEEE Std.
11086  * 1003.1-1988 also required  the existence of _POSIX_VDISABLE in
11087  * this header. Subsequent versions of the IEEE Standard as well
11088  * as the X/Open specifications required that _POSIX_VDISABLE be
11089  * defined in <unistd.h> while still allowing for it's existence
11090  * here. With the introduction of XPG6, _POSIX_VDISABLE can only
11091  * be defined in <unistd.h>.
11092  */
11093 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11094 /* required by termio.h and VCEOF/VCEOL */
11095 
11096 
11097 
11098 
11099 
11100 /* some defines required by POSIX */
11101 
11102 
11103 /*
11104  * types defined by POSIX. These are better off in types.h, but
11105  * the standard says that they have to be in termios.h.
11106  */
11107 typedef unsigned int tcflag_t;
11108 typedef unsigned char cc_t;
11109 typedef unsigned int speed_t;
11110 
11111 /*
11112  * Ioctl control packet
11113  */
11114 struct termios {
11115  tcflag_t c_iflag; /* input modes */
11116  tcflag_t c_oflag; /* output modes */
11117  tcflag_t c_cflag; /* control modes */
11118  tcflag_t c_lflag; /* line discipline modes */
11119  cc_t c_cc[19]; /* control chars */
11120 };
11121 
11122 /*
11123  * POSIX termios functions
11124  * These functions get mapped into ioctls.
11125  */
11126 
11127 
11128 
11129 extern speed_t cfgetospeed(const struct termios *);
11130 extern int cfsetospeed(struct termios *, speed_t);
11131 extern speed_t cfgetispeed(const struct termios *);
11132 extern int cfsetispeed(struct termios *, speed_t);
11133 extern int tcgetattr(int, struct termios *);
11134 extern int tcsetattr(int, int, const struct termios *);
11135 extern int tcsendbreak(int, int);
11136 extern int tcdrain(int);
11137 extern int tcflush(int, int);
11138 extern int tcflow(int, int);
11139 
11140 
11141 
11142 extern pid_t tcgetsid(int);
11143 
11144 
11145 
11146 
11147 
11148 /* control characters */
11149 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11150 /* 17 through 19 reserved for future use */
11151 
11152 /*
11153  * control characters form Xenix termio.h
11154  */
11155 
11156 
11157 
11158 
11159 
11160 
11161 /* S5 default control chars */
11162 /* CINTR, CERASE and CKILL modified to SunOS traditional values */
11163 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11164 /* input modes */
11165 # 209 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11166 /* output modes */
11167 # 255 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11168 /* control modes */
11169 # 281 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11170 /*
11171  * 4.4BSD hardware flow control flags
11172  */
11173 
11174 
11175 
11176 
11177 
11178 /* line discipline 0 modes */
11179 # 327 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11180 /* Slots reserved for 386/XENIX compatibility - keyboard control */
11181 # 343 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11182 /*
11183  * Softcarrier ioctls
11184  */
11185 
11186 
11187 
11188 
11189 /* termios ioctls */
11190 # 363 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11191 /*
11192  * NTP PPS ioctls
11193  */
11194 
11195 
11196 
11197 
11198 /* Argument filled in by TIOCGPPSEV */
11199 struct ppsclockev {
11200  struct timeval tv;
11201  uint_t serial;
11202 };
11203 # 387 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11204 /* termios option flags */
11205 # 398 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11206 /* TIOC ioctls for BSD, ptys, job control and modem control */
11207 
11208 
11209 
11210 
11211 
11212 /* Slots for 386/XENIX compatibility */
11213 /* BSD includes these ioctls in ttold.h */
11214 # 421 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11215 /*
11216  * BSD ioctls that are not the same as XENIX are included here.
11217  * There are also some relevant ioctls from SUN/BSD sys/ttycom.h
11218  * BSD pty ioctls like TIOCPKT are not supported in SVR4.
11219  */
11220 # 449 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11221 /* POSIX job control ioctls */
11222 
11223 
11224 
11225 
11226 
11227 
11228 /* Miscellaneous */
11229 
11230 
11231 /* Modem control */
11232 # 476 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11233 /* pseudo-tty */
11234 
11235 
11236 
11237 
11238 
11239 /* Some more 386 xenix stuff */
11240 # 492 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11241 /* Slots for 386 compatibility */
11242 
11243 
11244 
11245 
11246 
11247 
11248 
11249 /*
11250  * These are retained for 386/XENIX compatibility.
11251  */
11252 
11253 
11254 
11255 
11256 
11257 /*
11258  * Returns a non-zero value if there
11259  * are characters in the input queue.
11260  *
11261  * XXX - somebody is confused here.  V7 had no such "ioctl", although XENIX may
11262  * have added it; 4BSD had FIONREAD, which returned the number of characters
11263  * waiting, and was supposed to work on all descriptors (i.e., every driver
11264  * should make a stab at implementing it).
11265  */
11266 
11267 
11268 
11269 /*
11270  * Speeds
11271  */
11272 # 551 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/termios.h"
11273 /* Windowing structure to support JWINSIZE/TIOCSWINSZ/TIOCGWINSZ */
11274 struct winsize {
11275  unsigned short ws_row; /* rows, in characters */
11276  unsigned short ws_col; /* columns, in character */
11277  unsigned short ws_xpixel; /* horizontal size, pixels */
11278  unsigned short ws_ypixel; /* vertical size, pixels */
11279 };
11280 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/termios.h" 2
11281 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
11282 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mman.h" 1
11283 /*
11284  * CDDL HEADER START
11285  *
11286  * The contents of this file are subject to the terms of the
11287  * Common Development and Distribution License (the "License").
11288  * You may not use this file except in compliance with the License.
11289  *
11290  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11291  * or http://www.opensolaris.org/os/licensing.
11292  * See the License for the specific language governing permissions
11293  * and limitations under the License.
11294  *
11295  * When distributing Covered Code, include this CDDL HEADER in each
11296  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11297  * If applicable, add the following below this CDDL HEADER, with the
11298  * fields enclosed by brackets "[]" replaced with your own identifying
11299  * information: Portions Copyright [yyyy] [name of copyright owner]
11300  *
11301  * CDDL HEADER END
11302  */
11303 
11304 /* Copyright 2013 OmniTI Computer Consulting, Inc. All rights reserved. */
11305 /*
11306  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11307  *
11308  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
11309  * Use is subject to license terms.
11310  * Copyright 2015 Joyent, Inc.  All rights reserved.
11311  */
11312 
11313 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
11314 /*	  All Rights Reserved	*/
11315 
11316 /*
11317  * University Copyright- Copyright (c) 1982, 1986, 1988
11318  * The Regents of the University of California
11319  * All Rights Reserved
11320  *
11321  * University Acknowledgment- Portions of this document are derived from
11322  * software developed by the University of California, Berkeley, and its
11323  * contributors.
11324  */
11325 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
11326 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
11327 /*
11328  * CDDL HEADER START
11329  *
11330  * The contents of this file are subject to the terms of the
11331  * Common Development and Distribution License (the "License").
11332  * You may not use this file except in compliance with the License.
11333  *
11334  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11335  * or http://www.opensolaris.org/os/licensing.
11336  * See the License for the specific language governing permissions
11337  * and limitations under the License.
11338  *
11339  * When distributing Covered Code, include this CDDL HEADER in each
11340  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11341  * If applicable, add the following below this CDDL HEADER, with the
11342  * fields enclosed by brackets "[]" replaced with your own identifying
11343  * information: Portions Copyright [yyyy] [name of copyright owner]
11344  *
11345  * CDDL HEADER END
11346  */
11347 
11348 /*
11349  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
11350  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
11351  */
11352 
11353 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
11354 /*	  All Rights Reserved  	*/
11355 
11356 /*
11357  * University Copyright- Copyright (c) 1982, 1986, 1988
11358  * The Regents of the University of California
11359  * All Rights Reserved
11360  *
11361  * University Acknowledgment- Portions of this document are derived from
11362  * software developed by the University of California, Berkeley, and its
11363  * contributors.
11364  */
11365 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
11366 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
11367 /*
11368  * CDDL HEADER START
11369  *
11370  * The contents of this file are subject to the terms of the
11371  * Common Development and Distribution License (the "License").
11372  * You may not use this file except in compliance with the License.
11373  *
11374  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11375  * or http://www.opensolaris.org/os/licensing.
11376  * See the License for the specific language governing permissions
11377  * and limitations under the License.
11378  *
11379  * When distributing Covered Code, include this CDDL HEADER in each
11380  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11381  * If applicable, add the following below this CDDL HEADER, with the
11382  * fields enclosed by brackets "[]" replaced with your own identifying
11383  * information: Portions Copyright [yyyy] [name of copyright owner]
11384  *
11385  * CDDL HEADER END
11386  */
11387 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
11388 /*	  All Rights Reserved  	*/
11389 
11390 
11391 /*
11392  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
11393  * Use is subject to license terms.
11394  *
11395  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
11396  * Copyright 2016 Joyent, Inc.
11397  */
11398 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
11399 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ioctl.h" 1
11400 /*
11401  * CDDL HEADER START
11402  *
11403  * The contents of this file are subject to the terms of the
11404  * Common Development and Distribution License, Version 1.0 only
11405  * (the "License").  You may not use this file except in compliance
11406  * with the License.
11407  *
11408  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11409  * or http://www.opensolaris.org/os/licensing.
11410  * See the License for the specific language governing permissions
11411  * and limitations under the License.
11412  *
11413  * When distributing Covered Code, include this CDDL HEADER in each
11414  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11415  * If applicable, add the following below this CDDL HEADER, with the
11416  * fields enclosed by brackets "[]" replaced with your own identifying
11417  * information: Portions Copyright [yyyy] [name of copyright owner]
11418  *
11419  * CDDL HEADER END
11420  */
11421 /*
11422  * Copyright 1991 Sun Microsystems, Inc.  All rights reserved.
11423  * Use is subject to license terms.
11424  */
11425 
11426 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
11427 /*	  All Rights Reserved  	*/
11428 
11429 
11430 
11431 
11432 #pragma ident "%Z%%M%	%I%	%E% SMI"
11433 
11434 
11435 
11436 
11437 
11438 /*
11439  *	There are some inherent problems in having a single file
11440  *	ioctl.h, with both System V and BSD flags. Introducing
11441  *	BSD flags into this file creates compilation problems
11442  *	with flags such as ECHO, NL1 etc., if termio.h and ioctl.h
11443  *	are included by the same file. Since these two files can
11444  *	be only included by System V applications, /usr/inclule/sys/ioctl.h
11445  *	will be System V mode and all the BSD flags will be turned off
11446  *	using #ifdef BSD_COMP. This file will also exist in
11447  *	/usr/ucbinclude/sys/ioctl.h for BSD applications but without the
11448  *	BSD flags turned off. System V appliactions can use ioctl.h without
11449  *	any changes, System V applications requiring BSD flags should
11450  *	-D BSD_COMP when compiling (and be warned about the common
11451  *	flags between System V and BSD) and BSD applications should
11452  *	use /usr/ucbinclude/sys/ioctl.h.
11453  *
11454  */
11455 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ioctl.h"
11456 /* BSD related defines */
11457 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
11458 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 1
11459 /*
11460  * CDDL HEADER START
11461  *
11462  * The contents of this file are subject to the terms of the
11463  * Common Development and Distribution License (the "License").
11464  * You may not use this file except in compliance with the License.
11465  *
11466  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11467  * or http://www.opensolaris.org/os/licensing.
11468  * See the License for the specific language governing permissions
11469  * and limitations under the License.
11470  *
11471  * When distributing Covered Code, include this CDDL HEADER in each
11472  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11473  * If applicable, add the following below this CDDL HEADER, with the
11474  * fields enclosed by brackets "[]" replaced with your own identifying
11475  * information: Portions Copyright [yyyy] [name of copyright owner]
11476  *
11477  * CDDL HEADER END
11478  */
11479 
11480 /*
11481  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
11482  */
11483 
11484 
11485 
11486 
11487 /*
11488  * Zone configuration header file.
11489  */
11490 
11491 
11492 
11493 
11494 
11495 /* sys/socket.h is required by net/if.h, which has a constant needed here */
11496 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
11497 /*
11498  * CDDL HEADER START
11499  *
11500  * The contents of this file are subject to the terms of the
11501  * Common Development and Distribution License (the "License").
11502  * You may not use this file except in compliance with the License.
11503  *
11504  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11505  * or http://www.opensolaris.org/os/licensing.
11506  * See the License for the specific language governing permissions
11507  * and limitations under the License.
11508  *
11509  * When distributing Covered Code, include this CDDL HEADER in each
11510  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11511  * If applicable, add the following below this CDDL HEADER, with the
11512  * fields enclosed by brackets "[]" replaced with your own identifying
11513  * information: Portions Copyright [yyyy] [name of copyright owner]
11514  *
11515  * CDDL HEADER END
11516  */
11517 
11518 /*
11519  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
11520  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
11521  */
11522 
11523 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
11524 /*	  All Rights Reserved  	*/
11525 
11526 /*
11527  * University Copyright- Copyright (c) 1982, 1986, 1988
11528  * The Regents of the University of California
11529  * All Rights Reserved
11530  *
11531  * University Acknowledgment- Portions of this document are derived from
11532  * software developed by the University of California, Berkeley, and its
11533  * contributors.
11534  */
11535 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
11536 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fstyp.h" 1
11537 /*
11538  * CDDL HEADER START
11539  *
11540  * The contents of this file are subject to the terms of the
11541  * Common Development and Distribution License, Version 1.0 only
11542  * (the "License").  You may not use this file except in compliance
11543  * with the License.
11544  *
11545  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11546  * or http://www.opensolaris.org/os/licensing.
11547  * See the License for the specific language governing permissions
11548  * and limitations under the License.
11549  *
11550  * When distributing Covered Code, include this CDDL HEADER in each
11551  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11552  * If applicable, add the following below this CDDL HEADER, with the
11553  * fields enclosed by brackets "[]" replaced with your own identifying
11554  * information: Portions Copyright [yyyy] [name of copyright owner]
11555  *
11556  * CDDL HEADER END
11557  */
11558 /*
11559  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11560  */
11561 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
11562 /*	  All Rights Reserved  	*/
11563 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fstyp.h"
11564 /*
11565  * Opcodes for the sysfs() system call.
11566  */
11567 
11568 
11569 
11570 
11571 
11572 int sysfs(int, ...);
11573 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
11574 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mount.h" 1
11575 /*
11576  * CDDL HEADER START
11577  *
11578  * The contents of this file are subject to the terms of the
11579  * Common Development and Distribution License, Version 1.0 only
11580  * (the "License").  You may not use this file except in compliance
11581  * with the License.
11582  *
11583  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11584  * or http://www.opensolaris.org/os/licensing.
11585  * See the License for the specific language governing permissions
11586  * and limitations under the License.
11587  *
11588  * When distributing Covered Code, include this CDDL HEADER in each
11589  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11590  * If applicable, add the following below this CDDL HEADER, with the
11591  * fields enclosed by brackets "[]" replaced with your own identifying
11592  * information: Portions Copyright [yyyy] [name of copyright owner]
11593  *
11594  * CDDL HEADER END
11595  */
11596 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
11597 /*	  All Rights Reserved  	*/
11598 
11599 
11600 /*
11601  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11602  *
11603  * Copyright (c) 1996, 1999 by Sun Microsystems, Inc.
11604  * All rights reserved.
11605  */
11606 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mount.h"
11607 /*
11608  * Flag bits passed to mount(2).
11609  */
11610 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mount.h"
11611 /*
11612  * Additional flag bits that domount() is prepared to interpret, but that
11613  * can't be passed through mount(2).
11614  */
11615 
11616 
11617 
11618 /*
11619  * Mask to sift out flag bits allowable from mount(2).
11620  */
11621 
11622 
11623 
11624 
11625 /*
11626  * Mask to sift out flag bits allowable from umount2(2).
11627  */
11628 
11629 
11630 
11631 /*
11632  * Maximum option string length accepted or returned by mount(2).
11633  */
11634 
11635 
11636 
11637 int mount(const char *, const char *, int, ...);
11638 int umount(const char *);
11639 int umount2(const char *, int);
11640 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
11641 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/priv.h" 1
11642 /*
11643  * CDDL HEADER START
11644  *
11645  * The contents of this file are subject to the terms of the
11646  * Common Development and Distribution License (the "License").
11647  * You may not use this file except in compliance with the License.
11648  *
11649  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11650  * or http://www.opensolaris.org/os/licensing.
11651  * See the License for the specific language governing permissions
11652  * and limitations under the License.
11653  *
11654  * When distributing Covered Code, include this CDDL HEADER in each
11655  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11656  * If applicable, add the following below this CDDL HEADER, with the
11657  * fields enclosed by brackets "[]" replaced with your own identifying
11658  * information: Portions Copyright [yyyy] [name of copyright owner]
11659  *
11660  * CDDL HEADER END
11661  */
11662 /*
11663  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11664  *
11665  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
11666  * Use is subject to license terms.
11667  */
11668 
11669 
11670 
11671 
11672 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 1
11673 /*
11674  * CDDL HEADER START
11675  *
11676  * The contents of this file are subject to the terms of the
11677  * Common Development and Distribution License (the "License").
11678  * You may not use this file except in compliance with the License.
11679  *
11680  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11681  * or http://www.opensolaris.org/os/licensing.
11682  * See the License for the specific language governing permissions
11683  * and limitations under the License.
11684  *
11685  * When distributing Covered Code, include this CDDL HEADER in each
11686  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11687  * If applicable, add the following below this CDDL HEADER, with the
11688  * fields enclosed by brackets "[]" replaced with your own identifying
11689  * information: Portions Copyright [yyyy] [name of copyright owner]
11690  *
11691  * CDDL HEADER END
11692  */
11693 /*
11694  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11695  *
11696  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
11697  */
11698 
11699 
11700 
11701 
11702 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
11703 /*
11704  * CDDL HEADER START
11705  *
11706  * The contents of this file are subject to the terms of the
11707  * Common Development and Distribution License (the "License").
11708  * You may not use this file except in compliance with the License.
11709  *
11710  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11711  * or http://www.opensolaris.org/os/licensing.
11712  * See the License for the specific language governing permissions
11713  * and limitations under the License.
11714  *
11715  * When distributing Covered Code, include this CDDL HEADER in each
11716  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11717  * If applicable, add the following below this CDDL HEADER, with the
11718  * fields enclosed by brackets "[]" replaced with your own identifying
11719  * information: Portions Copyright [yyyy] [name of copyright owner]
11720  *
11721  * CDDL HEADER END
11722  */
11723 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
11724 /*	  All Rights Reserved  	*/
11725 
11726 
11727 /*
11728  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
11729  * Use is subject to license terms.
11730  *
11731  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
11732  * Copyright 2016 Joyent, Inc.
11733  */
11734 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 2
11735 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
11736 /*
11737  * CDDL HEADER START
11738  *
11739  * The contents of this file are subject to the terms of the
11740  * Common Development and Distribution License (the "License").
11741  * You may not use this file except in compliance with the License.
11742  *
11743  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11744  * or http://www.opensolaris.org/os/licensing.
11745  * See the License for the specific language governing permissions
11746  * and limitations under the License.
11747  *
11748  * When distributing Covered Code, include this CDDL HEADER in each
11749  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11750  * If applicable, add the following below this CDDL HEADER, with the
11751  * fields enclosed by brackets "[]" replaced with your own identifying
11752  * information: Portions Copyright [yyyy] [name of copyright owner]
11753  *
11754  * CDDL HEADER END
11755  */
11756 /*
11757  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
11758  * Use is subject to license terms.
11759  */
11760 
11761 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
11762 /*	  All Rights Reserved  	*/
11763 
11764 /*
11765  * Portions of this source code were derived from Berkeley 4.3 BSD
11766  * under license from the Regents of the University of California.
11767  */
11768 
11769 
11770 
11771 
11772 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
11773 /*
11774  * CDDL HEADER START
11775  *
11776  * The contents of this file are subject to the terms of the
11777  * Common Development and Distribution License (the "License").
11778  * You may not use this file except in compliance with the License.
11779  *
11780  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11781  * or http://www.opensolaris.org/os/licensing.
11782  * See the License for the specific language governing permissions
11783  * and limitations under the License.
11784  *
11785  * When distributing Covered Code, include this CDDL HEADER in each
11786  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11787  * If applicable, add the following below this CDDL HEADER, with the
11788  * fields enclosed by brackets "[]" replaced with your own identifying
11789  * information: Portions Copyright [yyyy] [name of copyright owner]
11790  *
11791  * CDDL HEADER END
11792  */
11793 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
11794 /*	  All Rights Reserved  	*/
11795 
11796 
11797 /*
11798  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
11799  * Use is subject to license terms.
11800  *
11801  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
11802  * Copyright 2016 Joyent, Inc.
11803  */
11804 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 2
11805 
11806 
11807 
11808 
11809 
11810 /*
11811  * The credential is an opaque kernel private data structure defined in
11812  * <sys/cred_impl.h>.
11813  */
11814 
11815 typedef struct cred cred_t;
11816 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 2
11817 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv_names.h" 1
11818 /*
11819  * CDDL HEADER START
11820  *
11821  * The contents of this file are subject to the terms of the
11822  * Common Development and Distribution License (the "License").
11823  * You may not use this file except in compliance with the License.
11824  *
11825  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11826  * or http://www.opensolaris.org/os/licensing.
11827  * See the License for the specific language governing permissions
11828  * and limitations under the License.
11829  *
11830  * When distributing Covered Code, include this CDDL HEADER in each
11831  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11832  * If applicable, add the following below this CDDL HEADER, with the
11833  * fields enclosed by brackets "[]" replaced with your own identifying
11834  * information: Portions Copyright [yyyy] [name of copyright owner]
11835  *
11836  * CDDL HEADER END
11837  */
11838 /*
11839  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
11840  * Copyright 2015, Joyent, Inc. All rights reserved.
11841  *
11842  * Privilege constant definitions.  Privileges and privilege sets
11843  * are only known by name and should be mapped at runtime.
11844  *
11845  * THIS FILE WAS GENERATED; DO NOT EDIT
11846  */
11847 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv_names.h"
11848 /*
11849  * Privilege names
11850  */
11851 /*
11852  * Allows a process to request critical events without limitation.
11853  * Allows a process to request reliable delivery of all events on
11854  * any event queue.
11855  */
11856 
11857 
11858 /*
11859  * Allows a process to set the service FMRI value of a process
11860  * contract template.
11861  */
11862 
11863 
11864 /*
11865  * Allows a process to observe contract events generated by
11866  * contracts created and owned by users other than the process's
11867  * effective user ID.
11868  * Allows a process to open contract event endpoints belonging to
11869  * contracts created and owned by users other than the process's
11870  * effective user ID.
11871  */
11872 
11873 
11874 /*
11875  * Allow a process to access per-CPU hardware performance counters.
11876  */
11877 
11878 
11879 /*
11880  * Allows DTrace kernel-level tracing.
11881  */
11882 
11883 
11884 /*
11885  * Allows DTrace process-level tracing.
11886  * Allows process-level tracing probes to be placed and enabled in
11887  * processes to which the user has permissions.
11888  */
11889 
11890 
11891 /*
11892  * Allows DTrace user-level tracing.
11893  * Allows use of the syscall and profile DTrace providers to
11894  * examine processes to which the user has permissions.
11895  */
11896 
11897 
11898 /*
11899  * Allows a process to change a file's owner user ID.
11900  * Allows a process to change a file's group ID to one other than
11901  * the process' effective group ID or one of the process'
11902  * supplemental group IDs.
11903  */
11904 
11905 
11906 /*
11907  * Allows a process to give away its files; a process with this
11908  * privilege will run as if {_POSIX_CHOWN_RESTRICTED} is not
11909  * in effect.
11910  */
11911 
11912 
11913 /*
11914  * Allows a process to execute an executable file whose permission
11915  * bits or ACL do not allow the process execute permission.
11916  */
11917 
11918 
11919 /*
11920  * Allows a process to read a file or directory whose permission
11921  * bits or ACL do not allow the process read permission.
11922  */
11923 
11924 
11925 /*
11926  * Allows a process to search a directory whose permission bits or
11927  * ACL do not allow the process search permission.
11928  */
11929 
11930 
11931 /*
11932  * Allows a process to write a file or directory whose permission
11933  * bits or ACL do not allow the process write permission.
11934  * In order to write files owned by uid 0 in the absence of an
11935  * effective uid of 0 ALL privileges are required.
11936  */
11937 
11938 
11939 /*
11940  * Allows a process to set the sensitivity label of a file or
11941  * directory to a sensitivity label that does not dominate the
11942  * existing sensitivity label.
11943  * This privilege is interpreted only if the system is configured
11944  * with Trusted Extensions.
11945  */
11946 
11947 
11948 /*
11949  * Allows a process to set immutable, nounlink or appendonly
11950  * file attributes.
11951  */
11952 
11953 
11954 /*
11955  * Allows a process to create hardlinks to files owned by a uid
11956  * different from the process' effective uid.
11957  */
11958 
11959 
11960 /*
11961  * Allows a process which is not the owner of a file or directory
11962  * to perform the following operations that are normally permitted
11963  * only for the file owner: modify that file's access and
11964  * modification times; remove or rename a file or directory whose
11965  * parent directory has the ``save text image after execution''
11966  * (sticky) bit set; mount a ``namefs'' upon a file; modify
11967  * permission bits or ACL except for the set-uid and set-gid
11968  * bits.
11969  */
11970 
11971 
11972 /*
11973  * Allows a process to read objects in the filesystem.
11974  */
11975 
11976 
11977 /*
11978  * Allows a process to change the ownership of a file or write to
11979  * a file without the set-user-ID and set-group-ID bits being
11980  * cleared.
11981  * Allows a process to set the set-group-ID bit on a file or
11982  * directory whose group is not the process' effective group or
11983  * one of the process' supplemental groups.
11984  * Allows a process to set the set-user-ID bit on a file with
11985  * different ownership in the presence of PRIV_FILE_OWNER.
11986  * Additional restrictions apply when creating or modifying a
11987  * set-uid 0 file.
11988  */
11989 
11990 
11991 /*
11992  * Allows a process to set the sensitivity label of a file or
11993  * directory to a sensitivity label that dominates the existing
11994  * sensitivity label.
11995  * This privilege is interpreted only if the system is configured
11996  * with Trusted Extensions.
11997  */
11998 
11999 
12000 /*
12001  * Allows a process to modify objects in the filesystem.
12002  */
12003 
12004 
12005 /*
12006  * Allows a process to make privileged ioctls to graphics devices.
12007  * Typically only xserver process needs to have this privilege.
12008  * A process with this privilege is also allowed to perform
12009  * privileged graphics device mappings.
12010  */
12011 
12012 
12013 /*
12014  * Allows a process to perform privileged mappings through a
12015  * graphics device.
12016  */
12017 
12018 
12019 /*
12020  * Allows a process to read a System V IPC
12021  * Message Queue, Semaphore Set, or Shared Memory Segment whose
12022  * permission bits do not allow the process read permission.
12023  * Allows a process to read remote shared memory whose
12024  * permission bits do not allow the process read permission.
12025  */
12026 
12027 
12028 /*
12029  * Allows a process to write a System V IPC
12030  * Message Queue, Semaphore Set, or Shared Memory Segment whose
12031  * permission bits do not allow the process write permission.
12032  * Allows a process to read remote shared memory whose
12033  * permission bits do not allow the process write permission.
12034  * Additional restrictions apply if the owner of the object has uid 0
12035  * and the effective uid of the current process is not 0.
12036  */
12037 
12038 
12039 /*
12040  * Allows a process which is not the owner of a System
12041  * V IPC Message Queue, Semaphore Set, or Shared Memory Segment to
12042  * remove, change ownership of, or change permission bits of the
12043  * Message Queue, Semaphore Set, or Shared Memory Segment.
12044  * Additional restrictions apply if the owner of the object has uid 0
12045  * and the effective uid of the current process is not 0.
12046  */
12047 
12048 
12049 /*
12050  * Allows a process to open a TCP, UDP, SDP or SCTP network endpoint.
12051  */
12052 
12053 
12054 /*
12055  * Allow a process to bind to a port that is configured as a
12056  * multi-level port(MLP) for the process's zone. This privilege
12057  * applies to both shared address and zone-specific address MLPs.
12058  * See tnzonecfg(4) from the Trusted Extensions manual pages for
12059  * information on configuring MLP ports.
12060  * This privilege is interpreted only if the system is configured
12061  * with Trusted Extensions.
12062  */
12063 
12064 
12065 /*
12066  * Allows a process to send and receive ICMP packets.
12067  */
12068 
12069 
12070 /*
12071  * Allows a process to set NET_MAC_AWARE process flag by using
12072  * setpflags(2). This privilege also allows a process to set
12073  * SO_MAC_EXEMPT socket option by using setsockopt(3SOCKET).
12074  * The NET_MAC_AWARE process flag and the SO_MAC_EXEMPT socket
12075  * option both allow a local process to communicate with an
12076  * unlabeled peer if the local process' label dominates the
12077  * peer's default label, or if the local process runs in the
12078  * global zone.
12079  * This privilege is interpreted only if the system is configured
12080  * with Trusted Extensions.
12081  */
12082 
12083 
12084 /*
12085  * Allows a process to set SO_MAC_IMPLICIT option by using
12086  * setsockopt(3SOCKET).  This allows a privileged process to
12087  * transmit implicitly-labeled packets to a peer.
12088  * This privilege is interpreted only if the system is configured
12089  * with Trusted Extensions.
12090  */
12091 
12092 
12093 /*
12094  * Allows a process to access /dev/lo0 and the devices in /dev/ipnet/
12095  * while not requiring them to need PRIV_NET_RAWACCESS.
12096  */
12097 
12098 
12099 /*
12100  * Allows a process to bind to a privileged port
12101  * number. The privilege port numbers are 1-1023 (the traditional
12102  * UNIX privileged ports) as well as those ports marked as
12103  * "udp/tcp_extra_priv_ports" with the exception of the ports
12104  * reserved for use by NFS.
12105  */
12106 
12107 
12108 /*
12109  * Allows a process to have direct access to the network layer.
12110  */
12111 
12112 
12113 /*
12114  * Allows a process to generate audit records.
12115  * Allows a process to get its own audit pre-selection information.
12116  */
12117 
12118 
12119 /*
12120  * Allows a process to change its root directory.
12121  */
12122 
12123 
12124 /*
12125  * Allows a process to use high resolution timers.
12126  */
12127 
12128 
12129 /*
12130  * Allows a process to call execve().
12131  */
12132 
12133 
12134 /*
12135  * Allows a process to call fork1()/forkall()/vfork()
12136  */
12137 
12138 
12139 /*
12140  * Allows a process to examine the status of processes other
12141  * than those it can send signals to.  Processes which cannot
12142  * be examined cannot be seen in /proc and appear not to exist.
12143  */
12144 
12145 
12146 /*
12147  * Allows a process to lock pages in physical memory.
12148  */
12149 
12150 
12151 /*
12152  * Allows a process to access physical memory information.
12153  */
12154 
12155 
12156 /*
12157  * Allows a process to send signals to other processes, inspect
12158  * and modify process state to other processes regardless of
12159  * ownership.  When modifying another process, additional
12160  * restrictions apply:  the effective privilege set of the
12161  * attaching process must be a superset of the target process'
12162  * effective, permitted and inheritable sets; the limit set must
12163  * be a superset of the target's limit set; if the target process
12164  * has any uid set to 0 all privilege must be asserted unless the
12165  * effective uid is 0.
12166  * Allows a process to bind arbitrary processes to CPUs.
12167  */
12168 
12169 
12170 /*
12171  * Allows a process to elevate its priority above its current level.
12172  */
12173 
12174 
12175 /*
12176  * Allows all that PRIV_PROC_PRIOUP allows.
12177  * Allows a process to change its scheduling class to any scheduling class,
12178  * including the RT class.
12179  */
12180 
12181 
12182 /*
12183  * Allows a process to send signals or trace processes outside its
12184  * session.
12185  */
12186 
12187 
12188 /*
12189  * Allows a process to set its uids at will.
12190  * Assuming uid 0 requires all privileges to be asserted.
12191  */
12192 
12193 
12194 /*
12195  * Allows a process to assign a new task ID to the calling process.
12196  */
12197 
12198 
12199 /*
12200  * Allows a process to trace or send signals to processes in
12201  * other zones.
12202  */
12203 
12204 
12205 /*
12206  * Allows a process to enable and disable and manage accounting through
12207  * acct(2), getacct(2), putacct(2) and wracct(2).
12208  */
12209 
12210 
12211 /*
12212  * Allows a process to perform system administration tasks such
12213  * as setting node and domain name and specifying nscd and coreadm
12214  * settings.
12215  */
12216 
12217 
12218 /*
12219  * Allows a process to start the (kernel) audit daemon.
12220  * Allows a process to view and set audit state (audit user ID,
12221  * audit terminal ID, audit sessions ID, audit pre-selection mask).
12222  * Allows a process to turn off and on auditing.
12223  * Allows a process to configure the audit parameters (cache and
12224  * queue sizes, event to class mappings, policy options).
12225  */
12226 
12227 
12228 /*
12229  * Allows a process to perform various system configuration tasks.
12230  * Allows a process to add and remove swap devices; when adding a swap
12231  * device, a process must also have sufficient privileges to read from
12232  * and write to the swap device.
12233  */
12234 
12235 
12236 /*
12237  * Allows a process to successfully call a kernel module that
12238  * calls the kernel drv_priv(9F) function to check for allowed
12239  * access.
12240  * Allows a process to open the real console device directly.
12241  * Allows a process to open devices that have been exclusively opened.
12242  */
12243 
12244 
12245 /*
12246  * Allows a process to increase the size of a System V IPC Message
12247  * Queue buffer.
12248  */
12249 
12250 
12251 /*
12252  * Allows a process to unlink and link directories.
12253  */
12254 
12255 
12256 /*
12257  * Allows filesystem specific administrative procedures, such as
12258  * filesystem configuration ioctls, quota calls and creation/deletion
12259  * of snapshots.
12260  * Allows a process to mount and unmount filesystems which would
12261  * otherwise be restricted (i.e., most filesystems except
12262  * namefs).
12263  * A process performing a mount operation needs to have
12264  * appropriate access to the device being mounted (read-write for
12265  * "rw" mounts, read for "ro" mounts).
12266  * A process performing any of the aforementioned
12267  * filesystem operations needs to have read/write/owner
12268  * access to the mount point.
12269  * Only regular files and directories can serve as mount points
12270  * for processes which do not have all zone privileges asserted.
12271  * Unless a process has all zone privileges, the mount(2)
12272  * system call will force the "nosuid" and "restrict" options, the
12273  * latter only for autofs mountpoints.
12274  * Regardless of privileges, a process running in a non-global zone may
12275  * only control mounts performed from within said zone.
12276  * Outside the global zone, the "nodevices" option is always forced.
12277  */
12278 
12279 
12280 /*
12281  * Allows a process to configure IP tunnel links.
12282  */
12283 
12284 
12285 /*
12286  * Allows a process to configure all classes of datalinks, including
12287  * configuration allowed by PRIV_SYS_IPTUN_CONFIG.
12288  */
12289 
12290 
12291 /*
12292  * Allows a process to configure a system's IP interfaces and routes.
12293  * Allows a process to configure network parameters using ndd.
12294  * Allows a process access to otherwise restricted information using ndd.
12295  * Allows a process to configure IPsec.
12296  * Allows a process to pop anchored STREAMs modules with matching zoneid.
12297  */
12298 
12299 
12300 /*
12301  * Allows all that PRIV_SYS_IP_CONFIG, PRIV_SYS_DL_CONFIG, and
12302  * PRIV_SYS_PPP_CONFIG allow.
12303  * Allows a process to push the rpcmod STREAMs module.
12304  * Allows a process to INSERT/REMOVE STREAMs modules on locations other
12305  * than the top of the module stack.
12306  */
12307 
12308 
12309 /*
12310  * Allows a process to perform Sun private NFS specific system calls.
12311  * Allows a process to bind to ports reserved by NFS: ports 2049 (nfs)
12312  * and port 4045 (lockd).
12313  */
12314 
12315 
12316 /*
12317  * Allows a process to create and destroy PPP (sppp) interfaces.
12318  * Allows a process to configure PPP tunnels (sppptun).
12319  */
12320 
12321 
12322 /*
12323  * Allows a process to bind processes to processor sets.
12324  */
12325 
12326 
12327 /*
12328  * Allows all that PRIV_SYS_RES_BIND allows.
12329  * Allows a process to create and delete processor sets, assign
12330  * CPUs to processor sets and override the PSET_NOESCAPE property.
12331  * Allows a process to change the operational status of CPUs in
12332  * the system using p_online(2).
12333  * Allows a process to configure resource pools and to bind
12334  * processes to pools
12335  */
12336 
12337 
12338 /*
12339  * Allows a process to modify the resource limits specified
12340  * by setrlimit(2) and setrctl(2) without restriction.
12341  * Allows a process to exceed the per-user maximum number of
12342  * processes.
12343  * Allows a process to extend or create files on a filesystem that
12344  * has less than minfree space in reserve.
12345  */
12346 
12347 
12348 /*
12349  * Allows a process to access the Sun private SMB kernel module.
12350  * Allows a process to bind to ports reserved by NetBIOS and SMB:
12351  * ports 137 (NBNS), 138 (NetBIOS Datagram Service), 139 (NetBIOS
12352  * Session Service and SMB-over-NBT) and 445 (SMB-over-TCP).
12353  */
12354 
12355 
12356 /*
12357  * Allows a process to successfully call a third party loadable module
12358  * that calls the kernel suser() function to check for allowed access.
12359  * This privilege exists only for third party loadable module
12360  * compatibility and is not used by Solaris proper.
12361  */
12362 
12363 
12364 /*
12365  * Allows a process to manipulate system time using any of the
12366  * appropriate system calls: stime, adjtime, ntp_adjtime and
12367  * the IA specific RTC calls.
12368  */
12369 
12370 
12371 /*
12372  * Allows a process to translate labels that are not dominated
12373  * by the process' sensitivity label to and from an external
12374  * string form.
12375  * This privilege is interpreted only if the system is configured
12376  * with Trusted Extensions.
12377  */
12378 
12379 
12380 /*
12381  * Allows a process to manage virtualized environments such as
12382  * xVM(5).
12383  */
12384 
12385 
12386 /*
12387  * Allows a process to override colormap restrictions.
12388  * Allows a process to install or remove colormaps.
12389  * Allows a process to retrieve colormap cell entries allocated
12390  * by other processes.
12391  * This privilege is interpreted only if the system is configured
12392  * with Trusted Extensions.
12393  */
12394 
12395 
12396 /*
12397  * Allows a process to configure or destroy resources that are
12398  * permanently retained by the X server.
12399  * Allows a process to use SetScreenSaver to set the screen
12400  * saver timeout value.
12401  * Allows a process to use ChangeHosts to modify the display
12402  * access control list.
12403  * Allows a process to use GrabServer.
12404  * Allows a process to use the SetCloseDownMode request which
12405  * may retain window, pixmap, colormap, property, cursor, font,
12406  * or graphic context resources.
12407  * This privilege is interpreted only if the system is configured
12408  * with Trusted Extensions.
12409  */
12410 
12411 
12412 /*
12413  * Allows a process to read from a window resource that it does
12414  * not own (has a different user ID).
12415  * This privilege is interpreted only if the system is configured
12416  * with Trusted Extensions.
12417  */
12418 
12419 
12420 /*
12421  * Allows a process to write to or create a window resource that
12422  * it does not own (has a different user ID). A newly created
12423  * window property is created with the window's user ID.
12424  * This privilege is interpreted only if the system is configured
12425  * with Trusted Extensions.
12426  */
12427 
12428 
12429 /*
12430  * Allows a process to perform operations on window input devices.
12431  * Allows a process to get and set keyboard and pointer controls.
12432  * Allows a process to modify pointer button and key mappings.
12433  * This privilege is interpreted only if the system is configured
12434  * with Trusted Extensions.
12435  */
12436 
12437 
12438 /*
12439  * Allows a process to use the direct graphics access (DGA) X protocol
12440  * extensions. Direct process access to the frame buffer is still
12441  * required. Thus the process must have MAC and DAC privileges that
12442  * allow access to the frame buffer, or the frame buffer must be
12443  * allocated to the process.
12444  * This privilege is interpreted only if the system is configured
12445  * with Trusted Extensions.
12446  */
12447 
12448 
12449 /*
12450  * Allows a process to set the sensitivity label of a window resource
12451  * to a sensitivity label that does not dominate the existing
12452  * sensitivity label.
12453  * This privilege is interpreted only if the system is configured
12454  * with Trusted Extensions.
12455  */
12456 
12457 
12458 /*
12459  * Allows a process to set a font path.
12460  * This privilege is interpreted only if the system is configured
12461  * with Trusted Extensions.
12462  */
12463 
12464 
12465 /*
12466  * Allows a process to read from a window resource whose sensitivity
12467  * label is not equal to the process sensitivity label.
12468  * This privilege is interpreted only if the system is configured
12469  * with Trusted Extensions.
12470  */
12471 
12472 
12473 /*
12474  * Allows a process to create a window resource whose sensitivity
12475  * label is not equal to the process sensitivity label.
12476  * A newly created window property is created with the window's
12477  * sensitivity label.
12478  * This privilege is interpreted only if the system is configured
12479  * with Trusted Extensions.
12480  */
12481 
12482 
12483 /*
12484  * Allows a process to request inter-window data moves without the
12485  * intervention of the selection confirmer.
12486  * This privilege is interpreted only if the system is configured
12487  * with Trusted Extensions.
12488  */
12489 
12490 
12491 /*
12492  * Allows a process to set the sensitivity label of a window
12493  * resource to a sensitivity label that dominates the existing
12494  * sensitivity label.
12495  * This privilege is interpreted only if the system is configured
12496  * with Trusted Extensions.
12497  */
12498 
12499 
12500 /*
12501  * Allows a process access to the xVM(5) control devices for
12502  * managing guest domains and the hypervisor. This privilege is
12503  * used only if booted into xVM on x86 platforms.
12504  */
12505 
12506 
12507 
12508 /*
12509  * Privilege set names
12510  */
12511 /*
12512  * Set of privileges currently in effect.
12513  */
12514 
12515 
12516 /*
12517  * Set of privileges that comes into effect on exec.
12518  */
12519 
12520 
12521 /*
12522  * Set of privileges that can be put into the effective set without
12523  * restriction.
12524  */
12525 
12526 
12527 /*
12528  * Set of privileges that determines the absolute upper bound of
12529  * privileges this process and its off-spring can obtain.
12530  */
12531 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 2
12532 
12533 
12534 
12535 
12536 
12537 typedef uint32_t priv_chunk_t;
12538 typedef struct priv_set priv_set_t;
12539 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h"
12540 /*
12541  * Userland type definitions.
12542  */
12543 
12544 typedef const char *priv_ptype_t;
12545 typedef const char *priv_t;
12546 
12547 
12548 
12549 /*
12550  * priv_op_t indicates a privilege operation type
12551  */
12552 typedef enum priv_op {
12553  PRIV_ON,
12554  PRIV_OFF,
12555  PRIV_SET
12556 } priv_op_t;
12557 
12558 /*
12559  * Privilege system call subcodes.
12560  */
12561 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h"
12562 /*
12563  * Maximum length of a user defined privilege name.
12564  */
12565 
12566 
12567 /*
12568  * Privilege interface functions for those parts of the kernel that
12569  * know nothing of the privilege internals.
12570  *
12571  * A privilege implementation can have a varying number of sets; sets
12572  * consist of a number of priv_chunk_t's and the size is expressed as such.
12573  * The privileges can be represented as
12574  *
12575  *		priv_chunk_t privs[info.priv_nsets][info.priv_setsize]
12576  *		... priv_infosize of extra information ...
12577  *
12578  * Extra data contained in the privilege information consists of chunks
12579  * of data with specified size and type all headed by a priv_info_t header
12580  * which defines both the type of information as well as the size of the
12581  * information.  ((char*)&info)+info->priv_info_size should be rounded up
12582  * to point to the next piece of information.
12583  */
12584 
12585 typedef struct priv_impl_info {
12586  uint32_t priv_headersize; /* sizeof (priv_impl_info) */
12587  uint32_t priv_flags; /* additional flags */
12588  uint32_t priv_nsets; /* number of priv sets */
12589  uint32_t priv_setsize; /* size in priv_chunk_t */
12590  uint32_t priv_max; /* highest actual valid priv */
12591  uint32_t priv_infosize; /* Per proc. additional info */
12592  uint32_t priv_globalinfosize; /* Per system info */
12593 } priv_impl_info_t;
12594 # 128 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h"
12595 /*
12596  * Per credential flags.
12597  */
12598 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h"
12599 /* user-settable flags: */
12600 
12601 
12602 
12603 /*
12604  * Header of the privilege info data structure; multiple structures can
12605  * follow the privilege sets and priv_impl_info structures.
12606  */
12607 typedef struct priv_info {
12608  uint32_t priv_info_type;
12609  uint32_t priv_info_size;
12610 } priv_info_t;
12611 
12612 typedef struct priv_info_uint {
12613  priv_info_t info;
12614  uint_t val;
12615 } priv_info_uint_t;
12616 
12617 /*
12618  * Global privilege set information item; the actual size of the array is
12619  * {priv_setsize}.
12620  */
12621 typedef struct priv_info_set {
12622  priv_info_t info;
12623  priv_chunk_t set[1];
12624 } priv_info_set_t;
12625 
12626 /*
12627  * names[1] is a place holder which can contain multiple NUL terminated,
12628  * non-empty strings.
12629  */
12630 
12631 typedef struct priv_info_names {
12632  priv_info_t info;
12633  int cnt; /* number of strings */
12634  char names[1]; /* "string1\0string2\0 ..stringN\0" */
12635 } priv_info_names_t;
12636 
12637 /*
12638  * Privilege information types.
12639  */
12640 
12641 
12642 
12643 
12644 
12645 /*
12646  * Special "privileges" used to indicate special conditions in privilege
12647  * debugging/tracing code.
12648  */
12649 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/priv.h" 2
12650 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/priv.h"
12651 /*
12652  * library functions prototype.
12653  */
12654 
12655 extern int setppriv(priv_op_t, priv_ptype_t, const priv_set_t *);
12656 extern int getppriv(priv_ptype_t, priv_set_t *);
12657 extern int setpflags(uint_t, uint_t);
12658 extern uint_t getpflags(uint_t);
12659 extern const priv_impl_info_t *getprivimplinfo(void);
12660 
12661 extern int priv_set(priv_op_t, priv_ptype_t, ...);
12662 extern boolean_t priv_ineffect(const char *);
12663 extern priv_set_t *priv_str_to_set(const char *, const char *, const char **);
12664 extern char *priv_set_to_str(const priv_set_t *, char, int);
12665 
12666 extern int priv_getbyname(const char *);
12667 extern const char *priv_getbynum(int);
12668 extern int priv_getsetbyname(const char *);
12669 extern const char *priv_getsetbynum(int);
12670 extern char *priv_gettext(const char *);
12671 
12672 extern priv_set_t *priv_allocset(void);
12673 extern void priv_freeset(priv_set_t *);
12674 
12675 extern void priv_emptyset(priv_set_t *);
12676 extern void priv_basicset(priv_set_t *);
12677 extern void priv_fillset(priv_set_t *);
12678 extern boolean_t priv_isemptyset(const priv_set_t *);
12679 extern boolean_t priv_isfullset(const priv_set_t *);
12680 extern boolean_t priv_isequalset(const priv_set_t *, const priv_set_t *);
12681 extern boolean_t priv_issubset(const priv_set_t *, const priv_set_t *);
12682 extern void priv_intersect(const priv_set_t *, priv_set_t *);
12683 extern void priv_union(const priv_set_t *, priv_set_t *);
12684 extern void priv_inverse(priv_set_t *);
12685 extern int priv_addset(priv_set_t *, const char *);
12686 extern void priv_copyset(const priv_set_t *, priv_set_t *);
12687 extern int priv_delset(priv_set_t *, const char *);
12688 extern boolean_t priv_ismember(const priv_set_t *, const char *);
12689 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
12690 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
12691 /*
12692  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
12693  * Use is subject to license terms.
12694  *
12695  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
12696  */
12697 /*
12698  * Copyright (c) 1982, 1986 Regents of the University of California.
12699  * All rights reserved.
12700  *
12701  * Redistribution and use in source and binary forms are permitted
12702  * provided that this notice is preserved and that due credit is given
12703  * to the University of California at Berkeley. The name of the University
12704  * may not be used to endorse or promote products derived from this
12705  * software without specific prior written permission. This software
12706  * is provided ``as is'' without express or implied warranty.
12707  */
12708 
12709 /*
12710  * Constants and structures defined by the internet system,
12711  * according to following documents
12712  *
12713  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
12714  *	http://www.iana.org/assignments/protocol-numbers
12715  *	http://www.iana.org/assignments/port-numbers
12716  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
12717  *
12718  */
12719 
12720 
12721 
12722 
12723 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
12724 /*
12725  * CDDL HEADER START
12726  *
12727  * The contents of this file are subject to the terms of the
12728  * Common Development and Distribution License (the "License").
12729  * You may not use this file except in compliance with the License.
12730  *
12731  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12732  * or http://www.opensolaris.org/os/licensing.
12733  * See the License for the specific language governing permissions
12734  * and limitations under the License.
12735  *
12736  * When distributing Covered Code, include this CDDL HEADER in each
12737  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12738  * If applicable, add the following below this CDDL HEADER, with the
12739  * fields enclosed by brackets "[]" replaced with your own identifying
12740  * information: Portions Copyright [yyyy] [name of copyright owner]
12741  *
12742  * CDDL HEADER END
12743  */
12744 
12745 /*
12746  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
12747  * Copyright 2016 Joyent, Inc.
12748  *
12749  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
12750  * Use is subject to license terms.
12751  */
12752 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
12753 
12754 
12755 
12756 
12757 
12758 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
12759 /*
12760  * CDDL HEADER START
12761  *
12762  * The contents of this file are subject to the terms of the
12763  * Common Development and Distribution License (the "License").
12764  * You may not use this file except in compliance with the License.
12765  *
12766  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12767  * or http://www.opensolaris.org/os/licensing.
12768  * See the License for the specific language governing permissions
12769  * and limitations under the License.
12770  *
12771  * When distributing Covered Code, include this CDDL HEADER in each
12772  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12773  * If applicable, add the following below this CDDL HEADER, with the
12774  * fields enclosed by brackets "[]" replaced with your own identifying
12775  * information: Portions Copyright [yyyy] [name of copyright owner]
12776  *
12777  * CDDL HEADER END
12778  */
12779 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
12780 /*	  All Rights Reserved  	*/
12781 
12782 
12783 /*
12784  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
12785  * Use is subject to license terms.
12786  *
12787  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
12788  * Copyright 2016 Joyent, Inc.
12789  */
12790 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
12791 
12792 
12793 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
12794 /*
12795  * CDDL HEADER START
12796  *
12797  * The contents of this file are subject to the terms of the
12798  * Common Development and Distribution License (the "License").
12799  * You may not use this file except in compliance with the License.
12800  *
12801  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12802  * or http://www.opensolaris.org/os/licensing.
12803  * See the License for the specific language governing permissions
12804  * and limitations under the License.
12805  *
12806  * When distributing Covered Code, include this CDDL HEADER in each
12807  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12808  * If applicable, add the following below this CDDL HEADER, with the
12809  * fields enclosed by brackets "[]" replaced with your own identifying
12810  * information: Portions Copyright [yyyy] [name of copyright owner]
12811  *
12812  * CDDL HEADER END
12813  */
12814 /*
12815  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
12816  * Use is subject to license terms.
12817  */
12818 
12819 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
12820 /*	  All Rights Reserved	*/
12821 
12822 /*
12823  * Portions of this source code were derived from Berkeley 4.3 BSD
12824  * under license from the Regents of the University of California.
12825  */
12826 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h"
12827 typedef uint16_t sa_family_t;
12828 
12829 
12830 /*
12831  * Structure used by kernel to store most
12832  * addresses.
12833  */
12834 struct sockaddr {
12835  sa_family_t sa_family; /* address family */
12836  char sa_data[14]; /* up to 14 bytes of direct address */
12837 };
12838 
12839 
12840 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h" 1
12841 /*
12842  * CDDL HEADER START
12843  *
12844  * The contents of this file are subject to the terms of the
12845  * Common Development and Distribution License (the "License").
12846  * You may not use this file except in compliance with the License.
12847  *
12848  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12849  * or http://www.opensolaris.org/os/licensing.
12850  * See the License for the specific language governing permissions
12851  * and limitations under the License.
12852  *
12853  * When distributing Covered Code, include this CDDL HEADER in each
12854  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12855  * If applicable, add the following below this CDDL HEADER, with the
12856  * fields enclosed by brackets "[]" replaced with your own identifying
12857  * information: Portions Copyright [yyyy] [name of copyright owner]
12858  *
12859  * CDDL HEADER END
12860  */
12861 /*
12862  * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
12863  */
12864 
12865 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
12866 /*	  All Rights Reserved  	*/
12867 
12868 /*
12869  * University Copyright- Copyright (c) 1982, 1986, 1988
12870  * The Regents of the University of California
12871  * All Rights Reserved
12872  *
12873  * University Acknowledgment- Portions of this document are derived from
12874  * software developed by the University of California, Berkeley, and its
12875  * contributors.
12876  */
12877 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
12878 /*
12879  * Definitions for UNIX IPC domain.
12880  */
12881 struct sockaddr_un {
12882  sa_family_t sun_family; /* AF_UNIX */
12883  char sun_path[108]; /* path name (gag) */
12884 };
12885 
12886 
12887 
12888 /*
12889  * NOTE: If we ever go to BSD-style sun_len + sun_family, this macro needs to
12890  * change.
12891  *
12892  * Also, include a strlen() prototype, and we have to protect it w.r.t.
12893  * UNIX{98,03}.  And because there's strlen, we need size_t as well.
12894  */
12895 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
12896 extern size_t strlen(const char *);
12897 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
12898 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if_dl.h" 1
12899 /*
12900  * Copyright 1993-2003 Sun Microsystems, Inc.  All rights reserved.
12901  * Use is subject to license terms.
12902  */
12903 /*
12904  * Copyright (c) 1990, 1993
12905  *	The Regents of the University of California.  All rights reserved.
12906  *
12907  * Redistribution and use in source and binary forms, with or without
12908  * modification, are permitted provided that the following conditions
12909  * are met:
12910  * 1. Redistributions of source code must retain the above copyright
12911  *    notice, this list of conditions and the following disclaimer.
12912  * 2. Redistributions in binary form must reproduce the above copyright
12913  *    notice, this list of conditions and the following disclaimer in the
12914  *    documentation and/or other materials provided with the distribution.
12915  * 3. All advertising materials mentioning features or use of this software
12916  *    must display the following acknowledgement:
12917  *	This product includes software developed by the University of
12918  *	California, Berkeley and its contributors.
12919  * 4. Neither the name of the University nor the names of its contributors
12920  *    may be used to endorse or promote products derived from this software
12921  *    without specific prior written permission.
12922  *
12923  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
12924  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12925  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
12926  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
12927  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
12928  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
12929  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12930  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
12931  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12932  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
12933  * SUCH DAMAGE.
12934  */
12935 
12936 
12937 
12938 
12939 #pragma ident "%Z%%M%	%I%	%E% SMI"
12940 /* from UCB 8.1 (Berkeley) 6/10/93 */
12941 
12942 
12943 
12944 
12945 
12946 /*
12947  * A Link-Level Sockaddr may specify the interface in one of two
12948  * ways: either by means of a system-provided index number (computed
12949  * anew and possibly differently on every reboot), or by a human-readable
12950  * string such as "il0" (for managerial convenience).
12951  *
12952  * Census taking actions, such as something akin to SIOCGCONF would return
12953  * both the index and the human name.
12954  *
12955  * High volume transactions (such as giving a link-level ``from'' address
12956  * in a recvfrom or recvmsg call) may be likely only to provide the indexed
12957  * form, (which requires fewer copy operations and less space).
12958  *
12959  * The form and interpretation  of the link-level address is purely a matter
12960  * of convention between the device driver and its consumers; however, it is
12961  * expected that all drivers for an interface of a given if_type will agree.
12962  */
12963 
12964 /*
12965  * Structure of a Link-Level sockaddr:
12966  */
12967 struct sockaddr_dl {
12968  ushort_t sdl_family; /* AF_LINK */
12969  ushort_t sdl_index; /* if != 0, system given index for interface */
12970  uchar_t sdl_type; /* interface type */
12971  uchar_t sdl_nlen; /* interface name length, no trailing 0 reqd. */
12972  uchar_t sdl_alen; /* link level address length */
12973  uchar_t sdl_slen; /* link layer selector length */
12974  char sdl_data[244]; /* contains both if name and ll address */
12975 };
12976 
12977 
12978 
12979 
12980 extern char *_link_ntoa(const unsigned char *, char *, int, int);
12981 extern unsigned char *_link_aton(const char *, int *);
12982 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
12983 
12984 
12985 
12986 /*
12987  * sockaddr_storage:
12988  * Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
12989  * structures. Has sufficient size and alignment for those sockaddrs.
12990  */
12991 
12992 /*
12993  * Desired maximum size, alignment size and related types.
12994  */
12995 
12996 
12997 /*
12998  * To represent desired sockaddr max alignment for platform, a
12999  * type is chosen which may depend on implementation platform architecture.
13000  * Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
13001  * We desire to force up to (but no more than) 64-bit (8 byte) alignment,
13002  * on platforms where it is possible to do so. (e.g not possible on ia32).
13003  * For all currently supported platforms by our implementation
13004  * in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
13005  * type "double" is suitable for that intent.
13006  *
13007  * Note: Type "double" is chosen over the more obvious integer type int64_t.
13008  *   int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
13009  */
13010 typedef double sockaddr_maxalign_t;
13011 
13012 
13013 
13014 /*
13015  * Definitions used for sockaddr_storage structure paddings design.
13016  */
13017 
13018 
13019 
13020 
13021 struct sockaddr_storage {
13022  sa_family_t ss_family; /* Address family */
13023  /* Following fields are implementation specific */
13024  char _ss_pad1[((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t))];
13025  sockaddr_maxalign_t _ss_align;
13026  char _ss_pad2[(256 - (sizeof (sa_family_t)+ ((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t)) + (sizeof (sockaddr_maxalign_t))))];
13027 };
13028 
13029 
13030 /*
13031  * To be compatible with the Linux interfaces used, this structure is
13032  * placed in socket_impl.h so that an include for <sys/socket.h> will
13033  * pickup this structure. This structure is for use with PF_PACKET
13034  * sockets.
13035  */
13036 struct sockaddr_ll {
13037  uint16_t sll_family;
13038  uint16_t sll_protocol;
13039  int32_t sll_ifindex;
13040  uint16_t sll_hatype;
13041  uint8_t sll_pkttype;
13042  uint8_t sll_halen;
13043  uint8_t sll_addr[8];
13044 };
13045 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
13046 
13047 
13048 
13049 
13050 
13051 /*
13052  * The socklen definitions are reproduced here from sys/socket.h so as to
13053  * not introduce that namespace into existing users of netinet/in.h.
13054  */
13055 
13056 
13057 
13058 typedef uint32_t socklen_t;
13059 
13060 
13061 
13062 
13063 
13064 typedef void *Psocklen_t;
13065 
13066 
13067 
13068 
13069 
13070 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 1
13071 /*
13072  * CDDL HEADER START
13073  *
13074  * The contents of this file are subject to the terms of the
13075  * Common Development and Distribution License (the "License").
13076  * You may not use this file except in compliance with the License.
13077  *
13078  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13079  * or http://www.opensolaris.org/os/licensing.
13080  * See the License for the specific language governing permissions
13081  * and limitations under the License.
13082  *
13083  * When distributing Covered Code, include this CDDL HEADER in each
13084  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13085  * If applicable, add the following below this CDDL HEADER, with the
13086  * fields enclosed by brackets "[]" replaced with your own identifying
13087  * information: Portions Copyright [yyyy] [name of copyright owner]
13088  *
13089  * CDDL HEADER END
13090  */
13091 /*
13092  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13093  * Use is subject to license terms.
13094  */
13095 
13096 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13097 /*	  All Rights Reserved  	*/
13098 
13099 
13100 
13101 
13102 
13103 /*
13104  * For source compatibility
13105  */
13106 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
13107 /*
13108  * CDDL HEADER START
13109  *
13110  * The contents of this file are subject to the terms of the
13111  * Common Development and Distribution License (the "License").
13112  * You may not use this file except in compliance with the License.
13113  *
13114  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13115  * or http://www.opensolaris.org/os/licensing.
13116  * See the License for the specific language governing permissions
13117  * and limitations under the License.
13118  *
13119  *
13120  * When distributing Covered Code, include this CDDL HEADER in each
13121  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13122  * If applicable, add the following below this CDDL HEADER, with the
13123  * fields enclosed by brackets "[]" replaced with your own identifying
13124  * information: Portions Copyright [yyyy] [name of copyright owner]
13125  *
13126  * CDDL HEADER END
13127  */
13128 
13129 /*
13130  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
13131  * Use is subject to license terms.
13132  * Copyright 2016 Joyent, Inc.
13133  */
13134 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
13135 
13136 
13137 
13138 
13139 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h" 1
13140 /*
13141  * CDDL HEADER START
13142  *
13143  * The contents of this file are subject to the terms of the
13144  * Common Development and Distribution License, Version 1.0 only
13145  * (the "License").  You may not use this file except in compliance
13146  * with the License.
13147  *
13148  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13149  * or http://www.opensolaris.org/os/licensing.
13150  * See the License for the specific language governing permissions
13151  * and limitations under the License.
13152  *
13153  * When distributing Covered Code, include this CDDL HEADER in each
13154  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13155  * If applicable, add the following below this CDDL HEADER, with the
13156  * fields enclosed by brackets "[]" replaced with your own identifying
13157  * information: Portions Copyright [yyyy] [name of copyright owner]
13158  *
13159  * CDDL HEADER END
13160  */
13161 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13162 /*	  All Rights Reserved  	*/
13163 
13164 
13165 /*
13166  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
13167  *
13168  * Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
13169  * All rights reserved.
13170  */
13171 
13172 /*
13173  * Copyright 2015, Joyent, Inc.
13174  */
13175 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
13176 /*
13177  * Structure of file descriptor/event pairs supplied in
13178  * the poll arrays.
13179  */
13180 typedef struct pollfd {
13181  int fd; /* file desc to poll */
13182  short events; /* events of interest on fd */
13183  short revents; /* events that occurred on fd */
13184 } pollfd_t;
13185 
13186 typedef unsigned long nfds_t;
13187 
13188 /*
13189  * Testable select events
13190  */
13191 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
13192 /*
13193  * Non-testable poll events (may not be specified in events field,
13194  * but may be returned in revents field).
13195  */
13196 
13197 
13198 
13199 
13200 /*
13201  * These events will never be specified in revents, but may be specified in
13202  * events to control /dev/poll behavior.
13203  */
13204 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
13205 int poll(struct pollfd *, nfds_t, int);
13206 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
13207 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/strmdep.h" 1
13208 /*
13209  * CDDL HEADER START
13210  *
13211  * The contents of this file are subject to the terms of the
13212  * Common Development and Distribution License, Version 1.0 only
13213  * (the "License").  You may not use this file except in compliance
13214  * with the License.
13215  *
13216  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13217  * or http://www.opensolaris.org/os/licensing.
13218  * See the License for the specific language governing permissions
13219  * and limitations under the License.
13220  *
13221  * When distributing Covered Code, include this CDDL HEADER in each
13222  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13223  * If applicable, add the following below this CDDL HEADER, with the
13224  * fields enclosed by brackets "[]" replaced with your own identifying
13225  * information: Portions Copyright [yyyy] [name of copyright owner]
13226  *
13227  * CDDL HEADER END
13228  */
13229 /*
13230  * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
13231  * All rights reserved.
13232  */
13233 
13234 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13235 /*	  All Rights Reserved  	*/
13236 
13237 
13238 
13239 
13240 
13241 #pragma ident "%Z%%M%	%I%	%E% SMI"
13242 
13243 
13244 
13245 
13246 
13247 /*
13248  * This file contains all machine-dependent declarations
13249  * in STREAMS.
13250  */
13251 
13252 /*
13253  * Copy data from one data buffer to another.
13254  * The addresses must be word aligned - if not, use bcopy!
13255  */
13256 
13257 
13258 /*
13259  * save the address of the calling function on the 3b2 to
13260  * enable tracking of who is allocating message blocks
13261  */
13262 
13263 
13264 /*
13265  * macro to check pointer alignment
13266  * (true if alignment is sufficient for worst case)
13267  */
13268 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
13269 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
13270 /*
13271  * CDDL HEADER START
13272  *
13273  * The contents of this file are subject to the terms of the
13274  * Common Development and Distribution License (the "License").
13275  * You may not use this file except in compliance with the License.
13276  *
13277  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13278  * or http://www.opensolaris.org/os/licensing.
13279  * See the License for the specific language governing permissions
13280  * and limitations under the License.
13281  *
13282  * When distributing Covered Code, include this CDDL HEADER in each
13283  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13284  * If applicable, add the following below this CDDL HEADER, with the
13285  * fields enclosed by brackets "[]" replaced with your own identifying
13286  * information: Portions Copyright [yyyy] [name of copyright owner]
13287  *
13288  * CDDL HEADER END
13289  */
13290 /*
13291  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13292  * Use is subject to license terms.
13293  */
13294 
13295 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
13296 /*	  All Rights Reserved  	*/
13297 
13298 /*
13299  * Portions of this source code were derived from Berkeley 4.3 BSD
13300  * under license from the Regents of the University of California.
13301  */
13302 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
13303 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 1
13304 /*
13305  * CDDL HEADER START
13306  *
13307  * The contents of this file are subject to the terms of the
13308  * Common Development and Distribution License, Version 1.0 only
13309  * (the "License").  You may not use this file except in compliance
13310  * with the License.
13311  *
13312  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13313  * or http://www.opensolaris.org/os/licensing.
13314  * See the License for the specific language governing permissions
13315  * and limitations under the License.
13316  *
13317  * When distributing Covered Code, include this CDDL HEADER in each
13318  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13319  * If applicable, add the following below this CDDL HEADER, with the
13320  * fields enclosed by brackets "[]" replaced with your own identifying
13321  * information: Portions Copyright [yyyy] [name of copyright owner]
13322  *
13323  * CDDL HEADER END
13324  */
13325 /*
13326  * Copyright (c) 1991-1998 by Sun Microsystems, Inc.
13327  * All rights reserved.
13328  */
13329 
13330 /*
13331  * t_lock.h:	Prototypes for disp_locks, plus include files
13332  *		that describe the interfaces to kernel synch.
13333  *		objects.
13334  */
13335 
13336 
13337 
13338 
13339 #pragma ident "%Z%%M%	%I%	%E% SMI"
13340 
13341 
13342 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 1
13343 /*
13344  * CDDL HEADER START
13345  *
13346  * The contents of this file are subject to the terms of the
13347  * Common Development and Distribution License (the "License").
13348  * You may not use this file except in compliance with the License.
13349  *
13350  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13351  * or http://www.opensolaris.org/os/licensing.
13352  * See the License for the specific language governing permissions
13353  * and limitations under the License.
13354  *
13355  * When distributing Covered Code, include this CDDL HEADER in each
13356  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13357  * If applicable, add the following below this CDDL HEADER, with the
13358  * fields enclosed by brackets "[]" replaced with your own identifying
13359  * information: Portions Copyright [yyyy] [name of copyright owner]
13360  *
13361  * CDDL HEADER END
13362  */
13363 /*
13364  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
13365  * Use is subject to license terms.
13366  * Copyright 2016 Joyent, Inc.
13367  */
13368 
13369 
13370 
13371 
13372 #pragma ident "%Z%%M%	%I%	%E% SMI"
13373 
13374 
13375 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
13376 /*
13377  * CDDL HEADER START
13378  *
13379  * The contents of this file are subject to the terms of the
13380  * Common Development and Distribution License (the "License").
13381  * You may not use this file except in compliance with the License.
13382  *
13383  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13384  * or http://www.opensolaris.org/os/licensing.
13385  * See the License for the specific language governing permissions
13386  * and limitations under the License.
13387  *
13388  * When distributing Covered Code, include this CDDL HEADER in each
13389  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13390  * If applicable, add the following below this CDDL HEADER, with the
13391  * fields enclosed by brackets "[]" replaced with your own identifying
13392  * information: Portions Copyright [yyyy] [name of copyright owner]
13393  *
13394  * CDDL HEADER END
13395  */
13396 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13397 /*	  All Rights Reserved  	*/
13398 
13399 
13400 /*
13401  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13402  * Use is subject to license terms.
13403  *
13404  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13405  * Copyright 2016 Joyent, Inc.
13406  */
13407 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
13408 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
13409 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13410 /*	  All Rights Reserved  	*/
13411 
13412 
13413 /*
13414  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
13415  * All rights reserved.  The Berkeley software License Agreement
13416  * specifies the terms and conditions for redistribution.
13417  */
13418 
13419 /*
13420  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
13421  *
13422  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13423  * Use is subject to license terms.
13424  *
13425  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13426  */
13427 
13428 /*
13429  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
13430  */
13431 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
13432 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
13433 typedef lock_t disp_lock_t; /* dispatcher lock type */
13434 
13435 /*
13436  * SPIN_LOCK() macro indicates whether lock is implemented as a spin lock or
13437  * an adaptive mutex, depending on what interrupt levels use it.
13438  */
13439 
13440 
13441 /*
13442  * Macro to control loops which spin on a lock and then check state
13443  * periodically.  Its passed an integer, and returns a boolean value
13444  * that if true indicates its a good time to get the scheduler lock and
13445  * check the state of the current owner of the lock.
13446  */
13447 
13448 
13449 /*
13450  * Externs for CLOCK_LOCK and clock resolution
13451  */
13452 extern volatile uint32_t hres_lock;
13453 extern hrtime_t hrtime_base;
13454 extern int clock_res;
13455 
13456 
13457 
13458 /*
13459  * The definitions of the symbolic interrupt levels:
13460  *
13461  *   CLOCK_LEVEL =>  The level at which one must be to block the clock.
13462  *
13463  *   LOCK_LEVEL  =>  The highest level at which one may block (and thus the
13464  *                   highest level at which one may acquire adaptive locks)
13465  *                   Also the highest level at which one may be preempted.
13466  *
13467  *   DISP_LEVEL  =>  The level at which one must be to perform dispatcher
13468  *                   operations.
13469  *
13470  * The constraints on the platform:
13471  *
13472  *  - CLOCK_LEVEL must be less than or equal to LOCK_LEVEL
13473  *  - LOCK_LEVEL must be less than DISP_LEVEL
13474  *  - DISP_LEVEL should be as close to LOCK_LEVEL as possible
13475  *
13476  * Note that LOCK_LEVEL and CLOCK_LEVEL have historically always been equal;
13477  * changing this relationship is probably possible but not advised.
13478  *
13479  */
13480 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
13481 /*
13482  * The following mask is for the cpu_intr_actv bits corresponding to
13483  * high-level PILs. It should equal:
13484  * ((((1 << PIL_MAX + 1) - 1) >> LOCK_LEVEL + 1) << LOCK_LEVEL + 1)
13485  */
13486 
13487 
13488 /*
13489  * The semaphore code depends on being able to represent a lock plus
13490  * owner in a single 32-bit word.  (Mutexes used to have a similar
13491  * dependency, but no longer.)  Thus the owner must contain at most
13492  * 24 significant bits.  At present only threads and semaphores
13493  * must be aware of this vile constraint.  Different ISAs may handle this
13494  * differently depending on their capabilities (e.g. compare-and-swap)
13495  * and limitations (e.g. constraints on alignment and/or KERNELBASE).
13496  */
13497 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
13498 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
13499 /*
13500  * CDDL HEADER START
13501  *
13502  * The contents of this file are subject to the terms of the
13503  * Common Development and Distribution License (the "License").
13504  * You may not use this file except in compliance with the License.
13505  *
13506  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13507  * or http://www.opensolaris.org/os/licensing.
13508  * See the License for the specific language governing permissions
13509  * and limitations under the License.
13510  *
13511  * When distributing Covered Code, include this CDDL HEADER in each
13512  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13513  * If applicable, add the following below this CDDL HEADER, with the
13514  * fields enclosed by brackets "[]" replaced with your own identifying
13515  * information: Portions Copyright [yyyy] [name of copyright owner]
13516  *
13517  * CDDL HEADER END
13518  */
13519 
13520 /*
13521  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
13522  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
13523  */
13524 
13525 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
13526 /*	  All Rights Reserved  	*/
13527 
13528 /*
13529  * University Copyright- Copyright (c) 1982, 1986, 1988
13530  * The Regents of the University of California
13531  * All Rights Reserved
13532  *
13533  * University Acknowledgment- Portions of this document are derived from
13534  * software developed by the University of California, Berkeley, and its
13535  * contributors.
13536  */
13537 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
13538 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 1
13539 /*
13540  * CDDL HEADER START
13541  *
13542  * The contents of this file are subject to the terms of the
13543  * Common Development and Distribution License (the "License").
13544  * You may not use this file except in compliance with the License.
13545  *
13546  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13547  * or http://www.opensolaris.org/os/licensing.
13548  * See the License for the specific language governing permissions
13549  * and limitations under the License.
13550  *
13551  * When distributing Covered Code, include this CDDL HEADER in each
13552  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13553  * If applicable, add the following below this CDDL HEADER, with the
13554  * fields enclosed by brackets "[]" replaced with your own identifying
13555  * information: Portions Copyright [yyyy] [name of copyright owner]
13556  *
13557  * CDDL HEADER END
13558  */
13559 /*
13560  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
13561  */
13562 
13563 
13564 
13565 
13566 
13567 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
13568 /*
13569  * CDDL HEADER START
13570  *
13571  * The contents of this file are subject to the terms of the
13572  * Common Development and Distribution License (the "License").
13573  * You may not use this file except in compliance with the License.
13574  *
13575  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13576  * or http://www.opensolaris.org/os/licensing.
13577  * See the License for the specific language governing permissions
13578  * and limitations under the License.
13579  *
13580  * When distributing Covered Code, include this CDDL HEADER in each
13581  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13582  * If applicable, add the following below this CDDL HEADER, with the
13583  * fields enclosed by brackets "[]" replaced with your own identifying
13584  * information: Portions Copyright [yyyy] [name of copyright owner]
13585  *
13586  * CDDL HEADER END
13587  */
13588 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13589 /*	  All Rights Reserved  	*/
13590 
13591 
13592 /*
13593  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13594  * Use is subject to license terms.
13595  *
13596  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13597  * Copyright 2016 Joyent, Inc.
13598  */
13599 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 2
13600 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h"
13601 /*
13602  * Public interface to mutual exclusion locks.  See mutex(9F) for details.
13603  *
13604  * The basic mutex type is MUTEX_ADAPTIVE, which is expected to be used
13605  * in almost all of the kernel.  MUTEX_SPIN provides interrupt blocking
13606  * and must be used in interrupt handlers above LOCK_LEVEL.  The iblock
13607  * cookie argument to mutex_init() encodes the interrupt level to block.
13608  * The iblock cookie must be NULL for adaptive locks.
13609  *
13610  * MUTEX_DEFAULT is the type usually specified (except in drivers) to
13611  * mutex_init().  It is identical to MUTEX_ADAPTIVE.
13612  *
13613  * MUTEX_DRIVER is always used by drivers.  mutex_init() converts this to
13614  * either MUTEX_ADAPTIVE or MUTEX_SPIN depending on the iblock cookie.
13615  *
13616  * Mutex statistics can be gathered on the fly, without rebooting or
13617  * recompiling the kernel, via the lockstat driver (lockstat(7D)).
13618  */
13619 typedef enum {
13620  MUTEX_ADAPTIVE = 0, /* spin if owner is running, otherwise block */
13621  MUTEX_SPIN = 1, /* block interrupts and spin */
13622  MUTEX_DRIVER = 4, /* driver (DDI) mutex */
13623  MUTEX_DEFAULT = 6 /* kernel default mutex */
13624 } kmutex_type_t;
13625 
13626 typedef struct mutex {
13627 
13628 
13629 
13630  void *_opaque[2];
13631 
13632 } kmutex_t;
13633 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
13634 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 1
13635 /*
13636  * CDDL HEADER START
13637  *
13638  * The contents of this file are subject to the terms of the
13639  * Common Development and Distribution License (the "License").
13640  * You may not use this file except in compliance with the License.
13641  *
13642  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13643  * or http://www.opensolaris.org/os/licensing.
13644  * See the License for the specific language governing permissions
13645  * and limitations under the License.
13646  *
13647  * When distributing Covered Code, include this CDDL HEADER in each
13648  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13649  * If applicable, add the following below this CDDL HEADER, with the
13650  * fields enclosed by brackets "[]" replaced with your own identifying
13651  * information: Portions Copyright [yyyy] [name of copyright owner]
13652  *
13653  * CDDL HEADER END
13654  */
13655 /*
13656  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
13657  * Use is subject to license terms.
13658  */
13659 
13660 /*
13661  * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
13662  */
13663 
13664 
13665 
13666 
13667 /*
13668  * Public interface to readers/writer locks.  See rwlock(9F) for details.
13669  */
13670 
13671 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
13672 /*
13673  * CDDL HEADER START
13674  *
13675  * The contents of this file are subject to the terms of the
13676  * Common Development and Distribution License (the "License").
13677  * You may not use this file except in compliance with the License.
13678  *
13679  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13680  * or http://www.opensolaris.org/os/licensing.
13681  * See the License for the specific language governing permissions
13682  * and limitations under the License.
13683  *
13684  * When distributing Covered Code, include this CDDL HEADER in each
13685  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13686  * If applicable, add the following below this CDDL HEADER, with the
13687  * fields enclosed by brackets "[]" replaced with your own identifying
13688  * information: Portions Copyright [yyyy] [name of copyright owner]
13689  *
13690  * CDDL HEADER END
13691  */
13692 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13693 /*	  All Rights Reserved  	*/
13694 
13695 
13696 /*
13697  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13698  * Use is subject to license terms.
13699  *
13700  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13701  * Copyright 2016 Joyent, Inc.
13702  */
13703 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 2
13704 
13705 
13706 
13707 
13708 
13709 
13710 
13711 typedef enum {
13712  RW_DRIVER = 2, /* driver (DDI) rwlock */
13713  RW_DEFAULT = 4 /* kernel default rwlock */
13714 } krw_type_t;
13715 
13716 typedef enum {
13717  RW_WRITER,
13718  RW_READER,
13719  RW_READER_STARVEWRITER
13720 } krw_t;
13721 
13722 typedef struct _krwlock {
13723  void *_opaque[1];
13724 } krwlock_t;
13725 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
13726 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h" 1
13727 /*
13728  * CDDL HEADER START
13729  *
13730  * The contents of this file are subject to the terms of the
13731  * Common Development and Distribution License, Version 1.0 only
13732  * (the "License").  You may not use this file except in compliance
13733  * with the License.
13734  *
13735  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13736  * or http://www.opensolaris.org/os/licensing.
13737  * See the License for the specific language governing permissions
13738  * and limitations under the License.
13739  *
13740  * When distributing Covered Code, include this CDDL HEADER in each
13741  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13742  * If applicable, add the following below this CDDL HEADER, with the
13743  * fields enclosed by brackets "[]" replaced with your own identifying
13744  * information: Portions Copyright [yyyy] [name of copyright owner]
13745  *
13746  * CDDL HEADER END
13747  */
13748 /*
13749  * Copyright (c) 1993-1998 by Sun Microsystems, Inc.
13750  * All rights reserved.
13751  */
13752 
13753 
13754 
13755 
13756 #pragma ident "%Z%%M%	%I%	%E% SMI"
13757 
13758 /*
13759  * Public interface to semaphores.  See semaphore(9F) for details.
13760  */
13761 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h"
13762 typedef enum {
13763  SEMA_DEFAULT,
13764  SEMA_DRIVER
13765 } ksema_type_t;
13766 
13767 typedef struct _ksema {
13768  void * _opaque[2]; /* 2 words on 4 byte alignment */
13769 } ksema_t;
13770 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
13771 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 1
13772 /*
13773  * CDDL HEADER START
13774  *
13775  * The contents of this file are subject to the terms of the
13776  * Common Development and Distribution License (the "License").
13777  * You may not use this file except in compliance with the License.
13778  *
13779  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13780  * or http://www.opensolaris.org/os/licensing.
13781  * See the License for the specific language governing permissions
13782  * and limitations under the License.
13783  *
13784  * When distributing Covered Code, include this CDDL HEADER in each
13785  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13786  * If applicable, add the following below this CDDL HEADER, with the
13787  * fields enclosed by brackets "[]" replaced with your own identifying
13788  * information: Portions Copyright [yyyy] [name of copyright owner]
13789  *
13790  * CDDL HEADER END
13791  */
13792 /*
13793  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13794  * Use is subject to license terms.
13795  */
13796 
13797 /*
13798  * Copyright (c) 2012 by Delphix. All rights reserved.
13799  */
13800 
13801 /*
13802  * condvar.h:
13803  *
13804  * definitions for thread synchronization primitives: condition variables
13805  * This is the public part of the interface to condition variables. The
13806  * private (implementation-specific) part is in <arch>/sys/condvar_impl.h.
13807  */
13808 
13809 
13810 
13811 
13812 
13813 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
13814 /*
13815  * CDDL HEADER START
13816  *
13817  * The contents of this file are subject to the terms of the
13818  * Common Development and Distribution License (the "License").
13819  * You may not use this file except in compliance with the License.
13820  *
13821  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13822  * or http://www.opensolaris.org/os/licensing.
13823  * See the License for the specific language governing permissions
13824  * and limitations under the License.
13825  *
13826  * When distributing Covered Code, include this CDDL HEADER in each
13827  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13828  * If applicable, add the following below this CDDL HEADER, with the
13829  * fields enclosed by brackets "[]" replaced with your own identifying
13830  * information: Portions Copyright [yyyy] [name of copyright owner]
13831  *
13832  * CDDL HEADER END
13833  */
13834 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13835 /*	  All Rights Reserved  	*/
13836 
13837 
13838 /*
13839  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13840  * Use is subject to license terms.
13841  *
13842  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13843  * Copyright 2016 Joyent, Inc.
13844  */
13845 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
13846 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
13847 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13848 /*	  All Rights Reserved  	*/
13849 
13850 
13851 /*
13852  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
13853  * All rights reserved.  The Berkeley software License Agreement
13854  * specifies the terms and conditions for redistribution.
13855  */
13856 
13857 /*
13858  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
13859  *
13860  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13861  * Use is subject to license terms.
13862  *
13863  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13864  */
13865 
13866 /*
13867  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
13868  */
13869 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
13870 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h"
13871 /*
13872  * Condtion variables.
13873  */
13874 
13875 typedef struct _kcondvar {
13876  ushort_t _opaque;
13877 } kcondvar_t;
13878 
13879 typedef enum {
13880  CV_DEFAULT,
13881  CV_DRIVER
13882 } kcv_type_t;
13883 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
13884 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h"
13885 /*
13886  * Mutual exclusion locks described in common/sys/mutex.h.
13887  *
13888  * Semaphores described in common/sys/semaphore.h.
13889  *
13890  * Readers/Writer locks described in common/sys/rwlock.h.
13891  *
13892  * Condition variables described in common/sys/condvar.h
13893  */
13894 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
13895 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 1
13896 /*
13897  * CDDL HEADER START
13898  *
13899  * The contents of this file are subject to the terms of the
13900  * Common Development and Distribution License, Version 1.0 only
13901  * (the "License").  You may not use this file except in compliance
13902  * with the License.
13903  *
13904  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13905  * or http://www.opensolaris.org/os/licensing.
13906  * See the License for the specific language governing permissions
13907  * and limitations under the License.
13908  *
13909  * When distributing Covered Code, include this CDDL HEADER in each
13910  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13911  * If applicable, add the following below this CDDL HEADER, with the
13912  * fields enclosed by brackets "[]" replaced with your own identifying
13913  * information: Portions Copyright [yyyy] [name of copyright owner]
13914  *
13915  * CDDL HEADER END
13916  */
13917 /*
13918  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
13919  * Use is subject to license terms.
13920  */
13921 
13922 
13923 
13924 
13925 #pragma ident "%Z%%M%	%I%	%E% SMI"
13926 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
13927 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
13928 /*
13929  * CDDL HEADER START
13930  *
13931  * The contents of this file are subject to the terms of the
13932  * Common Development and Distribution License (the "License").
13933  * You may not use this file except in compliance with the License.
13934  *
13935  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13936  * or http://www.opensolaris.org/os/licensing.
13937  * See the License for the specific language governing permissions
13938  * and limitations under the License.
13939  *
13940  *
13941  * When distributing Covered Code, include this CDDL HEADER in each
13942  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13943  * If applicable, add the following below this CDDL HEADER, with the
13944  * fields enclosed by brackets "[]" replaced with your own identifying
13945  * information: Portions Copyright [yyyy] [name of copyright owner]
13946  *
13947  * CDDL HEADER END
13948  */
13949 
13950 /*
13951  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
13952  * Use is subject to license terms.
13953  * Copyright 2016 Joyent, Inc.
13954  */
13955 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 2
13956 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
13957 /*
13958  * XXX	Ick.  This type needs to be visible outside the above guard because
13959  * the proc structure is visible outside the _KERNEL | _KMEMUSER guard.
13960  * If we can make proc internals less visible, (which we obviously should)
13961  * then this can be invisible too.
13962  */
13963 typedef unsigned int model_t;
13964 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
13965 
13966 
13967 
13968 
13969 
13970 /*
13971  * Data queue.
13972  *
13973  * NOTE: The *only* public fields are documented in queue(9S).
13974  *       Everything else is implementation-private.
13975  *
13976  * The locking rules for the queue_t structure are extremely subtle and vary
13977  * widely depending on the field in question.  As such, each field is
13978  * annotated according to the following legend:
13979  *
13980  *   Q9S: The field is documented in queue(9S) and may be accessed without
13981  *        locks by a STREAMS module when inside an entry point (e.g., put(9E)).
13982  *        However, no fields can be directly modified unless q_lock is held
13983  *        (which is not possible in a DDI compliant STREAMS module), with the
13984  *        following exceptions:
13985  *
13986  *	   - q_ptr: can be modified as per the rules of the STREAMS module.
13987  *		    The STREAMS framework ignores q_ptr and thus imposes *no*
13988  *		    locking rules on it.
13989  *         - q_qinfo: can be modified before qprocson().
13990  *
13991  *	   - q_minpsz, q_maxpsz, q_hiwat, q_lowat: can be modified as per the
13992  *		    rules of the STREAMS module.  The STREAMS framework never
13993  *		    modifies these fields, and is tolerant of temporarily
13994  *		    stale field values.
13995  *
13996  *	  In general, the STREAMS framework employs one of the following
13997  *	  techniques to ensure STREAMS modules can safely access Q9S fields:
13998  *
13999  *	   - The field is only modified by the framework when the stream is
14000  *	     locked with strlock() (q_next).
14001  *
14002  *	   - The field is modified by the framework, but the modifies are
14003  *	     atomic, and temporarily stale values are harmless (q_count,
14004  *	     q_first, q_last).
14005  *
14006  *	   - The field is modified by the framework, but the field's visible
14007  *	     values are either constant or directly under the control
14008  *	     of the STREAMS module itself (q_flag).
14009  *
14010  *   QLK: The field must be accessed or modified under q_lock, except when
14011  *        the stream has been locked with strlock().  If multiple q_locks must
14012  *        be acquired, q_locks at higher addresses must be taken first.
14013  *
14014  *   STR: The field can be accessed without a lock, but must be modified under
14015  *	  strlock().
14016  *
14017  *   SQLK: The field must be accessed or modified under SQLOCK().
14018  *
14019  *   NOLK: The field can be accessed without a lock, but can only be modified
14020  *	   when the queue_t is not known to any other threads.
14021  *
14022  *   SVLK: The field must be accessed or modified under the service_queue lock.
14023  *         Note that service_lock must be taken after any needed q_locks,
14024  *	   and that no other lock should be taken while service_lock is held.
14025  *
14026  * In addition, it is always acceptable to modify a field that is not yet
14027  * known to any other threads -- and other special case exceptions exist in
14028  * the code.  Also, q_lock is used with q_wait to implement a stream head
14029  * monitor for reads and writes.
14030  */
14031 typedef struct queue {
14032  struct qinit *q_qinfo; /* Q9S: Q processing procedure  */
14033  struct msgb *q_first; /* Q9S: first message in Q	*/
14034  struct msgb *q_last; /* Q9S: last message in Q	*/
14035  struct queue *q_next; /* Q9S: next Q in stream	*/
14036  struct queue *q_link; /* SVLK: next Q for scheduling	*/
14037  void *q_ptr; /* Q9S: module-specific data	*/
14038  size_t q_count; /* Q9S: number of bytes on Q	*/
14039  uint_t q_flag; /* Q9S: Q state			*/
14040  ssize_t q_minpsz; /* Q9S: smallest packet OK on Q */
14041  ssize_t q_maxpsz; /* Q9S: largest packet OK on Q	*/
14042  size_t q_hiwat; /* Q9S: Q high water mark	*/
14043  size_t q_lowat; /* Q9S: Q low water mark	*/
14044  struct qband *q_bandp; /* QLK: band flow information	*/
14045  kmutex_t q_lock; /* NOLK: structure lock		*/
14046  struct stdata *q_stream; /* NOLK: stream backpointer	*/
14047  struct syncq *q_syncq; /* NOLK: associated syncq 	*/
14048  unsigned char q_nband; /* QLK: number of bands		*/
14049  kcondvar_t q_wait; /* NOLK: read/write sleep CV	*/
14050  struct queue *q_nfsrv; /* STR: next Q with svc routine */
14051  ushort_t q_draining; /* QLK: Q is draining		*/
14052  short q_struiot; /* QLK: sync streams Q UIO mode	*/
14053  clock_t q_qtstamp; /* QLK: when Q was enabled	*/
14054  size_t q_mblkcnt; /* QLK: mblk count		*/
14055  uint_t q_syncqmsgs; /* QLK: syncq message count	*/
14056  size_t q_rwcnt; /* QLK: # threads in rwnext()	*/
14057  pri_t q_spri; /* QLK: Q scheduling priority	*/
14058 
14059  /*
14060 	 * Syncq scheduling
14061 	 */
14062  struct msgb *q_sqhead; /* QLK: first syncq message	*/
14063  struct msgb *q_sqtail; /* QLK: last syncq message 	*/
14064  struct queue *q_sqnext; /* SQLK: next Q on syncq list	*/
14065  struct queue *q_sqprev; /* SQLK: prev Q on syncq list 	*/
14066  uint_t q_sqflags; /* SQLK: syncq flags		*/
14067  clock_t q_sqtstamp; /* SQLK: when Q was scheduled for sq */
14068 
14069  /*
14070 	 * NOLK: Reference to the queue's module's implementation
14071 	 * structure. This will be NULL for queues associated with drivers.
14072 	 */
14073  struct fmodsw_impl *q_fp;
14074 } queue_t;
14075 
14076 /*
14077  * Queue flags; unused flags not documented in queue(9S) can be recycled.
14078  */
14079 # 169 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
14080 /*	UNUSED		0x00000200	   was QHLIST			*/
14081 /* 	UNUSED 		0x00000400	   was QUNSAFE			*/
14082 
14083 
14084 
14085 
14086 
14087 
14088      /* all MT type flags		*/
14089 
14090 
14091 
14092 
14093 
14094 
14095 /*	UNUSED		0x00400000	   was QHOT			*/
14096 /*	UNUSED		0x00800000	   was QNEXTHOT			*/
14097 /* 	UNUSED		0x01000000	   was _QNEXTLESS		*/
14098 
14099 
14100 
14101 
14102      /* direct interface to/from sockfs */
14103 
14104 /* queue sqflags (protected by SQLOCK). */
14105 
14106 
14107      /* This is also noted by the	*/
14108      /* q_draining field, but this one is */
14109      /* protected by SQLOCK */
14110 
14111 /*
14112  * Structure that describes the separate information
14113  * for each priority band in the queue.
14114  */
14115 typedef struct qband {
14116  struct qband *qb_next; /* next band's info */
14117  size_t qb_count; /* number of bytes in band */
14118  struct msgb *qb_first; /* beginning of band's data */
14119  struct msgb *qb_last; /* end of band's data */
14120  size_t qb_hiwat; /* high water mark for band */
14121  size_t qb_lowat; /* low water mark for band */
14122  uint_t qb_flag; /* see below */
14123  size_t qb_mblkcnt; /* mblk counter for runaway msgs */
14124 } qband_t;
14125 
14126 /*
14127  * qband flags
14128  */
14129 
14130 
14131 
14132 
14133 /*
14134  * Maximum number of bands.
14135  */
14136 
14137 
14138 /*
14139  * Fields that can be manipulated through strqset() and strqget().
14140  */
14141 typedef enum qfields {
14142  QHIWAT = 0, /* q_hiwat or qb_hiwat */
14143  QLOWAT = 1, /* q_lowat or qb_lowat */
14144  QMAXPSZ = 2, /* q_maxpsz */
14145  QMINPSZ = 3, /* q_minpsz */
14146  QCOUNT = 4, /* q_count or qb_count */
14147  QFIRST = 5, /* q_first or qb_first */
14148  QLAST = 6, /* q_last or qb_last */
14149  QFLAG = 7, /* q_flag or qb_flag */
14150  QSTRUIOT = 8, /* q_struiot */
14151  QBAD = 9
14152 } qfields_t;
14153 
14154 /*
14155  * Module information structure
14156  */
14157 struct module_info {
14158  ushort_t mi_idnum; /* module id number */
14159  char *mi_idname; /* module name */
14160  ssize_t mi_minpsz; /* min packet size accepted */
14161  ssize_t mi_maxpsz; /* max packet size accepted */
14162  size_t mi_hiwat; /* hi-water mark */
14163  size_t mi_lowat; /* lo-water mark */
14164 };
14165 
14166 /*
14167  * queue information structure (with Synchronous STREAMS extensions)
14168  */
14169 struct qinit {
14170  int (*qi_putp)(); /* put procedure */
14171  int (*qi_srvp)(); /* service procedure */
14172  int (*qi_qopen)(); /* called on startup */
14173  int (*qi_qclose)(); /* called on finish */
14174  int (*qi_qadmin)(); /* for future use */
14175  struct module_info *qi_minfo; /* module information structure */
14176  struct module_stat *qi_mstat; /* module statistics structure */
14177  int (*qi_rwp)(); /* r/w procedure */
14178  int (*qi_infop)(); /* information procedure */
14179  int qi_struiot; /* stream uio type for struio() */
14180 };
14181 
14182 /*
14183  * Values for qi_struiot and q_struiot:
14184  */
14185 
14186 
14187 
14188 
14189 /*
14190  * Streamtab (used in cdevsw and fmodsw to point to module or driver)
14191  */
14192 struct streamtab {
14193  struct qinit *st_rdinit;
14194  struct qinit *st_wrinit;
14195  struct qinit *st_muxrinit;
14196  struct qinit *st_muxwinit;
14197 };
14198 
14199 /*
14200  * Structure sent to mux drivers to indicate a link.
14201  */
14202 struct linkblk {
14203  queue_t *l_qtop; /* lowest level write queue of upper stream */
14204     /* (set to NULL for persistent links) */
14205  queue_t *l_qbot; /* highest level write queue of lower stream */
14206  int l_index; /* index for lower stream. */
14207 };
14208 
14209 /*
14210  * Esballoc data buffer freeing routine
14211  */
14212 typedef struct free_rtn {
14213  void (*free_func)();
14214  caddr_t free_arg;
14215 } frtn_t;
14216 
14217 /*
14218  * Data block descriptor
14219  *
14220  * NOTE: db_base, db_lim, db_ref and db_type are the *only* public fields,
14221  * as described in datab(9S).  Everything else is implementation-private.
14222  */
14223 
14224 
14225 
14226 typedef struct datab {
14227  frtn_t *db_frtnp;
14228  unsigned char *db_base;
14229  unsigned char *db_lim;
14230  unsigned char db_ref;
14231  unsigned char db_type;
14232  unsigned char db_flags;
14233  unsigned char db_struioflag;
14234  pid_t db_cpid; /* cached pid, needs verification */
14235  void *db_cache; /* kmem cache descriptor */
14236  struct msgb *db_mblk;
14237  void (*db_free)(struct msgb *, struct datab *);
14238  void (*db_lastfree)(struct msgb *, struct datab *);
14239  intptr_t db_cksumstart;
14240  intptr_t db_cksumend;
14241  intptr_t db_cksumstuff;
14242  union {
14243   double enforce_alignment;
14244   unsigned char data[8];
14245   struct {
14246    union {
14247     uint32_t u32;
14248     uint16_t u16;
14249    } cksum_val; /* used to store calculated cksum */
14250    uint16_t flags;
14251    uint16_t pad;
14252   } cksum;
14253   /*
14254 		 * Union used for future extensions (pointer to data ?).
14255 		 */
14256  } db_struioun;
14257  struct fthdr *db_fthdr;
14258  cred_t *db_credp; /* credential */
14259 } dblk_t;
14260 
14261 
14262 
14263 
14264 /*
14265  * Accessor macros for private dblk_t fields (the rest are in <sys/strsun.h>).
14266  */
14267 
14268 
14269 
14270 /*
14271  * Used by GLDv2 to store the TCI information.
14272  */
14273 
14274 
14275 /*
14276  * Message block descriptor
14277  */
14278 typedef struct msgb {
14279  struct msgb *b_next;
14280  struct msgb *b_prev;
14281  struct msgb *b_cont;
14282  unsigned char *b_rptr;
14283  unsigned char *b_wptr;
14284  struct datab *b_datap;
14285  unsigned char b_band;
14286  unsigned char b_tag;
14287  unsigned short b_flag;
14288  queue_t *b_queue; /* for sync queues */
14289 } mblk_t;
14290 
14291 /*
14292  * bcache descriptor
14293  */
14294 typedef struct bcache {
14295  kmutex_t mutex;
14296  struct kmem_cache *buffer_cache;
14297  struct kmem_cache *dblk_cache;
14298  int alloc;
14299  int destroy;
14300  size_t size;
14301  uint_t align;
14302 } bcache_t;
14303 
14304 /*
14305  * db_flags values (all implementation private!)
14306  */
14307 
14308 
14309 
14310 
14311 /*
14312  * db_struioflag values:
14313  */
14314 
14315 
14316 
14317 
14318 
14319 
14320 /*
14321  * Message flags.  These are interpreted by the stream head.
14322  */
14323 
14324 
14325     /* write side of stream */
14326 
14327 /*	UNUSED		0x08	   was MSGNOGET (can be recycled) */
14328 
14329 
14330 
14331 
14332 /*
14333  * Streams message types.
14334  */
14335 
14336 /*
14337  * Data and protocol messages (regular and priority)
14338  */
14339 
14340 
14341 
14342 
14343 /*
14344  * Control messages (regular and priority)
14345  */
14346 # 445 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
14347 /*
14348  * Control messages (high priority; go to head of queue)
14349  */
14350 # 468 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
14351 /*
14352  * Queue message class definitions.
14353  */
14354 
14355 
14356 
14357 /*
14358  *  IOCTL structure - this structure is the format of the M_IOCTL message type.
14359  */
14360 # 488 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
14361 struct iocblk {
14362  int ioc_cmd; /* ioctl command type */
14363  cred_t *ioc_cr; /* full credentials */
14364  uint_t ioc_id; /* ioctl id */
14365  size_t ioc_count; /* count of bytes in data field */
14366  int ioc_error; /* error code */
14367  int ioc_rval; /* return value  */
14368  int ioc_fill1;
14369  uint_t ioc_flag; /* see below */
14370  int ioc_filler[2]; /* reserved for future use */
14371 };
14372 
14373 
14374 typedef struct iocblk *IOCP;
14375 
14376 /* {ioc,cp}_flags values */
14377 
14378 
14379 
14380 
14381 
14382 
14383 
14384 /*
14385  *	Is the ioctl data formatted for our native model?
14386  */
14387 
14388 
14389 
14390 /*
14391  * structure for the M_COPYIN and M_COPYOUT message types.
14392  */
14393 # 531 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
14394 struct copyreq {
14395  int cq_cmd; /* ioctl command (from ioc_cmd) */
14396  cred_t *cq_cr; /* full credentials */
14397  uint_t cq_id; /* ioctl id (from ioc_id) */
14398  caddr_t cq_addr; /* address to copy data to/from */
14399  size_t cq_size; /* number of bytes to copy */
14400  uint_t cq_flag; /* must be zero */
14401  mblk_t *cq_private; /* private state information */
14402  int cq_filler[4]; /* reserved for future use */
14403 };
14404 
14405 
14406 /*
14407  * structure for the M_IOCDATA message type.
14408  */
14409 # 557 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
14410 struct copyresp {
14411  int cp_cmd; /* ioctl command (from ioc_cmd) */
14412  cred_t *cp_cr; /* full credentials */
14413  uint_t cp_id; /* ioctl id (from ioc_id) */
14414  caddr_t cp_rval; /* status of request: 0 -> success */
14415      /* 		non-zero -> failure */
14416  size_t cp_pad1;
14417  uint_t cp_pad2;
14418  mblk_t *cp_private; /* private state information */
14419  uint_t cp_flag; /* datamodel IOC_ flags; see above */
14420  int cp_filler[3];
14421 };
14422 
14423 
14424 /*
14425  * Since these structures are all intended to travel in the same message
14426  * at different stages of a STREAMS ioctl, this union is used to determine
14427  * the message size in strdoioctl().
14428  */
14429 union ioctypes {
14430  struct iocblk iocblk;
14431  struct copyreq copyreq;
14432  struct copyresp copyresp;
14433 };
14434 
14435 /*
14436  * Options structure for M_SETOPTS message.  This is sent upstream
14437  * by a module or driver to set stream head options.
14438  */
14439 struct stroptions {
14440  uint_t so_flags; /* options to set */
14441  short so_readopt; /* read option */
14442  ushort_t so_wroff; /* write offset */
14443  ssize_t so_minpsz; /* minimum read packet size */
14444  ssize_t so_maxpsz; /* maximum read packet size */
14445  size_t so_hiwat; /* read queue high water mark */
14446  size_t so_lowat; /* read queue low water mark */
14447  unsigned char so_band; /* band for water marks */
14448  ushort_t so_erropt; /* error option */
14449  ssize_t so_maxblk; /* maximum message block size */
14450  ushort_t so_copyopt; /* copy options (see stropts.h) */
14451  ushort_t so_tail; /* space available at the end */
14452 };
14453 
14454 /* flags for stream options set message */
14455 # 673 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
14456 /*
14457  * Miscellaneous parameters and flags.
14458  */
14459 
14460 /*
14461  * Values for stream flag in open to indicate module open, clone open,
14462  * and the return value for failure.
14463  */
14464 
14465 
14466 
14467 
14468 /*
14469  * Priority definitions for block allocation.
14470  */
14471 
14472 
14473 
14474 
14475 /*
14476  * Value for packet size that denotes infinity
14477  */
14478 
14479 
14480 /*
14481  * Flags for flushq()
14482  */
14483 
14484 
14485 
14486 /*
14487  * Flag for transparent ioctls
14488  */
14489 
14490 
14491 /*
14492  * Stream head default high/low water marks
14493  */
14494 
14495 
14496 
14497 /*
14498  * qwriter perimeter types
14499  */
14500 
14501 
14502 
14503 /*
14504  * Definitions of Streams macros and function interfaces.
14505  */
14506 
14507 /*
14508  * canenable - check if queue can be enabled by putq().
14509  */
14510 
14511 
14512 /*
14513  * Test if data block type is one of the data messages (i.e. not a control
14514  * message).
14515  */
14516 
14517 
14518 
14519 
14520 
14521 
14522 
14523 /*
14524  * Extract queue class of message block.
14525  */
14526 
14527 
14528 /*
14529  * Align address on next lower word boundary.
14530  */
14531 
14532 
14533 /*
14534  * Find the max size of data block.
14535  */
14536 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
14537 
14538 /*
14539  * Symbols such as htonl() are required to be exposed through this file,
14540  * per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
14541  */
14542 
14543 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 1
14544 /*
14545  * CDDL HEADER START
14546  *
14547  * The contents of this file are subject to the terms of the
14548  * Common Development and Distribution License (the "License").
14549  * You may not use this file except in compliance with the License.
14550  *
14551  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14552  * or http://www.opensolaris.org/os/licensing.
14553  * See the License for the specific language governing permissions
14554  * and limitations under the License.
14555  *
14556  * When distributing Covered Code, include this CDDL HEADER in each
14557  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14558  * If applicable, add the following below this CDDL HEADER, with the
14559  * fields enclosed by brackets "[]" replaced with your own identifying
14560  * information: Portions Copyright [yyyy] [name of copyright owner]
14561  *
14562  * CDDL HEADER END
14563  */
14564 
14565 /*
14566  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
14567  * Use is subject to license terms.
14568  */
14569 
14570 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
14571 /*	  All Rights Reserved  	*/
14572 
14573 /*
14574  * University Copyright- Copyright (c) 1982, 1986, 1988
14575  * The Regents of the University of California
14576  * All Rights Reserved
14577  *
14578  * University Acknowledgment- Portions of this document are derived from
14579  * software developed by the University of California, Berkeley, and its
14580  * contributors.
14581  */
14582 
14583 
14584 
14585 
14586 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
14587 /*
14588  * CDDL HEADER START
14589  *
14590  * The contents of this file are subject to the terms of the
14591  * Common Development and Distribution License (the "License").
14592  * You may not use this file except in compliance with the License.
14593  *
14594  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14595  * or http://www.opensolaris.org/os/licensing.
14596  * See the License for the specific language governing permissions
14597  * and limitations under the License.
14598  *
14599  *
14600  * When distributing Covered Code, include this CDDL HEADER in each
14601  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14602  * If applicable, add the following below this CDDL HEADER, with the
14603  * fields enclosed by brackets "[]" replaced with your own identifying
14604  * information: Portions Copyright [yyyy] [name of copyright owner]
14605  *
14606  * CDDL HEADER END
14607  */
14608 
14609 /*
14610  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
14611  * Use is subject to license terms.
14612  * Copyright 2016 Joyent, Inc.
14613  */
14614 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
14615 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
14616 /*
14617  * CDDL HEADER START
14618  *
14619  * The contents of this file are subject to the terms of the
14620  * Common Development and Distribution License, Version 1.0 only
14621  * (the "License").  You may not use this file except in compliance
14622  * with the License.
14623  *
14624  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14625  * or http://www.opensolaris.org/os/licensing.
14626  * See the License for the specific language governing permissions
14627  * and limitations under the License.
14628  *
14629  * When distributing Covered Code, include this CDDL HEADER in each
14630  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14631  * If applicable, add the following below this CDDL HEADER, with the
14632  * fields enclosed by brackets "[]" replaced with your own identifying
14633  * information: Portions Copyright [yyyy] [name of copyright owner]
14634  *
14635  * CDDL HEADER END
14636  */
14637 /*
14638  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
14639  *
14640  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
14641  * Use is subject to license terms.
14642  */
14643 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
14644 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
14645 /*
14646  * macros for conversion between host and (internet) network byte order
14647  */
14648 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
14649 typedef uint16_t in_port_t;
14650 
14651 
14652 
14653 
14654 typedef uint32_t in_addr_t;
14655 
14656 
14657 
14658 extern uint32_t htonl(uint32_t);
14659 extern uint16_t htons(uint16_t);
14660 extern uint32_t ntohl(uint32_t);
14661 extern uint16_t ntohs(uint16_t);
14662 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
14663 extern uint64_t htonll(uint64_t);
14664 extern uint64_t ntohll(uint64_t);
14665 
14666 
14667 
14668 
14669 
14670 
14671 /*
14672  * Macros to reverse byte order
14673  */
14674 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
14675 /*
14676  * Macros to convert from a specific byte order to/from native byte order
14677  */
14678 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
14679 /*
14680  * Macros to read unaligned values from a specific byte order to
14681  * native byte order
14682  */
14683 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
14684 /*
14685  * Macros to write unaligned values from native byte order to a specific byte
14686  * order.
14687  */
14688 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
14689 
14690 
14691 
14692 
14693 
14694 
14695 
14696 /*
14697  * Note: IPv4 address data structures usage conventions.
14698  * The "in_addr_t" type below (required by Unix standards)
14699  * is NOT a typedef of "struct in_addr" and violates the usual
14700  * conventions where "struct <name>" and <name>_t are corresponding
14701  * typedefs.
14702  * To minimize confusion, kernel data structures/usage prefers use
14703  * of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
14704  * The user level APIs continue to follow the historic popular
14705  * practice of using "struct in_addr".
14706  */
14707 
14708 
14709 
14710 
14711 
14712 
14713 
14714 typedef uint32_t ipaddr_t;
14715 
14716 
14717 
14718 
14719 struct in6_addr {
14720  union {
14721   /*
14722 		 * Note: Static initalizers of "union" type assume
14723 		 * the constant on the RHS is the type of the first member
14724 		 * of union.
14725 		 * To make static initializers (and efficient usage) work,
14726 		 * the order of members exposed to user and kernel view of
14727 		 * this data structure is different.
14728 		 * User environment sees specified uint8_t type as first
14729 		 * member whereas kernel sees most efficient type as
14730 		 * first member.
14731 		 */
14732 
14733 
14734 
14735 
14736   uint8_t _S6_u8[16]; /* IPv6 address */
14737   uint32_t _S6_u32[4]; /* IPv6 address */
14738 
14739   uint32_t __S6_align; /* Align on 32 bit boundary */
14740  } _S6_un;
14741 };
14742 
14743 
14744 
14745 
14746 
14747 
14748 
14749 typedef struct in6_addr in6_addr_t;
14750 # 144 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14751 /*
14752  * Protocols
14753  *
14754  * Some of these constant names are copied for the DTrace IP provider in
14755  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
14756  * in sync.
14757  */
14758 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14759       /* Transmission Protocol */
14760 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14761 /*
14762  * Port/socket numbers: network standard functions
14763  *
14764  * Entries should exist here for each port number compiled into an ON
14765  * component, such as snoop.
14766  */
14767 # 208 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14768 /*
14769  * Port/socket numbers: host specific functions
14770  */
14771 # 229 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14772 /*
14773  * Internet Key Exchange (IKE) ports
14774  */
14775 
14776 
14777 
14778 /*
14779  * UNIX TCP sockets
14780  */
14781 
14782 
14783 
14784 
14785 
14786 
14787 /*
14788  * UNIX UDP sockets
14789  */
14790 
14791 
14792 
14793 
14794 
14795 
14796 
14797 /*
14798  * DHCPv6 UDP ports
14799  */
14800 
14801 
14802 
14803 
14804 
14805 /*
14806  * Ports < IPPORT_RESERVED are reserved for
14807  * privileged processes (e.g. root).
14808  * Ports > IPPORT_USERRESERVED are reserved
14809  * for servers, not necessarily privileged.
14810  */
14811 
14812 
14813 
14814 /*
14815  * Link numbers
14816  */
14817 
14818 
14819 
14820 
14821 /*
14822  * IPv4 Internet address
14823  *	This definition contains obsolete fields for compatibility
14824  *	with SunOS 3.x and 4.2bsd.  The presence of subnets renders
14825  *	divisions into fixed fields misleading at best.  New code
14826  *	should use only the s_addr field.
14827  */
14828 # 293 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14829 struct in_addr {
14830  union {
14831   struct { uint8_t s_b1, s_b2, s_b3, s_b4; } S_un_b;
14832   struct { uint16_t s_w1, s_w2; } S_un_w;
14833 
14834   uint32_t S_addr;
14835 
14836 
14837 
14838  } S_un;
14839 
14840 
14841 
14842 
14843 
14844 
14845 };
14846 
14847 /*
14848  * Definitions of bits in internet address integers.
14849  * On subnets, the decomposition of addresses to host and net parts
14850  * is done according to subnet mask, not the masks here.
14851  *
14852  * Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
14853  * IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
14854  * obsolete". IN_MULTICAST macro should be used to test if a address
14855  * is a multicast address.
14856  */
14857 # 348 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14858 /*
14859  * We have removed CLASS E checks from the kernel
14860  * But we preserve these defines for userland in order
14861  * to avoid compile  breakage of some 3rd party piece of software
14862  */
14863 # 369 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14864 /* Scoped IPv4 prefixes (in host byte-order) */
14865 # 379 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14866 /* RFC 3927 IPv4 link local address (i in host byte-order) */
14867 
14868 
14869 /* Well known 6to4 Relay Router Anycast address defined in RFC 3068 */
14870 
14871 
14872 
14873 
14874 
14875 
14876 /*
14877  * Define a macro to stuff the loopback address into an Internet address
14878  */
14879 
14880 
14881 
14882 
14883 
14884 
14885 /*
14886  * IPv4 Socket address.
14887  */
14888 struct sockaddr_in {
14889  sa_family_t sin_family;
14890  in_port_t sin_port;
14891  struct in_addr sin_addr;
14892 
14893  char sin_zero[8];
14894 
14895 
14896 
14897 };
14898 
14899 
14900 /*
14901  * IPv6 socket address.
14902  */
14903 struct sockaddr_in6 {
14904  sa_family_t sin6_family;
14905  in_port_t sin6_port;
14906  uint32_t sin6_flowinfo;
14907  struct in6_addr sin6_addr;
14908  uint32_t sin6_scope_id; /* Depends on scope of sin6_addr */
14909  uint32_t __sin6_src_id; /* Impl. specific - UDP replies */
14910 };
14911 
14912 /*
14913  * Macros for accessing the traffic class and flow label fields from
14914  * sin6_flowinfo.
14915  * These are designed to be applied to a 32-bit value.
14916  */
14917 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14918 /* masks */
14919 
14920 
14921 
14922 
14923 
14924 /*
14925  * Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
14926  * use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
14927  * only. They need to be different for User/Kernel versions because union
14928  * component data structure is defined differently (it is identical at
14929  * binary representation level).
14930  *
14931  * const struct in6_addr IN6ADDR_ANY_INIT;
14932  * const struct in6_addr IN6ADDR_LOOPBACK_INIT;
14933  */
14934 # 478 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14935 /*
14936  * RFC 2553 specifies the following macros. Their type is defined
14937  * as "int" in the RFC but they only have boolean significance
14938  * (zero or non-zero). For the purposes of our comment notation,
14939  * we assume a hypothetical type "bool" defined as follows to
14940  * write the prototypes assumed for macros in our comments better.
14941  *
14942  * typedef int bool;
14943  */
14944 
14945 /*
14946  * IN6 macros used to test for special IPv6 addresses
14947  * (Mostly from spec)
14948  *
14949  * bool  IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
14950  * bool  IN6_IS_ADDR_LOOPBACK    (const struct in6_addr *);
14951  * bool  IN6_IS_ADDR_MULTICAST   (const struct in6_addr *);
14952  * bool  IN6_IS_ADDR_LINKLOCAL   (const struct in6_addr *);
14953  * bool  IN6_IS_ADDR_SITELOCAL   (const struct in6_addr *);
14954  * bool  IN6_IS_ADDR_V4MAPPED    (const struct in6_addr *);
14955  * bool  IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
14956  * bool  IN6_IS_ADDR_V4COMPAT    (const struct in6_addr *);
14957  * bool  IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
14958  * bool  IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
14959  * bool  IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
14960  * bool  IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
14961  * bool  IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
14962  * bool  IN6_IS_ADDR_MC_GLOBAL   (const struct in6_addr *);
14963  * bool  IN6_IS_ADDR_6TO4	 (const struct in6_addr *); -- Not from RFC2553
14964  * bool  IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
14965  *	     const struct in6_addr *);			    -- Not from RFC2553
14966  * bool  IN6_IS_ADDR_LINKSCOPE	 (const struct in6addr  *); -- Not from RFC2553
14967  */
14968 # 568 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14969 /*
14970  * IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
14971  * Note: This macro is currently NOT defined in RFC2553 specification
14972  * and not a standard macro that portable applications should use.
14973  */
14974 # 587 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14975 /* Exclude loopback and unspecified address */
14976 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14977 /*
14978  * Note:
14979  * IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
14980  * specification and not a standard macro that portable applications
14981  * should use.
14982  */
14983 # 660 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14984 /*
14985  * The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
14986  * RFC, and shouldn't be used by portable applications.  It is used to see
14987  * if an address is a solicited-node multicast address, which is prefixed
14988  * with ff02:0:0:0:0:1:ff00::/104.
14989  */
14990 # 680 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14991 /*
14992  * Macros to a) test for 6to4 IPv6 address, and b) to test if two
14993  * 6to4 addresses have the same /48 prefix, and, hence, are from the
14994  * same 6to4 site.
14995  */
14996 # 699 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
14997 /*
14998  * IN6_IS_ADDR_LINKSCOPE
14999  * Identifies an address as being either link-local, link-local multicast or
15000  * node-local multicast.  All types of addresses are considered to be unique
15001  * within the scope of a given link.
15002  */
15003 
15004 
15005 
15006 
15007 /*
15008  * Useful utility macros for operations with IPv6 addresses
15009  * Note: These macros are NOT defined in the RFC2553 or any other
15010  * standard specification and are not standard macros that portable
15011  * applications should use.
15012  */
15013 
15014 /*
15015  * IN6_V4MAPPED_TO_INADDR
15016  * IN6_V4MAPPED_TO_IPADDR
15017  *	Assign a IPv4-Mapped IPv6 address to an IPv4 address.
15018  *	Note: These macros are NOT defined in RFC2553 or any other standard
15019  *	specification and are not macros that portable applications should
15020  *	use.
15021  *
15022  * void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
15023  * void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
15024  *
15025  */
15026 
15027 
15028 
15029 
15030 
15031 /*
15032  * IN6_INADDR_TO_V4MAPPED
15033  * IN6_IPADDR_TO_V4MAPPED
15034  *	Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
15035  *	address.
15036  *	Note: These macros are NOT defined in RFC2553 or any other standard
15037  *	specification and are not macros that portable applications should
15038  *	use.
15039  *
15040  * void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
15041  * void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
15042  *
15043  */
15044 # 770 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
15045 /*
15046  * IN6_6TO4_TO_V4ADDR
15047  *	Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
15048  *      address.
15049  *	Note: This macro is NOT defined in RFC2553 or any other standard
15050  *	specification and is not a macro that portable applications should
15051  *	use.
15052  *	Note: we don't use the IPADDR form of the macro because we need
15053  *	to do a bytewise copy; the V4ADDR in the 6to4 address is not
15054  *	32-bit aligned.
15055  *
15056  * void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
15057  *
15058  */
15059 
15060 
15061 
15062 
15063 
15064 
15065 /*
15066  * IN6_V4ADDR_TO_6TO4
15067  *	Given an IPv4 address and an IPv6 address for output, a 6to4 address
15068  *	will be created from the IPv4 Address.
15069  *	Note:  This method for creating 6to4 addresses is not standardized
15070  *	outside of Solaris.  The newly created 6to4 address will be of the form
15071  *	2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
15072  *	HOSTID will equal 1.
15073  *
15074  * void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
15075  *
15076  */
15077 # 828 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
15078 /*
15079  * IN6_ARE_ADDR_EQUAL (defined in RFC2292)
15080  *	 Compares if IPv6 addresses are equal.
15081  * Note: Compares in order of high likelyhood of a miss so we minimize
15082  * compares. (Current heuristic order, compare in reverse order of
15083  * uint32_t units)
15084  *
15085  * bool  IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
15086  *			    const struct in6_addr *);
15087  */
15088 
15089 
15090 
15091 
15092 
15093 
15094 /*
15095  * IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
15096  *	Compares if prefixed parts of IPv6 addresses are equal.
15097  *
15098  * uint32_t IN6_MASK_FROM_PREFIX(int, int);
15099  * bool     IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
15100  *				       const struct in6_addr *,
15101  *				       int);
15102  */
15103 # 879 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
15104 /*
15105  * Options for use with [gs]etsockopt at the IP level.
15106  *
15107  * Note: Some of the IP_ namespace has conflict with and
15108  * and is exposed through <xti.h>. (It also requires exposing
15109  * options not implemented). The options with potential
15110  * for conflicts use #ifndef guards.
15111  */
15112 # 919 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
15113 /*
15114  * IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
15115  * is used to differentiate b/w the two.
15116  */
15117 
15118 
15119 
15120 
15121 
15122 /*
15123  * Different preferences that can be requested from IPSEC protocols.
15124  */
15125 
15126 
15127 
15128 
15129 /*
15130  * This can be used with the setsockopt() call to set per socket security
15131  * options. When the application uses per-socket API, we will reflect
15132  * the request on both outbound and inbound packets.
15133  */
15134 
15135 typedef struct ipsec_req {
15136  uint_t ipsr_ah_req; /* AH request */
15137  uint_t ipsr_esp_req; /* ESP request */
15138  uint_t ipsr_self_encap_req; /* Self-Encap request */
15139  uint8_t ipsr_auth_alg; /* Auth algs for AH */
15140  uint8_t ipsr_esp_alg; /* Encr algs for ESP */
15141  uint8_t ipsr_esp_auth_alg; /* Auth algs for ESP */
15142 } ipsec_req_t;
15143 
15144 /*
15145  * MCAST_* options are protocol-independent.  The actual definitions
15146  * are with the v6 options below; this comment is here to note the
15147  * namespace usage.
15148  *
15149  * #define	MCAST_JOIN_GROUP	0x29
15150  * #define	MCAST_LEAVE_GROUP	0x2a
15151  * #define	MCAST_BLOCK_SOURCE	0x2b
15152  * #define	MCAST_UNBLOCK_SOURCE	0x2c
15153  * #define	MCAST_JOIN_SOURCE_GROUP	0x2d
15154  * #define	MCAST_LEAVE_SOURCE_GROUP 0x2e
15155  */
15156 
15157 
15158 /*
15159  * SunOS private (potentially not portable) IP_ option names
15160  */
15161 
15162 
15163 
15164 /* can be reused		0x44 */
15165 
15166 
15167 /*
15168  * Option values and names (when !_XPG5) shared with <xti_inet.h>
15169  */
15170 # 988 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
15171 /*
15172  * The following option values are reserved by <xti_inet.h>
15173  *
15174  * T_IP_OPTIONS	0x107	 -  IP per-packet options
15175  * T_IP_TOS	0x108	 -  IP per packet type of service
15176  */
15177 
15178 /*
15179  * Default value constants for multicast attributes controlled by
15180  * IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
15181  */
15182 
15183 
15184 
15185 
15186 /*
15187  * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
15188  */
15189 struct ip_mreq {
15190  struct in_addr imr_multiaddr; /* IP multicast address of group */
15191  struct in_addr imr_interface; /* local IP address of interface */
15192 };
15193 
15194 /*
15195  * Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
15196  * IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
15197  */
15198 struct ip_mreq_source {
15199  struct in_addr imr_multiaddr; /* IP address of group */
15200  struct in_addr imr_sourceaddr; /* IP address of source */
15201  struct in_addr imr_interface; /* IP address of interface */
15202 };
15203 
15204 /*
15205  * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
15206  * IPv6 addresses.
15207  */
15208 struct ipv6_mreq {
15209  struct in6_addr ipv6mr_multiaddr; /* IPv6 multicast addr */
15210  unsigned int ipv6mr_interface; /* interface index */
15211 };
15212 
15213 /*
15214  * Use #pragma pack() construct to force 32-bit alignment on amd64.
15215  * This is needed to keep the structure size and offsets consistent
15216  * between a 32-bit app and the 64-bit amd64 kernel in structures
15217  * where 64-bit alignment would create gaps (in this case, structures
15218  * which have a uint32_t followed by a struct sockaddr_storage).
15219  */
15220 
15221 
15222 
15223 
15224 /*
15225  * Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
15226  */
15227 struct group_req {
15228  uint32_t gr_interface; /* interface index */
15229  struct sockaddr_storage gr_group; /* group address */
15230 };
15231 
15232 /*
15233  * Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
15234  * MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
15235  */
15236 struct group_source_req {
15237  uint32_t gsr_interface; /* interface index */
15238  struct sockaddr_storage gsr_group; /* group address */
15239  struct sockaddr_storage gsr_source; /* source address */
15240 };
15241 
15242 /*
15243  * Argument for SIOC[GS]MSFILTER ioctls
15244  */
15245 struct group_filter {
15246  uint32_t gf_interface; /* interface index */
15247  struct sockaddr_storage gf_group; /* multicast address */
15248  uint32_t gf_fmode; /* filter mode */
15249  uint32_t gf_numsrc; /* number of sources */
15250  struct sockaddr_storage gf_slist[1]; /* source address */
15251 };
15252 # 1078 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
15253 /*
15254  * Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
15255  */
15256 struct ip_msfilter {
15257  struct in_addr imsf_multiaddr; /* IP multicast address of group */
15258  struct in_addr imsf_interface; /* local IP address of interface */
15259  uint32_t imsf_fmode; /* filter mode */
15260  uint32_t imsf_numsrc; /* number of sources in src_list */
15261  struct in_addr imsf_slist[1]; /* start of source list */
15262 };
15263 
15264 
15265 
15266 
15267 
15268 /*
15269  * Multicast source filter manipulation functions in libsocket;
15270  * defined in RFC 3678.
15271  */
15272 int setsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t,
15273    uint_t, struct sockaddr_storage *);
15274 
15275 int getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t *,
15276    uint_t *, struct sockaddr_storage *);
15277 
15278 int setipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t,
15279    uint32_t, struct in_addr *);
15280 
15281 int getipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t *,
15282    uint32_t *, struct in_addr *);
15283 
15284 /*
15285  * Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
15286  */
15287 
15288 
15289 
15290 /*
15291  * Argument struct for IP_PKTINFO option
15292  */
15293 typedef struct in_pktinfo {
15294  unsigned int ipi_ifindex; /* send/recv interface index */
15295  struct in_addr ipi_spec_dst; /* matched source address */
15296  struct in_addr ipi_addr; /* src/dst address in IP hdr */
15297 } in_pktinfo_t;
15298 
15299 /*
15300  * Argument struct for IPV6_PKTINFO option
15301  */
15302 struct in6_pktinfo {
15303  struct in6_addr ipi6_addr; /* src/dst IPv6 address */
15304  unsigned int ipi6_ifindex; /* send/recv interface index */
15305 };
15306 
15307 /*
15308  * Argument struct for IPV6_MTUINFO option
15309  */
15310 struct ip6_mtuinfo {
15311  struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
15312  uint32_t ip6m_mtu; /* path MTU in host byte order */
15313 };
15314 
15315 /*
15316  * IPv6 routing header types
15317  */
15318 
15319 
15320 extern socklen_t inet6_rth_space(int type, int segments);
15321 extern void *inet6_rth_init(void *bp, socklen_t bp_len, int type, int segments);
15322 extern int inet6_rth_add(void *bp, const struct in6_addr *addr);
15323 extern int inet6_rth_reverse(const void *in, void *out);
15324 extern int inet6_rth_segments(const void *bp);
15325 extern struct in6_addr *inet6_rth_getaddr(const void *bp, int index);
15326 
15327 extern int inet6_opt_init(void *extbuf, socklen_t extlen);
15328 extern int inet6_opt_append(void *extbuf, socklen_t extlen, int offset,
15329  uint8_t type, socklen_t len, uint_t align, void **databufp);
15330 extern int inet6_opt_finish(void *extbuf, socklen_t extlen, int offset);
15331 extern int inet6_opt_set_val(void *databuf, int offset, void *val,
15332  socklen_t vallen);
15333 extern int inet6_opt_next(void *extbuf, socklen_t extlen, int offset,
15334  uint8_t *typep, socklen_t *lenp, void **databufp);
15335 extern int inet6_opt_find(void *extbufp, socklen_t extlen, int offset,
15336  uint8_t type, socklen_t *lenp, void **databufp);
15337 extern int inet6_opt_get_val(void *databuf, int offset, void *val,
15338  socklen_t vallen);
15339 
15340 
15341 /*
15342  * Argument structure for IP_ADD_PROXY_ADDR.
15343  * Note that this is an unstable, experimental interface. It may change
15344  * later. Don't use it unless you know what it is.
15345  */
15346 typedef struct {
15347  struct in_addr in_prefix_addr;
15348  unsigned int in_prefix_len;
15349 } in_prefix_t;
15350 
15351 
15352 
15353 /*
15354  * IPv6 options
15355  */
15356 
15357      /* packets. */
15358      /* argument type: uint_t */
15359 
15360      /* multicast packets. */
15361      /* argument type: struct in6_addr */
15362 
15363      /* multicast packets. */
15364      /* argument type: uint_t */
15365 
15366      /* multicast packets on same socket. */
15367      /* argument type: uint_t */
15368 
15369      /* argument type: struct ipv6_mreq */
15370 
15371      /* argument type: struct ipv6_mreq */
15372 
15373 /*
15374  * Other XPG6 constants.
15375  */
15376 
15377      /* decimal notation. */
15378 
15379      /* standard colon-hex notation. */
15380 
15381 
15382 
15383 
15384 
15385 /*
15386  * IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP are being kept
15387  * for backward compatibility. They have the same meaning as IPV6_JOIN_GROUP
15388  * and IPV6_LEAVE_GROUP respectively.
15389  */
15390 
15391      /* argument type: struct ipv6_mreq */
15392 
15393      /* argument type: struct ipv6_mreq */
15394 
15395 
15396      /* arg type: "struct in6_pktingo" - */
15397 
15398 
15399 
15400 
15401      /* the routing header */
15402 
15403 
15404      /* the routing header */
15405 
15406 
15407 
15408 
15409 /*
15410  * This options exists for backwards compatability and should no longer be
15411  * used.  Use IPV6_RECVDSTOPTS instead.
15412  */
15413 
15414 
15415 
15416 
15417 /*
15418  * enable/disable IPV6_RTHDRDSTOPTS.  Now obsolete.  IPV6_RECVDSTOPTS enables
15419  * the receipt of both headers.
15420  */
15421 # 1259 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
15422 /*
15423  * enable/disable receipt of both both IPV6_DSTOPTS headers.
15424  */
15425 
15426 
15427 /*
15428  * protocol-independent multicast membership options.
15429  */
15430 
15431 
15432 
15433 
15434 
15435 
15436 
15437 /* 32Bit field for IPV6_SRC_PREFERENCES */
15438 # 1295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
15439 /*
15440  * SunOS private (potentially not portable) IPV6_ option names
15441  */
15442 
15443 
15444      /* unspecified (all zeros) */
15445 
15446 /*
15447  * Miscellaneous IPv6 constants.
15448  */
15449 
15450 
15451 
15452 
15453 /*
15454  * Extern declarations for pre-defined global const variables
15455  */
15456 
15457 
15458 
15459 extern const struct in6_addr in6addr_any;
15460 extern const struct in6_addr in6addr_loopback;
15461 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
15462 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 1
15463 /*
15464  * CDDL HEADER START
15465  *
15466  * The contents of this file are subject to the terms of the
15467  * Common Development and Distribution License (the "License").
15468  * You may not use this file except in compliance with the License.
15469  *
15470  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15471  * or http://www.opensolaris.org/os/licensing.
15472  * See the License for the specific language governing permissions
15473  * and limitations under the License.
15474  *
15475  * When distributing Covered Code, include this CDDL HEADER in each
15476  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15477  * If applicable, add the following below this CDDL HEADER, with the
15478  * fields enclosed by brackets "[]" replaced with your own identifying
15479  * information: Portions Copyright [yyyy] [name of copyright owner]
15480  *
15481  * CDDL HEADER END
15482  */
15483 /*
15484  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
15485  *
15486  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
15487  */
15488 
15489 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
15490 /*	  All Rights Reserved	*/
15491 
15492 /*
15493  * University Copyright- Copyright (c) 1982, 1986, 1988
15494  * The Regents of the University of California
15495  * All Rights Reserved
15496  *
15497  * University Acknowledgment- Portions of this document are derived from
15498  * software developed by the University of California, Berkeley, and its
15499  * contributors.
15500  */
15501 
15502 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
15503 
15504 
15505 
15506 
15507 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
15508 /*
15509  * CDDL HEADER START
15510  *
15511  * The contents of this file are subject to the terms of the
15512  * Common Development and Distribution License (the "License").
15513  * You may not use this file except in compliance with the License.
15514  *
15515  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15516  * or http://www.opensolaris.org/os/licensing.
15517  * See the License for the specific language governing permissions
15518  * and limitations under the License.
15519  *
15520  * When distributing Covered Code, include this CDDL HEADER in each
15521  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15522  * If applicable, add the following below this CDDL HEADER, with the
15523  * fields enclosed by brackets "[]" replaced with your own identifying
15524  * information: Portions Copyright [yyyy] [name of copyright owner]
15525  *
15526  * CDDL HEADER END
15527  */
15528 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
15529 /*	  All Rights Reserved  	*/
15530 
15531 
15532 /*
15533  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
15534  * Use is subject to license terms.
15535  *
15536  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
15537  * Copyright 2016 Joyent, Inc.
15538  */
15539 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
15540 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 1
15541 /*
15542  * CDDL HEADER START
15543  *
15544  * The contents of this file are subject to the terms of the
15545  * Common Development and Distribution License (the "License").
15546  * You may not use this file except in compliance with the License.
15547  *
15548  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15549  * or http://www.opensolaris.org/os/licensing.
15550  * See the License for the specific language governing permissions
15551  * and limitations under the License.
15552  *
15553  * When distributing Covered Code, include this CDDL HEADER in each
15554  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15555  * If applicable, add the following below this CDDL HEADER, with the
15556  * fields enclosed by brackets "[]" replaced with your own identifying
15557  * information: Portions Copyright [yyyy] [name of copyright owner]
15558  *
15559  * CDDL HEADER END
15560  */
15561 /*
15562  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
15563  *
15564  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
15565  * Use is subject to license terms.
15566  *
15567  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
15568  * Copyright (c) 2015, Joyent, Inc.  All rights reserved.
15569  */
15570 
15571 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
15572 /*	  All Rights Reserved  	*/
15573 
15574 /*
15575  * University Copyright- Copyright (c) 1982, 1986, 1988
15576  * The Regents of the University of California
15577  * All Rights Reserved
15578  *
15579  * University Acknowledgment- Portions of this document are derived from
15580  * software developed by the University of California, Berkeley, and its
15581  * contributors.
15582  */
15583 
15584 
15585 
15586 
15587 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
15588 /*
15589  * CDDL HEADER START
15590  *
15591  * The contents of this file are subject to the terms of the
15592  * Common Development and Distribution License (the "License").
15593  * You may not use this file except in compliance with the License.
15594  *
15595  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15596  * or http://www.opensolaris.org/os/licensing.
15597  * See the License for the specific language governing permissions
15598  * and limitations under the License.
15599  *
15600  * When distributing Covered Code, include this CDDL HEADER in each
15601  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15602  * If applicable, add the following below this CDDL HEADER, with the
15603  * fields enclosed by brackets "[]" replaced with your own identifying
15604  * information: Portions Copyright [yyyy] [name of copyright owner]
15605  *
15606  * CDDL HEADER END
15607  */
15608 
15609 /*
15610  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
15611  * Copyright 2016 Joyent, Inc.
15612  *
15613  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
15614  * Use is subject to license terms.
15615  */
15616 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
15617 
15618 
15619 
15620 
15621 
15622 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
15623 /*
15624  * CDDL HEADER START
15625  *
15626  * The contents of this file are subject to the terms of the
15627  * Common Development and Distribution License (the "License").
15628  * You may not use this file except in compliance with the License.
15629  *
15630  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15631  * or http://www.opensolaris.org/os/licensing.
15632  * See the License for the specific language governing permissions
15633  * and limitations under the License.
15634  *
15635  * When distributing Covered Code, include this CDDL HEADER in each
15636  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15637  * If applicable, add the following below this CDDL HEADER, with the
15638  * fields enclosed by brackets "[]" replaced with your own identifying
15639  * information: Portions Copyright [yyyy] [name of copyright owner]
15640  *
15641  * CDDL HEADER END
15642  */
15643 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
15644 /*	  All Rights Reserved  	*/
15645 
15646 
15647 /*
15648  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
15649  * Use is subject to license terms.
15650  *
15651  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
15652  * Copyright 2016 Joyent, Inc.
15653  */
15654 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
15655 
15656 /*
15657  * I/O parameter information.  A uio structure describes the I/O which
15658  * is to be performed by an operation.  Typically the data movement will
15659  * be performed by a routine such as uiomove(), which updates the uio
15660  * structure to reflect what was done.
15661  */
15662 
15663 
15664 
15665 
15666 
15667 
15668 
15669 typedef struct iovec {
15670  caddr_t iov_base;
15671 
15672 
15673 
15674  long iov_len;
15675 
15676 } iovec_t;
15677 # 90 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
15678 /*
15679  * Segment flag values.
15680  */
15681 typedef enum uio_seg { UIO_USERSPACE, UIO_SYSSPACE, UIO_USERISPACE } uio_seg_t;
15682 
15683 typedef struct uio {
15684  iovec_t *uio_iov; /* pointer to array of iovecs */
15685  int uio_iovcnt; /* number of iovecs */
15686  lloff_t _uio_offset; /* file offset */
15687  uio_seg_t uio_segflg; /* address space (kernel or user) */
15688  uint16_t uio_fmode; /* file mode flags */
15689  uint16_t uio_extflg; /* extended flags */
15690  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
15691  ssize_t uio_resid; /* residual count */
15692 } uio_t;
15693 
15694 /*
15695  * Extended uio_t uioa_t used for asynchronous uio.
15696  *
15697  * Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
15698  *	 as there isn't a formal definition of IOV_MAX for the kernel.
15699  */
15700 
15701 
15702 typedef struct uioa_page_s { /* locked uio_iov state */
15703  int uioa_pfncnt; /* count of pfn_t(s) in *uioa_ppp */
15704  void **uioa_ppp; /* page_t or pfn_t arrary */
15705  caddr_t uioa_base; /* address base */
15706  size_t uioa_len; /* span length */
15707 } uioa_page_t;
15708 
15709 typedef struct uioa_s {
15710  iovec_t *uio_iov; /* pointer to array of iovecs */
15711  int uio_iovcnt; /* number of iovecs */
15712  lloff_t _uio_offset; /* file offset */
15713  uio_seg_t uio_segflg; /* address space (kernel or user) */
15714  uint16_t uio_fmode; /* file mode flags */
15715  uint16_t uio_extflg; /* extended flags */
15716  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
15717  ssize_t uio_resid; /* residual count */
15718  /*
15719 	 * uioa extended members.
15720 	 */
15721  uint32_t uioa_state; /* state of asynch i/o */
15722  ssize_t uioa_mbytes; /* bytes that have been uioamove()ed */
15723  uioa_page_t *uioa_lcur; /* pointer into uioa_locked[] */
15724  void **uioa_lppp; /* pointer into lcur->uioa_ppp[] */
15725  void *uioa_hwst[4]; /* opaque hardware state */
15726  uioa_page_t uioa_locked[16]; /* Per iov locked pages */
15727 } uioa_t;
15728 
15729 /*
15730  * uio extensions
15731  *
15732  * PSARC 2009/478: Copy Reduction Interfaces
15733  */
15734 typedef enum xuio_type {
15735  UIOTYPE_ASYNCIO,
15736  UIOTYPE_ZEROCOPY
15737 } xuio_type_t;
15738 
15739 typedef struct xuio {
15740  uio_t xu_uio; /* Embedded UIO structure */
15741 
15742  /* Extended uio fields */
15743  enum xuio_type xu_type; /* What kind of uio structure? */
15744  union {
15745   /* Async I/O Support, intend to replace uioa_t. */
15746   struct {
15747    uint32_t xu_a_state; /* state of async i/o */
15748    /* bytes that have been uioamove()ed */
15749    ssize_t xu_a_mbytes;
15750    uioa_page_t *xu_a_lcur; /* pointer into uioa_locked[] */
15751    /* pointer into lcur->uioa_ppp[] */
15752    void **xu_a_lppp;
15753    void *xu_a_hwst[4]; /* opaque hardware state */
15754    /* Per iov locked pages */
15755    uioa_page_t xu_a_locked[16];
15756   } xu_aio;
15757 
15758   /*
15759 		 * Copy Reduction Support -- facilate loaning / returning of
15760 		 * filesystem cache buffers.
15761 		 */
15762   struct {
15763    int xu_zc_rw; /* read or write buffer */
15764    void *xu_zc_priv; /* fs specific */
15765   } xu_zc;
15766  } xu_ext;
15767 } xuio_t;
15768 # 207 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
15769 /*
15770  * I/O direction.
15771  */
15772 typedef enum uio_rw { UIO_READ, UIO_WRITE } uio_rw_t;
15773 
15774 /*
15775  * uio_extflg: extended flags
15776  *
15777  * NOTE: This flag will be used in uiomove to determine if non-temporal
15778  * access, ie, access bypassing caches, should be used.  Filesystems that
15779  * don't initialize this field could experience suboptimal performance due to
15780  * the random data the field contains.
15781  *
15782  * NOTE: This flag is also used by uioasync callers to pass an extended
15783  * uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
15784  * consumers of a uioa_t require the uio_extflg to be initialized.
15785  */
15786 
15787 
15788 
15789 
15790 
15791 
15792 /*
15793  * Global uioasync capability shadow state.
15794  */
15795 typedef struct uioasync_s {
15796  boolean_t enabled; /* Is uioasync enabled? */
15797  size_t mincnt; /* Minimum byte count for use of */
15798 } uioasync_t;
15799 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
15800 extern ssize_t readv(int, const struct iovec *, int);
15801 extern ssize_t writev(int, const struct iovec *, int);
15802 
15803 /*
15804  * When in the large file compilation environment,
15805  * map preadv/pwritev to their 64 bit offset versions
15806  */
15807 
15808 
15809 
15810 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
15811 #pragma redefine_extname preadv preadv64
15812 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
15813 
15814 
15815 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
15816 #pragma redefine_extname pwritev pwritev64
15817 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
15818 
15819 
15820 
15821 
15822 
15823 
15824 
15825 /* In the LP64 compilation environment, the APIs are already large file */
15826 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
15827 extern ssize_t preadv(int, const struct iovec *, int, off_t);
15828 extern ssize_t pwritev(int, const struct iovec *, int, off_t);
15829 
15830 /*
15831  * preadv64 and pwritev64 should be defined when:
15832  * - Using the transitional compilation environment, and not
15833  *     the large file compilation environment.
15834  */
15835 
15836 
15837 extern ssize_t preadv64(int, const struct iovec *, int, off64_t);
15838 extern ssize_t pwritev64(int, const struct iovec *, int, off64_t);
15839 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
15840 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
15841 /*
15842  * CDDL HEADER START
15843  *
15844  * The contents of this file are subject to the terms of the
15845  * Common Development and Distribution License (the "License").
15846  * You may not use this file except in compliance with the License.
15847  *
15848  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15849  * or http://www.opensolaris.org/os/licensing.
15850  * See the License for the specific language governing permissions
15851  * and limitations under the License.
15852  *
15853  * When distributing Covered Code, include this CDDL HEADER in each
15854  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15855  * If applicable, add the following below this CDDL HEADER, with the
15856  * fields enclosed by brackets "[]" replaced with your own identifying
15857  * information: Portions Copyright [yyyy] [name of copyright owner]
15858  *
15859  * CDDL HEADER END
15860  */
15861 
15862 /*
15863  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
15864  * Copyright 2016 Joyent, Inc.
15865  *
15866  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
15867  * Use is subject to license terms.
15868  */
15869 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
15870 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
15871 /*
15872  * CDDL HEADER START
15873  *
15874  * The contents of this file are subject to the terms of the
15875  * Common Development and Distribution License (the "License").
15876  * You may not use this file except in compliance with the License.
15877  *
15878  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15879  * or http://www.opensolaris.org/os/licensing.
15880  * See the License for the specific language governing permissions
15881  * and limitations under the License.
15882  *
15883  * When distributing Covered Code, include this CDDL HEADER in each
15884  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15885  * If applicable, add the following below this CDDL HEADER, with the
15886  * fields enclosed by brackets "[]" replaced with your own identifying
15887  * information: Portions Copyright [yyyy] [name of copyright owner]
15888  *
15889  * CDDL HEADER END
15890  */
15891 /*
15892  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
15893  * Use is subject to license terms.
15894  */
15895 
15896 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
15897 /*	  All Rights Reserved	*/
15898 
15899 /*
15900  * Portions of this source code were derived from Berkeley 4.3 BSD
15901  * under license from the Regents of the University of California.
15902  */
15903 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
15904 
15905 
15906 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h" 1
15907 /*
15908  * CDDL HEADER START
15909  *
15910  * The contents of this file are subject to the terms of the
15911  * Common Development and Distribution License, Version 1.0 only
15912  * (the "License").  You may not use this file except in compliance
15913  * with the License.
15914  *
15915  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15916  * or http://www.opensolaris.org/os/licensing.
15917  * See the License for the specific language governing permissions
15918  * and limitations under the License.
15919  *
15920  * When distributing Covered Code, include this CDDL HEADER in each
15921  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15922  * If applicable, add the following below this CDDL HEADER, with the
15923  * fields enclosed by brackets "[]" replaced with your own identifying
15924  * information: Portions Copyright [yyyy] [name of copyright owner]
15925  *
15926  * CDDL HEADER END
15927  */
15928 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
15929 /*	  All Rights Reserved  	*/
15930 
15931 
15932 /*
15933  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
15934  *
15935  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
15936  * Use is subject to license terms.
15937  */
15938 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
15939 struct netconfig {
15940  char *nc_netid; /* network identifier		*/
15941  unsigned int nc_semantics; /* defined below		*/
15942  unsigned int nc_flag; /* defined below		*/
15943  char *nc_protofmly; /* protocol family name		*/
15944  char *nc_proto; /* protocol name		*/
15945  char *nc_device; /* device name for network id	*/
15946  unsigned int nc_nlookups; /* # of entries in nc_lookups	*/
15947  char **nc_lookups; /* list of lookup directories	*/
15948  unsigned int nc_unused[8]; /* borrowed for lockd etc.	*/
15949 };
15950 
15951 typedef struct {
15952  struct netconfig **nc_head;
15953  struct netconfig **nc_curr;
15954 } NCONF_HANDLE;
15955 
15956 /*
15957  *	Values of nc_semantics
15958  */
15959 
15960 
15961 
15962 
15963 
15964 /*
15965  * NOT FOR PUBLIC USE, Solaris internal only.
15966  * This value of nc_semantics is strictly for use of Remote Direct
15967  * Memory Access provider interfaces in Solaris only and not for
15968  * general use. Do not use this value for general purpose user or
15969  * kernel programming. If used the behavior is undefined.
15970  * This is a PRIVATE interface to be used by Solaris kRPC only.
15971  */
15972 
15973 
15974 /*
15975  *	Values of nc_flag
15976  */
15977 
15978 
15979 
15980 
15981 
15982 /*
15983  *	Values of nc_protofmly
15984  */
15985 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
15986 /*
15987  * NOT FOR PUBLIC USE, Solaris internal only.
15988  * This value of nc_semantics is strictly for use of Remote Direct
15989  * Memory Access provider interfaces in Solaris only and not for
15990  * general use. Do not use this value for general purpose user or
15991  * kernel programming. If used the behavior is undefined.
15992  * This is a PRIVATE interface to be used by Solaris kRPC only.
15993  */
15994 
15995 
15996 /*
15997  *	Values for nc_proto
15998  */
15999 
16000 
16001 
16002 
16003 
16004 
16005 /*
16006  * 	Values for nc_proto for "rdma" protofmly
16007  */
16008 
16009 
16010 
16011 
16012 extern void *setnetconfig(void);
16013 extern int endnetconfig(void *);
16014 extern struct netconfig *getnetconfig(void *);
16015 extern struct netconfig *getnetconfigent(const char *);
16016 extern void freenetconfigent(struct netconfig *);
16017 extern void *setnetpath(void);
16018 extern int endnetpath(void *);
16019 extern struct netconfig *getnetpath(void *);
16020 extern void nc_perror(const char *);
16021 extern char *nc_sperror(void);
16022 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
16023 
16024 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
16025 /*
16026  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
16027  * Use is subject to license terms.
16028  *
16029  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
16030  */
16031 /*
16032  * Copyright (c) 1982, 1986 Regents of the University of California.
16033  * All rights reserved.
16034  *
16035  * Redistribution and use in source and binary forms are permitted
16036  * provided that this notice is preserved and that due credit is given
16037  * to the University of California at Berkeley. The name of the University
16038  * may not be used to endorse or promote products derived from this
16039  * software without specific prior written permission. This software
16040  * is provided ``as is'' without express or implied warranty.
16041  */
16042 
16043 /*
16044  * Constants and structures defined by the internet system,
16045  * according to following documents
16046  *
16047  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
16048  *	http://www.iana.org/assignments/protocol-numbers
16049  *	http://www.iana.org/assignments/port-numbers
16050  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
16051  *
16052  */
16053 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
16054 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
16055 /*
16056  * Definitions related to sockets: types, address families, options.
16057  */
16058 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
16059 /*
16060  * Types
16061  */
16062 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
16063 /*
16064  * Flags for socket() and accept4()
16065  */
16066 
16067 
16068 
16069 
16070 /*
16071  * Option flags per-socket.
16072  */
16073 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
16074 /*
16075  * Socket options are passed using a signed integer, but it is also rare
16076  * for more than one to ever be passed at the same time with setsockopt
16077  * and only one at a time can be retrieved with getsockopt.
16078  *
16079  * Since the lower numbers cannot be renumbered for compatibility reasons,
16080  * it would seem that we need to start a new number space (0x40000000 -
16081  * 0x7fffffff) for those that don't need to be stored as a bit flag
16082  * somewhere. This limits the flag options to 30 but that seems to be
16083  * plenty, anyway. 0x40000000 is reserved for future use.
16084  */
16085 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
16086 /*
16087  * N.B.: The following definition is present only for compatibility
16088  * with release 3.0.  It will disappear in later releases.
16089  */
16090 
16091 
16092 /*
16093  * Additional options, not kept in so_options.
16094  */
16095 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
16096 /* "Socket"-level control message types: */
16097 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
16098 /*
16099  * Socket filter options
16100  */
16101 
16102 
16103 
16104 
16105 
16106 /*
16107  * Structure returned by FIL_LIST
16108  */
16109 struct fil_info {
16110  int fi_flags; /* see below (FILF_*) */
16111  int fi_pos; /* position (0 is bottom) */
16112  char fi_name[32]; /* filter name */
16113 };
16114 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
16115 /*
16116  * Structure used for manipulating linger option.
16117  */
16118 struct linger {
16119  int l_onoff; /* option on/off */
16120  int l_linger; /* linger time */
16121 };
16122 
16123 /*
16124  * Levels for (get/set)sockopt() that don't apply to a specific protocol.
16125  */
16126 
16127 
16128 
16129 
16130 
16131 
16132 
16133 /*
16134  * Address families.
16135  *
16136  * Some of these constant names are copied for the DTrace IP provider in
16137  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
16138  * in sync.
16139  */
16140 # 300 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
16141 /*
16142  * Protocol families, same as address families for now.
16143  */
16144 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
16145 /*
16146  * Maximum queue length specifiable by listen.
16147  */
16148 
16149 
16150 /*
16151  * Message header for recvmsg and sendmsg calls.
16152  */
16153 struct msghdr {
16154  void *msg_name; /* optional address */
16155  socklen_t msg_namelen; /* size of address */
16156  struct iovec *msg_iov; /* scatter/gather array */
16157  int msg_iovlen; /* # elements in msg_iov */
16158 
16159 
16160 
16161 
16162 
16163 
16164  caddr_t msg_accrights; /* access rights sent/received */
16165  int msg_accrightslen;
16166 
16167 };
16168 # 412 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
16169 /* Added for XPGv2 compliance */
16170 
16171 
16172 
16173 
16174 
16175      /* with left over data */
16176 /* End of XPGv2 compliance */
16177 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
16178 /* Added for XPGv2 compliance */
16179 
16180 
16181 
16182 
16183 struct cmsghdr {
16184  socklen_t cmsg_len; /* data byte count, including hdr */
16185  int cmsg_level; /* originating protocol */
16186  int cmsg_type; /* protocol-specific type */
16187 };
16188 # 528 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
16189 extern int accept(int, struct sockaddr *, Psocklen_t);
16190 extern int accept4(int, struct sockaddr *, Psocklen_t, int);
16191 extern int bind(int, const struct sockaddr *, socklen_t);
16192 extern int connect(int, const struct sockaddr *, socklen_t);
16193 extern int getpeername(int, struct sockaddr *, Psocklen_t);
16194 extern int getsockname(int, struct sockaddr *, Psocklen_t);
16195 extern int getsockopt(int, int, int, void *, Psocklen_t);
16196 extern int listen(int, int); /* XXX - fixme???  where do I go */
16197 extern int socketpair(int, int, int, int *);
16198 extern ssize_t recv(int, void *, size_t, int);
16199 extern ssize_t recvfrom(int, void *, size_t, int,
16200  struct sockaddr *, Psocklen_t);
16201 extern ssize_t recvmsg(int, struct msghdr *, int);
16202 extern ssize_t send(int, const void *, size_t, int);
16203 extern ssize_t sendmsg(int, const struct msghdr *, int);
16204 extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
16205  socklen_t);
16206 extern int setsockopt(int, int, int, const void *, socklen_t);
16207 extern int shutdown(int, int);
16208 extern int socket(int, int, int);
16209 
16210 
16211 extern int sockatmark(int);
16212 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
16213 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h" 1
16214 /*
16215  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
16216  */
16217 
16218 /*
16219  * Copyright (c) 1982, 1986 Regents of the University of California.
16220  * All rights reserved.  The Berkeley software License Agreement
16221  * specifies the terms and conditions for redistribution.
16222  */
16223 
16224 
16225 
16226 
16227 /* if.h 1.26 90/05/29 SMI; from UCB 7.1 6/4/86		*/
16228 
16229 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
16230 /*
16231  * CDDL HEADER START
16232  *
16233  * The contents of this file are subject to the terms of the
16234  * Common Development and Distribution License (the "License").
16235  * You may not use this file except in compliance with the License.
16236  *
16237  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
16238  * or http://www.opensolaris.org/os/licensing.
16239  * See the License for the specific language governing permissions
16240  * and limitations under the License.
16241  *
16242  * When distributing Covered Code, include this CDDL HEADER in each
16243  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16244  * If applicable, add the following below this CDDL HEADER, with the
16245  * fields enclosed by brackets "[]" replaced with your own identifying
16246  * information: Portions Copyright [yyyy] [name of copyright owner]
16247  *
16248  * CDDL HEADER END
16249  */
16250 
16251 /*
16252  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
16253  * Copyright 2016 Joyent, Inc.
16254  *
16255  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
16256  * Use is subject to license terms.
16257  */
16258 # 17 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h" 2
16259 
16260 
16261 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 1
16262 /*
16263  * CDDL HEADER START
16264  *
16265  * The contents of this file are subject to the terms of the
16266  * Common Development and Distribution License (the "License").
16267  * You may not use this file except in compliance with the License.
16268  *
16269  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
16270  * or http://www.opensolaris.org/os/licensing.
16271  * See the License for the specific language governing permissions
16272  * and limitations under the License.
16273  *
16274  * When distributing Covered Code, include this CDDL HEADER in each
16275  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16276  * If applicable, add the following below this CDDL HEADER, with the
16277  * fields enclosed by brackets "[]" replaced with your own identifying
16278  * information: Portions Copyright [yyyy] [name of copyright owner]
16279  *
16280  * CDDL HEADER END
16281  */
16282 /*
16283  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
16284  *
16285  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
16286  */
16287 
16288 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
16289 /*	  All Rights Reserved	*/
16290 
16291 /*
16292  * University Copyright- Copyright (c) 1982, 1986, 1988
16293  * The Regents of the University of California
16294  * All Rights Reserved
16295  *
16296  * University Acknowledgment- Portions of this document are derived from
16297  * software developed by the University of California, Berkeley, and its
16298  * contributors.
16299  */
16300 
16301 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
16302 # 20 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h" 2
16303 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
16304 /*
16305  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
16306  * Use is subject to license terms.
16307  *
16308  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
16309  */
16310 /*
16311  * Copyright (c) 1982, 1986 Regents of the University of California.
16312  * All rights reserved.
16313  *
16314  * Redistribution and use in source and binary forms are permitted
16315  * provided that this notice is preserved and that due credit is given
16316  * to the University of California at Berkeley. The name of the University
16317  * may not be used to endorse or promote products derived from this
16318  * software without specific prior written permission. This software
16319  * is provided ``as is'' without express or implied warranty.
16320  */
16321 
16322 /*
16323  * Constants and structures defined by the internet system,
16324  * according to following documents
16325  *
16326  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
16327  *	http://www.iana.org/assignments/protocol-numbers
16328  *	http://www.iana.org/assignments/port-numbers
16329  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
16330  *
16331  */
16332 # 21 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h" 2
16333 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
16334 /*
16335  * Structures defining a network interface, providing a packet
16336  * transport mechanism (ala level 0 of the PUP protocols).
16337  *
16338  * Each interface accepts output datagrams of a specified maximum
16339  * length, and provides higher level routines with input datagrams
16340  * received from its medium.
16341  *
16342  * Output occurs when the routine if_output is called, with three parameters:
16343  *	(*ifp->if_output)(ifp, m, dst)
16344  * Here m is the mbuf chain to be sent and dst is the destination address.
16345  * The output routine encapsulates the supplied datagram if necessary,
16346  * and then transmits it on its medium.
16347  *
16348  * On input, each interface unwraps the data received by it, and either
16349  * places it on the input queue of a internetwork datagram routine
16350  * and posts the associated software interrupt, or passes the datagram to a raw
16351  * packet input routine.
16352  *
16353  * Routines exist for locating interfaces by their addresses
16354  * or for locating a interface on a certain network, as well as more general
16355  * routing and gateway routines maintaining information used to locate
16356  * interfaces.  These routines live in the files if.c and route.c
16357  */
16358 
16359 
16360 
16361 /*
16362  * Structure defining a queue for a network interface.
16363  *
16364  * (Would like to call this struct ``if'', but C isn't PL/1.)
16365  */
16366 struct ifnet {
16367  char *if_name; /* name, e.g. ``en'' or ``lo'' */
16368  short if_unit; /* sub-unit for lower level driver */
16369  short if_mtu; /* maximum transmission unit */
16370  short if_flags; /* up/down, broadcast, etc. */
16371  short if_timer; /* time 'til if_watchdog called */
16372  ushort_t if_promisc; /* net # of requests for promisc mode */
16373  int if_metric; /* routing metric (external only) */
16374  struct ifaddr *if_addrlist; /* linked list of addresses per if */
16375  struct ifqueue {
16376   struct mbuf *ifq_head;
16377   struct mbuf *ifq_tail;
16378   int ifq_len;
16379   int ifq_maxlen;
16380   int ifq_drops;
16381  } if_snd; /* output queue */
16382 /* procedure handles */
16383  int (*if_init)(); /* init routine */
16384  int (*if_output)(); /* output routine */
16385  int (*if_ioctl)(); /* ioctl routine */
16386  int (*if_reset)(); /* bus reset routine */
16387  int (*if_watchdog)(); /* timer routine */
16388 /* generic interface statistics */
16389  int if_ipackets; /* packets received on interface */
16390  int if_ierrors; /* input errors on interface */
16391  int if_opackets; /* packets sent on interface */
16392  int if_oerrors; /* output errors on interface */
16393  int if_collisions; /* collisions on csma interfaces */
16394 /* end statistics */
16395  struct ifnet *if_next;
16396  struct ifnet *if_upper; /* next layer up */
16397  struct ifnet *if_lower; /* next layer down */
16398  int (*if_input)(); /* input routine */
16399  int (*if_ctlin)(); /* control input routine */
16400  int (*if_ctlout)(); /* control output routine */
16401  struct map *if_memmap; /* rmap for interface specific memory */
16402 };
16403 
16404 /*
16405  * NOTE : These flags are not directly used within IP.
16406  * ip_if.h has definitions derived from this which is used within IP.
16407  * If you define a flag here, you need to define one in ip_if.h before
16408  * using the new flag in IP. Don't use these flags directly in IP.
16409  */
16410 # 119 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
16411 /*
16412  * The IFF_MULTICAST flag indicates that the network can support the
16413  * transmission and reception of higher-level (e.g., IP) multicast packets.
16414  * It is independent of hardware support for multicasting; for example,
16415  * point-to-point links or pure broadcast networks may well support
16416  * higher-level multicasts.
16417  */
16418 
16419 
16420 
16421 
16422 
16423 
16424 
16425 /*
16426  * The following flags can't be grabbed or altered by SIOC[GS]IFFLAGS.
16427  * Should use SIOC[GS]LIFFLAGS which has a larger flags field.
16428  */
16429 # 157 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
16430 /*
16431  * The IFF_XRESOLV flag is an evolving interface and is subject
16432  * to change without notice.
16433  */
16434 # 175 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
16435 /* flags that cannot be changed by userland on any interface */
16436 
16437 
16438 
16439 
16440 
16441 
16442 
16443 /* flags that cannot be changed by userland on an IPMP interface */
16444 
16445 
16446 /* flags that can never be set on an IPMP interface */
16447 
16448 
16449 
16450 /*
16451  * Output queues (ifp->if_snd) and internetwork datagram level (pup level 1)
16452  * input routines have queues of messages stored on ifqueue structures
16453  * (defined above).  Entries are added to and deleted from these structures
16454  * by these macros, which should be called with ipl raised to splimp().
16455  */
16456 # 215 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
16457 /*
16458  * Packets destined for level-1 protocol input routines
16459  * have a pointer to the receiving interface prepended to the data.
16460  * IF_DEQUEUEIF extracts and returns this pointer when dequeuing the packet.
16461  * IF_ADJ should be used otherwise to adjust for its presence.
16462  */
16463 # 254 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
16464 /*
16465  * The ifaddr structure contains information about one address
16466  * of an interface.  They are maintained by the different address families,
16467  * are allocated and attached when an address is set, and are linked
16468  * together so all addresses for an interface can be located.
16469  */
16470 struct ifaddr {
16471  struct sockaddr ifa_addr; /* address of interface */
16472  union {
16473   struct sockaddr ifu_broadaddr;
16474   struct sockaddr ifu_dstaddr;
16475  } ifa_ifu;
16476 
16477 
16478  struct ifnet *ifa_ifp; /* back-pointer to interface */
16479  struct ifaddr *ifa_next; /* next address for interface */
16480 };
16481 
16482 /*
16483  * For SIOCLIF*ND ioctls.
16484  *
16485  * The lnr_state_* fields use the ND_* neighbor reachability states.
16486  * The 3 different fields are for use with SIOCLIFSETND to cover the cases
16487  * when
16488  *	A new entry is created
16489  *	The entry already exists and the link-layer address is the same
16490  *	The entry already exists and the link-layer address differs
16491  *
16492  * Use ND_UNCHANGED to not change any state.
16493  */
16494 
16495 typedef struct lif_nd_req {
16496  struct sockaddr_storage lnr_addr;
16497  uint8_t lnr_state_create; /* When creating */
16498  uint8_t lnr_state_same_lla; /* Update same addr */
16499  uint8_t lnr_state_diff_lla; /* Update w/ diff. */
16500  int lnr_hdw_len;
16501  int lnr_flags; /* See below */
16502  /* padding because ia32 "long long"s are only 4-byte aligned. */
16503  int lnr_pad0;
16504  char lnr_hdw_addr[64];
16505 } lif_nd_req_t;
16506 
16507 /*
16508  * Neighbor reachability states
16509  * Used with SIOCLIF*ND ioctls.
16510  */
16511 # 313 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
16512 /*
16513  * lnr_flags value of lif_nd_req.
16514  * Used with SIOCLIF*ND ioctls.
16515  */
16516 
16517 
16518 
16519 
16520 
16521 
16522 /*
16523  * the NDF_STATIC entry ensures that an NCE will not be deleted, and is
16524  * used by non-ON applications like IPv6 test suites.
16525  */
16526 
16527 
16528 /* For SIOC[GS]LIFLNKINFO */
16529 typedef struct lif_ifinfo_req {
16530  uint8_t lir_maxhops;
16531  uint32_t lir_reachtime; /* Reachable time in msec */
16532  uint32_t lir_reachretrans; /* Retransmission timer msec */
16533  uint32_t lir_maxmtu;
16534 } lif_ifinfo_req_t;
16535 
16536 
16537 
16538 /*
16539  * Maximum lengths of interface name and IPMP group name; these are the same
16540  * for historical reasons.  Note that the actual maximum length of a name is
16541  * one byte less than these constants since the kernel always sets the final
16542  * byte of lifr_name and lifr_groupname to NUL.
16543  */
16544 
16545 
16546 
16547 
16548 
16549 
16550 
16551 /*
16552  * Interface request structure used for socket
16553  * ioctl's.  All interface ioctl's must have parameter
16554  * definitions which begin with ifr_name.  The
16555  * remainder may be interface specific.
16556  * Note: This data structure uses 64bit type uint64_t which is not
16557  *	 a valid type for strict ANSI/ISO C compilation for ILP32.
16558  *	 Applications with ioctls using this structure that insist on
16559  *	 building with strict ANSI/ISO C (-Xc) will need to be LP64.
16560  */
16561 
16562 struct lifreq {
16563  char lifr_name[32]; /* if name, e.g. "en0" */
16564  union {
16565   int lifru_addrlen; /* for subnet/token etc */
16566   uint_t lifru_ppa; /* SIOCSLIFNAME */
16567  } lifr_lifru1;
16568 
16569 
16570  uint_t lifr_type; /* IFT_ETHER, ... */
16571  union {
16572   struct sockaddr_storage lifru_addr;
16573   struct sockaddr_storage lifru_dstaddr;
16574   struct sockaddr_storage lifru_broadaddr;
16575   struct sockaddr_storage lifru_token; /* With lifr_addrlen */
16576   struct sockaddr_storage lifru_subnet; /* With lifr_addrlen */
16577   int lifru_index; /* interface index */
16578   uint64_t lifru_flags; /* Flags for SIOC?LIFFLAGS */
16579   int lifru_metric;
16580   uint_t lifru_mtu;
16581   int lif_muxid[2]; /* mux id's for arp and ip */
16582   struct lif_nd_req lifru_nd_req; /* SIOCLIF*ND */
16583   struct lif_ifinfo_req lifru_ifinfo_req;
16584   char lifru_groupname[32]; /* SIOC[GS]LIFGROUPNAME */
16585   char lifru_binding[32]; /* SIOCGLIFBINDING */
16586   zoneid_t lifru_zoneid; /* SIOC[GS]LIFZONE */
16587   uint_t lifru_dadstate; /* SIOCGLIFDADSTATE */
16588  } lifr_lifru;
16589 # 408 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
16590 };
16591 
16592 
16593 /*
16594  * Argument structure for SIOCT* address testing ioctls.
16595  */
16596 struct sioc_addrreq {
16597  struct sockaddr_storage sa_addr; /* Address to test */
16598  int sa_res; /* Result - 0/1 */
16599  int sa_pad;
16600 };
16601 
16602 /*
16603  * Argument structure used by mrouted to get src-grp pkt counts using
16604  * SIOCGETLSGCNT. See <netinet/ip_mroute.h>.
16605  */
16606 struct sioc_lsg_req {
16607  struct sockaddr_storage slr_src;
16608  struct sockaddr_storage slr_grp;
16609  uint_t slr_pktcnt;
16610  uint_t slr_bytecnt;
16611  uint_t slr_wrong_if;
16612  uint_t slr_pad;
16613 };
16614 
16615 /* Argument structure for SIOCGLIFDADSTATE ioctl */
16616 typedef enum {
16617  DAD_IN_PROGRESS = 0x1,
16618  DAD_DONE = 0x2
16619 } glif_dad_state_t;
16620 
16621 /*
16622  * OBSOLETE: Replaced by struct lifreq. Supported for compatibility.
16623  *
16624  * Interface request structure used for socket
16625  * ioctl's.  All interface ioctl's must have parameter
16626  * definitions which begin with ifr_name.  The
16627  * remainder may be interface specific.
16628  */
16629 struct ifreq {
16630 
16631  char ifr_name[16]; /* if name, e.g. "en0" */
16632  union {
16633   struct sockaddr ifru_addr;
16634   struct sockaddr ifru_dstaddr;
16635   char ifru_oname[16]; /* other if name */
16636   struct sockaddr ifru_broadaddr;
16637   int ifru_index; /* interface index */
16638   uint_t ifru_mtu;
16639   short ifru_flags;
16640   int ifru_metric;
16641   char ifru_data[1]; /* interface dependent data */
16642   char ifru_enaddr[6];
16643   int if_muxid[2]; /* mux id's for arp and ip */
16644 
16645   /* Struct for flags/ppa */
16646   struct ifr_ppaflags {
16647    short ifrup_flags; /* Space of ifru_flags. */
16648    short ifrup_filler;
16649    uint_t ifrup_ppa;
16650   } ifru_ppaflags;
16651 
16652   /* Struct for FDDI ioctl's */
16653   struct ifr_dnld_reqs {
16654    uint32_t v_addr;
16655    uint32_t m_addr;
16656    uint32_t ex_addr;
16657    uint32_t size;
16658   } ifru_dnld_req;
16659 
16660   /* Struct for FDDI stats */
16661   struct ifr_fddi_stats {
16662    uint32_t stat_size;
16663    uint32_t fddi_stats;
16664   } ifru_fddi_stat;
16665 
16666   struct ifr_netmapents {
16667    uint32_t map_ent_size, /* size of netmap structure */
16668     entry_number; /* index into netmap list */
16669    uint32_t fddi_map_ent; /* pointer to user structure */
16670   } ifru_netmapent;
16671 
16672   /* Field for generic ioctl for fddi */
16673 
16674   struct ifr_fddi_gen_struct {
16675    uint32_t ifru_fddi_gioctl; /* field for gen ioctl */
16676    uint32_t ifru_fddi_gaddr; /* Generic ptr to a field */
16677   } ifru_fddi_gstruct;
16678 
16679  } ifr_ifru;
16680 # 509 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
16681 /* For setting ppa */
16682 
16683 
16684 /* FDDI specific */
16685 
16686 
16687 
16688 
16689 
16690 
16691 
16692 };
16693 
16694 /* Used by SIOCGLIFNUM. Uses same flags as in struct lifconf */
16695 struct lifnum {
16696  sa_family_t lifn_family;
16697  int lifn_flags; /* request specific interfaces */
16698  int lifn_count; /* Result */
16699 };
16700 
16701 /*
16702  * Structure used in SIOCGLIFCONF request.
16703  * Used to retrieve interface configuration
16704  * for machine (useful for programs which
16705  * must know all networks accessible) for a given address family.
16706  * Using AF_UNSPEC will retrieve all address families.
16707  */
16708 struct lifconf {
16709  sa_family_t lifc_family;
16710  int lifc_flags; /* request specific interfaces */
16711  int lifc_len; /* size of associated buffer */
16712  union {
16713   caddr_t lifcu_buf;
16714   struct lifreq *lifcu_req;
16715  } lifc_lifcu;
16716 
16717 
16718 };
16719 
16720 /*
16721  * Structure used in SIOCGLIFSRCOF to get the interface
16722  * configuration list for those interfaces that use an address
16723  * hosted on the interface (set in lifs_ifindex), as the source
16724  * address.
16725  */
16726 struct lifsrcof {
16727  uint_t lifs_ifindex; /* interface of interest */
16728  size_t lifs_maxlen; /* size of buffer: input */
16729  size_t lifs_len; /* size of buffer: output */
16730  union {
16731   caddr_t lifsu_buf;
16732   struct lifreq *lifsu_req;
16733  } lifs_lifsu;
16734 
16735 
16736 };
16737 
16738 /* Flags */
16739 
16740 
16741      /* be used to communicate outside the */
16742      /* node (exclude interfaces which are */
16743      /* IFF_NOXMIT, IFF_NOLOCAL, */
16744      /* IFF_LOOPBACK, IFF_DEPRECATED, or */
16745      /* not IFF_UP). Has priority over */
16746      /* LIFC_NOXMIT. */
16747 
16748 
16749      /* (must be issued from global zone) */
16750 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
16751 /*
16752  * IPMP group information, for use with SIOCGLIFGROUPINFO.
16753  */
16754 typedef struct lifgroupinfo {
16755  char gi_grname[32]; /* group name (set by caller) */
16756  char gi_grifname[32]; /* IPMP meta-interface name */
16757  char gi_m4ifname[32]; /* v4 mcast interface name */
16758  char gi_m6ifname[32]; /* v6 mcast interface name */
16759  char gi_bcifname[32]; /* v4 bcast interface name */
16760  boolean_t gi_v4; /* group is plumbed for v4 */
16761  boolean_t gi_v6; /* group is plumbed for v6 */
16762  uint_t gi_nv4; /* # of underlying v4 if's */
16763  uint_t gi_nv6; /* # of underlying v6 if's */
16764  uint_t gi_mactype; /* DLPI mac type of group */
16765 } lifgroupinfo_t;
16766 
16767 /*
16768  * OBSOLETE: Structure used in SIOCGIFCONF request.
16769  * Used to retrieve interface configuration
16770  * for machine (useful for programs which
16771  * must know all networks accessible).
16772  */
16773 struct ifconf {
16774  int ifc_len; /* size of associated buffer */
16775  union {
16776   caddr_t ifcu_buf;
16777   struct ifreq *ifcu_req;
16778  } ifc_ifcu;
16779 
16780 
16781 };
16782 # 649 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if.h"
16783 typedef struct if_data {
16784     /* generic interface information */
16785  uchar_t ifi_type; /* ethernet, tokenring, etc */
16786  uchar_t ifi_addrlen; /* media address length */
16787  uchar_t ifi_hdrlen; /* media header length */
16788  uint_t ifi_mtu; /* maximum transmission unit */
16789  uint_t ifi_metric; /* routing metric (external only) */
16790  uint_t ifi_baudrate; /* linespeed */
16791     /* volatile statistics */
16792  uint_t ifi_ipackets; /* packets received on interface */
16793  uint_t ifi_ierrors; /* input errors on interface */
16794  uint_t ifi_opackets; /* packets sent on interface */
16795  uint_t ifi_oerrors; /* output errors on interface */
16796  uint_t ifi_collisions; /* collisions on csma interfaces */
16797  uint_t ifi_ibytes; /* total number of octets received */
16798  uint_t ifi_obytes; /* total number of octets sent */
16799  uint_t ifi_imcasts; /* packets received via multicast */
16800  uint_t ifi_omcasts; /* packets sent via multicast */
16801  uint_t ifi_iqdrops; /* dropped on input, this interface */
16802  uint_t ifi_noproto; /* destined for unsupported protocol */
16803 
16804 
16805 
16806  struct timeval ifi_lastchange; /* last updated */
16807 
16808 } if_data_t;
16809 
16810 /*
16811  * Message format for use in obtaining information about interfaces
16812  * from the routing socket
16813  */
16814 typedef struct if_msghdr {
16815  ushort_t ifm_msglen; /* to skip over non-understood messages */
16816  uchar_t ifm_version; /* future binary compatibility */
16817  uchar_t ifm_type; /* message type */
16818  int ifm_addrs; /* like rtm_addrs */
16819  int ifm_flags; /* value of if_flags */
16820  ushort_t ifm_index; /* index for associated ifp */
16821  struct if_data ifm_data; /* statistics and other data about if */
16822 } if_msghdr_t;
16823 
16824 /*
16825  * Message format for use in obtaining information about interface addresses
16826  * from the routing socket
16827  */
16828 typedef struct ifa_msghdr {
16829  ushort_t ifam_msglen; /* to skip over non-understood messages */
16830  uchar_t ifam_version; /* future binary compatibility */
16831  uchar_t ifam_type; /* message type */
16832  int ifam_addrs; /* like rtm_addrs */
16833  int ifam_flags; /* route flags */
16834  ushort_t ifam_index; /* index for associated ifp */
16835  int ifam_metric; /* value of ipif_metric */
16836 } ifa_msghdr_t;
16837 
16838 
16839 
16840 /*
16841  * The if_nameindex structure holds the interface index value about
16842  * a single interface. An array of this structure is used to return
16843  * all interfaces and indexes.
16844  */
16845 struct if_nameindex {
16846  unsigned if_index; /* positive interface index */
16847  char *if_name; /* if name, e.g. "en0" */
16848 };
16849 
16850 /* Interface index identification API definitions */
16851 extern unsigned if_nametoindex(const char *);
16852 extern char *if_indextoname(unsigned, char *);
16853 extern struct if_nameindex *if_nameindex(void);
16854 extern void if_freenameindex(struct if_nameindex *);
16855 
16856 
16857 /*
16858  * If changing IF_MAX_INDEX to a value greater than UINT16_MAX, check if
16859  * struct sockaddr_dl needs to be modified as the interface index is placed
16860  * in this structure by the kernel.
16861  */
16862 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
16863 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
16864 /*
16865  * CDDL HEADER START
16866  *
16867  * The contents of this file are subject to the terms of the
16868  * Common Development and Distribution License (the "License").
16869  * You may not use this file except in compliance with the License.
16870  *
16871  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
16872  * or http://www.opensolaris.org/os/licensing.
16873  * See the License for the specific language governing permissions
16874  * and limitations under the License.
16875  *
16876  * When distributing Covered Code, include this CDDL HEADER in each
16877  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16878  * If applicable, add the following below this CDDL HEADER, with the
16879  * fields enclosed by brackets "[]" replaced with your own identifying
16880  * information: Portions Copyright [yyyy] [name of copyright owner]
16881  *
16882  * CDDL HEADER END
16883  */
16884 
16885 /*
16886  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
16887  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
16888  */
16889 
16890 /*	Copyright (c) 1988 AT&T	*/
16891 /*	  All Rights Reserved  	*/
16892 
16893 /*
16894  * User-visible pieces of the ANSI C standard I/O package.
16895  */
16896 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
16897 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/rctl.h" 1
16898 /*
16899  * CDDL HEADER START
16900  *
16901  * The contents of this file are subject to the terms of the
16902  * Common Development and Distribution License, Version 1.0 only
16903  * (the "License").  You may not use this file except in compliance
16904  * with the License.
16905  *
16906  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
16907  * or http://www.opensolaris.org/os/licensing.
16908  * See the License for the specific language governing permissions
16909  * and limitations under the License.
16910  *
16911  * When distributing Covered Code, include this CDDL HEADER in each
16912  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16913  * If applicable, add the following below this CDDL HEADER, with the
16914  * fields enclosed by brackets "[]" replaced with your own identifying
16915  * information: Portions Copyright [yyyy] [name of copyright owner]
16916  *
16917  * CDDL HEADER END
16918  */
16919 /*
16920  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
16921  * Use is subject to license terms.
16922  */
16923 
16924 
16925 
16926 
16927 #pragma ident "%Z%%M%	%I%	%E% SMI"
16928 
16929 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 1
16930 /*
16931  * CDDL HEADER START
16932  *
16933  * The contents of this file are subject to the terms of the
16934  * Common Development and Distribution License (the "License").
16935  * You may not use this file except in compliance with the License.
16936  *
16937  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
16938  * or http://www.opensolaris.org/os/licensing.
16939  * See the License for the specific language governing permissions
16940  * and limitations under the License.
16941  *
16942  * When distributing Covered Code, include this CDDL HEADER in each
16943  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16944  * If applicable, add the following below this CDDL HEADER, with the
16945  * fields enclosed by brackets "[]" replaced with your own identifying
16946  * information: Portions Copyright [yyyy] [name of copyright owner]
16947  *
16948  * CDDL HEADER END
16949  */
16950 /*
16951  * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
16952  */
16953 
16954 
16955 
16956 
16957 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h" 1
16958 /*
16959  * CDDL HEADER START
16960  *
16961  * The contents of this file are subject to the terms of the
16962  * Common Development and Distribution License (the "License").
16963  * You may not use this file except in compliance with the License.
16964  *
16965  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
16966  * or http://www.opensolaris.org/os/licensing.
16967  * See the License for the specific language governing permissions
16968  * and limitations under the License.
16969  *
16970  * When distributing Covered Code, include this CDDL HEADER in each
16971  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16972  * If applicable, add the following below this CDDL HEADER, with the
16973  * fields enclosed by brackets "[]" replaced with your own identifying
16974  * information: Portions Copyright [yyyy] [name of copyright owner]
16975  *
16976  * CDDL HEADER END
16977  */
16978 
16979 /*
16980  * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
16981  * Copyright (c) 2012 by Delphix. All rights reserved.
16982  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
16983  */
16984 
16985 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
16986 /*	  All Rights Reserved	*/
16987 
16988 
16989 
16990 
16991 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
16992 /*
16993  * CDDL HEADER START
16994  *
16995  * The contents of this file are subject to the terms of the
16996  * Common Development and Distribution License (the "License").
16997  * You may not use this file except in compliance with the License.
16998  *
16999  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17000  * or http://www.opensolaris.org/os/licensing.
17001  * See the License for the specific language governing permissions
17002  * and limitations under the License.
17003  *
17004  * When distributing Covered Code, include this CDDL HEADER in each
17005  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17006  * If applicable, add the following below this CDDL HEADER, with the
17007  * fields enclosed by brackets "[]" replaced with your own identifying
17008  * information: Portions Copyright [yyyy] [name of copyright owner]
17009  *
17010  * CDDL HEADER END
17011  */
17012 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
17013 /*	  All Rights Reserved  	*/
17014 
17015 
17016 /*
17017  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17018  * Use is subject to license terms.
17019  *
17020  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
17021  * Copyright 2016 Joyent, Inc.
17022  */
17023 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h" 2
17024 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vmem.h" 1
17025 /*
17026  * CDDL HEADER START
17027  *
17028  * The contents of this file are subject to the terms of the
17029  * Common Development and Distribution License (the "License").
17030  * You may not use this file except in compliance with the License.
17031  *
17032  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17033  * or http://www.opensolaris.org/os/licensing.
17034  * See the License for the specific language governing permissions
17035  * and limitations under the License.
17036  *
17037  * When distributing Covered Code, include this CDDL HEADER in each
17038  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17039  * If applicable, add the following below this CDDL HEADER, with the
17040  * fields enclosed by brackets "[]" replaced with your own identifying
17041  * information: Portions Copyright [yyyy] [name of copyright owner]
17042  *
17043  * CDDL HEADER END
17044  */
17045 /*
17046  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
17047  * Copyright (c) 2012 by Delphix. All rights reserved.
17048  */
17049 
17050 
17051 
17052 
17053 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
17054 /*
17055  * CDDL HEADER START
17056  *
17057  * The contents of this file are subject to the terms of the
17058  * Common Development and Distribution License (the "License").
17059  * You may not use this file except in compliance with the License.
17060  *
17061  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17062  * or http://www.opensolaris.org/os/licensing.
17063  * See the License for the specific language governing permissions
17064  * and limitations under the License.
17065  *
17066  * When distributing Covered Code, include this CDDL HEADER in each
17067  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17068  * If applicable, add the following below this CDDL HEADER, with the
17069  * fields enclosed by brackets "[]" replaced with your own identifying
17070  * information: Portions Copyright [yyyy] [name of copyright owner]
17071  *
17072  * CDDL HEADER END
17073  */
17074 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
17075 /*	  All Rights Reserved  	*/
17076 
17077 
17078 /*
17079  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17080  * Use is subject to license terms.
17081  *
17082  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
17083  * Copyright 2016 Joyent, Inc.
17084  */
17085 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vmem.h" 2
17086 
17087 
17088 
17089 
17090 
17091 
17092 /*
17093  * Per-allocation flags
17094  */
17095 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vmem.h"
17096 /*
17097  * The following flags are restricted for use only within the kernel.
17098  * VM_MEMLOAD is for use by the HAT to avoid infinite recursion.
17099  * VM_NORELOC is used by the kernel when static VA->PA mappings are required.
17100  */
17101 
17102 
17103 /*
17104  * VM_ABORT requests that vmem_alloc() *ignore* the VM_SLEEP/VM_NOSLEEP flags
17105  * and forgo reaping if the allocation or attempted import, fails.  This
17106  * flag is a segkmem-specific flag, and should not be used by anyone else.
17107  */
17108 
17109 
17110 /*
17111  * VM_ENDALLOC requests that large addresses be preferred in allocations.
17112  * Has no effect if VM_NEXTFIT is active.
17113  */
17114 
17115 
17116 
17117 
17118 /*
17119  * Arena creation flags
17120  */
17121 
17122 
17123 
17124 
17125 /*
17126  * internal use only;	the import function uses the vmem_ximport_t interface
17127  *			and may increase the request size if it so desires.
17128  *			VMC_XALIGN, for use with vmem_xcreate, specifies that
17129  *			the address returned by the import function will be
17130  *			aligned according to the alignment argument.
17131  */
17132 
17133 
17134 
17135 
17136 /*
17137  * Public segment types
17138  */
17139 
17140 
17141 
17142 /*
17143  * Implementation-private segment types
17144  */
17145 
17146 
17147 
17148 
17149 /*
17150  * VMEM_REENTRANT indicates to vmem_walk() that the callback routine may
17151  * call back into the arena being walked, so vmem_walk() must drop the
17152  * arena lock before each callback.  The caveat is that since the arena
17153  * isn't locked, its state can change.  Therefore it is up to the callback
17154  * routine to handle cases where the segment isn't of the expected type.
17155  * For example, we use this to walk heap_arena when generating a crash dump;
17156  * see segkmem_dump() for sample usage.
17157  */
17158 
17159 
17160 typedef struct vmem vmem_t;
17161 typedef void *(vmem_alloc_t)(vmem_t *, size_t, int);
17162 typedef void (vmem_free_t)(vmem_t *, void *, size_t);
17163 
17164 /*
17165  * Alternate import style; the requested size is passed in a pointer,
17166  * which can be increased by the import function if desired.
17167  */
17168 typedef void *(vmem_ximport_t)(vmem_t *, size_t *, size_t, int);
17169 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vmem.h"
17170 extern vmem_t *vmem_create(const char *, void *, size_t, size_t,
17171     vmem_alloc_t *, vmem_free_t *, vmem_t *, size_t, int);
17172 extern vmem_t *vmem_xcreate(const char *, void *, size_t, size_t,
17173     vmem_ximport_t *, vmem_free_t *, vmem_t *, size_t, int);
17174 extern void vmem_destroy(vmem_t *);
17175 extern void *vmem_alloc(vmem_t *, size_t, int);
17176 extern void *vmem_xalloc(vmem_t *, size_t, size_t, size_t, size_t,
17177     void *, void *, int);
17178 extern void vmem_free(vmem_t *, void *, size_t);
17179 extern void vmem_xfree(vmem_t *, void *, size_t);
17180 extern void *vmem_add(vmem_t *, void *, size_t, int);
17181 extern int vmem_contains(vmem_t *, void *, size_t);
17182 extern void vmem_walk(vmem_t *, int, void (*)(void *, void *, size_t), void *);
17183 extern size_t vmem_size(vmem_t *, int);
17184 extern void vmem_qcache_reap(vmem_t *vmp);
17185 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h" 2
17186 
17187 
17188 
17189 
17190 
17191 /*
17192  * Kernel memory allocator: DDI interfaces.
17193  * See kmem_alloc(9F) for details.
17194  */
17195 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h"
17196 /*
17197  * Kernel memory allocator: private interfaces.
17198  * These interfaces are still evolving.
17199  * Do not use them in unbundled drivers.
17200  */
17201 
17202 /*
17203  * Flags for kmem_cache_create()
17204  */
17205 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kmem.h"
17206 struct kmem_cache; /* cache structure is opaque to kmem clients */
17207 
17208 typedef struct kmem_cache kmem_cache_t;
17209 
17210 /* Client response to kmem move callback */
17211 typedef enum kmem_cbrc {
17212  KMEM_CBRC_YES,
17213  KMEM_CBRC_NO,
17214  KMEM_CBRC_LATER,
17215  KMEM_CBRC_DONT_NEED,
17216  KMEM_CBRC_DONT_KNOW
17217 } kmem_cbrc_t;
17218 # 29 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 2
17219 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 1
17220 /*
17221  * CDDL HEADER START
17222  *
17223  * The contents of this file are subject to the terms of the
17224  * Common Development and Distribution License (the "License").
17225  * You may not use this file except in compliance with the License.
17226  *
17227  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17228  * or http://www.opensolaris.org/os/licensing.
17229  * See the License for the specific language governing permissions
17230  * and limitations under the License.
17231  *
17232  * When distributing Covered Code, include this CDDL HEADER in each
17233  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17234  * If applicable, add the following below this CDDL HEADER, with the
17235  * fields enclosed by brackets "[]" replaced with your own identifying
17236  * information: Portions Copyright [yyyy] [name of copyright owner]
17237  *
17238  * CDDL HEADER END
17239  */
17240 /*
17241  * Copyright 2014 Garrrett D'Amore <garrett@damore.org>
17242  *
17243  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
17244  * Use is subject to license terms.
17245  */
17246 
17247 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
17248 /*	  All Rights Reserved  	*/
17249 
17250 /*
17251  * University Copyright- Copyright (c) 1982, 1986, 1988
17252  * The Regents of the University of California
17253  * All Rights Reserved
17254  *
17255  * University Acknowledgment- Portions of this document are derived from
17256  * software developed by the University of California, Berkeley, and its
17257  * contributors.
17258  */
17259 
17260 
17261 
17262 
17263 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
17264 /*
17265  * CDDL HEADER START
17266  *
17267  * The contents of this file are subject to the terms of the
17268  * Common Development and Distribution License (the "License").
17269  * You may not use this file except in compliance with the License.
17270  *
17271  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17272  * or http://www.opensolaris.org/os/licensing.
17273  * See the License for the specific language governing permissions
17274  * and limitations under the License.
17275  *
17276  * When distributing Covered Code, include this CDDL HEADER in each
17277  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17278  * If applicable, add the following below this CDDL HEADER, with the
17279  * fields enclosed by brackets "[]" replaced with your own identifying
17280  * information: Portions Copyright [yyyy] [name of copyright owner]
17281  *
17282  * CDDL HEADER END
17283  */
17284 
17285 /*
17286  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
17287  * Copyright 2016 Joyent, Inc.
17288  *
17289  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
17290  * Use is subject to license terms.
17291  */
17292 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
17293 
17294 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
17295 /*
17296  * CDDL HEADER START
17297  *
17298  * The contents of this file are subject to the terms of the
17299  * Common Development and Distribution License (the "License").
17300  * You may not use this file except in compliance with the License.
17301  *
17302  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17303  * or http://www.opensolaris.org/os/licensing.
17304  * See the License for the specific language governing permissions
17305  * and limitations under the License.
17306  *
17307  * When distributing Covered Code, include this CDDL HEADER in each
17308  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17309  * If applicable, add the following below this CDDL HEADER, with the
17310  * fields enclosed by brackets "[]" replaced with your own identifying
17311  * information: Portions Copyright [yyyy] [name of copyright owner]
17312  *
17313  * CDDL HEADER END
17314  */
17315 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
17316 /*	  All Rights Reserved  	*/
17317 
17318 
17319 /*
17320  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17321  * Use is subject to license terms.
17322  *
17323  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
17324  * Copyright 2016 Joyent, Inc.
17325  */
17326 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
17327 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
17328 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
17329 /*	  All Rights Reserved  	*/
17330 
17331 
17332 /*
17333  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
17334  * All rights reserved.  The Berkeley software License Agreement
17335  * specifies the terms and conditions for redistribution.
17336  */
17337 
17338 /*
17339  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
17340  *
17341  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17342  * Use is subject to license terms.
17343  *
17344  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
17345  */
17346 
17347 /*
17348  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
17349  */
17350 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
17351 
17352 
17353 
17354 
17355 
17356 /*
17357  * Process priority specifications
17358  */
17359 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
17360 /*
17361  * Resource limits
17362  */
17363 # 91 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
17364 /*
17365  * The definitions of the following types and constants differ between the
17366  * regular and large file compilation environments.
17367  */
17368 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
17369 typedef u_longlong_t rlim_t;
17370 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
17371 struct rlimit {
17372  rlim_t rlim_cur; /* current limit */
17373  rlim_t rlim_max; /* maximum value for rlim_cur */
17374 };
17375 
17376 /* transitional large file interface versions */
17377 
17378 
17379 typedef u_longlong_t rlim64_t;
17380 
17381 
17382 
17383 
17384 
17385 struct rlimit64 {
17386  rlim64_t rlim_cur; /* current limit */
17387  rlim64_t rlim_max; /* maximum value for rlim_cur */
17388 };
17389 
17390 
17391 
17392 /*
17393  * Although the saved rlimits were initially introduced by the large file API,
17394  * they are now available for all resource limits on the 64-bit kernel and for
17395  * cpu time and file size limits on the 32-bit kernel.
17396  */
17397 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
17398 struct rusage {
17399  struct timeval ru_utime; /* user time used */
17400  struct timeval ru_stime; /* system time used */
17401  long ru_maxrss; /* <unimp> */
17402  long ru_ixrss; /* <unimp> */
17403  long ru_idrss; /* <unimp> */
17404  long ru_isrss; /* <unimp> */
17405  long ru_minflt; /* any page faults not requiring I/O */
17406  long ru_majflt; /* any page faults requiring I/O */
17407  long ru_nswap; /* swaps */
17408  long ru_inblock; /* block input operations */
17409  long ru_oublock; /* block output operations */
17410  long ru_msgsnd; /* streams messsages sent */
17411  long ru_msgrcv; /* streams messages received */
17412  long ru_nsignals; /* signals received */
17413  long ru_nvcsw; /* voluntary context switches */
17414  long ru_nivcsw; /* involuntary " */
17415 };
17416 # 233 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
17417 /*
17418  * large file compilation environment setup
17419  */
17420 
17421 
17422 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
17423 #pragma redefine_extname setrlimit setrlimit64
17424 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
17425 
17426 
17427 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
17428 #pragma redefine_extname getrlimit getrlimit64
17429 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
17430 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
17431 extern int setrlimit(int, const struct rlimit *);
17432 extern int getrlimit(int, struct rlimit *);
17433 
17434 /* transitional large file interfaces */
17435 
17436 
17437 extern int setrlimit64(int, const struct rlimit64 *);
17438 extern int getrlimit64(int, struct rlimit64 *);
17439 
17440 
17441 extern int getpriority(int, id_t);
17442 extern int setpriority(int, id_t, int);
17443 extern int getrusage(int, struct rusage *);
17444 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 2
17445 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
17446 /*
17447  * CDDL HEADER START
17448  *
17449  * The contents of this file are subject to the terms of the
17450  * Common Development and Distribution License (the "License").
17451  * You may not use this file except in compliance with the License.
17452  *
17453  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17454  * or http://www.opensolaris.org/os/licensing.
17455  * See the License for the specific language governing permissions
17456  * and limitations under the License.
17457  *
17458  * When distributing Covered Code, include this CDDL HEADER in each
17459  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17460  * If applicable, add the following below this CDDL HEADER, with the
17461  * fields enclosed by brackets "[]" replaced with your own identifying
17462  * information: Portions Copyright [yyyy] [name of copyright owner]
17463  *
17464  * CDDL HEADER END
17465  */
17466 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
17467 /*	  All Rights Reserved  	*/
17468 
17469 
17470 /*
17471  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17472  * Use is subject to license terms.
17473  *
17474  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
17475  * Copyright 2016 Joyent, Inc.
17476  */
17477 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 2
17478 
17479 
17480 
17481 
17482 
17483 /*
17484  * Available local actions and flags.
17485  */
17486 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h"
17487 /*
17488  * Available global actions and flags.
17489  */
17490 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h"
17491 /*
17492  * getrctl(2) flag values
17493  */
17494 
17495 
17496 
17497 
17498 /*
17499  * setrctl(2) flag values
17500  */
17501 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h"
17502 /*
17503  * rctl_priv_t: rctl privilege defined values
17504  *   A large amount of space has been deliberately left between these privileges
17505  *   to permit future enrichment of the control privilege value.
17506  */
17507 
17508 
17509 
17510 
17511 typedef u_longlong_t rctl_qty_t; /* resource control numerical values   */
17512 typedef int rctl_priv_t;
17513 
17514 typedef struct rctlblk rctlblk_t;
17515 
17516 extern int setrctl(const char *, rctlblk_t *, rctlblk_t *, int);
17517 extern int getrctl(const char *, rctlblk_t *, rctlblk_t *, int);
17518 
17519 typedef enum {
17520  RCENTITY_PROCESS,
17521  RCENTITY_TASK,
17522  RCENTITY_PROJECT,
17523  RCENTITY_ZONE
17524 } rctl_entity_t;
17525 
17526 
17527 
17528 
17529 typedef struct rctl_set rctl_set_t;
17530 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/rctl.h" 2
17531 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
17532 /*
17533  * CDDL HEADER START
17534  *
17535  * The contents of this file are subject to the terms of the
17536  * Common Development and Distribution License (the "License").
17537  * You may not use this file except in compliance with the License.
17538  *
17539  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17540  * or http://www.opensolaris.org/os/licensing.
17541  * See the License for the specific language governing permissions
17542  * and limitations under the License.
17543  *
17544  * When distributing Covered Code, include this CDDL HEADER in each
17545  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17546  * If applicable, add the following below this CDDL HEADER, with the
17547  * fields enclosed by brackets "[]" replaced with your own identifying
17548  * information: Portions Copyright [yyyy] [name of copyright owner]
17549  *
17550  * CDDL HEADER END
17551  */
17552 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
17553 /*	  All Rights Reserved  	*/
17554 
17555 
17556 /*
17557  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17558  * Use is subject to license terms.
17559  *
17560  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
17561  * Copyright 2016 Joyent, Inc.
17562  */
17563 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/rctl.h" 2
17564 
17565 
17566 
17567 
17568 
17569 int rctl_walk(int (*)(const char *, void *), void *);
17570 
17571 hrtime_t rctlblk_get_firing_time(rctlblk_t *);
17572 uint_t rctlblk_get_global_action(rctlblk_t *);
17573 uint_t rctlblk_get_global_flags(rctlblk_t *);
17574 uint_t rctlblk_get_local_action(rctlblk_t *, int *);
17575 uint_t rctlblk_get_local_flags(rctlblk_t *);
17576 id_t rctlblk_get_recipient_pid(rctlblk_t *);
17577 rctl_priv_t rctlblk_get_privilege(rctlblk_t *);
17578 rctl_qty_t rctlblk_get_value(rctlblk_t *);
17579 rctl_qty_t rctlblk_get_enforced_value(rctlblk_t *);
17580 
17581 void rctlblk_set_local_action(rctlblk_t *, uint_t, int);
17582 void rctlblk_set_local_flags(rctlblk_t *, uint_t);
17583 void rctlblk_set_recipient_pid(rctlblk_t *, id_t);
17584 void rctlblk_set_privilege(rctlblk_t *, rctl_priv_t);
17585 void rctlblk_set_value(rctlblk_t *, rctl_qty_t);
17586 
17587 size_t rctlblk_size(void);
17588 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
17589 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 1
17590 /*
17591  * CDDL HEADER START
17592  *
17593  * The contents of this file are subject to the terms of the
17594  * Common Development and Distribution License (the "License").
17595  * You may not use this file except in compliance with the License.
17596  *
17597  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17598  * or http://www.opensolaris.org/os/licensing.
17599  * See the License for the specific language governing permissions
17600  * and limitations under the License.
17601  *
17602  * When distributing Covered Code, include this CDDL HEADER in each
17603  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17604  * If applicable, add the following below this CDDL HEADER, with the
17605  * fields enclosed by brackets "[]" replaced with your own identifying
17606  * information: Portions Copyright [yyyy] [name of copyright owner]
17607  *
17608  * CDDL HEADER END
17609  */
17610 /*
17611  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17612  * Use is subject to license terms.
17613  */
17614 
17615 
17616 
17617 
17618 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
17619 /*
17620  * CDDL HEADER START
17621  *
17622  * The contents of this file are subject to the terms of the
17623  * Common Development and Distribution License (the "License").
17624  * You may not use this file except in compliance with the License.
17625  *
17626  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17627  * or http://www.opensolaris.org/os/licensing.
17628  * See the License for the specific language governing permissions
17629  * and limitations under the License.
17630  *
17631  * When distributing Covered Code, include this CDDL HEADER in each
17632  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17633  * If applicable, add the following below this CDDL HEADER, with the
17634  * fields enclosed by brackets "[]" replaced with your own identifying
17635  * information: Portions Copyright [yyyy] [name of copyright owner]
17636  *
17637  * CDDL HEADER END
17638  */
17639 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
17640 /*	  All Rights Reserved  	*/
17641 
17642 
17643 /*
17644  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17645  * Use is subject to license terms.
17646  *
17647  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
17648  * Copyright 2016 Joyent, Inc.
17649  */
17650 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 2
17651 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 1
17652 /*
17653  * CDDL HEADER START
17654  *
17655  * The contents of this file are subject to the terms of the
17656  * Common Development and Distribution License (the "License").
17657  * You may not use this file except in compliance with the License.
17658  *
17659  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17660  * or http://www.opensolaris.org/os/licensing.
17661  * See the License for the specific language governing permissions
17662  * and limitations under the License.
17663  *
17664  * When distributing Covered Code, include this CDDL HEADER in each
17665  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17666  * If applicable, add the following below this CDDL HEADER, with the
17667  * fields enclosed by brackets "[]" replaced with your own identifying
17668  * information: Portions Copyright [yyyy] [name of copyright owner]
17669  *
17670  * CDDL HEADER END
17671  */
17672 /*
17673  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
17674  * Copyright 2013, Joyent, Inc. All rights reserved.
17675  * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
17676  * Copyright 2014 Igor Kozhukhov <ikozhukhov@gmail.com>.
17677  */
17678 
17679 
17680 
17681 
17682 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
17683 /*
17684  * CDDL HEADER START
17685  *
17686  * The contents of this file are subject to the terms of the
17687  * Common Development and Distribution License (the "License").
17688  * You may not use this file except in compliance with the License.
17689  *
17690  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17691  * or http://www.opensolaris.org/os/licensing.
17692  * See the License for the specific language governing permissions
17693  * and limitations under the License.
17694  *
17695  * When distributing Covered Code, include this CDDL HEADER in each
17696  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17697  * If applicable, add the following below this CDDL HEADER, with the
17698  * fields enclosed by brackets "[]" replaced with your own identifying
17699  * information: Portions Copyright [yyyy] [name of copyright owner]
17700  *
17701  * CDDL HEADER END
17702  */
17703 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
17704 /*	  All Rights Reserved  	*/
17705 
17706 
17707 /*
17708  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17709  * Use is subject to license terms.
17710  *
17711  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
17712  * Copyright 2016 Joyent, Inc.
17713  */
17714 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
17715 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 1
17716 /*
17717  * CDDL HEADER START
17718  *
17719  * The contents of this file are subject to the terms of the
17720  * Common Development and Distribution License (the "License").
17721  * You may not use this file except in compliance with the License.
17722  *
17723  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17724  * or http://www.opensolaris.org/os/licensing.
17725  * See the License for the specific language governing permissions
17726  * and limitations under the License.
17727  *
17728  * When distributing Covered Code, include this CDDL HEADER in each
17729  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17730  * If applicable, add the following below this CDDL HEADER, with the
17731  * fields enclosed by brackets "[]" replaced with your own identifying
17732  * information: Portions Copyright [yyyy] [name of copyright owner]
17733  *
17734  * CDDL HEADER END
17735  */
17736 /*
17737  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
17738  */
17739 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
17740 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
17741 /*
17742  * CDDL HEADER START
17743  *
17744  * The contents of this file are subject to the terms of the
17745  * Common Development and Distribution License (the "License").
17746  * You may not use this file except in compliance with the License.
17747  *
17748  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17749  * or http://www.opensolaris.org/os/licensing.
17750  * See the License for the specific language governing permissions
17751  * and limitations under the License.
17752  *
17753  * When distributing Covered Code, include this CDDL HEADER in each
17754  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17755  * If applicable, add the following below this CDDL HEADER, with the
17756  * fields enclosed by brackets "[]" replaced with your own identifying
17757  * information: Portions Copyright [yyyy] [name of copyright owner]
17758  *
17759  * CDDL HEADER END
17760  */
17761 
17762 /*
17763  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
17764  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
17765  */
17766 
17767 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
17768 /*	  All Rights Reserved  	*/
17769 
17770 /*
17771  * University Copyright- Copyright (c) 1982, 1986, 1988
17772  * The Regents of the University of California
17773  * All Rights Reserved
17774  *
17775  * University Acknowledgment- Portions of this document are derived from
17776  * software developed by the University of California, Berkeley, and its
17777  * contributors.
17778  */
17779 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
17780 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 1
17781 /*
17782  * CDDL HEADER START
17783  *
17784  * The contents of this file are subject to the terms of the
17785  * Common Development and Distribution License (the "License").
17786  * You may not use this file except in compliance with the License.
17787  *
17788  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17789  * or http://www.opensolaris.org/os/licensing.
17790  * See the License for the specific language governing permissions
17791  * and limitations under the License.
17792  *
17793  * When distributing Covered Code, include this CDDL HEADER in each
17794  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17795  * If applicable, add the following below this CDDL HEADER, with the
17796  * fields enclosed by brackets "[]" replaced with your own identifying
17797  * information: Portions Copyright [yyyy] [name of copyright owner]
17798  *
17799  * CDDL HEADER END
17800  */
17801 /*
17802  * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
17803  */
17804 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
17805 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ipc_rctl.h" 1
17806 /*
17807  * CDDL HEADER START
17808  *
17809  * The contents of this file are subject to the terms of the
17810  * Common Development and Distribution License (the "License").
17811  * You may not use this file except in compliance with the License.
17812  *
17813  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17814  * or http://www.opensolaris.org/os/licensing.
17815  * See the License for the specific language governing permissions
17816  * and limitations under the License.
17817  *
17818  * When distributing Covered Code, include this CDDL HEADER in each
17819  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17820  * If applicable, add the following below this CDDL HEADER, with the
17821  * fields enclosed by brackets "[]" replaced with your own identifying
17822  * information: Portions Copyright [yyyy] [name of copyright owner]
17823  *
17824  * CDDL HEADER END
17825  */
17826 /*
17827  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
17828  * Use is subject to license terms.
17829  */
17830 
17831 
17832 
17833 
17834 #pragma ident "%Z%%M%	%I%	%E% SMI"
17835 
17836 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rctl.h" 1
17837 /*
17838  * CDDL HEADER START
17839  *
17840  * The contents of this file are subject to the terms of the
17841  * Common Development and Distribution License (the "License").
17842  * You may not use this file except in compliance with the License.
17843  *
17844  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17845  * or http://www.opensolaris.org/os/licensing.
17846  * See the License for the specific language governing permissions
17847  * and limitations under the License.
17848  *
17849  * When distributing Covered Code, include this CDDL HEADER in each
17850  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17851  * If applicable, add the following below this CDDL HEADER, with the
17852  * fields enclosed by brackets "[]" replaced with your own identifying
17853  * information: Portions Copyright [yyyy] [name of copyright owner]
17854  *
17855  * CDDL HEADER END
17856  */
17857 /*
17858  * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
17859  */
17860 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ipc_rctl.h" 2
17861 
17862 
17863 
17864 
17865 
17866 typedef struct ipc_rqty { /* datum protected by:	*/
17867  rctl_qty_t ipcq_shmmni; /* shm's ipcs_lock	*/
17868  rctl_qty_t ipcq_semmni; /* sem's ipcs_lock	*/
17869  rctl_qty_t ipcq_msgmni; /* msg's ipcs_lock	*/
17870 } ipc_rqty_t;
17871 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
17872 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h" 1
17873 /*
17874  * CDDL HEADER START
17875  *
17876  * The contents of this file are subject to the terms of the
17877  * Common Development and Distribution License (the "License").
17878  * You may not use this file except in compliance with the License.
17879  *
17880  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17881  * or http://www.opensolaris.org/os/licensing.
17882  * See the License for the specific language governing permissions
17883  * and limitations under the License.
17884  *
17885  * When distributing Covered Code, include this CDDL HEADER in each
17886  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17887  * If applicable, add the following below this CDDL HEADER, with the
17888  * fields enclosed by brackets "[]" replaced with your own identifying
17889  * information: Portions Copyright [yyyy] [name of copyright owner]
17890  *
17891  * CDDL HEADER END
17892  */
17893 /*
17894  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
17895  *
17896  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17897  * Use is subject to license terms.
17898  */
17899 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h"
17900 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
17901 /*
17902  * CDDL HEADER START
17903  *
17904  * The contents of this file are subject to the terms of the
17905  * Common Development and Distribution License (the "License").
17906  * You may not use this file except in compliance with the License.
17907  *
17908  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17909  * or http://www.opensolaris.org/os/licensing.
17910  * See the License for the specific language governing permissions
17911  * and limitations under the License.
17912  *
17913  * When distributing Covered Code, include this CDDL HEADER in each
17914  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17915  * If applicable, add the following below this CDDL HEADER, with the
17916  * fields enclosed by brackets "[]" replaced with your own identifying
17917  * information: Portions Copyright [yyyy] [name of copyright owner]
17918  *
17919  * CDDL HEADER END
17920  */
17921 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
17922 /*	  All Rights Reserved  	*/
17923 
17924 
17925 /*
17926  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17927  * Use is subject to license terms.
17928  *
17929  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
17930  * Copyright 2016 Joyent, Inc.
17931  */
17932 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h" 2
17933 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/processor.h" 1
17934 /*
17935  * CDDL HEADER START
17936  *
17937  * The contents of this file are subject to the terms of the
17938  * Common Development and Distribution License (the "License").
17939  * You may not use this file except in compliance with the License.
17940  *
17941  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17942  * or http://www.opensolaris.org/os/licensing.
17943  * See the License for the specific language governing permissions
17944  * and limitations under the License.
17945  *
17946  * When distributing Covered Code, include this CDDL HEADER in each
17947  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17948  * If applicable, add the following below this CDDL HEADER, with the
17949  * fields enclosed by brackets "[]" replaced with your own identifying
17950  * information: Portions Copyright [yyyy] [name of copyright owner]
17951  *
17952  * CDDL HEADER END
17953  */
17954 /*
17955  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
17956  *	  All Rights Reserved
17957  *
17958  */
17959 
17960 /*
17961  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
17962  *
17963  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
17964  * Use is subject to license terms.
17965  */
17966 
17967 
17968 
17969 
17970 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
17971 /*
17972  * CDDL HEADER START
17973  *
17974  * The contents of this file are subject to the terms of the
17975  * Common Development and Distribution License (the "License").
17976  * You may not use this file except in compliance with the License.
17977  *
17978  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17979  * or http://www.opensolaris.org/os/licensing.
17980  * See the License for the specific language governing permissions
17981  * and limitations under the License.
17982  *
17983  * When distributing Covered Code, include this CDDL HEADER in each
17984  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17985  * If applicable, add the following below this CDDL HEADER, with the
17986  * fields enclosed by brackets "[]" replaced with your own identifying
17987  * information: Portions Copyright [yyyy] [name of copyright owner]
17988  *
17989  * CDDL HEADER END
17990  */
17991 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
17992 /*	  All Rights Reserved  	*/
17993 
17994 
17995 /*
17996  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
17997  * Use is subject to license terms.
17998  *
17999  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
18000  * Copyright 2016 Joyent, Inc.
18001  */
18002 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/processor.h" 2
18003 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
18004 /*
18005  * CDDL HEADER START
18006  *
18007  * The contents of this file are subject to the terms of the
18008  * Common Development and Distribution License, Version 1.0 only
18009  * (the "License").  You may not use this file except in compliance
18010  * with the License.
18011  *
18012  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18013  * or http://www.opensolaris.org/os/licensing.
18014  * See the License for the specific language governing permissions
18015  * and limitations under the License.
18016  *
18017  * When distributing Covered Code, include this CDDL HEADER in each
18018  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18019  * If applicable, add the following below this CDDL HEADER, with the
18020  * fields enclosed by brackets "[]" replaced with your own identifying
18021  * information: Portions Copyright [yyyy] [name of copyright owner]
18022  *
18023  * CDDL HEADER END
18024  */
18025 /*
18026  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
18027  * Use is subject to license terms.
18028  */
18029 
18030 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
18031 /*	  All Rights Reserved  	*/
18032 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/processor.h" 2
18033 
18034 
18035 
18036 
18037 
18038 /*
18039  * Definitions for p_online, processor_info & lgrp system calls.
18040  */
18041 
18042 /*
18043  * Type for an lgrpid
18044  */
18045 typedef uint16_t lgrpid_t;
18046 
18047 /*
18048  * Type for processor name (CPU number).
18049  */
18050 typedef int processorid_t;
18051 typedef int chipid_t;
18052 
18053 /*
18054  * Flags and return values for p_online(2), and pi_state for processor_info(2).
18055  * These flags are *not* for in-kernel examination of CPU states.
18056  * See <sys/cpuvar.h> for appropriate informational functions.
18057  */
18058 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/processor.h"
18059 /*
18060  * String names for processor states defined above.
18061  */
18062 
18063 
18064 
18065 
18066 
18067 
18068 
18069 /*
18070  * Structure filled in by processor_info(2). This structure
18071  * SHOULD NOT BE MODIFIED. Changes to the structure would
18072  * negate ABI compatibility.
18073  *
18074  * The string fields are guaranteed to contain a NULL.
18075  *
18076  * The pi_fputypes field contains a (possibly empty) comma-separated
18077  * list of floating point identifier strings.
18078  */
18079 
18080 
18081 
18082 typedef struct {
18083  int pi_state; /* processor state, see above */
18084  char pi_processor_type[16]; /* ASCII CPU type */
18085  char pi_fputypes[32]; /* ASCII FPU types */
18086  int pi_clock; /* CPU clock freq in MHz */
18087 } processor_info_t;
18088 
18089 /*
18090  * Binding values for processor_bind(2)
18091  */
18092 
18093 
18094 
18095 
18096 
18097 
18098 /*
18099  * User-level system call interface prototypes
18100  */
18101 
18102 
18103 extern int p_online(processorid_t processorid, int flag);
18104 extern int processor_info(processorid_t processorid,
18105       processor_info_t *infop);
18106 extern int processor_bind(idtype_t idtype, id_t id,
18107       processorid_t processorid, processorid_t *obind);
18108 extern processorid_t getcpuid(void);
18109 extern lgrpid_t gethomelgroup(void);
18110 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h" 2
18111 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
18112 /*
18113  * CDDL HEADER START
18114  *
18115  * The contents of this file are subject to the terms of the
18116  * Common Development and Distribution License, Version 1.0 only
18117  * (the "License").  You may not use this file except in compliance
18118  * with the License.
18119  *
18120  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18121  * or http://www.opensolaris.org/os/licensing.
18122  * See the License for the specific language governing permissions
18123  * and limitations under the License.
18124  *
18125  * When distributing Covered Code, include this CDDL HEADER in each
18126  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18127  * If applicable, add the following below this CDDL HEADER, with the
18128  * fields enclosed by brackets "[]" replaced with your own identifying
18129  * information: Portions Copyright [yyyy] [name of copyright owner]
18130  *
18131  * CDDL HEADER END
18132  */
18133 /*
18134  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
18135  * Use is subject to license terms.
18136  */
18137 
18138 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
18139 /*	  All Rights Reserved  	*/
18140 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h" 2
18141 
18142 typedef int psetid_t;
18143 
18144 /* special processor set id's */
18145 
18146 
18147 
18148 
18149 
18150 
18151 
18152 /* types of processor sets */
18153 
18154 
18155 
18156 
18157 
18158 extern int pset_create(psetid_t *);
18159 extern int pset_destroy(psetid_t);
18160 extern int pset_assign(psetid_t, processorid_t, psetid_t *);
18161 extern int pset_info(psetid_t, int *, uint_t *, processorid_t *);
18162 extern int pset_bind(psetid_t, idtype_t, id_t, psetid_t *);
18163 extern int pset_bind_lwp(psetid_t, id_t, pid_t, psetid_t *);
18164 extern int pset_getloadavg(psetid_t, double [], int);
18165 extern int pset_list(psetid_t *, uint_t *);
18166 extern int pset_setattr(psetid_t, uint_t);
18167 extern int pset_getattr(psetid_t, uint_t *);
18168 
18169 
18170 
18171 
18172 
18173 /* system call subcodes */
18174 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/pset.h"
18175 /* attribute bits */
18176 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
18177 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/tsol/label.h" 1
18178 /*
18179  * CDDL HEADER START
18180  *
18181  * The contents of this file are subject to the terms of the
18182  * Common Development and Distribution License (the "License").
18183  * You may not use this file except in compliance with the License.
18184  *
18185  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18186  * or http://www.opensolaris.org/os/licensing.
18187  * See the License for the specific language governing permissions
18188  * and limitations under the License.
18189  *
18190  * When distributing Covered Code, include this CDDL HEADER in each
18191  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18192  * If applicable, add the following below this CDDL HEADER, with the
18193  * fields enclosed by brackets "[]" replaced with your own identifying
18194  * information: Portions Copyright [yyyy] [name of copyright owner]
18195  *
18196  * CDDL HEADER END
18197  */
18198 /*
18199  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
18200  * Use is subject to license terms.
18201  */
18202 
18203 
18204 
18205 
18206 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
18207 /*
18208  * CDDL HEADER START
18209  *
18210  * The contents of this file are subject to the terms of the
18211  * Common Development and Distribution License (the "License").
18212  * You may not use this file except in compliance with the License.
18213  *
18214  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18215  * or http://www.opensolaris.org/os/licensing.
18216  * See the License for the specific language governing permissions
18217  * and limitations under the License.
18218  *
18219  * When distributing Covered Code, include this CDDL HEADER in each
18220  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18221  * If applicable, add the following below this CDDL HEADER, with the
18222  * fields enclosed by brackets "[]" replaced with your own identifying
18223  * information: Portions Copyright [yyyy] [name of copyright owner]
18224  *
18225  * CDDL HEADER END
18226  */
18227 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
18228 /*	  All Rights Reserved  	*/
18229 
18230 
18231 /*
18232  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
18233  * Use is subject to license terms.
18234  *
18235  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
18236  * Copyright 2016 Joyent, Inc.
18237  */
18238 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/tsol/label.h" 2
18239 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/tsol/label.h"
18240 /*
18241  * types of label comparison
18242  */
18243 
18244 
18245 
18246 /* Manifest human readable label names */
18247 
18248 
18249 
18250 /* Binary Label Structure Definitions */
18251 
18252 typedef struct _mac_label_impl m_label_t;
18253 
18254 typedef m_label_t blevel_t, /* compatibility */
18255    bslabel_t, /* Sensitivity Label */
18256    bclear_t; /* Clearance */
18257 
18258 typedef struct _tsol_binary_level_lrange { /* Level Range */
18259  m_label_t *lower_bound;
18260  m_label_t *upper_bound;
18261 } m_range_t;
18262 
18263 typedef m_range_t blrange_t;
18264 
18265 typedef struct tsol_mlp_s {
18266  uchar_t mlp_ipp;
18267  uint16_t mlp_port;
18268  uint16_t mlp_port_upper;
18269 } tsol_mlp_t;
18270 
18271 /* Procedure Interface Definitions available to user and kernel */
18272 
18273 extern int bltype(const void *, uint8_t);
18274 extern int blequal(const m_label_t *, const m_label_t *);
18275 extern int bldominates(const m_label_t *, const m_label_t *);
18276 extern int blstrictdom(const m_label_t *, const m_label_t *);
18277 extern int blinrange(const m_label_t *, const m_range_t *);
18278 extern void blmaximum(m_label_t *, const m_label_t *);
18279 extern void blminimum(m_label_t *, const m_label_t *);
18280 extern void bsllow(m_label_t *);
18281 extern void bslhigh(m_label_t *);
18282 extern void bclearlow(m_label_t *);
18283 extern void bclearhigh(m_label_t *);
18284 extern void bslundef(m_label_t *);
18285 extern void bclearundef(m_label_t *);
18286 extern void setbltype(void *, uint8_t);
18287 extern boolean_t bisinvalid(const void *);
18288 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
18289 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
18290 /*
18291  * CDDL HEADER START
18292  *
18293  * The contents of this file are subject to the terms of the
18294  * Common Development and Distribution License (the "License").
18295  * You may not use this file except in compliance with the License.
18296  *
18297  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18298  * or http://www.opensolaris.org/os/licensing.
18299  * See the License for the specific language governing permissions
18300  * and limitations under the License.
18301  *
18302  * When distributing Covered Code, include this CDDL HEADER in each
18303  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18304  * If applicable, add the following below this CDDL HEADER, with the
18305  * fields enclosed by brackets "[]" replaced with your own identifying
18306  * information: Portions Copyright [yyyy] [name of copyright owner]
18307  *
18308  * CDDL HEADER END
18309  */
18310 /*
18311  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
18312  * Use is subject to license terms.
18313  */
18314 
18315 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
18316 /*	  All Rights Reserved  	*/
18317 
18318 /*
18319  * Portions of this source code were derived from Berkeley 4.3 BSD
18320  * under license from the Regents of the University of California.
18321  */
18322 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
18323 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h" 1
18324 /*
18325  * CDDL HEADER START
18326  *
18327  * The contents of this file are subject to the terms of the
18328  * Common Development and Distribution License (the "License").
18329  * You may not use this file except in compliance with the License.
18330  *
18331  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18332  * or http://www.opensolaris.org/os/licensing.
18333  * See the License for the specific language governing permissions
18334  * and limitations under the License.
18335  *
18336  * When distributing Covered Code, include this CDDL HEADER in each
18337  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18338  * If applicable, add the following below this CDDL HEADER, with the
18339  * fields enclosed by brackets "[]" replaced with your own identifying
18340  * information: Portions Copyright [yyyy] [name of copyright owner]
18341  *
18342  * CDDL HEADER END
18343  */
18344 
18345 /*
18346  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
18347  * Use is subject to license terms.
18348  */
18349 
18350 
18351 
18352 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h" 1
18353 /*
18354  * CDDL HEADER START
18355  *
18356  * The contents of this file are subject to the terms of the
18357  * Common Development and Distribution License (the "License").
18358  * You may not use this file except in compliance with the License.
18359  *
18360  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18361  * or http://www.opensolaris.org/os/licensing.
18362  * See the License for the specific language governing permissions
18363  * and limitations under the License.
18364  *
18365  * When distributing Covered Code, include this CDDL HEADER in each
18366  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18367  * If applicable, add the following below this CDDL HEADER, with the
18368  * fields enclosed by brackets "[]" replaced with your own identifying
18369  * information: Portions Copyright [yyyy] [name of copyright owner]
18370  *
18371  * CDDL HEADER END
18372  */
18373 /*
18374  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
18375  * Use is subject to license terms.
18376  *
18377  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
18378  */
18379 
18380 
18381 
18382 
18383 /*
18384  * Definition of general kernel statistics structures and /dev/kstat ioctls
18385  */
18386 
18387 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
18388 /*
18389  * CDDL HEADER START
18390  *
18391  * The contents of this file are subject to the terms of the
18392  * Common Development and Distribution License (the "License").
18393  * You may not use this file except in compliance with the License.
18394  *
18395  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18396  * or http://www.opensolaris.org/os/licensing.
18397  * See the License for the specific language governing permissions
18398  * and limitations under the License.
18399  *
18400  * When distributing Covered Code, include this CDDL HEADER in each
18401  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18402  * If applicable, add the following below this CDDL HEADER, with the
18403  * fields enclosed by brackets "[]" replaced with your own identifying
18404  * information: Portions Copyright [yyyy] [name of copyright owner]
18405  *
18406  * CDDL HEADER END
18407  */
18408 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
18409 /*	  All Rights Reserved  	*/
18410 
18411 
18412 /*
18413  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
18414  * Use is subject to license terms.
18415  *
18416  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
18417  * Copyright 2016 Joyent, Inc.
18418  */
18419 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h" 2
18420 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
18421 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
18422 /*	  All Rights Reserved  	*/
18423 
18424 
18425 /*
18426  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
18427  * All rights reserved.  The Berkeley software License Agreement
18428  * specifies the terms and conditions for redistribution.
18429  */
18430 
18431 /*
18432  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
18433  *
18434  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
18435  * Use is subject to license terms.
18436  *
18437  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
18438  */
18439 
18440 /*
18441  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
18442  */
18443 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h" 2
18444 
18445 
18446 
18447 
18448 
18449 typedef int kid_t; /* unique kstat id */
18450 
18451 /*
18452  * Kernel statistics driver (/dev/kstat) ioctls
18453  */
18454 
18455 
18456 
18457 
18458 
18459 
18460 
18461 /*
18462  * /dev/kstat ioctl usage (kd denotes /dev/kstat descriptor):
18463  *
18464  *	kcid = ioctl(kd, KSTAT_IOC_CHAIN_ID, NULL);
18465  *	kcid = ioctl(kd, KSTAT_IOC_READ, kstat_t *);
18466  *	kcid = ioctl(kd, KSTAT_IOC_WRITE, kstat_t *);
18467  */
18468 
18469 
18470 
18471 /*
18472  * The generic kstat header
18473  */
18474 
18475 typedef struct kstat {
18476  /*
18477 	 * Fields relevant to both kernel and user
18478 	 */
18479  hrtime_t ks_crtime; /* creation time (from gethrtime()) */
18480  struct kstat *ks_next; /* kstat chain linkage */
18481  kid_t ks_kid; /* unique kstat ID */
18482  char ks_module[31]; /* provider module name */
18483  uchar_t ks_resv; /* reserved, currently just padding */
18484  int ks_instance; /* provider module's instance */
18485  char ks_name[31]; /* kstat name */
18486  uchar_t ks_type; /* kstat data type */
18487  char ks_class[31]; /* kstat class */
18488  uchar_t ks_flags; /* kstat flags */
18489  void *ks_data; /* kstat type-specific data */
18490  uint_t ks_ndata; /* # of type-specific data records */
18491  size_t ks_data_size; /* total size of kstat data section */
18492  hrtime_t ks_snaptime; /* time of last data shapshot */
18493  /*
18494 	 * Fields relevant to kernel only
18495 	 */
18496  int (*ks_update)(struct kstat *, int); /* dynamic update */
18497  void *ks_private; /* arbitrary provider-private data */
18498  int (*ks_snapshot)(struct kstat *, void *, int);
18499  void *ks_lock; /* protects this kstat's data */
18500 } kstat_t;
18501 # 128 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
18502 /*
18503  * kstat structure and locking strategy
18504  *
18505  * Each kstat consists of a header section (a kstat_t) and a data section.
18506  * The system maintains a set of kstats, protected by kstat_chain_lock.
18507  * kstat_chain_lock protects all additions to/deletions from this set,
18508  * as well as all changes to kstat headers.  kstat data sections are
18509  * *optionally* protected by the per-kstat ks_lock.  If ks_lock is non-NULL,
18510  * kstat clients (e.g. /dev/kstat) will acquire this lock for all of their
18511  * operations on that kstat.  It is up to the kstat provider to decide whether
18512  * guaranteeing consistent data to kstat clients is sufficiently important
18513  * to justify the locking cost.  Note, however, that most statistic updates
18514  * already occur under one of the provider's mutexes, so if the provider sets
18515  * ks_lock to point to that mutex, then kstat data locking is free.
18516  *
18517  * NOTE: variable-size kstats MUST employ kstat data locking, to prevent
18518  * data-size races with kstat clients.
18519  *
18520  * NOTE: ks_lock is really of type (kmutex_t *); it is declared as (void *)
18521  * in the kstat header so that users don't have to be exposed to all of the
18522  * kernel's lock-related data structures.
18523  */
18524 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
18525 /*
18526  * kstat time
18527  *
18528  * All times associated with kstats (e.g. creation time, snapshot time,
18529  * kstat_timer_t and kstat_io_t timestamps, etc.) are 64-bit nanosecond values,
18530  * as returned by gethrtime().  The accuracy of these timestamps is machine
18531  * dependent, but the precision (units) is the same across all platforms.
18532  */
18533 
18534 /*
18535  * kstat identity (KID)
18536  *
18537  * Each kstat is assigned a unique KID (kstat ID) when it is added to the
18538  * global kstat chain.  The KID is used as a cookie by /dev/kstat to
18539  * request information about the corresponding kstat.  There is also
18540  * an identity associated with the entire kstat chain, kstat_chain_id,
18541  * which is bumped each time a kstat is added or deleted.  /dev/kstat uses
18542  * the chain ID to detect changes in the kstat chain (e.g., a new disk
18543  * coming online) between ioctl()s.
18544  */
18545 
18546 /*
18547  * kstat module, kstat instance
18548  *
18549  * ks_module and ks_instance contain the name and instance of the module
18550  * that created the kstat.  In cases where there can only be one instance,
18551  * ks_instance is 0.  The kernel proper (/kernel/unix) uses "unix" as its
18552  * module name.
18553  */
18554 
18555 /*
18556  * kstat name
18557  *
18558  * ks_name gives a meaningful name to a kstat.  The full kstat namespace
18559  * is module.instance.name, so the name only need be unique within a
18560  * module.  kstat_create() will fail if you try to create a kstat with
18561  * an already-used (ks_module, ks_instance, ks_name) triplet.  Spaces are
18562  * allowed in kstat names, but strongly discouraged, since they hinder
18563  * awk-style processing at user level.
18564  */
18565 
18566 /*
18567  * kstat type
18568  *
18569  * The kstat mechanism provides several flavors of kstat data, defined
18570  * below.  The "raw" kstat type is just treated as an array of bytes; you
18571  * can use this to export any kind of data you want.
18572  *
18573  * Some kstat types allow multiple data structures per kstat, e.g.
18574  * KSTAT_TYPE_NAMED; others do not.  This is part of the spec for each
18575  * kstat data type.
18576  *
18577  * User-level tools should *not* rely on the #define KSTAT_NUM_TYPES.  To
18578  * get this information, read out the standard system kstat "kstat_types".
18579  */
18580 
18581 
18582      /* ks_ndata >= 1 */
18583 
18584      /* ks_ndata >= 1 */
18585 
18586      /* ks_ndata == 1 */
18587 
18588      /* ks_ndata == 1 */
18589 
18590      /* ks_ndata >= 1 */
18591 
18592 
18593 
18594 /*
18595  * kstat class
18596  *
18597  * Each kstat can be characterized as belonging to some broad class
18598  * of statistics, e.g. disk, tape, net, vm, streams, etc.  This field
18599  * can be used as a filter to extract related kstats.  The following
18600  * values are currently in use: disk, tape, net, controller, vm, kvm,
18601  * hat, streams, kstat, and misc.  (The kstat class encompasses things
18602  * like kstat_types.)
18603  */
18604 
18605 /*
18606  * kstat flags
18607  *
18608  * Any of the following flags may be passed to kstat_create().  They are
18609  * all zero by default.
18610  *
18611  *	KSTAT_FLAG_VIRTUAL:
18612  *
18613  *		Tells kstat_create() not to allocate memory for the
18614  *		kstat data section; instead, you will set the ks_data
18615  *		field to point to the data you wish to export.  This
18616  *		provides a convenient way to export existing data
18617  *		structures.
18618  *
18619  *	KSTAT_FLAG_VAR_SIZE:
18620  *
18621  *		The size of the kstat you are creating will vary over time.
18622  *		For example, you may want to use the kstat mechanism to
18623  *		export a linked list.  NOTE: The kstat framework does not
18624  *		manage the data section, so all variable-size kstats must be
18625  *		virtual kstats.  Moreover, variable-size kstats MUST employ
18626  *		kstat data locking to prevent data-size races with kstat
18627  *		clients.  See the section on "kstat snapshot" for details.
18628  *
18629  *	KSTAT_FLAG_WRITABLE:
18630  *
18631  *		Makes the kstat's data section writable by root.
18632  *		The ks_snapshot routine (see below) does not need to check for
18633  *		this; permission checking is handled in the kstat driver.
18634  *
18635  *	KSTAT_FLAG_PERSISTENT:
18636  *
18637  *		Indicates that this kstat is to be persistent over time.
18638  *		For persistent kstats, kstat_delete() simply marks the
18639  *		kstat as dormant; a subsequent kstat_create() reactivates
18640  *		the kstat.  This feature is provided so that statistics
18641  *		are not lost across driver close/open (e.g., raw disk I/O
18642  *		on a disk with no mounted partitions.)
18643  *		NOTE: Persistent kstats cannot be virtual, since ks_data
18644  *		points to garbage as soon as the driver goes away.
18645  *
18646  * The following flags are maintained by the kstat framework:
18647  *
18648  *	KSTAT_FLAG_DORMANT:
18649  *
18650  *		For persistent kstats, indicates that the kstat is in the
18651  *		dormant state (e.g., the corresponding device is closed).
18652  *
18653  *	KSTAT_FLAG_INVALID:
18654  *
18655  *		This flag is set when a kstat is in a transitional state,
18656  *		e.g. between kstat_create() and kstat_install().
18657  *		kstat clients must not attempt to access the kstat's data
18658  *		if this flag is set.
18659  *
18660  *	KSTAT_FLAG_LONGSTRINGS:
18661  *
18662  *		Indicates that this kstat contains long strings (which
18663  *		are stored outside of the kstat data section). When copied
18664  *		out to user space the string data will be held in the data
18665  *		section provided by the user.
18666  */
18667 # 316 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
18668 /*
18669  * Dynamic update support
18670  *
18671  * The kstat mechanism allows for an optional ks_update function to update
18672  * kstat data.  This is useful for drivers where the underlying device
18673  * keeps cheap hardware stats, but extraction is expensive.  Instead of
18674  * constantly keeping the kstat data section up to date, you can supply a
18675  * ks_update function which updates the kstat's data section on demand.
18676  * To take advantage of this feature, simply set the ks_update field before
18677  * calling kstat_install().
18678  *
18679  * The ks_update function, if supplied, must have the following structure:
18680  *
18681  *	int
18682  *	foo_kstat_update(kstat_t *ksp, int rw)
18683  *	{
18684  *		if (rw == KSTAT_WRITE) {
18685  *			... update the native stats from ksp->ks_data;
18686  *				return EACCES if you don't support this
18687  *		} else {
18688  *			... update ksp->ks_data from the native stats
18689  *		}
18690  *	}
18691  *
18692  * The ks_update return codes are: 0 for success, EACCES if you don't allow
18693  * KSTAT_WRITE, and EIO for any other type of error.
18694  *
18695  * In general, the ks_update function may need to refer to provider-private
18696  * data; for example, it may need a pointer to the provider's raw statistics.
18697  * The ks_private field is available for this purpose.  Its use is entirely
18698  * at the provider's discretion.
18699  *
18700  * All variable-size kstats MUST supply a ks_update routine, which computes
18701  * and sets ks_data_size (and ks_ndata if that is meaningful), since these
18702  * are needed to perform kstat snapshots (see below).
18703  *
18704  * No kstat locking should be done inside the ks_update routine.  The caller
18705  * will already be holding the kstat's ks_lock (to ensure consistent data).
18706  */
18707 
18708 
18709 
18710 
18711 /*
18712  * Kstat snapshot
18713  *
18714  * In order to get a consistent view of a kstat's data, clients must obey
18715  * the kstat's locking strategy.  However, these clients may need to perform
18716  * operations on the data which could cause a fault (e.g. copyout()), or
18717  * operations which are simply expensive.  Doing so could cause deadlock
18718  * (e.g. if you're holding a disk's kstat lock which is ultimately required
18719  * to resolve a copyout() fault), performance degradation (since the providers'
18720  * activity is serialized at the kstat lock), device timing problems, etc.
18721  *
18722  * To avoid these problems, kstat data is provided via snapshots.  Taking
18723  * a snapshot is a simple process: allocate a wired-down kernel buffer,
18724  * acquire the kstat's data lock, copy the data into the buffer ("take the
18725  * snapshot"), and release the lock.  This ensures that the kstat's data lock
18726  * will be held as briefly as possible, and that no faults will occur while
18727  * the lock is held.
18728  *
18729  * Normally, the snapshot is taken by default_kstat_snapshot(), which
18730  * timestamps the data (sets ks_snaptime), copies it, and does a little
18731  * massaging to deal with incomplete transactions on i/o kstats.  However,
18732  * this routine only works for kstats with contiguous data (the typical case).
18733  * If you create a kstat whose data is, say, a linked list, you must provide
18734  * your own ks_snapshot routine.  The routine you supply must have the
18735  * following prototype (replace "foo" with something appropriate):
18736  *
18737  *	int foo_kstat_snapshot(kstat_t *ksp, void *buf, int rw);
18738  *
18739  * The minimal snapshot routine -- one which copies contiguous data that
18740  * doesn't need any massaging -- would be this:
18741  *
18742  *	ksp->ks_snaptime = gethrtime();
18743  *	if (rw == KSTAT_WRITE)
18744  *		bcopy(buf, ksp->ks_data, ksp->ks_data_size);
18745  *	else
18746  *		bcopy(ksp->ks_data, buf, ksp->ks_data_size);
18747  *	return (0);
18748  *
18749  * A more illuminating example is taking a snapshot of a linked list:
18750  *
18751  *	ksp->ks_snaptime = gethrtime();
18752  *	if (rw == KSTAT_WRITE)
18753  *		return (EACCES);		... See below ...
18754  *	for (foo = first_foo; foo; foo = foo->next) {
18755  *		bcopy((char *) foo, (char *) buf, sizeof (struct foo));
18756  *		buf = ((struct foo *) buf) + 1;
18757  *	}
18758  *	return (0);
18759  *
18760  * In the example above, we have decided that we don't want to allow
18761  * KSTAT_WRITE access, so we return EACCES if this is attempted.
18762  *
18763  * The key points are:
18764  *
18765  *	(1) ks_snaptime must be set (via gethrtime()) to timestamp the data.
18766  *	(2) Data gets copied from the kstat to the buffer on KSTAT_READ,
18767  *		and from the buffer to the kstat on KSTAT_WRITE.
18768  *	(3) ks_snapshot return values are: 0 for success, EACCES if you
18769  *		don't allow KSTAT_WRITE, and EIO for any other type of error.
18770  *
18771  * Named kstats (see section on "Named statistics" below) containing long
18772  * strings (KSTAT_DATA_STRING) need special handling.  The kstat driver
18773  * assumes that all strings are copied into the buffer after the array of
18774  * named kstats, and the pointers (KSTAT_NAMED_STR_PTR()) are updated to point
18775  * into the copy within the buffer. The default snapshot routine does this,
18776  * but overriding routines should contain at least the following:
18777  *
18778  * if (rw == KSTAT_READ) {
18779  * 	kstat_named_t *knp = buf;
18780  * 	char *end = knp + ksp->ks_ndata;
18781  * 	uint_t i;
18782  *
18783  * 	... Do the regular copy ...
18784  * 	bcopy(ksp->ks_data, buf, sizeof (kstat_named_t) * ksp->ks_ndata);
18785  *
18786  * 	for (i = 0; i < ksp->ks_ndata; i++, knp++) {
18787  *		if (knp[i].data_type == KSTAT_DATA_STRING &&
18788  *		    KSTAT_NAMED_STR_PTR(knp) != NULL) {
18789  *			bcopy(KSTAT_NAMED_STR_PTR(knp), end,
18790  *			    KSTAT_NAMED_STR_BUFLEN(knp));
18791  *			KSTAT_NAMED_STR_PTR(knp) = end;
18792  *			end += KSTAT_NAMED_STR_BUFLEN(knp);
18793  *		}
18794  *	}
18795  */
18796 
18797 /*
18798  * Named statistics.
18799  *
18800  * List of arbitrary name=value statistics.
18801  */
18802 
18803 typedef struct kstat_named {
18804  char name[31]; /* name of counter */
18805  uchar_t data_type; /* data type */
18806  union {
18807   char c[16]; /* enough for 128-bit ints */
18808   int32_t i32;
18809   uint32_t ui32;
18810   struct {
18811    union {
18812     char *ptr; /* NULL-term string */
18813 
18814 
18815 
18816     char __pad[8]; /* 64-bit padding */
18817    } addr;
18818    uint32_t len; /* # bytes for strlen + '\0' */
18819   } str;
18820 /*
18821  * The int64_t and uint64_t types are not valid for a maximally conformant
18822  * 32-bit compilation environment (cc -Xc) using compilers prior to the
18823  * introduction of C99 conforming compiler (reference ISO/IEC 9899:1990).
18824  * In these cases, the visibility of i64 and ui64 is only permitted for
18825  * 64-bit compilation environments or 32-bit non-maximally conformant
18826  * C89 or C90 ANSI C compilation environments (cc -Xt and cc -Xa). In the
18827  * C99 ANSI C compilation environment, the long long type is supported.
18828  * The _INT64_TYPE is defined by the implementation (see sys/int_types.h).
18829  */
18830 
18831   int64_t i64;
18832   uint64_t ui64;
18833 
18834   long l;
18835   ulong_t ul;
18836 
18837   /* These structure members are obsolete */
18838 
18839   longlong_t ll;
18840   u_longlong_t ull;
18841   float f;
18842   double d;
18843  } value; /* value of counter */
18844 } kstat_named_t;
18845 # 513 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
18846 /*
18847  * Statistics exporting named kstats with long strings (KSTAT_DATA_STRING)
18848  * may not make the assumption that ks_data_size is equal to (ks_ndata * sizeof
18849  * (kstat_named_t)).  ks_data_size in these cases is equal to the sum of the
18850  * amount of space required to store the strings (ie, the sum of
18851  * KSTAT_NAMED_STR_BUFLEN() for all KSTAT_DATA_STRING statistics) plus the
18852  * space required to store the kstat_named_t's.
18853  *
18854  * The default update routine will update ks_data_size automatically for
18855  * variable-length kstats containing long strings (using the default update
18856  * routine only makes sense if the string is the only thing that is changing
18857  * in size, and ks_ndata is constant).  Fixed-length kstats containing long
18858  * strings must explicitly change ks_data_size (after creation but before
18859  * initialization) to reflect the correct amount of space required for the
18860  * long strings and the kstat_named_t's.
18861  */
18862 
18863 
18864 /* These types are obsolete */
18865 # 540 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
18866 /*
18867  * Retrieve the pointer of the string contained in the given named kstat.
18868  */
18869 
18870 
18871 /*
18872  * Retrieve the length of the buffer required to store the string in the given
18873  * named kstat.
18874  */
18875 
18876 
18877 /*
18878  * Interrupt statistics.
18879  *
18880  * An interrupt is a hard interrupt (sourced from the hardware device
18881  * itself), a soft interrupt (induced by the system via the use of
18882  * some system interrupt source), a watchdog interrupt (induced by
18883  * a periodic timer call), spurious (an interrupt entry point was
18884  * entered but there was no interrupt condition to service),
18885  * or multiple service (an interrupt condition was detected and
18886  * serviced just prior to returning from any of the other types).
18887  *
18888  * Measurement of the spurious class of interrupts is useful for
18889  * autovectored devices in order to pinpoint any interrupt latency
18890  * problems in a particular system configuration.
18891  *
18892  * Devices that have more than one interrupt of the same
18893  * type should use multiple structures.
18894  */
18895 # 578 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/kstat.h"
18896 typedef struct kstat_intr {
18897  uint_t intrs[5]; /* interrupt counters */
18898 } kstat_intr_t;
18899 
18900 
18901 
18902 /*
18903  * I/O statistics.
18904  */
18905 
18906 typedef struct kstat_io {
18907 
18908  /*
18909 	 * Basic counters.
18910 	 *
18911 	 * The counters should be updated at the end of service
18912 	 * (e.g., just prior to calling biodone()).
18913 	 */
18914 
18915  u_longlong_t nread; /* number of bytes read */
18916  u_longlong_t nwritten; /* number of bytes written */
18917  uint_t reads; /* number of read operations */
18918  uint_t writes; /* number of write operations */
18919 
18920  /*
18921 	 * Accumulated time and queue length statistics.
18922 	 *
18923 	 * Accumulated time statistics are kept as a running sum
18924 	 * of "active" time.  Queue length statistics are kept as a
18925 	 * running sum of the product of queue length and elapsed time
18926 	 * at that length -- i.e., a Riemann sum for queue length
18927 	 * integrated against time.  (You can also think of the active time
18928 	 * as a Riemann sum, for the boolean function (queue_length > 0)
18929 	 * integrated against time, or you can think of it as the
18930 	 * Lebesgue measure of the set on which queue_length > 0.)
18931 	 *
18932 	 *		^
18933 	 *		|			_________
18934 	 *		8			| i4	|
18935 	 *		|			|	|
18936 	 *	Queue	6			|	|
18937 	 *	Length	|	_________	|	|
18938 	 *		4	| i2	|_______|	|
18939 	 *		|	|	    i3		|
18940 	 *		2_______|			|
18941 	 *		|    i1				|
18942 	 *		|_______________________________|
18943 	 *		Time->	t1	t2	t3	t4
18944 	 *
18945 	 * At each change of state (entry or exit from the queue),
18946 	 * we add the elapsed time (since the previous state change)
18947 	 * to the active time if the queue length was non-zero during
18948 	 * that interval; and we add the product of the elapsed time
18949 	 * times the queue length to the running length*time sum.
18950 	 *
18951 	 * This method is generalizable to measuring residency
18952 	 * in any defined system: instead of queue lengths, think
18953 	 * of "outstanding RPC calls to server X".
18954 	 *
18955 	 * A large number of I/O subsystems have at least two basic
18956 	 * "lists" of transactions they manage: one for transactions
18957 	 * that have been accepted for processing but for which processing
18958 	 * has yet to begin, and one for transactions which are actively
18959 	 * being processed (but not done). For this reason, two cumulative
18960 	 * time statistics are defined here: wait (pre-service) time,
18961 	 * and run (service) time.
18962 	 *
18963 	 * All times are 64-bit nanoseconds (hrtime_t), as returned by
18964 	 * gethrtime().
18965 	 *
18966 	 * The units of cumulative busy time are accumulated nanoseconds.
18967 	 * The units of cumulative length*time products are elapsed time
18968 	 * times queue length.
18969 	 *
18970 	 * Updates to the fields below are performed implicitly by calls to
18971 	 * these five functions:
18972 	 *
18973 	 *	kstat_waitq_enter()
18974 	 *	kstat_waitq_exit()
18975 	 *	kstat_runq_enter()
18976 	 *	kstat_runq_exit()
18977 	 *
18978 	 *	kstat_waitq_to_runq()		(see below)
18979 	 *	kstat_runq_back_to_waitq()	(see below)
18980 	 *
18981 	 * Since kstat_waitq_exit() is typically followed immediately
18982 	 * by kstat_runq_enter(), there is a single kstat_waitq_to_runq()
18983 	 * function which performs both operations.  This is a performance
18984 	 * win since only one timestamp is required.
18985 	 *
18986 	 * In some instances, it may be necessary to move a request from
18987 	 * the run queue back to the wait queue, e.g. for write throttling.
18988 	 * For these situations, call kstat_runq_back_to_waitq().
18989 	 *
18990 	 * These fields should never be updated by any other means.
18991 	 */
18992 
18993  hrtime_t wtime; /* cumulative wait (pre-service) time */
18994  hrtime_t wlentime; /* cumulative wait length*time product */
18995  hrtime_t wlastupdate; /* last time wait queue changed */
18996  hrtime_t rtime; /* cumulative run (service) time */
18997  hrtime_t rlentime; /* cumulative run length*time product */
18998  hrtime_t rlastupdate; /* last time run queue changed */
18999 
19000  uint_t wcnt; /* count of elements in wait state */
19001  uint_t rcnt; /* count of elements in run state */
19002 
19003 } kstat_io_t;
19004 
19005 
19006 
19007 /*
19008  * Event timer statistics - cumulative elapsed time and number of events.
19009  *
19010  * Updates to these fields are performed implicitly by calls to
19011  * kstat_timer_start() and kstat_timer_stop().
19012  */
19013 
19014 typedef struct kstat_timer {
19015  char name[31]; /* event name */
19016  uchar_t resv; /* reserved */
19017  u_longlong_t num_events; /* number of events */
19018  hrtime_t elapsed_time; /* cumulative elapsed time */
19019  hrtime_t min_time; /* shortest event duration */
19020  hrtime_t max_time; /* longest event duration */
19021  hrtime_t start_time; /* previous event start time */
19022  hrtime_t stop_time; /* previous event stop time */
19023 } kstat_timer_t;
19024 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h" 2
19025 
19026 
19027 
19028 
19029 
19030 /*
19031  * This allows various pieces in and around IP to have a separate instance
19032  * for each instance of IP. This is used to support zones that have an
19033  * exclusive stack.
19034  * Pieces of software far removed from IP (e.g., kernel software
19035  * sitting on top of TCP or UDP) probably should not use the netstack
19036  * support; if such software wants to support separate zones it
19037  * can do that using the zones framework (zone_key_create() etc)
19038  * whether there is a shared IP stack or and exclusive IP stack underneath.
19039  */
19040 
19041 /*
19042  * Each netstack has an identifier. We reuse the zoneid allocation for
19043  * this but have a separate typedef. Thus the shared stack (used by
19044  * the global zone and other shared stack zones) have a zero ID, and
19045  * the exclusive stacks have a netstackid that is the same as their zoneid.
19046  */
19047 typedef id_t netstackid_t;
19048 
19049 
19050 
19051 /*
19052  * One for each module which uses netstack support.
19053  * Used in netstack_register().
19054  *
19055  * The order of these is important for some modules both for
19056  * the creation (which done in ascending order) and destruction (which is
19057  * done in in decending order).
19058  */
19059 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h"
19060 /*
19061  * State maintained for each module which tracks the state of
19062  * the create, shutdown and destroy callbacks.
19063  *
19064  * Keeps track of pending actions to avoid holding locks when
19065  * calling into the create/shutdown/destroy functions in the module.
19066  */
19067 # 122 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h"
19068 /* User-level compile like IP Filter needs a netstack_t. Dummy */
19069 typedef uint_t nm_state_t;
19070 
19071 
19072 /*
19073  * One for every netstack in the system.
19074  * We use a union so that the compilar and lint can provide type checking -
19075  * in principle we could have
19076  * #define	netstack_arp		netstack_modules[NS_ARP]
19077  * etc, but that would imply void * types hence no type checking by the
19078  * compiler.
19079  *
19080  * All the fields in netstack_t except netstack_next are protected by
19081  * netstack_lock. netstack_next is protected by netstack_g_lock.
19082  */
19083 struct netstack {
19084  union {
19085   void *nu_modules[(18 +1)];
19086   struct {
19087    struct dls_stack *nu_dls;
19088    struct iptun_stack *nu_iptun;
19089    struct str_stack *nu_str;
19090    struct hook_stack *nu_hook;
19091    struct neti_stack *nu_neti;
19092    struct arp_stack *nu_arp;
19093    struct ip_stack *nu_ip;
19094    struct icmp_stack *nu_icmp;
19095    struct udp_stack *nu_udp;
19096    struct tcp_stack *nu_tcp;
19097    struct sctp_stack *nu_sctp;
19098    struct rts_stack *nu_rts;
19099    struct ipsec_stack *nu_ipsec;
19100    struct keysock_stack *nu_keysock;
19101    struct spd_stack *nu_spdsock;
19102    struct ipsecah_stack *nu_ipsecah;
19103    struct ipsecesp_stack *nu_ipsecesp;
19104    struct ipnet_stack *nu_ipnet;
19105    struct ilb_stack *nu_ilb;
19106   } nu_s;
19107  } netstack_u;
19108 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h"
19109  nm_state_t netstack_m_state[(18 +1)]; /* module state */
19110 
19111  kmutex_t netstack_lock;
19112  struct netstack *netstack_next;
19113  netstackid_t netstack_stackid;
19114  int netstack_numzones; /* Number of zones using this */
19115  int netstack_refcnt; /* Number of hold-rele */
19116  int netstack_flags; /* See below */
19117 
19118 
19119 
19120 
19121 
19122 };
19123 typedef struct netstack netstack_t;
19124 
19125 /* netstack_flags values */
19126 # 209 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netstack.h"
19127 /*
19128  * One for each of the NS_* values.
19129  */
19130 struct netstack_registry {
19131  int nr_flags; /* 0 if nothing registered */
19132  void *(*nr_create)(netstackid_t, netstack_t *);
19133  void (*nr_shutdown)(netstackid_t, void *);
19134  void (*nr_destroy)(netstackid_t, void *);
19135 };
19136 
19137 /* nr_flags values */
19138 
19139 
19140 
19141 /*
19142  * To support kstat_create_netstack() using kstat_add_zone we need
19143  * to track both
19144  *  - all zoneids that use the global/shared stack
19145  *  - all kstats that have been added for the shared stack
19146  */
19147 
19148 extern void netstack_init(void);
19149 extern void netstack_hold(netstack_t *);
19150 extern void netstack_rele(netstack_t *);
19151 extern netstack_t *netstack_find_by_cred(const cred_t *);
19152 extern netstack_t *netstack_find_by_stackid(netstackid_t);
19153 extern netstack_t *netstack_find_by_zoneid(zoneid_t);
19154 
19155 extern zoneid_t netstackid_to_zoneid(netstackid_t);
19156 extern zoneid_t netstack_get_zoneid(netstack_t *);
19157 extern netstackid_t zoneid_to_netstackid(zoneid_t);
19158 
19159 extern netstack_t *netstack_get_current(void);
19160 
19161 /*
19162  * Register interest in changes to the set of netstacks.
19163  * The createfn and destroyfn are required, but the shutdownfn can be
19164  * NULL.
19165  * Note that due to the current zsd implementation, when the create
19166  * function is called the zone isn't fully present, thus functions
19167  * like zone_find_by_* will fail, hence the create function can not
19168  * use many zones kernel functions including zcmn_err().
19169  */
19170 extern void netstack_register(int,
19171     void *(*)(netstackid_t, netstack_t *),
19172     void (*)(netstackid_t, void *),
19173     void (*)(netstackid_t, void *));
19174 extern void netstack_unregister(int);
19175 extern kstat_t *kstat_create_netstack(char *, int, char *, char *, uchar_t,
19176     uint_t, uchar_t, netstackid_t);
19177 extern void kstat_delete_netstack(kstat_t *, netstackid_t);
19178 
19179 /*
19180  * Simple support for walking all the netstacks.
19181  * The caller of netstack_next() needs to call netstack_rele() when
19182  * done with a netstack.
19183  */
19184 typedef int netstack_handle_t;
19185 
19186 extern void netstack_next_init(netstack_handle_t *);
19187 extern void netstack_next_fini(netstack_handle_t *);
19188 extern netstack_t *netstack_next(netstack_handle_t *);
19189 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
19190 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h" 1
19191 /*
19192  * CDDL HEADER START
19193  *
19194  * The contents of this file are subject to the terms of the
19195  * Common Development and Distribution License (the "License").
19196  * You may not use this file except in compliance with the License.
19197  *
19198  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19199  * or http://www.opensolaris.org/os/licensing.
19200  * See the License for the specific language governing permissions
19201  * and limitations under the License.
19202  *
19203  * When distributing Covered Code, include this CDDL HEADER in each
19204  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19205  * If applicable, add the following below this CDDL HEADER, with the
19206  * fields enclosed by brackets "[]" replaced with your own identifying
19207  * information: Portions Copyright [yyyy] [name of copyright owner]
19208  *
19209  * CDDL HEADER END
19210  */
19211 /*
19212  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
19213  *
19214  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
19215  * Use is subject to license terms.
19216  */
19217 
19218 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
19219 /*	  All Rights Reserved  	*/
19220 
19221 
19222 
19223 
19224 
19225 
19226 
19227 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
19228 /*
19229  * CDDL HEADER START
19230  *
19231  * The contents of this file are subject to the terms of the
19232  * Common Development and Distribution License (the "License").
19233  * You may not use this file except in compliance with the License.
19234  *
19235  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19236  * or http://www.opensolaris.org/os/licensing.
19237  * See the License for the specific language governing permissions
19238  * and limitations under the License.
19239  *
19240  * When distributing Covered Code, include this CDDL HEADER in each
19241  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19242  * If applicable, add the following below this CDDL HEADER, with the
19243  * fields enclosed by brackets "[]" replaced with your own identifying
19244  * information: Portions Copyright [yyyy] [name of copyright owner]
19245  *
19246  * CDDL HEADER END
19247  */
19248 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
19249 /*	  All Rights Reserved  	*/
19250 
19251 
19252 /*
19253  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
19254  * Use is subject to license terms.
19255  *
19256  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
19257  * Copyright 2016 Joyent, Inc.
19258  */
19259 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h" 2
19260 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
19261 /*
19262  * CDDL HEADER START
19263  *
19264  * The contents of this file are subject to the terms of the
19265  * Common Development and Distribution License (the "License").
19266  * You may not use this file except in compliance with the License.
19267  *
19268  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19269  * or http://www.opensolaris.org/os/licensing.
19270  * See the License for the specific language governing permissions
19271  * and limitations under the License.
19272  *
19273  * When distributing Covered Code, include this CDDL HEADER in each
19274  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19275  * If applicable, add the following below this CDDL HEADER, with the
19276  * fields enclosed by brackets "[]" replaced with your own identifying
19277  * information: Portions Copyright [yyyy] [name of copyright owner]
19278  *
19279  * CDDL HEADER END
19280  */
19281 /*
19282  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
19283  * Use is subject to license terms.
19284  */
19285 
19286 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
19287 /*	  All Rights Reserved  	*/
19288 
19289 /*
19290  * Portions of this source code were derived from Berkeley 4.3 BSD
19291  * under license from the Regents of the University of California.
19292  */
19293 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h" 2
19294 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h"
19295 /*			17-21	   reserved for obsolete interface */
19296 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h"
19297 /*
19298  * Functions reserved for A_FREEZE (may not be available on all platforms)
19299  * Note:  AD_COMPRESS, AD_CHECK and AD_FORCE are now obsolete
19300  *	The first two are succeeded by AD_SUSPEND_TO_DISK and
19301  *		AD_CHECK_SUSPEND_TO_DISK respectively.
19302  *	AD_FORCE should not be used by any new application
19303  *
19304  *	We maintain compatibility with the earlier interfaces:
19305  *	AD_COMPRESS and AD_CHECK, by preserving those values
19306  *	in the corresponding new interfaces
19307  */
19308 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h"
19309 /*
19310  * NOTE: the following defines comprise an Unstable interface.  Their semantics
19311  * may change or they may be removed completely in a later release
19312  */
19313 
19314 
19315 
19316 
19317 
19318 
19319 
19320 /*
19321  * Functions of A_CONFIG.  Unstable interface.
19322  */
19323 
19324 
19325 /*
19326  * When 'mdep' (the second argument to uadmin(2)) is initialized for A_REBOOT,
19327  * A_SHUTDOWN or A_DUMP, it represents the boot arguments string of at most
19328  * 256 characters.
19329  */
19330 
19331 
19332 
19333 /*
19334  * FMRI for boot-config service.
19335  */
19336 
19337 
19338 
19339 /*
19340  * Property group that contains all Fast Reboot configuration properties.
19341  */
19342 
19343 
19344 /*
19345  * Property group that contains all Fast Reboot blacklisting information.
19346  */
19347 
19348 
19349 /*
19350  * Non-persistent property group which contains all the properties that
19351  * will override settings in the BOOT_CONFIG_PG_PARAMS property group.
19352  */
19353 
19354 
19355 
19356 
19357 /*
19358  * Flag representations of fastboot configuration.
19359  */
19360 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uadmin.h"
19361 extern int uadmin(int, int, uintptr_t);
19362 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
19363 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ksynch.h" 1
19364 /*
19365  * CDDL HEADER START
19366  *
19367  * The contents of this file are subject to the terms of the
19368  * Common Development and Distribution License, Version 1.0 only
19369  * (the "License").  You may not use this file except in compliance
19370  * with the License.
19371  *
19372  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19373  * or http://www.opensolaris.org/os/licensing.
19374  * See the License for the specific language governing permissions
19375  * and limitations under the License.
19376  *
19377  * When distributing Covered Code, include this CDDL HEADER in each
19378  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19379  * If applicable, add the following below this CDDL HEADER, with the
19380  * fields enclosed by brackets "[]" replaced with your own identifying
19381  * information: Portions Copyright [yyyy] [name of copyright owner]
19382  *
19383  * CDDL HEADER END
19384  */
19385 /*
19386  *	Copyright (c) 1991, Sun Microsystems, Inc.
19387  */
19388 
19389 /*
19390  * DKI/DDI MT synchronization primitives.
19391  */
19392 
19393 
19394 
19395 
19396 #pragma ident "%Z%%M%	%I%	%E% SMI"
19397 
19398 /*
19399  * The presence of this file is specified by the DKI/DDI.
19400  */
19401 
19402 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 1
19403 /*
19404  * CDDL HEADER START
19405  *
19406  * The contents of this file are subject to the terms of the
19407  * Common Development and Distribution License, Version 1.0 only
19408  * (the "License").  You may not use this file except in compliance
19409  * with the License.
19410  *
19411  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19412  * or http://www.opensolaris.org/os/licensing.
19413  * See the License for the specific language governing permissions
19414  * and limitations under the License.
19415  *
19416  * When distributing Covered Code, include this CDDL HEADER in each
19417  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19418  * If applicable, add the following below this CDDL HEADER, with the
19419  * fields enclosed by brackets "[]" replaced with your own identifying
19420  * information: Portions Copyright [yyyy] [name of copyright owner]
19421  *
19422  * CDDL HEADER END
19423  */
19424 /*
19425  * Copyright (c) 1991-1998 by Sun Microsystems, Inc.
19426  * All rights reserved.
19427  */
19428 
19429 /*
19430  * t_lock.h:	Prototypes for disp_locks, plus include files
19431  *		that describe the interfaces to kernel synch.
19432  *		objects.
19433  */
19434 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ksynch.h" 2
19435 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
19436 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
19437 /*
19438  * CDDL HEADER START
19439  *
19440  * The contents of this file are subject to the terms of the
19441  * Common Development and Distribution License (the "License").
19442  * You may not use this file except in compliance with the License.
19443  *
19444  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19445  * or http://www.opensolaris.org/os/licensing.
19446  * See the License for the specific language governing permissions
19447  * and limitations under the License.
19448  *
19449  * When distributing Covered Code, include this CDDL HEADER in each
19450  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19451  * If applicable, add the following below this CDDL HEADER, with the
19452  * fields enclosed by brackets "[]" replaced with your own identifying
19453  * information: Portions Copyright [yyyy] [name of copyright owner]
19454  *
19455  * CDDL HEADER END
19456  */
19457 /*
19458  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
19459  * Use is subject to license terms.
19460  */
19461 
19462 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
19463 /*	  All Rights Reserved	*/
19464 
19465 /*
19466  * Portions of this source code were derived from Berkeley 4.3 BSD
19467  * under license from the Regents of the University of California.
19468  */
19469 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
19470 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
19471 /*
19472  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
19473  * Use is subject to license terms.
19474  *
19475  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
19476  */
19477 /*
19478  * Copyright (c) 1982, 1986 Regents of the University of California.
19479  * All rights reserved.
19480  *
19481  * Redistribution and use in source and binary forms are permitted
19482  * provided that this notice is preserved and that due credit is given
19483  * to the University of California at Berkeley. The name of the University
19484  * may not be used to endorse or promote products derived from this
19485  * software without specific prior written permission. This software
19486  * is provided ``as is'' without express or implied warranty.
19487  */
19488 
19489 /*
19490  * Constants and structures defined by the internet system,
19491  * according to following documents
19492  *
19493  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
19494  *	http://www.iana.org/assignments/protocol-numbers
19495  *	http://www.iana.org/assignments/port-numbers
19496  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
19497  *
19498  */
19499 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h" 2
19500 
19501 
19502 
19503 
19504 
19505 /*
19506  * NOTE
19507  *
19508  * The contents of this file are private to the implementation of
19509  * Solaris and are subject to change at any time without notice.
19510  * Applications and drivers using these interfaces may fail to
19511  * run on future releases.
19512  */
19513 
19514 /* Available both in kernel and for user space */
19515 
19516 /* zone id restrictions and special ids */
19517 
19518 
19519 
19520 
19521 
19522 
19523 /*
19524  * Special zoneid_t token to refer to all zones.
19525  */
19526 
19527 
19528 /* system call subcodes */
19529 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h"
19530 /* zone attributes */
19531 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h"
19532 /* Start of the brand-specific attribute namespace */
19533 # 129 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h"
19534 /*
19535  * Exit values that may be returned by scripts or programs invoked by various
19536  * zone commands.
19537  *
19538  * These are defined as:
19539  *
19540  *	ZONE_SUBPROC_OK
19541  *	===============
19542  *	The subprocess completed successfully.
19543  *
19544  *	ZONE_SUBPROC_USAGE
19545  *	==================
19546  *	The subprocess failed with a usage message, or a usage message should
19547  *	be output in its behalf.
19548  *
19549  *	ZONE_SUBPROC_NOTCOMPLETE
19550  *	========================
19551  *	The subprocess did not complete, but the actions performed by the
19552  *	subprocess require no recovery actions by the user.
19553  *
19554  *	For example, if the subprocess were called by "zoneadm install," the
19555  *	installation of the zone did not succeed but the user need not perform
19556  *	a "zoneadm uninstall" before attempting another install.
19557  *
19558  *	ZONE_SUBPROC_FATAL
19559  *	==================
19560  *	The subprocess failed in a fatal manner, usually one that will require
19561  *	some type of recovery action by the user.
19562  *
19563  *	For example, if the subprocess were called by "zoneadm install," the
19564  *	installation of the zone did not succeed and the user will need to
19565  *	perform a "zoneadm uninstall" before another install attempt is
19566  *	possible.
19567  *
19568  *	The non-success exit values are large to avoid accidental collision
19569  *	with values used internally by some commands (e.g. "Z_ERR" and
19570  *	"Z_USAGE" as used by zoneadm.)
19571  */
19572 # 189 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/zone.h"
19573 typedef struct {
19574  const char *zone_name;
19575  const char *zone_root;
19576  const struct priv_set *zone_privs;
19577  size_t zone_privssz;
19578  const char *rctlbuf;
19579  size_t rctlbufsz;
19580  int *extended_error;
19581  const char *zfsbuf;
19582  size_t zfsbufsz;
19583  int match; /* match level */
19584  uint32_t doi; /* DOI for label */
19585  const bslabel_t *label; /* label associated with zone */
19586  int flags;
19587 } zone_def;
19588 
19589 /* extended error information */
19590 
19591 
19592 
19593 
19594 
19595 /*
19596  * zone_status values
19597  *
19598  * You must modify zone_status_names in mdb(1M)'s genunix module
19599  * (genunix/zone.c) when you modify this enum.
19600  */
19601 typedef enum {
19602  ZONE_IS_UNINITIALIZED = 0,
19603  ZONE_IS_INITIALIZED,
19604  ZONE_IS_READY,
19605  ZONE_IS_BOOTING,
19606  ZONE_IS_RUNNING,
19607  ZONE_IS_SHUTTING_DOWN,
19608  ZONE_IS_EMPTY,
19609  ZONE_IS_DOWN,
19610  ZONE_IS_DYING,
19611  ZONE_IS_DEAD
19612 } zone_status_t;
19613 
19614 
19615 
19616 /*
19617  * Valid commands which may be issued by zoneadm to zoneadmd.  The kernel also
19618  * communicates with zoneadmd, but only uses Z_REBOOT and Z_HALT.
19619  */
19620 typedef enum zone_cmd {
19621  Z_READY, Z_BOOT, Z_FORCEBOOT, Z_REBOOT, Z_HALT, Z_NOTE_UNINSTALLING,
19622  Z_MOUNT, Z_FORCEMOUNT, Z_UNMOUNT, Z_SHUTDOWN
19623 } zone_cmd_t;
19624 
19625 /*
19626  * The structure of a request to zoneadmd.
19627  */
19628 typedef struct zone_cmd_arg {
19629  uint64_t uniqid; /* unique "generation number" */
19630  zone_cmd_t cmd; /* requested action */
19631  uint32_t _pad; /* need consistent 32/64 bit alignmt */
19632  char locale[1024]; /* locale in which to render messages */
19633  char bootbuf[256]; /* arguments passed to zone_boot() */
19634 } zone_cmd_arg_t;
19635 
19636 /*
19637  * Structure of zoneadmd's response to a request.  A NULL return value means
19638  * the caller should attempt to restart zoneadmd and retry.
19639  */
19640 typedef struct zone_cmd_rval {
19641  int rval; /* return value of request */
19642  char errbuf[1]; /* variable-sized buffer containing error messages */
19643 } zone_cmd_rval_t;
19644 
19645 /*
19646  * The zone support infrastructure uses the zone name as a component
19647  * of unix domain (AF_UNIX) sockets, which are limited to 108 characters
19648  * in length, so ZONENAME_MAX is limited by that.
19649  */
19650 
19651 
19652 
19653 
19654 /*
19655  * Extended Regular expression (see regex(5)) which matches all valid zone
19656  * names.
19657  */
19658 
19659 
19660 /*
19661  * Where the zones support infrastructure places temporary files.
19662  */
19663 
19664 
19665 /*
19666  * The path to the door used by clients to communicate with zoneadmd.
19667  */
19668 
19669 
19670 
19671 /* zone_flags */
19672 /*
19673  * Threads that read or write the following flag must hold zone_lock.
19674  */
19675 
19676 
19677 /*
19678  * The following threads are set when the zone is created and never changed.
19679  * Threads that test for these flags don't have to hold zone_lock.
19680  */
19681 
19682 
19683 
19684 
19685 
19686 /* zone_create flags */
19687 
19688 
19689 /* zone network properties */
19690 
19691 
19692 
19693 
19694 
19695 
19696 typedef struct zone_net_data {
19697  int zn_type;
19698  int zn_len;
19699  datalink_id_t zn_linkid;
19700  uint8_t zn_val[1];
19701 } zone_net_data_t;
19702 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 2
19703 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/priv.h" 1
19704 /*
19705  * CDDL HEADER START
19706  *
19707  * The contents of this file are subject to the terms of the
19708  * Common Development and Distribution License (the "License").
19709  * You may not use this file except in compliance with the License.
19710  *
19711  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19712  * or http://www.opensolaris.org/os/licensing.
19713  * See the License for the specific language governing permissions
19714  * and limitations under the License.
19715  *
19716  * When distributing Covered Code, include this CDDL HEADER in each
19717  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19718  * If applicable, add the following below this CDDL HEADER, with the
19719  * fields enclosed by brackets "[]" replaced with your own identifying
19720  * information: Portions Copyright [yyyy] [name of copyright owner]
19721  *
19722  * CDDL HEADER END
19723  */
19724 /*
19725  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
19726  *
19727  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
19728  */
19729 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 2
19730 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h" 1
19731 /*
19732  * CDDL HEADER START
19733  *
19734  * The contents of this file are subject to the terms of the
19735  * Common Development and Distribution License (the "License").
19736  * You may not use this file except in compliance with the License.
19737  *
19738  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19739  * or http://www.opensolaris.org/os/licensing.
19740  * See the License for the specific language governing permissions
19741  * and limitations under the License.
19742  *
19743  * When distributing Covered Code, include this CDDL HEADER in each
19744  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19745  * If applicable, add the following below this CDDL HEADER, with the
19746  * fields enclosed by brackets "[]" replaced with your own identifying
19747  * information: Portions Copyright [yyyy] [name of copyright owner]
19748  *
19749  * CDDL HEADER END
19750  */
19751 /*
19752  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
19753  * Use is subject to license terms.
19754  */
19755 
19756 
19757 
19758 
19759 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 1
19760 /*
19761  * CDDL HEADER START
19762  *
19763  * The contents of this file are subject to the terms of the
19764  * Common Development and Distribution License (the "License").
19765  * You may not use this file except in compliance with the License.
19766  *
19767  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19768  * or http://www.opensolaris.org/os/licensing.
19769  * See the License for the specific language governing permissions
19770  * and limitations under the License.
19771  *
19772  * When distributing Covered Code, include this CDDL HEADER in each
19773  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19774  * If applicable, add the following below this CDDL HEADER, with the
19775  * fields enclosed by brackets "[]" replaced with your own identifying
19776  * information: Portions Copyright [yyyy] [name of copyright owner]
19777  *
19778  * CDDL HEADER END
19779  */
19780 /*
19781  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
19782  * Use is subject to license terms.
19783  * Copyright 2015 Nexenta Systems, Inc.
19784  */
19785 
19786 
19787 
19788 
19789 #pragma ident "%Z%%M%	%I%	%E% SMI"
19790 
19791 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
19792 /*
19793  * CDDL HEADER START
19794  *
19795  * The contents of this file are subject to the terms of the
19796  * Common Development and Distribution License, Version 1.0 only
19797  * (the "License").  You may not use this file except in compliance
19798  * with the License.
19799  *
19800  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19801  * or http://www.opensolaris.org/os/licensing.
19802  * See the License for the specific language governing permissions
19803  * and limitations under the License.
19804  *
19805  * When distributing Covered Code, include this CDDL HEADER in each
19806  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19807  * If applicable, add the following below this CDDL HEADER, with the
19808  * fields enclosed by brackets "[]" replaced with your own identifying
19809  * information: Portions Copyright [yyyy] [name of copyright owner]
19810  *
19811  * CDDL HEADER END
19812  */
19813 /*
19814  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
19815  *
19816  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
19817  * Use is subject to license terms.
19818  */
19819 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 2
19820 
19821 
19822 
19823 
19824 
19825 /*
19826  * Interoperability types for programs. Used for:
19827  *
19828  * Crossing between 32-bit and 64-bit domains.
19829  *
19830  * On disk data formats such as filesystem meta data
19831  * and disk label.
19832  *
19833  * Note: Applications should never include this
19834  *       header file.
19835  */
19836 typedef uint32_t caddr32_t;
19837 typedef int32_t daddr32_t;
19838 typedef int32_t off32_t;
19839 typedef uint32_t ino32_t;
19840 typedef int32_t blkcnt32_t;
19841 typedef uint32_t fsblkcnt32_t;
19842 typedef uint32_t fsfilcnt32_t;
19843 typedef int32_t id32_t;
19844 typedef uint32_t major32_t;
19845 typedef uint32_t minor32_t;
19846 typedef int32_t key32_t;
19847 typedef uint32_t mode32_t;
19848 typedef uint32_t uid32_t;
19849 typedef uint32_t gid32_t;
19850 typedef uint32_t nlink32_t;
19851 typedef uint32_t dev32_t;
19852 typedef int32_t pid32_t;
19853 typedef uint32_t size32_t;
19854 typedef int32_t ssize32_t;
19855 typedef int32_t time32_t;
19856 typedef int32_t clock32_t;
19857 typedef uint32_t uintptr32_t;
19858 typedef int32_t intptr32_t;
19859 
19860 struct timeval32 {
19861  time32_t tv_sec; /* seconds */
19862  int32_t tv_usec; /* and microseconds */
19863 };
19864 
19865 typedef struct timespec32 {
19866  time32_t tv_sec; /* seconds */
19867  int32_t tv_nsec; /* and nanoseconds */
19868 } timespec32_t;
19869 
19870 typedef struct timespec32 timestruc32_t;
19871 
19872 typedef struct itimerspec32 {
19873  struct timespec32 it_interval;
19874  struct timespec32 it_value;
19875 } itimerspec32_t;
19876 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h" 2
19877 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/tsol/label.h" 1
19878 /*
19879  * CDDL HEADER START
19880  *
19881  * The contents of this file are subject to the terms of the
19882  * Common Development and Distribution License (the "License").
19883  * You may not use this file except in compliance with the License.
19884  *
19885  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19886  * or http://www.opensolaris.org/os/licensing.
19887  * See the License for the specific language governing permissions
19888  * and limitations under the License.
19889  *
19890  * When distributing Covered Code, include this CDDL HEADER in each
19891  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19892  * If applicable, add the following below this CDDL HEADER, with the
19893  * fields enclosed by brackets "[]" replaced with your own identifying
19894  * information: Portions Copyright [yyyy] [name of copyright owner]
19895  *
19896  * CDDL HEADER END
19897  */
19898 /*
19899  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
19900  * Use is subject to license terms.
19901  */
19902 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h" 2
19903 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/priv.h" 1
19904 /*
19905  * CDDL HEADER START
19906  *
19907  * The contents of this file are subject to the terms of the
19908  * Common Development and Distribution License (the "License").
19909  * You may not use this file except in compliance with the License.
19910  *
19911  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19912  * or http://www.opensolaris.org/os/licensing.
19913  * See the License for the specific language governing permissions
19914  * and limitations under the License.
19915  *
19916  * When distributing Covered Code, include this CDDL HEADER in each
19917  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19918  * If applicable, add the following below this CDDL HEADER, with the
19919  * fields enclosed by brackets "[]" replaced with your own identifying
19920  * information: Portions Copyright [yyyy] [name of copyright owner]
19921  *
19922  * CDDL HEADER END
19923  */
19924 /*
19925  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
19926  *
19927  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
19928  * Use is subject to license terms.
19929  */
19930 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h" 2
19931 
19932 
19933 
19934 
19935 
19936 /* Procedural Interface Structure Definitions */
19937 
19938 struct label_info { /* structure returned by label_info */
19939  short ilabel_len; /* max Information Label length */
19940  short slabel_len; /* max Sensitivity Label length */
19941  short clabel_len; /* max CMW Label length */
19942  short clear_len; /* max Clearance Label length */
19943  short vers_len; /* version string length */
19944  short header_len; /* max len of banner page header */
19945  short protect_as_len; /* max len of banner page protect as */
19946  short caveats_len; /* max len of banner page caveats */
19947  short channels_len; /* max len of banner page channels */
19948 };
19949 
19950 typedef struct label_set_identifier { /* valid label set identifier */
19951  int type; /* type of the set */
19952  char *name; /* name of the set if needed */
19953 } set_id;
19954 
19955 struct name_fields { /* names for label builder fields */
19956  char *class_name; /* Classifications field name */
19957  char *comps_name; /* Compartments field name */
19958  char *marks_name; /* Markings field name */
19959 };
19960 
19961 /* Label Set Identifier Types */
19962 
19963 /*
19964  * The accreditation ranges as specified in the label encodings file.
19965  * The name parameter is ignored.
19966  *
19967  * System Accreditation Range is all valid labels plus Admin High and Low.
19968  *
19969  * User Accreditation Range is valid user labels as defined in the
19970  *	ACCREDITATION RANGE: section of the label encodings file.
19971  */
19972 
19973 
19974 
19975 
19976 
19977 /* System Call Interface Definitions */
19978 
19979 extern int getlabel(const char *, m_label_t *);
19980 extern int fgetlabel(int, m_label_t *);
19981 
19982 extern int getplabel(m_label_t *);
19983 extern int setflabel(const char *, m_label_t *);
19984 extern char *getpathbylabel(const char *, char *, size_t,
19985     const m_label_t *sl);
19986 extern m_label_t *getzonelabelbyid(zoneid_t);
19987 extern m_label_t *getzonelabelbyname(const char *);
19988 extern zoneid_t getzoneidbylabel(const m_label_t *);
19989 extern char *getzonenamebylabel(const m_label_t *);
19990 extern char *getzonerootbyid(zoneid_t);
19991 extern char *getzonerootbyname(const char *);
19992 extern char *getzonerootbylabel(const m_label_t *);
19993 extern m_label_t *getlabelbypath(const char *);
19994 
19995 
19996 /* Flag word values */
19997 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/tsol/label.h"
19998       /* implies NEW_LABEL */
19999 
20000 
20001 
20002 
20003 /* Procedure Interface Definitions available to user */
20004 
20005 /* APIs shared with the kernel are in <sys/tsol/label.h */
20006 
20007 extern m_label_t *blabel_alloc(void);
20008 extern void blabel_free(m_label_t *);
20009 extern size32_t blabel_size(void);
20010 extern char *bsltoh(const m_label_t *);
20011 extern char *bcleartoh(const m_label_t *);
20012 
20013 extern char *bsltoh_r(const m_label_t *, char *);
20014 extern char *bcleartoh_r(const m_label_t *, char *);
20015 extern char *h_alloc(uint8_t);
20016 extern void h_free(char *);
20017 
20018 extern int htobsl(const char *, m_label_t *);
20019 extern int htobclear(const char *, m_label_t *);
20020 
20021 extern m_range_t *getuserrange(const char *);
20022 extern m_range_t *getdevicerange(const char *);
20023 
20024 extern int set_effective_priv(priv_op_t, int, ...);
20025 extern int set_inheritable_priv(priv_op_t, int, ...);
20026 extern int set_permitted_priv(priv_op_t, int, ...);
20027 extern int is_system_labeled(void);
20028 
20029 /* Procedures needed for multi-level printing */
20030 
20031 extern int tsol_check_admin_auth(uid_t uid);
20032 
20033 /* APIs implemented via labeld */
20034 
20035 extern int blinset(const m_label_t *, const set_id *);
20036 extern int labelinfo(struct label_info *);
20037 extern ssize_t labelvers(char **, size_t);
20038 extern char *bltocolor(const m_label_t *);
20039 extern char *bltocolor_r(const m_label_t *, size_t, char *);
20040 
20041 extern ssize_t bsltos(const m_label_t *, char **, size_t, int);
20042 extern ssize_t bcleartos(const m_label_t *, char **, size_t, int);
20043 
20044 
20045 extern char *sbsltos(const m_label_t *, size_t);
20046 extern char *sbcleartos(const m_label_t *, size_t);
20047 
20048 
20049 extern int stobsl(const char *, m_label_t *, int, int *);
20050 extern int stobclear(const char *, m_label_t *, int, int *);
20051 extern int bslvalid(const m_label_t *);
20052 extern int bclearvalid(const m_label_t *);
20053 
20054 /* DIA label conversion and parsing */
20055 
20056 /* Conversion types */
20057 
20058 typedef enum _m_label_str {
20059  M_LABEL = 1, /* process or user clearance */
20060  M_INTERNAL = 2, /* internal form for use in public databases */
20061  M_COLOR = 3, /* process label color */
20062  PRINTER_TOP_BOTTOM = 4, /* DIA banner page top/bottom */
20063  PRINTER_LABEL = 5, /* DIA banner page label */
20064  PRINTER_CAVEATS = 6, /* DIA banner page caveats */
20065  PRINTER_CHANNELS = 7 /* DIA banner page handling channels */
20066 } m_label_str_t;
20067 
20068 /* Flags for conversion, not all flags apply to all types */
20069 
20070 
20071 
20072 
20073 extern int label_to_str(const m_label_t *, char **, const m_label_str_t,
20074     uint_t);
20075 extern int l_to_str_internal(const m_label_t *, char **);
20076 
20077 /* Parsing types */
20078 typedef enum _m_label_type {
20079  MAC_LABEL = 1, /* process or object label */
20080  USER_CLEAR = 2 /* user's clearance (LUB) */
20081 } m_label_type_t;
20082 
20083 /* Flags for parsing */
20084 
20085 
20086 
20087 
20088 
20089 
20090 /* EINVAL sub codes */
20091 
20092 
20093 
20094  /* bad requested label type, bad previous label type */
20095 
20096 
20097 extern int str_to_label(const char *, m_label_t **, const m_label_type_t,
20098     uint_t, int *);
20099 extern int hexstr_to_label(const char *, m_label_t *);
20100 
20101 extern m_label_t *m_label_alloc(const m_label_type_t);
20102 
20103 extern int m_label_dup(m_label_t **, const m_label_t *);
20104 
20105 extern void m_label_free(m_label_t *);
20106 
20107 /* Contract Private interfaces with the label builder GUIs */
20108 
20109 extern int bslcvtfull(const m_label_t *, const m_range_t *, int,
20110     char **, char **[], char **[], char *[], int *, int *);
20111 extern int bslcvt(const m_label_t *, int, char **, char *[]);
20112 extern int bclearcvtfull(const m_label_t *, const m_range_t *, int,
20113     char **, char **[], char **[], char *[], int *, int *);
20114 extern int bclearcvt(const m_label_t *, int, char **, char *[]);
20115 
20116 extern int labelfields(struct name_fields *);
20117 extern int userdefs(m_label_t *, m_label_t *);
20118 extern int zonecopy(m_label_t *, char *, char *, char *, int);
20119 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/zone.h" 2
20120 
20121 
20122 
20123 
20124 
20125 /*
20126  * Functions for mapping between id and name for active zones.
20127  */
20128 extern zoneid_t getzoneid(void);
20129 extern zoneid_t getzoneidbyname(const char *);
20130 extern ssize_t getzonenamebyid(zoneid_t, char *, size_t);
20131 
20132 /*
20133  * NOTE
20134  *
20135  * The remaining contents of this file are private to the implementation
20136  * of Solaris and are subject to change at any time without notice,
20137  * Applications using these interfaces may fail to run on future releases.
20138  */
20139 
20140 extern int zonept(int, zoneid_t);
20141 extern int zone_get_id(const char *, zoneid_t *);
20142 
20143 /* System call API */
20144 extern zoneid_t zone_create(const char *, const char *,
20145     const struct priv_set *, const char *, size_t, const char *, size_t, int *,
20146     int, int, const bslabel_t *, int);
20147 extern int zone_boot(zoneid_t);
20148 extern int zone_destroy(zoneid_t);
20149 extern ssize_t zone_getattr(zoneid_t, int, void *, size_t);
20150 extern int zone_setattr(zoneid_t, int, void *, size_t);
20151 extern int zone_enter(zoneid_t);
20152 extern int zone_list(zoneid_t *, uint_t *);
20153 extern int zone_shutdown(zoneid_t);
20154 extern int zone_version(int *);
20155 extern int zone_add_datalink(zoneid_t, datalink_id_t);
20156 extern int zone_remove_datalink(zoneid_t, datalink_id_t);
20157 extern int zone_check_datalink(zoneid_t *, datalink_id_t);
20158 extern int zone_list_datalink(zoneid_t, int *, datalink_id_t *);
20159 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
20160 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libbrand.h" 1
20161 /*
20162  * CDDL HEADER START
20163  *
20164  * The contents of this file are subject to the terms of the
20165  * Common Development and Distribution License (the "License").
20166  * You may not use this file except in compliance with the License.
20167  *
20168  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20169  * or http://www.opensolaris.org/os/licensing.
20170  * See the License for the specific language governing permissions
20171  * and limitations under the License.
20172  *
20173  * When distributing Covered Code, include this CDDL HEADER in each
20174  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20175  * If applicable, add the following below this CDDL HEADER, with the
20176  * fields enclosed by brackets "[]" replaced with your own identifying
20177  * information: Portions Copyright [yyyy] [name of copyright owner]
20178  *
20179  * CDDL HEADER END
20180  */
20181 
20182 /*
20183  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
20184  * Copyright (c) 2011, Joyent, Inc. All rights reserved.
20185  * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
20186  */
20187 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libbrand.h"
20188 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
20189 /*
20190  * CDDL HEADER START
20191  *
20192  * The contents of this file are subject to the terms of the
20193  * Common Development and Distribution License (the "License").
20194  * You may not use this file except in compliance with the License.
20195  *
20196  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20197  * or http://www.opensolaris.org/os/licensing.
20198  * See the License for the specific language governing permissions
20199  * and limitations under the License.
20200  *
20201  * When distributing Covered Code, include this CDDL HEADER in each
20202  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20203  * If applicable, add the following below this CDDL HEADER, with the
20204  * fields enclosed by brackets "[]" replaced with your own identifying
20205  * information: Portions Copyright [yyyy] [name of copyright owner]
20206  *
20207  * CDDL HEADER END
20208  */
20209 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
20210 /*	  All Rights Reserved  	*/
20211 
20212 
20213 /*
20214  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20215  * Use is subject to license terms.
20216  *
20217  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
20218  * Copyright 2016 Joyent, Inc.
20219  */
20220 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libbrand.h" 2
20221 
20222 typedef struct __brand_handle *brand_handle_t;
20223 
20224 typedef struct priv_iter_s {
20225  char *pi_name;
20226  char *pi_set;
20227  char *pi_iptype;
20228 } priv_iter_t;
20229 
20230 extern brand_handle_t brand_open(const char *);
20231 extern void brand_close(brand_handle_t);
20232 
20233 extern boolean_t brand_allow_exclusive_ip(brand_handle_t);
20234 
20235 extern int brand_get_attach(brand_handle_t, const char *, const char *,
20236     char *, size_t);
20237 extern int brand_get_boot(brand_handle_t, const char *, const char *,
20238     char *, size_t);
20239 extern int brand_get_brandname(brand_handle_t, char *, size_t);
20240 extern int brand_get_clone(brand_handle_t, const char *, const char *,
20241     char *, size_t);
20242 extern int brand_get_detach(brand_handle_t, const char *, const char *,
20243     char *, size_t);
20244 extern int brand_get_shutdown(brand_handle_t, const char *, const char *,
20245     char *, size_t);
20246 extern int brand_get_halt(brand_handle_t, const char *, const char *,
20247     char *, size_t);
20248 extern int brand_get_initname(brand_handle_t, char *, size_t);
20249 extern boolean_t brand_restartinit(brand_handle_t);
20250 extern int brand_get_install(brand_handle_t, const char *, const char *,
20251     char *, size_t);
20252 extern int brand_get_installopts(brand_handle_t, char *, size_t);
20253 extern int brand_get_login_cmd(brand_handle_t, const char *, char *, size_t);
20254 extern int brand_get_forcedlogin_cmd(brand_handle_t, const char *,
20255     char *, size_t);
20256 extern int brand_get_modname(brand_handle_t, char *, size_t);
20257 extern int brand_get_postattach(brand_handle_t, const char *, const char *,
20258     char *, size_t);
20259 extern int brand_get_postclone(brand_handle_t, const char *, const char *,
20260     char *, size_t);
20261 extern int brand_get_postinstall(brand_handle_t, const char *, const char *,
20262     char *, size_t);
20263 extern int brand_get_postsnap(brand_handle_t, const char *, const char *,
20264     char *, size_t);
20265 extern int brand_get_poststatechange(brand_handle_t, const char *, const char *,
20266     char *, size_t);
20267 extern int brand_get_predetach(brand_handle_t, const char *, const char *,
20268     char *, size_t);
20269 extern int brand_get_presnap(brand_handle_t, const char *, const char *,
20270     char *, size_t);
20271 extern int brand_get_prestatechange(brand_handle_t, const char *, const char *,
20272     char *, size_t);
20273 extern int brand_get_preuninstall(brand_handle_t, const char *, const char *,
20274     char *, size_t);
20275 extern int brand_get_query(brand_handle_t, const char *, const char *,
20276     char *, size_t);
20277 extern int brand_get_uninstall(brand_handle_t, const char *, const char *,
20278     char *, size_t);
20279 extern int brand_get_validatesnap(brand_handle_t, const char *, const char *,
20280     char *, size_t);
20281 extern int brand_get_user_cmd(brand_handle_t, const char *, char *, size_t);
20282 extern int brand_get_verify_cfg(brand_handle_t, char *, size_t);
20283 extern int brand_get_verify_adm(brand_handle_t, const char *, const char *,
20284     char *, size_t);
20285 extern int brand_get_sysboot(brand_handle_t, const char *, const char *, char *,
20286     size_t);
20287 
20288 extern int brand_config_iter_privilege(brand_handle_t,
20289     int (*func)(void *, priv_iter_t *), void *);
20290 
20291 extern int brand_platform_iter_devices(brand_handle_t, const char *,
20292     int (*)(void *, const char *, const char *), void *, const char *);
20293 extern int brand_platform_iter_gmounts(brand_handle_t, const char *,
20294     int (*)(void *, const char *, const char *, const char *, const char *),
20295     void *);
20296 extern int brand_platform_iter_link(brand_handle_t, int (*)(void *,
20297     const char *, const char *), void *);
20298 extern int brand_platform_iter_mounts(brand_handle_t, int (*)(void *,
20299     const char *, const char *, const char *, const char *), void *);
20300 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
20301 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uuid.h" 1
20302 /*
20303  * CDDL HEADER START
20304  *
20305  * The contents of this file are subject to the terms of the
20306  * Common Development and Distribution License, Version 1.0 only
20307  * (the "License").  You may not use this file except in compliance
20308  * with the License.
20309  *
20310  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20311  * or http://www.opensolaris.org/os/licensing.
20312  * See the License for the specific language governing permissions
20313  * and limitations under the License.
20314  *
20315  * When distributing Covered Code, include this CDDL HEADER in each
20316  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20317  * If applicable, add the following below this CDDL HEADER, with the
20318  * fields enclosed by brackets "[]" replaced with your own identifying
20319  * information: Portions Copyright [yyyy] [name of copyright owner]
20320  *
20321  * CDDL HEADER END
20322  */
20323 /*
20324  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
20325  * Use is subject to license terms.
20326  */
20327 
20328 
20329 
20330 
20331 #pragma ident "%Z%%M%	%I%	%E% SMI"
20332 
20333 
20334 
20335 
20336 
20337 /*
20338  * The copyright in this file is taken from the original Leach
20339  * & Salz UUID specification, from which this implementation
20340  * is derived.
20341  */
20342 
20343 /*
20344  * Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
20345  * Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
20346  * Digital Equipment Corporation, Maynard, Mass.  Copyright (c) 1998
20347  * Microsoft.  To anyone who acknowledges that this file is provided
20348  * "AS IS" without any express or implied warranty: permission to use,
20349  * copy, modify, and distribute this file for any purpose is hereby
20350  * granted without fee, provided that the above copyright notices and
20351  * this notice appears in all source code copies, and that none of the
20352  * names of Open Software Foundation, Inc., Hewlett-Packard Company,
20353  * or Digital Equipment Corporation be used in advertising or
20354  * publicity pertaining to distribution of the software without
20355  * specific, written prior permission.  Neither Open Software
20356  * Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
20357  * Equipment Corporation makes any representations about the
20358  * suitability of this software for any purpose.
20359  */
20360 
20361 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
20362 /*
20363  * CDDL HEADER START
20364  *
20365  * The contents of this file are subject to the terms of the
20366  * Common Development and Distribution License (the "License").
20367  * You may not use this file except in compliance with the License.
20368  *
20369  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20370  * or http://www.opensolaris.org/os/licensing.
20371  * See the License for the specific language governing permissions
20372  * and limitations under the License.
20373  *
20374  * When distributing Covered Code, include this CDDL HEADER in each
20375  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20376  * If applicable, add the following below this CDDL HEADER, with the
20377  * fields enclosed by brackets "[]" replaced with your own identifying
20378  * information: Portions Copyright [yyyy] [name of copyright owner]
20379  *
20380  * CDDL HEADER END
20381  */
20382 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
20383 /*	  All Rights Reserved  	*/
20384 
20385 
20386 /*
20387  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20388  * Use is subject to license terms.
20389  *
20390  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
20391  * Copyright 2016 Joyent, Inc.
20392  */
20393 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uuid.h" 2
20394 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 1
20395 /*
20396  * CDDL HEADER START
20397  *
20398  * The contents of this file are subject to the terms of the
20399  * Common Development and Distribution License (the "License").
20400  * You may not use this file except in compliance with the License.
20401  *
20402  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20403  * or http://www.opensolaris.org/os/licensing.
20404  * See the License for the specific language governing permissions
20405  * and limitations under the License.
20406  *
20407  * When distributing Covered Code, include this CDDL HEADER in each
20408  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20409  * If applicable, add the following below this CDDL HEADER, with the
20410  * fields enclosed by brackets "[]" replaced with your own identifying
20411  * information: Portions Copyright [yyyy] [name of copyright owner]
20412  *
20413  * CDDL HEADER END
20414  */
20415 
20416 /*
20417  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20418  * Use is subject to license terms.
20419  */
20420 
20421 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
20422 /*	  All Rights Reserved  	*/
20423 
20424 /*
20425  * University Copyright- Copyright (c) 1982, 1986, 1988
20426  * The Regents of the University of California
20427  * All Rights Reserved
20428  *
20429  * University Acknowledgment- Portions of this document are derived from
20430  * software developed by the University of California, Berkeley, and its
20431  * contributors.
20432  */
20433 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uuid.h" 2
20434 
20435 typedef struct {
20436  uint8_t nodeID[6];
20437 } uuid_node_t;
20438 
20439 /*
20440  * The uuid type used throughout when referencing uuids themselves
20441  */
20442 struct uuid {
20443  uint32_t time_low;
20444  uint16_t time_mid;
20445  uint16_t time_hi_and_version;
20446  uint8_t clock_seq_hi_and_reserved;
20447  uint8_t clock_seq_low;
20448  uint8_t node_addr[6];
20449 };
20450 
20451 
20452 
20453 
20454 
20455 typedef uchar_t uuid_t[16];
20456 
20457 /*
20458  * Convert a uuid to/from little-endian format
20459  */
20460 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
20461 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libuutil.h" 1
20462 /*
20463  * CDDL HEADER START
20464  *
20465  * The contents of this file are subject to the terms of the
20466  * Common Development and Distribution License (the "License").
20467  * You may not use this file except in compliance with the License.
20468  *
20469  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20470  * or http://www.opensolaris.org/os/licensing.
20471  * See the License for the specific language governing permissions
20472  * and limitations under the License.
20473  *
20474  * When distributing Covered Code, include this CDDL HEADER in each
20475  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20476  * If applicable, add the following below this CDDL HEADER, with the
20477  * fields enclosed by brackets "[]" replaced with your own identifying
20478  * information: Portions Copyright [yyyy] [name of copyright owner]
20479  *
20480  * CDDL HEADER END
20481  */
20482 /*
20483  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
20484  */
20485 
20486 
20487 
20488 
20489 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
20490 /*
20491  * CDDL HEADER START
20492  *
20493  * The contents of this file are subject to the terms of the
20494  * Common Development and Distribution License (the "License").
20495  * You may not use this file except in compliance with the License.
20496  *
20497  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20498  * or http://www.opensolaris.org/os/licensing.
20499  * See the License for the specific language governing permissions
20500  * and limitations under the License.
20501  *
20502  * When distributing Covered Code, include this CDDL HEADER in each
20503  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20504  * If applicable, add the following below this CDDL HEADER, with the
20505  * fields enclosed by brackets "[]" replaced with your own identifying
20506  * information: Portions Copyright [yyyy] [name of copyright owner]
20507  *
20508  * CDDL HEADER END
20509  */
20510 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
20511 /*	  All Rights Reserved  	*/
20512 
20513 
20514 /*
20515  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20516  * Use is subject to license terms.
20517  *
20518  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
20519  * Copyright 2016 Joyent, Inc.
20520  */
20521 # 29 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libuutil.h" 2
20522 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1
20523 /*
20524  * CDDL HEADER START
20525  *
20526  * The contents of this file are subject to the terms of the
20527  * Common Development and Distribution License, Version 1.0 only
20528  * (the "License").  You may not use this file except in compliance
20529  * with the License.
20530  *
20531  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20532  * or http://www.opensolaris.org/os/licensing.
20533  * See the License for the specific language governing permissions
20534  * and limitations under the License.
20535  *
20536  * When distributing Covered Code, include this CDDL HEADER in each
20537  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20538  * If applicable, add the following below this CDDL HEADER, with the
20539  * fields enclosed by brackets "[]" replaced with your own identifying
20540  * information: Portions Copyright [yyyy] [name of copyright owner]
20541  *
20542  * CDDL HEADER END
20543  */
20544 /*	Copyright (c) 1988 AT&T	*/
20545 /*	  All Rights Reserved	*/
20546 
20547 /*
20548  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
20549  *
20550  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
20551  * Use is subject to license terms.
20552  */
20553 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libuutil.h" 2
20554 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
20555 /*
20556  * CDDL HEADER START
20557  *
20558  * The contents of this file are subject to the terms of the
20559  * Common Development and Distribution License (the "License").
20560  * You may not use this file except in compliance with the License.
20561  *
20562  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20563  * or http://www.opensolaris.org/os/licensing.
20564  * See the License for the specific language governing permissions
20565  * and limitations under the License.
20566  *
20567  * When distributing Covered Code, include this CDDL HEADER in each
20568  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20569  * If applicable, add the following below this CDDL HEADER, with the
20570  * fields enclosed by brackets "[]" replaced with your own identifying
20571  * information: Portions Copyright [yyyy] [name of copyright owner]
20572  *
20573  * CDDL HEADER END
20574  */
20575 
20576 /*
20577  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
20578  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
20579  */
20580 
20581 /*	Copyright (c) 1988 AT&T	*/
20582 /*	  All Rights Reserved  	*/
20583 
20584 /*
20585  * User-visible pieces of the ANSI C standard I/O package.
20586  */
20587 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libuutil.h" 2
20588 
20589 
20590 
20591 
20592 
20593 /*
20594  * Standard flags codes.
20595  */
20596 
20597 
20598 /*
20599  * Standard error codes.
20600  */
20601 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libuutil.h"
20602 /*
20603  * Standard program exit codes.
20604  */
20605 
20606 
20607 
20608 
20609 /*
20610  * Exit status profiles.
20611  */
20612 
20613 
20614 
20615 /*
20616  * Error reporting functions.
20617  */
20618 uint32_t uu_error(void);
20619 const char *uu_strerror(uint32_t);
20620 
20621 /*
20622  * Program notification functions.
20623  */
20624 extern void uu_alt_exit(int);
20625 extern const char *uu_setpname(char *);
20626 extern const char *uu_getpname(void);
20627 /*PRINTFLIKE1*/
20628 extern void uu_warn(const char *, ...);
20629 extern void uu_vwarn(const char *, va_list);
20630 /*PRINTFLIKE1*/
20631 extern void uu_die(const char *, ...) __attribute__((__noreturn__));
20632 extern void uu_vdie(const char *, va_list) __attribute__((__noreturn__));
20633 /*PRINTFLIKE2*/
20634 extern void uu_xdie(int, const char *, ...) __attribute__((__noreturn__));
20635 extern void uu_vxdie(int, const char *, va_list) __attribute__((__noreturn__));
20636 
20637 /*
20638  * Exit status functions (not to be used directly)
20639  */
20640 extern int *uu_exit_ok(void);
20641 extern int *uu_exit_fatal(void);
20642 extern int *uu_exit_usage(void);
20643 
20644 /*
20645  * string->number conversions
20646  */
20647 extern int uu_strtoint(const char *, void *, size_t, int, int64_t, int64_t);
20648 extern int uu_strtouint(const char *, void *, size_t, int, uint64_t, uint64_t);
20649 
20650 /*
20651  * Debug print facility functions.
20652  */
20653 typedef struct uu_dprintf uu_dprintf_t;
20654 
20655 typedef enum {
20656  UU_DPRINTF_SILENT,
20657  UU_DPRINTF_FATAL,
20658  UU_DPRINTF_WARNING,
20659  UU_DPRINTF_NOTICE,
20660  UU_DPRINTF_INFO,
20661  UU_DPRINTF_DEBUG
20662 } uu_dprintf_severity_t;
20663 
20664 extern uu_dprintf_t *uu_dprintf_create(const char *, uu_dprintf_severity_t,
20665     uint_t);
20666 /*PRINTFLIKE3*/
20667 extern void uu_dprintf(uu_dprintf_t *, uu_dprintf_severity_t,
20668     const char *, ...);
20669 extern void uu_dprintf_destroy(uu_dprintf_t *);
20670 extern const char *uu_dprintf_getname(uu_dprintf_t *);
20671 
20672 /*
20673  * Identifier test flags and function.
20674  */
20675 
20676 
20677 
20678 int uu_check_name(const char *, uint_t);
20679 
20680 /*
20681  * File creation functions.
20682  */
20683 extern int uu_open_tmp(const char *dir, uint_t uflags);
20684 
20685 /*
20686  * Convenience functions.
20687  */
20688 
20689 
20690 /*PRINTFLIKE1*/
20691 extern char *uu_msprintf(const char *format, ...);
20692 extern void *uu_zalloc(size_t);
20693 extern char *uu_strdup(const char *);
20694 extern void uu_free(void *);
20695 
20696 extern boolean_t uu_strcaseeq(const char *a, const char *b);
20697 extern boolean_t uu_streq(const char *a, const char *b);
20698 extern char *uu_strndup(const char *s, size_t n);
20699 extern boolean_t uu_strbw(const char *a, const char *b);
20700 extern void *uu_memdup(const void *buf, size_t sz);
20701 extern void uu_dump(FILE *out, const char *prefix, const void *buf, size_t len);
20702 
20703 /*
20704  * Comparison function type definition.
20705  *   Developers should be careful in their use of the _private argument. If you
20706  *   break interface guarantees, you get undefined behavior.
20707  */
20708 typedef int uu_compare_fn_t(const void *__left, const void *__right,
20709     void *__private);
20710 
20711 /*
20712  * Walk variant flags.
20713  *   A data structure need not provide support for all variants and
20714  *   combinations.  Refer to the appropriate documentation.
20715  */
20716 
20717 
20718 
20719 
20720 
20721 
20722 /*
20723  * Walk callback function return codes.
20724  */
20725 
20726 
20727 
20728 
20729 /*
20730  * Walk callback function type definition.
20731  */
20732 typedef int uu_walk_fn_t(void *_elem, void *_private);
20733 
20734 /*
20735  * lists: opaque structures
20736  */
20737 typedef struct uu_list_pool uu_list_pool_t;
20738 typedef struct uu_list uu_list_t;
20739 
20740 typedef struct uu_list_node {
20741  uintptr_t uln_opaque[2];
20742 } uu_list_node_t;
20743 
20744 typedef struct uu_list_walk uu_list_walk_t;
20745 
20746 typedef uintptr_t uu_list_index_t;
20747 
20748 /*
20749  * lists: interface
20750  *
20751  * basic usage:
20752  *	typedef struct foo {
20753  *		...
20754  *		uu_list_node_t foo_node;
20755  *		...
20756  *	} foo_t;
20757  *
20758  *	static int
20759  *	foo_compare(void *l_arg, void *r_arg, void *private)
20760  *	{
20761  *		foo_t *l = l_arg;
20762  *		foo_t *r = r_arg;
20763  *
20764  *		if (... l greater than r ...)
20765  *			return (1);
20766  *		if (... l less than r ...)
20767  *			return (-1);
20768  *		return (0);
20769  *	}
20770  *
20771  *	...
20772  *		// at initialization time
20773  *		foo_pool = uu_list_pool_create("foo_pool",
20774  *		    sizeof (foo_t), offsetof(foo_t, foo_node), foo_compare,
20775  *		    debugging? 0 : UU_AVL_POOL_DEBUG);
20776  *	...
20777  */
20778 uu_list_pool_t *uu_list_pool_create(const char *, size_t, size_t,
20779     uu_compare_fn_t *, uint32_t);
20780 
20781 
20782 void uu_list_pool_destroy(uu_list_pool_t *);
20783 
20784 /*
20785  * usage:
20786  *
20787  *	foo_t *a;
20788  *	a = malloc(sizeof(*a));
20789  *	uu_list_node_init(a, &a->foo_list, pool);
20790  *	...
20791  *	uu_list_node_fini(a, &a->foo_list, pool);
20792  *	free(a);
20793  */
20794 void uu_list_node_init(void *, uu_list_node_t *, uu_list_pool_t *);
20795 void uu_list_node_fini(void *, uu_list_node_t *, uu_list_pool_t *);
20796 
20797 uu_list_t *uu_list_create(uu_list_pool_t *, void *_parent, uint32_t);
20798 
20799 
20800 
20801 void uu_list_destroy(uu_list_t *); /* list must be empty */
20802 
20803 size_t uu_list_numnodes(uu_list_t *);
20804 
20805 void *uu_list_first(uu_list_t *);
20806 void *uu_list_last(uu_list_t *);
20807 
20808 void *uu_list_next(uu_list_t *, void *);
20809 void *uu_list_prev(uu_list_t *, void *);
20810 
20811 int uu_list_walk(uu_list_t *, uu_walk_fn_t *, void *, uint32_t);
20812 
20813 uu_list_walk_t *uu_list_walk_start(uu_list_t *, uint32_t);
20814 void *uu_list_walk_next(uu_list_walk_t *);
20815 void uu_list_walk_end(uu_list_walk_t *);
20816 
20817 void *uu_list_find(uu_list_t *, void *, void *, uu_list_index_t *);
20818 void uu_list_insert(uu_list_t *, void *, uu_list_index_t);
20819 
20820 void *uu_list_nearest_next(uu_list_t *, uu_list_index_t);
20821 void *uu_list_nearest_prev(uu_list_t *, uu_list_index_t);
20822 
20823 void *uu_list_teardown(uu_list_t *, void **);
20824 
20825 void uu_list_remove(uu_list_t *, void *);
20826 
20827 /*
20828  * lists: interfaces for non-sorted lists only
20829  */
20830 int uu_list_insert_before(uu_list_t *, void *_target, void *_elem);
20831 int uu_list_insert_after(uu_list_t *, void *_target, void *_elem);
20832 
20833 /*
20834  * avl trees: opaque structures
20835  */
20836 typedef struct uu_avl_pool uu_avl_pool_t;
20837 typedef struct uu_avl uu_avl_t;
20838 
20839 typedef struct uu_avl_node {
20840 
20841 
20842 
20843  uintptr_t uan_opaque[4];
20844 
20845 } uu_avl_node_t;
20846 
20847 typedef struct uu_avl_walk uu_avl_walk_t;
20848 
20849 typedef uintptr_t uu_avl_index_t;
20850 
20851 /*
20852  * avl trees: interface
20853  *
20854  * basic usage:
20855  *	typedef struct foo {
20856  *		...
20857  *		uu_avl_node_t foo_node;
20858  *		...
20859  *	} foo_t;
20860  *
20861  *	static int
20862  *	foo_compare(void *l_arg, void *r_arg, void *private)
20863  *	{
20864  *		foo_t *l = l_arg;
20865  *		foo_t *r = r_arg;
20866  *
20867  *		if (... l greater than r ...)
20868  *			return (1);
20869  *		if (... l less than r ...)
20870  *			return (-1);
20871  *		return (0);
20872  *	}
20873  *
20874  *	...
20875  *		// at initialization time
20876  *		foo_pool = uu_avl_pool_create("foo_pool",
20877  *		    sizeof (foo_t), offsetof(foo_t, foo_node), foo_compare,
20878  *		    debugging? 0 : UU_AVL_POOL_DEBUG);
20879  *	...
20880  */
20881 uu_avl_pool_t *uu_avl_pool_create(const char *, size_t, size_t,
20882     uu_compare_fn_t *, uint32_t);
20883 
20884 
20885 void uu_avl_pool_destroy(uu_avl_pool_t *);
20886 
20887 /*
20888  * usage:
20889  *
20890  *	foo_t *a;
20891  *	a = malloc(sizeof(*a));
20892  *	uu_avl_node_init(a, &a->foo_avl, pool);
20893  *	...
20894  *	uu_avl_node_fini(a, &a->foo_avl, pool);
20895  *	free(a);
20896  */
20897 void uu_avl_node_init(void *, uu_avl_node_t *, uu_avl_pool_t *);
20898 void uu_avl_node_fini(void *, uu_avl_node_t *, uu_avl_pool_t *);
20899 
20900 uu_avl_t *uu_avl_create(uu_avl_pool_t *, void *_parent, uint32_t);
20901 
20902 
20903 void uu_avl_destroy(uu_avl_t *); /* list must be empty */
20904 
20905 size_t uu_avl_numnodes(uu_avl_t *);
20906 
20907 void *uu_avl_first(uu_avl_t *);
20908 void *uu_avl_last(uu_avl_t *);
20909 
20910 void *uu_avl_next(uu_avl_t *, void *);
20911 void *uu_avl_prev(uu_avl_t *, void *);
20912 
20913 int uu_avl_walk(uu_avl_t *, uu_walk_fn_t *, void *, uint32_t);
20914 
20915 uu_avl_walk_t *uu_avl_walk_start(uu_avl_t *, uint32_t);
20916 void *uu_avl_walk_next(uu_avl_walk_t *);
20917 void uu_avl_walk_end(uu_avl_walk_t *);
20918 
20919 void *uu_avl_find(uu_avl_t *, void *, void *, uu_avl_index_t *);
20920 void uu_avl_insert(uu_avl_t *, void *, uu_avl_index_t);
20921 
20922 void *uu_avl_nearest_next(uu_avl_t *, uu_avl_index_t);
20923 void *uu_avl_nearest_prev(uu_avl_t *, uu_avl_index_t);
20924 
20925 void *uu_avl_teardown(uu_avl_t *, void **);
20926 
20927 void uu_avl_remove(uu_avl_t *, void *);
20928 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
20929 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mnttab.h" 1
20930 /*
20931  * CDDL HEADER START
20932  *
20933  * The contents of this file are subject to the terms of the
20934  * Common Development and Distribution License (the "License").
20935  * You may not use this file except in compliance with the License.
20936  *
20937  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20938  * or http://www.opensolaris.org/os/licensing.
20939  * See the License for the specific language governing permissions
20940  * and limitations under the License.
20941  *
20942  * When distributing Covered Code, include this CDDL HEADER in each
20943  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20944  * If applicable, add the following below this CDDL HEADER, with the
20945  * fields enclosed by brackets "[]" replaced with your own identifying
20946  * information: Portions Copyright [yyyy] [name of copyright owner]
20947  *
20948  * CDDL HEADER END
20949  */
20950 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
20951 /*	  All Rights Reserved  	*/
20952 
20953 
20954 /*
20955  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
20956  *
20957  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20958  * Use is subject to license terms.
20959  */
20960 
20961 
20962 
20963 
20964 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
20965 /*
20966  * CDDL HEADER START
20967  *
20968  * The contents of this file are subject to the terms of the
20969  * Common Development and Distribution License (the "License").
20970  * You may not use this file except in compliance with the License.
20971  *
20972  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20973  * or http://www.opensolaris.org/os/licensing.
20974  * See the License for the specific language governing permissions
20975  * and limitations under the License.
20976  *
20977  * When distributing Covered Code, include this CDDL HEADER in each
20978  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20979  * If applicable, add the following below this CDDL HEADER, with the
20980  * fields enclosed by brackets "[]" replaced with your own identifying
20981  * information: Portions Copyright [yyyy] [name of copyright owner]
20982  *
20983  * CDDL HEADER END
20984  */
20985 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
20986 /*	  All Rights Reserved  	*/
20987 
20988 
20989 /*
20990  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20991  * Use is subject to license terms.
20992  *
20993  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
20994  * Copyright 2016 Joyent, Inc.
20995  */
20996 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mnttab.h" 2
20997 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mnttab.h"
20998 /*
20999  * The fields in struct extmnttab should match those in struct mnttab until new
21000  * fields are encountered. This allows hasmntopt(), getmntent_common() and
21001  * mntioctl() to cast one type to the other safely.
21002  *
21003  * The fields in struct mnttab, struct extmnttab and struct mntentbuf must all
21004  * match those in the corresponding 32-bit versions defined in mntvnops.c.
21005  */
21006 struct mnttab {
21007  char *mnt_special;
21008  char *mnt_mountp;
21009  char *mnt_fstype;
21010  char *mnt_mntopts;
21011  char *mnt_time;
21012 };
21013 
21014 struct extmnttab {
21015  char *mnt_special;
21016  char *mnt_mountp;
21017  char *mnt_fstype;
21018  char *mnt_mntopts;
21019  char *mnt_time;
21020  uint_t mnt_major;
21021  uint_t mnt_minor;
21022 };
21023 
21024 struct mntentbuf {
21025  struct extmnttab *mbuf_emp;
21026  size_t mbuf_bufsize;
21027  char *mbuf_buf;
21028 };
21029 
21030 
21031 extern void resetmnttab(FILE *);
21032 extern int getmntent(FILE *, struct mnttab *);
21033 extern int getextmntent(FILE *, struct extmnttab *, size_t);
21034 extern int getmntany(FILE *, struct mnttab *, struct mnttab *);
21035 extern char *hasmntopt(struct mnttab *, char *);
21036 extern char *mntopt(char **);
21037 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
21038 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
21039 /*
21040  * CDDL HEADER START
21041  *
21042  * The contents of this file are subject to the terms of the
21043  * Common Development and Distribution License (the "License").
21044  * You may not use this file except in compliance with the License.
21045  *
21046  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21047  * or http://www.opensolaris.org/os/licensing.
21048  * See the License for the specific language governing permissions
21049  * and limitations under the License.
21050  *
21051  * When distributing Covered Code, include this CDDL HEADER in each
21052  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21053  * If applicable, add the following below this CDDL HEADER, with the
21054  * fields enclosed by brackets "[]" replaced with your own identifying
21055  * information: Portions Copyright [yyyy] [name of copyright owner]
21056  *
21057  * CDDL HEADER END
21058  */
21059 
21060 /*
21061  * Copyright (c) 2013 Gary Mills
21062  *
21063  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
21064  * Use is subject to license terms.
21065  */
21066 
21067 /*	Copyright (c) 1988 AT&T	*/
21068 /*	  All Rights Reserved  	*/
21069 
21070 
21071 
21072 
21073 
21074 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
21075 /*
21076  * CDDL HEADER START
21077  *
21078  * The contents of this file are subject to the terms of the
21079  * Common Development and Distribution License (the "License").
21080  * You may not use this file except in compliance with the License.
21081  *
21082  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21083  * or http://www.opensolaris.org/os/licensing.
21084  * See the License for the specific language governing permissions
21085  * and limitations under the License.
21086  *
21087  * When distributing Covered Code, include this CDDL HEADER in each
21088  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21089  * If applicable, add the following below this CDDL HEADER, with the
21090  * fields enclosed by brackets "[]" replaced with your own identifying
21091  * information: Portions Copyright [yyyy] [name of copyright owner]
21092  *
21093  * CDDL HEADER END
21094  */
21095 
21096 /*
21097  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
21098  * Copyright 2016 Joyent, Inc.
21099  *
21100  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
21101  * Use is subject to license terms.
21102  */
21103 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
21104 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
21105 /*
21106  * CDDL HEADER START
21107  *
21108  * The contents of this file are subject to the terms of the
21109  * Common Development and Distribution License (the "License").
21110  * You may not use this file except in compliance with the License.
21111  *
21112  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21113  * or http://www.opensolaris.org/os/licensing.
21114  * See the License for the specific language governing permissions
21115  * and limitations under the License.
21116  *
21117  *
21118  * When distributing Covered Code, include this CDDL HEADER in each
21119  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21120  * If applicable, add the following below this CDDL HEADER, with the
21121  * fields enclosed by brackets "[]" replaced with your own identifying
21122  * information: Portions Copyright [yyyy] [name of copyright owner]
21123  *
21124  * CDDL HEADER END
21125  */
21126 
21127 /*
21128  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
21129  * Use is subject to license terms.
21130  * Copyright 2016 Joyent, Inc.
21131  */
21132 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
21133 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h" 1
21134 /*
21135  * CDDL HEADER START
21136  *
21137  * The contents of this file are subject to the terms of the
21138  * Common Development and Distribution License, Version 1.0 only
21139  * (the "License").  You may not use this file except in compliance
21140  * with the License.
21141  *
21142  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21143  * or http://www.opensolaris.org/os/licensing.
21144  * See the License for the specific language governing permissions
21145  * and limitations under the License.
21146  *
21147  * When distributing Covered Code, include this CDDL HEADER in each
21148  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21149  * If applicable, add the following below this CDDL HEADER, with the
21150  * fields enclosed by brackets "[]" replaced with your own identifying
21151  * information: Portions Copyright [yyyy] [name of copyright owner]
21152  *
21153  * CDDL HEADER END
21154  */
21155 /*
21156  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
21157  * Use is subject to license terms.
21158  */
21159 
21160 /*	Copyright (c) 1988 AT&T	*/
21161 /*	  All Rights Reserved  	*/
21162 
21163 
21164 /*
21165  * An application should not include this header directly.  Instead it
21166  * should be included only through the inclusion of other Sun headers.
21167  *
21168  * The contents of this header is limited to identifiers specified in the
21169  * C Standard.  Any new identifiers specified in future amendments to the
21170  * C Standard must be placed in this header.  If these new identifiers
21171  * are required to also be in the C++ Standard "std" namespace, then for
21172  * anything other than macro definitions, corresponding "using" directives
21173  * must also be added to <limits.h>.
21174  */
21175 
21176 
21177 
21178 
21179 #pragma ident "%Z%%M%	%I%	%E% SMI"
21180 
21181 
21182 
21183 
21184 
21185 /*
21186  * Sizes of integral types
21187  */
21188 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h"
21189      /* min value of a "long int" */
21190 
21191 
21192 
21193 
21194 
21195      /* min value of a long long */
21196 
21197      /* max value of a long long */
21198 
21199      /* max value of "unsigned long long */
21200 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
21201 
21202 /*
21203  * Include fixed width type limits as proposed by the ISO/JTC1/SC22/WG14 C
21204  * committee's working draft for the revision of the current ISO C standard,
21205  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
21206  * required by any standard but constitute a useful, general purpose set
21207  * of type definitions and limits which is namespace clean with respect to
21208  * all standards.
21209  */
21210 
21211 
21212 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
21213 /*
21214  * CDDL HEADER START
21215  *
21216  * The contents of this file are subject to the terms of the
21217  * Common Development and Distribution License, Version 1.0 only
21218  * (the "License").  You may not use this file except in compliance
21219  * with the License.
21220  *
21221  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21222  * or http://www.opensolaris.org/os/licensing.
21223  * See the License for the specific language governing permissions
21224  * and limitations under the License.
21225  *
21226  * When distributing Covered Code, include this CDDL HEADER in each
21227  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21228  * If applicable, add the following below this CDDL HEADER, with the
21229  * fields enclosed by brackets "[]" replaced with your own identifying
21230  * information: Portions Copyright [yyyy] [name of copyright owner]
21231  *
21232  * CDDL HEADER END
21233  */
21234 /*
21235  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
21236  *
21237  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
21238  * Use is subject to license terms.
21239  */
21240 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
21241 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
21242 /*
21243  * ARG_MAX is calculated as follows:
21244  * NCARGS - space for other stuff on initial stack
21245  * like aux vectors, saved registers, etc..
21246  */
21247 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
21248 /*
21249  * POSIX conformant definitions - An implementation may define
21250  * other symbols which reflect the actual implementation. Alternate
21251  * definitions may not be as restrictive as the POSIX definitions.
21252  */
21253 # 140 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
21254 /* POSIX.1c conformant */
21255 
21256 
21257 
21258 
21259 
21260 /* UNIX 03 conformant */
21261 
21262 
21263 
21264 
21265 
21266 /*
21267  * POSIX.2 and XPG4-XSH4 conformant definitions
21268  */
21269 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
21270 /* UNIX 03 conformant */
21271 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
21272 /*
21273  * For dual definitions for PASS_MAX and sysconf.c
21274  */
21275 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
21276     /* NLS printf() and scanf() */
21277 # 216 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
21278 /* Marked as LEGACY in SUSv2 and removed in UNIX 03 */
21279 
21280 
21281 
21282        /* of a double */
21283 
21284 
21285        /* of a "float" */
21286 
21287 
21288 /* Marked as LEGACY in SUSv1 and removed in SUSv2 */
21289 
21290 
21291        /* of a double */
21292 
21293        /* of a float */
21294 # 248 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
21295 /*
21296  * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
21297  * related text states:
21298  *
21299  * A definition of one of the values from Table 2-5 shall be omitted from the
21300  * <limits.h> on specific implementations where the corresponding value is
21301  * equal to or greater than the stated minimum, but where the value can vary
21302  * depending on the file to which it is applied. The actual value supported for
21303  * a specific pathname shall be provided by the pathconf() (5.7.1) function.
21304  *
21305  * This is clear that any machine supporting multiple file system types
21306  * and/or a network can not include this define, regardless of protection
21307  * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags.
21308  *
21309  * #define	NAME_MAX	14
21310  */
21311 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
21312     /* Increased for illumos */
21313 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
21314 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 1
21315 /*
21316  * CDDL HEADER START
21317  *
21318  * The contents of this file are subject to the terms of the
21319  * Common Development and Distribution License, Version 1.0 only
21320  * (the "License").  You may not use this file except in compliance
21321  * with the License.
21322  *
21323  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21324  * or http://www.opensolaris.org/os/licensing.
21325  * See the License for the specific language governing permissions
21326  * and limitations under the License.
21327  *
21328  * When distributing Covered Code, include this CDDL HEADER in each
21329  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21330  * If applicable, add the following below this CDDL HEADER, with the
21331  * fields enclosed by brackets "[]" replaced with your own identifying
21332  * information: Portions Copyright [yyyy] [name of copyright owner]
21333  *
21334  * CDDL HEADER END
21335  */
21336 /*
21337  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
21338  *
21339  * Copyright 1997 Sun Microsystems, Inc.  All rights reserved.
21340  * Use is subject to license terms.
21341  */
21342 
21343 /*	Copyright (c) 1983,1984,1985,1986,1987,1988,1989 AT&T	*/
21344 /*	  All Rights Reserved  	*/
21345 
21346 /*
21347  * Portions of this source code were derived from Berkeley 4.3 BSD
21348  * under license from the Regents of the University of California.
21349  */
21350 
21351 
21352 
21353 
21354 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
21355 /*
21356  * CDDL HEADER START
21357  *
21358  * The contents of this file are subject to the terms of the
21359  * Common Development and Distribution License (the "License").
21360  * You may not use this file except in compliance with the License.
21361  *
21362  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21363  * or http://www.opensolaris.org/os/licensing.
21364  * See the License for the specific language governing permissions
21365  * and limitations under the License.
21366  *
21367  * When distributing Covered Code, include this CDDL HEADER in each
21368  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21369  * If applicable, add the following below this CDDL HEADER, with the
21370  * fields enclosed by brackets "[]" replaced with your own identifying
21371  * information: Portions Copyright [yyyy] [name of copyright owner]
21372  *
21373  * CDDL HEADER END
21374  */
21375 
21376 /*
21377  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
21378  * Copyright 2016 Joyent, Inc.
21379  *
21380  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
21381  * Use is subject to license terms.
21382  */
21383 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 2
21384 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
21385 /*
21386  * CDDL HEADER START
21387  *
21388  * The contents of this file are subject to the terms of the
21389  * Common Development and Distribution License (the "License").
21390  * You may not use this file except in compliance with the License.
21391  *
21392  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21393  * or http://www.opensolaris.org/os/licensing.
21394  * See the License for the specific language governing permissions
21395  * and limitations under the License.
21396  *
21397  * When distributing Covered Code, include this CDDL HEADER in each
21398  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21399  * If applicable, add the following below this CDDL HEADER, with the
21400  * fields enclosed by brackets "[]" replaced with your own identifying
21401  * information: Portions Copyright [yyyy] [name of copyright owner]
21402  *
21403  * CDDL HEADER END
21404  */
21405 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
21406 /*	  All Rights Reserved  	*/
21407 
21408 
21409 /*
21410  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21411  * Use is subject to license terms.
21412  *
21413  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
21414  * Copyright 2016 Joyent, Inc.
21415  */
21416 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 2
21417 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
21418 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
21419 /*	  All Rights Reserved  	*/
21420 
21421 
21422 /*
21423  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
21424  * All rights reserved.  The Berkeley software License Agreement
21425  * specifies the terms and conditions for redistribution.
21426  */
21427 
21428 /*
21429  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
21430  *
21431  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21432  * Use is subject to license terms.
21433  *
21434  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
21435  */
21436 
21437 /*
21438  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
21439  */
21440 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 2
21441 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h" 1
21442 /*
21443  * CDDL HEADER START
21444  *
21445  * The contents of this file are subject to the terms of the
21446  * Common Development and Distribution License, Version 1.0 only
21447  * (the "License").  You may not use this file except in compliance
21448  * with the License.
21449  *
21450  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21451  * or http://www.opensolaris.org/os/licensing.
21452  * See the License for the specific language governing permissions
21453  * and limitations under the License.
21454  *
21455  * When distributing Covered Code, include this CDDL HEADER in each
21456  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21457  * If applicable, add the following below this CDDL HEADER, with the
21458  * fields enclosed by brackets "[]" replaced with your own identifying
21459  * information: Portions Copyright [yyyy] [name of copyright owner]
21460  *
21461  * CDDL HEADER END
21462  */
21463 /*	Copyright (c) 1988 AT&T	*/
21464 /*	  All Rights Reserved  	*/
21465 
21466 
21467 /*
21468  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
21469  *
21470  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
21471  * Use is subject to license terms.
21472  */
21473 
21474 
21475 
21476 
21477 
21478 /*
21479  * Note:  The getutent(3c) family of interfaces are obsolete.
21480  * The getutxent(3c) family provide a superset of this functionality
21481  * and should be used in place of getutent(3c).
21482  */
21483 
21484 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
21485 /*
21486  * CDDL HEADER START
21487  *
21488  * The contents of this file are subject to the terms of the
21489  * Common Development and Distribution License (the "License").
21490  * You may not use this file except in compliance with the License.
21491  *
21492  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21493  * or http://www.opensolaris.org/os/licensing.
21494  * See the License for the specific language governing permissions
21495  * and limitations under the License.
21496  *
21497  * When distributing Covered Code, include this CDDL HEADER in each
21498  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21499  * If applicable, add the following below this CDDL HEADER, with the
21500  * fields enclosed by brackets "[]" replaced with your own identifying
21501  * information: Portions Copyright [yyyy] [name of copyright owner]
21502  *
21503  * CDDL HEADER END
21504  */
21505 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
21506 /*	  All Rights Reserved  	*/
21507 
21508 
21509 /*
21510  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21511  * Use is subject to license terms.
21512  *
21513  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
21514  * Copyright 2016 Joyent, Inc.
21515  */
21516 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h" 2
21517 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h"
21518 struct exit_status {
21519  short e_termination; /* Process termination status */
21520  short e_exit; /* Process exit status */
21521 };
21522 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h"
21523 /*
21524  * This data structure describes the utmp entries returned by
21525  * the getutent(3c) family of APIs.  It does not (necessarily)
21526  * correspond to the contents of the utmp or wtmp files.
21527  *
21528  * Applications should only interact with this subsystem via
21529  * the getutxent(3c) family of APIs, as the getutent(3c) family
21530  * are obsolete.
21531  */
21532 struct utmp {
21533  char ut_user[8]; /* User login name */
21534  char ut_id[4]; /* /etc/inittab id(usually line #) */
21535  char ut_line[12]; /* device name (console, lnxx) */
21536  short ut_pid; /* short for compat. - process id */
21537  short ut_type; /* type of entry */
21538  struct exit_status ut_exit; /* The exit status of a process */
21539      /* marked as DEAD_PROCESS. */
21540  time_t ut_time; /* time entry was made */
21541 };
21542 
21543 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 1
21544 /*
21545  * CDDL HEADER START
21546  *
21547  * The contents of this file are subject to the terms of the
21548  * Common Development and Distribution License (the "License").
21549  * You may not use this file except in compliance with the License.
21550  *
21551  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21552  * or http://www.opensolaris.org/os/licensing.
21553  * See the License for the specific language governing permissions
21554  * and limitations under the License.
21555  *
21556  * When distributing Covered Code, include this CDDL HEADER in each
21557  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21558  * If applicable, add the following below this CDDL HEADER, with the
21559  * fields enclosed by brackets "[]" replaced with your own identifying
21560  * information: Portions Copyright [yyyy] [name of copyright owner]
21561  *
21562  * CDDL HEADER END
21563  */
21564 /*
21565  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
21566  * Use is subject to license terms.
21567  * Copyright 2015 Nexenta Systems, Inc.
21568  */
21569 # 91 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h" 2
21570 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 1
21571 /*
21572  * CDDL HEADER START
21573  *
21574  * The contents of this file are subject to the terms of the
21575  * Common Development and Distribution License, Version 1.0 only
21576  * (the "License").  You may not use this file except in compliance
21577  * with the License.
21578  *
21579  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21580  * or http://www.opensolaris.org/os/licensing.
21581  * See the License for the specific language governing permissions
21582  * and limitations under the License.
21583  *
21584  * When distributing Covered Code, include this CDDL HEADER in each
21585  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21586  * If applicable, add the following below this CDDL HEADER, with the
21587  * fields enclosed by brackets "[]" replaced with your own identifying
21588  * information: Portions Copyright [yyyy] [name of copyright owner]
21589  *
21590  * CDDL HEADER END
21591  */
21592 /*
21593  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
21594  *
21595  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
21596  * Use is subject to license terms.
21597  */
21598 # 92 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h" 2
21599 
21600 /*
21601  * This data structure describes the utmp *file* contents using
21602  * fixed-width data types.  It should only be used by the implementation.
21603  *
21604  * Applications should use the getutxent(3c) family of routines to interact
21605  * with this database.
21606  */
21607 
21608 struct futmp {
21609  char ut_user[8]; /* User login name */
21610  char ut_id[4]; /* /etc/inittab id */
21611  char ut_line[12]; /* device name (console, lnxx) */
21612  int16_t ut_pid; /* process id */
21613  int16_t ut_type; /* type of entry */
21614  struct {
21615   int16_t e_termination; /* Process termination status */
21616   int16_t e_exit; /* Process exit status */
21617  } ut_exit; /* The exit status of a process */
21618  time32_t ut_time; /* time entry was made */
21619 };
21620 
21621 
21622 
21623 /*	Definitions for ut_type						*/
21624 # 135 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h"
21625 /*	Special strings or formats used in the "ut_line" field when	*/
21626 /*	accounting for something other than a process.			*/
21627 /*	No string for the ut_line field can be more than 11 chars +	*/
21628 /*	a NULL in length.						*/
21629 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmp.h"
21630 /*	Define and macro for determing if a normal user wrote the entry */
21631 /*	 and marking the utmpx entry as a normal user */
21632 
21633 
21634 
21635 
21636 
21637 extern void endutent(void);
21638 extern struct utmp *getutent(void);
21639 extern struct utmp *getutid(const struct utmp *);
21640 extern struct utmp *getutline(const struct utmp *);
21641 extern struct utmp *pututline(const struct utmp *);
21642 extern void setutent(void);
21643 extern int utmpname(const char *);
21644 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 2
21645 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h"
21646 /*
21647  * This data structure describes the utmpx entries returned by
21648  * the getutxent(3c) family of APIs.  It does not (necessarily)
21649  * correspond to the contents of the utmpx or wtmpx files.
21650  *
21651  * Applications should only interact with this subsystem via
21652  * the getutxent(3c) family of APIs.
21653  */
21654 struct utmpx {
21655  char ut_user[32]; /* user login name */
21656  char ut_id[4]; /* inittab id */
21657  char ut_line[32]; /* device name (console, lnxx) */
21658  pid_t ut_pid; /* process id */
21659  short ut_type; /* type of entry */
21660 
21661  struct exit_status ut_exit; /* process termination/exit status */
21662 
21663 
21664 
21665  struct timeval ut_tv; /* time entry was made */
21666  int ut_session; /* session ID, used for windowing */
21667 
21668  int pad[5]; /* reserved for future use */
21669 
21670 
21671 
21672  short ut_syslen; /* significant length of ut_host */
21673      /*   including terminating null */
21674  char ut_host[257]; /* remote host name */
21675 };
21676 
21677 
21678 
21679 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 1
21680 /*
21681  * CDDL HEADER START
21682  *
21683  * The contents of this file are subject to the terms of the
21684  * Common Development and Distribution License (the "License").
21685  * You may not use this file except in compliance with the License.
21686  *
21687  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21688  * or http://www.opensolaris.org/os/licensing.
21689  * See the License for the specific language governing permissions
21690  * and limitations under the License.
21691  *
21692  * When distributing Covered Code, include this CDDL HEADER in each
21693  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21694  * If applicable, add the following below this CDDL HEADER, with the
21695  * fields enclosed by brackets "[]" replaced with your own identifying
21696  * information: Portions Copyright [yyyy] [name of copyright owner]
21697  *
21698  * CDDL HEADER END
21699  */
21700 /*
21701  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
21702  * Use is subject to license terms.
21703  * Copyright 2015 Nexenta Systems, Inc.
21704  */
21705 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 2
21706 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 1
21707 /*
21708  * CDDL HEADER START
21709  *
21710  * The contents of this file are subject to the terms of the
21711  * Common Development and Distribution License, Version 1.0 only
21712  * (the "License").  You may not use this file except in compliance
21713  * with the License.
21714  *
21715  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21716  * or http://www.opensolaris.org/os/licensing.
21717  * See the License for the specific language governing permissions
21718  * and limitations under the License.
21719  *
21720  * When distributing Covered Code, include this CDDL HEADER in each
21721  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21722  * If applicable, add the following below this CDDL HEADER, with the
21723  * fields enclosed by brackets "[]" replaced with your own identifying
21724  * information: Portions Copyright [yyyy] [name of copyright owner]
21725  *
21726  * CDDL HEADER END
21727  */
21728 /*
21729  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
21730  *
21731  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
21732  * Use is subject to license terms.
21733  */
21734 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/utmpx.h" 2
21735 
21736 /*
21737  * This data structure describes the utmp *file* contents using
21738  * fixed-width data types.  It should only be used by the implementation.
21739  *
21740  * Applications should use the getutxent(3c) family of routines to interact
21741  * with this database.
21742  */
21743 
21744 struct futmpx {
21745  char ut_user[32]; /* user login name */
21746  char ut_id[4]; /* inittab id */
21747  char ut_line[32]; /* device name (console, lnxx) */
21748  pid32_t ut_pid; /* process id */
21749  int16_t ut_type; /* type of entry */
21750  struct {
21751   int16_t e_termination; /* process termination status */
21752   int16_t e_exit; /* process exit status */
21753  } ut_exit; /* exit status of a process */
21754  struct timeval32 ut_tv; /* time entry was made */
21755  int32_t ut_session; /* session ID, user for windowing */
21756  int32_t pad[5]; /* reserved for future use */
21757  int16_t ut_syslen; /* significant length of ut_host */
21758  char ut_host[257]; /* remote host name */
21759 };
21760 
21761 
21762 
21763 /*	Define and macro for determing if a normal user wrote the entry */
21764 /*	and marking the utmpx entry as a normal user */
21765 
21766 
21767 
21768 
21769 
21770 
21771 extern void endutxent(void);
21772 extern struct utmpx *getutxent(void);
21773 extern struct utmpx *getutxid(const struct utmpx *);
21774 extern struct utmpx *getutxline(const struct utmpx *);
21775 extern struct utmpx *pututxline(const struct utmpx *);
21776 extern void setutxent(void);
21777 
21778 
21779 extern int utmpxname(const char *);
21780 extern struct utmpx *makeutx(const struct utmpx *);
21781 extern struct utmpx *modutx(const struct utmpx *);
21782 extern void getutmp(const struct utmpx *, struct utmp *);
21783 extern void getutmpx(const struct utmp *, struct utmpx *);
21784 extern void updwtmp(const char *, struct utmp *);
21785 extern void updwtmpx(const char *, struct utmpx *);
21786 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h" 2
21787 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h"
21788 /*
21789  * Warning: these are shared with the admin/install consolidation.
21790  * Do not insert states between any of the currently defined states,
21791  * and any new states must be evaluated for impact on range comparisons.
21792  */
21793 # 130 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h"
21794 /* Owner, group, and mode (defined by packaging) for the config directory */
21795 
21796 
21797 
21798 
21799 /* Owner, group, and mode (defined by packaging) for the index file */
21800 
21801 
21802 
21803 
21804 /* The maximum length of the VERSION string in the pkginfo(4) file. */
21805 
21806 
21807 /*
21808  * Shortened alias names for the zones rctls.
21809  */
21810 # 157 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libzonecfg.h"
21811 /* Default name for zone detached manifest */
21812 
21813 
21814 /*
21815  * Bit flag definitions for passing into libzonecfg functions.
21816  */
21817 
21818 
21819 /*
21820  * The integer field expresses the current values on a get.
21821  * On a put, it represents the new values if >= 0 or "don't change" if < 0.
21822  */
21823 struct zoneent {
21824  char zone_name[64]; /* name of the zone */
21825  int zone_state; /* configured | incomplete | installed */
21826  char zone_path[1024]; /* path to zone storage */
21827  uuid_t zone_uuid; /* unique ID for zone */
21828  char zone_newname[64]; /* for doing renames */
21829 };
21830 
21831 typedef struct zone_dochandle *zone_dochandle_t; /* opaque handle */
21832 
21833 typedef uint_t zone_state_t;
21834 
21835 typedef struct zone_fsopt {
21836  struct zone_fsopt *zone_fsopt_next;
21837  char zone_fsopt_opt[1024];
21838 } zone_fsopt_t;
21839 
21840 struct zone_fstab {
21841  char zone_fs_special[1024]; /* special file */
21842  char zone_fs_dir[1024]; /* mount point */
21843  char zone_fs_type[16]; /* e.g. ufs */
21844  zone_fsopt_t *zone_fs_options; /* mount options */
21845  char zone_fs_raw[1024]; /* device to fsck */
21846 };
21847 
21848 struct zone_nwiftab {
21849  char zone_nwif_address[46]; /* shared-ip only */
21850  char zone_nwif_allowed_address[46]; /* excl-ip only */
21851  char zone_nwif_physical[32];
21852  char zone_nwif_defrouter[46];
21853 };
21854 
21855 struct zone_devtab {
21856  char zone_dev_match[1024];
21857 };
21858 
21859 struct zone_rctlvaltab {
21860  char zone_rctlval_priv[256];
21861  char zone_rctlval_limit[256];
21862  char zone_rctlval_action[256];
21863  struct zone_rctlvaltab *zone_rctlval_next;
21864 };
21865 
21866 struct zone_rctltab {
21867  char zone_rctl_name[256];
21868  struct zone_rctlvaltab *zone_rctl_valptr;
21869 };
21870 
21871 struct zone_attrtab {
21872  char zone_attr_name[256];
21873  char zone_attr_type[256];
21874  char zone_attr_value[2 * 1024];
21875 };
21876 
21877 struct zone_dstab {
21878  char zone_dataset_name[256];
21879 };
21880 
21881 struct zone_psettab {
21882  char zone_ncpu_min[256];
21883  char zone_ncpu_max[256];
21884  char zone_importance[256];
21885 };
21886 
21887 struct zone_mcaptab {
21888  char zone_physmem_cap[256];
21889 };
21890 
21891 struct zone_pkgtab {
21892  char zone_pkg_name[256];
21893  char zone_pkg_version[256];
21894 };
21895 
21896 struct zone_devpermtab {
21897  char zone_devperm_name[1024];
21898  uid_t zone_devperm_uid;
21899  gid_t zone_devperm_gid;
21900  mode_t zone_devperm_mode;
21901  char *zone_devperm_acl;
21902 };
21903 
21904 struct zone_admintab {
21905  char zone_admin_user[(sizeof (((struct utmpx *)0)->ut_user))];
21906  char zone_admin_auths[4096];
21907 };
21908 
21909 typedef struct zone_userauths {
21910  char user[(sizeof (((struct utmpx *)0)->ut_user))];
21911  char zonename[64];
21912  struct zone_userauths *next;
21913 } zone_userauths_t;
21914 
21915 typedef struct {
21916  uu_avl_node_t zpe_entry;
21917  char *zpe_name;
21918  char *zpe_vers;
21919 } zone_pkg_entry_t;
21920 
21921 typedef enum zone_iptype {
21922  ZS_SHARED,
21923  ZS_EXCLUSIVE
21924 } zone_iptype_t;
21925 
21926 /*
21927  * Basic configuration management routines.
21928  */
21929 extern zone_dochandle_t zonecfg_init_handle(void);
21930 extern int zonecfg_get_handle(const char *, zone_dochandle_t);
21931 extern int zonecfg_get_snapshot_handle(const char *, zone_dochandle_t);
21932 extern int zonecfg_get_template_handle(const char *, const char *,
21933     zone_dochandle_t);
21934 extern int zonecfg_get_xml_handle(const char *, zone_dochandle_t);
21935 extern int zonecfg_check_handle(zone_dochandle_t);
21936 extern void zonecfg_fini_handle(zone_dochandle_t);
21937 extern int zonecfg_destroy(const char *, boolean_t);
21938 extern int zonecfg_destroy_snapshot(const char *);
21939 extern int zonecfg_save(zone_dochandle_t);
21940 extern int zonecfg_create_snapshot(const char *);
21941 extern char *zonecfg_strerror(int);
21942 extern int zonecfg_access(const char *, int);
21943 extern void zonecfg_set_root(const char *);
21944 extern const char *zonecfg_get_root(void);
21945 extern boolean_t zonecfg_in_alt_root(void);
21946 extern int zonecfg_num_resources(zone_dochandle_t, char *);
21947 extern int zonecfg_del_all_resources(zone_dochandle_t, char *);
21948 extern boolean_t zonecfg_valid_ncpus(char *, char *);
21949 extern boolean_t zonecfg_valid_importance(char *);
21950 extern int zonecfg_str_to_bytes(char *, uint64_t *);
21951 extern boolean_t zonecfg_valid_memlimit(char *, uint64_t *);
21952 extern boolean_t zonecfg_valid_alias_limit(char *, char *, uint64_t *);
21953 
21954 /*
21955  * Zone name, path to zone directory, autoboot setting, pool, boot
21956  * arguments, and scheduling-class.
21957  */
21958 extern int zonecfg_validate_zonename(const char *);
21959 extern int zonecfg_get_name(zone_dochandle_t, char *, size_t);
21960 extern int zonecfg_set_name(zone_dochandle_t, char *);
21961 extern int zonecfg_get_zonepath(zone_dochandle_t, char *, size_t);
21962 extern int zonecfg_set_zonepath(zone_dochandle_t, char *);
21963 extern int zonecfg_get_autoboot(zone_dochandle_t, boolean_t *);
21964 extern int zonecfg_set_autoboot(zone_dochandle_t, boolean_t);
21965 extern int zonecfg_get_iptype(zone_dochandle_t, zone_iptype_t *);
21966 extern int zonecfg_set_iptype(zone_dochandle_t, zone_iptype_t);
21967 extern int zonecfg_get_pool(zone_dochandle_t, char *, size_t);
21968 extern int zonecfg_set_pool(zone_dochandle_t, char *);
21969 extern int zonecfg_get_bootargs(zone_dochandle_t, char *, size_t);
21970 extern int zonecfg_set_bootargs(zone_dochandle_t, char *);
21971 extern int zonecfg_get_sched_class(zone_dochandle_t, char *, size_t);
21972 extern int zonecfg_set_sched(zone_dochandle_t, char *);
21973 extern int zonecfg_get_dflt_sched_class(zone_dochandle_t, char *, int);
21974 
21975 /*
21976  * Set/retrieve the brand for the zone
21977  */
21978 extern int zonecfg_get_brand(zone_dochandle_t, char *, size_t);
21979 extern int zonecfg_set_brand(zone_dochandle_t, char *);
21980 
21981 /*
21982  * Filesystem configuration.
21983  */
21984 extern int zonecfg_add_filesystem(zone_dochandle_t, struct zone_fstab *);
21985 extern int zonecfg_delete_filesystem(zone_dochandle_t,
21986     struct zone_fstab *);
21987 extern int zonecfg_modify_filesystem(zone_dochandle_t,
21988     struct zone_fstab *, struct zone_fstab *);
21989 extern int zonecfg_lookup_filesystem(zone_dochandle_t,
21990     struct zone_fstab *);
21991 extern int zonecfg_add_fs_option(struct zone_fstab *, char *);
21992 extern int zonecfg_remove_fs_option(struct zone_fstab *, char *);
21993 extern void zonecfg_free_fs_option_list(zone_fsopt_t *);
21994 extern int zonecfg_find_mounts(char *, int(*)(const struct mnttab *,
21995     void *), void *);
21996 
21997 /*
21998  * Network interface configuration.
21999  */
22000 extern int zonecfg_add_nwif(zone_dochandle_t, struct zone_nwiftab *);
22001 extern int zonecfg_delete_nwif(zone_dochandle_t, struct zone_nwiftab *);
22002 extern int zonecfg_modify_nwif(zone_dochandle_t, struct zone_nwiftab *,
22003     struct zone_nwiftab *);
22004 extern int zonecfg_lookup_nwif(zone_dochandle_t, struct zone_nwiftab *);
22005 
22006 /*
22007  * Hostid emulation configuration.
22008  */
22009 extern int zonecfg_get_hostid(zone_dochandle_t, char *, size_t);
22010 extern int zonecfg_set_hostid(zone_dochandle_t, const char *);
22011 
22012 /*
22013  * Allowed FS mounts configuration.
22014  */
22015 extern int zonecfg_get_fs_allowed(zone_dochandle_t, char *, size_t);
22016 extern int zonecfg_set_fs_allowed(zone_dochandle_t, const char *);
22017 
22018 /*
22019  * Device configuration and rule matching.
22020  */
22021 extern int zonecfg_add_dev(zone_dochandle_t, struct zone_devtab *);
22022 extern int zonecfg_delete_dev(zone_dochandle_t, struct zone_devtab *);
22023 extern int zonecfg_modify_dev(zone_dochandle_t, struct zone_devtab *,
22024     struct zone_devtab *);
22025 extern int zonecfg_lookup_dev(zone_dochandle_t, struct zone_devtab *);
22026 
22027 /*
22028  * Resource control configuration.
22029  */
22030 extern int zonecfg_add_rctl(zone_dochandle_t, struct zone_rctltab *);
22031 extern int zonecfg_delete_rctl(zone_dochandle_t, struct zone_rctltab *);
22032 extern int zonecfg_modify_rctl(zone_dochandle_t, struct zone_rctltab *,
22033     struct zone_rctltab *);
22034 extern int zonecfg_lookup_rctl(zone_dochandle_t, struct zone_rctltab *);
22035 extern int zonecfg_add_rctl_value(struct zone_rctltab *,
22036     struct zone_rctlvaltab *);
22037 extern int zonecfg_remove_rctl_value(struct zone_rctltab *,
22038     struct zone_rctlvaltab *);
22039 extern void zonecfg_free_rctl_value_list(struct zone_rctlvaltab *);
22040 extern boolean_t zonecfg_aliased_rctl_ok(zone_dochandle_t, char *);
22041 extern int zonecfg_set_aliased_rctl(zone_dochandle_t, char *, uint64_t);
22042 extern int zonecfg_get_aliased_rctl(zone_dochandle_t, char *, uint64_t *);
22043 extern int zonecfg_rm_aliased_rctl(zone_dochandle_t, char *);
22044 extern int zonecfg_apply_rctls(char *, zone_dochandle_t);
22045 
22046 /*
22047  * Generic attribute configuration and type/value extraction.
22048  */
22049 extern int zonecfg_add_attr(zone_dochandle_t, struct zone_attrtab *);
22050 extern int zonecfg_delete_attr(zone_dochandle_t, struct zone_attrtab *);
22051 extern int zonecfg_modify_attr(zone_dochandle_t, struct zone_attrtab *,
22052     struct zone_attrtab *);
22053 extern int zonecfg_lookup_attr(zone_dochandle_t, struct zone_attrtab *);
22054 extern int zonecfg_get_attr_boolean(const struct zone_attrtab *,
22055     boolean_t *);
22056 extern int zonecfg_get_attr_int(const struct zone_attrtab *, int64_t *);
22057 extern int zonecfg_get_attr_string(const struct zone_attrtab *, char *,
22058     size_t);
22059 extern int zonecfg_get_attr_uint(const struct zone_attrtab *, uint64_t *);
22060 
22061 /*
22062  * ZFS configuration.
22063  */
22064 extern int zonecfg_add_ds(zone_dochandle_t, struct zone_dstab *);
22065 extern int zonecfg_delete_ds(zone_dochandle_t, struct zone_dstab *);
22066 extern int zonecfg_modify_ds(zone_dochandle_t, struct zone_dstab *,
22067     struct zone_dstab *);
22068 extern int zonecfg_lookup_ds(zone_dochandle_t, struct zone_dstab *);
22069 
22070 /*
22071  * cpu-set configuration.
22072  */
22073 extern int zonecfg_add_pset(zone_dochandle_t, struct zone_psettab *);
22074 extern int zonecfg_delete_pset(zone_dochandle_t);
22075 extern int zonecfg_modify_pset(zone_dochandle_t, struct zone_psettab *);
22076 extern int zonecfg_lookup_pset(zone_dochandle_t, struct zone_psettab *);
22077 
22078 /*
22079  * mem-cap configuration.
22080  */
22081 extern int zonecfg_delete_mcap(zone_dochandle_t);
22082 extern int zonecfg_modify_mcap(zone_dochandle_t, struct zone_mcaptab *);
22083 extern int zonecfg_lookup_mcap(zone_dochandle_t, struct zone_mcaptab *);
22084 
22085 /*
22086  * Temporary pool support functions.
22087  */
22088 extern int zonecfg_destroy_tmp_pool(char *, char *, int);
22089 extern int zonecfg_bind_tmp_pool(zone_dochandle_t, zoneid_t, char *, int);
22090 extern int zonecfg_bind_pool(zone_dochandle_t, zoneid_t, char *, int);
22091 extern boolean_t zonecfg_warn_poold(zone_dochandle_t);
22092 extern int zonecfg_get_poolname(zone_dochandle_t, char *, char *, size_t);
22093 
22094 /*
22095  * Miscellaneous utility functions.
22096  */
22097 extern int zonecfg_enable_rcapd(char *, int);
22098 
22099 /*
22100  * attach/detach support.
22101  */
22102 extern int zonecfg_get_attach_handle(const char *, const char *,
22103     const char *, boolean_t, zone_dochandle_t);
22104 extern int zonecfg_attach_manifest(int, zone_dochandle_t,
22105     zone_dochandle_t);
22106 extern int zonecfg_detach_save(zone_dochandle_t, uint_t);
22107 extern boolean_t zonecfg_detached(const char *);
22108 extern void zonecfg_rm_detached(zone_dochandle_t, boolean_t forced);
22109 extern int zonecfg_dev_manifest(zone_dochandle_t);
22110 extern int zonecfg_devperms_apply(zone_dochandle_t, const char *,
22111     uid_t, gid_t, mode_t, const char *);
22112 extern void zonecfg_set_swinv(zone_dochandle_t);
22113 extern int zonecfg_add_pkg(zone_dochandle_t, char *, char *);
22114 
22115 /*
22116  * External zone verification support.
22117  */
22118 extern int zonecfg_verify_save(zone_dochandle_t, char *);
22119 
22120 /*
22121  * '*ent' iterator routines.
22122  */
22123 extern int zonecfg_setfsent(zone_dochandle_t);
22124 extern int zonecfg_getfsent(zone_dochandle_t, struct zone_fstab *);
22125 extern int zonecfg_endfsent(zone_dochandle_t);
22126 extern int zonecfg_setnwifent(zone_dochandle_t);
22127 extern int zonecfg_getnwifent(zone_dochandle_t, struct zone_nwiftab *);
22128 extern int zonecfg_endnwifent(zone_dochandle_t);
22129 extern int zonecfg_setdevent(zone_dochandle_t);
22130 extern int zonecfg_getdevent(zone_dochandle_t, struct zone_devtab *);
22131 extern int zonecfg_enddevent(zone_dochandle_t);
22132 extern int zonecfg_setattrent(zone_dochandle_t);
22133 extern int zonecfg_getattrent(zone_dochandle_t, struct zone_attrtab *);
22134 extern int zonecfg_endattrent(zone_dochandle_t);
22135 extern int zonecfg_setrctlent(zone_dochandle_t);
22136 extern int zonecfg_getrctlent(zone_dochandle_t, struct zone_rctltab *);
22137 extern int zonecfg_endrctlent(zone_dochandle_t);
22138 extern int zonecfg_setdsent(zone_dochandle_t);
22139 extern int zonecfg_getdsent(zone_dochandle_t, struct zone_dstab *);
22140 extern int zonecfg_enddsent(zone_dochandle_t);
22141 extern int zonecfg_getpsetent(zone_dochandle_t, struct zone_psettab *);
22142 extern int zonecfg_getmcapent(zone_dochandle_t, struct zone_mcaptab *);
22143 extern int zonecfg_getpkgdata(zone_dochandle_t, uu_avl_pool_t *,
22144     uu_avl_t *);
22145 extern int zonecfg_setdevperment(zone_dochandle_t);
22146 extern int zonecfg_getdevperment(zone_dochandle_t,
22147     struct zone_devpermtab *);
22148 extern int zonecfg_enddevperment(zone_dochandle_t);
22149 extern int zonecfg_setadminent(zone_dochandle_t);
22150 extern int zonecfg_getadminent(zone_dochandle_t, struct zone_admintab *);
22151 extern int zonecfg_endadminent(zone_dochandle_t);
22152 
22153 /*
22154  * Privilege-related functions.
22155  */
22156 extern int zonecfg_default_privset(priv_set_t *, const char *);
22157 extern int zonecfg_get_privset(zone_dochandle_t, priv_set_t *,
22158     char **);
22159 extern int zonecfg_get_limitpriv(zone_dochandle_t, char **);
22160 extern int zonecfg_set_limitpriv(zone_dochandle_t, char *);
22161 
22162 /*
22163  * Higher-level routines.
22164  */
22165 extern int zone_get_brand(char *, char *, size_t);
22166 extern int zone_get_rootpath(char *, char *, size_t);
22167 extern int zone_get_devroot(char *, char *, size_t);
22168 extern int zone_get_zonepath(char *, char *, size_t);
22169 extern int zone_get_state(char *, zone_state_t *);
22170 extern int zone_set_state(char *, zone_state_t);
22171 extern char *zone_state_str(zone_state_t);
22172 extern int zonecfg_get_name_by_uuid(const uuid_t, char *, size_t);
22173 extern int zonecfg_get_uuid(const char *, uuid_t);
22174 extern int zonecfg_default_brand(char *, size_t);
22175 
22176 /*
22177  * Iterator for configured zones.
22178  */
22179 extern FILE *setzoneent(void);
22180 extern char *getzoneent(FILE *);
22181 extern struct zoneent *getzoneent_private(FILE *);
22182 extern void endzoneent(FILE *);
22183 
22184 /*
22185  * File-system-related convenience functions.
22186  */
22187 extern boolean_t zonecfg_valid_fs_type(const char *);
22188 
22189 /*
22190  * Network-related convenience functions.
22191  */
22192 extern boolean_t zonecfg_same_net_address(char *, char *);
22193 extern int zonecfg_valid_net_address(char *, struct lifreq *);
22194 extern boolean_t zonecfg_ifname_exists(sa_family_t, char *);
22195 
22196 /*
22197  * Rctl-related common functions.
22198  */
22199 extern boolean_t zonecfg_is_rctl(const char *);
22200 extern boolean_t zonecfg_valid_rctlname(const char *);
22201 extern boolean_t zonecfg_valid_rctlblk(const rctlblk_t *);
22202 extern boolean_t zonecfg_valid_rctl(const char *, const rctlblk_t *);
22203 extern int zonecfg_construct_rctlblk(const struct zone_rctlvaltab *,
22204     rctlblk_t *);
22205 
22206 /*
22207  * Live Upgrade support functions.  Shared between ON and install gate.
22208  */
22209 extern FILE *zonecfg_open_scratch(const char *, boolean_t);
22210 extern int zonecfg_lock_scratch(FILE *);
22211 extern void zonecfg_close_scratch(FILE *);
22212 extern int zonecfg_get_scratch(FILE *, char *, size_t, char *, size_t, char *,
22213     size_t);
22214 extern int zonecfg_find_scratch(FILE *, const char *, const char *, char *,
22215     size_t);
22216 extern int zonecfg_reverse_scratch(FILE *, const char *, char *, size_t,
22217     char *, size_t);
22218 extern int zonecfg_add_scratch(FILE *, const char *, const char *,
22219     const char *);
22220 extern int zonecfg_delete_scratch(FILE *, const char *);
22221 extern boolean_t zonecfg_is_scratch(const char *);
22222 
22223 /*
22224  * zoneadmd support functions.  Shared between zoneadm and brand hook code.
22225  */
22226 extern void zonecfg_init_lock_file(const char *, char **);
22227 extern void zonecfg_release_lock_file(const char *, int);
22228 extern int zonecfg_grab_lock_file(const char *, int *);
22229 extern boolean_t zonecfg_lock_file_held(int *);
22230 extern int zonecfg_ping_zoneadmd(const char *);
22231 extern int zonecfg_call_zoneadmd(const char *, zone_cmd_arg_t *, char *,
22232     boolean_t);
22233 extern int zonecfg_insert_userauths(zone_dochandle_t, char *, char *);
22234 extern int zonecfg_remove_userauths(zone_dochandle_t, char *, char *,
22235     boolean_t);
22236 extern int zonecfg_add_admin(zone_dochandle_t, struct zone_admintab *,
22237     char *);
22238 extern int zonecfg_delete_admin(zone_dochandle_t,
22239     struct zone_admintab *, char *);
22240 extern int zonecfg_modify_admin(zone_dochandle_t, struct zone_admintab *,
22241     struct zone_admintab *, char *);
22242 extern int zonecfg_delete_admins(zone_dochandle_t, char *);
22243 extern int zonecfg_lookup_admin(zone_dochandle_t, struct zone_admintab *);
22244 extern int zonecfg_authorize_users(zone_dochandle_t, char *);
22245 extern int zonecfg_update_userauths(zone_dochandle_t, char *);
22246 extern int zonecfg_deauthorize_user(zone_dochandle_t, char *, char *);
22247 extern int zonecfg_deauthorize_users(zone_dochandle_t, char *);
22248 extern boolean_t zonecfg_valid_auths(const char *, const char *);
22249 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/instzones_api.h" 2
22250 
22251 /*
22252  * C++ prefix
22253  */
22254 
22255 
22256 
22257 
22258 
22259 
22260 /* function prototypes */
22261 
22262 /* PRINTFLIKE1 */
22263 typedef void (*_z_printf_fcn_t)(char *a_format, ...);
22264 
22265 /* zone list structure */
22266 
22267 typedef struct _zoneListElement_t *zoneList_t;
22268 
22269 /* zone brand list structure */
22270 
22271 typedef struct _zoneBrandList zoneBrandList_t;
22272 
22273 /* flag for zone locking functions */
22274 
22275 typedef unsigned long ZLOCKS_T;
22276 
22277 /* flags for zone locking */
22278 
22279 
22280 
22281 
22282 
22283 
22284 /*
22285  * external function definitions
22286  */
22287 
22288 /* zones.c */
22289 
22290 extern boolean_t z_zones_are_implemented(void);
22291 extern void z_set_zone_root(const char *zroot);
22292 extern boolean_t z_zlist_is_zone_runnable(zoneList_t a_zoneList,
22293     int a_zoneIndex);
22294 extern boolean_t z_zlist_restore_zone_state(zoneList_t a_zoneList,
22295     int a_zoneIndex);
22296 extern boolean_t z_zlist_change_zone_state(zoneList_t a_zoneList,
22297     int a_zoneIndex, zone_state_t a_newState);
22298 extern char *z_get_zonename(void);
22299 extern zone_state_t z_zlist_get_current_state(zoneList_t a_zoneList,
22300     int a_zoneIndex);
22301 extern zone_state_t z_zlist_get_original_state(zoneList_t a_zoneList,
22302     int a_zoneIndex);
22303 extern int z_zoneExecCmdArray(int *r_status, char **r_results,
22304     char *a_inputFile, char *a_path, char *a_argv[],
22305     const char *a_zoneName, int *a_fds);
22306 extern int z_zone_exec(const char *zonename, const char *path,
22307     char *argv[], char *a_stdoutPath,
22308     char *a_stderrPath, int *a_fds);
22309 extern boolean_t z_create_zone_admin_file(char *a_zoneAdminFilename,
22310     char *a_userAdminFilename);
22311 extern void z_free_zone_list(zoneList_t a_zoneList);
22312 extern zoneList_t z_get_nonglobal_zone_list(void);
22313 extern zoneList_t z_get_nonglobal_zone_list_by_brand(zoneBrandList_t *);
22314 extern void z_free_brand_list(zoneBrandList_t *a_brandList);
22315 extern zoneBrandList_t *z_make_brand_list(const char *brandList,
22316     const char *delim);
22317 extern boolean_t z_lock_zones(zoneList_t a_zlst, ZLOCKS_T a_lflags);
22318 extern boolean_t z_non_global_zones_exist(void);
22319 extern boolean_t z_running_in_global_zone(void);
22320 extern void z_set_output_functions(_z_printf_fcn_t a_echo_fcn,
22321     _z_printf_fcn_t a_echo_debug_fcn,
22322     _z_printf_fcn_t a_progerr_fcn);
22323 extern int z_set_zone_spec(const char *zlist);
22324 extern int z_verify_zone_spec(void);
22325 extern boolean_t z_on_zone_spec(const char *zonename);
22326 extern boolean_t z_global_only(void);
22327 extern boolean_t z_unlock_zones(zoneList_t a_zlst, ZLOCKS_T a_lflags);
22328 extern boolean_t z_lock_this_zone(ZLOCKS_T a_lflags);
22329 extern boolean_t z_unlock_this_zone(ZLOCKS_T a_lflags);
22330 extern char *z_zlist_get_zonename(zoneList_t a_zoneList,
22331     int a_zoneId);
22332 extern char *z_zlist_get_zonepath(zoneList_t a_zoneList,
22333     int a_zoneId);
22334 extern char *z_zlist_get_scratch(zoneList_t a_zoneList,
22335     int a_zoneId);
22336 extern boolean_t z_umount_lz_mount(char *a_lzMountPoint);
22337 extern boolean_t z_mount_in_lz(char **r_lzMountPoint,
22338     char **r_lzRootPath,
22339     char *a_zoneName, char *a_gzPath,
22340     char *a_mountPointPrefix);
22341 extern boolean_t z_is_zone_branded(char *zoneName);
22342 extern boolean_t z_is_zone_brand_in_list(char *zoneName,
22343        zoneBrandList_t *brands);
22344 extern boolean_t z_zones_are_implemented(void);
22345 
22346 /* zones_exec.c */
22347 extern int z_ExecCmdArray(int *r_status, char **r_results,
22348     char *a_inputFile, char *a_cmd, char **a_args);
22349 /*VARARGS*/
22350 extern int z_ExecCmdList(int *r_status, char **r_results,
22351     char *a_inputFile, char *a_cmd, ...);
22352 
22353 /* zones_paths.c */
22354 extern char *z_make_zone_root(char *);
22355 extern void z_path_canonize(char *file);
22356 extern void z_canoninplace(char *file);
22357 
22358 /* zones_lofs.c */
22359 extern void z_destroyMountTable(void);
22360 extern int z_createMountTable(void);
22361 extern int z_isPathWritable(const char *);
22362 extern void z_resolve_lofs(char *path, size_t);
22363 
22364 /* zones_states.c */
22365 extern int UmountAllZones(char *mntpnt);
22366 
22367 /*
22368  * C++ postfix
22369  */
22370 # 56 "main.c" 2
22371 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
22372 /*
22373  * CDDL HEADER START
22374  *
22375  * The contents of this file are subject to the terms of the
22376  * Common Development and Distribution License (the "License").
22377  * You may not use this file except in compliance with the License.
22378  *
22379  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22380  * or http://www.opensolaris.org/os/licensing.
22381  * See the License for the specific language governing permissions
22382  * and limitations under the License.
22383  *
22384  * When distributing Covered Code, include this CDDL HEADER in each
22385  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22386  * If applicable, add the following below this CDDL HEADER, with the
22387  * fields enclosed by brackets "[]" replaced with your own identifying
22388  * information: Portions Copyright [yyyy] [name of copyright owner]
22389  *
22390  * CDDL HEADER END
22391  */
22392 
22393 /*
22394  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22395  * Use is subject to license terms.
22396  */
22397 
22398 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
22399 /* All Rights Reserved */
22400 # 38 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
22401 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
22402 /*
22403  * CDDL HEADER START
22404  *
22405  * The contents of this file are subject to the terms of the
22406  * Common Development and Distribution License (the "License").
22407  * You may not use this file except in compliance with the License.
22408  *
22409  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22410  * or http://www.opensolaris.org/os/licensing.
22411  * See the License for the specific language governing permissions
22412  * and limitations under the License.
22413  *
22414  * When distributing Covered Code, include this CDDL HEADER in each
22415  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22416  * If applicable, add the following below this CDDL HEADER, with the
22417  * fields enclosed by brackets "[]" replaced with your own identifying
22418  * information: Portions Copyright [yyyy] [name of copyright owner]
22419  *
22420  * CDDL HEADER END
22421  */
22422 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22423 /*	  All Rights Reserved  	*/
22424 
22425 
22426 /*
22427  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22428  * Use is subject to license terms.
22429  *
22430  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
22431  * Copyright 2016 Joyent, Inc.
22432  */
22433 # 39 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
22434 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
22435 /*
22436  * CDDL HEADER START
22437  *
22438  * The contents of this file are subject to the terms of the
22439  * Common Development and Distribution License (the "License").
22440  * You may not use this file except in compliance with the License.
22441  *
22442  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22443  * or http://www.opensolaris.org/os/licensing.
22444  * See the License for the specific language governing permissions
22445  * and limitations under the License.
22446  *
22447  * When distributing Covered Code, include this CDDL HEADER in each
22448  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22449  * If applicable, add the following below this CDDL HEADER, with the
22450  * fields enclosed by brackets "[]" replaced with your own identifying
22451  * information: Portions Copyright [yyyy] [name of copyright owner]
22452  *
22453  * CDDL HEADER END
22454  */
22455 
22456 /*
22457  * Copyright (c) 2013 Gary Mills
22458  *
22459  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
22460  * Use is subject to license terms.
22461  */
22462 
22463 /*	Copyright (c) 1988 AT&T	*/
22464 /*	  All Rights Reserved  	*/
22465 # 40 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
22466 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
22467 /*
22468  * CDDL HEADER START
22469  *
22470  * The contents of this file are subject to the terms of the
22471  * Common Development and Distribution License (the "License").
22472  * You may not use this file except in compliance with the License.
22473  *
22474  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22475  * or http://www.opensolaris.org/os/licensing.
22476  * See the License for the specific language governing permissions
22477  * and limitations under the License.
22478  *
22479  * When distributing Covered Code, include this CDDL HEADER in each
22480  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22481  * If applicable, add the following below this CDDL HEADER, with the
22482  * fields enclosed by brackets "[]" replaced with your own identifying
22483  * information: Portions Copyright [yyyy] [name of copyright owner]
22484  *
22485  * CDDL HEADER END
22486  */
22487 
22488 /*
22489  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
22490  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
22491  */
22492 
22493 /*	Copyright (c) 1988 AT&T	*/
22494 /*	  All Rights Reserved  	*/
22495 
22496 /*
22497  * User-visible pieces of the ANSI C standard I/O package.
22498  */
22499 # 41 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
22500 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 1
22501 /*
22502  * CDDL HEADER START
22503  *
22504  * The contents of this file are subject to the terms of the
22505  * Common Development and Distribution License, Version 1.0 only
22506  * (the "License").  You may not use this file except in compliance
22507  * with the License.
22508  *
22509  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22510  * or http://www.opensolaris.org/os/licensing.
22511  * See the License for the specific language governing permissions
22512  * and limitations under the License.
22513  *
22514  * When distributing Covered Code, include this CDDL HEADER in each
22515  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22516  * If applicable, add the following below this CDDL HEADER, with the
22517  * fields enclosed by brackets "[]" replaced with your own identifying
22518  * information: Portions Copyright [yyyy] [name of copyright owner]
22519  *
22520  * CDDL HEADER END
22521  */
22522 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22523 /*	  All Rights Reserved  	*/
22524 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
22525 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
22526 /*
22527  * CDDL HEADER START
22528  *
22529  * The contents of this file are subject to the terms of the
22530  * Common Development and Distribution License (the "License").
22531  * You may not use this file except in compliance with the License.
22532  *
22533  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22534  * or http://www.opensolaris.org/os/licensing.
22535  * See the License for the specific language governing permissions
22536  * and limitations under the License.
22537  *
22538  * When distributing Covered Code, include this CDDL HEADER in each
22539  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22540  * If applicable, add the following below this CDDL HEADER, with the
22541  * fields enclosed by brackets "[]" replaced with your own identifying
22542  * information: Portions Copyright [yyyy] [name of copyright owner]
22543  *
22544  * CDDL HEADER END
22545  */
22546 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22547 /*	  All Rights Reserved  	*/
22548 
22549 /*
22550  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
22551  * Use is subject to license terms.
22552  */
22553 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
22554 # 1 "/usr/include/openssl/bio.h" 1 3 4
22555 /* crypto/bio/bio.h */
22556 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
22557  * All rights reserved.
22558  *
22559  * This package is an SSL implementation written
22560  * by Eric Young (eay@cryptsoft.com).
22561  * The implementation was written so as to conform with Netscapes SSL.
22562  *
22563  * This library is free for commercial and non-commercial use as long as
22564  * the following conditions are aheared to.  The following conditions
22565  * apply to all code found in this distribution, be it the RC4, RSA,
22566  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
22567  * included with this distribution is covered by the same copyright terms
22568  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
22569  *
22570  * Copyright remains Eric Young's, and as such any Copyright notices in
22571  * the code are not to be removed.
22572  * If this package is used in a product, Eric Young should be given attribution
22573  * as the author of the parts of the library used.
22574  * This can be in the form of a textual message at program startup or
22575  * in documentation (online or textual) provided with the package.
22576  *
22577  * Redistribution and use in source and binary forms, with or without
22578  * modification, are permitted provided that the following conditions
22579  * are met:
22580  * 1. Redistributions of source code must retain the copyright
22581  *    notice, this list of conditions and the following disclaimer.
22582  * 2. Redistributions in binary form must reproduce the above copyright
22583  *    notice, this list of conditions and the following disclaimer in the
22584  *    documentation and/or other materials provided with the distribution.
22585  * 3. All advertising materials mentioning features or use of this software
22586  *    must display the following acknowledgement:
22587  *    "This product includes cryptographic software written by
22588  *     Eric Young (eay@cryptsoft.com)"
22589  *    The word 'cryptographic' can be left out if the rouines from the library
22590  *    being used are not cryptographic related :-).
22591  * 4. If you include any Windows specific code (or a derivative thereof) from
22592  *    the apps directory (application code) you must include an acknowledgement:
22593  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
22594  *
22595  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
22596  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22597  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22598  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22599  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22600  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22601  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22602  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22603  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22604  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22605  * SUCH DAMAGE.
22606  *
22607  * The licence and distribution terms for any publically available version or
22608  * derivative of this code cannot be changed.  i.e. this code cannot simply be
22609  * copied and put under another distribution licence
22610  * [including the GNU Public Licence.]
22611  */
22612 
22613 
22614 
22615 
22616 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
22617 /* e_os2.h */
22618 /* ====================================================================
22619  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
22620  *
22621  * Redistribution and use in source and binary forms, with or without
22622  * modification, are permitted provided that the following conditions
22623  * are met:
22624  *
22625  * 1. Redistributions of source code must retain the above copyright
22626  *    notice, this list of conditions and the following disclaimer.
22627  *
22628  * 2. Redistributions in binary form must reproduce the above copyright
22629  *    notice, this list of conditions and the following disclaimer in
22630  *    the documentation and/or other materials provided with the
22631  *    distribution.
22632  *
22633  * 3. All advertising materials mentioning features or use of this
22634  *    software must display the following acknowledgment:
22635  *    "This product includes software developed by the OpenSSL Project
22636  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
22637  *
22638  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
22639  *    endorse or promote products derived from this software without
22640  *    prior written permission. For written permission, please contact
22641  *    openssl-core@openssl.org.
22642  *
22643  * 5. Products derived from this software may not be called "OpenSSL"
22644  *    nor may "OpenSSL" appear in their names without prior written
22645  *    permission of the OpenSSL Project.
22646  *
22647  * 6. Redistributions of any form whatsoever must retain the following
22648  *    acknowledgment:
22649  *    "This product includes software developed by the OpenSSL Project
22650  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
22651  *
22652  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
22653  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22654  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22655  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
22656  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22657  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22658  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22659  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22660  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
22661  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22662  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
22663  * OF THE POSSIBILITY OF SUCH DAMAGE.
22664  * ====================================================================
22665  *
22666  * This product includes cryptographic software written by Eric Young
22667  * (eay@cryptsoft.com).  This product includes software written by Tim
22668  * Hudson (tjh@cryptsoft.com).
22669  *
22670  */
22671 
22672 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
22673 /* opensslconf.h */
22674 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
22675 
22676 
22677 
22678 
22679 /* OpenSSL was configured with the following options: */
22680 # 108 "/usr/include/openssl/opensslconf.h" 3 4
22681 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
22682    asks for it.  This is a transient feature that is provided for those
22683    who haven't had the time to do the appropriate changes in their
22684    applications.  */
22685 # 204 "/usr/include/openssl/opensslconf.h" 3 4
22686 /* crypto/opensslconf.h.in */
22687 
22688 /* Generate 80386 code? */
22689 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
22690 # 65 "/usr/include/openssl/e_os2.h" 3 4
22691 /******************************************************************************
22692  * Detect operating systems.  This probably needs completing.
22693  * The result is that at least one OPENSSL_SYS_os macro should be defined.
22694  * However, if none is defined, Unix is assumed.
22695  **/
22696 
22697 
22698 
22699 /* ---------------------- Macintosh, before MacOS X ----------------------- */
22700 
22701 
22702 
22703 
22704 
22705 /* ---------------------- NetWare ----------------------------------------- */
22706 
22707 
22708 
22709 
22710 
22711 /* --------------------- Microsoft operating systems ---------------------- */
22712 
22713 /*
22714  * Note that MSDOS actually denotes 32-bit environments running on top of
22715  * MS-DOS, such as DJGPP one.
22716  */
22717 
22718 
22719 
22720 
22721 
22722 /*
22723  * For 32 bit environment, there seems to be the CygWin environment and then
22724  * all the others that try to do the same thing Microsoft does...
22725  */
22726 # 129 "/usr/include/openssl/e_os2.h" 3 4
22727 /* Anything that tries to look like Microsoft is "Windows" */
22728 # 138 "/usr/include/openssl/e_os2.h" 3 4
22729 /*
22730  * DLL settings.  This part is a bit tough, because it's up to the
22731  * application implementor how he or she will link the application, so it
22732  * requires some macro to be used.
22733  */
22734 # 152 "/usr/include/openssl/e_os2.h" 3 4
22735 /* ------------------------------- OpenVMS -------------------------------- */
22736 # 166 "/usr/include/openssl/e_os2.h" 3 4
22737 /* -------------------------------- OS/2 ---------------------------------- */
22738 
22739 
22740 
22741 
22742 
22743 /* -------------------------------- Unix ---------------------------------- */
22744 # 207 "/usr/include/openssl/e_os2.h" 3 4
22745 /* -------------------------------- VOS ----------------------------------- */
22746 # 218 "/usr/include/openssl/e_os2.h" 3 4
22747 /* ------------------------------ VxWorks --------------------------------- */
22748 
22749 
22750 
22751 
22752 /* -------------------------------- BeOS ---------------------------------- */
22753 # 234 "/usr/include/openssl/e_os2.h" 3 4
22754 /**
22755  * That's it for OS-specific stuff
22756  *****************************************************************************/
22757 
22758 /* Specials for I/O an exit */
22759 # 247 "/usr/include/openssl/e_os2.h" 3 4
22760 /*-
22761  * Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare
22762  * certain global symbols that, with some compilers under VMS, have to be
22763  * defined and declared explicitely with globaldef and globalref.
22764  * Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare
22765  * DLL exports and imports for compilers under Win32.  These are a little
22766  * more complicated to use.  Basically, for any library that exports some
22767  * global variables, the following code must be present in the header file
22768  * that declares them, before OPENSSL_EXTERN is used:
22769  *
22770  * #ifdef SOME_BUILD_FLAG_MACRO
22771  * # undef OPENSSL_EXTERN
22772  * # define OPENSSL_EXTERN OPENSSL_EXPORT
22773  * #endif
22774  *
22775  * The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL
22776  * have some generally sensible values, and for OPENSSL_EXTERN to have the
22777  * value OPENSSL_IMPORT.
22778  */
22779 # 282 "/usr/include/openssl/e_os2.h" 3 4
22780 /*-
22781  * Macros to allow global variables to be reached through function calls when
22782  * required (if a shared library version requires it, for example.
22783  * The way it's done allows definitions like this:
22784  *
22785  *      // in foobar.c
22786  *      OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
22787  *      // in foobar.h
22788  *      OPENSSL_DECLARE_GLOBAL(int,foobar);
22789  *      #define foobar OPENSSL_GLOBAL_REF(foobar)
22790  */
22791 # 63 "/usr/include/openssl/bio.h" 2 3 4
22792 
22793 
22794 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
22795 /*
22796  * CDDL HEADER START
22797  *
22798  * The contents of this file are subject to the terms of the
22799  * Common Development and Distribution License (the "License").
22800  * You may not use this file except in compliance with the License.
22801  *
22802  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22803  * or http://www.opensolaris.org/os/licensing.
22804  * See the License for the specific language governing permissions
22805  * and limitations under the License.
22806  *
22807  * When distributing Covered Code, include this CDDL HEADER in each
22808  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22809  * If applicable, add the following below this CDDL HEADER, with the
22810  * fields enclosed by brackets "[]" replaced with your own identifying
22811  * information: Portions Copyright [yyyy] [name of copyright owner]
22812  *
22813  * CDDL HEADER END
22814  */
22815 
22816 /*
22817  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
22818  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
22819  */
22820 
22821 /*	Copyright (c) 1988 AT&T	*/
22822 /*	  All Rights Reserved  	*/
22823 
22824 /*
22825  * User-visible pieces of the ANSI C standard I/O package.
22826  */
22827 # 66 "/usr/include/openssl/bio.h" 2 3 4
22828 
22829 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1 3 4
22830 /*
22831  * CDDL HEADER START
22832  *
22833  * The contents of this file are subject to the terms of the
22834  * Common Development and Distribution License, Version 1.0 only
22835  * (the "License").  You may not use this file except in compliance
22836  * with the License.
22837  *
22838  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22839  * or http://www.opensolaris.org/os/licensing.
22840  * See the License for the specific language governing permissions
22841  * and limitations under the License.
22842  *
22843  * When distributing Covered Code, include this CDDL HEADER in each
22844  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22845  * If applicable, add the following below this CDDL HEADER, with the
22846  * fields enclosed by brackets "[]" replaced with your own identifying
22847  * information: Portions Copyright [yyyy] [name of copyright owner]
22848  *
22849  * CDDL HEADER END
22850  */
22851 /*	Copyright (c) 1988 AT&T	*/
22852 /*	  All Rights Reserved	*/
22853 
22854 /*
22855  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
22856  *
22857  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
22858  * Use is subject to license terms.
22859  */
22860 # 68 "/usr/include/openssl/bio.h" 2 3 4
22861 
22862 # 1 "/usr/include/openssl/crypto.h" 1 3 4
22863 /* crypto/crypto.h */
22864 /* ====================================================================
22865  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
22866  *
22867  * Redistribution and use in source and binary forms, with or without
22868  * modification, are permitted provided that the following conditions
22869  * are met:
22870  *
22871  * 1. Redistributions of source code must retain the above copyright
22872  *    notice, this list of conditions and the following disclaimer.
22873  *
22874  * 2. Redistributions in binary form must reproduce the above copyright
22875  *    notice, this list of conditions and the following disclaimer in
22876  *    the documentation and/or other materials provided with the
22877  *    distribution.
22878  *
22879  * 3. All advertising materials mentioning features or use of this
22880  *    software must display the following acknowledgment:
22881  *    "This product includes software developed by the OpenSSL Project
22882  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
22883  *
22884  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
22885  *    endorse or promote products derived from this software without
22886  *    prior written permission. For written permission, please contact
22887  *    openssl-core@openssl.org.
22888  *
22889  * 5. Products derived from this software may not be called "OpenSSL"
22890  *    nor may "OpenSSL" appear in their names without prior written
22891  *    permission of the OpenSSL Project.
22892  *
22893  * 6. Redistributions of any form whatsoever must retain the following
22894  *    acknowledgment:
22895  *    "This product includes software developed by the OpenSSL Project
22896  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
22897  *
22898  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
22899  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22900  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22901  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
22902  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22903  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22904  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22905  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22906  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
22907  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22908  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
22909  * OF THE POSSIBILITY OF SUCH DAMAGE.
22910  * ====================================================================
22911  *
22912  * This product includes cryptographic software written by Eric Young
22913  * (eay@cryptsoft.com).  This product includes software written by Tim
22914  * Hudson (tjh@cryptsoft.com).
22915  *
22916  */
22917 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
22918  * All rights reserved.
22919  *
22920  * This package is an SSL implementation written
22921  * by Eric Young (eay@cryptsoft.com).
22922  * The implementation was written so as to conform with Netscapes SSL.
22923  *
22924  * This library is free for commercial and non-commercial use as long as
22925  * the following conditions are aheared to.  The following conditions
22926  * apply to all code found in this distribution, be it the RC4, RSA,
22927  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
22928  * included with this distribution is covered by the same copyright terms
22929  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
22930  *
22931  * Copyright remains Eric Young's, and as such any Copyright notices in
22932  * the code are not to be removed.
22933  * If this package is used in a product, Eric Young should be given attribution
22934  * as the author of the parts of the library used.
22935  * This can be in the form of a textual message at program startup or
22936  * in documentation (online or textual) provided with the package.
22937  *
22938  * Redistribution and use in source and binary forms, with or without
22939  * modification, are permitted provided that the following conditions
22940  * are met:
22941  * 1. Redistributions of source code must retain the copyright
22942  *    notice, this list of conditions and the following disclaimer.
22943  * 2. Redistributions in binary form must reproduce the above copyright
22944  *    notice, this list of conditions and the following disclaimer in the
22945  *    documentation and/or other materials provided with the distribution.
22946  * 3. All advertising materials mentioning features or use of this software
22947  *    must display the following acknowledgement:
22948  *    "This product includes cryptographic software written by
22949  *     Eric Young (eay@cryptsoft.com)"
22950  *    The word 'cryptographic' can be left out if the rouines from the library
22951  *    being used are not cryptographic related :-).
22952  * 4. If you include any Windows specific code (or a derivative thereof) from
22953  *    the apps directory (application code) you must include an acknowledgement:
22954  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
22955  *
22956  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
22957  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22958  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22959  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22960  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22961  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22962  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22963  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22964  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22965  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22966  * SUCH DAMAGE.
22967  *
22968  * The licence and distribution terms for any publically available version or
22969  * derivative of this code cannot be changed.  i.e. this code cannot simply be
22970  * copied and put under another distribution licence
22971  * [including the GNU Public Licence.]
22972  */
22973 /* ====================================================================
22974  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
22975  * ECDH support in OpenSSL originally developed by
22976  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
22977  */
22978 
22979 
22980 
22981 
22982 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1 3 4
22983 /*
22984  * CDDL HEADER START
22985  *
22986  * The contents of this file are subject to the terms of the
22987  * Common Development and Distribution License (the "License").
22988  * You may not use this file except in compliance with the License.
22989  *
22990  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22991  * or http://www.opensolaris.org/os/licensing.
22992  * See the License for the specific language governing permissions
22993  * and limitations under the License.
22994  *
22995  * When distributing Covered Code, include this CDDL HEADER in each
22996  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22997  * If applicable, add the following below this CDDL HEADER, with the
22998  * fields enclosed by brackets "[]" replaced with your own identifying
22999  * information: Portions Copyright [yyyy] [name of copyright owner]
23000  *
23001  * CDDL HEADER END
23002  */
23003 
23004 /*
23005  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23006  * Copyright (c) 2013 Gary Mills
23007  *
23008  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
23009  */
23010 
23011 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
23012 
23013 /*	Copyright (c) 1988 AT&T	*/
23014 /*	  All Rights Reserved  	*/
23015 # 121 "/usr/include/openssl/crypto.h" 2 3 4
23016 
23017 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
23018 /* e_os2.h */
23019 /* ====================================================================
23020  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
23021  *
23022  * Redistribution and use in source and binary forms, with or without
23023  * modification, are permitted provided that the following conditions
23024  * are met:
23025  *
23026  * 1. Redistributions of source code must retain the above copyright
23027  *    notice, this list of conditions and the following disclaimer.
23028  *
23029  * 2. Redistributions in binary form must reproduce the above copyright
23030  *    notice, this list of conditions and the following disclaimer in
23031  *    the documentation and/or other materials provided with the
23032  *    distribution.
23033  *
23034  * 3. All advertising materials mentioning features or use of this
23035  *    software must display the following acknowledgment:
23036  *    "This product includes software developed by the OpenSSL Project
23037  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23038  *
23039  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23040  *    endorse or promote products derived from this software without
23041  *    prior written permission. For written permission, please contact
23042  *    openssl-core@openssl.org.
23043  *
23044  * 5. Products derived from this software may not be called "OpenSSL"
23045  *    nor may "OpenSSL" appear in their names without prior written
23046  *    permission of the OpenSSL Project.
23047  *
23048  * 6. Redistributions of any form whatsoever must retain the following
23049  *    acknowledgment:
23050  *    "This product includes software developed by the OpenSSL Project
23051  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
23052  *
23053  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
23054  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23055  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23056  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
23057  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23058  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23059  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23060  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23061  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23062  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23063  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23064  * OF THE POSSIBILITY OF SUCH DAMAGE.
23065  * ====================================================================
23066  *
23067  * This product includes cryptographic software written by Eric Young
23068  * (eay@cryptsoft.com).  This product includes software written by Tim
23069  * Hudson (tjh@cryptsoft.com).
23070  *
23071  */
23072 
23073 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
23074 /* opensslconf.h */
23075 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
23076 
23077 
23078 
23079 
23080 /* OpenSSL was configured with the following options: */
23081 # 108 "/usr/include/openssl/opensslconf.h" 3 4
23082 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
23083    asks for it.  This is a transient feature that is provided for those
23084    who haven't had the time to do the appropriate changes in their
23085    applications.  */
23086 # 204 "/usr/include/openssl/opensslconf.h" 3 4
23087 /* crypto/opensslconf.h.in */
23088 
23089 /* Generate 80386 code? */
23090 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
23091 # 123 "/usr/include/openssl/crypto.h" 2 3 4
23092 
23093 
23094 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
23095 /*
23096  * CDDL HEADER START
23097  *
23098  * The contents of this file are subject to the terms of the
23099  * Common Development and Distribution License (the "License").
23100  * You may not use this file except in compliance with the License.
23101  *
23102  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23103  * or http://www.opensolaris.org/os/licensing.
23104  * See the License for the specific language governing permissions
23105  * and limitations under the License.
23106  *
23107  * When distributing Covered Code, include this CDDL HEADER in each
23108  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23109  * If applicable, add the following below this CDDL HEADER, with the
23110  * fields enclosed by brackets "[]" replaced with your own identifying
23111  * information: Portions Copyright [yyyy] [name of copyright owner]
23112  *
23113  * CDDL HEADER END
23114  */
23115 
23116 /*
23117  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23118  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
23119  */
23120 
23121 /*	Copyright (c) 1988 AT&T	*/
23122 /*	  All Rights Reserved  	*/
23123 
23124 /*
23125  * User-visible pieces of the ANSI C standard I/O package.
23126  */
23127 # 126 "/usr/include/openssl/crypto.h" 2 3 4
23128 
23129 
23130 # 1 "/usr/include/openssl/stack.h" 1 3 4
23131 /* crypto/stack/stack.h */
23132 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
23133  * All rights reserved.
23134  *
23135  * This package is an SSL implementation written
23136  * by Eric Young (eay@cryptsoft.com).
23137  * The implementation was written so as to conform with Netscapes SSL.
23138  *
23139  * This library is free for commercial and non-commercial use as long as
23140  * the following conditions are aheared to.  The following conditions
23141  * apply to all code found in this distribution, be it the RC4, RSA,
23142  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
23143  * included with this distribution is covered by the same copyright terms
23144  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
23145  *
23146  * Copyright remains Eric Young's, and as such any Copyright notices in
23147  * the code are not to be removed.
23148  * If this package is used in a product, Eric Young should be given attribution
23149  * as the author of the parts of the library used.
23150  * This can be in the form of a textual message at program startup or
23151  * in documentation (online or textual) provided with the package.
23152  *
23153  * Redistribution and use in source and binary forms, with or without
23154  * modification, are permitted provided that the following conditions
23155  * are met:
23156  * 1. Redistributions of source code must retain the copyright
23157  *    notice, this list of conditions and the following disclaimer.
23158  * 2. Redistributions in binary form must reproduce the above copyright
23159  *    notice, this list of conditions and the following disclaimer in the
23160  *    documentation and/or other materials provided with the distribution.
23161  * 3. All advertising materials mentioning features or use of this software
23162  *    must display the following acknowledgement:
23163  *    "This product includes cryptographic software written by
23164  *     Eric Young (eay@cryptsoft.com)"
23165  *    The word 'cryptographic' can be left out if the rouines from the library
23166  *    being used are not cryptographic related :-).
23167  * 4. If you include any Windows specific code (or a derivative thereof) from
23168  *    the apps directory (application code) you must include an acknowledgement:
23169  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
23170  *
23171  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
23172  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23173  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23174  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23175  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23176  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23177  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23178  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23179  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23180  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23181  * SUCH DAMAGE.
23182  *
23183  * The licence and distribution terms for any publically available version or
23184  * derivative of this code cannot be changed.  i.e. this code cannot simply be
23185  * copied and put under another distribution licence
23186  * [including the GNU Public Licence.]
23187  */
23188 # 66 "/usr/include/openssl/stack.h" 3 4
23189 typedef struct stack_st {
23190     int num;
23191     char **data;
23192     int sorted;
23193     int num_alloc;
23194     int (*comp) (const void *, const void *);
23195 } _STACK; /* Use STACK_OF(...) instead */
23196 
23197 
23198 
23199 
23200 int sk_num(const _STACK *);
23201 void *sk_value(const _STACK *, int);
23202 
23203 void *sk_set(_STACK *, int, void *);
23204 
23205 _STACK *sk_new(int (*cmp) (const void *, const void *));
23206 _STACK *sk_new_null(void);
23207 void sk_free(_STACK *);
23208 void sk_pop_free(_STACK *st, void (*func) (void *));
23209 _STACK *sk_deep_copy(_STACK *, void *(*)(void *), void (*)(void *));
23210 int sk_insert(_STACK *sk, void *data, int where);
23211 void *sk_delete(_STACK *st, int loc);
23212 void *sk_delete_ptr(_STACK *st, void *p);
23213 int sk_find(_STACK *st, void *data);
23214 int sk_find_ex(_STACK *st, void *data);
23215 int sk_push(_STACK *st, void *data);
23216 int sk_unshift(_STACK *st, void *data);
23217 void *sk_shift(_STACK *st);
23218 void *sk_pop(_STACK *st);
23219 void sk_zero(_STACK *st);
23220 int (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *)))
23221  (const void *, const void *);
23222 _STACK *sk_dup(_STACK *st);
23223 void sk_sort(_STACK *st);
23224 int sk_is_sorted(const _STACK *st);
23225 # 129 "/usr/include/openssl/crypto.h" 2 3 4
23226 # 1 "/usr/include/openssl/safestack.h" 1 3 4
23227 /* ====================================================================
23228  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
23229  *
23230  * Redistribution and use in source and binary forms, with or without
23231  * modification, are permitted provided that the following conditions
23232  * are met:
23233  *
23234  * 1. Redistributions of source code must retain the above copyright
23235  *    notice, this list of conditions and the following disclaimer.
23236  *
23237  * 2. Redistributions in binary form must reproduce the above copyright
23238  *    notice, this list of conditions and the following disclaimer in
23239  *    the documentation and/or other materials provided with the
23240  *    distribution.
23241  *
23242  * 3. All advertising materials mentioning features or use of this
23243  *    software must display the following acknowledgment:
23244  *    "This product includes software developed by the OpenSSL Project
23245  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23246  *
23247  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23248  *    endorse or promote products derived from this software without
23249  *    prior written permission. For written permission, please contact
23250  *    openssl-core@openssl.org.
23251  *
23252  * 5. Products derived from this software may not be called "OpenSSL"
23253  *    nor may "OpenSSL" appear in their names without prior written
23254  *    permission of the OpenSSL Project.
23255  *
23256  * 6. Redistributions of any form whatsoever must retain the following
23257  *    acknowledgment:
23258  *    "This product includes software developed by the OpenSSL Project
23259  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
23260  *
23261  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
23262  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23263  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23264  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
23265  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23266  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23267  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23268  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23269  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23270  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23271  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23272  * OF THE POSSIBILITY OF SUCH DAMAGE.
23273  * ====================================================================
23274  *
23275  * This product includes cryptographic software written by Eric Young
23276  * (eay@cryptsoft.com).  This product includes software written by Tim
23277  * Hudson (tjh@cryptsoft.com).
23278  *
23279  */
23280 
23281 
23282 
23283 
23284 # 1 "/usr/include/openssl/stack.h" 1 3 4
23285 /* crypto/stack/stack.h */
23286 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
23287  * All rights reserved.
23288  *
23289  * This package is an SSL implementation written
23290  * by Eric Young (eay@cryptsoft.com).
23291  * The implementation was written so as to conform with Netscapes SSL.
23292  *
23293  * This library is free for commercial and non-commercial use as long as
23294  * the following conditions are aheared to.  The following conditions
23295  * apply to all code found in this distribution, be it the RC4, RSA,
23296  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
23297  * included with this distribution is covered by the same copyright terms
23298  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
23299  *
23300  * Copyright remains Eric Young's, and as such any Copyright notices in
23301  * the code are not to be removed.
23302  * If this package is used in a product, Eric Young should be given attribution
23303  * as the author of the parts of the library used.
23304  * This can be in the form of a textual message at program startup or
23305  * in documentation (online or textual) provided with the package.
23306  *
23307  * Redistribution and use in source and binary forms, with or without
23308  * modification, are permitted provided that the following conditions
23309  * are met:
23310  * 1. Redistributions of source code must retain the copyright
23311  *    notice, this list of conditions and the following disclaimer.
23312  * 2. Redistributions in binary form must reproduce the above copyright
23313  *    notice, this list of conditions and the following disclaimer in the
23314  *    documentation and/or other materials provided with the distribution.
23315  * 3. All advertising materials mentioning features or use of this software
23316  *    must display the following acknowledgement:
23317  *    "This product includes cryptographic software written by
23318  *     Eric Young (eay@cryptsoft.com)"
23319  *    The word 'cryptographic' can be left out if the rouines from the library
23320  *    being used are not cryptographic related :-).
23321  * 4. If you include any Windows specific code (or a derivative thereof) from
23322  *    the apps directory (application code) you must include an acknowledgement:
23323  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
23324  *
23325  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
23326  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23327  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23328  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23329  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23330  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23331  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23332  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23333  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23334  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23335  * SUCH DAMAGE.
23336  *
23337  * The licence and distribution terms for any publically available version or
23338  * derivative of this code cannot be changed.  i.e. this code cannot simply be
23339  * copied and put under another distribution licence
23340  * [including the GNU Public Licence.]
23341  */
23342 # 59 "/usr/include/openssl/safestack.h" 2 3 4
23343 # 69 "/usr/include/openssl/safestack.h" 3 4
23344 /*
23345  * In C++ we get problems because an explicit cast is needed from (void *) we
23346  * use CHECKED_STACK_OF to ensure the correct type is passed in the macros
23347  * below.
23348  */
23349 # 102 "/usr/include/openssl/safestack.h" 3 4
23350 /* nada (obsolete in new safestack approach)*/
23351 
23352 
23353 /*-
23354  * Strings are special: normally an lhash entry will point to a single
23355  * (somewhat) mutable object. In the case of strings:
23356  *
23357  * a) Instead of a single char, there is an array of chars, NUL-terminated.
23358  * b) The string may have be immutable.
23359  *
23360  * So, they need their own declarations. Especially important for
23361  * type-checking tools, such as Deputy.
23362  *
23363  * In practice, however, it appears to be hard to have a const
23364  * string. For now, I'm settling for dealing with the fact it is a
23365  * string at all.
23366  */
23367 typedef char *OPENSSL_STRING;
23368 
23369 typedef const char *OPENSSL_CSTRING;
23370 
23371 /*
23372  * Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
23373  * STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned
23374  * above, instead of a single char each entry is a NUL-terminated array of
23375  * chars. So, we have to implement STRING specially for STACK_OF. This is
23376  * dealt with in the autogenerated macros below.
23377  */
23378 
23379 struct stack_st_OPENSSL_STRING { _STACK stack; };
23380 
23381 /*
23382  * Similarly, we sometimes use a block of characters, NOT nul-terminated.
23383  * These should also be distinguished from "normal" stacks.
23384  */
23385 typedef void *OPENSSL_BLOCK;
23386 struct stack_st_OPENSSL_BLOCK { _STACK stack; };
23387 
23388 /*
23389  * SKM_sk_... stack macros are internal to safestack.h: never use them
23390  * directly, use sk_<type>_... instead
23391  */
23392 # 211 "/usr/include/openssl/safestack.h" 3 4
23393 /*
23394  * This block of defines is updated by util/mkstack.pl, please do not touch!
23395  */
23396 # 130 "/usr/include/openssl/crypto.h" 2 3 4
23397 # 1 "/usr/include/openssl/opensslv.h" 1 3 4
23398 
23399 
23400 
23401 
23402 
23403 
23404 
23405 /*-
23406  * Numeric release version identifier:
23407  * MNNFFPPS: major minor fix patch status
23408  * The status nibble has one of the values 0 for development, 1 to e for betas
23409  * 1 to 14, and f for release.  The patch level is exactly that.
23410  * For example:
23411  * 0.9.3-dev      0x00903000
23412  * 0.9.3-beta1    0x00903001
23413  * 0.9.3-beta2-dev 0x00903002
23414  * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)
23415  * 0.9.3          0x0090300f
23416  * 0.9.3a         0x0090301f
23417  * 0.9.4          0x0090400f
23418  * 1.2.3z         0x102031af
23419  *
23420  * For continuity reasons (because 0.9.5 is already out, and is coded
23421  * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
23422  * part is slightly different, by setting the highest bit.  This means
23423  * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start
23424  * with 0x0090600S...
23425  *
23426  * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
23427  * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
23428  *  major minor fix final patch/beta)
23429  */
23430 # 41 "/usr/include/openssl/opensslv.h" 3 4
23431 /*-
23432  * The macros below are to be used for shared library (.so, .dll, ...)
23433  * versioning.  That kind of versioning works a bit differently between
23434  * operating systems.  The most usual scheme is to set a major and a minor
23435  * number, and have the runtime loader check that the major number is equal
23436  * to what it was at application link time, while the minor number has to
23437  * be greater or equal to what it was at application link time.  With this
23438  * scheme, the version number is usually part of the file name, like this:
23439  *
23440  *      libcrypto.so.0.9
23441  *
23442  * Some unixen also make a softlink with the major verson number only:
23443  *
23444  *      libcrypto.so.0
23445  *
23446  * On Tru64 and IRIX 6.x it works a little bit differently.  There, the
23447  * shared library version is stored in the file, and is actually a series
23448  * of versions, separated by colons.  The rightmost version present in the
23449  * library when linking an application is stored in the application to be
23450  * matched at run time.  When the application is run, a check is done to
23451  * see if the library version stored in the application matches any of the
23452  * versions in the version string of the library itself.
23453  * This version string can be constructed in any way, depending on what
23454  * kind of matching is desired.  However, to implement the same scheme as
23455  * the one used in the other unixen, all compatible versions, from lowest
23456  * to highest, should be part of the string.  Consecutive builds would
23457  * give the following versions strings:
23458  *
23459  *      3.0
23460  *      3.0:3.1
23461  *      3.0:3.1:3.2
23462  *      4.0
23463  *      4.0:4.1
23464  *
23465  * Notice how version 4 is completely incompatible with version, and
23466  * therefore give the breach you can see.
23467  *
23468  * There may be other schemes as well that I haven't yet discovered.
23469  *
23470  * So, here's the way it works here: first of all, the library version
23471  * number doesn't need at all to match the overall OpenSSL version.
23472  * However, it's nice and more understandable if it actually does.
23473  * The current library version is stored in the macro SHLIB_VERSION_NUMBER,
23474  * which is just a piece of text in the format "M.m.e" (Major, minor, edit).
23475  * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
23476  * we need to keep a history of version numbers, which is done in the
23477  * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and
23478  * should only keep the versions that are binary compatible with the current.
23479  */
23480 # 131 "/usr/include/openssl/crypto.h" 2 3 4
23481 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
23482 /* ====================================================================
23483  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
23484  *
23485  * Redistribution and use in source and binary forms, with or without
23486  * modification, are permitted provided that the following conditions
23487  * are met:
23488  *
23489  * 1. Redistributions of source code must retain the above copyright
23490  *    notice, this list of conditions and the following disclaimer.
23491  *
23492  * 2. Redistributions in binary form must reproduce the above copyright
23493  *    notice, this list of conditions and the following disclaimer in
23494  *    the documentation and/or other materials provided with the
23495  *    distribution.
23496  *
23497  * 3. All advertising materials mentioning features or use of this
23498  *    software must display the following acknowledgment:
23499  *    "This product includes software developed by the OpenSSL Project
23500  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23501  *
23502  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23503  *    endorse or promote products derived from this software without
23504  *    prior written permission. For written permission, please contact
23505  *    openssl-core@openssl.org.
23506  *
23507  * 5. Products derived from this software may not be called "OpenSSL"
23508  *    nor may "OpenSSL" appear in their names without prior written
23509  *    permission of the OpenSSL Project.
23510  *
23511  * 6. Redistributions of any form whatsoever must retain the following
23512  *    acknowledgment:
23513  *    "This product includes software developed by the OpenSSL Project
23514  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
23515  *
23516  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
23517  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23518  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23519  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
23520  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23521  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23522  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23523  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23524  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23525  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23526  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23527  * OF THE POSSIBILITY OF SUCH DAMAGE.
23528  * ====================================================================
23529  *
23530  * This product includes cryptographic software written by Eric Young
23531  * (eay@cryptsoft.com).  This product includes software written by Tim
23532  * Hudson (tjh@cryptsoft.com).
23533  *
23534  */
23535 # 62 "/usr/include/openssl/ossl_typ.h" 3 4
23536 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
23537 /* e_os2.h */
23538 /* ====================================================================
23539  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
23540  *
23541  * Redistribution and use in source and binary forms, with or without
23542  * modification, are permitted provided that the following conditions
23543  * are met:
23544  *
23545  * 1. Redistributions of source code must retain the above copyright
23546  *    notice, this list of conditions and the following disclaimer.
23547  *
23548  * 2. Redistributions in binary form must reproduce the above copyright
23549  *    notice, this list of conditions and the following disclaimer in
23550  *    the documentation and/or other materials provided with the
23551  *    distribution.
23552  *
23553  * 3. All advertising materials mentioning features or use of this
23554  *    software must display the following acknowledgment:
23555  *    "This product includes software developed by the OpenSSL Project
23556  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23557  *
23558  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23559  *    endorse or promote products derived from this software without
23560  *    prior written permission. For written permission, please contact
23561  *    openssl-core@openssl.org.
23562  *
23563  * 5. Products derived from this software may not be called "OpenSSL"
23564  *    nor may "OpenSSL" appear in their names without prior written
23565  *    permission of the OpenSSL Project.
23566  *
23567  * 6. Redistributions of any form whatsoever must retain the following
23568  *    acknowledgment:
23569  *    "This product includes software developed by the OpenSSL Project
23570  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
23571  *
23572  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
23573  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23574  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23575  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
23576  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23577  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23578  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23579  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23580  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23581  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23582  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23583  * OF THE POSSIBILITY OF SUCH DAMAGE.
23584  * ====================================================================
23585  *
23586  * This product includes cryptographic software written by Eric Young
23587  * (eay@cryptsoft.com).  This product includes software written by Tim
23588  * Hudson (tjh@cryptsoft.com).
23589  *
23590  */
23591 
23592 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
23593 /* opensslconf.h */
23594 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
23595 
23596 
23597 
23598 
23599 /* OpenSSL was configured with the following options: */
23600 # 108 "/usr/include/openssl/opensslconf.h" 3 4
23601 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
23602    asks for it.  This is a transient feature that is provided for those
23603    who haven't had the time to do the appropriate changes in their
23604    applications.  */
23605 # 204 "/usr/include/openssl/opensslconf.h" 3 4
23606 /* crypto/opensslconf.h.in */
23607 
23608 /* Generate 80386 code? */
23609 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
23610 # 63 "/usr/include/openssl/ossl_typ.h" 2 3 4
23611 # 83 "/usr/include/openssl/ossl_typ.h" 3 4
23612 typedef struct asn1_string_st ASN1_INTEGER;
23613 typedef struct asn1_string_st ASN1_ENUMERATED;
23614 typedef struct asn1_string_st ASN1_BIT_STRING;
23615 typedef struct asn1_string_st ASN1_OCTET_STRING;
23616 typedef struct asn1_string_st ASN1_PRINTABLESTRING;
23617 typedef struct asn1_string_st ASN1_T61STRING;
23618 typedef struct asn1_string_st ASN1_IA5STRING;
23619 typedef struct asn1_string_st ASN1_GENERALSTRING;
23620 typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
23621 typedef struct asn1_string_st ASN1_BMPSTRING;
23622 typedef struct asn1_string_st ASN1_UTCTIME;
23623 typedef struct asn1_string_st ASN1_TIME;
23624 typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
23625 typedef struct asn1_string_st ASN1_VISIBLESTRING;
23626 typedef struct asn1_string_st ASN1_UTF8STRING;
23627 typedef struct asn1_string_st ASN1_STRING;
23628 typedef int ASN1_BOOLEAN;
23629 typedef int ASN1_NULL;
23630 
23631 
23632 typedef struct asn1_object_st ASN1_OBJECT;
23633 
23634 typedef struct ASN1_ITEM_st ASN1_ITEM;
23635 typedef struct asn1_pctx_st ASN1_PCTX;
23636 # 120 "/usr/include/openssl/ossl_typ.h" 3 4
23637 typedef struct bignum_st BIGNUM;
23638 typedef struct bignum_ctx BN_CTX;
23639 typedef struct bn_blinding_st BN_BLINDING;
23640 typedef struct bn_mont_ctx_st BN_MONT_CTX;
23641 typedef struct bn_recp_ctx_st BN_RECP_CTX;
23642 typedef struct bn_gencb_st BN_GENCB;
23643 
23644 typedef struct buf_mem_st BUF_MEM;
23645 
23646 typedef struct evp_cipher_st EVP_CIPHER;
23647 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
23648 typedef struct env_md_st EVP_MD;
23649 typedef struct env_md_ctx_st EVP_MD_CTX;
23650 typedef struct evp_pkey_st EVP_PKEY;
23651 
23652 typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
23653 
23654 typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
23655 typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
23656 
23657 typedef struct dh_st DH;
23658 typedef struct dh_method DH_METHOD;
23659 
23660 typedef struct dsa_st DSA;
23661 typedef struct dsa_method DSA_METHOD;
23662 
23663 typedef struct rsa_st RSA;
23664 typedef struct rsa_meth_st RSA_METHOD;
23665 
23666 typedef struct rand_meth_st RAND_METHOD;
23667 
23668 typedef struct ecdh_method ECDH_METHOD;
23669 typedef struct ecdsa_method ECDSA_METHOD;
23670 
23671 typedef struct x509_st X509;
23672 typedef struct X509_algor_st X509_ALGOR;
23673 typedef struct X509_crl_st X509_CRL;
23674 typedef struct x509_crl_method_st X509_CRL_METHOD;
23675 typedef struct x509_revoked_st X509_REVOKED;
23676 typedef struct X509_name_st X509_NAME;
23677 typedef struct X509_pubkey_st X509_PUBKEY;
23678 typedef struct x509_store_st X509_STORE;
23679 typedef struct x509_store_ctx_st X509_STORE_CTX;
23680 
23681 typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
23682 
23683 typedef struct v3_ext_ctx X509V3_CTX;
23684 typedef struct conf_st CONF;
23685 
23686 typedef struct store_st STORE;
23687 typedef struct store_method_st STORE_METHOD;
23688 
23689 typedef struct ui_st UI;
23690 typedef struct ui_method_st UI_METHOD;
23691 
23692 typedef struct st_ERR_FNS ERR_FNS;
23693 
23694 typedef struct engine_st ENGINE;
23695 typedef struct ssl_st SSL;
23696 typedef struct ssl_ctx_st SSL_CTX;
23697 
23698 typedef struct comp_method_st COMP_METHOD;
23699 
23700 typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
23701 typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
23702 typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
23703 typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
23704 
23705 typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
23706 typedef struct DIST_POINT_st DIST_POINT;
23707 typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
23708 typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
23709 
23710   /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */
23711 
23712 
23713 
23714 typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
23715 /* Callback types for crypto.h */
23716 typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
23717                            int idx, long argl, void *argp);
23718 typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
23719                              int idx, long argl, void *argp);
23720 typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
23721                            void *from_d, int idx, long argl, void *argp);
23722 
23723 typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
23724 typedef struct ocsp_response_st OCSP_RESPONSE;
23725 typedef struct ocsp_responder_id_st OCSP_RESPID;
23726 # 132 "/usr/include/openssl/crypto.h" 2 3 4
23727 
23728 
23729 
23730 
23731 
23732 /*
23733  * Resolve problems on some operating systems with symbol names that clash
23734  * one way or another
23735  */
23736 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
23737 /* ====================================================================
23738  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
23739  *
23740  * Redistribution and use in source and binary forms, with or without
23741  * modification, are permitted provided that the following conditions
23742  * are met:
23743  *
23744  * 1. Redistributions of source code must retain the above copyright
23745  *    notice, this list of conditions and the following disclaimer.
23746  *
23747  * 2. Redistributions in binary form must reproduce the above copyright
23748  *    notice, this list of conditions and the following disclaimer in
23749  *    the documentation and/or other materials provided with the
23750  *    distribution.
23751  *
23752  * 3. All advertising materials mentioning features or use of this
23753  *    software must display the following acknowledgment:
23754  *    "This product includes software developed by the OpenSSL Project
23755  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23756  *
23757  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23758  *    endorse or promote products derived from this software without
23759  *    prior written permission. For written permission, please contact
23760  *    openssl-core@openssl.org.
23761  *
23762  * 5. Products derived from this software may not be called "OpenSSL"
23763  *    nor may "OpenSSL" appear in their names without prior written
23764  *    permission of the OpenSSL Project.
23765  *
23766  * 6. Redistributions of any form whatsoever must retain the following
23767  *    acknowledgment:
23768  *    "This product includes software developed by the OpenSSL Project
23769  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
23770  *
23771  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
23772  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23773  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23774  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
23775  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23776  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23777  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23778  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23779  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23780  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23781  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23782  * OF THE POSSIBILITY OF SUCH DAMAGE.
23783  * ====================================================================
23784  *
23785  * This product includes cryptographic software written by Eric Young
23786  * (eay@cryptsoft.com).  This product includes software written by Tim
23787  * Hudson (tjh@cryptsoft.com).
23788  *
23789  */
23790 
23791 
23792 
23793 
23794 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
23795 /* e_os2.h */
23796 /* ====================================================================
23797  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
23798  *
23799  * Redistribution and use in source and binary forms, with or without
23800  * modification, are permitted provided that the following conditions
23801  * are met:
23802  *
23803  * 1. Redistributions of source code must retain the above copyright
23804  *    notice, this list of conditions and the following disclaimer.
23805  *
23806  * 2. Redistributions in binary form must reproduce the above copyright
23807  *    notice, this list of conditions and the following disclaimer in
23808  *    the documentation and/or other materials provided with the
23809  *    distribution.
23810  *
23811  * 3. All advertising materials mentioning features or use of this
23812  *    software must display the following acknowledgment:
23813  *    "This product includes software developed by the OpenSSL Project
23814  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23815  *
23816  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23817  *    endorse or promote products derived from this software without
23818  *    prior written permission. For written permission, please contact
23819  *    openssl-core@openssl.org.
23820  *
23821  * 5. Products derived from this software may not be called "OpenSSL"
23822  *    nor may "OpenSSL" appear in their names without prior written
23823  *    permission of the OpenSSL Project.
23824  *
23825  * 6. Redistributions of any form whatsoever must retain the following
23826  *    acknowledgment:
23827  *    "This product includes software developed by the OpenSSL Project
23828  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
23829  *
23830  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
23831  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23832  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23833  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
23834  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23835  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23836  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23837  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23838  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23839  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23840  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23841  * OF THE POSSIBILITY OF SUCH DAMAGE.
23842  * ====================================================================
23843  *
23844  * This product includes cryptographic software written by Eric Young
23845  * (eay@cryptsoft.com).  This product includes software written by Tim
23846  * Hudson (tjh@cryptsoft.com).
23847  *
23848  */
23849 
23850 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
23851 /* opensslconf.h */
23852 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
23853 
23854 
23855 
23856 
23857 /* OpenSSL was configured with the following options: */
23858 # 108 "/usr/include/openssl/opensslconf.h" 3 4
23859 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
23860    asks for it.  This is a transient feature that is provided for those
23861    who haven't had the time to do the appropriate changes in their
23862    applications.  */
23863 # 204 "/usr/include/openssl/opensslconf.h" 3 4
23864 /* crypto/opensslconf.h.in */
23865 
23866 /* Generate 80386 code? */
23867 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
23868 # 59 "/usr/include/openssl/symhacks.h" 2 3 4
23869 
23870 /*
23871  * Hacks to solve the problem with linkers incapable of handling very long
23872  * symbol names.  In the case of VMS, the limit is 31 characters on VMS for
23873  * VAX.
23874  */
23875 /*
23876  * Note that this affects util/libeay.num and util/ssleay.num...  you may
23877  * change those manually, but that's not recommended, as those files are
23878  * controlled centrally and updated on Unix, and the central definition may
23879  * disagree with yours, which in turn may come with shareable library
23880  * incompatibilities.
23881  */
23882 # 481 "/usr/include/openssl/symhacks.h" 3 4
23883 /* Case insensitive linking causes problems.... */
23884 # 142 "/usr/include/openssl/crypto.h" 2 3 4
23885 
23886 
23887 
23888 
23889 
23890 /* Backward compatibility to SSLeay */
23891 /*
23892  * This is more to be used to check the correct DLL is being used in the MS
23893  * world.
23894  */
23895 
23896 
23897 /* #define SSLEAY_OPTIONS       1 no longer supported */
23898 
23899 
23900 
23901 
23902 
23903 /* Already declared in ossl_typ.h */
23904 # 174 "/usr/include/openssl/crypto.h" 3 4
23905 /* A generic structure to pass assorted data in a expandable way */
23906 typedef struct openssl_item_st {
23907     int code;
23908     void *value; /* Not used for flag attributes */
23909     size_t value_size; /* Max size of value for output, length for
23910                                  * input */
23911     size_t *value_length; /* Returned length of value for output */
23912 } OPENSSL_ITEM;
23913 
23914 /*
23915  * When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
23916  * names in cryptlib.c
23917  */
23918 # 256 "/usr/include/openssl/crypto.h" 3 4
23919 /*
23920  * Some applications as well as some parts of OpenSSL need to allocate and
23921  * deallocate locks in a dynamic fashion.  The following typedef makes this
23922  * possible in a type-safe manner.
23923  */
23924 /* struct CRYPTO_dynlock_value has to be defined by the application. */
23925 typedef struct {
23926     int references;
23927     struct CRYPTO_dynlock_value *data;
23928 } CRYPTO_dynlock;
23929 
23930 /*
23931  * The following can be used to detect memory leaks in the SSLeay library. It
23932  * used, it turns on malloc checking
23933  */
23934 
23935 
23936 
23937 
23938 
23939 
23940 /*
23941  * The following are bit values to turn on or off options connected to the
23942  * malloc checking functionality
23943  */
23944 
23945 /* Adds time to the memory checking information */
23946 
23947 /* Adds thread number to the memory checking information */
23948 
23949 
23950 
23951 
23952 /* predec of the BIO type */
23953 typedef struct bio_st BIO_dummy;
23954 
23955 struct crypto_ex_data_st {
23956     struct stack_st_void *sk;
23957     /* gcc is screwing up this data structure :-( */
23958     int dummy;
23959 };
23960 struct stack_st_void { _STACK stack; };
23961 
23962 /*
23963  * This stuff is basically class callback functions The current classes are
23964  * SSL_CTX, SSL, SSL_SESSION, and a few more
23965  */
23966 
23967 typedef struct crypto_ex_data_func_st {
23968     long argl; /* Arbitary long */
23969     void *argp; /* Arbitary void * */
23970     CRYPTO_EX_new *new_func;
23971     CRYPTO_EX_free *free_func;
23972     CRYPTO_EX_dup *dup_func;
23973 } CRYPTO_EX_DATA_FUNCS;
23974 
23975 struct stack_st_CRYPTO_EX_DATA_FUNCS { _STACK stack; };
23976 
23977 /*
23978  * Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA
23979  * entry.
23980  */
23981 # 336 "/usr/include/openssl/crypto.h" 3 4
23982 /*
23983  * Dynamically assigned indexes start from this value (don't use directly,
23984  * use via CRYPTO_ex_data_new_class).
23985  */
23986 
23987 
23988 /*
23989  * This is the default callbacks, but we can have others as well: this is
23990  * needed in Win32 where the application malloc and the library malloc may
23991  * not be the same.
23992  */
23993 # 356 "/usr/include/openssl/crypto.h" 3 4
23994 /*
23995  * Set standard debugging functions (not done by default unless CRYPTO_MDEBUG
23996  * is defined)
23997  */
23998 # 369 "/usr/include/openssl/crypto.h" 3 4
23999 int CRYPTO_mem_ctrl(int mode);
24000 int CRYPTO_is_mem_check_on(void);
24001 
24002 /* for applications */
24003 
24004 
24005 
24006 /* for library-internal use */
24007 # 396 "/usr/include/openssl/crypto.h" 3 4
24008 const char *SSLeay_version(int type);
24009 unsigned long SSLeay(void);
24010 
24011 int OPENSSL_issetugid(void);
24012 
24013 /* An opaque type representing an implementation of "ex_data" support */
24014 typedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL;
24015 /* Return an opaque pointer to the current "ex_data" implementation */
24016 const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void);
24017 /* Sets the "ex_data" implementation to be used (if it's not too late) */
24018 int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i);
24019 /* Get a new "ex_data" class, and return the corresponding "class_index" */
24020 int CRYPTO_ex_data_new_class(void);
24021 /* Within a given class, get/register a new index */
24022 int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
24023                             CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
24024                             CRYPTO_EX_free *free_func);
24025 /*
24026  * Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a
24027  * given class (invokes whatever per-class callbacks are applicable)
24028  */
24029 int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
24030 int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
24031                        CRYPTO_EX_DATA *from);
24032 void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
24033 /*
24034  * Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular
24035  * index (relative to the class type involved)
24036  */
24037 int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
24038 void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
24039 /*
24040  * This function cleans up all "ex_data" state. It mustn't be called under
24041  * potential race-conditions.
24042  */
24043 void CRYPTO_cleanup_all_ex_data(void);
24044 
24045 int CRYPTO_get_new_lockid(char *name);
24046 
24047 int CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */
24048 void CRYPTO_lock(int mode, int type, const char *file, int line);
24049 void CRYPTO_set_locking_callback(void (*func) (int mode, int type,
24050                                                const char *file, int line));
24051 void (*CRYPTO_get_locking_callback(void)) (int mode, int type,
24052                                            const char *file, int line);
24053 void CRYPTO_set_add_lock_callback(int (*func)
24054                                    (int *num, int mount, int type,
24055                                     const char *file, int line));
24056 int (*CRYPTO_get_add_lock_callback(void)) (int *num, int mount, int type,
24057                                            const char *file, int line);
24058 
24059 /* Don't use this structure directly. */
24060 typedef struct crypto_threadid_st {
24061     void *ptr;
24062     unsigned long val;
24063 } CRYPTO_THREADID;
24064 /* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
24065 void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val);
24066 void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr);
24067 int CRYPTO_THREADID_set_callback(void (*threadid_func) (CRYPTO_THREADID *));
24068 void (*CRYPTO_THREADID_get_callback(void)) (CRYPTO_THREADID *);
24069 void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
24070 int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
24071 void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
24072 unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
24073 
24074 void CRYPTO_set_id_callback(unsigned long (*func) (void));
24075 unsigned long (*CRYPTO_get_id_callback(void)) (void);
24076 unsigned long CRYPTO_thread_id(void);
24077 
24078 
24079 const char *CRYPTO_get_lock_name(int type);
24080 int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
24081                     int line);
24082 
24083 int CRYPTO_get_new_dynlockid(void);
24084 void CRYPTO_destroy_dynlockid(int i);
24085 struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
24086 void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value
24087                                         *(*dyn_create_function) (const char
24088                                                                  *file,
24089                                                                  int line));
24090 void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)
24091                                        (int mode,
24092                                         struct CRYPTO_dynlock_value *l,
24093                                         const char *file, int line));
24094 void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)
24095                                           (struct CRYPTO_dynlock_value *l,
24096                                            const char *file, int line));
24097 struct CRYPTO_dynlock_value
24098 *(*CRYPTO_get_dynlock_create_callback(void)) (const char *file, int line);
24099 void (*CRYPTO_get_dynlock_lock_callback(void)) (int mode,
24100                                                 struct CRYPTO_dynlock_value
24101                                                 *l, const char *file,
24102                                                 int line);
24103 void (*CRYPTO_get_dynlock_destroy_callback(void)) (struct CRYPTO_dynlock_value
24104                                                    *l, const char *file,
24105                                                    int line);
24106 
24107 /*
24108  * CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- call
24109  * the latter last if you need different functions
24110  */
24111 int CRYPTO_set_mem_functions(void *(*m) (size_t), void *(*r) (void *, size_t),
24112                              void (*f) (void *));
24113 int CRYPTO_set_locked_mem_functions(void *(*m) (size_t),
24114                                     void (*free_func) (void *));
24115 int CRYPTO_set_mem_ex_functions(void *(*m) (size_t, const char *, int),
24116                                 void *(*r) (void *, size_t, const char *,
24117                                             int), void (*f) (void *));
24118 int CRYPTO_set_locked_mem_ex_functions(void *(*m) (size_t, const char *, int),
24119                                        void (*free_func) (void *));
24120 int CRYPTO_set_mem_debug_functions(void (*m)
24121                                     (void *, int, const char *, int, int),
24122                                    void (*r) (void *, void *, int,
24123                                               const char *, int, int),
24124                                    void (*f) (void *, int), void (*so) (long),
24125                                    long (*go) (void));
24126 void CRYPTO_get_mem_functions(void *(**m) (size_t),
24127                               void *(**r) (void *, size_t),
24128                               void (**f) (void *));
24129 void CRYPTO_get_locked_mem_functions(void *(**m) (size_t),
24130                                      void (**f) (void *));
24131 void CRYPTO_get_mem_ex_functions(void *(**m) (size_t, const char *, int),
24132                                  void *(**r) (void *, size_t, const char *,
24133                                               int), void (**f) (void *));
24134 void CRYPTO_get_locked_mem_ex_functions(void
24135                                         *(**m) (size_t, const char *, int),
24136                                         void (**f) (void *));
24137 void CRYPTO_get_mem_debug_functions(void (**m)
24138                                      (void *, int, const char *, int, int),
24139                                     void (**r) (void *, void *, int,
24140                                                 const char *, int, int),
24141                                     void (**f) (void *, int),
24142                                     void (**so) (long), long (**go) (void));
24143 
24144 void *CRYPTO_malloc_locked(int num, const char *file, int line);
24145 void CRYPTO_free_locked(void *ptr);
24146 void *CRYPTO_malloc(int num, const char *file, int line);
24147 char *CRYPTO_strdup(const char *str, const char *file, int line);
24148 void CRYPTO_free(void *ptr);
24149 void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
24150 void *CRYPTO_realloc_clean(void *addr, int old_num, int num, const char *file,
24151                            int line);
24152 void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
24153 
24154 void OPENSSL_cleanse(void *ptr, size_t len);
24155 
24156 void CRYPTO_set_mem_debug_options(long bits);
24157 long CRYPTO_get_mem_debug_options(void);
24158 
24159 
24160 
24161 int CRYPTO_push_info_(const char *info, const char *file, int line);
24162 int CRYPTO_pop_info(void);
24163 int CRYPTO_remove_all_info(void);
24164 
24165 /*
24166  * Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro;
24167  * used as default in CRYPTO_MDEBUG compilations):
24168  */
24169 /*-
24170  * The last argument has the following significance:
24171  *
24172  * 0:   called before the actual memory allocation has taken place
24173  * 1:   called after the actual memory allocation has taken place
24174  */
24175 void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,
24176                        int before_p);
24177 void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, const char *file,
24178                         int line, int before_p);
24179 void CRYPTO_dbg_free(void *addr, int before_p);
24180 /*-
24181  * Tell the debugging code about options.  By default, the following values
24182  * apply:
24183  *
24184  * 0:                           Clear all options.
24185  * V_CRYPTO_MDEBUG_TIME (1):    Set the "Show Time" option.
24186  * V_CRYPTO_MDEBUG_THREAD (2):  Set the "Show Thread Number" option.
24187  * V_CRYPTO_MDEBUG_ALL (3):     1 + 2
24188  */
24189 void CRYPTO_dbg_set_options(long bits);
24190 long CRYPTO_dbg_get_options(void);
24191 
24192 
24193 void CRYPTO_mem_leaks_fp(FILE *);
24194 
24195 void CRYPTO_mem_leaks(struct bio_st *bio);
24196 /* unsigned long order, char *file, int line, int num_bytes, char *addr */
24197 typedef void *CRYPTO_MEM_LEAK_CB (unsigned long, const char *, int, int,
24198                                   void *);
24199 void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
24200 
24201 /* die if we have to */
24202 void OpenSSLDie(const char *file, int line, const char *assertion);
24203 
24204 
24205 unsigned long *OPENSSL_ia32cap_loc(void);
24206 
24207 int OPENSSL_isservice(void);
24208 
24209 int FIPS_mode(void);
24210 int FIPS_mode_set(int r);
24211 
24212 void OPENSSL_init(void);
24213 # 624 "/usr/include/openssl/crypto.h" 3 4
24214 /*
24215  * CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.
24216  * It takes an amount of time dependent on |len|, but independent of the
24217  * contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements
24218  * into a defined order as the return value when a != b is undefined, other
24219  * than to be non-zero.
24220  */
24221 int CRYPTO_memcmp(const volatile void *a, const volatile void *b, size_t len);
24222 
24223 /* BEGIN ERROR CODES */
24224 /*
24225  * The following lines are auto generated by the script mkerr.pl. Any changes
24226  * made after this point may be overwritten when the script is next run.
24227  */
24228 void ERR_load_CRYPTO_strings(void);
24229 
24230 /* Error codes for the CRYPTO functions. */
24231 
24232 /* Function codes. */
24233 # 654 "/usr/include/openssl/crypto.h" 3 4
24234 /* Reason codes. */
24235 # 70 "/usr/include/openssl/bio.h" 2 3 4
24236 # 83 "/usr/include/openssl/bio.h" 3 4
24237 /* These are the 'types' of BIOs */
24238 # 116 "/usr/include/openssl/bio.h" 3 4
24239 /*
24240  * BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
24241  * BIO_set_fp(in,stdin,BIO_NOCLOSE);
24242  */
24243 
24244 
24245 
24246 /*
24247  * These are used in the following macros and are passed to BIO_ctrl()
24248  */
24249 # 139 "/usr/include/openssl/bio.h" 3 4
24250 /* callback is int cb(BIO *bio,state,ret); */
24251 
24252 
24253 
24254 
24255 
24256 /* dgram BIO stuff */
24257 # 157 "/usr/include/openssl/bio.h" 3 4
24258 /* #ifdef IP_MTU_DISCOVER */
24259 
24260 /* #endif */
24261 # 196 "/usr/include/openssl/bio.h" 3 4
24262 /* modifiers */
24263 # 208 "/usr/include/openssl/bio.h" 3 4
24264 /*
24265  * "UPLINK" flag denotes file descriptors provided by application. It
24266  * defaults to 0, as most platforms don't require UPLINK interface.
24267  */
24268 
24269 
24270 
24271 /* Used in BIO_gethostbyname() */
24272 
24273 
24274 
24275 
24276 
24277 
24278 /* Mostly used in the SSL BIO */
24279 /*-
24280  * Not used anymore
24281  * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10
24282  * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20
24283  * #define BIO_FLAGS_PROTOCOL_STARTUP   0x40
24284  */
24285 
24286 
24287 
24288 /*
24289  * This is used with memory BIOs: it means we shouldn't free up or change the
24290  * data in any way.
24291  */
24292 
24293 
24294 typedef struct bio_st BIO;
24295 
24296 void BIO_set_flags(BIO *b, int flags);
24297 int BIO_test_flags(const BIO *b, int flags);
24298 void BIO_clear_flags(BIO *b, int flags);
24299 # 252 "/usr/include/openssl/bio.h" 3 4
24300 /* These are normally used internally in BIOs */
24301 
24302 
24303 
24304 
24305 
24306 /* These should be used by the application to tell why we should retry */
24307 
24308 
24309 
24310 
24311 
24312 
24313 /*
24314  * The next three are used in conjunction with the BIO_should_io_special()
24315  * condition.  After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
24316  * *reason); will walk the BIO stack and return the 'reason' for the special
24317  * and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
24318  * the code.
24319  */
24320 /*
24321  * Returned from the SSL bio when the certificate retrieval code had an error
24322  */
24323 
24324 /* Returned from the connect BIO when a connect would have blocked */
24325 
24326 /* Returned from the accept BIO when an accept would have blocked */
24327 
24328 
24329 /* These are passed by the BIO callback */
24330 
24331 
24332 
24333 
24334 
24335 
24336 
24337 /*
24338  * The callback is called before and after the underling operation, The
24339  * BIO_CB_RETURN flag indicates if it is after the call
24340  */
24341 
24342 
24343 
24344 
24345 
24346 long (*BIO_get_callback(const BIO *b)) (struct bio_st *, int, const char *,
24347                                         int, long, long);
24348 void BIO_set_callback(BIO *b,
24349                       long (*callback) (struct bio_st *, int, const char *,
24350                                         int, long, long));
24351 char *BIO_get_callback_arg(const BIO *b);
24352 void BIO_set_callback_arg(BIO *b, char *arg);
24353 
24354 const char *BIO_method_name(const BIO *b);
24355 int BIO_method_type(const BIO *b);
24356 
24357 typedef void bio_info_cb (struct bio_st *, int, const char *, int, long,
24358                           long);
24359 
24360 typedef struct bio_method_st {
24361     int type;
24362     const char *name;
24363     int (*bwrite) (BIO *, const char *, int);
24364     int (*bread) (BIO *, char *, int);
24365     int (*bputs) (BIO *, const char *);
24366     int (*bgets) (BIO *, char *, int);
24367     long (*ctrl) (BIO *, int, long, void *);
24368     int (*create) (BIO *);
24369     int (*destroy) (BIO *);
24370     long (*callback_ctrl) (BIO *, int, bio_info_cb *);
24371 } BIO_METHOD;
24372 
24373 struct bio_st {
24374     BIO_METHOD *method;
24375     /* bio, mode, argp, argi, argl, ret */
24376     long (*callback) (struct bio_st *, int, const char *, int, long, long);
24377     char *cb_arg; /* first argument for the callback */
24378     int init;
24379     int shutdown;
24380     int flags; /* extra storage */
24381     int retry_reason;
24382     int num;
24383     void *ptr;
24384     struct bio_st *next_bio; /* used by filter BIOs */
24385     struct bio_st *prev_bio; /* used by filter BIOs */
24386     int references;
24387     unsigned long num_read;
24388     unsigned long num_write;
24389     CRYPTO_EX_DATA ex_data;
24390 };
24391 
24392 struct stack_st_BIO { _STACK stack; };
24393 
24394 typedef struct bio_f_buffer_ctx_struct {
24395     /*-
24396      * Buffers are setup like this:
24397      *
24398      * <---------------------- size ----------------------->
24399      * +---------------------------------------------------+
24400      * | consumed | remaining          | free space        |
24401      * +---------------------------------------------------+
24402      * <-- off --><------- len ------->
24403      */
24404     /*- BIO *bio; *//*
24405      * this is now in the BIO struct
24406      */
24407     int ibuf_size; /* how big is the input buffer */
24408     int obuf_size; /* how big is the output buffer */
24409     char *ibuf; /* the char array */
24410     int ibuf_len; /* how many bytes are in it */
24411     int ibuf_off; /* write/read offset */
24412     char *obuf; /* the char array */
24413     int obuf_len; /* how many bytes are in it */
24414     int obuf_off; /* write/read offset */
24415 } BIO_F_BUFFER_CTX;
24416 
24417 /* Prefix and suffix callback in ASN1 BIO */
24418 typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
24419                           void *parg);
24420 # 398 "/usr/include/openssl/bio.h" 3 4
24421 /* connect BIO stuff */
24422 # 407 "/usr/include/openssl/bio.h" 3 4
24423 /*
24424  * #define BIO_CONN_get_param_hostname BIO_ctrl
24425  */
24426 # 474 "/usr/include/openssl/bio.h" 3 4
24427 /* BIO_s_connect() and BIO_s_socks4a_connect() */
24428 # 486 "/usr/include/openssl/bio.h" 3 4
24429 /* BIO_s_accept() */
24430 
24431 
24432 /* #define BIO_set_nbio(b,n)    BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
24433 # 499 "/usr/include/openssl/bio.h" 3 4
24434 /* BIO_s_accept() and BIO_s_connect() */
24435 
24436 
24437 
24438 
24439 /* BIO_s_proxy_client() */
24440 
24441 
24442 /* BIO_set_nbio(b,n) */
24443 
24444 /* BIO *BIO_get_filter_bio(BIO *bio); */
24445 # 519 "/usr/include/openssl/bio.h" 3 4
24446 /* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
24447 
24448 
24449 
24450 /* BIO_s_file() */
24451 
24452 
24453 
24454 /* BIO_s_fd() and BIO_s_file() */
24455 
24456 
24457 
24458 /*
24459  * name is cast to lose const, but might be better to route through a
24460  * function so we can do it safely
24461  */
24462 # 552 "/usr/include/openssl/bio.h" 3 4
24463 /*
24464  * WARNING WARNING, this ups the reference count on the read bio of the SSL
24465  * structure.  This is because the ssl read BIO is now pointed to by the
24466  * next_bio field in the bio.  So when you free the BIO, make sure you are
24467  * doing a BIO_free_all() to catch the underlying BIO.
24468  */
24469 # 568 "/usr/include/openssl/bio.h" 3 4
24470 /* defined in evp.h */
24471 /* #define BIO_set_md(b,md)     BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */
24472 
24473 
24474 
24475 
24476 
24477 
24478 
24479 /* For the BIO_f_buffer() type */
24480 
24481 
24482 
24483 
24484 
24485 
24486 /* Don't use the next one unless you know what you are doing :-) */
24487 # 593 "/usr/include/openssl/bio.h" 3 4
24488 /* ...pending macros have inappropriate return type */
24489 size_t BIO_ctrl_pending(BIO *b);
24490 size_t BIO_ctrl_wpending(BIO *b);
24491 
24492 
24493 
24494 
24495 
24496 /* For the BIO_f_buffer() type */
24497 
24498 
24499 /* For BIO_s_bio() */
24500 
24501 
24502 
24503 
24504 
24505 /* macros with inappropriate type -- but ...pending macros use int too: */
24506 
24507 
24508 size_t BIO_ctrl_get_write_guarantee(BIO *b);
24509 size_t BIO_ctrl_get_read_request(BIO *b);
24510 int BIO_ctrl_reset_read_request(BIO *b);
24511 
24512 /* ctrl macros for dgram */
24513 # 633 "/usr/include/openssl/bio.h" 3 4
24514 /* These two aren't currently implemented */
24515 /* int BIO_get_ex_num(BIO *bio); */
24516 /* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */
24517 int BIO_set_ex_data(BIO *bio, int idx, void *data);
24518 void *BIO_get_ex_data(BIO *bio, int idx);
24519 int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
24520                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
24521 unsigned long BIO_number_read(BIO *bio);
24522 unsigned long BIO_number_written(BIO *bio);
24523 
24524 /* For BIO_f_asn1() */
24525 int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
24526                         asn1_ps_func *prefix_free);
24527 int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
24528                         asn1_ps_func **pprefix_free);
24529 int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
24530                         asn1_ps_func *suffix_free);
24531 int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
24532                         asn1_ps_func **psuffix_free);
24533 
24534 
24535 BIO_METHOD *BIO_s_file(void);
24536 BIO *BIO_new_file(const char *filename, const char *mode);
24537 BIO *BIO_new_fp(FILE *stream, int close_flag);
24538 
24539 
24540 BIO *BIO_new(BIO_METHOD *type);
24541 int BIO_set(BIO *a, BIO_METHOD *type);
24542 int BIO_free(BIO *a);
24543 void BIO_vfree(BIO *a);
24544 int BIO_read(BIO *b, void *data, int len);
24545 int BIO_gets(BIO *bp, char *buf, int size);
24546 int BIO_write(BIO *b, const void *data, int len);
24547 int BIO_puts(BIO *bp, const char *buf);
24548 int BIO_indent(BIO *b, int indent, int max);
24549 long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
24550 long BIO_callback_ctrl(BIO *b, int cmd,
24551                        void (*fp) (struct bio_st *, int, const char *, int,
24552                                    long, long));
24553 char *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
24554 long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
24555 BIO *BIO_push(BIO *b, BIO *append);
24556 BIO *BIO_pop(BIO *b);
24557 void BIO_free_all(BIO *a);
24558 BIO *BIO_find_type(BIO *b, int bio_type);
24559 BIO *BIO_next(BIO *b);
24560 BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
24561 int BIO_get_retry_reason(BIO *bio);
24562 BIO *BIO_dup_chain(BIO *in);
24563 
24564 int BIO_nread0(BIO *bio, char **buf);
24565 int BIO_nread(BIO *bio, char **buf, int num);
24566 int BIO_nwrite0(BIO *bio, char **buf);
24567 int BIO_nwrite(BIO *bio, char **buf, int num);
24568 
24569 long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
24570                         long argl, long ret);
24571 
24572 BIO_METHOD *BIO_s_mem(void);
24573 BIO *BIO_new_mem_buf(const void *buf, int len);
24574 BIO_METHOD *BIO_s_socket(void);
24575 BIO_METHOD *BIO_s_connect(void);
24576 BIO_METHOD *BIO_s_accept(void);
24577 BIO_METHOD *BIO_s_fd(void);
24578 
24579 BIO_METHOD *BIO_s_log(void);
24580 
24581 BIO_METHOD *BIO_s_bio(void);
24582 BIO_METHOD *BIO_s_null(void);
24583 BIO_METHOD *BIO_f_null(void);
24584 BIO_METHOD *BIO_f_buffer(void);
24585 
24586 
24587 
24588 BIO_METHOD *BIO_f_nbio_test(void);
24589 
24590 BIO_METHOD *BIO_s_datagram(void);
24591 
24592 
24593 
24594 
24595 
24596 /* BIO_METHOD *BIO_f_ber(void); */
24597 
24598 int BIO_sock_should_retry(int i);
24599 int BIO_sock_non_fatal_error(int error);
24600 int BIO_dgram_non_fatal_error(int error);
24601 
24602 int BIO_fd_should_retry(int i);
24603 int BIO_fd_non_fatal_error(int error);
24604 int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
24605                 void *u, const char *s, int len);
24606 int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
24607                        void *u, const char *s, int len, int indent);
24608 int BIO_dump(BIO *b, const char *bytes, int len);
24609 int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent);
24610 
24611 int BIO_dump_fp(FILE *fp, const char *s, int len);
24612 int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
24613 
24614 int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data,
24615                    int datalen);
24616 
24617 struct hostent *BIO_gethostbyname(const char *name);
24618 /*-
24619  * We might want a thread-safe interface too:
24620  * struct hostent *BIO_gethostbyname_r(const char *name,
24621  *     struct hostent *result, void *buffer, size_t buflen);
24622  * or something similar (caller allocates a struct hostent,
24623  * pointed to by "result", and additional buffer space for the various
24624  * substructures; if the buffer does not suffice, NULL is returned
24625  * and an appropriate error code is set).
24626  */
24627 int BIO_sock_error(int sock);
24628 int BIO_socket_ioctl(int fd, long type, void *arg);
24629 int BIO_socket_nbio(int fd, int mode);
24630 int BIO_get_port(const char *str, unsigned short *port_ptr);
24631 int BIO_get_host_ip(const char *str, unsigned char *ip);
24632 int BIO_get_accept_socket(char *host_port, int mode);
24633 int BIO_accept(int sock, char **ip_port);
24634 int BIO_sock_init(void);
24635 void BIO_sock_cleanup(void);
24636 int BIO_set_tcp_ndelay(int sock, int turn_on);
24637 
24638 BIO *BIO_new_socket(int sock, int close_flag);
24639 BIO *BIO_new_dgram(int fd, int close_flag);
24640 # 771 "/usr/include/openssl/bio.h" 3 4
24641 BIO *BIO_new_fd(int fd, int close_flag);
24642 BIO *BIO_new_connect(const char *host_port);
24643 BIO *BIO_new_accept(const char *host_port);
24644 
24645 int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
24646                      BIO **bio2, size_t writebuf2);
24647 /*
24648  * If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
24649  * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
24650  * value.
24651  */
24652 
24653 void BIO_copy_next_retry(BIO *b);
24654 
24655 /*
24656  * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
24657  */
24658 
24659 
24660 
24661 
24662 
24663 
24664 int BIO_printf(BIO *bio, const char *format, ...)
24665 __attribute__((__format__(__printf__, 2, 3)));
24666 int BIO_vprintf(BIO *bio, const char *format, va_list args)
24667 __attribute__((__format__(__printf__, 2, 0)));
24668 int BIO_snprintf(char *buf, size_t n, const char *format, ...)
24669 __attribute__((__format__(__printf__, 3, 4)));
24670 int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
24671 __attribute__((__format__(__printf__, 3, 0)));
24672 
24673 
24674 /* BEGIN ERROR CODES */
24675 /*
24676  * The following lines are auto generated by the script mkerr.pl. Any changes
24677  * made after this point may be overwritten when the script is next run.
24678  */
24679 void ERR_load_BIO_strings(void);
24680 
24681 /* Error codes for the BIO functions. */
24682 
24683 /* Function codes. */
24684 # 849 "/usr/include/openssl/bio.h" 3 4
24685 /* Reason codes. */
24686 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
24687 # 1 "/usr/include/openssl/x509.h" 1 3 4
24688 /* crypto/x509/x509.h */
24689 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
24690  * All rights reserved.
24691  *
24692  * This package is an SSL implementation written
24693  * by Eric Young (eay@cryptsoft.com).
24694  * The implementation was written so as to conform with Netscapes SSL.
24695  *
24696  * This library is free for commercial and non-commercial use as long as
24697  * the following conditions are aheared to.  The following conditions
24698  * apply to all code found in this distribution, be it the RC4, RSA,
24699  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
24700  * included with this distribution is covered by the same copyright terms
24701  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
24702  *
24703  * Copyright remains Eric Young's, and as such any Copyright notices in
24704  * the code are not to be removed.
24705  * If this package is used in a product, Eric Young should be given attribution
24706  * as the author of the parts of the library used.
24707  * This can be in the form of a textual message at program startup or
24708  * in documentation (online or textual) provided with the package.
24709  *
24710  * Redistribution and use in source and binary forms, with or without
24711  * modification, are permitted provided that the following conditions
24712  * are met:
24713  * 1. Redistributions of source code must retain the copyright
24714  *    notice, this list of conditions and the following disclaimer.
24715  * 2. Redistributions in binary form must reproduce the above copyright
24716  *    notice, this list of conditions and the following disclaimer in the
24717  *    documentation and/or other materials provided with the distribution.
24718  * 3. All advertising materials mentioning features or use of this software
24719  *    must display the following acknowledgement:
24720  *    "This product includes cryptographic software written by
24721  *     Eric Young (eay@cryptsoft.com)"
24722  *    The word 'cryptographic' can be left out if the rouines from the library
24723  *    being used are not cryptographic related :-).
24724  * 4. If you include any Windows specific code (or a derivative thereof) from
24725  *    the apps directory (application code) you must include an acknowledgement:
24726  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
24727  *
24728  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
24729  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24730  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24731  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24732  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24733  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24734  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24735  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24736  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24737  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24738  * SUCH DAMAGE.
24739  *
24740  * The licence and distribution terms for any publically available version or
24741  * derivative of this code cannot be changed.  i.e. this code cannot simply be
24742  * copied and put under another distribution licence
24743  * [including the GNU Public Licence.]
24744  */
24745 /* ====================================================================
24746  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
24747  * ECDH support in OpenSSL originally developed by
24748  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
24749  */
24750 
24751 
24752 
24753 
24754 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
24755 /* e_os2.h */
24756 /* ====================================================================
24757  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
24758  *
24759  * Redistribution and use in source and binary forms, with or without
24760  * modification, are permitted provided that the following conditions
24761  * are met:
24762  *
24763  * 1. Redistributions of source code must retain the above copyright
24764  *    notice, this list of conditions and the following disclaimer.
24765  *
24766  * 2. Redistributions in binary form must reproduce the above copyright
24767  *    notice, this list of conditions and the following disclaimer in
24768  *    the documentation and/or other materials provided with the
24769  *    distribution.
24770  *
24771  * 3. All advertising materials mentioning features or use of this
24772  *    software must display the following acknowledgment:
24773  *    "This product includes software developed by the OpenSSL Project
24774  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24775  *
24776  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
24777  *    endorse or promote products derived from this software without
24778  *    prior written permission. For written permission, please contact
24779  *    openssl-core@openssl.org.
24780  *
24781  * 5. Products derived from this software may not be called "OpenSSL"
24782  *    nor may "OpenSSL" appear in their names without prior written
24783  *    permission of the OpenSSL Project.
24784  *
24785  * 6. Redistributions of any form whatsoever must retain the following
24786  *    acknowledgment:
24787  *    "This product includes software developed by the OpenSSL Project
24788  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
24789  *
24790  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
24791  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24792  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24793  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
24794  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24795  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24796  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24797  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24798  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24799  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24800  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
24801  * OF THE POSSIBILITY OF SUCH DAMAGE.
24802  * ====================================================================
24803  *
24804  * This product includes cryptographic software written by Eric Young
24805  * (eay@cryptsoft.com).  This product includes software written by Tim
24806  * Hudson (tjh@cryptsoft.com).
24807  *
24808  */
24809 
24810 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
24811 /* opensslconf.h */
24812 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
24813 
24814 
24815 
24816 
24817 /* OpenSSL was configured with the following options: */
24818 # 108 "/usr/include/openssl/opensslconf.h" 3 4
24819 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
24820    asks for it.  This is a transient feature that is provided for those
24821    who haven't had the time to do the appropriate changes in their
24822    applications.  */
24823 # 204 "/usr/include/openssl/opensslconf.h" 3 4
24824 /* crypto/opensslconf.h.in */
24825 
24826 /* Generate 80386 code? */
24827 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
24828 # 68 "/usr/include/openssl/x509.h" 2 3 4
24829 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
24830 /* ====================================================================
24831  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
24832  *
24833  * Redistribution and use in source and binary forms, with or without
24834  * modification, are permitted provided that the following conditions
24835  * are met:
24836  *
24837  * 1. Redistributions of source code must retain the above copyright
24838  *    notice, this list of conditions and the following disclaimer.
24839  *
24840  * 2. Redistributions in binary form must reproduce the above copyright
24841  *    notice, this list of conditions and the following disclaimer in
24842  *    the documentation and/or other materials provided with the
24843  *    distribution.
24844  *
24845  * 3. All advertising materials mentioning features or use of this
24846  *    software must display the following acknowledgment:
24847  *    "This product includes software developed by the OpenSSL Project
24848  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24849  *
24850  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
24851  *    endorse or promote products derived from this software without
24852  *    prior written permission. For written permission, please contact
24853  *    openssl-core@openssl.org.
24854  *
24855  * 5. Products derived from this software may not be called "OpenSSL"
24856  *    nor may "OpenSSL" appear in their names without prior written
24857  *    permission of the OpenSSL Project.
24858  *
24859  * 6. Redistributions of any form whatsoever must retain the following
24860  *    acknowledgment:
24861  *    "This product includes software developed by the OpenSSL Project
24862  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
24863  *
24864  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
24865  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24866  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24867  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
24868  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24869  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24870  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24871  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24872  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24873  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24874  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
24875  * OF THE POSSIBILITY OF SUCH DAMAGE.
24876  * ====================================================================
24877  *
24878  * This product includes cryptographic software written by Eric Young
24879  * (eay@cryptsoft.com).  This product includes software written by Tim
24880  * Hudson (tjh@cryptsoft.com).
24881  *
24882  */
24883 # 69 "/usr/include/openssl/x509.h" 2 3 4
24884 
24885 # 1 "/usr/include/openssl/buffer.h" 1 3 4
24886 /* crypto/buffer/buffer.h */
24887 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
24888  * All rights reserved.
24889  *
24890  * This package is an SSL implementation written
24891  * by Eric Young (eay@cryptsoft.com).
24892  * The implementation was written so as to conform with Netscapes SSL.
24893  *
24894  * This library is free for commercial and non-commercial use as long as
24895  * the following conditions are aheared to.  The following conditions
24896  * apply to all code found in this distribution, be it the RC4, RSA,
24897  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
24898  * included with this distribution is covered by the same copyright terms
24899  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
24900  *
24901  * Copyright remains Eric Young's, and as such any Copyright notices in
24902  * the code are not to be removed.
24903  * If this package is used in a product, Eric Young should be given attribution
24904  * as the author of the parts of the library used.
24905  * This can be in the form of a textual message at program startup or
24906  * in documentation (online or textual) provided with the package.
24907  *
24908  * Redistribution and use in source and binary forms, with or without
24909  * modification, are permitted provided that the following conditions
24910  * are met:
24911  * 1. Redistributions of source code must retain the copyright
24912  *    notice, this list of conditions and the following disclaimer.
24913  * 2. Redistributions in binary form must reproduce the above copyright
24914  *    notice, this list of conditions and the following disclaimer in the
24915  *    documentation and/or other materials provided with the distribution.
24916  * 3. All advertising materials mentioning features or use of this software
24917  *    must display the following acknowledgement:
24918  *    "This product includes cryptographic software written by
24919  *     Eric Young (eay@cryptsoft.com)"
24920  *    The word 'cryptographic' can be left out if the rouines from the library
24921  *    being used are not cryptographic related :-).
24922  * 4. If you include any Windows specific code (or a derivative thereof) from
24923  *    the apps directory (application code) you must include an acknowledgement:
24924  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
24925  *
24926  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
24927  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24928  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24929  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24930  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24931  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24932  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24933  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24934  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24935  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24936  * SUCH DAMAGE.
24937  *
24938  * The licence and distribution terms for any publically available version or
24939  * derivative of this code cannot be changed.  i.e. this code cannot simply be
24940  * copied and put under another distribution licence
24941  * [including the GNU Public Licence.]
24942  */
24943 
24944 
24945 
24946 
24947 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
24948 /* ====================================================================
24949  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
24950  *
24951  * Redistribution and use in source and binary forms, with or without
24952  * modification, are permitted provided that the following conditions
24953  * are met:
24954  *
24955  * 1. Redistributions of source code must retain the above copyright
24956  *    notice, this list of conditions and the following disclaimer.
24957  *
24958  * 2. Redistributions in binary form must reproduce the above copyright
24959  *    notice, this list of conditions and the following disclaimer in
24960  *    the documentation and/or other materials provided with the
24961  *    distribution.
24962  *
24963  * 3. All advertising materials mentioning features or use of this
24964  *    software must display the following acknowledgment:
24965  *    "This product includes software developed by the OpenSSL Project
24966  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24967  *
24968  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
24969  *    endorse or promote products derived from this software without
24970  *    prior written permission. For written permission, please contact
24971  *    openssl-core@openssl.org.
24972  *
24973  * 5. Products derived from this software may not be called "OpenSSL"
24974  *    nor may "OpenSSL" appear in their names without prior written
24975  *    permission of the OpenSSL Project.
24976  *
24977  * 6. Redistributions of any form whatsoever must retain the following
24978  *    acknowledgment:
24979  *    "This product includes software developed by the OpenSSL Project
24980  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
24981  *
24982  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
24983  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24984  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24985  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
24986  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24987  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24988  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24989  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24990  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24991  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24992  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
24993  * OF THE POSSIBILITY OF SUCH DAMAGE.
24994  * ====================================================================
24995  *
24996  * This product includes cryptographic software written by Eric Young
24997  * (eay@cryptsoft.com).  This product includes software written by Tim
24998  * Hudson (tjh@cryptsoft.com).
24999  *
25000  */
25001 # 63 "/usr/include/openssl/buffer.h" 2 3 4
25002 
25003 
25004 
25005 
25006 
25007 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
25008 /*
25009  * CDDL HEADER START
25010  *
25011  * The contents of this file are subject to the terms of the
25012  * Common Development and Distribution License, Version 1.0 only
25013  * (the "License").  You may not use this file except in compliance
25014  * with the License.
25015  *
25016  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25017  * or http://www.opensolaris.org/os/licensing.
25018  * See the License for the specific language governing permissions
25019  * and limitations under the License.
25020  *
25021  * When distributing Covered Code, include this CDDL HEADER in each
25022  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25023  * If applicable, add the following below this CDDL HEADER, with the
25024  * fields enclosed by brackets "[]" replaced with your own identifying
25025  * information: Portions Copyright [yyyy] [name of copyright owner]
25026  *
25027  * CDDL HEADER END
25028  */
25029 /*	Copyright (c) 1988 AT&T	*/
25030 /*	  All Rights Reserved  	*/
25031 
25032 
25033 /*
25034  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
25035  * Use is subject to license terms.
25036  */
25037 
25038 
25039 
25040 
25041 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
25042 /*
25043  * CDDL HEADER START
25044  *
25045  * The contents of this file are subject to the terms of the
25046  * Common Development and Distribution License (the "License").
25047  * You may not use this file except in compliance with the License.
25048  *
25049  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25050  * or http://www.opensolaris.org/os/licensing.
25051  * See the License for the specific language governing permissions
25052  * and limitations under the License.
25053  *
25054  *
25055  * When distributing Covered Code, include this CDDL HEADER in each
25056  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25057  * If applicable, add the following below this CDDL HEADER, with the
25058  * fields enclosed by brackets "[]" replaced with your own identifying
25059  * information: Portions Copyright [yyyy] [name of copyright owner]
25060  *
25061  * CDDL HEADER END
25062  */
25063 
25064 /*
25065  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
25066  * Use is subject to license terms.
25067  * Copyright 2016 Joyent, Inc.
25068  */
25069 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
25070 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 1 3 4
25071 /*
25072  * CDDL HEADER START
25073  *
25074  * The contents of this file are subject to the terms of the
25075  * Common Development and Distribution License, Version 1.0 only
25076  * (the "License").  You may not use this file except in compliance
25077  * with the License.
25078  *
25079  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25080  * or http://www.opensolaris.org/os/licensing.
25081  * See the License for the specific language governing permissions
25082  * and limitations under the License.
25083  *
25084  * When distributing Covered Code, include this CDDL HEADER in each
25085  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25086  * If applicable, add the following below this CDDL HEADER, with the
25087  * fields enclosed by brackets "[]" replaced with your own identifying
25088  * information: Portions Copyright [yyyy] [name of copyright owner]
25089  *
25090  * CDDL HEADER END
25091  */
25092 /*	Copyright (c) 1988 AT&T	*/
25093 /*	  All Rights Reserved  	*/
25094 
25095 
25096 /*
25097  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
25098  * Use is subject to license terms.
25099  */
25100 
25101 /*
25102  * Copyright 2014 PALO, Richard.
25103  * Copyright 2016 Joyent, Inc.
25104  */
25105 
25106 /*
25107  * An application should not include this header directly.  Instead it
25108  * should be included only through the inclusion of other Sun headers.
25109  *
25110  * The contents of this header is limited to identifiers specified in the
25111  * C Standard.  Any new identifiers specified in future amendments to the
25112  * C Standard must be placed in this header.  If these new identifiers
25113  * are required to also be in the C++ Standard "std" namespace, then for
25114  * anything other than macro definitions, corresponding "using" directives
25115  * must also be added to <stddef.h.h>.
25116  */
25117 
25118 
25119 
25120 
25121 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
25122 /*
25123  * CDDL HEADER START
25124  *
25125  * The contents of this file are subject to the terms of the
25126  * Common Development and Distribution License (the "License").
25127  * You may not use this file except in compliance with the License.
25128  *
25129  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25130  * or http://www.opensolaris.org/os/licensing.
25131  * See the License for the specific language governing permissions
25132  * and limitations under the License.
25133  *
25134  *
25135  * When distributing Covered Code, include this CDDL HEADER in each
25136  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25137  * If applicable, add the following below this CDDL HEADER, with the
25138  * fields enclosed by brackets "[]" replaced with your own identifying
25139  * information: Portions Copyright [yyyy] [name of copyright owner]
25140  *
25141  * CDDL HEADER END
25142  */
25143 
25144 /*
25145  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
25146  * Use is subject to license terms.
25147  * Copyright 2016 Joyent, Inc.
25148  */
25149 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
25150 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
25151 /*
25152  * CDDL HEADER START
25153  *
25154  * The contents of this file are subject to the terms of the
25155  * Common Development and Distribution License (the "License").
25156  * You may not use this file except in compliance with the License.
25157  *
25158  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25159  * or http://www.opensolaris.org/os/licensing.
25160  * See the License for the specific language governing permissions
25161  * and limitations under the License.
25162  *
25163  * When distributing Covered Code, include this CDDL HEADER in each
25164  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25165  * If applicable, add the following below this CDDL HEADER, with the
25166  * fields enclosed by brackets "[]" replaced with your own identifying
25167  * information: Portions Copyright [yyyy] [name of copyright owner]
25168  *
25169  * CDDL HEADER END
25170  */
25171 
25172 /*
25173  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
25174  * Copyright 2016 Joyent, Inc.
25175  *
25176  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25177  * Use is subject to license terms.
25178  */
25179 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
25180 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1 3 4
25181 /*
25182  * This file and its contents are supplied under the terms of the
25183  * Common Development and Distribution License ("CDDL"), version 1.0.
25184  * You may only use this file in accordance with the terms of version
25185  * 1.0 of the CDDL.
25186  *
25187  * A full copy of the text of the CDDL should have accompanied this
25188  * source.  A copy of the CDDL is also available via the Internet at
25189  * http://www.illumos.org/license/CDDL.
25190  */
25191 
25192 /*
25193  * Copyright 2014-2016 PALO, Richard.
25194  */
25195 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
25196 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 3 4
25197 typedef long max_align_t;
25198 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
25199 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 1 3 4
25200 /*
25201  * This file and its contents are supplied under the terms of the
25202  * Common Development and Distribution License ("CDDL"), version 1.0.
25203  * You may only use this file in accordance with the terms of version
25204  * 1.0 of the CDDL.
25205  *
25206  * A full copy of the text of the CDDL should have accompanied this
25207  * source.  A copy of the CDDL is also available via the Internet at
25208  * http://www.illumos.org/license/CDDL.
25209  */
25210 
25211 /*
25212  * Copyright 2017 Toomas Soome <tsoome@me.com>
25213  */
25214 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
25215 
25216 /*
25217  * Allow global visibility for symbols defined in
25218  * C++ "std" namespace in <iso/stddef_iso.h>.
25219  */
25220 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 3 4
25221 /*
25222  * wchar_t is a built-in type in standard C++ and as such is not
25223  * defined here when using standard C++. However, the GNU compiler
25224  * fixincludes utility nonetheless creates its own version of this
25225  * header for use by gcc and g++. In that version it adds a redundant
25226  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
25227  * header we need to include the following magic comment:
25228  *
25229  * we must use the C++ compiler's type
25230  *
25231  * The above comment should not be removed or changed until GNU
25232  * gcc/fixinc/inclhack.def is updated to bypass this header.
25233  */
25234 # 69 "/usr/include/openssl/buffer.h" 2 3 4
25235 
25236 
25237 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1 3 4
25238 /*
25239  * CDDL HEADER START
25240  *
25241  * The contents of this file are subject to the terms of the
25242  * Common Development and Distribution License (the "License").
25243  * You may not use this file except in compliance with the License.
25244  *
25245  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25246  * or http://www.opensolaris.org/os/licensing.
25247  * See the License for the specific language governing permissions
25248  * and limitations under the License.
25249  *
25250  * When distributing Covered Code, include this CDDL HEADER in each
25251  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25252  * If applicable, add the following below this CDDL HEADER, with the
25253  * fields enclosed by brackets "[]" replaced with your own identifying
25254  * information: Portions Copyright [yyyy] [name of copyright owner]
25255  *
25256  * CDDL HEADER END
25257  */
25258 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25259 /*	  All Rights Reserved  	*/
25260 
25261 
25262 /*
25263  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25264  * Use is subject to license terms.
25265  *
25266  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
25267  * Copyright 2016 Joyent, Inc.
25268  */
25269 # 72 "/usr/include/openssl/buffer.h" 2 3 4
25270 
25271 
25272 /* Already declared in ossl_typ.h */
25273 /* typedef struct buf_mem_st BUF_MEM; */
25274 
25275 struct buf_mem_st {
25276     size_t length; /* current number of bytes */
25277     char *data;
25278     size_t max; /* size of buffer */
25279 };
25280 
25281 BUF_MEM *BUF_MEM_new(void);
25282 void BUF_MEM_free(BUF_MEM *a);
25283 int BUF_MEM_grow(BUF_MEM *str, size_t len);
25284 int BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
25285 size_t BUF_strnlen(const char *str, size_t maxlen);
25286 char *BUF_strdup(const char *str);
25287 
25288 /*
25289  * Like strndup, but in addition, explicitly guarantees to never read past the
25290  * first |siz| bytes of |str|.
25291  */
25292 char *BUF_strndup(const char *str, size_t siz);
25293 
25294 void *BUF_memdup(const void *data, size_t siz);
25295 void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
25296 
25297 /* safe string functions */
25298 size_t BUF_strlcpy(char *dst, const char *src, size_t siz);
25299 size_t BUF_strlcat(char *dst, const char *src, size_t siz);
25300 
25301 /* BEGIN ERROR CODES */
25302 /*
25303  * The following lines are auto generated by the script mkerr.pl. Any changes
25304  * made after this point may be overwritten when the script is next run.
25305  */
25306 void ERR_load_BUF_strings(void);
25307 
25308 /* Error codes for the BUF functions. */
25309 
25310 /* Function codes. */
25311 
25312 
25313 
25314 
25315 
25316 
25317 
25318 /* Reason codes. */
25319 # 71 "/usr/include/openssl/x509.h" 2 3 4
25320 
25321 
25322 # 1 "/usr/include/openssl/evp.h" 1 3 4
25323 /* crypto/evp/evp.h */
25324 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
25325  * All rights reserved.
25326  *
25327  * This package is an SSL implementation written
25328  * by Eric Young (eay@cryptsoft.com).
25329  * The implementation was written so as to conform with Netscapes SSL.
25330  *
25331  * This library is free for commercial and non-commercial use as long as
25332  * the following conditions are aheared to.  The following conditions
25333  * apply to all code found in this distribution, be it the RC4, RSA,
25334  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
25335  * included with this distribution is covered by the same copyright terms
25336  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
25337  *
25338  * Copyright remains Eric Young's, and as such any Copyright notices in
25339  * the code are not to be removed.
25340  * If this package is used in a product, Eric Young should be given attribution
25341  * as the author of the parts of the library used.
25342  * This can be in the form of a textual message at program startup or
25343  * in documentation (online or textual) provided with the package.
25344  *
25345  * Redistribution and use in source and binary forms, with or without
25346  * modification, are permitted provided that the following conditions
25347  * are met:
25348  * 1. Redistributions of source code must retain the copyright
25349  *    notice, this list of conditions and the following disclaimer.
25350  * 2. Redistributions in binary form must reproduce the above copyright
25351  *    notice, this list of conditions and the following disclaimer in the
25352  *    documentation and/or other materials provided with the distribution.
25353  * 3. All advertising materials mentioning features or use of this software
25354  *    must display the following acknowledgement:
25355  *    "This product includes cryptographic software written by
25356  *     Eric Young (eay@cryptsoft.com)"
25357  *    The word 'cryptographic' can be left out if the rouines from the library
25358  *    being used are not cryptographic related :-).
25359  * 4. If you include any Windows specific code (or a derivative thereof) from
25360  *    the apps directory (application code) you must include an acknowledgement:
25361  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
25362  *
25363  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
25364  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25365  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25366  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25367  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25368  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25369  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25370  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25371  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25372  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25373  * SUCH DAMAGE.
25374  *
25375  * The licence and distribution terms for any publically available version or
25376  * derivative of this code cannot be changed.  i.e. this code cannot simply be
25377  * copied and put under another distribution licence
25378  * [including the GNU Public Licence.]
25379  */
25380 # 66 "/usr/include/openssl/evp.h" 3 4
25381 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
25382 /* opensslconf.h */
25383 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
25384 
25385 
25386 
25387 
25388 /* OpenSSL was configured with the following options: */
25389 # 108 "/usr/include/openssl/opensslconf.h" 3 4
25390 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
25391    asks for it.  This is a transient feature that is provided for those
25392    who haven't had the time to do the appropriate changes in their
25393    applications.  */
25394 # 204 "/usr/include/openssl/opensslconf.h" 3 4
25395 /* crypto/opensslconf.h.in */
25396 
25397 /* Generate 80386 code? */
25398 # 67 "/usr/include/openssl/evp.h" 2 3 4
25399 
25400 
25401 
25402 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
25403 /* ====================================================================
25404  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
25405  *
25406  * Redistribution and use in source and binary forms, with or without
25407  * modification, are permitted provided that the following conditions
25408  * are met:
25409  *
25410  * 1. Redistributions of source code must retain the above copyright
25411  *    notice, this list of conditions and the following disclaimer.
25412  *
25413  * 2. Redistributions in binary form must reproduce the above copyright
25414  *    notice, this list of conditions and the following disclaimer in
25415  *    the documentation and/or other materials provided with the
25416  *    distribution.
25417  *
25418  * 3. All advertising materials mentioning features or use of this
25419  *    software must display the following acknowledgment:
25420  *    "This product includes software developed by the OpenSSL Project
25421  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
25422  *
25423  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
25424  *    endorse or promote products derived from this software without
25425  *    prior written permission. For written permission, please contact
25426  *    openssl-core@openssl.org.
25427  *
25428  * 5. Products derived from this software may not be called "OpenSSL"
25429  *    nor may "OpenSSL" appear in their names without prior written
25430  *    permission of the OpenSSL Project.
25431  *
25432  * 6. Redistributions of any form whatsoever must retain the following
25433  *    acknowledgment:
25434  *    "This product includes software developed by the OpenSSL Project
25435  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
25436  *
25437  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
25438  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25439  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25440  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
25441  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25442  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25443  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25444  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25445  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25446  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25447  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
25448  * OF THE POSSIBILITY OF SUCH DAMAGE.
25449  * ====================================================================
25450  *
25451  * This product includes cryptographic software written by Eric Young
25452  * (eay@cryptsoft.com).  This product includes software written by Tim
25453  * Hudson (tjh@cryptsoft.com).
25454  *
25455  */
25456 # 71 "/usr/include/openssl/evp.h" 2 3 4
25457 
25458 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
25459 /* ====================================================================
25460  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
25461  *
25462  * Redistribution and use in source and binary forms, with or without
25463  * modification, are permitted provided that the following conditions
25464  * are met:
25465  *
25466  * 1. Redistributions of source code must retain the above copyright
25467  *    notice, this list of conditions and the following disclaimer.
25468  *
25469  * 2. Redistributions in binary form must reproduce the above copyright
25470  *    notice, this list of conditions and the following disclaimer in
25471  *    the documentation and/or other materials provided with the
25472  *    distribution.
25473  *
25474  * 3. All advertising materials mentioning features or use of this
25475  *    software must display the following acknowledgment:
25476  *    "This product includes software developed by the OpenSSL Project
25477  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
25478  *
25479  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
25480  *    endorse or promote products derived from this software without
25481  *    prior written permission. For written permission, please contact
25482  *    openssl-core@openssl.org.
25483  *
25484  * 5. Products derived from this software may not be called "OpenSSL"
25485  *    nor may "OpenSSL" appear in their names without prior written
25486  *    permission of the OpenSSL Project.
25487  *
25488  * 6. Redistributions of any form whatsoever must retain the following
25489  *    acknowledgment:
25490  *    "This product includes software developed by the OpenSSL Project
25491  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
25492  *
25493  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
25494  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25495  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25496  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
25497  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25498  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25499  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25500  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25501  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25502  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25503  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
25504  * OF THE POSSIBILITY OF SUCH DAMAGE.
25505  * ====================================================================
25506  *
25507  * This product includes cryptographic software written by Eric Young
25508  * (eay@cryptsoft.com).  This product includes software written by Tim
25509  * Hudson (tjh@cryptsoft.com).
25510  *
25511  */
25512 # 73 "/usr/include/openssl/evp.h" 2 3 4
25513 
25514 
25515 # 1 "/usr/include/openssl/bio.h" 1 3 4
25516 /* crypto/bio/bio.h */
25517 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
25518  * All rights reserved.
25519  *
25520  * This package is an SSL implementation written
25521  * by Eric Young (eay@cryptsoft.com).
25522  * The implementation was written so as to conform with Netscapes SSL.
25523  *
25524  * This library is free for commercial and non-commercial use as long as
25525  * the following conditions are aheared to.  The following conditions
25526  * apply to all code found in this distribution, be it the RC4, RSA,
25527  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
25528  * included with this distribution is covered by the same copyright terms
25529  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
25530  *
25531  * Copyright remains Eric Young's, and as such any Copyright notices in
25532  * the code are not to be removed.
25533  * If this package is used in a product, Eric Young should be given attribution
25534  * as the author of the parts of the library used.
25535  * This can be in the form of a textual message at program startup or
25536  * in documentation (online or textual) provided with the package.
25537  *
25538  * Redistribution and use in source and binary forms, with or without
25539  * modification, are permitted provided that the following conditions
25540  * are met:
25541  * 1. Redistributions of source code must retain the copyright
25542  *    notice, this list of conditions and the following disclaimer.
25543  * 2. Redistributions in binary form must reproduce the above copyright
25544  *    notice, this list of conditions and the following disclaimer in the
25545  *    documentation and/or other materials provided with the distribution.
25546  * 3. All advertising materials mentioning features or use of this software
25547  *    must display the following acknowledgement:
25548  *    "This product includes cryptographic software written by
25549  *     Eric Young (eay@cryptsoft.com)"
25550  *    The word 'cryptographic' can be left out if the rouines from the library
25551  *    being used are not cryptographic related :-).
25552  * 4. If you include any Windows specific code (or a derivative thereof) from
25553  *    the apps directory (application code) you must include an acknowledgement:
25554  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
25555  *
25556  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
25557  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25558  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25559  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25560  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25561  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25562  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25563  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25564  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25565  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25566  * SUCH DAMAGE.
25567  *
25568  * The licence and distribution terms for any publically available version or
25569  * derivative of this code cannot be changed.  i.e. this code cannot simply be
25570  * copied and put under another distribution licence
25571  * [including the GNU Public Licence.]
25572  */
25573 # 76 "/usr/include/openssl/evp.h" 2 3 4
25574 
25575 
25576 /*-
25577 #define EVP_RC2_KEY_SIZE                16
25578 #define EVP_RC4_KEY_SIZE                16
25579 #define EVP_BLOWFISH_KEY_SIZE           16
25580 #define EVP_CAST5_KEY_SIZE              16
25581 #define EVP_RC5_32_12_16_KEY_SIZE       16
25582 */
25583 
25584 
25585 
25586 
25587 
25588 
25589 /* Default PKCS#5 iteration count */
25590 
25591 
25592 # 1 "/usr/include/openssl/objects.h" 1 3 4
25593 /* crypto/objects/objects.h */
25594 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
25595  * All rights reserved.
25596  *
25597  * This package is an SSL implementation written
25598  * by Eric Young (eay@cryptsoft.com).
25599  * The implementation was written so as to conform with Netscapes SSL.
25600  *
25601  * This library is free for commercial and non-commercial use as long as
25602  * the following conditions are aheared to.  The following conditions
25603  * apply to all code found in this distribution, be it the RC4, RSA,
25604  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
25605  * included with this distribution is covered by the same copyright terms
25606  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
25607  *
25608  * Copyright remains Eric Young's, and as such any Copyright notices in
25609  * the code are not to be removed.
25610  * If this package is used in a product, Eric Young should be given attribution
25611  * as the author of the parts of the library used.
25612  * This can be in the form of a textual message at program startup or
25613  * in documentation (online or textual) provided with the package.
25614  *
25615  * Redistribution and use in source and binary forms, with or without
25616  * modification, are permitted provided that the following conditions
25617  * are met:
25618  * 1. Redistributions of source code must retain the copyright
25619  *    notice, this list of conditions and the following disclaimer.
25620  * 2. Redistributions in binary form must reproduce the above copyright
25621  *    notice, this list of conditions and the following disclaimer in the
25622  *    documentation and/or other materials provided with the distribution.
25623  * 3. All advertising materials mentioning features or use of this software
25624  *    must display the following acknowledgement:
25625  *    "This product includes cryptographic software written by
25626  *     Eric Young (eay@cryptsoft.com)"
25627  *    The word 'cryptographic' can be left out if the rouines from the library
25628  *    being used are not cryptographic related :-).
25629  * 4. If you include any Windows specific code (or a derivative thereof) from
25630  *    the apps directory (application code) you must include an acknowledgement:
25631  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
25632  *
25633  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
25634  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25635  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25636  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25637  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25638  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25639  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25640  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25641  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25642  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25643  * SUCH DAMAGE.
25644  *
25645  * The licence and distribution terms for any publically available version or
25646  * derivative of this code cannot be changed.  i.e. this code cannot simply be
25647  * copied and put under another distribution licence
25648  * [including the GNU Public Licence.]
25649  */
25650 
25651 
25652 
25653 
25654 
25655 
25656 
25657 # 1 "/usr/include/openssl/obj_mac.h" 1 3 4
25658 /* crypto/objects/obj_mac.h */
25659 
25660 /*
25661  * THIS FILE IS GENERATED FROM objects.txt by objects.pl via the following
25662  * command: perl objects.pl objects.txt obj_mac.num obj_mac.h
25663  */
25664 
25665 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
25666  * All rights reserved.
25667  *
25668  * This package is an SSL implementation written
25669  * by Eric Young (eay@cryptsoft.com).
25670  * The implementation was written so as to conform with Netscapes SSL.
25671  *
25672  * This library is free for commercial and non-commercial use as long as
25673  * the following conditions are aheared to.  The following conditions
25674  * apply to all code found in this distribution, be it the RC4, RSA,
25675  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
25676  * included with this distribution is covered by the same copyright terms
25677  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
25678  *
25679  * Copyright remains Eric Young's, and as such any Copyright notices in
25680  * the code are not to be removed.
25681  * If this package is used in a product, Eric Young should be given attribution
25682  * as the author of the parts of the library used.
25683  * This can be in the form of a textual message at program startup or
25684  * in documentation (online or textual) provided with the package.
25685  *
25686  * Redistribution and use in source and binary forms, with or without
25687  * modification, are permitted provided that the following conditions
25688  * are met:
25689  * 1. Redistributions of source code must retain the copyright
25690  *    notice, this list of conditions and the following disclaimer.
25691  * 2. Redistributions in binary form must reproduce the above copyright
25692  *    notice, this list of conditions and the following disclaimer in the
25693  *    documentation and/or other materials provided with the distribution.
25694  * 3. All advertising materials mentioning features or use of this software
25695  *    must display the following acknowledgement:
25696  *    "This product includes cryptographic software written by
25697  *     Eric Young (eay@cryptsoft.com)"
25698  *    The word 'cryptographic' can be left out if the rouines from the library
25699  *    being used are not cryptographic related :-).
25700  * 4. If you include any Windows specific code (or a derivative thereof) from
25701  *    the apps directory (application code) you must include an acknowledgement:
25702  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
25703  *
25704  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
25705  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25706  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25707  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25708  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25709  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25710  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25711  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25712  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25713  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25714  * SUCH DAMAGE.
25715  *
25716  * The licence and distribution terms for any publically available version or
25717  * derivative of this code cannot be changed.  i.e. this code cannot simply be
25718  * copied and put under another distribution licence
25719  * [including the GNU Public Licence.]
25720  */
25721 # 66 "/usr/include/openssl/objects.h" 2 3 4
25722 # 964 "/usr/include/openssl/objects.h" 3 4
25723 # 1 "/usr/include/openssl/bio.h" 1 3 4
25724 /* crypto/bio/bio.h */
25725 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
25726  * All rights reserved.
25727  *
25728  * This package is an SSL implementation written
25729  * by Eric Young (eay@cryptsoft.com).
25730  * The implementation was written so as to conform with Netscapes SSL.
25731  *
25732  * This library is free for commercial and non-commercial use as long as
25733  * the following conditions are aheared to.  The following conditions
25734  * apply to all code found in this distribution, be it the RC4, RSA,
25735  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
25736  * included with this distribution is covered by the same copyright terms
25737  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
25738  *
25739  * Copyright remains Eric Young's, and as such any Copyright notices in
25740  * the code are not to be removed.
25741  * If this package is used in a product, Eric Young should be given attribution
25742  * as the author of the parts of the library used.
25743  * This can be in the form of a textual message at program startup or
25744  * in documentation (online or textual) provided with the package.
25745  *
25746  * Redistribution and use in source and binary forms, with or without
25747  * modification, are permitted provided that the following conditions
25748  * are met:
25749  * 1. Redistributions of source code must retain the copyright
25750  *    notice, this list of conditions and the following disclaimer.
25751  * 2. Redistributions in binary form must reproduce the above copyright
25752  *    notice, this list of conditions and the following disclaimer in the
25753  *    documentation and/or other materials provided with the distribution.
25754  * 3. All advertising materials mentioning features or use of this software
25755  *    must display the following acknowledgement:
25756  *    "This product includes cryptographic software written by
25757  *     Eric Young (eay@cryptsoft.com)"
25758  *    The word 'cryptographic' can be left out if the rouines from the library
25759  *    being used are not cryptographic related :-).
25760  * 4. If you include any Windows specific code (or a derivative thereof) from
25761  *    the apps directory (application code) you must include an acknowledgement:
25762  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
25763  *
25764  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
25765  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25766  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25767  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25768  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25769  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25770  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25771  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25772  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25773  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25774  * SUCH DAMAGE.
25775  *
25776  * The licence and distribution terms for any publically available version or
25777  * derivative of this code cannot be changed.  i.e. this code cannot simply be
25778  * copied and put under another distribution licence
25779  * [including the GNU Public Licence.]
25780  */
25781 # 965 "/usr/include/openssl/objects.h" 2 3 4
25782 # 1 "/usr/include/openssl/asn1.h" 1 3 4
25783 /* crypto/asn1/asn1.h */
25784 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
25785  * All rights reserved.
25786  *
25787  * This package is an SSL implementation written
25788  * by Eric Young (eay@cryptsoft.com).
25789  * The implementation was written so as to conform with Netscapes SSL.
25790  *
25791  * This library is free for commercial and non-commercial use as long as
25792  * the following conditions are aheared to.  The following conditions
25793  * apply to all code found in this distribution, be it the RC4, RSA,
25794  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
25795  * included with this distribution is covered by the same copyright terms
25796  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
25797  *
25798  * Copyright remains Eric Young's, and as such any Copyright notices in
25799  * the code are not to be removed.
25800  * If this package is used in a product, Eric Young should be given attribution
25801  * as the author of the parts of the library used.
25802  * This can be in the form of a textual message at program startup or
25803  * in documentation (online or textual) provided with the package.
25804  *
25805  * Redistribution and use in source and binary forms, with or without
25806  * modification, are permitted provided that the following conditions
25807  * are met:
25808  * 1. Redistributions of source code must retain the copyright
25809  *    notice, this list of conditions and the following disclaimer.
25810  * 2. Redistributions in binary form must reproduce the above copyright
25811  *    notice, this list of conditions and the following disclaimer in the
25812  *    documentation and/or other materials provided with the distribution.
25813  * 3. All advertising materials mentioning features or use of this software
25814  *    must display the following acknowledgement:
25815  *    "This product includes cryptographic software written by
25816  *     Eric Young (eay@cryptsoft.com)"
25817  *    The word 'cryptographic' can be left out if the rouines from the library
25818  *    being used are not cryptographic related :-).
25819  * 4. If you include any Windows specific code (or a derivative thereof) from
25820  *    the apps directory (application code) you must include an acknowledgement:
25821  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
25822  *
25823  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
25824  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25825  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25826  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25827  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25828  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25829  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25830  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25831  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25832  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25833  * SUCH DAMAGE.
25834  *
25835  * The licence and distribution terms for any publically available version or
25836  * derivative of this code cannot be changed.  i.e. this code cannot simply be
25837  * copied and put under another distribution licence
25838  * [including the GNU Public Licence.]
25839  */
25840 
25841 
25842 
25843 
25844 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1 3 4
25845 /*
25846  * CDDL HEADER START
25847  *
25848  * The contents of this file are subject to the terms of the
25849  * Common Development and Distribution License (the "License").
25850  * You may not use this file except in compliance with the License.
25851  *
25852  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25853  * or http://www.opensolaris.org/os/licensing.
25854  * See the License for the specific language governing permissions
25855  * and limitations under the License.
25856  *
25857  * When distributing Covered Code, include this CDDL HEADER in each
25858  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25859  * If applicable, add the following below this CDDL HEADER, with the
25860  * fields enclosed by brackets "[]" replaced with your own identifying
25861  * information: Portions Copyright [yyyy] [name of copyright owner]
25862  *
25863  * CDDL HEADER END
25864  */
25865 /*	Copyright (c) 1988 AT&T	*/
25866 /*	  All Rights Reserved  	*/
25867 
25868 
25869 /*
25870  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25871  *
25872  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
25873  * Use is subject to license terms.
25874  */
25875 /*
25876  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
25877  * Copyright 2016 Joyent, Inc.
25878  */
25879 # 63 "/usr/include/openssl/asn1.h" 2 3 4
25880 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
25881 /* e_os2.h */
25882 /* ====================================================================
25883  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
25884  *
25885  * Redistribution and use in source and binary forms, with or without
25886  * modification, are permitted provided that the following conditions
25887  * are met:
25888  *
25889  * 1. Redistributions of source code must retain the above copyright
25890  *    notice, this list of conditions and the following disclaimer.
25891  *
25892  * 2. Redistributions in binary form must reproduce the above copyright
25893  *    notice, this list of conditions and the following disclaimer in
25894  *    the documentation and/or other materials provided with the
25895  *    distribution.
25896  *
25897  * 3. All advertising materials mentioning features or use of this
25898  *    software must display the following acknowledgment:
25899  *    "This product includes software developed by the OpenSSL Project
25900  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
25901  *
25902  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
25903  *    endorse or promote products derived from this software without
25904  *    prior written permission. For written permission, please contact
25905  *    openssl-core@openssl.org.
25906  *
25907  * 5. Products derived from this software may not be called "OpenSSL"
25908  *    nor may "OpenSSL" appear in their names without prior written
25909  *    permission of the OpenSSL Project.
25910  *
25911  * 6. Redistributions of any form whatsoever must retain the following
25912  *    acknowledgment:
25913  *    "This product includes software developed by the OpenSSL Project
25914  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
25915  *
25916  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
25917  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25918  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25919  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
25920  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25921  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25922  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25923  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25924  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25925  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25926  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
25927  * OF THE POSSIBILITY OF SUCH DAMAGE.
25928  * ====================================================================
25929  *
25930  * This product includes cryptographic software written by Eric Young
25931  * (eay@cryptsoft.com).  This product includes software written by Tim
25932  * Hudson (tjh@cryptsoft.com).
25933  *
25934  */
25935 
25936 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
25937 /* opensslconf.h */
25938 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
25939 
25940 
25941 
25942 
25943 /* OpenSSL was configured with the following options: */
25944 # 108 "/usr/include/openssl/opensslconf.h" 3 4
25945 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
25946    asks for it.  This is a transient feature that is provided for those
25947    who haven't had the time to do the appropriate changes in their
25948    applications.  */
25949 # 204 "/usr/include/openssl/opensslconf.h" 3 4
25950 /* crypto/opensslconf.h.in */
25951 
25952 /* Generate 80386 code? */
25953 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
25954 # 64 "/usr/include/openssl/asn1.h" 2 3 4
25955 
25956 # 1 "/usr/include/openssl/bio.h" 1 3 4
25957 /* crypto/bio/bio.h */
25958 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
25959  * All rights reserved.
25960  *
25961  * This package is an SSL implementation written
25962  * by Eric Young (eay@cryptsoft.com).
25963  * The implementation was written so as to conform with Netscapes SSL.
25964  *
25965  * This library is free for commercial and non-commercial use as long as
25966  * the following conditions are aheared to.  The following conditions
25967  * apply to all code found in this distribution, be it the RC4, RSA,
25968  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
25969  * included with this distribution is covered by the same copyright terms
25970  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
25971  *
25972  * Copyright remains Eric Young's, and as such any Copyright notices in
25973  * the code are not to be removed.
25974  * If this package is used in a product, Eric Young should be given attribution
25975  * as the author of the parts of the library used.
25976  * This can be in the form of a textual message at program startup or
25977  * in documentation (online or textual) provided with the package.
25978  *
25979  * Redistribution and use in source and binary forms, with or without
25980  * modification, are permitted provided that the following conditions
25981  * are met:
25982  * 1. Redistributions of source code must retain the copyright
25983  *    notice, this list of conditions and the following disclaimer.
25984  * 2. Redistributions in binary form must reproduce the above copyright
25985  *    notice, this list of conditions and the following disclaimer in the
25986  *    documentation and/or other materials provided with the distribution.
25987  * 3. All advertising materials mentioning features or use of this software
25988  *    must display the following acknowledgement:
25989  *    "This product includes cryptographic software written by
25990  *     Eric Young (eay@cryptsoft.com)"
25991  *    The word 'cryptographic' can be left out if the rouines from the library
25992  *    being used are not cryptographic related :-).
25993  * 4. If you include any Windows specific code (or a derivative thereof) from
25994  *    the apps directory (application code) you must include an acknowledgement:
25995  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
25996  *
25997  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
25998  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25999  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26000  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26001  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26002  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26003  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26004  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26005  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26006  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26007  * SUCH DAMAGE.
26008  *
26009  * The licence and distribution terms for any publically available version or
26010  * derivative of this code cannot be changed.  i.e. this code cannot simply be
26011  * copied and put under another distribution licence
26012  * [including the GNU Public Licence.]
26013  */
26014 # 66 "/usr/include/openssl/asn1.h" 2 3 4
26015 
26016 # 1 "/usr/include/openssl/stack.h" 1 3 4
26017 /* crypto/stack/stack.h */
26018 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
26019  * All rights reserved.
26020  *
26021  * This package is an SSL implementation written
26022  * by Eric Young (eay@cryptsoft.com).
26023  * The implementation was written so as to conform with Netscapes SSL.
26024  *
26025  * This library is free for commercial and non-commercial use as long as
26026  * the following conditions are aheared to.  The following conditions
26027  * apply to all code found in this distribution, be it the RC4, RSA,
26028  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
26029  * included with this distribution is covered by the same copyright terms
26030  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
26031  *
26032  * Copyright remains Eric Young's, and as such any Copyright notices in
26033  * the code are not to be removed.
26034  * If this package is used in a product, Eric Young should be given attribution
26035  * as the author of the parts of the library used.
26036  * This can be in the form of a textual message at program startup or
26037  * in documentation (online or textual) provided with the package.
26038  *
26039  * Redistribution and use in source and binary forms, with or without
26040  * modification, are permitted provided that the following conditions
26041  * are met:
26042  * 1. Redistributions of source code must retain the copyright
26043  *    notice, this list of conditions and the following disclaimer.
26044  * 2. Redistributions in binary form must reproduce the above copyright
26045  *    notice, this list of conditions and the following disclaimer in the
26046  *    documentation and/or other materials provided with the distribution.
26047  * 3. All advertising materials mentioning features or use of this software
26048  *    must display the following acknowledgement:
26049  *    "This product includes cryptographic software written by
26050  *     Eric Young (eay@cryptsoft.com)"
26051  *    The word 'cryptographic' can be left out if the rouines from the library
26052  *    being used are not cryptographic related :-).
26053  * 4. If you include any Windows specific code (or a derivative thereof) from
26054  *    the apps directory (application code) you must include an acknowledgement:
26055  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
26056  *
26057  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
26058  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26059  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26060  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26061  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26062  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26063  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26064  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26065  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26066  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26067  * SUCH DAMAGE.
26068  *
26069  * The licence and distribution terms for any publically available version or
26070  * derivative of this code cannot be changed.  i.e. this code cannot simply be
26071  * copied and put under another distribution licence
26072  * [including the GNU Public Licence.]
26073  */
26074 # 68 "/usr/include/openssl/asn1.h" 2 3 4
26075 # 1 "/usr/include/openssl/safestack.h" 1 3 4
26076 /* ====================================================================
26077  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
26078  *
26079  * Redistribution and use in source and binary forms, with or without
26080  * modification, are permitted provided that the following conditions
26081  * are met:
26082  *
26083  * 1. Redistributions of source code must retain the above copyright
26084  *    notice, this list of conditions and the following disclaimer.
26085  *
26086  * 2. Redistributions in binary form must reproduce the above copyright
26087  *    notice, this list of conditions and the following disclaimer in
26088  *    the documentation and/or other materials provided with the
26089  *    distribution.
26090  *
26091  * 3. All advertising materials mentioning features or use of this
26092  *    software must display the following acknowledgment:
26093  *    "This product includes software developed by the OpenSSL Project
26094  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26095  *
26096  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26097  *    endorse or promote products derived from this software without
26098  *    prior written permission. For written permission, please contact
26099  *    openssl-core@openssl.org.
26100  *
26101  * 5. Products derived from this software may not be called "OpenSSL"
26102  *    nor may "OpenSSL" appear in their names without prior written
26103  *    permission of the OpenSSL Project.
26104  *
26105  * 6. Redistributions of any form whatsoever must retain the following
26106  *    acknowledgment:
26107  *    "This product includes software developed by the OpenSSL Project
26108  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
26109  *
26110  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26111  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26112  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26113  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26114  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26115  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26116  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26117  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26118  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26119  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26120  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26121  * OF THE POSSIBILITY OF SUCH DAMAGE.
26122  * ====================================================================
26123  *
26124  * This product includes cryptographic software written by Eric Young
26125  * (eay@cryptsoft.com).  This product includes software written by Tim
26126  * Hudson (tjh@cryptsoft.com).
26127  *
26128  */
26129 # 69 "/usr/include/openssl/asn1.h" 2 3 4
26130 
26131 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
26132 /* ====================================================================
26133  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
26134  *
26135  * Redistribution and use in source and binary forms, with or without
26136  * modification, are permitted provided that the following conditions
26137  * are met:
26138  *
26139  * 1. Redistributions of source code must retain the above copyright
26140  *    notice, this list of conditions and the following disclaimer.
26141  *
26142  * 2. Redistributions in binary form must reproduce the above copyright
26143  *    notice, this list of conditions and the following disclaimer in
26144  *    the documentation and/or other materials provided with the
26145  *    distribution.
26146  *
26147  * 3. All advertising materials mentioning features or use of this
26148  *    software must display the following acknowledgment:
26149  *    "This product includes software developed by the OpenSSL Project
26150  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26151  *
26152  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26153  *    endorse or promote products derived from this software without
26154  *    prior written permission. For written permission, please contact
26155  *    openssl-core@openssl.org.
26156  *
26157  * 5. Products derived from this software may not be called "OpenSSL"
26158  *    nor may "OpenSSL" appear in their names without prior written
26159  *    permission of the OpenSSL Project.
26160  *
26161  * 6. Redistributions of any form whatsoever must retain the following
26162  *    acknowledgment:
26163  *    "This product includes software developed by the OpenSSL Project
26164  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
26165  *
26166  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26167  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26168  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26169  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26170  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26171  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26172  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26173  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26174  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26175  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26176  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26177  * OF THE POSSIBILITY OF SUCH DAMAGE.
26178  * ====================================================================
26179  *
26180  * This product includes cryptographic software written by Eric Young
26181  * (eay@cryptsoft.com).  This product includes software written by Tim
26182  * Hudson (tjh@cryptsoft.com).
26183  *
26184  */
26185 # 71 "/usr/include/openssl/asn1.h" 2 3 4
26186 
26187 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
26188 /* ====================================================================
26189  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
26190  *
26191  * Redistribution and use in source and binary forms, with or without
26192  * modification, are permitted provided that the following conditions
26193  * are met:
26194  *
26195  * 1. Redistributions of source code must retain the above copyright
26196  *    notice, this list of conditions and the following disclaimer.
26197  *
26198  * 2. Redistributions in binary form must reproduce the above copyright
26199  *    notice, this list of conditions and the following disclaimer in
26200  *    the documentation and/or other materials provided with the
26201  *    distribution.
26202  *
26203  * 3. All advertising materials mentioning features or use of this
26204  *    software must display the following acknowledgment:
26205  *    "This product includes software developed by the OpenSSL Project
26206  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26207  *
26208  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26209  *    endorse or promote products derived from this software without
26210  *    prior written permission. For written permission, please contact
26211  *    openssl-core@openssl.org.
26212  *
26213  * 5. Products derived from this software may not be called "OpenSSL"
26214  *    nor may "OpenSSL" appear in their names without prior written
26215  *    permission of the OpenSSL Project.
26216  *
26217  * 6. Redistributions of any form whatsoever must retain the following
26218  *    acknowledgment:
26219  *    "This product includes software developed by the OpenSSL Project
26220  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
26221  *
26222  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26223  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26224  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26225  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26226  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26227  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26228  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26229  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26230  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26231  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26232  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26233  * OF THE POSSIBILITY OF SUCH DAMAGE.
26234  * ====================================================================
26235  *
26236  * This product includes cryptographic software written by Eric Young
26237  * (eay@cryptsoft.com).  This product includes software written by Tim
26238  * Hudson (tjh@cryptsoft.com).
26239  *
26240  */
26241 # 73 "/usr/include/openssl/asn1.h" 2 3 4
26242 
26243 # 1 "/usr/include/openssl/bn.h" 1 3 4
26244 /* crypto/bn/bn.h */
26245 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
26246  * All rights reserved.
26247  *
26248  * This package is an SSL implementation written
26249  * by Eric Young (eay@cryptsoft.com).
26250  * The implementation was written so as to conform with Netscapes SSL.
26251  *
26252  * This library is free for commercial and non-commercial use as long as
26253  * the following conditions are aheared to.  The following conditions
26254  * apply to all code found in this distribution, be it the RC4, RSA,
26255  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
26256  * included with this distribution is covered by the same copyright terms
26257  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
26258  *
26259  * Copyright remains Eric Young's, and as such any Copyright notices in
26260  * the code are not to be removed.
26261  * If this package is used in a product, Eric Young should be given attribution
26262  * as the author of the parts of the library used.
26263  * This can be in the form of a textual message at program startup or
26264  * in documentation (online or textual) provided with the package.
26265  *
26266  * Redistribution and use in source and binary forms, with or without
26267  * modification, are permitted provided that the following conditions
26268  * are met:
26269  * 1. Redistributions of source code must retain the copyright
26270  *    notice, this list of conditions and the following disclaimer.
26271  * 2. Redistributions in binary form must reproduce the above copyright
26272  *    notice, this list of conditions and the following disclaimer in the
26273  *    documentation and/or other materials provided with the distribution.
26274  * 3. All advertising materials mentioning features or use of this software
26275  *    must display the following acknowledgement:
26276  *    "This product includes cryptographic software written by
26277  *     Eric Young (eay@cryptsoft.com)"
26278  *    The word 'cryptographic' can be left out if the rouines from the library
26279  *    being used are not cryptographic related :-).
26280  * 4. If you include any Windows specific code (or a derivative thereof) from
26281  *    the apps directory (application code) you must include an acknowledgement:
26282  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
26283  *
26284  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
26285  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26286  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26287  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26288  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26289  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26290  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26291  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26292  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26293  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26294  * SUCH DAMAGE.
26295  *
26296  * The licence and distribution terms for any publically available version or
26297  * derivative of this code cannot be changed.  i.e. this code cannot simply be
26298  * copied and put under another distribution licence
26299  * [including the GNU Public Licence.]
26300  */
26301 /* ====================================================================
26302  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
26303  *
26304  * Redistribution and use in source and binary forms, with or without
26305  * modification, are permitted provided that the following conditions
26306  * are met:
26307  *
26308  * 1. Redistributions of source code must retain the above copyright
26309  *    notice, this list of conditions and the following disclaimer.
26310  *
26311  * 2. Redistributions in binary form must reproduce the above copyright
26312  *    notice, this list of conditions and the following disclaimer in
26313  *    the documentation and/or other materials provided with the
26314  *    distribution.
26315  *
26316  * 3. All advertising materials mentioning features or use of this
26317  *    software must display the following acknowledgment:
26318  *    "This product includes software developed by the OpenSSL Project
26319  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26320  *
26321  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26322  *    endorse or promote products derived from this software without
26323  *    prior written permission. For written permission, please contact
26324  *    openssl-core@openssl.org.
26325  *
26326  * 5. Products derived from this software may not be called "OpenSSL"
26327  *    nor may "OpenSSL" appear in their names without prior written
26328  *    permission of the OpenSSL Project.
26329  *
26330  * 6. Redistributions of any form whatsoever must retain the following
26331  *    acknowledgment:
26332  *    "This product includes software developed by the OpenSSL Project
26333  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
26334  *
26335  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26336  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26337  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26338  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26339  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26340  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26341  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26342  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26343  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26344  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26345  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26346  * OF THE POSSIBILITY OF SUCH DAMAGE.
26347  * ====================================================================
26348  *
26349  * This product includes cryptographic software written by Eric Young
26350  * (eay@cryptsoft.com).  This product includes software written by Tim
26351  * Hudson (tjh@cryptsoft.com).
26352  *
26353  */
26354 /* ====================================================================
26355  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
26356  *
26357  * Portions of the attached software ("Contribution") are developed by
26358  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
26359  *
26360  * The Contribution is licensed pursuant to the Eric Young open source
26361  * license provided above.
26362  *
26363  * The binary polynomial arithmetic software is originally written by
26364  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
26365  *
26366  */
26367 
26368 
26369 
26370 
26371 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1 3 4
26372 /*
26373  * CDDL HEADER START
26374  *
26375  * The contents of this file are subject to the terms of the
26376  * Common Development and Distribution License (the "License").
26377  * You may not use this file except in compliance with the License.
26378  *
26379  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26380  * or http://www.opensolaris.org/os/licensing.
26381  * See the License for the specific language governing permissions
26382  * and limitations under the License.
26383  *
26384  * When distributing Covered Code, include this CDDL HEADER in each
26385  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26386  * If applicable, add the following below this CDDL HEADER, with the
26387  * fields enclosed by brackets "[]" replaced with your own identifying
26388  * information: Portions Copyright [yyyy] [name of copyright owner]
26389  *
26390  * CDDL HEADER END
26391  */
26392 
26393 /*
26394  * Copyright (c) 2013 Gary Mills
26395  *
26396  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
26397  * Use is subject to license terms.
26398  */
26399 
26400 /*	Copyright (c) 1988 AT&T	*/
26401 /*	  All Rights Reserved  	*/
26402 # 129 "/usr/include/openssl/bn.h" 2 3 4
26403 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
26404 /* e_os2.h */
26405 /* ====================================================================
26406  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
26407  *
26408  * Redistribution and use in source and binary forms, with or without
26409  * modification, are permitted provided that the following conditions
26410  * are met:
26411  *
26412  * 1. Redistributions of source code must retain the above copyright
26413  *    notice, this list of conditions and the following disclaimer.
26414  *
26415  * 2. Redistributions in binary form must reproduce the above copyright
26416  *    notice, this list of conditions and the following disclaimer in
26417  *    the documentation and/or other materials provided with the
26418  *    distribution.
26419  *
26420  * 3. All advertising materials mentioning features or use of this
26421  *    software must display the following acknowledgment:
26422  *    "This product includes software developed by the OpenSSL Project
26423  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26424  *
26425  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26426  *    endorse or promote products derived from this software without
26427  *    prior written permission. For written permission, please contact
26428  *    openssl-core@openssl.org.
26429  *
26430  * 5. Products derived from this software may not be called "OpenSSL"
26431  *    nor may "OpenSSL" appear in their names without prior written
26432  *    permission of the OpenSSL Project.
26433  *
26434  * 6. Redistributions of any form whatsoever must retain the following
26435  *    acknowledgment:
26436  *    "This product includes software developed by the OpenSSL Project
26437  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
26438  *
26439  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26440  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26441  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26442  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26443  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26444  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26445  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26446  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26447  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26448  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26449  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26450  * OF THE POSSIBILITY OF SUCH DAMAGE.
26451  * ====================================================================
26452  *
26453  * This product includes cryptographic software written by Eric Young
26454  * (eay@cryptsoft.com).  This product includes software written by Tim
26455  * Hudson (tjh@cryptsoft.com).
26456  *
26457  */
26458 
26459 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
26460 /* opensslconf.h */
26461 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
26462 
26463 
26464 
26465 
26466 /* OpenSSL was configured with the following options: */
26467 # 108 "/usr/include/openssl/opensslconf.h" 3 4
26468 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
26469    asks for it.  This is a transient feature that is provided for those
26470    who haven't had the time to do the appropriate changes in their
26471    applications.  */
26472 # 204 "/usr/include/openssl/opensslconf.h" 3 4
26473 /* crypto/opensslconf.h.in */
26474 
26475 /* Generate 80386 code? */
26476 # 272 "/usr/include/openssl/opensslconf.h" 3 4
26477 /*
26478  * OpenSSL revision 1.521 from 2005-12-15 in OpenSSL_1_0_0-stable branch changed
26479  * 64 bit sparcv9 configuration from SIXTY_FOUR_BIT_LONG to BN_LLONG.
26480  */
26481 
26482 
26483 
26484 
26485 
26486 
26487 /* Should we define BN_DIV2W here? */
26488 
26489 /* Only one for the following should be defined */
26490 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
26491 # 130 "/usr/include/openssl/bn.h" 2 3 4
26492 
26493 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
26494 /*
26495  * CDDL HEADER START
26496  *
26497  * The contents of this file are subject to the terms of the
26498  * Common Development and Distribution License (the "License").
26499  * You may not use this file except in compliance with the License.
26500  *
26501  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26502  * or http://www.opensolaris.org/os/licensing.
26503  * See the License for the specific language governing permissions
26504  * and limitations under the License.
26505  *
26506  * When distributing Covered Code, include this CDDL HEADER in each
26507  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26508  * If applicable, add the following below this CDDL HEADER, with the
26509  * fields enclosed by brackets "[]" replaced with your own identifying
26510  * information: Portions Copyright [yyyy] [name of copyright owner]
26511  *
26512  * CDDL HEADER END
26513  */
26514 
26515 /*
26516  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
26517  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
26518  */
26519 
26520 /*	Copyright (c) 1988 AT&T	*/
26521 /*	  All Rights Reserved  	*/
26522 
26523 /*
26524  * User-visible pieces of the ANSI C standard I/O package.
26525  */
26526 # 132 "/usr/include/openssl/bn.h" 2 3 4
26527 
26528 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
26529 /* ====================================================================
26530  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
26531  *
26532  * Redistribution and use in source and binary forms, with or without
26533  * modification, are permitted provided that the following conditions
26534  * are met:
26535  *
26536  * 1. Redistributions of source code must retain the above copyright
26537  *    notice, this list of conditions and the following disclaimer.
26538  *
26539  * 2. Redistributions in binary form must reproduce the above copyright
26540  *    notice, this list of conditions and the following disclaimer in
26541  *    the documentation and/or other materials provided with the
26542  *    distribution.
26543  *
26544  * 3. All advertising materials mentioning features or use of this
26545  *    software must display the following acknowledgment:
26546  *    "This product includes software developed by the OpenSSL Project
26547  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26548  *
26549  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26550  *    endorse or promote products derived from this software without
26551  *    prior written permission. For written permission, please contact
26552  *    openssl-core@openssl.org.
26553  *
26554  * 5. Products derived from this software may not be called "OpenSSL"
26555  *    nor may "OpenSSL" appear in their names without prior written
26556  *    permission of the OpenSSL Project.
26557  *
26558  * 6. Redistributions of any form whatsoever must retain the following
26559  *    acknowledgment:
26560  *    "This product includes software developed by the OpenSSL Project
26561  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
26562  *
26563  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26564  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26565  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26566  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26567  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26568  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26569  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26570  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26571  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26572  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26573  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26574  * OF THE POSSIBILITY OF SUCH DAMAGE.
26575  * ====================================================================
26576  *
26577  * This product includes cryptographic software written by Eric Young
26578  * (eay@cryptsoft.com).  This product includes software written by Tim
26579  * Hudson (tjh@cryptsoft.com).
26580  *
26581  */
26582 # 134 "/usr/include/openssl/bn.h" 2 3 4
26583 # 1 "/usr/include/openssl/crypto.h" 1 3 4
26584 /* crypto/crypto.h */
26585 /* ====================================================================
26586  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
26587  *
26588  * Redistribution and use in source and binary forms, with or without
26589  * modification, are permitted provided that the following conditions
26590  * are met:
26591  *
26592  * 1. Redistributions of source code must retain the above copyright
26593  *    notice, this list of conditions and the following disclaimer.
26594  *
26595  * 2. Redistributions in binary form must reproduce the above copyright
26596  *    notice, this list of conditions and the following disclaimer in
26597  *    the documentation and/or other materials provided with the
26598  *    distribution.
26599  *
26600  * 3. All advertising materials mentioning features or use of this
26601  *    software must display the following acknowledgment:
26602  *    "This product includes software developed by the OpenSSL Project
26603  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26604  *
26605  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26606  *    endorse or promote products derived from this software without
26607  *    prior written permission. For written permission, please contact
26608  *    openssl-core@openssl.org.
26609  *
26610  * 5. Products derived from this software may not be called "OpenSSL"
26611  *    nor may "OpenSSL" appear in their names without prior written
26612  *    permission of the OpenSSL Project.
26613  *
26614  * 6. Redistributions of any form whatsoever must retain the following
26615  *    acknowledgment:
26616  *    "This product includes software developed by the OpenSSL Project
26617  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
26618  *
26619  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
26620  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26621  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26622  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
26623  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26624  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26625  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26626  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26627  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26628  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26629  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26630  * OF THE POSSIBILITY OF SUCH DAMAGE.
26631  * ====================================================================
26632  *
26633  * This product includes cryptographic software written by Eric Young
26634  * (eay@cryptsoft.com).  This product includes software written by Tim
26635  * Hudson (tjh@cryptsoft.com).
26636  *
26637  */
26638 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
26639  * All rights reserved.
26640  *
26641  * This package is an SSL implementation written
26642  * by Eric Young (eay@cryptsoft.com).
26643  * The implementation was written so as to conform with Netscapes SSL.
26644  *
26645  * This library is free for commercial and non-commercial use as long as
26646  * the following conditions are aheared to.  The following conditions
26647  * apply to all code found in this distribution, be it the RC4, RSA,
26648  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
26649  * included with this distribution is covered by the same copyright terms
26650  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
26651  *
26652  * Copyright remains Eric Young's, and as such any Copyright notices in
26653  * the code are not to be removed.
26654  * If this package is used in a product, Eric Young should be given attribution
26655  * as the author of the parts of the library used.
26656  * This can be in the form of a textual message at program startup or
26657  * in documentation (online or textual) provided with the package.
26658  *
26659  * Redistribution and use in source and binary forms, with or without
26660  * modification, are permitted provided that the following conditions
26661  * are met:
26662  * 1. Redistributions of source code must retain the copyright
26663  *    notice, this list of conditions and the following disclaimer.
26664  * 2. Redistributions in binary form must reproduce the above copyright
26665  *    notice, this list of conditions and the following disclaimer in the
26666  *    documentation and/or other materials provided with the distribution.
26667  * 3. All advertising materials mentioning features or use of this software
26668  *    must display the following acknowledgement:
26669  *    "This product includes cryptographic software written by
26670  *     Eric Young (eay@cryptsoft.com)"
26671  *    The word 'cryptographic' can be left out if the rouines from the library
26672  *    being used are not cryptographic related :-).
26673  * 4. If you include any Windows specific code (or a derivative thereof) from
26674  *    the apps directory (application code) you must include an acknowledgement:
26675  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
26676  *
26677  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
26678  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26679  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26680  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26681  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26682  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26683  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26684  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26685  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26686  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26687  * SUCH DAMAGE.
26688  *
26689  * The licence and distribution terms for any publically available version or
26690  * derivative of this code cannot be changed.  i.e. this code cannot simply be
26691  * copied and put under another distribution licence
26692  * [including the GNU Public Licence.]
26693  */
26694 /* ====================================================================
26695  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
26696  * ECDH support in OpenSSL originally developed by
26697  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
26698  */
26699 # 135 "/usr/include/openssl/bn.h" 2 3 4
26700 
26701 
26702 
26703 
26704 
26705 /*
26706  * These preprocessor symbols control various aspects of the bignum headers
26707  * and library code. They're not defined by any "normal" configuration, as
26708  * they are intended for development and testing purposes. NB: defining all
26709  * three can be useful for debugging application code as well as openssl
26710  * itself. BN_DEBUG - turn on various debugging alterations to the bignum
26711  * code BN_DEBUG_RAND - uses random poisoning of unused words to trip up
26712  * mismanagement of bignum internals. You must also define BN_DEBUG.
26713  */
26714 /* #define BN_DEBUG */
26715 /* #define BN_DEBUG_RAND */
26716 
26717 
26718 
26719 
26720 
26721 
26722 
26723 /*
26724  * This next option uses the C libraries (2 word)/(1 word) function. If it is
26725  * not defined, I use my C version (which is slower). The reason for this
26726  * flag is that when the particular C compiler library routine is used, and
26727  * the library is linked with a different compiler, the library is missing.
26728  * This mostly happens when the library is built with gcc and then linked
26729  * using normal cc.  This would be a common occurrence because gcc normally
26730  * produces code that is 2 times faster than system compilers for the big
26731  * number stuff. For machines with only one compiler (or shared libraries),
26732  * this should be on.  Again this in only really a problem on machines using
26733  * "long long's", are 32bit, and are not using my assembler code.
26734  */
26735 
26736 
26737 
26738 
26739 
26740 
26741 
26742 /*
26743  * assuming long is 64bit - this is the DEC Alpha unsigned long long is only
26744  * 64 bits :-(, don't define BN_LLONG for the DEC Alpha
26745  */
26746 # 203 "/usr/include/openssl/bn.h" 3 4
26747 /*
26748  * This is where the long long data type is 64 bits, but long is 32. For
26749  * machines where there are 64bit registers, this is the mode to use. IRIX,
26750  * on R4000 and above should use this mode, along with the relevant assembler
26751  * code :-).  Do NOT define BN_LLONG.
26752  */
26753 # 265 "/usr/include/openssl/bn.h" 3 4
26754 /*
26755  * avoid leaking exponent information through timing,
26756  * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
26757  * BN_div() will call BN_div_no_branch,
26758  * BN_mod_inverse() will call BN_mod_inverse_no_branch.
26759  */
26760 # 284 "/usr/include/openssl/bn.h" 3 4
26761                                        /* used for debuging */
26762 
26763 
26764 
26765 
26766 /*
26767  * get a clone of a BIGNUM with changed flags, for *temporary* use only (the
26768  * two BIGNUMs cannot not be used in parallel!)
26769  */
26770 # 302 "/usr/include/openssl/bn.h" 3 4
26771 /* Already declared in ossl_typ.h */
26772 # 313 "/usr/include/openssl/bn.h" 3 4
26773 struct bignum_st {
26774     unsigned int *d; /* Pointer to an array of 'BN_BITS2' bit
26775                                  * chunks. */
26776     int top; /* Index of last used d +1. */
26777     /* The next are internal book keeping for bn_expand. */
26778     int dmax; /* Size of the d array. */
26779     int neg; /* one if the number is negative */
26780     int flags;
26781 };
26782 
26783 /* Used for montgomery multiplication */
26784 struct bn_mont_ctx_st {
26785     int ri; /* number of bits in R */
26786     BIGNUM RR; /* used to convert to montgomery form */
26787     BIGNUM N; /* The modulus */
26788     BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 (Ni is only
26789                                  * stored for bignum algorithm) */
26790     unsigned int n0[2]; /* least significant word(s) of Ni; (type
26791                                  * changed with 0.9.9, was "BN_ULONG n0;"
26792                                  * before) */
26793     int flags;
26794 };
26795 
26796 /*
26797  * Used for reciprocal division/mod functions It cannot be shared between
26798  * threads
26799  */
26800 struct bn_recp_ctx_st {
26801     BIGNUM N; /* the divisor */
26802     BIGNUM Nr; /* the reciprocal */
26803     int num_bits;
26804     int shift;
26805     int flags;
26806 };
26807 
26808 /* Used for slow "generation" functions. */
26809 struct bn_gencb_st {
26810     unsigned int ver; /* To handle binary (in)compatibility */
26811     void *arg; /* callback-specific data */
26812     union {
26813         /* if(ver==1) - handles old style callbacks */
26814         void (*cb_1) (int, int, void *);
26815         /* if(ver==2) - new callback style */
26816         int (*cb_2) (int, int, BN_GENCB *);
26817     } cb;
26818 };
26819 /* Wrapper function to make using BN_GENCB easier,  */
26820 int BN_GENCB_call(BN_GENCB *cb, int a, int b);
26821 /* Macro to populate a BN_GENCB structure with an "old"-style callback */
26822 
26823 
26824 
26825 
26826 
26827 /* Macro to populate a BN_GENCB structure with a "new"-style callback */
26828 # 377 "/usr/include/openssl/bn.h" 3 4
26829 /*
26830  * BN_prime_checks_for_size() returns the number of Miller-Rabin iterations
26831  * that will be done for checking that a random number is probably prime. The
26832  * error rate for accepting a composite number as prime depends on the size of
26833  * the prime |b|. The error rates used are for calculating an RSA key with 2 primes,
26834  * and so the level is what you would expect for a key of double the size of the
26835  * prime.
26836  *
26837  * This table is generated using the algorithm of FIPS PUB 186-4
26838  * Digital Signature Standard (DSS), section F.1, page 117.
26839  * (https://dx.doi.org/10.6028/NIST.FIPS.186-4)
26840  *
26841  * The following magma script was used to generate the output:
26842  * securitybits:=125;
26843  * k:=1024;
26844  * for t:=1 to 65 do
26845  *   for M:=3 to Floor(2*Sqrt(k-1)-1) do
26846  *     S:=0;
26847  *     // Sum over m
26848  *     for m:=3 to M do
26849  *       s:=0;
26850  *       // Sum over j
26851  *       for j:=2 to m do
26852  *         s+:=(RealField(32)!2)^-(j+(k-1)/j);
26853  *       end for;
26854  *       S+:=2^(m-(m-1)*t)*s;
26855  *     end for;
26856  *     A:=2^(k-2-M*t);
26857  *     B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S;
26858  *     pkt:=2.00743*Log(2)*k*2^-k*(A+B);
26859  *     seclevel:=Floor(-Log(2,pkt));
26860  *     if seclevel ge securitybits then
26861  *       printf "k: %5o, security: %o bits  (t: %o, M: %o)\n",k,seclevel,t,M;
26862  *       break;
26863  *     end if;
26864  *   end for;
26865  *   if seclevel ge securitybits then break; end if;
26866  * end for;
26867  *
26868  * It can be run online at:
26869  * http://magma.maths.usyd.edu.au/calc
26870  *
26871  * And will output:
26872  * k:  1024, security: 129 bits  (t: 6, M: 23)
26873  *
26874  * k is the number of bits of the prime, securitybits is the level we want to
26875  * reach.
26876  *
26877  * prime length | RSA key size | # MR tests | security level
26878  * -------------+--------------|------------+---------------
26879  *  (b) >= 6394 |     >= 12788 |          3 |        256 bit
26880  *  (b) >= 3747 |     >=  7494 |          3 |        192 bit
26881  *  (b) >= 1345 |     >=  2690 |          4 |        128 bit
26882  *  (b) >= 1080 |     >=  2160 |          5 |        128 bit
26883  *  (b) >=  852 |     >=  1704 |          5 |        112 bit
26884  *  (b) >=  476 |     >=   952 |          5 |         80 bit
26885  *  (b) >=  400 |     >=   800 |          6 |         80 bit
26886  *  (b) >=  347 |     >=   694 |          7 |         80 bit
26887  *  (b) >=  308 |     >=   616 |          8 |         80 bit
26888  *  (b) >=   55 |     >=   110 |         27 |         64 bit
26889  *  (b) >=    6 |     >=    12 |         34 |         64 bit
26890  */
26891 # 451 "/usr/include/openssl/bn.h" 3 4
26892 /* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
26893 # 472 "/usr/include/openssl/bn.h" 3 4
26894 const BIGNUM *BN_value_one(void);
26895 char *BN_options(void);
26896 BN_CTX *BN_CTX_new(void);
26897 
26898 void BN_CTX_init(BN_CTX *c);
26899 
26900 void BN_CTX_free(BN_CTX *c);
26901 void BN_CTX_start(BN_CTX *ctx);
26902 BIGNUM *BN_CTX_get(BN_CTX *ctx);
26903 void BN_CTX_end(BN_CTX *ctx);
26904 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
26905 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
26906 int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
26907 int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
26908 int BN_num_bits(const BIGNUM *a);
26909 int BN_num_bits_word(unsigned int);
26910 BIGNUM *BN_new(void);
26911 void BN_init(BIGNUM *);
26912 void BN_clear_free(BIGNUM *a);
26913 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
26914 void BN_swap(BIGNUM *a, BIGNUM *b);
26915 BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
26916 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
26917 BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
26918 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
26919 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
26920 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
26921 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
26922 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
26923 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
26924 int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
26925 /** BN_set_negative sets sign of a BIGNUM
26926  * \param  b  pointer to the BIGNUM object
26927  * \param  n  0 if the BIGNUM b should be positive and a value != 0 otherwise
26928  */
26929 void BN_set_negative(BIGNUM *b, int n);
26930 /** BN_is_negative returns 1 if the BIGNUM is negative
26931  * \param  a  pointer to the BIGNUM object
26932  * \return 1 if a < 0 and 0 otherwise
26933  */
26934 
26935 
26936 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
26937            BN_CTX *ctx);
26938 
26939 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
26940 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
26941                BN_CTX *ctx);
26942 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
26943                      const BIGNUM *m);
26944 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
26945                BN_CTX *ctx);
26946 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
26947                      const BIGNUM *m);
26948 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
26949                BN_CTX *ctx);
26950 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
26951 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
26952 int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
26953 int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
26954                   BN_CTX *ctx);
26955 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
26956 
26957 unsigned int BN_mod_word(const BIGNUM *a, unsigned int w);
26958 unsigned int BN_div_word(BIGNUM *a, unsigned int w);
26959 int BN_mul_word(BIGNUM *a, unsigned int w);
26960 int BN_add_word(BIGNUM *a, unsigned int w);
26961 int BN_sub_word(BIGNUM *a, unsigned int w);
26962 int BN_set_word(BIGNUM *a, unsigned int w);
26963 unsigned int BN_get_word(const BIGNUM *a);
26964 
26965 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
26966 void BN_free(BIGNUM *a);
26967 int BN_is_bit_set(const BIGNUM *a, int n);
26968 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
26969 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
26970 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
26971 
26972 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
26973                const BIGNUM *m, BN_CTX *ctx);
26974 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
26975                     const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
26976 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
26977                               const BIGNUM *m, BN_CTX *ctx,
26978                               BN_MONT_CTX *in_mont);
26979 int BN_mod_exp_mont_word(BIGNUM *r, unsigned int a, const BIGNUM *p,
26980                          const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
26981 int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
26982                      const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
26983                      BN_CTX *ctx, BN_MONT_CTX *m_ctx);
26984 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
26985                       const BIGNUM *m, BN_CTX *ctx);
26986 
26987 int BN_mask_bits(BIGNUM *a, int n);
26988 
26989 int BN_print_fp(FILE *fp, const BIGNUM *a);
26990 
26991 
26992 int BN_print(BIO *fp, const BIGNUM *a);
26993 
26994 
26995 
26996 int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
26997 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
26998 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
26999 void BN_clear(BIGNUM *a);
27000 BIGNUM *BN_dup(const BIGNUM *a);
27001 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
27002 int BN_set_bit(BIGNUM *a, int n);
27003 int BN_clear_bit(BIGNUM *a, int n);
27004 char *BN_bn2hex(const BIGNUM *a);
27005 char *BN_bn2dec(const BIGNUM *a);
27006 int BN_hex2bn(BIGNUM **a, const char *str);
27007 int BN_dec2bn(BIGNUM **a, const char *str);
27008 int BN_asc2bn(BIGNUM **a, const char *str);
27009 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
27010 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
27011                                                                   * -2 for
27012                                                                   * error */
27013 BIGNUM *BN_mod_inverse(BIGNUM *ret,
27014                        const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
27015 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
27016                     const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
27017 
27018 void BN_consttime_swap(unsigned int swap, BIGNUM *a, BIGNUM *b, int nwords);
27019 
27020 /* Deprecated versions */
27021 
27022 BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
27023                           const BIGNUM *add, const BIGNUM *rem,
27024                           void (*callback) (int, int, void *), void *cb_arg);
27025 int BN_is_prime(const BIGNUM *p, int nchecks,
27026                 void (*callback) (int, int, void *),
27027                 BN_CTX *ctx, void *cb_arg);
27028 int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
27029                          void (*callback) (int, int, void *), BN_CTX *ctx,
27030                          void *cb_arg, int do_trial_division);
27031 
27032 
27033 /* Newer versions */
27034 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
27035                          const BIGNUM *rem, BN_GENCB *cb);
27036 int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
27037 int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
27038                             int do_trial_division, BN_GENCB *cb);
27039 
27040 int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
27041 
27042 int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
27043                             const BIGNUM *Xp, const BIGNUM *Xp1,
27044                             const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
27045                             BN_GENCB *cb);
27046 int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
27047                               BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
27048                               BN_CTX *ctx, BN_GENCB *cb);
27049 
27050 BN_MONT_CTX *BN_MONT_CTX_new(void);
27051 void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
27052 int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
27053                           BN_MONT_CTX *mont, BN_CTX *ctx);
27054 
27055 
27056 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a,
27057                        BN_MONT_CTX *mont, BN_CTX *ctx);
27058 void BN_MONT_CTX_free(BN_MONT_CTX *mont);
27059 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
27060 BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
27061 BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
27062                                     const BIGNUM *mod, BN_CTX *ctx);
27063 
27064 /* BN_BLINDING flags */
27065 
27066 
27067 
27068 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
27069 void BN_BLINDING_free(BN_BLINDING *b);
27070 int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
27071 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
27072 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
27073 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
27074 int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
27075                           BN_CTX *);
27076 
27077 unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);
27078 void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);
27079 
27080 CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);
27081 unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
27082 void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
27083 BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
27084                                       const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
27085                                       int (*bn_mod_exp) (BIGNUM *r,
27086                                                          const BIGNUM *a,
27087                                                          const BIGNUM *p,
27088                                                          const BIGNUM *m,
27089                                                          BN_CTX *ctx,
27090                                                          BN_MONT_CTX *m_ctx),
27091                                       BN_MONT_CTX *m_ctx);
27092 
27093 
27094 void BN_set_params(int mul, int high, int low, int mont);
27095 int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
27096 
27097 
27098 void BN_RECP_CTX_init(BN_RECP_CTX *recp);
27099 BN_RECP_CTX *BN_RECP_CTX_new(void);
27100 void BN_RECP_CTX_free(BN_RECP_CTX *recp);
27101 int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
27102 int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
27103                           BN_RECP_CTX *recp, BN_CTX *ctx);
27104 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
27105                     const BIGNUM *m, BN_CTX *ctx);
27106 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
27107                 BN_RECP_CTX *recp, BN_CTX *ctx);
27108 
27109 
27110 
27111 /*
27112  * Functions for arithmetic over binary polynomials represented by BIGNUMs.
27113  * The BIGNUM::neg property of BIGNUMs representing binary polynomials is
27114  * ignored. Note that input arguments are not const so that their bit arrays
27115  * can be expanded to the appropriate size if needed.
27116  */
27117 
27118 /*
27119  * r = a + b
27120  */
27121 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
27122 
27123 /*
27124  * r=a mod p
27125  */
27126 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
27127 /* r = (a * b) mod p */
27128 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
27129                     const BIGNUM *p, BN_CTX *ctx);
27130 /* r = (a * a) mod p */
27131 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
27132 /* r = (1 / b) mod p */
27133 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
27134 /* r = (a / b) mod p */
27135 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
27136                     const BIGNUM *p, BN_CTX *ctx);
27137 /* r = (a ^ b) mod p */
27138 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
27139                     const BIGNUM *p, BN_CTX *ctx);
27140 /* r = sqrt(a) mod p */
27141 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
27142                      BN_CTX *ctx);
27143 /* r^2 + r = a mod p */
27144 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
27145                            BN_CTX *ctx);
27146 
27147 /*-
27148  * Some functions allow for representation of the irreducible polynomials
27149  * as an unsigned int[], say p.  The irreducible f(t) is then of the form:
27150  *     t^p[0] + t^p[1] + ... + t^p[k]
27151  * where m = p[0] > p[1] > ... > p[k] = 0.
27152  */
27153 /* r = a mod p */
27154 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
27155 /* r = (a * b) mod p */
27156 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
27157                         const int p[], BN_CTX *ctx);
27158 /* r = (a * a) mod p */
27159 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
27160                         BN_CTX *ctx);
27161 /* r = (1 / b) mod p */
27162 int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
27163                         BN_CTX *ctx);
27164 /* r = (a / b) mod p */
27165 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
27166                         const int p[], BN_CTX *ctx);
27167 /* r = (a ^ b) mod p */
27168 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
27169                         const int p[], BN_CTX *ctx);
27170 /* r = sqrt(a) mod p */
27171 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
27172                          const int p[], BN_CTX *ctx);
27173 /* r^2 + r = a mod p */
27174 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
27175                                const int p[], BN_CTX *ctx);
27176 int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
27177 int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
27178 
27179 
27180 
27181 /*
27182  * faster mod functions for the 'NIST primes' 0 <= a < p^2
27183  */
27184 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
27185 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
27186 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
27187 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
27188 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
27189 
27190 const BIGNUM *BN_get0_nist_prime_192(void);
27191 const BIGNUM *BN_get0_nist_prime_224(void);
27192 const BIGNUM *BN_get0_nist_prime_256(void);
27193 const BIGNUM *BN_get0_nist_prime_384(void);
27194 const BIGNUM *BN_get0_nist_prime_521(void);
27195 
27196 /* library internal functions */
27197 # 788 "/usr/include/openssl/bn.h" 3 4
27198 BIGNUM *bn_expand2(BIGNUM *a, int words);
27199 
27200 BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
27201 
27202 
27203 /*-
27204  * Bignum consistency macros
27205  * There is one "API" macro, bn_fix_top(), for stripping leading zeroes from
27206  * bignum data after direct manipulations on the data. There is also an
27207  * "internal" macro, bn_check_top(), for verifying that there are no leading
27208  * zeroes. Unfortunately, some auditing is required due to the fact that
27209  * bn_fix_top() has become an overabused duct-tape because bignum data is
27210  * occasionally passed around in an inconsistent state. So the following
27211  * changes have been made to sort this out;
27212  * - bn_fix_top()s implementation has been moved to bn_correct_top()
27213  * - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and
27214  *   bn_check_top() is as before.
27215  * - if BN_DEBUG *is* defined;
27216  *   - bn_check_top() tries to pollute unused words even if the bignum 'top' is
27217  *     consistent. (ed: only if BN_DEBUG_RAND is defined)
27218  *   - bn_fix_top() maps to bn_check_top() rather than "fixing" anything.
27219  * The idea is to have debug builds flag up inconsistent bignums when they
27220  * occur. If that occurs in a bn_fix_top(), we examine the code in question; if
27221  * the use of bn_fix_top() was appropriate (ie. it follows directly after code
27222  * that manipulates the bignum) it is converted to bn_correct_top(), and if it
27223  * was not appropriate, we convert it permanently to bn_check_top() and track
27224  * down the cause of the bug. Eventually, no internal code should be using the
27225  * bn_fix_top() macro. External applications and libraries should try this with
27226  * their own code too, both in terms of building against the openssl headers
27227  * with BN_DEBUG defined *and* linking with a version of OpenSSL built with it
27228  * defined. This not only improves external code, it provides more test
27229  * coverage for openssl's own code.
27230  */
27231 # 914 "/usr/include/openssl/bn.h" 3 4
27232 unsigned int bn_mul_add_words(unsigned int *rp, const unsigned int *ap, int num,
27233                           unsigned int w);
27234 unsigned int bn_mul_words(unsigned int *rp, const unsigned int *ap, int num, unsigned int w);
27235 void bn_sqr_words(unsigned int *rp, const unsigned int *ap, int num);
27236 unsigned int bn_div_words(unsigned int h, unsigned int l, unsigned int d);
27237 unsigned int bn_add_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
27238                       int num);
27239 unsigned int bn_sub_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
27240                       int num);
27241 
27242 /* Primes from RFC 2409 */
27243 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
27244 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
27245 
27246 /* Primes from RFC 3526 */
27247 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
27248 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
27249 BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
27250 BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
27251 BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
27252 BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
27253 
27254 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
27255 
27256 /* BEGIN ERROR CODES */
27257 /*
27258  * The following lines are auto generated by the script mkerr.pl. Any changes
27259  * made after this point may be overwritten when the script is next run.
27260  */
27261 void ERR_load_BN_strings(void);
27262 
27263 /* Error codes for the BN functions. */
27264 
27265 /* Function codes. */
27266 # 991 "/usr/include/openssl/bn.h" 3 4
27267 /* Reason codes. */
27268 # 75 "/usr/include/openssl/asn1.h" 2 3 4
27269 # 132 "/usr/include/openssl/asn1.h" 3 4
27270 /* For use with d2i_ASN1_type_bytes() */
27271 # 152 "/usr/include/openssl/asn1.h" 3 4
27272 /* For use with ASN1_mbstring_copy() */
27273 # 161 "/usr/include/openssl/asn1.h" 3 4
27274     struct X509_algor_st;
27275 struct stack_st_X509_ALGOR { _STACK stack; };
27276 
27277 
27278 
27279 
27280 /*
27281  * We MUST make sure that, except for constness, asn1_ctx_st and
27282  * asn1_const_ctx are exactly the same.  Fortunately, as soon as the old ASN1
27283  * parsing macros are gone, we can throw this away as well...
27284  */
27285 typedef struct asn1_ctx_st {
27286     unsigned char *p; /* work char pointer */
27287     int eos; /* end of sequence read for indefinite
27288                                  * encoding */
27289     int error; /* error code to use when returning an error */
27290     int inf; /* constructed if 0x20, indefinite is 0x21 */
27291     int tag; /* tag from last 'get object' */
27292     int xclass; /* class from last 'get object' */
27293     long slen; /* length of last 'get object' */
27294     unsigned char *max; /* largest value of p allowed */
27295     unsigned char *q; /* temporary variable */
27296     unsigned char **pp; /* variable */
27297     int line; /* used in error processing */
27298 } ASN1_CTX;
27299 
27300 typedef struct asn1_const_ctx_st {
27301     const unsigned char *p; /* work char pointer */
27302     int eos; /* end of sequence read for indefinite
27303                                  * encoding */
27304     int error; /* error code to use when returning an error */
27305     int inf; /* constructed if 0x20, indefinite is 0x21 */
27306     int tag; /* tag from last 'get object' */
27307     int xclass; /* class from last 'get object' */
27308     long slen; /* length of last 'get object' */
27309     const unsigned char *max; /* largest value of p allowed */
27310     const unsigned char *q; /* temporary variable */
27311     const unsigned char **pp; /* variable */
27312     int line; /* used in error processing */
27313 } ASN1_const_CTX;
27314 
27315 /*
27316  * These are used internally in the ASN1_OBJECT to keep track of whether the
27317  * names and data need to be free()ed
27318  */
27319 
27320 
27321 
27322 
27323 struct asn1_object_st {
27324     const char *sn, *ln;
27325     int nid;
27326     int length;
27327     const unsigned char *data; /* data remains const after init */
27328     int flags; /* Should we free this one */
27329 };
27330 
27331 
27332 /*
27333  * This indicates that the ASN1_STRING is not a real value but just a place
27334  * holder for the location where indefinite length constructed data should be
27335  * inserted in the memory buffer
27336  */
27337 
27338 
27339 /*
27340  * This flag is used by the CMS code to indicate that a string is not
27341  * complete and is a place holder for content when it had all been accessed.
27342  * The flag will be reset when content has been written to it.
27343  */
27344 
27345 
27346 /*
27347  * This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
27348  * type.
27349  */
27350 
27351 /* This is the base type that holds just about everything :-) */
27352 struct asn1_string_st {
27353     int length;
27354     int type;
27355     unsigned char *data;
27356     /*
27357      * The value of the following field depends on the type being held.  It
27358      * is mostly being used for BIT_STRING so if the input data has a
27359      * non-zero 'unused bits' value, it will be handled correctly
27360      */
27361     long flags;
27362 };
27363 
27364 /*
27365  * ASN1_ENCODING structure: this is used to save the received encoding of an
27366  * ASN1 type. This is useful to get round problems with invalid encodings
27367  * which can break signatures.
27368  */
27369 
27370 typedef struct ASN1_ENCODING_st {
27371     unsigned char *enc; /* DER encoding */
27372     long len; /* Length of encoding */
27373     int modified; /* set to 1 if 'enc' is invalid */
27374 } ASN1_ENCODING;
27375 
27376 /* Used with ASN1 LONG type: if a long is set to this it is omitted */
27377 # 272 "/usr/include/openssl/asn1.h" 3 4
27378 typedef struct asn1_string_table_st {
27379     int nid;
27380     long minsize;
27381     long maxsize;
27382     unsigned long mask;
27383     unsigned long flags;
27384 } ASN1_STRING_TABLE;
27385 
27386 struct stack_st_ASN1_STRING_TABLE { _STACK stack; };
27387 
27388 /* size limits: this stuff is taken straight from RFC2459 */
27389 # 293 "/usr/include/openssl/asn1.h" 3 4
27390 /*
27391  * Declarations for template structures: for full definitions see asn1t.h
27392  */
27393 typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
27394 typedef struct ASN1_TLC_st ASN1_TLC;
27395 /* This is just an opaque pointer */
27396 typedef struct ASN1_VALUE_st ASN1_VALUE;
27397 
27398 /* Declare ASN1 functions: the implement macro in in asn1t.h */
27399 # 363 "/usr/include/openssl/asn1.h" 3 4
27400 typedef void *d2i_of_void(void **,const unsigned char **,long); typedef int i2d_of_void(void *,unsigned char **);
27401 
27402 /*-
27403  * The following macros and typedefs allow an ASN1_ITEM
27404  * to be embedded in a structure and referenced. Since
27405  * the ASN1_ITEM pointers need to be globally accessible
27406  * (possibly from shared libraries) they may exist in
27407  * different forms. On platforms that support it the
27408  * ASN1_ITEM structure itself will be globally exported.
27409  * Other platforms will export a function that returns
27410  * an ASN1_ITEM pointer.
27411  *
27412  * To handle both cases transparently the macros below
27413  * should be used instead of hard coding an ASN1_ITEM
27414  * pointer in a structure.
27415  *
27416  * The structure will look like this:
27417  *
27418  * typedef struct SOMETHING_st {
27419  *      ...
27420  *      ASN1_ITEM_EXP *iptr;
27421  *      ...
27422  * } SOMETHING;
27423  *
27424  * It would be initialised as e.g.:
27425  *
27426  * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
27427  *
27428  * and the actual pointer extracted with:
27429  *
27430  * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
27431  *
27432  * Finally an ASN1_ITEM pointer can be extracted from an
27433  * appropriate reference with: ASN1_ITEM_rptr(X509). This
27434  * would be used when a function takes an ASN1_ITEM * argument.
27435  *
27436  */
27437 
27438 
27439 
27440 /* ASN1_ITEM pointer exported type */
27441 typedef const ASN1_ITEM ASN1_ITEM_EXP;
27442 
27443 /* Macro to obtain ASN1_ITEM pointer from exported type */
27444 
27445 
27446 /* Macro to include ASN1_ITEM pointer from base type */
27447 # 440 "/usr/include/openssl/asn1.h" 3 4
27448 /* Parameters used by ASN1_STRING_print_ex() */
27449 
27450 /*
27451  * These determine which characters to escape: RFC2253 special characters,
27452  * control characters and MSB set characters
27453  */
27454 
27455 
27456 
27457 
27458 
27459 /*
27460  * This flag determines how we do escaping: normally RC2253 backslash only,
27461  * set this to use backslash and quote.
27462  */
27463 
27464 
27465 
27466 /* These three flags are internal use only. */
27467 
27468 /* Character is a valid PrintableString character */
27469 
27470 /* Character needs escaping if it is the first character */
27471 
27472 /* Character needs escaping if it is the last character */
27473 
27474 
27475 /*
27476  * NB the internal flags are safely reused below by flags handled at the top
27477  * level.
27478  */
27479 
27480 /*
27481  * If this is set we convert all character strings to UTF8 first
27482  */
27483 
27484 
27485 
27486 /*
27487  * If this is set we don't attempt to interpret content: just assume all
27488  * strings are 1 byte per character. This will produce some pretty odd
27489  * looking output!
27490  */
27491 
27492 
27493 
27494 /* If this is set we include the string type in the output */
27495 
27496 
27497 /*
27498  * This determines which strings to display and which to 'dump' (hex dump of
27499  * content octets or DER encoding). We can only dump non character strings or
27500  * everything. If we don't dump 'unknown' they are interpreted as character
27501  * strings with 1 octet per character and are subject to the usual escaping
27502  * options.
27503  */
27504 
27505 
27506 
27507 
27508 /*
27509  * These determine what 'dumping' does, we can dump the content octets or the
27510  * DER encoding: both use the RFC2253 #XXXXX notation.
27511  */
27512 
27513 
27514 
27515 /*
27516  * All the string flags consistent with RFC2253, escaping control characters
27517  * isn't essential in RFC2253 but it is advisable anyway.
27518  */
27519 # 519 "/usr/include/openssl/asn1.h" 3 4
27520 struct stack_st_ASN1_INTEGER { _STACK stack; };
27521 
27522 
27523 struct stack_st_ASN1_GENERALSTRING { _STACK stack; };
27524 
27525 typedef struct asn1_type_st {
27526     int type;
27527     union {
27528         char *ptr;
27529         ASN1_BOOLEAN boolean;
27530         ASN1_STRING *asn1_string;
27531         ASN1_OBJECT *object;
27532         ASN1_INTEGER *integer;
27533         ASN1_ENUMERATED *enumerated;
27534         ASN1_BIT_STRING *bit_string;
27535         ASN1_OCTET_STRING *octet_string;
27536         ASN1_PRINTABLESTRING *printablestring;
27537         ASN1_T61STRING *t61string;
27538         ASN1_IA5STRING *ia5string;
27539         ASN1_GENERALSTRING *generalstring;
27540         ASN1_BMPSTRING *bmpstring;
27541         ASN1_UNIVERSALSTRING *universalstring;
27542         ASN1_UTCTIME *utctime;
27543         ASN1_GENERALIZEDTIME *generalizedtime;
27544         ASN1_VISIBLESTRING *visiblestring;
27545         ASN1_UTF8STRING *utf8string;
27546         /*
27547          * set and sequence are left complete and still contain the set or
27548          * sequence bytes
27549          */
27550         ASN1_STRING *set;
27551         ASN1_STRING *sequence;
27552         ASN1_VALUE *asn1_value;
27553     } value;
27554 } ASN1_TYPE;
27555 
27556 struct stack_st_ASN1_TYPE { _STACK stack; };
27557 
27558 
27559 typedef struct stack_st_ASN1_TYPE ASN1_SEQUENCE_ANY;
27560 
27561 ASN1_SEQUENCE_ANY *d2i_ASN1_SEQUENCE_ANY(ASN1_SEQUENCE_ANY **a, const unsigned char **in, long len); int i2d_ASN1_SEQUENCE_ANY(const ASN1_SEQUENCE_ANY *a, unsigned char **out); extern const ASN1_ITEM ASN1_SEQUENCE_ANY_it;
27562 ASN1_SEQUENCE_ANY *d2i_ASN1_SET_ANY(ASN1_SEQUENCE_ANY **a, const unsigned char **in, long len); int i2d_ASN1_SET_ANY(const ASN1_SEQUENCE_ANY *a, unsigned char **out); extern const ASN1_ITEM ASN1_SET_ANY_it;
27563 
27564 typedef struct NETSCAPE_X509_st {
27565     ASN1_OCTET_STRING *header;
27566     X509 *cert;
27567 } NETSCAPE_X509;
27568 
27569 /* This is used to contain a list of bit names */
27570 typedef struct BIT_STRING_BITNAME_st {
27571     int bitnum;
27572     const char *lname;
27573     const char *sname;
27574 } BIT_STRING_BITNAME;
27575 
27576 
27577 
27578 
27579 
27580 
27581 /* Macros for string operations */
27582 # 772 "/usr/include/openssl/asn1.h" 3 4
27583   /* for the is_set parameter to i2d_ASN1_SET */
27584 
27585 
27586 
27587 ASN1_TYPE *ASN1_TYPE_new(void); void ASN1_TYPE_free(ASN1_TYPE *a); ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, const unsigned char **in, long len); int i2d_ASN1_TYPE(ASN1_TYPE *a, unsigned char **out); extern const ASN1_ITEM ASN1_ANY_it;
27588 
27589 int ASN1_TYPE_get(ASN1_TYPE *a);
27590 void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
27591 int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
27592 int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
27593 
27594 ASN1_OBJECT *ASN1_OBJECT_new(void);
27595 void ASN1_OBJECT_free(ASN1_OBJECT *a);
27596 int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp);
27597 ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
27598                              long length);
27599 ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
27600                              long length);
27601 
27602 extern const ASN1_ITEM ASN1_OBJECT_it;
27603 
27604 struct stack_st_ASN1_OBJECT { _STACK stack; };
27605 
27606 
27607 ASN1_STRING *ASN1_STRING_new(void);
27608 void ASN1_STRING_free(ASN1_STRING *a);
27609 void ASN1_STRING_clear_free(ASN1_STRING *a);
27610 int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
27611 ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a);
27612 ASN1_STRING *ASN1_STRING_type_new(int type);
27613 int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
27614   /*
27615    * Since this is used to store all sorts of things, via macros, for now,
27616    * make its data void *
27617    */
27618 int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
27619 void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
27620 int ASN1_STRING_length(const ASN1_STRING *x);
27621 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
27622 int ASN1_STRING_type(ASN1_STRING *x);
27623 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
27624 
27625 ASN1_BIT_STRING *ASN1_BIT_STRING_new(void); void ASN1_BIT_STRING_free(ASN1_BIT_STRING *a); ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **in, long len); int i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_BIT_STRING_it;
27626 int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp);
27627 ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
27628                                      const unsigned char **pp, long length);
27629 int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
27630 int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
27631 int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);
27632 int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a,
27633                           unsigned char *flags, int flags_len);
27634 
27635 
27636 int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
27637                                BIT_STRING_BITNAME *tbl, int indent);
27638 
27639 int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl);
27640 int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
27641                             BIT_STRING_BITNAME *tbl);
27642 
27643 int i2d_ASN1_BOOLEAN(int a, unsigned char **pp);
27644 int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length);
27645 
27646 ASN1_INTEGER *ASN1_INTEGER_new(void); void ASN1_INTEGER_free(ASN1_INTEGER *a); ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **in, long len); int i2d_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **out); extern const ASN1_ITEM ASN1_INTEGER_it;
27647 int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp);
27648 ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp,
27649                                long length);
27650 ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
27651                                 long length);
27652 ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x);
27653 int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
27654 
27655 ASN1_ENUMERATED *ASN1_ENUMERATED_new(void); void ASN1_ENUMERATED_free(ASN1_ENUMERATED *a); ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, const unsigned char **in, long len); int i2d_ASN1_ENUMERATED(ASN1_ENUMERATED *a, unsigned char **out); extern const ASN1_ITEM ASN1_ENUMERATED_it;
27656 
27657 int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
27658 ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
27659 ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
27660                                int offset_day, long offset_sec);
27661 int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
27662 int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
27663 
27664 
27665 
27666 
27667 int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
27668 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
27669                                                time_t t);
27670 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
27671                                                time_t t, int offset_day,
27672                                                long offset_sec);
27673 int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
27674 int ASN1_TIME_diff(int *pday, int *psec,
27675                    const ASN1_TIME *from, const ASN1_TIME *to);
27676 
27677 ASN1_OCTET_STRING *ASN1_OCTET_STRING_new(void); void ASN1_OCTET_STRING_free(ASN1_OCTET_STRING *a); ASN1_OCTET_STRING *d2i_ASN1_OCTET_STRING(ASN1_OCTET_STRING **a, const unsigned char **in, long len); int i2d_ASN1_OCTET_STRING(ASN1_OCTET_STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_OCTET_STRING_it;
27678 ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a);
27679 int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
27680                           const ASN1_OCTET_STRING *b);
27681 int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
27682                           int len);
27683 
27684 ASN1_VISIBLESTRING *ASN1_VISIBLESTRING_new(void); void ASN1_VISIBLESTRING_free(ASN1_VISIBLESTRING *a); ASN1_VISIBLESTRING *d2i_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING **a, const unsigned char **in, long len); int i2d_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_VISIBLESTRING_it;
27685 ASN1_UNIVERSALSTRING *ASN1_UNIVERSALSTRING_new(void); void ASN1_UNIVERSALSTRING_free(ASN1_UNIVERSALSTRING *a); ASN1_UNIVERSALSTRING *d2i_ASN1_UNIVERSALSTRING(ASN1_UNIVERSALSTRING **a, const unsigned char **in, long len); int i2d_ASN1_UNIVERSALSTRING(ASN1_UNIVERSALSTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_UNIVERSALSTRING_it;
27686 ASN1_UTF8STRING *ASN1_UTF8STRING_new(void); void ASN1_UTF8STRING_free(ASN1_UTF8STRING *a); ASN1_UTF8STRING *d2i_ASN1_UTF8STRING(ASN1_UTF8STRING **a, const unsigned char **in, long len); int i2d_ASN1_UTF8STRING(ASN1_UTF8STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_UTF8STRING_it;
27687 ASN1_NULL *ASN1_NULL_new(void); void ASN1_NULL_free(ASN1_NULL *a); ASN1_NULL *d2i_ASN1_NULL(ASN1_NULL **a, const unsigned char **in, long len); int i2d_ASN1_NULL(ASN1_NULL *a, unsigned char **out); extern const ASN1_ITEM ASN1_NULL_it;
27688 ASN1_BMPSTRING *ASN1_BMPSTRING_new(void); void ASN1_BMPSTRING_free(ASN1_BMPSTRING *a); ASN1_BMPSTRING *d2i_ASN1_BMPSTRING(ASN1_BMPSTRING **a, const unsigned char **in, long len); int i2d_ASN1_BMPSTRING(ASN1_BMPSTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_BMPSTRING_it;
27689 
27690 int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
27691 int UTF8_putc(unsigned char *str, int len, unsigned long value);
27692 
27693 ASN1_STRING *ASN1_PRINTABLE_new(void); void ASN1_PRINTABLE_free(ASN1_STRING *a); ASN1_STRING *d2i_ASN1_PRINTABLE(ASN1_STRING **a, const unsigned char **in, long len); int i2d_ASN1_PRINTABLE(ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_PRINTABLE_it;
27694 
27695 ASN1_STRING *DIRECTORYSTRING_new(void); void DIRECTORYSTRING_free(ASN1_STRING *a); ASN1_STRING *d2i_DIRECTORYSTRING(ASN1_STRING **a, const unsigned char **in, long len); int i2d_DIRECTORYSTRING(ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM DIRECTORYSTRING_it;
27696 ASN1_STRING *DISPLAYTEXT_new(void); void DISPLAYTEXT_free(ASN1_STRING *a); ASN1_STRING *d2i_DISPLAYTEXT(ASN1_STRING **a, const unsigned char **in, long len); int i2d_DISPLAYTEXT(ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM DISPLAYTEXT_it;
27697 ASN1_PRINTABLESTRING *ASN1_PRINTABLESTRING_new(void); void ASN1_PRINTABLESTRING_free(ASN1_PRINTABLESTRING *a); ASN1_PRINTABLESTRING *d2i_ASN1_PRINTABLESTRING(ASN1_PRINTABLESTRING **a, const unsigned char **in, long len); int i2d_ASN1_PRINTABLESTRING(ASN1_PRINTABLESTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_PRINTABLESTRING_it;
27698 ASN1_T61STRING *ASN1_T61STRING_new(void); void ASN1_T61STRING_free(ASN1_T61STRING *a); ASN1_T61STRING *d2i_ASN1_T61STRING(ASN1_T61STRING **a, const unsigned char **in, long len); int i2d_ASN1_T61STRING(ASN1_T61STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_T61STRING_it;
27699 ASN1_IA5STRING *ASN1_IA5STRING_new(void); void ASN1_IA5STRING_free(ASN1_IA5STRING *a); ASN1_IA5STRING *d2i_ASN1_IA5STRING(ASN1_IA5STRING **a, const unsigned char **in, long len); int i2d_ASN1_IA5STRING(ASN1_IA5STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_IA5STRING_it;
27700 ASN1_GENERALSTRING *ASN1_GENERALSTRING_new(void); void ASN1_GENERALSTRING_free(ASN1_GENERALSTRING *a); ASN1_GENERALSTRING *d2i_ASN1_GENERALSTRING(ASN1_GENERALSTRING **a, const unsigned char **in, long len); int i2d_ASN1_GENERALSTRING(ASN1_GENERALSTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_GENERALSTRING_it;
27701 ASN1_UTCTIME *ASN1_UTCTIME_new(void); void ASN1_UTCTIME_free(ASN1_UTCTIME *a); ASN1_UTCTIME *d2i_ASN1_UTCTIME(ASN1_UTCTIME **a, const unsigned char **in, long len); int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **out); extern const ASN1_ITEM ASN1_UTCTIME_it;
27702 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_new(void); void ASN1_GENERALIZEDTIME_free(ASN1_GENERALIZEDTIME *a); ASN1_GENERALIZEDTIME *d2i_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME **a, const unsigned char **in, long len); int i2d_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME *a, unsigned char **out); extern const ASN1_ITEM ASN1_GENERALIZEDTIME_it;
27703 ASN1_TIME *ASN1_TIME_new(void); void ASN1_TIME_free(ASN1_TIME *a); ASN1_TIME *d2i_ASN1_TIME(ASN1_TIME **a, const unsigned char **in, long len); int i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **out); extern const ASN1_ITEM ASN1_TIME_it;
27704 
27705 extern const ASN1_ITEM ASN1_OCTET_STRING_NDEF_it;
27706 
27707 ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
27708 ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
27709                          int offset_day, long offset_sec);
27710 int ASN1_TIME_check(ASN1_TIME *t);
27711 ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME
27712                                                    **out);
27713 int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
27714 
27715 int i2d_ASN1_SET(struct stack_st_OPENSSL_BLOCK *a, unsigned char **pp,
27716                  i2d_of_void *i2d, int ex_tag, int ex_class, int is_set);
27717 struct stack_st_OPENSSL_BLOCK *d2i_ASN1_SET(struct stack_st_OPENSSL_BLOCK **a,
27718                                       const unsigned char **pp,
27719                                       long length, d2i_of_void *d2i,
27720                                       void (*free_func) (OPENSSL_BLOCK),
27721                                       int ex_tag, int ex_class);
27722 
27723 
27724 int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);
27725 int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
27726 int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
27727 int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
27728 int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a);
27729 int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
27730 int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type);
27731 
27732 int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a);
27733 
27734 int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
27735 ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
27736                                 const char *sn, const char *ln);
27737 
27738 int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
27739 long ASN1_INTEGER_get(const ASN1_INTEGER *a);
27740 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
27741 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
27742 
27743 int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
27744 long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a);
27745 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai);
27746 BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn);
27747 
27748 /* General */
27749 /* given a string, return the correct type, max is the maximum length */
27750 int ASN1_PRINTABLE_type(const unsigned char *s, int max);
27751 
27752 int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass);
27753 ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
27754                             long length, int Ptag, int Pclass);
27755 unsigned long ASN1_tag2bit(int tag);
27756 /* type is one or more of the B_ASN1_ values. */
27757 ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp,
27758                                  long length, int type);
27759 
27760 /* PARSING */
27761 int asn1_Finish(ASN1_CTX *c);
27762 int asn1_const_Finish(ASN1_const_CTX *c);
27763 
27764 /* SPECIALS */
27765 int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
27766                     int *pclass, long omax);
27767 int ASN1_check_infinite_end(unsigned char **p, long len);
27768 int ASN1_const_check_infinite_end(const unsigned char **p, long len);
27769 void ASN1_put_object(unsigned char **pp, int constructed, int length,
27770                      int tag, int xclass);
27771 int ASN1_put_eoc(unsigned char **pp);
27772 int ASN1_object_size(int constructed, int length, int tag);
27773 
27774 /* Used to implement other functions */
27775 void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);
27776 # 976 "/usr/include/openssl/asn1.h" 3 4
27777 void *ASN1_item_dup(const ASN1_ITEM *it, void *x);
27778 
27779 /* ASN1 alloc/free macros for when a type is only used internally */
27780 
27781 
27782 
27783 
27784 
27785 
27786 void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
27787 
27788 
27789 
27790 
27791 
27792 
27793 
27794 void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
27795 int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x);
27796 # 1006 "/usr/include/openssl/asn1.h" 3 4
27797 int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x);
27798 int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);
27799 
27800 
27801 int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in);
27802 
27803 
27804 void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
27805 
27806 
27807 
27808 
27809 
27810 
27811 
27812 void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x);
27813 int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x);
27814 # 1034 "/usr/include/openssl/asn1.h" 3 4
27815 int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x);
27816 int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
27817 int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
27818 int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);
27819 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
27820 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);
27821 int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
27822                   unsigned char *buf, int off);
27823 int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
27824 int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
27825                     int dump);
27826 
27827 const char *ASN1_tag2str(int tag);
27828 
27829 /* Used to load and write netscape format cert */
27830 
27831 NETSCAPE_X509 *NETSCAPE_X509_new(void); void NETSCAPE_X509_free(NETSCAPE_X509 *a); NETSCAPE_X509 *d2i_NETSCAPE_X509(NETSCAPE_X509 **a, const unsigned char **in, long len); int i2d_NETSCAPE_X509(NETSCAPE_X509 *a, unsigned char **out); extern const ASN1_ITEM NETSCAPE_X509_it;
27832 
27833 int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
27834 
27835 int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
27836 int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, int max_len);
27837 int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
27838                                   unsigned char *data, int len);
27839 int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num,
27840                                   unsigned char *data, int max_len);
27841 
27842 struct stack_st_OPENSSL_BLOCK *ASN1_seq_unpack(const unsigned char *buf, int len,
27843                                          d2i_of_void *d2i,
27844                                          void (*free_func) (OPENSSL_BLOCK));
27845 unsigned char *ASN1_seq_pack(struct stack_st_OPENSSL_BLOCK *safes, i2d_of_void *i2d,
27846                              unsigned char **buf, int *len);
27847 void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);
27848 void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
27849 ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d,
27850                               ASN1_OCTET_STRING **oct);
27851 
27852 
27853 
27854 
27855 
27856 
27857 ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
27858                             ASN1_OCTET_STRING **oct);
27859 
27860 void ASN1_STRING_set_default_mask(unsigned long mask);
27861 int ASN1_STRING_set_default_mask_asc(const char *p);
27862 unsigned long ASN1_STRING_get_default_mask(void);
27863 int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
27864                        int inform, unsigned long mask);
27865 int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
27866                         int inform, unsigned long mask,
27867                         long minsize, long maxsize);
27868 
27869 ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
27870                                     const unsigned char *in, int inlen,
27871                                     int inform, int nid);
27872 ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
27873 int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
27874 void ASN1_STRING_TABLE_cleanup(void);
27875 
27876 /* ASN1 template functions */
27877 
27878 /* Old API compatible functions */
27879 ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
27880 void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
27881 ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
27882                           long len, const ASN1_ITEM *it);
27883 int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
27884 int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out,
27885                        const ASN1_ITEM *it);
27886 
27887 void ASN1_add_oid_module(void);
27888 
27889 ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf);
27890 ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
27891 
27892 /* ASN1 Print flags */
27893 
27894 /* Indicate missing OPTIONAL fields */
27895 
27896 /* Mark start and end of SEQUENCE */
27897 
27898 /* Mark start and end of SEQUENCE/SET OF */
27899 
27900 /* Show the ASN1 type of primitives */
27901 
27902 /* Don't show ASN1 type of ANY */
27903 
27904 /* Don't show ASN1 type of MSTRINGs */
27905 
27906 /* Don't show field names in SEQUENCE */
27907 
27908 /* Show structure names of each SEQUENCE field */
27909 
27910 /* Don't show structure name even at top level */
27911 
27912 
27913 int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent,
27914                     const ASN1_ITEM *it, const ASN1_PCTX *pctx);
27915 ASN1_PCTX *ASN1_PCTX_new(void);
27916 void ASN1_PCTX_free(ASN1_PCTX *p);
27917 unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p);
27918 void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
27919 unsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p);
27920 void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
27921 unsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p);
27922 void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
27923 unsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p);
27924 void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
27925 unsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p);
27926 void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
27927 
27928 BIO_METHOD *BIO_f_asn1(void);
27929 
27930 BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
27931 
27932 int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
27933                         const ASN1_ITEM *it);
27934 int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
27935                               const char *hdr, const ASN1_ITEM *it);
27936 int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
27937                      int ctype_nid, int econt_nid,
27938                      struct stack_st_X509_ALGOR *mdalgs, const ASN1_ITEM *it);
27939 ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
27940 int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
27941 int SMIME_text(BIO *in, BIO *out);
27942 
27943 /* BEGIN ERROR CODES */
27944 /*
27945  * The following lines are auto generated by the script mkerr.pl. Any changes
27946  * made after this point may be overwritten when the script is next run.
27947  */
27948 
27949 void ERR_load_ASN1_strings(void);
27950 
27951 /* Error codes for the ASN1 functions. */
27952 
27953 /* Function codes. */
27954 # 1298 "/usr/include/openssl/asn1.h" 3 4
27955 /* Reason codes. */
27956 # 966 "/usr/include/openssl/objects.h" 2 3 4
27957 # 984 "/usr/include/openssl/objects.h" 3 4
27958 typedef struct obj_name_st {
27959     int type;
27960     int alias;
27961     const char *name;
27962     const char *data;
27963 } OBJ_NAME;
27964 
27965 
27966 
27967 int OBJ_NAME_init(void);
27968 int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
27969                        int (*cmp_func) (const char *, const char *),
27970                        void (*free_func) (const char *, int, const char *));
27971 const char *OBJ_NAME_get(const char *name, int type);
27972 int OBJ_NAME_add(const char *name, int type, const char *data);
27973 int OBJ_NAME_remove(const char *name, int type);
27974 void OBJ_NAME_cleanup(int type); /* -1 for everything */
27975 void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg),
27976                      void *arg);
27977 void OBJ_NAME_do_all_sorted(int type,
27978                             void (*fn) (const OBJ_NAME *, void *arg),
27979                             void *arg);
27980 
27981 ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o);
27982 ASN1_OBJECT *OBJ_nid2obj(int n);
27983 const char *OBJ_nid2ln(int n);
27984 const char *OBJ_nid2sn(int n);
27985 int OBJ_obj2nid(const ASN1_OBJECT *o);
27986 ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name);
27987 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
27988 int OBJ_txt2nid(const char *s);
27989 int OBJ_ln2nid(const char *s);
27990 int OBJ_sn2nid(const char *s);
27991 int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
27992 const void *OBJ_bsearch_(const void *key, const void *base, int num, int size,
27993                          int (*cmp) (const void *, const void *));
27994 const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
27995                             int size,
27996                             int (*cmp) (const void *, const void *),
27997                             int flags);
27998 # 1035 "/usr/include/openssl/objects.h" 3 4
27999 /*-
28000  * Unsolved problem: if a type is actually a pointer type, like
28001  * nid_triple is, then its impossible to get a const where you need
28002  * it. Consider:
28003  *
28004  * typedef int nid_triple[3];
28005  * const void *a_;
28006  * const nid_triple const *a = a_;
28007  *
28008  * The assignement discards a const because what you really want is:
28009  *
28010  * const int const * const *a = a_;
28011  *
28012  * But if you do that, you lose the fact that a is an array of 3 ints,
28013  * which breaks comparison functions.
28014  *
28015  * Thus we end up having to cast, sadly, or unpack the
28016  * declarations. Or, as I finally did in this case, delcare nid_triple
28017  * to be a struct, which it should have been in the first place.
28018  *
28019  * Ben, August 2008.
28020  *
28021  * Also, strictly speaking not all types need be const, but handling
28022  * the non-constness means a lot of complication, and in practice
28023  * comparison routines do always not touch their arguments.
28024  */
28025 # 1104 "/usr/include/openssl/objects.h" 3 4
28026 int OBJ_new_nid(int num);
28027 int OBJ_add_object(const ASN1_OBJECT *obj);
28028 int OBJ_create(const char *oid, const char *sn, const char *ln);
28029 void OBJ_cleanup(void);
28030 int OBJ_create_objects(BIO *in);
28031 
28032 int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);
28033 int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
28034 int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
28035 void OBJ_sigid_free(void);
28036 
28037 extern int obj_cleanup_defer;
28038 void check_defer(int nid);
28039 
28040 /* BEGIN ERROR CODES */
28041 /*
28042  * The following lines are auto generated by the script mkerr.pl. Any changes
28043  * made after this point may be overwritten when the script is next run.
28044  */
28045 void ERR_load_OBJ_strings(void);
28046 
28047 /* Error codes for the OBJ functions. */
28048 
28049 /* Function codes. */
28050 # 1136 "/usr/include/openssl/objects.h" 3 4
28051 /* Reason codes. */
28052 # 95 "/usr/include/openssl/evp.h" 2 3 4
28053 # 125 "/usr/include/openssl/evp.h" 3 4
28054 /*
28055  * Type needs to be a bit field Sub-type needs to be for variations on the
28056  * method, as in, can it do arbitrary encryption....
28057  */
28058 struct evp_pkey_st {
28059     int type;
28060     int save_type;
28061     int references;
28062     const EVP_PKEY_ASN1_METHOD *ameth;
28063     ENGINE *engine;
28064     union {
28065         char *ptr;
28066 
28067         struct rsa_st *rsa; /* RSA */
28068 
28069 
28070         struct dsa_st *dsa; /* DSA */
28071 
28072 
28073         struct dh_st *dh; /* DH */
28074 
28075 
28076         struct ec_key_st *ec; /* ECC */
28077 
28078     } pkey;
28079     int save_parameters;
28080     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
28081 } /* EVP_PKEY */ ;
28082 
28083 
28084 
28085 
28086 
28087 
28088 
28089 struct env_md_st {
28090     int type;
28091     int pkey_type;
28092     int md_size;
28093     unsigned long flags;
28094     int (*init) (EVP_MD_CTX *ctx);
28095     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
28096     int (*final) (EVP_MD_CTX *ctx, unsigned char *md);
28097     int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from);
28098     int (*cleanup) (EVP_MD_CTX *ctx);
28099     /* FIXME: prototype these some day */
28100     int (*sign) (int type, const unsigned char *m, unsigned int m_length,
28101                  unsigned char *sigret, unsigned int *siglen, void *key);
28102     int (*verify) (int type, const unsigned char *m, unsigned int m_length,
28103                    const unsigned char *sigbuf, unsigned int siglen,
28104                    void *key);
28105     int required_pkey_type[5]; /* EVP_PKEY_xxx */
28106     int block_size;
28107     int ctx_size; /* how big does the ctx->md_data need to be */
28108     /* control function */
28109     int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
28110 } /* EVP_MD */ ;
28111 
28112 typedef int evp_sign_method(int type, const unsigned char *m,
28113                             unsigned int m_length, unsigned char *sigret,
28114                             unsigned int *siglen, void *key);
28115 typedef int evp_verify_method(int type, const unsigned char *m,
28116                               unsigned int m_length,
28117                               const unsigned char *sigbuf,
28118                               unsigned int siglen, void *key);
28119 
28120 /* digest can only handle a single block */
28121 
28122 
28123 /*
28124  * digest is a "clone" digest used
28125  * which is a copy of an existing
28126  * one for a specific public key type.
28127  * EVP_dss1() etc
28128  */
28129 
28130 
28131 /* Digest uses EVP_PKEY_METHOD for signing instead of MD specific signing */
28132 
28133 
28134 
28135 /* DigestAlgorithmIdentifier flags... */
28136 
28137 
28138 
28139 /* NULL or absent parameter accepted. Use NULL */
28140 
28141 
28142 
28143 /* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */
28144 
28145 
28146 
28147 /* Custom handling via ctrl */
28148 
28149 
28150 
28151 /* Note if suitable for use in FIPS mode */
28152 
28153 
28154 /* Digest ctrls */
28155 
28156 
28157 
28158 
28159 /* Minimum Algorithm specific ctrl value */
28160 # 268 "/usr/include/openssl/evp.h" 3 4
28161 struct env_md_ctx_st {
28162     const EVP_MD *digest;
28163     ENGINE *engine; /* functional reference if 'digest' is
28164                                  * ENGINE-provided */
28165     unsigned long flags;
28166     void *md_data;
28167     /* Public key context for sign/verify */
28168     EVP_PKEY_CTX *pctx;
28169     /* Update function: usually copied from EVP_MD */
28170     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
28171 } /* EVP_MD_CTX */ ;
28172 
28173 /* values for EVP_MD_CTX flags */
28174 
28175 
28176 
28177 
28178 
28179 
28180 
28181 /*
28182  * FIPS and pad options are ignored in 1.0.0, definitions are here so we
28183  * don't accidentally reuse the values for other purposes.
28184  */
28185 
28186 
28187 
28188 
28189 /*
28190  * The following PAD options are also currently ignored in 1.0.0, digest
28191  * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*()
28192  * instead.
28193  */
28194 
28195 
28196 
28197 
28198 
28199 
28200 
28201 struct evp_cipher_st {
28202     int nid;
28203     int block_size;
28204     /* Default value for variable length ciphers */
28205     int key_len;
28206     int iv_len;
28207     /* Various flags */
28208     unsigned long flags;
28209     /* init key */
28210     int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key,
28211                  const unsigned char *iv, int enc);
28212     /* encrypt/decrypt data */
28213     int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out,
28214                       const unsigned char *in, size_t inl);
28215     /* cleanup ctx */
28216     int (*cleanup) (EVP_CIPHER_CTX *);
28217     /* how big ctx->cipher_data needs to be */
28218     int ctx_size;
28219     /* Populate a ASN1_TYPE with parameters */
28220     int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
28221     /* Get parameters from a ASN1_TYPE */
28222     int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
28223     /* Miscellaneous operations */
28224     int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr);
28225     /* Application data */
28226     void *app_data;
28227 } /* EVP_CIPHER */ ;
28228 
28229 /* Values for cipher flags */
28230 
28231 /* Modes for ciphers */
28232 # 351 "/usr/include/openssl/evp.h" 3 4
28233 /* Set if variable length cipher */
28234 
28235 /* Set if the iv handling should be done by the cipher itself */
28236 
28237 /* Set if the cipher's init() function should be called if key is NULL */
28238 
28239 /* Call ctrl() to init cipher parameters */
28240 
28241 /* Don't use standard key length function */
28242 
28243 /* Don't use standard block padding */
28244 
28245 /* cipher handles random key generation */
28246 
28247 /* cipher has its own additional copying logic */
28248 
28249 /* Allow use default ASN1 get/set iv */
28250 
28251 /* Buffer length in bits not bytes: CFB1 mode only */
28252 
28253 /* Note if suitable for use in FIPS mode */
28254 
28255 /* Allow non FIPS cipher in FIPS mode */
28256 
28257 /*
28258  * Cipher handles any and all padding logic as well as finalisation.
28259  */
28260 
28261 
28262 
28263 
28264 /*
28265  * Cipher context flag to indicate we can handle wrap mode: if allowed in
28266  * older applications it could overflow buffers.
28267  */
28268 
28269 
28270 
28271 /* ctrl() values */
28272 # 410 "/usr/include/openssl/evp.h" 3 4
28273 /*
28274  * AEAD cipher deduces payload length and returns number of bytes required to
28275  * store MAC and eventual padding. Subsequent call to EVP_Cipher even
28276  * appends/verifies MAC.
28277  */
28278 
28279 /* Used by composite AEAD ciphers, no-op in GCM, CCM... */
28280 
28281 /* Set the GCM invocation field, decrypt only */
28282 
28283 
28284 
28285 
28286 
28287 
28288 
28289 /* RFC 5246 defines additional data to be 13 bytes in length */
28290 
28291 
28292 typedef struct {
28293     unsigned char *out;
28294     const unsigned char *inp;
28295     size_t len;
28296     unsigned int interleave;
28297 } EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM;
28298 
28299 /* GCM TLS constants */
28300 /* Length of fixed part of IV derived from PRF */
28301 
28302 /* Length of explicit part of IV part of TLS records */
28303 
28304 /* Length of tag for TLS */
28305 
28306 
28307 typedef struct evp_cipher_info_st {
28308     const EVP_CIPHER *cipher;
28309     unsigned char iv[16];
28310 } EVP_CIPHER_INFO;
28311 
28312 struct evp_cipher_ctx_st {
28313     const EVP_CIPHER *cipher;
28314     ENGINE *engine; /* functional reference if 'cipher' is
28315                                  * ENGINE-provided */
28316     int encrypt; /* encrypt or decrypt */
28317     int buf_len; /* number we have left */
28318     unsigned char oiv[16]; /* original iv */
28319     unsigned char iv[16]; /* working iv */
28320     unsigned char buf[32]; /* saved partial block */
28321     int num; /* used by cfb/ofb/ctr mode */
28322     void *app_data; /* application stuff */
28323     int key_len; /* May change for variable length cipher */
28324     unsigned long flags; /* Various flags */
28325     void *cipher_data; /* per EVP data */
28326     int final_used;
28327     int block_mask;
28328     unsigned char final[32]; /* possible final block */
28329 } /* EVP_CIPHER_CTX */ ;
28330 
28331 typedef struct evp_Encode_Ctx_st {
28332     /* number saved in a partial encode/decode */
28333     int num;
28334     /*
28335      * The length is either the output line length (in input bytes) or the
28336      * shortest input line length that is ok.  Once decoding begins, the
28337      * length is adjusted up each time a longer line is decoded
28338      */
28339     int length;
28340     /* data to encode */
28341     unsigned char enc_data[80];
28342     /* number read on current line */
28343     int line_num;
28344     int expect_nl;
28345 } EVP_ENCODE_CTX;
28346 
28347 /* Password based encryption function */
28348 typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass,
28349                               int passlen, ASN1_TYPE *param,
28350                               const EVP_CIPHER *cipher, const EVP_MD *md,
28351                               int en_de);
28352 # 510 "/usr/include/openssl/evp.h" 3 4
28353 /* Add some extra combinations */
28354 
28355 
28356 
28357 
28358 
28359 int EVP_MD_type(const EVP_MD *md);
28360 
28361 
28362 int EVP_MD_pkey_type(const EVP_MD *md);
28363 int EVP_MD_size(const EVP_MD *md);
28364 int EVP_MD_block_size(const EVP_MD *md);
28365 unsigned long EVP_MD_flags(const EVP_MD *md);
28366 
28367 const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
28368 
28369 
28370 
28371 
28372 int EVP_CIPHER_nid(const EVP_CIPHER *cipher);
28373 
28374 int EVP_CIPHER_block_size(const EVP_CIPHER *cipher);
28375 int EVP_CIPHER_key_length(const EVP_CIPHER *cipher);
28376 int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher);
28377 unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher);
28378 
28379 
28380 const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);
28381 int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx);
28382 int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx);
28383 int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx);
28384 int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx);
28385 int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
28386 void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
28387 void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);
28388 
28389 unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx);
28390 # 574 "/usr/include/openssl/evp.h" 3 4
28391 int EVP_Cipher(EVP_CIPHER_CTX *c,
28392                unsigned char *out, const unsigned char *in, unsigned int inl);
28393 # 586 "/usr/include/openssl/evp.h" 3 4
28394 void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
28395 int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
28396 EVP_MD_CTX *EVP_MD_CTX_create(void);
28397 void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
28398 int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
28399 void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
28400 void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
28401 int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
28402 int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
28403 int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
28404 int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
28405 int EVP_Digest(const void *data, size_t count,
28406                unsigned char *md, unsigned int *size, const EVP_MD *type,
28407                ENGINE *impl);
28408 
28409 int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in);
28410 int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
28411 int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
28412 
28413 int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);
28414 int EVP_read_pw_string_min(char *buf, int minlen, int maxlen,
28415                            const char *prompt, int verify);
28416 void EVP_set_pw_prompt(const char *prompt);
28417 char *EVP_get_pw_prompt(void);
28418 
28419 int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
28420                    const unsigned char *salt, const unsigned char *data,
28421                    int datal, int count, unsigned char *key,
28422                    unsigned char *iv);
28423 
28424 void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
28425 void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
28426 int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);
28427 
28428 int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
28429                     const unsigned char *key, const unsigned char *iv);
28430 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
28431                        ENGINE *impl, const unsigned char *key,
28432                        const unsigned char *iv);
28433 int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
28434                       const unsigned char *in, int inl);
28435 int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
28436 int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
28437 
28438 int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
28439                     const unsigned char *key, const unsigned char *iv);
28440 int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
28441                        ENGINE *impl, const unsigned char *key,
28442                        const unsigned char *iv);
28443 int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
28444                       const unsigned char *in, int inl);
28445 int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
28446 int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
28447 
28448 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
28449                    const unsigned char *key, const unsigned char *iv,
28450                    int enc);
28451 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
28452                       ENGINE *impl, const unsigned char *key,
28453                       const unsigned char *iv, int enc);
28454 int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
28455                      const unsigned char *in, int inl);
28456 int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
28457 int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
28458 
28459 int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
28460                   EVP_PKEY *pkey);
28461 
28462 int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
28463                     unsigned int siglen, EVP_PKEY *pkey);
28464 
28465 int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
28466                        const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
28467 int EVP_DigestSignFinal(EVP_MD_CTX *ctx,
28468                         unsigned char *sigret, size_t *siglen);
28469 
28470 int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
28471                          const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
28472 int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx,
28473                           const unsigned char *sig, size_t siglen);
28474 
28475 int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
28476                  const unsigned char *ek, int ekl, const unsigned char *iv,
28477                  EVP_PKEY *priv);
28478 int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
28479 
28480 int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
28481                  unsigned char **ek, int *ekl, unsigned char *iv,
28482                  EVP_PKEY **pubk, int npubk);
28483 int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
28484 
28485 void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
28486 void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
28487                       const unsigned char *in, int inl);
28488 void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
28489 int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
28490 
28491 void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
28492 int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
28493                      const unsigned char *in, int inl);
28494 int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
28495                     char *out, int *outl);
28496 int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
28497 
28498 void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
28499 int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
28500 EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
28501 void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a);
28502 int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
28503 int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
28504 int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
28505 int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
28506 
28507 
28508 BIO_METHOD *BIO_f_md(void);
28509 BIO_METHOD *BIO_f_base64(void);
28510 BIO_METHOD *BIO_f_cipher(void);
28511 BIO_METHOD *BIO_f_reliable(void);
28512 void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
28513                     const unsigned char *i, int enc);
28514 
28515 
28516 const EVP_MD *EVP_md_null(void);
28517 
28518 const EVP_MD *EVP_md2(void);
28519 
28520 
28521 const EVP_MD *EVP_md4(void);
28522 
28523 
28524 const EVP_MD *EVP_md5(void);
28525 
28526 
28527 const EVP_MD *EVP_sha(void);
28528 const EVP_MD *EVP_sha1(void);
28529 const EVP_MD *EVP_dss(void);
28530 const EVP_MD *EVP_dss1(void);
28531 const EVP_MD *EVP_ecdsa(void);
28532 
28533 
28534 const EVP_MD *EVP_sha224(void);
28535 const EVP_MD *EVP_sha256(void);
28536 
28537 
28538 const EVP_MD *EVP_sha384(void);
28539 const EVP_MD *EVP_sha512(void);
28540 
28541 
28542 
28543 
28544 
28545 const EVP_MD *EVP_ripemd160(void);
28546 
28547 
28548 
28549 
28550 const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */
28551 
28552 const EVP_CIPHER *EVP_des_ecb(void);
28553 const EVP_CIPHER *EVP_des_ede(void);
28554 const EVP_CIPHER *EVP_des_ede3(void);
28555 const EVP_CIPHER *EVP_des_ede_ecb(void);
28556 const EVP_CIPHER *EVP_des_ede3_ecb(void);
28557 const EVP_CIPHER *EVP_des_cfb64(void);
28558 
28559 const EVP_CIPHER *EVP_des_cfb1(void);
28560 const EVP_CIPHER *EVP_des_cfb8(void);
28561 const EVP_CIPHER *EVP_des_ede_cfb64(void);
28562 
28563 
28564 
28565 
28566 
28567 const EVP_CIPHER *EVP_des_ede3_cfb64(void);
28568 
28569 const EVP_CIPHER *EVP_des_ede3_cfb1(void);
28570 const EVP_CIPHER *EVP_des_ede3_cfb8(void);
28571 const EVP_CIPHER *EVP_des_ofb(void);
28572 const EVP_CIPHER *EVP_des_ede_ofb(void);
28573 const EVP_CIPHER *EVP_des_ede3_ofb(void);
28574 const EVP_CIPHER *EVP_des_cbc(void);
28575 const EVP_CIPHER *EVP_des_ede_cbc(void);
28576 const EVP_CIPHER *EVP_des_ede3_cbc(void);
28577 const EVP_CIPHER *EVP_desx_cbc(void);
28578 const EVP_CIPHER *EVP_des_ede3_wrap(void);
28579 /*
28580  * This should now be supported through the dev_crypto ENGINE. But also, why
28581  * are rc4 and md5 declarations made here inside a "NO_DES" precompiler
28582  * branch?
28583  */
28584 # 785 "/usr/include/openssl/evp.h" 3 4
28585 const EVP_CIPHER *EVP_rc4(void);
28586 const EVP_CIPHER *EVP_rc4_40(void);
28587 
28588 const EVP_CIPHER *EVP_rc4_hmac_md5(void);
28589 # 799 "/usr/include/openssl/evp.h" 3 4
28590 const EVP_CIPHER *EVP_rc2_ecb(void);
28591 const EVP_CIPHER *EVP_rc2_cbc(void);
28592 const EVP_CIPHER *EVP_rc2_40_cbc(void);
28593 const EVP_CIPHER *EVP_rc2_64_cbc(void);
28594 const EVP_CIPHER *EVP_rc2_cfb64(void);
28595 
28596 const EVP_CIPHER *EVP_rc2_ofb(void);
28597 
28598 
28599 const EVP_CIPHER *EVP_bf_ecb(void);
28600 const EVP_CIPHER *EVP_bf_cbc(void);
28601 const EVP_CIPHER *EVP_bf_cfb64(void);
28602 
28603 const EVP_CIPHER *EVP_bf_ofb(void);
28604 
28605 
28606 const EVP_CIPHER *EVP_cast5_ecb(void);
28607 const EVP_CIPHER *EVP_cast5_cbc(void);
28608 const EVP_CIPHER *EVP_cast5_cfb64(void);
28609 
28610 const EVP_CIPHER *EVP_cast5_ofb(void);
28611 # 829 "/usr/include/openssl/evp.h" 3 4
28612 const EVP_CIPHER *EVP_aes_128_ecb(void);
28613 const EVP_CIPHER *EVP_aes_128_cbc(void);
28614 const EVP_CIPHER *EVP_aes_128_cfb1(void);
28615 const EVP_CIPHER *EVP_aes_128_cfb8(void);
28616 const EVP_CIPHER *EVP_aes_128_cfb128(void);
28617 
28618 const EVP_CIPHER *EVP_aes_128_ofb(void);
28619 const EVP_CIPHER *EVP_aes_128_ctr(void);
28620 const EVP_CIPHER *EVP_aes_128_ccm(void);
28621 const EVP_CIPHER *EVP_aes_128_gcm(void);
28622 const EVP_CIPHER *EVP_aes_128_xts(void);
28623 const EVP_CIPHER *EVP_aes_128_wrap(void);
28624 const EVP_CIPHER *EVP_aes_192_ecb(void);
28625 const EVP_CIPHER *EVP_aes_192_cbc(void);
28626 const EVP_CIPHER *EVP_aes_192_cfb1(void);
28627 const EVP_CIPHER *EVP_aes_192_cfb8(void);
28628 const EVP_CIPHER *EVP_aes_192_cfb128(void);
28629 
28630 const EVP_CIPHER *EVP_aes_192_ofb(void);
28631 const EVP_CIPHER *EVP_aes_192_ctr(void);
28632 const EVP_CIPHER *EVP_aes_192_ccm(void);
28633 const EVP_CIPHER *EVP_aes_192_gcm(void);
28634 const EVP_CIPHER *EVP_aes_192_wrap(void);
28635 const EVP_CIPHER *EVP_aes_256_ecb(void);
28636 const EVP_CIPHER *EVP_aes_256_cbc(void);
28637 const EVP_CIPHER *EVP_aes_256_cfb1(void);
28638 const EVP_CIPHER *EVP_aes_256_cfb8(void);
28639 const EVP_CIPHER *EVP_aes_256_cfb128(void);
28640 
28641 const EVP_CIPHER *EVP_aes_256_ofb(void);
28642 const EVP_CIPHER *EVP_aes_256_ctr(void);
28643 const EVP_CIPHER *EVP_aes_256_ccm(void);
28644 const EVP_CIPHER *EVP_aes_256_gcm(void);
28645 const EVP_CIPHER *EVP_aes_256_xts(void);
28646 const EVP_CIPHER *EVP_aes_256_wrap(void);
28647 
28648 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void);
28649 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void);
28650 
28651 
28652 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void);
28653 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void);
28654 
28655 
28656 
28657 const EVP_CIPHER *EVP_camellia_128_ecb(void);
28658 const EVP_CIPHER *EVP_camellia_128_cbc(void);
28659 const EVP_CIPHER *EVP_camellia_128_cfb1(void);
28660 const EVP_CIPHER *EVP_camellia_128_cfb8(void);
28661 const EVP_CIPHER *EVP_camellia_128_cfb128(void);
28662 
28663 const EVP_CIPHER *EVP_camellia_128_ofb(void);
28664 const EVP_CIPHER *EVP_camellia_192_ecb(void);
28665 const EVP_CIPHER *EVP_camellia_192_cbc(void);
28666 const EVP_CIPHER *EVP_camellia_192_cfb1(void);
28667 const EVP_CIPHER *EVP_camellia_192_cfb8(void);
28668 const EVP_CIPHER *EVP_camellia_192_cfb128(void);
28669 
28670 const EVP_CIPHER *EVP_camellia_192_ofb(void);
28671 const EVP_CIPHER *EVP_camellia_256_ecb(void);
28672 const EVP_CIPHER *EVP_camellia_256_cbc(void);
28673 const EVP_CIPHER *EVP_camellia_256_cfb1(void);
28674 const EVP_CIPHER *EVP_camellia_256_cfb8(void);
28675 const EVP_CIPHER *EVP_camellia_256_cfb128(void);
28676 
28677 const EVP_CIPHER *EVP_camellia_256_ofb(void);
28678 # 905 "/usr/include/openssl/evp.h" 3 4
28679 void OPENSSL_add_all_algorithms_noconf(void);
28680 void OPENSSL_add_all_algorithms_conf(void);
28681 # 916 "/usr/include/openssl/evp.h" 3 4
28682 void OpenSSL_add_all_ciphers(void);
28683 void OpenSSL_add_all_digests(void);
28684 
28685 
28686 
28687 
28688 int EVP_add_cipher(const EVP_CIPHER *cipher);
28689 int EVP_add_digest(const EVP_MD *digest);
28690 
28691 const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
28692 const EVP_MD *EVP_get_digestbyname(const char *name);
28693 void EVP_cleanup(void);
28694 
28695 void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph,
28696                                    const char *from, const char *to, void *x),
28697                        void *arg);
28698 void EVP_CIPHER_do_all_sorted(void (*fn)
28699                                (const EVP_CIPHER *ciph, const char *from,
28700                                 const char *to, void *x), void *arg);
28701 
28702 void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph,
28703                                const char *from, const char *to, void *x),
28704                    void *arg);
28705 void EVP_MD_do_all_sorted(void (*fn)
28706                            (const EVP_MD *ciph, const char *from,
28707                             const char *to, void *x), void *arg);
28708 
28709 int EVP_PKEY_decrypt_old(unsigned char *dec_key,
28710                          const unsigned char *enc_key, int enc_key_len,
28711                          EVP_PKEY *private_key);
28712 int EVP_PKEY_encrypt_old(unsigned char *enc_key,
28713                          const unsigned char *key, int key_len,
28714                          EVP_PKEY *pub_key);
28715 int EVP_PKEY_type(int type);
28716 int EVP_PKEY_id(const EVP_PKEY *pkey);
28717 int EVP_PKEY_base_id(const EVP_PKEY *pkey);
28718 int EVP_PKEY_bits(EVP_PKEY *pkey);
28719 int EVP_PKEY_size(EVP_PKEY *pkey);
28720 int EVP_PKEY_set_type(EVP_PKEY *pkey, int type);
28721 int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
28722 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
28723 void *EVP_PKEY_get0(EVP_PKEY *pkey);
28724 
28725 
28726 struct rsa_st;
28727 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key);
28728 struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
28729 
28730 
28731 struct dsa_st;
28732 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key);
28733 struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
28734 
28735 
28736 struct dh_st;
28737 int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key);
28738 struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
28739 
28740 
28741 struct ec_key_st;
28742 int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);
28743 struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
28744 
28745 
28746 EVP_PKEY *EVP_PKEY_new(void);
28747 void EVP_PKEY_free(EVP_PKEY *pkey);
28748 
28749 EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
28750                         long length);
28751 int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);
28752 
28753 EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
28754                          long length);
28755 EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,
28756                              long length);
28757 int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp);
28758 
28759 int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
28760 int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
28761 int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);
28762 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
28763 
28764 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
28765 
28766 int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
28767                           int indent, ASN1_PCTX *pctx);
28768 int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
28769                            int indent, ASN1_PCTX *pctx);
28770 int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
28771                           int indent, ASN1_PCTX *pctx);
28772 
28773 int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
28774 
28775 int EVP_CIPHER_type(const EVP_CIPHER *ctx);
28776 
28777 /* calls methods */
28778 int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
28779 int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
28780 
28781 /* These are used by EVP_CIPHER methods */
28782 int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
28783 int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
28784 
28785 /* PKCS5 password based encryption */
28786 int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
28787                        ASN1_TYPE *param, const EVP_CIPHER *cipher,
28788                        const EVP_MD *md, int en_de);
28789 int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
28790                            const unsigned char *salt, int saltlen, int iter,
28791                            int keylen, unsigned char *out);
28792 int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
28793                       const unsigned char *salt, int saltlen, int iter,
28794                       const EVP_MD *digest, int keylen, unsigned char *out);
28795 int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
28796                           ASN1_TYPE *param, const EVP_CIPHER *cipher,
28797                           const EVP_MD *md, int en_de);
28798 
28799 void PKCS5_PBE_add(void);
28800 
28801 int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
28802                        ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
28803 
28804 /* PBE type */
28805 
28806 /* Can appear as the outermost AlgorithmIdentifier */
28807 
28808 /* Is an PRF type OID */
28809 
28810 
28811 int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
28812                          int md_nid, EVP_PBE_KEYGEN *keygen);
28813 int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
28814                     EVP_PBE_KEYGEN *keygen);
28815 int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid,
28816                  EVP_PBE_KEYGEN **pkeygen);
28817 void EVP_PBE_cleanup(void);
28818 # 1064 "/usr/include/openssl/evp.h" 3 4
28819 int EVP_PKEY_asn1_get_count(void);
28820 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
28821 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
28822 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
28823                                                    const char *str, int len);
28824 int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
28825 int EVP_PKEY_asn1_add_alias(int to, int from);
28826 int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
28827                             int *ppkey_flags, const char **pinfo,
28828                             const char **ppem_str,
28829                             const EVP_PKEY_ASN1_METHOD *ameth);
28830 
28831 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(EVP_PKEY *pkey);
28832 EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,
28833                                         const char *pem_str,
28834                                         const char *info);
28835 void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
28836                         const EVP_PKEY_ASN1_METHOD *src);
28837 void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
28838 void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
28839                               int (*pub_decode) (EVP_PKEY *pk,
28840                                                  X509_PUBKEY *pub),
28841                               int (*pub_encode) (X509_PUBKEY *pub,
28842                                                  const EVP_PKEY *pk),
28843                               int (*pub_cmp) (const EVP_PKEY *a,
28844                                               const EVP_PKEY *b),
28845                               int (*pub_print) (BIO *out,
28846                                                 const EVP_PKEY *pkey,
28847                                                 int indent, ASN1_PCTX *pctx),
28848                               int (*pkey_size) (const EVP_PKEY *pk),
28849                               int (*pkey_bits) (const EVP_PKEY *pk));
28850 void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
28851                                int (*priv_decode) (EVP_PKEY *pk,
28852                                                    PKCS8_PRIV_KEY_INFO
28853                                                    *p8inf),
28854                                int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8,
28855                                                    const EVP_PKEY *pk),
28856                                int (*priv_print) (BIO *out,
28857                                                   const EVP_PKEY *pkey,
28858                                                   int indent,
28859                                                   ASN1_PCTX *pctx));
28860 void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
28861                              int (*param_decode) (EVP_PKEY *pkey,
28862                                                   const unsigned char **pder,
28863                                                   int derlen),
28864                              int (*param_encode) (const EVP_PKEY *pkey,
28865                                                   unsigned char **pder),
28866                              int (*param_missing) (const EVP_PKEY *pk),
28867                              int (*param_copy) (EVP_PKEY *to,
28868                                                 const EVP_PKEY *from),
28869                              int (*param_cmp) (const EVP_PKEY *a,
28870                                                const EVP_PKEY *b),
28871                              int (*param_print) (BIO *out,
28872                                                  const EVP_PKEY *pkey,
28873                                                  int indent,
28874                                                  ASN1_PCTX *pctx));
28875 
28876 void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
28877                             void (*pkey_free) (EVP_PKEY *pkey));
28878 void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
28879                             int (*pkey_ctrl) (EVP_PKEY *pkey, int op,
28880                                               long arg1, void *arg2));
28881 void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
28882                             int (*item_verify) (EVP_MD_CTX *ctx,
28883                                                 const ASN1_ITEM *it,
28884                                                 void *asn,
28885                                                 X509_ALGOR *a,
28886                                                 ASN1_BIT_STRING *sig,
28887                                                 EVP_PKEY *pkey),
28888                             int (*item_sign) (EVP_MD_CTX *ctx,
28889                                               const ASN1_ITEM *it,
28890                                               void *asn,
28891                                               X509_ALGOR *alg1,
28892                                               X509_ALGOR *alg2,
28893                                               ASN1_BIT_STRING *sig));
28894 # 1185 "/usr/include/openssl/evp.h" 3 4
28895 /* Used by GOST key encryption in TLS */
28896 # 1199 "/usr/include/openssl/evp.h" 3 4
28897 /*
28898  * Method handles all operations: don't assume any digest related defaults.
28899  */
28900 
28901 
28902 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
28903 EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);
28904 void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
28905                              const EVP_PKEY_METHOD *meth);
28906 void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src);
28907 void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
28908 int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
28909 
28910 EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
28911 EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
28912 EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
28913 void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
28914 
28915 int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
28916                       int cmd, int p1, void *p2);
28917 int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
28918                           const char *value);
28919 
28920 int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);
28921 void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);
28922 
28923 EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
28924                                const unsigned char *key, int keylen);
28925 
28926 void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
28927 void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx);
28928 EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
28929 
28930 EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
28931 
28932 void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
28933 void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
28934 
28935 int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
28936 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
28937                   unsigned char *sig, size_t *siglen,
28938                   const unsigned char *tbs, size_t tbslen);
28939 int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
28940 int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
28941                     const unsigned char *sig, size_t siglen,
28942                     const unsigned char *tbs, size_t tbslen);
28943 int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
28944 int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
28945                             unsigned char *rout, size_t *routlen,
28946                             const unsigned char *sig, size_t siglen);
28947 int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
28948 int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
28949                      unsigned char *out, size_t *outlen,
28950                      const unsigned char *in, size_t inlen);
28951 int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
28952 int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
28953                      unsigned char *out, size_t *outlen,
28954                      const unsigned char *in, size_t inlen);
28955 
28956 int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
28957 int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
28958 int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
28959 
28960 typedef int EVP_PKEY_gen_cb (EVP_PKEY_CTX *ctx);
28961 
28962 int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
28963 int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
28964 int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
28965 int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
28966 
28967 void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
28968 EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
28969 
28970 int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
28971 
28972 void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
28973                             int (*init) (EVP_PKEY_CTX *ctx));
28974 
28975 void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth,
28976                             int (*copy) (EVP_PKEY_CTX *dst,
28977                                          EVP_PKEY_CTX *src));
28978 
28979 void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth,
28980                                void (*cleanup) (EVP_PKEY_CTX *ctx));
28981 
28982 void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth,
28983                                 int (*paramgen_init) (EVP_PKEY_CTX *ctx),
28984                                 int (*paramgen) (EVP_PKEY_CTX *ctx,
28985                                                  EVP_PKEY *pkey));
28986 
28987 void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth,
28988                               int (*keygen_init) (EVP_PKEY_CTX *ctx),
28989                               int (*keygen) (EVP_PKEY_CTX *ctx,
28990                                              EVP_PKEY *pkey));
28991 
28992 void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth,
28993                             int (*sign_init) (EVP_PKEY_CTX *ctx),
28994                             int (*sign) (EVP_PKEY_CTX *ctx,
28995                                          unsigned char *sig, size_t *siglen,
28996                                          const unsigned char *tbs,
28997                                          size_t tbslen));
28998 
28999 void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth,
29000                               int (*verify_init) (EVP_PKEY_CTX *ctx),
29001                               int (*verify) (EVP_PKEY_CTX *ctx,
29002                                              const unsigned char *sig,
29003                                              size_t siglen,
29004                                              const unsigned char *tbs,
29005                                              size_t tbslen));
29006 
29007 void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth,
29008                                       int (*verify_recover_init) (EVP_PKEY_CTX
29009                                                                   *ctx),
29010                                       int (*verify_recover) (EVP_PKEY_CTX
29011                                                              *ctx,
29012                                                              unsigned char
29013                                                              *sig,
29014                                                              size_t *siglen,
29015                                                              const unsigned
29016                                                              char *tbs,
29017                                                              size_t tbslen));
29018 
29019 void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth,
29020                                int (*signctx_init) (EVP_PKEY_CTX *ctx,
29021                                                     EVP_MD_CTX *mctx),
29022                                int (*signctx) (EVP_PKEY_CTX *ctx,
29023                                                unsigned char *sig,
29024                                                size_t *siglen,
29025                                                EVP_MD_CTX *mctx));
29026 
29027 void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth,
29028                                  int (*verifyctx_init) (EVP_PKEY_CTX *ctx,
29029                                                         EVP_MD_CTX *mctx),
29030                                  int (*verifyctx) (EVP_PKEY_CTX *ctx,
29031                                                    const unsigned char *sig,
29032                                                    int siglen,
29033                                                    EVP_MD_CTX *mctx));
29034 
29035 void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth,
29036                                int (*encrypt_init) (EVP_PKEY_CTX *ctx),
29037                                int (*encryptfn) (EVP_PKEY_CTX *ctx,
29038                                                  unsigned char *out,
29039                                                  size_t *outlen,
29040                                                  const unsigned char *in,
29041                                                  size_t inlen));
29042 
29043 void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth,
29044                                int (*decrypt_init) (EVP_PKEY_CTX *ctx),
29045                                int (*decrypt) (EVP_PKEY_CTX *ctx,
29046                                                unsigned char *out,
29047                                                size_t *outlen,
29048                                                const unsigned char *in,
29049                                                size_t inlen));
29050 
29051 void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth,
29052                               int (*derive_init) (EVP_PKEY_CTX *ctx),
29053                               int (*derive) (EVP_PKEY_CTX *ctx,
29054                                              unsigned char *key,
29055                                              size_t *keylen));
29056 
29057 void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
29058                             int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
29059                                          void *p2),
29060                             int (*ctrl_str) (EVP_PKEY_CTX *ctx,
29061                                              const char *type,
29062                                              const char *value));
29063 
29064 void EVP_PKEY_meth_get_init(EVP_PKEY_METHOD *pmeth,
29065                             int (**pinit) (EVP_PKEY_CTX *ctx));
29066 
29067 void EVP_PKEY_meth_get_copy(EVP_PKEY_METHOD *pmeth,
29068                             int (**pcopy) (EVP_PKEY_CTX *dst,
29069                                            EVP_PKEY_CTX *src));
29070 
29071 void EVP_PKEY_meth_get_cleanup(EVP_PKEY_METHOD *pmeth,
29072                                void (**pcleanup) (EVP_PKEY_CTX *ctx));
29073 
29074 void EVP_PKEY_meth_get_paramgen(EVP_PKEY_METHOD *pmeth,
29075                                 int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
29076                                 int (**pparamgen) (EVP_PKEY_CTX *ctx,
29077                                                    EVP_PKEY *pkey));
29078 
29079 void EVP_PKEY_meth_get_keygen(EVP_PKEY_METHOD *pmeth,
29080                               int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
29081                               int (**pkeygen) (EVP_PKEY_CTX *ctx,
29082                                                EVP_PKEY *pkey));
29083 
29084 void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
29085                             int (**psign_init) (EVP_PKEY_CTX *ctx),
29086                             int (**psign) (EVP_PKEY_CTX *ctx,
29087                                            unsigned char *sig, size_t *siglen,
29088                                            const unsigned char *tbs,
29089                                            size_t tbslen));
29090 
29091 void EVP_PKEY_meth_get_verify(EVP_PKEY_METHOD *pmeth,
29092                               int (**pverify_init) (EVP_PKEY_CTX *ctx),
29093                               int (**pverify) (EVP_PKEY_CTX *ctx,
29094                                                const unsigned char *sig,
29095                                                size_t siglen,
29096                                                const unsigned char *tbs,
29097                                                size_t tbslen));
29098 
29099 void EVP_PKEY_meth_get_verify_recover(EVP_PKEY_METHOD *pmeth,
29100                                       int (**pverify_recover_init) (EVP_PKEY_CTX
29101                                                                     *ctx),
29102                                       int (**pverify_recover) (EVP_PKEY_CTX
29103                                                                *ctx,
29104                                                                unsigned char
29105                                                                *sig,
29106                                                                size_t *siglen,
29107                                                                const unsigned
29108                                                                char *tbs,
29109                                                                size_t tbslen));
29110 
29111 void EVP_PKEY_meth_get_signctx(EVP_PKEY_METHOD *pmeth,
29112                                int (**psignctx_init) (EVP_PKEY_CTX *ctx,
29113                                                       EVP_MD_CTX *mctx),
29114                                int (**psignctx) (EVP_PKEY_CTX *ctx,
29115                                                  unsigned char *sig,
29116                                                  size_t *siglen,
29117                                                  EVP_MD_CTX *mctx));
29118 
29119 void EVP_PKEY_meth_get_verifyctx(EVP_PKEY_METHOD *pmeth,
29120                                  int (**pverifyctx_init) (EVP_PKEY_CTX *ctx,
29121                                                           EVP_MD_CTX *mctx),
29122                                  int (**pverifyctx) (EVP_PKEY_CTX *ctx,
29123                                                      const unsigned char *sig,
29124                                                      int siglen,
29125                                                      EVP_MD_CTX *mctx));
29126 
29127 void EVP_PKEY_meth_get_encrypt(EVP_PKEY_METHOD *pmeth,
29128                                int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
29129                                int (**pencryptfn) (EVP_PKEY_CTX *ctx,
29130                                                    unsigned char *out,
29131                                                    size_t *outlen,
29132                                                    const unsigned char *in,
29133                                                    size_t inlen));
29134 
29135 void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
29136                                int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
29137                                int (**pdecrypt) (EVP_PKEY_CTX *ctx,
29138                                                  unsigned char *out,
29139                                                  size_t *outlen,
29140                                                  const unsigned char *in,
29141                                                  size_t inlen));
29142 
29143 void EVP_PKEY_meth_get_derive(EVP_PKEY_METHOD *pmeth,
29144                               int (**pderive_init) (EVP_PKEY_CTX *ctx),
29145                               int (**pderive) (EVP_PKEY_CTX *ctx,
29146                                                unsigned char *key,
29147                                                size_t *keylen));
29148 
29149 void EVP_PKEY_meth_get_ctrl(EVP_PKEY_METHOD *pmeth,
29150                             int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
29151                                            void *p2),
29152                             int (**pctrl_str) (EVP_PKEY_CTX *ctx,
29153                                                const char *type,
29154                                                const char *value));
29155 
29156 void EVP_add_alg_module(void);
29157 
29158 /* BEGIN ERROR CODES */
29159 /*
29160  * The following lines are auto generated by the script mkerr.pl. Any changes
29161  * made after this point may be overwritten when the script is next run.
29162  */
29163 
29164 void ERR_load_EVP_strings(void);
29165 
29166 /* Error codes for the EVP functions. */
29167 
29168 /* Function codes. */
29169 # 1554 "/usr/include/openssl/evp.h" 3 4
29170 /* Reason codes. */
29171 # 74 "/usr/include/openssl/x509.h" 2 3 4
29172 
29173 
29174 # 1 "/usr/include/openssl/bio.h" 1 3 4
29175 /* crypto/bio/bio.h */
29176 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
29177  * All rights reserved.
29178  *
29179  * This package is an SSL implementation written
29180  * by Eric Young (eay@cryptsoft.com).
29181  * The implementation was written so as to conform with Netscapes SSL.
29182  *
29183  * This library is free for commercial and non-commercial use as long as
29184  * the following conditions are aheared to.  The following conditions
29185  * apply to all code found in this distribution, be it the RC4, RSA,
29186  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
29187  * included with this distribution is covered by the same copyright terms
29188  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
29189  *
29190  * Copyright remains Eric Young's, and as such any Copyright notices in
29191  * the code are not to be removed.
29192  * If this package is used in a product, Eric Young should be given attribution
29193  * as the author of the parts of the library used.
29194  * This can be in the form of a textual message at program startup or
29195  * in documentation (online or textual) provided with the package.
29196  *
29197  * Redistribution and use in source and binary forms, with or without
29198  * modification, are permitted provided that the following conditions
29199  * are met:
29200  * 1. Redistributions of source code must retain the copyright
29201  *    notice, this list of conditions and the following disclaimer.
29202  * 2. Redistributions in binary form must reproduce the above copyright
29203  *    notice, this list of conditions and the following disclaimer in the
29204  *    documentation and/or other materials provided with the distribution.
29205  * 3. All advertising materials mentioning features or use of this software
29206  *    must display the following acknowledgement:
29207  *    "This product includes cryptographic software written by
29208  *     Eric Young (eay@cryptsoft.com)"
29209  *    The word 'cryptographic' can be left out if the rouines from the library
29210  *    being used are not cryptographic related :-).
29211  * 4. If you include any Windows specific code (or a derivative thereof) from
29212  *    the apps directory (application code) you must include an acknowledgement:
29213  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
29214  *
29215  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
29216  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29217  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29218  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
29219  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29220  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29221  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29222  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29223  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29224  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29225  * SUCH DAMAGE.
29226  *
29227  * The licence and distribution terms for any publically available version or
29228  * derivative of this code cannot be changed.  i.e. this code cannot simply be
29229  * copied and put under another distribution licence
29230  * [including the GNU Public Licence.]
29231  */
29232 # 77 "/usr/include/openssl/x509.h" 2 3 4
29233 
29234 # 1 "/usr/include/openssl/stack.h" 1 3 4
29235 /* crypto/stack/stack.h */
29236 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
29237  * All rights reserved.
29238  *
29239  * This package is an SSL implementation written
29240  * by Eric Young (eay@cryptsoft.com).
29241  * The implementation was written so as to conform with Netscapes SSL.
29242  *
29243  * This library is free for commercial and non-commercial use as long as
29244  * the following conditions are aheared to.  The following conditions
29245  * apply to all code found in this distribution, be it the RC4, RSA,
29246  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
29247  * included with this distribution is covered by the same copyright terms
29248  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
29249  *
29250  * Copyright remains Eric Young's, and as such any Copyright notices in
29251  * the code are not to be removed.
29252  * If this package is used in a product, Eric Young should be given attribution
29253  * as the author of the parts of the library used.
29254  * This can be in the form of a textual message at program startup or
29255  * in documentation (online or textual) provided with the package.
29256  *
29257  * Redistribution and use in source and binary forms, with or without
29258  * modification, are permitted provided that the following conditions
29259  * are met:
29260  * 1. Redistributions of source code must retain the copyright
29261  *    notice, this list of conditions and the following disclaimer.
29262  * 2. Redistributions in binary form must reproduce the above copyright
29263  *    notice, this list of conditions and the following disclaimer in the
29264  *    documentation and/or other materials provided with the distribution.
29265  * 3. All advertising materials mentioning features or use of this software
29266  *    must display the following acknowledgement:
29267  *    "This product includes cryptographic software written by
29268  *     Eric Young (eay@cryptsoft.com)"
29269  *    The word 'cryptographic' can be left out if the rouines from the library
29270  *    being used are not cryptographic related :-).
29271  * 4. If you include any Windows specific code (or a derivative thereof) from
29272  *    the apps directory (application code) you must include an acknowledgement:
29273  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
29274  *
29275  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
29276  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29277  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29278  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
29279  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29280  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29281  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29282  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29283  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29284  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29285  * SUCH DAMAGE.
29286  *
29287  * The licence and distribution terms for any publically available version or
29288  * derivative of this code cannot be changed.  i.e. this code cannot simply be
29289  * copied and put under another distribution licence
29290  * [including the GNU Public Licence.]
29291  */
29292 # 79 "/usr/include/openssl/x509.h" 2 3 4
29293 # 1 "/usr/include/openssl/asn1.h" 1 3 4
29294 /* crypto/asn1/asn1.h */
29295 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
29296  * All rights reserved.
29297  *
29298  * This package is an SSL implementation written
29299  * by Eric Young (eay@cryptsoft.com).
29300  * The implementation was written so as to conform with Netscapes SSL.
29301  *
29302  * This library is free for commercial and non-commercial use as long as
29303  * the following conditions are aheared to.  The following conditions
29304  * apply to all code found in this distribution, be it the RC4, RSA,
29305  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
29306  * included with this distribution is covered by the same copyright terms
29307  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
29308  *
29309  * Copyright remains Eric Young's, and as such any Copyright notices in
29310  * the code are not to be removed.
29311  * If this package is used in a product, Eric Young should be given attribution
29312  * as the author of the parts of the library used.
29313  * This can be in the form of a textual message at program startup or
29314  * in documentation (online or textual) provided with the package.
29315  *
29316  * Redistribution and use in source and binary forms, with or without
29317  * modification, are permitted provided that the following conditions
29318  * are met:
29319  * 1. Redistributions of source code must retain the copyright
29320  *    notice, this list of conditions and the following disclaimer.
29321  * 2. Redistributions in binary form must reproduce the above copyright
29322  *    notice, this list of conditions and the following disclaimer in the
29323  *    documentation and/or other materials provided with the distribution.
29324  * 3. All advertising materials mentioning features or use of this software
29325  *    must display the following acknowledgement:
29326  *    "This product includes cryptographic software written by
29327  *     Eric Young (eay@cryptsoft.com)"
29328  *    The word 'cryptographic' can be left out if the rouines from the library
29329  *    being used are not cryptographic related :-).
29330  * 4. If you include any Windows specific code (or a derivative thereof) from
29331  *    the apps directory (application code) you must include an acknowledgement:
29332  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
29333  *
29334  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
29335  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29336  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29337  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
29338  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29339  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29340  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29341  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29342  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29343  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29344  * SUCH DAMAGE.
29345  *
29346  * The licence and distribution terms for any publically available version or
29347  * derivative of this code cannot be changed.  i.e. this code cannot simply be
29348  * copied and put under another distribution licence
29349  * [including the GNU Public Licence.]
29350  */
29351 # 80 "/usr/include/openssl/x509.h" 2 3 4
29352 # 1 "/usr/include/openssl/safestack.h" 1 3 4
29353 /* ====================================================================
29354  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
29355  *
29356  * Redistribution and use in source and binary forms, with or without
29357  * modification, are permitted provided that the following conditions
29358  * are met:
29359  *
29360  * 1. Redistributions of source code must retain the above copyright
29361  *    notice, this list of conditions and the following disclaimer.
29362  *
29363  * 2. Redistributions in binary form must reproduce the above copyright
29364  *    notice, this list of conditions and the following disclaimer in
29365  *    the documentation and/or other materials provided with the
29366  *    distribution.
29367  *
29368  * 3. All advertising materials mentioning features or use of this
29369  *    software must display the following acknowledgment:
29370  *    "This product includes software developed by the OpenSSL Project
29371  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
29372  *
29373  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
29374  *    endorse or promote products derived from this software without
29375  *    prior written permission. For written permission, please contact
29376  *    openssl-core@openssl.org.
29377  *
29378  * 5. Products derived from this software may not be called "OpenSSL"
29379  *    nor may "OpenSSL" appear in their names without prior written
29380  *    permission of the OpenSSL Project.
29381  *
29382  * 6. Redistributions of any form whatsoever must retain the following
29383  *    acknowledgment:
29384  *    "This product includes software developed by the OpenSSL Project
29385  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
29386  *
29387  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
29388  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29389  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29390  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
29391  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29392  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29393  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29394  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29395  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29396  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29397  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29398  * OF THE POSSIBILITY OF SUCH DAMAGE.
29399  * ====================================================================
29400  *
29401  * This product includes cryptographic software written by Eric Young
29402  * (eay@cryptsoft.com).  This product includes software written by Tim
29403  * Hudson (tjh@cryptsoft.com).
29404  *
29405  */
29406 # 81 "/usr/include/openssl/x509.h" 2 3 4
29407 
29408 
29409 # 1 "/usr/include/openssl/ec.h" 1 3 4
29410 /* crypto/ec/ec.h */
29411 /*
29412  * Originally written by Bodo Moeller for the OpenSSL project.
29413  */
29414 /**
29415  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
29416  * \author Originally written by Bodo Moeller for the OpenSSL project
29417  */
29418 /* ====================================================================
29419  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
29420  *
29421  * Redistribution and use in source and binary forms, with or without
29422  * modification, are permitted provided that the following conditions
29423  * are met:
29424  *
29425  * 1. Redistributions of source code must retain the above copyright
29426  *    notice, this list of conditions and the following disclaimer.
29427  *
29428  * 2. Redistributions in binary form must reproduce the above copyright
29429  *    notice, this list of conditions and the following disclaimer in
29430  *    the documentation and/or other materials provided with the
29431  *    distribution.
29432  *
29433  * 3. All advertising materials mentioning features or use of this
29434  *    software must display the following acknowledgment:
29435  *    "This product includes software developed by the OpenSSL Project
29436  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
29437  *
29438  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
29439  *    endorse or promote products derived from this software without
29440  *    prior written permission. For written permission, please contact
29441  *    openssl-core@openssl.org.
29442  *
29443  * 5. Products derived from this software may not be called "OpenSSL"
29444  *    nor may "OpenSSL" appear in their names without prior written
29445  *    permission of the OpenSSL Project.
29446  *
29447  * 6. Redistributions of any form whatsoever must retain the following
29448  *    acknowledgment:
29449  *    "This product includes software developed by the OpenSSL Project
29450  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
29451  *
29452  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
29453  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29454  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29455  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
29456  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29457  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29458  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29459  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29460  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29461  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29462  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29463  * OF THE POSSIBILITY OF SUCH DAMAGE.
29464  * ====================================================================
29465  *
29466  * This product includes cryptographic software written by Eric Young
29467  * (eay@cryptsoft.com).  This product includes software written by Tim
29468  * Hudson (tjh@cryptsoft.com).
29469  *
29470  */
29471 /* ====================================================================
29472  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
29473  *
29474  * Portions of the attached software ("Contribution") are developed by
29475  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
29476  *
29477  * The Contribution is licensed pursuant to the OpenSSL open source
29478  * license provided above.
29479  *
29480  * The elliptic curve binary polynomial software is originally written by
29481  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
29482  *
29483  */
29484 
29485 
29486 
29487 
29488 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
29489 /* opensslconf.h */
29490 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
29491 
29492 
29493 
29494 
29495 /* OpenSSL was configured with the following options: */
29496 # 108 "/usr/include/openssl/opensslconf.h" 3 4
29497 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
29498    asks for it.  This is a transient feature that is provided for those
29499    who haven't had the time to do the appropriate changes in their
29500    applications.  */
29501 # 204 "/usr/include/openssl/opensslconf.h" 3 4
29502 /* crypto/opensslconf.h.in */
29503 
29504 /* Generate 80386 code? */
29505 # 80 "/usr/include/openssl/ec.h" 2 3 4
29506 
29507 
29508 
29509 
29510 
29511 # 1 "/usr/include/openssl/asn1.h" 1 3 4
29512 /* crypto/asn1/asn1.h */
29513 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
29514  * All rights reserved.
29515  *
29516  * This package is an SSL implementation written
29517  * by Eric Young (eay@cryptsoft.com).
29518  * The implementation was written so as to conform with Netscapes SSL.
29519  *
29520  * This library is free for commercial and non-commercial use as long as
29521  * the following conditions are aheared to.  The following conditions
29522  * apply to all code found in this distribution, be it the RC4, RSA,
29523  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
29524  * included with this distribution is covered by the same copyright terms
29525  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
29526  *
29527  * Copyright remains Eric Young's, and as such any Copyright notices in
29528  * the code are not to be removed.
29529  * If this package is used in a product, Eric Young should be given attribution
29530  * as the author of the parts of the library used.
29531  * This can be in the form of a textual message at program startup or
29532  * in documentation (online or textual) provided with the package.
29533  *
29534  * Redistribution and use in source and binary forms, with or without
29535  * modification, are permitted provided that the following conditions
29536  * are met:
29537  * 1. Redistributions of source code must retain the copyright
29538  *    notice, this list of conditions and the following disclaimer.
29539  * 2. Redistributions in binary form must reproduce the above copyright
29540  *    notice, this list of conditions and the following disclaimer in the
29541  *    documentation and/or other materials provided with the distribution.
29542  * 3. All advertising materials mentioning features or use of this software
29543  *    must display the following acknowledgement:
29544  *    "This product includes cryptographic software written by
29545  *     Eric Young (eay@cryptsoft.com)"
29546  *    The word 'cryptographic' can be left out if the rouines from the library
29547  *    being used are not cryptographic related :-).
29548  * 4. If you include any Windows specific code (or a derivative thereof) from
29549  *    the apps directory (application code) you must include an acknowledgement:
29550  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
29551  *
29552  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
29553  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29554  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29555  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
29556  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29557  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29558  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29559  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29560  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29561  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29562  * SUCH DAMAGE.
29563  *
29564  * The licence and distribution terms for any publically available version or
29565  * derivative of this code cannot be changed.  i.e. this code cannot simply be
29566  * copied and put under another distribution licence
29567  * [including the GNU Public Licence.]
29568  */
29569 # 86 "/usr/include/openssl/ec.h" 2 3 4
29570 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
29571 /* ====================================================================
29572  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
29573  *
29574  * Redistribution and use in source and binary forms, with or without
29575  * modification, are permitted provided that the following conditions
29576  * are met:
29577  *
29578  * 1. Redistributions of source code must retain the above copyright
29579  *    notice, this list of conditions and the following disclaimer.
29580  *
29581  * 2. Redistributions in binary form must reproduce the above copyright
29582  *    notice, this list of conditions and the following disclaimer in
29583  *    the documentation and/or other materials provided with the
29584  *    distribution.
29585  *
29586  * 3. All advertising materials mentioning features or use of this
29587  *    software must display the following acknowledgment:
29588  *    "This product includes software developed by the OpenSSL Project
29589  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
29590  *
29591  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
29592  *    endorse or promote products derived from this software without
29593  *    prior written permission. For written permission, please contact
29594  *    openssl-core@openssl.org.
29595  *
29596  * 5. Products derived from this software may not be called "OpenSSL"
29597  *    nor may "OpenSSL" appear in their names without prior written
29598  *    permission of the OpenSSL Project.
29599  *
29600  * 6. Redistributions of any form whatsoever must retain the following
29601  *    acknowledgment:
29602  *    "This product includes software developed by the OpenSSL Project
29603  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
29604  *
29605  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
29606  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29607  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29608  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
29609  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29610  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29611  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29612  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29613  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29614  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29615  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29616  * OF THE POSSIBILITY OF SUCH DAMAGE.
29617  * ====================================================================
29618  *
29619  * This product includes cryptographic software written by Eric Young
29620  * (eay@cryptsoft.com).  This product includes software written by Tim
29621  * Hudson (tjh@cryptsoft.com).
29622  *
29623  */
29624 # 87 "/usr/include/openssl/ec.h" 2 3 4
29625 
29626 # 1 "/usr/include/openssl/bn.h" 1 3 4
29627 /* crypto/bn/bn.h */
29628 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
29629  * All rights reserved.
29630  *
29631  * This package is an SSL implementation written
29632  * by Eric Young (eay@cryptsoft.com).
29633  * The implementation was written so as to conform with Netscapes SSL.
29634  *
29635  * This library is free for commercial and non-commercial use as long as
29636  * the following conditions are aheared to.  The following conditions
29637  * apply to all code found in this distribution, be it the RC4, RSA,
29638  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
29639  * included with this distribution is covered by the same copyright terms
29640  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
29641  *
29642  * Copyright remains Eric Young's, and as such any Copyright notices in
29643  * the code are not to be removed.
29644  * If this package is used in a product, Eric Young should be given attribution
29645  * as the author of the parts of the library used.
29646  * This can be in the form of a textual message at program startup or
29647  * in documentation (online or textual) provided with the package.
29648  *
29649  * Redistribution and use in source and binary forms, with or without
29650  * modification, are permitted provided that the following conditions
29651  * are met:
29652  * 1. Redistributions of source code must retain the copyright
29653  *    notice, this list of conditions and the following disclaimer.
29654  * 2. Redistributions in binary form must reproduce the above copyright
29655  *    notice, this list of conditions and the following disclaimer in the
29656  *    documentation and/or other materials provided with the distribution.
29657  * 3. All advertising materials mentioning features or use of this software
29658  *    must display the following acknowledgement:
29659  *    "This product includes cryptographic software written by
29660  *     Eric Young (eay@cryptsoft.com)"
29661  *    The word 'cryptographic' can be left out if the rouines from the library
29662  *    being used are not cryptographic related :-).
29663  * 4. If you include any Windows specific code (or a derivative thereof) from
29664  *    the apps directory (application code) you must include an acknowledgement:
29665  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
29666  *
29667  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
29668  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29669  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29670  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
29671  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29672  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29673  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29674  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29675  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29676  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29677  * SUCH DAMAGE.
29678  *
29679  * The licence and distribution terms for any publically available version or
29680  * derivative of this code cannot be changed.  i.e. this code cannot simply be
29681  * copied and put under another distribution licence
29682  * [including the GNU Public Licence.]
29683  */
29684 /* ====================================================================
29685  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
29686  *
29687  * Redistribution and use in source and binary forms, with or without
29688  * modification, are permitted provided that the following conditions
29689  * are met:
29690  *
29691  * 1. Redistributions of source code must retain the above copyright
29692  *    notice, this list of conditions and the following disclaimer.
29693  *
29694  * 2. Redistributions in binary form must reproduce the above copyright
29695  *    notice, this list of conditions and the following disclaimer in
29696  *    the documentation and/or other materials provided with the
29697  *    distribution.
29698  *
29699  * 3. All advertising materials mentioning features or use of this
29700  *    software must display the following acknowledgment:
29701  *    "This product includes software developed by the OpenSSL Project
29702  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
29703  *
29704  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
29705  *    endorse or promote products derived from this software without
29706  *    prior written permission. For written permission, please contact
29707  *    openssl-core@openssl.org.
29708  *
29709  * 5. Products derived from this software may not be called "OpenSSL"
29710  *    nor may "OpenSSL" appear in their names without prior written
29711  *    permission of the OpenSSL Project.
29712  *
29713  * 6. Redistributions of any form whatsoever must retain the following
29714  *    acknowledgment:
29715  *    "This product includes software developed by the OpenSSL Project
29716  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
29717  *
29718  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
29719  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29720  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29721  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
29722  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29723  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29724  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29725  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29726  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29727  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29728  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29729  * OF THE POSSIBILITY OF SUCH DAMAGE.
29730  * ====================================================================
29731  *
29732  * This product includes cryptographic software written by Eric Young
29733  * (eay@cryptsoft.com).  This product includes software written by Tim
29734  * Hudson (tjh@cryptsoft.com).
29735  *
29736  */
29737 /* ====================================================================
29738  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
29739  *
29740  * Portions of the attached software ("Contribution") are developed by
29741  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
29742  *
29743  * The Contribution is licensed pursuant to the Eric Young open source
29744  * license provided above.
29745  *
29746  * The binary polynomial arithmetic software is originally written by
29747  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
29748  *
29749  */
29750 # 89 "/usr/include/openssl/ec.h" 2 3 4
29751 # 103 "/usr/include/openssl/ec.h" 3 4
29752 /** Enum for the point conversion form as defined in X9.62 (ECDSA)
29753  *  for the encoding of a elliptic curve point (x,y) */
29754 typedef enum {
29755         /** the point is encoded as z||x, where the octet z specifies
29756          *  which solution of the quadratic equation y is  */
29757     POINT_CONVERSION_COMPRESSED = 2,
29758         /** the point is encoded as z||x||y, where z is the octet 0x04  */
29759     POINT_CONVERSION_UNCOMPRESSED = 4,
29760         /** the point is encoded as z||x||y, where the octet z specifies
29761          *  which solution of the quadratic equation y is  */
29762     POINT_CONVERSION_HYBRID = 6
29763 } point_conversion_form_t;
29764 
29765 typedef struct ec_method_st EC_METHOD;
29766 
29767 typedef struct ec_group_st
29768     /*-
29769      EC_METHOD *meth;
29770      -- field definition
29771      -- curve coefficients
29772      -- optional generator with associated information (order, cofactor)
29773      -- optional extra data (precomputed table for fast computation of multiples of generator)
29774      -- ASN1 stuff
29775     */
29776     EC_GROUP;
29777 
29778 typedef struct ec_point_st EC_POINT;
29779 
29780 /********************************************************************/
29781 /*               EC_METHODs for curves over GF(p)                   */
29782 /********************************************************************/
29783 
29784 /** Returns the basic GFp ec methods which provides the basis for the
29785  *  optimized methods.
29786  *  \return  EC_METHOD object
29787  */
29788 const EC_METHOD *EC_GFp_simple_method(void);
29789 
29790 /** Returns GFp methods using montgomery multiplication.
29791  *  \return  EC_METHOD object
29792  */
29793 const EC_METHOD *EC_GFp_mont_method(void);
29794 
29795 /** Returns GFp methods using optimized methods for NIST recommended curves
29796  *  \return  EC_METHOD object
29797  */
29798 const EC_METHOD *EC_GFp_nist_method(void);
29799 # 169 "/usr/include/openssl/ec.h" 3 4
29800 /********************************************************************/
29801 /*           EC_METHOD for curves over GF(2^m)                      */
29802 /********************************************************************/
29803 
29804 /** Returns the basic GF2m ec method
29805  *  \return  EC_METHOD object
29806  */
29807 const EC_METHOD *EC_GF2m_simple_method(void);
29808 
29809 
29810 
29811 /********************************************************************/
29812 /*                   EC_GROUP functions                             */
29813 /********************************************************************/
29814 
29815 /** Creates a new EC_GROUP object
29816  *  \param   meth  EC_METHOD to use
29817  *  \return  newly created EC_GROUP object or NULL in case of an error.
29818  */
29819 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
29820 
29821 /** Frees a EC_GROUP object
29822  *  \param  group  EC_GROUP object to be freed.
29823  */
29824 void EC_GROUP_free(EC_GROUP *group);
29825 
29826 /** Clears and frees a EC_GROUP object
29827  *  \param  group  EC_GROUP object to be cleared and freed.
29828  */
29829 void EC_GROUP_clear_free(EC_GROUP *group);
29830 
29831 /** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.
29832  *  \param  dst  destination EC_GROUP object
29833  *  \param  src  source EC_GROUP object
29834  *  \return 1 on success and 0 if an error occurred.
29835  */
29836 int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
29837 
29838 /** Creates a new EC_GROUP object and copies the copies the content
29839  *  form src to the newly created EC_KEY object
29840  *  \param  src  source EC_GROUP object
29841  *  \return newly created EC_GROUP object or NULL in case of an error.
29842  */
29843 EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
29844 
29845 /** Returns the EC_METHOD of the EC_GROUP object.
29846  *  \param  group  EC_GROUP object
29847  *  \return EC_METHOD used in this EC_GROUP object.
29848  */
29849 const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);
29850 
29851 /** Returns the field type of the EC_METHOD.
29852  *  \param  meth  EC_METHOD object
29853  *  \return NID of the underlying field type OID.
29854  */
29855 int EC_METHOD_get_field_type(const EC_METHOD *meth);
29856 
29857 /** Sets the generator and it's order/cofactor of a EC_GROUP object.
29858  *  \param  group      EC_GROUP object
29859  *  \param  generator  EC_POINT object with the generator.
29860  *  \param  order      the order of the group generated by the generator.
29861  *  \param  cofactor   the index of the sub-group generated by the generator
29862  *                     in the group of all points on the elliptic curve.
29863  *  \return 1 on success and 0 if an error occured
29864  */
29865 int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
29866                            const BIGNUM *order, const BIGNUM *cofactor);
29867 
29868 /** Returns the generator of a EC_GROUP object.
29869  *  \param  group  EC_GROUP object
29870  *  \return the currently used generator (possibly NULL).
29871  */
29872 const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
29873 
29874 /** Returns the montgomery data for order(Generator)
29875  *  \param  group  EC_GROUP object
29876  *  \return the currently used generator (possibly NULL).
29877 */
29878 BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group);
29879 
29880 /** Gets the order of a EC_GROUP
29881  *  \param  group  EC_GROUP object
29882  *  \param  order  BIGNUM to which the order is copied
29883  *  \param  ctx    BN_CTX object (optional)
29884  *  \return 1 on success and 0 if an error occured
29885  */
29886 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
29887 
29888 /** Gets the cofactor of a EC_GROUP
29889  *  \param  group     EC_GROUP object
29890  *  \param  cofactor  BIGNUM to which the cofactor is copied
29891  *  \param  ctx       BN_CTX object (optional)
29892  *  \return 1 on success and 0 if an error occured
29893  */
29894 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
29895                           BN_CTX *ctx);
29896 
29897 /** Sets the name of a EC_GROUP object
29898  *  \param  group  EC_GROUP object
29899  *  \param  nid    NID of the curve name OID
29900  */
29901 void EC_GROUP_set_curve_name(EC_GROUP *group, int nid);
29902 
29903 /** Returns the curve name of a EC_GROUP object
29904  *  \param  group  EC_GROUP object
29905  *  \return NID of the curve name OID or 0 if not set.
29906  */
29907 int EC_GROUP_get_curve_name(const EC_GROUP *group);
29908 
29909 void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
29910 int EC_GROUP_get_asn1_flag(const EC_GROUP *group);
29911 
29912 void EC_GROUP_set_point_conversion_form(EC_GROUP *group,
29913                                         point_conversion_form_t form);
29914 point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
29915 
29916 unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x);
29917 size_t EC_GROUP_get_seed_len(const EC_GROUP *);
29918 size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
29919 
29920 /** Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b
29921  *  \param  group  EC_GROUP object
29922  *  \param  p      BIGNUM with the prime number
29923  *  \param  a      BIGNUM with parameter a of the equation
29924  *  \param  b      BIGNUM with parameter b of the equation
29925  *  \param  ctx    BN_CTX object (optional)
29926  *  \return 1 on success and 0 if an error occured
29927  */
29928 int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
29929                            const BIGNUM *b, BN_CTX *ctx);
29930 
29931 /** Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b
29932  *  \param  group  EC_GROUP object
29933  *  \param  p      BIGNUM for the prime number
29934  *  \param  a      BIGNUM for parameter a of the equation
29935  *  \param  b      BIGNUM for parameter b of the equation
29936  *  \param  ctx    BN_CTX object (optional)
29937  *  \return 1 on success and 0 if an error occured
29938  */
29939 int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
29940                            BIGNUM *b, BN_CTX *ctx);
29941 
29942 
29943 /** Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
29944  *  \param  group  EC_GROUP object
29945  *  \param  p      BIGNUM with the polynomial defining the underlying field
29946  *  \param  a      BIGNUM with parameter a of the equation
29947  *  \param  b      BIGNUM with parameter b of the equation
29948  *  \param  ctx    BN_CTX object (optional)
29949  *  \return 1 on success and 0 if an error occured
29950  */
29951 int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
29952                             const BIGNUM *b, BN_CTX *ctx);
29953 
29954 /** Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
29955  *  \param  group  EC_GROUP object
29956  *  \param  p      BIGNUM for the polynomial defining the underlying field
29957  *  \param  a      BIGNUM for parameter a of the equation
29958  *  \param  b      BIGNUM for parameter b of the equation
29959  *  \param  ctx    BN_CTX object (optional)
29960  *  \return 1 on success and 0 if an error occured
29961  */
29962 int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
29963                             BIGNUM *b, BN_CTX *ctx);
29964 
29965 /** Returns the number of bits needed to represent a field element
29966  *  \param  group  EC_GROUP object
29967  *  \return number of bits needed to represent a field element
29968  */
29969 int EC_GROUP_get_degree(const EC_GROUP *group);
29970 
29971 /** Checks whether the parameter in the EC_GROUP define a valid ec group
29972  *  \param  group  EC_GROUP object
29973  *  \param  ctx    BN_CTX object (optional)
29974  *  \return 1 if group is a valid ec group and 0 otherwise
29975  */
29976 int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
29977 
29978 /** Checks whether the discriminant of the elliptic curve is zero or not
29979  *  \param  group  EC_GROUP object
29980  *  \param  ctx    BN_CTX object (optional)
29981  *  \return 1 if the discriminant is not zero and 0 otherwise
29982  */
29983 int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);
29984 
29985 /** Compares two EC_GROUP objects
29986  *  \param  a    first EC_GROUP object
29987  *  \param  b    second EC_GROUP object
29988  *  \param  ctx  BN_CTX object (optional)
29989  *  \return 0 if both groups are equal and 1 otherwise
29990  */
29991 int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);
29992 
29993 /*
29994  * EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() after
29995  * choosing an appropriate EC_METHOD
29996  */
29997 
29998 /** Creates a new EC_GROUP object with the specified parameters defined
29999  *  over GFp (defined by the equation y^2 = x^3 + a*x + b)
30000  *  \param  p    BIGNUM with the prime number
30001  *  \param  a    BIGNUM with the parameter a of the equation
30002  *  \param  b    BIGNUM with the parameter b of the equation
30003  *  \param  ctx  BN_CTX object (optional)
30004  *  \return newly created EC_GROUP object with the specified parameters
30005  */
30006 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
30007                                  const BIGNUM *b, BN_CTX *ctx);
30008 
30009 /** Creates a new EC_GROUP object with the specified parameters defined
30010  *  over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b)
30011  *  \param  p    BIGNUM with the polynomial defining the underlying field
30012  *  \param  a    BIGNUM with the parameter a of the equation
30013  *  \param  b    BIGNUM with the parameter b of the equation
30014  *  \param  ctx  BN_CTX object (optional)
30015  *  \return newly created EC_GROUP object with the specified parameters
30016  */
30017 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
30018                                   const BIGNUM *b, BN_CTX *ctx);
30019 
30020 /** Creates a EC_GROUP object with a curve specified by a NID
30021  *  \param  nid  NID of the OID of the curve name
30022  *  \return newly created EC_GROUP object with specified curve or NULL
30023  *          if an error occurred
30024  */
30025 EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
30026 
30027 /********************************************************************/
30028 /*               handling of internal curves                        */
30029 /********************************************************************/
30030 
30031 typedef struct {
30032     int nid;
30033     const char *comment;
30034 } EC_builtin_curve;
30035 
30036 /*
30037  * EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all
30038  * available curves or zero if a error occurred. In case r ist not zero
30039  * nitems EC_builtin_curve structures are filled with the data of the first
30040  * nitems internal groups
30041  */
30042 size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
30043 
30044 const char *EC_curve_nid2nist(int nid);
30045 int EC_curve_nist2nid(const char *name);
30046 
30047 /********************************************************************/
30048 /*                    EC_POINT functions                            */
30049 /********************************************************************/
30050 
30051 /** Creates a new EC_POINT object for the specified EC_GROUP
30052  *  \param  group  EC_GROUP the underlying EC_GROUP object
30053  *  \return newly created EC_POINT object or NULL if an error occurred
30054  */
30055 EC_POINT *EC_POINT_new(const EC_GROUP *group);
30056 
30057 /** Frees a EC_POINT object
30058  *  \param  point  EC_POINT object to be freed
30059  */
30060 void EC_POINT_free(EC_POINT *point);
30061 
30062 /** Clears and frees a EC_POINT object
30063  *  \param  point  EC_POINT object to be cleared and freed
30064  */
30065 void EC_POINT_clear_free(EC_POINT *point);
30066 
30067 /** Copies EC_POINT object
30068  *  \param  dst  destination EC_POINT object
30069  *  \param  src  source EC_POINT object
30070  *  \return 1 on success and 0 if an error occured
30071  */
30072 int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
30073 
30074 /** Creates a new EC_POINT object and copies the content of the supplied
30075  *  EC_POINT
30076  *  \param  src    source EC_POINT object
30077  *  \param  group  underlying the EC_GROUP object
30078  *  \return newly created EC_POINT object or NULL if an error occurred
30079  */
30080 EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
30081 
30082 /** Returns the EC_METHOD used in EC_POINT object
30083  *  \param  point  EC_POINT object
30084  *  \return the EC_METHOD used
30085  */
30086 const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
30087 
30088 /** Sets a point to infinity (neutral element)
30089  *  \param  group  underlying EC_GROUP object
30090  *  \param  point  EC_POINT to set to infinity
30091  *  \return 1 on success and 0 if an error occured
30092  */
30093 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
30094 
30095 /** Sets the jacobian projective coordinates of a EC_POINT over GFp
30096  *  \param  group  underlying EC_GROUP object
30097  *  \param  p      EC_POINT object
30098  *  \param  x      BIGNUM with the x-coordinate
30099  *  \param  y      BIGNUM with the y-coordinate
30100  *  \param  z      BIGNUM with the z-coordinate
30101  *  \param  ctx    BN_CTX object (optional)
30102  *  \return 1 on success and 0 if an error occured
30103  */
30104 int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group,
30105                                              EC_POINT *p, const BIGNUM *x,
30106                                              const BIGNUM *y, const BIGNUM *z,
30107                                              BN_CTX *ctx);
30108 
30109 /** Gets the jacobian projective coordinates of a EC_POINT over GFp
30110  *  \param  group  underlying EC_GROUP object
30111  *  \param  p      EC_POINT object
30112  *  \param  x      BIGNUM for the x-coordinate
30113  *  \param  y      BIGNUM for the y-coordinate
30114  *  \param  z      BIGNUM for the z-coordinate
30115  *  \param  ctx    BN_CTX object (optional)
30116  *  \return 1 on success and 0 if an error occured
30117  */
30118 int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
30119                                              const EC_POINT *p, BIGNUM *x,
30120                                              BIGNUM *y, BIGNUM *z,
30121                                              BN_CTX *ctx);
30122 
30123 /** Sets the affine coordinates of a EC_POINT over GFp
30124  *  \param  group  underlying EC_GROUP object
30125  *  \param  p      EC_POINT object
30126  *  \param  x      BIGNUM with the x-coordinate
30127  *  \param  y      BIGNUM with the y-coordinate
30128  *  \param  ctx    BN_CTX object (optional)
30129  *  \return 1 on success and 0 if an error occured
30130  */
30131 int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
30132                                         const BIGNUM *x, const BIGNUM *y,
30133                                         BN_CTX *ctx);
30134 
30135 /** Gets the affine coordinates of a EC_POINT over GFp
30136  *  \param  group  underlying EC_GROUP object
30137  *  \param  p      EC_POINT object
30138  *  \param  x      BIGNUM for the x-coordinate
30139  *  \param  y      BIGNUM for the y-coordinate
30140  *  \param  ctx    BN_CTX object (optional)
30141  *  \return 1 on success and 0 if an error occured
30142  */
30143 int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
30144                                         const EC_POINT *p, BIGNUM *x,
30145                                         BIGNUM *y, BN_CTX *ctx);
30146 
30147 /** Sets the x9.62 compressed coordinates of a EC_POINT over GFp
30148  *  \param  group  underlying EC_GROUP object
30149  *  \param  p      EC_POINT object
30150  *  \param  x      BIGNUM with x-coordinate
30151  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
30152  *  \param  ctx    BN_CTX object (optional)
30153  *  \return 1 on success and 0 if an error occured
30154  */
30155 int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,
30156                                             EC_POINT *p, const BIGNUM *x,
30157                                             int y_bit, BN_CTX *ctx);
30158 
30159 /** Sets the affine coordinates of a EC_POINT over GF2m
30160  *  \param  group  underlying EC_GROUP object
30161  *  \param  p      EC_POINT object
30162  *  \param  x      BIGNUM with the x-coordinate
30163  *  \param  y      BIGNUM with the y-coordinate
30164  *  \param  ctx    BN_CTX object (optional)
30165  *  \return 1 on success and 0 if an error occured
30166  */
30167 int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,
30168                                          const BIGNUM *x, const BIGNUM *y,
30169                                          BN_CTX *ctx);
30170 
30171 /** Gets the affine coordinates of a EC_POINT over GF2m
30172  *  \param  group  underlying EC_GROUP object
30173  *  \param  p      EC_POINT object
30174  *  \param  x      BIGNUM for the x-coordinate
30175  *  \param  y      BIGNUM for the y-coordinate
30176  *  \param  ctx    BN_CTX object (optional)
30177  *  \return 1 on success and 0 if an error occured
30178  */
30179 int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
30180                                          const EC_POINT *p, BIGNUM *x,
30181                                          BIGNUM *y, BN_CTX *ctx);
30182 
30183 /** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m
30184  *  \param  group  underlying EC_GROUP object
30185  *  \param  p      EC_POINT object
30186  *  \param  x      BIGNUM with x-coordinate
30187  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
30188  *  \param  ctx    BN_CTX object (optional)
30189  *  \return 1 on success and 0 if an error occured
30190  */
30191 int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
30192                                              EC_POINT *p, const BIGNUM *x,
30193                                              int y_bit, BN_CTX *ctx);
30194 
30195 /** Encodes a EC_POINT object to a octet string
30196  *  \param  group  underlying EC_GROUP object
30197  *  \param  p      EC_POINT object
30198  *  \param  form   point conversion form
30199  *  \param  buf    memory buffer for the result. If NULL the function returns
30200  *                 required buffer size.
30201  *  \param  len    length of the memory buffer
30202  *  \param  ctx    BN_CTX object (optional)
30203  *  \return the length of the encoded octet string or 0 if an error occurred
30204  */
30205 size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
30206                           point_conversion_form_t form,
30207                           unsigned char *buf, size_t len, BN_CTX *ctx);
30208 
30209 /** Decodes a EC_POINT from a octet string
30210  *  \param  group  underlying EC_GROUP object
30211  *  \param  p      EC_POINT object
30212  *  \param  buf    memory buffer with the encoded ec point
30213  *  \param  len    length of the encoded ec point
30214  *  \param  ctx    BN_CTX object (optional)
30215  *  \return 1 on success and 0 if an error occured
30216  */
30217 int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
30218                        const unsigned char *buf, size_t len, BN_CTX *ctx);
30219 
30220 /* other interfaces to point2oct/oct2point: */
30221 BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
30222                           point_conversion_form_t form, BIGNUM *, BN_CTX *);
30223 EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
30224                             EC_POINT *, BN_CTX *);
30225 char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
30226                          point_conversion_form_t form, BN_CTX *);
30227 EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
30228                              EC_POINT *, BN_CTX *);
30229 
30230 /********************************************************************/
30231 /*         functions for doing EC_POINT arithmetic                  */
30232 /********************************************************************/
30233 
30234 /** Computes the sum of two EC_POINT
30235  *  \param  group  underlying EC_GROUP object
30236  *  \param  r      EC_POINT object for the result (r = a + b)
30237  *  \param  a      EC_POINT object with the first summand
30238  *  \param  b      EC_POINT object with the second summand
30239  *  \param  ctx    BN_CTX object (optional)
30240  *  \return 1 on success and 0 if an error occured
30241  */
30242 int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
30243                  const EC_POINT *b, BN_CTX *ctx);
30244 
30245 /** Computes the double of a EC_POINT
30246  *  \param  group  underlying EC_GROUP object
30247  *  \param  r      EC_POINT object for the result (r = 2 * a)
30248  *  \param  a      EC_POINT object
30249  *  \param  ctx    BN_CTX object (optional)
30250  *  \return 1 on success and 0 if an error occured
30251  */
30252 int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
30253                  BN_CTX *ctx);
30254 
30255 /** Computes the inverse of a EC_POINT
30256  *  \param  group  underlying EC_GROUP object
30257  *  \param  a      EC_POINT object to be inverted (it's used for the result as well)
30258  *  \param  ctx    BN_CTX object (optional)
30259  *  \return 1 on success and 0 if an error occured
30260  */
30261 int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
30262 
30263 /** Checks whether the point is the neutral element of the group
30264  *  \param  group  the underlying EC_GROUP object
30265  *  \param  p      EC_POINT object
30266  *  \return 1 if the point is the neutral element and 0 otherwise
30267  */
30268 int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);
30269 
30270 /** Checks whether the point is on the curve
30271  *  \param  group  underlying EC_GROUP object
30272  *  \param  point  EC_POINT object to check
30273  *  \param  ctx    BN_CTX object (optional)
30274  *  \return 1 if point if on the curve and 0 otherwise
30275  */
30276 int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
30277                          BN_CTX *ctx);
30278 
30279 /** Compares two EC_POINTs
30280  *  \param  group  underlying EC_GROUP object
30281  *  \param  a      first EC_POINT object
30282  *  \param  b      second EC_POINT object
30283  *  \param  ctx    BN_CTX object (optional)
30284  *  \return 0 if both points are equal and a value != 0 otherwise
30285  */
30286 int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,
30287                  BN_CTX *ctx);
30288 
30289 int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx);
30290 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
30291                           EC_POINT *points[], BN_CTX *ctx);
30292 
30293 /** Computes r = generator * n sum_{i=0}^{num-1} p[i] * m[i]
30294  *  \param  group  underlying EC_GROUP object
30295  *  \param  r      EC_POINT object for the result
30296  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
30297  *  \param  num    number futher summands
30298  *  \param  p      array of size num of EC_POINT objects
30299  *  \param  m      array of size num of BIGNUM objects
30300  *  \param  ctx    BN_CTX object (optional)
30301  *  \return 1 on success and 0 if an error occured
30302  */
30303 int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
30304                   size_t num, const EC_POINT *p[], const BIGNUM *m[],
30305                   BN_CTX *ctx);
30306 
30307 /** Computes r = generator * n + q * m
30308  *  \param  group  underlying EC_GROUP object
30309  *  \param  r      EC_POINT object for the result
30310  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
30311  *  \param  q      EC_POINT object with the first factor of the second summand
30312  *  \param  m      BIGNUM with the second factor of the second summand
30313  *  \param  ctx    BN_CTX object (optional)
30314  *  \return 1 on success and 0 if an error occured
30315  */
30316 int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
30317                  const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
30318 
30319 /** Stores multiples of generator for faster point multiplication
30320  *  \param  group  EC_GROUP object
30321  *  \param  ctx    BN_CTX object (optional)
30322  *  \return 1 on success and 0 if an error occured
30323  */
30324 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
30325 
30326 /** Reports whether a precomputation has been done
30327  *  \param  group  EC_GROUP object
30328  *  \return 1 if a pre-computation has been done and 0 otherwise
30329  */
30330 int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
30331 
30332 /********************************************************************/
30333 /*                       ASN1 stuff                                 */
30334 /********************************************************************/
30335 
30336 /*
30337  * EC_GROUP_get_basis_type() returns the NID of the basis type used to
30338  * represent the field elements
30339  */
30340 int EC_GROUP_get_basis_type(const EC_GROUP *);
30341 
30342 int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
30343 int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
30344                                    unsigned int *k2, unsigned int *k3);
30345 
30346 
30347 
30348 
30349 typedef struct ecpk_parameters_st ECPKPARAMETERS;
30350 
30351 EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
30352 int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
30353 # 731 "/usr/include/openssl/ec.h" 3 4
30354 int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
30355 
30356 
30357 int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
30358 
30359 
30360 /********************************************************************/
30361 /*                      EC_KEY functions                            */
30362 /********************************************************************/
30363 
30364 typedef struct ec_key_st EC_KEY;
30365 
30366 /* some values for the encoding_flag */
30367 
30368 
30369 
30370 /* some values for the flags field */
30371 
30372 
30373 
30374 /** Creates a new EC_KEY object.
30375  *  \return EC_KEY object or NULL if an error occurred.
30376  */
30377 EC_KEY *EC_KEY_new(void);
30378 
30379 int EC_KEY_get_flags(const EC_KEY *key);
30380 
30381 void EC_KEY_set_flags(EC_KEY *key, int flags);
30382 
30383 void EC_KEY_clear_flags(EC_KEY *key, int flags);
30384 
30385 /** Creates a new EC_KEY object using a named curve as underlying
30386  *  EC_GROUP object.
30387  *  \param  nid  NID of the named curve.
30388  *  \return EC_KEY object or NULL if an error occurred.
30389  */
30390 EC_KEY *EC_KEY_new_by_curve_name(int nid);
30391 
30392 /** Frees a EC_KEY object.
30393  *  \param  key  EC_KEY object to be freed.
30394  */
30395 void EC_KEY_free(EC_KEY *key);
30396 
30397 /** Copies a EC_KEY object.
30398  *  \param  dst  destination EC_KEY object
30399  *  \param  src  src EC_KEY object
30400  *  \return dst or NULL if an error occurred.
30401  */
30402 EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
30403 
30404 /** Creates a new EC_KEY object and copies the content from src to it.
30405  *  \param  src  the source EC_KEY object
30406  *  \return newly created EC_KEY object or NULL if an error occurred.
30407  */
30408 EC_KEY *EC_KEY_dup(const EC_KEY *src);
30409 
30410 /** Increases the internal reference count of a EC_KEY object.
30411  *  \param  key  EC_KEY object
30412  *  \return 1 on success and 0 if an error occurred.
30413  */
30414 int EC_KEY_up_ref(EC_KEY *key);
30415 
30416 /** Returns the EC_GROUP object of a EC_KEY object
30417  *  \param  key  EC_KEY object
30418  *  \return the EC_GROUP object (possibly NULL).
30419  */
30420 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
30421 
30422 /** Sets the EC_GROUP of a EC_KEY object.
30423  *  \param  key    EC_KEY object
30424  *  \param  group  EC_GROUP to use in the EC_KEY object (note: the EC_KEY
30425  *                 object will use an own copy of the EC_GROUP).
30426  *  \return 1 on success and 0 if an error occurred.
30427  */
30428 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
30429 
30430 /** Returns the private key of a EC_KEY object.
30431  *  \param  key  EC_KEY object
30432  *  \return a BIGNUM with the private key (possibly NULL).
30433  */
30434 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
30435 
30436 /** Sets the private key of a EC_KEY object.
30437  *  \param  key  EC_KEY object
30438  *  \param  prv  BIGNUM with the private key (note: the EC_KEY object
30439  *               will use an own copy of the BIGNUM).
30440  *  \return 1 on success and 0 if an error occurred.
30441  */
30442 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
30443 
30444 /** Returns the public key of a EC_KEY object.
30445  *  \param  key  the EC_KEY object
30446  *  \return a EC_POINT object with the public key (possibly NULL)
30447  */
30448 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
30449 
30450 /** Sets the public key of a EC_KEY object.
30451  *  \param  key  EC_KEY object
30452  *  \param  pub  EC_POINT object with the public key (note: the EC_KEY object
30453  *               will use an own copy of the EC_POINT object).
30454  *  \return 1 on success and 0 if an error occurred.
30455  */
30456 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
30457 
30458 unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
30459 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
30460 point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);
30461 void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform);
30462 /* functions to set/get method specific data  */
30463 void *EC_KEY_get_key_method_data(EC_KEY *key,
30464                                  void *(*dup_func) (void *),
30465                                  void (*free_func) (void *),
30466                                  void (*clear_free_func) (void *));
30467 /** Sets the key method data of an EC_KEY object, if none has yet been set.
30468  *  \param  key              EC_KEY object
30469  *  \param  data             opaque data to install.
30470  *  \param  dup_func         a function that duplicates |data|.
30471  *  \param  free_func        a function that frees |data|.
30472  *  \param  clear_free_func  a function that wipes and frees |data|.
30473  *  \return the previously set data pointer, or NULL if |data| was inserted.
30474  */
30475 void *EC_KEY_insert_key_method_data(EC_KEY *key, void *data,
30476                                     void *(*dup_func) (void *),
30477                                     void (*free_func) (void *),
30478                                     void (*clear_free_func) (void *));
30479 /* wrapper functions for the underlying EC_GROUP object */
30480 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
30481 
30482 /** Creates a table of pre-computed multiples of the generator to
30483  *  accelerate further EC_KEY operations.
30484  *  \param  key  EC_KEY object
30485  *  \param  ctx  BN_CTX object (optional)
30486  *  \return 1 on success and 0 if an error occurred.
30487  */
30488 int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
30489 
30490 /** Creates a new ec private (and optional a new public) key.
30491  *  \param  key  EC_KEY object
30492  *  \return 1 on success and 0 if an error occurred.
30493  */
30494 int EC_KEY_generate_key(EC_KEY *key);
30495 
30496 /** Verifies that a private and/or public key is valid.
30497  *  \param  key  the EC_KEY object
30498  *  \return 1 on success and 0 otherwise.
30499  */
30500 int EC_KEY_check_key(const EC_KEY *key);
30501 
30502 /** Sets a public key from affine coordindates performing
30503  *  neccessary NIST PKV tests.
30504  *  \param  key  the EC_KEY object
30505  *  \param  x    public key x coordinate
30506  *  \param  y    public key y coordinate
30507  *  \return 1 on success and 0 otherwise.
30508  */
30509 int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
30510                                              BIGNUM *y);
30511 
30512 /********************************************************************/
30513 /*        de- and encoding functions for SEC1 ECPrivateKey          */
30514 /********************************************************************/
30515 
30516 /** Decodes a private key from a memory buffer.
30517  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
30518  *  \param  in   pointer to memory with the DER encoded private key
30519  *  \param  len  length of the DER encoded private key
30520  *  \return the decoded private key or NULL if an error occurred.
30521  */
30522 EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len);
30523 
30524 /** Encodes a private key object and stores the result in a buffer.
30525  *  \param  key  the EC_KEY object to encode
30526  *  \param  out  the buffer for the result (if NULL the function returns number
30527  *               of bytes needed).
30528  *  \return 1 on success and 0 if an error occurred.
30529  */
30530 int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out);
30531 
30532 /********************************************************************/
30533 /*        de- and encoding functions for EC parameters              */
30534 /********************************************************************/
30535 
30536 /** Decodes ec parameter from a memory buffer.
30537  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
30538  *  \param  in   pointer to memory with the DER encoded ec parameters
30539  *  \param  len  length of the DER encoded ec parameters
30540  *  \return a EC_KEY object with the decoded parameters or NULL if an error
30541  *          occurred.
30542  */
30543 EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len);
30544 
30545 /** Encodes ec parameter and stores the result in a buffer.
30546  *  \param  key  the EC_KEY object with ec paramters to encode
30547  *  \param  out  the buffer for the result (if NULL the function returns number
30548  *               of bytes needed).
30549  *  \return 1 on success and 0 if an error occurred.
30550  */
30551 int i2d_ECParameters(EC_KEY *key, unsigned char **out);
30552 
30553 /********************************************************************/
30554 /*         de- and encoding functions for EC public key             */
30555 /*         (octet string, not DER -- hence 'o2i' and 'i2o')         */
30556 /********************************************************************/
30557 
30558 /** Decodes a ec public key from a octet string.
30559  *  \param  key  a pointer to a EC_KEY object which should be used
30560  *  \param  in   memory buffer with the encoded public key
30561  *  \param  len  length of the encoded public key
30562  *  \return EC_KEY object with decoded public key or NULL if an error
30563  *          occurred.
30564  */
30565 EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len);
30566 
30567 /** Encodes a ec public key in an octet string.
30568  *  \param  key  the EC_KEY object with the public key
30569  *  \param  out  the buffer for the result (if NULL the function returns number
30570  *               of bytes needed).
30571  *  \return 1 on success and 0 if an error occurred
30572  */
30573 int i2o_ECPublicKey(EC_KEY *key, unsigned char **out);
30574 
30575 
30576 /** Prints out the ec parameters on human readable form.
30577  *  \param  bp   BIO object to which the information is printed
30578  *  \param  key  EC_KEY object
30579  *  \return 1 on success and 0 if an error occurred
30580  */
30581 int ECParameters_print(BIO *bp, const EC_KEY *key);
30582 
30583 /** Prints out the contents of a EC_KEY object
30584  *  \param  bp   BIO object to which the information is printed
30585  *  \param  key  EC_KEY object
30586  *  \param  off  line offset
30587  *  \return 1 on success and 0 if an error occurred
30588  */
30589 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
30590 
30591 
30592 
30593 /** Prints out the ec parameters on human readable form.
30594  *  \param  fp   file descriptor to which the information is printed
30595  *  \param  key  EC_KEY object
30596  *  \return 1 on success and 0 if an error occurred
30597  */
30598 int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
30599 
30600 /** Prints out the contents of a EC_KEY object
30601  *  \param  fp   file descriptor to which the information is printed
30602  *  \param  key  EC_KEY object
30603  *  \param  off  line offset
30604  *  \return 1 on success and 0 if an error occurred
30605  */
30606 int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
30607 # 1067 "/usr/include/openssl/ec.h" 3 4
30608 /* KDF types */
30609 
30610 
30611 
30612 /* BEGIN ERROR CODES */
30613 /*
30614  * The following lines are auto generated by the script mkerr.pl. Any changes
30615  * made after this point may be overwritten when the script is next run.
30616  */
30617 
30618 void ERR_load_EC_strings(void);
30619 
30620 /* Error codes for the EC functions. */
30621 
30622 /* Function codes. */
30623 # 1227 "/usr/include/openssl/ec.h" 3 4
30624 /* Reason codes. */
30625 # 84 "/usr/include/openssl/x509.h" 2 3 4
30626 
30627 
30628 
30629 # 1 "/usr/include/openssl/ecdsa.h" 1 3 4
30630 /* crypto/ecdsa/ecdsa.h */
30631 /**
30632  * \file   crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
30633  * \author Written by Nils Larsch for the OpenSSL project
30634  */
30635 /* ====================================================================
30636  * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
30637  *
30638  * Redistribution and use in source and binary forms, with or without
30639  * modification, are permitted provided that the following conditions
30640  * are met:
30641  *
30642  * 1. Redistributions of source code must retain the above copyright
30643  *    notice, this list of conditions and the following disclaimer.
30644  *
30645  * 2. Redistributions in binary form must reproduce the above copyright
30646  *    notice, this list of conditions and the following disclaimer in
30647  *    the documentation and/or other materials provided with the
30648  *    distribution.
30649  *
30650  * 3. All advertising materials mentioning features or use of this
30651  *    software must display the following acknowledgment:
30652  *    "This product includes software developed by the OpenSSL Project
30653  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
30654  *
30655  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
30656  *    endorse or promote products derived from this software without
30657  *    prior written permission. For written permission, please contact
30658  *    licensing@OpenSSL.org.
30659  *
30660  * 5. Products derived from this software may not be called "OpenSSL"
30661  *    nor may "OpenSSL" appear in their names without prior written
30662  *    permission of the OpenSSL Project.
30663  *
30664  * 6. Redistributions of any form whatsoever must retain the following
30665  *    acknowledgment:
30666  *    "This product includes software developed by the OpenSSL Project
30667  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
30668  *
30669  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
30670  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30671  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30672  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
30673  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30674  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30675  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30676  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30677  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30678  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30679  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30680  * OF THE POSSIBILITY OF SUCH DAMAGE.
30681  * ====================================================================
30682  *
30683  * This product includes cryptographic software written by Eric Young
30684  * (eay@cryptsoft.com).  This product includes software written by Tim
30685  * Hudson (tjh@cryptsoft.com).
30686  *
30687  */
30688 
30689 
30690 
30691 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
30692 /* opensslconf.h */
30693 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
30694 
30695 
30696 
30697 
30698 /* OpenSSL was configured with the following options: */
30699 # 108 "/usr/include/openssl/opensslconf.h" 3 4
30700 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
30701    asks for it.  This is a transient feature that is provided for those
30702    who haven't had the time to do the appropriate changes in their
30703    applications.  */
30704 # 204 "/usr/include/openssl/opensslconf.h" 3 4
30705 /* crypto/opensslconf.h.in */
30706 
30707 /* Generate 80386 code? */
30708 # 63 "/usr/include/openssl/ecdsa.h" 2 3 4
30709 
30710 
30711 
30712 
30713 
30714 # 1 "/usr/include/openssl/ec.h" 1 3 4
30715 /* crypto/ec/ec.h */
30716 /*
30717  * Originally written by Bodo Moeller for the OpenSSL project.
30718  */
30719 /**
30720  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
30721  * \author Originally written by Bodo Moeller for the OpenSSL project
30722  */
30723 /* ====================================================================
30724  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
30725  *
30726  * Redistribution and use in source and binary forms, with or without
30727  * modification, are permitted provided that the following conditions
30728  * are met:
30729  *
30730  * 1. Redistributions of source code must retain the above copyright
30731  *    notice, this list of conditions and the following disclaimer.
30732  *
30733  * 2. Redistributions in binary form must reproduce the above copyright
30734  *    notice, this list of conditions and the following disclaimer in
30735  *    the documentation and/or other materials provided with the
30736  *    distribution.
30737  *
30738  * 3. All advertising materials mentioning features or use of this
30739  *    software must display the following acknowledgment:
30740  *    "This product includes software developed by the OpenSSL Project
30741  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
30742  *
30743  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
30744  *    endorse or promote products derived from this software without
30745  *    prior written permission. For written permission, please contact
30746  *    openssl-core@openssl.org.
30747  *
30748  * 5. Products derived from this software may not be called "OpenSSL"
30749  *    nor may "OpenSSL" appear in their names without prior written
30750  *    permission of the OpenSSL Project.
30751  *
30752  * 6. Redistributions of any form whatsoever must retain the following
30753  *    acknowledgment:
30754  *    "This product includes software developed by the OpenSSL Project
30755  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
30756  *
30757  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
30758  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30759  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30760  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
30761  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30762  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30763  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30764  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30765  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30766  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30767  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30768  * OF THE POSSIBILITY OF SUCH DAMAGE.
30769  * ====================================================================
30770  *
30771  * This product includes cryptographic software written by Eric Young
30772  * (eay@cryptsoft.com).  This product includes software written by Tim
30773  * Hudson (tjh@cryptsoft.com).
30774  *
30775  */
30776 /* ====================================================================
30777  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
30778  *
30779  * Portions of the attached software ("Contribution") are developed by
30780  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
30781  *
30782  * The Contribution is licensed pursuant to the OpenSSL open source
30783  * license provided above.
30784  *
30785  * The elliptic curve binary polynomial software is originally written by
30786  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
30787  *
30788  */
30789 # 69 "/usr/include/openssl/ecdsa.h" 2 3 4
30790 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
30791 /* ====================================================================
30792  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
30793  *
30794  * Redistribution and use in source and binary forms, with or without
30795  * modification, are permitted provided that the following conditions
30796  * are met:
30797  *
30798  * 1. Redistributions of source code must retain the above copyright
30799  *    notice, this list of conditions and the following disclaimer.
30800  *
30801  * 2. Redistributions in binary form must reproduce the above copyright
30802  *    notice, this list of conditions and the following disclaimer in
30803  *    the documentation and/or other materials provided with the
30804  *    distribution.
30805  *
30806  * 3. All advertising materials mentioning features or use of this
30807  *    software must display the following acknowledgment:
30808  *    "This product includes software developed by the OpenSSL Project
30809  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
30810  *
30811  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
30812  *    endorse or promote products derived from this software without
30813  *    prior written permission. For written permission, please contact
30814  *    openssl-core@openssl.org.
30815  *
30816  * 5. Products derived from this software may not be called "OpenSSL"
30817  *    nor may "OpenSSL" appear in their names without prior written
30818  *    permission of the OpenSSL Project.
30819  *
30820  * 6. Redistributions of any form whatsoever must retain the following
30821  *    acknowledgment:
30822  *    "This product includes software developed by the OpenSSL Project
30823  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
30824  *
30825  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
30826  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30827  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30828  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
30829  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30830  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30831  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30832  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30833  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30834  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30835  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30836  * OF THE POSSIBILITY OF SUCH DAMAGE.
30837  * ====================================================================
30838  *
30839  * This product includes cryptographic software written by Eric Young
30840  * (eay@cryptsoft.com).  This product includes software written by Tim
30841  * Hudson (tjh@cryptsoft.com).
30842  *
30843  */
30844 # 70 "/usr/include/openssl/ecdsa.h" 2 3 4
30845 
30846 # 1 "/usr/include/openssl/bn.h" 1 3 4
30847 /* crypto/bn/bn.h */
30848 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
30849  * All rights reserved.
30850  *
30851  * This package is an SSL implementation written
30852  * by Eric Young (eay@cryptsoft.com).
30853  * The implementation was written so as to conform with Netscapes SSL.
30854  *
30855  * This library is free for commercial and non-commercial use as long as
30856  * the following conditions are aheared to.  The following conditions
30857  * apply to all code found in this distribution, be it the RC4, RSA,
30858  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
30859  * included with this distribution is covered by the same copyright terms
30860  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
30861  *
30862  * Copyright remains Eric Young's, and as such any Copyright notices in
30863  * the code are not to be removed.
30864  * If this package is used in a product, Eric Young should be given attribution
30865  * as the author of the parts of the library used.
30866  * This can be in the form of a textual message at program startup or
30867  * in documentation (online or textual) provided with the package.
30868  *
30869  * Redistribution and use in source and binary forms, with or without
30870  * modification, are permitted provided that the following conditions
30871  * are met:
30872  * 1. Redistributions of source code must retain the copyright
30873  *    notice, this list of conditions and the following disclaimer.
30874  * 2. Redistributions in binary form must reproduce the above copyright
30875  *    notice, this list of conditions and the following disclaimer in the
30876  *    documentation and/or other materials provided with the distribution.
30877  * 3. All advertising materials mentioning features or use of this software
30878  *    must display the following acknowledgement:
30879  *    "This product includes cryptographic software written by
30880  *     Eric Young (eay@cryptsoft.com)"
30881  *    The word 'cryptographic' can be left out if the rouines from the library
30882  *    being used are not cryptographic related :-).
30883  * 4. If you include any Windows specific code (or a derivative thereof) from
30884  *    the apps directory (application code) you must include an acknowledgement:
30885  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
30886  *
30887  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
30888  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30889  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30890  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
30891  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30892  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30893  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30894  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30895  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30896  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30897  * SUCH DAMAGE.
30898  *
30899  * The licence and distribution terms for any publically available version or
30900  * derivative of this code cannot be changed.  i.e. this code cannot simply be
30901  * copied and put under another distribution licence
30902  * [including the GNU Public Licence.]
30903  */
30904 /* ====================================================================
30905  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
30906  *
30907  * Redistribution and use in source and binary forms, with or without
30908  * modification, are permitted provided that the following conditions
30909  * are met:
30910  *
30911  * 1. Redistributions of source code must retain the above copyright
30912  *    notice, this list of conditions and the following disclaimer.
30913  *
30914  * 2. Redistributions in binary form must reproduce the above copyright
30915  *    notice, this list of conditions and the following disclaimer in
30916  *    the documentation and/or other materials provided with the
30917  *    distribution.
30918  *
30919  * 3. All advertising materials mentioning features or use of this
30920  *    software must display the following acknowledgment:
30921  *    "This product includes software developed by the OpenSSL Project
30922  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
30923  *
30924  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
30925  *    endorse or promote products derived from this software without
30926  *    prior written permission. For written permission, please contact
30927  *    openssl-core@openssl.org.
30928  *
30929  * 5. Products derived from this software may not be called "OpenSSL"
30930  *    nor may "OpenSSL" appear in their names without prior written
30931  *    permission of the OpenSSL Project.
30932  *
30933  * 6. Redistributions of any form whatsoever must retain the following
30934  *    acknowledgment:
30935  *    "This product includes software developed by the OpenSSL Project
30936  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
30937  *
30938  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
30939  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30940  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30941  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
30942  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30943  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30944  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30945  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30946  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30947  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30948  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30949  * OF THE POSSIBILITY OF SUCH DAMAGE.
30950  * ====================================================================
30951  *
30952  * This product includes cryptographic software written by Eric Young
30953  * (eay@cryptsoft.com).  This product includes software written by Tim
30954  * Hudson (tjh@cryptsoft.com).
30955  *
30956  */
30957 /* ====================================================================
30958  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
30959  *
30960  * Portions of the attached software ("Contribution") are developed by
30961  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
30962  *
30963  * The Contribution is licensed pursuant to the Eric Young open source
30964  * license provided above.
30965  *
30966  * The binary polynomial arithmetic software is originally written by
30967  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
30968  *
30969  */
30970 # 72 "/usr/include/openssl/ecdsa.h" 2 3 4
30971 
30972 
30973 
30974 
30975 
30976 
30977 typedef struct ECDSA_SIG_st {
30978     BIGNUM *r;
30979     BIGNUM *s;
30980 } ECDSA_SIG;
30981 
30982 /** Allocates and initialize a ECDSA_SIG structure
30983  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
30984  */
30985 ECDSA_SIG *ECDSA_SIG_new(void);
30986 
30987 /** frees a ECDSA_SIG structure
30988  *  \param  sig  pointer to the ECDSA_SIG structure
30989  */
30990 void ECDSA_SIG_free(ECDSA_SIG *sig);
30991 
30992 /** DER encode content of ECDSA_SIG object (note: this function modifies *pp
30993  *  (*pp += length of the DER encoded signature)).
30994  *  \param  sig  pointer to the ECDSA_SIG object
30995  *  \param  pp   pointer to a unsigned char pointer for the output or NULL
30996  *  \return the length of the DER encoded ECDSA_SIG object or 0
30997  */
30998 int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
30999 
31000 /** Decodes a DER encoded ECDSA signature (note: this function changes *pp
31001  *  (*pp += len)).
31002  *  \param  sig  pointer to ECDSA_SIG pointer (may be NULL)
31003  *  \param  pp   memory buffer with the DER encoded signature
31004  *  \param  len  length of the buffer
31005  *  \return pointer to the decoded ECDSA_SIG structure (or NULL)
31006  */
31007 ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);
31008 
31009 /** Computes the ECDSA signature of the given hash value using
31010  *  the supplied private key and returns the created signature.
31011  *  \param  dgst      pointer to the hash value
31012  *  \param  dgst_len  length of the hash value
31013  *  \param  eckey     EC_KEY object containing a private EC key
31014  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
31015  */
31016 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len,
31017                          EC_KEY *eckey);
31018 
31019 /** Computes ECDSA signature of a given hash value using the supplied
31020  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
31021  *  \param  dgst     pointer to the hash value to sign
31022  *  \param  dgstlen  length of the hash value
31023  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
31024  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
31025  *                   see ECDSA_sign_setup
31026  *  \param  eckey    EC_KEY object containing a private EC key
31027  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
31028  */
31029 ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen,
31030                             const BIGNUM *kinv, const BIGNUM *rp,
31031                             EC_KEY *eckey);
31032 
31033 /** Verifies that the supplied signature is a valid ECDSA
31034  *  signature of the supplied hash value using the supplied public key.
31035  *  \param  dgst      pointer to the hash value
31036  *  \param  dgst_len  length of the hash value
31037  *  \param  sig       ECDSA_SIG structure
31038  *  \param  eckey     EC_KEY object containing a public EC key
31039  *  \return 1 if the signature is valid, 0 if the signature is invalid
31040  *          and -1 on error
31041  */
31042 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
31043                     const ECDSA_SIG *sig, EC_KEY *eckey);
31044 
31045 const ECDSA_METHOD *ECDSA_OpenSSL(void);
31046 
31047 /** Sets the default ECDSA method
31048  *  \param  meth  new default ECDSA_METHOD
31049  */
31050 void ECDSA_set_default_method(const ECDSA_METHOD *meth);
31051 
31052 /** Returns the default ECDSA method
31053  *  \return pointer to ECDSA_METHOD structure containing the default method
31054  */
31055 const ECDSA_METHOD *ECDSA_get_default_method(void);
31056 
31057 /** Sets method to be used for the ECDSA operations
31058  *  \param  eckey  EC_KEY object
31059  *  \param  meth   new method
31060  *  \return 1 on success and 0 otherwise
31061  */
31062 int ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth);
31063 
31064 /** Returns the maximum length of the DER encoded signature
31065  *  \param  eckey  EC_KEY object
31066  *  \return numbers of bytes required for the DER encoded signature
31067  */
31068 int ECDSA_size(const EC_KEY *eckey);
31069 
31070 /** Precompute parts of the signing operation
31071  *  \param  eckey  EC_KEY object containing a private EC key
31072  *  \param  ctx    BN_CTX object (optional)
31073  *  \param  kinv   BIGNUM pointer for the inverse of k
31074  *  \param  rp     BIGNUM pointer for x coordinate of k * generator
31075  *  \return 1 on success and 0 otherwise
31076  */
31077 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp);
31078 
31079 /** Computes ECDSA signature of a given hash value using the supplied
31080  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
31081  *  \param  type     this parameter is ignored
31082  *  \param  dgst     pointer to the hash value to sign
31083  *  \param  dgstlen  length of the hash value
31084  *  \param  sig      memory for the DER encoded created signature
31085  *  \param  siglen   pointer to the length of the returned signature
31086  *  \param  eckey    EC_KEY object containing a private EC key
31087  *  \return 1 on success and 0 otherwise
31088  */
31089 int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,
31090                unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
31091 
31092 /** Computes ECDSA signature of a given hash value using the supplied
31093  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
31094  *  \param  type     this parameter is ignored
31095  *  \param  dgst     pointer to the hash value to sign
31096  *  \param  dgstlen  length of the hash value
31097  *  \param  sig      buffer to hold the DER encoded signature
31098  *  \param  siglen   pointer to the length of the returned signature
31099  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
31100  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
31101  *                   see ECDSA_sign_setup
31102  *  \param  eckey    EC_KEY object containing a private EC key
31103  *  \return 1 on success and 0 otherwise
31104  */
31105 int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen,
31106                   unsigned char *sig, unsigned int *siglen,
31107                   const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey);
31108 
31109 /** Verifies that the given signature is valid ECDSA signature
31110  *  of the supplied hash value using the specified public key.
31111  *  \param  type     this parameter is ignored
31112  *  \param  dgst     pointer to the hash value
31113  *  \param  dgstlen  length of the hash value
31114  *  \param  sig      pointer to the DER encoded signature
31115  *  \param  siglen   length of the DER encoded signature
31116  *  \param  eckey    EC_KEY object containing a public EC key
31117  *  \return 1 if the signature is valid, 0 if the signature is invalid
31118  *          and -1 on error
31119  */
31120 int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen,
31121                  const unsigned char *sig, int siglen, EC_KEY *eckey);
31122 
31123 /* the standard ex_data functions */
31124 int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
31125                            *new_func, CRYPTO_EX_dup *dup_func,
31126                            CRYPTO_EX_free *free_func);
31127 int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg);
31128 void *ECDSA_get_ex_data(EC_KEY *d, int idx);
31129 
31130 /** Allocates and initialize a ECDSA_METHOD structure
31131  *  \param ecdsa_method pointer to ECDSA_METHOD to copy.  (May be NULL)
31132  *  \return pointer to a ECDSA_METHOD structure or NULL if an error occurred
31133  */
31134 
31135 ECDSA_METHOD *ECDSA_METHOD_new(const ECDSA_METHOD *ecdsa_method);
31136 
31137 /** frees a ECDSA_METHOD structure
31138  *  \param  ecdsa_method  pointer to the ECDSA_METHOD structure
31139  */
31140 void ECDSA_METHOD_free(ECDSA_METHOD *ecdsa_method);
31141 
31142 /**  Sets application specific data in the ECDSA_METHOD
31143  *   \param  ecdsa_method pointer to existing ECDSA_METHOD
31144  *   \param  app application specific data to set
31145  */
31146 
31147 void ECDSA_METHOD_set_app_data(ECDSA_METHOD *ecdsa_method, void *app);
31148 
31149 /** Returns application specific data from a ECDSA_METHOD structure
31150  *  \param ecdsa_method pointer to ECDSA_METHOD structure
31151  *  \return pointer to application specific data.
31152  */
31153 
31154 void *ECDSA_METHOD_get_app_data(ECDSA_METHOD *ecdsa_method);
31155 
31156 /**  Set the ECDSA_do_sign function in the ECDSA_METHOD
31157  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
31158  *   \param  ecdsa_do_sign a funtion of type ECDSA_do_sign
31159  */
31160 
31161 void ECDSA_METHOD_set_sign(ECDSA_METHOD *ecdsa_method,
31162                            ECDSA_SIG *(*ecdsa_do_sign) (const unsigned char
31163                                                         *dgst, int dgst_len,
31164                                                         const BIGNUM *inv,
31165                                                         const BIGNUM *rp,
31166                                                         EC_KEY *eckey));
31167 
31168 /**  Set the  ECDSA_sign_setup function in the ECDSA_METHOD
31169  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
31170  *   \param  ecdsa_sign_setup a funtion of type ECDSA_sign_setup
31171  */
31172 
31173 void ECDSA_METHOD_set_sign_setup(ECDSA_METHOD *ecdsa_method,
31174                                  int (*ecdsa_sign_setup) (EC_KEY *eckey,
31175                                                           BN_CTX *ctx,
31176                                                           BIGNUM **kinv,
31177                                                           BIGNUM **r));
31178 
31179 /**  Set the ECDSA_do_verify function in the ECDSA_METHOD
31180  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
31181  *   \param  ecdsa_do_verify a funtion of type ECDSA_do_verify
31182  */
31183 
31184 void ECDSA_METHOD_set_verify(ECDSA_METHOD *ecdsa_method,
31185                              int (*ecdsa_do_verify) (const unsigned char
31186                                                      *dgst, int dgst_len,
31187                                                      const ECDSA_SIG *sig,
31188                                                      EC_KEY *eckey));
31189 
31190 void ECDSA_METHOD_set_flags(ECDSA_METHOD *ecdsa_method, int flags);
31191 
31192 /**  Set the flags field in the ECDSA_METHOD
31193  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
31194  *   \param  flags flags value to set
31195  */
31196 
31197 void ECDSA_METHOD_set_name(ECDSA_METHOD *ecdsa_method, char *name);
31198 
31199 /**  Set the name field in the ECDSA_METHOD
31200  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
31201  *   \param  name name to set
31202  */
31203 
31204 /* BEGIN ERROR CODES */
31205 /*
31206  * The following lines are auto generated by the script mkerr.pl. Any changes
31207  * made after this point may be overwritten when the script is next run.
31208  */
31209 void ERR_load_ECDSA_strings(void);
31210 
31211 /* Error codes for the ECDSA functions. */
31212 
31213 /* Function codes. */
31214 
31215 
31216 
31217 
31218 
31219 
31220 
31221 /* Reason codes. */
31222 # 88 "/usr/include/openssl/x509.h" 2 3 4
31223 
31224 
31225 
31226 # 1 "/usr/include/openssl/ecdh.h" 1 3 4
31227 /* crypto/ecdh/ecdh.h */
31228 /* ====================================================================
31229  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
31230  *
31231  * The Elliptic Curve Public-Key Crypto Library (ECC Code) included
31232  * herein is developed by SUN MICROSYSTEMS, INC., and is contributed
31233  * to the OpenSSL project.
31234  *
31235  * The ECC Code is licensed pursuant to the OpenSSL open source
31236  * license provided below.
31237  *
31238  * The ECDH software is originally written by Douglas Stebila of
31239  * Sun Microsystems Laboratories.
31240  *
31241  */
31242 /* ====================================================================
31243  * Copyright (c) 2000-2002 The OpenSSL Project.  All rights reserved.
31244  *
31245  * Redistribution and use in source and binary forms, with or without
31246  * modification, are permitted provided that the following conditions
31247  * are met:
31248  *
31249  * 1. Redistributions of source code must retain the above copyright
31250  *    notice, this list of conditions and the following disclaimer.
31251  *
31252  * 2. Redistributions in binary form must reproduce the above copyright
31253  *    notice, this list of conditions and the following disclaimer in
31254  *    the documentation and/or other materials provided with the
31255  *    distribution.
31256  *
31257  * 3. All advertising materials mentioning features or use of this
31258  *    software must display the following acknowledgment:
31259  *    "This product includes software developed by the OpenSSL Project
31260  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
31261  *
31262  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
31263  *    endorse or promote products derived from this software without
31264  *    prior written permission. For written permission, please contact
31265  *    licensing@OpenSSL.org.
31266  *
31267  * 5. Products derived from this software may not be called "OpenSSL"
31268  *    nor may "OpenSSL" appear in their names without prior written
31269  *    permission of the OpenSSL Project.
31270  *
31271  * 6. Redistributions of any form whatsoever must retain the following
31272  *    acknowledgment:
31273  *    "This product includes software developed by the OpenSSL Project
31274  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
31275  *
31276  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
31277  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31278  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31279  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
31280  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31281  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31282  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31283  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31284  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
31285  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31286  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31287  * OF THE POSSIBILITY OF SUCH DAMAGE.
31288  * ====================================================================
31289  *
31290  * This product includes cryptographic software written by Eric Young
31291  * (eay@cryptsoft.com).  This product includes software written by Tim
31292  * Hudson (tjh@cryptsoft.com).
31293  *
31294  */
31295 
31296 
31297 
31298 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
31299 /* opensslconf.h */
31300 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
31301 
31302 
31303 
31304 
31305 /* OpenSSL was configured with the following options: */
31306 # 108 "/usr/include/openssl/opensslconf.h" 3 4
31307 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
31308    asks for it.  This is a transient feature that is provided for those
31309    who haven't had the time to do the appropriate changes in their
31310    applications.  */
31311 # 204 "/usr/include/openssl/opensslconf.h" 3 4
31312 /* crypto/opensslconf.h.in */
31313 
31314 /* Generate 80386 code? */
31315 # 73 "/usr/include/openssl/ecdh.h" 2 3 4
31316 
31317 
31318 
31319 
31320 
31321 # 1 "/usr/include/openssl/ec.h" 1 3 4
31322 /* crypto/ec/ec.h */
31323 /*
31324  * Originally written by Bodo Moeller for the OpenSSL project.
31325  */
31326 /**
31327  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
31328  * \author Originally written by Bodo Moeller for the OpenSSL project
31329  */
31330 /* ====================================================================
31331  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
31332  *
31333  * Redistribution and use in source and binary forms, with or without
31334  * modification, are permitted provided that the following conditions
31335  * are met:
31336  *
31337  * 1. Redistributions of source code must retain the above copyright
31338  *    notice, this list of conditions and the following disclaimer.
31339  *
31340  * 2. Redistributions in binary form must reproduce the above copyright
31341  *    notice, this list of conditions and the following disclaimer in
31342  *    the documentation and/or other materials provided with the
31343  *    distribution.
31344  *
31345  * 3. All advertising materials mentioning features or use of this
31346  *    software must display the following acknowledgment:
31347  *    "This product includes software developed by the OpenSSL Project
31348  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
31349  *
31350  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
31351  *    endorse or promote products derived from this software without
31352  *    prior written permission. For written permission, please contact
31353  *    openssl-core@openssl.org.
31354  *
31355  * 5. Products derived from this software may not be called "OpenSSL"
31356  *    nor may "OpenSSL" appear in their names without prior written
31357  *    permission of the OpenSSL Project.
31358  *
31359  * 6. Redistributions of any form whatsoever must retain the following
31360  *    acknowledgment:
31361  *    "This product includes software developed by the OpenSSL Project
31362  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
31363  *
31364  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
31365  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31366  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31367  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
31368  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31369  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31370  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31371  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31372  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
31373  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31374  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31375  * OF THE POSSIBILITY OF SUCH DAMAGE.
31376  * ====================================================================
31377  *
31378  * This product includes cryptographic software written by Eric Young
31379  * (eay@cryptsoft.com).  This product includes software written by Tim
31380  * Hudson (tjh@cryptsoft.com).
31381  *
31382  */
31383 /* ====================================================================
31384  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
31385  *
31386  * Portions of the attached software ("Contribution") are developed by
31387  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
31388  *
31389  * The Contribution is licensed pursuant to the OpenSSL open source
31390  * license provided above.
31391  *
31392  * The elliptic curve binary polynomial software is originally written by
31393  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
31394  *
31395  */
31396 # 79 "/usr/include/openssl/ecdh.h" 2 3 4
31397 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
31398 /* ====================================================================
31399  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
31400  *
31401  * Redistribution and use in source and binary forms, with or without
31402  * modification, are permitted provided that the following conditions
31403  * are met:
31404  *
31405  * 1. Redistributions of source code must retain the above copyright
31406  *    notice, this list of conditions and the following disclaimer.
31407  *
31408  * 2. Redistributions in binary form must reproduce the above copyright
31409  *    notice, this list of conditions and the following disclaimer in
31410  *    the documentation and/or other materials provided with the
31411  *    distribution.
31412  *
31413  * 3. All advertising materials mentioning features or use of this
31414  *    software must display the following acknowledgment:
31415  *    "This product includes software developed by the OpenSSL Project
31416  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
31417  *
31418  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
31419  *    endorse or promote products derived from this software without
31420  *    prior written permission. For written permission, please contact
31421  *    openssl-core@openssl.org.
31422  *
31423  * 5. Products derived from this software may not be called "OpenSSL"
31424  *    nor may "OpenSSL" appear in their names without prior written
31425  *    permission of the OpenSSL Project.
31426  *
31427  * 6. Redistributions of any form whatsoever must retain the following
31428  *    acknowledgment:
31429  *    "This product includes software developed by the OpenSSL Project
31430  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
31431  *
31432  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
31433  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31434  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31435  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
31436  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31437  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31438  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31439  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31440  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
31441  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31442  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31443  * OF THE POSSIBILITY OF SUCH DAMAGE.
31444  * ====================================================================
31445  *
31446  * This product includes cryptographic software written by Eric Young
31447  * (eay@cryptsoft.com).  This product includes software written by Tim
31448  * Hudson (tjh@cryptsoft.com).
31449  *
31450  */
31451 # 80 "/usr/include/openssl/ecdh.h" 2 3 4
31452 
31453 # 1 "/usr/include/openssl/bn.h" 1 3 4
31454 /* crypto/bn/bn.h */
31455 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
31456  * All rights reserved.
31457  *
31458  * This package is an SSL implementation written
31459  * by Eric Young (eay@cryptsoft.com).
31460  * The implementation was written so as to conform with Netscapes SSL.
31461  *
31462  * This library is free for commercial and non-commercial use as long as
31463  * the following conditions are aheared to.  The following conditions
31464  * apply to all code found in this distribution, be it the RC4, RSA,
31465  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
31466  * included with this distribution is covered by the same copyright terms
31467  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
31468  *
31469  * Copyright remains Eric Young's, and as such any Copyright notices in
31470  * the code are not to be removed.
31471  * If this package is used in a product, Eric Young should be given attribution
31472  * as the author of the parts of the library used.
31473  * This can be in the form of a textual message at program startup or
31474  * in documentation (online or textual) provided with the package.
31475  *
31476  * Redistribution and use in source and binary forms, with or without
31477  * modification, are permitted provided that the following conditions
31478  * are met:
31479  * 1. Redistributions of source code must retain the copyright
31480  *    notice, this list of conditions and the following disclaimer.
31481  * 2. Redistributions in binary form must reproduce the above copyright
31482  *    notice, this list of conditions and the following disclaimer in the
31483  *    documentation and/or other materials provided with the distribution.
31484  * 3. All advertising materials mentioning features or use of this software
31485  *    must display the following acknowledgement:
31486  *    "This product includes cryptographic software written by
31487  *     Eric Young (eay@cryptsoft.com)"
31488  *    The word 'cryptographic' can be left out if the rouines from the library
31489  *    being used are not cryptographic related :-).
31490  * 4. If you include any Windows specific code (or a derivative thereof) from
31491  *    the apps directory (application code) you must include an acknowledgement:
31492  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
31493  *
31494  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
31495  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31496  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31497  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
31498  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31499  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31500  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31501  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31502  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31503  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31504  * SUCH DAMAGE.
31505  *
31506  * The licence and distribution terms for any publically available version or
31507  * derivative of this code cannot be changed.  i.e. this code cannot simply be
31508  * copied and put under another distribution licence
31509  * [including the GNU Public Licence.]
31510  */
31511 /* ====================================================================
31512  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
31513  *
31514  * Redistribution and use in source and binary forms, with or without
31515  * modification, are permitted provided that the following conditions
31516  * are met:
31517  *
31518  * 1. Redistributions of source code must retain the above copyright
31519  *    notice, this list of conditions and the following disclaimer.
31520  *
31521  * 2. Redistributions in binary form must reproduce the above copyright
31522  *    notice, this list of conditions and the following disclaimer in
31523  *    the documentation and/or other materials provided with the
31524  *    distribution.
31525  *
31526  * 3. All advertising materials mentioning features or use of this
31527  *    software must display the following acknowledgment:
31528  *    "This product includes software developed by the OpenSSL Project
31529  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
31530  *
31531  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
31532  *    endorse or promote products derived from this software without
31533  *    prior written permission. For written permission, please contact
31534  *    openssl-core@openssl.org.
31535  *
31536  * 5. Products derived from this software may not be called "OpenSSL"
31537  *    nor may "OpenSSL" appear in their names without prior written
31538  *    permission of the OpenSSL Project.
31539  *
31540  * 6. Redistributions of any form whatsoever must retain the following
31541  *    acknowledgment:
31542  *    "This product includes software developed by the OpenSSL Project
31543  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
31544  *
31545  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
31546  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31547  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31548  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
31549  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31550  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31551  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31552  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31553  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
31554  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31555  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31556  * OF THE POSSIBILITY OF SUCH DAMAGE.
31557  * ====================================================================
31558  *
31559  * This product includes cryptographic software written by Eric Young
31560  * (eay@cryptsoft.com).  This product includes software written by Tim
31561  * Hudson (tjh@cryptsoft.com).
31562  *
31563  */
31564 /* ====================================================================
31565  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
31566  *
31567  * Portions of the attached software ("Contribution") are developed by
31568  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
31569  *
31570  * The Contribution is licensed pursuant to the Eric Young open source
31571  * license provided above.
31572  *
31573  * The binary polynomial arithmetic software is originally written by
31574  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
31575  *
31576  */
31577 # 82 "/usr/include/openssl/ecdh.h" 2 3 4
31578 # 90 "/usr/include/openssl/ecdh.h" 3 4
31579 const ECDH_METHOD *ECDH_OpenSSL(void);
31580 
31581 void ECDH_set_default_method(const ECDH_METHOD *);
31582 const ECDH_METHOD *ECDH_get_default_method(void);
31583 int ECDH_set_method(EC_KEY *, const ECDH_METHOD *);
31584 
31585 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
31586                      EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen,
31587                                                  void *out, size_t *outlen));
31588 
31589 int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
31590                           *new_func, CRYPTO_EX_dup *dup_func,
31591                           CRYPTO_EX_free *free_func);
31592 int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg);
31593 void *ECDH_get_ex_data(EC_KEY *d, int idx);
31594 
31595 int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
31596                    const unsigned char *Z, size_t Zlen,
31597                    const unsigned char *sinfo, size_t sinfolen,
31598                    const EVP_MD *md);
31599 
31600 /* BEGIN ERROR CODES */
31601 /*
31602  * The following lines are auto generated by the script mkerr.pl. Any changes
31603  * made after this point may be overwritten when the script is next run.
31604  */
31605 void ERR_load_ECDH_strings(void);
31606 
31607 /* Error codes for the ECDH functions. */
31608 
31609 /* Function codes. */
31610 
31611 
31612 
31613 
31614 /* Reason codes. */
31615 # 92 "/usr/include/openssl/x509.h" 2 3 4
31616 
31617 
31618 
31619 
31620 # 1 "/usr/include/openssl/rsa.h" 1 3 4
31621 /* crypto/rsa/rsa.h */
31622 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
31623  * All rights reserved.
31624  *
31625  * This package is an SSL implementation written
31626  * by Eric Young (eay@cryptsoft.com).
31627  * The implementation was written so as to conform with Netscapes SSL.
31628  *
31629  * This library is free for commercial and non-commercial use as long as
31630  * the following conditions are aheared to.  The following conditions
31631  * apply to all code found in this distribution, be it the RC4, RSA,
31632  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
31633  * included with this distribution is covered by the same copyright terms
31634  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
31635  *
31636  * Copyright remains Eric Young's, and as such any Copyright notices in
31637  * the code are not to be removed.
31638  * If this package is used in a product, Eric Young should be given attribution
31639  * as the author of the parts of the library used.
31640  * This can be in the form of a textual message at program startup or
31641  * in documentation (online or textual) provided with the package.
31642  *
31643  * Redistribution and use in source and binary forms, with or without
31644  * modification, are permitted provided that the following conditions
31645  * are met:
31646  * 1. Redistributions of source code must retain the copyright
31647  *    notice, this list of conditions and the following disclaimer.
31648  * 2. Redistributions in binary form must reproduce the above copyright
31649  *    notice, this list of conditions and the following disclaimer in the
31650  *    documentation and/or other materials provided with the distribution.
31651  * 3. All advertising materials mentioning features or use of this software
31652  *    must display the following acknowledgement:
31653  *    "This product includes cryptographic software written by
31654  *     Eric Young (eay@cryptsoft.com)"
31655  *    The word 'cryptographic' can be left out if the rouines from the library
31656  *    being used are not cryptographic related :-).
31657  * 4. If you include any Windows specific code (or a derivative thereof) from
31658  *    the apps directory (application code) you must include an acknowledgement:
31659  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
31660  *
31661  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
31662  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31663  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31664  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
31665  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31666  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31667  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31668  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31669  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31670  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31671  * SUCH DAMAGE.
31672  *
31673  * The licence and distribution terms for any publically available version or
31674  * derivative of this code cannot be changed.  i.e. this code cannot simply be
31675  * copied and put under another distribution licence
31676  * [including the GNU Public Licence.]
31677  */
31678 
31679 
31680 
31681 
31682 # 1 "/usr/include/openssl/asn1.h" 1 3 4
31683 /* crypto/asn1/asn1.h */
31684 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
31685  * All rights reserved.
31686  *
31687  * This package is an SSL implementation written
31688  * by Eric Young (eay@cryptsoft.com).
31689  * The implementation was written so as to conform with Netscapes SSL.
31690  *
31691  * This library is free for commercial and non-commercial use as long as
31692  * the following conditions are aheared to.  The following conditions
31693  * apply to all code found in this distribution, be it the RC4, RSA,
31694  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
31695  * included with this distribution is covered by the same copyright terms
31696  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
31697  *
31698  * Copyright remains Eric Young's, and as such any Copyright notices in
31699  * the code are not to be removed.
31700  * If this package is used in a product, Eric Young should be given attribution
31701  * as the author of the parts of the library used.
31702  * This can be in the form of a textual message at program startup or
31703  * in documentation (online or textual) provided with the package.
31704  *
31705  * Redistribution and use in source and binary forms, with or without
31706  * modification, are permitted provided that the following conditions
31707  * are met:
31708  * 1. Redistributions of source code must retain the copyright
31709  *    notice, this list of conditions and the following disclaimer.
31710  * 2. Redistributions in binary form must reproduce the above copyright
31711  *    notice, this list of conditions and the following disclaimer in the
31712  *    documentation and/or other materials provided with the distribution.
31713  * 3. All advertising materials mentioning features or use of this software
31714  *    must display the following acknowledgement:
31715  *    "This product includes cryptographic software written by
31716  *     Eric Young (eay@cryptsoft.com)"
31717  *    The word 'cryptographic' can be left out if the rouines from the library
31718  *    being used are not cryptographic related :-).
31719  * 4. If you include any Windows specific code (or a derivative thereof) from
31720  *    the apps directory (application code) you must include an acknowledgement:
31721  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
31722  *
31723  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
31724  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31725  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31726  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
31727  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31728  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31729  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31730  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31731  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31732  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31733  * SUCH DAMAGE.
31734  *
31735  * The licence and distribution terms for any publically available version or
31736  * derivative of this code cannot be changed.  i.e. this code cannot simply be
31737  * copied and put under another distribution licence
31738  * [including the GNU Public Licence.]
31739  */
31740 # 63 "/usr/include/openssl/rsa.h" 2 3 4
31741 
31742 
31743 # 1 "/usr/include/openssl/bio.h" 1 3 4
31744 /* crypto/bio/bio.h */
31745 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
31746  * All rights reserved.
31747  *
31748  * This package is an SSL implementation written
31749  * by Eric Young (eay@cryptsoft.com).
31750  * The implementation was written so as to conform with Netscapes SSL.
31751  *
31752  * This library is free for commercial and non-commercial use as long as
31753  * the following conditions are aheared to.  The following conditions
31754  * apply to all code found in this distribution, be it the RC4, RSA,
31755  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
31756  * included with this distribution is covered by the same copyright terms
31757  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
31758  *
31759  * Copyright remains Eric Young's, and as such any Copyright notices in
31760  * the code are not to be removed.
31761  * If this package is used in a product, Eric Young should be given attribution
31762  * as the author of the parts of the library used.
31763  * This can be in the form of a textual message at program startup or
31764  * in documentation (online or textual) provided with the package.
31765  *
31766  * Redistribution and use in source and binary forms, with or without
31767  * modification, are permitted provided that the following conditions
31768  * are met:
31769  * 1. Redistributions of source code must retain the copyright
31770  *    notice, this list of conditions and the following disclaimer.
31771  * 2. Redistributions in binary form must reproduce the above copyright
31772  *    notice, this list of conditions and the following disclaimer in the
31773  *    documentation and/or other materials provided with the distribution.
31774  * 3. All advertising materials mentioning features or use of this software
31775  *    must display the following acknowledgement:
31776  *    "This product includes cryptographic software written by
31777  *     Eric Young (eay@cryptsoft.com)"
31778  *    The word 'cryptographic' can be left out if the rouines from the library
31779  *    being used are not cryptographic related :-).
31780  * 4. If you include any Windows specific code (or a derivative thereof) from
31781  *    the apps directory (application code) you must include an acknowledgement:
31782  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
31783  *
31784  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
31785  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31786  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31787  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
31788  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31789  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31790  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31791  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31792  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31793  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31794  * SUCH DAMAGE.
31795  *
31796  * The licence and distribution terms for any publically available version or
31797  * derivative of this code cannot be changed.  i.e. this code cannot simply be
31798  * copied and put under another distribution licence
31799  * [including the GNU Public Licence.]
31800  */
31801 # 66 "/usr/include/openssl/rsa.h" 2 3 4
31802 
31803 # 1 "/usr/include/openssl/crypto.h" 1 3 4
31804 /* crypto/crypto.h */
31805 /* ====================================================================
31806  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
31807  *
31808  * Redistribution and use in source and binary forms, with or without
31809  * modification, are permitted provided that the following conditions
31810  * are met:
31811  *
31812  * 1. Redistributions of source code must retain the above copyright
31813  *    notice, this list of conditions and the following disclaimer.
31814  *
31815  * 2. Redistributions in binary form must reproduce the above copyright
31816  *    notice, this list of conditions and the following disclaimer in
31817  *    the documentation and/or other materials provided with the
31818  *    distribution.
31819  *
31820  * 3. All advertising materials mentioning features or use of this
31821  *    software must display the following acknowledgment:
31822  *    "This product includes software developed by the OpenSSL Project
31823  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
31824  *
31825  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
31826  *    endorse or promote products derived from this software without
31827  *    prior written permission. For written permission, please contact
31828  *    openssl-core@openssl.org.
31829  *
31830  * 5. Products derived from this software may not be called "OpenSSL"
31831  *    nor may "OpenSSL" appear in their names without prior written
31832  *    permission of the OpenSSL Project.
31833  *
31834  * 6. Redistributions of any form whatsoever must retain the following
31835  *    acknowledgment:
31836  *    "This product includes software developed by the OpenSSL Project
31837  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
31838  *
31839  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
31840  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31841  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31842  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
31843  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31844  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31845  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31846  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31847  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
31848  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31849  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31850  * OF THE POSSIBILITY OF SUCH DAMAGE.
31851  * ====================================================================
31852  *
31853  * This product includes cryptographic software written by Eric Young
31854  * (eay@cryptsoft.com).  This product includes software written by Tim
31855  * Hudson (tjh@cryptsoft.com).
31856  *
31857  */
31858 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
31859  * All rights reserved.
31860  *
31861  * This package is an SSL implementation written
31862  * by Eric Young (eay@cryptsoft.com).
31863  * The implementation was written so as to conform with Netscapes SSL.
31864  *
31865  * This library is free for commercial and non-commercial use as long as
31866  * the following conditions are aheared to.  The following conditions
31867  * apply to all code found in this distribution, be it the RC4, RSA,
31868  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
31869  * included with this distribution is covered by the same copyright terms
31870  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
31871  *
31872  * Copyright remains Eric Young's, and as such any Copyright notices in
31873  * the code are not to be removed.
31874  * If this package is used in a product, Eric Young should be given attribution
31875  * as the author of the parts of the library used.
31876  * This can be in the form of a textual message at program startup or
31877  * in documentation (online or textual) provided with the package.
31878  *
31879  * Redistribution and use in source and binary forms, with or without
31880  * modification, are permitted provided that the following conditions
31881  * are met:
31882  * 1. Redistributions of source code must retain the copyright
31883  *    notice, this list of conditions and the following disclaimer.
31884  * 2. Redistributions in binary form must reproduce the above copyright
31885  *    notice, this list of conditions and the following disclaimer in the
31886  *    documentation and/or other materials provided with the distribution.
31887  * 3. All advertising materials mentioning features or use of this software
31888  *    must display the following acknowledgement:
31889  *    "This product includes cryptographic software written by
31890  *     Eric Young (eay@cryptsoft.com)"
31891  *    The word 'cryptographic' can be left out if the rouines from the library
31892  *    being used are not cryptographic related :-).
31893  * 4. If you include any Windows specific code (or a derivative thereof) from
31894  *    the apps directory (application code) you must include an acknowledgement:
31895  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
31896  *
31897  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
31898  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31899  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31900  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
31901  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31902  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31903  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31904  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31905  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31906  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31907  * SUCH DAMAGE.
31908  *
31909  * The licence and distribution terms for any publically available version or
31910  * derivative of this code cannot be changed.  i.e. this code cannot simply be
31911  * copied and put under another distribution licence
31912  * [including the GNU Public Licence.]
31913  */
31914 /* ====================================================================
31915  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
31916  * ECDH support in OpenSSL originally developed by
31917  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
31918  */
31919 # 68 "/usr/include/openssl/rsa.h" 2 3 4
31920 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
31921 /* ====================================================================
31922  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
31923  *
31924  * Redistribution and use in source and binary forms, with or without
31925  * modification, are permitted provided that the following conditions
31926  * are met:
31927  *
31928  * 1. Redistributions of source code must retain the above copyright
31929  *    notice, this list of conditions and the following disclaimer.
31930  *
31931  * 2. Redistributions in binary form must reproduce the above copyright
31932  *    notice, this list of conditions and the following disclaimer in
31933  *    the documentation and/or other materials provided with the
31934  *    distribution.
31935  *
31936  * 3. All advertising materials mentioning features or use of this
31937  *    software must display the following acknowledgment:
31938  *    "This product includes software developed by the OpenSSL Project
31939  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
31940  *
31941  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
31942  *    endorse or promote products derived from this software without
31943  *    prior written permission. For written permission, please contact
31944  *    openssl-core@openssl.org.
31945  *
31946  * 5. Products derived from this software may not be called "OpenSSL"
31947  *    nor may "OpenSSL" appear in their names without prior written
31948  *    permission of the OpenSSL Project.
31949  *
31950  * 6. Redistributions of any form whatsoever must retain the following
31951  *    acknowledgment:
31952  *    "This product includes software developed by the OpenSSL Project
31953  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
31954  *
31955  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
31956  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31957  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31958  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
31959  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31960  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31961  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31962  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31963  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
31964  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31965  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31966  * OF THE POSSIBILITY OF SUCH DAMAGE.
31967  * ====================================================================
31968  *
31969  * This product includes cryptographic software written by Eric Young
31970  * (eay@cryptsoft.com).  This product includes software written by Tim
31971  * Hudson (tjh@cryptsoft.com).
31972  *
31973  */
31974 # 69 "/usr/include/openssl/rsa.h" 2 3 4
31975 
31976 # 1 "/usr/include/openssl/bn.h" 1 3 4
31977 /* crypto/bn/bn.h */
31978 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
31979  * All rights reserved.
31980  *
31981  * This package is an SSL implementation written
31982  * by Eric Young (eay@cryptsoft.com).
31983  * The implementation was written so as to conform with Netscapes SSL.
31984  *
31985  * This library is free for commercial and non-commercial use as long as
31986  * the following conditions are aheared to.  The following conditions
31987  * apply to all code found in this distribution, be it the RC4, RSA,
31988  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
31989  * included with this distribution is covered by the same copyright terms
31990  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
31991  *
31992  * Copyright remains Eric Young's, and as such any Copyright notices in
31993  * the code are not to be removed.
31994  * If this package is used in a product, Eric Young should be given attribution
31995  * as the author of the parts of the library used.
31996  * This can be in the form of a textual message at program startup or
31997  * in documentation (online or textual) provided with the package.
31998  *
31999  * Redistribution and use in source and binary forms, with or without
32000  * modification, are permitted provided that the following conditions
32001  * are met:
32002  * 1. Redistributions of source code must retain the copyright
32003  *    notice, this list of conditions and the following disclaimer.
32004  * 2. Redistributions in binary form must reproduce the above copyright
32005  *    notice, this list of conditions and the following disclaimer in the
32006  *    documentation and/or other materials provided with the distribution.
32007  * 3. All advertising materials mentioning features or use of this software
32008  *    must display the following acknowledgement:
32009  *    "This product includes cryptographic software written by
32010  *     Eric Young (eay@cryptsoft.com)"
32011  *    The word 'cryptographic' can be left out if the rouines from the library
32012  *    being used are not cryptographic related :-).
32013  * 4. If you include any Windows specific code (or a derivative thereof) from
32014  *    the apps directory (application code) you must include an acknowledgement:
32015  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
32016  *
32017  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
32018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
32021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32027  * SUCH DAMAGE.
32028  *
32029  * The licence and distribution terms for any publically available version or
32030  * derivative of this code cannot be changed.  i.e. this code cannot simply be
32031  * copied and put under another distribution licence
32032  * [including the GNU Public Licence.]
32033  */
32034 /* ====================================================================
32035  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
32036  *
32037  * Redistribution and use in source and binary forms, with or without
32038  * modification, are permitted provided that the following conditions
32039  * are met:
32040  *
32041  * 1. Redistributions of source code must retain the above copyright
32042  *    notice, this list of conditions and the following disclaimer.
32043  *
32044  * 2. Redistributions in binary form must reproduce the above copyright
32045  *    notice, this list of conditions and the following disclaimer in
32046  *    the documentation and/or other materials provided with the
32047  *    distribution.
32048  *
32049  * 3. All advertising materials mentioning features or use of this
32050  *    software must display the following acknowledgment:
32051  *    "This product includes software developed by the OpenSSL Project
32052  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
32053  *
32054  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
32055  *    endorse or promote products derived from this software without
32056  *    prior written permission. For written permission, please contact
32057  *    openssl-core@openssl.org.
32058  *
32059  * 5. Products derived from this software may not be called "OpenSSL"
32060  *    nor may "OpenSSL" appear in their names without prior written
32061  *    permission of the OpenSSL Project.
32062  *
32063  * 6. Redistributions of any form whatsoever must retain the following
32064  *    acknowledgment:
32065  *    "This product includes software developed by the OpenSSL Project
32066  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
32067  *
32068  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
32069  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32070  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32071  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
32072  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32073  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32074  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32075  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32076  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32077  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32078  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
32079  * OF THE POSSIBILITY OF SUCH DAMAGE.
32080  * ====================================================================
32081  *
32082  * This product includes cryptographic software written by Eric Young
32083  * (eay@cryptsoft.com).  This product includes software written by Tim
32084  * Hudson (tjh@cryptsoft.com).
32085  *
32086  */
32087 /* ====================================================================
32088  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
32089  *
32090  * Portions of the attached software ("Contribution") are developed by
32091  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
32092  *
32093  * The Contribution is licensed pursuant to the Eric Young open source
32094  * license provided above.
32095  *
32096  * The binary polynomial arithmetic software is originally written by
32097  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
32098  *
32099  */
32100 # 71 "/usr/include/openssl/rsa.h" 2 3 4
32101 # 81 "/usr/include/openssl/rsa.h" 3 4
32102 /* Declared already in ossl_typ.h */
32103 /* typedef struct rsa_st RSA; */
32104 /* typedef struct rsa_meth_st RSA_METHOD; */
32105 
32106 struct rsa_meth_st {
32107     const char *name;
32108     int (*rsa_pub_enc) (int flen, const unsigned char *from,
32109                         unsigned char *to, RSA *rsa, int padding);
32110     int (*rsa_pub_dec) (int flen, const unsigned char *from,
32111                         unsigned char *to, RSA *rsa, int padding);
32112     int (*rsa_priv_enc) (int flen, const unsigned char *from,
32113                          unsigned char *to, RSA *rsa, int padding);
32114     int (*rsa_priv_dec) (int flen, const unsigned char *from,
32115                          unsigned char *to, RSA *rsa, int padding);
32116     /* Can be null */
32117     int (*rsa_mod_exp) (BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
32118     /* Can be null */
32119     int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
32120                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
32121     /* called at new */
32122     int (*init) (RSA *rsa);
32123     /* called at free */
32124     int (*finish) (RSA *rsa);
32125     /* RSA_METHOD_FLAG_* things */
32126     int flags;
32127     /* may be needed! */
32128     char *app_data;
32129     /*
32130      * New sign and verify functions: some libraries don't allow arbitrary
32131      * data to be signed/verified: this allows them to be used. Note: for
32132      * this to work the RSA_public_decrypt() and RSA_private_encrypt() should
32133      * *NOT* be used RSA_sign(), RSA_verify() should be used instead. Note:
32134      * for backwards compatibility this functionality is only enabled if the
32135      * RSA_FLAG_SIGN_VER option is set in 'flags'.
32136      */
32137     int (*rsa_sign) (int type,
32138                      const unsigned char *m, unsigned int m_length,
32139                      unsigned char *sigret, unsigned int *siglen,
32140                      const RSA *rsa);
32141     int (*rsa_verify) (int dtype, const unsigned char *m,
32142                        unsigned int m_length, const unsigned char *sigbuf,
32143                        unsigned int siglen, const RSA *rsa);
32144     /*
32145      * If this callback is NULL, the builtin software RSA key-gen will be
32146      * used. This is for behavioural compatibility whilst the code gets
32147      * rewired, but one day it would be nice to assume there are no such
32148      * things as "builtin software" implementations.
32149      */
32150     int (*rsa_keygen) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
32151 };
32152 
32153 struct rsa_st {
32154     /*
32155      * The first parameter is used to pickup errors where this is passed
32156      * instead of aEVP_PKEY, it is set to 0
32157      */
32158     int pad;
32159     long version;
32160     const RSA_METHOD *meth;
32161     /* functional reference if 'meth' is ENGINE-provided */
32162     ENGINE *engine;
32163     BIGNUM *n;
32164     BIGNUM *e;
32165     BIGNUM *d;
32166     BIGNUM *p;
32167     BIGNUM *q;
32168     BIGNUM *dmp1;
32169     BIGNUM *dmq1;
32170     BIGNUM *iqmp;
32171     /* be careful using this if the RSA structure is shared */
32172     CRYPTO_EX_DATA ex_data;
32173     int references;
32174     int flags;
32175     /* Used to cache montgomery values */
32176     BN_MONT_CTX *_method_mod_n;
32177     BN_MONT_CTX *_method_mod_p;
32178     BN_MONT_CTX *_method_mod_q;
32179     /*
32180      * all BIGNUM values are actually in the following data, if it is not
32181      * NULL
32182      */
32183     char *bignum_data;
32184     BN_BLINDING *blinding;
32185     BN_BLINDING *mt_blinding;
32186 };
32187 # 176 "/usr/include/openssl/rsa.h" 3 4
32188 /* exponent limit enforced for "large" modulus only */
32189 # 190 "/usr/include/openssl/rsa.h" 3 4
32190 /*
32191  * This flag means the private key operations will be handled by rsa_mod_exp
32192  * and that they do not depend on the private key components being present:
32193  * for example a key stored in external hardware. Without this flag
32194  * bn_mod_exp gets called when private key components are absent.
32195  */
32196 
32197 
32198 /*
32199  * This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify
32200  * functions.
32201  */
32202 
32203 
32204 /*
32205  * new with 0.9.6j and 0.9.7b; the built-in
32206  * RSA implementation now uses blinding by
32207  * default (ignoring RSA_FLAG_BLINDING),
32208  * but other engines might not need it
32209  */
32210 
32211 /*
32212  * new with 0.9.8f; the built-in RSA
32213  * implementation now uses constant time
32214  * operations by default in private key operations,
32215  * e.g., constant time modular exponentiation,
32216  * modular inverse without leaking branches,
32217  * division without leaking branches. This
32218  * flag disables these constant time
32219  * operations and results in faster RSA
32220  * private key operations.
32221  */
32222 # 312 "/usr/include/openssl/rsa.h" 3 4
32223 /* EVP_PKEY_ only */
32224 
32225 
32226 
32227 
32228 
32229 
32230 
32231 RSA *RSA_new(void);
32232 RSA *RSA_new_method(ENGINE *engine);
32233 int RSA_size(const RSA *rsa);
32234 
32235 /* Deprecated version */
32236 
32237 RSA *RSA_generate_key(int bits, unsigned long e, void
32238                        (*callback) (int, int, void *), void *cb_arg);
32239 
32240 
32241 /* New version */
32242 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
32243 
32244 int RSA_check_key(const RSA *);
32245         /* next 4 return -1 on error */
32246 int RSA_public_encrypt(int flen, const unsigned char *from,
32247                        unsigned char *to, RSA *rsa, int padding);
32248 int RSA_private_encrypt(int flen, const unsigned char *from,
32249                         unsigned char *to, RSA *rsa, int padding);
32250 int RSA_public_decrypt(int flen, const unsigned char *from,
32251                        unsigned char *to, RSA *rsa, int padding);
32252 int RSA_private_decrypt(int flen, const unsigned char *from,
32253                         unsigned char *to, RSA *rsa, int padding);
32254 void RSA_free(RSA *r);
32255 /* "up" the RSA object's reference count */
32256 int RSA_up_ref(RSA *r);
32257 
32258 int RSA_flags(const RSA *r);
32259 
32260 void RSA_set_default_method(const RSA_METHOD *meth);
32261 const RSA_METHOD *RSA_get_default_method(void);
32262 const RSA_METHOD *RSA_get_method(const RSA *rsa);
32263 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
32264 
32265 /* This function needs the memory locking malloc callbacks to be installed */
32266 int RSA_memory_lock(RSA *r);
32267 
32268 /* these are the actual SSLeay RSA functions */
32269 const RSA_METHOD *RSA_PKCS1_SSLeay(void);
32270 
32271 const RSA_METHOD *RSA_null_method(void);
32272 
32273 RSA *d2i_RSAPublicKey(RSA **a, const unsigned char **in, long len); int i2d_RSAPublicKey(const RSA *a, unsigned char **out); extern const ASN1_ITEM RSAPublicKey_it;
32274 RSA *d2i_RSAPrivateKey(RSA **a, const unsigned char **in, long len); int i2d_RSAPrivateKey(const RSA *a, unsigned char **out); extern const ASN1_ITEM RSAPrivateKey_it;
32275 
32276 typedef struct rsa_pss_params_st {
32277     X509_ALGOR *hashAlgorithm;
32278     X509_ALGOR *maskGenAlgorithm;
32279     ASN1_INTEGER *saltLength;
32280     ASN1_INTEGER *trailerField;
32281 } RSA_PSS_PARAMS;
32282 
32283 RSA_PSS_PARAMS *RSA_PSS_PARAMS_new(void); void RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a); RSA_PSS_PARAMS *d2i_RSA_PSS_PARAMS(RSA_PSS_PARAMS **a, const unsigned char **in, long len); int i2d_RSA_PSS_PARAMS(RSA_PSS_PARAMS *a, unsigned char **out); extern const ASN1_ITEM RSA_PSS_PARAMS_it;
32284 
32285 typedef struct rsa_oaep_params_st {
32286     X509_ALGOR *hashFunc;
32287     X509_ALGOR *maskGenFunc;
32288     X509_ALGOR *pSourceFunc;
32289 } RSA_OAEP_PARAMS;
32290 
32291 RSA_OAEP_PARAMS *RSA_OAEP_PARAMS_new(void); void RSA_OAEP_PARAMS_free(RSA_OAEP_PARAMS *a); RSA_OAEP_PARAMS *d2i_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS **a, const unsigned char **in, long len); int i2d_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS *a, unsigned char **out); extern const ASN1_ITEM RSA_OAEP_PARAMS_it;
32292 
32293 
32294 int RSA_print_fp(FILE *fp, const RSA *r, int offset);
32295 
32296 
32297 
32298 int RSA_print(BIO *bp, const RSA *r, int offset);
32299 
32300 
32301 
32302 int i2d_RSA_NET(const RSA *a, unsigned char **pp,
32303                 int (*cb) (char *buf, int len, const char *prompt,
32304                            int verify), int sgckey);
32305 RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
32306                  int (*cb) (char *buf, int len, const char *prompt,
32307                             int verify), int sgckey);
32308 
32309 int i2d_Netscape_RSA(const RSA *a, unsigned char **pp,
32310                      int (*cb) (char *buf, int len, const char *prompt,
32311                                 int verify));
32312 RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length,
32313                       int (*cb) (char *buf, int len, const char *prompt,
32314                                  int verify));
32315 
32316 
32317 /*
32318  * The following 2 functions sign and verify a X509_SIG ASN1 object inside
32319  * PKCS#1 padded RSA encryption
32320  */
32321 int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
32322              unsigned char *sigret, unsigned int *siglen, RSA *rsa);
32323 int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
32324                const unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
32325 
32326 /*
32327  * The following 2 function sign and verify a ASN1_OCTET_STRING object inside
32328  * PKCS#1 padded RSA encryption
32329  */
32330 int RSA_sign_ASN1_OCTET_STRING(int type,
32331                                const unsigned char *m, unsigned int m_length,
32332                                unsigned char *sigret, unsigned int *siglen,
32333                                RSA *rsa);
32334 int RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m,
32335                                  unsigned int m_length, unsigned char *sigbuf,
32336                                  unsigned int siglen, RSA *rsa);
32337 
32338 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
32339 void RSA_blinding_off(RSA *rsa);
32340 BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
32341 
32342 int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
32343                                  const unsigned char *f, int fl);
32344 int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
32345                                    const unsigned char *f, int fl,
32346                                    int rsa_len);
32347 int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
32348                                  const unsigned char *f, int fl);
32349 int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
32350                                    const unsigned char *f, int fl,
32351                                    int rsa_len);
32352 int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,
32353                long seedlen, const EVP_MD *dgst);
32354 int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
32355                                const unsigned char *f, int fl,
32356                                const unsigned char *p, int pl);
32357 int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
32358                                  const unsigned char *f, int fl, int rsa_len,
32359                                  const unsigned char *p, int pl);
32360 int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
32361                                     const unsigned char *from, int flen,
32362                                     const unsigned char *param, int plen,
32363                                     const EVP_MD *md, const EVP_MD *mgf1md);
32364 int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
32365                                       const unsigned char *from, int flen,
32366                                       int num, const unsigned char *param,
32367                                       int plen, const EVP_MD *md,
32368                                       const EVP_MD *mgf1md);
32369 int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
32370                            const unsigned char *f, int fl);
32371 int RSA_padding_check_SSLv23(unsigned char *to, int tlen,
32372                              const unsigned char *f, int fl, int rsa_len);
32373 int RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f,
32374                          int fl);
32375 int RSA_padding_check_none(unsigned char *to, int tlen,
32376                            const unsigned char *f, int fl, int rsa_len);
32377 int RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f,
32378                          int fl);
32379 int RSA_padding_check_X931(unsigned char *to, int tlen,
32380                            const unsigned char *f, int fl, int rsa_len);
32381 int RSA_X931_hash_id(int nid);
32382 
32383 int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
32384                          const EVP_MD *Hash, const unsigned char *EM,
32385                          int sLen);
32386 int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
32387                               const unsigned char *mHash, const EVP_MD *Hash,
32388                               int sLen);
32389 
32390 int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
32391                               const EVP_MD *Hash, const EVP_MD *mgf1Hash,
32392                               const unsigned char *EM, int sLen);
32393 
32394 int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
32395                                    const unsigned char *mHash,
32396                                    const EVP_MD *Hash, const EVP_MD *mgf1Hash,
32397                                    int sLen);
32398 
32399 int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
32400                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
32401 int RSA_set_ex_data(RSA *r, int idx, void *arg);
32402 void *RSA_get_ex_data(const RSA *r, int idx);
32403 
32404 RSA *RSAPublicKey_dup(RSA *rsa);
32405 RSA *RSAPrivateKey_dup(RSA *rsa);
32406 
32407 /*
32408  * If this flag is set the RSA method is FIPS compliant and can be used in
32409  * FIPS mode. This is set in the validated module method. If an application
32410  * sets this flag in its own methods it is its responsibility to ensure the
32411  * result is compliant.
32412  */
32413 
32414 
32415 
32416 /*
32417  * If this flag is set the operations normally disabled in FIPS mode are
32418  * permitted it is then the applications responsibility to ensure that the
32419  * usage is compliant.
32420  */
32421 
32422 
32423 /*
32424  * Application has decided PRNG is good enough to generate a key: don't
32425  * check.
32426  */
32427 
32428 
32429 /* BEGIN ERROR CODES */
32430 /*
32431  * The following lines are auto generated by the script mkerr.pl. Any changes
32432  * made after this point may be overwritten when the script is next run.
32433  */
32434 void ERR_load_RSA_strings(void);
32435 
32436 /* Error codes for the RSA functions. */
32437 
32438 /* Function codes. */
32439 # 592 "/usr/include/openssl/rsa.h" 3 4
32440 /* Reason codes. */
32441 # 97 "/usr/include/openssl/x509.h" 2 3 4
32442 
32443 
32444 # 1 "/usr/include/openssl/dsa.h" 1 3 4
32445 /* crypto/dsa/dsa.h */
32446 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
32447  * All rights reserved.
32448  *
32449  * This package is an SSL implementation written
32450  * by Eric Young (eay@cryptsoft.com).
32451  * The implementation was written so as to conform with Netscapes SSL.
32452  *
32453  * This library is free for commercial and non-commercial use as long as
32454  * the following conditions are aheared to.  The following conditions
32455  * apply to all code found in this distribution, be it the RC4, RSA,
32456  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
32457  * included with this distribution is covered by the same copyright terms
32458  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
32459  *
32460  * Copyright remains Eric Young's, and as such any Copyright notices in
32461  * the code are not to be removed.
32462  * If this package is used in a product, Eric Young should be given attribution
32463  * as the author of the parts of the library used.
32464  * This can be in the form of a textual message at program startup or
32465  * in documentation (online or textual) provided with the package.
32466  *
32467  * Redistribution and use in source and binary forms, with or without
32468  * modification, are permitted provided that the following conditions
32469  * are met:
32470  * 1. Redistributions of source code must retain the copyright
32471  *    notice, this list of conditions and the following disclaimer.
32472  * 2. Redistributions in binary form must reproduce the above copyright
32473  *    notice, this list of conditions and the following disclaimer in the
32474  *    documentation and/or other materials provided with the distribution.
32475  * 3. All advertising materials mentioning features or use of this software
32476  *    must display the following acknowledgement:
32477  *    "This product includes cryptographic software written by
32478  *     Eric Young (eay@cryptsoft.com)"
32479  *    The word 'cryptographic' can be left out if the rouines from the library
32480  *    being used are not cryptographic related :-).
32481  * 4. If you include any Windows specific code (or a derivative thereof) from
32482  *    the apps directory (application code) you must include an acknowledgement:
32483  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
32484  *
32485  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
32486  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32487  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32488  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
32489  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32490  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32491  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32492  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32493  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32494  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32495  * SUCH DAMAGE.
32496  *
32497  * The licence and distribution terms for any publically available version or
32498  * derivative of this code cannot be changed.  i.e. this code cannot simply be
32499  * copied and put under another distribution licence
32500  * [including the GNU Public Licence.]
32501  */
32502 
32503 /*
32504  * The DSS routines are based on patches supplied by
32505  * Steven Schoch <schoch@sheba.arc.nasa.gov>.  He basically did the
32506  * work and I have just tweaked them a little to fit into my
32507  * stylistic vision for SSLeay :-) */
32508 
32509 
32510 
32511 
32512 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
32513 /* e_os2.h */
32514 /* ====================================================================
32515  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
32516  *
32517  * Redistribution and use in source and binary forms, with or without
32518  * modification, are permitted provided that the following conditions
32519  * are met:
32520  *
32521  * 1. Redistributions of source code must retain the above copyright
32522  *    notice, this list of conditions and the following disclaimer.
32523  *
32524  * 2. Redistributions in binary form must reproduce the above copyright
32525  *    notice, this list of conditions and the following disclaimer in
32526  *    the documentation and/or other materials provided with the
32527  *    distribution.
32528  *
32529  * 3. All advertising materials mentioning features or use of this
32530  *    software must display the following acknowledgment:
32531  *    "This product includes software developed by the OpenSSL Project
32532  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
32533  *
32534  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
32535  *    endorse or promote products derived from this software without
32536  *    prior written permission. For written permission, please contact
32537  *    openssl-core@openssl.org.
32538  *
32539  * 5. Products derived from this software may not be called "OpenSSL"
32540  *    nor may "OpenSSL" appear in their names without prior written
32541  *    permission of the OpenSSL Project.
32542  *
32543  * 6. Redistributions of any form whatsoever must retain the following
32544  *    acknowledgment:
32545  *    "This product includes software developed by the OpenSSL Project
32546  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
32547  *
32548  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
32549  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32550  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32551  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
32552  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32553  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32554  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32555  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32556  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32557  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32558  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
32559  * OF THE POSSIBILITY OF SUCH DAMAGE.
32560  * ====================================================================
32561  *
32562  * This product includes cryptographic software written by Eric Young
32563  * (eay@cryptsoft.com).  This product includes software written by Tim
32564  * Hudson (tjh@cryptsoft.com).
32565  *
32566  */
32567 
32568 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
32569 /* opensslconf.h */
32570 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
32571 
32572 
32573 
32574 
32575 /* OpenSSL was configured with the following options: */
32576 # 108 "/usr/include/openssl/opensslconf.h" 3 4
32577 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
32578    asks for it.  This is a transient feature that is provided for those
32579    who haven't had the time to do the appropriate changes in their
32580    applications.  */
32581 # 204 "/usr/include/openssl/opensslconf.h" 3 4
32582 /* crypto/opensslconf.h.in */
32583 
32584 /* Generate 80386 code? */
32585 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
32586 # 69 "/usr/include/openssl/dsa.h" 2 3 4
32587 
32588 
32589 
32590 
32591 
32592 
32593 # 1 "/usr/include/openssl/bio.h" 1 3 4
32594 /* crypto/bio/bio.h */
32595 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
32596  * All rights reserved.
32597  *
32598  * This package is an SSL implementation written
32599  * by Eric Young (eay@cryptsoft.com).
32600  * The implementation was written so as to conform with Netscapes SSL.
32601  *
32602  * This library is free for commercial and non-commercial use as long as
32603  * the following conditions are aheared to.  The following conditions
32604  * apply to all code found in this distribution, be it the RC4, RSA,
32605  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
32606  * included with this distribution is covered by the same copyright terms
32607  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
32608  *
32609  * Copyright remains Eric Young's, and as such any Copyright notices in
32610  * the code are not to be removed.
32611  * If this package is used in a product, Eric Young should be given attribution
32612  * as the author of the parts of the library used.
32613  * This can be in the form of a textual message at program startup or
32614  * in documentation (online or textual) provided with the package.
32615  *
32616  * Redistribution and use in source and binary forms, with or without
32617  * modification, are permitted provided that the following conditions
32618  * are met:
32619  * 1. Redistributions of source code must retain the copyright
32620  *    notice, this list of conditions and the following disclaimer.
32621  * 2. Redistributions in binary form must reproduce the above copyright
32622  *    notice, this list of conditions and the following disclaimer in the
32623  *    documentation and/or other materials provided with the distribution.
32624  * 3. All advertising materials mentioning features or use of this software
32625  *    must display the following acknowledgement:
32626  *    "This product includes cryptographic software written by
32627  *     Eric Young (eay@cryptsoft.com)"
32628  *    The word 'cryptographic' can be left out if the rouines from the library
32629  *    being used are not cryptographic related :-).
32630  * 4. If you include any Windows specific code (or a derivative thereof) from
32631  *    the apps directory (application code) you must include an acknowledgement:
32632  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
32633  *
32634  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
32635  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32636  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32637  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
32638  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32639  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32640  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32641  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32642  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32643  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32644  * SUCH DAMAGE.
32645  *
32646  * The licence and distribution terms for any publically available version or
32647  * derivative of this code cannot be changed.  i.e. this code cannot simply be
32648  * copied and put under another distribution licence
32649  * [including the GNU Public Licence.]
32650  */
32651 # 76 "/usr/include/openssl/dsa.h" 2 3 4
32652 
32653 # 1 "/usr/include/openssl/crypto.h" 1 3 4
32654 /* crypto/crypto.h */
32655 /* ====================================================================
32656  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
32657  *
32658  * Redistribution and use in source and binary forms, with or without
32659  * modification, are permitted provided that the following conditions
32660  * are met:
32661  *
32662  * 1. Redistributions of source code must retain the above copyright
32663  *    notice, this list of conditions and the following disclaimer.
32664  *
32665  * 2. Redistributions in binary form must reproduce the above copyright
32666  *    notice, this list of conditions and the following disclaimer in
32667  *    the documentation and/or other materials provided with the
32668  *    distribution.
32669  *
32670  * 3. All advertising materials mentioning features or use of this
32671  *    software must display the following acknowledgment:
32672  *    "This product includes software developed by the OpenSSL Project
32673  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
32674  *
32675  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
32676  *    endorse or promote products derived from this software without
32677  *    prior written permission. For written permission, please contact
32678  *    openssl-core@openssl.org.
32679  *
32680  * 5. Products derived from this software may not be called "OpenSSL"
32681  *    nor may "OpenSSL" appear in their names without prior written
32682  *    permission of the OpenSSL Project.
32683  *
32684  * 6. Redistributions of any form whatsoever must retain the following
32685  *    acknowledgment:
32686  *    "This product includes software developed by the OpenSSL Project
32687  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
32688  *
32689  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
32690  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32691  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32692  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
32693  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32694  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32695  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32696  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32697  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32698  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32699  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
32700  * OF THE POSSIBILITY OF SUCH DAMAGE.
32701  * ====================================================================
32702  *
32703  * This product includes cryptographic software written by Eric Young
32704  * (eay@cryptsoft.com).  This product includes software written by Tim
32705  * Hudson (tjh@cryptsoft.com).
32706  *
32707  */
32708 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
32709  * All rights reserved.
32710  *
32711  * This package is an SSL implementation written
32712  * by Eric Young (eay@cryptsoft.com).
32713  * The implementation was written so as to conform with Netscapes SSL.
32714  *
32715  * This library is free for commercial and non-commercial use as long as
32716  * the following conditions are aheared to.  The following conditions
32717  * apply to all code found in this distribution, be it the RC4, RSA,
32718  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
32719  * included with this distribution is covered by the same copyright terms
32720  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
32721  *
32722  * Copyright remains Eric Young's, and as such any Copyright notices in
32723  * the code are not to be removed.
32724  * If this package is used in a product, Eric Young should be given attribution
32725  * as the author of the parts of the library used.
32726  * This can be in the form of a textual message at program startup or
32727  * in documentation (online or textual) provided with the package.
32728  *
32729  * Redistribution and use in source and binary forms, with or without
32730  * modification, are permitted provided that the following conditions
32731  * are met:
32732  * 1. Redistributions of source code must retain the copyright
32733  *    notice, this list of conditions and the following disclaimer.
32734  * 2. Redistributions in binary form must reproduce the above copyright
32735  *    notice, this list of conditions and the following disclaimer in the
32736  *    documentation and/or other materials provided with the distribution.
32737  * 3. All advertising materials mentioning features or use of this software
32738  *    must display the following acknowledgement:
32739  *    "This product includes cryptographic software written by
32740  *     Eric Young (eay@cryptsoft.com)"
32741  *    The word 'cryptographic' can be left out if the rouines from the library
32742  *    being used are not cryptographic related :-).
32743  * 4. If you include any Windows specific code (or a derivative thereof) from
32744  *    the apps directory (application code) you must include an acknowledgement:
32745  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
32746  *
32747  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
32748  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32749  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32750  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
32751  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32752  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32753  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32754  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32755  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32756  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32757  * SUCH DAMAGE.
32758  *
32759  * The licence and distribution terms for any publically available version or
32760  * derivative of this code cannot be changed.  i.e. this code cannot simply be
32761  * copied and put under another distribution licence
32762  * [including the GNU Public Licence.]
32763  */
32764 /* ====================================================================
32765  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
32766  * ECDH support in OpenSSL originally developed by
32767  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
32768  */
32769 # 78 "/usr/include/openssl/dsa.h" 2 3 4
32770 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
32771 /* ====================================================================
32772  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
32773  *
32774  * Redistribution and use in source and binary forms, with or without
32775  * modification, are permitted provided that the following conditions
32776  * are met:
32777  *
32778  * 1. Redistributions of source code must retain the above copyright
32779  *    notice, this list of conditions and the following disclaimer.
32780  *
32781  * 2. Redistributions in binary form must reproduce the above copyright
32782  *    notice, this list of conditions and the following disclaimer in
32783  *    the documentation and/or other materials provided with the
32784  *    distribution.
32785  *
32786  * 3. All advertising materials mentioning features or use of this
32787  *    software must display the following acknowledgment:
32788  *    "This product includes software developed by the OpenSSL Project
32789  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
32790  *
32791  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
32792  *    endorse or promote products derived from this software without
32793  *    prior written permission. For written permission, please contact
32794  *    openssl-core@openssl.org.
32795  *
32796  * 5. Products derived from this software may not be called "OpenSSL"
32797  *    nor may "OpenSSL" appear in their names without prior written
32798  *    permission of the OpenSSL Project.
32799  *
32800  * 6. Redistributions of any form whatsoever must retain the following
32801  *    acknowledgment:
32802  *    "This product includes software developed by the OpenSSL Project
32803  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
32804  *
32805  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
32806  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32807  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32808  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
32809  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32810  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32811  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32812  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32813  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32814  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32815  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
32816  * OF THE POSSIBILITY OF SUCH DAMAGE.
32817  * ====================================================================
32818  *
32819  * This product includes cryptographic software written by Eric Young
32820  * (eay@cryptsoft.com).  This product includes software written by Tim
32821  * Hudson (tjh@cryptsoft.com).
32822  *
32823  */
32824 # 79 "/usr/include/openssl/dsa.h" 2 3 4
32825 
32826 
32827 # 1 "/usr/include/openssl/bn.h" 1 3 4
32828 /* crypto/bn/bn.h */
32829 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
32830  * All rights reserved.
32831  *
32832  * This package is an SSL implementation written
32833  * by Eric Young (eay@cryptsoft.com).
32834  * The implementation was written so as to conform with Netscapes SSL.
32835  *
32836  * This library is free for commercial and non-commercial use as long as
32837  * the following conditions are aheared to.  The following conditions
32838  * apply to all code found in this distribution, be it the RC4, RSA,
32839  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
32840  * included with this distribution is covered by the same copyright terms
32841  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
32842  *
32843  * Copyright remains Eric Young's, and as such any Copyright notices in
32844  * the code are not to be removed.
32845  * If this package is used in a product, Eric Young should be given attribution
32846  * as the author of the parts of the library used.
32847  * This can be in the form of a textual message at program startup or
32848  * in documentation (online or textual) provided with the package.
32849  *
32850  * Redistribution and use in source and binary forms, with or without
32851  * modification, are permitted provided that the following conditions
32852  * are met:
32853  * 1. Redistributions of source code must retain the copyright
32854  *    notice, this list of conditions and the following disclaimer.
32855  * 2. Redistributions in binary form must reproduce the above copyright
32856  *    notice, this list of conditions and the following disclaimer in the
32857  *    documentation and/or other materials provided with the distribution.
32858  * 3. All advertising materials mentioning features or use of this software
32859  *    must display the following acknowledgement:
32860  *    "This product includes cryptographic software written by
32861  *     Eric Young (eay@cryptsoft.com)"
32862  *    The word 'cryptographic' can be left out if the rouines from the library
32863  *    being used are not cryptographic related :-).
32864  * 4. If you include any Windows specific code (or a derivative thereof) from
32865  *    the apps directory (application code) you must include an acknowledgement:
32866  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
32867  *
32868  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
32869  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32870  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32871  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
32872  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32873  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32874  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32875  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32876  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32877  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32878  * SUCH DAMAGE.
32879  *
32880  * The licence and distribution terms for any publically available version or
32881  * derivative of this code cannot be changed.  i.e. this code cannot simply be
32882  * copied and put under another distribution licence
32883  * [including the GNU Public Licence.]
32884  */
32885 /* ====================================================================
32886  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
32887  *
32888  * Redistribution and use in source and binary forms, with or without
32889  * modification, are permitted provided that the following conditions
32890  * are met:
32891  *
32892  * 1. Redistributions of source code must retain the above copyright
32893  *    notice, this list of conditions and the following disclaimer.
32894  *
32895  * 2. Redistributions in binary form must reproduce the above copyright
32896  *    notice, this list of conditions and the following disclaimer in
32897  *    the documentation and/or other materials provided with the
32898  *    distribution.
32899  *
32900  * 3. All advertising materials mentioning features or use of this
32901  *    software must display the following acknowledgment:
32902  *    "This product includes software developed by the OpenSSL Project
32903  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
32904  *
32905  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
32906  *    endorse or promote products derived from this software without
32907  *    prior written permission. For written permission, please contact
32908  *    openssl-core@openssl.org.
32909  *
32910  * 5. Products derived from this software may not be called "OpenSSL"
32911  *    nor may "OpenSSL" appear in their names without prior written
32912  *    permission of the OpenSSL Project.
32913  *
32914  * 6. Redistributions of any form whatsoever must retain the following
32915  *    acknowledgment:
32916  *    "This product includes software developed by the OpenSSL Project
32917  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
32918  *
32919  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
32920  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32921  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32922  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
32923  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32924  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32925  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32926  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32927  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32928  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32929  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
32930  * OF THE POSSIBILITY OF SUCH DAMAGE.
32931  * ====================================================================
32932  *
32933  * This product includes cryptographic software written by Eric Young
32934  * (eay@cryptsoft.com).  This product includes software written by Tim
32935  * Hudson (tjh@cryptsoft.com).
32936  *
32937  */
32938 /* ====================================================================
32939  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
32940  *
32941  * Portions of the attached software ("Contribution") are developed by
32942  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
32943  *
32944  * The Contribution is licensed pursuant to the Eric Young open source
32945  * license provided above.
32946  *
32947  * The binary polynomial arithmetic software is originally written by
32948  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
32949  *
32950  */
32951 # 82 "/usr/include/openssl/dsa.h" 2 3 4
32952 
32953 # 1 "/usr/include/openssl/dh.h" 1 3 4
32954 /* crypto/dh/dh.h */
32955 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
32956  * All rights reserved.
32957  *
32958  * This package is an SSL implementation written
32959  * by Eric Young (eay@cryptsoft.com).
32960  * The implementation was written so as to conform with Netscapes SSL.
32961  *
32962  * This library is free for commercial and non-commercial use as long as
32963  * the following conditions are aheared to.  The following conditions
32964  * apply to all code found in this distribution, be it the RC4, RSA,
32965  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
32966  * included with this distribution is covered by the same copyright terms
32967  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
32968  *
32969  * Copyright remains Eric Young's, and as such any Copyright notices in
32970  * the code are not to be removed.
32971  * If this package is used in a product, Eric Young should be given attribution
32972  * as the author of the parts of the library used.
32973  * This can be in the form of a textual message at program startup or
32974  * in documentation (online or textual) provided with the package.
32975  *
32976  * Redistribution and use in source and binary forms, with or without
32977  * modification, are permitted provided that the following conditions
32978  * are met:
32979  * 1. Redistributions of source code must retain the copyright
32980  *    notice, this list of conditions and the following disclaimer.
32981  * 2. Redistributions in binary form must reproduce the above copyright
32982  *    notice, this list of conditions and the following disclaimer in the
32983  *    documentation and/or other materials provided with the distribution.
32984  * 3. All advertising materials mentioning features or use of this software
32985  *    must display the following acknowledgement:
32986  *    "This product includes cryptographic software written by
32987  *     Eric Young (eay@cryptsoft.com)"
32988  *    The word 'cryptographic' can be left out if the rouines from the library
32989  *    being used are not cryptographic related :-).
32990  * 4. If you include any Windows specific code (or a derivative thereof) from
32991  *    the apps directory (application code) you must include an acknowledgement:
32992  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
32993  *
32994  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
32995  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32996  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32997  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
32998  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32999  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33000  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33001  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33002  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33003  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33004  * SUCH DAMAGE.
33005  *
33006  * The licence and distribution terms for any publically available version or
33007  * derivative of this code cannot be changed.  i.e. this code cannot simply be
33008  * copied and put under another distribution licence
33009  * [including the GNU Public Licence.]
33010  */
33011 
33012 
33013 
33014 
33015 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
33016 /* e_os2.h */
33017 /* ====================================================================
33018  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
33019  *
33020  * Redistribution and use in source and binary forms, with or without
33021  * modification, are permitted provided that the following conditions
33022  * are met:
33023  *
33024  * 1. Redistributions of source code must retain the above copyright
33025  *    notice, this list of conditions and the following disclaimer.
33026  *
33027  * 2. Redistributions in binary form must reproduce the above copyright
33028  *    notice, this list of conditions and the following disclaimer in
33029  *    the documentation and/or other materials provided with the
33030  *    distribution.
33031  *
33032  * 3. All advertising materials mentioning features or use of this
33033  *    software must display the following acknowledgment:
33034  *    "This product includes software developed by the OpenSSL Project
33035  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
33036  *
33037  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
33038  *    endorse or promote products derived from this software without
33039  *    prior written permission. For written permission, please contact
33040  *    openssl-core@openssl.org.
33041  *
33042  * 5. Products derived from this software may not be called "OpenSSL"
33043  *    nor may "OpenSSL" appear in their names without prior written
33044  *    permission of the OpenSSL Project.
33045  *
33046  * 6. Redistributions of any form whatsoever must retain the following
33047  *    acknowledgment:
33048  *    "This product includes software developed by the OpenSSL Project
33049  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
33050  *
33051  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
33052  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33053  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
33054  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
33055  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33056  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
33057  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
33058  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33059  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
33060  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33061  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
33062  * OF THE POSSIBILITY OF SUCH DAMAGE.
33063  * ====================================================================
33064  *
33065  * This product includes cryptographic software written by Eric Young
33066  * (eay@cryptsoft.com).  This product includes software written by Tim
33067  * Hudson (tjh@cryptsoft.com).
33068  *
33069  */
33070 
33071 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
33072 /* opensslconf.h */
33073 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
33074 
33075 
33076 
33077 
33078 /* OpenSSL was configured with the following options: */
33079 # 108 "/usr/include/openssl/opensslconf.h" 3 4
33080 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
33081    asks for it.  This is a transient feature that is provided for those
33082    who haven't had the time to do the appropriate changes in their
33083    applications.  */
33084 # 204 "/usr/include/openssl/opensslconf.h" 3 4
33085 /* crypto/opensslconf.h.in */
33086 
33087 /* Generate 80386 code? */
33088 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
33089 # 63 "/usr/include/openssl/dh.h" 2 3 4
33090 
33091 
33092 
33093 
33094 
33095 
33096 # 1 "/usr/include/openssl/bio.h" 1 3 4
33097 /* crypto/bio/bio.h */
33098 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
33099  * All rights reserved.
33100  *
33101  * This package is an SSL implementation written
33102  * by Eric Young (eay@cryptsoft.com).
33103  * The implementation was written so as to conform with Netscapes SSL.
33104  *
33105  * This library is free for commercial and non-commercial use as long as
33106  * the following conditions are aheared to.  The following conditions
33107  * apply to all code found in this distribution, be it the RC4, RSA,
33108  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
33109  * included with this distribution is covered by the same copyright terms
33110  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
33111  *
33112  * Copyright remains Eric Young's, and as such any Copyright notices in
33113  * the code are not to be removed.
33114  * If this package is used in a product, Eric Young should be given attribution
33115  * as the author of the parts of the library used.
33116  * This can be in the form of a textual message at program startup or
33117  * in documentation (online or textual) provided with the package.
33118  *
33119  * Redistribution and use in source and binary forms, with or without
33120  * modification, are permitted provided that the following conditions
33121  * are met:
33122  * 1. Redistributions of source code must retain the copyright
33123  *    notice, this list of conditions and the following disclaimer.
33124  * 2. Redistributions in binary form must reproduce the above copyright
33125  *    notice, this list of conditions and the following disclaimer in the
33126  *    documentation and/or other materials provided with the distribution.
33127  * 3. All advertising materials mentioning features or use of this software
33128  *    must display the following acknowledgement:
33129  *    "This product includes cryptographic software written by
33130  *     Eric Young (eay@cryptsoft.com)"
33131  *    The word 'cryptographic' can be left out if the rouines from the library
33132  *    being used are not cryptographic related :-).
33133  * 4. If you include any Windows specific code (or a derivative thereof) from
33134  *    the apps directory (application code) you must include an acknowledgement:
33135  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
33136  *
33137  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
33138  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33139  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33140  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
33141  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33142  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33143  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33144  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33145  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33146  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33147  * SUCH DAMAGE.
33148  *
33149  * The licence and distribution terms for any publically available version or
33150  * derivative of this code cannot be changed.  i.e. this code cannot simply be
33151  * copied and put under another distribution licence
33152  * [including the GNU Public Licence.]
33153  */
33154 # 70 "/usr/include/openssl/dh.h" 2 3 4
33155 
33156 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
33157 /* ====================================================================
33158  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
33159  *
33160  * Redistribution and use in source and binary forms, with or without
33161  * modification, are permitted provided that the following conditions
33162  * are met:
33163  *
33164  * 1. Redistributions of source code must retain the above copyright
33165  *    notice, this list of conditions and the following disclaimer.
33166  *
33167  * 2. Redistributions in binary form must reproduce the above copyright
33168  *    notice, this list of conditions and the following disclaimer in
33169  *    the documentation and/or other materials provided with the
33170  *    distribution.
33171  *
33172  * 3. All advertising materials mentioning features or use of this
33173  *    software must display the following acknowledgment:
33174  *    "This product includes software developed by the OpenSSL Project
33175  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
33176  *
33177  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
33178  *    endorse or promote products derived from this software without
33179  *    prior written permission. For written permission, please contact
33180  *    openssl-core@openssl.org.
33181  *
33182  * 5. Products derived from this software may not be called "OpenSSL"
33183  *    nor may "OpenSSL" appear in their names without prior written
33184  *    permission of the OpenSSL Project.
33185  *
33186  * 6. Redistributions of any form whatsoever must retain the following
33187  *    acknowledgment:
33188  *    "This product includes software developed by the OpenSSL Project
33189  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
33190  *
33191  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
33192  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33193  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
33194  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
33195  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33196  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
33197  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
33198  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33199  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
33200  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33201  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
33202  * OF THE POSSIBILITY OF SUCH DAMAGE.
33203  * ====================================================================
33204  *
33205  * This product includes cryptographic software written by Eric Young
33206  * (eay@cryptsoft.com).  This product includes software written by Tim
33207  * Hudson (tjh@cryptsoft.com).
33208  *
33209  */
33210 # 72 "/usr/include/openssl/dh.h" 2 3 4
33211 
33212 # 1 "/usr/include/openssl/bn.h" 1 3 4
33213 /* crypto/bn/bn.h */
33214 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
33215  * All rights reserved.
33216  *
33217  * This package is an SSL implementation written
33218  * by Eric Young (eay@cryptsoft.com).
33219  * The implementation was written so as to conform with Netscapes SSL.
33220  *
33221  * This library is free for commercial and non-commercial use as long as
33222  * the following conditions are aheared to.  The following conditions
33223  * apply to all code found in this distribution, be it the RC4, RSA,
33224  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
33225  * included with this distribution is covered by the same copyright terms
33226  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
33227  *
33228  * Copyright remains Eric Young's, and as such any Copyright notices in
33229  * the code are not to be removed.
33230  * If this package is used in a product, Eric Young should be given attribution
33231  * as the author of the parts of the library used.
33232  * This can be in the form of a textual message at program startup or
33233  * in documentation (online or textual) provided with the package.
33234  *
33235  * Redistribution and use in source and binary forms, with or without
33236  * modification, are permitted provided that the following conditions
33237  * are met:
33238  * 1. Redistributions of source code must retain the copyright
33239  *    notice, this list of conditions and the following disclaimer.
33240  * 2. Redistributions in binary form must reproduce the above copyright
33241  *    notice, this list of conditions and the following disclaimer in the
33242  *    documentation and/or other materials provided with the distribution.
33243  * 3. All advertising materials mentioning features or use of this software
33244  *    must display the following acknowledgement:
33245  *    "This product includes cryptographic software written by
33246  *     Eric Young (eay@cryptsoft.com)"
33247  *    The word 'cryptographic' can be left out if the rouines from the library
33248  *    being used are not cryptographic related :-).
33249  * 4. If you include any Windows specific code (or a derivative thereof) from
33250  *    the apps directory (application code) you must include an acknowledgement:
33251  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
33252  *
33253  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
33254  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33255  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33256  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
33257  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33258  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33259  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33260  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33261  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33262  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33263  * SUCH DAMAGE.
33264  *
33265  * The licence and distribution terms for any publically available version or
33266  * derivative of this code cannot be changed.  i.e. this code cannot simply be
33267  * copied and put under another distribution licence
33268  * [including the GNU Public Licence.]
33269  */
33270 /* ====================================================================
33271  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
33272  *
33273  * Redistribution and use in source and binary forms, with or without
33274  * modification, are permitted provided that the following conditions
33275  * are met:
33276  *
33277  * 1. Redistributions of source code must retain the above copyright
33278  *    notice, this list of conditions and the following disclaimer.
33279  *
33280  * 2. Redistributions in binary form must reproduce the above copyright
33281  *    notice, this list of conditions and the following disclaimer in
33282  *    the documentation and/or other materials provided with the
33283  *    distribution.
33284  *
33285  * 3. All advertising materials mentioning features or use of this
33286  *    software must display the following acknowledgment:
33287  *    "This product includes software developed by the OpenSSL Project
33288  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
33289  *
33290  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
33291  *    endorse or promote products derived from this software without
33292  *    prior written permission. For written permission, please contact
33293  *    openssl-core@openssl.org.
33294  *
33295  * 5. Products derived from this software may not be called "OpenSSL"
33296  *    nor may "OpenSSL" appear in their names without prior written
33297  *    permission of the OpenSSL Project.
33298  *
33299  * 6. Redistributions of any form whatsoever must retain the following
33300  *    acknowledgment:
33301  *    "This product includes software developed by the OpenSSL Project
33302  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
33303  *
33304  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
33305  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33306  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
33307  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
33308  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33309  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
33310  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
33311  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33312  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
33313  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33314  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
33315  * OF THE POSSIBILITY OF SUCH DAMAGE.
33316  * ====================================================================
33317  *
33318  * This product includes cryptographic software written by Eric Young
33319  * (eay@cryptsoft.com).  This product includes software written by Tim
33320  * Hudson (tjh@cryptsoft.com).
33321  *
33322  */
33323 /* ====================================================================
33324  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
33325  *
33326  * Portions of the attached software ("Contribution") are developed by
33327  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
33328  *
33329  * The Contribution is licensed pursuant to the Eric Young open source
33330  * license provided above.
33331  *
33332  * The binary polynomial arithmetic software is originally written by
33333  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
33334  *
33335  */
33336 # 74 "/usr/include/openssl/dh.h" 2 3 4
33337 # 82 "/usr/include/openssl/dh.h" 3 4
33338 /*
33339  * new with 0.9.7h; the built-in DH
33340  * implementation now uses constant time
33341  * modular exponentiation for secret exponents
33342  * by default. This flag causes the
33343  * faster variable sliding window method to
33344  * be used for all exponents.
33345  */
33346 
33347 
33348 /*
33349  * If this flag is set the DH method is FIPS compliant and can be used in
33350  * FIPS mode. This is set in the validated module method. If an application
33351  * sets this flag in its own methods it is its reposibility to ensure the
33352  * result is compliant.
33353  */
33354 
33355 
33356 
33357 /*
33358  * If this flag is set the operations normally disabled in FIPS mode are
33359  * permitted it is then the applications responsibility to ensure that the
33360  * usage is compliant.
33361  */
33362 
33363 
33364 
33365 
33366 
33367 
33368 
33369 /* Already defined in ossl_typ.h */
33370 /* typedef struct dh_st DH; */
33371 /* typedef struct dh_method DH_METHOD; */
33372 
33373 struct dh_method {
33374     const char *name;
33375     /* Methods here */
33376     int (*generate_key) (DH *dh);
33377     int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
33378     /* Can be null */
33379     int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
33380                        const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
33381                        BN_MONT_CTX *m_ctx);
33382     int (*init) (DH *dh);
33383     int (*finish) (DH *dh);
33384     int flags;
33385     char *app_data;
33386     /* If this is non-NULL, it will be used to generate parameters */
33387     int (*generate_params) (DH *dh, int prime_len, int generator,
33388                             BN_GENCB *cb);
33389 };
33390 
33391 struct dh_st {
33392     /*
33393      * This first argument is used to pick up errors when a DH is passed
33394      * instead of a EVP_PKEY
33395      */
33396     int pad;
33397     int version;
33398     BIGNUM *p;
33399     BIGNUM *g;
33400     long length; /* optional */
33401     BIGNUM *pub_key; /* g^x % p */
33402     BIGNUM *priv_key; /* x */
33403     int flags;
33404     BN_MONT_CTX *method_mont_p;
33405     /* Place holders if we want to do X9.42 DH */
33406     BIGNUM *q;
33407     BIGNUM *j;
33408     unsigned char *seed;
33409     int seedlen;
33410     BIGNUM *counter;
33411     int references;
33412     CRYPTO_EX_DATA ex_data;
33413     const DH_METHOD *meth;
33414     ENGINE *engine;
33415 };
33416 
33417 
33418 /* #define DH_GENERATOR_3       3 */
33419 
33420 
33421 /* DH_check error codes */
33422 # 174 "/usr/include/openssl/dh.h" 3 4
33423 /* DH_check_pub_key error codes */
33424 
33425 
33426 
33427 
33428 /*
33429  * primes p where (p-1)/2 is prime too are called "safe"; we define this for
33430  * backward compatibility:
33431  */
33432 # 209 "/usr/include/openssl/dh.h" 3 4
33433 DH *DHparams_dup(DH *);
33434 
33435 const DH_METHOD *DH_OpenSSL(void);
33436 
33437 void DH_set_default_method(const DH_METHOD *meth);
33438 const DH_METHOD *DH_get_default_method(void);
33439 int DH_set_method(DH *dh, const DH_METHOD *meth);
33440 DH *DH_new_method(ENGINE *engine);
33441 
33442 DH *DH_new(void);
33443 void DH_free(DH *dh);
33444 int DH_up_ref(DH *dh);
33445 int DH_size(const DH *dh);
33446 int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
33447                         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
33448 int DH_set_ex_data(DH *d, int idx, void *arg);
33449 void *DH_get_ex_data(DH *d, int idx);
33450 
33451 /* Deprecated version */
33452 
33453 DH *DH_generate_parameters(int prime_len, int generator,
33454                            void (*callback) (int, int, void *), void *cb_arg);
33455 
33456 
33457 /* New version */
33458 int DH_generate_parameters_ex(DH *dh, int prime_len, int generator,
33459                               BN_GENCB *cb);
33460 
33461 int DH_check(const DH *dh, int *codes);
33462 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes);
33463 int DH_generate_key(DH *dh);
33464 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
33465 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh);
33466 DH *d2i_DHparams(DH **a, const unsigned char **pp, long length);
33467 int i2d_DHparams(const DH *a, unsigned char **pp);
33468 DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length);
33469 int i2d_DHxparams(const DH *a, unsigned char **pp);
33470 
33471 int DHparams_print_fp(FILE *fp, const DH *x);
33472 
33473 
33474 int DHparams_print(BIO *bp, const DH *x);
33475 
33476 
33477 
33478 
33479 /* RFC 5114 parameters */
33480 DH *DH_get_1024_160(void);
33481 DH *DH_get_2048_224(void);
33482 DH *DH_get_2048_256(void);
33483 
33484 
33485 /* RFC2631 KDF */
33486 int DH_KDF_X9_42(unsigned char *out, size_t outlen,
33487                  const unsigned char *Z, size_t Zlen,
33488                  ASN1_OBJECT *key_oid,
33489                  const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
33490 # 357 "/usr/include/openssl/dh.h" 3 4
33491 /* KDF types */
33492 
33493 
33494 
33495 /* BEGIN ERROR CODES */
33496 /*
33497  * The following lines are auto generated by the script mkerr.pl. Any changes
33498  * made after this point may be overwritten when the script is next run.
33499  */
33500 void ERR_load_DH_strings(void);
33501 
33502 /* Error codes for the DH functions. */
33503 
33504 /* Function codes. */
33505 # 392 "/usr/include/openssl/dh.h" 3 4
33506 /* Reason codes. */
33507 # 84 "/usr/include/openssl/dsa.h" 2 3 4
33508 # 92 "/usr/include/openssl/dsa.h" 3 4
33509 /*
33510  * new with 0.9.7h; the built-in DSA implementation now uses constant time
33511  * modular exponentiation for secret exponents by default. This flag causes
33512  * the faster variable sliding window method to be used for all exponents.
33513  */
33514 
33515 
33516 /*
33517  * If this flag is set the DSA method is FIPS compliant and can be used in
33518  * FIPS mode. This is set in the validated module method. If an application
33519  * sets this flag in its own methods it is its reposibility to ensure the
33520  * result is compliant.
33521  */
33522 
33523 
33524 
33525 /*
33526  * If this flag is set the operations normally disabled in FIPS mode are
33527  * permitted it is then the applications responsibility to ensure that the
33528  * usage is compliant.
33529  */
33530 
33531 
33532 
33533 
33534 
33535 
33536 
33537 /* Already defined in ossl_typ.h */
33538 /* typedef struct dsa_st DSA; */
33539 /* typedef struct dsa_method DSA_METHOD; */
33540 
33541 typedef struct DSA_SIG_st {
33542     BIGNUM *r;
33543     BIGNUM *s;
33544 } DSA_SIG;
33545 
33546 struct dsa_method {
33547     const char *name;
33548     DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa);
33549     int (*dsa_sign_setup) (DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
33550                            BIGNUM **rp);
33551     int (*dsa_do_verify) (const unsigned char *dgst, int dgst_len,
33552                           DSA_SIG *sig, DSA *dsa);
33553     int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
33554                         BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
33555                         BN_MONT_CTX *in_mont);
33556     /* Can be null */
33557     int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
33558                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
33559     int (*init) (DSA *dsa);
33560     int (*finish) (DSA *dsa);
33561     int flags;
33562     char *app_data;
33563     /* If this is non-NULL, it is used to generate DSA parameters */
33564     int (*dsa_paramgen) (DSA *dsa, int bits,
33565                          const unsigned char *seed, int seed_len,
33566                          int *counter_ret, unsigned long *h_ret,
33567                          BN_GENCB *cb);
33568     /* If this is non-NULL, it is used to generate DSA keys */
33569     int (*dsa_keygen) (DSA *dsa);
33570 };
33571 
33572 struct dsa_st {
33573     /*
33574      * This first variable is used to pick up errors where a DSA is passed
33575      * instead of of a EVP_PKEY
33576      */
33577     int pad;
33578     long version;
33579     int write_params;
33580     BIGNUM *p;
33581     BIGNUM *q; /* == 20 */
33582     BIGNUM *g;
33583     BIGNUM *pub_key; /* y public key */
33584     BIGNUM *priv_key; /* x private key */
33585     BIGNUM *kinv; /* Signing pre-calc */
33586     BIGNUM *r; /* Signing pre-calc */
33587     int flags;
33588     /* Normally used to cache montgomery values */
33589     BN_MONT_CTX *method_mont_p;
33590     int references;
33591     CRYPTO_EX_DATA ex_data;
33592     const DSA_METHOD *meth;
33593     /* functional reference if 'meth' is ENGINE-provided */
33594     ENGINE *engine;
33595 };
33596 # 187 "/usr/include/openssl/dsa.h" 3 4
33597 DSA *DSAparams_dup(DSA *x);
33598 DSA_SIG *DSA_SIG_new(void);
33599 void DSA_SIG_free(DSA_SIG *a);
33600 int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
33601 DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length);
33602 
33603 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
33604 int DSA_do_verify(const unsigned char *dgst, int dgst_len,
33605                   DSA_SIG *sig, DSA *dsa);
33606 
33607 const DSA_METHOD *DSA_OpenSSL(void);
33608 
33609 void DSA_set_default_method(const DSA_METHOD *);
33610 const DSA_METHOD *DSA_get_default_method(void);
33611 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
33612 
33613 DSA *DSA_new(void);
33614 DSA *DSA_new_method(ENGINE *engine);
33615 void DSA_free(DSA *r);
33616 /* "up" the DSA object's reference count */
33617 int DSA_up_ref(DSA *r);
33618 int DSA_size(const DSA *);
33619         /* next 4 return -1 on error */
33620 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
33621 int DSA_sign(int type, const unsigned char *dgst, int dlen,
33622              unsigned char *sig, unsigned int *siglen, DSA *dsa);
33623 int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
33624                const unsigned char *sigbuf, int siglen, DSA *dsa);
33625 int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
33626                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
33627 int DSA_set_ex_data(DSA *d, int idx, void *arg);
33628 void *DSA_get_ex_data(DSA *d, int idx);
33629 
33630 DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
33631 DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
33632 DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
33633 
33634 /* Deprecated version */
33635 
33636 DSA *DSA_generate_parameters(int bits,
33637                              unsigned char *seed, int seed_len,
33638                              int *counter_ret, unsigned long *h_ret, void
33639                               (*callback) (int, int, void *), void *cb_arg);
33640 
33641 
33642 /* New version */
33643 int DSA_generate_parameters_ex(DSA *dsa, int bits,
33644                                const unsigned char *seed, int seed_len,
33645                                int *counter_ret, unsigned long *h_ret,
33646                                BN_GENCB *cb);
33647 
33648 int DSA_generate_key(DSA *a);
33649 int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
33650 int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
33651 int i2d_DSAparams(const DSA *a, unsigned char **pp);
33652 
33653 
33654 int DSAparams_print(BIO *bp, const DSA *x);
33655 int DSA_print(BIO *bp, const DSA *x, int off);
33656 
33657 
33658 int DSAparams_print_fp(FILE *fp, const DSA *x);
33659 int DSA_print_fp(FILE *bp, const DSA *x, int off);
33660 
33661 
33662 
33663 /*
33664  * Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only
33665  * have one value here we set the number of checks to 64 which is the 128 bit
33666  * security level that is the highest level and valid for creating a 3072 bit
33667  * DSA key.
33668  */
33669 
33670 
33671 
33672 
33673 /*
33674  * Convert DSA structure (key or just parameters) into DH structure (be
33675  * careful to avoid small subgroup attacks when using this!)
33676  */
33677 DH *DSA_dup_DH(const DSA *r);
33678 # 278 "/usr/include/openssl/dsa.h" 3 4
33679 /* BEGIN ERROR CODES */
33680 /*
33681  * The following lines are auto generated by the script mkerr.pl. Any changes
33682  * made after this point may be overwritten when the script is next run.
33683  */
33684 void ERR_load_DSA_strings(void);
33685 
33686 /* Error codes for the DSA functions. */
33687 
33688 /* Function codes. */
33689 # 316 "/usr/include/openssl/dsa.h" 3 4
33690 /* Reason codes. */
33691 # 100 "/usr/include/openssl/x509.h" 2 3 4
33692 
33693 
33694 # 1 "/usr/include/openssl/dh.h" 1 3 4
33695 /* crypto/dh/dh.h */
33696 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
33697  * All rights reserved.
33698  *
33699  * This package is an SSL implementation written
33700  * by Eric Young (eay@cryptsoft.com).
33701  * The implementation was written so as to conform with Netscapes SSL.
33702  *
33703  * This library is free for commercial and non-commercial use as long as
33704  * the following conditions are aheared to.  The following conditions
33705  * apply to all code found in this distribution, be it the RC4, RSA,
33706  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
33707  * included with this distribution is covered by the same copyright terms
33708  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
33709  *
33710  * Copyright remains Eric Young's, and as such any Copyright notices in
33711  * the code are not to be removed.
33712  * If this package is used in a product, Eric Young should be given attribution
33713  * as the author of the parts of the library used.
33714  * This can be in the form of a textual message at program startup or
33715  * in documentation (online or textual) provided with the package.
33716  *
33717  * Redistribution and use in source and binary forms, with or without
33718  * modification, are permitted provided that the following conditions
33719  * are met:
33720  * 1. Redistributions of source code must retain the copyright
33721  *    notice, this list of conditions and the following disclaimer.
33722  * 2. Redistributions in binary form must reproduce the above copyright
33723  *    notice, this list of conditions and the following disclaimer in the
33724  *    documentation and/or other materials provided with the distribution.
33725  * 3. All advertising materials mentioning features or use of this software
33726  *    must display the following acknowledgement:
33727  *    "This product includes cryptographic software written by
33728  *     Eric Young (eay@cryptsoft.com)"
33729  *    The word 'cryptographic' can be left out if the rouines from the library
33730  *    being used are not cryptographic related :-).
33731  * 4. If you include any Windows specific code (or a derivative thereof) from
33732  *    the apps directory (application code) you must include an acknowledgement:
33733  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
33734  *
33735  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
33736  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33737  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33738  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
33739  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33740  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33741  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33742  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33743  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33744  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33745  * SUCH DAMAGE.
33746  *
33747  * The licence and distribution terms for any publically available version or
33748  * derivative of this code cannot be changed.  i.e. this code cannot simply be
33749  * copied and put under another distribution licence
33750  * [including the GNU Public Licence.]
33751  */
33752 # 103 "/usr/include/openssl/x509.h" 2 3 4
33753 
33754 
33755 
33756 
33757 # 1 "/usr/include/openssl/sha.h" 1 3 4
33758 /* crypto/sha/sha.h */
33759 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
33760  * All rights reserved.
33761  *
33762  * This package is an SSL implementation written
33763  * by Eric Young (eay@cryptsoft.com).
33764  * The implementation was written so as to conform with Netscapes SSL.
33765  *
33766  * This library is free for commercial and non-commercial use as long as
33767  * the following conditions are aheared to.  The following conditions
33768  * apply to all code found in this distribution, be it the RC4, RSA,
33769  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
33770  * included with this distribution is covered by the same copyright terms
33771  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
33772  *
33773  * Copyright remains Eric Young's, and as such any Copyright notices in
33774  * the code are not to be removed.
33775  * If this package is used in a product, Eric Young should be given attribution
33776  * as the author of the parts of the library used.
33777  * This can be in the form of a textual message at program startup or
33778  * in documentation (online or textual) provided with the package.
33779  *
33780  * Redistribution and use in source and binary forms, with or without
33781  * modification, are permitted provided that the following conditions
33782  * are met:
33783  * 1. Redistributions of source code must retain the copyright
33784  *    notice, this list of conditions and the following disclaimer.
33785  * 2. Redistributions in binary form must reproduce the above copyright
33786  *    notice, this list of conditions and the following disclaimer in the
33787  *    documentation and/or other materials provided with the distribution.
33788  * 3. All advertising materials mentioning features or use of this software
33789  *    must display the following acknowledgement:
33790  *    "This product includes cryptographic software written by
33791  *     Eric Young (eay@cryptsoft.com)"
33792  *    The word 'cryptographic' can be left out if the rouines from the library
33793  *    being used are not cryptographic related :-).
33794  * 4. If you include any Windows specific code (or a derivative thereof) from
33795  *    the apps directory (application code) you must include an acknowledgement:
33796  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
33797  *
33798  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
33799  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33800  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33801  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
33802  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33803  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33804  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33805  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33806  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33807  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33808  * SUCH DAMAGE.
33809  *
33810  * The licence and distribution terms for any publically available version or
33811  * derivative of this code cannot be changed.  i.e. this code cannot simply be
33812  * copied and put under another distribution licence
33813  * [including the GNU Public Licence.]
33814  */
33815 
33816 
33817 
33818 
33819 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
33820 /* e_os2.h */
33821 /* ====================================================================
33822  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
33823  *
33824  * Redistribution and use in source and binary forms, with or without
33825  * modification, are permitted provided that the following conditions
33826  * are met:
33827  *
33828  * 1. Redistributions of source code must retain the above copyright
33829  *    notice, this list of conditions and the following disclaimer.
33830  *
33831  * 2. Redistributions in binary form must reproduce the above copyright
33832  *    notice, this list of conditions and the following disclaimer in
33833  *    the documentation and/or other materials provided with the
33834  *    distribution.
33835  *
33836  * 3. All advertising materials mentioning features or use of this
33837  *    software must display the following acknowledgment:
33838  *    "This product includes software developed by the OpenSSL Project
33839  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
33840  *
33841  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
33842  *    endorse or promote products derived from this software without
33843  *    prior written permission. For written permission, please contact
33844  *    openssl-core@openssl.org.
33845  *
33846  * 5. Products derived from this software may not be called "OpenSSL"
33847  *    nor may "OpenSSL" appear in their names without prior written
33848  *    permission of the OpenSSL Project.
33849  *
33850  * 6. Redistributions of any form whatsoever must retain the following
33851  *    acknowledgment:
33852  *    "This product includes software developed by the OpenSSL Project
33853  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
33854  *
33855  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
33856  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33857  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
33858  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
33859  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33860  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
33861  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
33862  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33863  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
33864  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33865  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
33866  * OF THE POSSIBILITY OF SUCH DAMAGE.
33867  * ====================================================================
33868  *
33869  * This product includes cryptographic software written by Eric Young
33870  * (eay@cryptsoft.com).  This product includes software written by Tim
33871  * Hudson (tjh@cryptsoft.com).
33872  *
33873  */
33874 
33875 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
33876 /* opensslconf.h */
33877 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
33878 
33879 
33880 
33881 
33882 /* OpenSSL was configured with the following options: */
33883 # 108 "/usr/include/openssl/opensslconf.h" 3 4
33884 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
33885    asks for it.  This is a transient feature that is provided for those
33886    who haven't had the time to do the appropriate changes in their
33887    applications.  */
33888 # 204 "/usr/include/openssl/opensslconf.h" 3 4
33889 /* crypto/opensslconf.h.in */
33890 
33891 /* Generate 80386 code? */
33892 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
33893 # 63 "/usr/include/openssl/sha.h" 2 3 4
33894 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
33895 /*
33896  * CDDL HEADER START
33897  *
33898  * The contents of this file are subject to the terms of the
33899  * Common Development and Distribution License, Version 1.0 only
33900  * (the "License").  You may not use this file except in compliance
33901  * with the License.
33902  *
33903  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
33904  * or http://www.opensolaris.org/os/licensing.
33905  * See the License for the specific language governing permissions
33906  * and limitations under the License.
33907  *
33908  * When distributing Covered Code, include this CDDL HEADER in each
33909  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33910  * If applicable, add the following below this CDDL HEADER, with the
33911  * fields enclosed by brackets "[]" replaced with your own identifying
33912  * information: Portions Copyright [yyyy] [name of copyright owner]
33913  *
33914  * CDDL HEADER END
33915  */
33916 /*	Copyright (c) 1988 AT&T	*/
33917 /*	  All Rights Reserved  	*/
33918 
33919 
33920 /*
33921  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
33922  * Use is subject to license terms.
33923  */
33924 # 64 "/usr/include/openssl/sha.h" 2 3 4
33925 # 77 "/usr/include/openssl/sha.h" 3 4
33926 /*-
33927  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
33928  * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then !
33929  * ! SHA_LONG_LOG2 has to be defined along.                        !
33930  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
33931  */
33932 # 100 "/usr/include/openssl/sha.h" 3 4
33933 typedef struct SHAstate_st {
33934     unsigned int h0, h1, h2, h3, h4;
33935     unsigned int Nl, Nh;
33936     unsigned int data[16];
33937     unsigned int num;
33938 } SHA_CTX;
33939 
33940 
33941 
33942 
33943 
33944 int SHA_Init(SHA_CTX *c);
33945 int SHA_Update(SHA_CTX *c, const void *data, size_t len);
33946 int SHA_Final(unsigned char *md, SHA_CTX *c);
33947 unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md);
33948 void SHA_Transform(SHA_CTX *c, const unsigned char *data);
33949 
33950 
33951 
33952 
33953 
33954 int SHA1_Init(SHA_CTX *c);
33955 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
33956 int SHA1_Final(unsigned char *md, SHA_CTX *c);
33957 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
33958 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
33959 # 134 "/usr/include/openssl/sha.h" 3 4
33960 typedef struct SHA256state_st {
33961     unsigned int h[8];
33962     unsigned int Nl, Nh;
33963     unsigned int data[16];
33964     unsigned int num, md_len;
33965 } SHA256_CTX;
33966 
33967 
33968 
33969 
33970 
33971 
33972 int SHA224_Init(SHA256_CTX *c);
33973 int SHA224_Update(SHA256_CTX *c, const void *data, size_t len);
33974 int SHA224_Final(unsigned char *md, SHA256_CTX *c);
33975 unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md);
33976 int SHA256_Init(SHA256_CTX *c);
33977 int SHA256_Update(SHA256_CTX *c, const void *data, size_t len);
33978 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
33979 unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);
33980 void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
33981 
33982 
33983 
33984 
33985 
33986 
33987 /*
33988  * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64
33989  * being exactly 64-bit wide. See Implementation Notes in sha512.c
33990  * for further details.
33991  */
33992 /*
33993  * SHA-512 treats input data as a
33994  * contiguous array of 64 bit
33995  * wide big-endian values.
33996  */
33997 # 183 "/usr/include/openssl/sha.h" 3 4
33998 typedef struct SHA512state_st {
33999     unsigned long long h[8];
34000     unsigned long long Nl, Nh;
34001     union {
34002         unsigned long long d[16];
34003         unsigned char p[(16*8)];
34004     } u;
34005     unsigned int num, md_len;
34006 } SHA512_CTX;
34007 
34008 
34009 
34010 
34011 
34012 
34013 
34014 int SHA384_Init(SHA512_CTX *c);
34015 int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
34016 int SHA384_Final(unsigned char *md, SHA512_CTX *c);
34017 unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);
34018 int SHA512_Init(SHA512_CTX *c);
34019 int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);
34020 int SHA512_Final(unsigned char *md, SHA512_CTX *c);
34021 unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
34022 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
34023 # 108 "/usr/include/openssl/x509.h" 2 3 4
34024 
34025 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
34026 /* ====================================================================
34027  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
34028  *
34029  * Redistribution and use in source and binary forms, with or without
34030  * modification, are permitted provided that the following conditions
34031  * are met:
34032  *
34033  * 1. Redistributions of source code must retain the above copyright
34034  *    notice, this list of conditions and the following disclaimer.
34035  *
34036  * 2. Redistributions in binary form must reproduce the above copyright
34037  *    notice, this list of conditions and the following disclaimer in
34038  *    the documentation and/or other materials provided with the
34039  *    distribution.
34040  *
34041  * 3. All advertising materials mentioning features or use of this
34042  *    software must display the following acknowledgment:
34043  *    "This product includes software developed by the OpenSSL Project
34044  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
34045  *
34046  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
34047  *    endorse or promote products derived from this software without
34048  *    prior written permission. For written permission, please contact
34049  *    openssl-core@openssl.org.
34050  *
34051  * 5. Products derived from this software may not be called "OpenSSL"
34052  *    nor may "OpenSSL" appear in their names without prior written
34053  *    permission of the OpenSSL Project.
34054  *
34055  * 6. Redistributions of any form whatsoever must retain the following
34056  *    acknowledgment:
34057  *    "This product includes software developed by the OpenSSL Project
34058  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
34059  *
34060  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
34061  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34062  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
34063  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
34064  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34065  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
34066  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
34067  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34068  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
34069  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34070  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34071  * OF THE POSSIBILITY OF SUCH DAMAGE.
34072  * ====================================================================
34073  *
34074  * This product includes cryptographic software written by Eric Young
34075  * (eay@cryptsoft.com).  This product includes software written by Tim
34076  * Hudson (tjh@cryptsoft.com).
34077  *
34078  */
34079 # 110 "/usr/include/openssl/x509.h" 2 3 4
34080 # 137 "/usr/include/openssl/x509.h" 3 4
34081 typedef struct X509_objects_st {
34082     int nid;
34083     int (*a2i) (void);
34084     int (*i2a) (void);
34085 } X509_OBJECTS;
34086 
34087 struct X509_algor_st {
34088     ASN1_OBJECT *algorithm;
34089     ASN1_TYPE *parameter;
34090 } /* X509_ALGOR */ ;
34091 
34092 
34093 
34094 typedef struct stack_st_X509_ALGOR X509_ALGORS;
34095 
34096 typedef struct X509_val_st {
34097     ASN1_TIME *notBefore;
34098     ASN1_TIME *notAfter;
34099 } X509_VAL;
34100 
34101 struct X509_pubkey_st {
34102     X509_ALGOR *algor;
34103     ASN1_BIT_STRING *public_key;
34104     EVP_PKEY *pkey;
34105 };
34106 
34107 typedef struct X509_sig_st {
34108     X509_ALGOR *algor;
34109     ASN1_OCTET_STRING *digest;
34110 } X509_SIG;
34111 
34112 typedef struct X509_name_entry_st {
34113     ASN1_OBJECT *object;
34114     ASN1_STRING *value;
34115     int set;
34116     int size; /* temp variable */
34117 } X509_NAME_ENTRY;
34118 
34119 struct stack_st_X509_NAME_ENTRY { _STACK stack; };
34120 
34121 
34122 /* we always keep X509_NAMEs in 2 forms. */
34123 struct X509_name_st {
34124     struct stack_st_X509_NAME_ENTRY *entries;
34125     int modified; /* true if 'bytes' needs to be built */
34126 
34127     BUF_MEM *bytes;
34128 
34129 
34130 
34131 /*      unsigned long hash; Keep the hash around for lookups */
34132     unsigned char *canon_enc;
34133     int canon_enclen;
34134 } /* X509_NAME */ ;
34135 
34136 struct stack_st_X509_NAME { _STACK stack; };
34137 
34138 
34139 
34140 typedef struct X509_extension_st {
34141     ASN1_OBJECT *object;
34142     ASN1_BOOLEAN critical;
34143     ASN1_OCTET_STRING *value;
34144 } X509_EXTENSION;
34145 
34146 typedef struct stack_st_X509_EXTENSION X509_EXTENSIONS;
34147 
34148 struct stack_st_X509_EXTENSION { _STACK stack; };
34149 
34150 
34151 /* a sequence of these are used */
34152 typedef struct x509_attributes_st {
34153     ASN1_OBJECT *object;
34154     int single; /* 0 for a set, 1 for a single item (which is
34155                                  * wrong) */
34156     union {
34157         char *ptr;
34158         /*
34159          * 0
34160          */ struct stack_st_ASN1_TYPE *set;
34161         /*
34162          * 1
34163          */ ASN1_TYPE *single;
34164     } value;
34165 } X509_ATTRIBUTE;
34166 
34167 struct stack_st_X509_ATTRIBUTE { _STACK stack; };
34168 
34169 
34170 typedef struct X509_req_info_st {
34171     ASN1_ENCODING enc;
34172     ASN1_INTEGER *version;
34173     X509_NAME *subject;
34174     X509_PUBKEY *pubkey;
34175     /*  d=2 hl=2 l=  0 cons: cont: 00 */
34176     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
34177 } X509_REQ_INFO;
34178 
34179 typedef struct X509_req_st {
34180     X509_REQ_INFO *req_info;
34181     X509_ALGOR *sig_alg;
34182     ASN1_BIT_STRING *signature;
34183     int references;
34184 } X509_REQ;
34185 
34186 typedef struct x509_cinf_st {
34187     ASN1_INTEGER *version; /* [ 0 ] default of v1 */
34188     ASN1_INTEGER *serialNumber;
34189     X509_ALGOR *signature;
34190     X509_NAME *issuer;
34191     X509_VAL *validity;
34192     X509_NAME *subject;
34193     X509_PUBKEY *key;
34194     ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */
34195     ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */
34196     struct stack_st_X509_EXTENSION *extensions; /* [ 3 ] optional in v3 */
34197     ASN1_ENCODING enc;
34198 } X509_CINF;
34199 
34200 /*
34201  * This stuff is certificate "auxiliary info" it contains details which are
34202  * useful in certificate stores and databases. When used this is tagged onto
34203  * the end of the certificate itself
34204  */
34205 
34206 typedef struct x509_cert_aux_st {
34207     struct stack_st_ASN1_OBJECT *trust; /* trusted uses */
34208     struct stack_st_ASN1_OBJECT *reject; /* rejected uses */
34209     ASN1_UTF8STRING *alias; /* "friendly name" */
34210     ASN1_OCTET_STRING *keyid; /* key id of private key */
34211     struct stack_st_X509_ALGOR *other; /* other unspecified info */
34212 } X509_CERT_AUX;
34213 
34214 struct x509_st {
34215     X509_CINF *cert_info;
34216     X509_ALGOR *sig_alg;
34217     ASN1_BIT_STRING *signature;
34218     int valid;
34219     int references;
34220     char *name;
34221     CRYPTO_EX_DATA ex_data;
34222     /* These contain copies of various extension values */
34223     long ex_pathlen;
34224     long ex_pcpathlen;
34225     unsigned long ex_flags;
34226     unsigned long ex_kusage;
34227     unsigned long ex_xkusage;
34228     unsigned long ex_nscert;
34229     ASN1_OCTET_STRING *skid;
34230     AUTHORITY_KEYID *akid;
34231     X509_POLICY_CACHE *policy_cache;
34232     struct stack_st_DIST_POINT *crldp;
34233     struct stack_st_GENERAL_NAME *altname;
34234     NAME_CONSTRAINTS *nc;
34235 
34236 
34237 
34238 
34239 
34240     unsigned char sha1_hash[20];
34241 
34242     X509_CERT_AUX *aux;
34243 } /* X509 */ ;
34244 
34245 struct stack_st_X509 { _STACK stack; };
34246 
34247 
34248 /* This is used for a table of trust checking functions */
34249 
34250 typedef struct x509_trust_st {
34251     int trust;
34252     int flags;
34253     int (*check_trust) (struct x509_trust_st *, X509 *, int);
34254     char *name;
34255     int arg1;
34256     void *arg2;
34257 } X509_TRUST;
34258 
34259 struct stack_st_X509_TRUST { _STACK stack; };
34260 
34261 typedef struct x509_cert_pair_st {
34262     X509 *forward;
34263     X509 *reverse;
34264 } X509_CERT_PAIR;
34265 
34266 /* standard trust ids */
34267 # 335 "/usr/include/openssl/x509.h" 3 4
34268 /* Keep these up to date! */
34269 
34270 
34271 
34272 /* trust_flags values */
34273 
34274 
34275 
34276 /* check_trust return codes */
34277 
34278 
34279 
34280 
34281 
34282 /* Flags for X509_print_ex() */
34283 # 366 "/usr/include/openssl/x509.h" 3 4
34284 /* Flags specific to X509_NAME_print_ex() */
34285 
34286 /* The field separator information */
34287 # 381 "/usr/include/openssl/x509.h" 3 4
34288 /* How the field name is shown */
34289 # 392 "/usr/include/openssl/x509.h" 3 4
34290 /*
34291  * This determines if we dump fields we don't recognise: RFC2253 requires
34292  * this.
34293  */
34294 
34295 
34296 
34297 
34298 
34299 
34300 /* Complete set of RFC2253 flags */
34301 
34302 
34303 
34304 
34305 
34306 
34307 
34308 /* readable oneline form */
34309 
34310 
34311 
34312 
34313 
34314 
34315 
34316 /* readable multiline form */
34317 # 427 "/usr/include/openssl/x509.h" 3 4
34318 struct x509_revoked_st {
34319     ASN1_INTEGER *serialNumber;
34320     ASN1_TIME *revocationDate;
34321     struct stack_st_X509_EXTENSION /* optional */ *extensions;
34322     /* Set up if indirect CRL */
34323     struct stack_st_GENERAL_NAME *issuer;
34324     /* Revocation reason */
34325     int reason;
34326     int sequence; /* load sequence */
34327 };
34328 
34329 struct stack_st_X509_REVOKED { _STACK stack; };
34330 
34331 
34332 typedef struct X509_crl_info_st {
34333     ASN1_INTEGER *version;
34334     X509_ALGOR *sig_alg;
34335     X509_NAME *issuer;
34336     ASN1_TIME *lastUpdate;
34337     ASN1_TIME *nextUpdate;
34338     struct stack_st_X509_REVOKED *revoked;
34339     struct stack_st_X509_EXTENSION /* [0] */ *extensions;
34340     ASN1_ENCODING enc;
34341 } X509_CRL_INFO;
34342 
34343 struct X509_crl_st {
34344     /* actual signature */
34345     X509_CRL_INFO *crl;
34346     X509_ALGOR *sig_alg;
34347     ASN1_BIT_STRING *signature;
34348     int references;
34349     int flags;
34350     /* Copies of various extensions */
34351     AUTHORITY_KEYID *akid;
34352     ISSUING_DIST_POINT *idp;
34353     /* Convenient breakdown of IDP */
34354     int idp_flags;
34355     int idp_reasons;
34356     /* CRL and base CRL numbers for delta processing */
34357     ASN1_INTEGER *crl_number;
34358     ASN1_INTEGER *base_crl_number;
34359 
34360     unsigned char sha1_hash[20];
34361 
34362     struct stack_st_GENERAL_NAMES *issuers;
34363     const X509_CRL_METHOD *meth;
34364     void *meth_data;
34365 } /* X509_CRL */ ;
34366 
34367 struct stack_st_X509_CRL { _STACK stack; };
34368 
34369 
34370 typedef struct private_key_st {
34371     int version;
34372     /* The PKCS#8 data types */
34373     X509_ALGOR *enc_algor;
34374     ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */
34375     /* When decrypted, the following will not be NULL */
34376     EVP_PKEY *dec_pkey;
34377     /* used to encrypt and decrypt */
34378     int key_length;
34379     char *key_data;
34380     int key_free; /* true if we should auto free key_data */
34381     /* expanded version of 'enc_algor' */
34382     EVP_CIPHER_INFO cipher;
34383     int references;
34384 } X509_PKEY;
34385 
34386 
34387 typedef struct X509_info_st {
34388     X509 *x509;
34389     X509_CRL *crl;
34390     X509_PKEY *x_pkey;
34391     EVP_CIPHER_INFO enc_cipher;
34392     int enc_len;
34393     char *enc_data;
34394     int references;
34395 } X509_INFO;
34396 
34397 struct stack_st_X509_INFO { _STACK stack; };
34398 
34399 
34400 /*
34401  * The next 2 structures and their 8 routines were sent to me by Pat Richard
34402  * <patr@x509.com> and are used to manipulate Netscapes spki structures -
34403  * useful if you are writing a CA web page
34404  */
34405 typedef struct Netscape_spkac_st {
34406     X509_PUBKEY *pubkey;
34407     ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */
34408 } NETSCAPE_SPKAC;
34409 
34410 typedef struct Netscape_spki_st {
34411     NETSCAPE_SPKAC *spkac; /* signed public key and challenge */
34412     X509_ALGOR *sig_algor;
34413     ASN1_BIT_STRING *signature;
34414 } NETSCAPE_SPKI;
34415 
34416 /* Netscape certificate sequence structure */
34417 typedef struct Netscape_certificate_sequence {
34418     ASN1_OBJECT *type;
34419     struct stack_st_X509 *certs;
34420 } NETSCAPE_CERT_SEQUENCE;
34421 
34422 /*- Unused (and iv length is wrong)
34423 typedef struct CBCParameter_st
34424         {
34425         unsigned char iv[8];
34426         } CBC_PARAM;
34427 */
34428 
34429 /* Password based encryption structure */
34430 
34431 typedef struct PBEPARAM_st {
34432     ASN1_OCTET_STRING *salt;
34433     ASN1_INTEGER *iter;
34434 } PBEPARAM;
34435 
34436 /* Password based encryption V2 structures */
34437 
34438 typedef struct PBE2PARAM_st {
34439     X509_ALGOR *keyfunc;
34440     X509_ALGOR *encryption;
34441 } PBE2PARAM;
34442 
34443 typedef struct PBKDF2PARAM_st {
34444 /* Usually OCTET STRING but could be anything */
34445     ASN1_TYPE *salt;
34446     ASN1_INTEGER *iter;
34447     ASN1_INTEGER *keylength;
34448     X509_ALGOR *prf;
34449 } PBKDF2PARAM;
34450 
34451 /* PKCS#8 private key info structure */
34452 
34453 struct pkcs8_priv_key_info_st {
34454     /* Flag for various broken formats */
34455     int broken;
34456 
34457 
34458 
34459 
34460 
34461     ASN1_INTEGER *version;
34462     X509_ALGOR *pkeyalg;
34463     /* Should be OCTET STRING but some are broken */
34464     ASN1_TYPE *pkey;
34465     struct stack_st_X509_ATTRIBUTE *attributes;
34466 };
34467 
34468 
34469 
34470 
34471 
34472 # 1 "/usr/include/openssl/x509_vfy.h" 1 3 4
34473 /* crypto/x509/x509_vfy.h */
34474 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
34475  * All rights reserved.
34476  *
34477  * This package is an SSL implementation written
34478  * by Eric Young (eay@cryptsoft.com).
34479  * The implementation was written so as to conform with Netscapes SSL.
34480  *
34481  * This library is free for commercial and non-commercial use as long as
34482  * the following conditions are aheared to.  The following conditions
34483  * apply to all code found in this distribution, be it the RC4, RSA,
34484  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
34485  * included with this distribution is covered by the same copyright terms
34486  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
34487  *
34488  * Copyright remains Eric Young's, and as such any Copyright notices in
34489  * the code are not to be removed.
34490  * If this package is used in a product, Eric Young should be given attribution
34491  * as the author of the parts of the library used.
34492  * This can be in the form of a textual message at program startup or
34493  * in documentation (online or textual) provided with the package.
34494  *
34495  * Redistribution and use in source and binary forms, with or without
34496  * modification, are permitted provided that the following conditions
34497  * are met:
34498  * 1. Redistributions of source code must retain the copyright
34499  *    notice, this list of conditions and the following disclaimer.
34500  * 2. Redistributions in binary form must reproduce the above copyright
34501  *    notice, this list of conditions and the following disclaimer in the
34502  *    documentation and/or other materials provided with the distribution.
34503  * 3. All advertising materials mentioning features or use of this software
34504  *    must display the following acknowledgement:
34505  *    "This product includes cryptographic software written by
34506  *     Eric Young (eay@cryptsoft.com)"
34507  *    The word 'cryptographic' can be left out if the rouines from the library
34508  *    being used are not cryptographic related :-).
34509  * 4. If you include any Windows specific code (or a derivative thereof) from
34510  *    the apps directory (application code) you must include an acknowledgement:
34511  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
34512  *
34513  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
34514  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34515  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34516  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
34517  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34518  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34519  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34520  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34521  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34522  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34523  * SUCH DAMAGE.
34524  *
34525  * The licence and distribution terms for any publically available version or
34526  * derivative of this code cannot be changed.  i.e. this code cannot simply be
34527  * copied and put under another distribution licence
34528  * [including the GNU Public Licence.]
34529  */
34530 # 70 "/usr/include/openssl/x509_vfy.h" 3 4
34531 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
34532 /* opensslconf.h */
34533 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
34534 
34535 
34536 
34537 
34538 /* OpenSSL was configured with the following options: */
34539 # 108 "/usr/include/openssl/opensslconf.h" 3 4
34540 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
34541    asks for it.  This is a transient feature that is provided for those
34542    who haven't had the time to do the appropriate changes in their
34543    applications.  */
34544 # 204 "/usr/include/openssl/opensslconf.h" 3 4
34545 /* crypto/opensslconf.h.in */
34546 
34547 /* Generate 80386 code? */
34548 # 71 "/usr/include/openssl/x509_vfy.h" 2 3 4
34549 
34550 # 1 "/usr/include/openssl/lhash.h" 1 3 4
34551 /* crypto/lhash/lhash.h */
34552 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
34553  * All rights reserved.
34554  *
34555  * This package is an SSL implementation written
34556  * by Eric Young (eay@cryptsoft.com).
34557  * The implementation was written so as to conform with Netscapes SSL.
34558  *
34559  * This library is free for commercial and non-commercial use as long as
34560  * the following conditions are aheared to.  The following conditions
34561  * apply to all code found in this distribution, be it the RC4, RSA,
34562  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
34563  * included with this distribution is covered by the same copyright terms
34564  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
34565  *
34566  * Copyright remains Eric Young's, and as such any Copyright notices in
34567  * the code are not to be removed.
34568  * If this package is used in a product, Eric Young should be given attribution
34569  * as the author of the parts of the library used.
34570  * This can be in the form of a textual message at program startup or
34571  * in documentation (online or textual) provided with the package.
34572  *
34573  * Redistribution and use in source and binary forms, with or without
34574  * modification, are permitted provided that the following conditions
34575  * are met:
34576  * 1. Redistributions of source code must retain the copyright
34577  *    notice, this list of conditions and the following disclaimer.
34578  * 2. Redistributions in binary form must reproduce the above copyright
34579  *    notice, this list of conditions and the following disclaimer in the
34580  *    documentation and/or other materials provided with the distribution.
34581  * 3. All advertising materials mentioning features or use of this software
34582  *    must display the following acknowledgement:
34583  *    "This product includes cryptographic software written by
34584  *     Eric Young (eay@cryptsoft.com)"
34585  *    The word 'cryptographic' can be left out if the rouines from the library
34586  *    being used are not cryptographic related :-).
34587  * 4. If you include any Windows specific code (or a derivative thereof) from
34588  *    the apps directory (application code) you must include an acknowledgement:
34589  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
34590  *
34591  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
34592  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34593  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34594  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
34595  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34596  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34597  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34598  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34599  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34600  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34601  * SUCH DAMAGE.
34602  *
34603  * The licence and distribution terms for any publically available version or
34604  * derivative of this code cannot be changed.  i.e. this code cannot simply be
34605  * copied and put under another distribution licence
34606  * [including the GNU Public Licence.]
34607  */
34608 
34609 /*
34610  * Header for dynamic hash table routines Author - Eric Young
34611  */
34612 
34613 
34614 
34615 
34616 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
34617 /* e_os2.h */
34618 /* ====================================================================
34619  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
34620  *
34621  * Redistribution and use in source and binary forms, with or without
34622  * modification, are permitted provided that the following conditions
34623  * are met:
34624  *
34625  * 1. Redistributions of source code must retain the above copyright
34626  *    notice, this list of conditions and the following disclaimer.
34627  *
34628  * 2. Redistributions in binary form must reproduce the above copyright
34629  *    notice, this list of conditions and the following disclaimer in
34630  *    the documentation and/or other materials provided with the
34631  *    distribution.
34632  *
34633  * 3. All advertising materials mentioning features or use of this
34634  *    software must display the following acknowledgment:
34635  *    "This product includes software developed by the OpenSSL Project
34636  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
34637  *
34638  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
34639  *    endorse or promote products derived from this software without
34640  *    prior written permission. For written permission, please contact
34641  *    openssl-core@openssl.org.
34642  *
34643  * 5. Products derived from this software may not be called "OpenSSL"
34644  *    nor may "OpenSSL" appear in their names without prior written
34645  *    permission of the OpenSSL Project.
34646  *
34647  * 6. Redistributions of any form whatsoever must retain the following
34648  *    acknowledgment:
34649  *    "This product includes software developed by the OpenSSL Project
34650  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
34651  *
34652  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
34653  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34654  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
34655  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
34656  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34657  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
34658  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
34659  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34660  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
34661  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34662  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34663  * OF THE POSSIBILITY OF SUCH DAMAGE.
34664  * ====================================================================
34665  *
34666  * This product includes cryptographic software written by Eric Young
34667  * (eay@cryptsoft.com).  This product includes software written by Tim
34668  * Hudson (tjh@cryptsoft.com).
34669  *
34670  */
34671 
34672 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
34673 /* opensslconf.h */
34674 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
34675 
34676 
34677 
34678 
34679 /* OpenSSL was configured with the following options: */
34680 # 108 "/usr/include/openssl/opensslconf.h" 3 4
34681 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
34682    asks for it.  This is a transient feature that is provided for those
34683    who haven't had the time to do the appropriate changes in their
34684    applications.  */
34685 # 204 "/usr/include/openssl/opensslconf.h" 3 4
34686 /* crypto/opensslconf.h.in */
34687 
34688 /* Generate 80386 code? */
34689 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
34690 # 67 "/usr/include/openssl/lhash.h" 2 3 4
34691 
34692 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
34693 /*
34694  * CDDL HEADER START
34695  *
34696  * The contents of this file are subject to the terms of the
34697  * Common Development and Distribution License (the "License").
34698  * You may not use this file except in compliance with the License.
34699  *
34700  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34701  * or http://www.opensolaris.org/os/licensing.
34702  * See the License for the specific language governing permissions
34703  * and limitations under the License.
34704  *
34705  * When distributing Covered Code, include this CDDL HEADER in each
34706  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34707  * If applicable, add the following below this CDDL HEADER, with the
34708  * fields enclosed by brackets "[]" replaced with your own identifying
34709  * information: Portions Copyright [yyyy] [name of copyright owner]
34710  *
34711  * CDDL HEADER END
34712  */
34713 
34714 /*
34715  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
34716  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
34717  */
34718 
34719 /*	Copyright (c) 1988 AT&T	*/
34720 /*	  All Rights Reserved  	*/
34721 
34722 /*
34723  * User-visible pieces of the ANSI C standard I/O package.
34724  */
34725 # 69 "/usr/include/openssl/lhash.h" 2 3 4
34726 
34727 
34728 
34729 # 1 "/usr/include/openssl/bio.h" 1 3 4
34730 /* crypto/bio/bio.h */
34731 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
34732  * All rights reserved.
34733  *
34734  * This package is an SSL implementation written
34735  * by Eric Young (eay@cryptsoft.com).
34736  * The implementation was written so as to conform with Netscapes SSL.
34737  *
34738  * This library is free for commercial and non-commercial use as long as
34739  * the following conditions are aheared to.  The following conditions
34740  * apply to all code found in this distribution, be it the RC4, RSA,
34741  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
34742  * included with this distribution is covered by the same copyright terms
34743  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
34744  *
34745  * Copyright remains Eric Young's, and as such any Copyright notices in
34746  * the code are not to be removed.
34747  * If this package is used in a product, Eric Young should be given attribution
34748  * as the author of the parts of the library used.
34749  * This can be in the form of a textual message at program startup or
34750  * in documentation (online or textual) provided with the package.
34751  *
34752  * Redistribution and use in source and binary forms, with or without
34753  * modification, are permitted provided that the following conditions
34754  * are met:
34755  * 1. Redistributions of source code must retain the copyright
34756  *    notice, this list of conditions and the following disclaimer.
34757  * 2. Redistributions in binary form must reproduce the above copyright
34758  *    notice, this list of conditions and the following disclaimer in the
34759  *    documentation and/or other materials provided with the distribution.
34760  * 3. All advertising materials mentioning features or use of this software
34761  *    must display the following acknowledgement:
34762  *    "This product includes cryptographic software written by
34763  *     Eric Young (eay@cryptsoft.com)"
34764  *    The word 'cryptographic' can be left out if the rouines from the library
34765  *    being used are not cryptographic related :-).
34766  * 4. If you include any Windows specific code (or a derivative thereof) from
34767  *    the apps directory (application code) you must include an acknowledgement:
34768  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
34769  *
34770  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
34771  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34772  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34773  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
34774  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34775  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34776  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34777  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34778  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34779  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34780  * SUCH DAMAGE.
34781  *
34782  * The licence and distribution terms for any publically available version or
34783  * derivative of this code cannot be changed.  i.e. this code cannot simply be
34784  * copied and put under another distribution licence
34785  * [including the GNU Public Licence.]
34786  */
34787 # 73 "/usr/include/openssl/lhash.h" 2 3 4
34788 
34789 
34790 
34791 
34792 
34793 
34794 typedef struct lhash_node_st {
34795     void *data;
34796     struct lhash_node_st *next;
34797 
34798     unsigned long hash;
34799 
34800 } LHASH_NODE;
34801 
34802 typedef int (*LHASH_COMP_FN_TYPE) (const void *, const void *);
34803 typedef unsigned long (*LHASH_HASH_FN_TYPE) (const void *);
34804 typedef void (*LHASH_DOALL_FN_TYPE) (void *);
34805 typedef void (*LHASH_DOALL_ARG_FN_TYPE) (void *, void *);
34806 
34807 /*
34808  * Macros for declaring and implementing type-safe wrappers for LHASH
34809  * callbacks. This way, callbacks can be provided to LHASH structures without
34810  * function pointer casting and the macro-defined callbacks provide
34811  * per-variable casting before deferring to the underlying type-specific
34812  * callbacks. NB: It is possible to place a "static" in front of both the
34813  * DECLARE and IMPLEMENT macros if the functions are strictly internal.
34814  */
34815 
34816 /* First: "hash" functions */
34817 # 110 "/usr/include/openssl/lhash.h" 3 4
34818 /* Second: "compare" functions */
34819 # 120 "/usr/include/openssl/lhash.h" 3 4
34820 /* Third: "doall" functions */
34821 # 129 "/usr/include/openssl/lhash.h" 3 4
34822 /* Fourth: "doall_arg" functions */
34823 # 139 "/usr/include/openssl/lhash.h" 3 4
34824 typedef struct lhash_st {
34825     LHASH_NODE **b;
34826     LHASH_COMP_FN_TYPE comp;
34827     LHASH_HASH_FN_TYPE hash;
34828     unsigned int num_nodes;
34829     unsigned int num_alloc_nodes;
34830     unsigned int p;
34831     unsigned int pmax;
34832     unsigned long up_load; /* load times 256 */
34833     unsigned long down_load; /* load times 256 */
34834     unsigned long num_items;
34835     unsigned long num_expands;
34836     unsigned long num_expand_reallocs;
34837     unsigned long num_contracts;
34838     unsigned long num_contract_reallocs;
34839     unsigned long num_hash_calls;
34840     unsigned long num_comp_calls;
34841     unsigned long num_insert;
34842     unsigned long num_replace;
34843     unsigned long num_delete;
34844     unsigned long num_no_delete;
34845     unsigned long num_retrieve;
34846     unsigned long num_retrieve_miss;
34847     unsigned long num_hash_comps;
34848     int error;
34849 } _LHASH; /* Do not use _LHASH directly, use LHASH_OF
34850                                  * and friends */
34851 
34852 
34853 
34854 /*
34855  * Indicates a malloc() error in the last call, this is only bad in
34856  * lh_insert().
34857  */
34858 
34859 
34860 _LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c);
34861 void lh_free(_LHASH *lh);
34862 void *lh_insert(_LHASH *lh, void *data);
34863 void *lh_delete(_LHASH *lh, const void *data);
34864 void *lh_retrieve(_LHASH *lh, const void *data);
34865 void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func);
34866 void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg);
34867 unsigned long lh_strhash(const char *c);
34868 unsigned long lh_num_items(const _LHASH *lh);
34869 
34870 
34871 void lh_stats(const _LHASH *lh, FILE *out);
34872 void lh_node_stats(const _LHASH *lh, FILE *out);
34873 void lh_node_usage_stats(const _LHASH *lh, FILE *out);
34874 
34875 
34876 
34877 void lh_stats_bio(const _LHASH *lh, BIO *out);
34878 void lh_node_stats_bio(const _LHASH *lh, BIO *out);
34879 void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
34880 
34881 
34882 /* Type checking... */
34883 # 206 "/usr/include/openssl/lhash.h" 3 4
34884 /* Define wrapper functions. */
34885 # 233 "/usr/include/openssl/lhash.h" 3 4
34886 struct lhash_st_OPENSSL_STRING { int dummy; };
34887 struct lhash_st_OPENSSL_CSTRING { int dummy; };
34888 # 73 "/usr/include/openssl/x509_vfy.h" 2 3 4
34889 
34890 # 1 "/usr/include/openssl/bio.h" 1 3 4
34891 /* crypto/bio/bio.h */
34892 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
34893  * All rights reserved.
34894  *
34895  * This package is an SSL implementation written
34896  * by Eric Young (eay@cryptsoft.com).
34897  * The implementation was written so as to conform with Netscapes SSL.
34898  *
34899  * This library is free for commercial and non-commercial use as long as
34900  * the following conditions are aheared to.  The following conditions
34901  * apply to all code found in this distribution, be it the RC4, RSA,
34902  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
34903  * included with this distribution is covered by the same copyright terms
34904  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
34905  *
34906  * Copyright remains Eric Young's, and as such any Copyright notices in
34907  * the code are not to be removed.
34908  * If this package is used in a product, Eric Young should be given attribution
34909  * as the author of the parts of the library used.
34910  * This can be in the form of a textual message at program startup or
34911  * in documentation (online or textual) provided with the package.
34912  *
34913  * Redistribution and use in source and binary forms, with or without
34914  * modification, are permitted provided that the following conditions
34915  * are met:
34916  * 1. Redistributions of source code must retain the copyright
34917  *    notice, this list of conditions and the following disclaimer.
34918  * 2. Redistributions in binary form must reproduce the above copyright
34919  *    notice, this list of conditions and the following disclaimer in the
34920  *    documentation and/or other materials provided with the distribution.
34921  * 3. All advertising materials mentioning features or use of this software
34922  *    must display the following acknowledgement:
34923  *    "This product includes cryptographic software written by
34924  *     Eric Young (eay@cryptsoft.com)"
34925  *    The word 'cryptographic' can be left out if the rouines from the library
34926  *    being used are not cryptographic related :-).
34927  * 4. If you include any Windows specific code (or a derivative thereof) from
34928  *    the apps directory (application code) you must include an acknowledgement:
34929  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
34930  *
34931  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
34932  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34933  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34934  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
34935  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34936  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34937  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34938  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34939  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34940  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34941  * SUCH DAMAGE.
34942  *
34943  * The licence and distribution terms for any publically available version or
34944  * derivative of this code cannot be changed.  i.e. this code cannot simply be
34945  * copied and put under another distribution licence
34946  * [including the GNU Public Licence.]
34947  */
34948 # 75 "/usr/include/openssl/x509_vfy.h" 2 3 4
34949 # 1 "/usr/include/openssl/crypto.h" 1 3 4
34950 /* crypto/crypto.h */
34951 /* ====================================================================
34952  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
34953  *
34954  * Redistribution and use in source and binary forms, with or without
34955  * modification, are permitted provided that the following conditions
34956  * are met:
34957  *
34958  * 1. Redistributions of source code must retain the above copyright
34959  *    notice, this list of conditions and the following disclaimer.
34960  *
34961  * 2. Redistributions in binary form must reproduce the above copyright
34962  *    notice, this list of conditions and the following disclaimer in
34963  *    the documentation and/or other materials provided with the
34964  *    distribution.
34965  *
34966  * 3. All advertising materials mentioning features or use of this
34967  *    software must display the following acknowledgment:
34968  *    "This product includes software developed by the OpenSSL Project
34969  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
34970  *
34971  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
34972  *    endorse or promote products derived from this software without
34973  *    prior written permission. For written permission, please contact
34974  *    openssl-core@openssl.org.
34975  *
34976  * 5. Products derived from this software may not be called "OpenSSL"
34977  *    nor may "OpenSSL" appear in their names without prior written
34978  *    permission of the OpenSSL Project.
34979  *
34980  * 6. Redistributions of any form whatsoever must retain the following
34981  *    acknowledgment:
34982  *    "This product includes software developed by the OpenSSL Project
34983  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
34984  *
34985  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
34986  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34987  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
34988  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
34989  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34990  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
34991  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
34992  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34993  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
34994  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34995  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34996  * OF THE POSSIBILITY OF SUCH DAMAGE.
34997  * ====================================================================
34998  *
34999  * This product includes cryptographic software written by Eric Young
35000  * (eay@cryptsoft.com).  This product includes software written by Tim
35001  * Hudson (tjh@cryptsoft.com).
35002  *
35003  */
35004 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
35005  * All rights reserved.
35006  *
35007  * This package is an SSL implementation written
35008  * by Eric Young (eay@cryptsoft.com).
35009  * The implementation was written so as to conform with Netscapes SSL.
35010  *
35011  * This library is free for commercial and non-commercial use as long as
35012  * the following conditions are aheared to.  The following conditions
35013  * apply to all code found in this distribution, be it the RC4, RSA,
35014  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
35015  * included with this distribution is covered by the same copyright terms
35016  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
35017  *
35018  * Copyright remains Eric Young's, and as such any Copyright notices in
35019  * the code are not to be removed.
35020  * If this package is used in a product, Eric Young should be given attribution
35021  * as the author of the parts of the library used.
35022  * This can be in the form of a textual message at program startup or
35023  * in documentation (online or textual) provided with the package.
35024  *
35025  * Redistribution and use in source and binary forms, with or without
35026  * modification, are permitted provided that the following conditions
35027  * are met:
35028  * 1. Redistributions of source code must retain the copyright
35029  *    notice, this list of conditions and the following disclaimer.
35030  * 2. Redistributions in binary form must reproduce the above copyright
35031  *    notice, this list of conditions and the following disclaimer in the
35032  *    documentation and/or other materials provided with the distribution.
35033  * 3. All advertising materials mentioning features or use of this software
35034  *    must display the following acknowledgement:
35035  *    "This product includes cryptographic software written by
35036  *     Eric Young (eay@cryptsoft.com)"
35037  *    The word 'cryptographic' can be left out if the rouines from the library
35038  *    being used are not cryptographic related :-).
35039  * 4. If you include any Windows specific code (or a derivative thereof) from
35040  *    the apps directory (application code) you must include an acknowledgement:
35041  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
35042  *
35043  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
35044  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35045  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35046  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
35047  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35048  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35049  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35050  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35051  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35052  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35053  * SUCH DAMAGE.
35054  *
35055  * The licence and distribution terms for any publically available version or
35056  * derivative of this code cannot be changed.  i.e. this code cannot simply be
35057  * copied and put under another distribution licence
35058  * [including the GNU Public Licence.]
35059  */
35060 /* ====================================================================
35061  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
35062  * ECDH support in OpenSSL originally developed by
35063  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
35064  */
35065 # 76 "/usr/include/openssl/x509_vfy.h" 2 3 4
35066 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
35067 /* ====================================================================
35068  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
35069  *
35070  * Redistribution and use in source and binary forms, with or without
35071  * modification, are permitted provided that the following conditions
35072  * are met:
35073  *
35074  * 1. Redistributions of source code must retain the above copyright
35075  *    notice, this list of conditions and the following disclaimer.
35076  *
35077  * 2. Redistributions in binary form must reproduce the above copyright
35078  *    notice, this list of conditions and the following disclaimer in
35079  *    the documentation and/or other materials provided with the
35080  *    distribution.
35081  *
35082  * 3. All advertising materials mentioning features or use of this
35083  *    software must display the following acknowledgment:
35084  *    "This product includes software developed by the OpenSSL Project
35085  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
35086  *
35087  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
35088  *    endorse or promote products derived from this software without
35089  *    prior written permission. For written permission, please contact
35090  *    openssl-core@openssl.org.
35091  *
35092  * 5. Products derived from this software may not be called "OpenSSL"
35093  *    nor may "OpenSSL" appear in their names without prior written
35094  *    permission of the OpenSSL Project.
35095  *
35096  * 6. Redistributions of any form whatsoever must retain the following
35097  *    acknowledgment:
35098  *    "This product includes software developed by the OpenSSL Project
35099  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
35100  *
35101  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
35102  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35103  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
35104  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
35105  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35106  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
35107  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35108  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35109  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
35110  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35111  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
35112  * OF THE POSSIBILITY OF SUCH DAMAGE.
35113  * ====================================================================
35114  *
35115  * This product includes cryptographic software written by Eric Young
35116  * (eay@cryptsoft.com).  This product includes software written by Tim
35117  * Hudson (tjh@cryptsoft.com).
35118  *
35119  */
35120 # 77 "/usr/include/openssl/x509_vfy.h" 2 3 4
35121 # 92 "/usr/include/openssl/x509_vfy.h" 3 4
35122 typedef struct x509_file_st {
35123     int num_paths; /* number of paths to files or directories */
35124     int num_alloced;
35125     char **paths; /* the list of paths or directories */
35126     int *path_type;
35127 } X509_CERT_FILE_CTX;
35128 
35129 /*******************************/
35130 /*-
35131 SSL_CTX -> X509_STORE
35132                 -> X509_LOOKUP
35133                         ->X509_LOOKUP_METHOD
35134                 -> X509_LOOKUP
35135                         ->X509_LOOKUP_METHOD
35136 
35137 SSL     -> X509_STORE_CTX
35138                 ->X509_STORE
35139 
35140 The X509_STORE holds the tables etc for verification stuff.
35141 A X509_STORE_CTX is used while validating a single certificate.
35142 The X509_STORE has X509_LOOKUPs for looking up certs.
35143 The X509_STORE then calls a function to actually verify the
35144 certificate chain.
35145 */
35146 
35147 
35148 
35149 
35150 
35151 
35152 
35153 typedef struct x509_object_st {
35154     /* one of the above types */
35155     int type;
35156     union {
35157         char *ptr;
35158         X509 *x509;
35159         X509_CRL *crl;
35160         EVP_PKEY *pkey;
35161     } data;
35162 } X509_OBJECT;
35163 
35164 typedef struct x509_lookup_st X509_LOOKUP;
35165 
35166 struct stack_st_X509_LOOKUP { _STACK stack; };
35167 struct stack_st_X509_OBJECT { _STACK stack; };
35168 
35169 /* This is a static that defines the function interface */
35170 typedef struct x509_lookup_method_st {
35171     const char *name;
35172     int (*new_item) (X509_LOOKUP *ctx);
35173     void (*free) (X509_LOOKUP *ctx);
35174     int (*init) (X509_LOOKUP *ctx);
35175     int (*shutdown) (X509_LOOKUP *ctx);
35176     int (*ctrl) (X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
35177                  char **ret);
35178     int (*get_by_subject) (X509_LOOKUP *ctx, int type, X509_NAME *name,
35179                            X509_OBJECT *ret);
35180     int (*get_by_issuer_serial) (X509_LOOKUP *ctx, int type, X509_NAME *name,
35181                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
35182     int (*get_by_fingerprint) (X509_LOOKUP *ctx, int type,
35183                                unsigned char *bytes, int len,
35184                                X509_OBJECT *ret);
35185     int (*get_by_alias) (X509_LOOKUP *ctx, int type, char *str, int len,
35186                          X509_OBJECT *ret);
35187 } X509_LOOKUP_METHOD;
35188 
35189 typedef struct X509_VERIFY_PARAM_ID_st X509_VERIFY_PARAM_ID;
35190 
35191 /*
35192  * This structure hold all parameters associated with a verify operation by
35193  * including an X509_VERIFY_PARAM structure in related structures the
35194  * parameters used can be customized
35195  */
35196 
35197 typedef struct X509_VERIFY_PARAM_st {
35198     char *name;
35199     time_t check_time; /* Time to use */
35200     unsigned long inh_flags; /* Inheritance flags */
35201     unsigned long flags; /* Various verify flags */
35202     int purpose; /* purpose to check untrusted certificates */
35203     int trust; /* trust setting to check */
35204     int depth; /* Verify depth */
35205     struct stack_st_ASN1_OBJECT *policies; /* Permissible policies */
35206     X509_VERIFY_PARAM_ID *id; /* opaque ID data */
35207 } X509_VERIFY_PARAM;
35208 
35209 struct stack_st_X509_VERIFY_PARAM { _STACK stack; };
35210 
35211 /*
35212  * This is used to hold everything.  It is used for all certificate
35213  * validation.  Once we have a certificate chain, the 'verify' function is
35214  * then called to actually check the cert chain.
35215  */
35216 struct x509_store_st {
35217     /* The following is a cache of trusted certs */
35218     int cache; /* if true, stash any hits */
35219     struct stack_st_X509_OBJECT *objs; /* Cache of all objects */
35220     /* These are external lookup methods */
35221     struct stack_st_X509_LOOKUP *get_cert_methods;
35222     X509_VERIFY_PARAM *param;
35223     /* Callbacks for various operations */
35224     /* called to verify a certificate */
35225     int (*verify) (X509_STORE_CTX *ctx);
35226     /* error callback */
35227     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
35228     /* get issuers cert from ctx */
35229     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
35230     /* check issued */
35231     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
35232     /* Check revocation status of chain */
35233     int (*check_revocation) (X509_STORE_CTX *ctx);
35234     /* retrieve CRL */
35235     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
35236     /* Check CRL validity */
35237     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
35238     /* Check certificate against CRL */
35239     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
35240     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
35241     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
35242     int (*cleanup) (X509_STORE_CTX *ctx);
35243     CRYPTO_EX_DATA ex_data;
35244     int references;
35245 } /* X509_STORE */ ;
35246 
35247 int X509_STORE_set_depth(X509_STORE *store, int depth);
35248 
35249 
35250 
35251 
35252 /* This is the functions plus an instance of the local variables. */
35253 struct x509_lookup_st {
35254     int init; /* have we been started */
35255     int skip; /* don't use us. */
35256     X509_LOOKUP_METHOD *method; /* the functions */
35257     char *method_data; /* method data */
35258     X509_STORE *store_ctx; /* who owns us */
35259 } /* X509_LOOKUP */ ;
35260 
35261 /*
35262  * This is a used when verifying cert chains.  Since the gathering of the
35263  * cert chain can take some time (and have to be 'retried', this needs to be
35264  * kept and passed around.
35265  */
35266 struct x509_store_ctx_st { /* X509_STORE_CTX */
35267     X509_STORE *ctx;
35268     /* used when looking up certs */
35269     int current_method;
35270     /* The following are set by the caller */
35271     /* The cert to check */
35272     X509 *cert;
35273     /* chain of X509s - untrusted - passed in */
35274     struct stack_st_X509 *untrusted;
35275     /* set of CRLs passed in */
35276     struct stack_st_X509_CRL *crls;
35277     X509_VERIFY_PARAM *param;
35278     /* Other info for use with get_issuer() */
35279     void *other_ctx;
35280     /* Callbacks for various operations */
35281     /* called to verify a certificate */
35282     int (*verify) (X509_STORE_CTX *ctx);
35283     /* error callback */
35284     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
35285     /* get issuers cert from ctx */
35286     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
35287     /* check issued */
35288     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
35289     /* Check revocation status of chain */
35290     int (*check_revocation) (X509_STORE_CTX *ctx);
35291     /* retrieve CRL */
35292     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
35293     /* Check CRL validity */
35294     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
35295     /* Check certificate against CRL */
35296     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
35297     int (*check_policy) (X509_STORE_CTX *ctx);
35298     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
35299     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
35300     int (*cleanup) (X509_STORE_CTX *ctx);
35301     /* The following is built up */
35302     /* if 0, rebuild chain */
35303     int valid;
35304     /* index of last untrusted cert */
35305     int last_untrusted;
35306     /* chain of X509s - built up and trusted */
35307     struct stack_st_X509 *chain;
35308     /* Valid policy tree */
35309     X509_POLICY_TREE *tree;
35310     /* Require explicit policy value */
35311     int explicit_policy;
35312     /* When something goes wrong, this is why */
35313     int error_depth;
35314     int error;
35315     X509 *current_cert;
35316     /* cert currently being tested as valid issuer */
35317     X509 *current_issuer;
35318     /* current CRL */
35319     X509_CRL *current_crl;
35320     /* score of current CRL */
35321     int current_crl_score;
35322     /* Reason mask */
35323     unsigned int current_reasons;
35324     /* For CRL path validation: parent context */
35325     X509_STORE_CTX *parent;
35326     CRYPTO_EX_DATA ex_data;
35327 } /* X509_STORE_CTX */ ;
35328 
35329 void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
35330 # 345 "/usr/include/openssl/x509_vfy.h" 3 4
35331 /* These are 'informational' when looking for issuer cert */
35332 # 377 "/usr/include/openssl/x509_vfy.h" 3 4
35333 /* Suite B mode algorithm violation */
35334 
35335 
35336 
35337 
35338 
35339 
35340 
35341 /* Host, email and IP check errors */
35342 
35343 
35344 
35345 
35346 /* Caller error */
35347 
35348 /* Issuer lookup error */
35349 
35350 
35351 
35352 
35353 /* Certificate verify flags */
35354 
35355 /* Send issuer+subject checks to verify_cb */
35356 
35357 /* Use check time instead of current time */
35358 
35359 /* Lookup CRLs */
35360 
35361 /* Lookup CRLs for whole chain */
35362 
35363 /* Ignore unhandled critical extensions */
35364 
35365 /* Disable workarounds for broken certificates */
35366 
35367 /* Enable proxy certificate validation */
35368 
35369 /* Enable policy checking */
35370 
35371 /* Policy variable require-explicit-policy */
35372 
35373 /* Policy variable inhibit-any-policy */
35374 
35375 /* Policy variable inhibit-policy-mapping */
35376 
35377 /* Notify callback that policy is OK */
35378 
35379 /* Extended CRL features such as indirect CRLs, alternate CRL signing keys */
35380 
35381 /* Delta CRL support */
35382 
35383 /* Check selfsigned CA signature */
35384 
35385 /* Use trusted store first */
35386 
35387 /* Suite B 128 bit only mode: not normally used */
35388 
35389 /* Suite B 192 bit only mode */
35390 
35391 /* Suite B 128 bit mode allowing 192 bit algorithms */
35392 
35393 
35394 /* Allow partial chains if at least one certificate is in trusted store */
35395 
35396 /*
35397  * If the initial chain is not trusted, do not attempt to build an alternative
35398  * chain. Alternate chain checking was introduced in 1.0.2b. Setting this flag
35399  * will force the behaviour to match that of previous versions.
35400  */
35401 # 453 "/usr/include/openssl/x509_vfy.h" 3 4
35402 /* Internal use: mask of policy related options */
35403 
35404 
35405 
35406 
35407 
35408 int X509_OBJECT_idx_by_subject(struct stack_st_X509_OBJECT *h, int type,
35409                                X509_NAME *name);
35410 X509_OBJECT *X509_OBJECT_retrieve_by_subject(struct stack_st_X509_OBJECT *h,
35411                                              int type, X509_NAME *name);
35412 X509_OBJECT *X509_OBJECT_retrieve_match(struct stack_st_X509_OBJECT *h,
35413                                         X509_OBJECT *x);
35414 void X509_OBJECT_up_ref_count(X509_OBJECT *a);
35415 void X509_OBJECT_free_contents(X509_OBJECT *a);
35416 X509_STORE *X509_STORE_new(void);
35417 void X509_STORE_free(X509_STORE *v);
35418 
35419 struct stack_st_X509 *X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm);
35420 struct stack_st_X509_CRL *X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm);
35421 int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);
35422 int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
35423 int X509_STORE_set_trust(X509_STORE *ctx, int trust);
35424 int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);
35425 
35426 void X509_STORE_set_verify_cb(X509_STORE *ctx,
35427                               int (*verify_cb) (int, X509_STORE_CTX *));
35428 
35429 void X509_STORE_set_lookup_crls_cb(X509_STORE *ctx,
35430                                    struct stack_st_X509_CRL *(*cb) (X509_STORE_CTX
35431                                                               *ctx,
35432                                                               X509_NAME *nm));
35433 
35434 X509_STORE_CTX *X509_STORE_CTX_new(void);
35435 
35436 int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
35437 
35438 void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
35439 int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
35440                         X509 *x509, struct stack_st_X509 *chain);
35441 void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, struct stack_st_X509 *sk);
35442 void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
35443 
35444 X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx);
35445 
35446 X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);
35447 
35448 X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);
35449 X509_LOOKUP_METHOD *X509_LOOKUP_file(void);
35450 
35451 int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
35452 int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
35453 
35454 int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name,
35455                               X509_OBJECT *ret);
35456 
35457 int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
35458                      long argl, char **ret);
35459 
35460 
35461 int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
35462 int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
35463 int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
35464 
35465 
35466 X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
35467 void X509_LOOKUP_free(X509_LOOKUP *ctx);
35468 int X509_LOOKUP_init(X509_LOOKUP *ctx);
35469 int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name,
35470                            X509_OBJECT *ret);
35471 int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name,
35472                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
35473 int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type,
35474                                unsigned char *bytes, int len,
35475                                X509_OBJECT *ret);
35476 int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len,
35477                          X509_OBJECT *ret);
35478 int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
35479 
35480 
35481 int X509_STORE_load_locations(X509_STORE *ctx,
35482                               const char *file, const char *dir);
35483 int X509_STORE_set_default_paths(X509_STORE *ctx);
35484 
35485 
35486 int X509_STORE_CTX_get_ex_new_index(long argl, void *argp,
35487                                     CRYPTO_EX_new *new_func,
35488                                     CRYPTO_EX_dup *dup_func,
35489                                     CRYPTO_EX_free *free_func);
35490 int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data);
35491 void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx);
35492 int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
35493 void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);
35494 int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
35495 X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
35496 X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);
35497 X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);
35498 X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);
35499 struct stack_st_X509 *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
35500 struct stack_st_X509 *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);
35501 void X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x);
35502 void X509_STORE_CTX_set_chain(X509_STORE_CTX *c, struct stack_st_X509 *sk);
35503 void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, struct stack_st_X509_CRL *sk);
35504 int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
35505 int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
35506 int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
35507                                    int purpose, int trust);
35508 void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
35509 void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
35510                              time_t t);
35511 void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
35512                                   int (*verify_cb) (int, X509_STORE_CTX *));
35513 
35514 X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);
35515 int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);
35516 
35517 X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
35518 void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
35519 int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
35520 
35521 /* X509_VERIFY_PARAM functions */
35522 
35523 X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);
35524 void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);
35525 int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,
35526                               const X509_VERIFY_PARAM *from);
35527 int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,
35528                            const X509_VERIFY_PARAM *from);
35529 int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);
35530 int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,
35531                                 unsigned long flags);
35532 int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
35533                                   unsigned long flags);
35534 unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);
35535 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
35536 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
35537 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
35538 void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);
35539 int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,
35540                                   ASN1_OBJECT *policy);
35541 int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param,
35542                                     struct stack_st_ASN1_OBJECT *policies);
35543 
35544 int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param,
35545                                 const char *name, size_t namelen);
35546 int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param,
35547                                 const char *name, size_t namelen);
35548 void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
35549                                      unsigned int flags);
35550 char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *);
35551 int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
35552                                  const char *email, size_t emaillen);
35553 int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
35554                               const unsigned char *ip, size_t iplen);
35555 int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param,
35556                                   const char *ipasc);
35557 
35558 int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
35559 const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param);
35560 
35561 int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
35562 int X509_VERIFY_PARAM_get_count(void);
35563 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id);
35564 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
35565 void X509_VERIFY_PARAM_table_cleanup(void);
35566 
35567 int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
35568                       struct stack_st_X509 *certs,
35569                       struct stack_st_ASN1_OBJECT *policy_oids, unsigned int flags);
35570 
35571 void X509_policy_tree_free(X509_POLICY_TREE *tree);
35572 
35573 int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
35574 X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree,
35575                                                int i);
35576 
35577 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_policies(const
35578                                                            X509_POLICY_TREE
35579                                                            *tree);
35580 
35581 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_user_policies(const
35582                                                                 X509_POLICY_TREE
35583                                                                 *tree);
35584 
35585 int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
35586 
35587 X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level,
35588                                               int i);
35589 
35590 const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
35591 
35592 struct stack_st_POLICYQUALINFO *X509_policy_node_get0_qualifiers(const
35593                                                            X509_POLICY_NODE
35594                                                            *node);
35595 const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE
35596                                                      *node);
35597 # 582 "/usr/include/openssl/x509.h" 2 3 4
35598 # 1 "/usr/include/openssl/pkcs7.h" 1 3 4
35599 /* crypto/pkcs7/pkcs7.h */
35600 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
35601  * All rights reserved.
35602  *
35603  * This package is an SSL implementation written
35604  * by Eric Young (eay@cryptsoft.com).
35605  * The implementation was written so as to conform with Netscapes SSL.
35606  *
35607  * This library is free for commercial and non-commercial use as long as
35608  * the following conditions are aheared to.  The following conditions
35609  * apply to all code found in this distribution, be it the RC4, RSA,
35610  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
35611  * included with this distribution is covered by the same copyright terms
35612  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
35613  *
35614  * Copyright remains Eric Young's, and as such any Copyright notices in
35615  * the code are not to be removed.
35616  * If this package is used in a product, Eric Young should be given attribution
35617  * as the author of the parts of the library used.
35618  * This can be in the form of a textual message at program startup or
35619  * in documentation (online or textual) provided with the package.
35620  *
35621  * Redistribution and use in source and binary forms, with or without
35622  * modification, are permitted provided that the following conditions
35623  * are met:
35624  * 1. Redistributions of source code must retain the copyright
35625  *    notice, this list of conditions and the following disclaimer.
35626  * 2. Redistributions in binary form must reproduce the above copyright
35627  *    notice, this list of conditions and the following disclaimer in the
35628  *    documentation and/or other materials provided with the distribution.
35629  * 3. All advertising materials mentioning features or use of this software
35630  *    must display the following acknowledgement:
35631  *    "This product includes cryptographic software written by
35632  *     Eric Young (eay@cryptsoft.com)"
35633  *    The word 'cryptographic' can be left out if the rouines from the library
35634  *    being used are not cryptographic related :-).
35635  * 4. If you include any Windows specific code (or a derivative thereof) from
35636  *    the apps directory (application code) you must include an acknowledgement:
35637  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
35638  *
35639  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
35640  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35641  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35642  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
35643  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35644  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35645  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35646  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35647  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35648  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35649  * SUCH DAMAGE.
35650  *
35651  * The licence and distribution terms for any publically available version or
35652  * derivative of this code cannot be changed.  i.e. this code cannot simply be
35653  * copied and put under another distribution licence
35654  * [including the GNU Public Licence.]
35655  */
35656 
35657 
35658 
35659 
35660 # 1 "/usr/include/openssl/asn1.h" 1 3 4
35661 /* crypto/asn1/asn1.h */
35662 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
35663  * All rights reserved.
35664  *
35665  * This package is an SSL implementation written
35666  * by Eric Young (eay@cryptsoft.com).
35667  * The implementation was written so as to conform with Netscapes SSL.
35668  *
35669  * This library is free for commercial and non-commercial use as long as
35670  * the following conditions are aheared to.  The following conditions
35671  * apply to all code found in this distribution, be it the RC4, RSA,
35672  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
35673  * included with this distribution is covered by the same copyright terms
35674  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
35675  *
35676  * Copyright remains Eric Young's, and as such any Copyright notices in
35677  * the code are not to be removed.
35678  * If this package is used in a product, Eric Young should be given attribution
35679  * as the author of the parts of the library used.
35680  * This can be in the form of a textual message at program startup or
35681  * in documentation (online or textual) provided with the package.
35682  *
35683  * Redistribution and use in source and binary forms, with or without
35684  * modification, are permitted provided that the following conditions
35685  * are met:
35686  * 1. Redistributions of source code must retain the copyright
35687  *    notice, this list of conditions and the following disclaimer.
35688  * 2. Redistributions in binary form must reproduce the above copyright
35689  *    notice, this list of conditions and the following disclaimer in the
35690  *    documentation and/or other materials provided with the distribution.
35691  * 3. All advertising materials mentioning features or use of this software
35692  *    must display the following acknowledgement:
35693  *    "This product includes cryptographic software written by
35694  *     Eric Young (eay@cryptsoft.com)"
35695  *    The word 'cryptographic' can be left out if the rouines from the library
35696  *    being used are not cryptographic related :-).
35697  * 4. If you include any Windows specific code (or a derivative thereof) from
35698  *    the apps directory (application code) you must include an acknowledgement:
35699  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
35700  *
35701  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
35702  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35703  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35704  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
35705  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35706  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35707  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35708  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35709  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35710  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35711  * SUCH DAMAGE.
35712  *
35713  * The licence and distribution terms for any publically available version or
35714  * derivative of this code cannot be changed.  i.e. this code cannot simply be
35715  * copied and put under another distribution licence
35716  * [including the GNU Public Licence.]
35717  */
35718 # 63 "/usr/include/openssl/pkcs7.h" 2 3 4
35719 # 1 "/usr/include/openssl/bio.h" 1 3 4
35720 /* crypto/bio/bio.h */
35721 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
35722  * All rights reserved.
35723  *
35724  * This package is an SSL implementation written
35725  * by Eric Young (eay@cryptsoft.com).
35726  * The implementation was written so as to conform with Netscapes SSL.
35727  *
35728  * This library is free for commercial and non-commercial use as long as
35729  * the following conditions are aheared to.  The following conditions
35730  * apply to all code found in this distribution, be it the RC4, RSA,
35731  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
35732  * included with this distribution is covered by the same copyright terms
35733  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
35734  *
35735  * Copyright remains Eric Young's, and as such any Copyright notices in
35736  * the code are not to be removed.
35737  * If this package is used in a product, Eric Young should be given attribution
35738  * as the author of the parts of the library used.
35739  * This can be in the form of a textual message at program startup or
35740  * in documentation (online or textual) provided with the package.
35741  *
35742  * Redistribution and use in source and binary forms, with or without
35743  * modification, are permitted provided that the following conditions
35744  * are met:
35745  * 1. Redistributions of source code must retain the copyright
35746  *    notice, this list of conditions and the following disclaimer.
35747  * 2. Redistributions in binary form must reproduce the above copyright
35748  *    notice, this list of conditions and the following disclaimer in the
35749  *    documentation and/or other materials provided with the distribution.
35750  * 3. All advertising materials mentioning features or use of this software
35751  *    must display the following acknowledgement:
35752  *    "This product includes cryptographic software written by
35753  *     Eric Young (eay@cryptsoft.com)"
35754  *    The word 'cryptographic' can be left out if the rouines from the library
35755  *    being used are not cryptographic related :-).
35756  * 4. If you include any Windows specific code (or a derivative thereof) from
35757  *    the apps directory (application code) you must include an acknowledgement:
35758  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
35759  *
35760  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
35761  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35762  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35763  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
35764  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35765  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35766  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35767  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35768  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35769  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35770  * SUCH DAMAGE.
35771  *
35772  * The licence and distribution terms for any publically available version or
35773  * derivative of this code cannot be changed.  i.e. this code cannot simply be
35774  * copied and put under another distribution licence
35775  * [including the GNU Public Licence.]
35776  */
35777 # 64 "/usr/include/openssl/pkcs7.h" 2 3 4
35778 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
35779 /* e_os2.h */
35780 /* ====================================================================
35781  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
35782  *
35783  * Redistribution and use in source and binary forms, with or without
35784  * modification, are permitted provided that the following conditions
35785  * are met:
35786  *
35787  * 1. Redistributions of source code must retain the above copyright
35788  *    notice, this list of conditions and the following disclaimer.
35789  *
35790  * 2. Redistributions in binary form must reproduce the above copyright
35791  *    notice, this list of conditions and the following disclaimer in
35792  *    the documentation and/or other materials provided with the
35793  *    distribution.
35794  *
35795  * 3. All advertising materials mentioning features or use of this
35796  *    software must display the following acknowledgment:
35797  *    "This product includes software developed by the OpenSSL Project
35798  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
35799  *
35800  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
35801  *    endorse or promote products derived from this software without
35802  *    prior written permission. For written permission, please contact
35803  *    openssl-core@openssl.org.
35804  *
35805  * 5. Products derived from this software may not be called "OpenSSL"
35806  *    nor may "OpenSSL" appear in their names without prior written
35807  *    permission of the OpenSSL Project.
35808  *
35809  * 6. Redistributions of any form whatsoever must retain the following
35810  *    acknowledgment:
35811  *    "This product includes software developed by the OpenSSL Project
35812  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
35813  *
35814  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
35815  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35816  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
35817  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
35818  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35819  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
35820  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35821  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35822  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
35823  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35824  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
35825  * OF THE POSSIBILITY OF SUCH DAMAGE.
35826  * ====================================================================
35827  *
35828  * This product includes cryptographic software written by Eric Young
35829  * (eay@cryptsoft.com).  This product includes software written by Tim
35830  * Hudson (tjh@cryptsoft.com).
35831  *
35832  */
35833 
35834 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
35835 /* opensslconf.h */
35836 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
35837 
35838 
35839 
35840 
35841 /* OpenSSL was configured with the following options: */
35842 # 108 "/usr/include/openssl/opensslconf.h" 3 4
35843 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
35844    asks for it.  This is a transient feature that is provided for those
35845    who haven't had the time to do the appropriate changes in their
35846    applications.  */
35847 # 204 "/usr/include/openssl/opensslconf.h" 3 4
35848 /* crypto/opensslconf.h.in */
35849 
35850 /* Generate 80386 code? */
35851 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
35852 # 65 "/usr/include/openssl/pkcs7.h" 2 3 4
35853 
35854 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
35855 /* ====================================================================
35856  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
35857  *
35858  * Redistribution and use in source and binary forms, with or without
35859  * modification, are permitted provided that the following conditions
35860  * are met:
35861  *
35862  * 1. Redistributions of source code must retain the above copyright
35863  *    notice, this list of conditions and the following disclaimer.
35864  *
35865  * 2. Redistributions in binary form must reproduce the above copyright
35866  *    notice, this list of conditions and the following disclaimer in
35867  *    the documentation and/or other materials provided with the
35868  *    distribution.
35869  *
35870  * 3. All advertising materials mentioning features or use of this
35871  *    software must display the following acknowledgment:
35872  *    "This product includes software developed by the OpenSSL Project
35873  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
35874  *
35875  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
35876  *    endorse or promote products derived from this software without
35877  *    prior written permission. For written permission, please contact
35878  *    openssl-core@openssl.org.
35879  *
35880  * 5. Products derived from this software may not be called "OpenSSL"
35881  *    nor may "OpenSSL" appear in their names without prior written
35882  *    permission of the OpenSSL Project.
35883  *
35884  * 6. Redistributions of any form whatsoever must retain the following
35885  *    acknowledgment:
35886  *    "This product includes software developed by the OpenSSL Project
35887  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
35888  *
35889  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
35890  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35891  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
35892  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
35893  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35894  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
35895  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35896  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35897  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
35898  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35899  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
35900  * OF THE POSSIBILITY OF SUCH DAMAGE.
35901  * ====================================================================
35902  *
35903  * This product includes cryptographic software written by Eric Young
35904  * (eay@cryptsoft.com).  This product includes software written by Tim
35905  * Hudson (tjh@cryptsoft.com).
35906  *
35907  */
35908 # 67 "/usr/include/openssl/pkcs7.h" 2 3 4
35909 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
35910 /* ====================================================================
35911  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
35912  *
35913  * Redistribution and use in source and binary forms, with or without
35914  * modification, are permitted provided that the following conditions
35915  * are met:
35916  *
35917  * 1. Redistributions of source code must retain the above copyright
35918  *    notice, this list of conditions and the following disclaimer.
35919  *
35920  * 2. Redistributions in binary form must reproduce the above copyright
35921  *    notice, this list of conditions and the following disclaimer in
35922  *    the documentation and/or other materials provided with the
35923  *    distribution.
35924  *
35925  * 3. All advertising materials mentioning features or use of this
35926  *    software must display the following acknowledgment:
35927  *    "This product includes software developed by the OpenSSL Project
35928  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
35929  *
35930  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
35931  *    endorse or promote products derived from this software without
35932  *    prior written permission. For written permission, please contact
35933  *    openssl-core@openssl.org.
35934  *
35935  * 5. Products derived from this software may not be called "OpenSSL"
35936  *    nor may "OpenSSL" appear in their names without prior written
35937  *    permission of the OpenSSL Project.
35938  *
35939  * 6. Redistributions of any form whatsoever must retain the following
35940  *    acknowledgment:
35941  *    "This product includes software developed by the OpenSSL Project
35942  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
35943  *
35944  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
35945  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35946  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
35947  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
35948  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35949  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
35950  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35951  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35952  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
35953  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35954  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
35955  * OF THE POSSIBILITY OF SUCH DAMAGE.
35956  * ====================================================================
35957  *
35958  * This product includes cryptographic software written by Eric Young
35959  * (eay@cryptsoft.com).  This product includes software written by Tim
35960  * Hudson (tjh@cryptsoft.com).
35961  *
35962  */
35963 # 68 "/usr/include/openssl/pkcs7.h" 2 3 4
35964 # 79 "/usr/include/openssl/pkcs7.h" 3 4
35965 /*-
35966 Encryption_ID           DES-CBC
35967 Digest_ID               MD5
35968 Digest_Encryption_ID    rsaEncryption
35969 Key_Encryption_ID       rsaEncryption
35970 */
35971 
35972 typedef struct pkcs7_issuer_and_serial_st {
35973     X509_NAME *issuer;
35974     ASN1_INTEGER *serial;
35975 } PKCS7_ISSUER_AND_SERIAL;
35976 
35977 typedef struct pkcs7_signer_info_st {
35978     ASN1_INTEGER *version; /* version 1 */
35979     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
35980     X509_ALGOR *digest_alg;
35981     struct stack_st_X509_ATTRIBUTE *auth_attr; /* [ 0 ] */
35982     X509_ALGOR *digest_enc_alg;
35983     ASN1_OCTET_STRING *enc_digest;
35984     struct stack_st_X509_ATTRIBUTE *unauth_attr; /* [ 1 ] */
35985     /* The private key to sign with */
35986     EVP_PKEY *pkey;
35987 } PKCS7_SIGNER_INFO;
35988 
35989 struct stack_st_PKCS7_SIGNER_INFO { _STACK stack; };
35990 
35991 
35992 typedef struct pkcs7_recip_info_st {
35993     ASN1_INTEGER *version; /* version 0 */
35994     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
35995     X509_ALGOR *key_enc_algor;
35996     ASN1_OCTET_STRING *enc_key;
35997     X509 *cert; /* get the pub-key from this */
35998 } PKCS7_RECIP_INFO;
35999 
36000 struct stack_st_PKCS7_RECIP_INFO { _STACK stack; };
36001 
36002 
36003 typedef struct pkcs7_signed_st {
36004     ASN1_INTEGER *version; /* version 1 */
36005     struct stack_st_X509_ALGOR *md_algs; /* md used */
36006     struct stack_st_X509 *cert; /* [ 0 ] */
36007     struct stack_st_X509_CRL *crl; /* [ 1 ] */
36008     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
36009     struct pkcs7_st *contents;
36010 } PKCS7_SIGNED;
36011 /*
36012  * The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about
36013  * merging the two
36014  */
36015 
36016 typedef struct pkcs7_enc_content_st {
36017     ASN1_OBJECT *content_type;
36018     X509_ALGOR *algorithm;
36019     ASN1_OCTET_STRING *enc_data; /* [ 0 ] */
36020     const EVP_CIPHER *cipher;
36021 } PKCS7_ENC_CONTENT;
36022 
36023 typedef struct pkcs7_enveloped_st {
36024     ASN1_INTEGER *version; /* version 0 */
36025     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
36026     PKCS7_ENC_CONTENT *enc_data;
36027 } PKCS7_ENVELOPE;
36028 
36029 typedef struct pkcs7_signedandenveloped_st {
36030     ASN1_INTEGER *version; /* version 1 */
36031     struct stack_st_X509_ALGOR *md_algs; /* md used */
36032     struct stack_st_X509 *cert; /* [ 0 ] */
36033     struct stack_st_X509_CRL *crl; /* [ 1 ] */
36034     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
36035     PKCS7_ENC_CONTENT *enc_data;
36036     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
36037 } PKCS7_SIGN_ENVELOPE;
36038 
36039 typedef struct pkcs7_digest_st {
36040     ASN1_INTEGER *version; /* version 0 */
36041     X509_ALGOR *md; /* md used */
36042     struct pkcs7_st *contents;
36043     ASN1_OCTET_STRING *digest;
36044 } PKCS7_DIGEST;
36045 
36046 typedef struct pkcs7_encrypted_st {
36047     ASN1_INTEGER *version; /* version 0 */
36048     PKCS7_ENC_CONTENT *enc_data;
36049 } PKCS7_ENCRYPT;
36050 
36051 typedef struct pkcs7_st {
36052     /*
36053      * The following is non NULL if it contains ASN1 encoding of this
36054      * structure
36055      */
36056     unsigned char *asn1;
36057     long length;
36058 
36059 
36060 
36061     int state; /* used during processing */
36062     int detached;
36063     ASN1_OBJECT *type;
36064     /* content as defined by the type */
36065     /*
36066      * all encryption/message digests are applied to the 'contents', leaving
36067      * out the 'type' field.
36068      */
36069     union {
36070         char *ptr;
36071         /* NID_pkcs7_data */
36072         ASN1_OCTET_STRING *data;
36073         /* NID_pkcs7_signed */
36074         PKCS7_SIGNED *sign;
36075         /* NID_pkcs7_enveloped */
36076         PKCS7_ENVELOPE *enveloped;
36077         /* NID_pkcs7_signedAndEnveloped */
36078         PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
36079         /* NID_pkcs7_digest */
36080         PKCS7_DIGEST *digest;
36081         /* NID_pkcs7_encrypted */
36082         PKCS7_ENCRYPT *encrypted;
36083         /* Anything else */
36084         ASN1_TYPE *other;
36085     } d;
36086 } PKCS7;
36087 
36088 struct stack_st_PKCS7 { _STACK stack; };
36089 
36090 
36091 # 227 "/usr/include/openssl/pkcs7.h" 3 4
36092 /* S/MIME related flags */
36093 # 246 "/usr/include/openssl/pkcs7.h" 3 4
36094 /* Flags: for compatibility with older code */
36095 # 258 "/usr/include/openssl/pkcs7.h" 3 4
36096 PKCS7_ISSUER_AND_SERIAL *PKCS7_ISSUER_AND_SERIAL_new(void); void PKCS7_ISSUER_AND_SERIAL_free(PKCS7_ISSUER_AND_SERIAL *a); PKCS7_ISSUER_AND_SERIAL *d2i_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL **a, const unsigned char **in, long len); int i2d_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL *a, unsigned char **out); extern const ASN1_ITEM PKCS7_ISSUER_AND_SERIAL_it;
36097 
36098 int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
36099                                    const EVP_MD *type, unsigned char *md,
36100                                    unsigned int *len);
36101 
36102 PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
36103 int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7);
36104 
36105 PKCS7 *PKCS7_dup(PKCS7 *p7);
36106 PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
36107 int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7);
36108 int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
36109 int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
36110 
36111 PKCS7_SIGNER_INFO *PKCS7_SIGNER_INFO_new(void); void PKCS7_SIGNER_INFO_free(PKCS7_SIGNER_INFO *a); PKCS7_SIGNER_INFO *d2i_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO **a, const unsigned char **in, long len); int i2d_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO *a, unsigned char **out); extern const ASN1_ITEM PKCS7_SIGNER_INFO_it;
36112 PKCS7_RECIP_INFO *PKCS7_RECIP_INFO_new(void); void PKCS7_RECIP_INFO_free(PKCS7_RECIP_INFO *a); PKCS7_RECIP_INFO *d2i_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO **a, const unsigned char **in, long len); int i2d_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO *a, unsigned char **out); extern const ASN1_ITEM PKCS7_RECIP_INFO_it;
36113 PKCS7_SIGNED *PKCS7_SIGNED_new(void); void PKCS7_SIGNED_free(PKCS7_SIGNED *a); PKCS7_SIGNED *d2i_PKCS7_SIGNED(PKCS7_SIGNED **a, const unsigned char **in, long len); int i2d_PKCS7_SIGNED(PKCS7_SIGNED *a, unsigned char **out); extern const ASN1_ITEM PKCS7_SIGNED_it;
36114 PKCS7_ENC_CONTENT *PKCS7_ENC_CONTENT_new(void); void PKCS7_ENC_CONTENT_free(PKCS7_ENC_CONTENT *a); PKCS7_ENC_CONTENT *d2i_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT **a, const unsigned char **in, long len); int i2d_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT *a, unsigned char **out); extern const ASN1_ITEM PKCS7_ENC_CONTENT_it;
36115 PKCS7_ENVELOPE *PKCS7_ENVELOPE_new(void); void PKCS7_ENVELOPE_free(PKCS7_ENVELOPE *a); PKCS7_ENVELOPE *d2i_PKCS7_ENVELOPE(PKCS7_ENVELOPE **a, const unsigned char **in, long len); int i2d_PKCS7_ENVELOPE(PKCS7_ENVELOPE *a, unsigned char **out); extern const ASN1_ITEM PKCS7_ENVELOPE_it;
36116 PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new(void); void PKCS7_SIGN_ENVELOPE_free(PKCS7_SIGN_ENVELOPE *a); PKCS7_SIGN_ENVELOPE *d2i_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE **a, const unsigned char **in, long len); int i2d_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE *a, unsigned char **out); extern const ASN1_ITEM PKCS7_SIGN_ENVELOPE_it;
36117 PKCS7_DIGEST *PKCS7_DIGEST_new(void); void PKCS7_DIGEST_free(PKCS7_DIGEST *a); PKCS7_DIGEST *d2i_PKCS7_DIGEST(PKCS7_DIGEST **a, const unsigned char **in, long len); int i2d_PKCS7_DIGEST(PKCS7_DIGEST *a, unsigned char **out); extern const ASN1_ITEM PKCS7_DIGEST_it;
36118 PKCS7_ENCRYPT *PKCS7_ENCRYPT_new(void); void PKCS7_ENCRYPT_free(PKCS7_ENCRYPT *a); PKCS7_ENCRYPT *d2i_PKCS7_ENCRYPT(PKCS7_ENCRYPT **a, const unsigned char **in, long len); int i2d_PKCS7_ENCRYPT(PKCS7_ENCRYPT *a, unsigned char **out); extern const ASN1_ITEM PKCS7_ENCRYPT_it;
36119 PKCS7 *PKCS7_new(void); void PKCS7_free(PKCS7 *a); PKCS7 *d2i_PKCS7(PKCS7 **a, const unsigned char **in, long len); int i2d_PKCS7(PKCS7 *a, unsigned char **out); extern const ASN1_ITEM PKCS7_it;
36120 
36121 extern const ASN1_ITEM PKCS7_ATTR_SIGN_it;
36122 extern const ASN1_ITEM PKCS7_ATTR_VERIFY_it;
36123 
36124 int i2d_PKCS7_NDEF(PKCS7 *a, unsigned char **out);
36125 int PKCS7_print_ctx(BIO *out, PKCS7 *x, int indent, const ASN1_PCTX *pctx);
36126 
36127 long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
36128 
36129 int PKCS7_set_type(PKCS7 *p7, int type);
36130 int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
36131 int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
36132 int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
36133                           const EVP_MD *dgst);
36134 int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
36135 int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
36136 int PKCS7_add_certificate(PKCS7 *p7, X509 *x509);
36137 int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
36138 int PKCS7_content_new(PKCS7 *p7, int nid);
36139 int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
36140                      BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
36141 int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
36142                           X509 *x509);
36143 
36144 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
36145 int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
36146 BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
36147 
36148 PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
36149                                        EVP_PKEY *pkey, const EVP_MD *dgst);
36150 X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
36151 int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
36152 struct stack_st_PKCS7_SIGNER_INFO *PKCS7_get_signer_info(PKCS7 *p7);
36153 
36154 PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
36155 void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
36156                                  X509_ALGOR **pdig, X509_ALGOR **psig);
36157 void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
36158 int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
36159 int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
36160 int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
36161 int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
36162 
36163 PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
36164 ASN1_OCTET_STRING *PKCS7_digest_from_attributes(struct stack_st_X509_ATTRIBUTE *sk);
36165 int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,
36166                                void *data);
36167 int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
36168                         void *value);
36169 ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid);
36170 ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid);
36171 int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
36172                                 struct stack_st_X509_ATTRIBUTE *sk);
36173 int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
36174                          struct stack_st_X509_ATTRIBUTE *sk);
36175 
36176 PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, struct stack_st_X509 *certs,
36177                   BIO *data, int flags);
36178 
36179 PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
36180                                          X509 *signcert, EVP_PKEY *pkey,
36181                                          const EVP_MD *md, int flags);
36182 
36183 int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
36184 int PKCS7_verify(PKCS7 *p7, struct stack_st_X509 *certs, X509_STORE *store,
36185                  BIO *indata, BIO *out, int flags);
36186 struct stack_st_X509 *PKCS7_get0_signers(PKCS7 *p7, struct stack_st_X509 *certs,
36187                                    int flags);
36188 PKCS7 *PKCS7_encrypt(struct stack_st_X509 *certs, BIO *in, const EVP_CIPHER *cipher,
36189                      int flags);
36190 int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
36191                   int flags);
36192 
36193 int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
36194                               struct stack_st_X509_ALGOR *cap);
36195 struct stack_st_X509_ALGOR *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
36196 int PKCS7_simple_smimecap(struct stack_st_X509_ALGOR *sk, int nid, int arg);
36197 
36198 int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
36199 int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
36200 int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
36201                              const unsigned char *md, int mdlen);
36202 
36203 int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
36204 PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
36205 
36206 BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
36207 
36208 /* BEGIN ERROR CODES */
36209 /*
36210  * The following lines are auto generated by the script mkerr.pl. Any changes
36211  * made after this point may be overwritten when the script is next run.
36212  */
36213 void ERR_load_PKCS7_strings(void);
36214 
36215 /* Error codes for the PKCS7 functions. */
36216 
36217 /* Function codes. */
36218 # 421 "/usr/include/openssl/pkcs7.h" 3 4
36219 /* Reason codes. */
36220 # 583 "/usr/include/openssl/x509.h" 2 3 4
36221 # 592 "/usr/include/openssl/x509.h" 3 4
36222 /* #define      X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */
36223 # 608 "/usr/include/openssl/x509.h" 3 4
36224 void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
36225 X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
36226                                      int (*crl_free) (X509_CRL *crl),
36227                                      int (*crl_lookup) (X509_CRL *crl,
36228                                                         X509_REVOKED **ret,
36229                                                         ASN1_INTEGER *ser,
36230                                                         X509_NAME *issuer),
36231                                      int (*crl_verify) (X509_CRL *crl,
36232                                                         EVP_PKEY *pk));
36233 void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
36234 
36235 void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
36236 void *X509_CRL_get_meth_data(X509_CRL *crl);
36237 
36238 /*
36239  * This one is only used so that a binary form can output, as in
36240  * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf)
36241  */
36242 
36243 
36244 const char *X509_verify_cert_error_string(long n);
36245 
36246 
36247 int X509_verify(X509 *a, EVP_PKEY *r);
36248 
36249 int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
36250 int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);
36251 int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);
36252 
36253 NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len);
36254 char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
36255 EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
36256 int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
36257 
36258 int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
36259 
36260 int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
36261 int X509_signature_print(BIO *bp, X509_ALGOR *alg, ASN1_STRING *sig);
36262 
36263 int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
36264 int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
36265 int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert);
36266 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
36267 int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
36268 int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
36269 int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
36270 int X509_CRL_http_nbio(OCSP_REQ_CTX *rctx, X509_CRL **pcrl);
36271 int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
36272 
36273 int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
36274                        unsigned char *md, unsigned int *len);
36275 int X509_digest(const X509 *data, const EVP_MD *type,
36276                 unsigned char *md, unsigned int *len);
36277 int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,
36278                     unsigned char *md, unsigned int *len);
36279 int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
36280                     unsigned char *md, unsigned int *len);
36281 int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
36282                      unsigned char *md, unsigned int *len);
36283 
36284 
36285 
36286 X509 *d2i_X509_fp(FILE *fp, X509 **x509);
36287 int i2d_X509_fp(FILE *fp, X509 *x509);
36288 X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);
36289 int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl);
36290 X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);
36291 int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req);
36292 
36293 RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);
36294 int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa);
36295 RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);
36296 int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa);
36297 RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
36298 int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa);
36299 
36300 
36301 DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
36302 int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa);
36303 DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
36304 int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa);
36305 
36306 
36307 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
36308 int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
36309 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
36310 int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
36311 
36312 X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);
36313 int i2d_PKCS8_fp(FILE *fp, X509_SIG *p8);
36314 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
36315                                                 PKCS8_PRIV_KEY_INFO **p8inf);
36316 int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf);
36317 int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key);
36318 int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey);
36319 EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
36320 int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey);
36321 EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
36322 
36323 
36324 
36325 X509 *d2i_X509_bio(BIO *bp, X509 **x509);
36326 int i2d_X509_bio(BIO *bp, X509 *x509);
36327 X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
36328 int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl);
36329 X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);
36330 int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req);
36331 
36332 RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);
36333 int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa);
36334 RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
36335 int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa);
36336 RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
36337 int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa);
36338 
36339 
36340 DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
36341 int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa);
36342 DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
36343 int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);
36344 
36345 
36346 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
36347 int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);
36348 EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
36349 int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);
36350 
36351 X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);
36352 int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8);
36353 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
36354                                                  PKCS8_PRIV_KEY_INFO **p8inf);
36355 int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf);
36356 int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key);
36357 int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey);
36358 EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
36359 int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey);
36360 EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
36361 
36362 
36363 X509 *X509_dup(X509 *x509);
36364 X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);
36365 X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex);
36366 X509_CRL *X509_CRL_dup(X509_CRL *crl);
36367 X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev);
36368 X509_REQ *X509_REQ_dup(X509_REQ *req);
36369 X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
36370 int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,
36371                     void *pval);
36372 void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
36373                      X509_ALGOR *algor);
36374 void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
36375 int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
36376 
36377 X509_NAME *X509_NAME_dup(X509_NAME *xn);
36378 X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
36379 
36380 int X509_cmp_time(const ASN1_TIME *s, time_t *t);
36381 int X509_cmp_current_time(const ASN1_TIME *s);
36382 ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
36383 ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
36384                             int offset_day, long offset_sec, time_t *t);
36385 ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj);
36386 
36387 const char *X509_get_default_cert_area(void);
36388 const char *X509_get_default_cert_dir(void);
36389 const char *X509_get_default_cert_file(void);
36390 const char *X509_get_default_cert_dir_env(void);
36391 const char *X509_get_default_cert_file_env(void);
36392 const char *X509_get_default_private_dir(void);
36393 
36394 X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
36395 X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey);
36396 
36397 X509_ALGOR *X509_ALGOR_new(void); void X509_ALGOR_free(X509_ALGOR *a); X509_ALGOR *d2i_X509_ALGOR(X509_ALGOR **a, const unsigned char **in, long len); int i2d_X509_ALGOR(X509_ALGOR *a, unsigned char **out); extern const ASN1_ITEM X509_ALGOR_it;
36398 X509_ALGORS *d2i_X509_ALGORS(X509_ALGORS **a, const unsigned char **in, long len); int i2d_X509_ALGORS(X509_ALGORS *a, unsigned char **out); extern const ASN1_ITEM X509_ALGORS_it;
36399 X509_VAL *X509_VAL_new(void); void X509_VAL_free(X509_VAL *a); X509_VAL *d2i_X509_VAL(X509_VAL **a, const unsigned char **in, long len); int i2d_X509_VAL(X509_VAL *a, unsigned char **out); extern const ASN1_ITEM X509_VAL_it;
36400 
36401 X509_PUBKEY *X509_PUBKEY_new(void); void X509_PUBKEY_free(X509_PUBKEY *a); X509_PUBKEY *d2i_X509_PUBKEY(X509_PUBKEY **a, const unsigned char **in, long len); int i2d_X509_PUBKEY(X509_PUBKEY *a, unsigned char **out); extern const ASN1_ITEM X509_PUBKEY_it;
36402 
36403 int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
36404 EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key);
36405 int X509_get_pubkey_parameters(EVP_PKEY *pkey, struct stack_st_X509 *chain);
36406 int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp);
36407 EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length);
36408 
36409 int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);
36410 RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length);
36411 
36412 
36413 int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp);
36414 DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
36415 
36416 
36417 int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp);
36418 EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length);
36419 
36420 
36421 X509_SIG *X509_SIG_new(void); void X509_SIG_free(X509_SIG *a); X509_SIG *d2i_X509_SIG(X509_SIG **a, const unsigned char **in, long len); int i2d_X509_SIG(X509_SIG *a, unsigned char **out); extern const ASN1_ITEM X509_SIG_it;
36422 X509_REQ_INFO *X509_REQ_INFO_new(void); void X509_REQ_INFO_free(X509_REQ_INFO *a); X509_REQ_INFO *d2i_X509_REQ_INFO(X509_REQ_INFO **a, const unsigned char **in, long len); int i2d_X509_REQ_INFO(X509_REQ_INFO *a, unsigned char **out); extern const ASN1_ITEM X509_REQ_INFO_it;
36423 X509_REQ *X509_REQ_new(void); void X509_REQ_free(X509_REQ *a); X509_REQ *d2i_X509_REQ(X509_REQ **a, const unsigned char **in, long len); int i2d_X509_REQ(X509_REQ *a, unsigned char **out); extern const ASN1_ITEM X509_REQ_it;
36424 
36425 X509_ATTRIBUTE *X509_ATTRIBUTE_new(void); void X509_ATTRIBUTE_free(X509_ATTRIBUTE *a); X509_ATTRIBUTE *d2i_X509_ATTRIBUTE(X509_ATTRIBUTE **a, const unsigned char **in, long len); int i2d_X509_ATTRIBUTE(X509_ATTRIBUTE *a, unsigned char **out); extern const ASN1_ITEM X509_ATTRIBUTE_it;
36426 X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
36427 
36428 X509_EXTENSION *X509_EXTENSION_new(void); void X509_EXTENSION_free(X509_EXTENSION *a); X509_EXTENSION *d2i_X509_EXTENSION(X509_EXTENSION **a, const unsigned char **in, long len); int i2d_X509_EXTENSION(X509_EXTENSION *a, unsigned char **out); extern const ASN1_ITEM X509_EXTENSION_it;
36429 X509_EXTENSIONS *d2i_X509_EXTENSIONS(X509_EXTENSIONS **a, const unsigned char **in, long len); int i2d_X509_EXTENSIONS(X509_EXTENSIONS *a, unsigned char **out); extern const ASN1_ITEM X509_EXTENSIONS_it;
36430 
36431 X509_NAME_ENTRY *X509_NAME_ENTRY_new(void); void X509_NAME_ENTRY_free(X509_NAME_ENTRY *a); X509_NAME_ENTRY *d2i_X509_NAME_ENTRY(X509_NAME_ENTRY **a, const unsigned char **in, long len); int i2d_X509_NAME_ENTRY(X509_NAME_ENTRY *a, unsigned char **out); extern const ASN1_ITEM X509_NAME_ENTRY_it;
36432 
36433 X509_NAME *X509_NAME_new(void); void X509_NAME_free(X509_NAME *a); X509_NAME *d2i_X509_NAME(X509_NAME **a, const unsigned char **in, long len); int i2d_X509_NAME(X509_NAME *a, unsigned char **out); extern const ASN1_ITEM X509_NAME_it;
36434 
36435 int X509_NAME_set(X509_NAME **xn, X509_NAME *name);
36436 
36437 X509_CINF *X509_CINF_new(void); void X509_CINF_free(X509_CINF *a); X509_CINF *d2i_X509_CINF(X509_CINF **a, const unsigned char **in, long len); int i2d_X509_CINF(X509_CINF *a, unsigned char **out); extern const ASN1_ITEM X509_CINF_it;
36438 
36439 X509 *X509_new(void); void X509_free(X509 *a); X509 *d2i_X509(X509 **a, const unsigned char **in, long len); int i2d_X509(X509 *a, unsigned char **out); extern const ASN1_ITEM X509_it;
36440 X509_CERT_AUX *X509_CERT_AUX_new(void); void X509_CERT_AUX_free(X509_CERT_AUX *a); X509_CERT_AUX *d2i_X509_CERT_AUX(X509_CERT_AUX **a, const unsigned char **in, long len); int i2d_X509_CERT_AUX(X509_CERT_AUX *a, unsigned char **out); extern const ASN1_ITEM X509_CERT_AUX_it;
36441 
36442 X509_CERT_PAIR *X509_CERT_PAIR_new(void); void X509_CERT_PAIR_free(X509_CERT_PAIR *a); X509_CERT_PAIR *d2i_X509_CERT_PAIR(X509_CERT_PAIR **a, const unsigned char **in, long len); int i2d_X509_CERT_PAIR(X509_CERT_PAIR *a, unsigned char **out); extern const ASN1_ITEM X509_CERT_PAIR_it;
36443 
36444 int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
36445                           CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
36446 int X509_set_ex_data(X509 *r, int idx, void *arg);
36447 void *X509_get_ex_data(X509 *r, int idx);
36448 int i2d_X509_AUX(X509 *a, unsigned char **pp);
36449 X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length);
36450 
36451 int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
36452 
36453 void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
36454                          const X509 *x);
36455 int X509_get_signature_nid(const X509 *x);
36456 
36457 int X509_alias_set1(X509 *x, unsigned char *name, int len);
36458 int X509_keyid_set1(X509 *x, unsigned char *id, int len);
36459 unsigned char *X509_alias_get0(X509 *x, int *len);
36460 unsigned char *X509_keyid_get0(X509 *x, int *len);
36461 int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
36462                                                                 int);
36463 int X509_TRUST_set(int *t, int trust);
36464 int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
36465 int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj);
36466 void X509_trust_clear(X509 *x);
36467 void X509_reject_clear(X509 *x);
36468 
36469 X509_REVOKED *X509_REVOKED_new(void); void X509_REVOKED_free(X509_REVOKED *a); X509_REVOKED *d2i_X509_REVOKED(X509_REVOKED **a, const unsigned char **in, long len); int i2d_X509_REVOKED(X509_REVOKED *a, unsigned char **out); extern const ASN1_ITEM X509_REVOKED_it;
36470 X509_CRL_INFO *X509_CRL_INFO_new(void); void X509_CRL_INFO_free(X509_CRL_INFO *a); X509_CRL_INFO *d2i_X509_CRL_INFO(X509_CRL_INFO **a, const unsigned char **in, long len); int i2d_X509_CRL_INFO(X509_CRL_INFO *a, unsigned char **out); extern const ASN1_ITEM X509_CRL_INFO_it;
36471 X509_CRL *X509_CRL_new(void); void X509_CRL_free(X509_CRL *a); X509_CRL *d2i_X509_CRL(X509_CRL **a, const unsigned char **in, long len); int i2d_X509_CRL(X509_CRL *a, unsigned char **out); extern const ASN1_ITEM X509_CRL_it;
36472 
36473 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
36474 int X509_CRL_get0_by_serial(X509_CRL *crl,
36475                             X509_REVOKED **ret, ASN1_INTEGER *serial);
36476 int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
36477 
36478 X509_PKEY *X509_PKEY_new(void);
36479 void X509_PKEY_free(X509_PKEY *a);
36480 int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp);
36481 X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp,
36482                          long length);
36483 
36484 NETSCAPE_SPKI *NETSCAPE_SPKI_new(void); void NETSCAPE_SPKI_free(NETSCAPE_SPKI *a); NETSCAPE_SPKI *d2i_NETSCAPE_SPKI(NETSCAPE_SPKI **a, const unsigned char **in, long len); int i2d_NETSCAPE_SPKI(NETSCAPE_SPKI *a, unsigned char **out); extern const ASN1_ITEM NETSCAPE_SPKI_it;
36485 NETSCAPE_SPKAC *NETSCAPE_SPKAC_new(void); void NETSCAPE_SPKAC_free(NETSCAPE_SPKAC *a); NETSCAPE_SPKAC *d2i_NETSCAPE_SPKAC(NETSCAPE_SPKAC **a, const unsigned char **in, long len); int i2d_NETSCAPE_SPKAC(NETSCAPE_SPKAC *a, unsigned char **out); extern const ASN1_ITEM NETSCAPE_SPKAC_it;
36486 NETSCAPE_CERT_SEQUENCE *NETSCAPE_CERT_SEQUENCE_new(void); void NETSCAPE_CERT_SEQUENCE_free(NETSCAPE_CERT_SEQUENCE *a); NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a, const unsigned char **in, long len); int i2d_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE *a, unsigned char **out); extern const ASN1_ITEM NETSCAPE_CERT_SEQUENCE_it;
36487 
36488 
36489 X509_INFO *X509_INFO_new(void);
36490 void X509_INFO_free(X509_INFO *a);
36491 char *X509_NAME_oneline(X509_NAME *a, char *buf, int size);
36492 
36493 int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,
36494                 ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey);
36495 
36496 int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
36497                 unsigned char *md, unsigned int *len);
36498 
36499 int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1,
36500               X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
36501               char *data, EVP_PKEY *pkey, const EVP_MD *type);
36502 
36503 int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data,
36504                      unsigned char *md, unsigned int *len);
36505 
36506 int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,
36507                      ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey);
36508 
36509 int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1,
36510                    X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data,
36511                    EVP_PKEY *pkey, const EVP_MD *type);
36512 int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
36513                        X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
36514                        void *asn, EVP_MD_CTX *ctx);
36515 
36516 
36517 int X509_set_version(X509 *x, long version);
36518 int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
36519 ASN1_INTEGER *X509_get_serialNumber(X509 *x);
36520 int X509_set_issuer_name(X509 *x, X509_NAME *name);
36521 X509_NAME *X509_get_issuer_name(X509 *a);
36522 int X509_set_subject_name(X509 *x, X509_NAME *name);
36523 X509_NAME *X509_get_subject_name(X509 *a);
36524 int X509_set_notBefore(X509 *x, const ASN1_TIME *tm);
36525 int X509_set_notAfter(X509 *x, const ASN1_TIME *tm);
36526 int X509_set_pubkey(X509 *x, EVP_PKEY *pkey);
36527 EVP_PKEY *X509_get_pubkey(X509 *x);
36528 ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);
36529 int X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ );
36530 
36531 int X509_REQ_set_version(X509_REQ *x, long version);
36532 int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
36533 int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
36534 EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
36535 int X509_REQ_extension_nid(int nid);
36536 int *X509_REQ_get_extension_nids(void);
36537 void X509_REQ_set_extension_nids(int *nids);
36538 struct stack_st_X509_EXTENSION *X509_REQ_get_extensions(X509_REQ *req);
36539 int X509_REQ_add_extensions_nid(X509_REQ *req, struct stack_st_X509_EXTENSION *exts,
36540                                 int nid);
36541 int X509_REQ_add_extensions(X509_REQ *req, struct stack_st_X509_EXTENSION *exts);
36542 int X509_REQ_get_attr_count(const X509_REQ *req);
36543 int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);
36544 int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj,
36545                              int lastpos);
36546 X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
36547 X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
36548 int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
36549 int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
36550                               const ASN1_OBJECT *obj, int type,
36551                               const unsigned char *bytes, int len);
36552 int X509_REQ_add1_attr_by_NID(X509_REQ *req,
36553                               int nid, int type,
36554                               const unsigned char *bytes, int len);
36555 int X509_REQ_add1_attr_by_txt(X509_REQ *req,
36556                               const char *attrname, int type,
36557                               const unsigned char *bytes, int len);
36558 
36559 int X509_CRL_set_version(X509_CRL *x, long version);
36560 int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
36561 int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
36562 int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
36563 int X509_CRL_sort(X509_CRL *crl);
36564 
36565 int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
36566 int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
36567 
36568 X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer,
36569                         EVP_PKEY *skey, const EVP_MD *md, unsigned int flags);
36570 
36571 int X509_REQ_check_private_key(X509_REQ *x509, EVP_PKEY *pkey);
36572 
36573 int X509_check_private_key(X509 *x509, EVP_PKEY *pkey);
36574 int X509_chain_check_suiteb(int *perror_depth,
36575                             X509 *x, struct stack_st_X509 *chain,
36576                             unsigned long flags);
36577 int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags);
36578 struct stack_st_X509 *X509_chain_up_ref(struct stack_st_X509 *chain);
36579 
36580 int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
36581 unsigned long X509_issuer_and_serial_hash(X509 *a);
36582 
36583 int X509_issuer_name_cmp(const X509 *a, const X509 *b);
36584 unsigned long X509_issuer_name_hash(X509 *a);
36585 
36586 int X509_subject_name_cmp(const X509 *a, const X509 *b);
36587 unsigned long X509_subject_name_hash(X509 *x);
36588 
36589 
36590 unsigned long X509_issuer_name_hash_old(X509 *a);
36591 unsigned long X509_subject_name_hash_old(X509 *x);
36592 
36593 
36594 int X509_cmp(const X509 *a, const X509 *b);
36595 int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
36596 unsigned long X509_NAME_hash(X509_NAME *x);
36597 unsigned long X509_NAME_hash_old(X509_NAME *x);
36598 
36599 int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
36600 int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
36601 
36602 int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
36603                      unsigned long cflag);
36604 int X509_print_fp(FILE *bp, X509 *x);
36605 int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
36606 int X509_REQ_print_fp(FILE *bp, X509_REQ *req);
36607 int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent,
36608                           unsigned long flags);
36609 
36610 
36611 
36612 int X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
36613 int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent,
36614                        unsigned long flags);
36615 int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
36616                   unsigned long cflag);
36617 int X509_print(BIO *bp, X509 *x);
36618 int X509_ocspid_print(BIO *bp, X509 *x);
36619 int X509_CERT_AUX_print(BIO *bp, X509_CERT_AUX *x, int indent);
36620 int X509_CRL_print(BIO *bp, X509_CRL *x);
36621 int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
36622                       unsigned long cflag);
36623 int X509_REQ_print(BIO *bp, X509_REQ *req);
36624 
36625 
36626 int X509_NAME_entry_count(X509_NAME *name);
36627 int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);
36628 int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
36629                               char *buf, int len);
36630 
36631 /*
36632  * NOTE: you should be passsing -1, not 0 as lastpos.  The functions that use
36633  * lastpos, search after that position on.
36634  */
36635 int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
36636 int X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
36637                                int lastpos);
36638 X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
36639 X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
36640 int X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne,
36641                         int loc, int set);
36642 int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type,
36643                                unsigned char *bytes, int len, int loc,
36644                                int set);
36645 int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
36646                                unsigned char *bytes, int len, int loc,
36647                                int set);
36648 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
36649                                                const char *field, int type,
36650                                                const unsigned char *bytes,
36651                                                int len);
36652 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
36653                                                int type, unsigned char *bytes,
36654                                                int len);
36655 int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
36656                                const unsigned char *bytes, int len, int loc,
36657                                int set);
36658 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
36659                                                ASN1_OBJECT *obj, int type,
36660                                                const unsigned char *bytes,
36661                                                int len);
36662 int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj);
36663 int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
36664                              const unsigned char *bytes, int len);
36665 ASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
36666 ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
36667 
36668 int X509v3_get_ext_count(const struct stack_st_X509_EXTENSION *x);
36669 int X509v3_get_ext_by_NID(const struct stack_st_X509_EXTENSION *x,
36670                           int nid, int lastpos);
36671 int X509v3_get_ext_by_OBJ(const struct stack_st_X509_EXTENSION *x,
36672                           ASN1_OBJECT *obj, int lastpos);
36673 int X509v3_get_ext_by_critical(const struct stack_st_X509_EXTENSION *x,
36674                                int crit, int lastpos);
36675 X509_EXTENSION *X509v3_get_ext(const struct stack_st_X509_EXTENSION *x, int loc);
36676 X509_EXTENSION *X509v3_delete_ext(struct stack_st_X509_EXTENSION *x, int loc);
36677 struct stack_st_X509_EXTENSION *X509v3_add_ext(struct stack_st_X509_EXTENSION **x,
36678                                          X509_EXTENSION *ex, int loc);
36679 
36680 int X509_get_ext_count(X509 *x);
36681 int X509_get_ext_by_NID(X509 *x, int nid, int lastpos);
36682 int X509_get_ext_by_OBJ(X509 *x, ASN1_OBJECT *obj, int lastpos);
36683 int X509_get_ext_by_critical(X509 *x, int crit, int lastpos);
36684 X509_EXTENSION *X509_get_ext(X509 *x, int loc);
36685 X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
36686 int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
36687 void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
36688 int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
36689                       unsigned long flags);
36690 
36691 int X509_CRL_get_ext_count(X509_CRL *x);
36692 int X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos);
36693 int X509_CRL_get_ext_by_OBJ(X509_CRL *x, ASN1_OBJECT *obj, int lastpos);
36694 int X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos);
36695 X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc);
36696 X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
36697 int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
36698 void *X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx);
36699 int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
36700                           unsigned long flags);
36701 
36702 int X509_REVOKED_get_ext_count(X509_REVOKED *x);
36703 int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos);
36704 int X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x, ASN1_OBJECT *obj,
36705                                 int lastpos);
36706 int X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos);
36707 X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc);
36708 X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
36709 int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
36710 void *X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx);
36711 int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
36712                               unsigned long flags);
36713 
36714 X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
36715                                              int nid, int crit,
36716                                              ASN1_OCTET_STRING *data);
36717 X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
36718                                              ASN1_OBJECT *obj, int crit,
36719                                              ASN1_OCTET_STRING *data);
36720 int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj);
36721 int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
36722 int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
36723 ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);
36724 ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
36725 int X509_EXTENSION_get_critical(X509_EXTENSION *ex);
36726 
36727 int X509at_get_attr_count(const struct stack_st_X509_ATTRIBUTE *x);
36728 int X509at_get_attr_by_NID(const struct stack_st_X509_ATTRIBUTE *x, int nid,
36729                            int lastpos);
36730 int X509at_get_attr_by_OBJ(const struct stack_st_X509_ATTRIBUTE *sk,
36731                            ASN1_OBJECT *obj, int lastpos);
36732 X509_ATTRIBUTE *X509at_get_attr(const struct stack_st_X509_ATTRIBUTE *x, int loc);
36733 X509_ATTRIBUTE *X509at_delete_attr(struct stack_st_X509_ATTRIBUTE *x, int loc);
36734 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr(struct stack_st_X509_ATTRIBUTE **x,
36735                                            X509_ATTRIBUTE *attr);
36736 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_OBJ(struct stack_st_X509_ATTRIBUTE
36737                                                   **x, const ASN1_OBJECT *obj,
36738                                                   int type,
36739                                                   const unsigned char *bytes,
36740                                                   int len);
36741 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_NID(struct stack_st_X509_ATTRIBUTE
36742                                                   **x, int nid, int type,
36743                                                   const unsigned char *bytes,
36744                                                   int len);
36745 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_txt(struct stack_st_X509_ATTRIBUTE
36746                                                   **x, const char *attrname,
36747                                                   int type,
36748                                                   const unsigned char *bytes,
36749                                                   int len);
36750 void *X509at_get0_data_by_OBJ(struct stack_st_X509_ATTRIBUTE *x, ASN1_OBJECT *obj,
36751                               int lastpos, int type);
36752 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
36753                                              int atrtype, const void *data,
36754                                              int len);
36755 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
36756                                              const ASN1_OBJECT *obj,
36757                                              int atrtype, const void *data,
36758                                              int len);
36759 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
36760                                              const char *atrname, int type,
36761                                              const unsigned char *bytes,
36762                                              int len);
36763 int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);
36764 int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,
36765                              const void *data, int len);
36766 void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype,
36767                                void *data);
36768 int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr);
36769 ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
36770 ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
36771 
36772 int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
36773 int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);
36774 int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj,
36775                              int lastpos);
36776 X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
36777 X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
36778 int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
36779 int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
36780                               const ASN1_OBJECT *obj, int type,
36781                               const unsigned char *bytes, int len);
36782 int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
36783                               int nid, int type,
36784                               const unsigned char *bytes, int len);
36785 int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
36786                               const char *attrname, int type,
36787                               const unsigned char *bytes, int len);
36788 
36789 int X509_verify_cert(X509_STORE_CTX *ctx);
36790 
36791 /* lookup a cert from a X509 STACK */
36792 X509 *X509_find_by_issuer_and_serial(struct stack_st_X509 *sk, X509_NAME *name,
36793                                      ASN1_INTEGER *serial);
36794 X509 *X509_find_by_subject(struct stack_st_X509 *sk, X509_NAME *name);
36795 
36796 PBEPARAM *PBEPARAM_new(void); void PBEPARAM_free(PBEPARAM *a); PBEPARAM *d2i_PBEPARAM(PBEPARAM **a, const unsigned char **in, long len); int i2d_PBEPARAM(PBEPARAM *a, unsigned char **out); extern const ASN1_ITEM PBEPARAM_it;
36797 PBE2PARAM *PBE2PARAM_new(void); void PBE2PARAM_free(PBE2PARAM *a); PBE2PARAM *d2i_PBE2PARAM(PBE2PARAM **a, const unsigned char **in, long len); int i2d_PBE2PARAM(PBE2PARAM *a, unsigned char **out); extern const ASN1_ITEM PBE2PARAM_it;
36798 PBKDF2PARAM *PBKDF2PARAM_new(void); void PBKDF2PARAM_free(PBKDF2PARAM *a); PBKDF2PARAM *d2i_PBKDF2PARAM(PBKDF2PARAM **a, const unsigned char **in, long len); int i2d_PBKDF2PARAM(PBKDF2PARAM *a, unsigned char **out); extern const ASN1_ITEM PBKDF2PARAM_it;
36799 
36800 int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
36801                          const unsigned char *salt, int saltlen);
36802 
36803 X509_ALGOR *PKCS5_pbe_set(int alg, int iter,
36804                           const unsigned char *salt, int saltlen);
36805 X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
36806                            unsigned char *salt, int saltlen);
36807 X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
36808                               unsigned char *salt, int saltlen,
36809                               unsigned char *aiv, int prf_nid);
36810 
36811 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
36812                              int prf_nid, int keylen);
36813 
36814 /* PKCS#8 utilities */
36815 
36816 PKCS8_PRIV_KEY_INFO *PKCS8_PRIV_KEY_INFO_new(void); void PKCS8_PRIV_KEY_INFO_free(PKCS8_PRIV_KEY_INFO *a); PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO **a, const unsigned char **in, long len); int i2d_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO *a, unsigned char **out); extern const ASN1_ITEM PKCS8_PRIV_KEY_INFO_it;
36817 
36818 EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8);
36819 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey);
36820 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken);
36821 PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);
36822 
36823 int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,
36824                     int version, int ptype, void *pval,
36825                     unsigned char *penc, int penclen);
36826 int PKCS8_pkey_get0(ASN1_OBJECT **ppkalg,
36827                     const unsigned char **pk, int *ppklen,
36828                     X509_ALGOR **pa, PKCS8_PRIV_KEY_INFO *p8);
36829 
36830 int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
36831                            int ptype, void *pval,
36832                            unsigned char *penc, int penclen);
36833 int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
36834                            const unsigned char **pk, int *ppklen,
36835                            X509_ALGOR **pa, X509_PUBKEY *pub);
36836 
36837 int X509_check_trust(X509 *x, int id, int flags);
36838 int X509_TRUST_get_count(void);
36839 X509_TRUST *X509_TRUST_get0(int idx);
36840 int X509_TRUST_get_by_id(int id);
36841 int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int),
36842                    char *name, int arg1, void *arg2);
36843 void X509_TRUST_cleanup(void);
36844 int X509_TRUST_get_flags(X509_TRUST *xp);
36845 char *X509_TRUST_get0_name(X509_TRUST *xp);
36846 int X509_TRUST_get_trust(X509_TRUST *xp);
36847 
36848 /* BEGIN ERROR CODES */
36849 /*
36850  * The following lines are auto generated by the script mkerr.pl. Any changes
36851  * made after this point may be overwritten when the script is next run.
36852  */
36853 
36854 void ERR_load_X509_strings(void);
36855 
36856 /* Error codes for the X509 functions. */
36857 
36858 /* Function codes. */
36859 # 1291 "/usr/include/openssl/x509.h" 3 4
36860 /* Reason codes. */
36861 # 45 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
36862 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 1
36863 /*
36864  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
36865  *
36866  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
36867  * Use is subject to license terms.
36868  */
36869 
36870 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
36871 /*	  All Rights Reserved  	*/
36872 
36873 /*
36874  * BIND 4.9.3:
36875  *
36876  * Copyright (c) 1980, 1983, 1988, 1993
36877  *	The Regents of the University of California.  All rights reserved.
36878  *
36879  * Redistribution and use in source and binary forms, with or without
36880  * modification, are permitted provided that the following conditions
36881  * are met:
36882  * 1. Redistributions of source code must retain the above copyright
36883  *    notice, this list of conditions and the following disclaimer.
36884  * 2. Redistributions in binary form must reproduce the above copyright
36885  *    notice, this list of conditions and the following disclaimer in the
36886  *    documentation and/or other materials provided with the distribution.
36887  * 3. All advertising materials mentioning features or use of this software
36888  *    must display the following acknowledgement:
36889  *	This product includes software developed by the University of
36890  *	California, Berkeley and its contributors.
36891  * 4. Neither the name of the University nor the names of its contributors
36892  *    may be used to endorse or promote products derived from this software
36893  *    without specific prior written permission.
36894  *
36895  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
36896  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
36897  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36898  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
36899  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36900  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
36901  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36902  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36903  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36904  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36905  * SUCH DAMAGE.
36906  * -
36907  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
36908  *
36909  * Permission to use, copy, modify, and distribute this software for any
36910  * purpose with or without fee is hereby granted, provided that the above
36911  * copyright notice and this permission notice appear in all copies, and that
36912  * the name of Digital Equipment Corporation not be used in advertising or
36913  * publicity pertaining to distribution of the document or software without
36914  * specific, written prior permission.
36915  *
36916  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
36917  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
36918  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
36919  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36920  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
36921  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
36922  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
36923  * SOFTWARE.
36924  * --Copyright--
36925  *
36926  * End BIND 4.9.3
36927  */
36928 
36929 /*
36930  * Structures returned by network data base library.
36931  * All addresses are supplied in host order, and
36932  * returned in network order (suitable for use in system calls).
36933  */
36934 
36935 
36936 
36937 
36938 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
36939 /*
36940  * CDDL HEADER START
36941  *
36942  * The contents of this file are subject to the terms of the
36943  * Common Development and Distribution License (the "License").
36944  * You may not use this file except in compliance with the License.
36945  *
36946  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
36947  * or http://www.opensolaris.org/os/licensing.
36948  * See the License for the specific language governing permissions
36949  * and limitations under the License.
36950  *
36951  * When distributing Covered Code, include this CDDL HEADER in each
36952  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
36953  * If applicable, add the following below this CDDL HEADER, with the
36954  * fields enclosed by brackets "[]" replaced with your own identifying
36955  * information: Portions Copyright [yyyy] [name of copyright owner]
36956  *
36957  * CDDL HEADER END
36958  */
36959 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
36960 /*	  All Rights Reserved  	*/
36961 
36962 
36963 /*
36964  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
36965  * Use is subject to license terms.
36966  *
36967  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
36968  * Copyright 2016 Joyent, Inc.
36969  */
36970 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
36971 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
36972 /*
36973  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
36974  * Use is subject to license terms.
36975  *
36976  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
36977  */
36978 /*
36979  * Copyright (c) 1982, 1986 Regents of the University of California.
36980  * All rights reserved.
36981  *
36982  * Redistribution and use in source and binary forms are permitted
36983  * provided that this notice is preserved and that due credit is given
36984  * to the University of California at Berkeley. The name of the University
36985  * may not be used to endorse or promote products derived from this
36986  * software without specific prior written permission. This software
36987  * is provided ``as is'' without express or implied warranty.
36988  */
36989 
36990 /*
36991  * Constants and structures defined by the internet system,
36992  * according to following documents
36993  *
36994  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
36995  *	http://www.iana.org/assignments/protocol-numbers
36996  *	http://www.iana.org/assignments/port-numbers
36997  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
36998  *
36999  */
37000 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
37001 
37002 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 1
37003 /*
37004  * CDDL HEADER START
37005  *
37006  * The contents of this file are subject to the terms of the
37007  * Common Development and Distribution License (the "License").
37008  * You may not use this file except in compliance with the License.
37009  *
37010  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37011  * or http://www.opensolaris.org/os/licensing.
37012  * See the License for the specific language governing permissions
37013  * and limitations under the License.
37014  *
37015  * When distributing Covered Code, include this CDDL HEADER in each
37016  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37017  * If applicable, add the following below this CDDL HEADER, with the
37018  * fields enclosed by brackets "[]" replaced with your own identifying
37019  * information: Portions Copyright [yyyy] [name of copyright owner]
37020  *
37021  * CDDL HEADER END
37022  */
37023 /*
37024  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
37025  *
37026  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
37027  */
37028 
37029 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
37030 /*	  All Rights Reserved	*/
37031 
37032 /*
37033  * University Copyright- Copyright (c) 1982, 1986, 1988
37034  * The Regents of the University of California
37035  * All Rights Reserved
37036  *
37037  * University Acknowledgment- Portions of this document are derived from
37038  * software developed by the University of California, Berkeley, and its
37039  * contributors.
37040  */
37041 
37042 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
37043 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
37044 
37045 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
37046 /*
37047  * CDDL HEADER START
37048  *
37049  * The contents of this file are subject to the terms of the
37050  * Common Development and Distribution License (the "License").
37051  * You may not use this file except in compliance with the License.
37052  *
37053  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37054  * or http://www.opensolaris.org/os/licensing.
37055  * See the License for the specific language governing permissions
37056  * and limitations under the License.
37057  *
37058  * When distributing Covered Code, include this CDDL HEADER in each
37059  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37060  * If applicable, add the following below this CDDL HEADER, with the
37061  * fields enclosed by brackets "[]" replaced with your own identifying
37062  * information: Portions Copyright [yyyy] [name of copyright owner]
37063  *
37064  * CDDL HEADER END
37065  */
37066 
37067 /*
37068  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
37069  * Copyright 2016 Joyent, Inc.
37070  *
37071  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
37072  * Use is subject to license terms.
37073  */
37074 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
37075 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
37076 struct hostent {
37077  char *h_name; /* official name of host */
37078  char **h_aliases; /* alias list */
37079  int h_addrtype; /* host address type */
37080  int h_length; /* length of address */
37081  char **h_addr_list; /* list of addresses from name server */
37082 
37083 };
37084 
37085 
37086 /*
37087  * addrinfo introduced with IPv6 for Protocol-Independent Hostname
37088  * and Service Name Translation.
37089  */
37090 
37091 
37092 struct addrinfo {
37093  int ai_flags; /* AI_PASSIVE, AI_CANONNAME, ... */
37094  int ai_family; /* PF_xxx */
37095  int ai_socktype; /* SOCK_xxx */
37096  int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
37097 
37098 
37099 
37100  socklen_t ai_addrlen;
37101  char *ai_canonname; /* canonical name for hostname */
37102  struct sockaddr *ai_addr; /* binary address */
37103  struct addrinfo *ai_next; /* next structure in linked list */
37104 };
37105 
37106 /*
37107  * The flag 0x8000 is currently reserved for private use between libnsl and
37108  * libsocket. See lib/libsocket/inet/getaddrinfo.c for more information.
37109  */
37110 /* addrinfo flags */
37111 
37112 
37113 
37114 
37115 
37116 /* getipnodebyname() flags */
37117 
37118 
37119 
37120 
37121 
37122 /*
37123  * These were defined in RFC 2553 but not SUSv3
37124  * or RFC 3493 which obsoleted 2553.
37125  */
37126 
37127 
37128 
37129 /* addrinfo errors */
37130 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
37131 /* getnameinfo flags */
37132 
37133 
37134 
37135 
37136 
37137 
37138 
37139 /* Not listed in any standards document */
37140 
37141 
37142 
37143 /* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */
37144 
37145 
37146 
37147 
37148 
37149 /*
37150  * Scope delimit character
37151  */
37152 
37153 
37154 
37155 /*
37156  * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
37157  * and algorithms.
37158  */
37159 
37160 typedef struct ipsecalgent {
37161  char **a_names; /* algorithm names */
37162  int a_proto_num; /* protocol number */
37163  int a_alg_num; /* algorithm number */
37164  char *a_mech_name; /* encryption framework mechanism name */
37165  int *a_block_sizes; /* supported block sizes */
37166  int *a_key_sizes; /* supported key sizes */
37167  int a_key_increment; /* key size increment */
37168  int *a_mech_params; /* mechanism specific parameters */
37169  int a_alg_flags; /* algorithm flags */
37170 } ipsecalgent_t;
37171 
37172 /* well-known IPsec protocol numbers */
37173 
37174 
37175 
37176 
37177 
37178 /*
37179  * Assumption here is that a network number
37180  * fits in 32 bits -- probably a poor one.
37181  */
37182 struct netent {
37183  char *n_name; /* official name of net */
37184  char **n_aliases; /* alias list */
37185  int n_addrtype; /* net address type */
37186  in_addr_t n_net; /* network # */
37187 };
37188 
37189 struct protoent {
37190  char *p_name; /* official protocol name */
37191  char **p_aliases; /* alias list */
37192  int p_proto; /* protocol # */
37193 };
37194 
37195 struct servent {
37196  char *s_name; /* official service name */
37197  char **s_aliases; /* alias list */
37198  int s_port; /* port # */
37199  char *s_proto; /* protocol to use */
37200 };
37201 
37202 
37203 struct hostent *gethostbyname_r
37204  (const char *, struct hostent *, char *, int, int *h_errnop);
37205 struct hostent *gethostbyaddr_r
37206  (const char *, int, int, struct hostent *, char *, int, int *h_errnop);
37207 struct hostent *getipnodebyname(const char *, int, int, int *);
37208 struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
37209 void freehostent(struct hostent *);
37210 struct hostent *gethostent_r(struct hostent *, char *, int, int *h_errnop);
37211 
37212 struct servent *getservbyname_r
37213  (const char *name, const char *, struct servent *, char *, int);
37214 struct servent *getservbyport_r
37215  (int port, const char *, struct servent *, char *, int);
37216 struct servent *getservent_r(struct servent *, char *, int);
37217 
37218 struct netent *getnetbyname_r
37219  (const char *, struct netent *, char *, int);
37220 struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int);
37221 struct netent *getnetent_r(struct netent *, char *, int);
37222 
37223 struct protoent *getprotobyname_r
37224  (const char *, struct protoent *, char *, int);
37225 struct protoent *getprotobynumber_r
37226  (int, struct protoent *, char *, int);
37227 struct protoent *getprotoent_r(struct protoent *, char *, int);
37228 
37229 int getnetgrent_r(char **, char **, char **, char *, int);
37230 int innetgr(const char *, const char *, const char *, const char *);
37231 
37232 
37233 /* Old interfaces that return a pointer to a static area;  MT-unsafe */
37234 struct hostent *gethostbyname(const char *);
37235 struct hostent *gethostent(void);
37236 struct netent *getnetbyaddr(in_addr_t, int);
37237 struct netent *getnetbyname(const char *);
37238 struct netent *getnetent(void);
37239 struct protoent *getprotobyname(const char *);
37240 struct protoent *getprotobynumber(int);
37241 struct protoent *getprotoent(void);
37242 struct servent *getservbyname(const char *, const char *);
37243 struct servent *getservbyport(int, const char *);
37244 struct servent *getservent(void);
37245 
37246 /* gethostbyaddr() second argument is a size_t only in unix95/unix98 */
37247 
37248 struct hostent *gethostbyaddr(const void *, socklen_t, int);
37249 
37250 
37251 
37252 
37253 
37254 int endhostent(void);
37255 int endnetent(void);
37256 int endprotoent(void);
37257 int endservent(void);
37258 int sethostent(int);
37259 int setnetent(int);
37260 int setprotoent(int);
37261 int setservent(int);
37262 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
37263 int getaddrinfo(const char *,
37264    const char *,
37265    const struct addrinfo *,
37266    struct addrinfo **);
37267 void freeaddrinfo(struct addrinfo *);
37268 const char *gai_strerror(int);
37269 int getnameinfo(const struct sockaddr *,
37270    socklen_t, char *, socklen_t,
37271    char *, socklen_t, int);
37272 
37273 
37274 
37275 int getnetgrent(char **, char **, char **);
37276 int setnetgrent(const char *);
37277 int endnetgrent(void);
37278 int rcmd(char **, unsigned short,
37279  const char *, const char *, const char *, int *);
37280 int rcmd_af(char **, unsigned short,
37281  const char *, const char *, const char *, int *, int);
37282 int rresvport_af(int *, int);
37283 int rresvport_addr(int *, struct sockaddr_storage *);
37284 int rexec(char **, unsigned short,
37285  const char *, const char *, const char *, int *);
37286 int rexec_af(char **, unsigned short,
37287  const char *, const char *, const char *, int *, int);
37288 int rresvport(int *);
37289 int ruserok(const char *, int, const char *, const char *);
37290 /* BIND */
37291 struct hostent *gethostbyname2(const char *, int);
37292 void herror(const char *);
37293 const char *hstrerror(int);
37294 /* End BIND */
37295 
37296 /* IPsec algorithm prototype definitions */
37297 struct ipsecalgent *getipsecalgbyname(const char *, int, int *);
37298 struct ipsecalgent *getipsecalgbynum(int, int, int *);
37299 int getipsecprotobyname(const char *doi_name);
37300 char *getipsecprotobynum(int doi_domain);
37301 void freeipsecalgent(struct ipsecalgent *ptr);
37302 /* END IPsec algorithm prototype definitions */
37303 
37304 
37305 
37306 /*
37307  * Error return codes from gethostbyname() and gethostbyaddr()
37308  * (when using the resolver)
37309  */
37310 
37311 extern int h_errno;
37312 # 377 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
37313 /*
37314  * Error return codes from gethostbyname() and gethostbyaddr()
37315  * (left in extern int h_errno).
37316  */
37317 # 389 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
37318 /* BIND */
37319 
37320 
37321 /* End BIND */
37322 # 46 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
37323 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 1
37324 /*
37325  * CDDL HEADER START
37326  *
37327  * The contents of this file are subject to the terms of the
37328  * Common Development and Distribution License, Version 1.0 only
37329  * (the "License").  You may not use this file except in compliance
37330  * with the License.
37331  *
37332  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37333  * or http://www.opensolaris.org/os/licensing.
37334  * See the License for the specific language governing permissions
37335  * and limitations under the License.
37336  *
37337  * When distributing Covered Code, include this CDDL HEADER in each
37338  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37339  * If applicable, add the following below this CDDL HEADER, with the
37340  * fields enclosed by brackets "[]" replaced with your own identifying
37341  * information: Portions Copyright [yyyy] [name of copyright owner]
37342  *
37343  * CDDL HEADER END
37344  */
37345 /*
37346  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
37347  * Use is subject to license terms.
37348  */
37349 
37350 
37351 
37352 
37353 #pragma ident "%Z%%M%	%I%	%E% SMI"
37354 
37355 
37356 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
37357 /*
37358  * CDDL HEADER START
37359  *
37360  * The contents of this file are subject to the terms of the
37361  * Common Development and Distribution License (the "License").
37362  * You may not use this file except in compliance with the License.
37363  *
37364  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37365  * or http://www.opensolaris.org/os/licensing.
37366  * See the License for the specific language governing permissions
37367  * and limitations under the License.
37368  *
37369  * When distributing Covered Code, include this CDDL HEADER in each
37370  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37371  * If applicable, add the following below this CDDL HEADER, with the
37372  * fields enclosed by brackets "[]" replaced with your own identifying
37373  * information: Portions Copyright [yyyy] [name of copyright owner]
37374  *
37375  * CDDL HEADER END
37376  */
37377 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
37378 /*	  All Rights Reserved  	*/
37379 
37380 
37381 /*
37382  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
37383  * Use is subject to license terms.
37384  *
37385  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
37386  * Copyright 2016 Joyent, Inc.
37387  */
37388 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
37389 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
37390 /*
37391  * CDDL HEADER START
37392  *
37393  * The contents of this file are subject to the terms of the
37394  * Common Development and Distribution License, Version 1.0 only
37395  * (the "License").  You may not use this file except in compliance
37396  * with the License.
37397  *
37398  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37399  * or http://www.opensolaris.org/os/licensing.
37400  * See the License for the specific language governing permissions
37401  * and limitations under the License.
37402  *
37403  * When distributing Covered Code, include this CDDL HEADER in each
37404  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37405  * If applicable, add the following below this CDDL HEADER, with the
37406  * fields enclosed by brackets "[]" replaced with your own identifying
37407  * information: Portions Copyright [yyyy] [name of copyright owner]
37408  *
37409  * CDDL HEADER END
37410  */
37411 /*
37412  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
37413  * Use is subject to license terms.
37414  */
37415 
37416 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
37417 /*	  All Rights Reserved  	*/
37418 
37419 /*
37420  * University Copyright- Copyright (c) 1982, 1986, 1988
37421  * The Regents of the University of California
37422  * All Rights Reserved
37423  *
37424  * University Acknowledgment- Portions of this document are derived from
37425  * software developed by the University of California, Berkeley, and its
37426  * contributors.
37427  */
37428 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
37429 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 1
37430 /*
37431  * CDDL HEADER START
37432  *
37433  * The contents of this file are subject to the terms of the
37434  * Common Development and Distribution License, Version 1.0 only
37435  * (the "License").  You may not use this file except in compliance
37436  * with the License.
37437  *
37438  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37439  * or http://www.opensolaris.org/os/licensing.
37440  * See the License for the specific language governing permissions
37441  * and limitations under the License.
37442  *
37443  * When distributing Covered Code, include this CDDL HEADER in each
37444  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37445  * If applicable, add the following below this CDDL HEADER, with the
37446  * fields enclosed by brackets "[]" replaced with your own identifying
37447  * information: Portions Copyright [yyyy] [name of copyright owner]
37448  *
37449  * CDDL HEADER END
37450  */
37451 /*
37452  * Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
37453  * Use is subject to license terms.
37454  */
37455 
37456 
37457 
37458 
37459 #pragma ident "%Z%%M%	%I%	%E% SMI"
37460 
37461 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
37462 /*
37463  * CDDL HEADER START
37464  *
37465  * The contents of this file are subject to the terms of the
37466  * Common Development and Distribution License (the "License").
37467  * You may not use this file except in compliance with the License.
37468  *
37469  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37470  * or http://www.opensolaris.org/os/licensing.
37471  * See the License for the specific language governing permissions
37472  * and limitations under the License.
37473  *
37474  * When distributing Covered Code, include this CDDL HEADER in each
37475  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37476  * If applicable, add the following below this CDDL HEADER, with the
37477  * fields enclosed by brackets "[]" replaced with your own identifying
37478  * information: Portions Copyright [yyyy] [name of copyright owner]
37479  *
37480  * CDDL HEADER END
37481  */
37482 
37483 /*
37484  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
37485  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
37486  */
37487 
37488 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
37489 /*	  All Rights Reserved  	*/
37490 
37491 /*
37492  * University Copyright- Copyright (c) 1982, 1986, 1988
37493  * The Regents of the University of California
37494  * All Rights Reserved
37495  *
37496  * University Acknowledgment- Portions of this document are derived from
37497  * software developed by the University of California, Berkeley, and its
37498  * contributors.
37499  */
37500 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 2
37501 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h"
37502 typedef struct {
37503  char hostname[256];
37504  ushort_t port;
37505 } url_hport_t;
37506 
37507 typedef struct {
37508  boolean_t https;
37509  url_hport_t hport;
37510  char abspath[1024];
37511 } url_t;
37512 
37513 extern int url_parse_hostport(const char *, url_hport_t *, ushort_t);
37514 extern int url_parse(const char *, url_t *);
37515 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
37516 
37517 
37518 
37519 
37520 
37521 /* State information returned by http_conn_info() */
37522 typedef struct {
37523  url_t uri; /* URI last loaded */
37524  url_hport_t proxy; /* proxy, if any being used */
37525  boolean_t keepalive; /* Keepalive setting being used */
37526  uint_t read_timeout; /* Timeout to use for socket reads */
37527 } http_conninfo_t;
37528 
37529 
37530 /* Structure for version of the http file */
37531 typedef struct {
37532  uint_t maj_ver; /* Major version */
37533  uint_t min_ver; /* Minor version */
37534  uint_t micro_ver; /* Micro version */
37535 } boot_http_ver_t;
37536 
37537 /* Internal Libhttp errors */
37538 
37539 
37540 
37541     /* necessarily the underlying transport */
37542     /* connection). */
37543 
37544     /* error. */
37545 
37546 
37547 
37548     /* No matching entry */
37549 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h"
37550 /* Sources of errors */
37551 
37552 
37553 
37554 
37555 
37556 
37557 
37558 typedef struct {
37559  uint_t code; /* status code */
37560  char *statusmsg; /* status message */
37561  uint_t nresphdrs; /* number of response headers */
37562 } http_respinfo_t;
37563 
37564 
37565 typedef void *http_handle_t;
37566 
37567 boot_http_ver_t const *http_get_version(void);
37568 void http_set_p12_format(int);
37569 void http_set_verbose(boolean_t);
37570 int http_set_cipher_list(const char *);
37571 http_handle_t http_srv_init(const url_t *);
37572 int http_set_proxy(http_handle_t, const url_hport_t *);
37573 int http_set_keepalive(http_handle_t, boolean_t);
37574 int http_set_socket_read_timeout(http_handle_t, uint_t);
37575 int http_set_basic_auth(http_handle_t, const char *, const char *);
37576 int http_set_random_file(http_handle_t, const char *);
37577 int http_set_certificate_authority_file(const char *);
37578 int http_set_client_certificate_file(http_handle_t, const char *);
37579 int http_set_password(http_handle_t, const char *);
37580 int http_set_key_file_password(http_handle_t, const char *);
37581 int http_set_private_key_file(http_handle_t, const char *);
37582 
37583 int http_srv_connect(http_handle_t);
37584 int http_head_request(http_handle_t, const char *);
37585 int http_get_request(http_handle_t, const char *);
37586 int http_get_range_request(http_handle_t, const char *, offset_t, offset_t);
37587 void http_free_respinfo(http_respinfo_t *);
37588 int http_process_headers(http_handle_t, http_respinfo_t **);
37589 int http_process_part_headers(http_handle_t, http_respinfo_t **);
37590 char *http_get_header_value(http_handle_t, const char *);
37591 char *http_get_response_header(http_handle_t, uint_t);
37592 int http_read_body(http_handle_t, char *, size_t);
37593 int http_srv_disconnect(http_handle_t);
37594 int http_srv_close(http_handle_t);
37595 http_conninfo_t *http_get_conn_info(http_handle_t);
37596 int http_conn_is_https(http_handle_t, boolean_t *);
37597 ulong_t http_get_lasterr(http_handle_t, uint_t *);
37598 void http_decode_err(ulong_t, int *, int *, int *);
37599 char const *http_errorstr(uint_t, ulong_t);
37600 # 47 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
37601 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
37602 /*
37603  * CDDL HEADER START
37604  *
37605  * The contents of this file are subject to the terms of the
37606  * Common Development and Distribution License (the "License").
37607  * You may not use this file except in compliance with the License.
37608  *
37609  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37610  * or http://www.opensolaris.org/os/licensing.
37611  * See the License for the specific language governing permissions
37612  * and limitations under the License.
37613  *
37614  * When distributing Covered Code, include this CDDL HEADER in each
37615  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37616  * If applicable, add the following below this CDDL HEADER, with the
37617  * fields enclosed by brackets "[]" replaced with your own identifying
37618  * information: Portions Copyright [yyyy] [name of copyright owner]
37619  *
37620  * CDDL HEADER END
37621  */
37622 
37623 /*
37624  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
37625  * Use is subject to license terms.
37626  */
37627 
37628 
37629 
37630 
37631 
37632 /*
37633  * Module:	pkgerr.h
37634  * Description:
37635  *
37636  *   Implements error routines to handle the creation,
37637  *   management, and destruction of error objects, which
37638  *   hold error messages and codes returned from libpkg
37639  *   routines that support the objects defined herein.
37640  */
37641 
37642 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
37643 /*
37644  * CDDL HEADER START
37645  *
37646  * The contents of this file are subject to the terms of the
37647  * Common Development and Distribution License (the "License").
37648  * You may not use this file except in compliance with the License.
37649  *
37650  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37651  * or http://www.opensolaris.org/os/licensing.
37652  * See the License for the specific language governing permissions
37653  * and limitations under the License.
37654  *
37655  * When distributing Covered Code, include this CDDL HEADER in each
37656  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37657  * If applicable, add the following below this CDDL HEADER, with the
37658  * fields enclosed by brackets "[]" replaced with your own identifying
37659  * information: Portions Copyright [yyyy] [name of copyright owner]
37660  *
37661  * CDDL HEADER END
37662  */
37663 
37664 /*
37665  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
37666  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
37667  */
37668 
37669 /*	Copyright (c) 1988 AT&T	*/
37670 /*	  All Rights Reserved  	*/
37671 
37672 /*
37673  * User-visible pieces of the ANSI C standard I/O package.
37674  */
37675 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 2
37676 
37677 
37678 
37679 
37680 
37681 /*
37682  * Public Definitions
37683  */
37684 
37685 typedef enum {
37686  PKGERR_OK = 0,
37687  PKGERR_EXIST,
37688  PKGERR_READ,
37689  PKGERR_CORRUPT,
37690  PKGERR_PARSE,
37691  PKGERR_BADPASS,
37692  PKGERR_BADALIAS,
37693  PKGERR_INTERNAL,
37694  PKGERR_UNSUP,
37695  PKGERR_NOALIAS,
37696  PKGERR_NOALIASMATCH,
37697  PKGERR_MULTIPLE,
37698  PKGERR_INCOMPLETE,
37699  PKGERR_NOPRIVKEY,
37700  PKGERR_NOPUBKEY,
37701  PKGERR_NOCACERT,
37702  PKGERR_NOMEM,
37703  PKGERR_CHAIN,
37704  PKGERR_LOCKED,
37705  PKGERR_WRITE,
37706  PKGERR_UNLOCK,
37707  PKGERR_TIME,
37708  PKGERR_DUPLICATE,
37709  PKGERR_WEB,
37710  PKGERR_VERIFY
37711 } PKG_ERR_CODE;
37712 
37713 /*
37714  * Public Structures
37715  */
37716 
37717 /* external reference to PKG_ERR object (contents private) */
37718 typedef PKG_ERR_CODE pkg_err_t;
37719 
37720 typedef struct _pkg_err_struct PKG_ERR;
37721 
37722 /*
37723  * Public Methods
37724  */
37725 
37726 PKG_ERR *pkgerr_new();
37727 void pkgerr_add(PKG_ERR *, PKG_ERR_CODE, char *, ...);
37728 void pkgerr_clear(PKG_ERR *);
37729 int pkgerr_dump(PKG_ERR *, FILE *);
37730 int pkgerr_num(PKG_ERR *);
37731 char *pkgerr_get(PKG_ERR *, int);
37732 void pkgerr_free(PKG_ERR *);
37733 # 48 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
37734 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 1
37735 /*
37736  * CDDL HEADER START
37737  *
37738  * The contents of this file are subject to the terms of the
37739  * Common Development and Distribution License (the "License").
37740  * You may not use this file except in compliance with the License.
37741  *
37742  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37743  * or http://www.opensolaris.org/os/licensing.
37744  * See the License for the specific language governing permissions
37745  * and limitations under the License.
37746  *
37747  * When distributing Covered Code, include this CDDL HEADER in each
37748  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37749  * If applicable, add the following below this CDDL HEADER, with the
37750  * fields enclosed by brackets "[]" replaced with your own identifying
37751  * information: Portions Copyright [yyyy] [name of copyright owner]
37752  *
37753  * CDDL HEADER END
37754  */
37755 
37756 /*
37757  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
37758  * Use is subject to license terms.
37759  */
37760 
37761 
37762 
37763 
37764 
37765 /*
37766  * Module:	keystore.h
37767  * Description:	This module contains the structure definitions for processing
37768  *		package keystore files.
37769  */
37770 
37771 
37772 
37773 
37774 
37775 # 1 "/usr/include/openssl/evp.h" 1 3 4
37776 /* crypto/evp/evp.h */
37777 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
37778  * All rights reserved.
37779  *
37780  * This package is an SSL implementation written
37781  * by Eric Young (eay@cryptsoft.com).
37782  * The implementation was written so as to conform with Netscapes SSL.
37783  *
37784  * This library is free for commercial and non-commercial use as long as
37785  * the following conditions are aheared to.  The following conditions
37786  * apply to all code found in this distribution, be it the RC4, RSA,
37787  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
37788  * included with this distribution is covered by the same copyright terms
37789  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
37790  *
37791  * Copyright remains Eric Young's, and as such any Copyright notices in
37792  * the code are not to be removed.
37793  * If this package is used in a product, Eric Young should be given attribution
37794  * as the author of the parts of the library used.
37795  * This can be in the form of a textual message at program startup or
37796  * in documentation (online or textual) provided with the package.
37797  *
37798  * Redistribution and use in source and binary forms, with or without
37799  * modification, are permitted provided that the following conditions
37800  * are met:
37801  * 1. Redistributions of source code must retain the copyright
37802  *    notice, this list of conditions and the following disclaimer.
37803  * 2. Redistributions in binary form must reproduce the above copyright
37804  *    notice, this list of conditions and the following disclaimer in the
37805  *    documentation and/or other materials provided with the distribution.
37806  * 3. All advertising materials mentioning features or use of this software
37807  *    must display the following acknowledgement:
37808  *    "This product includes cryptographic software written by
37809  *     Eric Young (eay@cryptsoft.com)"
37810  *    The word 'cryptographic' can be left out if the rouines from the library
37811  *    being used are not cryptographic related :-).
37812  * 4. If you include any Windows specific code (or a derivative thereof) from
37813  *    the apps directory (application code) you must include an acknowledgement:
37814  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
37815  *
37816  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
37817  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37818  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
37819  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
37820  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37821  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37822  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37823  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37824  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37825  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37826  * SUCH DAMAGE.
37827  *
37828  * The licence and distribution terms for any publically available version or
37829  * derivative of this code cannot be changed.  i.e. this code cannot simply be
37830  * copied and put under another distribution licence
37831  * [including the GNU Public Licence.]
37832  */
37833 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
37834 # 1 "/usr/include/openssl/x509.h" 1 3 4
37835 /* crypto/x509/x509.h */
37836 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
37837  * All rights reserved.
37838  *
37839  * This package is an SSL implementation written
37840  * by Eric Young (eay@cryptsoft.com).
37841  * The implementation was written so as to conform with Netscapes SSL.
37842  *
37843  * This library is free for commercial and non-commercial use as long as
37844  * the following conditions are aheared to.  The following conditions
37845  * apply to all code found in this distribution, be it the RC4, RSA,
37846  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
37847  * included with this distribution is covered by the same copyright terms
37848  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
37849  *
37850  * Copyright remains Eric Young's, and as such any Copyright notices in
37851  * the code are not to be removed.
37852  * If this package is used in a product, Eric Young should be given attribution
37853  * as the author of the parts of the library used.
37854  * This can be in the form of a textual message at program startup or
37855  * in documentation (online or textual) provided with the package.
37856  *
37857  * Redistribution and use in source and binary forms, with or without
37858  * modification, are permitted provided that the following conditions
37859  * are met:
37860  * 1. Redistributions of source code must retain the copyright
37861  *    notice, this list of conditions and the following disclaimer.
37862  * 2. Redistributions in binary form must reproduce the above copyright
37863  *    notice, this list of conditions and the following disclaimer in the
37864  *    documentation and/or other materials provided with the distribution.
37865  * 3. All advertising materials mentioning features or use of this software
37866  *    must display the following acknowledgement:
37867  *    "This product includes cryptographic software written by
37868  *     Eric Young (eay@cryptsoft.com)"
37869  *    The word 'cryptographic' can be left out if the rouines from the library
37870  *    being used are not cryptographic related :-).
37871  * 4. If you include any Windows specific code (or a derivative thereof) from
37872  *    the apps directory (application code) you must include an acknowledgement:
37873  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
37874  *
37875  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
37876  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37877  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
37878  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
37879  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37880  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37881  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37882  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37883  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37884  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37885  * SUCH DAMAGE.
37886  *
37887  * The licence and distribution terms for any publically available version or
37888  * derivative of this code cannot be changed.  i.e. this code cannot simply be
37889  * copied and put under another distribution licence
37890  * [including the GNU Public Licence.]
37891  */
37892 /* ====================================================================
37893  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
37894  * ECDH support in OpenSSL originally developed by
37895  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
37896  */
37897 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
37898 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
37899 /*
37900  * CDDL HEADER START
37901  *
37902  * The contents of this file are subject to the terms of the
37903  * Common Development and Distribution License (the "License").
37904  * You may not use this file except in compliance with the License.
37905  *
37906  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37907  * or http://www.opensolaris.org/os/licensing.
37908  * See the License for the specific language governing permissions
37909  * and limitations under the License.
37910  *
37911  * When distributing Covered Code, include this CDDL HEADER in each
37912  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37913  * If applicable, add the following below this CDDL HEADER, with the
37914  * fields enclosed by brackets "[]" replaced with your own identifying
37915  * information: Portions Copyright [yyyy] [name of copyright owner]
37916  *
37917  * CDDL HEADER END
37918  */
37919 
37920 /*
37921  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
37922  * Use is subject to license terms.
37923  */
37924 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
37925 
37926 /* keystore structures */
37927 
37928 /* this opaque type represents a keystore */
37929 typedef void *keystore_handle_t;
37930 
37931 /* flags passed to open_keystore */
37932 
37933 /* opens keystore read-only.  Attempts to modify results in an error */
37934 
37935 
37936 /* opens keystore read-write */
37937 
37938 
37939 /*
37940  * tells open_keystore to fall back to app-generic paths in the case that
37941  * the app-specific paths do not exist.
37942  */
37943 
37944 
37945 /*
37946  * tells open_keystore to use the app-specific paths no matter what,
37947  * failing if they cannot be used for any reason.
37948  */
37949 
37950 
37951 /* masks off various types of flags */
37952 
37953 
37954 
37955 /* default is read-only, soft */
37956 
37957 
37958 
37959 /*
37960  * possible encoding formats used by the library, used
37961  * by print_cert
37962  */
37963 typedef enum {
37964  KEYSTORE_FORMAT_PEM,
37965  KEYSTORE_FORMAT_DER,
37966  KEYSTORE_FORMAT_TEXT
37967 } keystore_encoding_format_t;
37968 
37969 /*
37970  * structure passed back to password callback for determining how
37971  * to prompt for passphrase, and where to record errors
37972  */
37973 typedef struct {
37974  PKG_ERR *err;
37975 } keystore_passphrase_data;
37976 
37977 
37978 /* max length of a passphrase.  One could use a short story! */
37979 
37980 
37981 /* callback for collecting passphrase when open_keystore() is called */
37982 typedef int keystore_passphrase_cb(char *, int, int, void *);
37983 
37984 /* names of the individual files within the keystore path */
37985 
37986 
37987 
37988 
37989 /* keystore.c */
37990 extern int open_keystore(PKG_ERR *, char *, char *,
37991     keystore_passphrase_cb, long flags, keystore_handle_t *);
37992 
37993 extern int print_certs(PKG_ERR *, keystore_handle_t, char *,
37994     keystore_encoding_format_t, FILE *);
37995 
37996 extern int check_cert(PKG_ERR *, X509 *);
37997 
37998 extern int check_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *);
37999 
38000 extern int print_cert(PKG_ERR *, X509 *,
38001     keystore_encoding_format_t, char *, boolean_t, FILE *);
38002 
38003 extern int close_keystore(PKG_ERR *, keystore_handle_t,
38004     keystore_passphrase_cb);
38005 
38006 extern int merge_ca_cert(PKG_ERR *, X509 *, keystore_handle_t);
38007 extern int merge_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *,
38008     char *, keystore_handle_t);
38009 
38010 extern int delete_cert_and_keys(PKG_ERR *, keystore_handle_t,
38011     char *);
38012 
38013 extern int find_key_cert_pair(PKG_ERR *, keystore_handle_t,
38014     char *, EVP_PKEY **, X509 **);
38015 
38016 extern int find_ca_certs(PKG_ERR *, keystore_handle_t,
38017     struct stack_st_X509 **);
38018 
38019 extern int find_cl_certs(PKG_ERR *, keystore_handle_t,
38020     struct stack_st_X509 **);
38021 # 49 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
38022 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
38023 /*
38024  * CDDL HEADER START
38025  *
38026  * The contents of this file are subject to the terms of the
38027  * Common Development and Distribution License (the "License").
38028  * You may not use this file except in compliance with the License.
38029  *
38030  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38031  * or http://www.opensolaris.org/os/licensing.
38032  * See the License for the specific language governing permissions
38033  * and limitations under the License.
38034  *
38035  * When distributing Covered Code, include this CDDL HEADER in each
38036  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38037  * If applicable, add the following below this CDDL HEADER, with the
38038  * fields enclosed by brackets "[]" replaced with your own identifying
38039  * information: Portions Copyright [yyyy] [name of copyright owner]
38040  *
38041  * CDDL HEADER END
38042  */
38043 
38044 /*
38045  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
38046  * Use is subject to license terms.
38047  */
38048 # 35 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h"
38049 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
38050 /*
38051  * CDDL HEADER START
38052  *
38053  * The contents of this file are subject to the terms of the
38054  * Common Development and Distribution License (the "License").
38055  * You may not use this file except in compliance with the License.
38056  *
38057  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38058  * or http://www.opensolaris.org/os/licensing.
38059  * See the License for the specific language governing permissions
38060  * and limitations under the License.
38061  *
38062  * When distributing Covered Code, include this CDDL HEADER in each
38063  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38064  * If applicable, add the following below this CDDL HEADER, with the
38065  * fields enclosed by brackets "[]" replaced with your own identifying
38066  * information: Portions Copyright [yyyy] [name of copyright owner]
38067  *
38068  * CDDL HEADER END
38069  */
38070 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
38071 /*	  All Rights Reserved  	*/
38072 
38073 /*
38074  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
38075  * Use is subject to license terms.
38076  */
38077 # 36 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 2
38078 
38079 struct mergstat {
38080  unsigned setuid:1; /* pkgmap entry has setuid */
38081  unsigned setgid:1; /* ... and/or setgid bit set */
38082  unsigned contchg:1; /* contents of the files different */
38083  unsigned attrchg:1; /* attributes are different */
38084  unsigned shared:1; /* > 1 pkg associated with this */
38085  unsigned osetuid:1; /* installed set[ug]id process ... */
38086  unsigned osetgid:1; /* ... being overwritten by pkg. */
38087  unsigned rogue:1; /* conflicting file not owned by a package */
38088  unsigned dir2nondir:1; /* was a directory & now a non-directory */
38089  unsigned replace:1; /* merge makes no sense for this object pair */
38090  unsigned denied:1; /* for some reason this was not allowed in */
38091  unsigned preloaded:1; /* already checked in a prior pkg op */
38092  unsigned processed:1; /* already installed or removed */
38093  unsigned parentsyml2dir:1;
38094  /* parent directory changed from symlink to a directory */
38095 };
38096 
38097 /*
38098  * This is information required by pkgadd for fast operation. A
38099  * cfextra struct is tagged to each cfent structure requiring
38100  * processing. This is how we avoid some unneeded repetition. The
38101  * entries incorporating the word 'local' refer to the path that
38102  * gets us to the delivered package file. In other words, to install
38103  * a file we usually copy from 'local' to 'path' below. In the case
38104  * of a link, where no actual copying takes place, local is the source
38105  * of the link. Note that environment variables are not evaluated in
38106  * the locals unless they are links since the literal path is how
38107  * pkgadd finds the entry under the reloc directory.
38108  */
38109 struct cfextra {
38110  struct cfent cf_ent; /* basic contents file entry */
38111  struct mergstat mstat; /* merge status for installs */
38112  uint32_t fsys_value; /* fstab[] entry index */
38113  uint32_t fsys_base; /* actual base filesystem in fs_tab[] */
38114  char *client_path; /* the client-relative path */
38115  char *server_path; /* the server-relative path */
38116  char *map_path; /* as read from the pkgmap */
38117  char *client_local; /* client_relative local */
38118  char *server_local; /* server relative local */
38119 };
38120 # 50 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
38121 
38122 /*
38123  * The contents database file interface.
38124  */
38125 
38126 typedef struct pkg_server *PKGserver;
38127 
38128 /* Some commands modify the internal database: add them here */
38129 # 82 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
38130 typedef enum {
38131  INVALID, /* Not initialized */
38132  NEVER, /* Don't start, does check if it is running. */
38133  FLUSH_LOG, /* Run it once to incorporate the log. */
38134  RUN_ONCE, /* Run until the current client stops. */
38135  TIMEOUT, /* Run until a timeout occurs. */
38136  PERMANENT, /* Run until it is externally terminated. */
38137  DEFAULTMODE = TIMEOUT /* The default mode, must come last */
38138 } start_mode_t;
38139 
38140 typedef struct pkgcmd {
38141  int cmd;
38142  char buf[1];
38143 } pkgcmd_t;
38144 
38145 typedef struct pkgfilter {
38146  int cmd;
38147  int len;
38148  char buf[1];
38149 } pkgfilter_t;
38150 
38151 /*
38152  * Virtual File Protocol definitions
38153  */
38154 
38155 /*
38156  * flags associated with virtual file protocol operations; note that these flags
38157  * may only occupy the low order 16 bits of the 32-bit unsigned flag.
38158  */
38159 
38160 typedef unsigned long VFPFLAGS_T;
38161 # 121 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
38162 /* virtual file protocol object */
38163 
38164 typedef struct _vfp VFP_T;
38165 
38166 /* structure behind the virtual file protocol object */
38167 
38168 struct _vfp {
38169  FILE *_vfpFile; /* -> opened FILE */
38170  char *_vfpCurr; /* -> current byte to read/write */
38171  char *_vfpHighWater; /* -> last byte modified */
38172  char *_vfpEnd; /* -> last data byte */
38173  char *_vfpPath; /* -> path associated with FILE */
38174  char *_vfpStart; /* -> first data byte */
38175  void *_vfpExtra; /* undefined */
38176  size_t _vfpSize; /* size of mapped/allocated area */
38177  size_t _vfpMapSize; /* # mapped bytes */
38178  VFPFLAGS_T _vfpFlags; /* flags associated with vfp/data */
38179  int _vfpOverflow; /* non-zero if buffer write overflow */
38180  blkcnt_t _vfpCkStBlocks; /* checkpoint # blocks */
38181  dev_t _vfpCkDev; /* checkpoint device i.d. */
38182  ino_t _vfpCkIno; /* checkpoint inode # */
38183  off_t _vfpCkSize; /* checkpoint size */
38184  time_t _vfpCkMtime; /* checkpoint modification time */
38185 };
38186 
38187 /*
38188  * get highest modified byte (length) contained in vfp
38189  *
38190  * determine number of bytes to write - it will be the highest of:
38191  *  -- the current pointer into the file - this is updated whenever
38192  *	the location of the file is changed by a single byte
38193  *  -- the last "high water mark" - the last known location that
38194  *	was written to the file - updated only when the location
38195  *	of the file is directly changed - e.g. vfpSetCurrCharPtr,
38196  *	vfpTruncate, vfpRewind.
38197  * this reduces the "bookkeeping" that needs to be done to know
38198  * how many bytes to write out to the file - typically a file is
38199  * written sequentially so the current file pointer is sufficient
38200  * to determine how many bytes to write out.
38201  */
38202 # 169 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
38203 /*
38204  * increment current pointer by specified delta
38205  * if the delta exceeds the buffer size, set pointer to buffer end
38206  */
38207 # 185 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
38208 /* get the path associated with the vfp */
38209 
38210 
38211 /* get a string from the vfp into a fixed size buffer */
38212 # 207 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
38213 /* get number of bytes remaining to read */
38214 
38215 
38216 
38217 
38218 /* get number of bytes remaining to write */
38219 
38220 
38221 
38222 
38223 /* put current character and increment to next */
38224 
38225 
38226 
38227 
38228 
38229 
38230 /* put integer to current character and increment */
38231 
38232 
38233 /* put long to current character and increment */
38234 
38235 
38236 /* get current character and increment to next */
38237 
38238 
38239 /* get current character - do not increment */
38240 
38241 
38242 /* get pointer to current character */
38243 
38244 
38245 /* increment current character pointer */
38246 
38247 
38248 /* decrement current character pointer */
38249 
38250 
38251 /* get pointer to first data byte in buffer */
38252 
38253 
38254 /* get pointer to last data byte in buffer */
38255 
38256 
38257 /* set pointer to current character */
38258 
38259 
38260 
38261 
38262 
38263 
38264 /* set pointer to last data byte in buffer */
38265 # 267 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
38266 /* seek to end of file - one past last data byte in file */
38267 
38268 
38269 /* get number of bytes between current char and specified char */
38270 
38271 
38272 
38273 /* put string to current character and increment */
38274 # 284 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
38275 /* put fixed number of bytes to current character and increment */
38276 # 298 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
38277 /* put format one arg to current character and increment */
38278 
38279 
38280 
38281 
38282 
38283 
38284 
38285 struct dm_buf {
38286  char *text_buffer; /* start of allocated buffer */
38287  int offset; /* number of bytes into the text_buffer */
38288  int allocation; /* size of buffer in bytes */
38289 };
38290 
38291 /* This structure is used to hold a dynamically growing string */
38292 
38293 struct dstr {
38294  char *pc;
38295  int len;
38296  int max;
38297 };
38298 
38299 /* setmapmode() defines */
38300 # 330 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
38301 /* max length for printed attributes */
38302 
38303 
38304 /*
38305  * These three defines indicate that the prototype file contains a '?'
38306  * meaning do not specify this data in the pkgmap entry.
38307  */
38308 # 366 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
38309 /* Settings for network admin defaults */
38310 # 377 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
38311 /* package header magic tokens */
38312 
38313 
38314 
38315 /* name of security files */
38316 
38317 
38318 
38319 
38320 
38321 
38322 /*
38323  * The next three mean that no mode, owner or group was specified or that the
38324  * one specified is invalid for some reason. Sometimes this is an error in
38325  * which case it is generally converted to CUR* with a warning. Other times
38326  * it means "look it up" by stating the existing file system object pointred
38327  * to in the prototype file.
38328  */
38329 
38330 
38331 
38332 
38333 /* string comparitor abbreviators */
38334 
38335 
38336 
38337 
38338 
38339 
38340 extern FILE *epopen(char *cmd, char *mode);
38341 extern char **gpkglist(char *dir, char **pkg, char **catg);
38342 extern int is_not_valid_length(char **category);
38343 extern int is_not_valid_category(char **category, char *progname);
38344 extern int is_same_CATEGORY(char **category, char *installed_category);
38345 extern char **get_categories(char *catg_arg);
38346 
38347 extern void pkglist_cont(char *keyword);
38348 extern char **pkgalias(char *pkg);
38349 extern char *get_prog_name(void);
38350 extern char *set_prog_name(char *name);
38351 extern int averify(int fix, char *ftype, char *path, struct ainfo *ainfo);
38352 extern int ckparam(char *param, char *value);
38353 extern int ckvolseq(char *dir, int part, int nparts);
38354 extern int cverify(int fix, char *ftype, char *path, struct cinfo *cinfo,
38355    int allow_checksum);
38356 extern unsigned long compute_checksum(int *r_cksumerr, char *a_path);
38357 extern int fverify(int fix, char *ftype, char *path, struct ainfo *ainfo,
38358       struct cinfo *cinfo);
38359 extern char *getErrbufAddr(void);
38360 extern int getErrbufSize(void);
38361 extern char *getErrstr(void);
38362 extern void setErrstr(char *errstr);
38363 extern int devtype(char *alias, struct pkgdev *devp);
38364 extern int ds_totread; /* total number of parts read */
38365 extern int ds_close(int pkgendflg);
38366 extern int ds_findpkg(char *device, char *pkg);
38367 extern int ds_getinfo(char *string);
38368 extern int ds_getpkg(char *device, int n, char *dstdir);
38369 extern int ds_ginit(char *device);
38370 extern boolean_t ds_fd_open(void);
38371 extern int ds_init(char *device, char **pkg, char *norewind);
38372 extern int BIO_ds_dump_header(PKG_ERR *, BIO *);
38373 extern int BIO_ds_dump(PKG_ERR *, char *, BIO *);
38374 extern int BIO_dump_cmd(char *cmd, BIO *bio);
38375 extern int ds_next(char *, char *);
38376 extern int ds_readbuf(char *device);
38377 extern int epclose(FILE *pp);
38378 extern int esystem(char *cmd, int ifd, int ofd);
38379 extern int e_ExecCmdArray(int *r_status, char **r_results,
38380    char *a_inputFile, char *a_cmd, char **a_args);
38381 extern int e_ExecCmdList(int *r_status, char **r_results,
38382    char *a_inputFile, char *a_cmd, ...);
38383 extern int gpkgmap(struct cfent *ept, FILE *fp);
38384 extern int gpkgmapvfp(struct cfent *ept, VFP_T *fpv);
38385 extern void setmapmode(int mode_no);
38386 extern int isFdRemote(int a_fd);
38387 extern int isFstypeRemote(char *a_fstype);
38388 extern int isPathRemote(char *a_path);
38389 extern int iscpio(char *path, int *iscomp);
38390 extern int isdir(char *path);
38391 extern int isfile(char *dir, char *file);
38392 extern int fmkdir(char *a_path, int a_mode);
38393 extern int pkgexecl(char *filein, char *fileout, char *uname, char *gname,
38394    ...);
38395 extern int pkgexecv(char *filein, char *fileout, char *uname, char *gname,
38396    char *arg[]);
38397 extern int pkghead(char *device);
38398 extern int pkgmount(struct pkgdev *devp, char *pkg, int part, int nparts,
38399    int getvolflg);
38400 extern int pkgtrans(char *device1, char *device2, char **pkg,
38401    int options, keystore_handle_t, char *);
38402 extern int pkgumount(struct pkgdev *devp);
38403 extern int ppkgmap(struct cfent *ept, FILE *fp);
38404 extern int putcfile(struct cfent *ept, FILE *fp);
38405 extern int putcvfpfile(struct cfent *ept, VFP_T *vfp);
38406 extern int rrmdir(char *path);
38407 extern void set_memalloc_failure_func(void (*)(int));
38408 extern void *xmalloc(size_t size);
38409 extern void *xrealloc(void *ptr, size_t size);
38410 extern char *xstrdup(char *str);
38411 extern void set_passphrase_prompt(char *);
38412 extern void set_passphrase_passarg(char *);
38413 extern int pkg_passphrase_cb(char *, int, int, void *);
38414 
38415 extern int srchcfile(struct cfent *ept, char *path, PKGserver server);
38416 extern struct group *cgrgid(gid_t gid);
38417 extern struct group *cgrnam(char *nam);
38418 extern struct passwd *cpwnam(char *nam);
38419 extern struct passwd *cpwuid(uid_t uid);
38420 extern struct group *clgrgid(gid_t gid);
38421 extern struct group *clgrnam(char *nam);
38422 extern struct passwd *clpwnam(char *nam);
38423 extern struct passwd *clpwuid(uid_t uid);
38424 extern void basepath(char *path, char *basedir, char *ir);
38425 extern void canonize(char *file);
38426 extern void canonize_slashes(char *file);
38427 extern void checksum_off(void);
38428 extern void checksum_on(void);
38429 extern void cvtpath(char *path, char *copy);
38430 extern void ds_order(char *list[]);
38431 extern void ds_putinfo(char *buf, size_t);
38432 extern void ds_skiptoend(char *device);
38433 extern void ecleanup(void);
38434 /*PRINTFLIKE1*/
38435 extern void logerr(char *fmt, ...);
38436 extern int mappath(int flag, char *path);
38437 extern int mapvar(int flag, char *varname);
38438 /*PRINTFLIKE1*/
38439 extern void progerr(char *fmt, ...);
38440 extern void pkgerr(PKG_ERR *);
38441 extern void rpterr(void);
38442 extern void tputcfent(struct cfent *ept, FILE *fp);
38443 extern void set_nonABI_symlinks(void);
38444 extern int nonABI_symlinks(void);
38445 extern void disable_attribute_check(void);
38446 extern int get_disable_attribute_check(void);
38447 
38448 /* security.c */
38449 extern void sec_init(void);
38450 extern char *get_subject_display_name(X509 *);
38451 extern char *get_issuer_display_name(X509 *);
38452 extern char *get_serial_num(X509 *);
38453 extern char *get_fingerprint(X509 *, const EVP_MD *);
38454 extern int get_cert_chain(PKG_ERR *, X509 *, struct stack_st_X509 *,
38455     struct stack_st_X509 *, struct stack_st_X509 **);
38456 
38457 /* pkgstr.c */
38458 void pkgstrConvertUllToTimeString_r(unsigned long long a_time,
38459    char *a_buf, int a_bufLen);
38460 char *pkgstrConvertPathToBasename(char *a_path);
38461 char *pkgstrConvertPathToDirname(char *a_path);
38462 char *pkgstrDup(char *a_str);
38463 char *pkgstrLocatePathBasename(char *a_path);
38464 void pkgstrScaleNumericString(char *a_buf, unsigned long long scale);
38465 void pkgstrAddToken(char **a_old, char *a_new, char a_separator);
38466 boolean_t pkgstrContainsToken(char *a_string, char *a_token,
38467    char *a_separators);
38468 void pkgstrExpandTokens(char **a_old, char *a_string,
38469    char a_separator, char *a_separators);
38470 char *pkgstrGetToken(char *r_sep, char *a_string, int a_index,
38471    char *a_separators);
38472 void pkgstrGetToken_r(char *r_sep, char *a_string, int a_index,
38473    char *a_separators, char *a_buf, int a_bufLen);
38474 unsigned long pkgstrNumTokens(char *a_string, char *a_separators);
38475 char *pkgstrPrintf(char *a_format, ...);
38476 void pkgstrPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
38477 void pkgstrRemoveToken(char **r_string, char *a_token,
38478    char *a_separators, int a_index);
38479 void pkgstrRemoveLeadingWhitespace(char **a_str);
38480 /* vfpops.c */
38481 extern int vfpCheckpointFile(VFP_T **r_destVfp, VFP_T **a_vfp,
38482    char *a_path);
38483 extern int vfpCheckpointOpen(VFP_T **a_cvfp, VFP_T **r_vfp, char *a_path,
38484    char *a_mode, VFPFLAGS_T a_flags);
38485 extern int vfpClearModified(VFP_T *a_vfp);
38486 extern int vfpClose(VFP_T **r_vfp);
38487 extern int vfpGetModified(VFP_T *a_vfp);
38488 extern int vfpOpen(VFP_T **r_vfp, char *a_path, char *a_mode,
38489    VFPFLAGS_T a_flags);
38490 extern void vfpRewind(VFP_T *a_vfp);
38491 extern ssize_t vfpSafePwrite(int a_fildes, void *a_buf,
38492    size_t a_nbyte, off_t a_offset);
38493 extern ssize_t vfpSafeWrite(int a_fildes, void *a_buf, size_t a_nbyte);
38494 extern int vfpSetFlags(VFP_T *a_vfp, VFPFLAGS_T a_flags);
38495 extern int vfpSetModified(VFP_T *a_vfp);
38496 extern int vfpSetSize(VFP_T *a_vfp, size_t a_size);
38497 extern void vfpTruncate(VFP_T *a_vfp);
38498 extern int vfpWriteToFile(VFP_T *a_vfp, char *a_path);
38499 
38500 /* handlelocalfs.c */
38501 boolean_t enable_local_fs(void);
38502 boolean_t restore_local_fs(void);
38503 
38504 /* pkgserv.c */
38505 extern PKGserver pkgopenserver(const char *, const char *, boolean_t);
38506 extern void pkgcloseserver(PKGserver);
38507 extern int pkgcmd(PKGserver, void *, size_t, char **, size_t *,
38508     int *);
38509 extern boolean_t pkgsync_needed(const char *, const char *, boolean_t);
38510 extern int pkgsync(const char *, const char *, boolean_t);
38511 extern int pkgservercommitfile(VFP_T *, PKGserver);
38512 extern int pkgopenfilter(PKGserver server, const char *pkginst);
38513 extern void pkgclosefilter(PKGserver);
38514 extern char *pkggetentry(PKGserver, int *, int *);
38515 extern char *pkggetentry_named(PKGserver, const char *, int *,
38516     int *);
38517 extern void pkgserversetmode(start_mode_t);
38518 extern start_mode_t pkgservergetmode(void);
38519 extern start_mode_t pkgparsemode(const char *);
38520 extern char *pkgmodeargument(start_mode_t);
38521 # 57 "main.c" 2
38522 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 1
38523 /*
38524  * CDDL HEADER START
38525  *
38526  * The contents of this file are subject to the terms of the
38527  * Common Development and Distribution License (the "License").
38528  * You may not use this file except in compliance with the License.
38529  *
38530  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38531  * or http://www.opensolaris.org/os/licensing.
38532  * See the License for the specific language governing permissions
38533  * and limitations under the License.
38534  *
38535  * When distributing Covered Code, include this CDDL HEADER in each
38536  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38537  * If applicable, add the following below this CDDL HEADER, with the
38538  * fields enclosed by brackets "[]" replaced with your own identifying
38539  * information: Portions Copyright [yyyy] [name of copyright owner]
38540  *
38541  * CDDL HEADER END
38542  */
38543 
38544 /*
38545  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
38546  * Use is subject to license terms.
38547  */
38548 
38549 
38550 
38551 
38552 
38553 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
38554 /*
38555  * CDDL HEADER START
38556  *
38557  * The contents of this file are subject to the terms of the
38558  * Common Development and Distribution License (the "License").
38559  * You may not use this file except in compliance with the License.
38560  *
38561  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38562  * or http://www.opensolaris.org/os/licensing.
38563  * See the License for the specific language governing permissions
38564  * and limitations under the License.
38565  *
38566  * When distributing Covered Code, include this CDDL HEADER in each
38567  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38568  * If applicable, add the following below this CDDL HEADER, with the
38569  * fields enclosed by brackets "[]" replaced with your own identifying
38570  * information: Portions Copyright [yyyy] [name of copyright owner]
38571  *
38572  * CDDL HEADER END
38573  */
38574 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
38575 /*	  All Rights Reserved  	*/
38576 
38577 
38578 /*
38579  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
38580  * Use is subject to license terms.
38581  *
38582  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
38583  * Copyright 2016 Joyent, Inc.
38584  */
38585 # 32 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
38586 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h" 1
38587 /*
38588  * CDDL HEADER START
38589  *
38590  * The contents of this file are subject to the terms of the
38591  * Common Development and Distribution License (the "License").
38592  * You may not use this file except in compliance with the License.
38593  *
38594  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38595  * or http://www.opensolaris.org/os/licensing.
38596  * See the License for the specific language governing permissions
38597  * and limitations under the License.
38598  *
38599  * When distributing Covered Code, include this CDDL HEADER in each
38600  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38601  * If applicable, add the following below this CDDL HEADER, with the
38602  * fields enclosed by brackets "[]" replaced with your own identifying
38603  * information: Portions Copyright [yyyy] [name of copyright owner]
38604  *
38605  * CDDL HEADER END
38606  */
38607 
38608 /*
38609  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
38610  *
38611  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
38612  * Use is subject to license terms.
38613  * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
38614  * Copyright 2016 Toomas Soome <tsoome@me.com>
38615  */
38616 
38617 
38618 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
38619 /*	  All Rights Reserved  	*/
38620 
38621 
38622 
38623 
38624 
38625 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 1
38626 /*
38627  * CDDL HEADER START
38628  *
38629  * The contents of this file are subject to the terms of the
38630  * Common Development and Distribution License (the "License").
38631  * You may not use this file except in compliance with the License.
38632  *
38633  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38634  * or http://www.opensolaris.org/os/licensing.
38635  * See the License for the specific language governing permissions
38636  * and limitations under the License.
38637  *
38638  * When distributing Covered Code, include this CDDL HEADER in each
38639  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38640  * If applicable, add the following below this CDDL HEADER, with the
38641  * fields enclosed by brackets "[]" replaced with your own identifying
38642  * information: Portions Copyright [yyyy] [name of copyright owner]
38643  *
38644  * CDDL HEADER END
38645  */
38646 
38647 /*
38648  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
38649  * Use is subject to license terms.
38650  */
38651 
38652 
38653 
38654 
38655 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
38656 /*
38657  * CDDL HEADER START
38658  *
38659  * The contents of this file are subject to the terms of the
38660  * Common Development and Distribution License (the "License").
38661  * You may not use this file except in compliance with the License.
38662  *
38663  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38664  * or http://www.opensolaris.org/os/licensing.
38665  * See the License for the specific language governing permissions
38666  * and limitations under the License.
38667  *
38668  *
38669  * When distributing Covered Code, include this CDDL HEADER in each
38670  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38671  * If applicable, add the following below this CDDL HEADER, with the
38672  * fields enclosed by brackets "[]" replaced with your own identifying
38673  * information: Portions Copyright [yyyy] [name of copyright owner]
38674  *
38675  * CDDL HEADER END
38676  */
38677 
38678 /*
38679  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
38680  * Use is subject to license terms.
38681  * Copyright 2016 Joyent, Inc.
38682  */
38683 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
38684 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 1
38685 /*
38686  * CDDL HEADER START
38687  *
38688  * The contents of this file are subject to the terms of the
38689  * Common Development and Distribution License (the "License").
38690  * You may not use this file except in compliance with the License.
38691  *
38692  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38693  * or http://www.opensolaris.org/os/licensing.
38694  * See the License for the specific language governing permissions
38695  * and limitations under the License.
38696  *
38697  * When distributing Covered Code, include this CDDL HEADER in each
38698  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38699  * If applicable, add the following below this CDDL HEADER, with the
38700  * fields enclosed by brackets "[]" replaced with your own identifying
38701  * information: Portions Copyright [yyyy] [name of copyright owner]
38702  *
38703  * CDDL HEADER END
38704  */
38705 /*
38706  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
38707  * Use is subject to license terms.
38708  * Copyright 2015 Nexenta Systems, Inc.
38709  */
38710 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
38711 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
38712 /*
38713  * CDDL HEADER START
38714  *
38715  * The contents of this file are subject to the terms of the
38716  * Common Development and Distribution License (the "License").
38717  * You may not use this file except in compliance with the License.
38718  *
38719  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38720  * or http://www.opensolaris.org/os/licensing.
38721  * See the License for the specific language governing permissions
38722  * and limitations under the License.
38723  *
38724  *
38725  * When distributing Covered Code, include this CDDL HEADER in each
38726  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38727  * If applicable, add the following below this CDDL HEADER, with the
38728  * fields enclosed by brackets "[]" replaced with your own identifying
38729  * information: Portions Copyright [yyyy] [name of copyright owner]
38730  *
38731  * CDDL HEADER END
38732  */
38733 
38734 /*
38735  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
38736  * Use is subject to license terms.
38737  * Copyright 2016 Joyent, Inc.
38738  */
38739 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
38740 
38741 
38742 
38743 
38744 
38745 /*
38746  * Miscellaneous defines
38747  */
38748 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
38749 /*
38750  * Reserve two cylinders on SCSI disks.
38751  * One is for the backup disk label and the other is for the deviceid.
38752  *
38753  * IPI disks only reserve one cylinder, but they will go away soon.
38754  * CDROMs do not reserve any cylinders.
38755  */
38756 
38757 
38758 /*
38759  * Format of a Sun disk label.
38760  * Resides in cylinder 0, head 0, sector 0.
38761  *
38762  * sizeof (struct dk_label) should be 512 (the current sector size),
38763  * but should the sector size increase, this structure should remain
38764  * at the beginning of the sector.
38765  */
38766 
38767 
38768 
38769 
38770 
38771 
38772 
38773 typedef daddr_t blkaddr_t;
38774 typedef daddr32_t blkaddr32_t;
38775 
38776 
38777 
38778 /*
38779  * partition headers:  section 1
38780  * Returned in struct dk_allmap by ioctl DKIOC[SG]APART (dkio(7I))
38781  */
38782 struct dk_map {
38783  blkaddr_t dkl_cylno; /* starting cylinder */
38784  blkaddr_t dkl_nblk; /* number of blocks;  if == 0, */
38785      /* partition is undefined */
38786 };
38787 
38788 /*
38789  * partition headers:  section 1
38790  * Fixed size for on-disk dk_label
38791  */
38792 struct dk_map32 {
38793  blkaddr32_t dkl_cylno; /* starting cylinder */
38794  blkaddr32_t dkl_nblk; /* number of blocks;  if == 0, */
38795      /* partition is undefined */
38796 };
38797 
38798 /*
38799  * partition headers:  section 2,
38800  * brought over from AT&T SVr4 vtoc structure.
38801  */
38802 struct dk_map2 {
38803  uint16_t p_tag; /* ID tag of partition */
38804  uint16_t p_flag; /* permission flag */
38805 };
38806 
38807 struct dkl_partition {
38808  uint16_t p_tag; /* ID tag of partition */
38809  uint16_t p_flag; /* permision flags */
38810  blkaddr32_t p_start; /* start sector no of partition */
38811  blkaddr32_t p_size; /* # of blocks in partition */
38812 };
38813 
38814 
38815 /*
38816  * VTOC inclusions from AT&T SVr4
38817  * Fixed sized types for on-disk VTOC
38818  */
38819 
38820 struct dk_vtoc {
38821 
38822  uint32_t v_bootinfo[3]; /* info for mboot (unsupported) */
38823  uint32_t v_sanity; /* to verify vtoc sanity */
38824  uint32_t v_version; /* layout version */
38825  char v_volume[8]; /* volume name */
38826  uint16_t v_sectorsz; /* sector size in bytes */
38827  uint16_t v_nparts; /* number of partitions */
38828  uint32_t v_reserved[10]; /* free space */
38829  struct dkl_partition v_part[16]; /* partition headers */
38830  time32_t timestamp[16]; /* partition timestamp (unsupported) */
38831  char v_asciilabel[128]; /* for compatibility    */
38832 # 154 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
38833 };
38834 
38835 /*
38836  * define the amount of disk label padding needed to make
38837  * the entire structure occupy 512 bytes.
38838  */
38839 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
38840 struct dk_label {
38841 
38842  struct dk_vtoc dkl_vtoc; /* vtoc inclusions from AT&T SVr4 */
38843  uint32_t dkl_pcyl; /* # of physical cylinders */
38844  uint32_t dkl_ncyl; /* # of data cylinders */
38845  uint16_t dkl_acyl; /* # of alternate cylinders */
38846  uint16_t dkl_bcyl; /* cyl offset (for fixed head area) */
38847  uint32_t dkl_nhead; /* # of heads */
38848  uint32_t dkl_nsect; /* # of data sectors per track */
38849  uint16_t dkl_intrlv; /* interleave factor */
38850  uint16_t dkl_skew; /* skew factor */
38851  uint16_t dkl_apc; /* alternates per cyl (SCSI only)   */
38852  uint16_t dkl_rpm; /* revolutions per minute */
38853  uint16_t dkl_write_reinstruct; /* # sectors to skip, writes */
38854  uint16_t dkl_read_reinstruct; /* # sectors to skip, reads  */
38855  uint16_t dkl_extra[4]; /* for compatible expansion */
38856  char dkl_pad[(512 - ((sizeof (struct dk_vtoc) + (4 * sizeof (uint32_t)) + (12 * sizeof (uint16_t)) + (2 * (sizeof (uint16_t))))))]; /* unused part of 512 bytes */
38857 # 217 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
38858  uint16_t dkl_magic; /* identifies this label format */
38859  uint16_t dkl_cksum; /* xor checksum of sector */
38860 };
38861 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
38862 struct fk_label { /* DOS floppy label */
38863  uchar_t fkl_type;
38864  uchar_t fkl_magich;
38865  uchar_t fkl_magicl;
38866  uchar_t filler;
38867 };
38868 
38869 /*
38870  * Layout of stored fabricated device id  (on-disk)
38871  */
38872 
38873 
38874 
38875 
38876 
38877 struct dk_devid {
38878  uchar_t dkd_rev_hi; /* revision (MSB) */
38879  uchar_t dkd_rev_lo; /* revision (LSB) */
38880  uchar_t dkd_flags; /* flags (not used yet) */
38881  uchar_t dkd_devid[((512) - ((sizeof (uchar_t) * 7)))]; /* devid stored here */
38882  uchar_t dkd_checksum3; /* checksum (MSB) */
38883  uchar_t dkd_checksum2;
38884  uchar_t dkd_checksum1;
38885  uchar_t dkd_checksum0; /* checksum (LSB) */
38886 };
38887 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h" 2
38888 
38889 
38890 
38891 
38892 
38893 /*
38894  *	Note:  the VTOC is not implemented fully, nor in the manner
38895  *	that AT&T implements it.  AT&T puts the vtoc structure
38896  *	into a sector, usually the second sector (pdsector is first).
38897  *
38898  *	Sun incorporates the tag, flag, version, and volume vtoc fields into
38899  *	its Disk Label, which already has some vtoc-equivalent fields.
38900  *	Upon reading the vtoc with read_vtoc(), the following exceptions
38901  *	occur:
38902  *		v_bootinfo [all]	returned as zero
38903  *		v_sanity		returned as VTOC_SANE
38904  *						if Disk Label was sane
38905  *		v_sectorsz		returned as 512
38906  *		v_reserved [all]	retunred as zero
38907  *		timestamp [all]		returned as zero
38908  *
38909  *	See  dklabel.h, read_vtoc(), and write_vtoc().
38910  */
38911 
38912 
38913      /* (from dkio.h) */
38914 
38915 
38916 
38917 
38918 
38919 /*
38920  * Partition identification tags
38921  */
38922 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h"
38923 /* Tags for EFI/GPT labels */
38924 
38925 
38926 
38927 
38928 
38929 
38930 /*
38931  * Partition permission flags
38932  */
38933 
38934 
38935 
38936 /*
38937  * error codes for reading & writing vtoc
38938  */
38939 
38940 
38941 
38942 
38943 
38944 
38945 
38946 struct partition {
38947  ushort_t p_tag; /* ID tag of partition */
38948  ushort_t p_flag; /* permission flags */
38949  daddr_t p_start; /* start sector no of partition */
38950  long p_size; /* # of blocks in partition */
38951 };
38952 
38953 struct vtoc {
38954  unsigned long v_bootinfo[3]; /* info needed by mboot (unsupported) */
38955  unsigned long v_sanity; /* to verify vtoc sanity */
38956  unsigned long v_version; /* layout version */
38957  char v_volume[8]; /* volume name */
38958  ushort_t v_sectorsz; /* sector size in bytes */
38959  ushort_t v_nparts; /* number of partitions */
38960  unsigned long v_reserved[10]; /* free space */
38961  struct partition v_part[16]; /* partition headers */
38962  time_t timestamp[16]; /* partition timestamp (unsupported) */
38963  char v_asciilabel[128]; /* for compatibility */
38964 };
38965 
38966 struct extpartition {
38967  ushort_t p_tag; /* ID tag of partition */
38968  ushort_t p_flag; /* permission flags */
38969  ushort_t p_pad[2];
38970  diskaddr_t p_start; /* start sector no of partition */
38971  diskaddr_t p_size; /* # of blocks in partition */
38972 };
38973 
38974 
38975 struct extvtoc {
38976  uint64_t v_bootinfo[3]; /* info needed by mboot (unsupported) */
38977  uint64_t v_sanity; /* to verify vtoc sanity */
38978  uint64_t v_version; /* layout version */
38979  char v_volume[8]; /* volume name */
38980  ushort_t v_sectorsz; /* sector size in bytes */
38981  ushort_t v_nparts; /* number of partitions */
38982  ushort_t pad[2];
38983  uint64_t v_reserved[10];
38984  struct extpartition v_part[16]; /* partition headers */
38985  uint64_t timestamp[16]; /* partition timestamp (unsupported) */
38986  char v_asciilabel[128]; /* for compatibility */
38987 };
38988 # 334 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h"
38989 /*
38990  * These defines are the mode parameter for the checksum routines.
38991  */
38992 
38993 
38994 
38995 extern int read_vtoc(int, struct vtoc *);
38996 extern int write_vtoc(int, struct vtoc *);
38997 extern int read_extvtoc(int, struct extvtoc *);
38998 extern int write_extvtoc(int, struct extvtoc *);
38999 # 33 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
39000 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
39001 /*
39002  * CDDL HEADER START
39003  *
39004  * The contents of this file are subject to the terms of the
39005  * Common Development and Distribution License (the "License").
39006  * You may not use this file except in compliance with the License.
39007  *
39008  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39009  * or http://www.opensolaris.org/os/licensing.
39010  * See the License for the specific language governing permissions
39011  * and limitations under the License.
39012  *
39013  * When distributing Covered Code, include this CDDL HEADER in each
39014  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39015  * If applicable, add the following below this CDDL HEADER, with the
39016  * fields enclosed by brackets "[]" replaced with your own identifying
39017  * information: Portions Copyright [yyyy] [name of copyright owner]
39018  *
39019  * CDDL HEADER END
39020  */
39021 
39022 /*
39023  * Copyright (c) 2013 Gary Mills
39024  *
39025  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
39026  * Use is subject to license terms.
39027  */
39028 
39029 /*	Copyright (c) 1988 AT&T	*/
39030 /*	  All Rights Reserved  	*/
39031 # 34 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
39032 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
39033 /*
39034  * CDDL HEADER START
39035  *
39036  * The contents of this file are subject to the terms of the
39037  * Common Development and Distribution License (the "License").
39038  * You may not use this file except in compliance with the License.
39039  *
39040  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39041  * or http://www.opensolaris.org/os/licensing.
39042  * See the License for the specific language governing permissions
39043  * and limitations under the License.
39044  *
39045  * When distributing Covered Code, include this CDDL HEADER in each
39046  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39047  * If applicable, add the following below this CDDL HEADER, with the
39048  * fields enclosed by brackets "[]" replaced with your own identifying
39049  * information: Portions Copyright [yyyy] [name of copyright owner]
39050  *
39051  * CDDL HEADER END
39052  */
39053 
39054 /*
39055  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
39056  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
39057  */
39058 
39059 /*	Copyright (c) 1988 AT&T	*/
39060 /*	  All Rights Reserved  	*/
39061 
39062 /*
39063  * User-visible pieces of the ANSI C standard I/O package.
39064  */
39065 # 35 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
39066 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
39067 /*
39068  * CDDL HEADER START
39069  *
39070  * The contents of this file are subject to the terms of the
39071  * Common Development and Distribution License (the "License").
39072  * You may not use this file except in compliance with the License.
39073  *
39074  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39075  * or http://www.opensolaris.org/os/licensing.
39076  * See the License for the specific language governing permissions
39077  * and limitations under the License.
39078  *
39079  * When distributing Covered Code, include this CDDL HEADER in each
39080  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39081  * If applicable, add the following below this CDDL HEADER, with the
39082  * fields enclosed by brackets "[]" replaced with your own identifying
39083  * information: Portions Copyright [yyyy] [name of copyright owner]
39084  *
39085  * CDDL HEADER END
39086  */
39087 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
39088 /*	  All Rights Reserved  	*/
39089 
39090 /*
39091  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
39092  * Use is subject to license terms.
39093  */
39094 # 36 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
39095 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
39096 /*
39097  * CDDL HEADER START
39098  *
39099  * The contents of this file are subject to the terms of the
39100  * Common Development and Distribution License, Version 1.0 only
39101  * (the "License").  You may not use this file except in compliance
39102  * with the License.
39103  *
39104  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39105  * or http://www.opensolaris.org/os/licensing.
39106  * See the License for the specific language governing permissions
39107  * and limitations under the License.
39108  *
39109  * When distributing Covered Code, include this CDDL HEADER in each
39110  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39111  * If applicable, add the following below this CDDL HEADER, with the
39112  * fields enclosed by brackets "[]" replaced with your own identifying
39113  * information: Portions Copyright [yyyy] [name of copyright owner]
39114  *
39115  * CDDL HEADER END
39116  */
39117 /*
39118  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
39119  */
39120 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
39121 /*	  All Rights Reserved  	*/
39122 # 37 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
39123 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/valtools.h" 1
39124 /*
39125  * CDDL HEADER START
39126  *
39127  * The contents of this file are subject to the terms of the
39128  * Common Development and Distribution License, Version 1.0 only
39129  * (the "License").  You may not use this file except in compliance
39130  * with the License.
39131  *
39132  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39133  * or http://www.opensolaris.org/os/licensing.
39134  * See the License for the specific language governing permissions
39135  * and limitations under the License.
39136  *
39137  * When distributing Covered Code, include this CDDL HEADER in each
39138  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39139  * If applicable, add the following below this CDDL HEADER, with the
39140  * fields enclosed by brackets "[]" replaced with your own identifying
39141  * information: Portions Copyright [yyyy] [name of copyright owner]
39142  *
39143  * CDDL HEADER END
39144  */
39145 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
39146 /*	  All Rights Reserved  	*/
39147 
39148 
39149 
39150 
39151 
39152 #pragma ident "%Z%%M%	%I%	%E% SMI"
39153 
39154 
39155 
39156 
39157 
39158 struct _choice_ {
39159  char *token;
39160  char *text;
39161  struct _choice_ *next;
39162 };
39163 
39164 struct _menu_ {
39165  char *label;
39166  int attr;
39167  short longest;
39168  short nchoices;
39169  struct _choice_
39170   *choice;
39171  char **invis;
39172 };
39173 
39174 typedef struct _menu_ CKMENU;
39175 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
39176 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
39177 /*
39178  * CDDL HEADER START
39179  *
39180  * The contents of this file are subject to the terms of the
39181  * Common Development and Distribution License (the "License").
39182  * You may not use this file except in compliance with the License.
39183  *
39184  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39185  * or http://www.opensolaris.org/os/licensing.
39186  * See the License for the specific language governing permissions
39187  * and limitations under the License.
39188  *
39189  * When distributing Covered Code, include this CDDL HEADER in each
39190  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39191  * If applicable, add the following below this CDDL HEADER, with the
39192  * fields enclosed by brackets "[]" replaced with your own identifying
39193  * information: Portions Copyright [yyyy] [name of copyright owner]
39194  *
39195  * CDDL HEADER END
39196  */
39197 
39198 /*
39199  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
39200  * Use is subject to license terms.
39201  */
39202 
39203 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
39204 /* All Rights Reserved */
39205 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
39206 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
39207 /*
39208  * CDDL HEADER START
39209  *
39210  * The contents of this file are subject to the terms of the
39211  * Common Development and Distribution License (the "License").
39212  * You may not use this file except in compliance with the License.
39213  *
39214  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39215  * or http://www.opensolaris.org/os/licensing.
39216  * See the License for the specific language governing permissions
39217  * and limitations under the License.
39218  *
39219  * When distributing Covered Code, include this CDDL HEADER in each
39220  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39221  * If applicable, add the following below this CDDL HEADER, with the
39222  * fields enclosed by brackets "[]" replaced with your own identifying
39223  * information: Portions Copyright [yyyy] [name of copyright owner]
39224  *
39225  * CDDL HEADER END
39226  */
39227 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
39228 /*	  All Rights Reserved  	*/
39229 
39230 
39231 /*
39232  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
39233  * Use is subject to license terms.
39234  *
39235  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
39236  * Copyright 2016 Joyent, Inc.
39237  */
39238 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
39239 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
39240 /*
39241  * CDDL HEADER START
39242  *
39243  * The contents of this file are subject to the terms of the
39244  * Common Development and Distribution License (the "License").
39245  * You may not use this file except in compliance with the License.
39246  *
39247  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39248  * or http://www.opensolaris.org/os/licensing.
39249  * See the License for the specific language governing permissions
39250  * and limitations under the License.
39251  *
39252  * When distributing Covered Code, include this CDDL HEADER in each
39253  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39254  * If applicable, add the following below this CDDL HEADER, with the
39255  * fields enclosed by brackets "[]" replaced with your own identifying
39256  * information: Portions Copyright [yyyy] [name of copyright owner]
39257  *
39258  * CDDL HEADER END
39259  */
39260 
39261 /*
39262  * Copyright (c) 2013 Gary Mills
39263  *
39264  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
39265  * Use is subject to license terms.
39266  */
39267 
39268 /*	Copyright (c) 1988 AT&T	*/
39269 /*	  All Rights Reserved  	*/
39270 # 40 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
39271 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
39272 /*
39273  * CDDL HEADER START
39274  *
39275  * The contents of this file are subject to the terms of the
39276  * Common Development and Distribution License (the "License").
39277  * You may not use this file except in compliance with the License.
39278  *
39279  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39280  * or http://www.opensolaris.org/os/licensing.
39281  * See the License for the specific language governing permissions
39282  * and limitations under the License.
39283  *
39284  * When distributing Covered Code, include this CDDL HEADER in each
39285  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39286  * If applicable, add the following below this CDDL HEADER, with the
39287  * fields enclosed by brackets "[]" replaced with your own identifying
39288  * information: Portions Copyright [yyyy] [name of copyright owner]
39289  *
39290  * CDDL HEADER END
39291  */
39292 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
39293 /*	  All Rights Reserved  	*/
39294 
39295 /*
39296  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
39297  * Use is subject to license terms.
39298  */
39299 # 41 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
39300 
39301 /* Settings for procedure scripts */
39302 
39303 
39304 
39305 
39306 
39307 
39308 /* Settings for class action scripts */
39309 
39310 
39311 
39312 
39313 
39314 /* Settings for non-privileged scripts */
39315 # 64 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
39316 /* Settings for admin "rscriptalt" option */
39317 # 80 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
39318 /* Additional cfent/cfextra codes. */
39319 
39320 
39321 
39322 /* This holds admin file data. */
39323 struct admin {
39324  char *mail;
39325  char *instance;
39326  char *partial;
39327  char *runlevel;
39328  char *idepend;
39329  char *rdepend;
39330  char *space;
39331  char *setuid;
39332  char *conflict;
39333  char *action;
39334  char *networktimeout;
39335  char *networkretries;
39336  char *authentication;
39337  char *keystore;
39338  char *proxy;
39339  char *basedir;
39340  char *rscriptalt;
39341 };
39342 
39343 /*
39344  * This table details the status of all filesystems available to the target
39345  * host.
39346  */
39347 struct fstable {
39348  char *name; /* name of filesystem, (mount point) */
39349  int namlen; /* The length of the name (mountpoint) */
39350  fsblkcnt_t bsize; /* fundamental file system block size */
39351  fsblkcnt_t frsize; /* file system fragment size */
39352  fsblkcnt_t bfree; /* total # of free blocks */
39353  fsblkcnt_t bused; /* total # of used blocks */
39354  fsblkcnt_t ffree; /* total # of free file nodes */
39355  fsblkcnt_t fused; /* total # of used file nodes */
39356  char *fstype; /* type of filesystem - nfs, lo, ... */
39357  char *remote_name; /* client's mounted filesystem */
39358  unsigned writeable:1; /* access permission */
39359  unsigned write_tested:1; /* access permission fully tested */
39360  unsigned remote:1; /* on a remote filesystem */
39361  unsigned mounted:1; /* actually mounted right now */
39362  unsigned srvr_map:1; /* use server_map() */
39363  unsigned cl_mounted:1; /* mounted in client space */
39364  unsigned mnt_failed:1; /* attempt to loopback mount failed */
39365  unsigned served:1; /* filesystem comes from a server */
39366 };
39367 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
39368 # 47 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h"
39369 /*
39370  * ckdate.c
39371  */
39372 extern int ckdate_err (char *fmt, char *error);
39373 extern int ckdate_hlp (char *fmt, char *help);
39374 extern int ckdate_val (char *fmt, char *input);
39375 extern int ckdate (char *date, char *fmt, char *defstr, char *error, char *help, char *prompt);
39376 
39377 
39378 /*
39379  * ckgid.c
39380  */
39381 extern int ckgid_dsp (void);
39382 extern int ckgid_val (char *grpnm);
39383 extern int ckgrpfile (void);
39384 extern void ckgid_err (int disp, char *error);
39385 extern void ckgid_hlp (int disp, char *help);
39386 extern int ckgid (char *gid, short disp, char *defstr, char *error, char *help, char *prompt);
39387 
39388 
39389 /*
39390  * ckint.c
39391  */
39392 extern int ckint_val (char *value, short base);
39393 extern void ckint_err (short base, char *error);
39394 extern void ckint_hlp (short base, char *help);
39395 extern int ckint (long *intval, short base, char *defstr, char *error, char *help, char *prompt);
39396 
39397 
39398 /*
39399  * ckitem.c
39400  */
39401 extern CKMENU *allocmenu (char *label, int attr);
39402 extern void ckitem_err (CKMENU *menup, char *error);
39403 extern void ckitem_hlp (CKMENU *menup, char *help);
39404 extern int ckitem (CKMENU *menup, char *item[], short max, char *defstr, char *error, char *help, char *prompt);
39405 
39406 
39407 extern int setitem (CKMENU *menup, char *choice);
39408 extern int setinvis (CKMENU *menup, char *choice);
39409 extern void printmenu (CKMENU *menup);
39410 
39411 /*
39412  * ckkeywd.c
39413  */
39414 extern int ckkeywd (char *strval, char *keyword[], char *defstr, char *error, char *help, char *prompt);
39415 
39416 
39417 /*
39418  * ckpath.c
39419  */
39420 extern int ckpath_stx (int pflags);
39421 extern int ckpath_val (char *path, int pflags);
39422 extern void ckpath_err (int pflags, char *error, char *input);
39423 extern void ckpath_hlp (int pflags, char *help);
39424 extern int ckpath (char *pathval, int pflags, char *defstr, char *error, char *help, char *prompt);
39425 
39426 
39427 /*
39428  * ckrange.c
39429  */
39430 extern void ckrange_err (long lower, long upper, int base, char *error);
39431 
39432 extern void ckrange_hlp (long lower, long upper, int base, char *help);
39433 extern int ckrange_val (long lower, long upper, int base, char *input);
39434 
39435 extern int ckrange (long *rngval, long lower, long upper, short base, char *defstr, char *error, char *help, char *prompt);
39436 
39437 
39438 
39439 /*
39440  * ckstr.c
39441  */
39442 extern int ckstr_val (char *regexp[], int length, char *input);
39443 extern void ckstr_err (char *regexp[], int length, char *error, char *input);
39444 
39445 extern void ckstr_hlp (char *regexp[], int length, char *help);
39446 extern int ckstr (char *strval, char *regexp[], int length, char *defstr, char *error, char *help, char *prompt);
39447 
39448 
39449 
39450 /*
39451  * cktime.c
39452  */
39453 extern int cktime_val (char *fmt, char *input);
39454 extern int cktime_err (char *fmt, char *error);
39455 extern int cktime_hlp (char *fmt, char *help);
39456 extern int fmtcheck (char *fmt);
39457 extern int cktime (char *tod, char *fmt, char *defstr, char *error, char *help, char *prompt);
39458 
39459 
39460 /*
39461  * ckuid.c
39462  */
39463 extern int ckuid_dsp (void);
39464 extern int ckuid_val (char *usrnm);
39465 extern int ckpwdfile (void);
39466 extern void ckuid_err (short disp, char *error);
39467 extern void ckuid_hlp (int disp, char *help);
39468 extern int ckuid (char *uid, short disp, char *defstr, char *error, char *help, char *prompt);
39469 
39470 
39471 /*
39472  * ckyorn.c
39473  */
39474 extern int ckyorn_val (char *str);
39475 extern void ckyorn_err (char *error);
39476 extern void ckyorn_hlp (char *help);
39477 extern int ckyorn (char *yorn, char *defstr, char *error, char *help, char *prompt);
39478 
39479 
39480 /*
39481  * devattr.c
39482  */
39483 extern char *devattr (char *device, char *attribute);
39484 
39485 /*
39486  * devreserv.c
39487  */
39488 extern char *_rsvtabpath (void);
39489 extern int _openlkfile (void);
39490 extern int _closelkfile (void);
39491 extern int unreserv (long key, char *device);
39492 extern char **devreserv (long key, char **rsvlst[]);
39493 extern int devfree (long key, char *device);
39494 extern struct reservdev **reservdev (void);
39495 
39496 /*
39497  * devtab.c
39498  */
39499 extern void _setdevtab (void);
39500 extern void _enddevtab (void);
39501 extern char *_devtabpath (void);
39502 extern int _opendevtab (char *mode);
39503 extern int _validalias (char *alias);
39504 extern struct devtabent *_getdevtabent (void);
39505 extern void _freedevtabent (struct devtabent *ent);
39506 extern struct devtabent *_getdevrec (char *device);
39507 
39508 /*
39509  * dgrpent.c
39510  */
39511 extern void _setdgrptab (void);
39512 extern void _enddgrptab (void);
39513 extern char *_dgrptabpath (void);
39514 extern int _opendgrptab (char *mode);
39515 extern struct dgrptabent *_getdgrptabent (void);
39516 extern void _freedgrptabent (struct dgrptabent *ent);
39517 extern struct dgrptabent *_getdgrprec (char *dgroup);
39518 
39519 /*
39520  * fulldevnm.c
39521  */
39522 extern char *getfullblkname (char *cp);
39523 extern char *getfullrawname (char *cp);
39524 
39525 /*
39526  * getdev.c
39527  */
39528 extern char **getdev (char **devices, char **criteria, int options);
39529 
39530 /*
39531  * getdgrp.c
39532  */
39533 extern char **getdgrp (char **dgroups, char **criteria, int options);
39534 
39535 /*
39536  * getinput.c
39537  */
39538 extern int getinput (char *s);
39539 
39540 /*
39541  * getvol.c
39542  */
39543 extern int getvol (char *device, char *label, int options, char *prompt);
39544 
39545 extern int _getvol (char *device, char *label, int options, char *prompt, char *norewind);
39546 
39547 extern void doremovecmd (char *device, int echo);
39548 
39549 /*
39550  * listdev.c
39551  */
39552 extern char **listdev (char *device);
39553 
39554 /*
39555  * listdgrp.c
39556  */
39557 extern char **listdgrp (char *dgroup);
39558 
39559 /*
39560  * memory.c
39561  */
39562 extern long sysmem (void);
39563 extern long asysmem (void);
39564 
39565 /*
39566  * pkginfo.c
39567  */
39568 extern int pkginfo (struct pkginfo *info, char *pkginst, ...);
39569 extern int fpkginfo (struct pkginfo *info, char *pkginst);
39570 extern char *fpkginst (char *pkg, ...);
39571 
39572 /*
39573  * pkgnmchk.c
39574  */
39575 extern int pkgnmchk (register char *pkg, register char *spec, int presvr4flg);
39576 
39577 extern void set_ABI_namelngth (void);
39578 extern int get_ABI_namelngth (void);
39579 
39580 /*
39581  * pkgparam.c
39582  */
39583 extern char *fpkgparam (FILE *fp, char *param);
39584 extern char *pkgparam (char *pkg, char *param);
39585 extern void set_PKGpaths (char *path);
39586 extern char *get_PKGLOC (void);
39587 extern char *get_PKGADM (void);
39588 extern void set_PKGADM(char *newpath);
39589 extern void set_PKGLOC(char *newpath);
39590 
39591 /*
39592  * putdev.c
39593  */
39594 extern int _putdevtabrec (FILE *stream, struct devtabent *rec);
39595 extern int _adddevtabrec (char *alias, char **attrval);
39596 extern int _moddevtabrec (char *device, char **attrval);
39597 extern int _rmdevtabrec (char *device);
39598 extern int _rmdevtabattrs (char *device, char **attributes, char ***notfounds);
39599 
39600 
39601 /*
39602  * putdgrp.c
39603  */
39604 extern int _putdgrptabrec (FILE *stream, struct dgrptabent *rec);
39605 extern int _adddgrptabrec (char *dgrp, char **members);
39606 extern int _rmdgrptabrec (char *dgrp);
39607 extern int _rmdgrpmems (char *dgrp, char **mems, char ***notfounds);
39608 
39609 /*
39610  * puterror.c
39611  */
39612 extern void puterror (FILE *fp, char *defmesg, char *error);
39613 
39614 /*
39615  * puthelp.c
39616  */
39617 extern void puthelp (FILE *fp, char *defmesg, char *help);
39618 
39619 /*
39620  * putprmpt.c
39621  */
39622 extern void putprmpt (FILE *fp, char *prompt, char *choices[], char *defstr);
39623 
39624 
39625 /*
39626  * puttext.c
39627  */
39628 extern int puttext (FILE *fp, char *str, int lmarg, int rmarg);
39629 
39630 /*
39631  * rdwr_vtoc.c
39632  */
39633 extern int read_vtoc (int fd, struct vtoc *vtoc);
39634 extern int write_vtoc (int fd, struct vtoc *vtoc);
39635 # 58 "main.c" 2
39636 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 1
39637 /*
39638  * CDDL HEADER START
39639  *
39640  * The contents of this file are subject to the terms of the
39641  * Common Development and Distribution License (the "License").
39642  * You may not use this file except in compliance with the License.
39643  *
39644  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39645  * or http://www.opensolaris.org/os/licensing.
39646  * See the License for the specific language governing permissions
39647  * and limitations under the License.
39648  *
39649  * When distributing Covered Code, include this CDDL HEADER in each
39650  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39651  * If applicable, add the following below this CDDL HEADER, with the
39652  * fields enclosed by brackets "[]" replaced with your own identifying
39653  * information: Portions Copyright [yyyy] [name of copyright owner]
39654  *
39655  * CDDL HEADER END
39656  */
39657 
39658 /*
39659  * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
39660  */
39661 # 34 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
39662 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
39663 /*
39664  * CDDL HEADER START
39665  *
39666  * The contents of this file are subject to the terms of the
39667  * Common Development and Distribution License (the "License").
39668  * You may not use this file except in compliance with the License.
39669  *
39670  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39671  * or http://www.opensolaris.org/os/licensing.
39672  * See the License for the specific language governing permissions
39673  * and limitations under the License.
39674  *
39675  * When distributing Covered Code, include this CDDL HEADER in each
39676  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39677  * If applicable, add the following below this CDDL HEADER, with the
39678  * fields enclosed by brackets "[]" replaced with your own identifying
39679  * information: Portions Copyright [yyyy] [name of copyright owner]
39680  *
39681  * CDDL HEADER END
39682  */
39683 
39684 /*
39685  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
39686  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
39687  */
39688 
39689 /*	Copyright (c) 1988 AT&T	*/
39690 /*	  All Rights Reserved  	*/
39691 
39692 /*
39693  * User-visible pieces of the ANSI C standard I/O package.
39694  */
39695 # 35 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
39696 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 1
39697 /*
39698  * CDDL HEADER START
39699  *
39700  * The contents of this file are subject to the terms of the
39701  * Common Development and Distribution License (the "License").
39702  * You may not use this file except in compliance with the License.
39703  *
39704  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39705  * or http://www.opensolaris.org/os/licensing.
39706  * See the License for the specific language governing permissions
39707  * and limitations under the License.
39708  *
39709  * When distributing Covered Code, include this CDDL HEADER in each
39710  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39711  * If applicable, add the following below this CDDL HEADER, with the
39712  * fields enclosed by brackets "[]" replaced with your own identifying
39713  * information: Portions Copyright [yyyy] [name of copyright owner]
39714  *
39715  * CDDL HEADER END
39716  */
39717 
39718 /*
39719  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
39720  *
39721  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
39722  * Use is subject to license terms.
39723  */
39724 
39725 /*	Copyright (c) 1988 AT&T	*/
39726 /*	  All Rights Reserved  	*/
39727 # 36 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
39728 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
39729 /*
39730  * CDDL HEADER START
39731  *
39732  * The contents of this file are subject to the terms of the
39733  * Common Development and Distribution License (the "License").
39734  * You may not use this file except in compliance with the License.
39735  *
39736  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39737  * or http://www.opensolaris.org/os/licensing.
39738  * See the License for the specific language governing permissions
39739  * and limitations under the License.
39740  *
39741  * When distributing Covered Code, include this CDDL HEADER in each
39742  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39743  * If applicable, add the following below this CDDL HEADER, with the
39744  * fields enclosed by brackets "[]" replaced with your own identifying
39745  * information: Portions Copyright [yyyy] [name of copyright owner]
39746  *
39747  * CDDL HEADER END
39748  */
39749 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
39750 /*	  All Rights Reserved  	*/
39751 
39752 
39753 /*
39754  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
39755  * Use is subject to license terms.
39756  *
39757  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
39758  * Copyright 2016 Joyent, Inc.
39759  */
39760 # 37 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
39761 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
39762 /*
39763  * CDDL HEADER START
39764  *
39765  * The contents of this file are subject to the terms of the
39766  * Common Development and Distribution License (the "License").
39767  * You may not use this file except in compliance with the License.
39768  *
39769  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39770  * or http://www.opensolaris.org/os/licensing.
39771  * See the License for the specific language governing permissions
39772  * and limitations under the License.
39773  *
39774  * When distributing Covered Code, include this CDDL HEADER in each
39775  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39776  * If applicable, add the following below this CDDL HEADER, with the
39777  * fields enclosed by brackets "[]" replaced with your own identifying
39778  * information: Portions Copyright [yyyy] [name of copyright owner]
39779  *
39780  * CDDL HEADER END
39781  */
39782 
39783 /*
39784  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
39785  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
39786  */
39787 
39788 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
39789 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
39790 /*	All Rights Reserved	*/
39791 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
39792 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
39793 /*
39794  * CDDL HEADER START
39795  *
39796  * The contents of this file are subject to the terms of the
39797  * Common Development and Distribution License (the "License").
39798  * You may not use this file except in compliance with the License.
39799  *
39800  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39801  * or http://www.opensolaris.org/os/licensing.
39802  * See the License for the specific language governing permissions
39803  * and limitations under the License.
39804  *
39805  * When distributing Covered Code, include this CDDL HEADER in each
39806  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39807  * If applicable, add the following below this CDDL HEADER, with the
39808  * fields enclosed by brackets "[]" replaced with your own identifying
39809  * information: Portions Copyright [yyyy] [name of copyright owner]
39810  *
39811  * CDDL HEADER END
39812  */
39813 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
39814 /*	  All Rights Reserved  	*/
39815 
39816 /*
39817  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
39818  * Use is subject to license terms.
39819  */
39820 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
39821 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
39822 /*
39823  * CDDL HEADER START
39824  *
39825  * The contents of this file are subject to the terms of the
39826  * Common Development and Distribution License, Version 1.0 only
39827  * (the "License").  You may not use this file except in compliance
39828  * with the License.
39829  *
39830  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39831  * or http://www.opensolaris.org/os/licensing.
39832  * See the License for the specific language governing permissions
39833  * and limitations under the License.
39834  *
39835  * When distributing Covered Code, include this CDDL HEADER in each
39836  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39837  * If applicable, add the following below this CDDL HEADER, with the
39838  * fields enclosed by brackets "[]" replaced with your own identifying
39839  * information: Portions Copyright [yyyy] [name of copyright owner]
39840  *
39841  * CDDL HEADER END
39842  */
39843 /*
39844  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
39845  */
39846 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
39847 /*	  All Rights Reserved  	*/
39848 # 40 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
39849 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
39850 /*
39851  * CDDL HEADER START
39852  *
39853  * The contents of this file are subject to the terms of the
39854  * Common Development and Distribution License (the "License").
39855  * You may not use this file except in compliance with the License.
39856  *
39857  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39858  * or http://www.opensolaris.org/os/licensing.
39859  * See the License for the specific language governing permissions
39860  * and limitations under the License.
39861  *
39862  * When distributing Covered Code, include this CDDL HEADER in each
39863  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39864  * If applicable, add the following below this CDDL HEADER, with the
39865  * fields enclosed by brackets "[]" replaced with your own identifying
39866  * information: Portions Copyright [yyyy] [name of copyright owner]
39867  *
39868  * CDDL HEADER END
39869  */
39870 
39871 /*
39872  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
39873  * Use is subject to license terms.
39874  */
39875 
39876 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
39877 /* All Rights Reserved */
39878 # 41 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
39879 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
39880 /*
39881  * CDDL HEADER START
39882  *
39883  * The contents of this file are subject to the terms of the
39884  * Common Development and Distribution License (the "License").
39885  * You may not use this file except in compliance with the License.
39886  *
39887  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39888  * or http://www.opensolaris.org/os/licensing.
39889  * See the License for the specific language governing permissions
39890  * and limitations under the License.
39891  *
39892  * When distributing Covered Code, include this CDDL HEADER in each
39893  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39894  * If applicable, add the following below this CDDL HEADER, with the
39895  * fields enclosed by brackets "[]" replaced with your own identifying
39896  * information: Portions Copyright [yyyy] [name of copyright owner]
39897  *
39898  * CDDL HEADER END
39899  */
39900 
39901 /*
39902  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
39903  * Use is subject to license terms.
39904  */
39905 # 42 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
39906 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
39907 /*
39908  * CDDL HEADER START
39909  *
39910  * The contents of this file are subject to the terms of the
39911  * Common Development and Distribution License (the "License").
39912  * You may not use this file except in compliance with the License.
39913  *
39914  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
39915  * or http://www.opensolaris.org/os/licensing.
39916  * See the License for the specific language governing permissions
39917  * and limitations under the License.
39918  *
39919  * When distributing Covered Code, include this CDDL HEADER in each
39920  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
39921  * If applicable, add the following below this CDDL HEADER, with the
39922  * fields enclosed by brackets "[]" replaced with your own identifying
39923  * information: Portions Copyright [yyyy] [name of copyright owner]
39924  *
39925  * CDDL HEADER END
39926  */
39927 
39928 /*
39929  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
39930  * Use is subject to license terms.
39931  */
39932 
39933 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
39934 /* All Rights Reserved */
39935 # 43 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
39936 
39937 
39938 
39939 
39940 
39941 /* signal handler function definition */
39942 
39943 typedef void (sighdlrFunc_t)(int);
39944 
39945 /* maximum parameter length */
39946 
39947 
39948 
39949 /* flag for check_applicability */
39950 
39951 typedef unsigned long CAF_T;
39952 
39953 /* flags for check_applicability */
39954 
39955 
39956 
39957 
39958 
39959 /* path to the request file in the package directory */
39960 
39961 
39962 
39963 /* path to the copyright file in the package directory */
39964 
39965 
39966 
39967 /* path to the depend file in the package directory */
39968 
39969 
39970 
39971 /*
39972  * name of environment variable set to non-global zone name being installed:
39973  * pkgadd/pkginstall expects this name and passes it on to any scripts that
39974  * are run if it is set.
39975  */
39976 
39977 
39978 
39979 /*
39980  * name of environment variable set to indicate this package should be installed
39981  * in the current zone only - see PSARC/2004/789 - New Pkginfo(4) attributes
39982  * for zones
39983  */
39984 
39985 
39986 
39987 /*
39988  * name of environment variable set to indicate this package should be installed
39989  * in all zones, and only from the global zone - see PSARC/2003/460
39990  */
39991 
39992 
39993 
39994 /*
39995  * name of environment variable set to indicate this package should be installed
39996  * hollow (db update only) when installed in nonglobal zone - see PSARC/2003/460
39997  */
39998 
39999 
40000 
40001 /*
40002  * General purpose return codes used for functions which don't return a basic
40003  * success or failure. For those functions wherein a yes/no result is
40004  * possible, then 1 means OK and 0 means FAIL.
40005  */
40006 
40007 
40008 
40009 
40010 /* These are the file status indicators for the contents file */
40011 # 128 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
40012 /* control bits for pkgdbmerg() */
40013 
40014 
40015 
40016 /* control bits for file verification by class */
40017 
40018 
40019 
40020 
40021 /* control bit for path type to pass to CAS */
40022 
40023 
40024 
40025 /* findscripts() argument */
40026 
40027 
40028 
40029 struct cl_attr {
40030  char name[64 +1]; /* name of class */
40031  char *inst_script; /* install class action script */
40032  char *rem_script; /* remove class action script */
40033  unsigned src_verify:3; /* source verification level */
40034  unsigned dst_verify:4; /* destination verification level */
40035  unsigned relpath_2_CAS:1; /* CAS gets relative paths */
40036 };
40037 
40038 
40039 
40040 
40041 
40042 
40043 
40044 /* Common quit declaration used across many package commands */
40045 extern void quit(int) __attribute__((__noreturn__));
40046 
40047 
40048 /* listmgr.c */
40049 extern int bl_create (int count_per_block, int struct_size, char *desc);
40050 
40051 extern char *bl_next_avail (int list_handle);
40052 extern char *bl_get_record (int list_handle, int recno);
40053 extern void bl_free (int list_handle);
40054 extern int ar_create (int count_per_block, int struct_size, char *desc);
40055 
40056 extern char **ar_next_avail (int list_handle);
40057 extern char **ar_get_head (int list_handle);
40058 extern int ar_delete (int list_handle, int index);
40059 extern void ar_free (int list_handle);
40060 
40061 /* doulimit.c */
40062 extern int set_ulimit (char *script, char *err_msg);
40063 extern int clr_ulimit (void);
40064 extern int assign_ulimit (char *fslimit);
40065 
40066 /* dryrun.c */
40067 extern void set_continue_not_ok (void);
40068 extern int continue_is_ok (void);
40069 extern int in_dryrun_mode (void);
40070 extern int in_continue_mode (void);
40071 extern void init_dryrunfile (char *dr_dir);
40072 extern void init_contfile (char *cn_dir);
40073 extern void set_dr_exitmsg (char *value);
40074 extern void set_dr_info (int type, int value);
40075 extern void write_dryrun_file (struct cfextra **extlist);
40076 
40077 /* instvol.c */
40078 extern void regfiles_free (void);
40079 
40080 /* lockinst.c */
40081 extern int lockinst (char *util_name, char *pkg_name, char *place);
40082 extern void lockupd (char *place);
40083 extern void unlockinst (void);
40084 
40085 extern char *pathdup (char *s);
40086 extern char *pathalloc (int n);
40087 extern char *fixpath (char *path);
40088 extern char *get_info_basedir (void);
40089 extern char *get_basedir (void);
40090 extern char *get_client_basedir (void);
40091 extern int set_basedirs (int reloc, char *adm_basedir, char *pkginst, int nointeract);
40092 
40093 extern int eval_path (char **server_ptr, char **client_ptr, char **map_ptr, char *path);
40094 
40095 extern int get_orig_offset (void);
40096 extern char *get_inst_root (void);
40097 extern char *get_mount_point (uint32_t n);
40098 extern char *get_remote_path (uint32_t n);
40099 extern void set_env_cbdir (void);
40100 extern int set_inst_root (char *path);
40101 extern void put_path_params (void);
40102 extern int mkpath (char *p);
40103 extern void mkbasedir (int flag, char *path);
40104 extern int is_an_inst_root (void);
40105 extern int is_a_basedir (void);
40106 extern int is_a_cl_basedir (void);
40107 extern int is_relocatable (void);
40108 extern char *orig_path (char *path);
40109 extern char *orig_path_ptr (char *path);
40110 extern char *qreason (int caller, int retcode, int started, int includeZonename);
40111 
40112 extern char *qstrdup (char *s);
40113 extern char *srcpath (char *d, char *p, int part, int nparts);
40114 extern char *trans_srcp_pi (char *local_path);
40115 extern int copyf (char *from, char *to, time_t mytime);
40116 extern int copyFile (int, int, char *, char *, struct stat *, long);
40117 extern int openLocal (char *a_path, int a_oflag, char *a_tmpdir);
40118 extern int dockdeps (char *depfile, int removeFlag, boolean_t a_preinstallCheck);
40119 
40120 extern int finalck (struct cfent *ept, int attrchg, int contchg, boolean_t a_warning);
40121 
40122 
40123 /* dockdeps.c */
40124 extern void setUpdate (void);
40125 extern int isUpdate (void);
40126 
40127 /* mntinfo.c */
40128 extern int get_mntinfo (int map_client, char *vfstab_file);
40129 extern uint32_t fsys (char *path);
40130 extern struct fstable *get_fs_entry (uint32_t n);
40131 extern int mount_client (void);
40132 extern int unmount_client (void);
40133 extern uint32_t resolved_fsys (char *path);
40134 extern char *get_server_host (uint32_t n);
40135 extern char *server_map (char *path, uint32_t fsys_value);
40136 extern int use_srvr_map (char *path, uint32_t *fsys_value);
40137 extern int use_srvr_map_n (uint32_t n);
40138 extern int is_fs_writeable (char *path, uint32_t *fsys_value);
40139 extern int is_remote_fs (char *path, uint32_t *fsys_value);
40140 extern int is_served (char *path, uint32_t *fsys_value);
40141 extern int is_mounted (char *path, uint32_t *fsys_value);
40142 extern int is_fs_writeable_n (uint32_t n);
40143 extern int is_remote_fs_n (uint32_t n);
40144 extern int is_served_n (uint32_t n);
40145 extern int is_mounted_n (uint32_t n);
40146 extern fsblkcnt_t get_blk_size_n (uint32_t n);
40147 extern fsblkcnt_t get_frag_size_n (uint32_t n);
40148 extern fsblkcnt_t get_blk_used_n (uint32_t n);
40149 extern fsblkcnt_t get_blk_free_n (uint32_t n);
40150 extern fsblkcnt_t get_inode_used_n (uint32_t n);
40151 extern fsblkcnt_t get_inode_free_n (uint32_t n);
40152 extern void set_blk_used_n (uint32_t n, fsblkcnt_t value);
40153 extern char *get_source_name_n (uint32_t n);
40154 extern char *get_fs_name_n (uint32_t n);
40155 extern int load_fsentry (struct fstable *fs_entry, char *name, char *fstype, char *remote_name);
40156 
40157 extern int isreloc (char *pkginstdir);
40158 extern int is_local_host (char *hostname);
40159 extern void fs_tab_free (void);
40160 
40161 /* pkgdbmerg.c */
40162 extern int pkgdbmerg (PKGserver server, VFP_T *tmpvfp, struct cfextra **extlist);
40163 
40164 extern int files_installed (void);
40165 
40166 /* ocfile.c */
40167 extern int trunc_tcfile (int fd);
40168 extern int ocfile (PKGserver *serverp, VFP_T **tmpvfp, fsblkcnt_t map_blks);
40169 
40170 extern int swapcfile (PKGserver server, VFP_T **a_tmpvfp, char *pkginst, int dbchg);
40171 
40172 extern int set_cfdir (char *cfdir);
40173 extern int socfile (PKGserver *server, boolean_t quiet);
40174 extern int relslock (void);
40175 extern int pkgWlock (int verbose);
40176 extern int iscfile (void);
40177 extern int vcfile (void);
40178 
40179 extern fsblkcnt_t nblk (fsblkcnt_t size, ulong_t bsize, ulong_t frsize);
40180 
40181 extern struct cfent **procmap (VFP_T *vfp, int mapflag, char *ir);
40182 extern void repl_cfent (struct cfent *new, struct cfent *old);
40183 extern struct cfextra **pkgobjmap (VFP_T *vfp, int mapflag, char *ir);
40184 extern void pkgobjinit (void);
40185 extern int seed_pkgobjmap (struct cfextra *ext_entry, char *path, char *local);
40186 
40187 extern int init_pkgobjspace (void);
40188 
40189 /* eptstat.c */
40190 extern void pinfo_free (void);
40191 extern struct pinfo *eptstat (struct cfent *entry, char *pkg, char c);
40192 
40193 /* echo.c */
40194 /*PRINTFLIKE1*/
40195 extern void echo (char *a_fmt, ...);
40196 /*PRINTFLIKE1*/
40197 extern void echoDebug (char *a_fmt, ...);
40198 extern boolean_t echoGetFlag (void);
40199 extern boolean_t echoDebugGetFlag (void);
40200 extern boolean_t echoSetFlag (boolean_t a_debugFlag);
40201 extern boolean_t echoDebugSetFlag (boolean_t a_debugFlag);
40202 
40203 /* ptext.c */
40204 /*PRINTFLIKE2*/
40205 extern void ptext (FILE *fp, char *fmt, ...);
40206 
40207 /* putparam.c */
40208 extern void putparam (char *param, char *value);
40209 extern void getuserlocale (void);
40210 extern void putuserlocale (void);
40211 extern void putConditionInfo (char *, char *);
40212 
40213 /* setadmin.c */
40214 extern void setadminFile (char *file);
40215 extern char *setadminSetting (char *a_paramName, char *a_paramValue);
40216 
40217 extern char *set_keystore_admin (void);
40218 extern boolean_t get_proxy_port_admin (char **, ushort_t *);
40219 extern boolean_t check_keystore_admin (char **);
40220 extern int web_ck_retries (void);
40221 extern int web_ck_timeout (void);
40222 extern int web_ck_authentication (void);
40223 
40224 /* setlist.c */
40225 extern char *cl_iscript (int idx);
40226 extern char *cl_rscript (int idx);
40227 extern void find_CAS (int CAS_type, char *bin_ptr, char *inst_ptr);
40228 extern int setlist (struct cl_attr ***plist, char *slist);
40229 extern void addlist (struct cl_attr ***plist, char *item);
40230 extern char *cl_nam (int cl_idx);
40231 extern char *flex_device(char *device_name, int dev_ok);
40232 extern int cl_getn (void);
40233 extern int cl_idx (char *cl_nam);
40234 extern void cl_sets (char *slist);
40235 extern void cl_setl (struct cl_attr **cl_lst);
40236 extern void cl_putl (char *parm_name, struct cl_attr **list);
40237 extern int cl_deliscript (int i);
40238 extern unsigned cl_svfy (int i);
40239 extern unsigned cl_dvfy (int i);
40240 extern unsigned cl_pthrel (int i);
40241 
40242 /* passwd.c */
40243 extern int pkg_passphrase_cb (char *, int, int, void *);
40244 extern void set_passarg (char *);
40245 extern void set_prompt (char *);
40246 
40247 /* fixpath.c */
40248 extern void export_client_env(char *);
40249 extern void set_partial_inst(void);
40250 extern int is_partial_inst(void);
40251 extern void set_depend_pkginfo_DB(boolean_t a_setting);
40252 extern boolean_t is_depend_pkginfo_DB(void);
40253 extern void disable_spool_create(void);
40254 extern int is_spool_create(void);
40255 
40256 /* open_package_datastream.c */
40257 extern boolean_t open_package_datastream(int a_argc, char **a_argv,
40258     char *a_spoolto, char *a_device,
40259     int *r_repeat, char **r_idsName,
40260     char *a_tmpdir, struct pkgdev *a_pkgdev,
40261     int a_optind);
40262 
40263 /* setup_temporary_directory.c */
40264 extern boolean_t setup_temporary_directory(char **r_dirname,
40265     char *a_tmpdir, char *a_suffix);
40266 
40267 /* unpack_package_from_stream.c */
40268 extern boolean_t unpack_package_from_stream(char *a_idsName,
40269     char *a_pkginst, char *a_tempDir);
40270 
40271 /* pkgops.c */
40272 
40273 extern boolean_t pkgAddPackageToGzonlyList(char *a_pkgInst,
40274     char *a_rootPath);
40275 extern void pkgAddThisZonePackage(char *a_pkgInst);
40276 extern boolean_t pkgRemovePackageFromGzonlyList(char *a_rootPath,
40277     char *a_pkgInst);
40278 extern FILE *pkgOpenInGzOnlyFile(char *a_rootPath);
40279 extern void pkginfoFree(struct pkginfo **r_info);
40280 extern boolean_t pkginfoIsPkgInstalled(struct pkginfo **r_pinfo,
40281     char *a_pkgInst);
40282 extern boolean_t pkgIsPkgInGzOnly(char *a_rootPath, char *a_pkgInst);
40283 extern boolean_t pkgIsPkgInGzOnlyFP(FILE *a_fp, char *a_pkgInst);
40284 extern boolean_t pkginfoParamTruth(FILE *a_fp, char *a_param,
40285     char *a_value, boolean_t a_default);
40286 extern int pkgGetPackageList(char ***r_pkgList, char **a_argv,
40287     int a_optind, char *a_categories,
40288     char **a_categoryList, struct pkgdev *a_pkgdev);
40289 extern void pkgLocateHighestInst(char *r_path, int r_pathLen,
40290     char *r_pkgInst, int r_pkgInstLen,
40291     char *a_rootPath, char *a_pkgInst);
40292 extern boolean_t pkgPackageIsThisZone(char *a_pkgInst);
40293 extern char *pkgGetGzOnlyPath(void);
40294 extern boolean_t pkgTestInstalled(char *a_packageName, char *a_rootPath);
40295 
40296 /* depchk.c */
40297 
40298 struct depckErrorRecord {
40299  int ier_numZones;
40300  char *ier_packageName;
40301  char **ier_zones;
40302  char **ier_values;
40303 };
40304 
40305 typedef struct depckErrorRecord depckErrorRecord_t;
40306 
40307 struct depckError {
40308  int er_numEntries;
40309  depckErrorRecord_t *er_theEntries;
40310 };
40311 
40312 typedef struct depckError depckError_t;
40313 
40314 typedef int (depcklFunc_t)(char *a_msg, char *a_pkg);
40315 
40316 /*
40317  * ignore_values:
40318  *	== NULL - record one message for each instance of "name" found
40319  *	== "" - record multiple instances
40320  *	!= "" - record multiple instances if value not in ignore_values
40321  */
40322 
40323 struct depckl_struct {
40324  char *name;
40325  char *ignore_values;
40326  char **err_msg;
40327  depcklFunc_t *depcklFunc;
40328  depckError_t *record;
40329 };
40330 
40331 typedef struct depckl_struct depckl_t;
40332 
40333 extern int depchkReportErrors(depckl_t *depckl);
40334 extern void depchkRecordError(depckError_t *a_erc,
40335     char *a_pkginst, char *a_zoneName,
40336     char *a_value);
40337 
40338 /* log.c */
40339 
40340 /* types of log messages we recognize */
40341 typedef enum {
40342  LOG_MSG_ERR,
40343  LOG_MSG_WRN,
40344  LOG_MSG_INFO,
40345  LOG_MSG_DEBUG
40346 } LogMsgType;
40347 
40348 /*PRINTFLIKE2*/
40349 extern void log_msg(LogMsgType, const char *, ...);
40350 extern void log_set_verbose(boolean_t);
40351 extern boolean_t log_get_verbose(void);
40352 
40353 /*
40354  * typedef for the 'ckreturn' function
40355  */
40356 typedef void (ckreturnFunc_t)(int a_retcode);
40357 
40358 /* sml.c */
40359 
40360 /* null reference to SML_TAG object */
40361 
40362 
40363 
40364 /* null reference to SML_TAG * object */
40365 
40366 
40367 
40368 /* is reference to SML_TAG object valid? */
40369 
40370 
40371 
40372 /* is indirect reference to SML_TAG object valid? */
40373 
40374 
40375 
40376 
40377 /* definitions for sml passed from pkginstall to pkgcond */
40378 # 505 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
40379 typedef struct _sml_tag_struct SML_TAG;
40380 typedef struct _sml_parameter_struct SML_PARAM;
40381 
40382 struct _sml_tag_struct {
40383  char *name; /* tag name */
40384  int params_num; /* # params in *params */
40385  SML_PARAM *params; /* tag parameters */
40386  int tags_num; /* # subtags in *tags */
40387  SML_TAG *tags; /* tag subtags */
40388 };
40389 
40390 struct _sml_parameter_struct {
40391  char *name; /* tag name */
40392  char *value; /* parameters */
40393 };
40394 
40395 SML_TAG *smlAddTag(SML_TAG **r_tag, int a_index,
40396    SML_TAG *a_subTag);
40397 boolean_t smlFstatCompareEq(struct stat *statbuf,
40398     SML_TAG *tag, char *path);
40399 char *smlConvertTagToString(SML_TAG *tag);
40400 /*PRINTFLIKE2*/
40401 void smlDbgPrintTag(SML_TAG *a_tag, char *a_format, ...);
40402 void smlDelTag(SML_TAG *tag, SML_TAG *sub_tag);
40403 void smlDelParam(SML_TAG *tag, char *name);
40404 SML_TAG *smlDup(SML_TAG *tag);
40405 boolean_t smlFindAndDelTag(SML_TAG *tag, char *findTag);
40406 void smlFreeTag(SML_TAG *tag);
40407 char *smlGetElementName(SML_TAG *a_tag);
40408 int smlGetNumParams(SML_TAG *a_tag);
40409 char *smlGetParam(SML_TAG *tag, char *name);
40410 /*PRINTFLIKE2*/
40411 char *smlGetParamF(SML_TAG *tag, char *format, ...);
40412 void smlGetParam_r(SML_TAG *tag, char *name, char *buf,
40413    int bufLen);
40414 char *smlGetParamByTag(SML_TAG *tag, int index,
40415    char *tagName, char *parmName);
40416 char *smlGetParamByTagParam(SML_TAG *tag, int index,
40417    char *tagName, char *parmName, char *parmValue,
40418    char *parmReturn);
40419 char *smlGetParamName(SML_TAG *tag, int index);
40420 SML_TAG *smlGetTag(SML_TAG *tag, int index);
40421 SML_TAG *smlGetTagByName(SML_TAG *tag, int index, char *name);
40422 SML_TAG *smlGetTagByTagParam(SML_TAG *tag, int index,
40423    char *tagName, char *paramName, char *paramValue);
40424 boolean_t smlGetVerbose(void);
40425 int smlLoadTagFromFile(SML_TAG **r_tag, char *a_fileName);
40426 SML_TAG *smlNewTag(char *name);
40427 boolean_t smlParamEq(SML_TAG *tag, char *findTag,
40428    char *findParam, char *str);
40429 /*PRINTFLIKE4*/
40430 boolean_t smlParamEqF(SML_TAG *tag, char *findTag, char *findParam,
40431    char *format, ...);
40432 void smlPrintTag(SML_TAG *tag);
40433 int smlReadOneTag(SML_TAG **r_tag, char *a_str);
40434 int smlConvertStringToTag(SML_TAG **r_tag, char *str);
40435 void smlSetFileStatInfo(SML_TAG **tag,
40436     struct stat *statbuf, char *path);
40437 void smlSetParam(SML_TAG *tag, char *name, char *value);
40438 /*PRINTFLIKE3*/
40439 void smlSetParamF(SML_TAG *tag, char *name, char *format, ...);
40440 void smlSetVerbose(boolean_t a_setting);
40441 int smlWriteTagToFd(SML_TAG *tag, int fd);
40442 int smlWriteTagToFile(SML_TAG *tag, char *filename);
40443 /*PRINTFLIKE3*/
40444 void sml_strPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
40445 /*PRINTFLIKE1*/
40446 char *sml_strPrintf(char *a_format, ...);
40447 char *sml_XmlEncodeString(char *a_plainTextString);
40448 char *sml_XmlDecodeString(char *a_xmlEncodedString);
40449 # 59 "main.c" 2
40450 
40451 extern char **environ, *pkgdir;
40452 
40453 /* mkpkgmap.c */
40454 extern int mkpkgmap(char *outfile, char *protofile, char **cmdparam);
40455 /* splpkgmap.c */
40456 extern int splpkgmap(struct cfent **eptlist, unsigned int eptnum,
40457     char *order[], ulong_t bsize, ulong_t frsize, fsblkcnt_t *plimit,
40458     fsfilcnt_t *pilimit, fsblkcnt_t *pllimit);
40459 /* scriptvfy.c */
40460 extern int checkscripts(char *inst_dir, int silent);
40461 
40462 /* libpkg/gpkgmap.c */
40463 extern void setmapmode(int mode_no);
40464 
40465 static boolean_t valid_zone_attr(struct cfent **eptlist);
40466 # 87 "main.c"
40467 /* Other problems */
40468 # 147 "main.c"
40469 struct pkgdev pkgdev; /* holds info about the installation device */
40470 int started;
40471 char pkgloc[1024];
40472 char *basedir;
40473 char *root;
40474 char *rootlist[8];
40475 char *t_pkgmap;
40476 char *t_pkginfo;
40477 
40478 static struct cfent *svept;
40479 static char *protofile,
40480   *device;
40481 static fsblkcnt_t limit = 0;
40482 static fsblkcnt_t llimit = 0;
40483 static fsfilcnt_t ilimit = 0;
40484 static int overwrite,
40485   nflag,
40486   sflag;
40487 static void ckmissing(char *path, char type);
40488 static void outvol(struct cfent **eptlist, unsigned int eptnum, int part,
40489    int nparts);
40490 static void trap(int n);
40491 static void usage(void);
40492 
40493 static int slinkf(char *from, char *to);
40494 
40495 int
40496 main(int argc, char *argv[])
40497 {
40498  struct utsname utsbuf;
40499  struct statvfs64 svfsb;
40500  struct cfent **eptlist;
40501  FILE *fp;
40502  VFP_T *vfp;
40503  int c, n, found;
40504  int part, nparts, npkgs, objects;
40505  char buf[(64+1)];
40506  char temp[(64+1)];
40507  char param[(64+1)];
40508  char *pt, *value, *pkginst, *tmpdir, *abi_sym_ptr,
40509   **cmdparam;
40510  char *pkgname;
40511  char *pkgvers;
40512  char *pkgarch;
40513  char *pkgcat;
40514  void (*func)();
40515  time_t clock;
40516  ulong_t bsize = 0;
40517  ulong_t frsize = 0;
40518  struct cl_attr **allclass = 0;
40519  struct cl_attr **order;
40520  unsigned int eptnum, i;
40521 
40522  /* initialize locale environment */
40523 
40524  (void) setlocale(6, "");
40525 
40526 
40527 
40528 
40529  (void) textdomain(TEXT_DOMAIN);
40530 
40531  /* initialize program name */
40532 
40533  (void) set_prog_name(argv[0]);
40534 
40535  /* tell spmi zones interface how to access package output functions */
40536 
40537  z_set_output_functions(echo, echoDebug, progerr);
40538 
40539  func = sigset(2, trap);
40540  if (func != (void(*)())0)
40541   func = sigset(2, func);
40542  func = sigset(1, trap);
40543  setmapmode(1); /* variable binding */
40544  if (func != (void(*)())0)
40545   func = sigset(1, func);
40546 
40547  environ = 0;
40548  while ((c = getopt(argc, argv, "osnp:l:r:b:d:f:a:v:?")) != (-1)) {
40549   switch (c) {
40550       case 'n':
40551    nflag++;
40552    break;
40553 
40554       case 's':
40555    sflag++;
40556    break;
40557 
40558       case 'o':
40559    overwrite++;
40560    break;
40561 
40562       case 'p':
40563    putparam("PSTAMP", optarg);
40564    break;
40565 
40566       case 'l':
40567    llimit = strtoull(optarg, 0, 10);
40568    break;
40569 
40570       case 'r':
40571    pt = strtok(optarg, " \t\n, ");
40572    n = 0;
40573    do {
40574     rootlist[n++] = flex_device(pt, 0);
40575     if (n >= 8) {
40576      progerr(gettext("too many paths listed with -r option, limit is %d"), 8);
40577      quit(1);
40578     }
40579    } while (pt = strtok(0, " \t\n, "));
40580    rootlist[n] = 0;
40581    break;
40582 
40583       case 'b':
40584    basedir = optarg;
40585    break;
40586 
40587       case 'f':
40588    protofile = optarg;
40589    break;
40590 
40591       case 'd':
40592    device = flex_device(optarg, 1);
40593    break;
40594 
40595       case 'a':
40596    putparam("ARCH", optarg);
40597    break;
40598 
40599       case 'v':
40600    putparam("VERSION", optarg);
40601    break;
40602 
40603       default:
40604    usage();
40605    /*NOTREACHED*/
40606    /*
40607 			 * Although usage() calls a noreturn function,
40608 			 * needed to add return (1);  so that main() would
40609 			 * pass compilation checks. The statement below
40610 			 * should never be executed.
40611 			 */
40612    return (1);
40613   }
40614  }
40615 
40616  /*
40617 	 * Store command line variable assignments for later
40618 	 * incorporation into the environment.
40619 	 */
40620  cmdparam = &argv[optind];
40621 
40622  /* Skip past equates. */
40623  while (argv[optind] && strchr(argv[optind], '='))
40624   optind++;
40625 
40626  /* Confirm that the instance name is valid */
40627  if ((pkginst = argv[optind]) != 0) {
40628   if (pkgnmchk(pkginst, "all", 0)) {
40629    progerr(gettext("invalid package instance identifier <%s>"), pkginst);
40630    quit(1);
40631   }
40632   argv[optind++] = 0;
40633  }
40634  if (optind != argc)
40635   usage();
40636 
40637  tmpdir = getenv("TMPDIR");
40638  if (tmpdir == 0)
40639   tmpdir = "/var/tmp/";
40640 
40641  /* bug id 4244631, not ABI compliant */
40642  abi_sym_ptr = getenv("PKG_NONABI_SYMLINKS");
40643  if (abi_sym_ptr && (strncasecmp(abi_sym_ptr, "TRUE", 4) == 0)) {
40644   set_nonABI_symlinks();
40645  }
40646 
40647  if (device == 0) {
40648   device = devattr("spool", "pathname");
40649   if (device == 0) {
40650    progerr(gettext("unable to find info for device <%s>"), "spool");
40651    exit(99);
40652   }
40653  }
40654 
40655  if (protofile == 0) {
40656   if (access("prototype", 0) == 0)
40657    protofile = "prototype";
40658   else if (access("Prototype", 0) == 0)
40659    protofile = "Prototype";
40660   else {
40661    progerr(gettext("unable to locate prototype file"));
40662    quit(1);
40663   }
40664  }
40665 
40666  if (devtype(device, &pkgdev)) {
40667   progerr(gettext("unknown or invalid device specified <%s>"), device);
40668   quit(1);
40669  }
40670  if (pkgdev.norewind) {
40671   /* initialize datastream */
40672   progerr(gettext("invalid device specified (datastream) <%s>"), device);
40673   quit(1);
40674  }
40675  if (pkgdev.mount) {
40676   if (n = pkgmount(&pkgdev, 0, 0, 0, 1))
40677    quit(n);
40678  }
40679 
40680  /*
40681 	 * convert prototype file to a pkgmap, while locating
40682 	 * package objects in the current environment
40683 	 */
40684  t_pkgmap = tempnam(tmpdir, "tmpmap");
40685  if (t_pkgmap == 0) {
40686   progerr(gettext("unable to obtain temporary file resources, errno=%d"), (*(___errno())));
40687   exit(99);
40688  }
40689 
40690  (void) fprintf((&__iob[2]), gettext("## Building pkgmap from package prototype file.\n"));
40691  if (n = mkpkgmap(t_pkgmap, protofile, cmdparam)) {
40692   progerr(gettext("unable to build pkgmap from prototype file"));
40693   quit(1);
40694  }
40695 
40696  setmapmode(3); /* All appropriate variables are now bound */
40697 
40698  if (vfpOpen(&vfp, t_pkgmap, "r", 0x00000001) != 0) {
40699   progerr(gettext("unable to obtain temporary file resources, errno=%d"), (*(___errno())));
40700   quit(99);
40701  }
40702 
40703  eptlist = procmap(vfp, 0, 0);
40704 
40705  if (eptlist == 0) {
40706   quit(1);
40707  }
40708 
40709  (void) vfpClose(&vfp);
40710 
40711  /* Validate the zone attributes in pkginfo, before creation */
40712  if (!valid_zone_attr(eptlist)) {
40713   progerr("Invalid combinations of zone " "parameters in pkginfo file");
40714   quit(1);
40715  }
40716 
40717  (void) fprintf((&__iob[2]), gettext("## Processing pkginfo file.\n"));
40718  pt = 0;
40719  for (i = 0; eptlist[i]; i++) {
40720   ckmissing(eptlist[i]->path, eptlist[i]->ftype);
40721   if (eptlist[i]->ftype != 'i')
40722    continue;
40723   if (strcmp(eptlist[i]->path, "pkginfo") == 0)
40724    svept = eptlist[i];
40725  }
40726  if (svept == 0) {
40727   progerr(gettext("required pkginfo file is not specified in prototype " "file"));
40728   quit(99);
40729  }
40730  eptnum = i;
40731 
40732  /*
40733 	 * process all parameters from the pkginfo file
40734 	 * and place them in the execution environment
40735 	 */
40736 
40737  if ((fp = fopen(svept->ainfo.local, "r")) == 0) {
40738   progerr(gettext("unable to process pkginfo file <%s>"), svept->ainfo.local);
40739   quit(99);
40740  }
40741  param[0] = '\0';
40742  while (value = fpkgparam(fp, param)) {
40743   if (getenv(param) == 0)
40744    putparam(param, value);
40745   free((void *)value);
40746   param[0] = '\0';
40747  }
40748  (void) fclose(fp);
40749 
40750  /* add command line variables */
40751  while (*cmdparam && (value = strchr(*cmdparam, '=')) != 0) {
40752   *value = 0; /* terminate the parameter */
40753   value++; /* value is now the value (not '=') */
40754   putparam(*cmdparam++, value); /* store it in environ */
40755  }
40756 
40757  /* make sure parameters are valid */
40758  (void) time(&clock);
40759  if (pt = getenv("PKG")) {
40760   if (pkgnmchk(pt, 0, 0) || strchr(pt, '.')) {
40761    progerr(gettext("invalid package abbreviation <%s>"), pt);
40762    quit(1);
40763   }
40764   if (pkginst == 0)
40765    pkginst = pt;
40766  } else {
40767   progerr(gettext("parameter <%s> is not defined in <%s>"), "PKG", svept->path);
40768   quit(1);
40769  }
40770  /*
40771 	 * verify consistency between PKG parameter and pkginst
40772 	 */
40773  (void) snprintf(param, sizeof (param), "%s.*", pt);
40774  if (pkgnmchk(pkginst, param, 0)) {
40775   progerr(gettext("PKG parameter <%s> does not match instance <%s>"), pt, pkginst);
40776   quit(1);
40777  }
40778 
40779  if ((pkgname = getenv("NAME")) == 0) {
40780   progerr(gettext("parameter <%s> is not defined in <%s>"), "NAME", svept->path);
40781   quit(1);
40782  }
40783  if (ckparam("NAME", pkgname))
40784   quit(1);
40785  if ((pkgvers = getenv("VERSION")) == 0) {
40786   /* XXX - I18n */
40787   /* LINTED do not use cftime(); use strftime instead */
40788   (void) cftime(buf, "\045m/\045d/\045Y", &clock);
40789   (void) snprintf(temp, sizeof (temp),
40790    gettext("Dev Release %s"), buf);
40791   putparam("VERSION", temp);
40792   pkgvers = getenv("VERSION");
40793   logerr(gettext("WARNING: parameter <%s> set to \"%s\""), "VERSION", temp);
40794  }
40795  if (ckparam("VERSION", pkgvers))
40796   quit(1);
40797  if ((pkgarch = getenv("ARCH")) == 0) {
40798   (void) uname(&utsbuf);
40799   putparam("ARCH", utsbuf.machine);
40800   pkgarch = getenv("ARCH");
40801   logerr(gettext("WARNING: parameter <%s> set to \"%s\""), "ARCH", utsbuf.machine);
40802  }
40803  if (ckparam("ARCH", pkgarch))
40804   quit(1);
40805  if (getenv("PSTAMP") == 0) {
40806   /* use octal value of '%' to fight sccs expansion */
40807   /* XXX - I18n */
40808   /* LINTED do not use cftime(); use strftime instead */
40809   (void) cftime(buf, "\045Y\045m\045d\045H\045M\045S", &clock);
40810   (void) uname(&utsbuf);
40811   (void) snprintf(temp, sizeof (temp), "%s%s",
40812    utsbuf.nodename, buf);
40813   putparam("PSTAMP", temp);
40814   logerr(gettext("WARNING: parameter <%s> set to \"%s\""), "PSTAMP", temp);
40815  }
40816  if ((pkgcat = getenv("CATEGORY")) == 0) {
40817   progerr(gettext("parameter <%s> is not defined in <%s>"), "CATEGORY", svept->path);
40818   quit(1);
40819  }
40820  if (ckparam("CATEGORY", pkgcat))
40821   quit(1);
40822 
40823  /*
40824 	 * warn user of classes listed in package which do
40825 	 * not appear in CLASSES variable in pkginfo file
40826 	 */
40827  objects = 0;
40828  for (i = 0; eptlist[i]; i++) {
40829   if (eptlist[i]->ftype != 'i') {
40830    objects++;
40831    addlist(&allclass, eptlist[i]->pkg_class);
40832   }
40833  }
40834 
40835  if ((pt = getenv("CLASSES")) == 0) {
40836   if (allclass && *allclass) {
40837    cl_setl(allclass);
40838    cl_putl("CLASSES", allclass);
40839    logerr(gettext("WARNING: parameter <%s> set to \"%s\""), "CLASSES",
40840        getenv("CLASSES"));
40841   }
40842  } else {
40843   cl_sets(qstrdup(pt));
40844   if (allclass && *allclass) {
40845    for (i = 0; allclass[i]; i++) {
40846     found = 0;
40847     if (cl_idx(allclass[i]->name) != -1) {
40848      found++;
40849      break;
40850     }
40851     if (!found) {
40852      logerr(gettext("WARNING: unreferenced class <%s> in prototype file"),
40853          (char *)allclass[i]);
40854     }
40855    }
40856   }
40857  }
40858 
40859  (void) fprintf((&__iob[2]), gettext("## Attempting to volumize %d entries in pkgmap.\n"), objects);
40860  order = (struct cl_attr **)0;
40861  if (pt = getenv("ORDER")) {
40862   pt = qstrdup(pt);
40863   (void) setlist(&order, pt);
40864   cl_putl("ORDER", order);
40865  }
40866 
40867  /* stat the intended output filesystem to get blocking information */
40868  if (pkgdev.dirname == 0) {
40869   progerr(gettext("unable to determine or access output filesystem for " "device <%s>"), device);
40870   quit(99);
40871  }
40872  if (statvfs64(pkgdev.dirname, &svfsb)) {
40873   progerr(gettext("unable to stat filesystem <%s>"), pkgdev.dirname);
40874   quit(99);
40875  }
40876 
40877  if (bsize == 0) {
40878   bsize = svfsb.f_bsize;
40879  }
40880  if (frsize == 0) {
40881   frsize = svfsb.f_frsize;
40882  }
40883 
40884  if (limit == 0)
40885   /*
40886 		 * bavail is in terms of fragment size blocks - change
40887 		 * to 512 byte blocks
40888 		 */
40889   limit = (fsblkcnt_t)(((fsblkcnt_t)frsize > 0) ?
40890    (((frsize)+((512)-1))/(512)) :
40891    (((bsize)+((512)-1))/(512))) * svfsb.f_bavail;
40892 
40893  if (ilimit == 0) {
40894   ilimit = (svfsb.f_favail > 0) ?
40895       svfsb.f_favail : svfsb.f_ffree;
40896  }
40897 
40898  nparts = splpkgmap(eptlist, eptnum, (char **)order, bsize, frsize,
40899      &limit, &ilimit, &llimit);
40900 
40901  if (nparts <= 0) {
40902   progerr(gettext("unable to volumize package"));
40903   quit(1);
40904  }
40905 
40906  if (nflag) {
40907   for (i = 0; eptlist[i]; i++)
40908    (void) ppkgmap(eptlist[i], (&__iob[1]));
40909   exit(0);
40910   /*NOTREACHED*/
40911  }
40912 
40913  (void) snprintf(pkgloc, sizeof (pkgloc), "%s/%s",
40914    pkgdev.dirname, pkginst);
40915  if (!isdir(pkgloc) && !overwrite) {
40916   progerr(gettext("must use -o option to overwrite <%s>"), pkgloc);
40917   quit(1);
40918  }
40919 
40920  /* output all environment install parameters */
40921  t_pkginfo = tempnam(tmpdir, "pkginfo");
40922  if ((fp = fopen(t_pkginfo, "w")) == 0) {
40923   progerr(gettext("unable to obtain temporary file resources, errno=%d"), (*(___errno())));
40924   exit(99);
40925  }
40926  for (i = 0; environ[i]; i++) {
40927   if (isupper(*environ[i])) {
40928    (void) fputs(environ[i], fp);
40929    (void) fputc('\n', fp);
40930   }
40931  }
40932  (void) fclose(fp);
40933 
40934  started++;
40935  (void) rrmdir(pkgloc);
40936  if (mkdir(pkgloc, 0755)) {
40937   progerr(gettext("unable to make directory <%s>"), pkgloc);
40938   quit(1);
40939  }
40940 
40941  /* determine how many packages already reside on the medium */
40942  pkgdir = pkgdev.dirname;
40943  npkgs = 0;
40944  while (pt = fpkginst("all", 0, 0))
40945   npkgs++;
40946  (void) fpkginst(0); /* free resource usage */
40947 
40948  if (nparts > 1) {
40949   if (pkgdev.mount && npkgs) {
40950    progerr(gettext("other packages found - package must fit on a single " "volume"));
40951    quit(1);
40952   }
40953  }
40954 
40955  /*
40956 	 *  update pkgmap entry for pkginfo file, since it may
40957 	 *  have changed due to command line or failure to
40958 	 *  specify all neccessary parameters
40959 	 */
40960  for (i = 0; eptlist[i]; i++) {
40961   if (eptlist[i]->ftype != 'i')
40962    continue;
40963   if (strcmp(eptlist[i]->path, "pkginfo") == 0) {
40964    svept = eptlist[i];
40965    svept->ftype = '?';
40966    svept->ainfo.local = t_pkginfo;
40967    (void) cverify(0, &svept->ftype, t_pkginfo,
40968     &svept->cinfo, 1);
40969    svept->ftype = 'i';
40970    break;
40971   }
40972  }
40973 
40974  if (nparts > 1)
40975   (void) fprintf((&__iob[2]), gettext("## Packaging %d parts.\n"), nparts);
40976  else
40977   (void) fprintf((&__iob[2]), gettext("## Packaging one part.\n"));
40978 
40979  for (part = 1; part <= nparts; part++) {
40980   if ((part > 1) && pkgdev.mount) {
40981    if (pkgumount(&pkgdev)) {
40982     progerr(gettext("unable to unmount device <%s>"), pkgdev.mount);
40983     quit(99);
40984    }
40985    if (n = pkgmount(&pkgdev, 0, part, nparts, 1))
40986     quit(n);
40987    (void) rrmdir(pkgloc);
40988    if (mkdir(pkgloc, 0555)) {
40989     progerr(gettext("unable to make directory <%s>"), pkgloc);
40990     quit(99);
40991    }
40992   }
40993   outvol(eptlist, eptnum, part, nparts);
40994 
40995   /* Validate (as much as possible) the control scripts. */
40996   if (part == 1) {
40997    char inst_path[1024];
40998 
40999    (void) fprintf((&__iob[2]), gettext("## Validating control scripts.\n"));
41000    (void) snprintf(inst_path, sizeof (inst_path),
41001      "%s/install", pkgloc);
41002    checkscripts(inst_path, 0);
41003   }
41004  }
41005 
41006  quit(0);
41007  /* LINTED: no return */
41008 }
41009 
41010 static void
41011 trap(int n)
41012 {
41013  (void) signal(2, (void (*)())1);
41014  (void) signal(1, (void (*)())1);
41015 
41016  if (n == 2)
41017   quit(3);
41018  else {
41019   (void) fprintf((&__iob[2]), gettext("%s terminated (signal %d).\n"),
41020     get_prog_name(), n);
41021   quit(99);
41022  }
41023 }
41024 
41025 static void
41026 outvol(struct cfent **eptlist, unsigned int eptnum, int part, int nparts)
41027 {
41028  FILE *fp;
41029  char *svpt, *path, temp[1024];
41030  unsigned int i;
41031 
41032 
41033  if (nparts > 1)
41034   (void) fprintf((&__iob[2]), gettext(" -- part %2d:\n"), part);
41035  if (part == 1) {
41036   /* re-write pkgmap, but exclude local pathnames */
41037   (void) snprintf(temp, sizeof (temp), "%s/pkgmap", pkgloc);
41038   if ((fp = fopen(temp, "w")) == 0) {
41039    progerr(gettext("unable to obtain temporary file resources, errno=%d"), (*(___errno())));
41040    quit(99);
41041   }
41042   (void) fprintf(fp, ": %d %llu\n", nparts, limit);
41043   for (i = 0; eptlist[i]; i++) {
41044    svpt = eptlist[i]->ainfo.local;
41045    if (!strchr("sl", eptlist[i]->ftype))
41046     eptlist[i]->ainfo.local = 0;
41047    if (ppkgmap(eptlist[i], fp)) {
41048     progerr(gettext("unable to obtain temporary file resources, errno=%d"), (*(___errno())));
41049     quit(99);
41050    }
41051    eptlist[i]->ainfo.local = svpt;
41052   }
41053   (void) fclose(fp);
41054   (void) fprintf((&__iob[2]), "%s\n", temp);
41055  }
41056 
41057  (void) snprintf(temp, sizeof (temp), "%s/pkginfo", pkgloc);
41058  if (copyf(svept->ainfo.local, temp, svept->cinfo.modtime))
41059   quit(1);
41060  (void) fprintf((&__iob[2]), "%s\n", temp);
41061 
41062  for (i = 0; i < eptnum; i++) {
41063   if (eptlist[i]->volno != part)
41064    continue;
41065   if (strchr("dxslcbp", eptlist[i]->ftype))
41066    continue;
41067   if (eptlist[i]->ftype == 'i') {
41068    if (eptlist[i] == svept)
41069     continue; /* don't copy pkginfo file */
41070    (void) snprintf(temp, sizeof (temp),
41071     "%s/install/%s", pkgloc,
41072     eptlist[i]->path);
41073    path = temp;
41074   } else
41075    path = srcpath(pkgloc, eptlist[i]->path, part, nparts);
41076   if (sflag) {
41077    if (slinkf(eptlist[i]->ainfo.local, path))
41078     quit(1);
41079   } else if (copyf(eptlist[i]->ainfo.local, path,
41080     eptlist[i]->cinfo.modtime)) {
41081    quit(1);
41082   }
41083 
41084   /*
41085 		 * If the package file attributes can be sync'd up with
41086 		 * the pkgmap, we fix the attributes here.
41087 		 */
41088   if (*(eptlist[i]->ainfo.owner) != '$' &&
41089       *(eptlist[i]->ainfo.group) != '$') {
41090    /* Clear dangerous bits. */
41091    eptlist[i]->ainfo.mode=
41092        (eptlist[i]->ainfo.mode & 0x1FF);
41093    /*
41094 			 * Make sure it can be read by the world and written
41095 			 * by the owner.
41096 			 */
41097    eptlist[i]->ainfo.mode |= 0644;
41098    if (!strchr("in", eptlist[i]->ftype)) {
41099     /* Set the safe attributes. */
41100     averify(1, &(eptlist[i]->ftype),
41101         path, &(eptlist[i]->ainfo));
41102    }
41103   }
41104 
41105   (void) fprintf((&__iob[2]), "%s\n", path);
41106  }
41107 }
41108 
41109 static void
41110 ckmissing(char *path, char type)
41111 {
41112  static char **dir;
41113  static int ndir;
41114  char *pt;
41115  int i, found;
41116 
41117  if (dir == 0) {
41118   dir = (char **)calloc(16, sizeof (char *));
41119   if (dir == 0) {
41120    progerr(gettext("memory allocation failure, errno=%d"), (*(___errno())));
41121    quit(99);
41122   }
41123  }
41124 
41125  if (strchr("dx", type)) {
41126   dir[ndir] = path;
41127   if ((++ndir % 16) == 0) {
41128    dir = (char **)realloc((void *)dir,
41129     (ndir+16)*sizeof (char *));
41130    if (dir == 0) {
41131     progerr(gettext("memory allocation failure, errno=%d"), (*(___errno())));
41132     quit(99);
41133    }
41134   }
41135   dir[ndir] = (char *)0;
41136  }
41137 
41138  pt = path;
41139  if (*pt == '/')
41140   pt++;
41141  while (pt = strchr(pt, '/')) {
41142   *pt = '\0';
41143   found = 0;
41144   for (i = 0; i < ndir; i++) {
41145    if (strcmp(path, dir[i]) == 0) {
41146     found++;
41147     break;
41148    }
41149   }
41150   if (!found) {
41151    logerr(gettext("WARNING: missing directory entry for <%s>"), path);
41152    ckmissing(qstrdup(path), 'd');
41153   }
41154   *pt++ = '/';
41155  }
41156 }
41157 
41158 static int
41159 slinkf(char *from, char *to)
41160 {
41161  char *pt;
41162 
41163  pt = to;
41164  while (pt = strchr(pt+1, '/')) {
41165   *pt = '\0';
41166   if (isdir(to) && mkdir(to, 0755)) {
41167    progerr(gettext("unable to make directory <%s>"), to);
41168    *pt = '/';
41169    return (-1);
41170   }
41171   *pt = '/';
41172  }
41173  if (symlink(from, to)) {
41174   progerr(gettext("unable to create symbolic link for <%s>"), to);
41175   return (-1);
41176  }
41177  return (0);
41178 }
41179 
41180 static void
41181 usage(void)
41182 {
41183  (void) fprintf((&__iob[2]), gettext("usage: %s [options] [VAR=value [VAR=value]] " "[pkginst]\n" "   where options may include:\n" "\t-o\n" "\t-a arch\n" "\t-v version\n" "\t-p pstamp\n" "\t-l limit\n" "\t-r rootpath\n" "\t-b basedir\n" "\t-d device\n" "\t-f protofile\n"), get_prog_name());
41184  exit(1);
41185  /*NOTREACHED*/
41186 }
41187 
41188 /*
41189  * valid_zone_attr:	Validates the zone attributes specified in
41190  *			pkginfo file for this package. The package
41191  *			can not be created with certain combinations
41192  *			of the attributes.
41193  */
41194 static boolean_t
41195 valid_zone_attr(struct cfent **eptlist)
41196 {
41197  FILE *pkginfoFP;
41198  boolean_t all_zones; /* pkg is "all zones" only */
41199  boolean_t is_hollow; /* pkg is "hollow" */
41200  boolean_t this_zone; /* pkg is "this zone" only */
41201  char pkginfoPath[1024]; /* pkginfo file path */
41202  char *pkgInst;
41203  int i;
41204 
41205  /* Path to pkginfo file within the package to be installed */
41206 
41207  this_zone = B_FALSE;
41208  for (i = 0; eptlist[i]; i++) {
41209   if (eptlist[i]->ftype != 'i')
41210    continue;
41211   if (strcmp(eptlist[i]->path, "pkginfo") == 0)
41212    (void) strcpy(pkginfoPath, eptlist[i]->ainfo.local);
41213 
41214   /*
41215 		 * Check to see if this package has a request script. If this
41216 		 * package does have a request script, then mark the package
41217 		 * for installation in this zone only. Any package with a
41218 		 * request script cannot be installed outside of the zone the
41219 		 * pkgadd command is being run in, nor can such a package be
41220 		 * installed as part of a new zone install. A new zone install
41221 		 * must be non-interactive, which is required by all packages
41222 		 * integrated into the Solaris WOS.
41223 		 * If request file is set in prototype, then this_zone is TRUE.
41224 		 */
41225   if (strcmp(eptlist[i]->path, "request") == 0)
41226    this_zone = B_TRUE;
41227  }
41228 
41229  /* Gather information from the pkginfo file */
41230 
41231  pkginfoFP = fopen(pkginfoPath, "r");
41232 
41233  if (pkginfoFP == 0) {
41234   progerr("unable to open pkginfo file <%s>: %s", pkginfoPath, strerror((*(___errno()))));
41235   return (B_FALSE);
41236  }
41237 
41238  if ((pkgInst = fpkgparam(pkginfoFP, "PKG")) == 0) {
41239   progerr(gettext("parameter <%s> is not defined in <%s>"), "PKG", pkginfoPath);
41240   return (B_FALSE);
41241  }
41242 
41243 
41244  /* Determine "HOLLOW" setting for this package */
41245  is_hollow = pkginfoParamTruth(pkginfoFP, "SUNW_PKG_HOLLOW",
41246    "true", B_FALSE);
41247 
41248  /* Determine "ALLZONES" setting for this package */
41249  all_zones = pkginfoParamTruth(pkginfoFP, "SUNW_PKG_ALLZONES",
41250    "true", B_FALSE);
41251 
41252  /* Determine "THISZONE" setting for this package, if no request file */
41253  if (!this_zone)
41254   this_zone = pkginfoParamTruth(pkginfoFP, "SUNW_PKG_THISZONE",
41255    "true", B_FALSE);
41256 
41257  /* Close pkginfo file */
41258  (void) fclose(pkginfoFP);
41259 
41260  /*
41261 	 * Validate zone attributes based on information gathered,
41262 	 * and validate the three SUNW_PKG_ options:
41263 	 *
41264 	 * -----------------------------|---------------|
41265 	 * <ALLZONES><HOLLOW><THISZONE> |  If Allowed   |
41266 	 * ----1------------------------|---------------|
41267 	 *		F F F		|	OK	|
41268 	 *		F F T		|	OK	|
41269 	 *		F T *		|	NO	|
41270 	 * ----2------------------------|---------------|
41271 	 *		T F F		|	OK	|
41272 	 *		T T F		|	OK	|
41273 	 *		T * T		|	NO	|
41274 	 * -----------------------------|---------------|
41275 	 */
41276 
41277  /* pkg "all zones" && "this zone" (#2) */
41278 
41279  if (all_zones && this_zone) {
41280   progerr("The package <%s> has <%s> = true " "and <%s> = true: the package may " "set either parameter to true, but " "may not set both parameters to " "true. NOTE: if the package " "contains a request script, it is " "treated as though it has " "<SUNW_PKG_THISZONE> = true", pkgInst,
41281       "SUNW_PKG_ALLZONES", "SUNW_PKG_THISZONE");
41282   return (B_FALSE);
41283  }
41284 
41285  /* pkg "!all zones" && "hollow" (#1) */
41286 
41287  if ((!all_zones) && is_hollow) {
41288   progerr("The package <%s> has <%s> = false " "and <%s> = true: a hollow package " "must also be set to install in all " "zones", pkgInst,
41289       "SUNW_PKG_ALLZONES", "SUNW_PKG_HOLLOW");
41290   return (B_FALSE);
41291  }
41292 
41293  return (B_TRUE);
41294 }
41295