1 # 1 "unpack_package_from_stream.c"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "unpack_package_from_stream.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 2007 Sun Microsystems, Inc.  All rights reserved.
28  * Use is subject to license terms.
29  */
30 
31 
32 /*
33  * System includes
34  */
35 
36 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
37 /*
38  * CDDL HEADER START
39  *
40  * The contents of this file are subject to the terms of the
41  * Common Development and Distribution License (the "License").
42  * You may not use this file except in compliance with the License.
43  *
44  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
45  * or http://www.opensolaris.org/os/licensing.
46  * See the License for the specific language governing permissions
47  * and limitations under the License.
48  *
49  * When distributing Covered Code, include this CDDL HEADER in each
50  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
51  * If applicable, add the following below this CDDL HEADER, with the
52  * fields enclosed by brackets "[]" replaced with your own identifying
53  * information: Portions Copyright [yyyy] [name of copyright owner]
54  *
55  * CDDL HEADER END
56  */
57 
58 /*
59  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
60  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
61  */
62 
63 /*	Copyright (c) 1988 AT&T	*/
64 /*	  All Rights Reserved  	*/
65 
66 /*
67  * User-visible pieces of the ANSI C standard I/O package.
68  */
69 
70 
71 
72 
73 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
74 /*
75  * CDDL HEADER START
76  *
77  * The contents of this file are subject to the terms of the
78  * Common Development and Distribution License (the "License").
79  * You may not use this file except in compliance with the License.
80  *
81  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
82  * or http://www.opensolaris.org/os/licensing.
83  * See the License for the specific language governing permissions
84  * and limitations under the License.
85  *
86  * When distributing Covered Code, include this CDDL HEADER in each
87  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
88  * If applicable, add the following below this CDDL HEADER, with the
89  * fields enclosed by brackets "[]" replaced with your own identifying
90  * information: Portions Copyright [yyyy] [name of copyright owner]
91  *
92  * CDDL HEADER END
93  */
94 
95 /*
96  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
97  * Copyright 2016 Joyent, Inc.
98  *
99  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
100  * Use is subject to license terms.
101  */
102 
103 
104 
105 
106 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h" 1
107 /*
108  * CDDL HEADER START
109  *
110  * The contents of this file are subject to the terms of the
111  * Common Development and Distribution License, Version 1.0 only
112  * (the "License").  You may not use this file except in compliance
113  * with the License.
114  *
115  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
116  * or http://www.opensolaris.org/os/licensing.
117  * See the License for the specific language governing permissions
118  * and limitations under the License.
119  *
120  * When distributing Covered Code, include this CDDL HEADER in each
121  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
122  * If applicable, add the following below this CDDL HEADER, with the
123  * fields enclosed by brackets "[]" replaced with your own identifying
124  * information: Portions Copyright [yyyy] [name of copyright owner]
125  *
126  * CDDL HEADER END
127  */
128 /*
129  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
130  * Use is subject to license terms.
131  */
132 /*
133  * Copyright 2015 EveryCity Ltd. All rights reserved.
134  */
135 
136 
137 
138 
139 /*
140  * This file contains definitions designed to enable different compilers
141  * to be used harmoniously on Solaris systems.
142  */
143 
144 
145 
146 
147 
148 /*
149  * Allow for version tests for compiler bugs and features.
150  */
151 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
152 /*
153  * analogous to lint's PRINTFLIKEn
154  */
155 
156 
157 
158 
159 
160 /*
161  * Handle the kernel printf routines that can take '%b' too
162  */
163 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
164 /*
165  * This one's pretty obvious -- the function never returns
166  */
167 
168 
169 /*
170  * The function is 'extern inline' and expects GNU C89 behaviour, not C99
171  * behaviour.
172  *
173  * Should only be used on 'extern inline' definitions for GCC.
174  */
175 
176 
177 
178 
179 
180 
181 /*
182  * The function has control flow such that it may return multiple times (in
183  * the manner of setjmp or vfork)
184  */
185 
186 
187 
188 
189 
190 
191 /*
192  * This is an appropriate label for functions that do not
193  * modify their arguments, e.g. strlen()
194  */
195 
196 
197 /*
198  * This is a stronger form of __pure__. Can be used for functions
199  * that do not modify their arguments and don't depend on global
200  * memory.
201  */
202 
203 
204 
205 
206 /*
207  * This attribute, attached to a variable, means that the variable is meant to
208  * be possibly unused. GCC will not produce a warning for this variable.
209  */
210 # 138 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
211 /*
212  * Shorthand versions for readability
213  */
214 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
215 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
216 /*
217  * CDDL HEADER START
218  *
219  * The contents of this file are subject to the terms of the
220  * Common Development and Distribution License (the "License").
221  * You may not use this file except in compliance with the License.
222  *
223  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
224  * or http://www.opensolaris.org/os/licensing.
225  * See the License for the specific language governing permissions
226  * and limitations under the License.
227  *
228  *
229  * When distributing Covered Code, include this CDDL HEADER in each
230  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
231  * If applicable, add the following below this CDDL HEADER, with the
232  * fields enclosed by brackets "[]" replaced with your own identifying
233  * information: Portions Copyright [yyyy] [name of copyright owner]
234  *
235  * CDDL HEADER END
236  */
237 
238 /*
239  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
240  * Use is subject to license terms.
241  * Copyright 2016 Joyent, Inc.
242  */
243 
244 
245 
246 
247 /*
248  * This header file serves to group a set of well known defines and to
249  * set these for each instruction set architecture.  These defines may
250  * be divided into two groups;  characteristics of the processor and
251  * implementation choices for Solaris on a processor.
252  *
253  * Processor Characteristics:
254  *
255  * _LITTLE_ENDIAN / _BIG_ENDIAN:
256  *	The natural byte order of the processor.  A pointer to an int points
257  *	to the least/most significant byte of that int.
258  *
259  * _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
260  *	The processor specific direction of stack growth.  A push onto the
261  *	stack increases/decreases the stack pointer, so it stores data at
262  *	successively higher/lower addresses.  (Stackless machines ignored
263  *	without regrets).
264  *
265  * _LONG_LONG_HTOL / _LONG_LONG_LTOH:
266  *	A pointer to a long long points to the most/least significant long
267  *	within that long long.
268  *
269  * _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
270  *	The C compiler assigns bit fields from the high/low to the low/high end
271  *	of an int (most to least significant vs. least to most significant).
272  *
273  * _IEEE_754:
274  *	The processor (or supported implementations of the processor)
275  *	supports the ieee-754 floating point standard.  No other floating
276  *	point standards are supported (or significant).  Any other supported
277  *	floating point formats are expected to be cased on the ISA processor
278  *	symbol.
279  *
280  * _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
281  *	The C Compiler implements objects of type `char' as `unsigned' or
282  *	`signed' respectively.  This is really an implementation choice of
283  *	the compiler writer, but it is specified in the ABI and tends to
284  *	be uniform across compilers for an instruction set architecture.
285  *	Hence, it has the properties of a processor characteristic.
286  *
287  * _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
288  * _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
289  * _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
290  *	The ABI defines alignment requirements of each of the primitive
291  *	object types.  Some, if not all, may be hardware requirements as
292  * 	well.  The values are expressed in "byte-alignment" units.
293  *
294  * _MAX_ALIGNMENT:
295  *	The most stringent alignment requirement as specified by the ABI.
296  *	Equal to the maximum of all the above _XXX_ALIGNMENT values.
297  *
298  * _MAX_ALIGNMENT_TYPE:
299  * 	The name of the C type that has the value descried in _MAX_ALIGNMENT.
300  *
301  * _ALIGNMENT_REQUIRED:
302  *	True or false (1 or 0) whether or not the hardware requires the ABI
303  *	alignment.
304  *
305  * _LONG_LONG_ALIGNMENT_32
306  *	The 32-bit ABI supported by a 64-bit kernel may have different
307  *	alignment requirements for primitive object types.  The value of this
308  *	identifier is expressed in "byte-alignment" units.
309  *
310  * _HAVE_CPUID_INSN
311  *	This indicates that the architecture supports the 'cpuid'
312  *	instruction as defined by Intel.  (Intel allows other vendors
313  *	to extend the instruction for their own purposes.)
314  *
315  *
316  * Implementation Choices:
317  *
318  * _ILP32 / _LP64:
319  *	This specifies the compiler data type implementation as specified in
320  *	the relevant ABI.  The choice between these is strongly influenced
321  *	by the underlying hardware, but is not absolutely tied to it.
322  *	Currently only two data type models are supported:
323  *
324  *	_ILP32:
325  *		Int/Long/Pointer are 32 bits.  This is the historical UNIX
326  *		and Solaris implementation.  Due to its historical standing,
327  *		this is the default case.
328  *
329  *	_LP64:
330  *		Long/Pointer are 64 bits, Int is 32 bits.  This is the chosen
331  *		implementation for 64-bit ABIs such as SPARC V9.
332  *
333  *	_I32LPx:
334  *		A compilation environment where 'int' is 32-bit, and
335  *		longs and pointers are simply the same size.
336  *
337  *	In all cases, Char is 8 bits and Short is 16 bits.
338  *
339  * _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
340  *	This specifies the form of the disk VTOC (or label):
341  *
342  *	_SUNOS_VTOC_8:
343  *		This is a VTOC form which is upwardly compatible with the
344  *		SunOS 4.x disk label and allows 8 partitions per disk.
345  *
346  *	_SUNOS_VTOC_16:
347  *		In this format the incore vtoc image matches the ondisk
348  *		version.  It allows 16 slices per disk, and is not
349  *		compatible with the SunOS 4.x disk label.
350  *
351  *	Note that these are not the only two VTOC forms possible and
352  *	additional forms may be added.  One possible form would be the
353  *	SVr4 VTOC form.  The symbol for that is reserved now, although
354  *	it is not implemented.
355  *
356  *	_SVR4_VTOC_16:
357  *		This VTOC form is compatible with the System V Release 4
358  *		VTOC (as implemented on the SVr4 Intel and 3b ports) with
359  *		16 partitions per disk.
360  *
361  *
362  * _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
363  *	This describes the type of addresses used by system DMA:
364  *
365  *	_DMA_USES_PHYSADDR:
366  *		This type of DMA, used in the x86 implementation,
367  *		requires physical addresses for DMA buffers.  The 24-bit
368  *		addresses used by some legacy boards is the source of the
369  *		"low-memory" (<16MB) requirement for some devices using DMA.
370  *
371  *	_DMA_USES_VIRTADDR:
372  *		This method of DMA allows the use of virtual addresses for
373  *		DMA transfers.
374  *
375  * _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
376  *      This indicates the presence/absence of an fdisk table.
377  *
378  *      _FIRMWARE_NEEDS_FDISK
379  *              The fdisk table is required by system firmware.  If present,
380  *              it allows a disk to be subdivided into multiple fdisk
381  *              partitions, each of which is equivalent to a separate,
382  *              virtual disk.  This enables the co-existence of multiple
383  *              operating systems on a shared hard disk.
384  *
385  *      _NO_FDISK_PRESENT
386  *              If the fdisk table is absent, it is assumed that the entire
387  *              media is allocated for a single operating system.
388  *
389  * _HAVE_TEM_FIRMWARE
390  *	Defined if this architecture has the (fallback) option of
391  *	using prom_* calls for doing I/O if a suitable kernel driver
392  *	is not available to do it.
393  *
394  * _DONT_USE_1275_GENERIC_NAMES
395  *		Controls whether or not device tree node names should
396  *		comply with the IEEE 1275 "Generic Names" Recommended
397  *		Practice. With _DONT_USE_GENERIC_NAMES, device-specific
398  *		names identifying the particular device will be used.
399  *
400  * __i386_COMPAT
401  *	This indicates whether the i386 ABI is supported as a *non-native*
402  *	mode for the platform.  When this symbol is defined:
403  *	-	32-bit xstat-style system calls are enabled
404  *	-	32-bit xmknod-style system calls are enabled
405  *	-	32-bit system calls use i386 sizes -and- alignments
406  *
407  *	Note that this is NOT defined for the i386 native environment!
408  *
409  * __x86
410  *	This is ONLY a synonym for defined(__i386) || defined(__amd64)
411  *	which is useful only insofar as these two architectures share
412  *	common attributes.  Analogous to __sparc.
413  *
414  * _PSM_MODULES
415  *	This indicates whether or not the implementation uses PSM
416  *	modules for processor support, reading /etc/mach from inside
417  *	the kernel to extract a list.
418  *
419  * _RTC_CONFIG
420  *	This indicates whether or not the implementation uses /etc/rtc_config
421  *	to configure the real-time clock in the kernel.
422  *
423  * _UNIX_KRTLD
424  *	This indicates that the implementation uses a dynamically
425  *	linked unix + krtld to form the core kernel image at boot
426  *	time, or (in the absence of this symbol) a prelinked kernel image.
427  *
428  * _OBP
429  *	This indicates the firmware interface is OBP.
430  *
431  * _SOFT_HOSTID
432  *	This indicates that the implementation obtains the hostid
433  *	from the file /etc/hostid, rather than from hardware.
434  */
435 
436 
437 
438 
439 
440 /*
441  * The following set of definitions characterize Solaris on AMD's
442  * 64-bit systems.
443  */
444 # 305 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
445 /*
446  * Define the appropriate "processor characteristics"
447  */
448 # 333 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
449 /*
450  * Define the appropriate "implementation choices".
451  */
452 # 351 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
453 /*
454  * The following set of definitions characterize the Solaris on SPARC systems.
455  *
456  * The symbol __sparc indicates any of the SPARC family of processor
457  * architectures.  This includes SPARC V7, SPARC V8 and SPARC V9.
458  *
459  * The symbol __sparcv8 indicates the 32-bit SPARC V8 architecture as defined
460  * by Version 8 of the SPARC Architecture Manual.  (SPARC V7 is close enough
461  * to SPARC V8 for the former to be subsumed into the latter definition.)
462  *
463  * The symbol __sparcv9 indicates the 64-bit SPARC V9 architecture as defined
464  * by Version 9 of the SPARC Architecture Manual.
465  *
466  * The symbols __sparcv8 and __sparcv9 are mutually exclusive, and are only
467  * relevant when the symbol __sparc is defined.
468  */
469 /*
470  * XXX Due to the existence of 5110166, "defined(__sparcv9)" needs to be added
471  * to support backwards builds.  This workaround should be removed in s10_71.
472  */
473 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
474 
475 
476 
477 
478 
479 /*
480  * Values of _POSIX_C_SOURCE
481  *
482  *		undefined   not a POSIX compilation
483  *		1	    POSIX.1-1990 compilation
484  *		2	    POSIX.2-1992 compilation
485  *		199309L	    POSIX.1b-1993 compilation (Real Time)
486  *		199506L	    POSIX.1c-1995 compilation (POSIX Threads)
487  *		200112L	    POSIX.1-2001 compilation (Austin Group Revision)
488  *		200809L     POSIX.1-2008 compilation
489  */
490 
491 
492 
493 
494 /*
495  * The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
496  * and _STDC_C99 are Sun implementation specific macros created in order to
497  * compress common standards specified feature test macros for easier reading.
498  * These macros should not be used by the application developer as
499  * unexpected results may occur. Instead, the user should reference
500  * standards(5) for correct usage of the standards feature test macros.
501  *
502  * __XOPEN_OR_POSIX     Used in cases where a symbol is defined by both
503  *                      X/Open or POSIX or in the negative, when neither
504  *                      X/Open or POSIX defines a symbol.
505  *
506  * _STRICT_STDC         __STDC__ is specified by the C Standards and defined
507  *                      by the compiler. For Sun compilers the value of
508  *                      __STDC__ is either 1, 0, or not defined based on the
509  *                      compilation mode (see cc(1)). When the value of
510  *                      __STDC__ is 1 and in the absence of any other feature
511  *                      test macros, the namespace available to the application
512  *                      is limited to only those symbols defined by the C
513  *                      Standard. _STRICT_STDC provides a more readable means
514  *                      of identifying symbols defined by the standard, or in
515  *                      the negative, symbols that are extensions to the C
516  *                      Standard. See additional comments for GNU C differences.
517  *
518  * _STDC_C99            __STDC_VERSION__ is specified by the C standards and
519  *                      defined by the compiler and indicates the version of
520  *                      the C standard. A value of 199901L indicates a
521  *                      compiler that complies with ISO/IEC 9899:1999, other-
522  *                      wise known as the C99 standard.
523  *
524  * _STDC_C11		Like _STDC_C99 except that the value of __STDC_VERSION__
525  *                      is 201112L indicating a compiler that compiles with
526  *                      ISO/IEXC 9899:2011, otherwise known as the C11 standard.
527  *
528  * _STRICT_SYMBOLS	Used in cases where symbol visibility is restricted
529  *                      by the standards, and the user has not explicitly
530  *                      relaxed the strictness via __EXTENSIONS__.
531  */
532 
533 
534 
535 
536 
537 /*
538  * ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
539  * 99899:2011 specify the following predefined macro name:
540  *
541  * __STDC__	The integer constant 1, intended to indicate a conforming
542  *		implementation.
543  *
544  * Furthermore, a strictly conforming program shall use only those features
545  * of the language and library specified in these standards. A conforming
546  * implementation shall accept any strictly conforming program.
547  *
548  * Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
549  * strictly conforming environments and __STDC__ to 0 for environments that
550  * use ANSI C semantics but allow extensions to the C standard. For non-ANSI
551  * C semantics, Sun's C compiler does not define __STDC__.
552  *
553  * The GNU C project interpretation is that __STDC__ should always be defined
554  * to 1 for compilation modes that accept ANSI C syntax regardless of whether
555  * or not extensions to the C standard are used. Violations of conforming
556  * behavior are conditionally flagged as warnings via the use of the
557  * -pedantic option. In addition to defining __STDC__ to 1, the GNU C
558  * compiler also defines __STRICT_ANSI__ as a means of specifying strictly
559  * conforming environments using the -ansi or -std=<standard> options.
560  *
561  * In the absence of any other compiler options, Sun and GNU set the value
562  * of __STDC__ as follows when using the following options:
563  *
564  *				Value of __STDC__  __STRICT_ANSI__
565  *
566  * cc -Xa (default)			0	      undefined
567  * cc -Xt (transitional)		0             undefined
568  * cc -Xc (strictly conforming)		1	      undefined
569  * cc -Xs (K&R C)		    undefined	      undefined
570  *
571  * gcc (default)			1	      undefined
572  * gcc -ansi, -std={c89, c99,...)  	1              defined
573  * gcc -traditional (K&R)	    undefined	      undefined
574  *
575  * The default compilation modes for Sun C compilers versus GNU C compilers
576  * results in a differing value for __STDC__ which results in a more
577  * restricted namespace when using Sun compilers. To allow both GNU and Sun
578  * interpretations to peacefully co-exist, we use the following Sun
579  * implementation _STRICT_STDC_ macro:
580  */
581 # 150 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
582 /*
583  * Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
584  */
585 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
586 /*
587  * Use strict symbol visibility.
588  */
589 
590 
591 
592 
593 
594 /*
595  * Large file interfaces:
596  *
597  *	_LARGEFILE_SOURCE
598  *		1		large file-related additions to POSIX
599  *				interfaces requested (fseeko, etc.)
600  *	_LARGEFILE64_SOURCE
601  *		1		transitional large-file-related interfaces
602  *				requested (seek64, stat64, etc.)
603  *
604  * The corresponding announcement macros are respectively:
605  *	_LFS_LARGEFILE
606  *	_LFS64_LARGEFILE
607  * (These are set in <unistd.h>.)
608  *
609  * Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
610  * well.
611  *
612  * The large file interfaces are made visible regardless of the initial values
613  * of the feature test macros under certain circumstances:
614  *    -	If no explicit standards-conforming environment is requested (neither
615  *	of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
616  *	__STDC__ does not imply standards conformance).
617  *    -	Extended system interfaces are explicitly requested (__EXTENSIONS__
618  * 	is defined).
619  *    -	Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
620  *	defined).  (Note that this dependency is an artifact of the current
621  *	kernel implementation and may change in future releases.)
622  */
623 # 210 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
624 /*
625  * Large file compilation environment control:
626  *
627  * The setting of _FILE_OFFSET_BITS controls the size of various file-related
628  * types and governs the mapping between file-related source function symbol
629  * names and the corresponding binary entry points.
630  *
631  * In the 32-bit environment, the default value is 32; if not set, set it to
632  * the default here, to simplify tests in other headers.
633  *
634  * In the 64-bit compilation environment, the only value allowed is 64.
635  */
636 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
637 /*
638  * Use of _XOPEN_SOURCE
639  *
640  * The following X/Open specifications are supported:
641  *
642  * X/Open Portability Guide, Issue 3 (XPG3)
643  * X/Open CAE Specification, Issue 4 (XPG4)
644  * X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
645  * X/Open CAE Specification, Issue 5 (XPG5)
646  * Open Group Technical Standard, Issue 6 (XPG6), also referred to as
647  *    IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
648  * Open Group Technical Standard, Issue 7 (XPG7), also referred to as
649  *    IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
650  *
651  * XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
652  * XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
653  *     Version 2 (SUSv2)
654  * XPG6 is the result of a merge of the X/Open and POSIX specifications
655  *     and as such is also referred to as IEEE Std. 1003.1-2001 in
656  *     addition to UNIX 03 and SUSv3.
657  * XPG7 is also referred to as UNIX 08 and SUSv4.
658  *
659  * When writing a conforming X/Open application, as per the specification
660  * requirements, the appropriate feature test macros must be defined at
661  * compile time. These are as follows. For more info, see standards(5).
662  *
663  * Feature Test Macro				     Specification
664  * ------------------------------------------------  -------------
665  * _XOPEN_SOURCE                                         XPG3
666  * _XOPEN_SOURCE && _XOPEN_VERSION = 4                   XPG4
667  * _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1           XPG4v2
668  * _XOPEN_SOURCE = 500                                   XPG5
669  * _XOPEN_SOURCE = 600  (or POSIX_C_SOURCE=200112L)      XPG6
670  * _XOPEN_SOURCE = 700  (or POSIX_C_SOURCE=200809L)      XPG7
671  *
672  * In order to simplify the guards within the headers, the following
673  * implementation private test macros have been created. Applications
674  * must NOT use these private test macros as unexpected results will
675  * occur.
676  *
677  * Note that in general, the use of these private macros is cumulative.
678  * For example, the use of _XPG3 with no other restrictions on the X/Open
679  * namespace will make the symbols visible for XPG3 through XPG6
680  * compilation environments. The use of _XPG4_2 with no other X/Open
681  * namespace restrictions indicates that the symbols were introduced in
682  * XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
683  * environments, but not for XPG3 or XPG4 compilation environments.
684  *
685  * _XPG3    X/Open Portability Guide, Issue 3 (XPG3)
686  * _XPG4    X/Open CAE Specification, Issue 4 (XPG4)
687  * _XPG4_2  X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
688  * _XPG5    X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
689  * _XPG6    Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
690  * _XPG7    Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
691  */
692 
693 /* X/Open Portability Guide, Issue 3 */
694 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
695 /*
696  * _XOPEN_VERSION is defined by the X/Open specifications and is not
697  * normally defined by the application, except in the case of an XPG4
698  * application.  On the implementation side, _XOPEN_VERSION defined with
699  * the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
700  * with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
701  * _XOPEN_VERSION  defined with a value of 500 indicates an XPG5 (UNIX 98)
702  * application and with a value of 600 indicates an XPG6 (UNIX 03)
703  * application and with a value of 700 indicates an XPG7 (UNIX 08).
704  * The appropriate version is determined by the use of the
705  * feature test macros described earlier.  The value of _XOPEN_VERSION
706  * defaults to 3 otherwise indicating support for XPG3 applications.
707  */
708 # 368 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
709 /*
710  * ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
711  * conforming environments.  ISO 9899:1999 says it does.
712  *
713  * The presence of _LONGLONG_TYPE says "long long exists" which is therefore
714  * defined in all but strictly conforming environments that disallow it.
715  */
716 # 388 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
717 /*
718  * The following macro defines a value for the ISO C99 restrict
719  * keyword so that _RESTRICT_KYWD resolves to "restrict" if
720  * an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
721  * if any other compiler is used. This allows for the use of single
722  * prototype declarations regardless of compiler version.
723  */
724 # 410 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
725 /*
726  * The following macro defines a value for the ISO C11 _Noreturn
727  * keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
728  * an ISO C11 compiler is used and "" (null string) if any other
729  * compiler is used. This allows for the use of single prototype
730  * declarations regardless of compiler version.
731  */
732 
733 
734 
735 
736 
737 
738 
739 /*
740  * The following macro indicates header support for the ANSI C++
741  * standard.  The ISO/IEC designation for this is ISO/IEC FDIS 14882.
742  */
743 
744 
745 /*
746  * The following macro indicates header support for the C99 standard,
747  * ISO/IEC 9899:1999, Programming Languages - C.
748  */
749 
750 
751 /*
752  * The following macro indicates header support for the C99 standard,
753  * ISO/IEC 9899:2011, Programming Languages - C.
754  */
755 
756 
757 /*
758  * The following macro indicates header support for DTrace. The value is an
759  * integer that corresponds to the major version number for DTrace.
760  */
761 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
762 
763 
764 
765 
766 
767 /*
768  * Do all of our 'redefine_extname' processing before
769  * declarations of the associated functions are seen.
770  * This is necessary to keep gcc happy.
771  */
772 
773 
774 /* large file compilation environment setup */
775 
776 
777 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
778 #pragma redefine_extname fopen fopen64
779 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
780 
781 
782 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
783 #pragma redefine_extname freopen freopen64
784 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
785 
786 
787 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
788 #pragma redefine_extname tmpfile tmpfile64
789 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
790 
791 
792 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
793 #pragma redefine_extname fgetpos fgetpos64
794 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
795 
796 
797 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
798 #pragma redefine_extname fsetpos fsetpos64
799 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
800 
801 
802 
803 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
804 #pragma redefine_extname fseeko fseeko64
805 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
806 
807 
808 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
809 #pragma redefine_extname ftello ftello64
810 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
811 
812 
813 
814 
815 /* In the LP64 compilation environment, all APIs are already large file */
816 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
817 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 1
818 /*
819  * CDDL HEADER START
820  *
821  * The contents of this file are subject to the terms of the
822  * Common Development and Distribution License, Version 1.0 only
823  * (the "License").  You may not use this file except in compliance
824  * with the License.
825  *
826  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
827  * or http://www.opensolaris.org/os/licensing.
828  * See the License for the specific language governing permissions
829  * and limitations under the License.
830  *
831  * When distributing Covered Code, include this CDDL HEADER in each
832  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
833  * If applicable, add the following below this CDDL HEADER, with the
834  * fields enclosed by brackets "[]" replaced with your own identifying
835  * information: Portions Copyright [yyyy] [name of copyright owner]
836  *
837  * CDDL HEADER END
838  */
839 /*
840  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
841  * Copyright 2014 PALO, Richard.
842  *
843  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
844  * Use is subject to license terms.
845  */
846 
847 /*	Copyright (c) 1988 AT&T	*/
848 /*	  All Rights Reserved  	*/
849 
850 /*
851  * An application should not include this header directly.  Instead it
852  * should be included only through the inclusion of other Sun headers.
853  *
854  * The contents of this header is limited to identifiers specified in the
855  * C Standard.  Any new identifiers specified in future amendments to the
856  * C Standard must be placed in this header.  If these new identifiers
857  * are required to also be in the C++ Standard "std" namespace, then for
858  * anything other than macro definitions, corresponding "using" directives
859  * must also be added to <stdio.h>.
860  */
861 
862 /*
863  * User-visible pieces of the ANSI C standard I/O package.
864  */
865 
866 
867 
868 
869 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
870 /*
871  * CDDL HEADER START
872  *
873  * The contents of this file are subject to the terms of the
874  * Common Development and Distribution License (the "License").
875  * You may not use this file except in compliance with the License.
876  *
877  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
878  * or http://www.opensolaris.org/os/licensing.
879  * See the License for the specific language governing permissions
880  * and limitations under the License.
881  *
882  * When distributing Covered Code, include this CDDL HEADER in each
883  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
884  * If applicable, add the following below this CDDL HEADER, with the
885  * fields enclosed by brackets "[]" replaced with your own identifying
886  * information: Portions Copyright [yyyy] [name of copyright owner]
887  *
888  * CDDL HEADER END
889  */
890 
891 /*
892  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
893  * Copyright 2016 Joyent, Inc.
894  *
895  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
896  * Use is subject to license terms.
897  */
898 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
899 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
900 /*
901  * This file and its contents are supplied under the terms of the
902  * Common Development and Distribution License ("CDDL"), version 1.0.
903  * You may only use this file in accordance with the terms of version
904  * 1.0 of the CDDL.
905  *
906  * A full copy of the text of the CDDL should have accompanied this
907  * source.  A copy of the CDDL is also available via the Internet at
908  * http://www.illumos.org/license/CDDL.
909  */
910 
911 /*
912  * Copyright 2014-2016 PALO, Richard.
913  */
914 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
915 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1
916 /*
917  * CDDL HEADER START
918  *
919  * The contents of this file are subject to the terms of the
920  * Common Development and Distribution License, Version 1.0 only
921  * (the "License").  You may not use this file except in compliance
922  * with the License.
923  *
924  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
925  * or http://www.opensolaris.org/os/licensing.
926  * See the License for the specific language governing permissions
927  * and limitations under the License.
928  *
929  * When distributing Covered Code, include this CDDL HEADER in each
930  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
931  * If applicable, add the following below this CDDL HEADER, with the
932  * fields enclosed by brackets "[]" replaced with your own identifying
933  * information: Portions Copyright [yyyy] [name of copyright owner]
934  *
935  * CDDL HEADER END
936  */
937 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
938 /*	  All Rights Reserved	*/
939 
940 
941 /*
942  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
943  *
944  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
945  * Use is subject to license terms.
946  */
947 
948 
949 
950 
951 /*
952  * An application should not include this header directly.  Instead it
953  * should be included only through the inclusion of other Sun headers.
954  *
955  * The purpose of this header is to provide the type definitions for
956  * the va_list argument used by a number of printf and printf like
957  * functions. The headers that define these various function prototypes
958  * #include this header directly. These include but are not necessarily
959  * limited to <stdio.h>, <stdio_iso.h>, <wchar_iso.h>, <strlog.h> and
960  * <syslog.h>. The type definitions included in this header are for
961  * the benefit of consumers of va_list.
962  *
963  * Any application that accepts variable argument lists must as documented,
964  * include either <varargs.h> or the preferred <stdarg.h>. Doing so will
965  * pull in the appropriate compiler protocols defined in <sys/va_impl.h>
966  * which is in turn is included by <varargs.h> and <stdarg.h>. See comments
967  * in <sys/va_impl.h> for more detailed information regarding implementation
968  * and compiler specific protocols.
969  */
970 
971 /*
972  * The common definitions exported by this header or compilers using
973  * this header are:
974  *
975  * the identifier __builtin_va_alist for the variable list pseudo parameter
976  * the type __va_alist_type for the variable list pseudo parameter
977  * the type __va_list defining the type of the variable list iterator
978  *
979  * The feature macros (e.g. __BUILTIN_VA_STRUCT) and compiler macros
980  * (__GNUC__) and processor macros (e.g. __amd64) are intended to be
981  * defined by the compilation system, not the user of the system.
982  */
983 
984 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
985 /*
986  * CDDL HEADER START
987  *
988  * The contents of this file are subject to the terms of the
989  * Common Development and Distribution License (the "License").
990  * You may not use this file except in compliance with the License.
991  *
992  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
993  * or http://www.opensolaris.org/os/licensing.
994  * See the License for the specific language governing permissions
995  * and limitations under the License.
996  *
997  *
998  * When distributing Covered Code, include this CDDL HEADER in each
999  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1000  * If applicable, add the following below this CDDL HEADER, with the
1001  * fields enclosed by brackets "[]" replaced with your own identifying
1002  * information: Portions Copyright [yyyy] [name of copyright owner]
1003  *
1004  * CDDL HEADER END
1005  */
1006 
1007 /*
1008  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1009  * Use is subject to license terms.
1010  * Copyright 2016 Joyent, Inc.
1011  */
1012 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 2
1013 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h"
1014 typedef __builtin_va_list __gnuc_va_list;
1015 /*
1016  * XX64 This seems unnecessary .. but is needed because vcmn_err is
1017  *	defined with __va_list instead of plain old va_list.
1018  *	Perhaps that should be fixed!
1019  */
1020 typedef __builtin_va_list __va_list;
1021 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1022 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h" 1
1023 /*
1024  * CDDL HEADER START
1025  *
1026  * The contents of this file are subject to the terms of the
1027  * Common Development and Distribution License, Version 1.0 only
1028  * (the "License").  You may not use this file except in compliance
1029  * with the License.
1030  *
1031  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1032  * or http://www.opensolaris.org/os/licensing.
1033  * See the License for the specific language governing permissions
1034  * and limitations under the License.
1035  *
1036  * When distributing Covered Code, include this CDDL HEADER in each
1037  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1038  * If applicable, add the following below this CDDL HEADER, with the
1039  * fields enclosed by brackets "[]" replaced with your own identifying
1040  * information: Portions Copyright [yyyy] [name of copyright owner]
1041  *
1042  * CDDL HEADER END
1043  */
1044 /*
1045  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1046  * Use is subject to license terms.
1047  */
1048 
1049 
1050 
1051 
1052 #pragma ident "%Z%%M%	%I%	%E% SMI"
1053 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h"
1054 typedef struct __FILE __FILE;
1055 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1056 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 1
1057 /*
1058  * CDDL HEADER START
1059  *
1060  * The contents of this file are subject to the terms of the
1061  * Common Development and Distribution License (the "License").
1062  * You may not use this file except in compliance with the License.
1063  *
1064  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1065  * or http://www.opensolaris.org/os/licensing.
1066  * See the License for the specific language governing permissions
1067  * and limitations under the License.
1068  *
1069  * When distributing Covered Code, include this CDDL HEADER in each
1070  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1071  * If applicable, add the following below this CDDL HEADER, with the
1072  * fields enclosed by brackets "[]" replaced with your own identifying
1073  * information: Portions Copyright [yyyy] [name of copyright owner]
1074  *
1075  * CDDL HEADER END
1076  */
1077 
1078 /*
1079  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1080  * Use is subject to license terms.
1081  */
1082 
1083 
1084 
1085 
1086 #pragma ident "%Z%%M%	%I%	%E% SMI"
1087 
1088 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1089 /*
1090  * CDDL HEADER START
1091  *
1092  * The contents of this file are subject to the terms of the
1093  * Common Development and Distribution License (the "License").
1094  * You may not use this file except in compliance with the License.
1095  *
1096  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1097  * or http://www.opensolaris.org/os/licensing.
1098  * See the License for the specific language governing permissions
1099  * and limitations under the License.
1100  *
1101  *
1102  * When distributing Covered Code, include this CDDL HEADER in each
1103  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1104  * If applicable, add the following below this CDDL HEADER, with the
1105  * fields enclosed by brackets "[]" replaced with your own identifying
1106  * information: Portions Copyright [yyyy] [name of copyright owner]
1107  *
1108  * CDDL HEADER END
1109  */
1110 
1111 /*
1112  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1113  * Use is subject to license terms.
1114  * Copyright 2016 Joyent, Inc.
1115  */
1116 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 2
1117 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h"
1118 struct __FILE /* needs to be binary-compatible with old versions */
1119 {
1120 
1121 
1122 
1123 
1124  int _cnt; /* number of available characters in buffer */
1125  unsigned char *_ptr; /* next character from/to here in buffer */
1126 
1127  unsigned char *_base; /* the buffer */
1128  unsigned char _flag; /* the state of the stream */
1129  unsigned char _magic; /* Old home of the file descriptor */
1130     /* Only fileno(3C) can retrieve the value now */
1131  unsigned __orientation:2; /* the orientation of the stream */
1132  unsigned __ionolock:1; /* turn off implicit locking */
1133  unsigned __seekable:1; /* is file seekable? */
1134  unsigned __extendedfd:1; /* enable extended FILE */
1135  unsigned __xf_nocheck:1; /* no extended FILE runtime check */
1136  unsigned __filler:10;
1137 };
1138 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1139 
1140 /*
1141  * If feature test macros are set that enable interfaces that use types
1142  * defined in <sys/types.h>, get those types by doing the include.
1143  *
1144  * Note that in asking for the interfaces associated with this feature test
1145  * macro one also asks for definitions of the POSIX types.
1146  */
1147 
1148 
1149 
1150 
1151 
1152 
1153 /*
1154  * The following typedefs are adopted from ones in <sys/types.h> (with leading
1155  * underscores added to avoid polluting the ANSI C name space).  See the
1156  * commentary there for further explanation.
1157  */
1158 
1159 typedef long long __longlong_t;
1160 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1161 typedef __FILE FILE;
1162 
1163 
1164 
1165 
1166 
1167 
1168 
1169 typedef unsigned int size_t; /* (historical version) */
1170 
1171 
1172 
1173 
1174 
1175 
1176 typedef __longlong_t fpos_t;
1177 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1178 /*
1179  * The value of _NFILE is defined in the Processor Specific ABI.  The value
1180  * is chosen for historical reasons rather than for truly processor related
1181  * attribute.  Note that the SPARC Processor Specific ABI uses the common
1182  * UNIX historical value of 20 so it is allowed to fall through.
1183  */
1184 # 156 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1185 extern __FILE __iob[60];
1186 # 191 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1187 extern int remove(const char *);
1188 extern int rename(const char *, const char *);
1189 extern FILE *tmpfile(void);
1190 extern char *tmpnam(char *);
1191 extern int fclose(FILE *);
1192 extern int fflush(FILE *);
1193 extern FILE *fopen(const char *, const char *);
1194 extern FILE *freopen(const char *,
1195    const char *, FILE *);
1196 extern void setbuf(FILE *, char *);
1197 extern int setvbuf(FILE *, char *, int,
1198    size_t);
1199 /* PRINTFLIKE2 */
1200 extern int fprintf(FILE *, const char *, ...);
1201 /* SCANFLIKE2 */
1202 extern int fscanf(FILE *, const char *, ...);
1203 /* PRINTFLIKE1 */
1204 extern int printf(const char *, ...);
1205 /* SCANFLIKE1 */
1206 extern int scanf(const char *, ...);
1207 /* PRINTFLIKE2 */
1208 extern int sprintf(char *, const char *, ...);
1209 /* SCANFLIKE2 */
1210 extern int sscanf(const char *,
1211    const char *, ...);
1212 extern int vfprintf(FILE *, const char *,
1213    __va_list);
1214 extern int vprintf(const char *, __va_list);
1215 extern int vsprintf(char *, const char *,
1216    __va_list);
1217 extern int fgetc(FILE *);
1218 extern char *fgets(char *, int, FILE *);
1219 extern int fputc(int, FILE *);
1220 extern int fputs(const char *, FILE *);
1221 
1222 
1223 extern int getc(FILE *);
1224 extern int putc(int, FILE *);
1225 
1226 
1227 
1228 extern int getchar(void);
1229 extern int putchar(int);
1230 
1231 
1232 /*
1233  * ISO/IEC C11 removed gets from the standard library. Therefore if a strict C11
1234  * environment has been requested, we remove it.
1235  */
1236 
1237 extern char *gets(char *);
1238 
1239 extern int puts(const char *);
1240 extern int ungetc(int, FILE *);
1241 extern size_t fread(void *, size_t, size_t,
1242  FILE *);
1243 extern size_t fwrite(const void *, size_t, size_t,
1244  FILE *);
1245 
1246 extern int fgetpos(FILE *, fpos_t *);
1247 extern int fsetpos(FILE *, const fpos_t *);
1248 
1249 extern int fseek(FILE *, long, int);
1250 extern long ftell(FILE *);
1251 extern void rewind(FILE *);
1252 
1253 
1254 extern void clearerr(FILE *);
1255 extern int feof(FILE *);
1256 extern int ferror(FILE *);
1257 
1258 extern void perror(const char *);
1259 
1260 
1261 extern int __filbuf(FILE *);
1262 extern int __flsbuf(int, FILE *);
1263 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1264 
1265 /*
1266  * If feature test macros are set that enable interfaces that use types
1267  * defined in <sys/types.h>, get those types by doing the include.
1268  *
1269  * Note that in asking for the interfaces associated with this feature test
1270  * macro one also asks for definitions of the POSIX types.
1271  */
1272 
1273 /*
1274  * Allow global visibility for symbols defined in
1275  * C++ "std" namespace in <iso/stdio_iso.h>.
1276  */
1277 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1278 /*
1279  * This header needs to be included here because it relies on the global
1280  * visibility of FILE and size_t in the C++ environment.
1281  */
1282 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h" 1
1283 /*
1284  * CDDL HEADER START
1285  *
1286  * The contents of this file are subject to the terms of the
1287  * Common Development and Distribution License, Version 1.0 only
1288  * (the "License").  You may not use this file except in compliance
1289  * with the License.
1290  *
1291  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1292  * or http://www.opensolaris.org/os/licensing.
1293  * See the License for the specific language governing permissions
1294  * and limitations under the License.
1295  *
1296  * When distributing Covered Code, include this CDDL HEADER in each
1297  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1298  * If applicable, add the following below this CDDL HEADER, with the
1299  * fields enclosed by brackets "[]" replaced with your own identifying
1300  * information: Portions Copyright [yyyy] [name of copyright owner]
1301  *
1302  * CDDL HEADER END
1303  */
1304 /*
1305  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1306  *
1307  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1308  * Use is subject to license terms.
1309  */
1310 
1311 /*
1312  * An application should not include this header directly.  Instead it
1313  * should be included only through the inclusion of other Sun headers.
1314  *
1315  * The contents of this header is limited to identifiers specified in
1316  * the C99 standard and in conflict with the C++ implementation of the
1317  * standard header.  The C++ standard may adopt the C99 standard at
1318  * which point it is expected that the symbols included here will
1319  * become part of the C++ std namespace.
1320  */
1321 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1322 /*
1323  * The following have been added as a result of the ISO/IEC 9899:1999
1324  * standard. For a strictly conforming C application, visibility is
1325  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
1326  * For non-strictly conforming C applications, there are no restrictions
1327  * on the C namespace.
1328  */
1329 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1330 extern int vfscanf(FILE *, const char *, __va_list);
1331 extern int vscanf(const char *, __va_list);
1332 extern int vsscanf(const char *, const char *,
1333   __va_list);
1334 
1335 
1336 
1337 
1338 extern int snprintf(char *, size_t, const char *,
1339  ...);
1340 extern int vsnprintf(char *, size_t, const char *,
1341  __va_list);
1342 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1343 # 163 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1344 typedef __longlong_t off_t;
1345 
1346 
1347 
1348 
1349 
1350 typedef __longlong_t off64_t;
1351 # 179 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1352 typedef __longlong_t fpos64_t;
1353 
1354 
1355 
1356 /*
1357  * XPG4 requires that va_list be defined in <stdio.h> "as described in
1358  * <stdarg.h>".  ANSI-C and POSIX require that the namespace of <stdio.h>
1359  * not be polluted with this name.
1360  */
1361 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1362 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1363 # 213 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1364 extern unsigned char _sibuf[], _sobuf[];
1365 
1366 
1367 /* large file compilation environment setup */
1368 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1369 extern unsigned char *_bufendtab[];
1370 extern FILE *_lastbuf;
1371 
1372 
1373 /* In the LP64 compilation environment, all APIs are already large file */
1374 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1375 typedef int ssize_t; /* (historical version) */
1376 
1377 
1378 
1379 
1380 
1381 
1382 extern char *tmpnam_r(char *);
1383 
1384 
1385 
1386 
1387 extern int fcloseall(void);
1388 extern void setbuffer(FILE *, char *, size_t);
1389 extern int setlinebuf(FILE *);
1390 /* PRINTFLIKE2 */
1391 extern int asprintf(char **, const char *, ...);
1392 /* PRINTFLIKE2 */
1393 extern int vasprintf(char **, const char *, __va_list);
1394 
1395 
1396 
1397 
1398  /* || defined(_XPG7) */
1399 extern ssize_t getdelim(char **, size_t *,
1400  int, FILE *);
1401 extern ssize_t getline(char **, size_t *,
1402  FILE *);
1403 
1404 
1405 /*
1406  * The following are known to POSIX and XOPEN, but not to ANSI-C.
1407  */
1408 
1409 
1410 
1411 extern FILE *fdopen(int, const char *);
1412 extern char *ctermid(char *);
1413 extern int fileno(FILE *);
1414 
1415 
1416 
1417 /*
1418  * The following are known to POSIX.1c, but not to ANSI-C or XOPEN.
1419  */
1420 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1421 /*
1422  * The following are known to XOPEN, but not to ANSI-C or POSIX.
1423  */
1424 
1425 
1426 extern FILE *popen(const char *, const char *);
1427 extern char *tempnam(const char *, const char *);
1428 extern int pclose(FILE *);
1429 
1430 extern int getsubopt(char **, char *const *, char **);
1431 
1432 
1433 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1434 
1435 extern char *cuserid(char *);
1436 extern int getopt(int, char *const *, const char *);
1437 extern char *optarg;
1438 extern int optind, opterr, optopt;
1439 extern int getw(FILE *);
1440 extern int putw(int, FILE *);
1441 
1442 
1443 
1444 
1445 /*
1446  * The following are defined as part of the Large File Summit interfaces.
1447  */
1448 
1449 extern int fseeko(FILE *, off_t, int);
1450 extern off_t ftello(FILE *);
1451 
1452 
1453 /*
1454  * The following are defined as part of the transitional Large File Summit
1455  * interfaces.
1456  */
1457 
1458 
1459 extern FILE *fopen64(const char *, const char *);
1460 extern FILE *freopen64(const char *, const char *, FILE *);
1461 extern FILE *tmpfile64(void);
1462 extern int fgetpos64(FILE *, fpos64_t *);
1463 extern int fsetpos64(FILE *, const fpos64_t *);
1464 extern int fseeko64(FILE *, off64_t, int);
1465 extern off64_t ftello64(FILE *);
1466 
1467 
1468 /*
1469  * XPG7 symbols
1470  */
1471 
1472 extern FILE *fmemopen(void *, size_t,
1473       const char *);
1474 extern FILE *open_memstream(char **, size_t *);
1475 # 33 "unpack_package_from_stream.c" 2
1476 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
1477 /*
1478  * CDDL HEADER START
1479  *
1480  * The contents of this file are subject to the terms of the
1481  * Common Development and Distribution License (the "License").
1482  * You may not use this file except in compliance with the License.
1483  *
1484  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1485  * or http://www.opensolaris.org/os/licensing.
1486  * See the License for the specific language governing permissions
1487  * and limitations under the License.
1488  *
1489  * When distributing Covered Code, include this CDDL HEADER in each
1490  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1491  * If applicable, add the following below this CDDL HEADER, with the
1492  * fields enclosed by brackets "[]" replaced with your own identifying
1493  * information: Portions Copyright [yyyy] [name of copyright owner]
1494  *
1495  * CDDL HEADER END
1496  */
1497 /*	Copyright (c) 1988 AT&T	*/
1498 /*	  All Rights Reserved  	*/
1499 
1500 
1501 /*
1502  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1503  *
1504  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
1505  * Use is subject to license terms.
1506  */
1507 /*
1508  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
1509  * Copyright 2016 Joyent, Inc.
1510  */
1511 
1512 
1513 
1514 
1515 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1516 /*
1517  * CDDL HEADER START
1518  *
1519  * The contents of this file are subject to the terms of the
1520  * Common Development and Distribution License (the "License").
1521  * You may not use this file except in compliance with the License.
1522  *
1523  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1524  * or http://www.opensolaris.org/os/licensing.
1525  * See the License for the specific language governing permissions
1526  * and limitations under the License.
1527  *
1528  * When distributing Covered Code, include this CDDL HEADER in each
1529  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1530  * If applicable, add the following below this CDDL HEADER, with the
1531  * fields enclosed by brackets "[]" replaced with your own identifying
1532  * information: Portions Copyright [yyyy] [name of copyright owner]
1533  *
1534  * CDDL HEADER END
1535  */
1536 
1537 /*
1538  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1539  * Copyright 2016 Joyent, Inc.
1540  *
1541  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1542  * Use is subject to license terms.
1543  */
1544 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
1545 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 1
1546 /*
1547  * CDDL HEADER START
1548  *
1549  * The contents of this file are subject to the terms of the
1550  * Common Development and Distribution License, Version 1.0 only
1551  * (the "License").  You may not use this file except in compliance
1552  * with the License.
1553  *
1554  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1555  * or http://www.opensolaris.org/os/licensing.
1556  * See the License for the specific language governing permissions
1557  * and limitations under the License.
1558  *
1559  * When distributing Covered Code, include this CDDL HEADER in each
1560  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1561  * If applicable, add the following below this CDDL HEADER, with the
1562  * fields enclosed by brackets "[]" replaced with your own identifying
1563  * information: Portions Copyright [yyyy] [name of copyright owner]
1564  *
1565  * CDDL HEADER END
1566  */
1567 /*	Copyright (c) 1988 AT&T	*/
1568 /*	  All Rights Reserved  	*/
1569 
1570 /*
1571  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1572  * Copyright 2014 PALO, Richard.
1573  *
1574  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1575  * Use is subject to license terms.
1576  */
1577 
1578 /*
1579  * An application should not include this header directly.  Instead it
1580  * should be included only through the inclusion of other Sun headers.
1581  *
1582  * The contents of this header is limited to identifiers specified in the
1583  * C Standard.  Any new identifiers specified in future amendments to the
1584  * C Standard must be placed in this header.  If these new identifiers
1585  * are required to also be in the C++ Standard "std" namespace, then for
1586  * anything other than macro definitions, corresponding "using" directives
1587  * must also be added to <time.h.h>.
1588  */
1589 
1590 
1591 
1592 
1593 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1594 /*
1595  * CDDL HEADER START
1596  *
1597  * The contents of this file are subject to the terms of the
1598  * Common Development and Distribution License (the "License").
1599  * You may not use this file except in compliance with the License.
1600  *
1601  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1602  * or http://www.opensolaris.org/os/licensing.
1603  * See the License for the specific language governing permissions
1604  * and limitations under the License.
1605  *
1606  * When distributing Covered Code, include this CDDL HEADER in each
1607  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1608  * If applicable, add the following below this CDDL HEADER, with the
1609  * fields enclosed by brackets "[]" replaced with your own identifying
1610  * information: Portions Copyright [yyyy] [name of copyright owner]
1611  *
1612  * CDDL HEADER END
1613  */
1614 
1615 /*
1616  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1617  * Copyright 2016 Joyent, Inc.
1618  *
1619  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1620  * Use is subject to license terms.
1621  */
1622 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
1623 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
1624 /*
1625  * This file and its contents are supplied under the terms of the
1626  * Common Development and Distribution License ("CDDL"), version 1.0.
1627  * You may only use this file in accordance with the terms of version
1628  * 1.0 of the CDDL.
1629  *
1630  * A full copy of the text of the CDDL should have accompanied this
1631  * source.  A copy of the CDDL is also available via the Internet at
1632  * http://www.illumos.org/license/CDDL.
1633  */
1634 
1635 /*
1636  * Copyright 2014-2016 PALO, Richard.
1637  */
1638 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
1639 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h"
1640 typedef long clock_t;
1641 
1642 
1643 
1644 
1645 typedef long time_t;
1646 
1647 
1648 
1649 
1650 struct tm { /* see ctime(3) */
1651  int tm_sec;
1652  int tm_min;
1653  int tm_hour;
1654  int tm_mday;
1655  int tm_mon;
1656  int tm_year;
1657  int tm_wday;
1658  int tm_yday;
1659  int tm_isdst;
1660 };
1661 
1662 
1663 extern char *asctime(const struct tm *);
1664 extern clock_t clock(void);
1665 extern char *ctime(const time_t *);
1666 extern double difftime(time_t, time_t);
1667 extern struct tm *gmtime(const time_t *);
1668 extern struct tm *localtime(const time_t *);
1669 extern time_t mktime(struct tm *);
1670 extern time_t time(time_t *);
1671 extern size_t strftime(char *, size_t, const char *,
1672  const struct tm *);
1673 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
1674 /*
1675  * C11 requires sys/time_impl.h for the definition of the struct timespec.
1676  */
1677 
1678 
1679 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
1680 /*
1681  * CDDL HEADER START
1682  *
1683  * The contents of this file are subject to the terms of the
1684  * Common Development and Distribution License (the "License").
1685  * You may not use this file except in compliance with the License.
1686  *
1687  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1688  * or http://www.opensolaris.org/os/licensing.
1689  * See the License for the specific language governing permissions
1690  * and limitations under the License.
1691  *
1692  * When distributing Covered Code, include this CDDL HEADER in each
1693  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1694  * If applicable, add the following below this CDDL HEADER, with the
1695  * fields enclosed by brackets "[]" replaced with your own identifying
1696  * information: Portions Copyright [yyyy] [name of copyright owner]
1697  *
1698  * CDDL HEADER END
1699  */
1700 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
1701 /*	  All Rights Reserved  	*/
1702 
1703 
1704 /*
1705  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
1706  * Use is subject to license terms.
1707  *
1708  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
1709  * Copyright 2016 Joyent, Inc.
1710  */
1711 
1712 
1713 
1714 
1715 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1716 /*
1717  * CDDL HEADER START
1718  *
1719  * The contents of this file are subject to the terms of the
1720  * Common Development and Distribution License (the "License").
1721  * You may not use this file except in compliance with the License.
1722  *
1723  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1724  * or http://www.opensolaris.org/os/licensing.
1725  * See the License for the specific language governing permissions
1726  * and limitations under the License.
1727  *
1728  * When distributing Covered Code, include this CDDL HEADER in each
1729  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1730  * If applicable, add the following below this CDDL HEADER, with the
1731  * fields enclosed by brackets "[]" replaced with your own identifying
1732  * information: Portions Copyright [yyyy] [name of copyright owner]
1733  *
1734  * CDDL HEADER END
1735  */
1736 
1737 /*
1738  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1739  * Copyright 2016 Joyent, Inc.
1740  *
1741  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1742  * Use is subject to license terms.
1743  */
1744 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1745 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1746 /*
1747  * CDDL HEADER START
1748  *
1749  * The contents of this file are subject to the terms of the
1750  * Common Development and Distribution License (the "License").
1751  * You may not use this file except in compliance with the License.
1752  *
1753  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1754  * or http://www.opensolaris.org/os/licensing.
1755  * See the License for the specific language governing permissions
1756  * and limitations under the License.
1757  *
1758  *
1759  * When distributing Covered Code, include this CDDL HEADER in each
1760  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1761  * If applicable, add the following below this CDDL HEADER, with the
1762  * fields enclosed by brackets "[]" replaced with your own identifying
1763  * information: Portions Copyright [yyyy] [name of copyright owner]
1764  *
1765  * CDDL HEADER END
1766  */
1767 
1768 /*
1769  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1770  * Use is subject to license terms.
1771  * Copyright 2016 Joyent, Inc.
1772  */
1773 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1774 
1775 /*
1776  * Machine dependent definitions moved to <sys/machtypes.h>.
1777  */
1778 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 1
1779 /*
1780  * CDDL HEADER START
1781  *
1782  * The contents of this file are subject to the terms of the
1783  * Common Development and Distribution License, Version 1.0 only
1784  * (the "License").  You may not use this file except in compliance
1785  * with the License.
1786  *
1787  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1788  * or http://www.opensolaris.org/os/licensing.
1789  * See the License for the specific language governing permissions
1790  * and limitations under the License.
1791  *
1792  * When distributing Covered Code, include this CDDL HEADER in each
1793  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1794  * If applicable, add the following below this CDDL HEADER, with the
1795  * fields enclosed by brackets "[]" replaced with your own identifying
1796  * information: Portions Copyright [yyyy] [name of copyright owner]
1797  *
1798  * CDDL HEADER END
1799  */
1800 /*
1801  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1802  * Use is subject to license terms.
1803  */
1804 
1805 
1806 
1807 
1808 #pragma ident "%Z%%M%	%I%	%E% SMI"
1809 
1810 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1811 /*
1812  * CDDL HEADER START
1813  *
1814  * The contents of this file are subject to the terms of the
1815  * Common Development and Distribution License (the "License").
1816  * You may not use this file except in compliance with the License.
1817  *
1818  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1819  * or http://www.opensolaris.org/os/licensing.
1820  * See the License for the specific language governing permissions
1821  * and limitations under the License.
1822  *
1823  * When distributing Covered Code, include this CDDL HEADER in each
1824  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1825  * If applicable, add the following below this CDDL HEADER, with the
1826  * fields enclosed by brackets "[]" replaced with your own identifying
1827  * information: Portions Copyright [yyyy] [name of copyright owner]
1828  *
1829  * CDDL HEADER END
1830  */
1831 
1832 /*
1833  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1834  * Copyright 2016 Joyent, Inc.
1835  *
1836  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1837  * Use is subject to license terms.
1838  */
1839 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
1840 
1841 
1842 
1843 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h" 1
1844 /*
1845  * CDDL HEADER START
1846  *
1847  * The contents of this file are subject to the terms of the
1848  * Common Development and Distribution License (the "License").
1849  * You may not use this file except in compliance with the License.
1850  *
1851  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1852  * or http://www.opensolaris.org/os/licensing.
1853  * See the License for the specific language governing permissions
1854  * and limitations under the License.
1855  *
1856  * When distributing Covered Code, include this CDDL HEADER in each
1857  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1858  * If applicable, add the following below this CDDL HEADER, with the
1859  * fields enclosed by brackets "[]" replaced with your own identifying
1860  * information: Portions Copyright [yyyy] [name of copyright owner]
1861  *
1862  * CDDL HEADER END
1863  */
1864 /*
1865  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
1866  * Use is subject to license terms.
1867  */
1868 
1869 
1870 
1871 
1872 #pragma ident "%Z%%M%	%I%	%E% SMI"
1873 
1874 
1875 
1876 
1877 
1878 /*
1879  * Machine dependent types:
1880  *
1881  *	intel ia32 Version
1882  */
1883 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h"
1884 typedef struct _label_t { long val[6]; } label_t;
1885 
1886 
1887 
1888 typedef unsigned char lock_t; /* lock work for busy wait */
1889 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
1890 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1891 
1892 /*
1893  * Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
1894  * committee's working draft for the revision of the current ISO C standard,
1895  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
1896  * required by any standard but constitute a useful, general purpose set
1897  * of type definitions which is namespace clean with respect to all standards.
1898  */
1899 
1900 
1901 
1902 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
1903 /*
1904  * CDDL HEADER START
1905  *
1906  * The contents of this file are subject to the terms of the
1907  * Common Development and Distribution License, Version 1.0 only
1908  * (the "License").  You may not use this file except in compliance
1909  * with the License.
1910  *
1911  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1912  * or http://www.opensolaris.org/os/licensing.
1913  * See the License for the specific language governing permissions
1914  * and limitations under the License.
1915  *
1916  * When distributing Covered Code, include this CDDL HEADER in each
1917  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1918  * If applicable, add the following below this CDDL HEADER, with the
1919  * fields enclosed by brackets "[]" replaced with your own identifying
1920  * information: Portions Copyright [yyyy] [name of copyright owner]
1921  *
1922  * CDDL HEADER END
1923  */
1924 /*
1925  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1926  *
1927  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1928  * Use is subject to license terms.
1929  */
1930 
1931 
1932 
1933 
1934 /*
1935  * This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
1936  * of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
1937  * Programming language - C.
1938  *
1939  * Programs/Modules should not directly include this file.  Access to the
1940  * types defined in this file should be through the inclusion of one of the
1941  * following files:
1942  *
1943  *	<sys/types.h>		Provides only the "_t" types defined in this
1944  *				file which is a subset of the contents of
1945  *				<inttypes.h>.  (This can be appropriate for
1946  *				all programs/modules except those claiming
1947  *				ANSI-C conformance.)
1948  *
1949  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
1950  *				components of <inttypes.h>.
1951  *
1952  *	<inttypes.h>		For use by applications.
1953  *
1954  * See these files for more details.
1955  */
1956 
1957 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1958 /*
1959  * CDDL HEADER START
1960  *
1961  * The contents of this file are subject to the terms of the
1962  * Common Development and Distribution License (the "License").
1963  * You may not use this file except in compliance with the License.
1964  *
1965  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1966  * or http://www.opensolaris.org/os/licensing.
1967  * See the License for the specific language governing permissions
1968  * and limitations under the License.
1969  *
1970  * When distributing Covered Code, include this CDDL HEADER in each
1971  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1972  * If applicable, add the following below this CDDL HEADER, with the
1973  * fields enclosed by brackets "[]" replaced with your own identifying
1974  * information: Portions Copyright [yyyy] [name of copyright owner]
1975  *
1976  * CDDL HEADER END
1977  */
1978 
1979 /*
1980  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1981  * Copyright 2016 Joyent, Inc.
1982  *
1983  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1984  * Use is subject to license terms.
1985  */
1986 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 2
1987 
1988 
1989 
1990 
1991 
1992 /*
1993  * Basic / Extended integer types
1994  *
1995  * The following defines the basic fixed-size integer types.
1996  *
1997  * Implementations are free to typedef them to Standard C integer types or
1998  * extensions that they support. If an implementation does not support one
1999  * of the particular integer data types below, then it should not define the
2000  * typedefs and macros corresponding to that data type.  Note that int8_t
2001  * is not defined in -Xs mode on ISAs for which the ABI specifies "char"
2002  * as an unsigned entity because there is no way to define an eight bit
2003  * signed integral.
2004  */
2005 
2006 typedef char int8_t;
2007 
2008 
2009 
2010 typedef short int16_t;
2011 typedef int int32_t;
2012 
2013 
2014 
2015 
2016 
2017 
2018 typedef long long int64_t;
2019 
2020 
2021 
2022 typedef unsigned char uint8_t;
2023 typedef unsigned short uint16_t;
2024 typedef unsigned int uint32_t;
2025 
2026 
2027 
2028 
2029 typedef unsigned long long uint64_t;
2030 
2031 
2032 
2033 /*
2034  * intmax_t and uintmax_t are to be the longest (in number of bits) signed
2035  * and unsigned integer types supported by the implementation.
2036  */
2037 
2038 typedef int64_t intmax_t;
2039 typedef uint64_t uintmax_t;
2040 
2041 
2042 
2043 
2044 
2045 /*
2046  * intptr_t and uintptr_t are signed and unsigned integer types large enough
2047  * to hold any data pointer; that is, data pointers can be assigned into or
2048  * from these integer types without losing precision.
2049  */
2050 
2051 
2052 
2053 
2054 typedef int intptr_t;
2055 typedef unsigned int uintptr_t;
2056 
2057 
2058 /*
2059  * The following define the fastest integer types that can hold the
2060  * specified number of bits.
2061  */
2062 
2063 typedef char int_fast8_t;
2064 
2065 
2066 
2067 typedef int int_fast16_t;
2068 typedef int int_fast32_t;
2069 
2070 
2071 
2072 
2073 typedef long long int_fast64_t;
2074 
2075 
2076 
2077 typedef unsigned char uint_fast8_t;
2078 typedef unsigned int uint_fast16_t;
2079 typedef unsigned int uint_fast32_t;
2080 
2081 
2082 
2083 
2084 typedef unsigned long long uint_fast64_t;
2085 
2086 
2087 
2088 /*
2089  * The following define the smallest integer types that can hold the
2090  * specified number of bits.
2091  */
2092 
2093 typedef char int_least8_t;
2094 
2095 
2096 
2097 typedef short int_least16_t;
2098 typedef int int_least32_t;
2099 
2100 
2101 
2102 
2103 typedef long long int_least64_t;
2104 
2105 
2106 
2107 /*
2108  * If these are changed, please update char16_t and char32_t in head/uchar.h.
2109  */
2110 typedef unsigned char uint_least8_t;
2111 typedef unsigned short uint_least16_t;
2112 typedef unsigned int uint_least32_t;
2113 
2114 
2115 
2116 
2117 typedef unsigned long long uint_least64_t;
2118 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
2119 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2120 /*
2121  * Strictly conforming ANSI C environments prior to the 1999
2122  * revision of the C Standard (ISO/IEC 9899:1999) do not have
2123  * the long long data type.
2124  */
2125 
2126 typedef long long longlong_t;
2127 typedef unsigned long long u_longlong_t;
2128 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2129 /*
2130  * These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
2131  * to use them instead of int32_t and uint32_t because DEC had
2132  * shipped 64-bit wide.
2133  */
2134 
2135 
2136 
2137 
2138 typedef long t_scalar_t; /* historical versions */
2139 typedef unsigned long t_uscalar_t;
2140 
2141 
2142 /*
2143  * POSIX Extensions
2144  */
2145 typedef unsigned char uchar_t;
2146 typedef unsigned short ushort_t;
2147 typedef unsigned int uint_t;
2148 typedef unsigned long ulong_t;
2149 
2150 typedef char *caddr_t; /* ?<core address> type */
2151 typedef long daddr_t; /* <disk address> type */
2152 typedef short cnt_t; /* ?<count> type */
2153 
2154 
2155 
2156 
2157 
2158 
2159 typedef int ptrdiff_t; /* (historical version) */
2160 
2161 
2162 
2163 /*
2164  * VM-related types
2165  */
2166 typedef ulong_t pfn_t; /* page frame number */
2167 typedef ulong_t pgcnt_t; /* number of pages */
2168 typedef long spgcnt_t; /* signed number of pages */
2169 
2170 typedef uchar_t use_t; /* use count for swap.  */
2171 typedef short sysid_t;
2172 typedef short index_t;
2173 typedef void *timeout_id_t; /* opaque handle from timeout(9F) */
2174 typedef void *bufcall_id_t; /* opaque handle from bufcall(9F) */
2175 
2176 /*
2177  * The size of off_t and related types depends on the setting of
2178  * _FILE_OFFSET_BITS.  (Note that other system headers define other types
2179  * related to those defined here.)
2180  *
2181  * If _LARGEFILE64_SOURCE is defined, variants of these types that are
2182  * explicitly 64 bits wide become available.
2183  */
2184 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2185 typedef u_longlong_t ino_t; /* expanded inode type	*/
2186 typedef longlong_t blkcnt_t; /* count of file blocks */
2187 typedef u_longlong_t fsblkcnt_t; /* count of file system blocks */
2188 typedef u_longlong_t fsfilcnt_t; /* count of files */
2189 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2190 typedef u_longlong_t ino64_t; /* expanded inode type	*/
2191 typedef longlong_t blkcnt64_t; /* count of file blocks */
2192 typedef u_longlong_t fsblkcnt64_t; /* count of file system blocks */
2193 typedef u_longlong_t fsfilcnt64_t; /* count of files */
2194 
2195 
2196 
2197 
2198 
2199 
2200 typedef long blksize_t; /* used for block sizes */
2201 
2202 
2203 
2204 
2205 
2206 typedef enum { B_FALSE, B_TRUE } boolean_t;
2207 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2208 /*
2209  * The {u,}pad64_t types can be used in structures such that those structures
2210  * may be accessed by code produced by compilation environments which don't
2211  * support a 64 bit integral datatype.  The intention is not to allow
2212  * use of these fields in such environments, but to maintain the alignment
2213  * and offsets of the structure.
2214  *
2215  * Similar comments for {u,}pad128_t.
2216  *
2217  * Note that these types do NOT generate any stronger alignment constraints
2218  * than those available in the underlying ABI.  See <sys/isa_defs.h>
2219  */
2220 
2221 typedef int64_t pad64_t;
2222 typedef uint64_t upad64_t;
2223 # 232 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2224 typedef union {
2225  long double _q;
2226  int32_t _l[4];
2227 } pad128_t;
2228 
2229 typedef union {
2230  long double _q;
2231  uint32_t _l[4];
2232 } upad128_t;
2233 
2234 typedef longlong_t offset_t;
2235 typedef u_longlong_t u_offset_t;
2236 typedef u_longlong_t len_t;
2237 typedef u_longlong_t diskaddr_t;
2238 
2239 
2240 
2241 
2242 /*
2243  * Definitions remaining from previous partial support for 64-bit file
2244  * offsets.  This partial support for devices greater than 2gb requires
2245  * compiler support for long long.
2246  */
2247 
2248 typedef union {
2249  offset_t _f; /* Full 64 bit offset value */
2250  struct {
2251   int32_t _l; /* lower 32 bits of offset value */
2252   int32_t _u; /* upper 32 bits of offset value */
2253  } _p;
2254 } lloff_t;
2255 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2256 typedef union {
2257  longlong_t _f; /* Full 64 bit disk address value */
2258  struct {
2259   int32_t _l; /* lower 32 bits of disk address value */
2260   int32_t _u; /* upper 32 bits of disk address value */
2261  } _p;
2262 } lldaddr_t;
2263 # 295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2264 typedef uint_t k_fltset_t; /* kernel fault set type */
2265 
2266 /*
2267  * The following type is for various kinds of identifiers.  The
2268  * actual type must be the same for all since some system calls
2269  * (such as sigsend) take arguments that may be any of these
2270  * types.  The enumeration type idtype_t defined in sys/procset.h
2271  * is used to indicate what type of id is being specified --
2272  * a process id, process group id, session id, scheduling class id,
2273  * user id, group id, project id, task id or zone id.
2274  */
2275 
2276 
2277 
2278 typedef long id_t; /* (historical version) */
2279 
2280 
2281 typedef id_t lgrp_id_t; /* lgroup ID */
2282 
2283 /*
2284  * Type useconds_t is an unsigned integral type capable of storing
2285  * values at least in the range of zero to 1,000,000.
2286  */
2287 typedef uint_t useconds_t; /* Time, in microseconds */
2288 
2289 
2290 
2291 typedef long suseconds_t; /* signed # of microseconds */
2292 
2293 
2294 /*
2295  * Typedefs for dev_t components.
2296  */
2297 
2298 
2299 
2300 
2301 typedef ulong_t major_t; /* (historical version) */
2302 typedef ulong_t minor_t; /* (historical version) */
2303 
2304 
2305 /*
2306  * The data type of a thread priority.
2307  */
2308 typedef short pri_t;
2309 
2310 /*
2311  * The data type for a CPU flags field.  (Can be extended to larger unsigned
2312  * types, if needed, limited by ability to update atomically.)
2313  */
2314 typedef ushort_t cpu_flag_t;
2315 
2316 /*
2317  * For compatibility reasons the following typedefs (prefixed o_)
2318  * can't grow regardless of the EFT definition. Although,
2319  * applications should not explicitly use these typedefs
2320  * they may be included via a system header definition.
2321  * WARNING: These typedefs may be removed in a future
2322  * release.
2323  *		ex. the definitions in s5inode.h (now obsoleted)
2324  *			remained small to preserve compatibility
2325  *			in the S5 file system type.
2326  */
2327 typedef ushort_t o_mode_t; /* old file attribute type */
2328 typedef short o_dev_t; /* old device type	*/
2329 typedef ushort_t o_uid_t; /* old UID type		*/
2330 typedef o_uid_t o_gid_t; /* old GID type		*/
2331 typedef short o_nlink_t; /* old file link type	*/
2332 typedef short o_pid_t; /* old process id type	*/
2333 typedef ushort_t o_ino_t; /* old inode type	*/
2334 
2335 
2336 /*
2337  * POSIX and XOPEN Declarations
2338  */
2339 typedef int key_t; /* IPC key type		*/
2340 
2341 
2342 
2343 typedef ulong_t mode_t; /* (historical version) */
2344 
2345 
2346 
2347 
2348 typedef unsigned int uid_t; /* UID type		*/
2349 
2350 
2351 typedef uid_t gid_t; /* GID type		*/
2352 
2353 typedef uint32_t datalink_id_t;
2354 typedef uint32_t vrid_t;
2355 
2356 typedef id_t taskid_t;
2357 typedef id_t projid_t;
2358 typedef id_t poolid_t;
2359 typedef id_t zoneid_t;
2360 typedef id_t ctid_t;
2361 
2362 /*
2363  * POSIX definitions are same as defined in thread.h and synch.h.
2364  * Any changes made to here should be reflected in corresponding
2365  * files as described in comments.
2366  */
2367 typedef uint_t pthread_t; /* = thread_t in thread.h */
2368 typedef uint_t pthread_key_t; /* = thread_key_t in thread.h */
2369 
2370 /* "Magic numbers" tagging synchronization object types */
2371 
2372 
2373 
2374 
2375 
2376 typedef struct _pthread_mutex { /* = mutex_t in synch.h */
2377  struct {
2378   uint16_t __pthread_mutex_flag1;
2379   uint8_t __pthread_mutex_flag2;
2380   uint8_t __pthread_mutex_ceiling;
2381   uint16_t __pthread_mutex_type;
2382   uint16_t __pthread_mutex_magic;
2383  } __pthread_mutex_flags;
2384  union {
2385   struct {
2386    uint8_t __pthread_mutex_pad[8];
2387   } __pthread_mutex_lock64;
2388   struct {
2389    uint32_t __pthread_ownerpid;
2390    uint32_t __pthread_lockword;
2391   } __pthread_mutex_lock32;
2392   upad64_t __pthread_mutex_owner64;
2393  } __pthread_mutex_lock;
2394  upad64_t __pthread_mutex_data;
2395 } pthread_mutex_t;
2396 
2397 typedef struct _pthread_cond { /* = cond_t in synch.h */
2398  struct {
2399   uint8_t __pthread_cond_flag[4];
2400   uint16_t __pthread_cond_type;
2401   uint16_t __pthread_cond_magic;
2402  } __pthread_cond_flags;
2403  upad64_t __pthread_cond_data;
2404 } pthread_cond_t;
2405 
2406 /*
2407  * UNIX 98 Extension
2408  */
2409 typedef struct _pthread_rwlock { /* = rwlock_t in synch.h */
2410  int32_t __pthread_rwlock_readers;
2411  uint16_t __pthread_rwlock_type;
2412  uint16_t __pthread_rwlock_magic;
2413  pthread_mutex_t __pthread_rwlock_mutex;
2414  pthread_cond_t __pthread_rwlock_readercv;
2415  pthread_cond_t __pthread_rwlock_writercv;
2416 } pthread_rwlock_t;
2417 
2418 /*
2419  * SUSV3
2420  */
2421 typedef struct {
2422  uint32_t __pthread_barrier_count;
2423  uint32_t __pthread_barrier_current;
2424  upad64_t __pthread_barrier_cycle;
2425  upad64_t __pthread_barrier_reserved;
2426  pthread_mutex_t __pthread_barrier_lock;
2427  pthread_cond_t __pthread_barrier_cond;
2428 } pthread_barrier_t;
2429 
2430 typedef pthread_mutex_t pthread_spinlock_t;
2431 
2432 /*
2433  * attributes for threads, dynamically allocated by library
2434  */
2435 typedef struct _pthread_attr {
2436  void *__pthread_attrp;
2437 } pthread_attr_t;
2438 
2439 /*
2440  * attributes for mutex, dynamically allocated by library
2441  */
2442 typedef struct _pthread_mutexattr {
2443  void *__pthread_mutexattrp;
2444 } pthread_mutexattr_t;
2445 
2446 /*
2447  * attributes for cond, dynamically allocated by library
2448  */
2449 typedef struct _pthread_condattr {
2450  void *__pthread_condattrp;
2451 } pthread_condattr_t;
2452 
2453 /*
2454  * pthread_once
2455  */
2456 typedef struct _once {
2457  upad64_t __pthread_once_pad[4];
2458 } pthread_once_t;
2459 
2460 /*
2461  * UNIX 98 Extensions
2462  * attributes for rwlock, dynamically allocated by library
2463  */
2464 typedef struct _pthread_rwlockattr {
2465  void *__pthread_rwlockattrp;
2466 } pthread_rwlockattr_t;
2467 
2468 /*
2469  * SUSV3
2470  * attributes for pthread_barrier_t, dynamically allocated by library
2471  */
2472 typedef struct {
2473  void *__pthread_barrierattrp;
2474 } pthread_barrierattr_t;
2475 
2476 typedef ulong_t dev_t; /* expanded device type */
2477 
2478 
2479 
2480 
2481 
2482 typedef ulong_t nlink_t; /* (historical version) */
2483 typedef long pid_t; /* (historical version) */
2484 # 547 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2485 typedef int clockid_t; /* clock identifier type */
2486 
2487 
2488 
2489 
2490 typedef int timer_t; /* timer identifier type */
2491 
2492 
2493 
2494 
2495 /* BEGIN CSTYLED */
2496 typedef unsigned char unchar;
2497 typedef unsigned short ushort;
2498 typedef unsigned int uint;
2499 typedef unsigned long ulong;
2500 /* END CSTYLED */
2501 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2502 /*
2503  * The following is the value of type id_t to use to indicate the
2504  * caller's current id.  See procset.h for the type idtype_t
2505  * which defines which kind of id is being specified.
2506  */
2507 # 620 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2508 /*
2509  * The following value of type pfn_t is used to indicate
2510  * invalid page frame number.
2511  */
2512 
2513 
2514 
2515 /* BEGIN CSTYLED */
2516 typedef unsigned char u_char;
2517 typedef unsigned short u_short;
2518 typedef unsigned int u_int;
2519 typedef unsigned long u_long;
2520 typedef struct _quad { int val[2]; } quad_t; /* used by UFS */
2521 typedef quad_t quad; /* used by UFS */
2522 /* END CSTYLED */
2523 
2524 /*
2525  * Nested include for BSD/sockets source compatibility.
2526  * (The select macros used to be defined here).
2527  */
2528 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
2529 /*
2530  * CDDL HEADER START
2531  *
2532  * The contents of this file are subject to the terms of the
2533  * Common Development and Distribution License (the "License").
2534  * You may not use this file except in compliance with the License.
2535  *
2536  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2537  * or http://www.opensolaris.org/os/licensing.
2538  * See the License for the specific language governing permissions
2539  * and limitations under the License.
2540  *
2541  * When distributing Covered Code, include this CDDL HEADER in each
2542  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2543  * If applicable, add the following below this CDDL HEADER, with the
2544  * fields enclosed by brackets "[]" replaced with your own identifying
2545  * information: Portions Copyright [yyyy] [name of copyright owner]
2546  *
2547  * CDDL HEADER END
2548  */
2549 
2550 /*
2551  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2552  *
2553  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2554  *
2555  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
2556  * Use is subject to license terms.
2557  */
2558 
2559 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2560 /*	  All Rights Reserved	*/
2561 
2562 /*
2563  * University Copyright- Copyright (c) 1982, 1986, 1988
2564  * The Regents of the University of California
2565  * All Rights Reserved
2566  *
2567  * University Acknowledgment- Portions of this document are derived from
2568  * software developed by the University of California, Berkeley, and its
2569  * contributors.
2570  */
2571 
2572 
2573 
2574 
2575 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2576 /*
2577  * CDDL HEADER START
2578  *
2579  * The contents of this file are subject to the terms of the
2580  * Common Development and Distribution License (the "License").
2581  * You may not use this file except in compliance with the License.
2582  *
2583  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2584  * or http://www.opensolaris.org/os/licensing.
2585  * See the License for the specific language governing permissions
2586  * and limitations under the License.
2587  *
2588  * When distributing Covered Code, include this CDDL HEADER in each
2589  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2590  * If applicable, add the following below this CDDL HEADER, with the
2591  * fields enclosed by brackets "[]" replaced with your own identifying
2592  * information: Portions Copyright [yyyy] [name of copyright owner]
2593  *
2594  * CDDL HEADER END
2595  */
2596 
2597 /*
2598  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2599  * Copyright 2016 Joyent, Inc.
2600  *
2601  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2602  * Use is subject to license terms.
2603  */
2604 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
2605 
2606 
2607 
2608 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
2609 /*
2610  * CDDL HEADER START
2611  *
2612  * The contents of this file are subject to the terms of the
2613  * Common Development and Distribution License, Version 1.0 only
2614  * (the "License").  You may not use this file except in compliance
2615  * with the License.
2616  *
2617  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2618  * or http://www.opensolaris.org/os/licensing.
2619  * See the License for the specific language governing permissions
2620  * and limitations under the License.
2621  *
2622  * When distributing Covered Code, include this CDDL HEADER in each
2623  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2624  * If applicable, add the following below this CDDL HEADER, with the
2625  * fields enclosed by brackets "[]" replaced with your own identifying
2626  * information: Portions Copyright [yyyy] [name of copyright owner]
2627  *
2628  * CDDL HEADER END
2629  */
2630 /*
2631  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
2632  * Use is subject to license terms.
2633  */
2634 
2635 /*
2636  * Implementation-private.  This header should not be included
2637  * directly by an application.  The application should instead
2638  * include <time.h> which includes this header conditionally
2639  * depending on which feature test macros are defined. By default,
2640  * this header is included by <time.h>.  X/Open and POSIX
2641  * standards requirements result in this header being included
2642  * by <time.h> only under a restricted set of conditions.
2643  */
2644 
2645 
2646 
2647 
2648 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2649 /*
2650  * CDDL HEADER START
2651  *
2652  * The contents of this file are subject to the terms of the
2653  * Common Development and Distribution License (the "License").
2654  * You may not use this file except in compliance with the License.
2655  *
2656  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2657  * or http://www.opensolaris.org/os/licensing.
2658  * See the License for the specific language governing permissions
2659  * and limitations under the License.
2660  *
2661  * When distributing Covered Code, include this CDDL HEADER in each
2662  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2663  * If applicable, add the following below this CDDL HEADER, with the
2664  * fields enclosed by brackets "[]" replaced with your own identifying
2665  * information: Portions Copyright [yyyy] [name of copyright owner]
2666  *
2667  * CDDL HEADER END
2668  */
2669 
2670 /*
2671  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2672  * Copyright 2016 Joyent, Inc.
2673  *
2674  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2675  * Use is subject to license terms.
2676  */
2677 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 2
2678 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
2679 /*
2680  * Time expressed in seconds and nanoseconds
2681  */
2682 
2683 typedef struct timespec { /* definition per POSIX.4 */
2684  time_t tv_sec; /* seconds */
2685  long tv_nsec; /* and nanoseconds */
2686 } timespec_t;
2687 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
2688 typedef struct timespec timestruc_t; /* definition per SVr4 */
2689 
2690 /*
2691  * The following has been left in for backward compatibility. Portable
2692  * applications should not use the structure name timestruc.
2693  */
2694 
2695 
2696 
2697 
2698 
2699 /*
2700  * Timer specification
2701  */
2702 typedef struct itimerspec { /* definition per POSIX.4 */
2703  struct timespec it_interval; /* timer period */
2704  struct timespec it_value; /* timer expiration */
2705 } itimerspec_t;
2706 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
2707 
2708 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
2709 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2710 /*	  All Rights Reserved  	*/
2711 
2712 
2713 /*
2714  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
2715  * All rights reserved.  The Berkeley software License Agreement
2716  * specifies the terms and conditions for redistribution.
2717  */
2718 
2719 /*
2720  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2721  *
2722  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2723  * Use is subject to license terms.
2724  *
2725  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2726  */
2727 
2728 /*
2729  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
2730  */
2731 
2732 
2733 
2734 
2735 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2736 /*
2737  * CDDL HEADER START
2738  *
2739  * The contents of this file are subject to the terms of the
2740  * Common Development and Distribution License (the "License").
2741  * You may not use this file except in compliance with the License.
2742  *
2743  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2744  * or http://www.opensolaris.org/os/licensing.
2745  * See the License for the specific language governing permissions
2746  * and limitations under the License.
2747  *
2748  * When distributing Covered Code, include this CDDL HEADER in each
2749  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2750  * If applicable, add the following below this CDDL HEADER, with the
2751  * fields enclosed by brackets "[]" replaced with your own identifying
2752  * information: Portions Copyright [yyyy] [name of copyright owner]
2753  *
2754  * CDDL HEADER END
2755  */
2756 
2757 /*
2758  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2759  * Copyright 2016 Joyent, Inc.
2760  *
2761  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2762  * Use is subject to license terms.
2763  */
2764 # 28 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2765 
2766 /*
2767  * Structure returned by gettimeofday(2) system call,
2768  * and used in other calls.
2769  */
2770 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2771 struct timeval {
2772  time_t tv_sec; /* seconds */
2773  suseconds_t tv_usec; /* and microseconds */
2774 };
2775 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2776 struct timezone {
2777  int tz_minuteswest; /* minutes west of Greenwich */
2778  int tz_dsttime; /* type of dst correction */
2779 };
2780 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2781 /*
2782  * Needed for longlong_t type.  Placement of this due to <sys/types.h>
2783  * including <sys/select.h> which relies on the presense of the itimerval
2784  * structure.
2785  */
2786 
2787 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
2788 /*
2789  * CDDL HEADER START
2790  *
2791  * The contents of this file are subject to the terms of the
2792  * Common Development and Distribution License (the "License").
2793  * You may not use this file except in compliance with the License.
2794  *
2795  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2796  * or http://www.opensolaris.org/os/licensing.
2797  * See the License for the specific language governing permissions
2798  * and limitations under the License.
2799  *
2800  * When distributing Covered Code, include this CDDL HEADER in each
2801  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2802  * If applicable, add the following below this CDDL HEADER, with the
2803  * fields enclosed by brackets "[]" replaced with your own identifying
2804  * information: Portions Copyright [yyyy] [name of copyright owner]
2805  *
2806  * CDDL HEADER END
2807  */
2808 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2809 /*	  All Rights Reserved  	*/
2810 
2811 
2812 /*
2813  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2814  * Use is subject to license terms.
2815  *
2816  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2817  * Copyright 2016 Joyent, Inc.
2818  */
2819 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2820 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2821 /*
2822  * Operations on timevals.
2823  */
2824 # 193 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2825 /*
2826  * Names of the interval timers, and structure
2827  * defining a timer setting.
2828  */
2829 
2830 
2831 
2832     /* time and when system is running on */
2833     /* behalf of the process. */
2834 
2835     /* time profiling of multithreaded */
2836     /* programs. */
2837 
2838 
2839 struct itimerval {
2840  struct timeval it_interval; /* timer interval */
2841  struct timeval it_value; /* current value */
2842 };
2843 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2844 /*
2845  *	Definitions for commonly used resolutions.
2846  */
2847 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2848 /*
2849  * Time expressed as a 64-bit nanosecond counter.
2850  */
2851 typedef longlong_t hrtime_t;
2852 # 386 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2853 int adjtime(struct timeval *, struct timeval *);
2854 
2855 
2856 
2857 
2858 int futimesat(int, const char *, const struct timeval *);
2859 
2860 
2861 
2862 
2863 
2864 int getitimer(int, struct itimerval *);
2865 int utimes(const char *, const struct timeval *);
2866 
2867 
2868 
2869 
2870 int setitimer(int, struct itimerval *,
2871  struct itimerval *);
2872 
2873 
2874 
2875 
2876 /*
2877  * gettimeofday() and settimeofday() were included in SVr4 due to their
2878  * common use in BSD based applications.  They were to be included exactly
2879  * as in BSD, with two parameters.  However, AT&T/USL noted that the second
2880  * parameter was unused and deleted it, thereby making a routine included
2881  * for compatibility, incompatible.
2882  *
2883  * XSH4.2 (spec 1170) defines gettimeofday and settimeofday to have two
2884  * parameters.
2885  *
2886  * This has caused general disagreement in the application community as to
2887  * the syntax of these routines.  Solaris defaults to the XSH4.2 definition.
2888  * The flag _SVID_GETTOD may be used to force the SVID version.
2889  */
2890 
2891 
2892 
2893 
2894 
2895 int settimeofday(struct timeval *, void *);
2896 
2897 hrtime_t gethrtime(void);
2898 hrtime_t gethrvtime(void);
2899 # 441 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2900 int gettimeofday(struct timeval *, void *);
2901 
2902 
2903 
2904 
2905 /*
2906  * The inclusion of <time.h> is historical and was added for
2907  * backward compatibility in delta 1.2 when a number of definitions
2908  * were moved out of <sys/time.h>.  More recently, the timespec and
2909  * itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
2910  * _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
2911  * which is now included by <time.h>.  This change was due to POSIX
2912  * 1003.1b-1993 and X/Open UNIX 98 requirements.  For non-POSIX and
2913  * non-X/Open applications, including this header will still make
2914  * visible these definitions.
2915  */
2916 
2917 
2918 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
2919 /*
2920  * CDDL HEADER START
2921  *
2922  * The contents of this file are subject to the terms of the
2923  * Common Development and Distribution License (the "License").
2924  * You may not use this file except in compliance with the License.
2925  *
2926  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2927  * or http://www.opensolaris.org/os/licensing.
2928  * See the License for the specific language governing permissions
2929  * and limitations under the License.
2930  *
2931  * When distributing Covered Code, include this CDDL HEADER in each
2932  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2933  * If applicable, add the following below this CDDL HEADER, with the
2934  * fields enclosed by brackets "[]" replaced with your own identifying
2935  * information: Portions Copyright [yyyy] [name of copyright owner]
2936  *
2937  * CDDL HEADER END
2938  */
2939 /*	Copyright (c) 1988 AT&T	*/
2940 /*	  All Rights Reserved  	*/
2941 
2942 
2943 /*
2944  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2945  *
2946  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
2947  * Use is subject to license terms.
2948  */
2949 /*
2950  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
2951  * Copyright 2016 Joyent, Inc.
2952  */
2953 # 460 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2954 
2955 
2956 /*
2957  * The inclusion of <sys/select.h> is needed for the FD_CLR,
2958  * FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
2959  * select() prototype defined in the XOpen specifications
2960  * beginning with XSH4v2.  Placement required after definition
2961  * for itimerval.
2962  */
2963 
2964 
2965 
2966 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
2967 /*
2968  * CDDL HEADER START
2969  *
2970  * The contents of this file are subject to the terms of the
2971  * Common Development and Distribution License (the "License").
2972  * You may not use this file except in compliance with the License.
2973  *
2974  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2975  * or http://www.opensolaris.org/os/licensing.
2976  * See the License for the specific language governing permissions
2977  * and limitations under the License.
2978  *
2979  * When distributing Covered Code, include this CDDL HEADER in each
2980  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2981  * If applicable, add the following below this CDDL HEADER, with the
2982  * fields enclosed by brackets "[]" replaced with your own identifying
2983  * information: Portions Copyright [yyyy] [name of copyright owner]
2984  *
2985  * CDDL HEADER END
2986  */
2987 
2988 /*
2989  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2990  *
2991  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2992  *
2993  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
2994  * Use is subject to license terms.
2995  */
2996 
2997 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2998 /*	  All Rights Reserved	*/
2999 
3000 /*
3001  * University Copyright- Copyright (c) 1982, 1986, 1988
3002  * The Regents of the University of California
3003  * All Rights Reserved
3004  *
3005  * University Acknowledgment- Portions of this document are derived from
3006  * software developed by the University of California, Berkeley, and its
3007  * contributors.
3008  */
3009 # 473 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
3010 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
3011 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3012 /*
3013  * The sigset_t type is defined in <sys/signal.h> and duplicated
3014  * in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
3015  * now allows the visibility of signal.h in this header, however
3016  * an order of inclusion problem occurs as a result of inclusion
3017  * of <sys/select.h> in <signal.h> under certain conditions.
3018  * Rather than include <sys/signal.h> here, we've duplicated
3019  * the sigset_t type instead. This type is required for the XPG6
3020  * introduced pselect() function also declared in this header.
3021  */
3022 
3023 
3024 typedef struct { /* signal set type */
3025  unsigned int __sigbits[4];
3026 } sigset_t;
3027 
3028 
3029 
3030 
3031 /*
3032  * Select uses bit masks of file descriptors in longs.
3033  * These macros manipulate such bit fields.
3034  * FD_SETSIZE may be defined by the user, but the default here
3035  * should be >= NOFILE (param.h).
3036  */
3037 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3038 typedef long fd_mask;
3039 
3040 typedef long fds_mask;
3041 
3042 /*
3043  *  The value of _NBBY needs to be consistant with the value
3044  *  of NBBY in <sys/param.h>.
3045  */
3046 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3047 typedef struct fd_set {
3048 
3049 
3050 
3051  long fds_bits[(((1024)+(((sizeof (fds_mask) * 8))-1))/((sizeof (fds_mask) * 8)))];
3052 } fd_set;
3053 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3054 extern int select(int, fd_set *, fd_set *,
3055  fd_set *, struct timeval *);
3056 
3057 
3058 extern int pselect(int, fd_set *, fd_set *,
3059  fd_set *, const struct timespec *,
3060  const sigset_t *);
3061 # 641 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3062 
3063 
3064 
3065 /*
3066  * _VOID was defined to be either void or char but this is not
3067  * required because previous SunOS compilers have accepted the void
3068  * type. However, because many system header and source files use the
3069  * void keyword, the volatile keyword, and ANSI C function prototypes,
3070  * non-ANSI compilers cannot compile the system anyway. The _VOID macro
3071  * should therefore not be used and remains for source compatibility
3072  * only.
3073  */
3074 /* CSTYLED */
3075 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3076 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
3077 /*
3078  * CDDL HEADER START
3079  *
3080  * The contents of this file are subject to the terms of the
3081  * Common Development and Distribution License, Version 1.0 only
3082  * (the "License").  You may not use this file except in compliance
3083  * with the License.
3084  *
3085  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3086  * or http://www.opensolaris.org/os/licensing.
3087  * See the License for the specific language governing permissions
3088  * and limitations under the License.
3089  *
3090  * When distributing Covered Code, include this CDDL HEADER in each
3091  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3092  * If applicable, add the following below this CDDL HEADER, with the
3093  * fields enclosed by brackets "[]" replaced with your own identifying
3094  * information: Portions Copyright [yyyy] [name of copyright owner]
3095  *
3096  * CDDL HEADER END
3097  */
3098 /*
3099  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3100  * Use is subject to license terms.
3101  */
3102 
3103 /*
3104  * Implementation-private.  This header should not be included
3105  * directly by an application.  The application should instead
3106  * include <time.h> which includes this header conditionally
3107  * depending on which feature test macros are defined. By default,
3108  * this header is included by <time.h>.  X/Open and POSIX
3109  * standards requirements result in this header being included
3110  * by <time.h> only under a restricted set of conditions.
3111  */
3112 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3113 
3114 
3115 /*
3116  * Allow global visibility for symbols defined in
3117  * C++ "std" namespace in <iso/time_iso.h>.
3118  */
3119 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3120 extern struct tm *gmtime_r(const time_t *,
3121    struct tm *);
3122 extern struct tm *localtime_r(const time_t *,
3123    struct tm *);
3124 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3125 extern char *strptime(const char *, const char *,
3126   struct tm *);
3127 
3128 
3129 
3130 
3131 
3132 /*
3133  * Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
3134  * definition of the sigevent structure.  Both require the inclusion
3135  * of <signal.h> and <time.h> when using the timer_create() function.
3136  * However, X/Open also specifies that the sigevent structure be defined
3137  * in <time.h> as described in the header <signal.h>.  This prevents
3138  * compiler warnings for applications that only include <time.h> and not
3139  * also <signal.h>.  The sigval union and the sigevent structure is
3140  * therefore defined both here and in <sys/siginfo.h> which gets included
3141  * via inclusion of <signal.h>.
3142  */
3143 
3144 
3145 union sigval {
3146  int sival_int; /* integer value */
3147  void *sival_ptr; /* pointer value */
3148 };
3149 
3150 
3151 
3152 
3153 struct sigevent {
3154  int sigev_notify; /* notification mode */
3155  int sigev_signo; /* signal number */
3156  union sigval sigev_value; /* signal value */
3157  void (*sigev_notify_function)(union sigval);
3158  pthread_attr_t *sigev_notify_attributes;
3159  int __sigev_pad2;
3160 };
3161 
3162 
3163 extern int clock_getres(clockid_t, struct timespec *);
3164 extern int clock_gettime(clockid_t, struct timespec *);
3165 extern int clock_settime(clockid_t, const struct timespec *);
3166 extern int timer_create(clockid_t, struct sigevent *,
3167   timer_t *);
3168 extern int timer_delete(timer_t);
3169 extern int timer_getoverrun(timer_t);
3170 extern int timer_gettime(timer_t, struct itimerspec *);
3171 extern int timer_settime(timer_t, int, const struct itimerspec *,
3172   struct itimerspec *);
3173 
3174 extern int nanosleep(const struct timespec *, struct timespec *);
3175 extern int clock_nanosleep(clockid_t, int,
3176  const struct timespec *, struct timespec *);
3177 
3178 
3179 
3180 
3181 
3182 
3183 extern void tzset(void);
3184 extern char *tzname[2];
3185 
3186 /* CLK_TCK marked as LEGACY in SUSv2 and removed in SUSv3 */
3187 
3188 
3189 extern long _sysconf(int); /* System Private interface to sysconf() */
3190 
3191     /* 3 is _SC_CLK_TCK */
3192 
3193 
3194 
3195 
3196 
3197 extern long timezone;
3198 extern int daylight;
3199 
3200 
3201 
3202 
3203 
3204 
3205 extern time_t timegm(struct tm *);
3206 extern int cftime(char *, char *, const time_t *);
3207 extern int ascftime(char *, const char *, const struct tm *);
3208 extern long altzone;
3209 
3210 
3211 
3212 
3213 extern struct tm *getdate(const char *);
3214 
3215 
3216 
3217 
3218 
3219 extern int getdate_err;
3220 
3221 
3222 
3223 /*
3224  * ctime_r() & asctime_r() prototypes are defined here.
3225  */
3226 
3227 /*
3228  * Previous releases of Solaris, starting at 2.3, provided definitions of
3229  * various functions as specified in POSIX.1c, Draft 6.  For some of these
3230  * functions, the final POSIX 1003.1c standard had a different number of
3231  * arguments and return values.
3232  *
3233  * The following segment of this header provides support for the standard
3234  * interfaces while supporting applications written under earlier
3235  * releases.  The application defines appropriate values of the feature
3236  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
3237  * whether it was written to expect the Draft 6 or standard versions of
3238  * these interfaces, before including this header.  This header then
3239  * provides a mapping from the source version of the interface to an
3240  * appropriate binary interface.  Such mappings permit an application
3241  * to be built from libraries and objects which have mixed expectations
3242  * of the definitions of these functions.
3243  *
3244  * For applications using the Draft 6 definitions, the binary symbol is the
3245  * same as the source symbol, and no explicit mapping is needed.  For the
3246  * standard interface, the function func() is mapped to the binary symbol
3247  * _posix_func().  The preferred mechanism for the remapping is a compiler
3248  * #pragma.  If the compiler does not provide such a #pragma, the header file
3249  * defines a static function func() which calls the _posix_func() version;
3250  * this has to be done instead of #define since POSIX specifies that an
3251  * application can #undef the symbol and still be bound to the correct
3252  * implementation.  Unfortunately, the statics confuse lint so we fallback to
3253  * #define in that case.
3254  *
3255  * NOTE: Support for the Draft 6 definitions is provided for compatibility
3256  * only.  New applications/libraries should use the standard definitions.
3257  */
3258 # 280 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3259 extern char *asctime_r(const struct tm *, char *, int);
3260 extern char *ctime_r(const time_t *, char *, int);
3261 # 292 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3262 typedef struct _locale *locale_t;
3263 
3264 
3265 extern size_t strftime_l(char *, size_t,
3266  const char *, const struct tm *, locale_t);
3267 
3268 
3269 
3270 
3271 
3272 /*
3273  * Note, the C11 standard requires that all the various base values that are
3274  * passed into timespec_get() be non-zero. Hence why TIME_UTC starts at one.
3275  */
3276 
3277 
3278 extern int timespec_get(struct timespec *, int);
3279 # 34 "unpack_package_from_stream.c" 2
3280 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 1
3281 /*
3282  * CDDL HEADER START
3283  *
3284  * The contents of this file are subject to the terms of the
3285  * Common Development and Distribution License, Version 1.0 only
3286  * (the "License").  You may not use this file except in compliance
3287  * with the License.
3288  *
3289  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3290  * or http://www.opensolaris.org/os/licensing.
3291  * See the License for the specific language governing permissions
3292  * and limitations under the License.
3293  *
3294  * When distributing Covered Code, include this CDDL HEADER in each
3295  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3296  * If applicable, add the following below this CDDL HEADER, with the
3297  * fields enclosed by brackets "[]" replaced with your own identifying
3298  * information: Portions Copyright [yyyy] [name of copyright owner]
3299  *
3300  * CDDL HEADER END
3301  */
3302 /*
3303  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3304  */
3305 /*	Copyright (c) 1988 AT&T	*/
3306 /*	  All Rights Reserved  	*/
3307 
3308 
3309 
3310 
3311 
3312 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
3313 /*
3314  * CDDL HEADER START
3315  *
3316  * The contents of this file are subject to the terms of the
3317  * Common Development and Distribution License (the "License").
3318  * You may not use this file except in compliance with the License.
3319  *
3320  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3321  * or http://www.opensolaris.org/os/licensing.
3322  * See the License for the specific language governing permissions
3323  * and limitations under the License.
3324  *
3325  * When distributing Covered Code, include this CDDL HEADER in each
3326  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3327  * If applicable, add the following below this CDDL HEADER, with the
3328  * fields enclosed by brackets "[]" replaced with your own identifying
3329  * information: Portions Copyright [yyyy] [name of copyright owner]
3330  *
3331  * CDDL HEADER END
3332  */
3333 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3334 /*	  All Rights Reserved  	*/
3335 
3336 
3337 /*
3338  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3339  * Use is subject to license terms.
3340  *
3341  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3342  * Copyright 2016 Joyent, Inc.
3343  */
3344 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 2
3345 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
3346 /*
3347  * CDDL HEADER START
3348  *
3349  * The contents of this file are subject to the terms of the
3350  * Common Development and Distribution License, Version 1.0 only
3351  * (the "License").  You may not use this file except in compliance
3352  * with the License.
3353  *
3354  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3355  * or http://www.opensolaris.org/os/licensing.
3356  * See the License for the specific language governing permissions
3357  * and limitations under the License.
3358  *
3359  * When distributing Covered Code, include this CDDL HEADER in each
3360  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3361  * If applicable, add the following below this CDDL HEADER, with the
3362  * fields enclosed by brackets "[]" replaced with your own identifying
3363  * information: Portions Copyright [yyyy] [name of copyright owner]
3364  *
3365  * CDDL HEADER END
3366  */
3367 /*
3368  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3369  * Use is subject to license terms.
3370  */
3371 
3372 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3373 /*	  All Rights Reserved  	*/
3374 
3375 
3376 
3377 
3378 #pragma ident "%Z%%M%	%I%	%E% SMI"
3379 
3380 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3381 /*
3382  * CDDL HEADER START
3383  *
3384  * The contents of this file are subject to the terms of the
3385  * Common Development and Distribution License (the "License").
3386  * You may not use this file except in compliance with the License.
3387  *
3388  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3389  * or http://www.opensolaris.org/os/licensing.
3390  * See the License for the specific language governing permissions
3391  * and limitations under the License.
3392  *
3393  * When distributing Covered Code, include this CDDL HEADER in each
3394  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3395  * If applicable, add the following below this CDDL HEADER, with the
3396  * fields enclosed by brackets "[]" replaced with your own identifying
3397  * information: Portions Copyright [yyyy] [name of copyright owner]
3398  *
3399  * CDDL HEADER END
3400  */
3401 
3402 /*
3403  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3404  * Copyright 2016 Joyent, Inc.
3405  *
3406  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3407  * Use is subject to license terms.
3408  */
3409 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
3410 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
3411 /*
3412  * CDDL HEADER START
3413  *
3414  * The contents of this file are subject to the terms of the
3415  * Common Development and Distribution License (the "License").
3416  * You may not use this file except in compliance with the License.
3417  *
3418  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3419  * or http://www.opensolaris.org/os/licensing.
3420  * See the License for the specific language governing permissions
3421  * and limitations under the License.
3422  *
3423  * When distributing Covered Code, include this CDDL HEADER in each
3424  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3425  * If applicable, add the following below this CDDL HEADER, with the
3426  * fields enclosed by brackets "[]" replaced with your own identifying
3427  * information: Portions Copyright [yyyy] [name of copyright owner]
3428  *
3429  * CDDL HEADER END
3430  */
3431 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3432 /*	  All Rights Reserved  	*/
3433 
3434 
3435 /*
3436  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3437  * Use is subject to license terms.
3438  *
3439  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3440  * Copyright 2016 Joyent, Inc.
3441  */
3442 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
3443 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3444 /*
3445  * The union sigval is also defined in <time.h> as per X/Open and
3446  * POSIX requirements.
3447  */
3448 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3449 /*
3450  * The sigevent structure is also defined in <time.h> as per X/Open and
3451  * POSIX requirements.
3452  */
3453 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3454 /* values of sigev_notify */
3455 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3456 /*
3457  * negative signal codes are reserved for future use for user generated
3458  * signals
3459  */
3460 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3461 /*
3462  * Get the machine dependent signal codes (SIGILL, SIGFPE, SIGSEGV, and
3463  * SIGBUS) from <sys/machsig.h>
3464  */
3465 
3466 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 1
3467 /*
3468  * CDDL HEADER START
3469  *
3470  * The contents of this file are subject to the terms of the
3471  * Common Development and Distribution License, Version 1.0 only
3472  * (the "License").  You may not use this file except in compliance
3473  * with the License.
3474  *
3475  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3476  * or http://www.opensolaris.org/os/licensing.
3477  * See the License for the specific language governing permissions
3478  * and limitations under the License.
3479  *
3480  * When distributing Covered Code, include this CDDL HEADER in each
3481  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3482  * If applicable, add the following below this CDDL HEADER, with the
3483  * fields enclosed by brackets "[]" replaced with your own identifying
3484  * information: Portions Copyright [yyyy] [name of copyright owner]
3485  *
3486  * CDDL HEADER END
3487  */
3488 /*
3489  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
3490  * Use is subject to license terms.
3491  */
3492 
3493 /*	Copyright (c) 1988 AT&T	*/
3494 /*	  All Rights Reserved  	*/
3495 
3496 
3497 
3498 
3499 
3500 #pragma ident "%Z%%M%	%I%	%E% SMI"
3501 
3502 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3503 /*
3504  * CDDL HEADER START
3505  *
3506  * The contents of this file are subject to the terms of the
3507  * Common Development and Distribution License (the "License").
3508  * You may not use this file except in compliance with the License.
3509  *
3510  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3511  * or http://www.opensolaris.org/os/licensing.
3512  * See the License for the specific language governing permissions
3513  * and limitations under the License.
3514  *
3515  * When distributing Covered Code, include this CDDL HEADER in each
3516  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3517  * If applicable, add the following below this CDDL HEADER, with the
3518  * fields enclosed by brackets "[]" replaced with your own identifying
3519  * information: Portions Copyright [yyyy] [name of copyright owner]
3520  *
3521  * CDDL HEADER END
3522  */
3523 
3524 /*
3525  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3526  * Copyright 2016 Joyent, Inc.
3527  *
3528  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3529  * Use is subject to license terms.
3530  */
3531 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 2
3532 
3533 
3534 
3535 
3536 
3537 /*
3538  * machsig.h is the machine dependent portion of siginfo.h (and is
3539  * included by siginfo.h). A version of machsig.h should exist for
3540  * each architecture. The codes for SIGILL, SIGFPU, SIGSEGV and SIGBUS
3541  * are in this file. The codes for SIGTRAP, SIGCLD(SIGCHLD), and
3542  * SIGPOLL are architecture independent and may be found in siginfo.h.
3543  */
3544 
3545 
3546 
3547 
3548 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/vm/faultcode.h" 1
3549 /*
3550  * CDDL HEADER START
3551  *
3552  * The contents of this file are subject to the terms of the
3553  * Common Development and Distribution License (the "License").
3554  * You may not use this file except in compliance with the License.
3555  *
3556  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3557  * or http://www.opensolaris.org/os/licensing.
3558  * See the License for the specific language governing permissions
3559  * and limitations under the License.
3560  *
3561  * When distributing Covered Code, include this CDDL HEADER in each
3562  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3563  * If applicable, add the following below this CDDL HEADER, with the
3564  * fields enclosed by brackets "[]" replaced with your own identifying
3565  * information: Portions Copyright [yyyy] [name of copyright owner]
3566  *
3567  * CDDL HEADER END
3568  */
3569 /*
3570  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
3571  * Use is subject to license terms.
3572  */
3573 
3574 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3575 /*	  All Rights Reserved  	*/
3576 
3577 /*
3578  * University Copyright- Copyright (c) 1982, 1986, 1988
3579  * The Regents of the University of California
3580  * All Rights Reserved
3581  *
3582  * University Acknowledgment- Portions of this document are derived from
3583  * software developed by the University of California, Berkeley, and its
3584  * contributors.
3585  */
3586 
3587 
3588 
3589 
3590 #pragma ident "%Z%%M%	%I%	%E% SMI"
3591 
3592 
3593 
3594 
3595 
3596 /*
3597  * This file describes the data type returned by vm routines
3598  * which handle faults.
3599  *
3600  * If FC_CODE(fc) == FC_OBJERR, then FC_ERRNO(fc) contains the errno value
3601  * returned by the underlying object mapped at the fault address.
3602  */
3603 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/vm/faultcode.h"
3604 typedef int faultcode_t; /* type returned by vm fault routines */
3605 
3606 extern int fc_decode(faultcode_t);
3607 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 2
3608 
3609 
3610 /*
3611  * SIGILL signal codes
3612  */
3613 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h"
3614 /*
3615  * SIGEMT signal codes
3616  */
3617 
3618 
3619 
3620 
3621 
3622 
3623 /*
3624  * SIGFPE signal codes
3625  */
3626 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h"
3627 /*
3628  * SIGSEGV signal codes
3629  */
3630 
3631 
3632 
3633 
3634 
3635 
3636 
3637 /*
3638  * SIGBUS signal codes
3639  */
3640 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
3641 
3642 /*
3643  * SIGTRAP signal codes
3644  */
3645 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3646 /*
3647  * SIGCLD signal codes
3648  */
3649 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3650 /*
3651  * SIGPOLL signal codes
3652  */
3653 # 195 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3654 /*
3655  * SIGPROF signal codes
3656  */
3657 # 215 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3658 /*
3659  * Inclusion of <sys/time_impl.h> is needed for the declaration of
3660  * timestruc_t.  However, since inclusion of <sys/time_impl.h> results
3661  * in X/Open and POSIX namespace pollution, the definition for
3662  * timestruct_t has been duplicated in a standards namespace safe header
3663  * <sys/time_std_impl.h>.  In <sys/time_std_impl.h>, the structure
3664  * name, tag, and member names, as well as the type itself, all have
3665  * leading underscores to protect namespace.
3666  */
3667 
3668 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
3669 /*
3670  * CDDL HEADER START
3671  *
3672  * The contents of this file are subject to the terms of the
3673  * Common Development and Distribution License, Version 1.0 only
3674  * (the "License").  You may not use this file except in compliance
3675  * with the License.
3676  *
3677  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3678  * or http://www.opensolaris.org/os/licensing.
3679  * See the License for the specific language governing permissions
3680  * and limitations under the License.
3681  *
3682  * When distributing Covered Code, include this CDDL HEADER in each
3683  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3684  * If applicable, add the following below this CDDL HEADER, with the
3685  * fields enclosed by brackets "[]" replaced with your own identifying
3686  * information: Portions Copyright [yyyy] [name of copyright owner]
3687  *
3688  * CDDL HEADER END
3689  */
3690 /*
3691  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3692  * Use is subject to license terms.
3693  */
3694 
3695 /*
3696  * Implementation-private.  This header should not be included
3697  * directly by an application.  The application should instead
3698  * include <time.h> which includes this header conditionally
3699  * depending on which feature test macros are defined. By default,
3700  * this header is included by <time.h>.  X/Open and POSIX
3701  * standards requirements result in this header being included
3702  * by <time.h> only under a restricted set of conditions.
3703  */
3704 # 226 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
3705 
3706 
3707 
3708 
3709 /*
3710  * The inclusion of <sys/types.h> is needed for definitions of pid_t, etc.
3711  * Placement here is due to a dependency in <sys/select.h> which is included
3712  * by <sys/types.h> for the sigevent structure.  Hence this inclusion must
3713  * follow that definition.
3714  */
3715 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
3716 /*
3717  * CDDL HEADER START
3718  *
3719  * The contents of this file are subject to the terms of the
3720  * Common Development and Distribution License (the "License").
3721  * You may not use this file except in compliance with the License.
3722  *
3723  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3724  * or http://www.opensolaris.org/os/licensing.
3725  * See the License for the specific language governing permissions
3726  * and limitations under the License.
3727  *
3728  * When distributing Covered Code, include this CDDL HEADER in each
3729  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3730  * If applicable, add the following below this CDDL HEADER, with the
3731  * fields enclosed by brackets "[]" replaced with your own identifying
3732  * information: Portions Copyright [yyyy] [name of copyright owner]
3733  *
3734  * CDDL HEADER END
3735  */
3736 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3737 /*	  All Rights Reserved  	*/
3738 
3739 
3740 /*
3741  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3742  * Use is subject to license terms.
3743  *
3744  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3745  * Copyright 2016 Joyent, Inc.
3746  */
3747 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
3748 
3749 
3750 typedef struct siginfo { /* pollutes POSIX/XOPEN namespace */
3751 
3752 
3753 
3754  int si_signo; /* signal from signal.h	*/
3755  int si_code; /* code from above	*/
3756  int si_errno; /* error from errno.h	*/
3757 
3758 
3759 
3760  union {
3761 
3762   int __pad[((128 / sizeof (int)) - 3)]; /* for future growth	*/
3763 
3764   struct { /* kill(), SIGCLD, siqqueue() */
3765    pid_t __pid; /* process ID		*/
3766    union {
3767     struct {
3768      uid_t __uid;
3769 
3770 
3771      union sigval __value;
3772 
3773 
3774 
3775     } __kill;
3776     struct {
3777      clock_t __utime;
3778      int __status;
3779      clock_t __stime;
3780     } __cld;
3781    } __pdata;
3782    ctid_t __ctid; /* contract ID		*/
3783    zoneid_t __zoneid; /* zone ID		*/
3784   } __proc;
3785 
3786   struct { /* SIGSEGV, SIGBUS, SIGILL, SIGTRAP, SIGFPE */
3787    void *__addr; /* faulting address	*/
3788    int __trapno; /* illegal trap number	*/
3789    caddr_t __pc; /* instruction address	*/
3790   } __fault;
3791 
3792   struct { /* SIGPOLL, SIGXFSZ	*/
3793   /* fd not currently available for SIGPOLL */
3794    int __fd; /* file descriptor	*/
3795    long __band;
3796   } __file;
3797 
3798   struct { /* SIGPROF */
3799    caddr_t __faddr; /* last fault address	*/
3800 
3801    timestruc_t __tstamp; /* real time stamp	*/
3802 
3803 
3804 
3805    short __syscall; /* current syscall	*/
3806    char __nsysarg; /* number of arguments	*/
3807    char __fault; /* last fault type	*/
3808    long __sysarg[8]; /* syscall arguments	*/
3809    int __mstate[10]; /* see <sys/msacct.h>	*/
3810   } __prof;
3811 
3812   struct { /* SI_RCTL */
3813    int32_t __entity; /* type of entity exceeding */
3814   } __rctl;
3815  } __data;
3816 
3817 } siginfo_t;
3818 # 374 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3819 /*
3820  * XXX -- internal version is identical to siginfo_t but without the padding.
3821  * This must be maintained in sync with it.
3822  */
3823 
3824 
3825 
3826 typedef struct k_siginfo {
3827  int si_signo; /* signal from signal.h	*/
3828  int si_code; /* code from above	*/
3829  int si_errno; /* error from errno.h	*/
3830 
3831 
3832 
3833  union {
3834   struct { /* kill(), SIGCLD, siqqueue() */
3835    pid_t __pid; /* process ID		*/
3836    union {
3837     struct {
3838      uid_t __uid;
3839      union sigval __value;
3840     } __kill;
3841     struct {
3842      clock_t __utime;
3843      int __status;
3844      clock_t __stime;
3845     } __cld;
3846    } __pdata;
3847    ctid_t __ctid; /* contract ID		*/
3848    zoneid_t __zoneid; /* zone ID		*/
3849   } __proc;
3850 
3851   struct { /* SIGSEGV, SIGBUS, SIGILL, SIGTRAP, SIGFPE */
3852    void *__addr; /* faulting address	*/
3853    int __trapno; /* illegal trap number	*/
3854    caddr_t __pc; /* instruction address	*/
3855   } __fault;
3856 
3857   struct { /* SIGPOLL, SIGXFSZ	*/
3858   /* fd not currently available for SIGPOLL */
3859    int __fd; /* file descriptor	*/
3860    long __band;
3861   } __file;
3862 
3863   struct { /* SIGPROF */
3864    caddr_t __faddr; /* last fault address	*/
3865 
3866 
3867    timestruc_t __tstamp; /* real time stamp	*/
3868 
3869 
3870 
3871    short __syscall; /* current syscall	*/
3872    char __nsysarg; /* number of arguments	*/
3873    char __fault; /* last fault type	*/
3874    /* these are omitted to keep k_siginfo_t small	*/
3875    /* long	__sysarg[8]; */
3876    /* int	__mstate[10]; */
3877   } __prof;
3878 
3879   struct { /* SI_RCTL */
3880    int32_t __entity; /* type of entity exceeding */
3881   } __rctl;
3882 
3883  } __data;
3884 
3885 } k_siginfo_t;
3886 
3887 typedef struct sigqueue {
3888  struct sigqueue *sq_next;
3889  k_siginfo_t sq_info;
3890  void (*sq_func)(struct sigqueue *); /* destructor function */
3891  void *sq_backptr; /* pointer to the data structure */
3892      /* associated by sq_func()	*/
3893  int sq_external; /* comes from outside the contract */
3894 } sigqueue_t;
3895 
3896 /*  indication whether to queue the signal or not */
3897 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 2
3898 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
3899 /*
3900  * CDDL HEADER START
3901  *
3902  * The contents of this file are subject to the terms of the
3903  * Common Development and Distribution License, Version 1.0 only
3904  * (the "License").  You may not use this file except in compliance
3905  * with the License.
3906  *
3907  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3908  * or http://www.opensolaris.org/os/licensing.
3909  * See the License for the specific language governing permissions
3910  * and limitations under the License.
3911  *
3912  * When distributing Covered Code, include this CDDL HEADER in each
3913  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3914  * If applicable, add the following below this CDDL HEADER, with the
3915  * fields enclosed by brackets "[]" replaced with your own identifying
3916  * information: Portions Copyright [yyyy] [name of copyright owner]
3917  *
3918  * CDDL HEADER END
3919  */
3920 /*
3921  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3922  * Use is subject to license terms.
3923  */
3924 
3925 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3926 /*	  All Rights Reserved  	*/
3927 
3928 
3929 
3930 
3931 
3932 #pragma ident "%Z%%M%	%I%	%E% SMI"
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 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
3968 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.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 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3990 /*	  All Rights Reserved  	*/
3991 
3992 
3993 /*
3994  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3995  * Use is subject to license terms.
3996  *
3997  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3998  * Copyright 2016 Joyent, Inc.
3999  */
4000 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
4001 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 1
4002 /*
4003  * CDDL HEADER START
4004  *
4005  * The contents of this file are subject to the terms of the
4006  * Common Development and Distribution License (the "License").
4007  * You may not use this file except in compliance with the License.
4008  *
4009  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4010  * or http://www.opensolaris.org/os/licensing.
4011  * See the License for the specific language governing permissions
4012  * and limitations under the License.
4013  *
4014  * When distributing Covered Code, include this CDDL HEADER in each
4015  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4016  * If applicable, add the following below this CDDL HEADER, with the
4017  * fields enclosed by brackets "[]" replaced with your own identifying
4018  * information: Portions Copyright [yyyy] [name of copyright owner]
4019  *
4020  * CDDL HEADER END
4021  */
4022 
4023 /*
4024  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
4025  * Use is subject to license terms.
4026  */
4027 
4028 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4029 /*	  All Rights Reserved  	*/
4030 
4031 /*
4032  * University Copyright- Copyright (c) 1982, 1986, 1988
4033  * The Regents of the University of California
4034  * All Rights Reserved
4035  *
4036  * University Acknowledgment- Portions of this document are derived from
4037  * software developed by the University of California, Berkeley, and its
4038  * contributors.
4039  */
4040 
4041 
4042 
4043 
4044 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4045 /*
4046  * CDDL HEADER START
4047  *
4048  * The contents of this file are subject to the terms of the
4049  * Common Development and Distribution License (the "License").
4050  * You may not use this file except in compliance with the License.
4051  *
4052  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4053  * or http://www.opensolaris.org/os/licensing.
4054  * See the License for the specific language governing permissions
4055  * and limitations under the License.
4056  *
4057  * When distributing Covered Code, include this CDDL HEADER in each
4058  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4059  * If applicable, add the following below this CDDL HEADER, with the
4060  * fields enclosed by brackets "[]" replaced with your own identifying
4061  * information: Portions Copyright [yyyy] [name of copyright owner]
4062  *
4063  * CDDL HEADER END
4064  */
4065 
4066 /*
4067  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4068  * Copyright 2016 Joyent, Inc.
4069  *
4070  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4071  * Use is subject to license terms.
4072  */
4073 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
4074 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 1
4075 /*
4076  * CDDL HEADER START
4077  *
4078  * The contents of this file are subject to the terms of the
4079  * Common Development and Distribution License (the "License").
4080  * You may not use this file except in compliance with the License.
4081  *
4082  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4083  * or http://www.opensolaris.org/os/licensing.
4084  * See the License for the specific language governing permissions
4085  * and limitations under the License.
4086  *
4087  * When distributing Covered Code, include this CDDL HEADER in each
4088  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4089  * If applicable, add the following below this CDDL HEADER, with the
4090  * fields enclosed by brackets "[]" replaced with your own identifying
4091  * information: Portions Copyright [yyyy] [name of copyright owner]
4092  *
4093  * CDDL HEADER END
4094  */
4095 
4096 /*
4097  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
4098  * Use is subject to license terms.
4099  */
4100 
4101 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4102 /*	  All Rights Reserved  	*/
4103 
4104 /*
4105  * An application should not include this header directly.  Instead it
4106  * should be included only through the inclusion of other Sun headers.
4107  *
4108  * The contents of this header is limited to identifiers specified in the
4109  * C Standard.  Any new identifiers specified in future amendments to the
4110  * C Standard must be placed in this header.  If these new identifiers
4111  * are required to also be in the C++ Standard "std" namespace, then for
4112  * anything other than macro definitions, corresponding "using" directives
4113  * must also be added to <sys/signal.h.h>.
4114  */
4115 
4116 
4117 
4118 
4119 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
4120 /*
4121  * CDDL HEADER START
4122  *
4123  * The contents of this file are subject to the terms of the
4124  * Common Development and Distribution License (the "License").
4125  * You may not use this file except in compliance with the License.
4126  *
4127  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4128  * or http://www.opensolaris.org/os/licensing.
4129  * See the License for the specific language governing permissions
4130  * and limitations under the License.
4131  *
4132  * When distributing Covered Code, include this CDDL HEADER in each
4133  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4134  * If applicable, add the following below this CDDL HEADER, with the
4135  * fields enclosed by brackets "[]" replaced with your own identifying
4136  * information: Portions Copyright [yyyy] [name of copyright owner]
4137  *
4138  * CDDL HEADER END
4139  */
4140 
4141 /*
4142  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
4143  *	  All Rights Reserved
4144  *
4145  */
4146 
4147 /*
4148  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4149  * Use is subject to license terms.
4150  */
4151 
4152 /*
4153  * WARNING: This is an implementation-specific header,
4154  * its contents are not guaranteed. Applications
4155  * should include <unistd.h> and not this header.
4156  */
4157 
4158 
4159 
4160 
4161 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4162 /*
4163  * CDDL HEADER START
4164  *
4165  * The contents of this file are subject to the terms of the
4166  * Common Development and Distribution License (the "License").
4167  * You may not use this file except in compliance with the License.
4168  *
4169  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4170  * or http://www.opensolaris.org/os/licensing.
4171  * See the License for the specific language governing permissions
4172  * and limitations under the License.
4173  *
4174  * When distributing Covered Code, include this CDDL HEADER in each
4175  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4176  * If applicable, add the following below this CDDL HEADER, with the
4177  * fields enclosed by brackets "[]" replaced with your own identifying
4178  * information: Portions Copyright [yyyy] [name of copyright owner]
4179  *
4180  * CDDL HEADER END
4181  */
4182 
4183 /*
4184  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4185  * Copyright 2016 Joyent, Inc.
4186  *
4187  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4188  * Use is subject to license terms.
4189  */
4190 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 2
4191 
4192 
4193 
4194 
4195 
4196 /* command names for confstr */
4197 
4198 
4199 
4200 /*
4201  * command names for large file configuration information
4202  */
4203 /* large file compilation environment configuration */
4204 
4205 
4206 
4207 
4208 /* transitional large file interface configuration */
4209 
4210 
4211 
4212 
4213 
4214 /* UNIX 98 */
4215 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4216 /* UNIX 03 */
4217 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4218 /* command names for POSIX sysconf */
4219 
4220 /* POSIX.1 names */
4221 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4222 /* SVR4 names */
4223 
4224 
4225 
4226 
4227 /* 13 reserved for SVr4-ES/MP _SC_NACLS_MAX */
4228 
4229 
4230 
4231 
4232 /* POSIX.4 names */
4233 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4234 /* XPG4 names */
4235 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4236 /* additional XSH4/XCU4 command names for sysconf */
4237 
4238 
4239 
4240 /* additional XPG4v2 (UNIX 95) command names */
4241 
4242 
4243 
4244 
4245 
4246 /* defined for XTI (XNS Issue 5) */
4247 
4248 
4249 
4250 
4251 
4252 
4253 
4254 /*
4255  * Hardware specific items
4256  * Note that not all items are supported on all architectures
4257  */
4258 # 214 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4259 /*
4260  * POSIX.1c (pthreads) names. These values are defined above
4261  * the sub-500 range. See psarc case 1995/257.
4262  */
4263 # 235 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4264 /* UNIX 98 */
4265 # 244 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4266 /* UNIX 03 */
4267 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4268 /* command names for POSIX pathconf */
4269 
4270 /* POSIX.1 names */
4271 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4272 /* POSIX.4 names */
4273 
4274 
4275 
4276 /* UNIX 03 names */
4277 # 315 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4278 /* UNIX 08 names */
4279 
4280 
4281 /*
4282  * Large File Summit names
4283  *
4284  * This value matches the MIPS ABI choice, but leaves a large gap in the
4285  * value space.
4286  */
4287 
4288 
4289 /*
4290  * Extended attributes
4291  */
4292 
4293 
4294 
4295 /*
4296  * If you add a _PC define above 101, you must change _PC_LAST (and truss).
4297  */
4298 
4299 
4300 /*
4301  * Case sensitivity values (related to _PC_CASE_BEHAVIOR)
4302  */
4303 
4304 
4305 
4306 /*
4307  * The value of 0 is returned when
4308  * ACL's are not supported
4309  */
4310 # 366 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4311 /*
4312  * Marked LEGACY in SUSv2 and removed in SUSv3. Though SUSv3 applications
4313  * should not rely on this value, it has been aligned with the current
4314  * standard to avoid confusion if used.
4315  */
4316 # 408 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4317 /* UNIX 03 names */
4318 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 2
4319 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h"
4320 /* insert new signals here, and move _SIGRTM* appropriately */
4321 
4322 
4323 extern long _sysconf(int); /* System Private interface to sysconf() */
4324 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
4325 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4326 /*
4327  * We need <sys/siginfo.h> for the declaration of siginfo_t.
4328  */
4329 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
4330 /*
4331  * CDDL HEADER START
4332  *
4333  * The contents of this file are subject to the terms of the
4334  * Common Development and Distribution License, Version 1.0 only
4335  * (the "License").  You may not use this file except in compliance
4336  * with the License.
4337  *
4338  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4339  * or http://www.opensolaris.org/os/licensing.
4340  * See the License for the specific language governing permissions
4341  * and limitations under the License.
4342  *
4343  * When distributing Covered Code, include this CDDL HEADER in each
4344  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4345  * If applicable, add the following below this CDDL HEADER, with the
4346  * fields enclosed by brackets "[]" replaced with your own identifying
4347  * information: Portions Copyright [yyyy] [name of copyright owner]
4348  *
4349  * CDDL HEADER END
4350  */
4351 /*
4352  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4353  * Use is subject to license terms.
4354  */
4355 
4356 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4357 /*	  All Rights Reserved  	*/
4358 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
4359 
4360 
4361 /* Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements */
4362 
4363 
4364 
4365 
4366 
4367 
4368 
4369 typedef struct {
4370  unsigned int __sigbits[3];
4371 } k_sigset_t;
4372 
4373 /*
4374  * The signal handler routine can have either one or three arguments.
4375  * Existing C code has used either form so not specifing the arguments
4376  * neatly finesses the problem.  C++ doesn't accept this.  To C++
4377  * "(*sa_handler)()" indicates a routine with no arguments (ANSI C would
4378  * specify this as "(*sa_handler)(void)").  One or the other form must be
4379  * used for C++ and the only logical choice is "(*sa_handler)(int)" to allow
4380  * the SIG_* defines to work.  "(*sa_sigaction)(int, siginfo_t *, void *)"
4381  * can be used for the three argument form.
4382  */
4383 
4384 /*
4385  * Note: storage overlap by sa_handler and sa_sigaction
4386  */
4387 struct sigaction {
4388  int sa_flags;
4389  union {
4390 
4391 
4392 
4393   void (*_handler)();
4394 
4395 
4396 
4397 
4398   void (*_sigaction)(int, siginfo_t *, void *);
4399 
4400  } _funcptr;
4401  sigset_t sa_mask;
4402 
4403  int sa_resv[2];
4404 
4405 };
4406 # 126 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4407 /* this is only valid for SIGCLD */
4408 
4409 
4410 
4411 
4412 
4413 
4414 
4415    /* non-conformant ANSI compilation	*/
4416 
4417 /* definitions for the sa_flags field */
4418 # 153 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4419 /* this is only valid for SIGCLD */
4420 
4421 
4422 
4423 /*
4424  * use of these symbols by applications is injurious
4425  *	to binary compatibility
4426  */
4427 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4428 /* Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements. */
4429 
4430 
4431 
4432 typedef struct sigaltstack {
4433 
4434 
4435 
4436  void *ss_sp;
4437  size_t ss_size;
4438  int ss_flags;
4439 } stack_t;
4440 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4441 /* signotify id used only by libc for mq_notify()/aio_notify() */
4442 typedef struct signotify_id { /* signotify id struct		*/
4443  pid_t sn_pid; /* pid of proc to be notified	*/
4444  int sn_index; /* index in preallocated pool	*/
4445  int sn_pad; /* reserved			*/
4446 } signotify_id_t;
4447 # 222 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4448 /* Command codes for sig_notify call */
4449 
4450 
4451 
4452 
4453 
4454 
4455 
4456 /* Added as per XPG4v2 */
4457 
4458 
4459 
4460 struct sigstack {
4461  void *ss_sp;
4462  int ss_onstack;
4463 };
4464 
4465 
4466 /*
4467  * For definition of ucontext_t; must follow struct definition
4468  * for  sigset_t
4469  */
4470 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
4471 
4472 /*
4473  *	This file defines the data needed to specify a set of
4474  *	processes.  These types are used by the sigsend, sigsendset,
4475  *	priocntl, priocntlset, waitid, evexit, and evexitset system
4476  *	calls.
4477  */
4478 
4479 
4480 
4481 
4482 
4483 /*
4484  *	The following defines the values for an identifier type.  It
4485  *	specifies the interpretation of an id value.  An idtype and
4486  *	id together define a simple set of processes.
4487  */
4488 typedef enum
4489 
4490  idtype /* pollutes XPG4.2 namespace */
4491 
4492   {
4493  P_PID, /* A process identifier.		*/
4494  P_PPID, /* A parent process identifier.		*/
4495  P_PGID, /* A process group (job control group)	*/
4496    /* identifier.				*/
4497  P_SID, /* A session identifier.		*/
4498  P_CID, /* A scheduling class identifier.	*/
4499  P_UID, /* A user identifier.			*/
4500  P_GID, /* A group identifier.			*/
4501  P_ALL, /* All processes.			*/
4502  P_LWPID, /* An LWP identifier.			*/
4503  P_TASKID, /* A task identifier.			*/
4504  P_PROJID, /* A project identifier.		*/
4505  P_POOLID, /* A pool identifier.			*/
4506  P_ZONEID, /* A zone identifier.			*/
4507  P_CTID, /* A (process) contract identifier.	*/
4508  P_CPUID, /* CPU identifier.			*/
4509  P_PSETID /* Processor set identifier		*/
4510 } idtype_t;
4511 
4512 
4513 /*
4514  *	The following defines the operations which can be performed to
4515  *	combine two simple sets of processes to form another set of
4516  *	processes.
4517  */
4518 
4519 typedef enum idop {
4520  POP_DIFF, /* Set difference.  The processes which	*/
4521    /* are in the left operand set and not	*/
4522    /* in the right operand set.		*/
4523  POP_AND, /* Set disjunction.  The processes	*/
4524    /* which are in both the left and right	*/
4525    /* operand sets.			*/
4526  POP_OR, /* Set conjunction.  The processes	*/
4527    /* which are in either the left or the	*/
4528    /* right operand sets (or both).	*/
4529  POP_XOR /* Set exclusive or.  The processes 	*/
4530    /* which are in either the left or	*/
4531    /* right operand sets but not in both.	*/
4532 } idop_t;
4533 
4534 
4535 /*
4536  *	The following structure is used to define a set of processes.
4537  *	The set is defined in terms of two simple sets of processes
4538  *	and an operator which operates on these two operand sets.
4539  */
4540 typedef struct procset {
4541  idop_t p_op; /* The operator connection the	*/
4542     /* following two operands each	*/
4543     /* of which is a simple set of	*/
4544     /* processes.			*/
4545 
4546  idtype_t p_lidtype;
4547     /* The type of the left operand	*/
4548     /* simple set.			*/
4549  id_t p_lid; /* The id of the left operand.	*/
4550 
4551  idtype_t p_ridtype;
4552     /* The type of the right	*/
4553     /* operand simple set.		*/
4554  id_t p_rid; /* The id of the right operand.	*/
4555 } procset_t;
4556 
4557 /*
4558  *	The following macro can be used to initialize a procset_t
4559  *	structure.
4560  */
4561 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 2
4562 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 1
4563 /*
4564  * CDDL HEADER START
4565  *
4566  * The contents of this file are subject to the terms of the
4567  * Common Development and Distribution License, Version 1.0 only
4568  * (the "License").  You may not use this file except in compliance
4569  * with the License.
4570  *
4571  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4572  * or http://www.opensolaris.org/os/licensing.
4573  * See the License for the specific language governing permissions
4574  * and limitations under the License.
4575  *
4576  * When distributing Covered Code, include this CDDL HEADER in each
4577  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4578  * If applicable, add the following below this CDDL HEADER, with the
4579  * fields enclosed by brackets "[]" replaced with your own identifying
4580  * information: Portions Copyright [yyyy] [name of copyright owner]
4581  *
4582  * CDDL HEADER END
4583  */
4584 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4585 /*	  All Rights Reserved  	*/
4586 
4587 /*
4588  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4589  *
4590  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4591  * Use is subject to license terms.
4592  */
4593 
4594 
4595 
4596 
4597 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4598 /*
4599  * CDDL HEADER START
4600  *
4601  * The contents of this file are subject to the terms of the
4602  * Common Development and Distribution License (the "License").
4603  * You may not use this file except in compliance with the License.
4604  *
4605  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4606  * or http://www.opensolaris.org/os/licensing.
4607  * See the License for the specific language governing permissions
4608  * and limitations under the License.
4609  *
4610  * When distributing Covered Code, include this CDDL HEADER in each
4611  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4612  * If applicable, add the following below this CDDL HEADER, with the
4613  * fields enclosed by brackets "[]" replaced with your own identifying
4614  * information: Portions Copyright [yyyy] [name of copyright owner]
4615  *
4616  * CDDL HEADER END
4617  */
4618 
4619 /*
4620  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4621  * Copyright 2016 Joyent, Inc.
4622  *
4623  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4624  * Use is subject to license terms.
4625  */
4626 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
4627 
4628 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4629 /*
4630  * CDDL HEADER START
4631  *
4632  * The contents of this file are subject to the terms of the
4633  * Common Development and Distribution License (the "License").
4634  * You may not use this file except in compliance with the License.
4635  *
4636  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4637  * or http://www.opensolaris.org/os/licensing.
4638  * See the License for the specific language governing permissions
4639  * and limitations under the License.
4640  *
4641  * When distributing Covered Code, include this CDDL HEADER in each
4642  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4643  * If applicable, add the following below this CDDL HEADER, with the
4644  * fields enclosed by brackets "[]" replaced with your own identifying
4645  * information: Portions Copyright [yyyy] [name of copyright owner]
4646  *
4647  * CDDL HEADER END
4648  */
4649 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4650 /*	  All Rights Reserved  	*/
4651 
4652 
4653 /*
4654  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4655  * Use is subject to license terms.
4656  *
4657  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4658  * Copyright 2016 Joyent, Inc.
4659  */
4660 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
4661 
4662 
4663 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 1
4664 /*
4665  * CDDL HEADER START
4666  *
4667  * The contents of this file are subject to the terms of the
4668  * Common Development and Distribution License (the "License").
4669  * You may not use this file except in compliance with the License.
4670  *
4671  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4672  * or http://www.opensolaris.org/os/licensing.
4673  * See the License for the specific language governing permissions
4674  * and limitations under the License.
4675  *
4676  * When distributing Covered Code, include this CDDL HEADER in each
4677  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4678  * If applicable, add the following below this CDDL HEADER, with the
4679  * fields enclosed by brackets "[]" replaced with your own identifying
4680  * information: Portions Copyright [yyyy] [name of copyright owner]
4681  *
4682  * CDDL HEADER END
4683  */
4684 /*
4685  * Copyright 2014 Garrrett D'Amore <garrett@damore.org>
4686  *
4687  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4688  * Use is subject to license terms.
4689  */
4690 
4691 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4692 /*	  All Rights Reserved  	*/
4693 
4694 /*
4695  * University Copyright- Copyright (c) 1982, 1986, 1988
4696  * The Regents of the University of California
4697  * All Rights Reserved
4698  *
4699  * University Acknowledgment- Portions of this document are derived from
4700  * software developed by the University of California, Berkeley, and its
4701  * contributors.
4702  */
4703 
4704 
4705 
4706 
4707 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4708 /*
4709  * CDDL HEADER START
4710  *
4711  * The contents of this file are subject to the terms of the
4712  * Common Development and Distribution License (the "License").
4713  * You may not use this file except in compliance 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 /*
4730  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4731  * Copyright 2016 Joyent, Inc.
4732  *
4733  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4734  * Use is subject to license terms.
4735  */
4736 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
4737 
4738 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4739 /*
4740  * CDDL HEADER START
4741  *
4742  * The contents of this file are subject to the terms of the
4743  * Common Development and Distribution License (the "License").
4744  * You may not use this file except in compliance with the License.
4745  *
4746  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4747  * or http://www.opensolaris.org/os/licensing.
4748  * See the License for the specific language governing permissions
4749  * and limitations under the License.
4750  *
4751  * When distributing Covered Code, include this CDDL HEADER in each
4752  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4753  * If applicable, add the following below this CDDL HEADER, with the
4754  * fields enclosed by brackets "[]" replaced with your own identifying
4755  * information: Portions Copyright [yyyy] [name of copyright owner]
4756  *
4757  * CDDL HEADER END
4758  */
4759 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4760 /*	  All Rights Reserved  	*/
4761 
4762 
4763 /*
4764  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4765  * Use is subject to license terms.
4766  *
4767  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4768  * Copyright 2016 Joyent, Inc.
4769  */
4770 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
4771 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
4772 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4773 /*	  All Rights Reserved  	*/
4774 
4775 
4776 /*
4777  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
4778  * All rights reserved.  The Berkeley software License Agreement
4779  * specifies the terms and conditions for redistribution.
4780  */
4781 
4782 /*
4783  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4784  *
4785  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4786  * Use is subject to license terms.
4787  *
4788  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4789  */
4790 
4791 /*
4792  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
4793  */
4794 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
4795 
4796 
4797 
4798 
4799 
4800 /*
4801  * Process priority specifications
4802  */
4803 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4804 /*
4805  * Resource limits
4806  */
4807 # 91 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4808 /*
4809  * The definitions of the following types and constants differ between the
4810  * regular and large file compilation environments.
4811  */
4812 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4813 typedef u_longlong_t rlim_t;
4814 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4815 struct rlimit {
4816  rlim_t rlim_cur; /* current limit */
4817  rlim_t rlim_max; /* maximum value for rlim_cur */
4818 };
4819 
4820 /* transitional large file interface versions */
4821 
4822 
4823 typedef u_longlong_t rlim64_t;
4824 
4825 
4826 
4827 
4828 
4829 struct rlimit64 {
4830  rlim64_t rlim_cur; /* current limit */
4831  rlim64_t rlim_max; /* maximum value for rlim_cur */
4832 };
4833 
4834 
4835 
4836 /*
4837  * Although the saved rlimits were initially introduced by the large file API,
4838  * they are now available for all resource limits on the 64-bit kernel and for
4839  * cpu time and file size limits on the 32-bit kernel.
4840  */
4841 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4842 struct rusage {
4843  struct timeval ru_utime; /* user time used */
4844  struct timeval ru_stime; /* system time used */
4845  long ru_maxrss; /* <unimp> */
4846  long ru_ixrss; /* <unimp> */
4847  long ru_idrss; /* <unimp> */
4848  long ru_isrss; /* <unimp> */
4849  long ru_minflt; /* any page faults not requiring I/O */
4850  long ru_majflt; /* any page faults requiring I/O */
4851  long ru_nswap; /* swaps */
4852  long ru_inblock; /* block input operations */
4853  long ru_oublock; /* block output operations */
4854  long ru_msgsnd; /* streams messsages sent */
4855  long ru_msgrcv; /* streams messages received */
4856  long ru_nsignals; /* signals received */
4857  long ru_nvcsw; /* voluntary context switches */
4858  long ru_nivcsw; /* involuntary " */
4859 };
4860 # 233 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4861 /*
4862  * large file compilation environment setup
4863  */
4864 
4865 
4866 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4867 #pragma redefine_extname setrlimit setrlimit64
4868 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4869 
4870 
4871 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4872 #pragma redefine_extname getrlimit getrlimit64
4873 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4874 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4875 extern int setrlimit(int, const struct rlimit *);
4876 extern int getrlimit(int, struct rlimit *);
4877 
4878 /* transitional large file interfaces */
4879 
4880 
4881 extern int setrlimit64(int, const struct rlimit64 *);
4882 extern int getrlimit64(int, struct rlimit64 *);
4883 
4884 
4885 extern int getpriority(int, id_t);
4886 extern int setpriority(int, id_t, int);
4887 extern int getrusage(int, struct rusage *);
4888 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
4889 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
4890 /*
4891  * CDDL HEADER START
4892  *
4893  * The contents of this file are subject to the terms of the
4894  * Common Development and Distribution License, Version 1.0 only
4895  * (the "License").  You may not use this file except in compliance
4896  * with the License.
4897  *
4898  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4899  * or http://www.opensolaris.org/os/licensing.
4900  * See the License for the specific language governing permissions
4901  * and limitations under the License.
4902  *
4903  * When distributing Covered Code, include this CDDL HEADER in each
4904  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4905  * If applicable, add the following below this CDDL HEADER, with the
4906  * fields enclosed by brackets "[]" replaced with your own identifying
4907  * information: Portions Copyright [yyyy] [name of copyright owner]
4908  *
4909  * CDDL HEADER END
4910  */
4911 /*
4912  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4913  * Use is subject to license terms.
4914  */
4915 
4916 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4917 /*	  All Rights Reserved  	*/
4918 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
4919 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
4920 /*
4921  * CDDL HEADER START
4922  *
4923  * The contents of this file are subject to the terms of the
4924  * Common Development and Distribution License, Version 1.0 only
4925  * (the "License").  You may not use this file except in compliance
4926  * with the License.
4927  *
4928  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4929  * or http://www.opensolaris.org/os/licensing.
4930  * See the License for the specific language governing permissions
4931  * and limitations under the License.
4932  *
4933  * When distributing Covered Code, include this CDDL HEADER in each
4934  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4935  * If applicable, add the following below this CDDL HEADER, with the
4936  * fields enclosed by brackets "[]" replaced with your own identifying
4937  * information: Portions Copyright [yyyy] [name of copyright owner]
4938  *
4939  * CDDL HEADER END
4940  */
4941 /*
4942  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4943  * Use is subject to license terms.
4944  */
4945 
4946 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4947 /*	  All Rights Reserved  	*/
4948 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
4949 
4950 
4951 
4952 
4953 
4954 
4955 /*
4956  * arguments to wait functions
4957  */
4958 # 66 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h"
4959 /*
4960  * macros for stat return from wait functions
4961  */
4962 # 98 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h"
4963 extern pid_t wait(int *);
4964 extern pid_t waitpid(pid_t, int *, int);
4965 
4966 
4967 extern int waitid(idtype_t, id_t, siginfo_t *, int);
4968 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
4969 
4970 extern pid_t wait3(int *, int, struct rusage *);
4971 
4972 
4973 
4974 
4975 extern pid_t wait4(pid_t, int *, int, struct rusage *);
4976 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 2
4977 
4978 
4979 
4980 
4981 
4982 extern pid_t wait(int *);
4983 extern pid_t waitpid(pid_t, int *, int);
4984 extern int waitid(idtype_t, id_t, siginfo_t *, int);
4985 # 35 "unpack_package_from_stream.c" 2
4986 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1
4987 /*
4988  * CDDL HEADER START
4989  *
4990  * The contents of this file are subject to the terms of the
4991  * Common Development and Distribution License (the "License").
4992  * You may not use this file except in compliance with the License.
4993  *
4994  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4995  * or http://www.opensolaris.org/os/licensing.
4996  * See the License for the specific language governing permissions
4997  * and limitations under the License.
4998  *
4999  * When distributing Covered Code, include this CDDL HEADER in each
5000  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5001  * If applicable, add the following below this CDDL HEADER, with the
5002  * fields enclosed by brackets "[]" replaced with your own identifying
5003  * information: Portions Copyright [yyyy] [name of copyright owner]
5004  *
5005  * CDDL HEADER END
5006  */
5007 
5008 /*
5009  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5010  * Copyright (c) 2013 Gary Mills
5011  *
5012  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
5013  */
5014 
5015 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
5016 
5017 /*	Copyright (c) 1988 AT&T	*/
5018 /*	  All Rights Reserved  	*/
5019 
5020 
5021 
5022 
5023 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 1
5024 /*
5025  * CDDL HEADER START
5026  *
5027  * The contents of this file are subject to the terms of the
5028  * Common Development and Distribution License, Version 1.0 only
5029  * (the "License").  You may not use this file except in compliance
5030  * with the License.
5031  *
5032  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5033  * or http://www.opensolaris.org/os/licensing.
5034  * See the License for the specific language governing permissions
5035  * and limitations under the License.
5036  *
5037  * When distributing Covered Code, include this CDDL HEADER in each
5038  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5039  * If applicable, add the following below this CDDL HEADER, with the
5040  * fields enclosed by brackets "[]" replaced with your own identifying
5041  * information: Portions Copyright [yyyy] [name of copyright owner]
5042  *
5043  * CDDL HEADER END
5044  */
5045 /*
5046  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5047  * Copyright 2014 PALO, Richard.
5048  *
5049  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5050  * Use is subject to license terms.
5051  */
5052 
5053 /*	Copyright (c) 1988 AT&T	*/
5054 /*	  All Rights Reserved  	*/
5055 
5056 
5057 /*
5058  * An application should not include this header directly.  Instead it
5059  * should be included only through the inclusion of other Sun headers.
5060  *
5061  * The contents of this header is limited to identifiers specified in the
5062  * C Standard.  Any new identifiers specified in future amendments to the
5063  * C Standard must be placed in this header.  If these new identifiers
5064  * are required to also be in the C++ Standard "std" namespace, then for
5065  * anything other than macro definitions, corresponding "using" directives
5066  * must also be added to <locale.h>.
5067  */
5068 
5069 
5070 
5071 
5072 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5073 /*
5074  * CDDL HEADER START
5075  *
5076  * The contents of this file are subject to the terms of the
5077  * Common Development and Distribution License (the "License").
5078  * You may not use this file except in compliance with the License.
5079  *
5080  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5081  * or http://www.opensolaris.org/os/licensing.
5082  * See the License for the specific language governing permissions
5083  * and limitations under the License.
5084  *
5085  * When distributing Covered Code, include this CDDL HEADER in each
5086  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5087  * If applicable, add the following below this CDDL HEADER, with the
5088  * fields enclosed by brackets "[]" replaced with your own identifying
5089  * information: Portions Copyright [yyyy] [name of copyright owner]
5090  *
5091  * CDDL HEADER END
5092  */
5093 
5094 /*
5095  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5096  * Copyright 2016 Joyent, Inc.
5097  *
5098  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5099  * Use is subject to license terms.
5100  */
5101 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
5102 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
5103 /*
5104  * This file and its contents are supplied under the terms of the
5105  * Common Development and Distribution License ("CDDL"), version 1.0.
5106  * You may only use this file in accordance with the terms of version
5107  * 1.0 of the CDDL.
5108  *
5109  * A full copy of the text of the CDDL should have accompanied this
5110  * source.  A copy of the CDDL is also available via the Internet at
5111  * http://www.illumos.org/license/CDDL.
5112  */
5113 
5114 /*
5115  * Copyright 2014-2016 PALO, Richard.
5116  */
5117 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
5118 
5119 
5120 
5121 
5122 
5123 unsigned char __mb_cur_max(void);
5124 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
5125 typedef struct {
5126  int quot;
5127  int rem;
5128 } div_t;
5129 
5130 typedef struct {
5131  long quot;
5132  long rem;
5133 } ldiv_t;
5134 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
5135 /*
5136  * wchar_t is a built-in type in standard C++ and as such is not
5137  * defined here when using standard C++. However, the GNU compiler
5138  * fixincludes utility nonetheless creates its own version of this
5139  * header for use by gcc and g++. In that version it adds a redundant
5140  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
5141  * header we need to include the following magic comment:
5142  *
5143  * we must use the C++ compiler's type
5144  *
5145  * The above comment should not be removed or changed until GNU
5146  * gcc/fixinc/inclhack.def is updated to bypass this header.
5147  */
5148 
5149 
5150 
5151 
5152 
5153 
5154 typedef long wchar_t;
5155 # 120 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
5156 extern void abort(void) __attribute__((__noreturn__));
5157 extern int abs(int);
5158 extern int atexit(void (*)(void));
5159 extern double atof(const char *);
5160 extern int atoi(const char *);
5161 extern long int atol(const char *);
5162 extern void *bsearch(const void *, const void *, size_t, size_t,
5163  int (*)(const void *, const void *));
5164 
5165 
5166 
5167 
5168 
5169 
5170 extern void *calloc(size_t, size_t);
5171 extern div_t div(int, int);
5172 extern void exit(int)
5173  __attribute__((__noreturn__));
5174 extern void free(void *);
5175 extern char *getenv(const char *);
5176 extern long int labs(long);
5177 extern ldiv_t ldiv(long, long);
5178 extern void *malloc(size_t);
5179 extern int mblen(const char *, size_t);
5180 extern size_t mbstowcs(wchar_t *, const char *,
5181  size_t);
5182 extern int mbtowc(wchar_t *, const char *, size_t);
5183 extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
5184 
5185 
5186 
5187 
5188 
5189 extern int rand(void);
5190 extern void *realloc(void *, size_t);
5191 extern void srand(unsigned int);
5192 extern double strtod(const char *, char **);
5193 extern long int strtol(const char *, char **, int);
5194 extern unsigned long int strtoul(const char *,
5195  char **, int);
5196 extern int system(const char *);
5197 extern int wctomb(char *, wchar_t);
5198 extern size_t wcstombs(char *, const wchar_t *,
5199  size_t);
5200 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
5201 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 1
5202 /*
5203  * CDDL HEADER START
5204  *
5205  * The contents of this file are subject to the terms of the
5206  * Common Development and Distribution License, Version 1.0 only
5207  * (the "License").  You may not use this file except in compliance
5208  * with the License.
5209  *
5210  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5211  * or http://www.opensolaris.org/os/licensing.
5212  * See the License for the specific language governing permissions
5213  * and limitations under the License.
5214  *
5215  * When distributing Covered Code, include this CDDL HEADER in each
5216  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5217  * If applicable, add the following below this CDDL HEADER, with the
5218  * fields enclosed by brackets "[]" replaced with your own identifying
5219  * information: Portions Copyright [yyyy] [name of copyright owner]
5220  *
5221  * CDDL HEADER END
5222  */
5223 /*
5224  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5225  *
5226  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5227  * Use is subject to license terms.
5228  */
5229 
5230 /*
5231  * An application should not include this header directly.  Instead it
5232  * should be included only through the inclusion of other Sun headers.
5233  *
5234  * The contents of this header is limited to identifiers specified in
5235  * the C99 standard and in conflict with the C++ implementation of the
5236  * standard header.  The C++ standard may adopt the C99 standard at
5237  * which point it is expected that the symbols included here will
5238  * become part of the C++ std namespace.
5239  */
5240 
5241 
5242 
5243 
5244 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5245 /*
5246  * CDDL HEADER START
5247  *
5248  * The contents of this file are subject to the terms of the
5249  * Common Development and Distribution License (the "License").
5250  * You may not use this file except in compliance with the License.
5251  *
5252  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5253  * or http://www.opensolaris.org/os/licensing.
5254  * See the License for the specific language governing permissions
5255  * and limitations under the License.
5256  *
5257  * When distributing Covered Code, include this CDDL HEADER in each
5258  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5259  * If applicable, add the following below this CDDL HEADER, with the
5260  * fields enclosed by brackets "[]" replaced with your own identifying
5261  * information: Portions Copyright [yyyy] [name of copyright owner]
5262  *
5263  * CDDL HEADER END
5264  */
5265 
5266 /*
5267  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5268  * Copyright 2016 Joyent, Inc.
5269  *
5270  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5271  * Use is subject to license terms.
5272  */
5273 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 2
5274 
5275 
5276 
5277 
5278 
5279 /*
5280  * The following have been added as a result of the ISO/IEC 9899:1999
5281  * standard. For a strictly conforming C application, visibility is
5282  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
5283  * For non-strictly conforming C applications, there are no restrictions
5284  * on the C namespace.
5285  */
5286 
5287 
5288 typedef struct {
5289  long long quot;
5290  long long rem;
5291 } lldiv_t;
5292 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h"
5293 extern void _Exit(int);
5294 extern float strtof(const char *, char **);
5295 extern long double strtold(const char *, char **);
5296 
5297 
5298 extern long long atoll(const char *);
5299 extern long long llabs(long long);
5300 extern lldiv_t lldiv(long long, long long);
5301 extern long long strtoll(const char *, char **,
5302  int);
5303 extern unsigned long long strtoull(const char *,
5304  char **, int);
5305 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
5306 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 1
5307 /*
5308  * This file and its contents are supplied under the terms of the
5309  * Common Development and Distribution License ("CDDL"), version 1.0.
5310  * You may only use this file in accordance with the terms of version
5311  * 1.0 of the CDDL.
5312  *
5313  * A full copy of the text of the CDDL should have accompanied this
5314  * source.  A copy of the CDDL is also available via the Internet at
5315  * http://www.illumos.org/license/CDDL.
5316  */
5317 
5318 /*
5319  * Copyright 2016 Joyent, Inc.
5320  */
5321 
5322 /*
5323  * An application should not include this header directly.  Instead it
5324  * should be included only through the inclusion of other illumos headers.
5325  *
5326  * The contents of this header is limited to identifiers specified in
5327  * the C11 standard and in conflict with the C++ implementation of the
5328  * standard header.  The C++ standard may adopt the C11 standard at
5329  * which point it is expected that the symbols included here will
5330  * become part of the C++ std namespace.
5331  */
5332 
5333 
5334 
5335 
5336 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5337 /*
5338  * CDDL HEADER START
5339  *
5340  * The contents of this file are subject to the terms of the
5341  * Common Development and Distribution License (the "License").
5342  * You may not use this file except in compliance with the License.
5343  *
5344  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5345  * or http://www.opensolaris.org/os/licensing.
5346  * See the License for the specific language governing permissions
5347  * and limitations under the License.
5348  *
5349  * When distributing Covered Code, include this CDDL HEADER in each
5350  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5351  * If applicable, add the following below this CDDL HEADER, with the
5352  * fields enclosed by brackets "[]" replaced with your own identifying
5353  * information: Portions Copyright [yyyy] [name of copyright owner]
5354  *
5355  * CDDL HEADER END
5356  */
5357 
5358 /*
5359  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5360  * Copyright 2016 Joyent, Inc.
5361  *
5362  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5363  * Use is subject to license terms.
5364  */
5365 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 2
5366 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
5367 /*
5368  * The following have been added as a result of the ISO/IEC 9899:2011
5369  * standard. For a strictly conforming C application, visibility is
5370  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
5371  * For non-strictly conforming C applications, there are no restrictions
5372  * on the C namespace.
5373  */
5374 
5375 /*
5376  * Work around fix-includes and other bad actors with using multiple headers.
5377  */
5378 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
5379 extern void *aligned_alloc(size_t, size_t);
5380 extern int at_quick_exit(void (*)(void));
5381 extern void quick_exit(int);
5382 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
5383 
5384 
5385 
5386 
5387 
5388 /*
5389  * Allow global visibility for symbols defined in
5390  * C++ "std" namespace in <iso/stdlib_iso.h>.
5391  */
5392 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5393 /*
5394  * Allow global visibility for symbols defined in
5395  * C++ "std" namespace in <iso/stdlib_c11.h>.
5396  */
5397 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5398 /* large file compilation environment setup */
5399 
5400 
5401 
5402 
5403 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5404 #pragma redefine_extname mkstemp mkstemp64
5405 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5406 
5407 
5408 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5409 #pragma redefine_extname mkstemps mkstemps64
5410 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5411 
5412 
5413 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5414 #pragma redefine_extname mkostemp mkostemp64
5415 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5416 
5417 
5418 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5419 #pragma redefine_extname mkostemps mkostemps64
5420 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5421 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5422 /* In the LP64 compilation environment, all APIs are already large file */
5423 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5424 extern int rand_r(unsigned int *);
5425 
5426 
5427 extern void _exithandle(void);
5428 
5429 
5430 
5431 
5432 extern double drand48(void);
5433 extern double erand48(unsigned short *);
5434 extern long jrand48(unsigned short *);
5435 extern void lcong48(unsigned short *);
5436 extern long lrand48(void);
5437 extern long mrand48(void);
5438 extern long nrand48(unsigned short *);
5439 extern unsigned short *seed48(unsigned short *);
5440 extern void srand48(long);
5441 extern int putenv(char *);
5442 extern void setkey(const char *);
5443 
5444 
5445 /*
5446  * swab() has historically been in <stdlib.h> as delivered from AT&T
5447  * and continues to be visible in the default compilation environment.
5448  * As of Issue 4 of the X/Open Portability Guides, swab() was declared
5449  * in <unistd.h>. As a result, with respect to X/Open namespace the
5450  * swab() declaration in this header is only visible for the XPG3
5451  * environment.
5452  */
5453 # 182 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5454 extern void swab(const char *, char *, ssize_t);
5455 
5456 
5457 
5458 
5459 
5460 extern int mkstemp(char *);
5461 
5462 extern int mkstemps(char *, int);
5463 
5464 
5465 
5466 
5467 
5468 extern int mkstemp64(char *);
5469 
5470 extern int mkstemps64(char *, int);
5471 
5472 
5473 
5474 
5475 extern char *mkdtemp(char *);
5476 
5477 
5478 
5479 extern int mkostemp(char *, int);
5480 extern int mkostemps(char *, int, int);
5481 
5482 
5483 extern int mkostemp64(char *, int);
5484 extern int mkostemps64(char *, int, int);
5485 
5486 
5487 
5488 
5489 
5490 
5491 extern long a64l(const char *);
5492 extern char *ecvt(double, int, int *, int *);
5493 extern char *fcvt(double, int, int *, int *);
5494 extern char *gcvt(double, int, char *);
5495 extern int getsubopt(char **, char *const *, char **);
5496 extern int grantpt(int);
5497 extern char *initstate(unsigned, char *, size_t);
5498 extern char *l64a(long);
5499 extern char *mktemp(char *);
5500 extern char *ptsname(int);
5501 extern long random(void);
5502 extern char *realpath(const char *, char *);
5503 extern char *setstate(const char *);
5504 extern void srandom(unsigned);
5505 extern int unlockpt(int);
5506 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
5507 
5508 extern int ttyslot(void);
5509 extern void *valloc(size_t);
5510 
5511 
5512 
5513 
5514 
5515 
5516 extern int posix_memalign(void **, size_t, size_t);
5517 extern int posix_openpt(int);
5518 extern int setenv(const char *, const char *, int);
5519 extern int unsetenv(const char *);
5520 
5521 
5522 
5523 
5524 extern char *canonicalize_file_name(const char *);
5525 extern int clearenv(void);
5526 extern void closefrom(int);
5527 extern int daemon(int, int);
5528 extern int dup2(int, int);
5529 extern int dup3(int, int, int);
5530 extern int fdwalk(int (*)(void *, int), void *);
5531 extern char *qecvt(long double, int, int *, int *);
5532 extern char *qfcvt(long double, int, int *, int *);
5533 extern char *qgcvt(long double, int, char *);
5534 extern char *getcwd(char *, size_t);
5535 extern const char *getexecname(void);
5536 
5537 
5538 
5539 
5540 
5541 
5542 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5543 #pragma redefine_extname getlogin getloginx
5544 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5545 
5546 
5547 
5548 
5549 
5550 
5551 extern char *getlogin(void);
5552 
5553 
5554 extern int getopt(int, char *const *, const char *);
5555 extern char *optarg;
5556 extern int optind, opterr, optopt;
5557 extern char *getpass(const char *);
5558 extern char *getpassphrase(const char *);
5559 extern int getpw(uid_t, char *);
5560 extern int isatty(int);
5561 extern void *memalign(size_t, size_t);
5562 extern char *ttyname(int);
5563 extern char *mkdtemp(char *);
5564 extern const char *getprogname(void);
5565 extern void setprogname(const char *);
5566 
5567 
5568 extern char *lltostr(long long, char *);
5569 extern char *ulltostr(unsigned long long, char *);
5570 
5571 
5572 
5573 
5574 /* OpenBSD compatibility functions */
5575 
5576 
5577 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 1
5578 /*
5579  * CDDL HEADER START
5580  *
5581  * The contents of this file are subject to the terms of the
5582  * Common Development and Distribution License, Version 1.0 only
5583  * (the "License").  You may not use this file except in compliance
5584  * with the License.
5585  *
5586  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5587  * or http://www.opensolaris.org/os/licensing.
5588  * See the License for the specific language governing permissions
5589  * and limitations under the License.
5590  *
5591  * When distributing Covered Code, include this CDDL HEADER in each
5592  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5593  * If applicable, add the following below this CDDL HEADER, with the
5594  * fields enclosed by brackets "[]" replaced with your own identifying
5595  * information: Portions Copyright [yyyy] [name of copyright owner]
5596  *
5597  * CDDL HEADER END
5598  */
5599 /*
5600  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5601  *
5602  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5603  * Use is subject to license terms.
5604  */
5605 
5606 
5607 
5608 
5609 /*
5610  * This file, <inttypes.h>, is specified by the ISO C standard,
5611  * standard, ISO/IEC 9899:1999 Programming language - C and is
5612  * also defined by SUSv3.
5613  *
5614  * ISO	  International Organization for Standardization.
5615  * SUSv3  Single Unix Specification, Version 3
5616  */
5617 
5618 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5619 /*
5620  * CDDL HEADER START
5621  *
5622  * The contents of this file are subject to the terms of the
5623  * Common Development and Distribution License (the "License").
5624  * You may not use this file except in compliance with the License.
5625  *
5626  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5627  * or http://www.opensolaris.org/os/licensing.
5628  * See the License for the specific language governing permissions
5629  * and limitations under the License.
5630  *
5631  * When distributing Covered Code, include this CDDL HEADER in each
5632  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5633  * If applicable, add the following below this CDDL HEADER, with the
5634  * fields enclosed by brackets "[]" replaced with your own identifying
5635  * information: Portions Copyright [yyyy] [name of copyright owner]
5636  *
5637  * CDDL HEADER END
5638  */
5639 
5640 /*
5641  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5642  * Copyright 2016 Joyent, Inc.
5643  *
5644  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5645  * Use is subject to license terms.
5646  */
5647 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
5648 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 1
5649 /*
5650  * CDDL HEADER START
5651  *
5652  * The contents of this file are subject to the terms of the
5653  * Common Development and Distribution License, Version 1.0 only
5654  * (the "License").  You may not use this file except in compliance
5655  * with the License.
5656  *
5657  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5658  * or http://www.opensolaris.org/os/licensing.
5659  * See the License for the specific language governing permissions
5660  * and limitations under the License.
5661  *
5662  * When distributing Covered Code, include this CDDL HEADER in each
5663  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5664  * If applicable, add the following below this CDDL HEADER, with the
5665  * fields enclosed by brackets "[]" replaced with your own identifying
5666  * information: Portions Copyright [yyyy] [name of copyright owner]
5667  *
5668  * CDDL HEADER END
5669  */
5670 /*
5671  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
5672  * Use is subject to license terms.
5673  */
5674 
5675 
5676 
5677 
5678 #pragma ident "%Z%%M%	%I%	%E% SMI"
5679 
5680 /*
5681  * This header, <sys/inttypes.h>, contains (through nested inclusion) the
5682  * vast majority of the facilities specified for <inttypes.h> as defined
5683  * by the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
5684  *
5685  * Kernel/Driver developers are encouraged to include this file to access
5686  * the fixed size types, limits and utility macros. Application developers
5687  * should use the standard defined header <inttypes.h>.
5688  */
5689 
5690 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5691 /*
5692  * CDDL HEADER START
5693  *
5694  * The contents of this file are subject to the terms of the
5695  * Common Development and Distribution License (the "License").
5696  * You may not use this file except in compliance with the License.
5697  *
5698  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5699  * or http://www.opensolaris.org/os/licensing.
5700  * See the License for the specific language governing permissions
5701  * and limitations under the License.
5702  *
5703  * When distributing Covered Code, include this CDDL HEADER in each
5704  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5705  * If applicable, add the following below this CDDL HEADER, with the
5706  * fields enclosed by brackets "[]" replaced with your own identifying
5707  * information: Portions Copyright [yyyy] [name of copyright owner]
5708  *
5709  * CDDL HEADER END
5710  */
5711 
5712 /*
5713  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5714  * Copyright 2016 Joyent, Inc.
5715  *
5716  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5717  * Use is subject to license terms.
5718  */
5719 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
5720 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
5721 /*
5722  * CDDL HEADER START
5723  *
5724  * The contents of this file are subject to the terms of the
5725  * Common Development and Distribution License, Version 1.0 only
5726  * (the "License").  You may not use this file except in compliance
5727  * with the License.
5728  *
5729  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5730  * or http://www.opensolaris.org/os/licensing.
5731  * See the License for the specific language governing permissions
5732  * and limitations under the License.
5733  *
5734  * When distributing Covered Code, include this CDDL HEADER in each
5735  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5736  * If applicable, add the following below this CDDL HEADER, with the
5737  * fields enclosed by brackets "[]" replaced with your own identifying
5738  * information: Portions Copyright [yyyy] [name of copyright owner]
5739  *
5740  * CDDL HEADER END
5741  */
5742 /*
5743  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5744  *
5745  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5746  * Use is subject to license terms.
5747  */
5748 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
5749 
5750 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
5751 /*
5752  * CDDL HEADER START
5753  *
5754  * The contents of this file are subject to the terms of the
5755  * Common Development and Distribution License, Version 1.0 only
5756  * (the "License").  You may not use this file except in compliance
5757  * with the License.
5758  *
5759  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5760  * or http://www.opensolaris.org/os/licensing.
5761  * See the License for the specific language governing permissions
5762  * and limitations under the License.
5763  *
5764  * When distributing Covered Code, include this CDDL HEADER in each
5765  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5766  * If applicable, add the following below this CDDL HEADER, with the
5767  * fields enclosed by brackets "[]" replaced with your own identifying
5768  * information: Portions Copyright [yyyy] [name of copyright owner]
5769  *
5770  * CDDL HEADER END
5771  */
5772 /*
5773  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5774  *
5775  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5776  * Use is subject to license terms.
5777  */
5778 
5779 
5780 
5781 
5782 /*
5783  * This file, <sys/int_limits.h>, is part of the Sun Microsystems implementation
5784  * of <inttypes.h> as defined in the ISO C standard, ISO/IEC 9899:1999
5785  * Programming language - C.
5786  *
5787  * Programs/Modules should not directly include this file.  Access to the
5788  * types defined in this file should be through the inclusion of one of the
5789  * following files:
5790  *
5791  *	<limits.h>		This nested inclusion is disabled for strictly
5792  *				ANSI-C conforming compilations.  The *_MIN
5793  *				definitions are not visible to POSIX or XPG
5794  *				conforming applications (due to what may be
5795  *				a bug in the specification - this is under
5796  *				investigation)
5797  *
5798  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
5799  *				components of <inttypes.h>.
5800  *
5801  *	<inttypes.h>		For use by applications.
5802  *
5803  * See these files for more details.
5804  */
5805 
5806 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5807 /*
5808  * CDDL HEADER START
5809  *
5810  * The contents of this file are subject to the terms of the
5811  * Common Development and Distribution License (the "License").
5812  * You may not use this file except in compliance with the License.
5813  *
5814  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5815  * or http://www.opensolaris.org/os/licensing.
5816  * See the License for the specific language governing permissions
5817  * and limitations under the License.
5818  *
5819  * When distributing Covered Code, include this CDDL HEADER in each
5820  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5821  * If applicable, add the following below this CDDL HEADER, with the
5822  * fields enclosed by brackets "[]" replaced with your own identifying
5823  * information: Portions Copyright [yyyy] [name of copyright owner]
5824  *
5825  * CDDL HEADER END
5826  */
5827 
5828 /*
5829  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5830  * Copyright 2016 Joyent, Inc.
5831  *
5832  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5833  * Use is subject to license terms.
5834  */
5835 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 2
5836 
5837 
5838 
5839 
5840 
5841 /*
5842  * Limits
5843  *
5844  * The following define the limits for the types defined in <sys/int_types.h>.
5845  *
5846  * INTMAX_MIN (minimum value of the largest supported signed integer type),
5847  * INTMAX_MAX (maximum value of the largest supported signed integer type),
5848  * and UINTMAX_MAX (maximum value of the largest supported unsigned integer
5849  * type) can be set to implementation defined limits.
5850  *
5851  * NOTE : A programmer can test to see whether an implementation supports
5852  * a particular size of integer by testing if the macro that gives the
5853  * maximum for that datatype is defined. For example, if #ifdef UINT64_MAX
5854  * tests false, the implementation does not support unsigned 64 bit integers.
5855  *
5856  * The type of these macros is intentionally unspecified.
5857  *
5858  * The types int8_t, int_least8_t, and int_fast8_t are not defined for ISAs
5859  * where the ABI specifies "char" as unsigned when the translation mode is
5860  * not ANSI-C.
5861  */
5862 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
5863 /*
5864  * The following 2 macros are provided for testing whether the types
5865  * intptr_t and uintptr_t (integers large enough to hold a void *) are
5866  * defined in this header. They are needed in case the architecture can't
5867  * represent a pointer in any standard integral type.
5868  */
5869 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
5870 /* Maximum limits of ptrdiff_t defined in <sys/types.h> */
5871 
5872 
5873 
5874 
5875 
5876 
5877 /*
5878  * Maximum value of a "size_t".  SIZE_MAX was previously defined
5879  * in <limits.h>, however, the standards specify it be defined
5880  * in <stdint.h>. The <stdint.h> headers includes this header as
5881  * does <limits.h>. The value of SIZE_MAX should not deviate
5882  * from the value of ULONG_MAX defined <sys/types.h>.
5883  */
5884 
5885 
5886 
5887 
5888 
5889 
5890 /* Maximum limit of sig_atomic_t defined in <sys/types.h> */
5891 
5892 
5893 
5894 
5895 /*
5896  * Maximum limit of wchar_t. The WCHAR_* macros are also
5897  * defined in <iso/wchar_iso.h>, but inclusion of that header
5898  * will break ISO/IEC C namespace.
5899  */
5900 
5901 
5902 
5903 
5904 /* Maximum limit of wint_t */
5905 
5906 
5907 
5908 
5909 /*
5910  * It is probably a bug in the POSIX specification (IEEE-1003.1-1990) that
5911  * when including <limits.h> that the suffix _MAX is reserved but not the
5912  * suffix _MIN.  However, until that issue is resolved....
5913  */
5914 # 230 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
5915 /* Minimum value of a pointer-holding signed integer type */
5916 
5917 
5918 
5919 
5920 
5921 
5922 /* Minimum limits of ptrdiff_t defined in <sys/types.h> */
5923 
5924 
5925 
5926 
5927 
5928 
5929 /* Minimum limit of sig_atomic_t defined in <sys/types.h> */
5930 
5931 
5932 
5933 
5934 /*
5935  * Minimum limit of wchar_t. The WCHAR_* macros are also
5936  * defined in <iso/wchar_iso.h>, but inclusion of that header
5937  * will break ISO/IEC C namespace.
5938  */
5939 
5940 
5941 
5942 
5943 /* Minimum limit of wint_t */
5944 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
5945 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
5946 /*
5947  * CDDL HEADER START
5948  *
5949  * The contents of this file are subject to the terms of the
5950  * Common Development and Distribution License, Version 1.0 only
5951  * (the "License").  You may not use this file except in compliance
5952  * with the License.
5953  *
5954  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5955  * or http://www.opensolaris.org/os/licensing.
5956  * See the License for the specific language governing permissions
5957  * and limitations under the License.
5958  *
5959  * When distributing Covered Code, include this CDDL HEADER in each
5960  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5961  * If applicable, add the following below this CDDL HEADER, with the
5962  * fields enclosed by brackets "[]" replaced with your own identifying
5963  * information: Portions Copyright [yyyy] [name of copyright owner]
5964  *
5965  * CDDL HEADER END
5966  */
5967 /*
5968  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5969  *
5970  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5971  * Use is subject to license terms.
5972  */
5973 
5974 
5975 
5976 
5977 /*
5978  * This file, <sys/int_const.h>, is part of the Sun Microsystems implementation
5979  * of <inttypes.h> as proposed in the ISO/JTC1/SC22/WG14 C committee's working
5980  * draft for the revision of the current ISO C standard, ISO/IEC 9899:1990
5981  * Programming language - C.
5982  *
5983  * Programs/Modules should not directly include this file.  Access to the
5984  * types defined in this file should be through the inclusion of one of the
5985  * following files:
5986  *
5987  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
5988  *				components of <inttypes.h>.
5989  *
5990  *	<inttypes.h>		For use by applications.
5991  *
5992  * See these files for more details.
5993  *
5994  * Use at your own risk.  This file will track the evolution of the revision
5995  * of the current ISO C standard.  As of February 1996, the committee is
5996  * squarely behind the fixed sized types.
5997  */
5998 
5999 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6000 /*
6001  * CDDL HEADER START
6002  *
6003  * The contents of this file are subject to the terms of the
6004  * Common Development and Distribution License (the "License").
6005  * You may not use this file except in compliance with the License.
6006  *
6007  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6008  * or http://www.opensolaris.org/os/licensing.
6009  * See the License for the specific language governing permissions
6010  * and limitations under the License.
6011  *
6012  * When distributing Covered Code, include this CDDL HEADER in each
6013  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6014  * If applicable, add the following below this CDDL HEADER, with the
6015  * fields enclosed by brackets "[]" replaced with your own identifying
6016  * information: Portions Copyright [yyyy] [name of copyright owner]
6017  *
6018  * CDDL HEADER END
6019  */
6020 
6021 /*
6022  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6023  * Copyright 2016 Joyent, Inc.
6024  *
6025  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6026  * Use is subject to license terms.
6027  */
6028 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 2
6029 
6030 
6031 
6032 
6033 
6034 /*
6035  * Constants
6036  *
6037  * The following macros create constants of the types defined in
6038  * <sys/int_types.h>. The intent is that:
6039  *	Constants defined using these macros have a specific size and
6040  *	signedness. The suffix used for int64_t and uint64_t (ll and ull)
6041  *	are for examples only. Implementations are permitted to use other
6042  *	suffixes.
6043  *
6044  * The "CSTYLED" comments are flags to an internal code style analysis tool
6045  * telling it to silently accept the line which follows.  This internal
6046  * standard requires a space between arguments, but the historical,
6047  * non-ANSI-C ``method'' of concatenation can't tolerate those spaces.
6048  */
6049 /* CSTYLED */
6050 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
6051 /* CSTYLED */
6052 
6053 
6054 
6055 
6056 /* CSTYLED */
6057 
6058 /* CSTYLED */
6059 
6060 /* CSTYLED */
6061 
6062 
6063 
6064 
6065 
6066 
6067 /* CSTYLED */
6068 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
6069 /* CSTYLED */
6070 
6071 /* CSTYLED */
6072 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6073 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 1
6074 /*
6075  * CDDL HEADER START
6076  *
6077  * The contents of this file are subject to the terms of the
6078  * Common Development and Distribution License, Version 1.0 only
6079  * (the "License").  You may not use this file except in compliance
6080  * with the License.
6081  *
6082  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6083  * or http://www.opensolaris.org/os/licensing.
6084  * See the License for the specific language governing permissions
6085  * and limitations under the License.
6086  *
6087  * When distributing Covered Code, include this CDDL HEADER in each
6088  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6089  * If applicable, add the following below this CDDL HEADER, with the
6090  * fields enclosed by brackets "[]" replaced with your own identifying
6091  * information: Portions Copyright [yyyy] [name of copyright owner]
6092  *
6093  * CDDL HEADER END
6094  */
6095 /*
6096  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6097  *
6098  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6099  * Use is subject to license terms.
6100  */
6101 
6102 
6103 
6104 
6105 /*
6106  * This file, <sys/int_fmtio.h>, is part of the Sun Microsystems implementation
6107  * of <inttypes.h> as defined by the ISO C Standard, ISO/IEC 9899:1999
6108  * Programming language - C.
6109  *
6110  * ISO  International Organization for Standardization.
6111  *
6112  * Programs/Modules should not directly include this file.  Access to the
6113  * types defined in this file should be through the inclusion of one of the
6114  * following files:
6115  *
6116  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
6117  *				components of <inttypes.h>.
6118  *
6119  *	<inttypes.h>		For use by applications.
6120  *
6121  * See these files for more details.
6122  */
6123 
6124 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6125 /*
6126  * CDDL HEADER START
6127  *
6128  * The contents of this file are subject to the terms of the
6129  * Common Development and Distribution License (the "License").
6130  * You may not use this file except in compliance with the License.
6131  *
6132  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6133  * or http://www.opensolaris.org/os/licensing.
6134  * See the License for the specific language governing permissions
6135  * and limitations under the License.
6136  *
6137  * When distributing Covered Code, include this CDDL HEADER in each
6138  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6139  * If applicable, add the following below this CDDL HEADER, with the
6140  * fields enclosed by brackets "[]" replaced with your own identifying
6141  * information: Portions Copyright [yyyy] [name of copyright owner]
6142  *
6143  * CDDL HEADER END
6144  */
6145 
6146 /*
6147  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6148  * Copyright 2016 Joyent, Inc.
6149  *
6150  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6151  * Use is subject to license terms.
6152  */
6153 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 2
6154 
6155 
6156 
6157 
6158 
6159 /*
6160  * Formatted I/O
6161  *
6162  * The following macros can be used even when an implementation has not
6163  * extended the printf/scanf family of functions.
6164  *
6165  * The form of the names of the macros is either "PRI" for printf specifiers
6166  * or "SCN" for scanf specifiers, followed by the conversion specifier letter
6167  * followed by the datatype size. For example, PRId32 is the macro for
6168  * the printf d conversion specifier with the flags for 32 bit datatype.
6169  *
6170  * An example using one of these macros:
6171  *
6172  *	uint64_t u;
6173  *	printf("u = %016" PRIx64 "\n", u);
6174  *
6175  * For the purpose of example, the definitions of the printf/scanf macros
6176  * below have the values appropriate for a machine with 8 bit shorts, 16
6177  * bit shorts, 32 bit ints, 32 or 64 bit longs depending on compilation
6178  * mode, and 64 bit long longs.
6179  */
6180 
6181 /*
6182  * fprintf macros for signed integers
6183  */
6184 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6185 /*
6186  * fprintf macros for unsigned integers
6187  */
6188 # 227 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6189 /*
6190  * fprintf macros for pointers
6191  */
6192 # 247 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6193 /*
6194  * fscanf macros for signed integers
6195  */
6196 # 282 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6197 /*
6198  * fscanf macros for unsigned integers
6199  */
6200 # 349 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6201 /*
6202  * The following macros define I/O formats for intmax_t and uintmax_t.
6203  */
6204 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6205 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
6206 
6207 
6208 
6209 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 1
6210 /*
6211  * CDDL HEADER START
6212  *
6213  * The contents of this file are subject to the terms of the
6214  * Common Development and Distribution License, Version 1.0 only
6215  * (the "License").  You may not use this file except in compliance
6216  * with the License.
6217  *
6218  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6219  * or http://www.opensolaris.org/os/licensing.
6220  * See the License for the specific language governing permissions
6221  * and limitations under the License.
6222  *
6223  * When distributing Covered Code, include this CDDL HEADER in each
6224  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6225  * If applicable, add the following below this CDDL HEADER, with the
6226  * fields enclosed by brackets "[]" replaced with your own identifying
6227  * information: Portions Copyright [yyyy] [name of copyright owner]
6228  *
6229  * CDDL HEADER END
6230  */
6231 /*
6232  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
6233  * Use is subject to license terms.
6234  */
6235 
6236 
6237 
6238 
6239 #pragma ident "%Z%%M%	%I%	%E% SMI"
6240 
6241 /*
6242  * This header is included by <stdint.h> which was introduced by
6243  * the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
6244  * The header is a subset of the <inttypes.h> header.
6245  */
6246 
6247 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
6248 /*
6249  * CDDL HEADER START
6250  *
6251  * The contents of this file are subject to the terms of the
6252  * Common Development and Distribution License, Version 1.0 only
6253  * (the "License").  You may not use this file except in compliance
6254  * with the License.
6255  *
6256  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6257  * or http://www.opensolaris.org/os/licensing.
6258  * See the License for the specific language governing permissions
6259  * and limitations under the License.
6260  *
6261  * When distributing Covered Code, include this CDDL HEADER in each
6262  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6263  * If applicable, add the following below this CDDL HEADER, with the
6264  * fields enclosed by brackets "[]" replaced with your own identifying
6265  * information: Portions Copyright [yyyy] [name of copyright owner]
6266  *
6267  * CDDL HEADER END
6268  */
6269 /*
6270  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6271  *
6272  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6273  * Use is subject to license terms.
6274  */
6275 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6276 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
6277 /*
6278  * CDDL HEADER START
6279  *
6280  * The contents of this file are subject to the terms of the
6281  * Common Development and Distribution License, Version 1.0 only
6282  * (the "License").  You may not use this file except in compliance
6283  * with the License.
6284  *
6285  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6286  * or http://www.opensolaris.org/os/licensing.
6287  * See the License for the specific language governing permissions
6288  * and limitations under the License.
6289  *
6290  * When distributing Covered Code, include this CDDL HEADER in each
6291  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6292  * If applicable, add the following below this CDDL HEADER, with the
6293  * fields enclosed by brackets "[]" replaced with your own identifying
6294  * information: Portions Copyright [yyyy] [name of copyright owner]
6295  *
6296  * CDDL HEADER END
6297  */
6298 /*
6299  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6300  *
6301  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6302  * Use is subject to license terms.
6303  */
6304 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6305 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
6306 /*
6307  * CDDL HEADER START
6308  *
6309  * The contents of this file are subject to the terms of the
6310  * Common Development and Distribution License, Version 1.0 only
6311  * (the "License").  You may not use this file except in compliance
6312  * 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  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6329  *
6330  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6331  * Use is subject to license terms.
6332  */
6333 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6334 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
6335 
6336 
6337 
6338 
6339 
6340 
6341 /* Inclusion of <stddef.h> breaks namespace, therefore define wchar_t */
6342 
6343 /*
6344  * wchar_t is a built-in type in standard C++ and as such is not
6345  * defined here when using standard C++. However, the GNU compiler
6346  * fixincludes utility nonetheless creates its own version of this
6347  * header for use by gcc and g++. In that version it adds a redundant
6348  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
6349  * header we need to include the following magic comment:
6350  *
6351  * we must use the C++ compiler's type
6352  *
6353  * The above comment should not be removed or changed until GNU
6354  * gcc/fixinc/inclhack.def is updated to bypass this header.
6355  */
6356 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
6357 typedef struct {
6358  intmax_t quot;
6359  intmax_t rem;
6360 } imaxdiv_t;
6361 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
6362 extern intmax_t imaxabs(intmax_t);
6363 extern imaxdiv_t imaxdiv(intmax_t, intmax_t);
6364 extern intmax_t strtoimax(const char *, char **,
6365  int);
6366 extern uintmax_t strtoumax(const char *, char **,
6367  int);
6368 extern intmax_t wcstoimax(const wchar_t *,
6369  wchar_t **, int);
6370 extern uintmax_t wcstoumax(const wchar_t *,
6371  wchar_t **, int);
6372 # 302 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
6373 extern uint32_t arc4random(void);
6374 extern void arc4random_buf(void *, size_t);
6375 extern uint32_t arc4random_uniform(uint32_t);
6376 extern void freezero(void *, size_t);
6377 extern void *recallocarray(void *, size_t, size_t, size_t);
6378 # 36 "unpack_package_from_stream.c" 2
6379 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 1
6380 /*
6381  * CDDL HEADER START
6382  *
6383  * The contents of this file are subject to the terms of the
6384  * Common Development and Distribution License (the "License").
6385  * You may not use this file except in compliance with the License.
6386  *
6387  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6388  * or http://www.opensolaris.org/os/licensing.
6389  * See the License for the specific language governing permissions
6390  * and limitations under the License.
6391  *
6392  * When distributing Covered Code, include this CDDL HEADER in each
6393  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6394  * If applicable, add the following below this CDDL HEADER, with the
6395  * fields enclosed by brackets "[]" replaced with your own identifying
6396  * information: Portions Copyright [yyyy] [name of copyright owner]
6397  *
6398  * CDDL HEADER END
6399  */
6400 
6401 /*
6402  * Copyright 2014 PALO, Richard.
6403  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6404  * Copyright (c) 2013 Gary Mills
6405  *
6406  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
6407  */
6408 
6409 /*	Copyright (c) 1988 AT&T	*/
6410 /*	  All Rights Reserved  	*/
6411 
6412 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
6413 
6414 
6415 
6416 
6417 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6418 /*
6419  * CDDL HEADER START
6420  *
6421  * The contents of this file are subject to the terms of the
6422  * Common Development and Distribution License (the "License").
6423  * You may not use this file except in compliance with the License.
6424  *
6425  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6426  * or http://www.opensolaris.org/os/licensing.
6427  * See the License for the specific language governing permissions
6428  * and limitations under the License.
6429  *
6430  * When distributing Covered Code, include this CDDL HEADER in each
6431  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6432  * If applicable, add the following below this CDDL HEADER, with the
6433  * fields enclosed by brackets "[]" replaced with your own identifying
6434  * information: Portions Copyright [yyyy] [name of copyright owner]
6435  *
6436  * CDDL HEADER END
6437  */
6438 
6439 /*
6440  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6441  * Copyright 2016 Joyent, Inc.
6442  *
6443  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6444  * Use is subject to license terms.
6445  */
6446 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6447 
6448 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
6449 /*
6450  * This file and its contents are supplied under the terms of the
6451  * Common Development and Distribution License ("CDDL"), version 1.0.
6452  * You may only use this file in accordance with the terms of version
6453  * 1.0 of the CDDL.
6454  *
6455  * A full copy of the text of the CDDL should have accompanied this
6456  * source.  A copy of the CDDL is also available via the Internet at
6457  * http://www.illumos.org/license/CDDL.
6458  */
6459 
6460 /*
6461  * Copyright 2014-2016 PALO, Richard.
6462  */
6463 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6464 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6465 /*
6466  * CDDL HEADER START
6467  *
6468  * The contents of this file are subject to the terms of the
6469  * Common Development and Distribution License (the "License").
6470  * You may not use this file except in compliance with the License.
6471  *
6472  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6473  * or http://www.opensolaris.org/os/licensing.
6474  * See the License for the specific language governing permissions
6475  * and limitations under the License.
6476  *
6477  * When distributing Covered Code, include this CDDL HEADER in each
6478  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6479  * If applicable, add the following below this CDDL HEADER, with the
6480  * fields enclosed by brackets "[]" replaced with your own identifying
6481  * information: Portions Copyright [yyyy] [name of copyright owner]
6482  *
6483  * CDDL HEADER END
6484  */
6485 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6486 /*	  All Rights Reserved  	*/
6487 
6488 
6489 /*
6490  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6491  * Use is subject to license terms.
6492  *
6493  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6494  * Copyright 2016 Joyent, Inc.
6495  */
6496 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6497 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
6498 /*
6499  * CDDL HEADER START
6500  *
6501  * The contents of this file are subject to the terms of the
6502  * Common Development and Distribution License (the "License").
6503  * You may not use this file except in compliance with the License.
6504  *
6505  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6506  * or http://www.opensolaris.org/os/licensing.
6507  * See the License for the specific language governing permissions
6508  * and limitations under the License.
6509  *
6510  * When distributing Covered Code, include this CDDL HEADER in each
6511  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6512  * If applicable, add the following below this CDDL HEADER, with the
6513  * fields enclosed by brackets "[]" replaced with your own identifying
6514  * information: Portions Copyright [yyyy] [name of copyright owner]
6515  *
6516  * CDDL HEADER END
6517  */
6518 
6519 /*
6520  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
6521  *	  All Rights Reserved
6522  *
6523  */
6524 
6525 /*
6526  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6527  * Use is subject to license terms.
6528  */
6529 
6530 /*
6531  * WARNING: This is an implementation-specific header,
6532  * its contents are not guaranteed. Applications
6533  * should include <unistd.h> and not this header.
6534  */
6535 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6536 
6537 
6538 
6539 
6540 
6541 /* Symbolic constants for the "access" routine: */
6542 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6543 /* Symbolic constants for the "lseek" routine: */
6544 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6545 /* Path names: */
6546 
6547 
6548 
6549 
6550 /*
6551  * compile-time symbolic constants,
6552  * Support does not mean the feature is enabled.
6553  * Use pathconf/sysconf to obtain actual configuration value.
6554  */
6555 
6556 /* Values unchanged in UNIX 03 */
6557 
6558 
6559 
6560 
6561 
6562 /*
6563  * POSIX.1b compile-time symbolic constants.
6564  */
6565 # 134 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6566 /*
6567  * POSIX.1c compile-time symbolic constants.
6568  */
6569 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6570 /* New in UNIX 03 */
6571 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6572 /*
6573  * Support for the POSIX.1 mutex protocol attribute. For realtime applications
6574  * which need mutexes to support priority inheritance/ceiling.
6575  */
6576 # 187 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6577 /*
6578  * Large File Summit-related announcement macros.  The system supports both
6579  * the additional and transitional Large File Summit interfaces.  (The final
6580  * two macros provide a finer granularity breakdown of _LFS64_LARGEFILE.)
6581  */
6582 
6583 
6584 
6585 
6586 
6587 /* large file compilation environment setup */
6588 
6589 
6590 
6591 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6592 #pragma redefine_extname ftruncate ftruncate64
6593 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6594 
6595 
6596 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6597 #pragma redefine_extname lseek lseek64
6598 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6599 
6600 
6601 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6602 #pragma redefine_extname pread pread64
6603 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6604 
6605 
6606 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6607 #pragma redefine_extname pwrite pwrite64
6608 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6609 
6610 
6611 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6612 #pragma redefine_extname truncate truncate64
6613 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6614 
6615 
6616 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6617 #pragma redefine_extname lockf lockf64
6618 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6619 
6620 
6621 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6622 #pragma redefine_extname tell tell64
6623 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6624 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6625 /* In the LP64 compilation environment, the APIs are already large file */
6626 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6627 extern int access(const char *, int);
6628 
6629 extern int acct(const char *);
6630 
6631 extern unsigned alarm(unsigned);
6632 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6633 
6634 
6635 extern int brk(void *);
6636 
6637 extern int chdir(const char *);
6638 extern int chown(const char *, uid_t, gid_t);
6639 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6640 
6641 
6642 extern int chroot(const char *);
6643 
6644 extern int close(int);
6645 
6646 
6647 
6648 
6649 
6650 
6651 extern char *ctermid(char *);
6652 
6653 
6654 extern char *ctermid_r(char *);
6655 
6656 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6657 
6658 extern char *cuserid(char *);
6659 
6660 extern int dup(int);
6661 extern int dup2(int, int);
6662 extern int dup3(int, int, int);
6663 
6664 
6665 
6666 
6667 extern void endusershell(void);
6668 
6669 extern int execl(const char *, const char *, ...);
6670 extern int execle(const char *, const char *, ...);
6671 extern int execlp(const char *, const char *, ...);
6672 extern int execv(const char *, char *const *);
6673 extern int execve(const char *, char *const *, char *const *);
6674 extern int execvp(const char *, char *const *);
6675 extern void _exit(int)
6676  __attribute__((__noreturn__));
6677 /*
6678  * The following fattach prototype is duplicated in <stropts.h>. The
6679  * duplication is necessitated by XPG4.2 which requires the prototype
6680  * be defined in <stropts.h>.
6681  */
6682 
6683 extern int fattach(int, const char *);
6684 
6685 
6686 extern int fchdir(int);
6687 extern int fchown(int, uid_t, gid_t);
6688 
6689 
6690 extern int fchroot(int);
6691 
6692 
6693 
6694 extern int fdatasync(int);
6695 
6696 /*
6697  * The following fdetach prototype is duplicated in <stropts.h>. The
6698  * duplication is necessitated by XPG4.2 which requires the prototype
6699  * be defined in <stropts.h>.
6700  */
6701 
6702 extern int fdetach(const char *);
6703 
6704 extern pid_t fork(void);
6705 
6706 extern pid_t fork1(void);
6707 extern pid_t forkall(void);
6708 
6709 extern long fpathconf(int, int);
6710 
6711 
6712 extern int fsync(int);
6713 
6714 
6715 
6716 
6717 extern int ftruncate(int, off_t);
6718 
6719 extern char *getcwd(char *, size_t);
6720 
6721 
6722 extern int getdtablesize(void);
6723 
6724 extern gid_t getegid(void);
6725 extern uid_t geteuid(void);
6726 extern gid_t getgid(void);
6727 extern int getgroups(int, gid_t *);
6728 
6729 extern long gethostid(void);
6730 
6731 
6732 
6733 
6734 extern int gethostname(char *, int);
6735 # 372 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6736 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6737 
6738 extern int getpagesize(void);
6739 
6740 extern pid_t getpgid(pid_t);
6741 
6742 extern pid_t getpid(void);
6743 extern pid_t getppid(void);
6744 extern pid_t getpgrp(void);
6745 
6746 
6747 char *gettxt(const char *, const char *);
6748 
6749 
6750 extern pid_t getsid(pid_t);
6751 
6752 extern uid_t getuid(void);
6753 
6754 extern char *getusershell(void);
6755 
6756 /*
6757  * The following ioctl prototype is duplicated in <stropts.h>. The
6758  * duplication is necessitated by XPG4.2 which requires the prototype
6759  * be defined in <stropts.h>.
6760  */
6761 
6762 extern int ioctl(int, int, ...);
6763 extern int isaexec(const char *, char *const *, char *const *);
6764 extern int issetugid(void);
6765 
6766 extern int isatty(int);
6767 
6768 extern int lchown(const char *, uid_t, gid_t);
6769 
6770 extern int link(const char *, const char *);
6771 
6772 extern offset_t llseek(int, offset_t, int);
6773 
6774 
6775 
6776 
6777 extern int lockf(int, int, off_t);
6778 
6779 extern off_t lseek(int, off_t, int);
6780 
6781 
6782 extern int nice(int);
6783 
6784 
6785 extern int mincore(caddr_t, size_t, char *);
6786 
6787 extern long pathconf(const char *, int);
6788 extern int pause(void);
6789 extern int pipe(int *);
6790 extern int pipe2(int *, int);
6791 
6792 
6793 
6794 extern ssize_t pread(int, void *, size_t, off_t);
6795 
6796 
6797 extern void profil(unsigned short *, size_t, unsigned long, unsigned int);
6798 
6799 /*
6800  * pthread_atfork() is also declared in <pthread.h> as per SUSv3. The
6801  * declarations are identical. A change to either one may also require
6802  * appropriate namespace updates in order to avoid redeclaration
6803  * warnings in the case where both prototypes are exposed via inclusion
6804  * of both <pthread.h> and <unistd.h>.
6805  */
6806 
6807 
6808 
6809 extern int pthread_atfork(void (*) (void), void (*) (void), void (*) (void));
6810 
6811 
6812 
6813 extern int ptrace(int, pid_t, int, int);
6814 
6815 
6816 
6817 
6818 extern ssize_t pwrite(int, const void *, size_t, off_t);
6819 
6820 
6821 /* per RFC 3542; This is also defined in netdb.h */
6822 extern int rcmd_af(char **, unsigned short, const char *, const char *,
6823  const char *, int *, int);
6824 
6825 extern ssize_t read(int, void *, size_t);
6826 
6827 
6828 extern ssize_t readlink(const char *, char *,
6829  size_t);
6830 
6831 
6832 
6833 
6834 
6835 
6836 extern int rename(const char *, const char *);
6837 
6838 
6839 
6840 
6841 
6842 
6843 
6844 extern int resolvepath(const char *, char *, size_t);
6845 /* per RFC 3542; This is also defined in netdb.h */
6846 extern int rexec_af(char **, unsigned short, const char *, const char *,
6847  const char *, int *, int);
6848 
6849 extern int rmdir(const char *);
6850 
6851 /* per RFC 3542; This is also defined in netdb.h */
6852 extern int rresvport_af(int *, int);
6853 
6854 
6855 
6856 
6857 extern void *sbrk(intptr_t);
6858 
6859 
6860 extern int setegid(gid_t);
6861 extern int seteuid(uid_t);
6862 
6863 extern int setgid(gid_t);
6864 
6865 extern int setgroups(int, const gid_t *);
6866 extern int sethostname(char *, int);
6867 
6868 extern int setpgid(pid_t, pid_t);
6869 
6870 extern pid_t setpgrp(void);
6871 extern int setregid(gid_t, gid_t);
6872 extern int setreuid(uid_t, uid_t);
6873 
6874 extern pid_t setsid(void);
6875 extern int setuid(uid_t);
6876 
6877 extern void setusershell(void);
6878 
6879 extern unsigned sleep(unsigned);
6880 
6881 extern int stime(const time_t *);
6882 
6883 
6884 
6885 
6886 
6887 
6888 extern int symlink(const char *, const char *);
6889 extern void sync(void);
6890 # 534 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6891 extern long sysconf(int);
6892 extern pid_t tcgetpgrp(int);
6893 extern int tcsetpgrp(int, pid_t);
6894 
6895 
6896 
6897 extern off_t tell(int);
6898 
6899 
6900 
6901 
6902 extern int truncate(const char *, off_t);
6903 
6904 extern char *ttyname(int);
6905 
6906 extern useconds_t ualarm(useconds_t, useconds_t);
6907 
6908 extern int unlink(const char *);
6909 
6910 extern char *getwd(char *);
6911 extern int usleep(useconds_t);
6912 extern pid_t vfork(void) __attribute__((__returns_twice__));
6913 #pragma unknown_control_flow(vfork)
6914 
6915 
6916 extern void vhangup(void);
6917 
6918 extern ssize_t write(int, const void *, size_t);
6919 
6920 extern void yield(void);
6921 
6922 
6923 
6924 
6925  /* || defined(_XPG7) */
6926 extern int faccessat(int, const char *, int, int);
6927 extern int fchownat(int, const char *, uid_t, gid_t, int);
6928 extern int linkat(int, const char *, int, const char *, int);
6929 extern ssize_t readlinkat(int, const char *,
6930  char *, size_t);
6931 extern int renameat(int, const char *, int, const char *);
6932 extern int symlinkat(const char *, int, const char *);
6933 extern int unlinkat(int, const char *, int);
6934 
6935 
6936 extern int get_nprocs(void);
6937 extern int get_nprocs_conf(void);
6938 
6939 
6940 /* transitional large file interface versions */
6941 
6942 
6943 extern int ftruncate64(int, off64_t);
6944 extern off64_t lseek64(int, off64_t, int);
6945 extern ssize_t pread64(int, void *, size_t, off64_t);
6946 extern ssize_t pwrite64(int, const void *, size_t, off64_t);
6947 extern off64_t tell64(int);
6948 extern int truncate64(const char *, off64_t);
6949 extern int lockf64(int, int, off64_t);
6950 
6951 
6952 /*
6953  * getlogin_r() & ttyname_r() prototypes are defined here.
6954  */
6955 
6956 /*
6957  * Previous releases of Solaris, starting at 2.3, provided definitions of
6958  * various functions as specified in POSIX.1c, Draft 6.  For some of these
6959  * functions, the final POSIX 1003.1c standard had a different number of
6960  * arguments and return values.
6961  *
6962  * The following segment of this header provides support for the standard
6963  * interfaces while supporting applications written under earlier
6964  * releases.  The application defines appropriate values of the feature
6965  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
6966  * whether it was written to expect the Draft 6 or standard versions of
6967  * these interfaces, before including this header.  This header then
6968  * provides a mapping from the source version of the interface to an
6969  * appropriate binary interface.  Such mappings permit an application
6970  * to be built from libraries and objects which have mixed expectations
6971  * of the definitions of these functions.
6972  *
6973  * For applications using the Draft 6 definitions, the binary symbol is the
6974  * same as the source symbol, and no explicit mapping is needed.  For the
6975  * standard interface, the function func() is mapped to the binary symbol
6976  * _posix_func().  The preferred mechanism for the remapping is a compiler
6977  * #pragma.  If the compiler does not provide such a #pragma, the header file
6978  * defines a static function func() which calls the _posix_func() version;
6979  * this has to be done instead of #define since POSIX specifies that an
6980  * application can #undef the symbol and still be bound to the correct
6981  * implementation.  Unfortunately, the statics confuse lint so we fallback to
6982  * #define in that case.
6983  *
6984  * NOTE: Support for the Draft 6 definitions is provided for compatibility
6985  * only.  New applications/libraries should use the standard definitions.
6986  */
6987 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6988 
6989 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6990 #pragma redefine_extname getlogin_r getloginx_r
6991 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6992 
6993 
6994 
6995 
6996 
6997 
6998 extern char *getlogin_r(char *, int);
6999 
7000 extern char *ttyname_r(int, char *, int);
7001 
7002 
7003 
7004 
7005 
7006 
7007 extern int getentropy(void *, size_t);
7008 # 37 "unpack_package_from_stream.c" 2
7009 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ulimit.h" 1
7010 /*
7011  * CDDL HEADER START
7012  *
7013  * The contents of this file are subject to the terms of the
7014  * Common Development and Distribution License, Version 1.0 only
7015  * (the "License").  You may not use this file except in compliance
7016  * with the License.
7017  *
7018  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7019  * or http://www.opensolaris.org/os/licensing.
7020  * See the License for the specific language governing permissions
7021  * and limitations under the License.
7022  *
7023  * When distributing Covered Code, include this CDDL HEADER in each
7024  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7025  * If applicable, add the following below this CDDL HEADER, with the
7026  * fields enclosed by brackets "[]" replaced with your own identifying
7027  * information: Portions Copyright [yyyy] [name of copyright owner]
7028  *
7029  * CDDL HEADER END
7030  */
7031 /*
7032  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7033  */
7034 /*	Copyright (c) 1988 AT&T	*/
7035 /*	  All Rights Reserved  	*/
7036 
7037 
7038 
7039 
7040 
7041 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ulimit.h" 1
7042 /*
7043  * CDDL HEADER START
7044  *
7045  * The contents of this file are subject to the terms of the
7046  * Common Development and Distribution License, Version 1.0 only
7047  * (the "License").  You may not use this file except in compliance
7048  * with the License.
7049  *
7050  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7051  * or http://www.opensolaris.org/os/licensing.
7052  * See the License for the specific language governing permissions
7053  * and limitations under the License.
7054  *
7055  * When distributing Covered Code, include this CDDL HEADER in each
7056  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7057  * If applicable, add the following below this CDDL HEADER, with the
7058  * fields enclosed by brackets "[]" replaced with your own identifying
7059  * information: Portions Copyright [yyyy] [name of copyright owner]
7060  *
7061  * CDDL HEADER END
7062  */
7063 /*
7064  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
7065  * Use is subject to license terms.
7066  */
7067 
7068 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7069 /*	  All Rights Reserved  	*/
7070 
7071 /*	Copyright (c) 1987, 1988 Microsoft Corporation	*/
7072 /*	  All Rights Reserved	*/
7073 
7074 
7075 
7076 
7077 #pragma ident "%Z%%M%	%I%	%E% SMI"
7078 
7079 
7080 
7081 
7082 
7083 /*
7084  * The following are codes which can be
7085  * passed to the ulimit system call.
7086  */
7087 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ulimit.h"
7088 /*
7089  * The following are symbolic constants required for
7090  * X/Open Conformance.   They are the equivalents of
7091  * the constants above.
7092  */
7093 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ulimit.h" 2
7094 
7095 
7096 
7097 
7098 
7099 extern long ulimit(int, ...);
7100 # 38 "unpack_package_from_stream.c" 2
7101 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
7102 /*
7103  * CDDL HEADER START
7104  *
7105  * The contents of this file are subject to the terms of the
7106  * Common Development and Distribution License (the "License").
7107  * You may not use this file except in compliance with the License.
7108  *
7109  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7110  * or http://www.opensolaris.org/os/licensing.
7111  * See the License for the specific language governing permissions
7112  * and limitations under the License.
7113  *
7114  * When distributing Covered Code, include this CDDL HEADER in each
7115  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7116  * If applicable, add the following below this CDDL HEADER, with the
7117  * fields enclosed by brackets "[]" replaced with your own identifying
7118  * information: Portions Copyright [yyyy] [name of copyright owner]
7119  *
7120  * CDDL HEADER END
7121  */
7122 
7123 /*
7124  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7125  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
7126  */
7127 
7128 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
7129 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
7130 /*	All Rights Reserved	*/
7131 
7132 
7133 
7134 
7135 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7136 /*
7137  * CDDL HEADER START
7138  *
7139  * The contents of this file are subject to the terms of the
7140  * Common Development and Distribution License (the "License").
7141  * You may not use this file except in compliance with the License.
7142  *
7143  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7144  * or http://www.opensolaris.org/os/licensing.
7145  * See the License for the specific language governing permissions
7146  * and limitations under the License.
7147  *
7148  * When distributing Covered Code, include this CDDL HEADER in each
7149  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7150  * If applicable, add the following below this CDDL HEADER, with the
7151  * fields enclosed by brackets "[]" replaced with your own identifying
7152  * information: Portions Copyright [yyyy] [name of copyright owner]
7153  *
7154  * CDDL HEADER END
7155  */
7156 
7157 /*
7158  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7159  * Copyright 2016 Joyent, Inc.
7160  *
7161  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7162  * Use is subject to license terms.
7163  */
7164 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7165 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7166 /*
7167  * CDDL HEADER START
7168  *
7169  * The contents of this file are subject to the terms of the
7170  * Common Development and Distribution License (the "License").
7171  * You may not use this file except in compliance with the License.
7172  *
7173  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7174  * or http://www.opensolaris.org/os/licensing.
7175  * See the License for the specific language governing permissions
7176  * and limitations under the License.
7177  *
7178  * When distributing Covered Code, include this CDDL HEADER in each
7179  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7180  * If applicable, add the following below this CDDL HEADER, with the
7181  * fields enclosed by brackets "[]" replaced with your own identifying
7182  * information: Portions Copyright [yyyy] [name of copyright owner]
7183  *
7184  * CDDL HEADER END
7185  */
7186 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7187 /*	  All Rights Reserved  	*/
7188 
7189 
7190 /*
7191  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7192  * Use is subject to license terms.
7193  *
7194  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7195  * Copyright 2016 Joyent, Inc.
7196  */
7197 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7198 
7199 
7200 
7201 
7202 
7203 /*
7204  * The implementation specific header <sys/time_impl.h> includes a
7205  * definition for timestruc_t needed by the stat structure.  However,
7206  * including either <time.h>, which includes <sys/time_impl.h>, or
7207  * including <sys/time_impl.h> directly will break both X/Open and
7208  * POSIX namespace. Preceeding tag, structure, and structure member
7209  * names with underscores eliminates the namespace breakage and at the
7210  * same time, with unique type names, eliminates the possibility of
7211  * timespec_t or timestruct_t naming conflicts that could otherwise
7212  * result based on the order of inclusion of <sys/stat.h> and
7213  * <sys/time.h>.  The header <sys/time_std_impl.h> contains the
7214  * standards namespace safe versions of these definitions.
7215  */
7216 
7217 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
7218 /*
7219  * CDDL HEADER START
7220  *
7221  * The contents of this file are subject to the terms of the
7222  * Common Development and Distribution License, Version 1.0 only
7223  * (the "License").  You may not use this file except in compliance
7224  * with the License.
7225  *
7226  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7227  * or http://www.opensolaris.org/os/licensing.
7228  * See the License for the specific language governing permissions
7229  * and limitations under the License.
7230  *
7231  * When distributing Covered Code, include this CDDL HEADER in each
7232  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7233  * If applicable, add the following below this CDDL HEADER, with the
7234  * fields enclosed by brackets "[]" replaced with your own identifying
7235  * information: Portions Copyright [yyyy] [name of copyright owner]
7236  *
7237  * CDDL HEADER END
7238  */
7239 /*
7240  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
7241  * Use is subject to license terms.
7242  */
7243 
7244 /*
7245  * Implementation-private.  This header should not be included
7246  * directly by an application.  The application should instead
7247  * include <time.h> which includes this header conditionally
7248  * depending on which feature test macros are defined. By default,
7249  * this header is included by <time.h>.  X/Open and POSIX
7250  * standards requirements result in this header being included
7251  * by <time.h> only under a restricted set of conditions.
7252  */
7253 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7254 
7255 
7256 
7257 
7258 
7259 
7260 /*
7261  * stat structure, used by stat(2) and fstat(2)
7262  */
7263 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7264 /*
7265  * large file compilation environment setup
7266  */
7267 
7268 
7269 
7270 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7271 #pragma redefine_extname fstat fstat64
7272 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7273 
7274 
7275 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7276 #pragma redefine_extname stat stat64
7277 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7278 
7279 
7280 
7281 
7282 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7283 #pragma redefine_extname fstatat fstatat64
7284 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7285 
7286 
7287 
7288 
7289 
7290 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7291 #pragma redefine_extname lstat lstat64
7292 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7293 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7294 /*
7295  * In the LP64 compilation environment, map large file interfaces
7296  * back to native versions where possible.
7297  */
7298 # 211 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7299 /*
7300  * User level stat structure definitions.
7301  */
7302 # 242 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7303 struct stat {
7304  dev_t st_dev;
7305  long st_pad1[3]; /* reserved for network id */
7306  ino_t st_ino;
7307  mode_t st_mode;
7308  nlink_t st_nlink;
7309  uid_t st_uid;
7310  gid_t st_gid;
7311  dev_t st_rdev;
7312  long st_pad2[2];
7313  off_t st_size;
7314 
7315 
7316 
7317 
7318  timestruc_t st_atim;
7319  timestruc_t st_mtim;
7320  timestruc_t st_ctim;
7321 
7322 
7323 
7324 
7325 
7326  blksize_t st_blksize;
7327  blkcnt_t st_blocks;
7328  char st_fstype[16];
7329  long st_pad4[8]; /* expansion area */
7330 };
7331 
7332 
7333 
7334 /* transitional large file interface version */
7335 # 303 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7336 struct stat64 {
7337  dev_t st_dev;
7338  long st_pad1[3]; /* reserved for network id */
7339  ino64_t st_ino;
7340  mode_t st_mode;
7341  nlink_t st_nlink;
7342  uid_t st_uid;
7343  gid_t st_gid;
7344  dev_t st_rdev;
7345  long st_pad2[2];
7346  off64_t st_size;
7347 
7348  timestruc_t st_atim;
7349  timestruc_t st_mtim;
7350  timestruc_t st_ctim;
7351 
7352 
7353 
7354 
7355 
7356  blksize_t st_blksize;
7357  blkcnt64_t st_blocks;
7358  char st_fstype[16];
7359  long st_pad4[8]; /* expansion area */
7360 };
7361 # 401 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7362 /* MODE MASKS */
7363 
7364 /* de facto standard definitions */
7365 
7366 
7367 
7368 
7369 
7370 
7371 /* XENIX definitions are not relevant to Solaris */
7372 # 428 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7373 /* the following macros are for POSIX conformance */
7374 # 454 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7375 /* POSIX.4 macros */
7376 
7377 
7378 
7379 
7380 
7381 
7382 /*
7383  * A version number is included in the x86 SVR4 stat and mknod interfaces
7384  * so that SVR4 binaries can be supported.  An LP64 kernel that supports
7385  * the i386 ABI need to be aware of this too.
7386  */
7387 # 476 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7388  /* || defined(_XPG7) */
7389 /* for use with futimens() and utimensat() */
7390 # 486 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7391 extern int fchmod(int, mode_t);
7392 
7393 
7394 extern int chmod(const char *, mode_t);
7395 extern int mkdir(const char *, mode_t);
7396 extern int mkfifo(const char *, mode_t);
7397 extern mode_t umask(mode_t);
7398 
7399 /* transitional large file interfaces */
7400 
7401 
7402 extern int fstat64(int, struct stat64 *);
7403 extern int stat64(const char *, struct stat64 *);
7404 extern int lstat64(const char *, struct stat64 *);
7405 
7406 
7407 extern int fstatat64(int, const char *, struct stat64 *, int);
7408 
7409 
7410 
7411 
7412 
7413  /* || defined(_XPG7) */
7414 extern int mkdirat(int, const char *, mode_t);
7415 extern int mkfifoat(int, const char *, mode_t);
7416 extern int mknodat(int, const char *, mode_t, dev_t);
7417 extern int fchmodat(int, const char *, mode_t, int);
7418 extern int futimens(int, const struct timespec[2]);
7419 extern int utimensat(int, const char *, const struct timespec[2], int);
7420 
7421 
7422 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 1
7423 /*
7424  * CDDL HEADER START
7425  *
7426  * The contents of this file are subject to the terms of the
7427  * Common Development and Distribution License (the "License").
7428  * You may not use this file except in compliance with the License.
7429  *
7430  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7431  * or http://www.opensolaris.org/os/licensing.
7432  * See the License for the specific language governing permissions
7433  * and limitations under the License.
7434  *
7435  * When distributing Covered Code, include this CDDL HEADER in each
7436  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7437  * If applicable, add the following below this CDDL HEADER, with the
7438  * fields enclosed by brackets "[]" replaced with your own identifying
7439  * information: Portions Copyright [yyyy] [name of copyright owner]
7440  *
7441  * CDDL HEADER END
7442  */
7443 
7444 /*
7445  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
7446  * Use is subject to license terms.
7447  */
7448 
7449 
7450 
7451 
7452 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7453 /*
7454  * CDDL HEADER START
7455  *
7456  * The contents of this file are subject to the terms of the
7457  * Common Development and Distribution License (the "License").
7458  * You may not use this file except in compliance with the License.
7459  *
7460  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7461  * or http://www.opensolaris.org/os/licensing.
7462  * See the License for the specific language governing permissions
7463  * and limitations under the License.
7464  *
7465  * When distributing Covered Code, include this CDDL HEADER in each
7466  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7467  * If applicable, add the following below this CDDL HEADER, with the
7468  * fields enclosed by brackets "[]" replaced with your own identifying
7469  * information: Portions Copyright [yyyy] [name of copyright owner]
7470  *
7471  * CDDL HEADER END
7472  */
7473 
7474 /*
7475  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7476  * Copyright 2016 Joyent, Inc.
7477  *
7478  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7479  * Use is subject to license terms.
7480  */
7481 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
7482 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7483 /*
7484  * CDDL HEADER START
7485  *
7486  * The contents of this file are subject to the terms of the
7487  * Common Development and Distribution License (the "License").
7488  * You may not use this file except in compliance with the License.
7489  *
7490  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7491  * or http://www.opensolaris.org/os/licensing.
7492  * See the License for the specific language governing permissions
7493  * and limitations under the License.
7494  *
7495  * When distributing Covered Code, include this CDDL HEADER in each
7496  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7497  * If applicable, add the following below this CDDL HEADER, with the
7498  * fields enclosed by brackets "[]" replaced with your own identifying
7499  * information: Portions Copyright [yyyy] [name of copyright owner]
7500  *
7501  * CDDL HEADER END
7502  */
7503 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7504 /*	  All Rights Reserved  	*/
7505 
7506 
7507 /*
7508  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7509  * Use is subject to license terms.
7510  *
7511  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7512  * Copyright 2016 Joyent, Inc.
7513  */
7514 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
7515 
7516 
7517 
7518 
7519 
7520 /*
7521  * The implementation specific header for <sys/stat.h>
7522  */
7523 
7524 
7525 
7526 
7527 
7528 extern int fstat(int, struct stat *);
7529 extern int stat(const char *, struct stat *);
7530 
7531 
7532 
7533 extern int fstatat(int, const char *, struct stat *, int);
7534 
7535 
7536 
7537 extern int lstat(const char *, struct stat *);
7538 extern int mknod(const char *, mode_t, dev_t);
7539 # 518 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7540 # 39 "unpack_package_from_stream.c" 2
7541 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h" 1
7542 /*
7543  * CDDL HEADER START
7544  *
7545  * The contents of this file are subject to the terms of the
7546  * Common Development and Distribution License, Version 1.0 only
7547  * (the "License").  You may not use this file except in compliance
7548  * with the License.
7549  *
7550  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7551  * or http://www.opensolaris.org/os/licensing.
7552  * See the License for the specific language governing permissions
7553  * and limitations under the License.
7554  *
7555  * When distributing Covered Code, include this CDDL HEADER in each
7556  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7557  * If applicable, add the following below this CDDL HEADER, with the
7558  * fields enclosed by brackets "[]" replaced with your own identifying
7559  * information: Portions Copyright [yyyy] [name of copyright owner]
7560  *
7561  * CDDL HEADER END
7562  */
7563 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7564 /*	  All Rights Reserved  	*/
7565 
7566 /*
7567  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7568  *
7569  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7570  * Use is subject to license terms.
7571  */
7572 
7573 
7574 
7575 
7576 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7577 /*
7578  * CDDL HEADER START
7579  *
7580  * The contents of this file are subject to the terms of the
7581  * Common Development and Distribution License (the "License").
7582  * You may not use this file except in compliance with the License.
7583  *
7584  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7585  * or http://www.opensolaris.org/os/licensing.
7586  * See the License for the specific language governing permissions
7587  * and limitations under the License.
7588  *
7589  * When distributing Covered Code, include this CDDL HEADER in each
7590  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7591  * If applicable, add the following below this CDDL HEADER, with the
7592  * fields enclosed by brackets "[]" replaced with your own identifying
7593  * information: Portions Copyright [yyyy] [name of copyright owner]
7594  *
7595  * CDDL HEADER END
7596  */
7597 
7598 /*
7599  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7600  * Copyright 2016 Joyent, Inc.
7601  *
7602  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7603  * Use is subject to license terms.
7604  */
7605 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h" 2
7606 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7607 /*
7608  * CDDL HEADER START
7609  *
7610  * The contents of this file are subject to the terms of the
7611  * Common Development and Distribution License (the "License").
7612  * You may not use this file except in compliance with the License.
7613  *
7614  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7615  * or http://www.opensolaris.org/os/licensing.
7616  * See the License for the specific language governing permissions
7617  * and limitations under the License.
7618  *
7619  * When distributing Covered Code, include this CDDL HEADER in each
7620  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7621  * If applicable, add the following below this CDDL HEADER, with the
7622  * fields enclosed by brackets "[]" replaced with your own identifying
7623  * information: Portions Copyright [yyyy] [name of copyright owner]
7624  *
7625  * CDDL HEADER END
7626  */
7627 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7628 /*	  All Rights Reserved  	*/
7629 
7630 
7631 /*
7632  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7633  * Use is subject to license terms.
7634  *
7635  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7636  * Copyright 2016 Joyent, Inc.
7637  */
7638 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h" 2
7639 
7640 
7641 
7642 
7643 
7644 /*
7645  * Structure returned by statvfs(2).
7646  */
7647 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7648 typedef struct statvfs {
7649  unsigned long f_bsize; /* fundamental file system block size */
7650  unsigned long f_frsize; /* fragment size */
7651  fsblkcnt_t f_blocks; /* total blocks of f_frsize on fs */
7652  fsblkcnt_t f_bfree; /* total free blocks of f_frsize */
7653  fsblkcnt_t f_bavail; /* free blocks avail to non-superuser */
7654  fsfilcnt_t f_files; /* total file nodes (inodes) */
7655  fsfilcnt_t f_ffree; /* total free file nodes */
7656  fsfilcnt_t f_favail; /* free nodes avail to non-superuser */
7657  unsigned long f_fsid; /* file system id (dev for now) */
7658  char f_basetype[16]; /* target fs type name, */
7659       /* null-terminated */
7660  unsigned long f_flag; /* bit-mask of flags */
7661  unsigned long f_namemax; /* maximum file name length */
7662  char f_fstr[32]; /* filesystem-specific string */
7663 
7664  unsigned long f_filler[16]; /* reserved for future expansion */
7665 
7666 } statvfs_t;
7667 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7668 /* transitional large file interface version */
7669 
7670 typedef struct statvfs64 {
7671  unsigned long f_bsize; /* preferred file system block size */
7672  unsigned long f_frsize; /* fundamental file system block size */
7673  fsblkcnt64_t f_blocks; /* total blocks of f_frsize */
7674  fsblkcnt64_t f_bfree; /* total free blocks of f_frsize */
7675  fsblkcnt64_t f_bavail; /* free blocks avail to non-superuser */
7676  fsfilcnt64_t f_files; /* total # of file nodes (inodes) */
7677  fsfilcnt64_t f_ffree; /* total # of free file nodes */
7678  fsfilcnt64_t f_favail; /* free nodes avail to non-superuser */
7679  unsigned long f_fsid; /* file system id (dev for now) */
7680  char f_basetype[16]; /* target fs type name, */
7681       /* null-terminated */
7682  unsigned long f_flag; /* bit-mask of flags */
7683  unsigned long f_namemax; /* maximum file name length */
7684  char f_fstr[32]; /* filesystem-specific string */
7685 
7686  unsigned long f_filler[16]; /* reserved for future expansion */
7687 
7688 } statvfs64_t;
7689 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7690 /*
7691  * Flag definitions.
7692  */
7693 
7694 
7695 
7696 
7697 
7698 
7699 /*
7700  * large file compilation environment setup
7701  */
7702 
7703 
7704 
7705 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7706 #pragma redefine_extname statvfs statvfs64
7707 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7708 
7709 
7710 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7711 #pragma redefine_extname fstatvfs fstatvfs64
7712 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7713 # 190 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7714 int statvfs(const char *, statvfs_t *);
7715 int fstatvfs(int, statvfs_t *);
7716 
7717 /* transitional large file interface versions */
7718 
7719 
7720 int statvfs64(const char *, statvfs64_t *);
7721 int fstatvfs64(int, statvfs64_t *);
7722 # 40 "unpack_package_from_stream.c" 2
7723 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h" 1
7724 /*
7725  * CDDL HEADER START
7726  *
7727  * The contents of this file are subject to the terms of the
7728  * Common Development and Distribution License, Version 1.0 only
7729  * (the "License").  You may not use this file except in compliance
7730  * with the License.
7731  *
7732  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7733  * or http://www.opensolaris.org/os/licensing.
7734  * See the License for the specific language governing permissions
7735  * and limitations under the License.
7736  *
7737  * When distributing Covered Code, include this CDDL HEADER in each
7738  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7739  * If applicable, add the following below this CDDL HEADER, with the
7740  * fields enclosed by brackets "[]" replaced with your own identifying
7741  * information: Portions Copyright [yyyy] [name of copyright owner]
7742  *
7743  * CDDL HEADER END
7744  */
7745 /*	Copyright (c) 1988 AT&T	*/
7746 /*	  All Rights Reserved  	*/
7747 
7748 /*
7749  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7750  * Copyright 2016 Joyent, Inc.
7751  * Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
7752  *
7753  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7754  * Use is subject to license terms.
7755  */
7756 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h"
7757 extern void __assert(const char *, const char *, int);
7758 
7759 
7760 /*
7761  * In C11 the static_assert macro is always defined, unlike the assert macro.
7762  */
7763 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h"
7764 /*
7765  * Note that the ANSI C Standard requires all headers to be idempotent except
7766  * <assert.h> which is explicitly required not to be idempotent (section 4.1.2).
7767  * Therefore, it is by intent that the header guards (#ifndef _ASSERT_H) do
7768  * not span this entire file.
7769  */
7770 # 41 "unpack_package_from_stream.c" 2
7771 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 1
7772 /*
7773  * CDDL HEADER START
7774  *
7775  * The contents of this file are subject to the terms of the
7776  * Common Development and Distribution License (the "License").
7777  * You may not use this file except in compliance with the License.
7778  *
7779  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7780  * or http://www.opensolaris.org/os/licensing.
7781  * See the License for the specific language governing permissions
7782  * and limitations under the License.
7783  *
7784  * When distributing Covered Code, include this CDDL HEADER in each
7785  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7786  * If applicable, add the following below this CDDL HEADER, with the
7787  * fields enclosed by brackets "[]" replaced with your own identifying
7788  * information: Portions Copyright [yyyy] [name of copyright owner]
7789  *
7790  * CDDL HEADER END
7791  */
7792 
7793 /*
7794  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7795  *
7796  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
7797  * Use is subject to license terms.
7798  */
7799 
7800 /*	Copyright (c) 1988 AT&T	*/
7801 /*	  All Rights Reserved  	*/
7802 
7803 
7804 
7805 
7806 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7807 /*
7808  * CDDL HEADER START
7809  *
7810  * The contents of this file are subject to the terms of the
7811  * Common Development and Distribution License (the "License").
7812  * You may not use this file except in compliance with the License.
7813  *
7814  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7815  * or http://www.opensolaris.org/os/licensing.
7816  * See the License for the specific language governing permissions
7817  * and limitations under the License.
7818  *
7819  * When distributing Covered Code, include this CDDL HEADER in each
7820  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7821  * If applicable, add the following below this CDDL HEADER, with the
7822  * fields enclosed by brackets "[]" replaced with your own identifying
7823  * information: Portions Copyright [yyyy] [name of copyright owner]
7824  *
7825  * CDDL HEADER END
7826  */
7827 
7828 /*
7829  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7830  * Copyright 2016 Joyent, Inc.
7831  *
7832  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7833  * Use is subject to license terms.
7834  */
7835 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
7836 
7837 
7838 
7839 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7840 /*
7841  * CDDL HEADER START
7842  *
7843  * The contents of this file are subject to the terms of the
7844  * Common Development and Distribution License (the "License").
7845  * You may not use this file except in compliance with the License.
7846  *
7847  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7848  * or http://www.opensolaris.org/os/licensing.
7849  * See the License for the specific language governing permissions
7850  * and limitations under the License.
7851  *
7852  * When distributing Covered Code, include this CDDL HEADER in each
7853  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7854  * If applicable, add the following below this CDDL HEADER, with the
7855  * fields enclosed by brackets "[]" replaced with your own identifying
7856  * information: Portions Copyright [yyyy] [name of copyright owner]
7857  *
7858  * CDDL HEADER END
7859  */
7860 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7861 /*	  All Rights Reserved  	*/
7862 
7863 
7864 /*
7865  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7866  * Use is subject to license terms.
7867  *
7868  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7869  * Copyright 2016 Joyent, Inc.
7870  */
7871 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
7872 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 1
7873 /*
7874  * CDDL HEADER START
7875  *
7876  * The contents of this file are subject to the terms of the
7877  * Common Development and Distribution License (the "License").
7878  * You may not use this file except in compliance with the License.
7879  *
7880  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7881  * or http://www.opensolaris.org/os/licensing.
7882  * See the License for the specific language governing permissions
7883  * and limitations under the License.
7884  *
7885  * When distributing Covered Code, include this CDDL HEADER in each
7886  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7887  * If applicable, add the following below this CDDL HEADER, with the
7888  * fields enclosed by brackets "[]" replaced with your own identifying
7889  * information: Portions Copyright [yyyy] [name of copyright owner]
7890  *
7891  * CDDL HEADER END
7892  */
7893 
7894 /*
7895  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
7896  */
7897 
7898 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7899 /*	  All Rights Reserved  	*/
7900 
7901 /*
7902  * University Copyright- Copyright (c) 1982, 1986, 1988
7903  * The Regents of the University of California
7904  * All Rights Reserved
7905  *
7906  * University Acknowledgment- Portions of this document are derived from
7907  * software developed by the University of California, Berkeley, and its
7908  * contributors.
7909  */
7910 
7911 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
7912 /* Copyright 2015, Joyent, Inc. */
7913 
7914 
7915 
7916 
7917 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7918 /*
7919  * CDDL HEADER START
7920  *
7921  * The contents of this file are subject to the terms of the
7922  * Common Development and Distribution License (the "License").
7923  * You may not use this file except in compliance with the License.
7924  *
7925  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7926  * or http://www.opensolaris.org/os/licensing.
7927  * See the License for the specific language governing permissions
7928  * and limitations under the License.
7929  *
7930  * When distributing Covered Code, include this CDDL HEADER in each
7931  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7932  * If applicable, add the following below this CDDL HEADER, with the
7933  * fields enclosed by brackets "[]" replaced with your own identifying
7934  * information: Portions Copyright [yyyy] [name of copyright owner]
7935  *
7936  * CDDL HEADER END
7937  */
7938 
7939 /*
7940  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7941  * Copyright 2016 Joyent, Inc.
7942  *
7943  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7944  * Use is subject to license terms.
7945  */
7946 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 2
7947 
7948 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7949 /*
7950  * CDDL HEADER START
7951  *
7952  * The contents of this file are subject to the terms of the
7953  * Common Development and Distribution License (the "License").
7954  * You may not use this file except in compliance with the License.
7955  *
7956  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7957  * or http://www.opensolaris.org/os/licensing.
7958  * See the License for the specific language governing permissions
7959  * and limitations under the License.
7960  *
7961  * When distributing Covered Code, include this CDDL HEADER in each
7962  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7963  * If applicable, add the following below this CDDL HEADER, with the
7964  * fields enclosed by brackets "[]" replaced with your own identifying
7965  * information: Portions Copyright [yyyy] [name of copyright owner]
7966  *
7967  * CDDL HEADER END
7968  */
7969 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7970 /*	  All Rights Reserved  	*/
7971 
7972 
7973 /*
7974  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7975  * Use is subject to license terms.
7976  *
7977  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7978  * Copyright 2016 Joyent, Inc.
7979  */
7980 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 2
7981 
7982 
7983 
7984 
7985 
7986 /*
7987  * Flag values accessible to open(2) and fcntl(2)
7988  * The first five can only be set (exclusively) by open(2).
7989  */
7990 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7991     /* defines read/write file integrity */
7992 
7993 
7994 
7995 
7996 
7997 
7998 /*
7999  * Flag values accessible only to open(2).
8000  */
8001 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8002 /*
8003  * fcntl(2) requests
8004  *
8005  * N.B.: values are not necessarily assigned sequentially below.
8006  */
8007 
8008 
8009 
8010 
8011 
8012 
8013 
8014 /*
8015  * Applications that read /dev/mem must be built like the kernel.  A
8016  * new symbol "_KMEMUSER" is defined for this purpose.
8017  */
8018 # 128 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8019      /* EINVAL is fildes matches arg1 */
8020 # 137 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8021 /*
8022  * Numbers 20-22 have been removed and should not be reused.
8023  */
8024 
8025 
8026 
8027 
8028 
8029     /* manager */
8030 
8031 /*
8032  * Commands that refer to flock structures.  The argument types differ between
8033  * the large and small file environments; therefore, the #defined values must
8034  * as well.
8035  * The NBMAND forms are private and should not be used.
8036  * The FLOCK forms are also private and should not be used.
8037  */
8038 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8039 /* ILP32 large file application compilation environment version */
8040 # 190 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8041 /*
8042  * transitional large file interface version
8043  * These are only valid in a 32 bit application compiled with large files
8044  * option, for source compatibility, the 64-bit versions are mapped back
8045  * to the native versions.
8046  */
8047 # 233 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8048 /*
8049  * File segment locking set data type - information passed to system by user.
8050  */
8051 
8052 /* regular version, for both small and large file compilation environment */
8053 typedef struct flock {
8054  short l_type;
8055  short l_whence;
8056  off_t l_start;
8057  off_t l_len; /* len == 0 means until end of file */
8058  int l_sysid;
8059  pid_t l_pid;
8060  long l_pad[4]; /* reserve area */
8061 } flock_t;
8062 # 264 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8063 /* transitional large file interface version */
8064 
8065 
8066 
8067 typedef struct flock64 {
8068  short l_type;
8069  short l_whence;
8070  off64_t l_start;
8071  off64_t l_len; /* len == 0 means until end of file */
8072  int l_sysid;
8073  pid_t l_pid;
8074  long l_pad[4]; /* reserve area */
8075 } flock64_t;
8076 # 328 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8077 /*
8078  * File segment locking types.
8079  */
8080 
8081 
8082 
8083 
8084 
8085 /*
8086  * POSIX constants
8087  */
8088 
8089 /* Mask for file access modes */
8090 
8091 
8092 
8093 /*
8094  * DIRECTIO
8095  */
8096 
8097 
8098 
8099 
8100 /*
8101  * File share reservation type
8102  */
8103 typedef struct fshare {
8104  short f_access;
8105  short f_deny;
8106  int f_id;
8107 } fshare_t;
8108 
8109 /*
8110  * f_access values
8111  */
8112 
8113 
8114 
8115 
8116 
8117 
8118 /*
8119  * f_deny values
8120  */
8121 # 381 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8122 /*
8123  * Special flags for functions such as openat(), fstatat()....
8124  */
8125 
8126 
8127  /* || defined(_XPG7) */
8128 # 396 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8129 /* advice for posix_fadvise */
8130 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
8131 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8132 /* large file compilation environment setup */
8133 
8134 
8135 
8136 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8137 #pragma redefine_extname open open64
8138 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8139 
8140 
8141 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8142 #pragma redefine_extname creat creat64
8143 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8144 
8145 
8146 
8147 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8148 #pragma redefine_extname posix_fadvise posix_fadvise64
8149 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8150 
8151 
8152 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8153 #pragma redefine_extname posix_fallocate posix_fallocate64
8154 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8155 
8156 
8157 
8158 
8159 
8160 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8161 #pragma redefine_extname openat openat64
8162 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8163 
8164 
8165 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8166 #pragma redefine_extname attropen attropen64
8167 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8168 # 131 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8169 extern int fcntl(int, int, ...);
8170 extern int open(const char *, int, ...);
8171 extern int creat(const char *, mode_t);
8172 
8173 extern int posix_fadvise(int, off_t, off_t, int);
8174 extern int posix_fallocate(int, off_t, off_t);
8175 
8176 
8177 
8178 extern int openat(int, const char *, int, ...);
8179 extern int attropen(const char *, const char *, int, ...);
8180 
8181 
8182 extern int directio(int, int);
8183 
8184 
8185 /* transitional large file interface versions */
8186 
8187 
8188 extern int open64(const char *, int, ...);
8189 extern int creat64(const char *, mode_t);
8190 
8191 extern int posix_fadvise64(int, off64_t, off64_t, int);
8192 extern int posix_fallocate64(int, off64_t, off64_t);
8193 
8194 
8195 
8196 extern int openat64(int, const char *, int, ...);
8197 extern int attropen64(const char *, const char *, int, ...);
8198 # 42 "unpack_package_from_stream.c" 2
8199 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h" 1
8200 /*
8201  * CDDL HEADER START
8202  *
8203  * The contents of this file are subject to the terms of the
8204  * Common Development and Distribution License, Version 1.0 only
8205  * (the "License").  You may not use this file except in compliance
8206  * with the License.
8207  *
8208  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8209  * or http://www.opensolaris.org/os/licensing.
8210  * See the License for the specific language governing permissions
8211  * and limitations under the License.
8212  *
8213  * When distributing Covered Code, include this CDDL HEADER in each
8214  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8215  * If applicable, add the following below this CDDL HEADER, with the
8216  * fields enclosed by brackets "[]" replaced with your own identifying
8217  * information: Portions Copyright [yyyy] [name of copyright owner]
8218  *
8219  * CDDL HEADER END
8220  */
8221 /*	Copyright (c) 1988 AT&T	*/
8222 /*	  All Rights Reserved  	*/
8223 
8224 
8225 /*
8226  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
8227  * Use is subject to license terms.
8228  */
8229 
8230 
8231 
8232 
8233 
8234 #pragma ident "%Z%%M%	%I%	%E% SMI"
8235 
8236 /*
8237  * Error codes
8238  */
8239 
8240 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
8241 /*
8242  * CDDL HEADER START
8243  *
8244  * The contents of this file are subject to the terms of the
8245  * Common Development and Distribution License, Version 1.0 only
8246  * (the "License").  You may not use this file except in compliance
8247  * with the License.
8248  *
8249  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8250  * or http://www.opensolaris.org/os/licensing.
8251  * See the License for the specific language governing permissions
8252  * and limitations under the License.
8253  *
8254  * When distributing Covered Code, include this CDDL HEADER in each
8255  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8256  * If applicable, add the following below this CDDL HEADER, with the
8257  * fields enclosed by brackets "[]" replaced with your own identifying
8258  * information: Portions Copyright [yyyy] [name of copyright owner]
8259  *
8260  * CDDL HEADER END
8261  */
8262 /*
8263  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
8264  * Use is subject to license terms.
8265  */
8266 
8267 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
8268 /*	  All Rights Reserved  	*/
8269 
8270 /*
8271  * University Copyright- Copyright (c) 1982, 1986, 1988
8272  * The Regents of the University of California
8273  * All Rights Reserved
8274  *
8275  * University Acknowledgment- Portions of this document are derived from
8276  * software developed by the University of California, Berkeley, and its
8277  * contributors.
8278  */
8279 
8280 
8281 
8282 
8283 #pragma ident "%Z%%M%	%I%	%E% SMI"
8284 
8285 
8286 
8287 
8288 
8289 /*
8290  * Error codes
8291  */
8292 # 102 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8293 /* Filesystem Quotas */
8294 
8295 
8296 /* Convergent Error Returns */
8297 # 116 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8298 /* Interprocess Robust Locks */
8299 
8300 
8301 
8302 /* stream problems */
8303 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8304 /* Interprocess Robust Locks */
8305 # 148 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8306 /* shared library problems */
8307 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8308 /* BSD Networking Software */
8309  /* argument errors */
8310 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8311     /* protocol family */
8312 
8313 
8314  /* operational errors */
8315 
8316 
8317 
8318     /* of reset */
8319 
8320 
8321 
8322 
8323 
8324 /* XENIX has 135 - 142 */
8325 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8326 /* SUN Network File System */
8327 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h" 2
8328 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h"
8329 extern int *___errno();
8330 # 43 "unpack_package_from_stream.c" 2
8331 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ctype.h" 1
8332 /*
8333  * CDDL HEADER START
8334  *
8335  * The contents of this file are subject to the terms of the
8336  * Common Development and Distribution License, Version 1.0 only
8337  * (the "License").  You may not use this file except in compliance
8338  * with the License.
8339  *
8340  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8341  * or http://www.opensolaris.org/os/licensing.
8342  * See the License for the specific language governing permissions
8343  * and limitations under the License.
8344  *
8345  * When distributing Covered Code, include this CDDL HEADER in each
8346  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8347  * If applicable, add the following below this CDDL HEADER, with the
8348  * fields enclosed by brackets "[]" replaced with your own identifying
8349  * information: Portions Copyright [yyyy] [name of copyright owner]
8350  *
8351  * CDDL HEADER END
8352  */
8353 /*	Copyright (c) 1988 AT&T	*/
8354 /*	  All Rights Reserved  	*/
8355 
8356 
8357 /*
8358  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8359  *
8360  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8361  * Use is subject to license terms.
8362  */
8363 
8364 
8365 
8366 
8367 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/ctype_iso.h" 1
8368 /*
8369  * CDDL HEADER START
8370  *
8371  * The contents of this file are subject to the terms of the
8372  * Common Development and Distribution License, Version 1.0 only
8373  * (the "License").  You may not use this file except in compliance
8374  * with the License.
8375  *
8376  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8377  * or http://www.opensolaris.org/os/licensing.
8378  * See the License for the specific language governing permissions
8379  * and limitations under the License.
8380  *
8381  * When distributing Covered Code, include this CDDL HEADER in each
8382  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8383  * If applicable, add the following below this CDDL HEADER, with the
8384  * fields enclosed by brackets "[]" replaced with your own identifying
8385  * information: Portions Copyright [yyyy] [name of copyright owner]
8386  *
8387  * CDDL HEADER END
8388  */
8389 /*	Copyright (c) 1988 AT&T	*/
8390 /*	  All Rights Reserved  	*/
8391 
8392 /*
8393  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8394  *
8395  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8396  * Use is subject to license terms.
8397  */
8398 
8399 /*
8400  * An application should not include this header directly.  Instead it
8401  * should be included only through the inclusion of other Sun headers.
8402  *
8403  * The contents of this header is limited to identifiers specified in the
8404  * C Standard.  Any new identifiers specified in future amendments to the
8405  * C Standard must be placed in this header.  If these new identifiers
8406  * are required to also be in the C++ Standard "std" namespace, then for
8407  * anything other than macro definitions, corresponding "using" directives
8408  * must also be added to <ctype.h>.
8409  */
8410 
8411 
8412 
8413 
8414 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
8415 /*
8416  * CDDL HEADER START
8417  *
8418  * The contents of this file are subject to the terms of the
8419  * Common Development and Distribution License (the "License").
8420  * You may not use this file except in compliance with the License.
8421  *
8422  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8423  * or http://www.opensolaris.org/os/licensing.
8424  * See the License for the specific language governing permissions
8425  * and limitations under the License.
8426  *
8427  * When distributing Covered Code, include this CDDL HEADER in each
8428  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8429  * If applicable, add the following below this CDDL HEADER, with the
8430  * fields enclosed by brackets "[]" replaced with your own identifying
8431  * information: Portions Copyright [yyyy] [name of copyright owner]
8432  *
8433  * CDDL HEADER END
8434  */
8435 
8436 /*
8437  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8438  * Copyright 2016 Joyent, Inc.
8439  *
8440  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8441  * Use is subject to license terms.
8442  */
8443 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/ctype_iso.h" 2
8444 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/ctype_iso.h"
8445 extern unsigned char __ctype[];
8446 extern unsigned int *__ctype_mask;
8447 extern int *__trans_upper;
8448 extern int *__trans_lower;
8449 
8450 
8451 
8452 
8453 
8454 /*
8455  * These used to be macros, which while more efficient, precludes operation
8456  * with thread specific locales.  The old macros will still work, but new
8457  * code compiles to use functions.  This is specifically permitted by the
8458  * various standards.  Only _tolower and _toupper were required to be
8459  * delivered in macro form.
8460  */
8461 extern int isalnum(int);
8462 extern int isalpha(int);
8463 extern int iscntrl(int);
8464 extern int isdigit(int);
8465 extern int isgraph(int);
8466 extern int islower(int);
8467 extern int isprint(int);
8468 extern int ispunct(int);
8469 extern int isspace(int);
8470 extern int isupper(int);
8471 extern int isxdigit(int);
8472 
8473 extern int isblank(int);
8474 
8475 
8476 extern int tolower(int);
8477 extern int toupper(int);
8478 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ctype.h" 2
8479 
8480 /*
8481  * Allow global visibility for symbols defined in
8482  * C++ "std" namespace in <iso/ctype_iso.h>.
8483  */
8484 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ctype.h"
8485 extern int isascii(int);
8486 extern int toascii(int);
8487 extern int _tolower(int);
8488 extern int _toupper(int);
8489 # 98 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ctype.h"
8490 extern int isalnum_l(int, locale_t);
8491 extern int isalpha_l(int, locale_t);
8492 extern int isblank_l(int, locale_t);
8493 extern int iscntrl_l(int, locale_t);
8494 extern int isdigit_l(int, locale_t);
8495 extern int isgraph_l(int, locale_t);
8496 extern int islower_l(int, locale_t);
8497 extern int isprint_l(int, locale_t);
8498 extern int ispunct_l(int, locale_t);
8499 extern int isspace_l(int, locale_t);
8500 extern int isupper_l(int, locale_t);
8501 extern int isxdigit_l(int, locale_t);
8502 extern int tolower_l(int, locale_t);
8503 extern int toupper_l(int, locale_t);
8504 # 44 "unpack_package_from_stream.c" 2
8505 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 1
8506 /*
8507  * CDDL HEADER START
8508  *
8509  * The contents of this file are subject to the terms of the
8510  * Common Development and Distribution License (the "License").
8511  * You may not use this file except in compliance with the License.
8512  *
8513  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8514  * or http://www.opensolaris.org/os/licensing.
8515  * See the License for the specific language governing permissions
8516  * and limitations under the License.
8517  *
8518  * When distributing Covered Code, include this CDDL HEADER in each
8519  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8520  * If applicable, add the following below this CDDL HEADER, with the
8521  * fields enclosed by brackets "[]" replaced with your own identifying
8522  * information: Portions Copyright [yyyy] [name of copyright owner]
8523  *
8524  * CDDL HEADER END
8525  */
8526 
8527 /*
8528  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8529  *
8530  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
8531  * Use is subject to license terms.
8532  */
8533 
8534 /*	Copyright (c) 1988 AT&T	*/
8535 /*	  All Rights Reserved  	*/
8536 
8537 
8538 
8539 
8540 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
8541 /*
8542  * CDDL HEADER START
8543  *
8544  * The contents of this file are subject to the terms of the
8545  * Common Development and Distribution License (the "License").
8546  * You may not use this file except in compliance with the License.
8547  *
8548  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8549  * or http://www.opensolaris.org/os/licensing.
8550  * See the License for the specific language governing permissions
8551  * and limitations under the License.
8552  *
8553  * When distributing Covered Code, include this CDDL HEADER in each
8554  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8555  * If applicable, add the following below this CDDL HEADER, with the
8556  * fields enclosed by brackets "[]" replaced with your own identifying
8557  * information: Portions Copyright [yyyy] [name of copyright owner]
8558  *
8559  * CDDL HEADER END
8560  */
8561 
8562 /*
8563  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8564  * Copyright 2016 Joyent, Inc.
8565  *
8566  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8567  * Use is subject to license terms.
8568  */
8569 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 2
8570 
8571 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
8572 /*
8573  * CDDL HEADER START
8574  *
8575  * The contents of this file are subject to the terms of the
8576  * Common Development and Distribution License (the "License").
8577  * You may not use this file except in compliance with the License.
8578  *
8579  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8580  * or http://www.opensolaris.org/os/licensing.
8581  * See the License for the specific language governing permissions
8582  * and limitations under the License.
8583  *
8584  * When distributing Covered Code, include this CDDL HEADER in each
8585  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8586  * If applicable, add the following below this CDDL HEADER, with the
8587  * fields enclosed by brackets "[]" replaced with your own identifying
8588  * information: Portions Copyright [yyyy] [name of copyright owner]
8589  *
8590  * CDDL HEADER END
8591  */
8592 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8593 /*	  All Rights Reserved  	*/
8594 
8595 
8596 /*
8597  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
8598  * Use is subject to license terms.
8599  *
8600  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
8601  * Copyright 2016 Joyent, Inc.
8602  */
8603 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 2
8604 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h" 1
8605 /*
8606  * CDDL HEADER START
8607  *
8608  * The contents of this file are subject to the terms of the
8609  * Common Development and Distribution License (the "License").
8610  * You may not use this file except in compliance with the License.
8611  *
8612  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8613  * or http://www.opensolaris.org/os/licensing.
8614  * See the License for the specific language governing permissions
8615  * and limitations under the License.
8616  *
8617  * When distributing Covered Code, include this CDDL HEADER in each
8618  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8619  * If applicable, add the following below this CDDL HEADER, with the
8620  * fields enclosed by brackets "[]" replaced with your own identifying
8621  * information: Portions Copyright [yyyy] [name of copyright owner]
8622  *
8623  * CDDL HEADER END
8624  */
8625 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8626 /*	  All Rights Reserved  	*/
8627 
8628 
8629 /*
8630  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8631  *
8632  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
8633  * Use is subject to license terms.
8634  */
8635 
8636 
8637 
8638 
8639 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
8640 /*
8641  * CDDL HEADER START
8642  *
8643  * The contents of this file are subject to the terms of the
8644  * Common Development and Distribution License (the "License").
8645  * You may not use this file except in compliance with the License.
8646  *
8647  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8648  * or http://www.opensolaris.org/os/licensing.
8649  * See the License for the specific language governing permissions
8650  * and limitations under the License.
8651  *
8652  * When distributing Covered Code, include this CDDL HEADER in each
8653  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8654  * If applicable, add the following below this CDDL HEADER, with the
8655  * fields enclosed by brackets "[]" replaced with your own identifying
8656  * information: Portions Copyright [yyyy] [name of copyright owner]
8657  *
8658  * CDDL HEADER END
8659  */
8660 
8661 /*
8662  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8663  * Copyright 2016 Joyent, Inc.
8664  *
8665  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8666  * Use is subject to license terms.
8667  */
8668 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h" 2
8669 
8670 
8671 
8672 
8673 
8674 /*
8675  * File-system independent directory entry.
8676  */
8677 typedef struct dirent {
8678  ino_t d_ino; /* "inode number" of entry */
8679  off_t d_off; /* offset of disk directory entry */
8680  unsigned short d_reclen; /* length of this record */
8681  char d_name[1]; /* name of file */
8682 } dirent_t;
8683 # 66 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
8684 /*
8685  * transitional large file interface version AND kernel internal version
8686  */
8687 typedef struct dirent64 {
8688  ino64_t d_ino; /* "inode number" of entry */
8689  off64_t d_off; /* offset of disk directory entry */
8690  unsigned short d_reclen; /* length of this record */
8691  char d_name[1]; /* name of file */
8692 } dirent64_t;
8693 # 90 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
8694 /*
8695  * This is the maximum number of bytes that getdents(2) will store in
8696  * user-supplied dirent buffers.
8697  */
8698 
8699 
8700 
8701 
8702 /*
8703  * large file compilation environment setup
8704  *
8705  * In the LP64 compilation environment, map large file interfaces
8706  * back to native versions where possible. (This only works because
8707  * a 'struct dirent' == 'struct dirent64').
8708  */
8709 
8710 
8711 
8712 
8713 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
8714 #pragma redefine_extname getdents getdents64
8715 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
8716 # 124 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
8717 extern int getdents(int, struct dirent *, size_t);
8718 
8719 /* N.B.: transitional large file interface version deliberately not provided */
8720 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 2
8721 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8722 typedef struct {
8723  int dd_fd; /* file descriptor */
8724  int dd_loc; /* offset in block */
8725  int dd_size; /* amount of valid data */
8726  char *dd_buf; /* directory block */
8727 } DIR; /* stream data from opendir() */
8728 # 72 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8729 /* large file compilation environment setup */
8730 
8731 
8732 
8733 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8734 #pragma redefine_extname readdir readdir64
8735 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8736 
8737 
8738 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8739 #pragma redefine_extname scandir scandir64
8740 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8741 
8742 
8743 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8744 #pragma redefine_extname alphasort alphasort64
8745 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8746 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8747 /* In the LP64 compilation environment, all APIs are already large file */
8748 # 98 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8749 extern DIR *opendir(const char *);
8750 
8751 
8752 extern DIR *fdopendir(int);
8753 extern int dirfd(DIR *);
8754 
8755 
8756 extern int scandir(const char *, struct dirent *(*[]),
8757     int (*)(const struct dirent *),
8758     int (*)(const struct dirent **,
8759      const struct dirent **));
8760 extern int alphasort(const struct dirent **,
8761      const struct dirent **);
8762 
8763 extern struct dirent *readdir(DIR *);
8764 
8765 
8766 extern long telldir(DIR *);
8767 extern void seekdir(DIR *, long);
8768 
8769 extern void rewinddir(DIR *);
8770 extern int closedir(DIR *);
8771 
8772 /* transitional large file interface */
8773 
8774 
8775 extern struct dirent64 *readdir64(DIR *);
8776 
8777 extern int scandir64(const char *, struct dirent64 *(*[]),
8778    int (*)(const struct dirent64 *),
8779    int (*)(const struct dirent64 **,
8780     const struct dirent64 **));
8781 extern int alphasort64(const struct dirent64 **, const struct dirent64 **);
8782 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8783 /*
8784  * readdir_r() prototype is defined here.
8785  *
8786  * There are several variations, depending on whether compatibility with old
8787  * POSIX draft specifications or the final specification is desired and on
8788  * whether the large file compilation environment is active.  To combat a
8789  * combinatorial explosion, enabling large files implies using the final
8790  * specification (since the definition of the large file environment
8791  * considerably postdates that of the final readdir_r specification).
8792  *
8793  * In the LP64 compilation environment, all APIs are already large file,
8794  * and since there are no 64-bit applications that can have seen the
8795  * draft implementation, again, we use the final POSIX specification.
8796  */
8797 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8798 
8799 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8800 #pragma redefine_extname readdir_r readdir64_r
8801 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8802 
8803 
8804 
8805 
8806 
8807 extern int readdir_r(DIR *, struct dirent *,
8808  struct dirent **);
8809 
8810 
8811 
8812 
8813 
8814 /* transitional large file interface */
8815 extern int readdir64_r(DIR *, struct dirent64 *,
8816  struct dirent64 **);
8817 # 45 "unpack_package_from_stream.c" 2
8818 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 1
8819 /*
8820  * CDDL HEADER START
8821  *
8822  * The contents of this file are subject to the terms of the
8823  * Common Development and Distribution License (the "License").
8824  * You may not use this file except in compliance with the License.
8825  *
8826  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8827  * or http://www.opensolaris.org/os/licensing.
8828  * See the License for the specific language governing permissions
8829  * and limitations under the License.
8830  *
8831  * When distributing Covered Code, include this CDDL HEADER in each
8832  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8833  * If applicable, add the following below this CDDL HEADER, with the
8834  * fields enclosed by brackets "[]" replaced with your own identifying
8835  * information: Portions Copyright [yyyy] [name of copyright owner]
8836  *
8837  * CDDL HEADER END
8838  */
8839 
8840 /*
8841  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8842  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
8843  */
8844 
8845 /*	Copyright (c) 1988 AT&T	*/
8846 /*	  All Rights Reserved  	*/
8847 
8848 
8849 
8850 
8851 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 1
8852 /*
8853  * CDDL HEADER START
8854  *
8855  * The contents of this file are subject to the terms of the
8856  * Common Development and Distribution License, Version 1.0 only
8857  * (the "License").  You may not use this file except in compliance
8858  * with the License.
8859  *
8860  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8861  * or http://www.opensolaris.org/os/licensing.
8862  * See the License for the specific language governing permissions
8863  * and limitations under the License.
8864  *
8865  * When distributing Covered Code, include this CDDL HEADER in each
8866  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8867  * If applicable, add the following below this CDDL HEADER, with the
8868  * fields enclosed by brackets "[]" replaced with your own identifying
8869  * information: Portions Copyright [yyyy] [name of copyright owner]
8870  *
8871  * CDDL HEADER END
8872  */
8873 /*	Copyright (c) 1988 AT&T	*/
8874 /*	  All Rights Reserved  	*/
8875 
8876 
8877 /*
8878  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8879  * Copyright 2014 PALO, Richard.
8880  *
8881  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8882  * Use is subject to license terms.
8883  */
8884 
8885 /*
8886  * An application should not include this header directly.  Instead it
8887  * should be included only through the inclusion of other Sun headers.
8888  *
8889  * The contents of this header is limited to identifiers specified in the
8890  * C Standard.  Any new identifiers specified in future amendments to the
8891  * C Standard must be placed in this header.  If these new identifiers
8892  * are required to also be in the C++ Standard "std" namespace, then for
8893  * anything other than macro definitions, corresponding "using" directives
8894  * must also be added to <string.h>.
8895  */
8896 
8897 
8898 
8899 
8900 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
8901 /*
8902  * CDDL HEADER START
8903  *
8904  * The contents of this file are subject to the terms of the
8905  * Common Development and Distribution License (the "License").
8906  * You may not use this file except in compliance with the License.
8907  *
8908  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8909  * or http://www.opensolaris.org/os/licensing.
8910  * See the License for the specific language governing permissions
8911  * and limitations under the License.
8912  *
8913  * When distributing Covered Code, include this CDDL HEADER in each
8914  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8915  * If applicable, add the following below this CDDL HEADER, with the
8916  * fields enclosed by brackets "[]" replaced with your own identifying
8917  * information: Portions Copyright [yyyy] [name of copyright owner]
8918  *
8919  * CDDL HEADER END
8920  */
8921 
8922 /*
8923  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8924  * Copyright 2016 Joyent, Inc.
8925  *
8926  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8927  * Use is subject to license terms.
8928  */
8929 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
8930 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
8931 /*
8932  * This file and its contents are supplied under the terms of the
8933  * Common Development and Distribution License ("CDDL"), version 1.0.
8934  * You may only use this file in accordance with the terms of version
8935  * 1.0 of the CDDL.
8936  *
8937  * A full copy of the text of the CDDL should have accompanied this
8938  * source.  A copy of the CDDL is also available via the Internet at
8939  * http://www.illumos.org/license/CDDL.
8940  */
8941 
8942 /*
8943  * Copyright 2014-2016 PALO, Richard.
8944  */
8945 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
8946 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
8947 extern int memcmp(const void *, const void *, size_t);
8948 extern void *memcpy(void *, const void *, size_t);
8949 extern void *memmove(void *, const void *, size_t);
8950 extern void *memset(void *, int, size_t);
8951 extern char *strcat(char *, const char *);
8952 extern int strcmp(const char *, const char *);
8953 extern char *strcpy(char *, const char *);
8954 extern int strcoll(const char *, const char *);
8955 extern size_t strcspn(const char *, const char *);
8956 extern char *strerror(int);
8957 extern size_t strlen(const char *);
8958 extern char *strncat(char *, const char *, size_t);
8959 extern int strncmp(const char *, const char *, size_t);
8960 extern char *strncpy(char *, const char *, size_t);
8961 extern size_t strspn(const char *, const char *);
8962 extern char *strtok(char *, const char *);
8963 extern size_t strxfrm(char *, const char *, size_t);
8964 
8965 /*
8966  * The C++ Standard (ISO/IEC 14882:1998) specifies that each of the
8967  * function signatures for the following functions be replaced by
8968  * two declarations, both of which have the same behavior.
8969  */
8970 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
8971 extern void *memchr(const void *, int, size_t);
8972 extern char *strchr(const char *, int);
8973 extern char *strpbrk(const char *, const char *);
8974 extern char *strrchr(const char *, int);
8975 extern char *strstr(const char *, const char *);
8976 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 2
8977 
8978 /*
8979  * Allow global visibility for symbols defined in
8980  * C++ "std" namespace in <iso/string_iso.h>.
8981  */
8982 # 72 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h"
8983 extern int strerror_r(int, char *, size_t);
8984 
8985 
8986 
8987 
8988 
8989 extern char *strtok_r(char *, const char *,
8990  char **);
8991 
8992 
8993 
8994 
8995 extern void *memccpy(void *, const void *,
8996   int, size_t);
8997 
8998 
8999 
9000 
9001 extern char *stpcpy(char *, const char *);
9002 extern char *stpncpy(char *, const char *, size_t);
9003 extern char *strndup(const char *, size_t);
9004 extern size_t strnlen(const char *, size_t);
9005 extern char *strsignal(int);
9006 
9007 
9008 
9009 
9010 
9011 
9012 extern int strcoll_l(const char *, const char *, locale_t);
9013 extern size_t strxfrm_l(char *, const char *,
9014     size_t, locale_t);
9015 extern int strcasecmp_l(const char *, const char *, locale_t);
9016 extern int strncasecmp_l(const char *, const char *, size_t, locale_t);
9017 extern char *strerror_l(int, locale_t);
9018 
9019 
9020 
9021 
9022 
9023 /* Note that some of these are also declared in strings.h for XPG4_2+ */
9024 extern void explicit_bzero(void *, size_t);
9025 extern int uucopy(const void *, void *, size_t);
9026 extern int uucopystr(const void *, void *, size_t);
9027 extern int ffs(int);
9028 extern int ffsl(long);
9029 extern int ffsll(long long);
9030 extern int fls(int);
9031 extern int flsl(long);
9032 extern int flsll(long long);
9033 extern void *memmem(const void *, size_t, const void *, size_t);
9034 extern char *strcasestr(const char *, const char *);
9035 extern char *strnstr(const char *, const char *, size_t);
9036 extern size_t strlcpy(char *, const char *, size_t);
9037 extern size_t strlcat(char *, const char *, size_t);
9038 extern char *strsep(char **stringp, const char *delim);
9039 extern char *strchrnul(const char *, int);
9040 extern char *strcasestr_l(const char *, const char *, locale_t);
9041 extern int strcasecmp(const char *, const char *);
9042 extern int strncasecmp(const char *, const char *, size_t);
9043 
9044 
9045 
9046 
9047 
9048 extern char *strdup(const char *);
9049 
9050 
9051 
9052 
9053 
9054 
9055 /*
9056  * gcc provides this inlining facility but Studio C does not.
9057  * We should use it exclusively once Studio C also provides it.
9058  */
9059 extern void *__builtin_alloca(size_t);
9060 # 46 "unpack_package_from_stream.c" 2
9061 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 1
9062 /*
9063  * CDDL HEADER START
9064  *
9065  * The contents of this file are subject to the terms of the
9066  * Common Development and Distribution License, Version 1.0 only
9067  * (the "License").  You may not use this file except in compliance
9068  * with the License.
9069  *
9070  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9071  * or http://www.opensolaris.org/os/licensing.
9072  * See the License for the specific language governing permissions
9073  * and limitations under the License.
9074  *
9075  * When distributing Covered Code, include this CDDL HEADER in each
9076  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9077  * If applicable, add the following below this CDDL HEADER, with the
9078  * fields enclosed by brackets "[]" replaced with your own identifying
9079  * information: Portions Copyright [yyyy] [name of copyright owner]
9080  *
9081  * CDDL HEADER END
9082  */
9083 /*	Copyright (c) 1988 AT&T	*/
9084 /*	  All Rights Reserved  	*/
9085 
9086 /*
9087  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9088  *
9089  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
9090  * Use is subject to license terms.
9091  */
9092 
9093 
9094 
9095 
9096 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
9097 /*
9098  * CDDL HEADER START
9099  *
9100  * The contents of this file are subject to the terms of the
9101  * Common Development and Distribution License (the "License").
9102  * You may not use this file except in compliance with the License.
9103  *
9104  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9105  * or http://www.opensolaris.org/os/licensing.
9106  * See the License for the specific language governing permissions
9107  * and limitations under the License.
9108  *
9109  * When distributing Covered Code, include this CDDL HEADER in each
9110  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9111  * If applicable, add the following below this CDDL HEADER, with the
9112  * fields enclosed by brackets "[]" replaced with your own identifying
9113  * information: Portions Copyright [yyyy] [name of copyright owner]
9114  *
9115  * CDDL HEADER END
9116  */
9117 
9118 /*
9119  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
9120  * Copyright 2016 Joyent, Inc.
9121  *
9122  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
9123  * Use is subject to license terms.
9124  */
9125 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9126 
9127 
9128 
9129 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
9130 /*
9131  * CDDL HEADER START
9132  *
9133  * The contents of this file are subject to the terms of the
9134  * Common Development and Distribution License (the "License").
9135  * You may not use this file except in compliance with the License.
9136  *
9137  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9138  * or http://www.opensolaris.org/os/licensing.
9139  * See the License for the specific language governing permissions
9140  * and limitations under the License.
9141  *
9142  * When distributing Covered Code, include this CDDL HEADER in each
9143  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9144  * If applicable, add the following below this CDDL HEADER, with the
9145  * fields enclosed by brackets "[]" replaced with your own identifying
9146  * information: Portions Copyright [yyyy] [name of copyright owner]
9147  *
9148  * CDDL HEADER END
9149  */
9150 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9151 /*	  All Rights Reserved  	*/
9152 
9153 
9154 /*
9155  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
9156  * Use is subject to license terms.
9157  *
9158  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
9159  * Copyright 2016 Joyent, Inc.
9160  */
9161 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9162 
9163 
9164 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h" 1
9165 /*
9166  * CDDL HEADER START
9167  *
9168  * The contents of this file are subject to the terms of the
9169  * Common Development and Distribution License, Version 1.0 only
9170  * (the "License").  You may not use this file except in compliance
9171  * with the License.
9172  *
9173  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9174  * or http://www.opensolaris.org/os/licensing.
9175  * See the License for the specific language governing permissions
9176  * and limitations under the License.
9177  *
9178  * When distributing Covered Code, include this CDDL HEADER in each
9179  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9180  * If applicable, add the following below this CDDL HEADER, with the
9181  * fields enclosed by brackets "[]" replaced with your own identifying
9182  * information: Portions Copyright [yyyy] [name of copyright owner]
9183  *
9184  * CDDL HEADER END
9185  */
9186 /*	Copyright (c) 1988 AT&T	*/
9187 /*	  All Rights Reserved  	*/
9188 
9189 
9190 /*
9191  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9192  *
9193  * Copyright (c) 1998-1999, by Sun Microsystems, Inc.
9194  * All rights reserved.
9195  */
9196 
9197 /*
9198  * An application should not include this header directly.  Instead it
9199  * should be included only through the inclusion of other Sun headers.
9200  *
9201  * The contents of this header is limited to identifiers specified in the
9202  * C Standard.  Any new identifiers specified in future amendments to the
9203  * C Standard must be placed in this header.  If these new identifiers
9204  * are required to also be in the C++ Standard "std" namespace, then for
9205  * anything other than macro definitions, corresponding "using" directives
9206  * must also be added to <signal.h>.
9207  */
9208 
9209 
9210 
9211 
9212 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 1
9213 /*
9214  * CDDL HEADER START
9215  *
9216  * The contents of this file are subject to the terms of the
9217  * Common Development and Distribution License (the "License").
9218  * You may not use this file except in compliance with the License.
9219  *
9220  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9221  * or http://www.opensolaris.org/os/licensing.
9222  * See the License for the specific language governing permissions
9223  * and limitations under the License.
9224  *
9225  * When distributing Covered Code, include this CDDL HEADER in each
9226  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9227  * If applicable, add the following below this CDDL HEADER, with the
9228  * fields enclosed by brackets "[]" replaced with your own identifying
9229  * information: Portions Copyright [yyyy] [name of copyright owner]
9230  *
9231  * CDDL HEADER END
9232  */
9233 
9234 /*
9235  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
9236  * Use is subject to license terms.
9237  */
9238 
9239 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9240 /*	  All Rights Reserved  	*/
9241 
9242 /*
9243  * An application should not include this header directly.  Instead it
9244  * should be included only through the inclusion of other Sun headers.
9245  *
9246  * The contents of this header is limited to identifiers specified in the
9247  * C Standard.  Any new identifiers specified in future amendments to the
9248  * C Standard must be placed in this header.  If these new identifiers
9249  * are required to also be in the C++ Standard "std" namespace, then for
9250  * anything other than macro definitions, corresponding "using" directives
9251  * must also be added to <sys/signal.h.h>.
9252  */
9253 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h" 2
9254 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h"
9255 typedef int sig_atomic_t;
9256 
9257 
9258 
9259 
9260 extern void (*signal(int, void (*)(int)))(int);
9261 
9262 extern int raise(int);
9263 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9264 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 1
9265 /*
9266  * CDDL HEADER START
9267  *
9268  * The contents of this file are subject to the terms of the
9269  * Common Development and Distribution License (the "License").
9270  * You may not use this file except in compliance with the License.
9271  *
9272  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9273  * or http://www.opensolaris.org/os/licensing.
9274  * See the License for the specific language governing permissions
9275  * and limitations under the License.
9276  *
9277  * When distributing Covered Code, include this CDDL HEADER in each
9278  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9279  * If applicable, add the following below this CDDL HEADER, with the
9280  * fields enclosed by brackets "[]" replaced with your own identifying
9281  * information: Portions Copyright [yyyy] [name of copyright owner]
9282  *
9283  * CDDL HEADER END
9284  */
9285 
9286 /*
9287  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
9288  * Use is subject to license terms.
9289  */
9290 
9291 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9292 /*	  All Rights Reserved  	*/
9293 
9294 /*
9295  * University Copyright- Copyright (c) 1982, 1986, 1988
9296  * The Regents of the University of California
9297  * All Rights Reserved
9298  *
9299  * University Acknowledgment- Portions of this document are derived from
9300  * software developed by the University of California, Berkeley, and its
9301  * contributors.
9302  */
9303 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9304 
9305 /*
9306  * Allow global visibility for symbols defined in
9307  * C++ "std" namespace in <iso/signal_iso.h>.
9308  */
9309 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
9310 extern const char **_sys_siglistp; /* signal descriptions */
9311 extern const int _sys_siglistn; /* # of signal descriptions */
9312 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
9313 extern int kill(pid_t, int);
9314 extern int sigaction(int, const struct sigaction *,
9315  struct sigaction *);
9316 
9317 extern int sigaddset(sigset_t *, int);
9318 extern int sigdelset(sigset_t *, int);
9319 extern int sigemptyset(sigset_t *);
9320 extern int sigfillset(sigset_t *);
9321 extern int sigismember(const sigset_t *, int);
9322 
9323 extern int sigpending(sigset_t *);
9324 extern int sigprocmask(int, const sigset_t *,
9325  sigset_t *);
9326 extern int sigsuspend(const sigset_t *);
9327 
9328 
9329 
9330 
9331 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
9332 /*
9333  * CDDL HEADER START
9334  *
9335  * The contents of this file are subject to the terms of the
9336  * Common Development and Distribution License, Version 1.0 only
9337  * (the "License").  You may not use this file except in compliance
9338  * with the License.
9339  *
9340  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9341  * or http://www.opensolaris.org/os/licensing.
9342  * See the License for the specific language governing permissions
9343  * and limitations under the License.
9344  *
9345  * When distributing Covered Code, include this CDDL HEADER in each
9346  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9347  * If applicable, add the following below this CDDL HEADER, with the
9348  * fields enclosed by brackets "[]" replaced with your own identifying
9349  * information: Portions Copyright [yyyy] [name of copyright owner]
9350  *
9351  * CDDL HEADER END
9352  */
9353 /*
9354  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
9355  * Use is subject to license terms.
9356  */
9357 
9358 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9359 /*	  All Rights Reserved  	*/
9360 # 89 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9361 extern int gsignal(int);
9362 extern int (*ssignal(int, int (*)(int)))(int);
9363 extern int sigsend(idtype_t, id_t, int);
9364 extern int sigsendset(const procset_t *, int);
9365 extern int sig2str(int, char *);
9366 extern int str2sig(const char *, int *);
9367 
9368 
9369 
9370 
9371 
9372 extern void (*bsd_signal(int, void (*)(int)))(int);
9373 extern int killpg(pid_t, int);
9374 extern int siginterrupt(int, int);
9375 extern int sigaltstack(const stack_t *, stack_t *);
9376 extern int sighold(int);
9377 extern int sigignore(int);
9378 extern int sigpause(int);
9379 extern int sigrelse(int);
9380 extern void (*sigset(int, void (*)(int)))(int);
9381 
9382 
9383 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
9384 
9385 
9386 
9387 extern int sigstack(struct sigstack *, struct sigstack *);
9388 
9389 
9390 
9391 
9392 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
9393 /*
9394  * CDDL HEADER START
9395  *
9396  * The contents of this file are subject to the terms of the
9397  * Common Development and Distribution License, Version 1.0 only
9398  * (the "License").  You may not use this file except in compliance
9399  * with the License.
9400  *
9401  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9402  * or http://www.opensolaris.org/os/licensing.
9403  * See the License for the specific language governing permissions
9404  * and limitations under the License.
9405  *
9406  * When distributing Covered Code, include this CDDL HEADER in each
9407  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9408  * If applicable, add the following below this CDDL HEADER, with the
9409  * fields enclosed by brackets "[]" replaced with your own identifying
9410  * information: Portions Copyright [yyyy] [name of copyright owner]
9411  *
9412  * CDDL HEADER END
9413  */
9414 /*
9415  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
9416  * Use is subject to license terms.
9417  */
9418 
9419 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9420 /*	  All Rights Reserved  	*/
9421 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9422 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
9423 /*
9424  * CDDL HEADER START
9425  *
9426  * The contents of this file are subject to the terms of the
9427  * Common Development and Distribution License (the "License").
9428  * You may not use this file except in compliance with the License.
9429  *
9430  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9431  * or http://www.opensolaris.org/os/licensing.
9432  * See the License for the specific language governing permissions
9433  * and limitations under the License.
9434  *
9435  * When distributing Covered Code, include this CDDL HEADER in each
9436  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9437  * If applicable, add the following below this CDDL HEADER, with the
9438  * fields enclosed by brackets "[]" replaced with your own identifying
9439  * information: Portions Copyright [yyyy] [name of copyright owner]
9440  *
9441  * CDDL HEADER END
9442  */
9443 /*	Copyright (c) 1988 AT&T	*/
9444 /*	  All Rights Reserved  	*/
9445 
9446 
9447 /*
9448  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9449  *
9450  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
9451  * Use is subject to license terms.
9452  */
9453 /*
9454  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
9455  * Copyright 2016 Joyent, Inc.
9456  */
9457 # 122 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9458 extern int pthread_kill(pthread_t, int);
9459 extern int pthread_sigmask(int, const sigset_t *,
9460  sigset_t *);
9461 extern int sigwaitinfo(const sigset_t *,
9462  siginfo_t *);
9463 extern int sigtimedwait(const sigset_t *,
9464  siginfo_t *, const struct timespec *);
9465 extern int sigqueue(pid_t, int, const union sigval);
9466 
9467 
9468 /*
9469  * sigwait() prototype is defined here.
9470  */
9471 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
9472 extern int sigwait(sigset_t *);
9473 # 47 "unpack_package_from_stream.c" 2
9474 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 1
9475 /*
9476  * CDDL HEADER START
9477  *
9478  * The contents of this file are subject to the terms of the
9479  * Common Development and Distribution License, Version 1.0 only
9480  * (the "License").  You may not use this file except in compliance
9481  * with the License.
9482  *
9483  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9484  * or http://www.opensolaris.org/os/licensing.
9485  * See the License for the specific language governing permissions
9486  * and limitations under the License.
9487  *
9488  * When distributing Covered Code, include this CDDL HEADER in each
9489  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9490  * If applicable, add the following below this CDDL HEADER, with the
9491  * fields enclosed by brackets "[]" replaced with your own identifying
9492  * information: Portions Copyright [yyyy] [name of copyright owner]
9493  *
9494  * CDDL HEADER END
9495  */
9496 /*
9497  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
9498  * Use is subject to license terms.
9499  */
9500 
9501 /*
9502  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9503  *
9504  * Portions of this file developed by Garrett D'Amore are licensed
9505  * under the terms of the Common Development and Distribution License (CDDL)
9506  * version 1.0 only.  The use of subsequent versions of the License are
9507  * is specifically prohibited unless those terms are not in conflict with
9508  * version 1.0 of the License.  You can find this license on-line at
9509  * http://www.illumos.org/license/CDDL
9510  */
9511 
9512 
9513 
9514 
9515 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 1
9516 /*
9517  * CDDL HEADER START
9518  *
9519  * The contents of this file are subject to the terms of the
9520  * Common Development and Distribution License, Version 1.0 only
9521  * (the "License").  You may not use this file except in compliance
9522  * with the License.
9523  *
9524  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9525  * or http://www.opensolaris.org/os/licensing.
9526  * See the License for the specific language governing permissions
9527  * and limitations under the License.
9528  *
9529  * When distributing Covered Code, include this CDDL HEADER in each
9530  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9531  * If applicable, add the following below this CDDL HEADER, with the
9532  * fields enclosed by brackets "[]" replaced with your own identifying
9533  * information: Portions Copyright [yyyy] [name of copyright owner]
9534  *
9535  * CDDL HEADER END
9536  */
9537 /*
9538  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9539  * Copyright 2014 PALO, Richard.
9540  *
9541  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
9542  * Use is subject to license terms.
9543  */
9544 
9545 /*	Copyright (c) 1988 AT&T	*/
9546 /*	  All Rights Reserved  	*/
9547 
9548 
9549 /*
9550  * An application should not include this header directly.  Instead it
9551  * should be included only through the inclusion of other Sun headers.
9552  *
9553  * The contents of this header is limited to identifiers specified in the
9554  * C Standard.  Any new identifiers specified in future amendments to the
9555  * C Standard must be placed in this header.  If these new identifiers
9556  * are required to also be in the C++ Standard "std" namespace, then for
9557  * anything other than macro definitions, corresponding "using" directives
9558  * must also be added to <locale.h>.
9559  */
9560 
9561 
9562 
9563 
9564 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.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 
9586 /*
9587  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
9588  * Copyright 2016 Joyent, Inc.
9589  *
9590  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
9591  * Use is subject to license terms.
9592  */
9593 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
9594 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
9595 /*
9596  * This file and its contents are supplied under the terms of the
9597  * Common Development and Distribution License ("CDDL"), version 1.0.
9598  * You may only use this file in accordance with the terms of version
9599  * 1.0 of the CDDL.
9600  *
9601  * A full copy of the text of the CDDL should have accompanied this
9602  * source.  A copy of the CDDL is also available via the Internet at
9603  * http://www.illumos.org/license/CDDL.
9604  */
9605 
9606 /*
9607  * Copyright 2014-2016 PALO, Richard.
9608  */
9609 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
9610 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
9611 struct lconv {
9612  char *decimal_point;
9613  char *thousands_sep;
9614  char *grouping;
9615  char *int_curr_symbol;
9616  char *currency_symbol;
9617  char *mon_decimal_point;
9618  char *mon_thousands_sep;
9619  char *mon_grouping;
9620  char *positive_sign;
9621  char *negative_sign;
9622  char int_frac_digits;
9623  char frac_digits;
9624  char p_cs_precedes;
9625  char p_sep_by_space;
9626  char n_cs_precedes;
9627  char n_sep_by_space;
9628  char p_sign_posn;
9629  char n_sign_posn;
9630 
9631 /*
9632  * New in IEEE Std 1003.1-2001 for alignment with the ISO/IEC 9899:1999
9633  * standard.  Namespace and binary compatibility dictate that visibility
9634  * of these new members be limited.  Visibility is limited to a strictly
9635  * conforming ANSI C environment (-Xc) or if _LCONV_C99 is defined.
9636  */
9637 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
9638 };
9639 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
9640 extern char *setlocale(int, const char *);
9641 extern struct lconv *localeconv(void);
9642 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
9643 
9644 
9645 
9646 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
9647 /*
9648  * CDDL HEADER START
9649  *
9650  * The contents of this file are subject to the terms of the
9651  * Common Development and Distribution License (the "License").
9652  * You may not use this file except in compliance with the License.
9653  *
9654  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9655  * or http://www.opensolaris.org/os/licensing.
9656  * See the License for the specific language governing permissions
9657  * and limitations under the License.
9658  *
9659  * When distributing Covered Code, include this CDDL HEADER in each
9660  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9661  * If applicable, add the following below this CDDL HEADER, with the
9662  * fields enclosed by brackets "[]" replaced with your own identifying
9663  * information: Portions Copyright [yyyy] [name of copyright owner]
9664  *
9665  * CDDL HEADER END
9666  */
9667 /*
9668  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9669  *
9670  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9671  * Use is subject to license terms.
9672  */
9673 
9674 
9675 
9676 
9677 
9678 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
9679 /*
9680  * CDDL HEADER START
9681  *
9682  * The contents of this file are subject to the terms of the
9683  * Common Development and Distribution License (the "License").
9684  * You may not use this file except in compliance with the License.
9685  *
9686  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9687  * or http://www.opensolaris.org/os/licensing.
9688  * See the License for the specific language governing permissions
9689  * and limitations under the License.
9690  *
9691  *
9692  * When distributing Covered Code, include this CDDL HEADER in each
9693  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9694  * If applicable, add the following below this CDDL HEADER, with the
9695  * fields enclosed by brackets "[]" replaced with your own identifying
9696  * information: Portions Copyright [yyyy] [name of copyright owner]
9697  *
9698  * CDDL HEADER END
9699  */
9700 
9701 /*
9702  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9703  * Use is subject to license terms.
9704  * Copyright 2016 Joyent, Inc.
9705  */
9706 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 2
9707 
9708 
9709 
9710 
9711 
9712 /*
9713  * wchar_t is a built-in type in standard C++ and as such is not
9714  * defined here when using standard C++. However, the GNU compiler
9715  * fixincludes utility nonetheless creates its own version of this
9716  * header for use by gcc and g++. In that version it adds a redundant
9717  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
9718  * header we need to include the following magic comment:
9719  *
9720  * we must use the C++ compiler's type
9721  *
9722  * The above comment should not be removed or changed until GNU
9723  * gcc/fixinc/inclhack.def is updated to bypass this header.
9724  */
9725 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h"
9726 extern char *dcgettext(const char *, const char *, const int);
9727 extern char *dgettext(const char *, const char *);
9728 extern char *gettext(const char *);
9729 extern char *textdomain(const char *);
9730 extern char *bindtextdomain(const char *, const char *);
9731 
9732 /*
9733  * LI18NUX 2000 Globalization Specification Version 1.0
9734  * with Amendment 2
9735  */
9736 extern char *dcngettext(const char *, const char *,
9737  const char *, unsigned long int, int);
9738 extern char *dngettext(const char *, const char *,
9739  const char *, unsigned long int);
9740 extern char *ngettext(const char *, const char *, unsigned long int);
9741 extern char *bind_textdomain_codeset(const char *, const char *);
9742 
9743 /* Word handling functions --- requires dynamic linking */
9744 /* Warning: these are experimental and subject to change. */
9745 extern int wdinit(void);
9746 extern int wdchkind(wchar_t);
9747 extern int wdbindf(wchar_t, wchar_t, int);
9748 extern wchar_t *wddelim(wchar_t, wchar_t, int);
9749 extern wchar_t mcfiller(void);
9750 extern int mcwrap(void);
9751 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
9752 
9753 
9754 /*
9755  * Allow global visibility for symbols defined in
9756  * C++ "std" namespace in <iso/locale_iso.h>.
9757  */
9758 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
9759 /*
9760  * These were added in POSIX 2008 as part of the newlocale() specification.
9761  */
9762 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
9763 extern locale_t duplocale(locale_t);
9764 extern void freelocale(locale_t);
9765 extern locale_t newlocale(int, const char *, locale_t);
9766 extern locale_t uselocale(locale_t);
9767 
9768 
9769 extern locale_t __global_locale(void);
9770 # 48 "unpack_package_from_stream.c" 2
9771 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
9772 /*
9773  * CDDL HEADER START
9774  *
9775  * The contents of this file are subject to the terms of the
9776  * Common Development and Distribution License (the "License").
9777  * You may not use this file except in compliance 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 /*
9793  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9794  *
9795  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9796  * Use is subject to license terms.
9797  */
9798 # 49 "unpack_package_from_stream.c" 2
9799 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
9800 /*
9801  * CDDL HEADER START
9802  *
9803  * The contents of this file are subject to the terms of the
9804  * Common Development and Distribution License (the "License").
9805  * You may not use this file except in compliance with the License.
9806  *
9807  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9808  * or http://www.opensolaris.org/os/licensing.
9809  * See the License for the specific language governing permissions
9810  * and limitations under the License.
9811  *
9812  * When distributing Covered Code, include this CDDL HEADER in each
9813  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9814  * If applicable, add the following below this CDDL HEADER, with the
9815  * fields enclosed by brackets "[]" replaced with your own identifying
9816  * information: Portions Copyright [yyyy] [name of copyright owner]
9817  *
9818  * CDDL HEADER END
9819  */
9820 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9821 /*	  All Rights Reserved  	*/
9822 
9823 /*
9824  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
9825  * Use is subject to license terms.
9826  */
9827 
9828 
9829 
9830 
9831 #pragma ident "%Z%%M%	%I%	%E% SMI"
9832 
9833 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
9834 /*
9835  * CDDL HEADER START
9836  *
9837  * The contents of this file are subject to the terms of the
9838  * Common Development and Distribution License (the "License").
9839  * You may not use this file except in compliance with the License.
9840  *
9841  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9842  * or http://www.opensolaris.org/os/licensing.
9843  * See the License for the specific language governing permissions
9844  * and limitations under the License.
9845  *
9846  * When distributing Covered Code, include this CDDL HEADER in each
9847  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9848  * If applicable, add the following below this CDDL HEADER, with the
9849  * fields enclosed by brackets "[]" replaced with your own identifying
9850  * information: Portions Copyright [yyyy] [name of copyright owner]
9851  *
9852  * CDDL HEADER END
9853  */
9854 /*	Copyright (c) 1988 AT&T	*/
9855 /*	  All Rights Reserved  	*/
9856 
9857 
9858 /*
9859  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9860  *
9861  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
9862  * Use is subject to license terms.
9863  */
9864 /*
9865  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
9866  * Copyright 2016 Joyent, Inc.
9867  */
9868 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 2
9869 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h"
9870 extern char *errstr;
9871 
9872 struct ainfo {
9873  char *local;
9874  mode_t mode;
9875  char owner[64 +1];
9876  char group[64 +1];
9877  major_t major;
9878  minor_t minor;
9879 };
9880 
9881 struct cinfo {
9882  long cksum;
9883  fsblkcnt_t size;
9884  time_t modtime;
9885 };
9886 
9887 struct pinfo {
9888  char status;
9889  char pkg[64 +1];
9890  char editflag;
9891  char aclass[64 +1];
9892  struct pinfo
9893   *next;
9894 };
9895 
9896 struct cfent {
9897  short volno;
9898  char ftype;
9899  char pkg_class[64 +1];
9900  int pkg_class_idx;
9901  char *path;
9902  struct ainfo ainfo;
9903  struct cinfo cinfo;
9904  short npkgs;
9905  struct pinfo
9906   *pinfo;
9907 };
9908 
9909 /* averify() & cverify() error codes */
9910 # 50 "unpack_package_from_stream.c" 2
9911 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
9912 /*
9913  * CDDL HEADER START
9914  *
9915  * The contents of this file are subject to the terms of the
9916  * Common Development and Distribution License, Version 1.0 only
9917  * (the "License").  You may not use this file except in compliance
9918  * with the License.
9919  *
9920  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9921  * or http://www.opensolaris.org/os/licensing.
9922  * See the License for the specific language governing permissions
9923  * and limitations under the License.
9924  *
9925  * When distributing Covered Code, include this CDDL HEADER in each
9926  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9927  * If applicable, add the following below this CDDL HEADER, with the
9928  * fields enclosed by brackets "[]" replaced with your own identifying
9929  * information: Portions Copyright [yyyy] [name of copyright owner]
9930  *
9931  * CDDL HEADER END
9932  */
9933 /*
9934  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9935  */
9936 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9937 /*	  All Rights Reserved  	*/
9938 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h"
9939 struct pkginfo {
9940  char *pkginst;
9941  char *name;
9942  char *arch;
9943  char *version;
9944  char *vendor;
9945  char *basedir;
9946  char *catg;
9947  char status;
9948 };
9949 
9950 extern char *pkgdir;
9951 
9952 extern char *pkgparam(char *, char *);
9953 extern int pkginfo(struct pkginfo *, char *, ...),
9954   pkgnmchk(char *, char *, int);
9955 # 51 "unpack_package_from_stream.c" 2
9956 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 1
9957 /*
9958  * CDDL HEADER START
9959  *
9960  * The contents of this file are subject to the terms of the
9961  * Common Development and Distribution License, Version 1.0 only
9962  * (the "License").  You may not use this file except in compliance
9963  * with the License.
9964  *
9965  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9966  * or http://www.opensolaris.org/os/licensing.
9967  * See the License for the specific language governing permissions
9968  * and limitations under the License.
9969  *
9970  * When distributing Covered Code, include this CDDL HEADER in each
9971  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9972  * If applicable, add the following below this CDDL HEADER, with the
9973  * fields enclosed by brackets "[]" replaced with your own identifying
9974  * information: Portions Copyright [yyyy] [name of copyright owner]
9975  *
9976  * CDDL HEADER END
9977  */
9978 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9979 /*	  All Rights Reserved  	*/
9980 
9981 
9982 
9983 
9984 
9985 #pragma ident "%Z%%M%	%I%	%E% SMI"
9986 
9987 
9988 
9989 
9990 
9991 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
9992 /*
9993  * CDDL HEADER START
9994  *
9995  * The contents of this file are subject to the terms of the
9996  * Common Development and Distribution License (the "License").
9997  * You may not use this file except in compliance with the License.
9998  *
9999  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10000  * or http://www.opensolaris.org/os/licensing.
10001  * See the License for the specific language governing permissions
10002  * and limitations under the License.
10003  *
10004  * When distributing Covered Code, include this CDDL HEADER in each
10005  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10006  * If applicable, add the following below this CDDL HEADER, with the
10007  * fields enclosed by brackets "[]" replaced with your own identifying
10008  * information: Portions Copyright [yyyy] [name of copyright owner]
10009  *
10010  * CDDL HEADER END
10011  */
10012 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10013 /*	  All Rights Reserved  	*/
10014 
10015 
10016 /*
10017  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
10018  * Use is subject to license terms.
10019  *
10020  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
10021  * Copyright 2016 Joyent, Inc.
10022  */
10023 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 2
10024 
10025 struct pkgdev {
10026  int rdonly;
10027  int mntflg;
10028  longlong_t capacity; /* number of 512-blocks on device */
10029  char *name;
10030  char *dirname;
10031  char *pathname;
10032  char *mount;
10033  char *fstyp;
10034  char *cdevice;
10035  char *bdevice;
10036  char *norewind;
10037 };
10038 # 52 "unpack_package_from_stream.c" 2
10039 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkglocs.h" 1
10040 /*
10041  * CDDL HEADER START
10042  *
10043  * The contents of this file are subject to the terms of the
10044  * Common Development and Distribution License, Version 1.0 only
10045  * (the "License").  You may not use this file except in compliance
10046  * with the License.
10047  *
10048  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10049  * or http://www.opensolaris.org/os/licensing.
10050  * See the License for the specific language governing permissions
10051  * and limitations under the License.
10052  *
10053  * When distributing Covered Code, include this CDDL HEADER in each
10054  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10055  * If applicable, add the following below this CDDL HEADER, with the
10056  * fields enclosed by brackets "[]" replaced with your own identifying
10057  * information: Portions Copyright [yyyy] [name of copyright owner]
10058  *
10059  * CDDL HEADER END
10060  */
10061 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10062 /*	  All Rights Reserved  	*/
10063 # 53 "unpack_package_from_stream.c" 2
10064 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pwd.h" 1
10065 /*
10066  * CDDL HEADER START
10067  *
10068  * The contents of this file are subject to the terms of the
10069  * Common Development and Distribution License, Version 1.0 only
10070  * (the "License").  You may not use this file except in compliance
10071  * with the License.
10072  *
10073  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10074  * or http://www.opensolaris.org/os/licensing.
10075  * See the License for the specific language governing permissions
10076  * and limitations under the License.
10077  *
10078  * When distributing Covered Code, include this CDDL HEADER in each
10079  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10080  * If applicable, add the following below this CDDL HEADER, with the
10081  * fields enclosed by brackets "[]" replaced with your own identifying
10082  * information: Portions Copyright [yyyy] [name of copyright owner]
10083  *
10084  * CDDL HEADER END
10085  */
10086 /*	Copyright (c) 1988 AT&T	*/
10087 /*	  All Rights Reserved  	*/
10088 
10089 
10090 /*
10091  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10092  *
10093  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
10094  * Use is subject to license terms.
10095  */
10096 
10097 
10098 
10099 
10100 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
10101 /*
10102  * CDDL HEADER START
10103  *
10104  * The contents of this file are subject to the terms of the
10105  * Common Development and Distribution License (the "License").
10106  * You may not use this file except in compliance with the License.
10107  *
10108  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10109  * or http://www.opensolaris.org/os/licensing.
10110  * See the License for the specific language governing permissions
10111  * and limitations under the License.
10112  *
10113  * When distributing Covered Code, include this CDDL HEADER in each
10114  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10115  * If applicable, add the following below this CDDL HEADER, with the
10116  * fields enclosed by brackets "[]" replaced with your own identifying
10117  * information: Portions Copyright [yyyy] [name of copyright owner]
10118  *
10119  * CDDL HEADER END
10120  */
10121 
10122 /*
10123  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
10124  * Copyright 2016 Joyent, Inc.
10125  *
10126  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
10127  * Use is subject to license terms.
10128  */
10129 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pwd.h" 2
10130 
10131 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
10132 /*
10133  * CDDL HEADER START
10134  *
10135  * The contents of this file are subject to the terms of the
10136  * Common Development and Distribution License (the "License").
10137  * You may not use this file except in compliance with the License.
10138  *
10139  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10140  * or http://www.opensolaris.org/os/licensing.
10141  * See the License for the specific language governing permissions
10142  * and limitations under the License.
10143  *
10144  * When distributing Covered Code, include this CDDL HEADER in each
10145  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10146  * If applicable, add the following below this CDDL HEADER, with the
10147  * fields enclosed by brackets "[]" replaced with your own identifying
10148  * information: Portions Copyright [yyyy] [name of copyright owner]
10149  *
10150  * CDDL HEADER END
10151  */
10152 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10153 /*	  All Rights Reserved  	*/
10154 
10155 
10156 /*
10157  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
10158  * Use is subject to license terms.
10159  *
10160  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
10161  * Copyright 2016 Joyent, Inc.
10162  */
10163 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pwd.h" 2
10164 
10165 
10166 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
10167 /*
10168  * CDDL HEADER START
10169  *
10170  * The contents of this file are subject to the terms of the
10171  * Common Development and Distribution License (the "License").
10172  * You may not use this file except in compliance with the License.
10173  *
10174  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10175  * or http://www.opensolaris.org/os/licensing.
10176  * See the License for the specific language governing permissions
10177  * and limitations under the License.
10178  *
10179  * When distributing Covered Code, include this CDDL HEADER in each
10180  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10181  * If applicable, add the following below this CDDL HEADER, with the
10182  * fields enclosed by brackets "[]" replaced with your own identifying
10183  * information: Portions Copyright [yyyy] [name of copyright owner]
10184  *
10185  * CDDL HEADER END
10186  */
10187 
10188 /*
10189  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10190  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
10191  */
10192 
10193 /*	Copyright (c) 1988 AT&T	*/
10194 /*	  All Rights Reserved  	*/
10195 
10196 /*
10197  * User-visible pieces of the ANSI C standard I/O package.
10198  */
10199 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pwd.h" 2
10200 
10201 
10202 
10203 
10204 
10205 
10206 struct passwd {
10207  char *pw_name;
10208  char *pw_passwd;
10209  uid_t pw_uid;
10210  gid_t pw_gid;
10211  char *pw_age;
10212  char *pw_comment;
10213  char *pw_gecos;
10214  char *pw_dir;
10215  char *pw_shell;
10216 };
10217 
10218 
10219 struct comment {
10220  char *c_dept;
10221  char *c_name;
10222  char *c_acct;
10223  char *c_bin;
10224 };
10225 
10226 
10227 extern struct passwd *getpwuid(uid_t); /* MT-unsafe */
10228 extern struct passwd *getpwnam(const char *); /* MT-unsafe */
10229 
10230 
10231 extern struct passwd *getpwent_r(struct passwd *, char *, int);
10232 extern struct passwd *fgetpwent_r(FILE *, struct passwd *, char *, int);
10233 extern struct passwd *fgetpwent(FILE *); /* MT-unsafe */
10234 extern int putpwent(const struct passwd *, FILE *);
10235 
10236 
10237 
10238 
10239 extern void endpwent(void);
10240 extern struct passwd *getpwent(void); /* MT-unsafe */
10241 extern void setpwent(void);
10242 
10243 
10244 /*
10245  * getpwuid_r() & getpwnam_r() prototypes are defined here.
10246  */
10247 
10248 /*
10249  * Previous releases of Solaris, starting at 2.3, provided definitions of
10250  * various functions as specified in POSIX.1c, Draft 6.  For some of these
10251  * functions, the final POSIX 1003.1c standard had a different number of
10252  * arguments and return values.
10253  *
10254  * The following segment of this header provides support for the standard
10255  * interfaces while supporting applications written under earlier
10256  * releases.  The application defines appropriate values of the feature
10257  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
10258  * whether it was written to expect the Draft 6 or standard versions of
10259  * these interfaces, before including this header.  This header then
10260  * provides a mapping from the source version of the interface to an
10261  * appropriate binary interface.  Such mappings permit an application
10262  * to be built from libraries and objects which have mixed expectations
10263  * of the definitions of these functions.
10264  *
10265  * For applications using the Draft 6 definitions, the binary symbol is the
10266  * same as the source symbol, and no explicit mapping is needed.  For the
10267  * standard interface, the function func() is mapped to the binary symbol
10268  * _posix_func().  The preferred mechanism for the remapping is a compiler
10269  * #pragma.  If the compiler does not provide such a #pragma, the header file
10270  * defines a static function func() which calls the _posix_func() version;
10271  * this has to be done instead of #define since POSIX specifies that an
10272  * application can #undef the symbol and still be bound to the correct
10273  * implementation.  Unfortunately, the statics confuse lint so we fallback to
10274  * #define in that case.
10275  *
10276  * NOTE: Support for the Draft 6 definitions is provided for compatibility
10277  * only.  New applications/libraries should use the standard definitions.
10278  */
10279 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pwd.h"
10280 extern struct passwd *getpwuid_r(uid_t, struct passwd *, char *, int);
10281 extern struct passwd *getpwnam_r(const char *, struct passwd *, char *, int);
10282 # 54 "unpack_package_from_stream.c" 2
10283 
10284 
10285 /*
10286  * consolidation pkg command library includes
10287  */
10288 
10289 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
10290 /*
10291  * CDDL HEADER START
10292  *
10293  * The contents of this file are subject to the terms of the
10294  * Common Development and Distribution License (the "License").
10295  * You may not use this file except in compliance with the License.
10296  *
10297  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10298  * or http://www.opensolaris.org/os/licensing.
10299  * See the License for the specific language governing permissions
10300  * and limitations under the License.
10301  *
10302  * When distributing Covered Code, include this CDDL HEADER in each
10303  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10304  * If applicable, add the following below this CDDL HEADER, with the
10305  * fields enclosed by brackets "[]" replaced with your own identifying
10306  * information: Portions Copyright [yyyy] [name of copyright owner]
10307  *
10308  * CDDL HEADER END
10309  */
10310 
10311 /*
10312  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
10313  * Use is subject to license terms.
10314  */
10315 
10316 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
10317 /* All Rights Reserved */
10318 # 38 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
10319 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
10320 /*
10321  * CDDL HEADER START
10322  *
10323  * The contents of this file are subject to the terms of the
10324  * Common Development and Distribution License (the "License").
10325  * You may not use this file except in compliance with the License.
10326  *
10327  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10328  * or http://www.opensolaris.org/os/licensing.
10329  * See the License for the specific language governing permissions
10330  * and limitations under the License.
10331  *
10332  * When distributing Covered Code, include this CDDL HEADER in each
10333  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10334  * If applicable, add the following below this CDDL HEADER, with the
10335  * fields enclosed by brackets "[]" replaced with your own identifying
10336  * information: Portions Copyright [yyyy] [name of copyright owner]
10337  *
10338  * CDDL HEADER END
10339  */
10340 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10341 /*	  All Rights Reserved  	*/
10342 
10343 
10344 /*
10345  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
10346  * Use is subject to license terms.
10347  *
10348  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
10349  * Copyright 2016 Joyent, Inc.
10350  */
10351 # 39 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
10352 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
10353 /*
10354  * CDDL HEADER START
10355  *
10356  * The contents of this file are subject to the terms of the
10357  * Common Development and Distribution License (the "License").
10358  * You may not use this file except in compliance with the License.
10359  *
10360  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10361  * or http://www.opensolaris.org/os/licensing.
10362  * See the License for the specific language governing permissions
10363  * and limitations under the License.
10364  *
10365  * When distributing Covered Code, include this CDDL HEADER in each
10366  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10367  * If applicable, add the following below this CDDL HEADER, with the
10368  * fields enclosed by brackets "[]" replaced with your own identifying
10369  * information: Portions Copyright [yyyy] [name of copyright owner]
10370  *
10371  * CDDL HEADER END
10372  */
10373 
10374 /*
10375  * Copyright (c) 2013 Gary Mills
10376  *
10377  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
10378  * Use is subject to license terms.
10379  */
10380 
10381 /*	Copyright (c) 1988 AT&T	*/
10382 /*	  All Rights Reserved  	*/
10383 
10384 
10385 
10386 
10387 
10388 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
10389 /*
10390  * CDDL HEADER START
10391  *
10392  * The contents of this file are subject to the terms of the
10393  * Common Development and Distribution License (the "License").
10394  * You may not use this file except in compliance with the License.
10395  *
10396  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10397  * or http://www.opensolaris.org/os/licensing.
10398  * See the License for the specific language governing permissions
10399  * and limitations under the License.
10400  *
10401  * When distributing Covered Code, include this CDDL HEADER in each
10402  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10403  * If applicable, add the following below this CDDL HEADER, with the
10404  * fields enclosed by brackets "[]" replaced with your own identifying
10405  * information: Portions Copyright [yyyy] [name of copyright owner]
10406  *
10407  * CDDL HEADER END
10408  */
10409 
10410 /*
10411  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
10412  * Copyright 2016 Joyent, Inc.
10413  *
10414  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
10415  * Use is subject to license terms.
10416  */
10417 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
10418 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
10419 /*
10420  * CDDL HEADER START
10421  *
10422  * The contents of this file are subject to the terms of the
10423  * Common Development and Distribution License (the "License").
10424  * You may not use this file except in compliance with the License.
10425  *
10426  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10427  * or http://www.opensolaris.org/os/licensing.
10428  * See the License for the specific language governing permissions
10429  * and limitations under the License.
10430  *
10431  *
10432  * When distributing Covered Code, include this CDDL HEADER in each
10433  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10434  * If applicable, add the following below this CDDL HEADER, with the
10435  * fields enclosed by brackets "[]" replaced with your own identifying
10436  * information: Portions Copyright [yyyy] [name of copyright owner]
10437  *
10438  * CDDL HEADER END
10439  */
10440 
10441 /*
10442  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
10443  * Use is subject to license terms.
10444  * Copyright 2016 Joyent, Inc.
10445  */
10446 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
10447 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h" 1
10448 /*
10449  * CDDL HEADER START
10450  *
10451  * The contents of this file are subject to the terms of the
10452  * Common Development and Distribution License, Version 1.0 only
10453  * (the "License").  You may not use this file except in compliance
10454  * with the License.
10455  *
10456  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10457  * or http://www.opensolaris.org/os/licensing.
10458  * See the License for the specific language governing permissions
10459  * and limitations under the License.
10460  *
10461  * When distributing Covered Code, include this CDDL HEADER in each
10462  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10463  * If applicable, add the following below this CDDL HEADER, with the
10464  * fields enclosed by brackets "[]" replaced with your own identifying
10465  * information: Portions Copyright [yyyy] [name of copyright owner]
10466  *
10467  * CDDL HEADER END
10468  */
10469 /*
10470  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
10471  * Use is subject to license terms.
10472  */
10473 
10474 /*	Copyright (c) 1988 AT&T	*/
10475 /*	  All Rights Reserved  	*/
10476 
10477 
10478 /*
10479  * An application should not include this header directly.  Instead it
10480  * should be included only through the inclusion of other Sun headers.
10481  *
10482  * The contents of this header is limited to identifiers specified in the
10483  * C Standard.  Any new identifiers specified in future amendments to the
10484  * C Standard must be placed in this header.  If these new identifiers
10485  * are required to also be in the C++ Standard "std" namespace, then for
10486  * anything other than macro definitions, corresponding "using" directives
10487  * must also be added to <limits.h>.
10488  */
10489 
10490 
10491 
10492 
10493 #pragma ident "%Z%%M%	%I%	%E% SMI"
10494 
10495 
10496 
10497 
10498 
10499 /*
10500  * Sizes of integral types
10501  */
10502 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h"
10503      /* min value of a "long int" */
10504 
10505 
10506 
10507 
10508 
10509      /* min value of a long long */
10510 
10511      /* max value of a long long */
10512 
10513      /* max value of "unsigned long long */
10514 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
10515 
10516 /*
10517  * Include fixed width type limits as proposed by the ISO/JTC1/SC22/WG14 C
10518  * committee's working draft for the revision of the current ISO C standard,
10519  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
10520  * required by any standard but constitute a useful, general purpose set
10521  * of type definitions and limits which is namespace clean with respect to
10522  * all standards.
10523  */
10524 
10525 
10526 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
10527 /*
10528  * CDDL HEADER START
10529  *
10530  * The contents of this file are subject to the terms of the
10531  * Common Development and Distribution License, Version 1.0 only
10532  * (the "License").  You may not use this file except in compliance
10533  * with the License.
10534  *
10535  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10536  * or http://www.opensolaris.org/os/licensing.
10537  * See the License for the specific language governing permissions
10538  * and limitations under the License.
10539  *
10540  * When distributing Covered Code, include this CDDL HEADER in each
10541  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10542  * If applicable, add the following below this CDDL HEADER, with the
10543  * fields enclosed by brackets "[]" replaced with your own identifying
10544  * information: Portions Copyright [yyyy] [name of copyright owner]
10545  *
10546  * CDDL HEADER END
10547  */
10548 /*
10549  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10550  *
10551  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
10552  * Use is subject to license terms.
10553  */
10554 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
10555 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10556 /*
10557  * ARG_MAX is calculated as follows:
10558  * NCARGS - space for other stuff on initial stack
10559  * like aux vectors, saved registers, etc..
10560  */
10561 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10562 /*
10563  * POSIX conformant definitions - An implementation may define
10564  * other symbols which reflect the actual implementation. Alternate
10565  * definitions may not be as restrictive as the POSIX definitions.
10566  */
10567 # 140 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10568 /* POSIX.1c conformant */
10569 
10570 
10571 
10572 
10573 
10574 /* UNIX 03 conformant */
10575 
10576 
10577 
10578 
10579 
10580 /*
10581  * POSIX.2 and XPG4-XSH4 conformant definitions
10582  */
10583 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10584 /* UNIX 03 conformant */
10585 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10586 /*
10587  * For dual definitions for PASS_MAX and sysconf.c
10588  */
10589 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10590     /* NLS printf() and scanf() */
10591 # 216 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10592 /* Marked as LEGACY in SUSv2 and removed in UNIX 03 */
10593 
10594 
10595 
10596        /* of a double */
10597 
10598 
10599        /* of a "float" */
10600 
10601 
10602 /* Marked as LEGACY in SUSv1 and removed in SUSv2 */
10603 
10604 
10605        /* of a double */
10606 
10607        /* of a float */
10608 # 248 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10609 /*
10610  * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
10611  * related text states:
10612  *
10613  * A definition of one of the values from Table 2-5 shall be omitted from the
10614  * <limits.h> on specific implementations where the corresponding value is
10615  * equal to or greater than the stated minimum, but where the value can vary
10616  * depending on the file to which it is applied. The actual value supported for
10617  * a specific pathname shall be provided by the pathconf() (5.7.1) function.
10618  *
10619  * This is clear that any machine supporting multiple file system types
10620  * and/or a network can not include this define, regardless of protection
10621  * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags.
10622  *
10623  * #define	NAME_MAX	14
10624  */
10625 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10626     /* Increased for illumos */
10627 # 40 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
10628 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
10629 /*
10630  * CDDL HEADER START
10631  *
10632  * The contents of this file are subject to the terms of the
10633  * Common Development and Distribution License (the "License").
10634  * You may not use this file except in compliance with the License.
10635  *
10636  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10637  * or http://www.opensolaris.org/os/licensing.
10638  * See the License for the specific language governing permissions
10639  * and limitations under the License.
10640  *
10641  * When distributing Covered Code, include this CDDL HEADER in each
10642  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10643  * If applicable, add the following below this CDDL HEADER, with the
10644  * fields enclosed by brackets "[]" replaced with your own identifying
10645  * information: Portions Copyright [yyyy] [name of copyright owner]
10646  *
10647  * CDDL HEADER END
10648  */
10649 
10650 /*
10651  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10652  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
10653  */
10654 
10655 /*	Copyright (c) 1988 AT&T	*/
10656 /*	  All Rights Reserved  	*/
10657 
10658 /*
10659  * User-visible pieces of the ANSI C standard I/O package.
10660  */
10661 # 41 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
10662 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 1
10663 /*
10664  * CDDL HEADER START
10665  *
10666  * The contents of this file are subject to the terms of the
10667  * Common Development and Distribution License, Version 1.0 only
10668  * (the "License").  You may not use this file except in compliance
10669  * with the License.
10670  *
10671  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10672  * or http://www.opensolaris.org/os/licensing.
10673  * See the License for the specific language governing permissions
10674  * and limitations under the License.
10675  *
10676  * When distributing Covered Code, include this CDDL HEADER in each
10677  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10678  * If applicable, add the following below this CDDL HEADER, with the
10679  * fields enclosed by brackets "[]" replaced with your own identifying
10680  * information: Portions Copyright [yyyy] [name of copyright owner]
10681  *
10682  * CDDL HEADER END
10683  */
10684 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10685 /*	  All Rights Reserved  	*/
10686 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
10687 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
10688 /*
10689  * CDDL HEADER START
10690  *
10691  * The contents of this file are subject to the terms of the
10692  * Common Development and Distribution License (the "License").
10693  * You may not use this file except in compliance with the License.
10694  *
10695  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10696  * or http://www.opensolaris.org/os/licensing.
10697  * See the License for the specific language governing permissions
10698  * and limitations under the License.
10699  *
10700  * When distributing Covered Code, include this CDDL HEADER in each
10701  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10702  * If applicable, add the following below this CDDL HEADER, with the
10703  * fields enclosed by brackets "[]" replaced with your own identifying
10704  * information: Portions Copyright [yyyy] [name of copyright owner]
10705  *
10706  * CDDL HEADER END
10707  */
10708 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10709 /*	  All Rights Reserved  	*/
10710 
10711 /*
10712  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
10713  * Use is subject to license terms.
10714  */
10715 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
10716 # 1 "/usr/include/openssl/bio.h" 1 3 4
10717 /* crypto/bio/bio.h */
10718 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10719  * All rights reserved.
10720  *
10721  * This package is an SSL implementation written
10722  * by Eric Young (eay@cryptsoft.com).
10723  * The implementation was written so as to conform with Netscapes SSL.
10724  *
10725  * This library is free for commercial and non-commercial use as long as
10726  * the following conditions are aheared to.  The following conditions
10727  * apply to all code found in this distribution, be it the RC4, RSA,
10728  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10729  * included with this distribution is covered by the same copyright terms
10730  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10731  *
10732  * Copyright remains Eric Young's, and as such any Copyright notices in
10733  * the code are not to be removed.
10734  * If this package is used in a product, Eric Young should be given attribution
10735  * as the author of the parts of the library used.
10736  * This can be in the form of a textual message at program startup or
10737  * in documentation (online or textual) provided with the package.
10738  *
10739  * Redistribution and use in source and binary forms, with or without
10740  * modification, are permitted provided that the following conditions
10741  * are met:
10742  * 1. Redistributions of source code must retain the copyright
10743  *    notice, this list of conditions and the following disclaimer.
10744  * 2. Redistributions in binary form must reproduce the above copyright
10745  *    notice, this list of conditions and the following disclaimer in the
10746  *    documentation and/or other materials provided with the distribution.
10747  * 3. All advertising materials mentioning features or use of this software
10748  *    must display the following acknowledgement:
10749  *    "This product includes cryptographic software written by
10750  *     Eric Young (eay@cryptsoft.com)"
10751  *    The word 'cryptographic' can be left out if the rouines from the library
10752  *    being used are not cryptographic related :-).
10753  * 4. If you include any Windows specific code (or a derivative thereof) from
10754  *    the apps directory (application code) you must include an acknowledgement:
10755  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10756  *
10757  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10758  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10759  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10760  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10761  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10762  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10763  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10764  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10765  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10766  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10767  * SUCH DAMAGE.
10768  *
10769  * The licence and distribution terms for any publically available version or
10770  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10771  * copied and put under another distribution licence
10772  * [including the GNU Public Licence.]
10773  */
10774 
10775 
10776 
10777 
10778 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
10779 /* e_os2.h */
10780 /* ====================================================================
10781  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
10782  *
10783  * Redistribution and use in source and binary forms, with or without
10784  * modification, are permitted provided that the following conditions
10785  * are met:
10786  *
10787  * 1. Redistributions of source code must retain the above copyright
10788  *    notice, this list of conditions and the following disclaimer.
10789  *
10790  * 2. Redistributions in binary form must reproduce the above copyright
10791  *    notice, this list of conditions and the following disclaimer in
10792  *    the documentation and/or other materials provided with the
10793  *    distribution.
10794  *
10795  * 3. All advertising materials mentioning features or use of this
10796  *    software must display the following acknowledgment:
10797  *    "This product includes software developed by the OpenSSL Project
10798  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10799  *
10800  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10801  *    endorse or promote products derived from this software without
10802  *    prior written permission. For written permission, please contact
10803  *    openssl-core@openssl.org.
10804  *
10805  * 5. Products derived from this software may not be called "OpenSSL"
10806  *    nor may "OpenSSL" appear in their names without prior written
10807  *    permission of the OpenSSL Project.
10808  *
10809  * 6. Redistributions of any form whatsoever must retain the following
10810  *    acknowledgment:
10811  *    "This product includes software developed by the OpenSSL Project
10812  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10813  *
10814  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10815  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10816  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10817  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10818  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10819  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10820  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10821  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10822  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10823  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10824  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10825  * OF THE POSSIBILITY OF SUCH DAMAGE.
10826  * ====================================================================
10827  *
10828  * This product includes cryptographic software written by Eric Young
10829  * (eay@cryptsoft.com).  This product includes software written by Tim
10830  * Hudson (tjh@cryptsoft.com).
10831  *
10832  */
10833 
10834 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
10835 /* opensslconf.h */
10836 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
10837 
10838 
10839 
10840 
10841 /* OpenSSL was configured with the following options: */
10842 # 108 "/usr/include/openssl/opensslconf.h" 3 4
10843 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
10844    asks for it.  This is a transient feature that is provided for those
10845    who haven't had the time to do the appropriate changes in their
10846    applications.  */
10847 # 204 "/usr/include/openssl/opensslconf.h" 3 4
10848 /* crypto/opensslconf.h.in */
10849 
10850 /* Generate 80386 code? */
10851 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
10852 # 65 "/usr/include/openssl/e_os2.h" 3 4
10853 /******************************************************************************
10854  * Detect operating systems.  This probably needs completing.
10855  * The result is that at least one OPENSSL_SYS_os macro should be defined.
10856  * However, if none is defined, Unix is assumed.
10857  **/
10858 
10859 
10860 
10861 /* ---------------------- Macintosh, before MacOS X ----------------------- */
10862 
10863 
10864 
10865 
10866 
10867 /* ---------------------- NetWare ----------------------------------------- */
10868 
10869 
10870 
10871 
10872 
10873 /* --------------------- Microsoft operating systems ---------------------- */
10874 
10875 /*
10876  * Note that MSDOS actually denotes 32-bit environments running on top of
10877  * MS-DOS, such as DJGPP one.
10878  */
10879 
10880 
10881 
10882 
10883 
10884 /*
10885  * For 32 bit environment, there seems to be the CygWin environment and then
10886  * all the others that try to do the same thing Microsoft does...
10887  */
10888 # 129 "/usr/include/openssl/e_os2.h" 3 4
10889 /* Anything that tries to look like Microsoft is "Windows" */
10890 # 138 "/usr/include/openssl/e_os2.h" 3 4
10891 /*
10892  * DLL settings.  This part is a bit tough, because it's up to the
10893  * application implementor how he or she will link the application, so it
10894  * requires some macro to be used.
10895  */
10896 # 152 "/usr/include/openssl/e_os2.h" 3 4
10897 /* ------------------------------- OpenVMS -------------------------------- */
10898 # 166 "/usr/include/openssl/e_os2.h" 3 4
10899 /* -------------------------------- OS/2 ---------------------------------- */
10900 
10901 
10902 
10903 
10904 
10905 /* -------------------------------- Unix ---------------------------------- */
10906 # 207 "/usr/include/openssl/e_os2.h" 3 4
10907 /* -------------------------------- VOS ----------------------------------- */
10908 # 218 "/usr/include/openssl/e_os2.h" 3 4
10909 /* ------------------------------ VxWorks --------------------------------- */
10910 
10911 
10912 
10913 
10914 /* -------------------------------- BeOS ---------------------------------- */
10915 # 234 "/usr/include/openssl/e_os2.h" 3 4
10916 /**
10917  * That's it for OS-specific stuff
10918  *****************************************************************************/
10919 
10920 /* Specials for I/O an exit */
10921 # 247 "/usr/include/openssl/e_os2.h" 3 4
10922 /*-
10923  * Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare
10924  * certain global symbols that, with some compilers under VMS, have to be
10925  * defined and declared explicitely with globaldef and globalref.
10926  * Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare
10927  * DLL exports and imports for compilers under Win32.  These are a little
10928  * more complicated to use.  Basically, for any library that exports some
10929  * global variables, the following code must be present in the header file
10930  * that declares them, before OPENSSL_EXTERN is used:
10931  *
10932  * #ifdef SOME_BUILD_FLAG_MACRO
10933  * # undef OPENSSL_EXTERN
10934  * # define OPENSSL_EXTERN OPENSSL_EXPORT
10935  * #endif
10936  *
10937  * The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL
10938  * have some generally sensible values, and for OPENSSL_EXTERN to have the
10939  * value OPENSSL_IMPORT.
10940  */
10941 # 282 "/usr/include/openssl/e_os2.h" 3 4
10942 /*-
10943  * Macros to allow global variables to be reached through function calls when
10944  * required (if a shared library version requires it, for example.
10945  * The way it's done allows definitions like this:
10946  *
10947  *      // in foobar.c
10948  *      OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
10949  *      // in foobar.h
10950  *      OPENSSL_DECLARE_GLOBAL(int,foobar);
10951  *      #define foobar OPENSSL_GLOBAL_REF(foobar)
10952  */
10953 # 63 "/usr/include/openssl/bio.h" 2 3 4
10954 
10955 
10956 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
10957 /*
10958  * CDDL HEADER START
10959  *
10960  * The contents of this file are subject to the terms of the
10961  * Common Development and Distribution License (the "License").
10962  * You may not use this file except in compliance with the License.
10963  *
10964  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10965  * or http://www.opensolaris.org/os/licensing.
10966  * See the License for the specific language governing permissions
10967  * and limitations under the License.
10968  *
10969  * When distributing Covered Code, include this CDDL HEADER in each
10970  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10971  * If applicable, add the following below this CDDL HEADER, with the
10972  * fields enclosed by brackets "[]" replaced with your own identifying
10973  * information: Portions Copyright [yyyy] [name of copyright owner]
10974  *
10975  * CDDL HEADER END
10976  */
10977 
10978 /*
10979  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10980  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
10981  */
10982 
10983 /*	Copyright (c) 1988 AT&T	*/
10984 /*	  All Rights Reserved  	*/
10985 
10986 /*
10987  * User-visible pieces of the ANSI C standard I/O package.
10988  */
10989 # 66 "/usr/include/openssl/bio.h" 2 3 4
10990 
10991 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1 3 4
10992 /*
10993  * CDDL HEADER START
10994  *
10995  * The contents of this file are subject to the terms of the
10996  * Common Development and Distribution License, Version 1.0 only
10997  * (the "License").  You may not use this file except in compliance
10998  * with the License.
10999  *
11000  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11001  * or http://www.opensolaris.org/os/licensing.
11002  * See the License for the specific language governing permissions
11003  * and limitations under the License.
11004  *
11005  * When distributing Covered Code, include this CDDL HEADER in each
11006  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11007  * If applicable, add the following below this CDDL HEADER, with the
11008  * fields enclosed by brackets "[]" replaced with your own identifying
11009  * information: Portions Copyright [yyyy] [name of copyright owner]
11010  *
11011  * CDDL HEADER END
11012  */
11013 /*	Copyright (c) 1988 AT&T	*/
11014 /*	  All Rights Reserved	*/
11015 
11016 /*
11017  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11018  *
11019  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
11020  * Use is subject to license terms.
11021  */
11022 
11023 
11024 
11025 
11026 /*
11027  * This header defines the ISO C 1989, ISO C++ 1998, and ISO C 1999
11028  * variable argument definitions.  For legacy support, it also defines
11029  * the pre-standard variable argument definitions.
11030  *
11031  * The varargs definitions within this header are defined in terms of
11032  * implementation definitions.  These implementation definitions reside
11033  * in <sys/va_list.h>.  This organization enables protected use of
11034  * the implementation by other standard headers without introducing
11035  * names into the users' namespace.
11036  */
11037 
11038 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 1 3 4
11039 /*
11040  * CDDL HEADER START
11041  *
11042  * The contents of this file are subject to the terms of the
11043  * Common Development and Distribution License, Version 1.0 only
11044  * (the "License").  You may not use this file except in compliance
11045  * with the License.
11046  *
11047  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11048  * or http://www.opensolaris.org/os/licensing.
11049  * See the License for the specific language governing permissions
11050  * and limitations under the License.
11051  *
11052  * When distributing Covered Code, include this CDDL HEADER in each
11053  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11054  * If applicable, add the following below this CDDL HEADER, with the
11055  * fields enclosed by brackets "[]" replaced with your own identifying
11056  * information: Portions Copyright [yyyy] [name of copyright owner]
11057  *
11058  * CDDL HEADER END
11059  */
11060 /*	Copyright (c) 1988 AT&T	*/
11061 /*	  All Rights Reserved  	*/
11062 
11063 
11064 /*
11065  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
11066  * Use is subject to license terms.
11067  */
11068 
11069 /*
11070  * An application should not include this header directly.  Instead it
11071  * should be included only through the inclusion of other Sun headers.
11072  *
11073  * The contents of this header is limited to identifiers specified in the
11074  * C Standard.  Any new identifiers specified in future amendments to the
11075  * C Standard must be placed in this header.  If these new identifiers
11076  * are required to also be in the C++ Standard "std" namespace, then for
11077  * anything other than macro definitions, corresponding "using" directives
11078  * must also be added to <stdarg.h>.
11079  */
11080 
11081 
11082 
11083 
11084 #pragma ident "%Z%%M%	%I%	%E% SMI"
11085 
11086 /*
11087  * This header defines the ISO C 1989 and ISO C++ 1998 variable
11088  * argument definitions.
11089  *
11090  * The varargs definitions within this header are defined in terms of
11091  * implementation definitions.  These implementation definitions reside
11092  * in <sys/va_impl.h>.  This organization enables protected use of
11093  * the implementation by other standard headers without introducing
11094  * names into the users' namespace.
11095  */
11096 
11097 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 1 3 4
11098 /*
11099  * CDDL HEADER START
11100  *
11101  * The contents of this file are subject to the terms of the
11102  * Common Development and Distribution License, Version 1.0 only
11103  * (the "License").  You may not use this file except in compliance
11104  * with the License.
11105  *
11106  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11107  * or http://www.opensolaris.org/os/licensing.
11108  * See the License for the specific language governing permissions
11109  * and limitations under the License.
11110  *
11111  * When distributing Covered Code, include this CDDL HEADER in each
11112  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11113  * If applicable, add the following below this CDDL HEADER, with the
11114  * fields enclosed by brackets "[]" replaced with your own identifying
11115  * information: Portions Copyright [yyyy] [name of copyright owner]
11116  *
11117  * CDDL HEADER END
11118  */
11119 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
11120 /*	  All Rights Reserved	*/
11121 
11122 
11123 /*
11124  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11125  *
11126  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
11127  * Use is subject to license terms.
11128  */
11129 
11130 
11131 
11132 
11133 /*
11134  * An application should not include this header directly.  Instead it
11135  * should be included only through the inclusion of other Sun headers,
11136  * specifically <stdarg.h> and <varargs.h>.
11137  *
11138  * This header serves two purposes.
11139  *
11140  * First, it provides a common set of definitions that implementations
11141  * of the various standards for variable argument lists may use.  These
11142  * various standards are implemented in <varargs.h>, <stdarg.h>,
11143  * <iso/stdarg_iso.h>, <iso/stdarg_c99.h>, and <sys/varargs.h>.
11144  *
11145  * Second, it provides varying implementations of the common definitions,
11146  * depending upon the compiler.
11147  */
11148 
11149 /*
11150  * The common definitions exported by this header or compilers using
11151  * this header are:
11152  *
11153  * the macro __va_start(list, name) starting the list iteration
11154  * the macro __va_arg(list, type) getting the current arg and iterating
11155  * the macro __va_copy(to, from) to bookmark the list iteration
11156  * the macro __va_end(list) to end the iteration
11157  *
11158  * In addition, the following are exported via inclusion of <sys/va_list.h>:
11159  *
11160  * the identifier __builtin_va_alist for the variable list pseudo parameter
11161  * the type __va_alist_type for the variable list pseudo parameter
11162  * the type __va_list defining the type of the variable list iterator
11163  */
11164 
11165 /*
11166  * This header uses feature macros (e.g. __BUILTIN_VA_ARG_INCR and
11167  * __BUILTIN_VA_STRUCT), compiler macros (e.g. __GNUC__), and processor
11168  * macros (e.g. __sparc) to determine the protocol appropriate to the
11169  * current compilation.  It is intended that the compilation system
11170  * define the feature, processor, and compiler macros, not the user of
11171  * the system.
11172  */
11173 
11174 /*
11175  * Many compilation systems depend upon the use of special functions
11176  * built into the the compilation system to handle variable argument
11177  * lists.  These built-in symbols may include one or more of the
11178  * following:
11179  *
11180  *      __builtin_va_alist
11181  *      __builtin_va_start
11182  *      __builtin_va_arg_incr
11183  *      __builtin_stdarg_start
11184  *      __builtin_va_end
11185  *      __builtin_va_arg
11186  *      __builtin_va_copy
11187  */
11188 
11189 /*
11190  * The following are defined in <sys/va_list.h>:
11191  *
11192  *      __va_alist_type
11193  *      __va_void()
11194  *      __va_ptr_base
11195  *      ISA definitions via inclusion of <sys/isa_defs.h>
11196  *
11197  * Inclusion of this header also makes visible the symbols in <sys/va_list.h>.
11198  * This header is included in <varargs.h>, <sys/varargs.h> and in <stdarg.h>
11199  * via inclusion of <iso/stdarg_iso.h>.
11200  */
11201 
11202 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1 3 4
11203 /*
11204  * CDDL HEADER START
11205  *
11206  * The contents of this file are subject to the terms of the
11207  * Common Development and Distribution License, Version 1.0 only
11208  * (the "License").  You may not use this file except in compliance
11209  * with the License.
11210  *
11211  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11212  * or http://www.opensolaris.org/os/licensing.
11213  * See the License for the specific language governing permissions
11214  * and limitations under the License.
11215  *
11216  * When distributing Covered Code, include this CDDL HEADER in each
11217  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11218  * If applicable, add the following below this CDDL HEADER, with the
11219  * fields enclosed by brackets "[]" replaced with your own identifying
11220  * information: Portions Copyright [yyyy] [name of copyright owner]
11221  *
11222  * CDDL HEADER END
11223  */
11224 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
11225 /*	  All Rights Reserved	*/
11226 
11227 
11228 /*
11229  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11230  *
11231  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
11232  * Use is subject to license terms.
11233  */
11234 # 106 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 2 3 4
11235 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 2 3 4
11236 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 3 4
11237 typedef __va_list va_list;
11238 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
11239 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 1 3 4
11240 /*
11241  * CDDL HEADER START
11242  *
11243  * The contents of this file are subject to the terms of the
11244  * Common Development and Distribution License, Version 1.0 only
11245  * (the "License").  You may not use this file except in compliance
11246  * with the License.
11247  *
11248  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11249  * or http://www.opensolaris.org/os/licensing.
11250  * See the License for the specific language governing permissions
11251  * and limitations under the License.
11252  *
11253  * When distributing Covered Code, include this CDDL HEADER in each
11254  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11255  * If applicable, add the following below this CDDL HEADER, with the
11256  * fields enclosed by brackets "[]" replaced with your own identifying
11257  * information: Portions Copyright [yyyy] [name of copyright owner]
11258  *
11259  * CDDL HEADER END
11260  */
11261 /*	Copyright (c) 1988 AT&T	*/
11262 /*	  All Rights Reserved	*/
11263 
11264 
11265 /*
11266  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
11267  * Use is subject to license terms.
11268  */
11269 
11270 
11271 
11272 
11273 #pragma ident "%Z%%M%	%I%	%E% SMI"
11274 
11275 /*
11276  * An application should not include this header directly.  Instead it
11277  * should be included only through the inclusion of other Sun headers.
11278  *
11279  * This header defines the va_copy variable argument macro, which is
11280  * new in ISO C 1999, and thus not present in ISO C 1989 and ISO C++
11281  * 1998.  Because this macro is a long-standing Solaris extension, it
11282  * is also permitted in other contexts.
11283  *
11284  * The varargs definitions within this header are defined in terms of
11285  * implementation definitions.  These implementation definitions reside
11286  * in <sys/va_list.h>.  This organization enables protected use of
11287  * the implementation by other standard headers without introducing
11288  * names into the users' namespace.
11289  */
11290 
11291 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
11292 /*
11293  * CDDL HEADER START
11294  *
11295  * The contents of this file are subject to the terms of the
11296  * Common Development and Distribution License (the "License").
11297  * You may not use this file except in compliance with the License.
11298  *
11299  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11300  * or http://www.opensolaris.org/os/licensing.
11301  * See the License for the specific language governing permissions
11302  * and limitations under the License.
11303  *
11304  * When distributing Covered Code, include this CDDL HEADER in each
11305  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11306  * If applicable, add the following below this CDDL HEADER, with the
11307  * fields enclosed by brackets "[]" replaced with your own identifying
11308  * information: Portions Copyright [yyyy] [name of copyright owner]
11309  *
11310  * CDDL HEADER END
11311  */
11312 
11313 /*
11314  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
11315  * Copyright 2016 Joyent, Inc.
11316  *
11317  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
11318  * Use is subject to license terms.
11319  */
11320 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 2 3 4
11321 
11322 
11323 
11324 
11325 
11326 /*
11327  * va_copy was initially a Solaris extension to provide a portable
11328  * way to perform a variable argument list ``bookmarking'' function.
11329  * It is now specified in the ISO/IEC 9899:1999 standard.
11330  */
11331 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
11332 
11333 /*
11334  * Allow global visibility for symbols defined in
11335  * C++ "std" namespace in <iso/stdarg_iso.h>.
11336  */
11337 # 68 "/usr/include/openssl/bio.h" 2 3 4
11338 
11339 # 1 "/usr/include/openssl/crypto.h" 1 3 4
11340 /* crypto/crypto.h */
11341 /* ====================================================================
11342  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
11343  *
11344  * Redistribution and use in source and binary forms, with or without
11345  * modification, are permitted provided that the following conditions
11346  * are met:
11347  *
11348  * 1. Redistributions of source code must retain the above copyright
11349  *    notice, this list of conditions and the following disclaimer.
11350  *
11351  * 2. Redistributions in binary form must reproduce the above copyright
11352  *    notice, this list of conditions and the following disclaimer in
11353  *    the documentation and/or other materials provided with the
11354  *    distribution.
11355  *
11356  * 3. All advertising materials mentioning features or use of this
11357  *    software must display the following acknowledgment:
11358  *    "This product includes software developed by the OpenSSL Project
11359  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11360  *
11361  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11362  *    endorse or promote products derived from this software without
11363  *    prior written permission. For written permission, please contact
11364  *    openssl-core@openssl.org.
11365  *
11366  * 5. Products derived from this software may not be called "OpenSSL"
11367  *    nor may "OpenSSL" appear in their names without prior written
11368  *    permission of the OpenSSL Project.
11369  *
11370  * 6. Redistributions of any form whatsoever must retain the following
11371  *    acknowledgment:
11372  *    "This product includes software developed by the OpenSSL Project
11373  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11374  *
11375  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11376  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11377  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11378  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11379  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11380  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11381  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11382  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11383  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11384  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11385  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11386  * OF THE POSSIBILITY OF SUCH DAMAGE.
11387  * ====================================================================
11388  *
11389  * This product includes cryptographic software written by Eric Young
11390  * (eay@cryptsoft.com).  This product includes software written by Tim
11391  * Hudson (tjh@cryptsoft.com).
11392  *
11393  */
11394 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11395  * All rights reserved.
11396  *
11397  * This package is an SSL implementation written
11398  * by Eric Young (eay@cryptsoft.com).
11399  * The implementation was written so as to conform with Netscapes SSL.
11400  *
11401  * This library is free for commercial and non-commercial use as long as
11402  * the following conditions are aheared to.  The following conditions
11403  * apply to all code found in this distribution, be it the RC4, RSA,
11404  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11405  * included with this distribution is covered by the same copyright terms
11406  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11407  *
11408  * Copyright remains Eric Young's, and as such any Copyright notices in
11409  * the code are not to be removed.
11410  * If this package is used in a product, Eric Young should be given attribution
11411  * as the author of the parts of the library used.
11412  * This can be in the form of a textual message at program startup or
11413  * in documentation (online or textual) provided with the package.
11414  *
11415  * Redistribution and use in source and binary forms, with or without
11416  * modification, are permitted provided that the following conditions
11417  * are met:
11418  * 1. Redistributions of source code must retain the copyright
11419  *    notice, this list of conditions and the following disclaimer.
11420  * 2. Redistributions in binary form must reproduce the above copyright
11421  *    notice, this list of conditions and the following disclaimer in the
11422  *    documentation and/or other materials provided with the distribution.
11423  * 3. All advertising materials mentioning features or use of this software
11424  *    must display the following acknowledgement:
11425  *    "This product includes cryptographic software written by
11426  *     Eric Young (eay@cryptsoft.com)"
11427  *    The word 'cryptographic' can be left out if the rouines from the library
11428  *    being used are not cryptographic related :-).
11429  * 4. If you include any Windows specific code (or a derivative thereof) from
11430  *    the apps directory (application code) you must include an acknowledgement:
11431  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11432  *
11433  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11434  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11435  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11436  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11437  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11438  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11439  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11440  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11441  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11442  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11443  * SUCH DAMAGE.
11444  *
11445  * The licence and distribution terms for any publically available version or
11446  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11447  * copied and put under another distribution licence
11448  * [including the GNU Public Licence.]
11449  */
11450 /* ====================================================================
11451  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
11452  * ECDH support in OpenSSL originally developed by
11453  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
11454  */
11455 
11456 
11457 
11458 
11459 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1 3 4
11460 /*
11461  * CDDL HEADER START
11462  *
11463  * The contents of this file are subject to the terms of the
11464  * Common Development and Distribution License (the "License").
11465  * You may not use this file except in compliance with the License.
11466  *
11467  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11468  * or http://www.opensolaris.org/os/licensing.
11469  * See the License for the specific language governing permissions
11470  * and limitations under the License.
11471  *
11472  * When distributing Covered Code, include this CDDL HEADER in each
11473  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11474  * If applicable, add the following below this CDDL HEADER, with the
11475  * fields enclosed by brackets "[]" replaced with your own identifying
11476  * information: Portions Copyright [yyyy] [name of copyright owner]
11477  *
11478  * CDDL HEADER END
11479  */
11480 
11481 /*
11482  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11483  * Copyright (c) 2013 Gary Mills
11484  *
11485  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
11486  */
11487 
11488 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
11489 
11490 /*	Copyright (c) 1988 AT&T	*/
11491 /*	  All Rights Reserved  	*/
11492 # 121 "/usr/include/openssl/crypto.h" 2 3 4
11493 
11494 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
11495 /* e_os2.h */
11496 /* ====================================================================
11497  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
11498  *
11499  * Redistribution and use in source and binary forms, with or without
11500  * modification, are permitted provided that the following conditions
11501  * are met:
11502  *
11503  * 1. Redistributions of source code must retain the above copyright
11504  *    notice, this list of conditions and the following disclaimer.
11505  *
11506  * 2. Redistributions in binary form must reproduce the above copyright
11507  *    notice, this list of conditions and the following disclaimer in
11508  *    the documentation and/or other materials provided with the
11509  *    distribution.
11510  *
11511  * 3. All advertising materials mentioning features or use of this
11512  *    software must display the following acknowledgment:
11513  *    "This product includes software developed by the OpenSSL Project
11514  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11515  *
11516  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11517  *    endorse or promote products derived from this software without
11518  *    prior written permission. For written permission, please contact
11519  *    openssl-core@openssl.org.
11520  *
11521  * 5. Products derived from this software may not be called "OpenSSL"
11522  *    nor may "OpenSSL" appear in their names without prior written
11523  *    permission of the OpenSSL Project.
11524  *
11525  * 6. Redistributions of any form whatsoever must retain the following
11526  *    acknowledgment:
11527  *    "This product includes software developed by the OpenSSL Project
11528  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11529  *
11530  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11531  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11532  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11533  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11534  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11535  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11536  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11537  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11538  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11539  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11540  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11541  * OF THE POSSIBILITY OF SUCH DAMAGE.
11542  * ====================================================================
11543  *
11544  * This product includes cryptographic software written by Eric Young
11545  * (eay@cryptsoft.com).  This product includes software written by Tim
11546  * Hudson (tjh@cryptsoft.com).
11547  *
11548  */
11549 
11550 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
11551 /* opensslconf.h */
11552 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
11553 
11554 
11555 
11556 
11557 /* OpenSSL was configured with the following options: */
11558 # 108 "/usr/include/openssl/opensslconf.h" 3 4
11559 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
11560    asks for it.  This is a transient feature that is provided for those
11561    who haven't had the time to do the appropriate changes in their
11562    applications.  */
11563 # 204 "/usr/include/openssl/opensslconf.h" 3 4
11564 /* crypto/opensslconf.h.in */
11565 
11566 /* Generate 80386 code? */
11567 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
11568 # 123 "/usr/include/openssl/crypto.h" 2 3 4
11569 
11570 
11571 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
11572 /*
11573  * CDDL HEADER START
11574  *
11575  * The contents of this file are subject to the terms of the
11576  * Common Development and Distribution License (the "License").
11577  * You may not use this file except in compliance with the License.
11578  *
11579  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11580  * or http://www.opensolaris.org/os/licensing.
11581  * See the License for the specific language governing permissions
11582  * and limitations under the License.
11583  *
11584  * When distributing Covered Code, include this CDDL HEADER in each
11585  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11586  * If applicable, add the following below this CDDL HEADER, with the
11587  * fields enclosed by brackets "[]" replaced with your own identifying
11588  * information: Portions Copyright [yyyy] [name of copyright owner]
11589  *
11590  * CDDL HEADER END
11591  */
11592 
11593 /*
11594  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11595  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
11596  */
11597 
11598 /*	Copyright (c) 1988 AT&T	*/
11599 /*	  All Rights Reserved  	*/
11600 
11601 /*
11602  * User-visible pieces of the ANSI C standard I/O package.
11603  */
11604 # 126 "/usr/include/openssl/crypto.h" 2 3 4
11605 
11606 
11607 # 1 "/usr/include/openssl/stack.h" 1 3 4
11608 /* crypto/stack/stack.h */
11609 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11610  * All rights reserved.
11611  *
11612  * This package is an SSL implementation written
11613  * by Eric Young (eay@cryptsoft.com).
11614  * The implementation was written so as to conform with Netscapes SSL.
11615  *
11616  * This library is free for commercial and non-commercial use as long as
11617  * the following conditions are aheared to.  The following conditions
11618  * apply to all code found in this distribution, be it the RC4, RSA,
11619  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11620  * included with this distribution is covered by the same copyright terms
11621  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11622  *
11623  * Copyright remains Eric Young's, and as such any Copyright notices in
11624  * the code are not to be removed.
11625  * If this package is used in a product, Eric Young should be given attribution
11626  * as the author of the parts of the library used.
11627  * This can be in the form of a textual message at program startup or
11628  * in documentation (online or textual) provided with the package.
11629  *
11630  * Redistribution and use in source and binary forms, with or without
11631  * modification, are permitted provided that the following conditions
11632  * are met:
11633  * 1. Redistributions of source code must retain the copyright
11634  *    notice, this list of conditions and the following disclaimer.
11635  * 2. Redistributions in binary form must reproduce the above copyright
11636  *    notice, this list of conditions and the following disclaimer in the
11637  *    documentation and/or other materials provided with the distribution.
11638  * 3. All advertising materials mentioning features or use of this software
11639  *    must display the following acknowledgement:
11640  *    "This product includes cryptographic software written by
11641  *     Eric Young (eay@cryptsoft.com)"
11642  *    The word 'cryptographic' can be left out if the rouines from the library
11643  *    being used are not cryptographic related :-).
11644  * 4. If you include any Windows specific code (or a derivative thereof) from
11645  *    the apps directory (application code) you must include an acknowledgement:
11646  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11647  *
11648  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11649  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11650  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11651  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11652  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11653  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11654  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11655  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11656  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11657  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11658  * SUCH DAMAGE.
11659  *
11660  * The licence and distribution terms for any publically available version or
11661  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11662  * copied and put under another distribution licence
11663  * [including the GNU Public Licence.]
11664  */
11665 # 66 "/usr/include/openssl/stack.h" 3 4
11666 typedef struct stack_st {
11667     int num;
11668     char **data;
11669     int sorted;
11670     int num_alloc;
11671     int (*comp) (const void *, const void *);
11672 } _STACK; /* Use STACK_OF(...) instead */
11673 
11674 
11675 
11676 
11677 int sk_num(const _STACK *);
11678 void *sk_value(const _STACK *, int);
11679 
11680 void *sk_set(_STACK *, int, void *);
11681 
11682 _STACK *sk_new(int (*cmp) (const void *, const void *));
11683 _STACK *sk_new_null(void);
11684 void sk_free(_STACK *);
11685 void sk_pop_free(_STACK *st, void (*func) (void *));
11686 _STACK *sk_deep_copy(_STACK *, void *(*)(void *), void (*)(void *));
11687 int sk_insert(_STACK *sk, void *data, int where);
11688 void *sk_delete(_STACK *st, int loc);
11689 void *sk_delete_ptr(_STACK *st, void *p);
11690 int sk_find(_STACK *st, void *data);
11691 int sk_find_ex(_STACK *st, void *data);
11692 int sk_push(_STACK *st, void *data);
11693 int sk_unshift(_STACK *st, void *data);
11694 void *sk_shift(_STACK *st);
11695 void *sk_pop(_STACK *st);
11696 void sk_zero(_STACK *st);
11697 int (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *)))
11698  (const void *, const void *);
11699 _STACK *sk_dup(_STACK *st);
11700 void sk_sort(_STACK *st);
11701 int sk_is_sorted(const _STACK *st);
11702 # 129 "/usr/include/openssl/crypto.h" 2 3 4
11703 # 1 "/usr/include/openssl/safestack.h" 1 3 4
11704 /* ====================================================================
11705  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
11706  *
11707  * Redistribution and use in source and binary forms, with or without
11708  * modification, are permitted provided that the following conditions
11709  * are met:
11710  *
11711  * 1. Redistributions of source code must retain the above copyright
11712  *    notice, this list of conditions and the following disclaimer.
11713  *
11714  * 2. Redistributions in binary form must reproduce the above copyright
11715  *    notice, this list of conditions and the following disclaimer in
11716  *    the documentation and/or other materials provided with the
11717  *    distribution.
11718  *
11719  * 3. All advertising materials mentioning features or use of this
11720  *    software must display the following acknowledgment:
11721  *    "This product includes software developed by the OpenSSL Project
11722  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11723  *
11724  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11725  *    endorse or promote products derived from this software without
11726  *    prior written permission. For written permission, please contact
11727  *    openssl-core@openssl.org.
11728  *
11729  * 5. Products derived from this software may not be called "OpenSSL"
11730  *    nor may "OpenSSL" appear in their names without prior written
11731  *    permission of the OpenSSL Project.
11732  *
11733  * 6. Redistributions of any form whatsoever must retain the following
11734  *    acknowledgment:
11735  *    "This product includes software developed by the OpenSSL Project
11736  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11737  *
11738  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11739  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11740  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11741  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11742  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11743  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11744  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11745  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11746  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11747  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11748  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11749  * OF THE POSSIBILITY OF SUCH DAMAGE.
11750  * ====================================================================
11751  *
11752  * This product includes cryptographic software written by Eric Young
11753  * (eay@cryptsoft.com).  This product includes software written by Tim
11754  * Hudson (tjh@cryptsoft.com).
11755  *
11756  */
11757 
11758 
11759 
11760 
11761 # 1 "/usr/include/openssl/stack.h" 1 3 4
11762 /* crypto/stack/stack.h */
11763 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11764  * All rights reserved.
11765  *
11766  * This package is an SSL implementation written
11767  * by Eric Young (eay@cryptsoft.com).
11768  * The implementation was written so as to conform with Netscapes SSL.
11769  *
11770  * This library is free for commercial and non-commercial use as long as
11771  * the following conditions are aheared to.  The following conditions
11772  * apply to all code found in this distribution, be it the RC4, RSA,
11773  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11774  * included with this distribution is covered by the same copyright terms
11775  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11776  *
11777  * Copyright remains Eric Young's, and as such any Copyright notices in
11778  * the code are not to be removed.
11779  * If this package is used in a product, Eric Young should be given attribution
11780  * as the author of the parts of the library used.
11781  * This can be in the form of a textual message at program startup or
11782  * in documentation (online or textual) provided with the package.
11783  *
11784  * Redistribution and use in source and binary forms, with or without
11785  * modification, are permitted provided that the following conditions
11786  * are met:
11787  * 1. Redistributions of source code must retain the copyright
11788  *    notice, this list of conditions and the following disclaimer.
11789  * 2. Redistributions in binary form must reproduce the above copyright
11790  *    notice, this list of conditions and the following disclaimer in the
11791  *    documentation and/or other materials provided with the distribution.
11792  * 3. All advertising materials mentioning features or use of this software
11793  *    must display the following acknowledgement:
11794  *    "This product includes cryptographic software written by
11795  *     Eric Young (eay@cryptsoft.com)"
11796  *    The word 'cryptographic' can be left out if the rouines from the library
11797  *    being used are not cryptographic related :-).
11798  * 4. If you include any Windows specific code (or a derivative thereof) from
11799  *    the apps directory (application code) you must include an acknowledgement:
11800  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11801  *
11802  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11803  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11804  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11805  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11806  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11807  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11808  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11809  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11810  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11811  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11812  * SUCH DAMAGE.
11813  *
11814  * The licence and distribution terms for any publically available version or
11815  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11816  * copied and put under another distribution licence
11817  * [including the GNU Public Licence.]
11818  */
11819 # 59 "/usr/include/openssl/safestack.h" 2 3 4
11820 # 69 "/usr/include/openssl/safestack.h" 3 4
11821 /*
11822  * In C++ we get problems because an explicit cast is needed from (void *) we
11823  * use CHECKED_STACK_OF to ensure the correct type is passed in the macros
11824  * below.
11825  */
11826 # 102 "/usr/include/openssl/safestack.h" 3 4
11827 /* nada (obsolete in new safestack approach)*/
11828 
11829 
11830 /*-
11831  * Strings are special: normally an lhash entry will point to a single
11832  * (somewhat) mutable object. In the case of strings:
11833  *
11834  * a) Instead of a single char, there is an array of chars, NUL-terminated.
11835  * b) The string may have be immutable.
11836  *
11837  * So, they need their own declarations. Especially important for
11838  * type-checking tools, such as Deputy.
11839  *
11840  * In practice, however, it appears to be hard to have a const
11841  * string. For now, I'm settling for dealing with the fact it is a
11842  * string at all.
11843  */
11844 typedef char *OPENSSL_STRING;
11845 
11846 typedef const char *OPENSSL_CSTRING;
11847 
11848 /*
11849  * Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
11850  * STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned
11851  * above, instead of a single char each entry is a NUL-terminated array of
11852  * chars. So, we have to implement STRING specially for STACK_OF. This is
11853  * dealt with in the autogenerated macros below.
11854  */
11855 
11856 struct stack_st_OPENSSL_STRING { _STACK stack; };
11857 
11858 /*
11859  * Similarly, we sometimes use a block of characters, NOT nul-terminated.
11860  * These should also be distinguished from "normal" stacks.
11861  */
11862 typedef void *OPENSSL_BLOCK;
11863 struct stack_st_OPENSSL_BLOCK { _STACK stack; };
11864 
11865 /*
11866  * SKM_sk_... stack macros are internal to safestack.h: never use them
11867  * directly, use sk_<type>_... instead
11868  */
11869 # 211 "/usr/include/openssl/safestack.h" 3 4
11870 /*
11871  * This block of defines is updated by util/mkstack.pl, please do not touch!
11872  */
11873 # 130 "/usr/include/openssl/crypto.h" 2 3 4
11874 # 1 "/usr/include/openssl/opensslv.h" 1 3 4
11875 
11876 
11877 
11878 
11879 
11880 
11881 
11882 /*-
11883  * Numeric release version identifier:
11884  * MNNFFPPS: major minor fix patch status
11885  * The status nibble has one of the values 0 for development, 1 to e for betas
11886  * 1 to 14, and f for release.  The patch level is exactly that.
11887  * For example:
11888  * 0.9.3-dev      0x00903000
11889  * 0.9.3-beta1    0x00903001
11890  * 0.9.3-beta2-dev 0x00903002
11891  * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)
11892  * 0.9.3          0x0090300f
11893  * 0.9.3a         0x0090301f
11894  * 0.9.4          0x0090400f
11895  * 1.2.3z         0x102031af
11896  *
11897  * For continuity reasons (because 0.9.5 is already out, and is coded
11898  * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
11899  * part is slightly different, by setting the highest bit.  This means
11900  * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start
11901  * with 0x0090600S...
11902  *
11903  * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
11904  * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
11905  *  major minor fix final patch/beta)
11906  */
11907 # 41 "/usr/include/openssl/opensslv.h" 3 4
11908 /*-
11909  * The macros below are to be used for shared library (.so, .dll, ...)
11910  * versioning.  That kind of versioning works a bit differently between
11911  * operating systems.  The most usual scheme is to set a major and a minor
11912  * number, and have the runtime loader check that the major number is equal
11913  * to what it was at application link time, while the minor number has to
11914  * be greater or equal to what it was at application link time.  With this
11915  * scheme, the version number is usually part of the file name, like this:
11916  *
11917  *      libcrypto.so.0.9
11918  *
11919  * Some unixen also make a softlink with the major verson number only:
11920  *
11921  *      libcrypto.so.0
11922  *
11923  * On Tru64 and IRIX 6.x it works a little bit differently.  There, the
11924  * shared library version is stored in the file, and is actually a series
11925  * of versions, separated by colons.  The rightmost version present in the
11926  * library when linking an application is stored in the application to be
11927  * matched at run time.  When the application is run, a check is done to
11928  * see if the library version stored in the application matches any of the
11929  * versions in the version string of the library itself.
11930  * This version string can be constructed in any way, depending on what
11931  * kind of matching is desired.  However, to implement the same scheme as
11932  * the one used in the other unixen, all compatible versions, from lowest
11933  * to highest, should be part of the string.  Consecutive builds would
11934  * give the following versions strings:
11935  *
11936  *      3.0
11937  *      3.0:3.1
11938  *      3.0:3.1:3.2
11939  *      4.0
11940  *      4.0:4.1
11941  *
11942  * Notice how version 4 is completely incompatible with version, and
11943  * therefore give the breach you can see.
11944  *
11945  * There may be other schemes as well that I haven't yet discovered.
11946  *
11947  * So, here's the way it works here: first of all, the library version
11948  * number doesn't need at all to match the overall OpenSSL version.
11949  * However, it's nice and more understandable if it actually does.
11950  * The current library version is stored in the macro SHLIB_VERSION_NUMBER,
11951  * which is just a piece of text in the format "M.m.e" (Major, minor, edit).
11952  * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
11953  * we need to keep a history of version numbers, which is done in the
11954  * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and
11955  * should only keep the versions that are binary compatible with the current.
11956  */
11957 # 131 "/usr/include/openssl/crypto.h" 2 3 4
11958 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
11959 /* ====================================================================
11960  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
11961  *
11962  * Redistribution and use in source and binary forms, with or without
11963  * modification, are permitted provided that the following conditions
11964  * are met:
11965  *
11966  * 1. Redistributions of source code must retain the above copyright
11967  *    notice, this list of conditions and the following disclaimer.
11968  *
11969  * 2. Redistributions in binary form must reproduce the above copyright
11970  *    notice, this list of conditions and the following disclaimer in
11971  *    the documentation and/or other materials provided with the
11972  *    distribution.
11973  *
11974  * 3. All advertising materials mentioning features or use of this
11975  *    software must display the following acknowledgment:
11976  *    "This product includes software developed by the OpenSSL Project
11977  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11978  *
11979  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11980  *    endorse or promote products derived from this software without
11981  *    prior written permission. For written permission, please contact
11982  *    openssl-core@openssl.org.
11983  *
11984  * 5. Products derived from this software may not be called "OpenSSL"
11985  *    nor may "OpenSSL" appear in their names without prior written
11986  *    permission of the OpenSSL Project.
11987  *
11988  * 6. Redistributions of any form whatsoever must retain the following
11989  *    acknowledgment:
11990  *    "This product includes software developed by the OpenSSL Project
11991  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11992  *
11993  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11994  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11995  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11996  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11997  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11998  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11999  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12000  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12001  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12002  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12003  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12004  * OF THE POSSIBILITY OF SUCH DAMAGE.
12005  * ====================================================================
12006  *
12007  * This product includes cryptographic software written by Eric Young
12008  * (eay@cryptsoft.com).  This product includes software written by Tim
12009  * Hudson (tjh@cryptsoft.com).
12010  *
12011  */
12012 # 62 "/usr/include/openssl/ossl_typ.h" 3 4
12013 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
12014 /* e_os2.h */
12015 /* ====================================================================
12016  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
12017  *
12018  * Redistribution and use in source and binary forms, with or without
12019  * modification, are permitted provided that the following conditions
12020  * are met:
12021  *
12022  * 1. Redistributions of source code must retain the above copyright
12023  *    notice, this list of conditions and the following disclaimer.
12024  *
12025  * 2. Redistributions in binary form must reproduce the above copyright
12026  *    notice, this list of conditions and the following disclaimer in
12027  *    the documentation and/or other materials provided with the
12028  *    distribution.
12029  *
12030  * 3. All advertising materials mentioning features or use of this
12031  *    software must display the following acknowledgment:
12032  *    "This product includes software developed by the OpenSSL Project
12033  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12034  *
12035  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12036  *    endorse or promote products derived from this software without
12037  *    prior written permission. For written permission, please contact
12038  *    openssl-core@openssl.org.
12039  *
12040  * 5. Products derived from this software may not be called "OpenSSL"
12041  *    nor may "OpenSSL" appear in their names without prior written
12042  *    permission of the OpenSSL Project.
12043  *
12044  * 6. Redistributions of any form whatsoever must retain the following
12045  *    acknowledgment:
12046  *    "This product includes software developed by the OpenSSL Project
12047  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12048  *
12049  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12050  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12051  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12052  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12053  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12054  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12055  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12056  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12057  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12058  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12059  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12060  * OF THE POSSIBILITY OF SUCH DAMAGE.
12061  * ====================================================================
12062  *
12063  * This product includes cryptographic software written by Eric Young
12064  * (eay@cryptsoft.com).  This product includes software written by Tim
12065  * Hudson (tjh@cryptsoft.com).
12066  *
12067  */
12068 
12069 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
12070 /* opensslconf.h */
12071 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
12072 
12073 
12074 
12075 
12076 /* OpenSSL was configured with the following options: */
12077 # 108 "/usr/include/openssl/opensslconf.h" 3 4
12078 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
12079    asks for it.  This is a transient feature that is provided for those
12080    who haven't had the time to do the appropriate changes in their
12081    applications.  */
12082 # 204 "/usr/include/openssl/opensslconf.h" 3 4
12083 /* crypto/opensslconf.h.in */
12084 
12085 /* Generate 80386 code? */
12086 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
12087 # 63 "/usr/include/openssl/ossl_typ.h" 2 3 4
12088 # 83 "/usr/include/openssl/ossl_typ.h" 3 4
12089 typedef struct asn1_string_st ASN1_INTEGER;
12090 typedef struct asn1_string_st ASN1_ENUMERATED;
12091 typedef struct asn1_string_st ASN1_BIT_STRING;
12092 typedef struct asn1_string_st ASN1_OCTET_STRING;
12093 typedef struct asn1_string_st ASN1_PRINTABLESTRING;
12094 typedef struct asn1_string_st ASN1_T61STRING;
12095 typedef struct asn1_string_st ASN1_IA5STRING;
12096 typedef struct asn1_string_st ASN1_GENERALSTRING;
12097 typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
12098 typedef struct asn1_string_st ASN1_BMPSTRING;
12099 typedef struct asn1_string_st ASN1_UTCTIME;
12100 typedef struct asn1_string_st ASN1_TIME;
12101 typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
12102 typedef struct asn1_string_st ASN1_VISIBLESTRING;
12103 typedef struct asn1_string_st ASN1_UTF8STRING;
12104 typedef struct asn1_string_st ASN1_STRING;
12105 typedef int ASN1_BOOLEAN;
12106 typedef int ASN1_NULL;
12107 
12108 
12109 typedef struct asn1_object_st ASN1_OBJECT;
12110 
12111 typedef struct ASN1_ITEM_st ASN1_ITEM;
12112 typedef struct asn1_pctx_st ASN1_PCTX;
12113 # 120 "/usr/include/openssl/ossl_typ.h" 3 4
12114 typedef struct bignum_st BIGNUM;
12115 typedef struct bignum_ctx BN_CTX;
12116 typedef struct bn_blinding_st BN_BLINDING;
12117 typedef struct bn_mont_ctx_st BN_MONT_CTX;
12118 typedef struct bn_recp_ctx_st BN_RECP_CTX;
12119 typedef struct bn_gencb_st BN_GENCB;
12120 
12121 typedef struct buf_mem_st BUF_MEM;
12122 
12123 typedef struct evp_cipher_st EVP_CIPHER;
12124 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
12125 typedef struct env_md_st EVP_MD;
12126 typedef struct env_md_ctx_st EVP_MD_CTX;
12127 typedef struct evp_pkey_st EVP_PKEY;
12128 
12129 typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
12130 
12131 typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
12132 typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
12133 
12134 typedef struct dh_st DH;
12135 typedef struct dh_method DH_METHOD;
12136 
12137 typedef struct dsa_st DSA;
12138 typedef struct dsa_method DSA_METHOD;
12139 
12140 typedef struct rsa_st RSA;
12141 typedef struct rsa_meth_st RSA_METHOD;
12142 
12143 typedef struct rand_meth_st RAND_METHOD;
12144 
12145 typedef struct ecdh_method ECDH_METHOD;
12146 typedef struct ecdsa_method ECDSA_METHOD;
12147 
12148 typedef struct x509_st X509;
12149 typedef struct X509_algor_st X509_ALGOR;
12150 typedef struct X509_crl_st X509_CRL;
12151 typedef struct x509_crl_method_st X509_CRL_METHOD;
12152 typedef struct x509_revoked_st X509_REVOKED;
12153 typedef struct X509_name_st X509_NAME;
12154 typedef struct X509_pubkey_st X509_PUBKEY;
12155 typedef struct x509_store_st X509_STORE;
12156 typedef struct x509_store_ctx_st X509_STORE_CTX;
12157 
12158 typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
12159 
12160 typedef struct v3_ext_ctx X509V3_CTX;
12161 typedef struct conf_st CONF;
12162 
12163 typedef struct store_st STORE;
12164 typedef struct store_method_st STORE_METHOD;
12165 
12166 typedef struct ui_st UI;
12167 typedef struct ui_method_st UI_METHOD;
12168 
12169 typedef struct st_ERR_FNS ERR_FNS;
12170 
12171 typedef struct engine_st ENGINE;
12172 typedef struct ssl_st SSL;
12173 typedef struct ssl_ctx_st SSL_CTX;
12174 
12175 typedef struct comp_method_st COMP_METHOD;
12176 
12177 typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
12178 typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
12179 typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
12180 typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
12181 
12182 typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
12183 typedef struct DIST_POINT_st DIST_POINT;
12184 typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
12185 typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
12186 
12187   /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */
12188 
12189 
12190 
12191 typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
12192 /* Callback types for crypto.h */
12193 typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
12194                            int idx, long argl, void *argp);
12195 typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
12196                              int idx, long argl, void *argp);
12197 typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
12198                            void *from_d, int idx, long argl, void *argp);
12199 
12200 typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
12201 typedef struct ocsp_response_st OCSP_RESPONSE;
12202 typedef struct ocsp_responder_id_st OCSP_RESPID;
12203 # 132 "/usr/include/openssl/crypto.h" 2 3 4
12204 
12205 
12206 
12207 
12208 
12209 /*
12210  * Resolve problems on some operating systems with symbol names that clash
12211  * one way or another
12212  */
12213 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
12214 /* ====================================================================
12215  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
12216  *
12217  * Redistribution and use in source and binary forms, with or without
12218  * modification, are permitted provided that the following conditions
12219  * are met:
12220  *
12221  * 1. Redistributions of source code must retain the above copyright
12222  *    notice, this list of conditions and the following disclaimer.
12223  *
12224  * 2. Redistributions in binary form must reproduce the above copyright
12225  *    notice, this list of conditions and the following disclaimer in
12226  *    the documentation and/or other materials provided with the
12227  *    distribution.
12228  *
12229  * 3. All advertising materials mentioning features or use of this
12230  *    software must display the following acknowledgment:
12231  *    "This product includes software developed by the OpenSSL Project
12232  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12233  *
12234  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12235  *    endorse or promote products derived from this software without
12236  *    prior written permission. For written permission, please contact
12237  *    openssl-core@openssl.org.
12238  *
12239  * 5. Products derived from this software may not be called "OpenSSL"
12240  *    nor may "OpenSSL" appear in their names without prior written
12241  *    permission of the OpenSSL Project.
12242  *
12243  * 6. Redistributions of any form whatsoever must retain the following
12244  *    acknowledgment:
12245  *    "This product includes software developed by the OpenSSL Project
12246  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12247  *
12248  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12249  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12250  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12251  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12252  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12253  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12254  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12255  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12256  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12257  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12258  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12259  * OF THE POSSIBILITY OF SUCH DAMAGE.
12260  * ====================================================================
12261  *
12262  * This product includes cryptographic software written by Eric Young
12263  * (eay@cryptsoft.com).  This product includes software written by Tim
12264  * Hudson (tjh@cryptsoft.com).
12265  *
12266  */
12267 
12268 
12269 
12270 
12271 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
12272 /* e_os2.h */
12273 /* ====================================================================
12274  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
12275  *
12276  * Redistribution and use in source and binary forms, with or without
12277  * modification, are permitted provided that the following conditions
12278  * are met:
12279  *
12280  * 1. Redistributions of source code must retain the above copyright
12281  *    notice, this list of conditions and the following disclaimer.
12282  *
12283  * 2. Redistributions in binary form must reproduce the above copyright
12284  *    notice, this list of conditions and the following disclaimer in
12285  *    the documentation and/or other materials provided with the
12286  *    distribution.
12287  *
12288  * 3. All advertising materials mentioning features or use of this
12289  *    software must display the following acknowledgment:
12290  *    "This product includes software developed by the OpenSSL Project
12291  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12292  *
12293  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12294  *    endorse or promote products derived from this software without
12295  *    prior written permission. For written permission, please contact
12296  *    openssl-core@openssl.org.
12297  *
12298  * 5. Products derived from this software may not be called "OpenSSL"
12299  *    nor may "OpenSSL" appear in their names without prior written
12300  *    permission of the OpenSSL Project.
12301  *
12302  * 6. Redistributions of any form whatsoever must retain the following
12303  *    acknowledgment:
12304  *    "This product includes software developed by the OpenSSL Project
12305  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12306  *
12307  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12308  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12309  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12310  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12311  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12312  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12313  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12314  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12315  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12316  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12317  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12318  * OF THE POSSIBILITY OF SUCH DAMAGE.
12319  * ====================================================================
12320  *
12321  * This product includes cryptographic software written by Eric Young
12322  * (eay@cryptsoft.com).  This product includes software written by Tim
12323  * Hudson (tjh@cryptsoft.com).
12324  *
12325  */
12326 
12327 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
12328 /* opensslconf.h */
12329 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
12330 
12331 
12332 
12333 
12334 /* OpenSSL was configured with the following options: */
12335 # 108 "/usr/include/openssl/opensslconf.h" 3 4
12336 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
12337    asks for it.  This is a transient feature that is provided for those
12338    who haven't had the time to do the appropriate changes in their
12339    applications.  */
12340 # 204 "/usr/include/openssl/opensslconf.h" 3 4
12341 /* crypto/opensslconf.h.in */
12342 
12343 /* Generate 80386 code? */
12344 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
12345 # 59 "/usr/include/openssl/symhacks.h" 2 3 4
12346 
12347 /*
12348  * Hacks to solve the problem with linkers incapable of handling very long
12349  * symbol names.  In the case of VMS, the limit is 31 characters on VMS for
12350  * VAX.
12351  */
12352 /*
12353  * Note that this affects util/libeay.num and util/ssleay.num...  you may
12354  * change those manually, but that's not recommended, as those files are
12355  * controlled centrally and updated on Unix, and the central definition may
12356  * disagree with yours, which in turn may come with shareable library
12357  * incompatibilities.
12358  */
12359 # 481 "/usr/include/openssl/symhacks.h" 3 4
12360 /* Case insensitive linking causes problems.... */
12361 # 142 "/usr/include/openssl/crypto.h" 2 3 4
12362 
12363 
12364 
12365 
12366 
12367 /* Backward compatibility to SSLeay */
12368 /*
12369  * This is more to be used to check the correct DLL is being used in the MS
12370  * world.
12371  */
12372 
12373 
12374 /* #define SSLEAY_OPTIONS       1 no longer supported */
12375 
12376 
12377 
12378 
12379 
12380 /* Already declared in ossl_typ.h */
12381 # 174 "/usr/include/openssl/crypto.h" 3 4
12382 /* A generic structure to pass assorted data in a expandable way */
12383 typedef struct openssl_item_st {
12384     int code;
12385     void *value; /* Not used for flag attributes */
12386     size_t value_size; /* Max size of value for output, length for
12387                                  * input */
12388     size_t *value_length; /* Returned length of value for output */
12389 } OPENSSL_ITEM;
12390 
12391 /*
12392  * When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
12393  * names in cryptlib.c
12394  */
12395 # 256 "/usr/include/openssl/crypto.h" 3 4
12396 /*
12397  * Some applications as well as some parts of OpenSSL need to allocate and
12398  * deallocate locks in a dynamic fashion.  The following typedef makes this
12399  * possible in a type-safe manner.
12400  */
12401 /* struct CRYPTO_dynlock_value has to be defined by the application. */
12402 typedef struct {
12403     int references;
12404     struct CRYPTO_dynlock_value *data;
12405 } CRYPTO_dynlock;
12406 
12407 /*
12408  * The following can be used to detect memory leaks in the SSLeay library. It
12409  * used, it turns on malloc checking
12410  */
12411 
12412 
12413 
12414 
12415 
12416 
12417 /*
12418  * The following are bit values to turn on or off options connected to the
12419  * malloc checking functionality
12420  */
12421 
12422 /* Adds time to the memory checking information */
12423 
12424 /* Adds thread number to the memory checking information */
12425 
12426 
12427 
12428 
12429 /* predec of the BIO type */
12430 typedef struct bio_st BIO_dummy;
12431 
12432 struct crypto_ex_data_st {
12433     struct stack_st_void *sk;
12434     /* gcc is screwing up this data structure :-( */
12435     int dummy;
12436 };
12437 struct stack_st_void { _STACK stack; };
12438 
12439 /*
12440  * This stuff is basically class callback functions The current classes are
12441  * SSL_CTX, SSL, SSL_SESSION, and a few more
12442  */
12443 
12444 typedef struct crypto_ex_data_func_st {
12445     long argl; /* Arbitary long */
12446     void *argp; /* Arbitary void * */
12447     CRYPTO_EX_new *new_func;
12448     CRYPTO_EX_free *free_func;
12449     CRYPTO_EX_dup *dup_func;
12450 } CRYPTO_EX_DATA_FUNCS;
12451 
12452 struct stack_st_CRYPTO_EX_DATA_FUNCS { _STACK stack; };
12453 
12454 /*
12455  * Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA
12456  * entry.
12457  */
12458 # 336 "/usr/include/openssl/crypto.h" 3 4
12459 /*
12460  * Dynamically assigned indexes start from this value (don't use directly,
12461  * use via CRYPTO_ex_data_new_class).
12462  */
12463 
12464 
12465 /*
12466  * This is the default callbacks, but we can have others as well: this is
12467  * needed in Win32 where the application malloc and the library malloc may
12468  * not be the same.
12469  */
12470 # 356 "/usr/include/openssl/crypto.h" 3 4
12471 /*
12472  * Set standard debugging functions (not done by default unless CRYPTO_MDEBUG
12473  * is defined)
12474  */
12475 # 369 "/usr/include/openssl/crypto.h" 3 4
12476 int CRYPTO_mem_ctrl(int mode);
12477 int CRYPTO_is_mem_check_on(void);
12478 
12479 /* for applications */
12480 
12481 
12482 
12483 /* for library-internal use */
12484 # 396 "/usr/include/openssl/crypto.h" 3 4
12485 const char *SSLeay_version(int type);
12486 unsigned long SSLeay(void);
12487 
12488 int OPENSSL_issetugid(void);
12489 
12490 /* An opaque type representing an implementation of "ex_data" support */
12491 typedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL;
12492 /* Return an opaque pointer to the current "ex_data" implementation */
12493 const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void);
12494 /* Sets the "ex_data" implementation to be used (if it's not too late) */
12495 int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i);
12496 /* Get a new "ex_data" class, and return the corresponding "class_index" */
12497 int CRYPTO_ex_data_new_class(void);
12498 /* Within a given class, get/register a new index */
12499 int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
12500                             CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
12501                             CRYPTO_EX_free *free_func);
12502 /*
12503  * Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a
12504  * given class (invokes whatever per-class callbacks are applicable)
12505  */
12506 int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
12507 int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
12508                        CRYPTO_EX_DATA *from);
12509 void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
12510 /*
12511  * Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular
12512  * index (relative to the class type involved)
12513  */
12514 int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
12515 void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
12516 /*
12517  * This function cleans up all "ex_data" state. It mustn't be called under
12518  * potential race-conditions.
12519  */
12520 void CRYPTO_cleanup_all_ex_data(void);
12521 
12522 int CRYPTO_get_new_lockid(char *name);
12523 
12524 int CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */
12525 void CRYPTO_lock(int mode, int type, const char *file, int line);
12526 void CRYPTO_set_locking_callback(void (*func) (int mode, int type,
12527                                                const char *file, int line));
12528 void (*CRYPTO_get_locking_callback(void)) (int mode, int type,
12529                                            const char *file, int line);
12530 void CRYPTO_set_add_lock_callback(int (*func)
12531                                    (int *num, int mount, int type,
12532                                     const char *file, int line));
12533 int (*CRYPTO_get_add_lock_callback(void)) (int *num, int mount, int type,
12534                                            const char *file, int line);
12535 
12536 /* Don't use this structure directly. */
12537 typedef struct crypto_threadid_st {
12538     void *ptr;
12539     unsigned long val;
12540 } CRYPTO_THREADID;
12541 /* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
12542 void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val);
12543 void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr);
12544 int CRYPTO_THREADID_set_callback(void (*threadid_func) (CRYPTO_THREADID *));
12545 void (*CRYPTO_THREADID_get_callback(void)) (CRYPTO_THREADID *);
12546 void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
12547 int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
12548 void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
12549 unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
12550 
12551 void CRYPTO_set_id_callback(unsigned long (*func) (void));
12552 unsigned long (*CRYPTO_get_id_callback(void)) (void);
12553 unsigned long CRYPTO_thread_id(void);
12554 
12555 
12556 const char *CRYPTO_get_lock_name(int type);
12557 int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
12558                     int line);
12559 
12560 int CRYPTO_get_new_dynlockid(void);
12561 void CRYPTO_destroy_dynlockid(int i);
12562 struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
12563 void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value
12564                                         *(*dyn_create_function) (const char
12565                                                                  *file,
12566                                                                  int line));
12567 void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)
12568                                        (int mode,
12569                                         struct CRYPTO_dynlock_value *l,
12570                                         const char *file, int line));
12571 void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)
12572                                           (struct CRYPTO_dynlock_value *l,
12573                                            const char *file, int line));
12574 struct CRYPTO_dynlock_value
12575 *(*CRYPTO_get_dynlock_create_callback(void)) (const char *file, int line);
12576 void (*CRYPTO_get_dynlock_lock_callback(void)) (int mode,
12577                                                 struct CRYPTO_dynlock_value
12578                                                 *l, const char *file,
12579                                                 int line);
12580 void (*CRYPTO_get_dynlock_destroy_callback(void)) (struct CRYPTO_dynlock_value
12581                                                    *l, const char *file,
12582                                                    int line);
12583 
12584 /*
12585  * CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- call
12586  * the latter last if you need different functions
12587  */
12588 int CRYPTO_set_mem_functions(void *(*m) (size_t), void *(*r) (void *, size_t),
12589                              void (*f) (void *));
12590 int CRYPTO_set_locked_mem_functions(void *(*m) (size_t),
12591                                     void (*free_func) (void *));
12592 int CRYPTO_set_mem_ex_functions(void *(*m) (size_t, const char *, int),
12593                                 void *(*r) (void *, size_t, const char *,
12594                                             int), void (*f) (void *));
12595 int CRYPTO_set_locked_mem_ex_functions(void *(*m) (size_t, const char *, int),
12596                                        void (*free_func) (void *));
12597 int CRYPTO_set_mem_debug_functions(void (*m)
12598                                     (void *, int, const char *, int, int),
12599                                    void (*r) (void *, void *, int,
12600                                               const char *, int, int),
12601                                    void (*f) (void *, int), void (*so) (long),
12602                                    long (*go) (void));
12603 void CRYPTO_get_mem_functions(void *(**m) (size_t),
12604                               void *(**r) (void *, size_t),
12605                               void (**f) (void *));
12606 void CRYPTO_get_locked_mem_functions(void *(**m) (size_t),
12607                                      void (**f) (void *));
12608 void CRYPTO_get_mem_ex_functions(void *(**m) (size_t, const char *, int),
12609                                  void *(**r) (void *, size_t, const char *,
12610                                               int), void (**f) (void *));
12611 void CRYPTO_get_locked_mem_ex_functions(void
12612                                         *(**m) (size_t, const char *, int),
12613                                         void (**f) (void *));
12614 void CRYPTO_get_mem_debug_functions(void (**m)
12615                                      (void *, int, const char *, int, int),
12616                                     void (**r) (void *, void *, int,
12617                                                 const char *, int, int),
12618                                     void (**f) (void *, int),
12619                                     void (**so) (long), long (**go) (void));
12620 
12621 void *CRYPTO_malloc_locked(int num, const char *file, int line);
12622 void CRYPTO_free_locked(void *ptr);
12623 void *CRYPTO_malloc(int num, const char *file, int line);
12624 char *CRYPTO_strdup(const char *str, const char *file, int line);
12625 void CRYPTO_free(void *ptr);
12626 void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
12627 void *CRYPTO_realloc_clean(void *addr, int old_num, int num, const char *file,
12628                            int line);
12629 void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
12630 
12631 void OPENSSL_cleanse(void *ptr, size_t len);
12632 
12633 void CRYPTO_set_mem_debug_options(long bits);
12634 long CRYPTO_get_mem_debug_options(void);
12635 
12636 
12637 
12638 int CRYPTO_push_info_(const char *info, const char *file, int line);
12639 int CRYPTO_pop_info(void);
12640 int CRYPTO_remove_all_info(void);
12641 
12642 /*
12643  * Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro;
12644  * used as default in CRYPTO_MDEBUG compilations):
12645  */
12646 /*-
12647  * The last argument has the following significance:
12648  *
12649  * 0:   called before the actual memory allocation has taken place
12650  * 1:   called after the actual memory allocation has taken place
12651  */
12652 void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,
12653                        int before_p);
12654 void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, const char *file,
12655                         int line, int before_p);
12656 void CRYPTO_dbg_free(void *addr, int before_p);
12657 /*-
12658  * Tell the debugging code about options.  By default, the following values
12659  * apply:
12660  *
12661  * 0:                           Clear all options.
12662  * V_CRYPTO_MDEBUG_TIME (1):    Set the "Show Time" option.
12663  * V_CRYPTO_MDEBUG_THREAD (2):  Set the "Show Thread Number" option.
12664  * V_CRYPTO_MDEBUG_ALL (3):     1 + 2
12665  */
12666 void CRYPTO_dbg_set_options(long bits);
12667 long CRYPTO_dbg_get_options(void);
12668 
12669 
12670 void CRYPTO_mem_leaks_fp(FILE *);
12671 
12672 void CRYPTO_mem_leaks(struct bio_st *bio);
12673 /* unsigned long order, char *file, int line, int num_bytes, char *addr */
12674 typedef void *CRYPTO_MEM_LEAK_CB (unsigned long, const char *, int, int,
12675                                   void *);
12676 void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
12677 
12678 /* die if we have to */
12679 void OpenSSLDie(const char *file, int line, const char *assertion);
12680 
12681 
12682 unsigned long *OPENSSL_ia32cap_loc(void);
12683 
12684 int OPENSSL_isservice(void);
12685 
12686 int FIPS_mode(void);
12687 int FIPS_mode_set(int r);
12688 
12689 void OPENSSL_init(void);
12690 # 624 "/usr/include/openssl/crypto.h" 3 4
12691 /*
12692  * CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.
12693  * It takes an amount of time dependent on |len|, but independent of the
12694  * contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements
12695  * into a defined order as the return value when a != b is undefined, other
12696  * than to be non-zero.
12697  */
12698 int CRYPTO_memcmp(const volatile void *a, const volatile void *b, size_t len);
12699 
12700 /* BEGIN ERROR CODES */
12701 /*
12702  * The following lines are auto generated by the script mkerr.pl. Any changes
12703  * made after this point may be overwritten when the script is next run.
12704  */
12705 void ERR_load_CRYPTO_strings(void);
12706 
12707 /* Error codes for the CRYPTO functions. */
12708 
12709 /* Function codes. */
12710 # 654 "/usr/include/openssl/crypto.h" 3 4
12711 /* Reason codes. */
12712 # 70 "/usr/include/openssl/bio.h" 2 3 4
12713 # 83 "/usr/include/openssl/bio.h" 3 4
12714 /* These are the 'types' of BIOs */
12715 # 116 "/usr/include/openssl/bio.h" 3 4
12716 /*
12717  * BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
12718  * BIO_set_fp(in,stdin,BIO_NOCLOSE);
12719  */
12720 
12721 
12722 
12723 /*
12724  * These are used in the following macros and are passed to BIO_ctrl()
12725  */
12726 # 139 "/usr/include/openssl/bio.h" 3 4
12727 /* callback is int cb(BIO *bio,state,ret); */
12728 
12729 
12730 
12731 
12732 
12733 /* dgram BIO stuff */
12734 # 157 "/usr/include/openssl/bio.h" 3 4
12735 /* #ifdef IP_MTU_DISCOVER */
12736 
12737 /* #endif */
12738 # 196 "/usr/include/openssl/bio.h" 3 4
12739 /* modifiers */
12740 # 208 "/usr/include/openssl/bio.h" 3 4
12741 /*
12742  * "UPLINK" flag denotes file descriptors provided by application. It
12743  * defaults to 0, as most platforms don't require UPLINK interface.
12744  */
12745 
12746 
12747 
12748 /* Used in BIO_gethostbyname() */
12749 
12750 
12751 
12752 
12753 
12754 
12755 /* Mostly used in the SSL BIO */
12756 /*-
12757  * Not used anymore
12758  * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10
12759  * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20
12760  * #define BIO_FLAGS_PROTOCOL_STARTUP   0x40
12761  */
12762 
12763 
12764 
12765 /*
12766  * This is used with memory BIOs: it means we shouldn't free up or change the
12767  * data in any way.
12768  */
12769 
12770 
12771 typedef struct bio_st BIO;
12772 
12773 void BIO_set_flags(BIO *b, int flags);
12774 int BIO_test_flags(const BIO *b, int flags);
12775 void BIO_clear_flags(BIO *b, int flags);
12776 # 252 "/usr/include/openssl/bio.h" 3 4
12777 /* These are normally used internally in BIOs */
12778 
12779 
12780 
12781 
12782 
12783 /* These should be used by the application to tell why we should retry */
12784 
12785 
12786 
12787 
12788 
12789 
12790 /*
12791  * The next three are used in conjunction with the BIO_should_io_special()
12792  * condition.  After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
12793  * *reason); will walk the BIO stack and return the 'reason' for the special
12794  * and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
12795  * the code.
12796  */
12797 /*
12798  * Returned from the SSL bio when the certificate retrieval code had an error
12799  */
12800 
12801 /* Returned from the connect BIO when a connect would have blocked */
12802 
12803 /* Returned from the accept BIO when an accept would have blocked */
12804 
12805 
12806 /* These are passed by the BIO callback */
12807 
12808 
12809 
12810 
12811 
12812 
12813 
12814 /*
12815  * The callback is called before and after the underling operation, The
12816  * BIO_CB_RETURN flag indicates if it is after the call
12817  */
12818 
12819 
12820 
12821 
12822 
12823 long (*BIO_get_callback(const BIO *b)) (struct bio_st *, int, const char *,
12824                                         int, long, long);
12825 void BIO_set_callback(BIO *b,
12826                       long (*callback) (struct bio_st *, int, const char *,
12827                                         int, long, long));
12828 char *BIO_get_callback_arg(const BIO *b);
12829 void BIO_set_callback_arg(BIO *b, char *arg);
12830 
12831 const char *BIO_method_name(const BIO *b);
12832 int BIO_method_type(const BIO *b);
12833 
12834 typedef void bio_info_cb (struct bio_st *, int, const char *, int, long,
12835                           long);
12836 
12837 typedef struct bio_method_st {
12838     int type;
12839     const char *name;
12840     int (*bwrite) (BIO *, const char *, int);
12841     int (*bread) (BIO *, char *, int);
12842     int (*bputs) (BIO *, const char *);
12843     int (*bgets) (BIO *, char *, int);
12844     long (*ctrl) (BIO *, int, long, void *);
12845     int (*create) (BIO *);
12846     int (*destroy) (BIO *);
12847     long (*callback_ctrl) (BIO *, int, bio_info_cb *);
12848 } BIO_METHOD;
12849 
12850 struct bio_st {
12851     BIO_METHOD *method;
12852     /* bio, mode, argp, argi, argl, ret */
12853     long (*callback) (struct bio_st *, int, const char *, int, long, long);
12854     char *cb_arg; /* first argument for the callback */
12855     int init;
12856     int shutdown;
12857     int flags; /* extra storage */
12858     int retry_reason;
12859     int num;
12860     void *ptr;
12861     struct bio_st *next_bio; /* used by filter BIOs */
12862     struct bio_st *prev_bio; /* used by filter BIOs */
12863     int references;
12864     unsigned long num_read;
12865     unsigned long num_write;
12866     CRYPTO_EX_DATA ex_data;
12867 };
12868 
12869 struct stack_st_BIO { _STACK stack; };
12870 
12871 typedef struct bio_f_buffer_ctx_struct {
12872     /*-
12873      * Buffers are setup like this:
12874      *
12875      * <---------------------- size ----------------------->
12876      * +---------------------------------------------------+
12877      * | consumed | remaining          | free space        |
12878      * +---------------------------------------------------+
12879      * <-- off --><------- len ------->
12880      */
12881     /*- BIO *bio; *//*
12882      * this is now in the BIO struct
12883      */
12884     int ibuf_size; /* how big is the input buffer */
12885     int obuf_size; /* how big is the output buffer */
12886     char *ibuf; /* the char array */
12887     int ibuf_len; /* how many bytes are in it */
12888     int ibuf_off; /* write/read offset */
12889     char *obuf; /* the char array */
12890     int obuf_len; /* how many bytes are in it */
12891     int obuf_off; /* write/read offset */
12892 } BIO_F_BUFFER_CTX;
12893 
12894 /* Prefix and suffix callback in ASN1 BIO */
12895 typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
12896                           void *parg);
12897 # 398 "/usr/include/openssl/bio.h" 3 4
12898 /* connect BIO stuff */
12899 # 407 "/usr/include/openssl/bio.h" 3 4
12900 /*
12901  * #define BIO_CONN_get_param_hostname BIO_ctrl
12902  */
12903 # 474 "/usr/include/openssl/bio.h" 3 4
12904 /* BIO_s_connect() and BIO_s_socks4a_connect() */
12905 # 486 "/usr/include/openssl/bio.h" 3 4
12906 /* BIO_s_accept() */
12907 
12908 
12909 /* #define BIO_set_nbio(b,n)    BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
12910 # 499 "/usr/include/openssl/bio.h" 3 4
12911 /* BIO_s_accept() and BIO_s_connect() */
12912 
12913 
12914 
12915 
12916 /* BIO_s_proxy_client() */
12917 
12918 
12919 /* BIO_set_nbio(b,n) */
12920 
12921 /* BIO *BIO_get_filter_bio(BIO *bio); */
12922 # 519 "/usr/include/openssl/bio.h" 3 4
12923 /* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
12924 
12925 
12926 
12927 /* BIO_s_file() */
12928 
12929 
12930 
12931 /* BIO_s_fd() and BIO_s_file() */
12932 
12933 
12934 
12935 /*
12936  * name is cast to lose const, but might be better to route through a
12937  * function so we can do it safely
12938  */
12939 # 552 "/usr/include/openssl/bio.h" 3 4
12940 /*
12941  * WARNING WARNING, this ups the reference count on the read bio of the SSL
12942  * structure.  This is because the ssl read BIO is now pointed to by the
12943  * next_bio field in the bio.  So when you free the BIO, make sure you are
12944  * doing a BIO_free_all() to catch the underlying BIO.
12945  */
12946 # 568 "/usr/include/openssl/bio.h" 3 4
12947 /* defined in evp.h */
12948 /* #define BIO_set_md(b,md)     BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */
12949 
12950 
12951 
12952 
12953 
12954 
12955 
12956 /* For the BIO_f_buffer() type */
12957 
12958 
12959 
12960 
12961 
12962 
12963 /* Don't use the next one unless you know what you are doing :-) */
12964 # 593 "/usr/include/openssl/bio.h" 3 4
12965 /* ...pending macros have inappropriate return type */
12966 size_t BIO_ctrl_pending(BIO *b);
12967 size_t BIO_ctrl_wpending(BIO *b);
12968 
12969 
12970 
12971 
12972 
12973 /* For the BIO_f_buffer() type */
12974 
12975 
12976 /* For BIO_s_bio() */
12977 
12978 
12979 
12980 
12981 
12982 /* macros with inappropriate type -- but ...pending macros use int too: */
12983 
12984 
12985 size_t BIO_ctrl_get_write_guarantee(BIO *b);
12986 size_t BIO_ctrl_get_read_request(BIO *b);
12987 int BIO_ctrl_reset_read_request(BIO *b);
12988 
12989 /* ctrl macros for dgram */
12990 # 633 "/usr/include/openssl/bio.h" 3 4
12991 /* These two aren't currently implemented */
12992 /* int BIO_get_ex_num(BIO *bio); */
12993 /* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */
12994 int BIO_set_ex_data(BIO *bio, int idx, void *data);
12995 void *BIO_get_ex_data(BIO *bio, int idx);
12996 int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
12997                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
12998 unsigned long BIO_number_read(BIO *bio);
12999 unsigned long BIO_number_written(BIO *bio);
13000 
13001 /* For BIO_f_asn1() */
13002 int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
13003                         asn1_ps_func *prefix_free);
13004 int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
13005                         asn1_ps_func **pprefix_free);
13006 int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
13007                         asn1_ps_func *suffix_free);
13008 int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
13009                         asn1_ps_func **psuffix_free);
13010 
13011 
13012 BIO_METHOD *BIO_s_file(void);
13013 BIO *BIO_new_file(const char *filename, const char *mode);
13014 BIO *BIO_new_fp(FILE *stream, int close_flag);
13015 
13016 
13017 BIO *BIO_new(BIO_METHOD *type);
13018 int BIO_set(BIO *a, BIO_METHOD *type);
13019 int BIO_free(BIO *a);
13020 void BIO_vfree(BIO *a);
13021 int BIO_read(BIO *b, void *data, int len);
13022 int BIO_gets(BIO *bp, char *buf, int size);
13023 int BIO_write(BIO *b, const void *data, int len);
13024 int BIO_puts(BIO *bp, const char *buf);
13025 int BIO_indent(BIO *b, int indent, int max);
13026 long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
13027 long BIO_callback_ctrl(BIO *b, int cmd,
13028                        void (*fp) (struct bio_st *, int, const char *, int,
13029                                    long, long));
13030 char *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
13031 long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
13032 BIO *BIO_push(BIO *b, BIO *append);
13033 BIO *BIO_pop(BIO *b);
13034 void BIO_free_all(BIO *a);
13035 BIO *BIO_find_type(BIO *b, int bio_type);
13036 BIO *BIO_next(BIO *b);
13037 BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
13038 int BIO_get_retry_reason(BIO *bio);
13039 BIO *BIO_dup_chain(BIO *in);
13040 
13041 int BIO_nread0(BIO *bio, char **buf);
13042 int BIO_nread(BIO *bio, char **buf, int num);
13043 int BIO_nwrite0(BIO *bio, char **buf);
13044 int BIO_nwrite(BIO *bio, char **buf, int num);
13045 
13046 long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
13047                         long argl, long ret);
13048 
13049 BIO_METHOD *BIO_s_mem(void);
13050 BIO *BIO_new_mem_buf(const void *buf, int len);
13051 BIO_METHOD *BIO_s_socket(void);
13052 BIO_METHOD *BIO_s_connect(void);
13053 BIO_METHOD *BIO_s_accept(void);
13054 BIO_METHOD *BIO_s_fd(void);
13055 
13056 BIO_METHOD *BIO_s_log(void);
13057 
13058 BIO_METHOD *BIO_s_bio(void);
13059 BIO_METHOD *BIO_s_null(void);
13060 BIO_METHOD *BIO_f_null(void);
13061 BIO_METHOD *BIO_f_buffer(void);
13062 
13063 
13064 
13065 BIO_METHOD *BIO_f_nbio_test(void);
13066 
13067 BIO_METHOD *BIO_s_datagram(void);
13068 
13069 
13070 
13071 
13072 
13073 /* BIO_METHOD *BIO_f_ber(void); */
13074 
13075 int BIO_sock_should_retry(int i);
13076 int BIO_sock_non_fatal_error(int error);
13077 int BIO_dgram_non_fatal_error(int error);
13078 
13079 int BIO_fd_should_retry(int i);
13080 int BIO_fd_non_fatal_error(int error);
13081 int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
13082                 void *u, const char *s, int len);
13083 int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
13084                        void *u, const char *s, int len, int indent);
13085 int BIO_dump(BIO *b, const char *bytes, int len);
13086 int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent);
13087 
13088 int BIO_dump_fp(FILE *fp, const char *s, int len);
13089 int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
13090 
13091 int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data,
13092                    int datalen);
13093 
13094 struct hostent *BIO_gethostbyname(const char *name);
13095 /*-
13096  * We might want a thread-safe interface too:
13097  * struct hostent *BIO_gethostbyname_r(const char *name,
13098  *     struct hostent *result, void *buffer, size_t buflen);
13099  * or something similar (caller allocates a struct hostent,
13100  * pointed to by "result", and additional buffer space for the various
13101  * substructures; if the buffer does not suffice, NULL is returned
13102  * and an appropriate error code is set).
13103  */
13104 int BIO_sock_error(int sock);
13105 int BIO_socket_ioctl(int fd, long type, void *arg);
13106 int BIO_socket_nbio(int fd, int mode);
13107 int BIO_get_port(const char *str, unsigned short *port_ptr);
13108 int BIO_get_host_ip(const char *str, unsigned char *ip);
13109 int BIO_get_accept_socket(char *host_port, int mode);
13110 int BIO_accept(int sock, char **ip_port);
13111 int BIO_sock_init(void);
13112 void BIO_sock_cleanup(void);
13113 int BIO_set_tcp_ndelay(int sock, int turn_on);
13114 
13115 BIO *BIO_new_socket(int sock, int close_flag);
13116 BIO *BIO_new_dgram(int fd, int close_flag);
13117 # 771 "/usr/include/openssl/bio.h" 3 4
13118 BIO *BIO_new_fd(int fd, int close_flag);
13119 BIO *BIO_new_connect(const char *host_port);
13120 BIO *BIO_new_accept(const char *host_port);
13121 
13122 int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
13123                      BIO **bio2, size_t writebuf2);
13124 /*
13125  * If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
13126  * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
13127  * value.
13128  */
13129 
13130 void BIO_copy_next_retry(BIO *b);
13131 
13132 /*
13133  * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
13134  */
13135 
13136 
13137 
13138 
13139 
13140 
13141 int BIO_printf(BIO *bio, const char *format, ...)
13142 __attribute__((__format__(__printf__, 2, 3)));
13143 int BIO_vprintf(BIO *bio, const char *format, va_list args)
13144 __attribute__((__format__(__printf__, 2, 0)));
13145 int BIO_snprintf(char *buf, size_t n, const char *format, ...)
13146 __attribute__((__format__(__printf__, 3, 4)));
13147 int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
13148 __attribute__((__format__(__printf__, 3, 0)));
13149 
13150 
13151 /* BEGIN ERROR CODES */
13152 /*
13153  * The following lines are auto generated by the script mkerr.pl. Any changes
13154  * made after this point may be overwritten when the script is next run.
13155  */
13156 void ERR_load_BIO_strings(void);
13157 
13158 /* Error codes for the BIO functions. */
13159 
13160 /* Function codes. */
13161 # 849 "/usr/include/openssl/bio.h" 3 4
13162 /* Reason codes. */
13163 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
13164 # 1 "/usr/include/openssl/x509.h" 1 3 4
13165 /* crypto/x509/x509.h */
13166 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
13167  * All rights reserved.
13168  *
13169  * This package is an SSL implementation written
13170  * by Eric Young (eay@cryptsoft.com).
13171  * The implementation was written so as to conform with Netscapes SSL.
13172  *
13173  * This library is free for commercial and non-commercial use as long as
13174  * the following conditions are aheared to.  The following conditions
13175  * apply to all code found in this distribution, be it the RC4, RSA,
13176  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
13177  * included with this distribution is covered by the same copyright terms
13178  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
13179  *
13180  * Copyright remains Eric Young's, and as such any Copyright notices in
13181  * the code are not to be removed.
13182  * If this package is used in a product, Eric Young should be given attribution
13183  * as the author of the parts of the library used.
13184  * This can be in the form of a textual message at program startup or
13185  * in documentation (online or textual) provided with the package.
13186  *
13187  * Redistribution and use in source and binary forms, with or without
13188  * modification, are permitted provided that the following conditions
13189  * are met:
13190  * 1. Redistributions of source code must retain the copyright
13191  *    notice, this list of conditions and the following disclaimer.
13192  * 2. Redistributions in binary form must reproduce the above copyright
13193  *    notice, this list of conditions and the following disclaimer in the
13194  *    documentation and/or other materials provided with the distribution.
13195  * 3. All advertising materials mentioning features or use of this software
13196  *    must display the following acknowledgement:
13197  *    "This product includes cryptographic software written by
13198  *     Eric Young (eay@cryptsoft.com)"
13199  *    The word 'cryptographic' can be left out if the rouines from the library
13200  *    being used are not cryptographic related :-).
13201  * 4. If you include any Windows specific code (or a derivative thereof) from
13202  *    the apps directory (application code) you must include an acknowledgement:
13203  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
13204  *
13205  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
13206  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13207  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
13208  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
13209  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
13210  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
13211  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13212  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
13213  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
13214  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
13215  * SUCH DAMAGE.
13216  *
13217  * The licence and distribution terms for any publically available version or
13218  * derivative of this code cannot be changed.  i.e. this code cannot simply be
13219  * copied and put under another distribution licence
13220  * [including the GNU Public Licence.]
13221  */
13222 /* ====================================================================
13223  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
13224  * ECDH support in OpenSSL originally developed by
13225  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
13226  */
13227 
13228 
13229 
13230 
13231 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
13232 /* e_os2.h */
13233 /* ====================================================================
13234  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
13235  *
13236  * Redistribution and use in source and binary forms, with or without
13237  * modification, are permitted provided that the following conditions
13238  * are met:
13239  *
13240  * 1. Redistributions of source code must retain the above copyright
13241  *    notice, this list of conditions and the following disclaimer.
13242  *
13243  * 2. Redistributions in binary form must reproduce the above copyright
13244  *    notice, this list of conditions and the following disclaimer in
13245  *    the documentation and/or other materials provided with the
13246  *    distribution.
13247  *
13248  * 3. All advertising materials mentioning features or use of this
13249  *    software must display the following acknowledgment:
13250  *    "This product includes software developed by the OpenSSL Project
13251  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
13252  *
13253  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
13254  *    endorse or promote products derived from this software without
13255  *    prior written permission. For written permission, please contact
13256  *    openssl-core@openssl.org.
13257  *
13258  * 5. Products derived from this software may not be called "OpenSSL"
13259  *    nor may "OpenSSL" appear in their names without prior written
13260  *    permission of the OpenSSL Project.
13261  *
13262  * 6. Redistributions of any form whatsoever must retain the following
13263  *    acknowledgment:
13264  *    "This product includes software developed by the OpenSSL Project
13265  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
13266  *
13267  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
13268  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13269  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13270  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
13271  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13272  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
13273  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
13274  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13275  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
13276  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
13277  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
13278  * OF THE POSSIBILITY OF SUCH DAMAGE.
13279  * ====================================================================
13280  *
13281  * This product includes cryptographic software written by Eric Young
13282  * (eay@cryptsoft.com).  This product includes software written by Tim
13283  * Hudson (tjh@cryptsoft.com).
13284  *
13285  */
13286 
13287 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
13288 /* opensslconf.h */
13289 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
13290 
13291 
13292 
13293 
13294 /* OpenSSL was configured with the following options: */
13295 # 108 "/usr/include/openssl/opensslconf.h" 3 4
13296 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
13297    asks for it.  This is a transient feature that is provided for those
13298    who haven't had the time to do the appropriate changes in their
13299    applications.  */
13300 # 204 "/usr/include/openssl/opensslconf.h" 3 4
13301 /* crypto/opensslconf.h.in */
13302 
13303 /* Generate 80386 code? */
13304 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
13305 # 68 "/usr/include/openssl/x509.h" 2 3 4
13306 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
13307 /* ====================================================================
13308  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
13309  *
13310  * Redistribution and use in source and binary forms, with or without
13311  * modification, are permitted provided that the following conditions
13312  * are met:
13313  *
13314  * 1. Redistributions of source code must retain the above copyright
13315  *    notice, this list of conditions and the following disclaimer.
13316  *
13317  * 2. Redistributions in binary form must reproduce the above copyright
13318  *    notice, this list of conditions and the following disclaimer in
13319  *    the documentation and/or other materials provided with the
13320  *    distribution.
13321  *
13322  * 3. All advertising materials mentioning features or use of this
13323  *    software must display the following acknowledgment:
13324  *    "This product includes software developed by the OpenSSL Project
13325  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
13326  *
13327  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
13328  *    endorse or promote products derived from this software without
13329  *    prior written permission. For written permission, please contact
13330  *    openssl-core@openssl.org.
13331  *
13332  * 5. Products derived from this software may not be called "OpenSSL"
13333  *    nor may "OpenSSL" appear in their names without prior written
13334  *    permission of the OpenSSL Project.
13335  *
13336  * 6. Redistributions of any form whatsoever must retain the following
13337  *    acknowledgment:
13338  *    "This product includes software developed by the OpenSSL Project
13339  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
13340  *
13341  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
13342  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13343  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13344  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
13345  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13346  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
13347  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
13348  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13349  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
13350  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
13351  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
13352  * OF THE POSSIBILITY OF SUCH DAMAGE.
13353  * ====================================================================
13354  *
13355  * This product includes cryptographic software written by Eric Young
13356  * (eay@cryptsoft.com).  This product includes software written by Tim
13357  * Hudson (tjh@cryptsoft.com).
13358  *
13359  */
13360 # 69 "/usr/include/openssl/x509.h" 2 3 4
13361 
13362 # 1 "/usr/include/openssl/buffer.h" 1 3 4
13363 /* crypto/buffer/buffer.h */
13364 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
13365  * All rights reserved.
13366  *
13367  * This package is an SSL implementation written
13368  * by Eric Young (eay@cryptsoft.com).
13369  * The implementation was written so as to conform with Netscapes SSL.
13370  *
13371  * This library is free for commercial and non-commercial use as long as
13372  * the following conditions are aheared to.  The following conditions
13373  * apply to all code found in this distribution, be it the RC4, RSA,
13374  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
13375  * included with this distribution is covered by the same copyright terms
13376  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
13377  *
13378  * Copyright remains Eric Young's, and as such any Copyright notices in
13379  * the code are not to be removed.
13380  * If this package is used in a product, Eric Young should be given attribution
13381  * as the author of the parts of the library used.
13382  * This can be in the form of a textual message at program startup or
13383  * in documentation (online or textual) provided with the package.
13384  *
13385  * Redistribution and use in source and binary forms, with or without
13386  * modification, are permitted provided that the following conditions
13387  * are met:
13388  * 1. Redistributions of source code must retain the copyright
13389  *    notice, this list of conditions and the following disclaimer.
13390  * 2. Redistributions in binary form must reproduce the above copyright
13391  *    notice, this list of conditions and the following disclaimer in the
13392  *    documentation and/or other materials provided with the distribution.
13393  * 3. All advertising materials mentioning features or use of this software
13394  *    must display the following acknowledgement:
13395  *    "This product includes cryptographic software written by
13396  *     Eric Young (eay@cryptsoft.com)"
13397  *    The word 'cryptographic' can be left out if the rouines from the library
13398  *    being used are not cryptographic related :-).
13399  * 4. If you include any Windows specific code (or a derivative thereof) from
13400  *    the apps directory (application code) you must include an acknowledgement:
13401  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
13402  *
13403  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
13404  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13405  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
13406  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
13407  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
13408  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
13409  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13410  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
13411  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
13412  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
13413  * SUCH DAMAGE.
13414  *
13415  * The licence and distribution terms for any publically available version or
13416  * derivative of this code cannot be changed.  i.e. this code cannot simply be
13417  * copied and put under another distribution licence
13418  * [including the GNU Public Licence.]
13419  */
13420 
13421 
13422 
13423 
13424 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
13425 /* ====================================================================
13426  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
13427  *
13428  * Redistribution and use in source and binary forms, with or without
13429  * modification, are permitted provided that the following conditions
13430  * are met:
13431  *
13432  * 1. Redistributions of source code must retain the above copyright
13433  *    notice, this list of conditions and the following disclaimer.
13434  *
13435  * 2. Redistributions in binary form must reproduce the above copyright
13436  *    notice, this list of conditions and the following disclaimer in
13437  *    the documentation and/or other materials provided with the
13438  *    distribution.
13439  *
13440  * 3. All advertising materials mentioning features or use of this
13441  *    software must display the following acknowledgment:
13442  *    "This product includes software developed by the OpenSSL Project
13443  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
13444  *
13445  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
13446  *    endorse or promote products derived from this software without
13447  *    prior written permission. For written permission, please contact
13448  *    openssl-core@openssl.org.
13449  *
13450  * 5. Products derived from this software may not be called "OpenSSL"
13451  *    nor may "OpenSSL" appear in their names without prior written
13452  *    permission of the OpenSSL Project.
13453  *
13454  * 6. Redistributions of any form whatsoever must retain the following
13455  *    acknowledgment:
13456  *    "This product includes software developed by the OpenSSL Project
13457  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
13458  *
13459  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
13460  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13461  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13462  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
13463  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13464  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
13465  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
13466  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13467  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
13468  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
13469  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
13470  * OF THE POSSIBILITY OF SUCH DAMAGE.
13471  * ====================================================================
13472  *
13473  * This product includes cryptographic software written by Eric Young
13474  * (eay@cryptsoft.com).  This product includes software written by Tim
13475  * Hudson (tjh@cryptsoft.com).
13476  *
13477  */
13478 # 63 "/usr/include/openssl/buffer.h" 2 3 4
13479 
13480 
13481 
13482 
13483 
13484 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
13485 /*
13486  * CDDL HEADER START
13487  *
13488  * The contents of this file are subject to the terms of the
13489  * Common Development and Distribution License, Version 1.0 only
13490  * (the "License").  You may not use this file except in compliance
13491  * with the License.
13492  *
13493  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13494  * or http://www.opensolaris.org/os/licensing.
13495  * See the License for the specific language governing permissions
13496  * and limitations under the License.
13497  *
13498  * When distributing Covered Code, include this CDDL HEADER in each
13499  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13500  * If applicable, add the following below this CDDL HEADER, with the
13501  * fields enclosed by brackets "[]" replaced with your own identifying
13502  * information: Portions Copyright [yyyy] [name of copyright owner]
13503  *
13504  * CDDL HEADER END
13505  */
13506 /*	Copyright (c) 1988 AT&T	*/
13507 /*	  All Rights Reserved  	*/
13508 
13509 
13510 /*
13511  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
13512  * Use is subject to license terms.
13513  */
13514 
13515 
13516 
13517 
13518 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
13519 /*
13520  * CDDL HEADER START
13521  *
13522  * The contents of this file are subject to the terms of the
13523  * Common Development and Distribution License (the "License").
13524  * You may not use this file except in compliance with the License.
13525  *
13526  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13527  * or http://www.opensolaris.org/os/licensing.
13528  * See the License for the specific language governing permissions
13529  * and limitations under the License.
13530  *
13531  *
13532  * When distributing Covered Code, include this CDDL HEADER in each
13533  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13534  * If applicable, add the following below this CDDL HEADER, with the
13535  * fields enclosed by brackets "[]" replaced with your own identifying
13536  * information: Portions Copyright [yyyy] [name of copyright owner]
13537  *
13538  * CDDL HEADER END
13539  */
13540 
13541 /*
13542  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
13543  * Use is subject to license terms.
13544  * Copyright 2016 Joyent, Inc.
13545  */
13546 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
13547 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 1 3 4
13548 /*
13549  * CDDL HEADER START
13550  *
13551  * The contents of this file are subject to the terms of the
13552  * Common Development and Distribution License, Version 1.0 only
13553  * (the "License").  You may not use this file except in compliance
13554  * with the License.
13555  *
13556  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13557  * or http://www.opensolaris.org/os/licensing.
13558  * See the License for the specific language governing permissions
13559  * and limitations under the License.
13560  *
13561  * When distributing Covered Code, include this CDDL HEADER in each
13562  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13563  * If applicable, add the following below this CDDL HEADER, with the
13564  * fields enclosed by brackets "[]" replaced with your own identifying
13565  * information: Portions Copyright [yyyy] [name of copyright owner]
13566  *
13567  * CDDL HEADER END
13568  */
13569 /*	Copyright (c) 1988 AT&T	*/
13570 /*	  All Rights Reserved  	*/
13571 
13572 
13573 /*
13574  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
13575  * Use is subject to license terms.
13576  */
13577 
13578 /*
13579  * Copyright 2014 PALO, Richard.
13580  * Copyright 2016 Joyent, Inc.
13581  */
13582 
13583 /*
13584  * An application should not include this header directly.  Instead it
13585  * should be included only through the inclusion of other Sun headers.
13586  *
13587  * The contents of this header is limited to identifiers specified in the
13588  * C Standard.  Any new identifiers specified in future amendments to the
13589  * C Standard must be placed in this header.  If these new identifiers
13590  * are required to also be in the C++ Standard "std" namespace, then for
13591  * anything other than macro definitions, corresponding "using" directives
13592  * must also be added to <stddef.h.h>.
13593  */
13594 
13595 
13596 
13597 
13598 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
13599 /*
13600  * CDDL HEADER START
13601  *
13602  * The contents of this file are subject to the terms of the
13603  * Common Development and Distribution License (the "License").
13604  * You may not use this file except in compliance with the License.
13605  *
13606  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13607  * or http://www.opensolaris.org/os/licensing.
13608  * See the License for the specific language governing permissions
13609  * and limitations under the License.
13610  *
13611  *
13612  * When distributing Covered Code, include this CDDL HEADER in each
13613  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13614  * If applicable, add the following below this CDDL HEADER, with the
13615  * fields enclosed by brackets "[]" replaced with your own identifying
13616  * information: Portions Copyright [yyyy] [name of copyright owner]
13617  *
13618  * CDDL HEADER END
13619  */
13620 
13621 /*
13622  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
13623  * Use is subject to license terms.
13624  * Copyright 2016 Joyent, Inc.
13625  */
13626 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
13627 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
13628 /*
13629  * CDDL HEADER START
13630  *
13631  * The contents of this file are subject to the terms of the
13632  * Common Development and Distribution License (the "License").
13633  * You may not use this file except in compliance with the License.
13634  *
13635  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13636  * or http://www.opensolaris.org/os/licensing.
13637  * See the License for the specific language governing permissions
13638  * and limitations under the License.
13639  *
13640  * When distributing Covered Code, include this CDDL HEADER in each
13641  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13642  * If applicable, add the following below this CDDL HEADER, with the
13643  * fields enclosed by brackets "[]" replaced with your own identifying
13644  * information: Portions Copyright [yyyy] [name of copyright owner]
13645  *
13646  * CDDL HEADER END
13647  */
13648 
13649 /*
13650  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
13651  * Copyright 2016 Joyent, Inc.
13652  *
13653  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
13654  * Use is subject to license terms.
13655  */
13656 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
13657 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1 3 4
13658 /*
13659  * This file and its contents are supplied under the terms of the
13660  * Common Development and Distribution License ("CDDL"), version 1.0.
13661  * You may only use this file in accordance with the terms of version
13662  * 1.0 of the CDDL.
13663  *
13664  * A full copy of the text of the CDDL should have accompanied this
13665  * source.  A copy of the CDDL is also available via the Internet at
13666  * http://www.illumos.org/license/CDDL.
13667  */
13668 
13669 /*
13670  * Copyright 2014-2016 PALO, Richard.
13671  */
13672 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
13673 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 3 4
13674 typedef long max_align_t;
13675 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
13676 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 1 3 4
13677 /*
13678  * This file and its contents are supplied under the terms of the
13679  * Common Development and Distribution License ("CDDL"), version 1.0.
13680  * You may only use this file in accordance with the terms of version
13681  * 1.0 of the CDDL.
13682  *
13683  * A full copy of the text of the CDDL should have accompanied this
13684  * source.  A copy of the CDDL is also available via the Internet at
13685  * http://www.illumos.org/license/CDDL.
13686  */
13687 
13688 /*
13689  * Copyright 2017 Toomas Soome <tsoome@me.com>
13690  */
13691 
13692 
13693 
13694 
13695 /*
13696  * Commonly used macros and definitions.
13697  */
13698 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 3 4
13699 /*
13700  * We must not expose container_of() to userland, but we want it
13701  * to be available for early boot and for the kernel.
13702  */
13703 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
13704 
13705 /*
13706  * Allow global visibility for symbols defined in
13707  * C++ "std" namespace in <iso/stddef_iso.h>.
13708  */
13709 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 3 4
13710 /*
13711  * wchar_t is a built-in type in standard C++ and as such is not
13712  * defined here when using standard C++. However, the GNU compiler
13713  * fixincludes utility nonetheless creates its own version of this
13714  * header for use by gcc and g++. In that version it adds a redundant
13715  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
13716  * header we need to include the following magic comment:
13717  *
13718  * we must use the C++ compiler's type
13719  *
13720  * The above comment should not be removed or changed until GNU
13721  * gcc/fixinc/inclhack.def is updated to bypass this header.
13722  */
13723 # 69 "/usr/include/openssl/buffer.h" 2 3 4
13724 
13725 
13726 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1 3 4
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 (the "License").
13732  * You may not use this file except in compliance with the License.
13733  *
13734  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13735  * or http://www.opensolaris.org/os/licensing.
13736  * See the License for the specific language governing permissions
13737  * and limitations under the License.
13738  *
13739  * When distributing Covered Code, include this CDDL HEADER in each
13740  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13741  * If applicable, add the following below this CDDL HEADER, with the
13742  * fields enclosed by brackets "[]" replaced with your own identifying
13743  * information: Portions Copyright [yyyy] [name of copyright owner]
13744  *
13745  * CDDL HEADER END
13746  */
13747 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13748 /*	  All Rights Reserved  	*/
13749 
13750 
13751 /*
13752  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13753  * Use is subject to license terms.
13754  *
13755  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13756  * Copyright 2016 Joyent, Inc.
13757  */
13758 # 72 "/usr/include/openssl/buffer.h" 2 3 4
13759 
13760 
13761 /* Already declared in ossl_typ.h */
13762 /* typedef struct buf_mem_st BUF_MEM; */
13763 
13764 struct buf_mem_st {
13765     size_t length; /* current number of bytes */
13766     char *data;
13767     size_t max; /* size of buffer */
13768 };
13769 
13770 BUF_MEM *BUF_MEM_new(void);
13771 void BUF_MEM_free(BUF_MEM *a);
13772 int BUF_MEM_grow(BUF_MEM *str, size_t len);
13773 int BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
13774 size_t BUF_strnlen(const char *str, size_t maxlen);
13775 char *BUF_strdup(const char *str);
13776 
13777 /*
13778  * Like strndup, but in addition, explicitly guarantees to never read past the
13779  * first |siz| bytes of |str|.
13780  */
13781 char *BUF_strndup(const char *str, size_t siz);
13782 
13783 void *BUF_memdup(const void *data, size_t siz);
13784 void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
13785 
13786 /* safe string functions */
13787 size_t BUF_strlcpy(char *dst, const char *src, size_t siz);
13788 size_t BUF_strlcat(char *dst, const char *src, size_t siz);
13789 
13790 /* BEGIN ERROR CODES */
13791 /*
13792  * The following lines are auto generated by the script mkerr.pl. Any changes
13793  * made after this point may be overwritten when the script is next run.
13794  */
13795 void ERR_load_BUF_strings(void);
13796 
13797 /* Error codes for the BUF functions. */
13798 
13799 /* Function codes. */
13800 
13801 
13802 
13803 
13804 
13805 
13806 
13807 /* Reason codes. */
13808 # 71 "/usr/include/openssl/x509.h" 2 3 4
13809 
13810 
13811 # 1 "/usr/include/openssl/evp.h" 1 3 4
13812 /* crypto/evp/evp.h */
13813 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
13814  * All rights reserved.
13815  *
13816  * This package is an SSL implementation written
13817  * by Eric Young (eay@cryptsoft.com).
13818  * The implementation was written so as to conform with Netscapes SSL.
13819  *
13820  * This library is free for commercial and non-commercial use as long as
13821  * the following conditions are aheared to.  The following conditions
13822  * apply to all code found in this distribution, be it the RC4, RSA,
13823  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
13824  * included with this distribution is covered by the same copyright terms
13825  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
13826  *
13827  * Copyright remains Eric Young's, and as such any Copyright notices in
13828  * the code are not to be removed.
13829  * If this package is used in a product, Eric Young should be given attribution
13830  * as the author of the parts of the library used.
13831  * This can be in the form of a textual message at program startup or
13832  * in documentation (online or textual) provided with the package.
13833  *
13834  * Redistribution and use in source and binary forms, with or without
13835  * modification, are permitted provided that the following conditions
13836  * are met:
13837  * 1. Redistributions of source code must retain the copyright
13838  *    notice, this list of conditions and the following disclaimer.
13839  * 2. Redistributions in binary form must reproduce the above copyright
13840  *    notice, this list of conditions and the following disclaimer in the
13841  *    documentation and/or other materials provided with the distribution.
13842  * 3. All advertising materials mentioning features or use of this software
13843  *    must display the following acknowledgement:
13844  *    "This product includes cryptographic software written by
13845  *     Eric Young (eay@cryptsoft.com)"
13846  *    The word 'cryptographic' can be left out if the rouines from the library
13847  *    being used are not cryptographic related :-).
13848  * 4. If you include any Windows specific code (or a derivative thereof) from
13849  *    the apps directory (application code) you must include an acknowledgement:
13850  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
13851  *
13852  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
13853  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13854  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
13855  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
13856  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
13857  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
13858  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13859  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
13860  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
13861  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
13862  * SUCH DAMAGE.
13863  *
13864  * The licence and distribution terms for any publically available version or
13865  * derivative of this code cannot be changed.  i.e. this code cannot simply be
13866  * copied and put under another distribution licence
13867  * [including the GNU Public Licence.]
13868  */
13869 # 66 "/usr/include/openssl/evp.h" 3 4
13870 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
13871 /* opensslconf.h */
13872 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
13873 
13874 
13875 
13876 
13877 /* OpenSSL was configured with the following options: */
13878 # 108 "/usr/include/openssl/opensslconf.h" 3 4
13879 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
13880    asks for it.  This is a transient feature that is provided for those
13881    who haven't had the time to do the appropriate changes in their
13882    applications.  */
13883 # 204 "/usr/include/openssl/opensslconf.h" 3 4
13884 /* crypto/opensslconf.h.in */
13885 
13886 /* Generate 80386 code? */
13887 # 67 "/usr/include/openssl/evp.h" 2 3 4
13888 
13889 
13890 
13891 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
13892 /* ====================================================================
13893  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
13894  *
13895  * Redistribution and use in source and binary forms, with or without
13896  * modification, are permitted provided that the following conditions
13897  * are met:
13898  *
13899  * 1. Redistributions of source code must retain the above copyright
13900  *    notice, this list of conditions and the following disclaimer.
13901  *
13902  * 2. Redistributions in binary form must reproduce the above copyright
13903  *    notice, this list of conditions and the following disclaimer in
13904  *    the documentation and/or other materials provided with the
13905  *    distribution.
13906  *
13907  * 3. All advertising materials mentioning features or use of this
13908  *    software must display the following acknowledgment:
13909  *    "This product includes software developed by the OpenSSL Project
13910  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
13911  *
13912  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
13913  *    endorse or promote products derived from this software without
13914  *    prior written permission. For written permission, please contact
13915  *    openssl-core@openssl.org.
13916  *
13917  * 5. Products derived from this software may not be called "OpenSSL"
13918  *    nor may "OpenSSL" appear in their names without prior written
13919  *    permission of the OpenSSL Project.
13920  *
13921  * 6. Redistributions of any form whatsoever must retain the following
13922  *    acknowledgment:
13923  *    "This product includes software developed by the OpenSSL Project
13924  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
13925  *
13926  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
13927  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13928  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13929  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
13930  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13931  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
13932  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
13933  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13934  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
13935  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
13936  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
13937  * OF THE POSSIBILITY OF SUCH DAMAGE.
13938  * ====================================================================
13939  *
13940  * This product includes cryptographic software written by Eric Young
13941  * (eay@cryptsoft.com).  This product includes software written by Tim
13942  * Hudson (tjh@cryptsoft.com).
13943  *
13944  */
13945 # 71 "/usr/include/openssl/evp.h" 2 3 4
13946 
13947 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
13948 /* ====================================================================
13949  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
13950  *
13951  * Redistribution and use in source and binary forms, with or without
13952  * modification, are permitted provided that the following conditions
13953  * are met:
13954  *
13955  * 1. Redistributions of source code must retain the above copyright
13956  *    notice, this list of conditions and the following disclaimer.
13957  *
13958  * 2. Redistributions in binary form must reproduce the above copyright
13959  *    notice, this list of conditions and the following disclaimer in
13960  *    the documentation and/or other materials provided with the
13961  *    distribution.
13962  *
13963  * 3. All advertising materials mentioning features or use of this
13964  *    software must display the following acknowledgment:
13965  *    "This product includes software developed by the OpenSSL Project
13966  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
13967  *
13968  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
13969  *    endorse or promote products derived from this software without
13970  *    prior written permission. For written permission, please contact
13971  *    openssl-core@openssl.org.
13972  *
13973  * 5. Products derived from this software may not be called "OpenSSL"
13974  *    nor may "OpenSSL" appear in their names without prior written
13975  *    permission of the OpenSSL Project.
13976  *
13977  * 6. Redistributions of any form whatsoever must retain the following
13978  *    acknowledgment:
13979  *    "This product includes software developed by the OpenSSL Project
13980  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
13981  *
13982  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
13983  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13984  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13985  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
13986  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13987  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
13988  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
13989  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13990  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
13991  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
13992  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
13993  * OF THE POSSIBILITY OF SUCH DAMAGE.
13994  * ====================================================================
13995  *
13996  * This product includes cryptographic software written by Eric Young
13997  * (eay@cryptsoft.com).  This product includes software written by Tim
13998  * Hudson (tjh@cryptsoft.com).
13999  *
14000  */
14001 # 73 "/usr/include/openssl/evp.h" 2 3 4
14002 
14003 
14004 # 1 "/usr/include/openssl/bio.h" 1 3 4
14005 /* crypto/bio/bio.h */
14006 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14007  * All rights reserved.
14008  *
14009  * This package is an SSL implementation written
14010  * by Eric Young (eay@cryptsoft.com).
14011  * The implementation was written so as to conform with Netscapes SSL.
14012  *
14013  * This library is free for commercial and non-commercial use as long as
14014  * the following conditions are aheared to.  The following conditions
14015  * apply to all code found in this distribution, be it the RC4, RSA,
14016  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14017  * included with this distribution is covered by the same copyright terms
14018  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14019  *
14020  * Copyright remains Eric Young's, and as such any Copyright notices in
14021  * the code are not to be removed.
14022  * If this package is used in a product, Eric Young should be given attribution
14023  * as the author of the parts of the library used.
14024  * This can be in the form of a textual message at program startup or
14025  * in documentation (online or textual) provided with the package.
14026  *
14027  * Redistribution and use in source and binary forms, with or without
14028  * modification, are permitted provided that the following conditions
14029  * are met:
14030  * 1. Redistributions of source code must retain the copyright
14031  *    notice, this list of conditions and the following disclaimer.
14032  * 2. Redistributions in binary form must reproduce the above copyright
14033  *    notice, this list of conditions and the following disclaimer in the
14034  *    documentation and/or other materials provided with the distribution.
14035  * 3. All advertising materials mentioning features or use of this software
14036  *    must display the following acknowledgement:
14037  *    "This product includes cryptographic software written by
14038  *     Eric Young (eay@cryptsoft.com)"
14039  *    The word 'cryptographic' can be left out if the rouines from the library
14040  *    being used are not cryptographic related :-).
14041  * 4. If you include any Windows specific code (or a derivative thereof) from
14042  *    the apps directory (application code) you must include an acknowledgement:
14043  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14044  *
14045  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14046  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14047  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14048  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14049  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14050  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14051  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14052  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14053  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14054  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14055  * SUCH DAMAGE.
14056  *
14057  * The licence and distribution terms for any publically available version or
14058  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14059  * copied and put under another distribution licence
14060  * [including the GNU Public Licence.]
14061  */
14062 # 76 "/usr/include/openssl/evp.h" 2 3 4
14063 
14064 
14065 /*-
14066 #define EVP_RC2_KEY_SIZE                16
14067 #define EVP_RC4_KEY_SIZE                16
14068 #define EVP_BLOWFISH_KEY_SIZE           16
14069 #define EVP_CAST5_KEY_SIZE              16
14070 #define EVP_RC5_32_12_16_KEY_SIZE       16
14071 */
14072 
14073 
14074 
14075 
14076 
14077 
14078 /* Default PKCS#5 iteration count */
14079 
14080 
14081 # 1 "/usr/include/openssl/objects.h" 1 3 4
14082 /* crypto/objects/objects.h */
14083 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14084  * All rights reserved.
14085  *
14086  * This package is an SSL implementation written
14087  * by Eric Young (eay@cryptsoft.com).
14088  * The implementation was written so as to conform with Netscapes SSL.
14089  *
14090  * This library is free for commercial and non-commercial use as long as
14091  * the following conditions are aheared to.  The following conditions
14092  * apply to all code found in this distribution, be it the RC4, RSA,
14093  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14094  * included with this distribution is covered by the same copyright terms
14095  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14096  *
14097  * Copyright remains Eric Young's, and as such any Copyright notices in
14098  * the code are not to be removed.
14099  * If this package is used in a product, Eric Young should be given attribution
14100  * as the author of the parts of the library used.
14101  * This can be in the form of a textual message at program startup or
14102  * in documentation (online or textual) provided with the package.
14103  *
14104  * Redistribution and use in source and binary forms, with or without
14105  * modification, are permitted provided that the following conditions
14106  * are met:
14107  * 1. Redistributions of source code must retain the copyright
14108  *    notice, this list of conditions and the following disclaimer.
14109  * 2. Redistributions in binary form must reproduce the above copyright
14110  *    notice, this list of conditions and the following disclaimer in the
14111  *    documentation and/or other materials provided with the distribution.
14112  * 3. All advertising materials mentioning features or use of this software
14113  *    must display the following acknowledgement:
14114  *    "This product includes cryptographic software written by
14115  *     Eric Young (eay@cryptsoft.com)"
14116  *    The word 'cryptographic' can be left out if the rouines from the library
14117  *    being used are not cryptographic related :-).
14118  * 4. If you include any Windows specific code (or a derivative thereof) from
14119  *    the apps directory (application code) you must include an acknowledgement:
14120  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14121  *
14122  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14123  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14124  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14125  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14126  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14127  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14128  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14129  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14130  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14131  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14132  * SUCH DAMAGE.
14133  *
14134  * The licence and distribution terms for any publically available version or
14135  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14136  * copied and put under another distribution licence
14137  * [including the GNU Public Licence.]
14138  */
14139 
14140 
14141 
14142 
14143 
14144 
14145 
14146 # 1 "/usr/include/openssl/obj_mac.h" 1 3 4
14147 /* crypto/objects/obj_mac.h */
14148 
14149 /*
14150  * THIS FILE IS GENERATED FROM objects.txt by objects.pl via the following
14151  * command: perl objects.pl objects.txt obj_mac.num obj_mac.h
14152  */
14153 
14154 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
14155  * All rights reserved.
14156  *
14157  * This package is an SSL implementation written
14158  * by Eric Young (eay@cryptsoft.com).
14159  * The implementation was written so as to conform with Netscapes SSL.
14160  *
14161  * This library is free for commercial and non-commercial use as long as
14162  * the following conditions are aheared to.  The following conditions
14163  * apply to all code found in this distribution, be it the RC4, RSA,
14164  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14165  * included with this distribution is covered by the same copyright terms
14166  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14167  *
14168  * Copyright remains Eric Young's, and as such any Copyright notices in
14169  * the code are not to be removed.
14170  * If this package is used in a product, Eric Young should be given attribution
14171  * as the author of the parts of the library used.
14172  * This can be in the form of a textual message at program startup or
14173  * in documentation (online or textual) provided with the package.
14174  *
14175  * Redistribution and use in source and binary forms, with or without
14176  * modification, are permitted provided that the following conditions
14177  * are met:
14178  * 1. Redistributions of source code must retain the copyright
14179  *    notice, this list of conditions and the following disclaimer.
14180  * 2. Redistributions in binary form must reproduce the above copyright
14181  *    notice, this list of conditions and the following disclaimer in the
14182  *    documentation and/or other materials provided with the distribution.
14183  * 3. All advertising materials mentioning features or use of this software
14184  *    must display the following acknowledgement:
14185  *    "This product includes cryptographic software written by
14186  *     Eric Young (eay@cryptsoft.com)"
14187  *    The word 'cryptographic' can be left out if the rouines from the library
14188  *    being used are not cryptographic related :-).
14189  * 4. If you include any Windows specific code (or a derivative thereof) from
14190  *    the apps directory (application code) you must include an acknowledgement:
14191  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14192  *
14193  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14194  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14195  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14196  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14197  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14198  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14199  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14200  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14201  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14202  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14203  * SUCH DAMAGE.
14204  *
14205  * The licence and distribution terms for any publically available version or
14206  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14207  * copied and put under another distribution licence
14208  * [including the GNU Public Licence.]
14209  */
14210 # 66 "/usr/include/openssl/objects.h" 2 3 4
14211 # 964 "/usr/include/openssl/objects.h" 3 4
14212 # 1 "/usr/include/openssl/bio.h" 1 3 4
14213 /* crypto/bio/bio.h */
14214 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14215  * All rights reserved.
14216  *
14217  * This package is an SSL implementation written
14218  * by Eric Young (eay@cryptsoft.com).
14219  * The implementation was written so as to conform with Netscapes SSL.
14220  *
14221  * This library is free for commercial and non-commercial use as long as
14222  * the following conditions are aheared to.  The following conditions
14223  * apply to all code found in this distribution, be it the RC4, RSA,
14224  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14225  * included with this distribution is covered by the same copyright terms
14226  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14227  *
14228  * Copyright remains Eric Young's, and as such any Copyright notices in
14229  * the code are not to be removed.
14230  * If this package is used in a product, Eric Young should be given attribution
14231  * as the author of the parts of the library used.
14232  * This can be in the form of a textual message at program startup or
14233  * in documentation (online or textual) provided with the package.
14234  *
14235  * Redistribution and use in source and binary forms, with or without
14236  * modification, are permitted provided that the following conditions
14237  * are met:
14238  * 1. Redistributions of source code must retain the copyright
14239  *    notice, this list of conditions and the following disclaimer.
14240  * 2. Redistributions in binary form must reproduce the above copyright
14241  *    notice, this list of conditions and the following disclaimer in the
14242  *    documentation and/or other materials provided with the distribution.
14243  * 3. All advertising materials mentioning features or use of this software
14244  *    must display the following acknowledgement:
14245  *    "This product includes cryptographic software written by
14246  *     Eric Young (eay@cryptsoft.com)"
14247  *    The word 'cryptographic' can be left out if the rouines from the library
14248  *    being used are not cryptographic related :-).
14249  * 4. If you include any Windows specific code (or a derivative thereof) from
14250  *    the apps directory (application code) you must include an acknowledgement:
14251  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14252  *
14253  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14254  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14255  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14256  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14257  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14258  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14259  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14260  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14261  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14262  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14263  * SUCH DAMAGE.
14264  *
14265  * The licence and distribution terms for any publically available version or
14266  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14267  * copied and put under another distribution licence
14268  * [including the GNU Public Licence.]
14269  */
14270 # 965 "/usr/include/openssl/objects.h" 2 3 4
14271 # 1 "/usr/include/openssl/asn1.h" 1 3 4
14272 /* crypto/asn1/asn1.h */
14273 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14274  * All rights reserved.
14275  *
14276  * This package is an SSL implementation written
14277  * by Eric Young (eay@cryptsoft.com).
14278  * The implementation was written so as to conform with Netscapes SSL.
14279  *
14280  * This library is free for commercial and non-commercial use as long as
14281  * the following conditions are aheared to.  The following conditions
14282  * apply to all code found in this distribution, be it the RC4, RSA,
14283  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14284  * included with this distribution is covered by the same copyright terms
14285  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14286  *
14287  * Copyright remains Eric Young's, and as such any Copyright notices in
14288  * the code are not to be removed.
14289  * If this package is used in a product, Eric Young should be given attribution
14290  * as the author of the parts of the library used.
14291  * This can be in the form of a textual message at program startup or
14292  * in documentation (online or textual) provided with the package.
14293  *
14294  * Redistribution and use in source and binary forms, with or without
14295  * modification, are permitted provided that the following conditions
14296  * are met:
14297  * 1. Redistributions of source code must retain the copyright
14298  *    notice, this list of conditions and the following disclaimer.
14299  * 2. Redistributions in binary form must reproduce the above copyright
14300  *    notice, this list of conditions and the following disclaimer in the
14301  *    documentation and/or other materials provided with the distribution.
14302  * 3. All advertising materials mentioning features or use of this software
14303  *    must display the following acknowledgement:
14304  *    "This product includes cryptographic software written by
14305  *     Eric Young (eay@cryptsoft.com)"
14306  *    The word 'cryptographic' can be left out if the rouines from the library
14307  *    being used are not cryptographic related :-).
14308  * 4. If you include any Windows specific code (or a derivative thereof) from
14309  *    the apps directory (application code) you must include an acknowledgement:
14310  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14311  *
14312  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14313  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14314  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14315  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14316  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14317  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14318  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14319  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14320  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14321  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14322  * SUCH DAMAGE.
14323  *
14324  * The licence and distribution terms for any publically available version or
14325  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14326  * copied and put under another distribution licence
14327  * [including the GNU Public Licence.]
14328  */
14329 
14330 
14331 
14332 
14333 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1 3 4
14334 /*
14335  * CDDL HEADER START
14336  *
14337  * The contents of this file are subject to the terms of the
14338  * Common Development and Distribution License (the "License").
14339  * You may not use this file except in compliance with the License.
14340  *
14341  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14342  * or http://www.opensolaris.org/os/licensing.
14343  * See the License for the specific language governing permissions
14344  * and limitations under the License.
14345  *
14346  * When distributing Covered Code, include this CDDL HEADER in each
14347  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14348  * If applicable, add the following below this CDDL HEADER, with the
14349  * fields enclosed by brackets "[]" replaced with your own identifying
14350  * information: Portions Copyright [yyyy] [name of copyright owner]
14351  *
14352  * CDDL HEADER END
14353  */
14354 /*	Copyright (c) 1988 AT&T	*/
14355 /*	  All Rights Reserved  	*/
14356 
14357 
14358 /*
14359  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
14360  *
14361  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
14362  * Use is subject to license terms.
14363  */
14364 /*
14365  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
14366  * Copyright 2016 Joyent, Inc.
14367  */
14368 # 63 "/usr/include/openssl/asn1.h" 2 3 4
14369 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
14370 /* e_os2.h */
14371 /* ====================================================================
14372  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
14373  *
14374  * Redistribution and use in source and binary forms, with or without
14375  * modification, are permitted provided that the following conditions
14376  * are met:
14377  *
14378  * 1. Redistributions of source code must retain the above copyright
14379  *    notice, this list of conditions and the following disclaimer.
14380  *
14381  * 2. Redistributions in binary form must reproduce the above copyright
14382  *    notice, this list of conditions and the following disclaimer in
14383  *    the documentation and/or other materials provided with the
14384  *    distribution.
14385  *
14386  * 3. All advertising materials mentioning features or use of this
14387  *    software must display the following acknowledgment:
14388  *    "This product includes software developed by the OpenSSL Project
14389  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14390  *
14391  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14392  *    endorse or promote products derived from this software without
14393  *    prior written permission. For written permission, please contact
14394  *    openssl-core@openssl.org.
14395  *
14396  * 5. Products derived from this software may not be called "OpenSSL"
14397  *    nor may "OpenSSL" appear in their names without prior written
14398  *    permission of the OpenSSL Project.
14399  *
14400  * 6. Redistributions of any form whatsoever must retain the following
14401  *    acknowledgment:
14402  *    "This product includes software developed by the OpenSSL Project
14403  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14404  *
14405  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14406  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14407  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14408  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14409  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14410  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14411  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14412  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14413  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14414  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14415  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14416  * OF THE POSSIBILITY OF SUCH DAMAGE.
14417  * ====================================================================
14418  *
14419  * This product includes cryptographic software written by Eric Young
14420  * (eay@cryptsoft.com).  This product includes software written by Tim
14421  * Hudson (tjh@cryptsoft.com).
14422  *
14423  */
14424 
14425 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
14426 /* opensslconf.h */
14427 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
14428 
14429 
14430 
14431 
14432 /* OpenSSL was configured with the following options: */
14433 # 108 "/usr/include/openssl/opensslconf.h" 3 4
14434 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
14435    asks for it.  This is a transient feature that is provided for those
14436    who haven't had the time to do the appropriate changes in their
14437    applications.  */
14438 # 204 "/usr/include/openssl/opensslconf.h" 3 4
14439 /* crypto/opensslconf.h.in */
14440 
14441 /* Generate 80386 code? */
14442 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
14443 # 64 "/usr/include/openssl/asn1.h" 2 3 4
14444 
14445 # 1 "/usr/include/openssl/bio.h" 1 3 4
14446 /* crypto/bio/bio.h */
14447 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14448  * All rights reserved.
14449  *
14450  * This package is an SSL implementation written
14451  * by Eric Young (eay@cryptsoft.com).
14452  * The implementation was written so as to conform with Netscapes SSL.
14453  *
14454  * This library is free for commercial and non-commercial use as long as
14455  * the following conditions are aheared to.  The following conditions
14456  * apply to all code found in this distribution, be it the RC4, RSA,
14457  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14458  * included with this distribution is covered by the same copyright terms
14459  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14460  *
14461  * Copyright remains Eric Young's, and as such any Copyright notices in
14462  * the code are not to be removed.
14463  * If this package is used in a product, Eric Young should be given attribution
14464  * as the author of the parts of the library used.
14465  * This can be in the form of a textual message at program startup or
14466  * in documentation (online or textual) provided with the package.
14467  *
14468  * Redistribution and use in source and binary forms, with or without
14469  * modification, are permitted provided that the following conditions
14470  * are met:
14471  * 1. Redistributions of source code must retain the copyright
14472  *    notice, this list of conditions and the following disclaimer.
14473  * 2. Redistributions in binary form must reproduce the above copyright
14474  *    notice, this list of conditions and the following disclaimer in the
14475  *    documentation and/or other materials provided with the distribution.
14476  * 3. All advertising materials mentioning features or use of this software
14477  *    must display the following acknowledgement:
14478  *    "This product includes cryptographic software written by
14479  *     Eric Young (eay@cryptsoft.com)"
14480  *    The word 'cryptographic' can be left out if the rouines from the library
14481  *    being used are not cryptographic related :-).
14482  * 4. If you include any Windows specific code (or a derivative thereof) from
14483  *    the apps directory (application code) you must include an acknowledgement:
14484  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14485  *
14486  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14487  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14488  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14489  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14490  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14491  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14492  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14493  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14494  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14495  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14496  * SUCH DAMAGE.
14497  *
14498  * The licence and distribution terms for any publically available version or
14499  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14500  * copied and put under another distribution licence
14501  * [including the GNU Public Licence.]
14502  */
14503 # 66 "/usr/include/openssl/asn1.h" 2 3 4
14504 
14505 # 1 "/usr/include/openssl/stack.h" 1 3 4
14506 /* crypto/stack/stack.h */
14507 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14508  * All rights reserved.
14509  *
14510  * This package is an SSL implementation written
14511  * by Eric Young (eay@cryptsoft.com).
14512  * The implementation was written so as to conform with Netscapes SSL.
14513  *
14514  * This library is free for commercial and non-commercial use as long as
14515  * the following conditions are aheared to.  The following conditions
14516  * apply to all code found in this distribution, be it the RC4, RSA,
14517  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14518  * included with this distribution is covered by the same copyright terms
14519  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14520  *
14521  * Copyright remains Eric Young's, and as such any Copyright notices in
14522  * the code are not to be removed.
14523  * If this package is used in a product, Eric Young should be given attribution
14524  * as the author of the parts of the library used.
14525  * This can be in the form of a textual message at program startup or
14526  * in documentation (online or textual) provided with the package.
14527  *
14528  * Redistribution and use in source and binary forms, with or without
14529  * modification, are permitted provided that the following conditions
14530  * are met:
14531  * 1. Redistributions of source code must retain the copyright
14532  *    notice, this list of conditions and the following disclaimer.
14533  * 2. Redistributions in binary form must reproduce the above copyright
14534  *    notice, this list of conditions and the following disclaimer in the
14535  *    documentation and/or other materials provided with the distribution.
14536  * 3. All advertising materials mentioning features or use of this software
14537  *    must display the following acknowledgement:
14538  *    "This product includes cryptographic software written by
14539  *     Eric Young (eay@cryptsoft.com)"
14540  *    The word 'cryptographic' can be left out if the rouines from the library
14541  *    being used are not cryptographic related :-).
14542  * 4. If you include any Windows specific code (or a derivative thereof) from
14543  *    the apps directory (application code) you must include an acknowledgement:
14544  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14545  *
14546  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14547  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14548  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14549  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14550  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14551  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14552  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14553  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14554  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14555  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14556  * SUCH DAMAGE.
14557  *
14558  * The licence and distribution terms for any publically available version or
14559  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14560  * copied and put under another distribution licence
14561  * [including the GNU Public Licence.]
14562  */
14563 # 68 "/usr/include/openssl/asn1.h" 2 3 4
14564 # 1 "/usr/include/openssl/safestack.h" 1 3 4
14565 /* ====================================================================
14566  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
14567  *
14568  * Redistribution and use in source and binary forms, with or without
14569  * modification, are permitted provided that the following conditions
14570  * are met:
14571  *
14572  * 1. Redistributions of source code must retain the above copyright
14573  *    notice, this list of conditions and the following disclaimer.
14574  *
14575  * 2. Redistributions in binary form must reproduce the above copyright
14576  *    notice, this list of conditions and the following disclaimer in
14577  *    the documentation and/or other materials provided with the
14578  *    distribution.
14579  *
14580  * 3. All advertising materials mentioning features or use of this
14581  *    software must display the following acknowledgment:
14582  *    "This product includes software developed by the OpenSSL Project
14583  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14584  *
14585  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14586  *    endorse or promote products derived from this software without
14587  *    prior written permission. For written permission, please contact
14588  *    openssl-core@openssl.org.
14589  *
14590  * 5. Products derived from this software may not be called "OpenSSL"
14591  *    nor may "OpenSSL" appear in their names without prior written
14592  *    permission of the OpenSSL Project.
14593  *
14594  * 6. Redistributions of any form whatsoever must retain the following
14595  *    acknowledgment:
14596  *    "This product includes software developed by the OpenSSL Project
14597  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14598  *
14599  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14600  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14601  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14602  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14603  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14604  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14605  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14606  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14607  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14608  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14609  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14610  * OF THE POSSIBILITY OF SUCH DAMAGE.
14611  * ====================================================================
14612  *
14613  * This product includes cryptographic software written by Eric Young
14614  * (eay@cryptsoft.com).  This product includes software written by Tim
14615  * Hudson (tjh@cryptsoft.com).
14616  *
14617  */
14618 # 69 "/usr/include/openssl/asn1.h" 2 3 4
14619 
14620 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
14621 /* ====================================================================
14622  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
14623  *
14624  * Redistribution and use in source and binary forms, with or without
14625  * modification, are permitted provided that the following conditions
14626  * are met:
14627  *
14628  * 1. Redistributions of source code must retain the above copyright
14629  *    notice, this list of conditions and the following disclaimer.
14630  *
14631  * 2. Redistributions in binary form must reproduce the above copyright
14632  *    notice, this list of conditions and the following disclaimer in
14633  *    the documentation and/or other materials provided with the
14634  *    distribution.
14635  *
14636  * 3. All advertising materials mentioning features or use of this
14637  *    software must display the following acknowledgment:
14638  *    "This product includes software developed by the OpenSSL Project
14639  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14640  *
14641  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14642  *    endorse or promote products derived from this software without
14643  *    prior written permission. For written permission, please contact
14644  *    openssl-core@openssl.org.
14645  *
14646  * 5. Products derived from this software may not be called "OpenSSL"
14647  *    nor may "OpenSSL" appear in their names without prior written
14648  *    permission of the OpenSSL Project.
14649  *
14650  * 6. Redistributions of any form whatsoever must retain the following
14651  *    acknowledgment:
14652  *    "This product includes software developed by the OpenSSL Project
14653  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14654  *
14655  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14656  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14657  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14658  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14659  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14660  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14661  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14662  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14663  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14664  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14665  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14666  * OF THE POSSIBILITY OF SUCH DAMAGE.
14667  * ====================================================================
14668  *
14669  * This product includes cryptographic software written by Eric Young
14670  * (eay@cryptsoft.com).  This product includes software written by Tim
14671  * Hudson (tjh@cryptsoft.com).
14672  *
14673  */
14674 # 71 "/usr/include/openssl/asn1.h" 2 3 4
14675 
14676 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
14677 /* ====================================================================
14678  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
14679  *
14680  * Redistribution and use in source and binary forms, with or without
14681  * modification, are permitted provided that the following conditions
14682  * are met:
14683  *
14684  * 1. Redistributions of source code must retain the above copyright
14685  *    notice, this list of conditions and the following disclaimer.
14686  *
14687  * 2. Redistributions in binary form must reproduce the above copyright
14688  *    notice, this list of conditions and the following disclaimer in
14689  *    the documentation and/or other materials provided with the
14690  *    distribution.
14691  *
14692  * 3. All advertising materials mentioning features or use of this
14693  *    software must display the following acknowledgment:
14694  *    "This product includes software developed by the OpenSSL Project
14695  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14696  *
14697  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14698  *    endorse or promote products derived from this software without
14699  *    prior written permission. For written permission, please contact
14700  *    openssl-core@openssl.org.
14701  *
14702  * 5. Products derived from this software may not be called "OpenSSL"
14703  *    nor may "OpenSSL" appear in their names without prior written
14704  *    permission of the OpenSSL Project.
14705  *
14706  * 6. Redistributions of any form whatsoever must retain the following
14707  *    acknowledgment:
14708  *    "This product includes software developed by the OpenSSL Project
14709  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14710  *
14711  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14712  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14713  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14714  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14715  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14716  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14717  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14718  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14719  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14720  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14721  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14722  * OF THE POSSIBILITY OF SUCH DAMAGE.
14723  * ====================================================================
14724  *
14725  * This product includes cryptographic software written by Eric Young
14726  * (eay@cryptsoft.com).  This product includes software written by Tim
14727  * Hudson (tjh@cryptsoft.com).
14728  *
14729  */
14730 # 73 "/usr/include/openssl/asn1.h" 2 3 4
14731 
14732 # 1 "/usr/include/openssl/bn.h" 1 3 4
14733 /* crypto/bn/bn.h */
14734 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
14735  * All rights reserved.
14736  *
14737  * This package is an SSL implementation written
14738  * by Eric Young (eay@cryptsoft.com).
14739  * The implementation was written so as to conform with Netscapes SSL.
14740  *
14741  * This library is free for commercial and non-commercial use as long as
14742  * the following conditions are aheared to.  The following conditions
14743  * apply to all code found in this distribution, be it the RC4, RSA,
14744  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14745  * included with this distribution is covered by the same copyright terms
14746  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14747  *
14748  * Copyright remains Eric Young's, and as such any Copyright notices in
14749  * the code are not to be removed.
14750  * If this package is used in a product, Eric Young should be given attribution
14751  * as the author of the parts of the library used.
14752  * This can be in the form of a textual message at program startup or
14753  * in documentation (online or textual) provided with the package.
14754  *
14755  * Redistribution and use in source and binary forms, with or without
14756  * modification, are permitted provided that the following conditions
14757  * are met:
14758  * 1. Redistributions of source code must retain the copyright
14759  *    notice, this list of conditions and the following disclaimer.
14760  * 2. Redistributions in binary form must reproduce the above copyright
14761  *    notice, this list of conditions and the following disclaimer in the
14762  *    documentation and/or other materials provided with the distribution.
14763  * 3. All advertising materials mentioning features or use of this software
14764  *    must display the following acknowledgement:
14765  *    "This product includes cryptographic software written by
14766  *     Eric Young (eay@cryptsoft.com)"
14767  *    The word 'cryptographic' can be left out if the rouines from the library
14768  *    being used are not cryptographic related :-).
14769  * 4. If you include any Windows specific code (or a derivative thereof) from
14770  *    the apps directory (application code) you must include an acknowledgement:
14771  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14772  *
14773  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14774  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14775  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14776  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14777  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14778  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14779  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14780  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14781  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14782  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14783  * SUCH DAMAGE.
14784  *
14785  * The licence and distribution terms for any publically available version or
14786  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14787  * copied and put under another distribution licence
14788  * [including the GNU Public Licence.]
14789  */
14790 /* ====================================================================
14791  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
14792  *
14793  * Redistribution and use in source and binary forms, with or without
14794  * modification, are permitted provided that the following conditions
14795  * are met:
14796  *
14797  * 1. Redistributions of source code must retain the above copyright
14798  *    notice, this list of conditions and the following disclaimer.
14799  *
14800  * 2. Redistributions in binary form must reproduce the above copyright
14801  *    notice, this list of conditions and the following disclaimer in
14802  *    the documentation and/or other materials provided with the
14803  *    distribution.
14804  *
14805  * 3. All advertising materials mentioning features or use of this
14806  *    software must display the following acknowledgment:
14807  *    "This product includes software developed by the OpenSSL Project
14808  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14809  *
14810  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14811  *    endorse or promote products derived from this software without
14812  *    prior written permission. For written permission, please contact
14813  *    openssl-core@openssl.org.
14814  *
14815  * 5. Products derived from this software may not be called "OpenSSL"
14816  *    nor may "OpenSSL" appear in their names without prior written
14817  *    permission of the OpenSSL Project.
14818  *
14819  * 6. Redistributions of any form whatsoever must retain the following
14820  *    acknowledgment:
14821  *    "This product includes software developed by the OpenSSL Project
14822  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14823  *
14824  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14825  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14826  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14827  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14828  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14829  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14830  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14831  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14832  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14833  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14834  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14835  * OF THE POSSIBILITY OF SUCH DAMAGE.
14836  * ====================================================================
14837  *
14838  * This product includes cryptographic software written by Eric Young
14839  * (eay@cryptsoft.com).  This product includes software written by Tim
14840  * Hudson (tjh@cryptsoft.com).
14841  *
14842  */
14843 /* ====================================================================
14844  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
14845  *
14846  * Portions of the attached software ("Contribution") are developed by
14847  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
14848  *
14849  * The Contribution is licensed pursuant to the Eric Young open source
14850  * license provided above.
14851  *
14852  * The binary polynomial arithmetic software is originally written by
14853  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
14854  *
14855  */
14856 
14857 
14858 
14859 
14860 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1 3 4
14861 /*
14862  * CDDL HEADER START
14863  *
14864  * The contents of this file are subject to the terms of the
14865  * Common Development and Distribution License (the "License").
14866  * You may not use this file except in compliance with the License.
14867  *
14868  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14869  * or http://www.opensolaris.org/os/licensing.
14870  * See the License for the specific language governing permissions
14871  * and limitations under the License.
14872  *
14873  * When distributing Covered Code, include this CDDL HEADER in each
14874  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14875  * If applicable, add the following below this CDDL HEADER, with the
14876  * fields enclosed by brackets "[]" replaced with your own identifying
14877  * information: Portions Copyright [yyyy] [name of copyright owner]
14878  *
14879  * CDDL HEADER END
14880  */
14881 
14882 /*
14883  * Copyright (c) 2013 Gary Mills
14884  *
14885  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
14886  * Use is subject to license terms.
14887  */
14888 
14889 /*	Copyright (c) 1988 AT&T	*/
14890 /*	  All Rights Reserved  	*/
14891 # 129 "/usr/include/openssl/bn.h" 2 3 4
14892 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
14893 /* e_os2.h */
14894 /* ====================================================================
14895  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
14896  *
14897  * Redistribution and use in source and binary forms, with or without
14898  * modification, are permitted provided that the following conditions
14899  * are met:
14900  *
14901  * 1. Redistributions of source code must retain the above copyright
14902  *    notice, this list of conditions and the following disclaimer.
14903  *
14904  * 2. Redistributions in binary form must reproduce the above copyright
14905  *    notice, this list of conditions and the following disclaimer in
14906  *    the documentation and/or other materials provided with the
14907  *    distribution.
14908  *
14909  * 3. All advertising materials mentioning features or use of this
14910  *    software must display the following acknowledgment:
14911  *    "This product includes software developed by the OpenSSL Project
14912  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14913  *
14914  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14915  *    endorse or promote products derived from this software without
14916  *    prior written permission. For written permission, please contact
14917  *    openssl-core@openssl.org.
14918  *
14919  * 5. Products derived from this software may not be called "OpenSSL"
14920  *    nor may "OpenSSL" appear in their names without prior written
14921  *    permission of the OpenSSL Project.
14922  *
14923  * 6. Redistributions of any form whatsoever must retain the following
14924  *    acknowledgment:
14925  *    "This product includes software developed by the OpenSSL Project
14926  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14927  *
14928  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14929  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14930  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14931  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14932  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14933  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14934  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14935  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14936  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14937  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14938  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14939  * OF THE POSSIBILITY OF SUCH DAMAGE.
14940  * ====================================================================
14941  *
14942  * This product includes cryptographic software written by Eric Young
14943  * (eay@cryptsoft.com).  This product includes software written by Tim
14944  * Hudson (tjh@cryptsoft.com).
14945  *
14946  */
14947 
14948 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
14949 /* opensslconf.h */
14950 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
14951 
14952 
14953 
14954 
14955 /* OpenSSL was configured with the following options: */
14956 # 108 "/usr/include/openssl/opensslconf.h" 3 4
14957 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
14958    asks for it.  This is a transient feature that is provided for those
14959    who haven't had the time to do the appropriate changes in their
14960    applications.  */
14961 # 204 "/usr/include/openssl/opensslconf.h" 3 4
14962 /* crypto/opensslconf.h.in */
14963 
14964 /* Generate 80386 code? */
14965 # 272 "/usr/include/openssl/opensslconf.h" 3 4
14966 /*
14967  * OpenSSL revision 1.521 from 2005-12-15 in OpenSSL_1_0_0-stable branch changed
14968  * 64 bit sparcv9 configuration from SIXTY_FOUR_BIT_LONG to BN_LLONG.
14969  */
14970 
14971 
14972 
14973 
14974 
14975 
14976 /* Should we define BN_DIV2W here? */
14977 
14978 /* Only one for the following should be defined */
14979 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
14980 # 130 "/usr/include/openssl/bn.h" 2 3 4
14981 
14982 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
14983 /*
14984  * CDDL HEADER START
14985  *
14986  * The contents of this file are subject to the terms of the
14987  * Common Development and Distribution License (the "License").
14988  * You may not use this file except in compliance with the License.
14989  *
14990  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14991  * or http://www.opensolaris.org/os/licensing.
14992  * See the License for the specific language governing permissions
14993  * and limitations under the License.
14994  *
14995  * When distributing Covered Code, include this CDDL HEADER in each
14996  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14997  * If applicable, add the following below this CDDL HEADER, with the
14998  * fields enclosed by brackets "[]" replaced with your own identifying
14999  * information: Portions Copyright [yyyy] [name of copyright owner]
15000  *
15001  * CDDL HEADER END
15002  */
15003 
15004 /*
15005  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
15006  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
15007  */
15008 
15009 /*	Copyright (c) 1988 AT&T	*/
15010 /*	  All Rights Reserved  	*/
15011 
15012 /*
15013  * User-visible pieces of the ANSI C standard I/O package.
15014  */
15015 # 132 "/usr/include/openssl/bn.h" 2 3 4
15016 
15017 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
15018 /* ====================================================================
15019  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
15020  *
15021  * Redistribution and use in source and binary forms, with or without
15022  * modification, are permitted provided that the following conditions
15023  * are met:
15024  *
15025  * 1. Redistributions of source code must retain the above copyright
15026  *    notice, this list of conditions and the following disclaimer.
15027  *
15028  * 2. Redistributions in binary form must reproduce the above copyright
15029  *    notice, this list of conditions and the following disclaimer in
15030  *    the documentation and/or other materials provided with the
15031  *    distribution.
15032  *
15033  * 3. All advertising materials mentioning features or use of this
15034  *    software must display the following acknowledgment:
15035  *    "This product includes software developed by the OpenSSL Project
15036  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15037  *
15038  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15039  *    endorse or promote products derived from this software without
15040  *    prior written permission. For written permission, please contact
15041  *    openssl-core@openssl.org.
15042  *
15043  * 5. Products derived from this software may not be called "OpenSSL"
15044  *    nor may "OpenSSL" appear in their names without prior written
15045  *    permission of the OpenSSL Project.
15046  *
15047  * 6. Redistributions of any form whatsoever must retain the following
15048  *    acknowledgment:
15049  *    "This product includes software developed by the OpenSSL Project
15050  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15051  *
15052  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15053  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15054  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15055  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15056  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15057  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15058  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15059  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15060  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15061  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15062  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15063  * OF THE POSSIBILITY OF SUCH DAMAGE.
15064  * ====================================================================
15065  *
15066  * This product includes cryptographic software written by Eric Young
15067  * (eay@cryptsoft.com).  This product includes software written by Tim
15068  * Hudson (tjh@cryptsoft.com).
15069  *
15070  */
15071 # 134 "/usr/include/openssl/bn.h" 2 3 4
15072 # 1 "/usr/include/openssl/crypto.h" 1 3 4
15073 /* crypto/crypto.h */
15074 /* ====================================================================
15075  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
15076  *
15077  * Redistribution and use in source and binary forms, with or without
15078  * modification, are permitted provided that the following conditions
15079  * are met:
15080  *
15081  * 1. Redistributions of source code must retain the above copyright
15082  *    notice, this list of conditions and the following disclaimer.
15083  *
15084  * 2. Redistributions in binary form must reproduce the above copyright
15085  *    notice, this list of conditions and the following disclaimer in
15086  *    the documentation and/or other materials provided with the
15087  *    distribution.
15088  *
15089  * 3. All advertising materials mentioning features or use of this
15090  *    software must display the following acknowledgment:
15091  *    "This product includes software developed by the OpenSSL Project
15092  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15093  *
15094  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15095  *    endorse or promote products derived from this software without
15096  *    prior written permission. For written permission, please contact
15097  *    openssl-core@openssl.org.
15098  *
15099  * 5. Products derived from this software may not be called "OpenSSL"
15100  *    nor may "OpenSSL" appear in their names without prior written
15101  *    permission of the OpenSSL Project.
15102  *
15103  * 6. Redistributions of any form whatsoever must retain the following
15104  *    acknowledgment:
15105  *    "This product includes software developed by the OpenSSL Project
15106  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15107  *
15108  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15109  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15110  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15111  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15112  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15113  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15114  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15115  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15116  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15117  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15118  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15119  * OF THE POSSIBILITY OF SUCH DAMAGE.
15120  * ====================================================================
15121  *
15122  * This product includes cryptographic software written by Eric Young
15123  * (eay@cryptsoft.com).  This product includes software written by Tim
15124  * Hudson (tjh@cryptsoft.com).
15125  *
15126  */
15127 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
15128  * All rights reserved.
15129  *
15130  * This package is an SSL implementation written
15131  * by Eric Young (eay@cryptsoft.com).
15132  * The implementation was written so as to conform with Netscapes SSL.
15133  *
15134  * This library is free for commercial and non-commercial use as long as
15135  * the following conditions are aheared to.  The following conditions
15136  * apply to all code found in this distribution, be it the RC4, RSA,
15137  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15138  * included with this distribution is covered by the same copyright terms
15139  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15140  *
15141  * Copyright remains Eric Young's, and as such any Copyright notices in
15142  * the code are not to be removed.
15143  * If this package is used in a product, Eric Young should be given attribution
15144  * as the author of the parts of the library used.
15145  * This can be in the form of a textual message at program startup or
15146  * in documentation (online or textual) provided with the package.
15147  *
15148  * Redistribution and use in source and binary forms, with or without
15149  * modification, are permitted provided that the following conditions
15150  * are met:
15151  * 1. Redistributions of source code must retain the copyright
15152  *    notice, this list of conditions and the following disclaimer.
15153  * 2. Redistributions in binary form must reproduce the above copyright
15154  *    notice, this list of conditions and the following disclaimer in the
15155  *    documentation and/or other materials provided with the distribution.
15156  * 3. All advertising materials mentioning features or use of this software
15157  *    must display the following acknowledgement:
15158  *    "This product includes cryptographic software written by
15159  *     Eric Young (eay@cryptsoft.com)"
15160  *    The word 'cryptographic' can be left out if the rouines from the library
15161  *    being used are not cryptographic related :-).
15162  * 4. If you include any Windows specific code (or a derivative thereof) from
15163  *    the apps directory (application code) you must include an acknowledgement:
15164  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15165  *
15166  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15167  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15168  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15169  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15170  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15171  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15172  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15173  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15174  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15175  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15176  * SUCH DAMAGE.
15177  *
15178  * The licence and distribution terms for any publically available version or
15179  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15180  * copied and put under another distribution licence
15181  * [including the GNU Public Licence.]
15182  */
15183 /* ====================================================================
15184  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
15185  * ECDH support in OpenSSL originally developed by
15186  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
15187  */
15188 # 135 "/usr/include/openssl/bn.h" 2 3 4
15189 
15190 
15191 
15192 
15193 
15194 /*
15195  * These preprocessor symbols control various aspects of the bignum headers
15196  * and library code. They're not defined by any "normal" configuration, as
15197  * they are intended for development and testing purposes. NB: defining all
15198  * three can be useful for debugging application code as well as openssl
15199  * itself. BN_DEBUG - turn on various debugging alterations to the bignum
15200  * code BN_DEBUG_RAND - uses random poisoning of unused words to trip up
15201  * mismanagement of bignum internals. You must also define BN_DEBUG.
15202  */
15203 /* #define BN_DEBUG */
15204 /* #define BN_DEBUG_RAND */
15205 
15206 
15207 
15208 
15209 
15210 
15211 
15212 /*
15213  * This next option uses the C libraries (2 word)/(1 word) function. If it is
15214  * not defined, I use my C version (which is slower). The reason for this
15215  * flag is that when the particular C compiler library routine is used, and
15216  * the library is linked with a different compiler, the library is missing.
15217  * This mostly happens when the library is built with gcc and then linked
15218  * using normal cc.  This would be a common occurrence because gcc normally
15219  * produces code that is 2 times faster than system compilers for the big
15220  * number stuff. For machines with only one compiler (or shared libraries),
15221  * this should be on.  Again this in only really a problem on machines using
15222  * "long long's", are 32bit, and are not using my assembler code.
15223  */
15224 
15225 
15226 
15227 
15228 
15229 
15230 
15231 /*
15232  * assuming long is 64bit - this is the DEC Alpha unsigned long long is only
15233  * 64 bits :-(, don't define BN_LLONG for the DEC Alpha
15234  */
15235 # 203 "/usr/include/openssl/bn.h" 3 4
15236 /*
15237  * This is where the long long data type is 64 bits, but long is 32. For
15238  * machines where there are 64bit registers, this is the mode to use. IRIX,
15239  * on R4000 and above should use this mode, along with the relevant assembler
15240  * code :-).  Do NOT define BN_LLONG.
15241  */
15242 # 265 "/usr/include/openssl/bn.h" 3 4
15243 /*
15244  * avoid leaking exponent information through timing,
15245  * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
15246  * BN_div() will call BN_div_no_branch,
15247  * BN_mod_inverse() will call BN_mod_inverse_no_branch.
15248  */
15249 # 284 "/usr/include/openssl/bn.h" 3 4
15250                                        /* used for debuging */
15251 
15252 
15253 
15254 
15255 /*
15256  * get a clone of a BIGNUM with changed flags, for *temporary* use only (the
15257  * two BIGNUMs cannot not be used in parallel!)
15258  */
15259 # 302 "/usr/include/openssl/bn.h" 3 4
15260 /* Already declared in ossl_typ.h */
15261 # 313 "/usr/include/openssl/bn.h" 3 4
15262 struct bignum_st {
15263     unsigned int *d; /* Pointer to an array of 'BN_BITS2' bit
15264                                  * chunks. */
15265     int top; /* Index of last used d +1. */
15266     /* The next are internal book keeping for bn_expand. */
15267     int dmax; /* Size of the d array. */
15268     int neg; /* one if the number is negative */
15269     int flags;
15270 };
15271 
15272 /* Used for montgomery multiplication */
15273 struct bn_mont_ctx_st {
15274     int ri; /* number of bits in R */
15275     BIGNUM RR; /* used to convert to montgomery form */
15276     BIGNUM N; /* The modulus */
15277     BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 (Ni is only
15278                                  * stored for bignum algorithm) */
15279     unsigned int n0[2]; /* least significant word(s) of Ni; (type
15280                                  * changed with 0.9.9, was "BN_ULONG n0;"
15281                                  * before) */
15282     int flags;
15283 };
15284 
15285 /*
15286  * Used for reciprocal division/mod functions It cannot be shared between
15287  * threads
15288  */
15289 struct bn_recp_ctx_st {
15290     BIGNUM N; /* the divisor */
15291     BIGNUM Nr; /* the reciprocal */
15292     int num_bits;
15293     int shift;
15294     int flags;
15295 };
15296 
15297 /* Used for slow "generation" functions. */
15298 struct bn_gencb_st {
15299     unsigned int ver; /* To handle binary (in)compatibility */
15300     void *arg; /* callback-specific data */
15301     union {
15302         /* if(ver==1) - handles old style callbacks */
15303         void (*cb_1) (int, int, void *);
15304         /* if(ver==2) - new callback style */
15305         int (*cb_2) (int, int, BN_GENCB *);
15306     } cb;
15307 };
15308 /* Wrapper function to make using BN_GENCB easier,  */
15309 int BN_GENCB_call(BN_GENCB *cb, int a, int b);
15310 /* Macro to populate a BN_GENCB structure with an "old"-style callback */
15311 
15312 
15313 
15314 
15315 
15316 /* Macro to populate a BN_GENCB structure with a "new"-style callback */
15317 # 377 "/usr/include/openssl/bn.h" 3 4
15318 /*
15319  * BN_prime_checks_for_size() returns the number of Miller-Rabin iterations
15320  * that will be done for checking that a random number is probably prime. The
15321  * error rate for accepting a composite number as prime depends on the size of
15322  * the prime |b|. The error rates used are for calculating an RSA key with 2 primes,
15323  * and so the level is what you would expect for a key of double the size of the
15324  * prime.
15325  *
15326  * This table is generated using the algorithm of FIPS PUB 186-4
15327  * Digital Signature Standard (DSS), section F.1, page 117.
15328  * (https://dx.doi.org/10.6028/NIST.FIPS.186-4)
15329  *
15330  * The following magma script was used to generate the output:
15331  * securitybits:=125;
15332  * k:=1024;
15333  * for t:=1 to 65 do
15334  *   for M:=3 to Floor(2*Sqrt(k-1)-1) do
15335  *     S:=0;
15336  *     // Sum over m
15337  *     for m:=3 to M do
15338  *       s:=0;
15339  *       // Sum over j
15340  *       for j:=2 to m do
15341  *         s+:=(RealField(32)!2)^-(j+(k-1)/j);
15342  *       end for;
15343  *       S+:=2^(m-(m-1)*t)*s;
15344  *     end for;
15345  *     A:=2^(k-2-M*t);
15346  *     B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S;
15347  *     pkt:=2.00743*Log(2)*k*2^-k*(A+B);
15348  *     seclevel:=Floor(-Log(2,pkt));
15349  *     if seclevel ge securitybits then
15350  *       printf "k: %5o, security: %o bits  (t: %o, M: %o)\n",k,seclevel,t,M;
15351  *       break;
15352  *     end if;
15353  *   end for;
15354  *   if seclevel ge securitybits then break; end if;
15355  * end for;
15356  *
15357  * It can be run online at:
15358  * http://magma.maths.usyd.edu.au/calc
15359  *
15360  * And will output:
15361  * k:  1024, security: 129 bits  (t: 6, M: 23)
15362  *
15363  * k is the number of bits of the prime, securitybits is the level we want to
15364  * reach.
15365  *
15366  * prime length | RSA key size | # MR tests | security level
15367  * -------------+--------------|------------+---------------
15368  *  (b) >= 6394 |     >= 12788 |          3 |        256 bit
15369  *  (b) >= 3747 |     >=  7494 |          3 |        192 bit
15370  *  (b) >= 1345 |     >=  2690 |          4 |        128 bit
15371  *  (b) >= 1080 |     >=  2160 |          5 |        128 bit
15372  *  (b) >=  852 |     >=  1704 |          5 |        112 bit
15373  *  (b) >=  476 |     >=   952 |          5 |         80 bit
15374  *  (b) >=  400 |     >=   800 |          6 |         80 bit
15375  *  (b) >=  347 |     >=   694 |          7 |         80 bit
15376  *  (b) >=  308 |     >=   616 |          8 |         80 bit
15377  *  (b) >=   55 |     >=   110 |         27 |         64 bit
15378  *  (b) >=    6 |     >=    12 |         34 |         64 bit
15379  */
15380 # 451 "/usr/include/openssl/bn.h" 3 4
15381 /* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
15382 # 472 "/usr/include/openssl/bn.h" 3 4
15383 const BIGNUM *BN_value_one(void);
15384 char *BN_options(void);
15385 BN_CTX *BN_CTX_new(void);
15386 
15387 void BN_CTX_init(BN_CTX *c);
15388 
15389 void BN_CTX_free(BN_CTX *c);
15390 void BN_CTX_start(BN_CTX *ctx);
15391 BIGNUM *BN_CTX_get(BN_CTX *ctx);
15392 void BN_CTX_end(BN_CTX *ctx);
15393 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
15394 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
15395 int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
15396 int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
15397 int BN_num_bits(const BIGNUM *a);
15398 int BN_num_bits_word(unsigned int);
15399 BIGNUM *BN_new(void);
15400 void BN_init(BIGNUM *);
15401 void BN_clear_free(BIGNUM *a);
15402 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
15403 void BN_swap(BIGNUM *a, BIGNUM *b);
15404 BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
15405 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
15406 BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
15407 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
15408 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
15409 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
15410 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
15411 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
15412 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
15413 int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
15414 /** BN_set_negative sets sign of a BIGNUM
15415  * \param  b  pointer to the BIGNUM object
15416  * \param  n  0 if the BIGNUM b should be positive and a value != 0 otherwise
15417  */
15418 void BN_set_negative(BIGNUM *b, int n);
15419 /** BN_is_negative returns 1 if the BIGNUM is negative
15420  * \param  a  pointer to the BIGNUM object
15421  * \return 1 if a < 0 and 0 otherwise
15422  */
15423 
15424 
15425 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
15426            BN_CTX *ctx);
15427 
15428 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
15429 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
15430                BN_CTX *ctx);
15431 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15432                      const BIGNUM *m);
15433 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
15434                BN_CTX *ctx);
15435 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15436                      const BIGNUM *m);
15437 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
15438                BN_CTX *ctx);
15439 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
15440 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
15441 int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
15442 int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
15443                   BN_CTX *ctx);
15444 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
15445 
15446 unsigned int BN_mod_word(const BIGNUM *a, unsigned int w);
15447 unsigned int BN_div_word(BIGNUM *a, unsigned int w);
15448 int BN_mul_word(BIGNUM *a, unsigned int w);
15449 int BN_add_word(BIGNUM *a, unsigned int w);
15450 int BN_sub_word(BIGNUM *a, unsigned int w);
15451 int BN_set_word(BIGNUM *a, unsigned int w);
15452 unsigned int BN_get_word(const BIGNUM *a);
15453 
15454 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
15455 void BN_free(BIGNUM *a);
15456 int BN_is_bit_set(const BIGNUM *a, int n);
15457 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
15458 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
15459 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15460 
15461 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
15462                const BIGNUM *m, BN_CTX *ctx);
15463 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
15464                     const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
15465 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
15466                               const BIGNUM *m, BN_CTX *ctx,
15467                               BN_MONT_CTX *in_mont);
15468 int BN_mod_exp_mont_word(BIGNUM *r, unsigned int a, const BIGNUM *p,
15469                          const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
15470 int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
15471                      const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
15472                      BN_CTX *ctx, BN_MONT_CTX *m_ctx);
15473 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
15474                       const BIGNUM *m, BN_CTX *ctx);
15475 
15476 int BN_mask_bits(BIGNUM *a, int n);
15477 
15478 int BN_print_fp(FILE *fp, const BIGNUM *a);
15479 
15480 
15481 int BN_print(BIO *fp, const BIGNUM *a);
15482 
15483 
15484 
15485 int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
15486 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
15487 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
15488 void BN_clear(BIGNUM *a);
15489 BIGNUM *BN_dup(const BIGNUM *a);
15490 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
15491 int BN_set_bit(BIGNUM *a, int n);
15492 int BN_clear_bit(BIGNUM *a, int n);
15493 char *BN_bn2hex(const BIGNUM *a);
15494 char *BN_bn2dec(const BIGNUM *a);
15495 int BN_hex2bn(BIGNUM **a, const char *str);
15496 int BN_dec2bn(BIGNUM **a, const char *str);
15497 int BN_asc2bn(BIGNUM **a, const char *str);
15498 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
15499 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
15500                                                                   * -2 for
15501                                                                   * error */
15502 BIGNUM *BN_mod_inverse(BIGNUM *ret,
15503                        const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
15504 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
15505                     const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
15506 
15507 void BN_consttime_swap(unsigned int swap, BIGNUM *a, BIGNUM *b, int nwords);
15508 
15509 /* Deprecated versions */
15510 
15511 BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
15512                           const BIGNUM *add, const BIGNUM *rem,
15513                           void (*callback) (int, int, void *), void *cb_arg);
15514 int BN_is_prime(const BIGNUM *p, int nchecks,
15515                 void (*callback) (int, int, void *),
15516                 BN_CTX *ctx, void *cb_arg);
15517 int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
15518                          void (*callback) (int, int, void *), BN_CTX *ctx,
15519                          void *cb_arg, int do_trial_division);
15520 
15521 
15522 /* Newer versions */
15523 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
15524                          const BIGNUM *rem, BN_GENCB *cb);
15525 int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
15526 int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
15527                             int do_trial_division, BN_GENCB *cb);
15528 
15529 int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
15530 
15531 int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
15532                             const BIGNUM *Xp, const BIGNUM *Xp1,
15533                             const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
15534                             BN_GENCB *cb);
15535 int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
15536                               BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
15537                               BN_CTX *ctx, BN_GENCB *cb);
15538 
15539 BN_MONT_CTX *BN_MONT_CTX_new(void);
15540 void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
15541 int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15542                           BN_MONT_CTX *mont, BN_CTX *ctx);
15543 
15544 
15545 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a,
15546                        BN_MONT_CTX *mont, BN_CTX *ctx);
15547 void BN_MONT_CTX_free(BN_MONT_CTX *mont);
15548 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
15549 BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
15550 BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
15551                                     const BIGNUM *mod, BN_CTX *ctx);
15552 
15553 /* BN_BLINDING flags */
15554 
15555 
15556 
15557 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
15558 void BN_BLINDING_free(BN_BLINDING *b);
15559 int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
15560 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
15561 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
15562 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
15563 int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
15564                           BN_CTX *);
15565 
15566 unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);
15567 void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);
15568 
15569 CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);
15570 unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
15571 void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
15572 BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
15573                                       const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
15574                                       int (*bn_mod_exp) (BIGNUM *r,
15575                                                          const BIGNUM *a,
15576                                                          const BIGNUM *p,
15577                                                          const BIGNUM *m,
15578                                                          BN_CTX *ctx,
15579                                                          BN_MONT_CTX *m_ctx),
15580                                       BN_MONT_CTX *m_ctx);
15581 
15582 
15583 void BN_set_params(int mul, int high, int low, int mont);
15584 int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
15585 
15586 
15587 void BN_RECP_CTX_init(BN_RECP_CTX *recp);
15588 BN_RECP_CTX *BN_RECP_CTX_new(void);
15589 void BN_RECP_CTX_free(BN_RECP_CTX *recp);
15590 int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
15591 int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
15592                           BN_RECP_CTX *recp, BN_CTX *ctx);
15593 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
15594                     const BIGNUM *m, BN_CTX *ctx);
15595 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
15596                 BN_RECP_CTX *recp, BN_CTX *ctx);
15597 
15598 
15599 
15600 /*
15601  * Functions for arithmetic over binary polynomials represented by BIGNUMs.
15602  * The BIGNUM::neg property of BIGNUMs representing binary polynomials is
15603  * ignored. Note that input arguments are not const so that their bit arrays
15604  * can be expanded to the appropriate size if needed.
15605  */
15606 
15607 /*
15608  * r = a + b
15609  */
15610 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
15611 
15612 /*
15613  * r=a mod p
15614  */
15615 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
15616 /* r = (a * b) mod p */
15617 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15618                     const BIGNUM *p, BN_CTX *ctx);
15619 /* r = (a * a) mod p */
15620 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15621 /* r = (1 / b) mod p */
15622 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
15623 /* r = (a / b) mod p */
15624 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15625                     const BIGNUM *p, BN_CTX *ctx);
15626 /* r = (a ^ b) mod p */
15627 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15628                     const BIGNUM *p, BN_CTX *ctx);
15629 /* r = sqrt(a) mod p */
15630 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
15631                      BN_CTX *ctx);
15632 /* r^2 + r = a mod p */
15633 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
15634                            BN_CTX *ctx);
15635 
15636 /*-
15637  * Some functions allow for representation of the irreducible polynomials
15638  * as an unsigned int[], say p.  The irreducible f(t) is then of the form:
15639  *     t^p[0] + t^p[1] + ... + t^p[k]
15640  * where m = p[0] > p[1] > ... > p[k] = 0.
15641  */
15642 /* r = a mod p */
15643 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
15644 /* r = (a * b) mod p */
15645 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15646                         const int p[], BN_CTX *ctx);
15647 /* r = (a * a) mod p */
15648 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
15649                         BN_CTX *ctx);
15650 /* r = (1 / b) mod p */
15651 int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
15652                         BN_CTX *ctx);
15653 /* r = (a / b) mod p */
15654 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15655                         const int p[], BN_CTX *ctx);
15656 /* r = (a ^ b) mod p */
15657 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15658                         const int p[], BN_CTX *ctx);
15659 /* r = sqrt(a) mod p */
15660 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
15661                          const int p[], BN_CTX *ctx);
15662 /* r^2 + r = a mod p */
15663 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
15664                                const int p[], BN_CTX *ctx);
15665 int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
15666 int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
15667 
15668 
15669 
15670 /*
15671  * faster mod functions for the 'NIST primes' 0 <= a < p^2
15672  */
15673 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15674 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15675 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15676 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15677 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15678 
15679 const BIGNUM *BN_get0_nist_prime_192(void);
15680 const BIGNUM *BN_get0_nist_prime_224(void);
15681 const BIGNUM *BN_get0_nist_prime_256(void);
15682 const BIGNUM *BN_get0_nist_prime_384(void);
15683 const BIGNUM *BN_get0_nist_prime_521(void);
15684 
15685 /* library internal functions */
15686 # 788 "/usr/include/openssl/bn.h" 3 4
15687 BIGNUM *bn_expand2(BIGNUM *a, int words);
15688 
15689 BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
15690 
15691 
15692 /*-
15693  * Bignum consistency macros
15694  * There is one "API" macro, bn_fix_top(), for stripping leading zeroes from
15695  * bignum data after direct manipulations on the data. There is also an
15696  * "internal" macro, bn_check_top(), for verifying that there are no leading
15697  * zeroes. Unfortunately, some auditing is required due to the fact that
15698  * bn_fix_top() has become an overabused duct-tape because bignum data is
15699  * occasionally passed around in an inconsistent state. So the following
15700  * changes have been made to sort this out;
15701  * - bn_fix_top()s implementation has been moved to bn_correct_top()
15702  * - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and
15703  *   bn_check_top() is as before.
15704  * - if BN_DEBUG *is* defined;
15705  *   - bn_check_top() tries to pollute unused words even if the bignum 'top' is
15706  *     consistent. (ed: only if BN_DEBUG_RAND is defined)
15707  *   - bn_fix_top() maps to bn_check_top() rather than "fixing" anything.
15708  * The idea is to have debug builds flag up inconsistent bignums when they
15709  * occur. If that occurs in a bn_fix_top(), we examine the code in question; if
15710  * the use of bn_fix_top() was appropriate (ie. it follows directly after code
15711  * that manipulates the bignum) it is converted to bn_correct_top(), and if it
15712  * was not appropriate, we convert it permanently to bn_check_top() and track
15713  * down the cause of the bug. Eventually, no internal code should be using the
15714  * bn_fix_top() macro. External applications and libraries should try this with
15715  * their own code too, both in terms of building against the openssl headers
15716  * with BN_DEBUG defined *and* linking with a version of OpenSSL built with it
15717  * defined. This not only improves external code, it provides more test
15718  * coverage for openssl's own code.
15719  */
15720 # 914 "/usr/include/openssl/bn.h" 3 4
15721 unsigned int bn_mul_add_words(unsigned int *rp, const unsigned int *ap, int num,
15722                           unsigned int w);
15723 unsigned int bn_mul_words(unsigned int *rp, const unsigned int *ap, int num, unsigned int w);
15724 void bn_sqr_words(unsigned int *rp, const unsigned int *ap, int num);
15725 unsigned int bn_div_words(unsigned int h, unsigned int l, unsigned int d);
15726 unsigned int bn_add_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
15727                       int num);
15728 unsigned int bn_sub_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
15729                       int num);
15730 
15731 /* Primes from RFC 2409 */
15732 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
15733 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
15734 
15735 /* Primes from RFC 3526 */
15736 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
15737 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
15738 BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
15739 BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
15740 BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
15741 BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
15742 
15743 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
15744 
15745 /* BEGIN ERROR CODES */
15746 /*
15747  * The following lines are auto generated by the script mkerr.pl. Any changes
15748  * made after this point may be overwritten when the script is next run.
15749  */
15750 void ERR_load_BN_strings(void);
15751 
15752 /* Error codes for the BN functions. */
15753 
15754 /* Function codes. */
15755 # 991 "/usr/include/openssl/bn.h" 3 4
15756 /* Reason codes. */
15757 # 75 "/usr/include/openssl/asn1.h" 2 3 4
15758 # 132 "/usr/include/openssl/asn1.h" 3 4
15759 /* For use with d2i_ASN1_type_bytes() */
15760 # 152 "/usr/include/openssl/asn1.h" 3 4
15761 /* For use with ASN1_mbstring_copy() */
15762 # 161 "/usr/include/openssl/asn1.h" 3 4
15763     struct X509_algor_st;
15764 struct stack_st_X509_ALGOR { _STACK stack; };
15765 
15766 
15767 
15768 
15769 /*
15770  * We MUST make sure that, except for constness, asn1_ctx_st and
15771  * asn1_const_ctx are exactly the same.  Fortunately, as soon as the old ASN1
15772  * parsing macros are gone, we can throw this away as well...
15773  */
15774 typedef struct asn1_ctx_st {
15775     unsigned char *p; /* work char pointer */
15776     int eos; /* end of sequence read for indefinite
15777                                  * encoding */
15778     int error; /* error code to use when returning an error */
15779     int inf; /* constructed if 0x20, indefinite is 0x21 */
15780     int tag; /* tag from last 'get object' */
15781     int xclass; /* class from last 'get object' */
15782     long slen; /* length of last 'get object' */
15783     unsigned char *max; /* largest value of p allowed */
15784     unsigned char *q; /* temporary variable */
15785     unsigned char **pp; /* variable */
15786     int line; /* used in error processing */
15787 } ASN1_CTX;
15788 
15789 typedef struct asn1_const_ctx_st {
15790     const unsigned char *p; /* work char pointer */
15791     int eos; /* end of sequence read for indefinite
15792                                  * encoding */
15793     int error; /* error code to use when returning an error */
15794     int inf; /* constructed if 0x20, indefinite is 0x21 */
15795     int tag; /* tag from last 'get object' */
15796     int xclass; /* class from last 'get object' */
15797     long slen; /* length of last 'get object' */
15798     const unsigned char *max; /* largest value of p allowed */
15799     const unsigned char *q; /* temporary variable */
15800     const unsigned char **pp; /* variable */
15801     int line; /* used in error processing */
15802 } ASN1_const_CTX;
15803 
15804 /*
15805  * These are used internally in the ASN1_OBJECT to keep track of whether the
15806  * names and data need to be free()ed
15807  */
15808 
15809 
15810 
15811 
15812 struct asn1_object_st {
15813     const char *sn, *ln;
15814     int nid;
15815     int length;
15816     const unsigned char *data; /* data remains const after init */
15817     int flags; /* Should we free this one */
15818 };
15819 
15820 
15821 /*
15822  * This indicates that the ASN1_STRING is not a real value but just a place
15823  * holder for the location where indefinite length constructed data should be
15824  * inserted in the memory buffer
15825  */
15826 
15827 
15828 /*
15829  * This flag is used by the CMS code to indicate that a string is not
15830  * complete and is a place holder for content when it had all been accessed.
15831  * The flag will be reset when content has been written to it.
15832  */
15833 
15834 
15835 /*
15836  * This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
15837  * type.
15838  */
15839 
15840 /* This is the base type that holds just about everything :-) */
15841 struct asn1_string_st {
15842     int length;
15843     int type;
15844     unsigned char *data;
15845     /*
15846      * The value of the following field depends on the type being held.  It
15847      * is mostly being used for BIT_STRING so if the input data has a
15848      * non-zero 'unused bits' value, it will be handled correctly
15849      */
15850     long flags;
15851 };
15852 
15853 /*
15854  * ASN1_ENCODING structure: this is used to save the received encoding of an
15855  * ASN1 type. This is useful to get round problems with invalid encodings
15856  * which can break signatures.
15857  */
15858 
15859 typedef struct ASN1_ENCODING_st {
15860     unsigned char *enc; /* DER encoding */
15861     long len; /* Length of encoding */
15862     int modified; /* set to 1 if 'enc' is invalid */
15863 } ASN1_ENCODING;
15864 
15865 /* Used with ASN1 LONG type: if a long is set to this it is omitted */
15866 # 272 "/usr/include/openssl/asn1.h" 3 4
15867 typedef struct asn1_string_table_st {
15868     int nid;
15869     long minsize;
15870     long maxsize;
15871     unsigned long mask;
15872     unsigned long flags;
15873 } ASN1_STRING_TABLE;
15874 
15875 struct stack_st_ASN1_STRING_TABLE { _STACK stack; };
15876 
15877 /* size limits: this stuff is taken straight from RFC2459 */
15878 # 293 "/usr/include/openssl/asn1.h" 3 4
15879 /*
15880  * Declarations for template structures: for full definitions see asn1t.h
15881  */
15882 typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
15883 typedef struct ASN1_TLC_st ASN1_TLC;
15884 /* This is just an opaque pointer */
15885 typedef struct ASN1_VALUE_st ASN1_VALUE;
15886 
15887 /* Declare ASN1 functions: the implement macro in in asn1t.h */
15888 # 363 "/usr/include/openssl/asn1.h" 3 4
15889 typedef void *d2i_of_void(void **,const unsigned char **,long); typedef int i2d_of_void(void *,unsigned char **);
15890 
15891 /*-
15892  * The following macros and typedefs allow an ASN1_ITEM
15893  * to be embedded in a structure and referenced. Since
15894  * the ASN1_ITEM pointers need to be globally accessible
15895  * (possibly from shared libraries) they may exist in
15896  * different forms. On platforms that support it the
15897  * ASN1_ITEM structure itself will be globally exported.
15898  * Other platforms will export a function that returns
15899  * an ASN1_ITEM pointer.
15900  *
15901  * To handle both cases transparently the macros below
15902  * should be used instead of hard coding an ASN1_ITEM
15903  * pointer in a structure.
15904  *
15905  * The structure will look like this:
15906  *
15907  * typedef struct SOMETHING_st {
15908  *      ...
15909  *      ASN1_ITEM_EXP *iptr;
15910  *      ...
15911  * } SOMETHING;
15912  *
15913  * It would be initialised as e.g.:
15914  *
15915  * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
15916  *
15917  * and the actual pointer extracted with:
15918  *
15919  * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
15920  *
15921  * Finally an ASN1_ITEM pointer can be extracted from an
15922  * appropriate reference with: ASN1_ITEM_rptr(X509). This
15923  * would be used when a function takes an ASN1_ITEM * argument.
15924  *
15925  */
15926 
15927 
15928 
15929 /* ASN1_ITEM pointer exported type */
15930 typedef const ASN1_ITEM ASN1_ITEM_EXP;
15931 
15932 /* Macro to obtain ASN1_ITEM pointer from exported type */
15933 
15934 
15935 /* Macro to include ASN1_ITEM pointer from base type */
15936 # 440 "/usr/include/openssl/asn1.h" 3 4
15937 /* Parameters used by ASN1_STRING_print_ex() */
15938 
15939 /*
15940  * These determine which characters to escape: RFC2253 special characters,
15941  * control characters and MSB set characters
15942  */
15943 
15944 
15945 
15946 
15947 
15948 /*
15949  * This flag determines how we do escaping: normally RC2253 backslash only,
15950  * set this to use backslash and quote.
15951  */
15952 
15953 
15954 
15955 /* These three flags are internal use only. */
15956 
15957 /* Character is a valid PrintableString character */
15958 
15959 /* Character needs escaping if it is the first character */
15960 
15961 /* Character needs escaping if it is the last character */
15962 
15963 
15964 /*
15965  * NB the internal flags are safely reused below by flags handled at the top
15966  * level.
15967  */
15968 
15969 /*
15970  * If this is set we convert all character strings to UTF8 first
15971  */
15972 
15973 
15974 
15975 /*
15976  * If this is set we don't attempt to interpret content: just assume all
15977  * strings are 1 byte per character. This will produce some pretty odd
15978  * looking output!
15979  */
15980 
15981 
15982 
15983 /* If this is set we include the string type in the output */
15984 
15985 
15986 /*
15987  * This determines which strings to display and which to 'dump' (hex dump of
15988  * content octets or DER encoding). We can only dump non character strings or
15989  * everything. If we don't dump 'unknown' they are interpreted as character
15990  * strings with 1 octet per character and are subject to the usual escaping
15991  * options.
15992  */
15993 
15994 
15995 
15996 
15997 /*
15998  * These determine what 'dumping' does, we can dump the content octets or the
15999  * DER encoding: both use the RFC2253 #XXXXX notation.
16000  */
16001 
16002 
16003 
16004 /*
16005  * All the string flags consistent with RFC2253, escaping control characters
16006  * isn't essential in RFC2253 but it is advisable anyway.
16007  */
16008 # 519 "/usr/include/openssl/asn1.h" 3 4
16009 struct stack_st_ASN1_INTEGER { _STACK stack; };
16010 
16011 
16012 struct stack_st_ASN1_GENERALSTRING { _STACK stack; };
16013 
16014 typedef struct asn1_type_st {
16015     int type;
16016     union {
16017         char *ptr;
16018         ASN1_BOOLEAN boolean;
16019         ASN1_STRING *asn1_string;
16020         ASN1_OBJECT *object;
16021         ASN1_INTEGER *integer;
16022         ASN1_ENUMERATED *enumerated;
16023         ASN1_BIT_STRING *bit_string;
16024         ASN1_OCTET_STRING *octet_string;
16025         ASN1_PRINTABLESTRING *printablestring;
16026         ASN1_T61STRING *t61string;
16027         ASN1_IA5STRING *ia5string;
16028         ASN1_GENERALSTRING *generalstring;
16029         ASN1_BMPSTRING *bmpstring;
16030         ASN1_UNIVERSALSTRING *universalstring;
16031         ASN1_UTCTIME *utctime;
16032         ASN1_GENERALIZEDTIME *generalizedtime;
16033         ASN1_VISIBLESTRING *visiblestring;
16034         ASN1_UTF8STRING *utf8string;
16035         /*
16036          * set and sequence are left complete and still contain the set or
16037          * sequence bytes
16038          */
16039         ASN1_STRING *set;
16040         ASN1_STRING *sequence;
16041         ASN1_VALUE *asn1_value;
16042     } value;
16043 } ASN1_TYPE;
16044 
16045 struct stack_st_ASN1_TYPE { _STACK stack; };
16046 
16047 
16048 typedef struct stack_st_ASN1_TYPE ASN1_SEQUENCE_ANY;
16049 
16050 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;
16051 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;
16052 
16053 typedef struct NETSCAPE_X509_st {
16054     ASN1_OCTET_STRING *header;
16055     X509 *cert;
16056 } NETSCAPE_X509;
16057 
16058 /* This is used to contain a list of bit names */
16059 typedef struct BIT_STRING_BITNAME_st {
16060     int bitnum;
16061     const char *lname;
16062     const char *sname;
16063 } BIT_STRING_BITNAME;
16064 
16065 
16066 
16067 
16068 
16069 
16070 /* Macros for string operations */
16071 # 772 "/usr/include/openssl/asn1.h" 3 4
16072   /* for the is_set parameter to i2d_ASN1_SET */
16073 
16074 
16075 
16076 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;
16077 
16078 int ASN1_TYPE_get(ASN1_TYPE *a);
16079 void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
16080 int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
16081 int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
16082 
16083 ASN1_OBJECT *ASN1_OBJECT_new(void);
16084 void ASN1_OBJECT_free(ASN1_OBJECT *a);
16085 int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp);
16086 ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
16087                              long length);
16088 ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
16089                              long length);
16090 
16091 extern const ASN1_ITEM ASN1_OBJECT_it;
16092 
16093 struct stack_st_ASN1_OBJECT { _STACK stack; };
16094 
16095 
16096 ASN1_STRING *ASN1_STRING_new(void);
16097 void ASN1_STRING_free(ASN1_STRING *a);
16098 void ASN1_STRING_clear_free(ASN1_STRING *a);
16099 int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
16100 ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a);
16101 ASN1_STRING *ASN1_STRING_type_new(int type);
16102 int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
16103   /*
16104    * Since this is used to store all sorts of things, via macros, for now,
16105    * make its data void *
16106    */
16107 int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
16108 void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
16109 int ASN1_STRING_length(const ASN1_STRING *x);
16110 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
16111 int ASN1_STRING_type(ASN1_STRING *x);
16112 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
16113 
16114 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;
16115 int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp);
16116 ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
16117                                      const unsigned char **pp, long length);
16118 int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
16119 int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
16120 int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);
16121 int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a,
16122                           unsigned char *flags, int flags_len);
16123 
16124 
16125 int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
16126                                BIT_STRING_BITNAME *tbl, int indent);
16127 
16128 int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl);
16129 int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
16130                             BIT_STRING_BITNAME *tbl);
16131 
16132 int i2d_ASN1_BOOLEAN(int a, unsigned char **pp);
16133 int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length);
16134 
16135 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;
16136 int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp);
16137 ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp,
16138                                long length);
16139 ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
16140                                 long length);
16141 ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x);
16142 int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
16143 
16144 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;
16145 
16146 int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
16147 ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
16148 ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
16149                                int offset_day, long offset_sec);
16150 int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
16151 int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
16152 
16153 
16154 
16155 
16156 int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
16157 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
16158                                                time_t t);
16159 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
16160                                                time_t t, int offset_day,
16161                                                long offset_sec);
16162 int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
16163 int ASN1_TIME_diff(int *pday, int *psec,
16164                    const ASN1_TIME *from, const ASN1_TIME *to);
16165 
16166 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;
16167 ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a);
16168 int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
16169                           const ASN1_OCTET_STRING *b);
16170 int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
16171                           int len);
16172 
16173 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;
16174 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;
16175 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;
16176 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;
16177 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;
16178 
16179 int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
16180 int UTF8_putc(unsigned char *str, int len, unsigned long value);
16181 
16182 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;
16183 
16184 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;
16185 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;
16186 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;
16187 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;
16188 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;
16189 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;
16190 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;
16191 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;
16192 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;
16193 
16194 extern const ASN1_ITEM ASN1_OCTET_STRING_NDEF_it;
16195 
16196 ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
16197 ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
16198                          int offset_day, long offset_sec);
16199 int ASN1_TIME_check(ASN1_TIME *t);
16200 ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME
16201                                                    **out);
16202 int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
16203 
16204 int i2d_ASN1_SET(struct stack_st_OPENSSL_BLOCK *a, unsigned char **pp,
16205                  i2d_of_void *i2d, int ex_tag, int ex_class, int is_set);
16206 struct stack_st_OPENSSL_BLOCK *d2i_ASN1_SET(struct stack_st_OPENSSL_BLOCK **a,
16207                                       const unsigned char **pp,
16208                                       long length, d2i_of_void *d2i,
16209                                       void (*free_func) (OPENSSL_BLOCK),
16210                                       int ex_tag, int ex_class);
16211 
16212 
16213 int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);
16214 int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
16215 int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
16216 int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
16217 int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a);
16218 int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
16219 int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type);
16220 
16221 int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a);
16222 
16223 int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
16224 ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
16225                                 const char *sn, const char *ln);
16226 
16227 int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
16228 long ASN1_INTEGER_get(const ASN1_INTEGER *a);
16229 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
16230 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
16231 
16232 int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
16233 long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a);
16234 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai);
16235 BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn);
16236 
16237 /* General */
16238 /* given a string, return the correct type, max is the maximum length */
16239 int ASN1_PRINTABLE_type(const unsigned char *s, int max);
16240 
16241 int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass);
16242 ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
16243                             long length, int Ptag, int Pclass);
16244 unsigned long ASN1_tag2bit(int tag);
16245 /* type is one or more of the B_ASN1_ values. */
16246 ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp,
16247                                  long length, int type);
16248 
16249 /* PARSING */
16250 int asn1_Finish(ASN1_CTX *c);
16251 int asn1_const_Finish(ASN1_const_CTX *c);
16252 
16253 /* SPECIALS */
16254 int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
16255                     int *pclass, long omax);
16256 int ASN1_check_infinite_end(unsigned char **p, long len);
16257 int ASN1_const_check_infinite_end(const unsigned char **p, long len);
16258 void ASN1_put_object(unsigned char **pp, int constructed, int length,
16259                      int tag, int xclass);
16260 int ASN1_put_eoc(unsigned char **pp);
16261 int ASN1_object_size(int constructed, int length, int tag);
16262 
16263 /* Used to implement other functions */
16264 void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);
16265 # 976 "/usr/include/openssl/asn1.h" 3 4
16266 void *ASN1_item_dup(const ASN1_ITEM *it, void *x);
16267 
16268 /* ASN1 alloc/free macros for when a type is only used internally */
16269 
16270 
16271 
16272 
16273 
16274 
16275 void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
16276 
16277 
16278 
16279 
16280 
16281 
16282 
16283 void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
16284 int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x);
16285 # 1006 "/usr/include/openssl/asn1.h" 3 4
16286 int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x);
16287 int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);
16288 
16289 
16290 int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in);
16291 
16292 
16293 void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
16294 
16295 
16296 
16297 
16298 
16299 
16300 
16301 void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x);
16302 int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x);
16303 # 1034 "/usr/include/openssl/asn1.h" 3 4
16304 int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x);
16305 int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
16306 int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
16307 int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);
16308 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
16309 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);
16310 int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
16311                   unsigned char *buf, int off);
16312 int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
16313 int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
16314                     int dump);
16315 
16316 const char *ASN1_tag2str(int tag);
16317 
16318 /* Used to load and write netscape format cert */
16319 
16320 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;
16321 
16322 int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
16323 
16324 int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
16325 int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, int max_len);
16326 int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
16327                                   unsigned char *data, int len);
16328 int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num,
16329                                   unsigned char *data, int max_len);
16330 
16331 struct stack_st_OPENSSL_BLOCK *ASN1_seq_unpack(const unsigned char *buf, int len,
16332                                          d2i_of_void *d2i,
16333                                          void (*free_func) (OPENSSL_BLOCK));
16334 unsigned char *ASN1_seq_pack(struct stack_st_OPENSSL_BLOCK *safes, i2d_of_void *i2d,
16335                              unsigned char **buf, int *len);
16336 void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);
16337 void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
16338 ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d,
16339                               ASN1_OCTET_STRING **oct);
16340 
16341 
16342 
16343 
16344 
16345 
16346 ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
16347                             ASN1_OCTET_STRING **oct);
16348 
16349 void ASN1_STRING_set_default_mask(unsigned long mask);
16350 int ASN1_STRING_set_default_mask_asc(const char *p);
16351 unsigned long ASN1_STRING_get_default_mask(void);
16352 int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
16353                        int inform, unsigned long mask);
16354 int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
16355                         int inform, unsigned long mask,
16356                         long minsize, long maxsize);
16357 
16358 ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
16359                                     const unsigned char *in, int inlen,
16360                                     int inform, int nid);
16361 ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
16362 int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
16363 void ASN1_STRING_TABLE_cleanup(void);
16364 
16365 /* ASN1 template functions */
16366 
16367 /* Old API compatible functions */
16368 ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
16369 void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
16370 ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
16371                           long len, const ASN1_ITEM *it);
16372 int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
16373 int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out,
16374                        const ASN1_ITEM *it);
16375 
16376 void ASN1_add_oid_module(void);
16377 
16378 ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf);
16379 ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
16380 
16381 /* ASN1 Print flags */
16382 
16383 /* Indicate missing OPTIONAL fields */
16384 
16385 /* Mark start and end of SEQUENCE */
16386 
16387 /* Mark start and end of SEQUENCE/SET OF */
16388 
16389 /* Show the ASN1 type of primitives */
16390 
16391 /* Don't show ASN1 type of ANY */
16392 
16393 /* Don't show ASN1 type of MSTRINGs */
16394 
16395 /* Don't show field names in SEQUENCE */
16396 
16397 /* Show structure names of each SEQUENCE field */
16398 
16399 /* Don't show structure name even at top level */
16400 
16401 
16402 int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent,
16403                     const ASN1_ITEM *it, const ASN1_PCTX *pctx);
16404 ASN1_PCTX *ASN1_PCTX_new(void);
16405 void ASN1_PCTX_free(ASN1_PCTX *p);
16406 unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p);
16407 void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
16408 unsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p);
16409 void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
16410 unsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p);
16411 void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
16412 unsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p);
16413 void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
16414 unsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p);
16415 void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
16416 
16417 BIO_METHOD *BIO_f_asn1(void);
16418 
16419 BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
16420 
16421 int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
16422                         const ASN1_ITEM *it);
16423 int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
16424                               const char *hdr, const ASN1_ITEM *it);
16425 int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
16426                      int ctype_nid, int econt_nid,
16427                      struct stack_st_X509_ALGOR *mdalgs, const ASN1_ITEM *it);
16428 ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
16429 int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
16430 int SMIME_text(BIO *in, BIO *out);
16431 
16432 /* BEGIN ERROR CODES */
16433 /*
16434  * The following lines are auto generated by the script mkerr.pl. Any changes
16435  * made after this point may be overwritten when the script is next run.
16436  */
16437 
16438 void ERR_load_ASN1_strings(void);
16439 
16440 /* Error codes for the ASN1 functions. */
16441 
16442 /* Function codes. */
16443 # 1298 "/usr/include/openssl/asn1.h" 3 4
16444 /* Reason codes. */
16445 # 966 "/usr/include/openssl/objects.h" 2 3 4
16446 # 984 "/usr/include/openssl/objects.h" 3 4
16447 typedef struct obj_name_st {
16448     int type;
16449     int alias;
16450     const char *name;
16451     const char *data;
16452 } OBJ_NAME;
16453 
16454 
16455 
16456 int OBJ_NAME_init(void);
16457 int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
16458                        int (*cmp_func) (const char *, const char *),
16459                        void (*free_func) (const char *, int, const char *));
16460 const char *OBJ_NAME_get(const char *name, int type);
16461 int OBJ_NAME_add(const char *name, int type, const char *data);
16462 int OBJ_NAME_remove(const char *name, int type);
16463 void OBJ_NAME_cleanup(int type); /* -1 for everything */
16464 void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg),
16465                      void *arg);
16466 void OBJ_NAME_do_all_sorted(int type,
16467                             void (*fn) (const OBJ_NAME *, void *arg),
16468                             void *arg);
16469 
16470 ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o);
16471 ASN1_OBJECT *OBJ_nid2obj(int n);
16472 const char *OBJ_nid2ln(int n);
16473 const char *OBJ_nid2sn(int n);
16474 int OBJ_obj2nid(const ASN1_OBJECT *o);
16475 ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name);
16476 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
16477 int OBJ_txt2nid(const char *s);
16478 int OBJ_ln2nid(const char *s);
16479 int OBJ_sn2nid(const char *s);
16480 int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
16481 const void *OBJ_bsearch_(const void *key, const void *base, int num, int size,
16482                          int (*cmp) (const void *, const void *));
16483 const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
16484                             int size,
16485                             int (*cmp) (const void *, const void *),
16486                             int flags);
16487 # 1035 "/usr/include/openssl/objects.h" 3 4
16488 /*-
16489  * Unsolved problem: if a type is actually a pointer type, like
16490  * nid_triple is, then its impossible to get a const where you need
16491  * it. Consider:
16492  *
16493  * typedef int nid_triple[3];
16494  * const void *a_;
16495  * const nid_triple const *a = a_;
16496  *
16497  * The assignement discards a const because what you really want is:
16498  *
16499  * const int const * const *a = a_;
16500  *
16501  * But if you do that, you lose the fact that a is an array of 3 ints,
16502  * which breaks comparison functions.
16503  *
16504  * Thus we end up having to cast, sadly, or unpack the
16505  * declarations. Or, as I finally did in this case, delcare nid_triple
16506  * to be a struct, which it should have been in the first place.
16507  *
16508  * Ben, August 2008.
16509  *
16510  * Also, strictly speaking not all types need be const, but handling
16511  * the non-constness means a lot of complication, and in practice
16512  * comparison routines do always not touch their arguments.
16513  */
16514 # 1104 "/usr/include/openssl/objects.h" 3 4
16515 int OBJ_new_nid(int num);
16516 int OBJ_add_object(const ASN1_OBJECT *obj);
16517 int OBJ_create(const char *oid, const char *sn, const char *ln);
16518 void OBJ_cleanup(void);
16519 int OBJ_create_objects(BIO *in);
16520 
16521 int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);
16522 int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
16523 int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
16524 void OBJ_sigid_free(void);
16525 
16526 extern int obj_cleanup_defer;
16527 void check_defer(int nid);
16528 
16529 /* BEGIN ERROR CODES */
16530 /*
16531  * The following lines are auto generated by the script mkerr.pl. Any changes
16532  * made after this point may be overwritten when the script is next run.
16533  */
16534 void ERR_load_OBJ_strings(void);
16535 
16536 /* Error codes for the OBJ functions. */
16537 
16538 /* Function codes. */
16539 # 1136 "/usr/include/openssl/objects.h" 3 4
16540 /* Reason codes. */
16541 # 95 "/usr/include/openssl/evp.h" 2 3 4
16542 # 125 "/usr/include/openssl/evp.h" 3 4
16543 /*
16544  * Type needs to be a bit field Sub-type needs to be for variations on the
16545  * method, as in, can it do arbitrary encryption....
16546  */
16547 struct evp_pkey_st {
16548     int type;
16549     int save_type;
16550     int references;
16551     const EVP_PKEY_ASN1_METHOD *ameth;
16552     ENGINE *engine;
16553     union {
16554         char *ptr;
16555 
16556         struct rsa_st *rsa; /* RSA */
16557 
16558 
16559         struct dsa_st *dsa; /* DSA */
16560 
16561 
16562         struct dh_st *dh; /* DH */
16563 
16564 
16565         struct ec_key_st *ec; /* ECC */
16566 
16567     } pkey;
16568     int save_parameters;
16569     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
16570 } /* EVP_PKEY */ ;
16571 
16572 
16573 
16574 
16575 
16576 
16577 
16578 struct env_md_st {
16579     int type;
16580     int pkey_type;
16581     int md_size;
16582     unsigned long flags;
16583     int (*init) (EVP_MD_CTX *ctx);
16584     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
16585     int (*final) (EVP_MD_CTX *ctx, unsigned char *md);
16586     int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from);
16587     int (*cleanup) (EVP_MD_CTX *ctx);
16588     /* FIXME: prototype these some day */
16589     int (*sign) (int type, const unsigned char *m, unsigned int m_length,
16590                  unsigned char *sigret, unsigned int *siglen, void *key);
16591     int (*verify) (int type, const unsigned char *m, unsigned int m_length,
16592                    const unsigned char *sigbuf, unsigned int siglen,
16593                    void *key);
16594     int required_pkey_type[5]; /* EVP_PKEY_xxx */
16595     int block_size;
16596     int ctx_size; /* how big does the ctx->md_data need to be */
16597     /* control function */
16598     int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
16599 } /* EVP_MD */ ;
16600 
16601 typedef int evp_sign_method(int type, const unsigned char *m,
16602                             unsigned int m_length, unsigned char *sigret,
16603                             unsigned int *siglen, void *key);
16604 typedef int evp_verify_method(int type, const unsigned char *m,
16605                               unsigned int m_length,
16606                               const unsigned char *sigbuf,
16607                               unsigned int siglen, void *key);
16608 
16609 /* digest can only handle a single block */
16610 
16611 
16612 /*
16613  * digest is a "clone" digest used
16614  * which is a copy of an existing
16615  * one for a specific public key type.
16616  * EVP_dss1() etc
16617  */
16618 
16619 
16620 /* Digest uses EVP_PKEY_METHOD for signing instead of MD specific signing */
16621 
16622 
16623 
16624 /* DigestAlgorithmIdentifier flags... */
16625 
16626 
16627 
16628 /* NULL or absent parameter accepted. Use NULL */
16629 
16630 
16631 
16632 /* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */
16633 
16634 
16635 
16636 /* Custom handling via ctrl */
16637 
16638 
16639 
16640 /* Note if suitable for use in FIPS mode */
16641 
16642 
16643 /* Digest ctrls */
16644 
16645 
16646 
16647 
16648 /* Minimum Algorithm specific ctrl value */
16649 # 268 "/usr/include/openssl/evp.h" 3 4
16650 struct env_md_ctx_st {
16651     const EVP_MD *digest;
16652     ENGINE *engine; /* functional reference if 'digest' is
16653                                  * ENGINE-provided */
16654     unsigned long flags;
16655     void *md_data;
16656     /* Public key context for sign/verify */
16657     EVP_PKEY_CTX *pctx;
16658     /* Update function: usually copied from EVP_MD */
16659     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
16660 } /* EVP_MD_CTX */ ;
16661 
16662 /* values for EVP_MD_CTX flags */
16663 
16664 
16665 
16666 
16667 
16668 
16669 
16670 /*
16671  * FIPS and pad options are ignored in 1.0.0, definitions are here so we
16672  * don't accidentally reuse the values for other purposes.
16673  */
16674 
16675 
16676 
16677 
16678 /*
16679  * The following PAD options are also currently ignored in 1.0.0, digest
16680  * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*()
16681  * instead.
16682  */
16683 
16684 
16685 
16686 
16687 
16688 
16689 
16690 struct evp_cipher_st {
16691     int nid;
16692     int block_size;
16693     /* Default value for variable length ciphers */
16694     int key_len;
16695     int iv_len;
16696     /* Various flags */
16697     unsigned long flags;
16698     /* init key */
16699     int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key,
16700                  const unsigned char *iv, int enc);
16701     /* encrypt/decrypt data */
16702     int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out,
16703                       const unsigned char *in, size_t inl);
16704     /* cleanup ctx */
16705     int (*cleanup) (EVP_CIPHER_CTX *);
16706     /* how big ctx->cipher_data needs to be */
16707     int ctx_size;
16708     /* Populate a ASN1_TYPE with parameters */
16709     int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
16710     /* Get parameters from a ASN1_TYPE */
16711     int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
16712     /* Miscellaneous operations */
16713     int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr);
16714     /* Application data */
16715     void *app_data;
16716 } /* EVP_CIPHER */ ;
16717 
16718 /* Values for cipher flags */
16719 
16720 /* Modes for ciphers */
16721 # 351 "/usr/include/openssl/evp.h" 3 4
16722 /* Set if variable length cipher */
16723 
16724 /* Set if the iv handling should be done by the cipher itself */
16725 
16726 /* Set if the cipher's init() function should be called if key is NULL */
16727 
16728 /* Call ctrl() to init cipher parameters */
16729 
16730 /* Don't use standard key length function */
16731 
16732 /* Don't use standard block padding */
16733 
16734 /* cipher handles random key generation */
16735 
16736 /* cipher has its own additional copying logic */
16737 
16738 /* Allow use default ASN1 get/set iv */
16739 
16740 /* Buffer length in bits not bytes: CFB1 mode only */
16741 
16742 /* Note if suitable for use in FIPS mode */
16743 
16744 /* Allow non FIPS cipher in FIPS mode */
16745 
16746 /*
16747  * Cipher handles any and all padding logic as well as finalisation.
16748  */
16749 
16750 
16751 
16752 
16753 /*
16754  * Cipher context flag to indicate we can handle wrap mode: if allowed in
16755  * older applications it could overflow buffers.
16756  */
16757 
16758 
16759 
16760 /* ctrl() values */
16761 # 410 "/usr/include/openssl/evp.h" 3 4
16762 /*
16763  * AEAD cipher deduces payload length and returns number of bytes required to
16764  * store MAC and eventual padding. Subsequent call to EVP_Cipher even
16765  * appends/verifies MAC.
16766  */
16767 
16768 /* Used by composite AEAD ciphers, no-op in GCM, CCM... */
16769 
16770 /* Set the GCM invocation field, decrypt only */
16771 
16772 
16773 
16774 
16775 
16776 
16777 
16778 /* RFC 5246 defines additional data to be 13 bytes in length */
16779 
16780 
16781 typedef struct {
16782     unsigned char *out;
16783     const unsigned char *inp;
16784     size_t len;
16785     unsigned int interleave;
16786 } EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM;
16787 
16788 /* GCM TLS constants */
16789 /* Length of fixed part of IV derived from PRF */
16790 
16791 /* Length of explicit part of IV part of TLS records */
16792 
16793 /* Length of tag for TLS */
16794 
16795 
16796 typedef struct evp_cipher_info_st {
16797     const EVP_CIPHER *cipher;
16798     unsigned char iv[16];
16799 } EVP_CIPHER_INFO;
16800 
16801 struct evp_cipher_ctx_st {
16802     const EVP_CIPHER *cipher;
16803     ENGINE *engine; /* functional reference if 'cipher' is
16804                                  * ENGINE-provided */
16805     int encrypt; /* encrypt or decrypt */
16806     int buf_len; /* number we have left */
16807     unsigned char oiv[16]; /* original iv */
16808     unsigned char iv[16]; /* working iv */
16809     unsigned char buf[32]; /* saved partial block */
16810     int num; /* used by cfb/ofb/ctr mode */
16811     void *app_data; /* application stuff */
16812     int key_len; /* May change for variable length cipher */
16813     unsigned long flags; /* Various flags */
16814     void *cipher_data; /* per EVP data */
16815     int final_used;
16816     int block_mask;
16817     unsigned char final[32]; /* possible final block */
16818 } /* EVP_CIPHER_CTX */ ;
16819 
16820 typedef struct evp_Encode_Ctx_st {
16821     /* number saved in a partial encode/decode */
16822     int num;
16823     /*
16824      * The length is either the output line length (in input bytes) or the
16825      * shortest input line length that is ok.  Once decoding begins, the
16826      * length is adjusted up each time a longer line is decoded
16827      */
16828     int length;
16829     /* data to encode */
16830     unsigned char enc_data[80];
16831     /* number read on current line */
16832     int line_num;
16833     int expect_nl;
16834 } EVP_ENCODE_CTX;
16835 
16836 /* Password based encryption function */
16837 typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass,
16838                               int passlen, ASN1_TYPE *param,
16839                               const EVP_CIPHER *cipher, const EVP_MD *md,
16840                               int en_de);
16841 # 510 "/usr/include/openssl/evp.h" 3 4
16842 /* Add some extra combinations */
16843 
16844 
16845 
16846 
16847 
16848 int EVP_MD_type(const EVP_MD *md);
16849 
16850 
16851 int EVP_MD_pkey_type(const EVP_MD *md);
16852 int EVP_MD_size(const EVP_MD *md);
16853 int EVP_MD_block_size(const EVP_MD *md);
16854 unsigned long EVP_MD_flags(const EVP_MD *md);
16855 
16856 const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
16857 
16858 
16859 
16860 
16861 int EVP_CIPHER_nid(const EVP_CIPHER *cipher);
16862 
16863 int EVP_CIPHER_block_size(const EVP_CIPHER *cipher);
16864 int EVP_CIPHER_key_length(const EVP_CIPHER *cipher);
16865 int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher);
16866 unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher);
16867 
16868 
16869 const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);
16870 int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx);
16871 int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx);
16872 int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx);
16873 int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx);
16874 int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
16875 void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
16876 void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);
16877 
16878 unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx);
16879 # 574 "/usr/include/openssl/evp.h" 3 4
16880 int EVP_Cipher(EVP_CIPHER_CTX *c,
16881                unsigned char *out, const unsigned char *in, unsigned int inl);
16882 # 586 "/usr/include/openssl/evp.h" 3 4
16883 void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
16884 int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
16885 EVP_MD_CTX *EVP_MD_CTX_create(void);
16886 void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
16887 int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
16888 void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
16889 void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
16890 int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
16891 int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
16892 int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
16893 int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
16894 int EVP_Digest(const void *data, size_t count,
16895                unsigned char *md, unsigned int *size, const EVP_MD *type,
16896                ENGINE *impl);
16897 
16898 int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in);
16899 int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
16900 int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
16901 
16902 int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);
16903 int EVP_read_pw_string_min(char *buf, int minlen, int maxlen,
16904                            const char *prompt, int verify);
16905 void EVP_set_pw_prompt(const char *prompt);
16906 char *EVP_get_pw_prompt(void);
16907 
16908 int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
16909                    const unsigned char *salt, const unsigned char *data,
16910                    int datal, int count, unsigned char *key,
16911                    unsigned char *iv);
16912 
16913 void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
16914 void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
16915 int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);
16916 
16917 int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
16918                     const unsigned char *key, const unsigned char *iv);
16919 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
16920                        ENGINE *impl, const unsigned char *key,
16921                        const unsigned char *iv);
16922 int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
16923                       const unsigned char *in, int inl);
16924 int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
16925 int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
16926 
16927 int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
16928                     const unsigned char *key, const unsigned char *iv);
16929 int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
16930                        ENGINE *impl, const unsigned char *key,
16931                        const unsigned char *iv);
16932 int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
16933                       const unsigned char *in, int inl);
16934 int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
16935 int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
16936 
16937 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
16938                    const unsigned char *key, const unsigned char *iv,
16939                    int enc);
16940 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
16941                       ENGINE *impl, const unsigned char *key,
16942                       const unsigned char *iv, int enc);
16943 int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
16944                      const unsigned char *in, int inl);
16945 int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
16946 int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
16947 
16948 int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
16949                   EVP_PKEY *pkey);
16950 
16951 int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
16952                     unsigned int siglen, EVP_PKEY *pkey);
16953 
16954 int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
16955                        const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
16956 int EVP_DigestSignFinal(EVP_MD_CTX *ctx,
16957                         unsigned char *sigret, size_t *siglen);
16958 
16959 int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
16960                          const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
16961 int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx,
16962                           const unsigned char *sig, size_t siglen);
16963 
16964 int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
16965                  const unsigned char *ek, int ekl, const unsigned char *iv,
16966                  EVP_PKEY *priv);
16967 int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
16968 
16969 int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
16970                  unsigned char **ek, int *ekl, unsigned char *iv,
16971                  EVP_PKEY **pubk, int npubk);
16972 int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
16973 
16974 void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
16975 void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
16976                       const unsigned char *in, int inl);
16977 void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
16978 int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
16979 
16980 void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
16981 int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
16982                      const unsigned char *in, int inl);
16983 int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
16984                     char *out, int *outl);
16985 int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
16986 
16987 void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
16988 int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
16989 EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
16990 void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a);
16991 int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
16992 int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
16993 int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
16994 int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
16995 
16996 
16997 BIO_METHOD *BIO_f_md(void);
16998 BIO_METHOD *BIO_f_base64(void);
16999 BIO_METHOD *BIO_f_cipher(void);
17000 BIO_METHOD *BIO_f_reliable(void);
17001 void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
17002                     const unsigned char *i, int enc);
17003 
17004 
17005 const EVP_MD *EVP_md_null(void);
17006 
17007 const EVP_MD *EVP_md2(void);
17008 
17009 
17010 const EVP_MD *EVP_md4(void);
17011 
17012 
17013 const EVP_MD *EVP_md5(void);
17014 
17015 
17016 const EVP_MD *EVP_sha(void);
17017 const EVP_MD *EVP_sha1(void);
17018 const EVP_MD *EVP_dss(void);
17019 const EVP_MD *EVP_dss1(void);
17020 const EVP_MD *EVP_ecdsa(void);
17021 
17022 
17023 const EVP_MD *EVP_sha224(void);
17024 const EVP_MD *EVP_sha256(void);
17025 
17026 
17027 const EVP_MD *EVP_sha384(void);
17028 const EVP_MD *EVP_sha512(void);
17029 
17030 
17031 
17032 
17033 
17034 const EVP_MD *EVP_ripemd160(void);
17035 
17036 
17037 
17038 
17039 const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */
17040 
17041 const EVP_CIPHER *EVP_des_ecb(void);
17042 const EVP_CIPHER *EVP_des_ede(void);
17043 const EVP_CIPHER *EVP_des_ede3(void);
17044 const EVP_CIPHER *EVP_des_ede_ecb(void);
17045 const EVP_CIPHER *EVP_des_ede3_ecb(void);
17046 const EVP_CIPHER *EVP_des_cfb64(void);
17047 
17048 const EVP_CIPHER *EVP_des_cfb1(void);
17049 const EVP_CIPHER *EVP_des_cfb8(void);
17050 const EVP_CIPHER *EVP_des_ede_cfb64(void);
17051 
17052 
17053 
17054 
17055 
17056 const EVP_CIPHER *EVP_des_ede3_cfb64(void);
17057 
17058 const EVP_CIPHER *EVP_des_ede3_cfb1(void);
17059 const EVP_CIPHER *EVP_des_ede3_cfb8(void);
17060 const EVP_CIPHER *EVP_des_ofb(void);
17061 const EVP_CIPHER *EVP_des_ede_ofb(void);
17062 const EVP_CIPHER *EVP_des_ede3_ofb(void);
17063 const EVP_CIPHER *EVP_des_cbc(void);
17064 const EVP_CIPHER *EVP_des_ede_cbc(void);
17065 const EVP_CIPHER *EVP_des_ede3_cbc(void);
17066 const EVP_CIPHER *EVP_desx_cbc(void);
17067 const EVP_CIPHER *EVP_des_ede3_wrap(void);
17068 /*
17069  * This should now be supported through the dev_crypto ENGINE. But also, why
17070  * are rc4 and md5 declarations made here inside a "NO_DES" precompiler
17071  * branch?
17072  */
17073 # 785 "/usr/include/openssl/evp.h" 3 4
17074 const EVP_CIPHER *EVP_rc4(void);
17075 const EVP_CIPHER *EVP_rc4_40(void);
17076 
17077 const EVP_CIPHER *EVP_rc4_hmac_md5(void);
17078 # 799 "/usr/include/openssl/evp.h" 3 4
17079 const EVP_CIPHER *EVP_rc2_ecb(void);
17080 const EVP_CIPHER *EVP_rc2_cbc(void);
17081 const EVP_CIPHER *EVP_rc2_40_cbc(void);
17082 const EVP_CIPHER *EVP_rc2_64_cbc(void);
17083 const EVP_CIPHER *EVP_rc2_cfb64(void);
17084 
17085 const EVP_CIPHER *EVP_rc2_ofb(void);
17086 
17087 
17088 const EVP_CIPHER *EVP_bf_ecb(void);
17089 const EVP_CIPHER *EVP_bf_cbc(void);
17090 const EVP_CIPHER *EVP_bf_cfb64(void);
17091 
17092 const EVP_CIPHER *EVP_bf_ofb(void);
17093 
17094 
17095 const EVP_CIPHER *EVP_cast5_ecb(void);
17096 const EVP_CIPHER *EVP_cast5_cbc(void);
17097 const EVP_CIPHER *EVP_cast5_cfb64(void);
17098 
17099 const EVP_CIPHER *EVP_cast5_ofb(void);
17100 # 829 "/usr/include/openssl/evp.h" 3 4
17101 const EVP_CIPHER *EVP_aes_128_ecb(void);
17102 const EVP_CIPHER *EVP_aes_128_cbc(void);
17103 const EVP_CIPHER *EVP_aes_128_cfb1(void);
17104 const EVP_CIPHER *EVP_aes_128_cfb8(void);
17105 const EVP_CIPHER *EVP_aes_128_cfb128(void);
17106 
17107 const EVP_CIPHER *EVP_aes_128_ofb(void);
17108 const EVP_CIPHER *EVP_aes_128_ctr(void);
17109 const EVP_CIPHER *EVP_aes_128_ccm(void);
17110 const EVP_CIPHER *EVP_aes_128_gcm(void);
17111 const EVP_CIPHER *EVP_aes_128_xts(void);
17112 const EVP_CIPHER *EVP_aes_128_wrap(void);
17113 const EVP_CIPHER *EVP_aes_192_ecb(void);
17114 const EVP_CIPHER *EVP_aes_192_cbc(void);
17115 const EVP_CIPHER *EVP_aes_192_cfb1(void);
17116 const EVP_CIPHER *EVP_aes_192_cfb8(void);
17117 const EVP_CIPHER *EVP_aes_192_cfb128(void);
17118 
17119 const EVP_CIPHER *EVP_aes_192_ofb(void);
17120 const EVP_CIPHER *EVP_aes_192_ctr(void);
17121 const EVP_CIPHER *EVP_aes_192_ccm(void);
17122 const EVP_CIPHER *EVP_aes_192_gcm(void);
17123 const EVP_CIPHER *EVP_aes_192_wrap(void);
17124 const EVP_CIPHER *EVP_aes_256_ecb(void);
17125 const EVP_CIPHER *EVP_aes_256_cbc(void);
17126 const EVP_CIPHER *EVP_aes_256_cfb1(void);
17127 const EVP_CIPHER *EVP_aes_256_cfb8(void);
17128 const EVP_CIPHER *EVP_aes_256_cfb128(void);
17129 
17130 const EVP_CIPHER *EVP_aes_256_ofb(void);
17131 const EVP_CIPHER *EVP_aes_256_ctr(void);
17132 const EVP_CIPHER *EVP_aes_256_ccm(void);
17133 const EVP_CIPHER *EVP_aes_256_gcm(void);
17134 const EVP_CIPHER *EVP_aes_256_xts(void);
17135 const EVP_CIPHER *EVP_aes_256_wrap(void);
17136 
17137 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void);
17138 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void);
17139 
17140 
17141 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void);
17142 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void);
17143 
17144 
17145 
17146 const EVP_CIPHER *EVP_camellia_128_ecb(void);
17147 const EVP_CIPHER *EVP_camellia_128_cbc(void);
17148 const EVP_CIPHER *EVP_camellia_128_cfb1(void);
17149 const EVP_CIPHER *EVP_camellia_128_cfb8(void);
17150 const EVP_CIPHER *EVP_camellia_128_cfb128(void);
17151 
17152 const EVP_CIPHER *EVP_camellia_128_ofb(void);
17153 const EVP_CIPHER *EVP_camellia_192_ecb(void);
17154 const EVP_CIPHER *EVP_camellia_192_cbc(void);
17155 const EVP_CIPHER *EVP_camellia_192_cfb1(void);
17156 const EVP_CIPHER *EVP_camellia_192_cfb8(void);
17157 const EVP_CIPHER *EVP_camellia_192_cfb128(void);
17158 
17159 const EVP_CIPHER *EVP_camellia_192_ofb(void);
17160 const EVP_CIPHER *EVP_camellia_256_ecb(void);
17161 const EVP_CIPHER *EVP_camellia_256_cbc(void);
17162 const EVP_CIPHER *EVP_camellia_256_cfb1(void);
17163 const EVP_CIPHER *EVP_camellia_256_cfb8(void);
17164 const EVP_CIPHER *EVP_camellia_256_cfb128(void);
17165 
17166 const EVP_CIPHER *EVP_camellia_256_ofb(void);
17167 # 905 "/usr/include/openssl/evp.h" 3 4
17168 void OPENSSL_add_all_algorithms_noconf(void);
17169 void OPENSSL_add_all_algorithms_conf(void);
17170 # 916 "/usr/include/openssl/evp.h" 3 4
17171 void OpenSSL_add_all_ciphers(void);
17172 void OpenSSL_add_all_digests(void);
17173 
17174 
17175 
17176 
17177 int EVP_add_cipher(const EVP_CIPHER *cipher);
17178 int EVP_add_digest(const EVP_MD *digest);
17179 
17180 const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
17181 const EVP_MD *EVP_get_digestbyname(const char *name);
17182 void EVP_cleanup(void);
17183 
17184 void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph,
17185                                    const char *from, const char *to, void *x),
17186                        void *arg);
17187 void EVP_CIPHER_do_all_sorted(void (*fn)
17188                                (const EVP_CIPHER *ciph, const char *from,
17189                                 const char *to, void *x), void *arg);
17190 
17191 void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph,
17192                                const char *from, const char *to, void *x),
17193                    void *arg);
17194 void EVP_MD_do_all_sorted(void (*fn)
17195                            (const EVP_MD *ciph, const char *from,
17196                             const char *to, void *x), void *arg);
17197 
17198 int EVP_PKEY_decrypt_old(unsigned char *dec_key,
17199                          const unsigned char *enc_key, int enc_key_len,
17200                          EVP_PKEY *private_key);
17201 int EVP_PKEY_encrypt_old(unsigned char *enc_key,
17202                          const unsigned char *key, int key_len,
17203                          EVP_PKEY *pub_key);
17204 int EVP_PKEY_type(int type);
17205 int EVP_PKEY_id(const EVP_PKEY *pkey);
17206 int EVP_PKEY_base_id(const EVP_PKEY *pkey);
17207 int EVP_PKEY_bits(EVP_PKEY *pkey);
17208 int EVP_PKEY_size(EVP_PKEY *pkey);
17209 int EVP_PKEY_set_type(EVP_PKEY *pkey, int type);
17210 int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
17211 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
17212 void *EVP_PKEY_get0(EVP_PKEY *pkey);
17213 
17214 
17215 struct rsa_st;
17216 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key);
17217 struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
17218 
17219 
17220 struct dsa_st;
17221 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key);
17222 struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
17223 
17224 
17225 struct dh_st;
17226 int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key);
17227 struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
17228 
17229 
17230 struct ec_key_st;
17231 int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);
17232 struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
17233 
17234 
17235 EVP_PKEY *EVP_PKEY_new(void);
17236 void EVP_PKEY_free(EVP_PKEY *pkey);
17237 
17238 EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
17239                         long length);
17240 int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);
17241 
17242 EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
17243                          long length);
17244 EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,
17245                              long length);
17246 int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp);
17247 
17248 int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
17249 int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
17250 int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);
17251 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
17252 
17253 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
17254 
17255 int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
17256                           int indent, ASN1_PCTX *pctx);
17257 int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
17258                            int indent, ASN1_PCTX *pctx);
17259 int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
17260                           int indent, ASN1_PCTX *pctx);
17261 
17262 int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
17263 
17264 int EVP_CIPHER_type(const EVP_CIPHER *ctx);
17265 
17266 /* calls methods */
17267 int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
17268 int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
17269 
17270 /* These are used by EVP_CIPHER methods */
17271 int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
17272 int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
17273 
17274 /* PKCS5 password based encryption */
17275 int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
17276                        ASN1_TYPE *param, const EVP_CIPHER *cipher,
17277                        const EVP_MD *md, int en_de);
17278 int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
17279                            const unsigned char *salt, int saltlen, int iter,
17280                            int keylen, unsigned char *out);
17281 int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
17282                       const unsigned char *salt, int saltlen, int iter,
17283                       const EVP_MD *digest, int keylen, unsigned char *out);
17284 int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
17285                           ASN1_TYPE *param, const EVP_CIPHER *cipher,
17286                           const EVP_MD *md, int en_de);
17287 
17288 void PKCS5_PBE_add(void);
17289 
17290 int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
17291                        ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
17292 
17293 /* PBE type */
17294 
17295 /* Can appear as the outermost AlgorithmIdentifier */
17296 
17297 /* Is an PRF type OID */
17298 
17299 
17300 int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
17301                          int md_nid, EVP_PBE_KEYGEN *keygen);
17302 int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
17303                     EVP_PBE_KEYGEN *keygen);
17304 int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid,
17305                  EVP_PBE_KEYGEN **pkeygen);
17306 void EVP_PBE_cleanup(void);
17307 # 1064 "/usr/include/openssl/evp.h" 3 4
17308 int EVP_PKEY_asn1_get_count(void);
17309 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
17310 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
17311 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
17312                                                    const char *str, int len);
17313 int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
17314 int EVP_PKEY_asn1_add_alias(int to, int from);
17315 int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
17316                             int *ppkey_flags, const char **pinfo,
17317                             const char **ppem_str,
17318                             const EVP_PKEY_ASN1_METHOD *ameth);
17319 
17320 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(EVP_PKEY *pkey);
17321 EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,
17322                                         const char *pem_str,
17323                                         const char *info);
17324 void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
17325                         const EVP_PKEY_ASN1_METHOD *src);
17326 void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
17327 void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
17328                               int (*pub_decode) (EVP_PKEY *pk,
17329                                                  X509_PUBKEY *pub),
17330                               int (*pub_encode) (X509_PUBKEY *pub,
17331                                                  const EVP_PKEY *pk),
17332                               int (*pub_cmp) (const EVP_PKEY *a,
17333                                               const EVP_PKEY *b),
17334                               int (*pub_print) (BIO *out,
17335                                                 const EVP_PKEY *pkey,
17336                                                 int indent, ASN1_PCTX *pctx),
17337                               int (*pkey_size) (const EVP_PKEY *pk),
17338                               int (*pkey_bits) (const EVP_PKEY *pk));
17339 void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
17340                                int (*priv_decode) (EVP_PKEY *pk,
17341                                                    PKCS8_PRIV_KEY_INFO
17342                                                    *p8inf),
17343                                int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8,
17344                                                    const EVP_PKEY *pk),
17345                                int (*priv_print) (BIO *out,
17346                                                   const EVP_PKEY *pkey,
17347                                                   int indent,
17348                                                   ASN1_PCTX *pctx));
17349 void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
17350                              int (*param_decode) (EVP_PKEY *pkey,
17351                                                   const unsigned char **pder,
17352                                                   int derlen),
17353                              int (*param_encode) (const EVP_PKEY *pkey,
17354                                                   unsigned char **pder),
17355                              int (*param_missing) (const EVP_PKEY *pk),
17356                              int (*param_copy) (EVP_PKEY *to,
17357                                                 const EVP_PKEY *from),
17358                              int (*param_cmp) (const EVP_PKEY *a,
17359                                                const EVP_PKEY *b),
17360                              int (*param_print) (BIO *out,
17361                                                  const EVP_PKEY *pkey,
17362                                                  int indent,
17363                                                  ASN1_PCTX *pctx));
17364 
17365 void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
17366                             void (*pkey_free) (EVP_PKEY *pkey));
17367 void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
17368                             int (*pkey_ctrl) (EVP_PKEY *pkey, int op,
17369                                               long arg1, void *arg2));
17370 void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
17371                             int (*item_verify) (EVP_MD_CTX *ctx,
17372                                                 const ASN1_ITEM *it,
17373                                                 void *asn,
17374                                                 X509_ALGOR *a,
17375                                                 ASN1_BIT_STRING *sig,
17376                                                 EVP_PKEY *pkey),
17377                             int (*item_sign) (EVP_MD_CTX *ctx,
17378                                               const ASN1_ITEM *it,
17379                                               void *asn,
17380                                               X509_ALGOR *alg1,
17381                                               X509_ALGOR *alg2,
17382                                               ASN1_BIT_STRING *sig));
17383 # 1185 "/usr/include/openssl/evp.h" 3 4
17384 /* Used by GOST key encryption in TLS */
17385 # 1199 "/usr/include/openssl/evp.h" 3 4
17386 /*
17387  * Method handles all operations: don't assume any digest related defaults.
17388  */
17389 
17390 
17391 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
17392 EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);
17393 void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
17394                              const EVP_PKEY_METHOD *meth);
17395 void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src);
17396 void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
17397 int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
17398 
17399 EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
17400 EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
17401 EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
17402 void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
17403 
17404 int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
17405                       int cmd, int p1, void *p2);
17406 int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
17407                           const char *value);
17408 
17409 int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);
17410 void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);
17411 
17412 EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
17413                                const unsigned char *key, int keylen);
17414 
17415 void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
17416 void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx);
17417 EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
17418 
17419 EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
17420 
17421 void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
17422 void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
17423 
17424 int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
17425 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
17426                   unsigned char *sig, size_t *siglen,
17427                   const unsigned char *tbs, size_t tbslen);
17428 int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
17429 int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
17430                     const unsigned char *sig, size_t siglen,
17431                     const unsigned char *tbs, size_t tbslen);
17432 int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
17433 int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
17434                             unsigned char *rout, size_t *routlen,
17435                             const unsigned char *sig, size_t siglen);
17436 int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
17437 int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
17438                      unsigned char *out, size_t *outlen,
17439                      const unsigned char *in, size_t inlen);
17440 int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
17441 int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
17442                      unsigned char *out, size_t *outlen,
17443                      const unsigned char *in, size_t inlen);
17444 
17445 int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
17446 int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
17447 int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
17448 
17449 typedef int EVP_PKEY_gen_cb (EVP_PKEY_CTX *ctx);
17450 
17451 int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
17452 int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
17453 int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
17454 int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
17455 
17456 void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
17457 EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
17458 
17459 int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
17460 
17461 void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
17462                             int (*init) (EVP_PKEY_CTX *ctx));
17463 
17464 void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth,
17465                             int (*copy) (EVP_PKEY_CTX *dst,
17466                                          EVP_PKEY_CTX *src));
17467 
17468 void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth,
17469                                void (*cleanup) (EVP_PKEY_CTX *ctx));
17470 
17471 void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth,
17472                                 int (*paramgen_init) (EVP_PKEY_CTX *ctx),
17473                                 int (*paramgen) (EVP_PKEY_CTX *ctx,
17474                                                  EVP_PKEY *pkey));
17475 
17476 void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth,
17477                               int (*keygen_init) (EVP_PKEY_CTX *ctx),
17478                               int (*keygen) (EVP_PKEY_CTX *ctx,
17479                                              EVP_PKEY *pkey));
17480 
17481 void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth,
17482                             int (*sign_init) (EVP_PKEY_CTX *ctx),
17483                             int (*sign) (EVP_PKEY_CTX *ctx,
17484                                          unsigned char *sig, size_t *siglen,
17485                                          const unsigned char *tbs,
17486                                          size_t tbslen));
17487 
17488 void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth,
17489                               int (*verify_init) (EVP_PKEY_CTX *ctx),
17490                               int (*verify) (EVP_PKEY_CTX *ctx,
17491                                              const unsigned char *sig,
17492                                              size_t siglen,
17493                                              const unsigned char *tbs,
17494                                              size_t tbslen));
17495 
17496 void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth,
17497                                       int (*verify_recover_init) (EVP_PKEY_CTX
17498                                                                   *ctx),
17499                                       int (*verify_recover) (EVP_PKEY_CTX
17500                                                              *ctx,
17501                                                              unsigned char
17502                                                              *sig,
17503                                                              size_t *siglen,
17504                                                              const unsigned
17505                                                              char *tbs,
17506                                                              size_t tbslen));
17507 
17508 void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth,
17509                                int (*signctx_init) (EVP_PKEY_CTX *ctx,
17510                                                     EVP_MD_CTX *mctx),
17511                                int (*signctx) (EVP_PKEY_CTX *ctx,
17512                                                unsigned char *sig,
17513                                                size_t *siglen,
17514                                                EVP_MD_CTX *mctx));
17515 
17516 void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth,
17517                                  int (*verifyctx_init) (EVP_PKEY_CTX *ctx,
17518                                                         EVP_MD_CTX *mctx),
17519                                  int (*verifyctx) (EVP_PKEY_CTX *ctx,
17520                                                    const unsigned char *sig,
17521                                                    int siglen,
17522                                                    EVP_MD_CTX *mctx));
17523 
17524 void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth,
17525                                int (*encrypt_init) (EVP_PKEY_CTX *ctx),
17526                                int (*encryptfn) (EVP_PKEY_CTX *ctx,
17527                                                  unsigned char *out,
17528                                                  size_t *outlen,
17529                                                  const unsigned char *in,
17530                                                  size_t inlen));
17531 
17532 void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth,
17533                                int (*decrypt_init) (EVP_PKEY_CTX *ctx),
17534                                int (*decrypt) (EVP_PKEY_CTX *ctx,
17535                                                unsigned char *out,
17536                                                size_t *outlen,
17537                                                const unsigned char *in,
17538                                                size_t inlen));
17539 
17540 void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth,
17541                               int (*derive_init) (EVP_PKEY_CTX *ctx),
17542                               int (*derive) (EVP_PKEY_CTX *ctx,
17543                                              unsigned char *key,
17544                                              size_t *keylen));
17545 
17546 void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
17547                             int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
17548                                          void *p2),
17549                             int (*ctrl_str) (EVP_PKEY_CTX *ctx,
17550                                              const char *type,
17551                                              const char *value));
17552 
17553 void EVP_PKEY_meth_get_init(EVP_PKEY_METHOD *pmeth,
17554                             int (**pinit) (EVP_PKEY_CTX *ctx));
17555 
17556 void EVP_PKEY_meth_get_copy(EVP_PKEY_METHOD *pmeth,
17557                             int (**pcopy) (EVP_PKEY_CTX *dst,
17558                                            EVP_PKEY_CTX *src));
17559 
17560 void EVP_PKEY_meth_get_cleanup(EVP_PKEY_METHOD *pmeth,
17561                                void (**pcleanup) (EVP_PKEY_CTX *ctx));
17562 
17563 void EVP_PKEY_meth_get_paramgen(EVP_PKEY_METHOD *pmeth,
17564                                 int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
17565                                 int (**pparamgen) (EVP_PKEY_CTX *ctx,
17566                                                    EVP_PKEY *pkey));
17567 
17568 void EVP_PKEY_meth_get_keygen(EVP_PKEY_METHOD *pmeth,
17569                               int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
17570                               int (**pkeygen) (EVP_PKEY_CTX *ctx,
17571                                                EVP_PKEY *pkey));
17572 
17573 void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
17574                             int (**psign_init) (EVP_PKEY_CTX *ctx),
17575                             int (**psign) (EVP_PKEY_CTX *ctx,
17576                                            unsigned char *sig, size_t *siglen,
17577                                            const unsigned char *tbs,
17578                                            size_t tbslen));
17579 
17580 void EVP_PKEY_meth_get_verify(EVP_PKEY_METHOD *pmeth,
17581                               int (**pverify_init) (EVP_PKEY_CTX *ctx),
17582                               int (**pverify) (EVP_PKEY_CTX *ctx,
17583                                                const unsigned char *sig,
17584                                                size_t siglen,
17585                                                const unsigned char *tbs,
17586                                                size_t tbslen));
17587 
17588 void EVP_PKEY_meth_get_verify_recover(EVP_PKEY_METHOD *pmeth,
17589                                       int (**pverify_recover_init) (EVP_PKEY_CTX
17590                                                                     *ctx),
17591                                       int (**pverify_recover) (EVP_PKEY_CTX
17592                                                                *ctx,
17593                                                                unsigned char
17594                                                                *sig,
17595                                                                size_t *siglen,
17596                                                                const unsigned
17597                                                                char *tbs,
17598                                                                size_t tbslen));
17599 
17600 void EVP_PKEY_meth_get_signctx(EVP_PKEY_METHOD *pmeth,
17601                                int (**psignctx_init) (EVP_PKEY_CTX *ctx,
17602                                                       EVP_MD_CTX *mctx),
17603                                int (**psignctx) (EVP_PKEY_CTX *ctx,
17604                                                  unsigned char *sig,
17605                                                  size_t *siglen,
17606                                                  EVP_MD_CTX *mctx));
17607 
17608 void EVP_PKEY_meth_get_verifyctx(EVP_PKEY_METHOD *pmeth,
17609                                  int (**pverifyctx_init) (EVP_PKEY_CTX *ctx,
17610                                                           EVP_MD_CTX *mctx),
17611                                  int (**pverifyctx) (EVP_PKEY_CTX *ctx,
17612                                                      const unsigned char *sig,
17613                                                      int siglen,
17614                                                      EVP_MD_CTX *mctx));
17615 
17616 void EVP_PKEY_meth_get_encrypt(EVP_PKEY_METHOD *pmeth,
17617                                int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
17618                                int (**pencryptfn) (EVP_PKEY_CTX *ctx,
17619                                                    unsigned char *out,
17620                                                    size_t *outlen,
17621                                                    const unsigned char *in,
17622                                                    size_t inlen));
17623 
17624 void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
17625                                int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
17626                                int (**pdecrypt) (EVP_PKEY_CTX *ctx,
17627                                                  unsigned char *out,
17628                                                  size_t *outlen,
17629                                                  const unsigned char *in,
17630                                                  size_t inlen));
17631 
17632 void EVP_PKEY_meth_get_derive(EVP_PKEY_METHOD *pmeth,
17633                               int (**pderive_init) (EVP_PKEY_CTX *ctx),
17634                               int (**pderive) (EVP_PKEY_CTX *ctx,
17635                                                unsigned char *key,
17636                                                size_t *keylen));
17637 
17638 void EVP_PKEY_meth_get_ctrl(EVP_PKEY_METHOD *pmeth,
17639                             int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
17640                                            void *p2),
17641                             int (**pctrl_str) (EVP_PKEY_CTX *ctx,
17642                                                const char *type,
17643                                                const char *value));
17644 
17645 void EVP_add_alg_module(void);
17646 
17647 /* BEGIN ERROR CODES */
17648 /*
17649  * The following lines are auto generated by the script mkerr.pl. Any changes
17650  * made after this point may be overwritten when the script is next run.
17651  */
17652 
17653 void ERR_load_EVP_strings(void);
17654 
17655 /* Error codes for the EVP functions. */
17656 
17657 /* Function codes. */
17658 # 1554 "/usr/include/openssl/evp.h" 3 4
17659 /* Reason codes. */
17660 # 74 "/usr/include/openssl/x509.h" 2 3 4
17661 
17662 
17663 # 1 "/usr/include/openssl/bio.h" 1 3 4
17664 /* crypto/bio/bio.h */
17665 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17666  * All rights reserved.
17667  *
17668  * This package is an SSL implementation written
17669  * by Eric Young (eay@cryptsoft.com).
17670  * The implementation was written so as to conform with Netscapes SSL.
17671  *
17672  * This library is free for commercial and non-commercial use as long as
17673  * the following conditions are aheared to.  The following conditions
17674  * apply to all code found in this distribution, be it the RC4, RSA,
17675  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17676  * included with this distribution is covered by the same copyright terms
17677  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17678  *
17679  * Copyright remains Eric Young's, and as such any Copyright notices in
17680  * the code are not to be removed.
17681  * If this package is used in a product, Eric Young should be given attribution
17682  * as the author of the parts of the library used.
17683  * This can be in the form of a textual message at program startup or
17684  * in documentation (online or textual) provided with the package.
17685  *
17686  * Redistribution and use in source and binary forms, with or without
17687  * modification, are permitted provided that the following conditions
17688  * are met:
17689  * 1. Redistributions of source code must retain the copyright
17690  *    notice, this list of conditions and the following disclaimer.
17691  * 2. Redistributions in binary form must reproduce the above copyright
17692  *    notice, this list of conditions and the following disclaimer in the
17693  *    documentation and/or other materials provided with the distribution.
17694  * 3. All advertising materials mentioning features or use of this software
17695  *    must display the following acknowledgement:
17696  *    "This product includes cryptographic software written by
17697  *     Eric Young (eay@cryptsoft.com)"
17698  *    The word 'cryptographic' can be left out if the rouines from the library
17699  *    being used are not cryptographic related :-).
17700  * 4. If you include any Windows specific code (or a derivative thereof) from
17701  *    the apps directory (application code) you must include an acknowledgement:
17702  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17703  *
17704  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17705  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17706  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17707  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17708  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17709  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17710  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17711  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17712  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17713  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17714  * SUCH DAMAGE.
17715  *
17716  * The licence and distribution terms for any publically available version or
17717  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17718  * copied and put under another distribution licence
17719  * [including the GNU Public Licence.]
17720  */
17721 # 77 "/usr/include/openssl/x509.h" 2 3 4
17722 
17723 # 1 "/usr/include/openssl/stack.h" 1 3 4
17724 /* crypto/stack/stack.h */
17725 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17726  * All rights reserved.
17727  *
17728  * This package is an SSL implementation written
17729  * by Eric Young (eay@cryptsoft.com).
17730  * The implementation was written so as to conform with Netscapes SSL.
17731  *
17732  * This library is free for commercial and non-commercial use as long as
17733  * the following conditions are aheared to.  The following conditions
17734  * apply to all code found in this distribution, be it the RC4, RSA,
17735  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17736  * included with this distribution is covered by the same copyright terms
17737  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17738  *
17739  * Copyright remains Eric Young's, and as such any Copyright notices in
17740  * the code are not to be removed.
17741  * If this package is used in a product, Eric Young should be given attribution
17742  * as the author of the parts of the library used.
17743  * This can be in the form of a textual message at program startup or
17744  * in documentation (online or textual) provided with the package.
17745  *
17746  * Redistribution and use in source and binary forms, with or without
17747  * modification, are permitted provided that the following conditions
17748  * are met:
17749  * 1. Redistributions of source code must retain the copyright
17750  *    notice, this list of conditions and the following disclaimer.
17751  * 2. Redistributions in binary form must reproduce the above copyright
17752  *    notice, this list of conditions and the following disclaimer in the
17753  *    documentation and/or other materials provided with the distribution.
17754  * 3. All advertising materials mentioning features or use of this software
17755  *    must display the following acknowledgement:
17756  *    "This product includes cryptographic software written by
17757  *     Eric Young (eay@cryptsoft.com)"
17758  *    The word 'cryptographic' can be left out if the rouines from the library
17759  *    being used are not cryptographic related :-).
17760  * 4. If you include any Windows specific code (or a derivative thereof) from
17761  *    the apps directory (application code) you must include an acknowledgement:
17762  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17763  *
17764  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17765  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17766  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17767  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17768  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17769  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17770  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17771  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17772  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17773  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17774  * SUCH DAMAGE.
17775  *
17776  * The licence and distribution terms for any publically available version or
17777  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17778  * copied and put under another distribution licence
17779  * [including the GNU Public Licence.]
17780  */
17781 # 79 "/usr/include/openssl/x509.h" 2 3 4
17782 # 1 "/usr/include/openssl/asn1.h" 1 3 4
17783 /* crypto/asn1/asn1.h */
17784 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17785  * All rights reserved.
17786  *
17787  * This package is an SSL implementation written
17788  * by Eric Young (eay@cryptsoft.com).
17789  * The implementation was written so as to conform with Netscapes SSL.
17790  *
17791  * This library is free for commercial and non-commercial use as long as
17792  * the following conditions are aheared to.  The following conditions
17793  * apply to all code found in this distribution, be it the RC4, RSA,
17794  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17795  * included with this distribution is covered by the same copyright terms
17796  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17797  *
17798  * Copyright remains Eric Young's, and as such any Copyright notices in
17799  * the code are not to be removed.
17800  * If this package is used in a product, Eric Young should be given attribution
17801  * as the author of the parts of the library used.
17802  * This can be in the form of a textual message at program startup or
17803  * in documentation (online or textual) provided with the package.
17804  *
17805  * Redistribution and use in source and binary forms, with or without
17806  * modification, are permitted provided that the following conditions
17807  * are met:
17808  * 1. Redistributions of source code must retain the copyright
17809  *    notice, this list of conditions and the following disclaimer.
17810  * 2. Redistributions in binary form must reproduce the above copyright
17811  *    notice, this list of conditions and the following disclaimer in the
17812  *    documentation and/or other materials provided with the distribution.
17813  * 3. All advertising materials mentioning features or use of this software
17814  *    must display the following acknowledgement:
17815  *    "This product includes cryptographic software written by
17816  *     Eric Young (eay@cryptsoft.com)"
17817  *    The word 'cryptographic' can be left out if the rouines from the library
17818  *    being used are not cryptographic related :-).
17819  * 4. If you include any Windows specific code (or a derivative thereof) from
17820  *    the apps directory (application code) you must include an acknowledgement:
17821  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17822  *
17823  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17824  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17825  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17826  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17827  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17828  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17829  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17830  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17831  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17832  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17833  * SUCH DAMAGE.
17834  *
17835  * The licence and distribution terms for any publically available version or
17836  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17837  * copied and put under another distribution licence
17838  * [including the GNU Public Licence.]
17839  */
17840 # 80 "/usr/include/openssl/x509.h" 2 3 4
17841 # 1 "/usr/include/openssl/safestack.h" 1 3 4
17842 /* ====================================================================
17843  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
17844  *
17845  * Redistribution and use in source and binary forms, with or without
17846  * modification, are permitted provided that the following conditions
17847  * are met:
17848  *
17849  * 1. Redistributions of source code must retain the above copyright
17850  *    notice, this list of conditions and the following disclaimer.
17851  *
17852  * 2. Redistributions in binary form must reproduce the above copyright
17853  *    notice, this list of conditions and the following disclaimer in
17854  *    the documentation and/or other materials provided with the
17855  *    distribution.
17856  *
17857  * 3. All advertising materials mentioning features or use of this
17858  *    software must display the following acknowledgment:
17859  *    "This product includes software developed by the OpenSSL Project
17860  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17861  *
17862  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17863  *    endorse or promote products derived from this software without
17864  *    prior written permission. For written permission, please contact
17865  *    openssl-core@openssl.org.
17866  *
17867  * 5. Products derived from this software may not be called "OpenSSL"
17868  *    nor may "OpenSSL" appear in their names without prior written
17869  *    permission of the OpenSSL Project.
17870  *
17871  * 6. Redistributions of any form whatsoever must retain the following
17872  *    acknowledgment:
17873  *    "This product includes software developed by the OpenSSL Project
17874  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17875  *
17876  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17877  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17878  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17879  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17880  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17881  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17882  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17883  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17884  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17885  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17886  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17887  * OF THE POSSIBILITY OF SUCH DAMAGE.
17888  * ====================================================================
17889  *
17890  * This product includes cryptographic software written by Eric Young
17891  * (eay@cryptsoft.com).  This product includes software written by Tim
17892  * Hudson (tjh@cryptsoft.com).
17893  *
17894  */
17895 # 81 "/usr/include/openssl/x509.h" 2 3 4
17896 
17897 
17898 # 1 "/usr/include/openssl/ec.h" 1 3 4
17899 /* crypto/ec/ec.h */
17900 /*
17901  * Originally written by Bodo Moeller for the OpenSSL project.
17902  */
17903 /**
17904  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
17905  * \author Originally written by Bodo Moeller for the OpenSSL project
17906  */
17907 /* ====================================================================
17908  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
17909  *
17910  * Redistribution and use in source and binary forms, with or without
17911  * modification, are permitted provided that the following conditions
17912  * are met:
17913  *
17914  * 1. Redistributions of source code must retain the above copyright
17915  *    notice, this list of conditions and the following disclaimer.
17916  *
17917  * 2. Redistributions in binary form must reproduce the above copyright
17918  *    notice, this list of conditions and the following disclaimer in
17919  *    the documentation and/or other materials provided with the
17920  *    distribution.
17921  *
17922  * 3. All advertising materials mentioning features or use of this
17923  *    software must display the following acknowledgment:
17924  *    "This product includes software developed by the OpenSSL Project
17925  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17926  *
17927  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17928  *    endorse or promote products derived from this software without
17929  *    prior written permission. For written permission, please contact
17930  *    openssl-core@openssl.org.
17931  *
17932  * 5. Products derived from this software may not be called "OpenSSL"
17933  *    nor may "OpenSSL" appear in their names without prior written
17934  *    permission of the OpenSSL Project.
17935  *
17936  * 6. Redistributions of any form whatsoever must retain the following
17937  *    acknowledgment:
17938  *    "This product includes software developed by the OpenSSL Project
17939  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17940  *
17941  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17942  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17943  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17944  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17945  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17946  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17947  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17948  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17949  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17950  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17951  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17952  * OF THE POSSIBILITY OF SUCH DAMAGE.
17953  * ====================================================================
17954  *
17955  * This product includes cryptographic software written by Eric Young
17956  * (eay@cryptsoft.com).  This product includes software written by Tim
17957  * Hudson (tjh@cryptsoft.com).
17958  *
17959  */
17960 /* ====================================================================
17961  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
17962  *
17963  * Portions of the attached software ("Contribution") are developed by
17964  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
17965  *
17966  * The Contribution is licensed pursuant to the OpenSSL open source
17967  * license provided above.
17968  *
17969  * The elliptic curve binary polynomial software is originally written by
17970  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
17971  *
17972  */
17973 
17974 
17975 
17976 
17977 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
17978 /* opensslconf.h */
17979 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
17980 
17981 
17982 
17983 
17984 /* OpenSSL was configured with the following options: */
17985 # 108 "/usr/include/openssl/opensslconf.h" 3 4
17986 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
17987    asks for it.  This is a transient feature that is provided for those
17988    who haven't had the time to do the appropriate changes in their
17989    applications.  */
17990 # 204 "/usr/include/openssl/opensslconf.h" 3 4
17991 /* crypto/opensslconf.h.in */
17992 
17993 /* Generate 80386 code? */
17994 # 80 "/usr/include/openssl/ec.h" 2 3 4
17995 
17996 
17997 
17998 
17999 
18000 # 1 "/usr/include/openssl/asn1.h" 1 3 4
18001 /* crypto/asn1/asn1.h */
18002 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18003  * All rights reserved.
18004  *
18005  * This package is an SSL implementation written
18006  * by Eric Young (eay@cryptsoft.com).
18007  * The implementation was written so as to conform with Netscapes SSL.
18008  *
18009  * This library is free for commercial and non-commercial use as long as
18010  * the following conditions are aheared to.  The following conditions
18011  * apply to all code found in this distribution, be it the RC4, RSA,
18012  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18013  * included with this distribution is covered by the same copyright terms
18014  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18015  *
18016  * Copyright remains Eric Young's, and as such any Copyright notices in
18017  * the code are not to be removed.
18018  * If this package is used in a product, Eric Young should be given attribution
18019  * as the author of the parts of the library used.
18020  * This can be in the form of a textual message at program startup or
18021  * in documentation (online or textual) provided with the package.
18022  *
18023  * Redistribution and use in source and binary forms, with or without
18024  * modification, are permitted provided that the following conditions
18025  * are met:
18026  * 1. Redistributions of source code must retain the copyright
18027  *    notice, this list of conditions and the following disclaimer.
18028  * 2. Redistributions in binary form must reproduce the above copyright
18029  *    notice, this list of conditions and the following disclaimer in the
18030  *    documentation and/or other materials provided with the distribution.
18031  * 3. All advertising materials mentioning features or use of this software
18032  *    must display the following acknowledgement:
18033  *    "This product includes cryptographic software written by
18034  *     Eric Young (eay@cryptsoft.com)"
18035  *    The word 'cryptographic' can be left out if the rouines from the library
18036  *    being used are not cryptographic related :-).
18037  * 4. If you include any Windows specific code (or a derivative thereof) from
18038  *    the apps directory (application code) you must include an acknowledgement:
18039  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18040  *
18041  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18042  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18043  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18044  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18045  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18046  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18047  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18048  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18049  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18050  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18051  * SUCH DAMAGE.
18052  *
18053  * The licence and distribution terms for any publically available version or
18054  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18055  * copied and put under another distribution licence
18056  * [including the GNU Public Licence.]
18057  */
18058 # 86 "/usr/include/openssl/ec.h" 2 3 4
18059 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
18060 /* ====================================================================
18061  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
18062  *
18063  * Redistribution and use in source and binary forms, with or without
18064  * modification, are permitted provided that the following conditions
18065  * are met:
18066  *
18067  * 1. Redistributions of source code must retain the above copyright
18068  *    notice, this list of conditions and the following disclaimer.
18069  *
18070  * 2. Redistributions in binary form must reproduce the above copyright
18071  *    notice, this list of conditions and the following disclaimer in
18072  *    the documentation and/or other materials provided with the
18073  *    distribution.
18074  *
18075  * 3. All advertising materials mentioning features or use of this
18076  *    software must display the following acknowledgment:
18077  *    "This product includes software developed by the OpenSSL Project
18078  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18079  *
18080  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18081  *    endorse or promote products derived from this software without
18082  *    prior written permission. For written permission, please contact
18083  *    openssl-core@openssl.org.
18084  *
18085  * 5. Products derived from this software may not be called "OpenSSL"
18086  *    nor may "OpenSSL" appear in their names without prior written
18087  *    permission of the OpenSSL Project.
18088  *
18089  * 6. Redistributions of any form whatsoever must retain the following
18090  *    acknowledgment:
18091  *    "This product includes software developed by the OpenSSL Project
18092  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18093  *
18094  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18095  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18096  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18097  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18098  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18099  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18100  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18101  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18102  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18103  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18104  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18105  * OF THE POSSIBILITY OF SUCH DAMAGE.
18106  * ====================================================================
18107  *
18108  * This product includes cryptographic software written by Eric Young
18109  * (eay@cryptsoft.com).  This product includes software written by Tim
18110  * Hudson (tjh@cryptsoft.com).
18111  *
18112  */
18113 # 87 "/usr/include/openssl/ec.h" 2 3 4
18114 
18115 # 1 "/usr/include/openssl/bn.h" 1 3 4
18116 /* crypto/bn/bn.h */
18117 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
18118  * All rights reserved.
18119  *
18120  * This package is an SSL implementation written
18121  * by Eric Young (eay@cryptsoft.com).
18122  * The implementation was written so as to conform with Netscapes SSL.
18123  *
18124  * This library is free for commercial and non-commercial use as long as
18125  * the following conditions are aheared to.  The following conditions
18126  * apply to all code found in this distribution, be it the RC4, RSA,
18127  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18128  * included with this distribution is covered by the same copyright terms
18129  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18130  *
18131  * Copyright remains Eric Young's, and as such any Copyright notices in
18132  * the code are not to be removed.
18133  * If this package is used in a product, Eric Young should be given attribution
18134  * as the author of the parts of the library used.
18135  * This can be in the form of a textual message at program startup or
18136  * in documentation (online or textual) provided with the package.
18137  *
18138  * Redistribution and use in source and binary forms, with or without
18139  * modification, are permitted provided that the following conditions
18140  * are met:
18141  * 1. Redistributions of source code must retain the copyright
18142  *    notice, this list of conditions and the following disclaimer.
18143  * 2. Redistributions in binary form must reproduce the above copyright
18144  *    notice, this list of conditions and the following disclaimer in the
18145  *    documentation and/or other materials provided with the distribution.
18146  * 3. All advertising materials mentioning features or use of this software
18147  *    must display the following acknowledgement:
18148  *    "This product includes cryptographic software written by
18149  *     Eric Young (eay@cryptsoft.com)"
18150  *    The word 'cryptographic' can be left out if the rouines from the library
18151  *    being used are not cryptographic related :-).
18152  * 4. If you include any Windows specific code (or a derivative thereof) from
18153  *    the apps directory (application code) you must include an acknowledgement:
18154  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18155  *
18156  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18157  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18158  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18159  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18160  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18161  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18162  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18163  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18164  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18165  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18166  * SUCH DAMAGE.
18167  *
18168  * The licence and distribution terms for any publically available version or
18169  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18170  * copied and put under another distribution licence
18171  * [including the GNU Public Licence.]
18172  */
18173 /* ====================================================================
18174  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
18175  *
18176  * Redistribution and use in source and binary forms, with or without
18177  * modification, are permitted provided that the following conditions
18178  * are met:
18179  *
18180  * 1. Redistributions of source code must retain the above copyright
18181  *    notice, this list of conditions and the following disclaimer.
18182  *
18183  * 2. Redistributions in binary form must reproduce the above copyright
18184  *    notice, this list of conditions and the following disclaimer in
18185  *    the documentation and/or other materials provided with the
18186  *    distribution.
18187  *
18188  * 3. All advertising materials mentioning features or use of this
18189  *    software must display the following acknowledgment:
18190  *    "This product includes software developed by the OpenSSL Project
18191  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18192  *
18193  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18194  *    endorse or promote products derived from this software without
18195  *    prior written permission. For written permission, please contact
18196  *    openssl-core@openssl.org.
18197  *
18198  * 5. Products derived from this software may not be called "OpenSSL"
18199  *    nor may "OpenSSL" appear in their names without prior written
18200  *    permission of the OpenSSL Project.
18201  *
18202  * 6. Redistributions of any form whatsoever must retain the following
18203  *    acknowledgment:
18204  *    "This product includes software developed by the OpenSSL Project
18205  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18206  *
18207  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18208  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18209  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18210  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18211  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18212  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18213  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18214  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18215  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18216  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18217  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18218  * OF THE POSSIBILITY OF SUCH DAMAGE.
18219  * ====================================================================
18220  *
18221  * This product includes cryptographic software written by Eric Young
18222  * (eay@cryptsoft.com).  This product includes software written by Tim
18223  * Hudson (tjh@cryptsoft.com).
18224  *
18225  */
18226 /* ====================================================================
18227  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
18228  *
18229  * Portions of the attached software ("Contribution") are developed by
18230  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
18231  *
18232  * The Contribution is licensed pursuant to the Eric Young open source
18233  * license provided above.
18234  *
18235  * The binary polynomial arithmetic software is originally written by
18236  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
18237  *
18238  */
18239 # 89 "/usr/include/openssl/ec.h" 2 3 4
18240 # 103 "/usr/include/openssl/ec.h" 3 4
18241 /** Enum for the point conversion form as defined in X9.62 (ECDSA)
18242  *  for the encoding of a elliptic curve point (x,y) */
18243 typedef enum {
18244         /** the point is encoded as z||x, where the octet z specifies
18245          *  which solution of the quadratic equation y is  */
18246     POINT_CONVERSION_COMPRESSED = 2,
18247         /** the point is encoded as z||x||y, where z is the octet 0x04  */
18248     POINT_CONVERSION_UNCOMPRESSED = 4,
18249         /** the point is encoded as z||x||y, where the octet z specifies
18250          *  which solution of the quadratic equation y is  */
18251     POINT_CONVERSION_HYBRID = 6
18252 } point_conversion_form_t;
18253 
18254 typedef struct ec_method_st EC_METHOD;
18255 
18256 typedef struct ec_group_st
18257     /*-
18258      EC_METHOD *meth;
18259      -- field definition
18260      -- curve coefficients
18261      -- optional generator with associated information (order, cofactor)
18262      -- optional extra data (precomputed table for fast computation of multiples of generator)
18263      -- ASN1 stuff
18264     */
18265     EC_GROUP;
18266 
18267 typedef struct ec_point_st EC_POINT;
18268 
18269 /********************************************************************/
18270 /*               EC_METHODs for curves over GF(p)                   */
18271 /********************************************************************/
18272 
18273 /** Returns the basic GFp ec methods which provides the basis for the
18274  *  optimized methods.
18275  *  \return  EC_METHOD object
18276  */
18277 const EC_METHOD *EC_GFp_simple_method(void);
18278 
18279 /** Returns GFp methods using montgomery multiplication.
18280  *  \return  EC_METHOD object
18281  */
18282 const EC_METHOD *EC_GFp_mont_method(void);
18283 
18284 /** Returns GFp methods using optimized methods for NIST recommended curves
18285  *  \return  EC_METHOD object
18286  */
18287 const EC_METHOD *EC_GFp_nist_method(void);
18288 # 169 "/usr/include/openssl/ec.h" 3 4
18289 /********************************************************************/
18290 /*           EC_METHOD for curves over GF(2^m)                      */
18291 /********************************************************************/
18292 
18293 /** Returns the basic GF2m ec method
18294  *  \return  EC_METHOD object
18295  */
18296 const EC_METHOD *EC_GF2m_simple_method(void);
18297 
18298 
18299 
18300 /********************************************************************/
18301 /*                   EC_GROUP functions                             */
18302 /********************************************************************/
18303 
18304 /** Creates a new EC_GROUP object
18305  *  \param   meth  EC_METHOD to use
18306  *  \return  newly created EC_GROUP object or NULL in case of an error.
18307  */
18308 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
18309 
18310 /** Frees a EC_GROUP object
18311  *  \param  group  EC_GROUP object to be freed.
18312  */
18313 void EC_GROUP_free(EC_GROUP *group);
18314 
18315 /** Clears and frees a EC_GROUP object
18316  *  \param  group  EC_GROUP object to be cleared and freed.
18317  */
18318 void EC_GROUP_clear_free(EC_GROUP *group);
18319 
18320 /** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.
18321  *  \param  dst  destination EC_GROUP object
18322  *  \param  src  source EC_GROUP object
18323  *  \return 1 on success and 0 if an error occurred.
18324  */
18325 int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
18326 
18327 /** Creates a new EC_GROUP object and copies the copies the content
18328  *  form src to the newly created EC_KEY object
18329  *  \param  src  source EC_GROUP object
18330  *  \return newly created EC_GROUP object or NULL in case of an error.
18331  */
18332 EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
18333 
18334 /** Returns the EC_METHOD of the EC_GROUP object.
18335  *  \param  group  EC_GROUP object
18336  *  \return EC_METHOD used in this EC_GROUP object.
18337  */
18338 const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);
18339 
18340 /** Returns the field type of the EC_METHOD.
18341  *  \param  meth  EC_METHOD object
18342  *  \return NID of the underlying field type OID.
18343  */
18344 int EC_METHOD_get_field_type(const EC_METHOD *meth);
18345 
18346 /** Sets the generator and it's order/cofactor of a EC_GROUP object.
18347  *  \param  group      EC_GROUP object
18348  *  \param  generator  EC_POINT object with the generator.
18349  *  \param  order      the order of the group generated by the generator.
18350  *  \param  cofactor   the index of the sub-group generated by the generator
18351  *                     in the group of all points on the elliptic curve.
18352  *  \return 1 on success and 0 if an error occured
18353  */
18354 int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
18355                            const BIGNUM *order, const BIGNUM *cofactor);
18356 
18357 /** Returns the generator of a EC_GROUP object.
18358  *  \param  group  EC_GROUP object
18359  *  \return the currently used generator (possibly NULL).
18360  */
18361 const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
18362 
18363 /** Returns the montgomery data for order(Generator)
18364  *  \param  group  EC_GROUP object
18365  *  \return the currently used generator (possibly NULL).
18366 */
18367 BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group);
18368 
18369 /** Gets the order of a EC_GROUP
18370  *  \param  group  EC_GROUP object
18371  *  \param  order  BIGNUM to which the order is copied
18372  *  \param  ctx    BN_CTX object (optional)
18373  *  \return 1 on success and 0 if an error occured
18374  */
18375 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
18376 
18377 /** Gets the cofactor of a EC_GROUP
18378  *  \param  group     EC_GROUP object
18379  *  \param  cofactor  BIGNUM to which the cofactor is copied
18380  *  \param  ctx       BN_CTX object (optional)
18381  *  \return 1 on success and 0 if an error occured
18382  */
18383 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
18384                           BN_CTX *ctx);
18385 
18386 /** Sets the name of a EC_GROUP object
18387  *  \param  group  EC_GROUP object
18388  *  \param  nid    NID of the curve name OID
18389  */
18390 void EC_GROUP_set_curve_name(EC_GROUP *group, int nid);
18391 
18392 /** Returns the curve name of a EC_GROUP object
18393  *  \param  group  EC_GROUP object
18394  *  \return NID of the curve name OID or 0 if not set.
18395  */
18396 int EC_GROUP_get_curve_name(const EC_GROUP *group);
18397 
18398 void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
18399 int EC_GROUP_get_asn1_flag(const EC_GROUP *group);
18400 
18401 void EC_GROUP_set_point_conversion_form(EC_GROUP *group,
18402                                         point_conversion_form_t form);
18403 point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
18404 
18405 unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x);
18406 size_t EC_GROUP_get_seed_len(const EC_GROUP *);
18407 size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
18408 
18409 /** Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b
18410  *  \param  group  EC_GROUP object
18411  *  \param  p      BIGNUM with the prime number
18412  *  \param  a      BIGNUM with parameter a of the equation
18413  *  \param  b      BIGNUM with parameter b of the equation
18414  *  \param  ctx    BN_CTX object (optional)
18415  *  \return 1 on success and 0 if an error occured
18416  */
18417 int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
18418                            const BIGNUM *b, BN_CTX *ctx);
18419 
18420 /** Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b
18421  *  \param  group  EC_GROUP object
18422  *  \param  p      BIGNUM for the prime number
18423  *  \param  a      BIGNUM for parameter a of the equation
18424  *  \param  b      BIGNUM for parameter b of the equation
18425  *  \param  ctx    BN_CTX object (optional)
18426  *  \return 1 on success and 0 if an error occured
18427  */
18428 int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
18429                            BIGNUM *b, BN_CTX *ctx);
18430 
18431 
18432 /** Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
18433  *  \param  group  EC_GROUP object
18434  *  \param  p      BIGNUM with the polynomial defining the underlying field
18435  *  \param  a      BIGNUM with parameter a of the equation
18436  *  \param  b      BIGNUM with parameter b of the equation
18437  *  \param  ctx    BN_CTX object (optional)
18438  *  \return 1 on success and 0 if an error occured
18439  */
18440 int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
18441                             const BIGNUM *b, BN_CTX *ctx);
18442 
18443 /** Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
18444  *  \param  group  EC_GROUP object
18445  *  \param  p      BIGNUM for the polynomial defining the underlying field
18446  *  \param  a      BIGNUM for parameter a of the equation
18447  *  \param  b      BIGNUM for parameter b of the equation
18448  *  \param  ctx    BN_CTX object (optional)
18449  *  \return 1 on success and 0 if an error occured
18450  */
18451 int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
18452                             BIGNUM *b, BN_CTX *ctx);
18453 
18454 /** Returns the number of bits needed to represent a field element
18455  *  \param  group  EC_GROUP object
18456  *  \return number of bits needed to represent a field element
18457  */
18458 int EC_GROUP_get_degree(const EC_GROUP *group);
18459 
18460 /** Checks whether the parameter in the EC_GROUP define a valid ec group
18461  *  \param  group  EC_GROUP object
18462  *  \param  ctx    BN_CTX object (optional)
18463  *  \return 1 if group is a valid ec group and 0 otherwise
18464  */
18465 int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
18466 
18467 /** Checks whether the discriminant of the elliptic curve is zero or not
18468  *  \param  group  EC_GROUP object
18469  *  \param  ctx    BN_CTX object (optional)
18470  *  \return 1 if the discriminant is not zero and 0 otherwise
18471  */
18472 int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);
18473 
18474 /** Compares two EC_GROUP objects
18475  *  \param  a    first EC_GROUP object
18476  *  \param  b    second EC_GROUP object
18477  *  \param  ctx  BN_CTX object (optional)
18478  *  \return 0 if both groups are equal and 1 otherwise
18479  */
18480 int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);
18481 
18482 /*
18483  * EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() after
18484  * choosing an appropriate EC_METHOD
18485  */
18486 
18487 /** Creates a new EC_GROUP object with the specified parameters defined
18488  *  over GFp (defined by the equation y^2 = x^3 + a*x + b)
18489  *  \param  p    BIGNUM with the prime number
18490  *  \param  a    BIGNUM with the parameter a of the equation
18491  *  \param  b    BIGNUM with the parameter b of the equation
18492  *  \param  ctx  BN_CTX object (optional)
18493  *  \return newly created EC_GROUP object with the specified parameters
18494  */
18495 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
18496                                  const BIGNUM *b, BN_CTX *ctx);
18497 
18498 /** Creates a new EC_GROUP object with the specified parameters defined
18499  *  over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b)
18500  *  \param  p    BIGNUM with the polynomial defining the underlying field
18501  *  \param  a    BIGNUM with the parameter a of the equation
18502  *  \param  b    BIGNUM with the parameter b of the equation
18503  *  \param  ctx  BN_CTX object (optional)
18504  *  \return newly created EC_GROUP object with the specified parameters
18505  */
18506 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
18507                                   const BIGNUM *b, BN_CTX *ctx);
18508 
18509 /** Creates a EC_GROUP object with a curve specified by a NID
18510  *  \param  nid  NID of the OID of the curve name
18511  *  \return newly created EC_GROUP object with specified curve or NULL
18512  *          if an error occurred
18513  */
18514 EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
18515 
18516 /********************************************************************/
18517 /*               handling of internal curves                        */
18518 /********************************************************************/
18519 
18520 typedef struct {
18521     int nid;
18522     const char *comment;
18523 } EC_builtin_curve;
18524 
18525 /*
18526  * EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all
18527  * available curves or zero if a error occurred. In case r ist not zero
18528  * nitems EC_builtin_curve structures are filled with the data of the first
18529  * nitems internal groups
18530  */
18531 size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
18532 
18533 const char *EC_curve_nid2nist(int nid);
18534 int EC_curve_nist2nid(const char *name);
18535 
18536 /********************************************************************/
18537 /*                    EC_POINT functions                            */
18538 /********************************************************************/
18539 
18540 /** Creates a new EC_POINT object for the specified EC_GROUP
18541  *  \param  group  EC_GROUP the underlying EC_GROUP object
18542  *  \return newly created EC_POINT object or NULL if an error occurred
18543  */
18544 EC_POINT *EC_POINT_new(const EC_GROUP *group);
18545 
18546 /** Frees a EC_POINT object
18547  *  \param  point  EC_POINT object to be freed
18548  */
18549 void EC_POINT_free(EC_POINT *point);
18550 
18551 /** Clears and frees a EC_POINT object
18552  *  \param  point  EC_POINT object to be cleared and freed
18553  */
18554 void EC_POINT_clear_free(EC_POINT *point);
18555 
18556 /** Copies EC_POINT object
18557  *  \param  dst  destination EC_POINT object
18558  *  \param  src  source EC_POINT object
18559  *  \return 1 on success and 0 if an error occured
18560  */
18561 int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
18562 
18563 /** Creates a new EC_POINT object and copies the content of the supplied
18564  *  EC_POINT
18565  *  \param  src    source EC_POINT object
18566  *  \param  group  underlying the EC_GROUP object
18567  *  \return newly created EC_POINT object or NULL if an error occurred
18568  */
18569 EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
18570 
18571 /** Returns the EC_METHOD used in EC_POINT object
18572  *  \param  point  EC_POINT object
18573  *  \return the EC_METHOD used
18574  */
18575 const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
18576 
18577 /** Sets a point to infinity (neutral element)
18578  *  \param  group  underlying EC_GROUP object
18579  *  \param  point  EC_POINT to set to infinity
18580  *  \return 1 on success and 0 if an error occured
18581  */
18582 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
18583 
18584 /** Sets the jacobian projective coordinates of a EC_POINT over GFp
18585  *  \param  group  underlying EC_GROUP object
18586  *  \param  p      EC_POINT object
18587  *  \param  x      BIGNUM with the x-coordinate
18588  *  \param  y      BIGNUM with the y-coordinate
18589  *  \param  z      BIGNUM with the z-coordinate
18590  *  \param  ctx    BN_CTX object (optional)
18591  *  \return 1 on success and 0 if an error occured
18592  */
18593 int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group,
18594                                              EC_POINT *p, const BIGNUM *x,
18595                                              const BIGNUM *y, const BIGNUM *z,
18596                                              BN_CTX *ctx);
18597 
18598 /** Gets the jacobian projective coordinates of a EC_POINT over GFp
18599  *  \param  group  underlying EC_GROUP object
18600  *  \param  p      EC_POINT object
18601  *  \param  x      BIGNUM for the x-coordinate
18602  *  \param  y      BIGNUM for the y-coordinate
18603  *  \param  z      BIGNUM for the z-coordinate
18604  *  \param  ctx    BN_CTX object (optional)
18605  *  \return 1 on success and 0 if an error occured
18606  */
18607 int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
18608                                              const EC_POINT *p, BIGNUM *x,
18609                                              BIGNUM *y, BIGNUM *z,
18610                                              BN_CTX *ctx);
18611 
18612 /** Sets the affine coordinates of a EC_POINT over GFp
18613  *  \param  group  underlying EC_GROUP object
18614  *  \param  p      EC_POINT object
18615  *  \param  x      BIGNUM with the x-coordinate
18616  *  \param  y      BIGNUM with the y-coordinate
18617  *  \param  ctx    BN_CTX object (optional)
18618  *  \return 1 on success and 0 if an error occured
18619  */
18620 int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
18621                                         const BIGNUM *x, const BIGNUM *y,
18622                                         BN_CTX *ctx);
18623 
18624 /** Gets the affine coordinates of a EC_POINT over GFp
18625  *  \param  group  underlying EC_GROUP object
18626  *  \param  p      EC_POINT object
18627  *  \param  x      BIGNUM for the x-coordinate
18628  *  \param  y      BIGNUM for the y-coordinate
18629  *  \param  ctx    BN_CTX object (optional)
18630  *  \return 1 on success and 0 if an error occured
18631  */
18632 int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
18633                                         const EC_POINT *p, BIGNUM *x,
18634                                         BIGNUM *y, BN_CTX *ctx);
18635 
18636 /** Sets the x9.62 compressed coordinates of a EC_POINT over GFp
18637  *  \param  group  underlying EC_GROUP object
18638  *  \param  p      EC_POINT object
18639  *  \param  x      BIGNUM with x-coordinate
18640  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
18641  *  \param  ctx    BN_CTX object (optional)
18642  *  \return 1 on success and 0 if an error occured
18643  */
18644 int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,
18645                                             EC_POINT *p, const BIGNUM *x,
18646                                             int y_bit, BN_CTX *ctx);
18647 
18648 /** Sets the affine coordinates of a EC_POINT over GF2m
18649  *  \param  group  underlying EC_GROUP object
18650  *  \param  p      EC_POINT object
18651  *  \param  x      BIGNUM with the x-coordinate
18652  *  \param  y      BIGNUM with the y-coordinate
18653  *  \param  ctx    BN_CTX object (optional)
18654  *  \return 1 on success and 0 if an error occured
18655  */
18656 int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,
18657                                          const BIGNUM *x, const BIGNUM *y,
18658                                          BN_CTX *ctx);
18659 
18660 /** Gets the affine coordinates of a EC_POINT over GF2m
18661  *  \param  group  underlying EC_GROUP object
18662  *  \param  p      EC_POINT object
18663  *  \param  x      BIGNUM for the x-coordinate
18664  *  \param  y      BIGNUM for the y-coordinate
18665  *  \param  ctx    BN_CTX object (optional)
18666  *  \return 1 on success and 0 if an error occured
18667  */
18668 int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
18669                                          const EC_POINT *p, BIGNUM *x,
18670                                          BIGNUM *y, BN_CTX *ctx);
18671 
18672 /** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m
18673  *  \param  group  underlying EC_GROUP object
18674  *  \param  p      EC_POINT object
18675  *  \param  x      BIGNUM with x-coordinate
18676  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
18677  *  \param  ctx    BN_CTX object (optional)
18678  *  \return 1 on success and 0 if an error occured
18679  */
18680 int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
18681                                              EC_POINT *p, const BIGNUM *x,
18682                                              int y_bit, BN_CTX *ctx);
18683 
18684 /** Encodes a EC_POINT object to a octet string
18685  *  \param  group  underlying EC_GROUP object
18686  *  \param  p      EC_POINT object
18687  *  \param  form   point conversion form
18688  *  \param  buf    memory buffer for the result. If NULL the function returns
18689  *                 required buffer size.
18690  *  \param  len    length of the memory buffer
18691  *  \param  ctx    BN_CTX object (optional)
18692  *  \return the length of the encoded octet string or 0 if an error occurred
18693  */
18694 size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
18695                           point_conversion_form_t form,
18696                           unsigned char *buf, size_t len, BN_CTX *ctx);
18697 
18698 /** Decodes a EC_POINT from a octet string
18699  *  \param  group  underlying EC_GROUP object
18700  *  \param  p      EC_POINT object
18701  *  \param  buf    memory buffer with the encoded ec point
18702  *  \param  len    length of the encoded ec point
18703  *  \param  ctx    BN_CTX object (optional)
18704  *  \return 1 on success and 0 if an error occured
18705  */
18706 int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
18707                        const unsigned char *buf, size_t len, BN_CTX *ctx);
18708 
18709 /* other interfaces to point2oct/oct2point: */
18710 BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
18711                           point_conversion_form_t form, BIGNUM *, BN_CTX *);
18712 EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
18713                             EC_POINT *, BN_CTX *);
18714 char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
18715                          point_conversion_form_t form, BN_CTX *);
18716 EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
18717                              EC_POINT *, BN_CTX *);
18718 
18719 /********************************************************************/
18720 /*         functions for doing EC_POINT arithmetic                  */
18721 /********************************************************************/
18722 
18723 /** Computes the sum of two EC_POINT
18724  *  \param  group  underlying EC_GROUP object
18725  *  \param  r      EC_POINT object for the result (r = a + b)
18726  *  \param  a      EC_POINT object with the first summand
18727  *  \param  b      EC_POINT object with the second summand
18728  *  \param  ctx    BN_CTX object (optional)
18729  *  \return 1 on success and 0 if an error occured
18730  */
18731 int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
18732                  const EC_POINT *b, BN_CTX *ctx);
18733 
18734 /** Computes the double of a EC_POINT
18735  *  \param  group  underlying EC_GROUP object
18736  *  \param  r      EC_POINT object for the result (r = 2 * a)
18737  *  \param  a      EC_POINT object
18738  *  \param  ctx    BN_CTX object (optional)
18739  *  \return 1 on success and 0 if an error occured
18740  */
18741 int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
18742                  BN_CTX *ctx);
18743 
18744 /** Computes the inverse of a EC_POINT
18745  *  \param  group  underlying EC_GROUP object
18746  *  \param  a      EC_POINT object to be inverted (it's used for the result as well)
18747  *  \param  ctx    BN_CTX object (optional)
18748  *  \return 1 on success and 0 if an error occured
18749  */
18750 int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
18751 
18752 /** Checks whether the point is the neutral element of the group
18753  *  \param  group  the underlying EC_GROUP object
18754  *  \param  p      EC_POINT object
18755  *  \return 1 if the point is the neutral element and 0 otherwise
18756  */
18757 int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);
18758 
18759 /** Checks whether the point is on the curve
18760  *  \param  group  underlying EC_GROUP object
18761  *  \param  point  EC_POINT object to check
18762  *  \param  ctx    BN_CTX object (optional)
18763  *  \return 1 if point if on the curve and 0 otherwise
18764  */
18765 int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
18766                          BN_CTX *ctx);
18767 
18768 /** Compares two EC_POINTs
18769  *  \param  group  underlying EC_GROUP object
18770  *  \param  a      first EC_POINT object
18771  *  \param  b      second EC_POINT object
18772  *  \param  ctx    BN_CTX object (optional)
18773  *  \return 0 if both points are equal and a value != 0 otherwise
18774  */
18775 int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,
18776                  BN_CTX *ctx);
18777 
18778 int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx);
18779 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
18780                           EC_POINT *points[], BN_CTX *ctx);
18781 
18782 /** Computes r = generator * n sum_{i=0}^{num-1} p[i] * m[i]
18783  *  \param  group  underlying EC_GROUP object
18784  *  \param  r      EC_POINT object for the result
18785  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
18786  *  \param  num    number futher summands
18787  *  \param  p      array of size num of EC_POINT objects
18788  *  \param  m      array of size num of BIGNUM objects
18789  *  \param  ctx    BN_CTX object (optional)
18790  *  \return 1 on success and 0 if an error occured
18791  */
18792 int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
18793                   size_t num, const EC_POINT *p[], const BIGNUM *m[],
18794                   BN_CTX *ctx);
18795 
18796 /** Computes r = generator * n + q * m
18797  *  \param  group  underlying EC_GROUP object
18798  *  \param  r      EC_POINT object for the result
18799  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
18800  *  \param  q      EC_POINT object with the first factor of the second summand
18801  *  \param  m      BIGNUM with the second factor of the second summand
18802  *  \param  ctx    BN_CTX object (optional)
18803  *  \return 1 on success and 0 if an error occured
18804  */
18805 int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
18806                  const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
18807 
18808 /** Stores multiples of generator for faster point multiplication
18809  *  \param  group  EC_GROUP object
18810  *  \param  ctx    BN_CTX object (optional)
18811  *  \return 1 on success and 0 if an error occured
18812  */
18813 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
18814 
18815 /** Reports whether a precomputation has been done
18816  *  \param  group  EC_GROUP object
18817  *  \return 1 if a pre-computation has been done and 0 otherwise
18818  */
18819 int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
18820 
18821 /********************************************************************/
18822 /*                       ASN1 stuff                                 */
18823 /********************************************************************/
18824 
18825 /*
18826  * EC_GROUP_get_basis_type() returns the NID of the basis type used to
18827  * represent the field elements
18828  */
18829 int EC_GROUP_get_basis_type(const EC_GROUP *);
18830 
18831 int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
18832 int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
18833                                    unsigned int *k2, unsigned int *k3);
18834 
18835 
18836 
18837 
18838 typedef struct ecpk_parameters_st ECPKPARAMETERS;
18839 
18840 EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
18841 int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
18842 # 731 "/usr/include/openssl/ec.h" 3 4
18843 int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
18844 
18845 
18846 int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
18847 
18848 
18849 /********************************************************************/
18850 /*                      EC_KEY functions                            */
18851 /********************************************************************/
18852 
18853 typedef struct ec_key_st EC_KEY;
18854 
18855 /* some values for the encoding_flag */
18856 
18857 
18858 
18859 /* some values for the flags field */
18860 
18861 
18862 
18863 /** Creates a new EC_KEY object.
18864  *  \return EC_KEY object or NULL if an error occurred.
18865  */
18866 EC_KEY *EC_KEY_new(void);
18867 
18868 int EC_KEY_get_flags(const EC_KEY *key);
18869 
18870 void EC_KEY_set_flags(EC_KEY *key, int flags);
18871 
18872 void EC_KEY_clear_flags(EC_KEY *key, int flags);
18873 
18874 /** Creates a new EC_KEY object using a named curve as underlying
18875  *  EC_GROUP object.
18876  *  \param  nid  NID of the named curve.
18877  *  \return EC_KEY object or NULL if an error occurred.
18878  */
18879 EC_KEY *EC_KEY_new_by_curve_name(int nid);
18880 
18881 /** Frees a EC_KEY object.
18882  *  \param  key  EC_KEY object to be freed.
18883  */
18884 void EC_KEY_free(EC_KEY *key);
18885 
18886 /** Copies a EC_KEY object.
18887  *  \param  dst  destination EC_KEY object
18888  *  \param  src  src EC_KEY object
18889  *  \return dst or NULL if an error occurred.
18890  */
18891 EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
18892 
18893 /** Creates a new EC_KEY object and copies the content from src to it.
18894  *  \param  src  the source EC_KEY object
18895  *  \return newly created EC_KEY object or NULL if an error occurred.
18896  */
18897 EC_KEY *EC_KEY_dup(const EC_KEY *src);
18898 
18899 /** Increases the internal reference count of a EC_KEY object.
18900  *  \param  key  EC_KEY object
18901  *  \return 1 on success and 0 if an error occurred.
18902  */
18903 int EC_KEY_up_ref(EC_KEY *key);
18904 
18905 /** Returns the EC_GROUP object of a EC_KEY object
18906  *  \param  key  EC_KEY object
18907  *  \return the EC_GROUP object (possibly NULL).
18908  */
18909 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
18910 
18911 /** Sets the EC_GROUP of a EC_KEY object.
18912  *  \param  key    EC_KEY object
18913  *  \param  group  EC_GROUP to use in the EC_KEY object (note: the EC_KEY
18914  *                 object will use an own copy of the EC_GROUP).
18915  *  \return 1 on success and 0 if an error occurred.
18916  */
18917 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
18918 
18919 /** Returns the private key of a EC_KEY object.
18920  *  \param  key  EC_KEY object
18921  *  \return a BIGNUM with the private key (possibly NULL).
18922  */
18923 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
18924 
18925 /** Sets the private key of a EC_KEY object.
18926  *  \param  key  EC_KEY object
18927  *  \param  prv  BIGNUM with the private key (note: the EC_KEY object
18928  *               will use an own copy of the BIGNUM).
18929  *  \return 1 on success and 0 if an error occurred.
18930  */
18931 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
18932 
18933 /** Returns the public key of a EC_KEY object.
18934  *  \param  key  the EC_KEY object
18935  *  \return a EC_POINT object with the public key (possibly NULL)
18936  */
18937 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
18938 
18939 /** Sets the public key of a EC_KEY object.
18940  *  \param  key  EC_KEY object
18941  *  \param  pub  EC_POINT object with the public key (note: the EC_KEY object
18942  *               will use an own copy of the EC_POINT object).
18943  *  \return 1 on success and 0 if an error occurred.
18944  */
18945 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
18946 
18947 unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
18948 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
18949 point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);
18950 void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform);
18951 /* functions to set/get method specific data  */
18952 void *EC_KEY_get_key_method_data(EC_KEY *key,
18953                                  void *(*dup_func) (void *),
18954                                  void (*free_func) (void *),
18955                                  void (*clear_free_func) (void *));
18956 /** Sets the key method data of an EC_KEY object, if none has yet been set.
18957  *  \param  key              EC_KEY object
18958  *  \param  data             opaque data to install.
18959  *  \param  dup_func         a function that duplicates |data|.
18960  *  \param  free_func        a function that frees |data|.
18961  *  \param  clear_free_func  a function that wipes and frees |data|.
18962  *  \return the previously set data pointer, or NULL if |data| was inserted.
18963  */
18964 void *EC_KEY_insert_key_method_data(EC_KEY *key, void *data,
18965                                     void *(*dup_func) (void *),
18966                                     void (*free_func) (void *),
18967                                     void (*clear_free_func) (void *));
18968 /* wrapper functions for the underlying EC_GROUP object */
18969 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
18970 
18971 /** Creates a table of pre-computed multiples of the generator to
18972  *  accelerate further EC_KEY operations.
18973  *  \param  key  EC_KEY object
18974  *  \param  ctx  BN_CTX object (optional)
18975  *  \return 1 on success and 0 if an error occurred.
18976  */
18977 int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
18978 
18979 /** Creates a new ec private (and optional a new public) key.
18980  *  \param  key  EC_KEY object
18981  *  \return 1 on success and 0 if an error occurred.
18982  */
18983 int EC_KEY_generate_key(EC_KEY *key);
18984 
18985 /** Verifies that a private and/or public key is valid.
18986  *  \param  key  the EC_KEY object
18987  *  \return 1 on success and 0 otherwise.
18988  */
18989 int EC_KEY_check_key(const EC_KEY *key);
18990 
18991 /** Sets a public key from affine coordindates performing
18992  *  neccessary NIST PKV tests.
18993  *  \param  key  the EC_KEY object
18994  *  \param  x    public key x coordinate
18995  *  \param  y    public key y coordinate
18996  *  \return 1 on success and 0 otherwise.
18997  */
18998 int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
18999                                              BIGNUM *y);
19000 
19001 /********************************************************************/
19002 /*        de- and encoding functions for SEC1 ECPrivateKey          */
19003 /********************************************************************/
19004 
19005 /** Decodes a private key from a memory buffer.
19006  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
19007  *  \param  in   pointer to memory with the DER encoded private key
19008  *  \param  len  length of the DER encoded private key
19009  *  \return the decoded private key or NULL if an error occurred.
19010  */
19011 EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len);
19012 
19013 /** Encodes a private key object and stores the result in a buffer.
19014  *  \param  key  the EC_KEY object to encode
19015  *  \param  out  the buffer for the result (if NULL the function returns number
19016  *               of bytes needed).
19017  *  \return 1 on success and 0 if an error occurred.
19018  */
19019 int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out);
19020 
19021 /********************************************************************/
19022 /*        de- and encoding functions for EC parameters              */
19023 /********************************************************************/
19024 
19025 /** Decodes ec parameter from a memory buffer.
19026  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
19027  *  \param  in   pointer to memory with the DER encoded ec parameters
19028  *  \param  len  length of the DER encoded ec parameters
19029  *  \return a EC_KEY object with the decoded parameters or NULL if an error
19030  *          occurred.
19031  */
19032 EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len);
19033 
19034 /** Encodes ec parameter and stores the result in a buffer.
19035  *  \param  key  the EC_KEY object with ec paramters to encode
19036  *  \param  out  the buffer for the result (if NULL the function returns number
19037  *               of bytes needed).
19038  *  \return 1 on success and 0 if an error occurred.
19039  */
19040 int i2d_ECParameters(EC_KEY *key, unsigned char **out);
19041 
19042 /********************************************************************/
19043 /*         de- and encoding functions for EC public key             */
19044 /*         (octet string, not DER -- hence 'o2i' and 'i2o')         */
19045 /********************************************************************/
19046 
19047 /** Decodes a ec public key from a octet string.
19048  *  \param  key  a pointer to a EC_KEY object which should be used
19049  *  \param  in   memory buffer with the encoded public key
19050  *  \param  len  length of the encoded public key
19051  *  \return EC_KEY object with decoded public key or NULL if an error
19052  *          occurred.
19053  */
19054 EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len);
19055 
19056 /** Encodes a ec public key in an octet string.
19057  *  \param  key  the EC_KEY object with the public key
19058  *  \param  out  the buffer for the result (if NULL the function returns number
19059  *               of bytes needed).
19060  *  \return 1 on success and 0 if an error occurred
19061  */
19062 int i2o_ECPublicKey(EC_KEY *key, unsigned char **out);
19063 
19064 
19065 /** Prints out the ec parameters on human readable form.
19066  *  \param  bp   BIO object to which the information is printed
19067  *  \param  key  EC_KEY object
19068  *  \return 1 on success and 0 if an error occurred
19069  */
19070 int ECParameters_print(BIO *bp, const EC_KEY *key);
19071 
19072 /** Prints out the contents of a EC_KEY object
19073  *  \param  bp   BIO object to which the information is printed
19074  *  \param  key  EC_KEY object
19075  *  \param  off  line offset
19076  *  \return 1 on success and 0 if an error occurred
19077  */
19078 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
19079 
19080 
19081 
19082 /** Prints out the ec parameters on human readable form.
19083  *  \param  fp   file descriptor to which the information is printed
19084  *  \param  key  EC_KEY object
19085  *  \return 1 on success and 0 if an error occurred
19086  */
19087 int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
19088 
19089 /** Prints out the contents of a EC_KEY object
19090  *  \param  fp   file descriptor to which the information is printed
19091  *  \param  key  EC_KEY object
19092  *  \param  off  line offset
19093  *  \return 1 on success and 0 if an error occurred
19094  */
19095 int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
19096 # 1067 "/usr/include/openssl/ec.h" 3 4
19097 /* KDF types */
19098 
19099 
19100 
19101 /* BEGIN ERROR CODES */
19102 /*
19103  * The following lines are auto generated by the script mkerr.pl. Any changes
19104  * made after this point may be overwritten when the script is next run.
19105  */
19106 
19107 void ERR_load_EC_strings(void);
19108 
19109 /* Error codes for the EC functions. */
19110 
19111 /* Function codes. */
19112 # 1227 "/usr/include/openssl/ec.h" 3 4
19113 /* Reason codes. */
19114 # 84 "/usr/include/openssl/x509.h" 2 3 4
19115 
19116 
19117 
19118 # 1 "/usr/include/openssl/ecdsa.h" 1 3 4
19119 /* crypto/ecdsa/ecdsa.h */
19120 /**
19121  * \file   crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
19122  * \author Written by Nils Larsch for the OpenSSL project
19123  */
19124 /* ====================================================================
19125  * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
19126  *
19127  * Redistribution and use in source and binary forms, with or without
19128  * modification, are permitted provided that the following conditions
19129  * are met:
19130  *
19131  * 1. Redistributions of source code must retain the above copyright
19132  *    notice, this list of conditions and the following disclaimer.
19133  *
19134  * 2. Redistributions in binary form must reproduce the above copyright
19135  *    notice, this list of conditions and the following disclaimer in
19136  *    the documentation and/or other materials provided with the
19137  *    distribution.
19138  *
19139  * 3. All advertising materials mentioning features or use of this
19140  *    software must display the following acknowledgment:
19141  *    "This product includes software developed by the OpenSSL Project
19142  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
19143  *
19144  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19145  *    endorse or promote products derived from this software without
19146  *    prior written permission. For written permission, please contact
19147  *    licensing@OpenSSL.org.
19148  *
19149  * 5. Products derived from this software may not be called "OpenSSL"
19150  *    nor may "OpenSSL" appear in their names without prior written
19151  *    permission of the OpenSSL Project.
19152  *
19153  * 6. Redistributions of any form whatsoever must retain the following
19154  *    acknowledgment:
19155  *    "This product includes software developed by the OpenSSL Project
19156  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
19157  *
19158  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19159  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19160  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19161  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19162  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19163  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19164  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19165  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19166  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19167  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19168  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19169  * OF THE POSSIBILITY OF SUCH DAMAGE.
19170  * ====================================================================
19171  *
19172  * This product includes cryptographic software written by Eric Young
19173  * (eay@cryptsoft.com).  This product includes software written by Tim
19174  * Hudson (tjh@cryptsoft.com).
19175  *
19176  */
19177 
19178 
19179 
19180 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
19181 /* opensslconf.h */
19182 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
19183 
19184 
19185 
19186 
19187 /* OpenSSL was configured with the following options: */
19188 # 108 "/usr/include/openssl/opensslconf.h" 3 4
19189 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
19190    asks for it.  This is a transient feature that is provided for those
19191    who haven't had the time to do the appropriate changes in their
19192    applications.  */
19193 # 204 "/usr/include/openssl/opensslconf.h" 3 4
19194 /* crypto/opensslconf.h.in */
19195 
19196 /* Generate 80386 code? */
19197 # 63 "/usr/include/openssl/ecdsa.h" 2 3 4
19198 
19199 
19200 
19201 
19202 
19203 # 1 "/usr/include/openssl/ec.h" 1 3 4
19204 /* crypto/ec/ec.h */
19205 /*
19206  * Originally written by Bodo Moeller for the OpenSSL project.
19207  */
19208 /**
19209  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
19210  * \author Originally written by Bodo Moeller for the OpenSSL project
19211  */
19212 /* ====================================================================
19213  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
19214  *
19215  * Redistribution and use in source and binary forms, with or without
19216  * modification, are permitted provided that the following conditions
19217  * are met:
19218  *
19219  * 1. Redistributions of source code must retain the above copyright
19220  *    notice, this list of conditions and the following disclaimer.
19221  *
19222  * 2. Redistributions in binary form must reproduce the above copyright
19223  *    notice, this list of conditions and the following disclaimer in
19224  *    the documentation and/or other materials provided with the
19225  *    distribution.
19226  *
19227  * 3. All advertising materials mentioning features or use of this
19228  *    software must display the following acknowledgment:
19229  *    "This product includes software developed by the OpenSSL Project
19230  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19231  *
19232  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19233  *    endorse or promote products derived from this software without
19234  *    prior written permission. For written permission, please contact
19235  *    openssl-core@openssl.org.
19236  *
19237  * 5. Products derived from this software may not be called "OpenSSL"
19238  *    nor may "OpenSSL" appear in their names without prior written
19239  *    permission of the OpenSSL Project.
19240  *
19241  * 6. Redistributions of any form whatsoever must retain the following
19242  *    acknowledgment:
19243  *    "This product includes software developed by the OpenSSL Project
19244  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19245  *
19246  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19247  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19248  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19249  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19250  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19251  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19252  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19253  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19254  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19255  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19256  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19257  * OF THE POSSIBILITY OF SUCH DAMAGE.
19258  * ====================================================================
19259  *
19260  * This product includes cryptographic software written by Eric Young
19261  * (eay@cryptsoft.com).  This product includes software written by Tim
19262  * Hudson (tjh@cryptsoft.com).
19263  *
19264  */
19265 /* ====================================================================
19266  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
19267  *
19268  * Portions of the attached software ("Contribution") are developed by
19269  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
19270  *
19271  * The Contribution is licensed pursuant to the OpenSSL open source
19272  * license provided above.
19273  *
19274  * The elliptic curve binary polynomial software is originally written by
19275  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
19276  *
19277  */
19278 # 69 "/usr/include/openssl/ecdsa.h" 2 3 4
19279 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
19280 /* ====================================================================
19281  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
19282  *
19283  * Redistribution and use in source and binary forms, with or without
19284  * modification, are permitted provided that the following conditions
19285  * are met:
19286  *
19287  * 1. Redistributions of source code must retain the above copyright
19288  *    notice, this list of conditions and the following disclaimer.
19289  *
19290  * 2. Redistributions in binary form must reproduce the above copyright
19291  *    notice, this list of conditions and the following disclaimer in
19292  *    the documentation and/or other materials provided with the
19293  *    distribution.
19294  *
19295  * 3. All advertising materials mentioning features or use of this
19296  *    software must display the following acknowledgment:
19297  *    "This product includes software developed by the OpenSSL Project
19298  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19299  *
19300  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19301  *    endorse or promote products derived from this software without
19302  *    prior written permission. For written permission, please contact
19303  *    openssl-core@openssl.org.
19304  *
19305  * 5. Products derived from this software may not be called "OpenSSL"
19306  *    nor may "OpenSSL" appear in their names without prior written
19307  *    permission of the OpenSSL Project.
19308  *
19309  * 6. Redistributions of any form whatsoever must retain the following
19310  *    acknowledgment:
19311  *    "This product includes software developed by the OpenSSL Project
19312  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19313  *
19314  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19315  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19316  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19317  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19318  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19319  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19320  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19321  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19322  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19323  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19324  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19325  * OF THE POSSIBILITY OF SUCH DAMAGE.
19326  * ====================================================================
19327  *
19328  * This product includes cryptographic software written by Eric Young
19329  * (eay@cryptsoft.com).  This product includes software written by Tim
19330  * Hudson (tjh@cryptsoft.com).
19331  *
19332  */
19333 # 70 "/usr/include/openssl/ecdsa.h" 2 3 4
19334 
19335 # 1 "/usr/include/openssl/bn.h" 1 3 4
19336 /* crypto/bn/bn.h */
19337 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
19338  * All rights reserved.
19339  *
19340  * This package is an SSL implementation written
19341  * by Eric Young (eay@cryptsoft.com).
19342  * The implementation was written so as to conform with Netscapes SSL.
19343  *
19344  * This library is free for commercial and non-commercial use as long as
19345  * the following conditions are aheared to.  The following conditions
19346  * apply to all code found in this distribution, be it the RC4, RSA,
19347  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19348  * included with this distribution is covered by the same copyright terms
19349  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19350  *
19351  * Copyright remains Eric Young's, and as such any Copyright notices in
19352  * the code are not to be removed.
19353  * If this package is used in a product, Eric Young should be given attribution
19354  * as the author of the parts of the library used.
19355  * This can be in the form of a textual message at program startup or
19356  * in documentation (online or textual) provided with the package.
19357  *
19358  * Redistribution and use in source and binary forms, with or without
19359  * modification, are permitted provided that the following conditions
19360  * are met:
19361  * 1. Redistributions of source code must retain the copyright
19362  *    notice, this list of conditions and the following disclaimer.
19363  * 2. Redistributions in binary form must reproduce the above copyright
19364  *    notice, this list of conditions and the following disclaimer in the
19365  *    documentation and/or other materials provided with the distribution.
19366  * 3. All advertising materials mentioning features or use of this software
19367  *    must display the following acknowledgement:
19368  *    "This product includes cryptographic software written by
19369  *     Eric Young (eay@cryptsoft.com)"
19370  *    The word 'cryptographic' can be left out if the rouines from the library
19371  *    being used are not cryptographic related :-).
19372  * 4. If you include any Windows specific code (or a derivative thereof) from
19373  *    the apps directory (application code) you must include an acknowledgement:
19374  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19375  *
19376  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19377  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19378  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19379  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19380  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19381  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19382  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19383  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19384  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19385  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19386  * SUCH DAMAGE.
19387  *
19388  * The licence and distribution terms for any publically available version or
19389  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19390  * copied and put under another distribution licence
19391  * [including the GNU Public Licence.]
19392  */
19393 /* ====================================================================
19394  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
19395  *
19396  * Redistribution and use in source and binary forms, with or without
19397  * modification, are permitted provided that the following conditions
19398  * are met:
19399  *
19400  * 1. Redistributions of source code must retain the above copyright
19401  *    notice, this list of conditions and the following disclaimer.
19402  *
19403  * 2. Redistributions in binary form must reproduce the above copyright
19404  *    notice, this list of conditions and the following disclaimer in
19405  *    the documentation and/or other materials provided with the
19406  *    distribution.
19407  *
19408  * 3. All advertising materials mentioning features or use of this
19409  *    software must display the following acknowledgment:
19410  *    "This product includes software developed by the OpenSSL Project
19411  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19412  *
19413  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19414  *    endorse or promote products derived from this software without
19415  *    prior written permission. For written permission, please contact
19416  *    openssl-core@openssl.org.
19417  *
19418  * 5. Products derived from this software may not be called "OpenSSL"
19419  *    nor may "OpenSSL" appear in their names without prior written
19420  *    permission of the OpenSSL Project.
19421  *
19422  * 6. Redistributions of any form whatsoever must retain the following
19423  *    acknowledgment:
19424  *    "This product includes software developed by the OpenSSL Project
19425  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19426  *
19427  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19428  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19429  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19430  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19431  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19432  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19433  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19434  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19435  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19436  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19437  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19438  * OF THE POSSIBILITY OF SUCH DAMAGE.
19439  * ====================================================================
19440  *
19441  * This product includes cryptographic software written by Eric Young
19442  * (eay@cryptsoft.com).  This product includes software written by Tim
19443  * Hudson (tjh@cryptsoft.com).
19444  *
19445  */
19446 /* ====================================================================
19447  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
19448  *
19449  * Portions of the attached software ("Contribution") are developed by
19450  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
19451  *
19452  * The Contribution is licensed pursuant to the Eric Young open source
19453  * license provided above.
19454  *
19455  * The binary polynomial arithmetic software is originally written by
19456  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
19457  *
19458  */
19459 # 72 "/usr/include/openssl/ecdsa.h" 2 3 4
19460 
19461 
19462 
19463 
19464 
19465 
19466 typedef struct ECDSA_SIG_st {
19467     BIGNUM *r;
19468     BIGNUM *s;
19469 } ECDSA_SIG;
19470 
19471 /** Allocates and initialize a ECDSA_SIG structure
19472  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
19473  */
19474 ECDSA_SIG *ECDSA_SIG_new(void);
19475 
19476 /** frees a ECDSA_SIG structure
19477  *  \param  sig  pointer to the ECDSA_SIG structure
19478  */
19479 void ECDSA_SIG_free(ECDSA_SIG *sig);
19480 
19481 /** DER encode content of ECDSA_SIG object (note: this function modifies *pp
19482  *  (*pp += length of the DER encoded signature)).
19483  *  \param  sig  pointer to the ECDSA_SIG object
19484  *  \param  pp   pointer to a unsigned char pointer for the output or NULL
19485  *  \return the length of the DER encoded ECDSA_SIG object or 0
19486  */
19487 int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
19488 
19489 /** Decodes a DER encoded ECDSA signature (note: this function changes *pp
19490  *  (*pp += len)).
19491  *  \param  sig  pointer to ECDSA_SIG pointer (may be NULL)
19492  *  \param  pp   memory buffer with the DER encoded signature
19493  *  \param  len  length of the buffer
19494  *  \return pointer to the decoded ECDSA_SIG structure (or NULL)
19495  */
19496 ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);
19497 
19498 /** Computes the ECDSA signature of the given hash value using
19499  *  the supplied private key and returns the created signature.
19500  *  \param  dgst      pointer to the hash value
19501  *  \param  dgst_len  length of the hash value
19502  *  \param  eckey     EC_KEY object containing a private EC key
19503  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
19504  */
19505 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len,
19506                          EC_KEY *eckey);
19507 
19508 /** Computes ECDSA signature of a given hash value using the supplied
19509  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
19510  *  \param  dgst     pointer to the hash value to sign
19511  *  \param  dgstlen  length of the hash value
19512  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
19513  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
19514  *                   see ECDSA_sign_setup
19515  *  \param  eckey    EC_KEY object containing a private EC key
19516  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
19517  */
19518 ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen,
19519                             const BIGNUM *kinv, const BIGNUM *rp,
19520                             EC_KEY *eckey);
19521 
19522 /** Verifies that the supplied signature is a valid ECDSA
19523  *  signature of the supplied hash value using the supplied public key.
19524  *  \param  dgst      pointer to the hash value
19525  *  \param  dgst_len  length of the hash value
19526  *  \param  sig       ECDSA_SIG structure
19527  *  \param  eckey     EC_KEY object containing a public EC key
19528  *  \return 1 if the signature is valid, 0 if the signature is invalid
19529  *          and -1 on error
19530  */
19531 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
19532                     const ECDSA_SIG *sig, EC_KEY *eckey);
19533 
19534 const ECDSA_METHOD *ECDSA_OpenSSL(void);
19535 
19536 /** Sets the default ECDSA method
19537  *  \param  meth  new default ECDSA_METHOD
19538  */
19539 void ECDSA_set_default_method(const ECDSA_METHOD *meth);
19540 
19541 /** Returns the default ECDSA method
19542  *  \return pointer to ECDSA_METHOD structure containing the default method
19543  */
19544 const ECDSA_METHOD *ECDSA_get_default_method(void);
19545 
19546 /** Sets method to be used for the ECDSA operations
19547  *  \param  eckey  EC_KEY object
19548  *  \param  meth   new method
19549  *  \return 1 on success and 0 otherwise
19550  */
19551 int ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth);
19552 
19553 /** Returns the maximum length of the DER encoded signature
19554  *  \param  eckey  EC_KEY object
19555  *  \return numbers of bytes required for the DER encoded signature
19556  */
19557 int ECDSA_size(const EC_KEY *eckey);
19558 
19559 /** Precompute parts of the signing operation
19560  *  \param  eckey  EC_KEY object containing a private EC key
19561  *  \param  ctx    BN_CTX object (optional)
19562  *  \param  kinv   BIGNUM pointer for the inverse of k
19563  *  \param  rp     BIGNUM pointer for x coordinate of k * generator
19564  *  \return 1 on success and 0 otherwise
19565  */
19566 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp);
19567 
19568 /** Computes ECDSA signature of a given hash value using the supplied
19569  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
19570  *  \param  type     this parameter is ignored
19571  *  \param  dgst     pointer to the hash value to sign
19572  *  \param  dgstlen  length of the hash value
19573  *  \param  sig      memory for the DER encoded created signature
19574  *  \param  siglen   pointer to the length of the returned signature
19575  *  \param  eckey    EC_KEY object containing a private EC key
19576  *  \return 1 on success and 0 otherwise
19577  */
19578 int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,
19579                unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
19580 
19581 /** Computes ECDSA signature of a given hash value using the supplied
19582  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
19583  *  \param  type     this parameter is ignored
19584  *  \param  dgst     pointer to the hash value to sign
19585  *  \param  dgstlen  length of the hash value
19586  *  \param  sig      buffer to hold the DER encoded signature
19587  *  \param  siglen   pointer to the length of the returned signature
19588  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
19589  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
19590  *                   see ECDSA_sign_setup
19591  *  \param  eckey    EC_KEY object containing a private EC key
19592  *  \return 1 on success and 0 otherwise
19593  */
19594 int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen,
19595                   unsigned char *sig, unsigned int *siglen,
19596                   const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey);
19597 
19598 /** Verifies that the given signature is valid ECDSA signature
19599  *  of the supplied hash value using the specified public key.
19600  *  \param  type     this parameter is ignored
19601  *  \param  dgst     pointer to the hash value
19602  *  \param  dgstlen  length of the hash value
19603  *  \param  sig      pointer to the DER encoded signature
19604  *  \param  siglen   length of the DER encoded signature
19605  *  \param  eckey    EC_KEY object containing a public EC key
19606  *  \return 1 if the signature is valid, 0 if the signature is invalid
19607  *          and -1 on error
19608  */
19609 int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen,
19610                  const unsigned char *sig, int siglen, EC_KEY *eckey);
19611 
19612 /* the standard ex_data functions */
19613 int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
19614                            *new_func, CRYPTO_EX_dup *dup_func,
19615                            CRYPTO_EX_free *free_func);
19616 int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg);
19617 void *ECDSA_get_ex_data(EC_KEY *d, int idx);
19618 
19619 /** Allocates and initialize a ECDSA_METHOD structure
19620  *  \param ecdsa_method pointer to ECDSA_METHOD to copy.  (May be NULL)
19621  *  \return pointer to a ECDSA_METHOD structure or NULL if an error occurred
19622  */
19623 
19624 ECDSA_METHOD *ECDSA_METHOD_new(const ECDSA_METHOD *ecdsa_method);
19625 
19626 /** frees a ECDSA_METHOD structure
19627  *  \param  ecdsa_method  pointer to the ECDSA_METHOD structure
19628  */
19629 void ECDSA_METHOD_free(ECDSA_METHOD *ecdsa_method);
19630 
19631 /**  Sets application specific data in the ECDSA_METHOD
19632  *   \param  ecdsa_method pointer to existing ECDSA_METHOD
19633  *   \param  app application specific data to set
19634  */
19635 
19636 void ECDSA_METHOD_set_app_data(ECDSA_METHOD *ecdsa_method, void *app);
19637 
19638 /** Returns application specific data from a ECDSA_METHOD structure
19639  *  \param ecdsa_method pointer to ECDSA_METHOD structure
19640  *  \return pointer to application specific data.
19641  */
19642 
19643 void *ECDSA_METHOD_get_app_data(ECDSA_METHOD *ecdsa_method);
19644 
19645 /**  Set the ECDSA_do_sign function in the ECDSA_METHOD
19646  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
19647  *   \param  ecdsa_do_sign a funtion of type ECDSA_do_sign
19648  */
19649 
19650 void ECDSA_METHOD_set_sign(ECDSA_METHOD *ecdsa_method,
19651                            ECDSA_SIG *(*ecdsa_do_sign) (const unsigned char
19652                                                         *dgst, int dgst_len,
19653                                                         const BIGNUM *inv,
19654                                                         const BIGNUM *rp,
19655                                                         EC_KEY *eckey));
19656 
19657 /**  Set the  ECDSA_sign_setup function in the ECDSA_METHOD
19658  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
19659  *   \param  ecdsa_sign_setup a funtion of type ECDSA_sign_setup
19660  */
19661 
19662 void ECDSA_METHOD_set_sign_setup(ECDSA_METHOD *ecdsa_method,
19663                                  int (*ecdsa_sign_setup) (EC_KEY *eckey,
19664                                                           BN_CTX *ctx,
19665                                                           BIGNUM **kinv,
19666                                                           BIGNUM **r));
19667 
19668 /**  Set the ECDSA_do_verify function in the ECDSA_METHOD
19669  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
19670  *   \param  ecdsa_do_verify a funtion of type ECDSA_do_verify
19671  */
19672 
19673 void ECDSA_METHOD_set_verify(ECDSA_METHOD *ecdsa_method,
19674                              int (*ecdsa_do_verify) (const unsigned char
19675                                                      *dgst, int dgst_len,
19676                                                      const ECDSA_SIG *sig,
19677                                                      EC_KEY *eckey));
19678 
19679 void ECDSA_METHOD_set_flags(ECDSA_METHOD *ecdsa_method, int flags);
19680 
19681 /**  Set the flags field in the ECDSA_METHOD
19682  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
19683  *   \param  flags flags value to set
19684  */
19685 
19686 void ECDSA_METHOD_set_name(ECDSA_METHOD *ecdsa_method, char *name);
19687 
19688 /**  Set the name field in the ECDSA_METHOD
19689  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
19690  *   \param  name name to set
19691  */
19692 
19693 /* BEGIN ERROR CODES */
19694 /*
19695  * The following lines are auto generated by the script mkerr.pl. Any changes
19696  * made after this point may be overwritten when the script is next run.
19697  */
19698 void ERR_load_ECDSA_strings(void);
19699 
19700 /* Error codes for the ECDSA functions. */
19701 
19702 /* Function codes. */
19703 
19704 
19705 
19706 
19707 
19708 
19709 
19710 /* Reason codes. */
19711 # 88 "/usr/include/openssl/x509.h" 2 3 4
19712 
19713 
19714 
19715 # 1 "/usr/include/openssl/ecdh.h" 1 3 4
19716 /* crypto/ecdh/ecdh.h */
19717 /* ====================================================================
19718  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
19719  *
19720  * The Elliptic Curve Public-Key Crypto Library (ECC Code) included
19721  * herein is developed by SUN MICROSYSTEMS, INC., and is contributed
19722  * to the OpenSSL project.
19723  *
19724  * The ECC Code is licensed pursuant to the OpenSSL open source
19725  * license provided below.
19726  *
19727  * The ECDH software is originally written by Douglas Stebila of
19728  * Sun Microsystems Laboratories.
19729  *
19730  */
19731 /* ====================================================================
19732  * Copyright (c) 2000-2002 The OpenSSL Project.  All rights reserved.
19733  *
19734  * Redistribution and use in source and binary forms, with or without
19735  * modification, are permitted provided that the following conditions
19736  * are met:
19737  *
19738  * 1. Redistributions of source code must retain the above copyright
19739  *    notice, this list of conditions and the following disclaimer.
19740  *
19741  * 2. Redistributions in binary form must reproduce the above copyright
19742  *    notice, this list of conditions and the following disclaimer in
19743  *    the documentation and/or other materials provided with the
19744  *    distribution.
19745  *
19746  * 3. All advertising materials mentioning features or use of this
19747  *    software must display the following acknowledgment:
19748  *    "This product includes software developed by the OpenSSL Project
19749  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
19750  *
19751  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19752  *    endorse or promote products derived from this software without
19753  *    prior written permission. For written permission, please contact
19754  *    licensing@OpenSSL.org.
19755  *
19756  * 5. Products derived from this software may not be called "OpenSSL"
19757  *    nor may "OpenSSL" appear in their names without prior written
19758  *    permission of the OpenSSL Project.
19759  *
19760  * 6. Redistributions of any form whatsoever must retain the following
19761  *    acknowledgment:
19762  *    "This product includes software developed by the OpenSSL Project
19763  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
19764  *
19765  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19766  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19767  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19768  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19769  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19770  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19771  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19772  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19773  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19774  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19775  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19776  * OF THE POSSIBILITY OF SUCH DAMAGE.
19777  * ====================================================================
19778  *
19779  * This product includes cryptographic software written by Eric Young
19780  * (eay@cryptsoft.com).  This product includes software written by Tim
19781  * Hudson (tjh@cryptsoft.com).
19782  *
19783  */
19784 
19785 
19786 
19787 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
19788 /* opensslconf.h */
19789 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
19790 
19791 
19792 
19793 
19794 /* OpenSSL was configured with the following options: */
19795 # 108 "/usr/include/openssl/opensslconf.h" 3 4
19796 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
19797    asks for it.  This is a transient feature that is provided for those
19798    who haven't had the time to do the appropriate changes in their
19799    applications.  */
19800 # 204 "/usr/include/openssl/opensslconf.h" 3 4
19801 /* crypto/opensslconf.h.in */
19802 
19803 /* Generate 80386 code? */
19804 # 73 "/usr/include/openssl/ecdh.h" 2 3 4
19805 
19806 
19807 
19808 
19809 
19810 # 1 "/usr/include/openssl/ec.h" 1 3 4
19811 /* crypto/ec/ec.h */
19812 /*
19813  * Originally written by Bodo Moeller for the OpenSSL project.
19814  */
19815 /**
19816  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
19817  * \author Originally written by Bodo Moeller for the OpenSSL project
19818  */
19819 /* ====================================================================
19820  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
19821  *
19822  * Redistribution and use in source and binary forms, with or without
19823  * modification, are permitted provided that the following conditions
19824  * are met:
19825  *
19826  * 1. Redistributions of source code must retain the above copyright
19827  *    notice, this list of conditions and the following disclaimer.
19828  *
19829  * 2. Redistributions in binary form must reproduce the above copyright
19830  *    notice, this list of conditions and the following disclaimer in
19831  *    the documentation and/or other materials provided with the
19832  *    distribution.
19833  *
19834  * 3. All advertising materials mentioning features or use of this
19835  *    software must display the following acknowledgment:
19836  *    "This product includes software developed by the OpenSSL Project
19837  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19838  *
19839  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19840  *    endorse or promote products derived from this software without
19841  *    prior written permission. For written permission, please contact
19842  *    openssl-core@openssl.org.
19843  *
19844  * 5. Products derived from this software may not be called "OpenSSL"
19845  *    nor may "OpenSSL" appear in their names without prior written
19846  *    permission of the OpenSSL Project.
19847  *
19848  * 6. Redistributions of any form whatsoever must retain the following
19849  *    acknowledgment:
19850  *    "This product includes software developed by the OpenSSL Project
19851  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19852  *
19853  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19854  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19855  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19856  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19857  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19858  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19859  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19860  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19861  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19862  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19863  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19864  * OF THE POSSIBILITY OF SUCH DAMAGE.
19865  * ====================================================================
19866  *
19867  * This product includes cryptographic software written by Eric Young
19868  * (eay@cryptsoft.com).  This product includes software written by Tim
19869  * Hudson (tjh@cryptsoft.com).
19870  *
19871  */
19872 /* ====================================================================
19873  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
19874  *
19875  * Portions of the attached software ("Contribution") are developed by
19876  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
19877  *
19878  * The Contribution is licensed pursuant to the OpenSSL open source
19879  * license provided above.
19880  *
19881  * The elliptic curve binary polynomial software is originally written by
19882  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
19883  *
19884  */
19885 # 79 "/usr/include/openssl/ecdh.h" 2 3 4
19886 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
19887 /* ====================================================================
19888  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
19889  *
19890  * Redistribution and use in source and binary forms, with or without
19891  * modification, are permitted provided that the following conditions
19892  * are met:
19893  *
19894  * 1. Redistributions of source code must retain the above copyright
19895  *    notice, this list of conditions and the following disclaimer.
19896  *
19897  * 2. Redistributions in binary form must reproduce the above copyright
19898  *    notice, this list of conditions and the following disclaimer in
19899  *    the documentation and/or other materials provided with the
19900  *    distribution.
19901  *
19902  * 3. All advertising materials mentioning features or use of this
19903  *    software must display the following acknowledgment:
19904  *    "This product includes software developed by the OpenSSL Project
19905  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19906  *
19907  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19908  *    endorse or promote products derived from this software without
19909  *    prior written permission. For written permission, please contact
19910  *    openssl-core@openssl.org.
19911  *
19912  * 5. Products derived from this software may not be called "OpenSSL"
19913  *    nor may "OpenSSL" appear in their names without prior written
19914  *    permission of the OpenSSL Project.
19915  *
19916  * 6. Redistributions of any form whatsoever must retain the following
19917  *    acknowledgment:
19918  *    "This product includes software developed by the OpenSSL Project
19919  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19920  *
19921  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19922  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19923  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19924  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19925  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19926  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19927  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19928  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19929  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19930  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19931  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19932  * OF THE POSSIBILITY OF SUCH DAMAGE.
19933  * ====================================================================
19934  *
19935  * This product includes cryptographic software written by Eric Young
19936  * (eay@cryptsoft.com).  This product includes software written by Tim
19937  * Hudson (tjh@cryptsoft.com).
19938  *
19939  */
19940 # 80 "/usr/include/openssl/ecdh.h" 2 3 4
19941 
19942 # 1 "/usr/include/openssl/bn.h" 1 3 4
19943 /* crypto/bn/bn.h */
19944 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
19945  * All rights reserved.
19946  *
19947  * This package is an SSL implementation written
19948  * by Eric Young (eay@cryptsoft.com).
19949  * The implementation was written so as to conform with Netscapes SSL.
19950  *
19951  * This library is free for commercial and non-commercial use as long as
19952  * the following conditions are aheared to.  The following conditions
19953  * apply to all code found in this distribution, be it the RC4, RSA,
19954  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19955  * included with this distribution is covered by the same copyright terms
19956  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19957  *
19958  * Copyright remains Eric Young's, and as such any Copyright notices in
19959  * the code are not to be removed.
19960  * If this package is used in a product, Eric Young should be given attribution
19961  * as the author of the parts of the library used.
19962  * This can be in the form of a textual message at program startup or
19963  * in documentation (online or textual) provided with the package.
19964  *
19965  * Redistribution and use in source and binary forms, with or without
19966  * modification, are permitted provided that the following conditions
19967  * are met:
19968  * 1. Redistributions of source code must retain the copyright
19969  *    notice, this list of conditions and the following disclaimer.
19970  * 2. Redistributions in binary form must reproduce the above copyright
19971  *    notice, this list of conditions and the following disclaimer in the
19972  *    documentation and/or other materials provided with the distribution.
19973  * 3. All advertising materials mentioning features or use of this software
19974  *    must display the following acknowledgement:
19975  *    "This product includes cryptographic software written by
19976  *     Eric Young (eay@cryptsoft.com)"
19977  *    The word 'cryptographic' can be left out if the rouines from the library
19978  *    being used are not cryptographic related :-).
19979  * 4. If you include any Windows specific code (or a derivative thereof) from
19980  *    the apps directory (application code) you must include an acknowledgement:
19981  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19982  *
19983  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19984  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19985  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19986  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19987  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19988  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19989  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19990  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19991  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19992  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19993  * SUCH DAMAGE.
19994  *
19995  * The licence and distribution terms for any publically available version or
19996  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19997  * copied and put under another distribution licence
19998  * [including the GNU Public Licence.]
19999  */
20000 /* ====================================================================
20001  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
20002  *
20003  * Redistribution and use in source and binary forms, with or without
20004  * modification, are permitted provided that the following conditions
20005  * are met:
20006  *
20007  * 1. Redistributions of source code must retain the above copyright
20008  *    notice, this list of conditions and the following disclaimer.
20009  *
20010  * 2. Redistributions in binary form must reproduce the above copyright
20011  *    notice, this list of conditions and the following disclaimer in
20012  *    the documentation and/or other materials provided with the
20013  *    distribution.
20014  *
20015  * 3. All advertising materials mentioning features or use of this
20016  *    software must display the following acknowledgment:
20017  *    "This product includes software developed by the OpenSSL Project
20018  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20019  *
20020  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20021  *    endorse or promote products derived from this software without
20022  *    prior written permission. For written permission, please contact
20023  *    openssl-core@openssl.org.
20024  *
20025  * 5. Products derived from this software may not be called "OpenSSL"
20026  *    nor may "OpenSSL" appear in their names without prior written
20027  *    permission of the OpenSSL Project.
20028  *
20029  * 6. Redistributions of any form whatsoever must retain the following
20030  *    acknowledgment:
20031  *    "This product includes software developed by the OpenSSL Project
20032  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20033  *
20034  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20035  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20036  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20037  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20038  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20039  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20040  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20041  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20042  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20043  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20044  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20045  * OF THE POSSIBILITY OF SUCH DAMAGE.
20046  * ====================================================================
20047  *
20048  * This product includes cryptographic software written by Eric Young
20049  * (eay@cryptsoft.com).  This product includes software written by Tim
20050  * Hudson (tjh@cryptsoft.com).
20051  *
20052  */
20053 /* ====================================================================
20054  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
20055  *
20056  * Portions of the attached software ("Contribution") are developed by
20057  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
20058  *
20059  * The Contribution is licensed pursuant to the Eric Young open source
20060  * license provided above.
20061  *
20062  * The binary polynomial arithmetic software is originally written by
20063  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
20064  *
20065  */
20066 # 82 "/usr/include/openssl/ecdh.h" 2 3 4
20067 # 90 "/usr/include/openssl/ecdh.h" 3 4
20068 const ECDH_METHOD *ECDH_OpenSSL(void);
20069 
20070 void ECDH_set_default_method(const ECDH_METHOD *);
20071 const ECDH_METHOD *ECDH_get_default_method(void);
20072 int ECDH_set_method(EC_KEY *, const ECDH_METHOD *);
20073 
20074 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
20075                      EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen,
20076                                                  void *out, size_t *outlen));
20077 
20078 int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
20079                           *new_func, CRYPTO_EX_dup *dup_func,
20080                           CRYPTO_EX_free *free_func);
20081 int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg);
20082 void *ECDH_get_ex_data(EC_KEY *d, int idx);
20083 
20084 int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
20085                    const unsigned char *Z, size_t Zlen,
20086                    const unsigned char *sinfo, size_t sinfolen,
20087                    const EVP_MD *md);
20088 
20089 /* BEGIN ERROR CODES */
20090 /*
20091  * The following lines are auto generated by the script mkerr.pl. Any changes
20092  * made after this point may be overwritten when the script is next run.
20093  */
20094 void ERR_load_ECDH_strings(void);
20095 
20096 /* Error codes for the ECDH functions. */
20097 
20098 /* Function codes. */
20099 
20100 
20101 
20102 
20103 /* Reason codes. */
20104 # 92 "/usr/include/openssl/x509.h" 2 3 4
20105 
20106 
20107 
20108 
20109 # 1 "/usr/include/openssl/rsa.h" 1 3 4
20110 /* crypto/rsa/rsa.h */
20111 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20112  * All rights reserved.
20113  *
20114  * This package is an SSL implementation written
20115  * by Eric Young (eay@cryptsoft.com).
20116  * The implementation was written so as to conform with Netscapes SSL.
20117  *
20118  * This library is free for commercial and non-commercial use as long as
20119  * the following conditions are aheared to.  The following conditions
20120  * apply to all code found in this distribution, be it the RC4, RSA,
20121  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20122  * included with this distribution is covered by the same copyright terms
20123  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20124  *
20125  * Copyright remains Eric Young's, and as such any Copyright notices in
20126  * the code are not to be removed.
20127  * If this package is used in a product, Eric Young should be given attribution
20128  * as the author of the parts of the library used.
20129  * This can be in the form of a textual message at program startup or
20130  * in documentation (online or textual) provided with the package.
20131  *
20132  * Redistribution and use in source and binary forms, with or without
20133  * modification, are permitted provided that the following conditions
20134  * are met:
20135  * 1. Redistributions of source code must retain the copyright
20136  *    notice, this list of conditions and the following disclaimer.
20137  * 2. Redistributions in binary form must reproduce the above copyright
20138  *    notice, this list of conditions and the following disclaimer in the
20139  *    documentation and/or other materials provided with the distribution.
20140  * 3. All advertising materials mentioning features or use of this software
20141  *    must display the following acknowledgement:
20142  *    "This product includes cryptographic software written by
20143  *     Eric Young (eay@cryptsoft.com)"
20144  *    The word 'cryptographic' can be left out if the rouines from the library
20145  *    being used are not cryptographic related :-).
20146  * 4. If you include any Windows specific code (or a derivative thereof) from
20147  *    the apps directory (application code) you must include an acknowledgement:
20148  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20149  *
20150  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20151  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20152  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20153  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20154  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20155  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20156  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20157  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20158  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20159  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20160  * SUCH DAMAGE.
20161  *
20162  * The licence and distribution terms for any publically available version or
20163  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20164  * copied and put under another distribution licence
20165  * [including the GNU Public Licence.]
20166  */
20167 
20168 
20169 
20170 
20171 # 1 "/usr/include/openssl/asn1.h" 1 3 4
20172 /* crypto/asn1/asn1.h */
20173 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20174  * All rights reserved.
20175  *
20176  * This package is an SSL implementation written
20177  * by Eric Young (eay@cryptsoft.com).
20178  * The implementation was written so as to conform with Netscapes SSL.
20179  *
20180  * This library is free for commercial and non-commercial use as long as
20181  * the following conditions are aheared to.  The following conditions
20182  * apply to all code found in this distribution, be it the RC4, RSA,
20183  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20184  * included with this distribution is covered by the same copyright terms
20185  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20186  *
20187  * Copyright remains Eric Young's, and as such any Copyright notices in
20188  * the code are not to be removed.
20189  * If this package is used in a product, Eric Young should be given attribution
20190  * as the author of the parts of the library used.
20191  * This can be in the form of a textual message at program startup or
20192  * in documentation (online or textual) provided with the package.
20193  *
20194  * Redistribution and use in source and binary forms, with or without
20195  * modification, are permitted provided that the following conditions
20196  * are met:
20197  * 1. Redistributions of source code must retain the copyright
20198  *    notice, this list of conditions and the following disclaimer.
20199  * 2. Redistributions in binary form must reproduce the above copyright
20200  *    notice, this list of conditions and the following disclaimer in the
20201  *    documentation and/or other materials provided with the distribution.
20202  * 3. All advertising materials mentioning features or use of this software
20203  *    must display the following acknowledgement:
20204  *    "This product includes cryptographic software written by
20205  *     Eric Young (eay@cryptsoft.com)"
20206  *    The word 'cryptographic' can be left out if the rouines from the library
20207  *    being used are not cryptographic related :-).
20208  * 4. If you include any Windows specific code (or a derivative thereof) from
20209  *    the apps directory (application code) you must include an acknowledgement:
20210  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20211  *
20212  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20213  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20214  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20215  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20216  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20217  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20218  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20219  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20220  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20221  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20222  * SUCH DAMAGE.
20223  *
20224  * The licence and distribution terms for any publically available version or
20225  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20226  * copied and put under another distribution licence
20227  * [including the GNU Public Licence.]
20228  */
20229 # 63 "/usr/include/openssl/rsa.h" 2 3 4
20230 
20231 
20232 # 1 "/usr/include/openssl/bio.h" 1 3 4
20233 /* crypto/bio/bio.h */
20234 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20235  * All rights reserved.
20236  *
20237  * This package is an SSL implementation written
20238  * by Eric Young (eay@cryptsoft.com).
20239  * The implementation was written so as to conform with Netscapes SSL.
20240  *
20241  * This library is free for commercial and non-commercial use as long as
20242  * the following conditions are aheared to.  The following conditions
20243  * apply to all code found in this distribution, be it the RC4, RSA,
20244  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20245  * included with this distribution is covered by the same copyright terms
20246  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20247  *
20248  * Copyright remains Eric Young's, and as such any Copyright notices in
20249  * the code are not to be removed.
20250  * If this package is used in a product, Eric Young should be given attribution
20251  * as the author of the parts of the library used.
20252  * This can be in the form of a textual message at program startup or
20253  * in documentation (online or textual) provided with the package.
20254  *
20255  * Redistribution and use in source and binary forms, with or without
20256  * modification, are permitted provided that the following conditions
20257  * are met:
20258  * 1. Redistributions of source code must retain the copyright
20259  *    notice, this list of conditions and the following disclaimer.
20260  * 2. Redistributions in binary form must reproduce the above copyright
20261  *    notice, this list of conditions and the following disclaimer in the
20262  *    documentation and/or other materials provided with the distribution.
20263  * 3. All advertising materials mentioning features or use of this software
20264  *    must display the following acknowledgement:
20265  *    "This product includes cryptographic software written by
20266  *     Eric Young (eay@cryptsoft.com)"
20267  *    The word 'cryptographic' can be left out if the rouines from the library
20268  *    being used are not cryptographic related :-).
20269  * 4. If you include any Windows specific code (or a derivative thereof) from
20270  *    the apps directory (application code) you must include an acknowledgement:
20271  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20272  *
20273  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20274  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20275  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20276  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20277  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20278  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20279  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20280  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20281  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20282  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20283  * SUCH DAMAGE.
20284  *
20285  * The licence and distribution terms for any publically available version or
20286  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20287  * copied and put under another distribution licence
20288  * [including the GNU Public Licence.]
20289  */
20290 # 66 "/usr/include/openssl/rsa.h" 2 3 4
20291 
20292 # 1 "/usr/include/openssl/crypto.h" 1 3 4
20293 /* crypto/crypto.h */
20294 /* ====================================================================
20295  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
20296  *
20297  * Redistribution and use in source and binary forms, with or without
20298  * modification, are permitted provided that the following conditions
20299  * are met:
20300  *
20301  * 1. Redistributions of source code must retain the above copyright
20302  *    notice, this list of conditions and the following disclaimer.
20303  *
20304  * 2. Redistributions in binary form must reproduce the above copyright
20305  *    notice, this list of conditions and the following disclaimer in
20306  *    the documentation and/or other materials provided with the
20307  *    distribution.
20308  *
20309  * 3. All advertising materials mentioning features or use of this
20310  *    software must display the following acknowledgment:
20311  *    "This product includes software developed by the OpenSSL Project
20312  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20313  *
20314  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20315  *    endorse or promote products derived from this software without
20316  *    prior written permission. For written permission, please contact
20317  *    openssl-core@openssl.org.
20318  *
20319  * 5. Products derived from this software may not be called "OpenSSL"
20320  *    nor may "OpenSSL" appear in their names without prior written
20321  *    permission of the OpenSSL Project.
20322  *
20323  * 6. Redistributions of any form whatsoever must retain the following
20324  *    acknowledgment:
20325  *    "This product includes software developed by the OpenSSL Project
20326  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20327  *
20328  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20329  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20330  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20331  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20332  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20333  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20334  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20335  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20336  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20337  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20338  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20339  * OF THE POSSIBILITY OF SUCH DAMAGE.
20340  * ====================================================================
20341  *
20342  * This product includes cryptographic software written by Eric Young
20343  * (eay@cryptsoft.com).  This product includes software written by Tim
20344  * Hudson (tjh@cryptsoft.com).
20345  *
20346  */
20347 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20348  * All rights reserved.
20349  *
20350  * This package is an SSL implementation written
20351  * by Eric Young (eay@cryptsoft.com).
20352  * The implementation was written so as to conform with Netscapes SSL.
20353  *
20354  * This library is free for commercial and non-commercial use as long as
20355  * the following conditions are aheared to.  The following conditions
20356  * apply to all code found in this distribution, be it the RC4, RSA,
20357  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20358  * included with this distribution is covered by the same copyright terms
20359  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20360  *
20361  * Copyright remains Eric Young's, and as such any Copyright notices in
20362  * the code are not to be removed.
20363  * If this package is used in a product, Eric Young should be given attribution
20364  * as the author of the parts of the library used.
20365  * This can be in the form of a textual message at program startup or
20366  * in documentation (online or textual) provided with the package.
20367  *
20368  * Redistribution and use in source and binary forms, with or without
20369  * modification, are permitted provided that the following conditions
20370  * are met:
20371  * 1. Redistributions of source code must retain the copyright
20372  *    notice, this list of conditions and the following disclaimer.
20373  * 2. Redistributions in binary form must reproduce the above copyright
20374  *    notice, this list of conditions and the following disclaimer in the
20375  *    documentation and/or other materials provided with the distribution.
20376  * 3. All advertising materials mentioning features or use of this software
20377  *    must display the following acknowledgement:
20378  *    "This product includes cryptographic software written by
20379  *     Eric Young (eay@cryptsoft.com)"
20380  *    The word 'cryptographic' can be left out if the rouines from the library
20381  *    being used are not cryptographic related :-).
20382  * 4. If you include any Windows specific code (or a derivative thereof) from
20383  *    the apps directory (application code) you must include an acknowledgement:
20384  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20385  *
20386  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20387  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20388  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20389  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20390  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20391  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20392  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20393  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20394  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20395  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20396  * SUCH DAMAGE.
20397  *
20398  * The licence and distribution terms for any publically available version or
20399  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20400  * copied and put under another distribution licence
20401  * [including the GNU Public Licence.]
20402  */
20403 /* ====================================================================
20404  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
20405  * ECDH support in OpenSSL originally developed by
20406  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
20407  */
20408 # 68 "/usr/include/openssl/rsa.h" 2 3 4
20409 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
20410 /* ====================================================================
20411  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
20412  *
20413  * Redistribution and use in source and binary forms, with or without
20414  * modification, are permitted provided that the following conditions
20415  * are met:
20416  *
20417  * 1. Redistributions of source code must retain the above copyright
20418  *    notice, this list of conditions and the following disclaimer.
20419  *
20420  * 2. Redistributions in binary form must reproduce the above copyright
20421  *    notice, this list of conditions and the following disclaimer in
20422  *    the documentation and/or other materials provided with the
20423  *    distribution.
20424  *
20425  * 3. All advertising materials mentioning features or use of this
20426  *    software must display the following acknowledgment:
20427  *    "This product includes software developed by the OpenSSL Project
20428  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20429  *
20430  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20431  *    endorse or promote products derived from this software without
20432  *    prior written permission. For written permission, please contact
20433  *    openssl-core@openssl.org.
20434  *
20435  * 5. Products derived from this software may not be called "OpenSSL"
20436  *    nor may "OpenSSL" appear in their names without prior written
20437  *    permission of the OpenSSL Project.
20438  *
20439  * 6. Redistributions of any form whatsoever must retain the following
20440  *    acknowledgment:
20441  *    "This product includes software developed by the OpenSSL Project
20442  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20443  *
20444  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20445  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20446  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20447  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20448  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20449  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20450  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20451  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20452  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20453  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20454  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20455  * OF THE POSSIBILITY OF SUCH DAMAGE.
20456  * ====================================================================
20457  *
20458  * This product includes cryptographic software written by Eric Young
20459  * (eay@cryptsoft.com).  This product includes software written by Tim
20460  * Hudson (tjh@cryptsoft.com).
20461  *
20462  */
20463 # 69 "/usr/include/openssl/rsa.h" 2 3 4
20464 
20465 # 1 "/usr/include/openssl/bn.h" 1 3 4
20466 /* crypto/bn/bn.h */
20467 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
20468  * All rights reserved.
20469  *
20470  * This package is an SSL implementation written
20471  * by Eric Young (eay@cryptsoft.com).
20472  * The implementation was written so as to conform with Netscapes SSL.
20473  *
20474  * This library is free for commercial and non-commercial use as long as
20475  * the following conditions are aheared to.  The following conditions
20476  * apply to all code found in this distribution, be it the RC4, RSA,
20477  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20478  * included with this distribution is covered by the same copyright terms
20479  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20480  *
20481  * Copyright remains Eric Young's, and as such any Copyright notices in
20482  * the code are not to be removed.
20483  * If this package is used in a product, Eric Young should be given attribution
20484  * as the author of the parts of the library used.
20485  * This can be in the form of a textual message at program startup or
20486  * in documentation (online or textual) provided with the package.
20487  *
20488  * Redistribution and use in source and binary forms, with or without
20489  * modification, are permitted provided that the following conditions
20490  * are met:
20491  * 1. Redistributions of source code must retain the copyright
20492  *    notice, this list of conditions and the following disclaimer.
20493  * 2. Redistributions in binary form must reproduce the above copyright
20494  *    notice, this list of conditions and the following disclaimer in the
20495  *    documentation and/or other materials provided with the distribution.
20496  * 3. All advertising materials mentioning features or use of this software
20497  *    must display the following acknowledgement:
20498  *    "This product includes cryptographic software written by
20499  *     Eric Young (eay@cryptsoft.com)"
20500  *    The word 'cryptographic' can be left out if the rouines from the library
20501  *    being used are not cryptographic related :-).
20502  * 4. If you include any Windows specific code (or a derivative thereof) from
20503  *    the apps directory (application code) you must include an acknowledgement:
20504  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20505  *
20506  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20507  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20508  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20509  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20510  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20511  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20512  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20513  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20514  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20515  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20516  * SUCH DAMAGE.
20517  *
20518  * The licence and distribution terms for any publically available version or
20519  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20520  * copied and put under another distribution licence
20521  * [including the GNU Public Licence.]
20522  */
20523 /* ====================================================================
20524  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
20525  *
20526  * Redistribution and use in source and binary forms, with or without
20527  * modification, are permitted provided that the following conditions
20528  * are met:
20529  *
20530  * 1. Redistributions of source code must retain the above copyright
20531  *    notice, this list of conditions and the following disclaimer.
20532  *
20533  * 2. Redistributions in binary form must reproduce the above copyright
20534  *    notice, this list of conditions and the following disclaimer in
20535  *    the documentation and/or other materials provided with the
20536  *    distribution.
20537  *
20538  * 3. All advertising materials mentioning features or use of this
20539  *    software must display the following acknowledgment:
20540  *    "This product includes software developed by the OpenSSL Project
20541  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20542  *
20543  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20544  *    endorse or promote products derived from this software without
20545  *    prior written permission. For written permission, please contact
20546  *    openssl-core@openssl.org.
20547  *
20548  * 5. Products derived from this software may not be called "OpenSSL"
20549  *    nor may "OpenSSL" appear in their names without prior written
20550  *    permission of the OpenSSL Project.
20551  *
20552  * 6. Redistributions of any form whatsoever must retain the following
20553  *    acknowledgment:
20554  *    "This product includes software developed by the OpenSSL Project
20555  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20556  *
20557  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20558  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20559  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20560  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20561  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20562  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20563  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20564  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20565  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20566  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20567  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20568  * OF THE POSSIBILITY OF SUCH DAMAGE.
20569  * ====================================================================
20570  *
20571  * This product includes cryptographic software written by Eric Young
20572  * (eay@cryptsoft.com).  This product includes software written by Tim
20573  * Hudson (tjh@cryptsoft.com).
20574  *
20575  */
20576 /* ====================================================================
20577  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
20578  *
20579  * Portions of the attached software ("Contribution") are developed by
20580  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
20581  *
20582  * The Contribution is licensed pursuant to the Eric Young open source
20583  * license provided above.
20584  *
20585  * The binary polynomial arithmetic software is originally written by
20586  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
20587  *
20588  */
20589 # 71 "/usr/include/openssl/rsa.h" 2 3 4
20590 # 81 "/usr/include/openssl/rsa.h" 3 4
20591 /* Declared already in ossl_typ.h */
20592 /* typedef struct rsa_st RSA; */
20593 /* typedef struct rsa_meth_st RSA_METHOD; */
20594 
20595 struct rsa_meth_st {
20596     const char *name;
20597     int (*rsa_pub_enc) (int flen, const unsigned char *from,
20598                         unsigned char *to, RSA *rsa, int padding);
20599     int (*rsa_pub_dec) (int flen, const unsigned char *from,
20600                         unsigned char *to, RSA *rsa, int padding);
20601     int (*rsa_priv_enc) (int flen, const unsigned char *from,
20602                          unsigned char *to, RSA *rsa, int padding);
20603     int (*rsa_priv_dec) (int flen, const unsigned char *from,
20604                          unsigned char *to, RSA *rsa, int padding);
20605     /* Can be null */
20606     int (*rsa_mod_exp) (BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
20607     /* Can be null */
20608     int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
20609                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
20610     /* called at new */
20611     int (*init) (RSA *rsa);
20612     /* called at free */
20613     int (*finish) (RSA *rsa);
20614     /* RSA_METHOD_FLAG_* things */
20615     int flags;
20616     /* may be needed! */
20617     char *app_data;
20618     /*
20619      * New sign and verify functions: some libraries don't allow arbitrary
20620      * data to be signed/verified: this allows them to be used. Note: for
20621      * this to work the RSA_public_decrypt() and RSA_private_encrypt() should
20622      * *NOT* be used RSA_sign(), RSA_verify() should be used instead. Note:
20623      * for backwards compatibility this functionality is only enabled if the
20624      * RSA_FLAG_SIGN_VER option is set in 'flags'.
20625      */
20626     int (*rsa_sign) (int type,
20627                      const unsigned char *m, unsigned int m_length,
20628                      unsigned char *sigret, unsigned int *siglen,
20629                      const RSA *rsa);
20630     int (*rsa_verify) (int dtype, const unsigned char *m,
20631                        unsigned int m_length, const unsigned char *sigbuf,
20632                        unsigned int siglen, const RSA *rsa);
20633     /*
20634      * If this callback is NULL, the builtin software RSA key-gen will be
20635      * used. This is for behavioural compatibility whilst the code gets
20636      * rewired, but one day it would be nice to assume there are no such
20637      * things as "builtin software" implementations.
20638      */
20639     int (*rsa_keygen) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
20640 };
20641 
20642 struct rsa_st {
20643     /*
20644      * The first parameter is used to pickup errors where this is passed
20645      * instead of aEVP_PKEY, it is set to 0
20646      */
20647     int pad;
20648     long version;
20649     const RSA_METHOD *meth;
20650     /* functional reference if 'meth' is ENGINE-provided */
20651     ENGINE *engine;
20652     BIGNUM *n;
20653     BIGNUM *e;
20654     BIGNUM *d;
20655     BIGNUM *p;
20656     BIGNUM *q;
20657     BIGNUM *dmp1;
20658     BIGNUM *dmq1;
20659     BIGNUM *iqmp;
20660     /* be careful using this if the RSA structure is shared */
20661     CRYPTO_EX_DATA ex_data;
20662     int references;
20663     int flags;
20664     /* Used to cache montgomery values */
20665     BN_MONT_CTX *_method_mod_n;
20666     BN_MONT_CTX *_method_mod_p;
20667     BN_MONT_CTX *_method_mod_q;
20668     /*
20669      * all BIGNUM values are actually in the following data, if it is not
20670      * NULL
20671      */
20672     char *bignum_data;
20673     BN_BLINDING *blinding;
20674     BN_BLINDING *mt_blinding;
20675 };
20676 # 176 "/usr/include/openssl/rsa.h" 3 4
20677 /* exponent limit enforced for "large" modulus only */
20678 # 190 "/usr/include/openssl/rsa.h" 3 4
20679 /*
20680  * This flag means the private key operations will be handled by rsa_mod_exp
20681  * and that they do not depend on the private key components being present:
20682  * for example a key stored in external hardware. Without this flag
20683  * bn_mod_exp gets called when private key components are absent.
20684  */
20685 
20686 
20687 /*
20688  * This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify
20689  * functions.
20690  */
20691 
20692 
20693 /*
20694  * new with 0.9.6j and 0.9.7b; the built-in
20695  * RSA implementation now uses blinding by
20696  * default (ignoring RSA_FLAG_BLINDING),
20697  * but other engines might not need it
20698  */
20699 
20700 /*
20701  * new with 0.9.8f; the built-in RSA
20702  * implementation now uses constant time
20703  * operations by default in private key operations,
20704  * e.g., constant time modular exponentiation,
20705  * modular inverse without leaking branches,
20706  * division without leaking branches. This
20707  * flag disables these constant time
20708  * operations and results in faster RSA
20709  * private key operations.
20710  */
20711 # 312 "/usr/include/openssl/rsa.h" 3 4
20712 /* EVP_PKEY_ only */
20713 
20714 
20715 
20716 
20717 
20718 
20719 
20720 RSA *RSA_new(void);
20721 RSA *RSA_new_method(ENGINE *engine);
20722 int RSA_size(const RSA *rsa);
20723 
20724 /* Deprecated version */
20725 
20726 RSA *RSA_generate_key(int bits, unsigned long e, void
20727                        (*callback) (int, int, void *), void *cb_arg);
20728 
20729 
20730 /* New version */
20731 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
20732 
20733 int RSA_check_key(const RSA *);
20734         /* next 4 return -1 on error */
20735 int RSA_public_encrypt(int flen, const unsigned char *from,
20736                        unsigned char *to, RSA *rsa, int padding);
20737 int RSA_private_encrypt(int flen, const unsigned char *from,
20738                         unsigned char *to, RSA *rsa, int padding);
20739 int RSA_public_decrypt(int flen, const unsigned char *from,
20740                        unsigned char *to, RSA *rsa, int padding);
20741 int RSA_private_decrypt(int flen, const unsigned char *from,
20742                         unsigned char *to, RSA *rsa, int padding);
20743 void RSA_free(RSA *r);
20744 /* "up" the RSA object's reference count */
20745 int RSA_up_ref(RSA *r);
20746 
20747 int RSA_flags(const RSA *r);
20748 
20749 void RSA_set_default_method(const RSA_METHOD *meth);
20750 const RSA_METHOD *RSA_get_default_method(void);
20751 const RSA_METHOD *RSA_get_method(const RSA *rsa);
20752 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
20753 
20754 /* This function needs the memory locking malloc callbacks to be installed */
20755 int RSA_memory_lock(RSA *r);
20756 
20757 /* these are the actual SSLeay RSA functions */
20758 const RSA_METHOD *RSA_PKCS1_SSLeay(void);
20759 
20760 const RSA_METHOD *RSA_null_method(void);
20761 
20762 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;
20763 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;
20764 
20765 typedef struct rsa_pss_params_st {
20766     X509_ALGOR *hashAlgorithm;
20767     X509_ALGOR *maskGenAlgorithm;
20768     ASN1_INTEGER *saltLength;
20769     ASN1_INTEGER *trailerField;
20770 } RSA_PSS_PARAMS;
20771 
20772 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;
20773 
20774 typedef struct rsa_oaep_params_st {
20775     X509_ALGOR *hashFunc;
20776     X509_ALGOR *maskGenFunc;
20777     X509_ALGOR *pSourceFunc;
20778 } RSA_OAEP_PARAMS;
20779 
20780 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;
20781 
20782 
20783 int RSA_print_fp(FILE *fp, const RSA *r, int offset);
20784 
20785 
20786 
20787 int RSA_print(BIO *bp, const RSA *r, int offset);
20788 
20789 
20790 
20791 int i2d_RSA_NET(const RSA *a, unsigned char **pp,
20792                 int (*cb) (char *buf, int len, const char *prompt,
20793                            int verify), int sgckey);
20794 RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
20795                  int (*cb) (char *buf, int len, const char *prompt,
20796                             int verify), int sgckey);
20797 
20798 int i2d_Netscape_RSA(const RSA *a, unsigned char **pp,
20799                      int (*cb) (char *buf, int len, const char *prompt,
20800                                 int verify));
20801 RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length,
20802                       int (*cb) (char *buf, int len, const char *prompt,
20803                                  int verify));
20804 
20805 
20806 /*
20807  * The following 2 functions sign and verify a X509_SIG ASN1 object inside
20808  * PKCS#1 padded RSA encryption
20809  */
20810 int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
20811              unsigned char *sigret, unsigned int *siglen, RSA *rsa);
20812 int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
20813                const unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
20814 
20815 /*
20816  * The following 2 function sign and verify a ASN1_OCTET_STRING object inside
20817  * PKCS#1 padded RSA encryption
20818  */
20819 int RSA_sign_ASN1_OCTET_STRING(int type,
20820                                const unsigned char *m, unsigned int m_length,
20821                                unsigned char *sigret, unsigned int *siglen,
20822                                RSA *rsa);
20823 int RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m,
20824                                  unsigned int m_length, unsigned char *sigbuf,
20825                                  unsigned int siglen, RSA *rsa);
20826 
20827 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
20828 void RSA_blinding_off(RSA *rsa);
20829 BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
20830 
20831 int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
20832                                  const unsigned char *f, int fl);
20833 int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
20834                                    const unsigned char *f, int fl,
20835                                    int rsa_len);
20836 int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
20837                                  const unsigned char *f, int fl);
20838 int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
20839                                    const unsigned char *f, int fl,
20840                                    int rsa_len);
20841 int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,
20842                long seedlen, const EVP_MD *dgst);
20843 int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
20844                                const unsigned char *f, int fl,
20845                                const unsigned char *p, int pl);
20846 int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
20847                                  const unsigned char *f, int fl, int rsa_len,
20848                                  const unsigned char *p, int pl);
20849 int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
20850                                     const unsigned char *from, int flen,
20851                                     const unsigned char *param, int plen,
20852                                     const EVP_MD *md, const EVP_MD *mgf1md);
20853 int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
20854                                       const unsigned char *from, int flen,
20855                                       int num, const unsigned char *param,
20856                                       int plen, const EVP_MD *md,
20857                                       const EVP_MD *mgf1md);
20858 int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
20859                            const unsigned char *f, int fl);
20860 int RSA_padding_check_SSLv23(unsigned char *to, int tlen,
20861                              const unsigned char *f, int fl, int rsa_len);
20862 int RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f,
20863                          int fl);
20864 int RSA_padding_check_none(unsigned char *to, int tlen,
20865                            const unsigned char *f, int fl, int rsa_len);
20866 int RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f,
20867                          int fl);
20868 int RSA_padding_check_X931(unsigned char *to, int tlen,
20869                            const unsigned char *f, int fl, int rsa_len);
20870 int RSA_X931_hash_id(int nid);
20871 
20872 int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
20873                          const EVP_MD *Hash, const unsigned char *EM,
20874                          int sLen);
20875 int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
20876                               const unsigned char *mHash, const EVP_MD *Hash,
20877                               int sLen);
20878 
20879 int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
20880                               const EVP_MD *Hash, const EVP_MD *mgf1Hash,
20881                               const unsigned char *EM, int sLen);
20882 
20883 int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
20884                                    const unsigned char *mHash,
20885                                    const EVP_MD *Hash, const EVP_MD *mgf1Hash,
20886                                    int sLen);
20887 
20888 int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
20889                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
20890 int RSA_set_ex_data(RSA *r, int idx, void *arg);
20891 void *RSA_get_ex_data(const RSA *r, int idx);
20892 
20893 RSA *RSAPublicKey_dup(RSA *rsa);
20894 RSA *RSAPrivateKey_dup(RSA *rsa);
20895 
20896 /*
20897  * If this flag is set the RSA method is FIPS compliant and can be used in
20898  * FIPS mode. This is set in the validated module method. If an application
20899  * sets this flag in its own methods it is its responsibility to ensure the
20900  * result is compliant.
20901  */
20902 
20903 
20904 
20905 /*
20906  * If this flag is set the operations normally disabled in FIPS mode are
20907  * permitted it is then the applications responsibility to ensure that the
20908  * usage is compliant.
20909  */
20910 
20911 
20912 /*
20913  * Application has decided PRNG is good enough to generate a key: don't
20914  * check.
20915  */
20916 
20917 
20918 /* BEGIN ERROR CODES */
20919 /*
20920  * The following lines are auto generated by the script mkerr.pl. Any changes
20921  * made after this point may be overwritten when the script is next run.
20922  */
20923 void ERR_load_RSA_strings(void);
20924 
20925 /* Error codes for the RSA functions. */
20926 
20927 /* Function codes. */
20928 # 592 "/usr/include/openssl/rsa.h" 3 4
20929 /* Reason codes. */
20930 # 97 "/usr/include/openssl/x509.h" 2 3 4
20931 
20932 
20933 # 1 "/usr/include/openssl/dsa.h" 1 3 4
20934 /* crypto/dsa/dsa.h */
20935 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20936  * All rights reserved.
20937  *
20938  * This package is an SSL implementation written
20939  * by Eric Young (eay@cryptsoft.com).
20940  * The implementation was written so as to conform with Netscapes SSL.
20941  *
20942  * This library is free for commercial and non-commercial use as long as
20943  * the following conditions are aheared to.  The following conditions
20944  * apply to all code found in this distribution, be it the RC4, RSA,
20945  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20946  * included with this distribution is covered by the same copyright terms
20947  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20948  *
20949  * Copyright remains Eric Young's, and as such any Copyright notices in
20950  * the code are not to be removed.
20951  * If this package is used in a product, Eric Young should be given attribution
20952  * as the author of the parts of the library used.
20953  * This can be in the form of a textual message at program startup or
20954  * in documentation (online or textual) provided with the package.
20955  *
20956  * Redistribution and use in source and binary forms, with or without
20957  * modification, are permitted provided that the following conditions
20958  * are met:
20959  * 1. Redistributions of source code must retain the copyright
20960  *    notice, this list of conditions and the following disclaimer.
20961  * 2. Redistributions in binary form must reproduce the above copyright
20962  *    notice, this list of conditions and the following disclaimer in the
20963  *    documentation and/or other materials provided with the distribution.
20964  * 3. All advertising materials mentioning features or use of this software
20965  *    must display the following acknowledgement:
20966  *    "This product includes cryptographic software written by
20967  *     Eric Young (eay@cryptsoft.com)"
20968  *    The word 'cryptographic' can be left out if the rouines from the library
20969  *    being used are not cryptographic related :-).
20970  * 4. If you include any Windows specific code (or a derivative thereof) from
20971  *    the apps directory (application code) you must include an acknowledgement:
20972  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20973  *
20974  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20975  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20976  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20977  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20978  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20979  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20980  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20981  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20982  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20983  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20984  * SUCH DAMAGE.
20985  *
20986  * The licence and distribution terms for any publically available version or
20987  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20988  * copied and put under another distribution licence
20989  * [including the GNU Public Licence.]
20990  */
20991 
20992 /*
20993  * The DSS routines are based on patches supplied by
20994  * Steven Schoch <schoch@sheba.arc.nasa.gov>.  He basically did the
20995  * work and I have just tweaked them a little to fit into my
20996  * stylistic vision for SSLeay :-) */
20997 
20998 
20999 
21000 
21001 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
21002 /* e_os2.h */
21003 /* ====================================================================
21004  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
21005  *
21006  * Redistribution and use in source and binary forms, with or without
21007  * modification, are permitted provided that the following conditions
21008  * are met:
21009  *
21010  * 1. Redistributions of source code must retain the above copyright
21011  *    notice, this list of conditions and the following disclaimer.
21012  *
21013  * 2. Redistributions in binary form must reproduce the above copyright
21014  *    notice, this list of conditions and the following disclaimer in
21015  *    the documentation and/or other materials provided with the
21016  *    distribution.
21017  *
21018  * 3. All advertising materials mentioning features or use of this
21019  *    software must display the following acknowledgment:
21020  *    "This product includes software developed by the OpenSSL Project
21021  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21022  *
21023  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21024  *    endorse or promote products derived from this software without
21025  *    prior written permission. For written permission, please contact
21026  *    openssl-core@openssl.org.
21027  *
21028  * 5. Products derived from this software may not be called "OpenSSL"
21029  *    nor may "OpenSSL" appear in their names without prior written
21030  *    permission of the OpenSSL Project.
21031  *
21032  * 6. Redistributions of any form whatsoever must retain the following
21033  *    acknowledgment:
21034  *    "This product includes software developed by the OpenSSL Project
21035  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21036  *
21037  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21038  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21039  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21040  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21041  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21042  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21043  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21044  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21045  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21046  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21047  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21048  * OF THE POSSIBILITY OF SUCH DAMAGE.
21049  * ====================================================================
21050  *
21051  * This product includes cryptographic software written by Eric Young
21052  * (eay@cryptsoft.com).  This product includes software written by Tim
21053  * Hudson (tjh@cryptsoft.com).
21054  *
21055  */
21056 
21057 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
21058 /* opensslconf.h */
21059 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
21060 
21061 
21062 
21063 
21064 /* OpenSSL was configured with the following options: */
21065 # 108 "/usr/include/openssl/opensslconf.h" 3 4
21066 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
21067    asks for it.  This is a transient feature that is provided for those
21068    who haven't had the time to do the appropriate changes in their
21069    applications.  */
21070 # 204 "/usr/include/openssl/opensslconf.h" 3 4
21071 /* crypto/opensslconf.h.in */
21072 
21073 /* Generate 80386 code? */
21074 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
21075 # 69 "/usr/include/openssl/dsa.h" 2 3 4
21076 
21077 
21078 
21079 
21080 
21081 
21082 # 1 "/usr/include/openssl/bio.h" 1 3 4
21083 /* crypto/bio/bio.h */
21084 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21085  * All rights reserved.
21086  *
21087  * This package is an SSL implementation written
21088  * by Eric Young (eay@cryptsoft.com).
21089  * The implementation was written so as to conform with Netscapes SSL.
21090  *
21091  * This library is free for commercial and non-commercial use as long as
21092  * the following conditions are aheared to.  The following conditions
21093  * apply to all code found in this distribution, be it the RC4, RSA,
21094  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21095  * included with this distribution is covered by the same copyright terms
21096  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21097  *
21098  * Copyright remains Eric Young's, and as such any Copyright notices in
21099  * the code are not to be removed.
21100  * If this package is used in a product, Eric Young should be given attribution
21101  * as the author of the parts of the library used.
21102  * This can be in the form of a textual message at program startup or
21103  * in documentation (online or textual) provided with the package.
21104  *
21105  * Redistribution and use in source and binary forms, with or without
21106  * modification, are permitted provided that the following conditions
21107  * are met:
21108  * 1. Redistributions of source code must retain the copyright
21109  *    notice, this list of conditions and the following disclaimer.
21110  * 2. Redistributions in binary form must reproduce the above copyright
21111  *    notice, this list of conditions and the following disclaimer in the
21112  *    documentation and/or other materials provided with the distribution.
21113  * 3. All advertising materials mentioning features or use of this software
21114  *    must display the following acknowledgement:
21115  *    "This product includes cryptographic software written by
21116  *     Eric Young (eay@cryptsoft.com)"
21117  *    The word 'cryptographic' can be left out if the rouines from the library
21118  *    being used are not cryptographic related :-).
21119  * 4. If you include any Windows specific code (or a derivative thereof) from
21120  *    the apps directory (application code) you must include an acknowledgement:
21121  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21122  *
21123  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21124  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21125  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21126  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21127  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21128  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21129  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21130  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21131  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21132  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21133  * SUCH DAMAGE.
21134  *
21135  * The licence and distribution terms for any publically available version or
21136  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21137  * copied and put under another distribution licence
21138  * [including the GNU Public Licence.]
21139  */
21140 # 76 "/usr/include/openssl/dsa.h" 2 3 4
21141 
21142 # 1 "/usr/include/openssl/crypto.h" 1 3 4
21143 /* crypto/crypto.h */
21144 /* ====================================================================
21145  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
21146  *
21147  * Redistribution and use in source and binary forms, with or without
21148  * modification, are permitted provided that the following conditions
21149  * are met:
21150  *
21151  * 1. Redistributions of source code must retain the above copyright
21152  *    notice, this list of conditions and the following disclaimer.
21153  *
21154  * 2. Redistributions in binary form must reproduce the above copyright
21155  *    notice, this list of conditions and the following disclaimer in
21156  *    the documentation and/or other materials provided with the
21157  *    distribution.
21158  *
21159  * 3. All advertising materials mentioning features or use of this
21160  *    software must display the following acknowledgment:
21161  *    "This product includes software developed by the OpenSSL Project
21162  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21163  *
21164  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21165  *    endorse or promote products derived from this software without
21166  *    prior written permission. For written permission, please contact
21167  *    openssl-core@openssl.org.
21168  *
21169  * 5. Products derived from this software may not be called "OpenSSL"
21170  *    nor may "OpenSSL" appear in their names without prior written
21171  *    permission of the OpenSSL Project.
21172  *
21173  * 6. Redistributions of any form whatsoever must retain the following
21174  *    acknowledgment:
21175  *    "This product includes software developed by the OpenSSL Project
21176  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21177  *
21178  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21179  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21180  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21181  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21182  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21183  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21184  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21185  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21186  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21187  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21188  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21189  * OF THE POSSIBILITY OF SUCH DAMAGE.
21190  * ====================================================================
21191  *
21192  * This product includes cryptographic software written by Eric Young
21193  * (eay@cryptsoft.com).  This product includes software written by Tim
21194  * Hudson (tjh@cryptsoft.com).
21195  *
21196  */
21197 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21198  * All rights reserved.
21199  *
21200  * This package is an SSL implementation written
21201  * by Eric Young (eay@cryptsoft.com).
21202  * The implementation was written so as to conform with Netscapes SSL.
21203  *
21204  * This library is free for commercial and non-commercial use as long as
21205  * the following conditions are aheared to.  The following conditions
21206  * apply to all code found in this distribution, be it the RC4, RSA,
21207  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21208  * included with this distribution is covered by the same copyright terms
21209  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21210  *
21211  * Copyright remains Eric Young's, and as such any Copyright notices in
21212  * the code are not to be removed.
21213  * If this package is used in a product, Eric Young should be given attribution
21214  * as the author of the parts of the library used.
21215  * This can be in the form of a textual message at program startup or
21216  * in documentation (online or textual) provided with the package.
21217  *
21218  * Redistribution and use in source and binary forms, with or without
21219  * modification, are permitted provided that the following conditions
21220  * are met:
21221  * 1. Redistributions of source code must retain the copyright
21222  *    notice, this list of conditions and the following disclaimer.
21223  * 2. Redistributions in binary form must reproduce the above copyright
21224  *    notice, this list of conditions and the following disclaimer in the
21225  *    documentation and/or other materials provided with the distribution.
21226  * 3. All advertising materials mentioning features or use of this software
21227  *    must display the following acknowledgement:
21228  *    "This product includes cryptographic software written by
21229  *     Eric Young (eay@cryptsoft.com)"
21230  *    The word 'cryptographic' can be left out if the rouines from the library
21231  *    being used are not cryptographic related :-).
21232  * 4. If you include any Windows specific code (or a derivative thereof) from
21233  *    the apps directory (application code) you must include an acknowledgement:
21234  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21235  *
21236  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21237  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21238  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21239  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21240  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21241  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21242  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21243  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21244  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21245  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21246  * SUCH DAMAGE.
21247  *
21248  * The licence and distribution terms for any publically available version or
21249  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21250  * copied and put under another distribution licence
21251  * [including the GNU Public Licence.]
21252  */
21253 /* ====================================================================
21254  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
21255  * ECDH support in OpenSSL originally developed by
21256  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
21257  */
21258 # 78 "/usr/include/openssl/dsa.h" 2 3 4
21259 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
21260 /* ====================================================================
21261  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
21262  *
21263  * Redistribution and use in source and binary forms, with or without
21264  * modification, are permitted provided that the following conditions
21265  * are met:
21266  *
21267  * 1. Redistributions of source code must retain the above copyright
21268  *    notice, this list of conditions and the following disclaimer.
21269  *
21270  * 2. Redistributions in binary form must reproduce the above copyright
21271  *    notice, this list of conditions and the following disclaimer in
21272  *    the documentation and/or other materials provided with the
21273  *    distribution.
21274  *
21275  * 3. All advertising materials mentioning features or use of this
21276  *    software must display the following acknowledgment:
21277  *    "This product includes software developed by the OpenSSL Project
21278  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21279  *
21280  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21281  *    endorse or promote products derived from this software without
21282  *    prior written permission. For written permission, please contact
21283  *    openssl-core@openssl.org.
21284  *
21285  * 5. Products derived from this software may not be called "OpenSSL"
21286  *    nor may "OpenSSL" appear in their names without prior written
21287  *    permission of the OpenSSL Project.
21288  *
21289  * 6. Redistributions of any form whatsoever must retain the following
21290  *    acknowledgment:
21291  *    "This product includes software developed by the OpenSSL Project
21292  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21293  *
21294  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21295  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21296  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21297  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21298  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21299  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21300  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21301  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21302  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21303  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21304  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21305  * OF THE POSSIBILITY OF SUCH DAMAGE.
21306  * ====================================================================
21307  *
21308  * This product includes cryptographic software written by Eric Young
21309  * (eay@cryptsoft.com).  This product includes software written by Tim
21310  * Hudson (tjh@cryptsoft.com).
21311  *
21312  */
21313 # 79 "/usr/include/openssl/dsa.h" 2 3 4
21314 
21315 
21316 # 1 "/usr/include/openssl/bn.h" 1 3 4
21317 /* crypto/bn/bn.h */
21318 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
21319  * All rights reserved.
21320  *
21321  * This package is an SSL implementation written
21322  * by Eric Young (eay@cryptsoft.com).
21323  * The implementation was written so as to conform with Netscapes SSL.
21324  *
21325  * This library is free for commercial and non-commercial use as long as
21326  * the following conditions are aheared to.  The following conditions
21327  * apply to all code found in this distribution, be it the RC4, RSA,
21328  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21329  * included with this distribution is covered by the same copyright terms
21330  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21331  *
21332  * Copyright remains Eric Young's, and as such any Copyright notices in
21333  * the code are not to be removed.
21334  * If this package is used in a product, Eric Young should be given attribution
21335  * as the author of the parts of the library used.
21336  * This can be in the form of a textual message at program startup or
21337  * in documentation (online or textual) provided with the package.
21338  *
21339  * Redistribution and use in source and binary forms, with or without
21340  * modification, are permitted provided that the following conditions
21341  * are met:
21342  * 1. Redistributions of source code must retain the copyright
21343  *    notice, this list of conditions and the following disclaimer.
21344  * 2. Redistributions in binary form must reproduce the above copyright
21345  *    notice, this list of conditions and the following disclaimer in the
21346  *    documentation and/or other materials provided with the distribution.
21347  * 3. All advertising materials mentioning features or use of this software
21348  *    must display the following acknowledgement:
21349  *    "This product includes cryptographic software written by
21350  *     Eric Young (eay@cryptsoft.com)"
21351  *    The word 'cryptographic' can be left out if the rouines from the library
21352  *    being used are not cryptographic related :-).
21353  * 4. If you include any Windows specific code (or a derivative thereof) from
21354  *    the apps directory (application code) you must include an acknowledgement:
21355  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21356  *
21357  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21358  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21359  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21360  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21361  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21362  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21363  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21364  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21365  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21366  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21367  * SUCH DAMAGE.
21368  *
21369  * The licence and distribution terms for any publically available version or
21370  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21371  * copied and put under another distribution licence
21372  * [including the GNU Public Licence.]
21373  */
21374 /* ====================================================================
21375  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
21376  *
21377  * Redistribution and use in source and binary forms, with or without
21378  * modification, are permitted provided that the following conditions
21379  * are met:
21380  *
21381  * 1. Redistributions of source code must retain the above copyright
21382  *    notice, this list of conditions and the following disclaimer.
21383  *
21384  * 2. Redistributions in binary form must reproduce the above copyright
21385  *    notice, this list of conditions and the following disclaimer in
21386  *    the documentation and/or other materials provided with the
21387  *    distribution.
21388  *
21389  * 3. All advertising materials mentioning features or use of this
21390  *    software must display the following acknowledgment:
21391  *    "This product includes software developed by the OpenSSL Project
21392  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21393  *
21394  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21395  *    endorse or promote products derived from this software without
21396  *    prior written permission. For written permission, please contact
21397  *    openssl-core@openssl.org.
21398  *
21399  * 5. Products derived from this software may not be called "OpenSSL"
21400  *    nor may "OpenSSL" appear in their names without prior written
21401  *    permission of the OpenSSL Project.
21402  *
21403  * 6. Redistributions of any form whatsoever must retain the following
21404  *    acknowledgment:
21405  *    "This product includes software developed by the OpenSSL Project
21406  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21407  *
21408  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21409  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21410  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21411  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21412  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21413  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21414  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21415  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21416  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21417  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21418  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21419  * OF THE POSSIBILITY OF SUCH DAMAGE.
21420  * ====================================================================
21421  *
21422  * This product includes cryptographic software written by Eric Young
21423  * (eay@cryptsoft.com).  This product includes software written by Tim
21424  * Hudson (tjh@cryptsoft.com).
21425  *
21426  */
21427 /* ====================================================================
21428  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
21429  *
21430  * Portions of the attached software ("Contribution") are developed by
21431  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
21432  *
21433  * The Contribution is licensed pursuant to the Eric Young open source
21434  * license provided above.
21435  *
21436  * The binary polynomial arithmetic software is originally written by
21437  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
21438  *
21439  */
21440 # 82 "/usr/include/openssl/dsa.h" 2 3 4
21441 
21442 # 1 "/usr/include/openssl/dh.h" 1 3 4
21443 /* crypto/dh/dh.h */
21444 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21445  * All rights reserved.
21446  *
21447  * This package is an SSL implementation written
21448  * by Eric Young (eay@cryptsoft.com).
21449  * The implementation was written so as to conform with Netscapes SSL.
21450  *
21451  * This library is free for commercial and non-commercial use as long as
21452  * the following conditions are aheared to.  The following conditions
21453  * apply to all code found in this distribution, be it the RC4, RSA,
21454  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21455  * included with this distribution is covered by the same copyright terms
21456  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21457  *
21458  * Copyright remains Eric Young's, and as such any Copyright notices in
21459  * the code are not to be removed.
21460  * If this package is used in a product, Eric Young should be given attribution
21461  * as the author of the parts of the library used.
21462  * This can be in the form of a textual message at program startup or
21463  * in documentation (online or textual) provided with the package.
21464  *
21465  * Redistribution and use in source and binary forms, with or without
21466  * modification, are permitted provided that the following conditions
21467  * are met:
21468  * 1. Redistributions of source code must retain the copyright
21469  *    notice, this list of conditions and the following disclaimer.
21470  * 2. Redistributions in binary form must reproduce the above copyright
21471  *    notice, this list of conditions and the following disclaimer in the
21472  *    documentation and/or other materials provided with the distribution.
21473  * 3. All advertising materials mentioning features or use of this software
21474  *    must display the following acknowledgement:
21475  *    "This product includes cryptographic software written by
21476  *     Eric Young (eay@cryptsoft.com)"
21477  *    The word 'cryptographic' can be left out if the rouines from the library
21478  *    being used are not cryptographic related :-).
21479  * 4. If you include any Windows specific code (or a derivative thereof) from
21480  *    the apps directory (application code) you must include an acknowledgement:
21481  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21482  *
21483  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21484  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21485  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21486  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21487  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21488  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21489  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21490  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21491  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21492  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21493  * SUCH DAMAGE.
21494  *
21495  * The licence and distribution terms for any publically available version or
21496  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21497  * copied and put under another distribution licence
21498  * [including the GNU Public Licence.]
21499  */
21500 
21501 
21502 
21503 
21504 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
21505 /* e_os2.h */
21506 /* ====================================================================
21507  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
21508  *
21509  * Redistribution and use in source and binary forms, with or without
21510  * modification, are permitted provided that the following conditions
21511  * are met:
21512  *
21513  * 1. Redistributions of source code must retain the above copyright
21514  *    notice, this list of conditions and the following disclaimer.
21515  *
21516  * 2. Redistributions in binary form must reproduce the above copyright
21517  *    notice, this list of conditions and the following disclaimer in
21518  *    the documentation and/or other materials provided with the
21519  *    distribution.
21520  *
21521  * 3. All advertising materials mentioning features or use of this
21522  *    software must display the following acknowledgment:
21523  *    "This product includes software developed by the OpenSSL Project
21524  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21525  *
21526  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21527  *    endorse or promote products derived from this software without
21528  *    prior written permission. For written permission, please contact
21529  *    openssl-core@openssl.org.
21530  *
21531  * 5. Products derived from this software may not be called "OpenSSL"
21532  *    nor may "OpenSSL" appear in their names without prior written
21533  *    permission of the OpenSSL Project.
21534  *
21535  * 6. Redistributions of any form whatsoever must retain the following
21536  *    acknowledgment:
21537  *    "This product includes software developed by the OpenSSL Project
21538  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21539  *
21540  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21541  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21542  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21543  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21544  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21545  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21546  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21547  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21548  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21549  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21550  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21551  * OF THE POSSIBILITY OF SUCH DAMAGE.
21552  * ====================================================================
21553  *
21554  * This product includes cryptographic software written by Eric Young
21555  * (eay@cryptsoft.com).  This product includes software written by Tim
21556  * Hudson (tjh@cryptsoft.com).
21557  *
21558  */
21559 
21560 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
21561 /* opensslconf.h */
21562 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
21563 
21564 
21565 
21566 
21567 /* OpenSSL was configured with the following options: */
21568 # 108 "/usr/include/openssl/opensslconf.h" 3 4
21569 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
21570    asks for it.  This is a transient feature that is provided for those
21571    who haven't had the time to do the appropriate changes in their
21572    applications.  */
21573 # 204 "/usr/include/openssl/opensslconf.h" 3 4
21574 /* crypto/opensslconf.h.in */
21575 
21576 /* Generate 80386 code? */
21577 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
21578 # 63 "/usr/include/openssl/dh.h" 2 3 4
21579 
21580 
21581 
21582 
21583 
21584 
21585 # 1 "/usr/include/openssl/bio.h" 1 3 4
21586 /* crypto/bio/bio.h */
21587 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21588  * All rights reserved.
21589  *
21590  * This package is an SSL implementation written
21591  * by Eric Young (eay@cryptsoft.com).
21592  * The implementation was written so as to conform with Netscapes SSL.
21593  *
21594  * This library is free for commercial and non-commercial use as long as
21595  * the following conditions are aheared to.  The following conditions
21596  * apply to all code found in this distribution, be it the RC4, RSA,
21597  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21598  * included with this distribution is covered by the same copyright terms
21599  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21600  *
21601  * Copyright remains Eric Young's, and as such any Copyright notices in
21602  * the code are not to be removed.
21603  * If this package is used in a product, Eric Young should be given attribution
21604  * as the author of the parts of the library used.
21605  * This can be in the form of a textual message at program startup or
21606  * in documentation (online or textual) provided with the package.
21607  *
21608  * Redistribution and use in source and binary forms, with or without
21609  * modification, are permitted provided that the following conditions
21610  * are met:
21611  * 1. Redistributions of source code must retain the copyright
21612  *    notice, this list of conditions and the following disclaimer.
21613  * 2. Redistributions in binary form must reproduce the above copyright
21614  *    notice, this list of conditions and the following disclaimer in the
21615  *    documentation and/or other materials provided with the distribution.
21616  * 3. All advertising materials mentioning features or use of this software
21617  *    must display the following acknowledgement:
21618  *    "This product includes cryptographic software written by
21619  *     Eric Young (eay@cryptsoft.com)"
21620  *    The word 'cryptographic' can be left out if the rouines from the library
21621  *    being used are not cryptographic related :-).
21622  * 4. If you include any Windows specific code (or a derivative thereof) from
21623  *    the apps directory (application code) you must include an acknowledgement:
21624  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21625  *
21626  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21627  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21628  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21629  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21630  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21631  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21632  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21633  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21634  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21635  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21636  * SUCH DAMAGE.
21637  *
21638  * The licence and distribution terms for any publically available version or
21639  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21640  * copied and put under another distribution licence
21641  * [including the GNU Public Licence.]
21642  */
21643 # 70 "/usr/include/openssl/dh.h" 2 3 4
21644 
21645 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
21646 /* ====================================================================
21647  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
21648  *
21649  * Redistribution and use in source and binary forms, with or without
21650  * modification, are permitted provided that the following conditions
21651  * are met:
21652  *
21653  * 1. Redistributions of source code must retain the above copyright
21654  *    notice, this list of conditions and the following disclaimer.
21655  *
21656  * 2. Redistributions in binary form must reproduce the above copyright
21657  *    notice, this list of conditions and the following disclaimer in
21658  *    the documentation and/or other materials provided with the
21659  *    distribution.
21660  *
21661  * 3. All advertising materials mentioning features or use of this
21662  *    software must display the following acknowledgment:
21663  *    "This product includes software developed by the OpenSSL Project
21664  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21665  *
21666  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21667  *    endorse or promote products derived from this software without
21668  *    prior written permission. For written permission, please contact
21669  *    openssl-core@openssl.org.
21670  *
21671  * 5. Products derived from this software may not be called "OpenSSL"
21672  *    nor may "OpenSSL" appear in their names without prior written
21673  *    permission of the OpenSSL Project.
21674  *
21675  * 6. Redistributions of any form whatsoever must retain the following
21676  *    acknowledgment:
21677  *    "This product includes software developed by the OpenSSL Project
21678  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21679  *
21680  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21681  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21682  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21683  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21684  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21685  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21686  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21687  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21688  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21689  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21690  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21691  * OF THE POSSIBILITY OF SUCH DAMAGE.
21692  * ====================================================================
21693  *
21694  * This product includes cryptographic software written by Eric Young
21695  * (eay@cryptsoft.com).  This product includes software written by Tim
21696  * Hudson (tjh@cryptsoft.com).
21697  *
21698  */
21699 # 72 "/usr/include/openssl/dh.h" 2 3 4
21700 
21701 # 1 "/usr/include/openssl/bn.h" 1 3 4
21702 /* crypto/bn/bn.h */
21703 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
21704  * All rights reserved.
21705  *
21706  * This package is an SSL implementation written
21707  * by Eric Young (eay@cryptsoft.com).
21708  * The implementation was written so as to conform with Netscapes SSL.
21709  *
21710  * This library is free for commercial and non-commercial use as long as
21711  * the following conditions are aheared to.  The following conditions
21712  * apply to all code found in this distribution, be it the RC4, RSA,
21713  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21714  * included with this distribution is covered by the same copyright terms
21715  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21716  *
21717  * Copyright remains Eric Young's, and as such any Copyright notices in
21718  * the code are not to be removed.
21719  * If this package is used in a product, Eric Young should be given attribution
21720  * as the author of the parts of the library used.
21721  * This can be in the form of a textual message at program startup or
21722  * in documentation (online or textual) provided with the package.
21723  *
21724  * Redistribution and use in source and binary forms, with or without
21725  * modification, are permitted provided that the following conditions
21726  * are met:
21727  * 1. Redistributions of source code must retain the copyright
21728  *    notice, this list of conditions and the following disclaimer.
21729  * 2. Redistributions in binary form must reproduce the above copyright
21730  *    notice, this list of conditions and the following disclaimer in the
21731  *    documentation and/or other materials provided with the distribution.
21732  * 3. All advertising materials mentioning features or use of this software
21733  *    must display the following acknowledgement:
21734  *    "This product includes cryptographic software written by
21735  *     Eric Young (eay@cryptsoft.com)"
21736  *    The word 'cryptographic' can be left out if the rouines from the library
21737  *    being used are not cryptographic related :-).
21738  * 4. If you include any Windows specific code (or a derivative thereof) from
21739  *    the apps directory (application code) you must include an acknowledgement:
21740  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21741  *
21742  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21743  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21744  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21745  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21746  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21747  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21748  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21749  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21750  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21751  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21752  * SUCH DAMAGE.
21753  *
21754  * The licence and distribution terms for any publically available version or
21755  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21756  * copied and put under another distribution licence
21757  * [including the GNU Public Licence.]
21758  */
21759 /* ====================================================================
21760  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
21761  *
21762  * Redistribution and use in source and binary forms, with or without
21763  * modification, are permitted provided that the following conditions
21764  * are met:
21765  *
21766  * 1. Redistributions of source code must retain the above copyright
21767  *    notice, this list of conditions and the following disclaimer.
21768  *
21769  * 2. Redistributions in binary form must reproduce the above copyright
21770  *    notice, this list of conditions and the following disclaimer in
21771  *    the documentation and/or other materials provided with the
21772  *    distribution.
21773  *
21774  * 3. All advertising materials mentioning features or use of this
21775  *    software must display the following acknowledgment:
21776  *    "This product includes software developed by the OpenSSL Project
21777  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21778  *
21779  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21780  *    endorse or promote products derived from this software without
21781  *    prior written permission. For written permission, please contact
21782  *    openssl-core@openssl.org.
21783  *
21784  * 5. Products derived from this software may not be called "OpenSSL"
21785  *    nor may "OpenSSL" appear in their names without prior written
21786  *    permission of the OpenSSL Project.
21787  *
21788  * 6. Redistributions of any form whatsoever must retain the following
21789  *    acknowledgment:
21790  *    "This product includes software developed by the OpenSSL Project
21791  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21792  *
21793  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21794  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21795  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21796  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21797  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21798  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21799  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21800  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21801  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21802  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21803  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21804  * OF THE POSSIBILITY OF SUCH DAMAGE.
21805  * ====================================================================
21806  *
21807  * This product includes cryptographic software written by Eric Young
21808  * (eay@cryptsoft.com).  This product includes software written by Tim
21809  * Hudson (tjh@cryptsoft.com).
21810  *
21811  */
21812 /* ====================================================================
21813  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
21814  *
21815  * Portions of the attached software ("Contribution") are developed by
21816  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
21817  *
21818  * The Contribution is licensed pursuant to the Eric Young open source
21819  * license provided above.
21820  *
21821  * The binary polynomial arithmetic software is originally written by
21822  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
21823  *
21824  */
21825 # 74 "/usr/include/openssl/dh.h" 2 3 4
21826 # 82 "/usr/include/openssl/dh.h" 3 4
21827 /*
21828  * new with 0.9.7h; the built-in DH
21829  * implementation now uses constant time
21830  * modular exponentiation for secret exponents
21831  * by default. This flag causes the
21832  * faster variable sliding window method to
21833  * be used for all exponents.
21834  */
21835 
21836 
21837 /*
21838  * If this flag is set the DH method is FIPS compliant and can be used in
21839  * FIPS mode. This is set in the validated module method. If an application
21840  * sets this flag in its own methods it is its reposibility to ensure the
21841  * result is compliant.
21842  */
21843 
21844 
21845 
21846 /*
21847  * If this flag is set the operations normally disabled in FIPS mode are
21848  * permitted it is then the applications responsibility to ensure that the
21849  * usage is compliant.
21850  */
21851 
21852 
21853 
21854 
21855 
21856 
21857 
21858 /* Already defined in ossl_typ.h */
21859 /* typedef struct dh_st DH; */
21860 /* typedef struct dh_method DH_METHOD; */
21861 
21862 struct dh_method {
21863     const char *name;
21864     /* Methods here */
21865     int (*generate_key) (DH *dh);
21866     int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
21867     /* Can be null */
21868     int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
21869                        const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
21870                        BN_MONT_CTX *m_ctx);
21871     int (*init) (DH *dh);
21872     int (*finish) (DH *dh);
21873     int flags;
21874     char *app_data;
21875     /* If this is non-NULL, it will be used to generate parameters */
21876     int (*generate_params) (DH *dh, int prime_len, int generator,
21877                             BN_GENCB *cb);
21878 };
21879 
21880 struct dh_st {
21881     /*
21882      * This first argument is used to pick up errors when a DH is passed
21883      * instead of a EVP_PKEY
21884      */
21885     int pad;
21886     int version;
21887     BIGNUM *p;
21888     BIGNUM *g;
21889     long length; /* optional */
21890     BIGNUM *pub_key; /* g^x % p */
21891     BIGNUM *priv_key; /* x */
21892     int flags;
21893     BN_MONT_CTX *method_mont_p;
21894     /* Place holders if we want to do X9.42 DH */
21895     BIGNUM *q;
21896     BIGNUM *j;
21897     unsigned char *seed;
21898     int seedlen;
21899     BIGNUM *counter;
21900     int references;
21901     CRYPTO_EX_DATA ex_data;
21902     const DH_METHOD *meth;
21903     ENGINE *engine;
21904 };
21905 
21906 
21907 /* #define DH_GENERATOR_3       3 */
21908 
21909 
21910 /* DH_check error codes */
21911 # 174 "/usr/include/openssl/dh.h" 3 4
21912 /* DH_check_pub_key error codes */
21913 
21914 
21915 
21916 
21917 /*
21918  * primes p where (p-1)/2 is prime too are called "safe"; we define this for
21919  * backward compatibility:
21920  */
21921 # 209 "/usr/include/openssl/dh.h" 3 4
21922 DH *DHparams_dup(DH *);
21923 
21924 const DH_METHOD *DH_OpenSSL(void);
21925 
21926 void DH_set_default_method(const DH_METHOD *meth);
21927 const DH_METHOD *DH_get_default_method(void);
21928 int DH_set_method(DH *dh, const DH_METHOD *meth);
21929 DH *DH_new_method(ENGINE *engine);
21930 
21931 DH *DH_new(void);
21932 void DH_free(DH *dh);
21933 int DH_up_ref(DH *dh);
21934 int DH_size(const DH *dh);
21935 int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
21936                         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
21937 int DH_set_ex_data(DH *d, int idx, void *arg);
21938 void *DH_get_ex_data(DH *d, int idx);
21939 
21940 /* Deprecated version */
21941 
21942 DH *DH_generate_parameters(int prime_len, int generator,
21943                            void (*callback) (int, int, void *), void *cb_arg);
21944 
21945 
21946 /* New version */
21947 int DH_generate_parameters_ex(DH *dh, int prime_len, int generator,
21948                               BN_GENCB *cb);
21949 
21950 int DH_check(const DH *dh, int *codes);
21951 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes);
21952 int DH_generate_key(DH *dh);
21953 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
21954 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh);
21955 DH *d2i_DHparams(DH **a, const unsigned char **pp, long length);
21956 int i2d_DHparams(const DH *a, unsigned char **pp);
21957 DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length);
21958 int i2d_DHxparams(const DH *a, unsigned char **pp);
21959 
21960 int DHparams_print_fp(FILE *fp, const DH *x);
21961 
21962 
21963 int DHparams_print(BIO *bp, const DH *x);
21964 
21965 
21966 
21967 
21968 /* RFC 5114 parameters */
21969 DH *DH_get_1024_160(void);
21970 DH *DH_get_2048_224(void);
21971 DH *DH_get_2048_256(void);
21972 
21973 
21974 /* RFC2631 KDF */
21975 int DH_KDF_X9_42(unsigned char *out, size_t outlen,
21976                  const unsigned char *Z, size_t Zlen,
21977                  ASN1_OBJECT *key_oid,
21978                  const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
21979 # 357 "/usr/include/openssl/dh.h" 3 4
21980 /* KDF types */
21981 
21982 
21983 
21984 /* BEGIN ERROR CODES */
21985 /*
21986  * The following lines are auto generated by the script mkerr.pl. Any changes
21987  * made after this point may be overwritten when the script is next run.
21988  */
21989 void ERR_load_DH_strings(void);
21990 
21991 /* Error codes for the DH functions. */
21992 
21993 /* Function codes. */
21994 # 392 "/usr/include/openssl/dh.h" 3 4
21995 /* Reason codes. */
21996 # 84 "/usr/include/openssl/dsa.h" 2 3 4
21997 # 92 "/usr/include/openssl/dsa.h" 3 4
21998 /*
21999  * new with 0.9.7h; the built-in DSA implementation now uses constant time
22000  * modular exponentiation for secret exponents by default. This flag causes
22001  * the faster variable sliding window method to be used for all exponents.
22002  */
22003 
22004 
22005 /*
22006  * If this flag is set the DSA method is FIPS compliant and can be used in
22007  * FIPS mode. This is set in the validated module method. If an application
22008  * sets this flag in its own methods it is its reposibility to ensure the
22009  * result is compliant.
22010  */
22011 
22012 
22013 
22014 /*
22015  * If this flag is set the operations normally disabled in FIPS mode are
22016  * permitted it is then the applications responsibility to ensure that the
22017  * usage is compliant.
22018  */
22019 
22020 
22021 
22022 
22023 
22024 
22025 
22026 /* Already defined in ossl_typ.h */
22027 /* typedef struct dsa_st DSA; */
22028 /* typedef struct dsa_method DSA_METHOD; */
22029 
22030 typedef struct DSA_SIG_st {
22031     BIGNUM *r;
22032     BIGNUM *s;
22033 } DSA_SIG;
22034 
22035 struct dsa_method {
22036     const char *name;
22037     DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa);
22038     int (*dsa_sign_setup) (DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
22039                            BIGNUM **rp);
22040     int (*dsa_do_verify) (const unsigned char *dgst, int dgst_len,
22041                           DSA_SIG *sig, DSA *dsa);
22042     int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
22043                         BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
22044                         BN_MONT_CTX *in_mont);
22045     /* Can be null */
22046     int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
22047                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
22048     int (*init) (DSA *dsa);
22049     int (*finish) (DSA *dsa);
22050     int flags;
22051     char *app_data;
22052     /* If this is non-NULL, it is used to generate DSA parameters */
22053     int (*dsa_paramgen) (DSA *dsa, int bits,
22054                          const unsigned char *seed, int seed_len,
22055                          int *counter_ret, unsigned long *h_ret,
22056                          BN_GENCB *cb);
22057     /* If this is non-NULL, it is used to generate DSA keys */
22058     int (*dsa_keygen) (DSA *dsa);
22059 };
22060 
22061 struct dsa_st {
22062     /*
22063      * This first variable is used to pick up errors where a DSA is passed
22064      * instead of of a EVP_PKEY
22065      */
22066     int pad;
22067     long version;
22068     int write_params;
22069     BIGNUM *p;
22070     BIGNUM *q; /* == 20 */
22071     BIGNUM *g;
22072     BIGNUM *pub_key; /* y public key */
22073     BIGNUM *priv_key; /* x private key */
22074     BIGNUM *kinv; /* Signing pre-calc */
22075     BIGNUM *r; /* Signing pre-calc */
22076     int flags;
22077     /* Normally used to cache montgomery values */
22078     BN_MONT_CTX *method_mont_p;
22079     int references;
22080     CRYPTO_EX_DATA ex_data;
22081     const DSA_METHOD *meth;
22082     /* functional reference if 'meth' is ENGINE-provided */
22083     ENGINE *engine;
22084 };
22085 # 187 "/usr/include/openssl/dsa.h" 3 4
22086 DSA *DSAparams_dup(DSA *x);
22087 DSA_SIG *DSA_SIG_new(void);
22088 void DSA_SIG_free(DSA_SIG *a);
22089 int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
22090 DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length);
22091 
22092 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
22093 int DSA_do_verify(const unsigned char *dgst, int dgst_len,
22094                   DSA_SIG *sig, DSA *dsa);
22095 
22096 const DSA_METHOD *DSA_OpenSSL(void);
22097 
22098 void DSA_set_default_method(const DSA_METHOD *);
22099 const DSA_METHOD *DSA_get_default_method(void);
22100 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
22101 
22102 DSA *DSA_new(void);
22103 DSA *DSA_new_method(ENGINE *engine);
22104 void DSA_free(DSA *r);
22105 /* "up" the DSA object's reference count */
22106 int DSA_up_ref(DSA *r);
22107 int DSA_size(const DSA *);
22108         /* next 4 return -1 on error */
22109 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
22110 int DSA_sign(int type, const unsigned char *dgst, int dlen,
22111              unsigned char *sig, unsigned int *siglen, DSA *dsa);
22112 int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
22113                const unsigned char *sigbuf, int siglen, DSA *dsa);
22114 int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
22115                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
22116 int DSA_set_ex_data(DSA *d, int idx, void *arg);
22117 void *DSA_get_ex_data(DSA *d, int idx);
22118 
22119 DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
22120 DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
22121 DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
22122 
22123 /* Deprecated version */
22124 
22125 DSA *DSA_generate_parameters(int bits,
22126                              unsigned char *seed, int seed_len,
22127                              int *counter_ret, unsigned long *h_ret, void
22128                               (*callback) (int, int, void *), void *cb_arg);
22129 
22130 
22131 /* New version */
22132 int DSA_generate_parameters_ex(DSA *dsa, int bits,
22133                                const unsigned char *seed, int seed_len,
22134                                int *counter_ret, unsigned long *h_ret,
22135                                BN_GENCB *cb);
22136 
22137 int DSA_generate_key(DSA *a);
22138 int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
22139 int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
22140 int i2d_DSAparams(const DSA *a, unsigned char **pp);
22141 
22142 
22143 int DSAparams_print(BIO *bp, const DSA *x);
22144 int DSA_print(BIO *bp, const DSA *x, int off);
22145 
22146 
22147 int DSAparams_print_fp(FILE *fp, const DSA *x);
22148 int DSA_print_fp(FILE *bp, const DSA *x, int off);
22149 
22150 
22151 
22152 /*
22153  * Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only
22154  * have one value here we set the number of checks to 64 which is the 128 bit
22155  * security level that is the highest level and valid for creating a 3072 bit
22156  * DSA key.
22157  */
22158 
22159 
22160 
22161 
22162 /*
22163  * Convert DSA structure (key or just parameters) into DH structure (be
22164  * careful to avoid small subgroup attacks when using this!)
22165  */
22166 DH *DSA_dup_DH(const DSA *r);
22167 # 278 "/usr/include/openssl/dsa.h" 3 4
22168 /* BEGIN ERROR CODES */
22169 /*
22170  * The following lines are auto generated by the script mkerr.pl. Any changes
22171  * made after this point may be overwritten when the script is next run.
22172  */
22173 void ERR_load_DSA_strings(void);
22174 
22175 /* Error codes for the DSA functions. */
22176 
22177 /* Function codes. */
22178 # 316 "/usr/include/openssl/dsa.h" 3 4
22179 /* Reason codes. */
22180 # 100 "/usr/include/openssl/x509.h" 2 3 4
22181 
22182 
22183 # 1 "/usr/include/openssl/dh.h" 1 3 4
22184 /* crypto/dh/dh.h */
22185 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
22186  * All rights reserved.
22187  *
22188  * This package is an SSL implementation written
22189  * by Eric Young (eay@cryptsoft.com).
22190  * The implementation was written so as to conform with Netscapes SSL.
22191  *
22192  * This library is free for commercial and non-commercial use as long as
22193  * the following conditions are aheared to.  The following conditions
22194  * apply to all code found in this distribution, be it the RC4, RSA,
22195  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
22196  * included with this distribution is covered by the same copyright terms
22197  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
22198  *
22199  * Copyright remains Eric Young's, and as such any Copyright notices in
22200  * the code are not to be removed.
22201  * If this package is used in a product, Eric Young should be given attribution
22202  * as the author of the parts of the library used.
22203  * This can be in the form of a textual message at program startup or
22204  * in documentation (online or textual) provided with the package.
22205  *
22206  * Redistribution and use in source and binary forms, with or without
22207  * modification, are permitted provided that the following conditions
22208  * are met:
22209  * 1. Redistributions of source code must retain the copyright
22210  *    notice, this list of conditions and the following disclaimer.
22211  * 2. Redistributions in binary form must reproduce the above copyright
22212  *    notice, this list of conditions and the following disclaimer in the
22213  *    documentation and/or other materials provided with the distribution.
22214  * 3. All advertising materials mentioning features or use of this software
22215  *    must display the following acknowledgement:
22216  *    "This product includes cryptographic software written by
22217  *     Eric Young (eay@cryptsoft.com)"
22218  *    The word 'cryptographic' can be left out if the rouines from the library
22219  *    being used are not cryptographic related :-).
22220  * 4. If you include any Windows specific code (or a derivative thereof) from
22221  *    the apps directory (application code) you must include an acknowledgement:
22222  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
22223  *
22224  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
22225  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22226  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22227  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22228  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22229  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22230  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22231  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22232  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22233  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22234  * SUCH DAMAGE.
22235  *
22236  * The licence and distribution terms for any publically available version or
22237  * derivative of this code cannot be changed.  i.e. this code cannot simply be
22238  * copied and put under another distribution licence
22239  * [including the GNU Public Licence.]
22240  */
22241 # 103 "/usr/include/openssl/x509.h" 2 3 4
22242 
22243 
22244 
22245 
22246 # 1 "/usr/include/openssl/sha.h" 1 3 4
22247 /* crypto/sha/sha.h */
22248 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
22249  * All rights reserved.
22250  *
22251  * This package is an SSL implementation written
22252  * by Eric Young (eay@cryptsoft.com).
22253  * The implementation was written so as to conform with Netscapes SSL.
22254  *
22255  * This library is free for commercial and non-commercial use as long as
22256  * the following conditions are aheared to.  The following conditions
22257  * apply to all code found in this distribution, be it the RC4, RSA,
22258  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
22259  * included with this distribution is covered by the same copyright terms
22260  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
22261  *
22262  * Copyright remains Eric Young's, and as such any Copyright notices in
22263  * the code are not to be removed.
22264  * If this package is used in a product, Eric Young should be given attribution
22265  * as the author of the parts of the library used.
22266  * This can be in the form of a textual message at program startup or
22267  * in documentation (online or textual) provided with the package.
22268  *
22269  * Redistribution and use in source and binary forms, with or without
22270  * modification, are permitted provided that the following conditions
22271  * are met:
22272  * 1. Redistributions of source code must retain the copyright
22273  *    notice, this list of conditions and the following disclaimer.
22274  * 2. Redistributions in binary form must reproduce the above copyright
22275  *    notice, this list of conditions and the following disclaimer in the
22276  *    documentation and/or other materials provided with the distribution.
22277  * 3. All advertising materials mentioning features or use of this software
22278  *    must display the following acknowledgement:
22279  *    "This product includes cryptographic software written by
22280  *     Eric Young (eay@cryptsoft.com)"
22281  *    The word 'cryptographic' can be left out if the rouines from the library
22282  *    being used are not cryptographic related :-).
22283  * 4. If you include any Windows specific code (or a derivative thereof) from
22284  *    the apps directory (application code) you must include an acknowledgement:
22285  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
22286  *
22287  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
22288  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22289  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22290  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22291  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22292  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22293  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22294  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22295  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22296  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22297  * SUCH DAMAGE.
22298  *
22299  * The licence and distribution terms for any publically available version or
22300  * derivative of this code cannot be changed.  i.e. this code cannot simply be
22301  * copied and put under another distribution licence
22302  * [including the GNU Public Licence.]
22303  */
22304 
22305 
22306 
22307 
22308 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
22309 /* e_os2.h */
22310 /* ====================================================================
22311  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
22312  *
22313  * Redistribution and use in source and binary forms, with or without
22314  * modification, are permitted provided that the following conditions
22315  * are met:
22316  *
22317  * 1. Redistributions of source code must retain the above copyright
22318  *    notice, this list of conditions and the following disclaimer.
22319  *
22320  * 2. Redistributions in binary form must reproduce the above copyright
22321  *    notice, this list of conditions and the following disclaimer in
22322  *    the documentation and/or other materials provided with the
22323  *    distribution.
22324  *
22325  * 3. All advertising materials mentioning features or use of this
22326  *    software must display the following acknowledgment:
22327  *    "This product includes software developed by the OpenSSL Project
22328  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
22329  *
22330  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
22331  *    endorse or promote products derived from this software without
22332  *    prior written permission. For written permission, please contact
22333  *    openssl-core@openssl.org.
22334  *
22335  * 5. Products derived from this software may not be called "OpenSSL"
22336  *    nor may "OpenSSL" appear in their names without prior written
22337  *    permission of the OpenSSL Project.
22338  *
22339  * 6. Redistributions of any form whatsoever must retain the following
22340  *    acknowledgment:
22341  *    "This product includes software developed by the OpenSSL Project
22342  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
22343  *
22344  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
22345  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22346  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22347  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
22348  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22349  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22350  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22351  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22352  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
22353  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22354  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
22355  * OF THE POSSIBILITY OF SUCH DAMAGE.
22356  * ====================================================================
22357  *
22358  * This product includes cryptographic software written by Eric Young
22359  * (eay@cryptsoft.com).  This product includes software written by Tim
22360  * Hudson (tjh@cryptsoft.com).
22361  *
22362  */
22363 
22364 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
22365 /* opensslconf.h */
22366 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
22367 
22368 
22369 
22370 
22371 /* OpenSSL was configured with the following options: */
22372 # 108 "/usr/include/openssl/opensslconf.h" 3 4
22373 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
22374    asks for it.  This is a transient feature that is provided for those
22375    who haven't had the time to do the appropriate changes in their
22376    applications.  */
22377 # 204 "/usr/include/openssl/opensslconf.h" 3 4
22378 /* crypto/opensslconf.h.in */
22379 
22380 /* Generate 80386 code? */
22381 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
22382 # 63 "/usr/include/openssl/sha.h" 2 3 4
22383 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
22384 /*
22385  * CDDL HEADER START
22386  *
22387  * The contents of this file are subject to the terms of the
22388  * Common Development and Distribution License, Version 1.0 only
22389  * (the "License").  You may not use this file except in compliance
22390  * with the License.
22391  *
22392  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22393  * or http://www.opensolaris.org/os/licensing.
22394  * See the License for the specific language governing permissions
22395  * and limitations under the License.
22396  *
22397  * When distributing Covered Code, include this CDDL HEADER in each
22398  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22399  * If applicable, add the following below this CDDL HEADER, with the
22400  * fields enclosed by brackets "[]" replaced with your own identifying
22401  * information: Portions Copyright [yyyy] [name of copyright owner]
22402  *
22403  * CDDL HEADER END
22404  */
22405 /*	Copyright (c) 1988 AT&T	*/
22406 /*	  All Rights Reserved  	*/
22407 
22408 
22409 /*
22410  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
22411  * Use is subject to license terms.
22412  */
22413 # 64 "/usr/include/openssl/sha.h" 2 3 4
22414 # 77 "/usr/include/openssl/sha.h" 3 4
22415 /*-
22416  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
22417  * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then !
22418  * ! SHA_LONG_LOG2 has to be defined along.                        !
22419  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
22420  */
22421 # 100 "/usr/include/openssl/sha.h" 3 4
22422 typedef struct SHAstate_st {
22423     unsigned int h0, h1, h2, h3, h4;
22424     unsigned int Nl, Nh;
22425     unsigned int data[16];
22426     unsigned int num;
22427 } SHA_CTX;
22428 
22429 
22430 
22431 
22432 
22433 int SHA_Init(SHA_CTX *c);
22434 int SHA_Update(SHA_CTX *c, const void *data, size_t len);
22435 int SHA_Final(unsigned char *md, SHA_CTX *c);
22436 unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md);
22437 void SHA_Transform(SHA_CTX *c, const unsigned char *data);
22438 
22439 
22440 
22441 
22442 
22443 int SHA1_Init(SHA_CTX *c);
22444 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
22445 int SHA1_Final(unsigned char *md, SHA_CTX *c);
22446 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
22447 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
22448 # 134 "/usr/include/openssl/sha.h" 3 4
22449 typedef struct SHA256state_st {
22450     unsigned int h[8];
22451     unsigned int Nl, Nh;
22452     unsigned int data[16];
22453     unsigned int num, md_len;
22454 } SHA256_CTX;
22455 
22456 
22457 
22458 
22459 
22460 
22461 int SHA224_Init(SHA256_CTX *c);
22462 int SHA224_Update(SHA256_CTX *c, const void *data, size_t len);
22463 int SHA224_Final(unsigned char *md, SHA256_CTX *c);
22464 unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md);
22465 int SHA256_Init(SHA256_CTX *c);
22466 int SHA256_Update(SHA256_CTX *c, const void *data, size_t len);
22467 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
22468 unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);
22469 void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
22470 
22471 
22472 
22473 
22474 
22475 
22476 /*
22477  * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64
22478  * being exactly 64-bit wide. See Implementation Notes in sha512.c
22479  * for further details.
22480  */
22481 /*
22482  * SHA-512 treats input data as a
22483  * contiguous array of 64 bit
22484  * wide big-endian values.
22485  */
22486 # 183 "/usr/include/openssl/sha.h" 3 4
22487 typedef struct SHA512state_st {
22488     unsigned long long h[8];
22489     unsigned long long Nl, Nh;
22490     union {
22491         unsigned long long d[16];
22492         unsigned char p[(16*8)];
22493     } u;
22494     unsigned int num, md_len;
22495 } SHA512_CTX;
22496 
22497 
22498 
22499 
22500 
22501 
22502 
22503 int SHA384_Init(SHA512_CTX *c);
22504 int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
22505 int SHA384_Final(unsigned char *md, SHA512_CTX *c);
22506 unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);
22507 int SHA512_Init(SHA512_CTX *c);
22508 int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);
22509 int SHA512_Final(unsigned char *md, SHA512_CTX *c);
22510 unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
22511 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
22512 # 108 "/usr/include/openssl/x509.h" 2 3 4
22513 
22514 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
22515 /* ====================================================================
22516  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
22517  *
22518  * Redistribution and use in source and binary forms, with or without
22519  * modification, are permitted provided that the following conditions
22520  * are met:
22521  *
22522  * 1. Redistributions of source code must retain the above copyright
22523  *    notice, this list of conditions and the following disclaimer.
22524  *
22525  * 2. Redistributions in binary form must reproduce the above copyright
22526  *    notice, this list of conditions and the following disclaimer in
22527  *    the documentation and/or other materials provided with the
22528  *    distribution.
22529  *
22530  * 3. All advertising materials mentioning features or use of this
22531  *    software must display the following acknowledgment:
22532  *    "This product includes software developed by the OpenSSL Project
22533  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
22534  *
22535  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
22536  *    endorse or promote products derived from this software without
22537  *    prior written permission. For written permission, please contact
22538  *    openssl-core@openssl.org.
22539  *
22540  * 5. Products derived from this software may not be called "OpenSSL"
22541  *    nor may "OpenSSL" appear in their names without prior written
22542  *    permission of the OpenSSL Project.
22543  *
22544  * 6. Redistributions of any form whatsoever must retain the following
22545  *    acknowledgment:
22546  *    "This product includes software developed by the OpenSSL Project
22547  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
22548  *
22549  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
22550  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22551  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22552  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
22553  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22554  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22555  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22556  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22557  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
22558  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22559  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
22560  * OF THE POSSIBILITY OF SUCH DAMAGE.
22561  * ====================================================================
22562  *
22563  * This product includes cryptographic software written by Eric Young
22564  * (eay@cryptsoft.com).  This product includes software written by Tim
22565  * Hudson (tjh@cryptsoft.com).
22566  *
22567  */
22568 # 110 "/usr/include/openssl/x509.h" 2 3 4
22569 # 137 "/usr/include/openssl/x509.h" 3 4
22570 typedef struct X509_objects_st {
22571     int nid;
22572     int (*a2i) (void);
22573     int (*i2a) (void);
22574 } X509_OBJECTS;
22575 
22576 struct X509_algor_st {
22577     ASN1_OBJECT *algorithm;
22578     ASN1_TYPE *parameter;
22579 } /* X509_ALGOR */ ;
22580 
22581 
22582 
22583 typedef struct stack_st_X509_ALGOR X509_ALGORS;
22584 
22585 typedef struct X509_val_st {
22586     ASN1_TIME *notBefore;
22587     ASN1_TIME *notAfter;
22588 } X509_VAL;
22589 
22590 struct X509_pubkey_st {
22591     X509_ALGOR *algor;
22592     ASN1_BIT_STRING *public_key;
22593     EVP_PKEY *pkey;
22594 };
22595 
22596 typedef struct X509_sig_st {
22597     X509_ALGOR *algor;
22598     ASN1_OCTET_STRING *digest;
22599 } X509_SIG;
22600 
22601 typedef struct X509_name_entry_st {
22602     ASN1_OBJECT *object;
22603     ASN1_STRING *value;
22604     int set;
22605     int size; /* temp variable */
22606 } X509_NAME_ENTRY;
22607 
22608 struct stack_st_X509_NAME_ENTRY { _STACK stack; };
22609 
22610 
22611 /* we always keep X509_NAMEs in 2 forms. */
22612 struct X509_name_st {
22613     struct stack_st_X509_NAME_ENTRY *entries;
22614     int modified; /* true if 'bytes' needs to be built */
22615 
22616     BUF_MEM *bytes;
22617 
22618 
22619 
22620 /*      unsigned long hash; Keep the hash around for lookups */
22621     unsigned char *canon_enc;
22622     int canon_enclen;
22623 } /* X509_NAME */ ;
22624 
22625 struct stack_st_X509_NAME { _STACK stack; };
22626 
22627 
22628 
22629 typedef struct X509_extension_st {
22630     ASN1_OBJECT *object;
22631     ASN1_BOOLEAN critical;
22632     ASN1_OCTET_STRING *value;
22633 } X509_EXTENSION;
22634 
22635 typedef struct stack_st_X509_EXTENSION X509_EXTENSIONS;
22636 
22637 struct stack_st_X509_EXTENSION { _STACK stack; };
22638 
22639 
22640 /* a sequence of these are used */
22641 typedef struct x509_attributes_st {
22642     ASN1_OBJECT *object;
22643     int single; /* 0 for a set, 1 for a single item (which is
22644                                  * wrong) */
22645     union {
22646         char *ptr;
22647         /*
22648          * 0
22649          */ struct stack_st_ASN1_TYPE *set;
22650         /*
22651          * 1
22652          */ ASN1_TYPE *single;
22653     } value;
22654 } X509_ATTRIBUTE;
22655 
22656 struct stack_st_X509_ATTRIBUTE { _STACK stack; };
22657 
22658 
22659 typedef struct X509_req_info_st {
22660     ASN1_ENCODING enc;
22661     ASN1_INTEGER *version;
22662     X509_NAME *subject;
22663     X509_PUBKEY *pubkey;
22664     /*  d=2 hl=2 l=  0 cons: cont: 00 */
22665     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
22666 } X509_REQ_INFO;
22667 
22668 typedef struct X509_req_st {
22669     X509_REQ_INFO *req_info;
22670     X509_ALGOR *sig_alg;
22671     ASN1_BIT_STRING *signature;
22672     int references;
22673 } X509_REQ;
22674 
22675 typedef struct x509_cinf_st {
22676     ASN1_INTEGER *version; /* [ 0 ] default of v1 */
22677     ASN1_INTEGER *serialNumber;
22678     X509_ALGOR *signature;
22679     X509_NAME *issuer;
22680     X509_VAL *validity;
22681     X509_NAME *subject;
22682     X509_PUBKEY *key;
22683     ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */
22684     ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */
22685     struct stack_st_X509_EXTENSION *extensions; /* [ 3 ] optional in v3 */
22686     ASN1_ENCODING enc;
22687 } X509_CINF;
22688 
22689 /*
22690  * This stuff is certificate "auxiliary info" it contains details which are
22691  * useful in certificate stores and databases. When used this is tagged onto
22692  * the end of the certificate itself
22693  */
22694 
22695 typedef struct x509_cert_aux_st {
22696     struct stack_st_ASN1_OBJECT *trust; /* trusted uses */
22697     struct stack_st_ASN1_OBJECT *reject; /* rejected uses */
22698     ASN1_UTF8STRING *alias; /* "friendly name" */
22699     ASN1_OCTET_STRING *keyid; /* key id of private key */
22700     struct stack_st_X509_ALGOR *other; /* other unspecified info */
22701 } X509_CERT_AUX;
22702 
22703 struct x509_st {
22704     X509_CINF *cert_info;
22705     X509_ALGOR *sig_alg;
22706     ASN1_BIT_STRING *signature;
22707     int valid;
22708     int references;
22709     char *name;
22710     CRYPTO_EX_DATA ex_data;
22711     /* These contain copies of various extension values */
22712     long ex_pathlen;
22713     long ex_pcpathlen;
22714     unsigned long ex_flags;
22715     unsigned long ex_kusage;
22716     unsigned long ex_xkusage;
22717     unsigned long ex_nscert;
22718     ASN1_OCTET_STRING *skid;
22719     AUTHORITY_KEYID *akid;
22720     X509_POLICY_CACHE *policy_cache;
22721     struct stack_st_DIST_POINT *crldp;
22722     struct stack_st_GENERAL_NAME *altname;
22723     NAME_CONSTRAINTS *nc;
22724 
22725 
22726 
22727 
22728 
22729     unsigned char sha1_hash[20];
22730 
22731     X509_CERT_AUX *aux;
22732 } /* X509 */ ;
22733 
22734 struct stack_st_X509 { _STACK stack; };
22735 
22736 
22737 /* This is used for a table of trust checking functions */
22738 
22739 typedef struct x509_trust_st {
22740     int trust;
22741     int flags;
22742     int (*check_trust) (struct x509_trust_st *, X509 *, int);
22743     char *name;
22744     int arg1;
22745     void *arg2;
22746 } X509_TRUST;
22747 
22748 struct stack_st_X509_TRUST { _STACK stack; };
22749 
22750 typedef struct x509_cert_pair_st {
22751     X509 *forward;
22752     X509 *reverse;
22753 } X509_CERT_PAIR;
22754 
22755 /* standard trust ids */
22756 # 335 "/usr/include/openssl/x509.h" 3 4
22757 /* Keep these up to date! */
22758 
22759 
22760 
22761 /* trust_flags values */
22762 
22763 
22764 
22765 /* check_trust return codes */
22766 
22767 
22768 
22769 
22770 
22771 /* Flags for X509_print_ex() */
22772 # 366 "/usr/include/openssl/x509.h" 3 4
22773 /* Flags specific to X509_NAME_print_ex() */
22774 
22775 /* The field separator information */
22776 # 381 "/usr/include/openssl/x509.h" 3 4
22777 /* How the field name is shown */
22778 # 392 "/usr/include/openssl/x509.h" 3 4
22779 /*
22780  * This determines if we dump fields we don't recognise: RFC2253 requires
22781  * this.
22782  */
22783 
22784 
22785 
22786 
22787 
22788 
22789 /* Complete set of RFC2253 flags */
22790 
22791 
22792 
22793 
22794 
22795 
22796 
22797 /* readable oneline form */
22798 
22799 
22800 
22801 
22802 
22803 
22804 
22805 /* readable multiline form */
22806 # 427 "/usr/include/openssl/x509.h" 3 4
22807 struct x509_revoked_st {
22808     ASN1_INTEGER *serialNumber;
22809     ASN1_TIME *revocationDate;
22810     struct stack_st_X509_EXTENSION /* optional */ *extensions;
22811     /* Set up if indirect CRL */
22812     struct stack_st_GENERAL_NAME *issuer;
22813     /* Revocation reason */
22814     int reason;
22815     int sequence; /* load sequence */
22816 };
22817 
22818 struct stack_st_X509_REVOKED { _STACK stack; };
22819 
22820 
22821 typedef struct X509_crl_info_st {
22822     ASN1_INTEGER *version;
22823     X509_ALGOR *sig_alg;
22824     X509_NAME *issuer;
22825     ASN1_TIME *lastUpdate;
22826     ASN1_TIME *nextUpdate;
22827     struct stack_st_X509_REVOKED *revoked;
22828     struct stack_st_X509_EXTENSION /* [0] */ *extensions;
22829     ASN1_ENCODING enc;
22830 } X509_CRL_INFO;
22831 
22832 struct X509_crl_st {
22833     /* actual signature */
22834     X509_CRL_INFO *crl;
22835     X509_ALGOR *sig_alg;
22836     ASN1_BIT_STRING *signature;
22837     int references;
22838     int flags;
22839     /* Copies of various extensions */
22840     AUTHORITY_KEYID *akid;
22841     ISSUING_DIST_POINT *idp;
22842     /* Convenient breakdown of IDP */
22843     int idp_flags;
22844     int idp_reasons;
22845     /* CRL and base CRL numbers for delta processing */
22846     ASN1_INTEGER *crl_number;
22847     ASN1_INTEGER *base_crl_number;
22848 
22849     unsigned char sha1_hash[20];
22850 
22851     struct stack_st_GENERAL_NAMES *issuers;
22852     const X509_CRL_METHOD *meth;
22853     void *meth_data;
22854 } /* X509_CRL */ ;
22855 
22856 struct stack_st_X509_CRL { _STACK stack; };
22857 
22858 
22859 typedef struct private_key_st {
22860     int version;
22861     /* The PKCS#8 data types */
22862     X509_ALGOR *enc_algor;
22863     ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */
22864     /* When decrypted, the following will not be NULL */
22865     EVP_PKEY *dec_pkey;
22866     /* used to encrypt and decrypt */
22867     int key_length;
22868     char *key_data;
22869     int key_free; /* true if we should auto free key_data */
22870     /* expanded version of 'enc_algor' */
22871     EVP_CIPHER_INFO cipher;
22872     int references;
22873 } X509_PKEY;
22874 
22875 
22876 typedef struct X509_info_st {
22877     X509 *x509;
22878     X509_CRL *crl;
22879     X509_PKEY *x_pkey;
22880     EVP_CIPHER_INFO enc_cipher;
22881     int enc_len;
22882     char *enc_data;
22883     int references;
22884 } X509_INFO;
22885 
22886 struct stack_st_X509_INFO { _STACK stack; };
22887 
22888 
22889 /*
22890  * The next 2 structures and their 8 routines were sent to me by Pat Richard
22891  * <patr@x509.com> and are used to manipulate Netscapes spki structures -
22892  * useful if you are writing a CA web page
22893  */
22894 typedef struct Netscape_spkac_st {
22895     X509_PUBKEY *pubkey;
22896     ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */
22897 } NETSCAPE_SPKAC;
22898 
22899 typedef struct Netscape_spki_st {
22900     NETSCAPE_SPKAC *spkac; /* signed public key and challenge */
22901     X509_ALGOR *sig_algor;
22902     ASN1_BIT_STRING *signature;
22903 } NETSCAPE_SPKI;
22904 
22905 /* Netscape certificate sequence structure */
22906 typedef struct Netscape_certificate_sequence {
22907     ASN1_OBJECT *type;
22908     struct stack_st_X509 *certs;
22909 } NETSCAPE_CERT_SEQUENCE;
22910 
22911 /*- Unused (and iv length is wrong)
22912 typedef struct CBCParameter_st
22913         {
22914         unsigned char iv[8];
22915         } CBC_PARAM;
22916 */
22917 
22918 /* Password based encryption structure */
22919 
22920 typedef struct PBEPARAM_st {
22921     ASN1_OCTET_STRING *salt;
22922     ASN1_INTEGER *iter;
22923 } PBEPARAM;
22924 
22925 /* Password based encryption V2 structures */
22926 
22927 typedef struct PBE2PARAM_st {
22928     X509_ALGOR *keyfunc;
22929     X509_ALGOR *encryption;
22930 } PBE2PARAM;
22931 
22932 typedef struct PBKDF2PARAM_st {
22933 /* Usually OCTET STRING but could be anything */
22934     ASN1_TYPE *salt;
22935     ASN1_INTEGER *iter;
22936     ASN1_INTEGER *keylength;
22937     X509_ALGOR *prf;
22938 } PBKDF2PARAM;
22939 
22940 /* PKCS#8 private key info structure */
22941 
22942 struct pkcs8_priv_key_info_st {
22943     /* Flag for various broken formats */
22944     int broken;
22945 
22946 
22947 
22948 
22949 
22950     ASN1_INTEGER *version;
22951     X509_ALGOR *pkeyalg;
22952     /* Should be OCTET STRING but some are broken */
22953     ASN1_TYPE *pkey;
22954     struct stack_st_X509_ATTRIBUTE *attributes;
22955 };
22956 
22957 
22958 
22959 
22960 
22961 # 1 "/usr/include/openssl/x509_vfy.h" 1 3 4
22962 /* crypto/x509/x509_vfy.h */
22963 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
22964  * All rights reserved.
22965  *
22966  * This package is an SSL implementation written
22967  * by Eric Young (eay@cryptsoft.com).
22968  * The implementation was written so as to conform with Netscapes SSL.
22969  *
22970  * This library is free for commercial and non-commercial use as long as
22971  * the following conditions are aheared to.  The following conditions
22972  * apply to all code found in this distribution, be it the RC4, RSA,
22973  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
22974  * included with this distribution is covered by the same copyright terms
22975  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
22976  *
22977  * Copyright remains Eric Young's, and as such any Copyright notices in
22978  * the code are not to be removed.
22979  * If this package is used in a product, Eric Young should be given attribution
22980  * as the author of the parts of the library used.
22981  * This can be in the form of a textual message at program startup or
22982  * in documentation (online or textual) provided with the package.
22983  *
22984  * Redistribution and use in source and binary forms, with or without
22985  * modification, are permitted provided that the following conditions
22986  * are met:
22987  * 1. Redistributions of source code must retain the copyright
22988  *    notice, this list of conditions and the following disclaimer.
22989  * 2. Redistributions in binary form must reproduce the above copyright
22990  *    notice, this list of conditions and the following disclaimer in the
22991  *    documentation and/or other materials provided with the distribution.
22992  * 3. All advertising materials mentioning features or use of this software
22993  *    must display the following acknowledgement:
22994  *    "This product includes cryptographic software written by
22995  *     Eric Young (eay@cryptsoft.com)"
22996  *    The word 'cryptographic' can be left out if the rouines from the library
22997  *    being used are not cryptographic related :-).
22998  * 4. If you include any Windows specific code (or a derivative thereof) from
22999  *    the apps directory (application code) you must include an acknowledgement:
23000  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
23001  *
23002  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
23003  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23004  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23005  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23006  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23007  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23008  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23009  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23010  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23011  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23012  * SUCH DAMAGE.
23013  *
23014  * The licence and distribution terms for any publically available version or
23015  * derivative of this code cannot be changed.  i.e. this code cannot simply be
23016  * copied and put under another distribution licence
23017  * [including the GNU Public Licence.]
23018  */
23019 # 70 "/usr/include/openssl/x509_vfy.h" 3 4
23020 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
23021 /* opensslconf.h */
23022 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
23023 
23024 
23025 
23026 
23027 /* OpenSSL was configured with the following options: */
23028 # 108 "/usr/include/openssl/opensslconf.h" 3 4
23029 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
23030    asks for it.  This is a transient feature that is provided for those
23031    who haven't had the time to do the appropriate changes in their
23032    applications.  */
23033 # 204 "/usr/include/openssl/opensslconf.h" 3 4
23034 /* crypto/opensslconf.h.in */
23035 
23036 /* Generate 80386 code? */
23037 # 71 "/usr/include/openssl/x509_vfy.h" 2 3 4
23038 
23039 # 1 "/usr/include/openssl/lhash.h" 1 3 4
23040 /* crypto/lhash/lhash.h */
23041 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
23042  * All rights reserved.
23043  *
23044  * This package is an SSL implementation written
23045  * by Eric Young (eay@cryptsoft.com).
23046  * The implementation was written so as to conform with Netscapes SSL.
23047  *
23048  * This library is free for commercial and non-commercial use as long as
23049  * the following conditions are aheared to.  The following conditions
23050  * apply to all code found in this distribution, be it the RC4, RSA,
23051  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
23052  * included with this distribution is covered by the same copyright terms
23053  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
23054  *
23055  * Copyright remains Eric Young's, and as such any Copyright notices in
23056  * the code are not to be removed.
23057  * If this package is used in a product, Eric Young should be given attribution
23058  * as the author of the parts of the library used.
23059  * This can be in the form of a textual message at program startup or
23060  * in documentation (online or textual) provided with the package.
23061  *
23062  * Redistribution and use in source and binary forms, with or without
23063  * modification, are permitted provided that the following conditions
23064  * are met:
23065  * 1. Redistributions of source code must retain the copyright
23066  *    notice, this list of conditions and the following disclaimer.
23067  * 2. Redistributions in binary form must reproduce the above copyright
23068  *    notice, this list of conditions and the following disclaimer in the
23069  *    documentation and/or other materials provided with the distribution.
23070  * 3. All advertising materials mentioning features or use of this software
23071  *    must display the following acknowledgement:
23072  *    "This product includes cryptographic software written by
23073  *     Eric Young (eay@cryptsoft.com)"
23074  *    The word 'cryptographic' can be left out if the rouines from the library
23075  *    being used are not cryptographic related :-).
23076  * 4. If you include any Windows specific code (or a derivative thereof) from
23077  *    the apps directory (application code) you must include an acknowledgement:
23078  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
23079  *
23080  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
23081  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23082  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23083  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23084  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23085  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23086  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23087  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23088  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23089  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23090  * SUCH DAMAGE.
23091  *
23092  * The licence and distribution terms for any publically available version or
23093  * derivative of this code cannot be changed.  i.e. this code cannot simply be
23094  * copied and put under another distribution licence
23095  * [including the GNU Public Licence.]
23096  */
23097 
23098 /*
23099  * Header for dynamic hash table routines Author - Eric Young
23100  */
23101 
23102 
23103 
23104 
23105 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
23106 /* e_os2.h */
23107 /* ====================================================================
23108  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
23109  *
23110  * Redistribution and use in source and binary forms, with or without
23111  * modification, are permitted provided that the following conditions
23112  * are met:
23113  *
23114  * 1. Redistributions of source code must retain the above copyright
23115  *    notice, this list of conditions and the following disclaimer.
23116  *
23117  * 2. Redistributions in binary form must reproduce the above copyright
23118  *    notice, this list of conditions and the following disclaimer in
23119  *    the documentation and/or other materials provided with the
23120  *    distribution.
23121  *
23122  * 3. All advertising materials mentioning features or use of this
23123  *    software must display the following acknowledgment:
23124  *    "This product includes software developed by the OpenSSL Project
23125  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23126  *
23127  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23128  *    endorse or promote products derived from this software without
23129  *    prior written permission. For written permission, please contact
23130  *    openssl-core@openssl.org.
23131  *
23132  * 5. Products derived from this software may not be called "OpenSSL"
23133  *    nor may "OpenSSL" appear in their names without prior written
23134  *    permission of the OpenSSL Project.
23135  *
23136  * 6. Redistributions of any form whatsoever must retain the following
23137  *    acknowledgment:
23138  *    "This product includes software developed by the OpenSSL Project
23139  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
23140  *
23141  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
23142  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23143  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23144  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
23145  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23146  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23147  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23148  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23149  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23150  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23151  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23152  * OF THE POSSIBILITY OF SUCH DAMAGE.
23153  * ====================================================================
23154  *
23155  * This product includes cryptographic software written by Eric Young
23156  * (eay@cryptsoft.com).  This product includes software written by Tim
23157  * Hudson (tjh@cryptsoft.com).
23158  *
23159  */
23160 
23161 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
23162 /* opensslconf.h */
23163 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
23164 
23165 
23166 
23167 
23168 /* OpenSSL was configured with the following options: */
23169 # 108 "/usr/include/openssl/opensslconf.h" 3 4
23170 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
23171    asks for it.  This is a transient feature that is provided for those
23172    who haven't had the time to do the appropriate changes in their
23173    applications.  */
23174 # 204 "/usr/include/openssl/opensslconf.h" 3 4
23175 /* crypto/opensslconf.h.in */
23176 
23177 /* Generate 80386 code? */
23178 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
23179 # 67 "/usr/include/openssl/lhash.h" 2 3 4
23180 
23181 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
23182 /*
23183  * CDDL HEADER START
23184  *
23185  * The contents of this file are subject to the terms of the
23186  * Common Development and Distribution License (the "License").
23187  * You may not use this file except in compliance with the License.
23188  *
23189  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23190  * or http://www.opensolaris.org/os/licensing.
23191  * See the License for the specific language governing permissions
23192  * and limitations under the License.
23193  *
23194  * When distributing Covered Code, include this CDDL HEADER in each
23195  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23196  * If applicable, add the following below this CDDL HEADER, with the
23197  * fields enclosed by brackets "[]" replaced with your own identifying
23198  * information: Portions Copyright [yyyy] [name of copyright owner]
23199  *
23200  * CDDL HEADER END
23201  */
23202 
23203 /*
23204  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23205  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
23206  */
23207 
23208 /*	Copyright (c) 1988 AT&T	*/
23209 /*	  All Rights Reserved  	*/
23210 
23211 /*
23212  * User-visible pieces of the ANSI C standard I/O package.
23213  */
23214 # 69 "/usr/include/openssl/lhash.h" 2 3 4
23215 
23216 
23217 
23218 # 1 "/usr/include/openssl/bio.h" 1 3 4
23219 /* crypto/bio/bio.h */
23220 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
23221  * All rights reserved.
23222  *
23223  * This package is an SSL implementation written
23224  * by Eric Young (eay@cryptsoft.com).
23225  * The implementation was written so as to conform with Netscapes SSL.
23226  *
23227  * This library is free for commercial and non-commercial use as long as
23228  * the following conditions are aheared to.  The following conditions
23229  * apply to all code found in this distribution, be it the RC4, RSA,
23230  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
23231  * included with this distribution is covered by the same copyright terms
23232  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
23233  *
23234  * Copyright remains Eric Young's, and as such any Copyright notices in
23235  * the code are not to be removed.
23236  * If this package is used in a product, Eric Young should be given attribution
23237  * as the author of the parts of the library used.
23238  * This can be in the form of a textual message at program startup or
23239  * in documentation (online or textual) provided with the package.
23240  *
23241  * Redistribution and use in source and binary forms, with or without
23242  * modification, are permitted provided that the following conditions
23243  * are met:
23244  * 1. Redistributions of source code must retain the copyright
23245  *    notice, this list of conditions and the following disclaimer.
23246  * 2. Redistributions in binary form must reproduce the above copyright
23247  *    notice, this list of conditions and the following disclaimer in the
23248  *    documentation and/or other materials provided with the distribution.
23249  * 3. All advertising materials mentioning features or use of this software
23250  *    must display the following acknowledgement:
23251  *    "This product includes cryptographic software written by
23252  *     Eric Young (eay@cryptsoft.com)"
23253  *    The word 'cryptographic' can be left out if the rouines from the library
23254  *    being used are not cryptographic related :-).
23255  * 4. If you include any Windows specific code (or a derivative thereof) from
23256  *    the apps directory (application code) you must include an acknowledgement:
23257  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
23258  *
23259  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
23260  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23261  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23262  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23263  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23264  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23265  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23266  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23267  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23268  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23269  * SUCH DAMAGE.
23270  *
23271  * The licence and distribution terms for any publically available version or
23272  * derivative of this code cannot be changed.  i.e. this code cannot simply be
23273  * copied and put under another distribution licence
23274  * [including the GNU Public Licence.]
23275  */
23276 # 73 "/usr/include/openssl/lhash.h" 2 3 4
23277 
23278 
23279 
23280 
23281 
23282 
23283 typedef struct lhash_node_st {
23284     void *data;
23285     struct lhash_node_st *next;
23286 
23287     unsigned long hash;
23288 
23289 } LHASH_NODE;
23290 
23291 typedef int (*LHASH_COMP_FN_TYPE) (const void *, const void *);
23292 typedef unsigned long (*LHASH_HASH_FN_TYPE) (const void *);
23293 typedef void (*LHASH_DOALL_FN_TYPE) (void *);
23294 typedef void (*LHASH_DOALL_ARG_FN_TYPE) (void *, void *);
23295 
23296 /*
23297  * Macros for declaring and implementing type-safe wrappers for LHASH
23298  * callbacks. This way, callbacks can be provided to LHASH structures without
23299  * function pointer casting and the macro-defined callbacks provide
23300  * per-variable casting before deferring to the underlying type-specific
23301  * callbacks. NB: It is possible to place a "static" in front of both the
23302  * DECLARE and IMPLEMENT macros if the functions are strictly internal.
23303  */
23304 
23305 /* First: "hash" functions */
23306 # 110 "/usr/include/openssl/lhash.h" 3 4
23307 /* Second: "compare" functions */
23308 # 120 "/usr/include/openssl/lhash.h" 3 4
23309 /* Third: "doall" functions */
23310 # 129 "/usr/include/openssl/lhash.h" 3 4
23311 /* Fourth: "doall_arg" functions */
23312 # 139 "/usr/include/openssl/lhash.h" 3 4
23313 typedef struct lhash_st {
23314     LHASH_NODE **b;
23315     LHASH_COMP_FN_TYPE comp;
23316     LHASH_HASH_FN_TYPE hash;
23317     unsigned int num_nodes;
23318     unsigned int num_alloc_nodes;
23319     unsigned int p;
23320     unsigned int pmax;
23321     unsigned long up_load; /* load times 256 */
23322     unsigned long down_load; /* load times 256 */
23323     unsigned long num_items;
23324     unsigned long num_expands;
23325     unsigned long num_expand_reallocs;
23326     unsigned long num_contracts;
23327     unsigned long num_contract_reallocs;
23328     unsigned long num_hash_calls;
23329     unsigned long num_comp_calls;
23330     unsigned long num_insert;
23331     unsigned long num_replace;
23332     unsigned long num_delete;
23333     unsigned long num_no_delete;
23334     unsigned long num_retrieve;
23335     unsigned long num_retrieve_miss;
23336     unsigned long num_hash_comps;
23337     int error;
23338 } _LHASH; /* Do not use _LHASH directly, use LHASH_OF
23339                                  * and friends */
23340 
23341 
23342 
23343 /*
23344  * Indicates a malloc() error in the last call, this is only bad in
23345  * lh_insert().
23346  */
23347 
23348 
23349 _LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c);
23350 void lh_free(_LHASH *lh);
23351 void *lh_insert(_LHASH *lh, void *data);
23352 void *lh_delete(_LHASH *lh, const void *data);
23353 void *lh_retrieve(_LHASH *lh, const void *data);
23354 void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func);
23355 void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg);
23356 unsigned long lh_strhash(const char *c);
23357 unsigned long lh_num_items(const _LHASH *lh);
23358 
23359 
23360 void lh_stats(const _LHASH *lh, FILE *out);
23361 void lh_node_stats(const _LHASH *lh, FILE *out);
23362 void lh_node_usage_stats(const _LHASH *lh, FILE *out);
23363 
23364 
23365 
23366 void lh_stats_bio(const _LHASH *lh, BIO *out);
23367 void lh_node_stats_bio(const _LHASH *lh, BIO *out);
23368 void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
23369 
23370 
23371 /* Type checking... */
23372 # 206 "/usr/include/openssl/lhash.h" 3 4
23373 /* Define wrapper functions. */
23374 # 233 "/usr/include/openssl/lhash.h" 3 4
23375 struct lhash_st_OPENSSL_STRING { int dummy; };
23376 struct lhash_st_OPENSSL_CSTRING { int dummy; };
23377 # 73 "/usr/include/openssl/x509_vfy.h" 2 3 4
23378 
23379 # 1 "/usr/include/openssl/bio.h" 1 3 4
23380 /* crypto/bio/bio.h */
23381 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
23382  * All rights reserved.
23383  *
23384  * This package is an SSL implementation written
23385  * by Eric Young (eay@cryptsoft.com).
23386  * The implementation was written so as to conform with Netscapes SSL.
23387  *
23388  * This library is free for commercial and non-commercial use as long as
23389  * the following conditions are aheared to.  The following conditions
23390  * apply to all code found in this distribution, be it the RC4, RSA,
23391  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
23392  * included with this distribution is covered by the same copyright terms
23393  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
23394  *
23395  * Copyright remains Eric Young's, and as such any Copyright notices in
23396  * the code are not to be removed.
23397  * If this package is used in a product, Eric Young should be given attribution
23398  * as the author of the parts of the library used.
23399  * This can be in the form of a textual message at program startup or
23400  * in documentation (online or textual) provided with the package.
23401  *
23402  * Redistribution and use in source and binary forms, with or without
23403  * modification, are permitted provided that the following conditions
23404  * are met:
23405  * 1. Redistributions of source code must retain the copyright
23406  *    notice, this list of conditions and the following disclaimer.
23407  * 2. Redistributions in binary form must reproduce the above copyright
23408  *    notice, this list of conditions and the following disclaimer in the
23409  *    documentation and/or other materials provided with the distribution.
23410  * 3. All advertising materials mentioning features or use of this software
23411  *    must display the following acknowledgement:
23412  *    "This product includes cryptographic software written by
23413  *     Eric Young (eay@cryptsoft.com)"
23414  *    The word 'cryptographic' can be left out if the rouines from the library
23415  *    being used are not cryptographic related :-).
23416  * 4. If you include any Windows specific code (or a derivative thereof) from
23417  *    the apps directory (application code) you must include an acknowledgement:
23418  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
23419  *
23420  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
23421  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23422  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23423  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23424  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23425  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23426  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23427  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23428  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23429  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23430  * SUCH DAMAGE.
23431  *
23432  * The licence and distribution terms for any publically available version or
23433  * derivative of this code cannot be changed.  i.e. this code cannot simply be
23434  * copied and put under another distribution licence
23435  * [including the GNU Public Licence.]
23436  */
23437 # 75 "/usr/include/openssl/x509_vfy.h" 2 3 4
23438 # 1 "/usr/include/openssl/crypto.h" 1 3 4
23439 /* crypto/crypto.h */
23440 /* ====================================================================
23441  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
23442  *
23443  * Redistribution and use in source and binary forms, with or without
23444  * modification, are permitted provided that the following conditions
23445  * are met:
23446  *
23447  * 1. Redistributions of source code must retain the above copyright
23448  *    notice, this list of conditions and the following disclaimer.
23449  *
23450  * 2. Redistributions in binary form must reproduce the above copyright
23451  *    notice, this list of conditions and the following disclaimer in
23452  *    the documentation and/or other materials provided with the
23453  *    distribution.
23454  *
23455  * 3. All advertising materials mentioning features or use of this
23456  *    software must display the following acknowledgment:
23457  *    "This product includes software developed by the OpenSSL Project
23458  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23459  *
23460  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23461  *    endorse or promote products derived from this software without
23462  *    prior written permission. For written permission, please contact
23463  *    openssl-core@openssl.org.
23464  *
23465  * 5. Products derived from this software may not be called "OpenSSL"
23466  *    nor may "OpenSSL" appear in their names without prior written
23467  *    permission of the OpenSSL Project.
23468  *
23469  * 6. Redistributions of any form whatsoever must retain the following
23470  *    acknowledgment:
23471  *    "This product includes software developed by the OpenSSL Project
23472  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
23473  *
23474  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
23475  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23476  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23477  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
23478  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23479  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23480  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23481  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23482  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23483  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23484  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23485  * OF THE POSSIBILITY OF SUCH DAMAGE.
23486  * ====================================================================
23487  *
23488  * This product includes cryptographic software written by Eric Young
23489  * (eay@cryptsoft.com).  This product includes software written by Tim
23490  * Hudson (tjh@cryptsoft.com).
23491  *
23492  */
23493 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
23494  * All rights reserved.
23495  *
23496  * This package is an SSL implementation written
23497  * by Eric Young (eay@cryptsoft.com).
23498  * The implementation was written so as to conform with Netscapes SSL.
23499  *
23500  * This library is free for commercial and non-commercial use as long as
23501  * the following conditions are aheared to.  The following conditions
23502  * apply to all code found in this distribution, be it the RC4, RSA,
23503  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
23504  * included with this distribution is covered by the same copyright terms
23505  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
23506  *
23507  * Copyright remains Eric Young's, and as such any Copyright notices in
23508  * the code are not to be removed.
23509  * If this package is used in a product, Eric Young should be given attribution
23510  * as the author of the parts of the library used.
23511  * This can be in the form of a textual message at program startup or
23512  * in documentation (online or textual) provided with the package.
23513  *
23514  * Redistribution and use in source and binary forms, with or without
23515  * modification, are permitted provided that the following conditions
23516  * are met:
23517  * 1. Redistributions of source code must retain the copyright
23518  *    notice, this list of conditions and the following disclaimer.
23519  * 2. Redistributions in binary form must reproduce the above copyright
23520  *    notice, this list of conditions and the following disclaimer in the
23521  *    documentation and/or other materials provided with the distribution.
23522  * 3. All advertising materials mentioning features or use of this software
23523  *    must display the following acknowledgement:
23524  *    "This product includes cryptographic software written by
23525  *     Eric Young (eay@cryptsoft.com)"
23526  *    The word 'cryptographic' can be left out if the rouines from the library
23527  *    being used are not cryptographic related :-).
23528  * 4. If you include any Windows specific code (or a derivative thereof) from
23529  *    the apps directory (application code) you must include an acknowledgement:
23530  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
23531  *
23532  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
23533  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23534  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23535  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23536  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23537  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23538  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23539  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23540  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23541  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23542  * SUCH DAMAGE.
23543  *
23544  * The licence and distribution terms for any publically available version or
23545  * derivative of this code cannot be changed.  i.e. this code cannot simply be
23546  * copied and put under another distribution licence
23547  * [including the GNU Public Licence.]
23548  */
23549 /* ====================================================================
23550  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
23551  * ECDH support in OpenSSL originally developed by
23552  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
23553  */
23554 # 76 "/usr/include/openssl/x509_vfy.h" 2 3 4
23555 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
23556 /* ====================================================================
23557  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
23558  *
23559  * Redistribution and use in source and binary forms, with or without
23560  * modification, are permitted provided that the following conditions
23561  * are met:
23562  *
23563  * 1. Redistributions of source code must retain the above copyright
23564  *    notice, this list of conditions and the following disclaimer.
23565  *
23566  * 2. Redistributions in binary form must reproduce the above copyright
23567  *    notice, this list of conditions and the following disclaimer in
23568  *    the documentation and/or other materials provided with the
23569  *    distribution.
23570  *
23571  * 3. All advertising materials mentioning features or use of this
23572  *    software must display the following acknowledgment:
23573  *    "This product includes software developed by the OpenSSL Project
23574  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23575  *
23576  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23577  *    endorse or promote products derived from this software without
23578  *    prior written permission. For written permission, please contact
23579  *    openssl-core@openssl.org.
23580  *
23581  * 5. Products derived from this software may not be called "OpenSSL"
23582  *    nor may "OpenSSL" appear in their names without prior written
23583  *    permission of the OpenSSL Project.
23584  *
23585  * 6. Redistributions of any form whatsoever must retain the following
23586  *    acknowledgment:
23587  *    "This product includes software developed by the OpenSSL Project
23588  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
23589  *
23590  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
23591  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23592  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23593  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
23594  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23595  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23596  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23597  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23598  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23599  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23600  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23601  * OF THE POSSIBILITY OF SUCH DAMAGE.
23602  * ====================================================================
23603  *
23604  * This product includes cryptographic software written by Eric Young
23605  * (eay@cryptsoft.com).  This product includes software written by Tim
23606  * Hudson (tjh@cryptsoft.com).
23607  *
23608  */
23609 # 77 "/usr/include/openssl/x509_vfy.h" 2 3 4
23610 # 92 "/usr/include/openssl/x509_vfy.h" 3 4
23611 typedef struct x509_file_st {
23612     int num_paths; /* number of paths to files or directories */
23613     int num_alloced;
23614     char **paths; /* the list of paths or directories */
23615     int *path_type;
23616 } X509_CERT_FILE_CTX;
23617 
23618 /*******************************/
23619 /*-
23620 SSL_CTX -> X509_STORE
23621                 -> X509_LOOKUP
23622                         ->X509_LOOKUP_METHOD
23623                 -> X509_LOOKUP
23624                         ->X509_LOOKUP_METHOD
23625 
23626 SSL     -> X509_STORE_CTX
23627                 ->X509_STORE
23628 
23629 The X509_STORE holds the tables etc for verification stuff.
23630 A X509_STORE_CTX is used while validating a single certificate.
23631 The X509_STORE has X509_LOOKUPs for looking up certs.
23632 The X509_STORE then calls a function to actually verify the
23633 certificate chain.
23634 */
23635 
23636 
23637 
23638 
23639 
23640 
23641 
23642 typedef struct x509_object_st {
23643     /* one of the above types */
23644     int type;
23645     union {
23646         char *ptr;
23647         X509 *x509;
23648         X509_CRL *crl;
23649         EVP_PKEY *pkey;
23650     } data;
23651 } X509_OBJECT;
23652 
23653 typedef struct x509_lookup_st X509_LOOKUP;
23654 
23655 struct stack_st_X509_LOOKUP { _STACK stack; };
23656 struct stack_st_X509_OBJECT { _STACK stack; };
23657 
23658 /* This is a static that defines the function interface */
23659 typedef struct x509_lookup_method_st {
23660     const char *name;
23661     int (*new_item) (X509_LOOKUP *ctx);
23662     void (*free) (X509_LOOKUP *ctx);
23663     int (*init) (X509_LOOKUP *ctx);
23664     int (*shutdown) (X509_LOOKUP *ctx);
23665     int (*ctrl) (X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
23666                  char **ret);
23667     int (*get_by_subject) (X509_LOOKUP *ctx, int type, X509_NAME *name,
23668                            X509_OBJECT *ret);
23669     int (*get_by_issuer_serial) (X509_LOOKUP *ctx, int type, X509_NAME *name,
23670                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
23671     int (*get_by_fingerprint) (X509_LOOKUP *ctx, int type,
23672                                unsigned char *bytes, int len,
23673                                X509_OBJECT *ret);
23674     int (*get_by_alias) (X509_LOOKUP *ctx, int type, char *str, int len,
23675                          X509_OBJECT *ret);
23676 } X509_LOOKUP_METHOD;
23677 
23678 typedef struct X509_VERIFY_PARAM_ID_st X509_VERIFY_PARAM_ID;
23679 
23680 /*
23681  * This structure hold all parameters associated with a verify operation by
23682  * including an X509_VERIFY_PARAM structure in related structures the
23683  * parameters used can be customized
23684  */
23685 
23686 typedef struct X509_VERIFY_PARAM_st {
23687     char *name;
23688     time_t check_time; /* Time to use */
23689     unsigned long inh_flags; /* Inheritance flags */
23690     unsigned long flags; /* Various verify flags */
23691     int purpose; /* purpose to check untrusted certificates */
23692     int trust; /* trust setting to check */
23693     int depth; /* Verify depth */
23694     struct stack_st_ASN1_OBJECT *policies; /* Permissible policies */
23695     X509_VERIFY_PARAM_ID *id; /* opaque ID data */
23696 } X509_VERIFY_PARAM;
23697 
23698 struct stack_st_X509_VERIFY_PARAM { _STACK stack; };
23699 
23700 /*
23701  * This is used to hold everything.  It is used for all certificate
23702  * validation.  Once we have a certificate chain, the 'verify' function is
23703  * then called to actually check the cert chain.
23704  */
23705 struct x509_store_st {
23706     /* The following is a cache of trusted certs */
23707     int cache; /* if true, stash any hits */
23708     struct stack_st_X509_OBJECT *objs; /* Cache of all objects */
23709     /* These are external lookup methods */
23710     struct stack_st_X509_LOOKUP *get_cert_methods;
23711     X509_VERIFY_PARAM *param;
23712     /* Callbacks for various operations */
23713     /* called to verify a certificate */
23714     int (*verify) (X509_STORE_CTX *ctx);
23715     /* error callback */
23716     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
23717     /* get issuers cert from ctx */
23718     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
23719     /* check issued */
23720     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
23721     /* Check revocation status of chain */
23722     int (*check_revocation) (X509_STORE_CTX *ctx);
23723     /* retrieve CRL */
23724     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
23725     /* Check CRL validity */
23726     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
23727     /* Check certificate against CRL */
23728     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
23729     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
23730     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
23731     int (*cleanup) (X509_STORE_CTX *ctx);
23732     CRYPTO_EX_DATA ex_data;
23733     int references;
23734 } /* X509_STORE */ ;
23735 
23736 int X509_STORE_set_depth(X509_STORE *store, int depth);
23737 
23738 
23739 
23740 
23741 /* This is the functions plus an instance of the local variables. */
23742 struct x509_lookup_st {
23743     int init; /* have we been started */
23744     int skip; /* don't use us. */
23745     X509_LOOKUP_METHOD *method; /* the functions */
23746     char *method_data; /* method data */
23747     X509_STORE *store_ctx; /* who owns us */
23748 } /* X509_LOOKUP */ ;
23749 
23750 /*
23751  * This is a used when verifying cert chains.  Since the gathering of the
23752  * cert chain can take some time (and have to be 'retried', this needs to be
23753  * kept and passed around.
23754  */
23755 struct x509_store_ctx_st { /* X509_STORE_CTX */
23756     X509_STORE *ctx;
23757     /* used when looking up certs */
23758     int current_method;
23759     /* The following are set by the caller */
23760     /* The cert to check */
23761     X509 *cert;
23762     /* chain of X509s - untrusted - passed in */
23763     struct stack_st_X509 *untrusted;
23764     /* set of CRLs passed in */
23765     struct stack_st_X509_CRL *crls;
23766     X509_VERIFY_PARAM *param;
23767     /* Other info for use with get_issuer() */
23768     void *other_ctx;
23769     /* Callbacks for various operations */
23770     /* called to verify a certificate */
23771     int (*verify) (X509_STORE_CTX *ctx);
23772     /* error callback */
23773     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
23774     /* get issuers cert from ctx */
23775     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
23776     /* check issued */
23777     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
23778     /* Check revocation status of chain */
23779     int (*check_revocation) (X509_STORE_CTX *ctx);
23780     /* retrieve CRL */
23781     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
23782     /* Check CRL validity */
23783     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
23784     /* Check certificate against CRL */
23785     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
23786     int (*check_policy) (X509_STORE_CTX *ctx);
23787     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
23788     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
23789     int (*cleanup) (X509_STORE_CTX *ctx);
23790     /* The following is built up */
23791     /* if 0, rebuild chain */
23792     int valid;
23793     /* index of last untrusted cert */
23794     int last_untrusted;
23795     /* chain of X509s - built up and trusted */
23796     struct stack_st_X509 *chain;
23797     /* Valid policy tree */
23798     X509_POLICY_TREE *tree;
23799     /* Require explicit policy value */
23800     int explicit_policy;
23801     /* When something goes wrong, this is why */
23802     int error_depth;
23803     int error;
23804     X509 *current_cert;
23805     /* cert currently being tested as valid issuer */
23806     X509 *current_issuer;
23807     /* current CRL */
23808     X509_CRL *current_crl;
23809     /* score of current CRL */
23810     int current_crl_score;
23811     /* Reason mask */
23812     unsigned int current_reasons;
23813     /* For CRL path validation: parent context */
23814     X509_STORE_CTX *parent;
23815     CRYPTO_EX_DATA ex_data;
23816 } /* X509_STORE_CTX */ ;
23817 
23818 void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
23819 # 345 "/usr/include/openssl/x509_vfy.h" 3 4
23820 /* These are 'informational' when looking for issuer cert */
23821 # 377 "/usr/include/openssl/x509_vfy.h" 3 4
23822 /* Suite B mode algorithm violation */
23823 
23824 
23825 
23826 
23827 
23828 
23829 
23830 /* Host, email and IP check errors */
23831 
23832 
23833 
23834 
23835 /* Caller error */
23836 
23837 /* Issuer lookup error */
23838 
23839 
23840 
23841 
23842 /* Certificate verify flags */
23843 
23844 /* Send issuer+subject checks to verify_cb */
23845 
23846 /* Use check time instead of current time */
23847 
23848 /* Lookup CRLs */
23849 
23850 /* Lookup CRLs for whole chain */
23851 
23852 /* Ignore unhandled critical extensions */
23853 
23854 /* Disable workarounds for broken certificates */
23855 
23856 /* Enable proxy certificate validation */
23857 
23858 /* Enable policy checking */
23859 
23860 /* Policy variable require-explicit-policy */
23861 
23862 /* Policy variable inhibit-any-policy */
23863 
23864 /* Policy variable inhibit-policy-mapping */
23865 
23866 /* Notify callback that policy is OK */
23867 
23868 /* Extended CRL features such as indirect CRLs, alternate CRL signing keys */
23869 
23870 /* Delta CRL support */
23871 
23872 /* Check selfsigned CA signature */
23873 
23874 /* Use trusted store first */
23875 
23876 /* Suite B 128 bit only mode: not normally used */
23877 
23878 /* Suite B 192 bit only mode */
23879 
23880 /* Suite B 128 bit mode allowing 192 bit algorithms */
23881 
23882 
23883 /* Allow partial chains if at least one certificate is in trusted store */
23884 
23885 /*
23886  * If the initial chain is not trusted, do not attempt to build an alternative
23887  * chain. Alternate chain checking was introduced in 1.0.2b. Setting this flag
23888  * will force the behaviour to match that of previous versions.
23889  */
23890 # 453 "/usr/include/openssl/x509_vfy.h" 3 4
23891 /* Internal use: mask of policy related options */
23892 
23893 
23894 
23895 
23896 
23897 int X509_OBJECT_idx_by_subject(struct stack_st_X509_OBJECT *h, int type,
23898                                X509_NAME *name);
23899 X509_OBJECT *X509_OBJECT_retrieve_by_subject(struct stack_st_X509_OBJECT *h,
23900                                              int type, X509_NAME *name);
23901 X509_OBJECT *X509_OBJECT_retrieve_match(struct stack_st_X509_OBJECT *h,
23902                                         X509_OBJECT *x);
23903 void X509_OBJECT_up_ref_count(X509_OBJECT *a);
23904 void X509_OBJECT_free_contents(X509_OBJECT *a);
23905 X509_STORE *X509_STORE_new(void);
23906 void X509_STORE_free(X509_STORE *v);
23907 
23908 struct stack_st_X509 *X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm);
23909 struct stack_st_X509_CRL *X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm);
23910 int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);
23911 int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
23912 int X509_STORE_set_trust(X509_STORE *ctx, int trust);
23913 int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);
23914 
23915 void X509_STORE_set_verify_cb(X509_STORE *ctx,
23916                               int (*verify_cb) (int, X509_STORE_CTX *));
23917 
23918 void X509_STORE_set_lookup_crls_cb(X509_STORE *ctx,
23919                                    struct stack_st_X509_CRL *(*cb) (X509_STORE_CTX
23920                                                               *ctx,
23921                                                               X509_NAME *nm));
23922 
23923 X509_STORE_CTX *X509_STORE_CTX_new(void);
23924 
23925 int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
23926 
23927 void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
23928 int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
23929                         X509 *x509, struct stack_st_X509 *chain);
23930 void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, struct stack_st_X509 *sk);
23931 void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
23932 
23933 X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx);
23934 
23935 X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);
23936 
23937 X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);
23938 X509_LOOKUP_METHOD *X509_LOOKUP_file(void);
23939 
23940 int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
23941 int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
23942 
23943 int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name,
23944                               X509_OBJECT *ret);
23945 
23946 int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
23947                      long argl, char **ret);
23948 
23949 
23950 int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
23951 int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
23952 int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
23953 
23954 
23955 X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
23956 void X509_LOOKUP_free(X509_LOOKUP *ctx);
23957 int X509_LOOKUP_init(X509_LOOKUP *ctx);
23958 int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name,
23959                            X509_OBJECT *ret);
23960 int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name,
23961                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
23962 int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type,
23963                                unsigned char *bytes, int len,
23964                                X509_OBJECT *ret);
23965 int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len,
23966                          X509_OBJECT *ret);
23967 int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
23968 
23969 
23970 int X509_STORE_load_locations(X509_STORE *ctx,
23971                               const char *file, const char *dir);
23972 int X509_STORE_set_default_paths(X509_STORE *ctx);
23973 
23974 
23975 int X509_STORE_CTX_get_ex_new_index(long argl, void *argp,
23976                                     CRYPTO_EX_new *new_func,
23977                                     CRYPTO_EX_dup *dup_func,
23978                                     CRYPTO_EX_free *free_func);
23979 int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data);
23980 void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx);
23981 int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
23982 void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);
23983 int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
23984 X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
23985 X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);
23986 X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);
23987 X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);
23988 struct stack_st_X509 *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
23989 struct stack_st_X509 *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);
23990 void X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x);
23991 void X509_STORE_CTX_set_chain(X509_STORE_CTX *c, struct stack_st_X509 *sk);
23992 void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, struct stack_st_X509_CRL *sk);
23993 int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
23994 int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
23995 int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
23996                                    int purpose, int trust);
23997 void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
23998 void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
23999                              time_t t);
24000 void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
24001                                   int (*verify_cb) (int, X509_STORE_CTX *));
24002 
24003 X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);
24004 int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);
24005 
24006 X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
24007 void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
24008 int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
24009 
24010 /* X509_VERIFY_PARAM functions */
24011 
24012 X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);
24013 void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);
24014 int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,
24015                               const X509_VERIFY_PARAM *from);
24016 int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,
24017                            const X509_VERIFY_PARAM *from);
24018 int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);
24019 int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,
24020                                 unsigned long flags);
24021 int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
24022                                   unsigned long flags);
24023 unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);
24024 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
24025 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
24026 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
24027 void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);
24028 int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,
24029                                   ASN1_OBJECT *policy);
24030 int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param,
24031                                     struct stack_st_ASN1_OBJECT *policies);
24032 
24033 int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param,
24034                                 const char *name, size_t namelen);
24035 int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param,
24036                                 const char *name, size_t namelen);
24037 void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
24038                                      unsigned int flags);
24039 char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *);
24040 int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
24041                                  const char *email, size_t emaillen);
24042 int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
24043                               const unsigned char *ip, size_t iplen);
24044 int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param,
24045                                   const char *ipasc);
24046 
24047 int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
24048 const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param);
24049 
24050 int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
24051 int X509_VERIFY_PARAM_get_count(void);
24052 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id);
24053 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
24054 void X509_VERIFY_PARAM_table_cleanup(void);
24055 
24056 int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
24057                       struct stack_st_X509 *certs,
24058                       struct stack_st_ASN1_OBJECT *policy_oids, unsigned int flags);
24059 
24060 void X509_policy_tree_free(X509_POLICY_TREE *tree);
24061 
24062 int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
24063 X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree,
24064                                                int i);
24065 
24066 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_policies(const
24067                                                            X509_POLICY_TREE
24068                                                            *tree);
24069 
24070 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_user_policies(const
24071                                                                 X509_POLICY_TREE
24072                                                                 *tree);
24073 
24074 int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
24075 
24076 X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level,
24077                                               int i);
24078 
24079 const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
24080 
24081 struct stack_st_POLICYQUALINFO *X509_policy_node_get0_qualifiers(const
24082                                                            X509_POLICY_NODE
24083                                                            *node);
24084 const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE
24085                                                      *node);
24086 # 582 "/usr/include/openssl/x509.h" 2 3 4
24087 # 1 "/usr/include/openssl/pkcs7.h" 1 3 4
24088 /* crypto/pkcs7/pkcs7.h */
24089 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
24090  * All rights reserved.
24091  *
24092  * This package is an SSL implementation written
24093  * by Eric Young (eay@cryptsoft.com).
24094  * The implementation was written so as to conform with Netscapes SSL.
24095  *
24096  * This library is free for commercial and non-commercial use as long as
24097  * the following conditions are aheared to.  The following conditions
24098  * apply to all code found in this distribution, be it the RC4, RSA,
24099  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
24100  * included with this distribution is covered by the same copyright terms
24101  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
24102  *
24103  * Copyright remains Eric Young's, and as such any Copyright notices in
24104  * the code are not to be removed.
24105  * If this package is used in a product, Eric Young should be given attribution
24106  * as the author of the parts of the library used.
24107  * This can be in the form of a textual message at program startup or
24108  * in documentation (online or textual) provided with the package.
24109  *
24110  * Redistribution and use in source and binary forms, with or without
24111  * modification, are permitted provided that the following conditions
24112  * are met:
24113  * 1. Redistributions of source code must retain the copyright
24114  *    notice, this list of conditions and the following disclaimer.
24115  * 2. Redistributions in binary form must reproduce the above copyright
24116  *    notice, this list of conditions and the following disclaimer in the
24117  *    documentation and/or other materials provided with the distribution.
24118  * 3. All advertising materials mentioning features or use of this software
24119  *    must display the following acknowledgement:
24120  *    "This product includes cryptographic software written by
24121  *     Eric Young (eay@cryptsoft.com)"
24122  *    The word 'cryptographic' can be left out if the rouines from the library
24123  *    being used are not cryptographic related :-).
24124  * 4. If you include any Windows specific code (or a derivative thereof) from
24125  *    the apps directory (application code) you must include an acknowledgement:
24126  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
24127  *
24128  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
24129  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24130  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24131  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24132  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24133  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24134  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24135  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24136  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24137  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24138  * SUCH DAMAGE.
24139  *
24140  * The licence and distribution terms for any publically available version or
24141  * derivative of this code cannot be changed.  i.e. this code cannot simply be
24142  * copied and put under another distribution licence
24143  * [including the GNU Public Licence.]
24144  */
24145 
24146 
24147 
24148 
24149 # 1 "/usr/include/openssl/asn1.h" 1 3 4
24150 /* crypto/asn1/asn1.h */
24151 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
24152  * All rights reserved.
24153  *
24154  * This package is an SSL implementation written
24155  * by Eric Young (eay@cryptsoft.com).
24156  * The implementation was written so as to conform with Netscapes SSL.
24157  *
24158  * This library is free for commercial and non-commercial use as long as
24159  * the following conditions are aheared to.  The following conditions
24160  * apply to all code found in this distribution, be it the RC4, RSA,
24161  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
24162  * included with this distribution is covered by the same copyright terms
24163  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
24164  *
24165  * Copyright remains Eric Young's, and as such any Copyright notices in
24166  * the code are not to be removed.
24167  * If this package is used in a product, Eric Young should be given attribution
24168  * as the author of the parts of the library used.
24169  * This can be in the form of a textual message at program startup or
24170  * in documentation (online or textual) provided with the package.
24171  *
24172  * Redistribution and use in source and binary forms, with or without
24173  * modification, are permitted provided that the following conditions
24174  * are met:
24175  * 1. Redistributions of source code must retain the copyright
24176  *    notice, this list of conditions and the following disclaimer.
24177  * 2. Redistributions in binary form must reproduce the above copyright
24178  *    notice, this list of conditions and the following disclaimer in the
24179  *    documentation and/or other materials provided with the distribution.
24180  * 3. All advertising materials mentioning features or use of this software
24181  *    must display the following acknowledgement:
24182  *    "This product includes cryptographic software written by
24183  *     Eric Young (eay@cryptsoft.com)"
24184  *    The word 'cryptographic' can be left out if the rouines from the library
24185  *    being used are not cryptographic related :-).
24186  * 4. If you include any Windows specific code (or a derivative thereof) from
24187  *    the apps directory (application code) you must include an acknowledgement:
24188  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
24189  *
24190  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
24191  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24192  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24193  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24194  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24195  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24196  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24197  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24198  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24199  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24200  * SUCH DAMAGE.
24201  *
24202  * The licence and distribution terms for any publically available version or
24203  * derivative of this code cannot be changed.  i.e. this code cannot simply be
24204  * copied and put under another distribution licence
24205  * [including the GNU Public Licence.]
24206  */
24207 # 63 "/usr/include/openssl/pkcs7.h" 2 3 4
24208 # 1 "/usr/include/openssl/bio.h" 1 3 4
24209 /* crypto/bio/bio.h */
24210 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
24211  * All rights reserved.
24212  *
24213  * This package is an SSL implementation written
24214  * by Eric Young (eay@cryptsoft.com).
24215  * The implementation was written so as to conform with Netscapes SSL.
24216  *
24217  * This library is free for commercial and non-commercial use as long as
24218  * the following conditions are aheared to.  The following conditions
24219  * apply to all code found in this distribution, be it the RC4, RSA,
24220  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
24221  * included with this distribution is covered by the same copyright terms
24222  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
24223  *
24224  * Copyright remains Eric Young's, and as such any Copyright notices in
24225  * the code are not to be removed.
24226  * If this package is used in a product, Eric Young should be given attribution
24227  * as the author of the parts of the library used.
24228  * This can be in the form of a textual message at program startup or
24229  * in documentation (online or textual) provided with the package.
24230  *
24231  * Redistribution and use in source and binary forms, with or without
24232  * modification, are permitted provided that the following conditions
24233  * are met:
24234  * 1. Redistributions of source code must retain the copyright
24235  *    notice, this list of conditions and the following disclaimer.
24236  * 2. Redistributions in binary form must reproduce the above copyright
24237  *    notice, this list of conditions and the following disclaimer in the
24238  *    documentation and/or other materials provided with the distribution.
24239  * 3. All advertising materials mentioning features or use of this software
24240  *    must display the following acknowledgement:
24241  *    "This product includes cryptographic software written by
24242  *     Eric Young (eay@cryptsoft.com)"
24243  *    The word 'cryptographic' can be left out if the rouines from the library
24244  *    being used are not cryptographic related :-).
24245  * 4. If you include any Windows specific code (or a derivative thereof) from
24246  *    the apps directory (application code) you must include an acknowledgement:
24247  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
24248  *
24249  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
24250  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24251  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24252  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24253  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24254  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24255  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24256  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24257  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24258  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24259  * SUCH DAMAGE.
24260  *
24261  * The licence and distribution terms for any publically available version or
24262  * derivative of this code cannot be changed.  i.e. this code cannot simply be
24263  * copied and put under another distribution licence
24264  * [including the GNU Public Licence.]
24265  */
24266 # 64 "/usr/include/openssl/pkcs7.h" 2 3 4
24267 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
24268 /* e_os2.h */
24269 /* ====================================================================
24270  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
24271  *
24272  * Redistribution and use in source and binary forms, with or without
24273  * modification, are permitted provided that the following conditions
24274  * are met:
24275  *
24276  * 1. Redistributions of source code must retain the above copyright
24277  *    notice, this list of conditions and the following disclaimer.
24278  *
24279  * 2. Redistributions in binary form must reproduce the above copyright
24280  *    notice, this list of conditions and the following disclaimer in
24281  *    the documentation and/or other materials provided with the
24282  *    distribution.
24283  *
24284  * 3. All advertising materials mentioning features or use of this
24285  *    software must display the following acknowledgment:
24286  *    "This product includes software developed by the OpenSSL Project
24287  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24288  *
24289  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
24290  *    endorse or promote products derived from this software without
24291  *    prior written permission. For written permission, please contact
24292  *    openssl-core@openssl.org.
24293  *
24294  * 5. Products derived from this software may not be called "OpenSSL"
24295  *    nor may "OpenSSL" appear in their names without prior written
24296  *    permission of the OpenSSL Project.
24297  *
24298  * 6. Redistributions of any form whatsoever must retain the following
24299  *    acknowledgment:
24300  *    "This product includes software developed by the OpenSSL Project
24301  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
24302  *
24303  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
24304  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24305  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24306  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
24307  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24308  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24309  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24310  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24311  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24312  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24313  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
24314  * OF THE POSSIBILITY OF SUCH DAMAGE.
24315  * ====================================================================
24316  *
24317  * This product includes cryptographic software written by Eric Young
24318  * (eay@cryptsoft.com).  This product includes software written by Tim
24319  * Hudson (tjh@cryptsoft.com).
24320  *
24321  */
24322 
24323 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
24324 /* opensslconf.h */
24325 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
24326 
24327 
24328 
24329 
24330 /* OpenSSL was configured with the following options: */
24331 # 108 "/usr/include/openssl/opensslconf.h" 3 4
24332 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
24333    asks for it.  This is a transient feature that is provided for those
24334    who haven't had the time to do the appropriate changes in their
24335    applications.  */
24336 # 204 "/usr/include/openssl/opensslconf.h" 3 4
24337 /* crypto/opensslconf.h.in */
24338 
24339 /* Generate 80386 code? */
24340 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
24341 # 65 "/usr/include/openssl/pkcs7.h" 2 3 4
24342 
24343 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
24344 /* ====================================================================
24345  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
24346  *
24347  * Redistribution and use in source and binary forms, with or without
24348  * modification, are permitted provided that the following conditions
24349  * are met:
24350  *
24351  * 1. Redistributions of source code must retain the above copyright
24352  *    notice, this list of conditions and the following disclaimer.
24353  *
24354  * 2. Redistributions in binary form must reproduce the above copyright
24355  *    notice, this list of conditions and the following disclaimer in
24356  *    the documentation and/or other materials provided with the
24357  *    distribution.
24358  *
24359  * 3. All advertising materials mentioning features or use of this
24360  *    software must display the following acknowledgment:
24361  *    "This product includes software developed by the OpenSSL Project
24362  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24363  *
24364  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
24365  *    endorse or promote products derived from this software without
24366  *    prior written permission. For written permission, please contact
24367  *    openssl-core@openssl.org.
24368  *
24369  * 5. Products derived from this software may not be called "OpenSSL"
24370  *    nor may "OpenSSL" appear in their names without prior written
24371  *    permission of the OpenSSL Project.
24372  *
24373  * 6. Redistributions of any form whatsoever must retain the following
24374  *    acknowledgment:
24375  *    "This product includes software developed by the OpenSSL Project
24376  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
24377  *
24378  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
24379  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24380  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24381  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
24382  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24383  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24384  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24385  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24386  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24387  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24388  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
24389  * OF THE POSSIBILITY OF SUCH DAMAGE.
24390  * ====================================================================
24391  *
24392  * This product includes cryptographic software written by Eric Young
24393  * (eay@cryptsoft.com).  This product includes software written by Tim
24394  * Hudson (tjh@cryptsoft.com).
24395  *
24396  */
24397 # 67 "/usr/include/openssl/pkcs7.h" 2 3 4
24398 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
24399 /* ====================================================================
24400  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
24401  *
24402  * Redistribution and use in source and binary forms, with or without
24403  * modification, are permitted provided that the following conditions
24404  * are met:
24405  *
24406  * 1. Redistributions of source code must retain the above copyright
24407  *    notice, this list of conditions and the following disclaimer.
24408  *
24409  * 2. Redistributions in binary form must reproduce the above copyright
24410  *    notice, this list of conditions and the following disclaimer in
24411  *    the documentation and/or other materials provided with the
24412  *    distribution.
24413  *
24414  * 3. All advertising materials mentioning features or use of this
24415  *    software must display the following acknowledgment:
24416  *    "This product includes software developed by the OpenSSL Project
24417  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24418  *
24419  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
24420  *    endorse or promote products derived from this software without
24421  *    prior written permission. For written permission, please contact
24422  *    openssl-core@openssl.org.
24423  *
24424  * 5. Products derived from this software may not be called "OpenSSL"
24425  *    nor may "OpenSSL" appear in their names without prior written
24426  *    permission of the OpenSSL Project.
24427  *
24428  * 6. Redistributions of any form whatsoever must retain the following
24429  *    acknowledgment:
24430  *    "This product includes software developed by the OpenSSL Project
24431  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
24432  *
24433  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
24434  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24435  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24436  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
24437  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24438  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24439  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24440  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24441  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24442  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24443  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
24444  * OF THE POSSIBILITY OF SUCH DAMAGE.
24445  * ====================================================================
24446  *
24447  * This product includes cryptographic software written by Eric Young
24448  * (eay@cryptsoft.com).  This product includes software written by Tim
24449  * Hudson (tjh@cryptsoft.com).
24450  *
24451  */
24452 # 68 "/usr/include/openssl/pkcs7.h" 2 3 4
24453 # 79 "/usr/include/openssl/pkcs7.h" 3 4
24454 /*-
24455 Encryption_ID           DES-CBC
24456 Digest_ID               MD5
24457 Digest_Encryption_ID    rsaEncryption
24458 Key_Encryption_ID       rsaEncryption
24459 */
24460 
24461 typedef struct pkcs7_issuer_and_serial_st {
24462     X509_NAME *issuer;
24463     ASN1_INTEGER *serial;
24464 } PKCS7_ISSUER_AND_SERIAL;
24465 
24466 typedef struct pkcs7_signer_info_st {
24467     ASN1_INTEGER *version; /* version 1 */
24468     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
24469     X509_ALGOR *digest_alg;
24470     struct stack_st_X509_ATTRIBUTE *auth_attr; /* [ 0 ] */
24471     X509_ALGOR *digest_enc_alg;
24472     ASN1_OCTET_STRING *enc_digest;
24473     struct stack_st_X509_ATTRIBUTE *unauth_attr; /* [ 1 ] */
24474     /* The private key to sign with */
24475     EVP_PKEY *pkey;
24476 } PKCS7_SIGNER_INFO;
24477 
24478 struct stack_st_PKCS7_SIGNER_INFO { _STACK stack; };
24479 
24480 
24481 typedef struct pkcs7_recip_info_st {
24482     ASN1_INTEGER *version; /* version 0 */
24483     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
24484     X509_ALGOR *key_enc_algor;
24485     ASN1_OCTET_STRING *enc_key;
24486     X509 *cert; /* get the pub-key from this */
24487 } PKCS7_RECIP_INFO;
24488 
24489 struct stack_st_PKCS7_RECIP_INFO { _STACK stack; };
24490 
24491 
24492 typedef struct pkcs7_signed_st {
24493     ASN1_INTEGER *version; /* version 1 */
24494     struct stack_st_X509_ALGOR *md_algs; /* md used */
24495     struct stack_st_X509 *cert; /* [ 0 ] */
24496     struct stack_st_X509_CRL *crl; /* [ 1 ] */
24497     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
24498     struct pkcs7_st *contents;
24499 } PKCS7_SIGNED;
24500 /*
24501  * The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about
24502  * merging the two
24503  */
24504 
24505 typedef struct pkcs7_enc_content_st {
24506     ASN1_OBJECT *content_type;
24507     X509_ALGOR *algorithm;
24508     ASN1_OCTET_STRING *enc_data; /* [ 0 ] */
24509     const EVP_CIPHER *cipher;
24510 } PKCS7_ENC_CONTENT;
24511 
24512 typedef struct pkcs7_enveloped_st {
24513     ASN1_INTEGER *version; /* version 0 */
24514     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
24515     PKCS7_ENC_CONTENT *enc_data;
24516 } PKCS7_ENVELOPE;
24517 
24518 typedef struct pkcs7_signedandenveloped_st {
24519     ASN1_INTEGER *version; /* version 1 */
24520     struct stack_st_X509_ALGOR *md_algs; /* md used */
24521     struct stack_st_X509 *cert; /* [ 0 ] */
24522     struct stack_st_X509_CRL *crl; /* [ 1 ] */
24523     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
24524     PKCS7_ENC_CONTENT *enc_data;
24525     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
24526 } PKCS7_SIGN_ENVELOPE;
24527 
24528 typedef struct pkcs7_digest_st {
24529     ASN1_INTEGER *version; /* version 0 */
24530     X509_ALGOR *md; /* md used */
24531     struct pkcs7_st *contents;
24532     ASN1_OCTET_STRING *digest;
24533 } PKCS7_DIGEST;
24534 
24535 typedef struct pkcs7_encrypted_st {
24536     ASN1_INTEGER *version; /* version 0 */
24537     PKCS7_ENC_CONTENT *enc_data;
24538 } PKCS7_ENCRYPT;
24539 
24540 typedef struct pkcs7_st {
24541     /*
24542      * The following is non NULL if it contains ASN1 encoding of this
24543      * structure
24544      */
24545     unsigned char *asn1;
24546     long length;
24547 
24548 
24549 
24550     int state; /* used during processing */
24551     int detached;
24552     ASN1_OBJECT *type;
24553     /* content as defined by the type */
24554     /*
24555      * all encryption/message digests are applied to the 'contents', leaving
24556      * out the 'type' field.
24557      */
24558     union {
24559         char *ptr;
24560         /* NID_pkcs7_data */
24561         ASN1_OCTET_STRING *data;
24562         /* NID_pkcs7_signed */
24563         PKCS7_SIGNED *sign;
24564         /* NID_pkcs7_enveloped */
24565         PKCS7_ENVELOPE *enveloped;
24566         /* NID_pkcs7_signedAndEnveloped */
24567         PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
24568         /* NID_pkcs7_digest */
24569         PKCS7_DIGEST *digest;
24570         /* NID_pkcs7_encrypted */
24571         PKCS7_ENCRYPT *encrypted;
24572         /* Anything else */
24573         ASN1_TYPE *other;
24574     } d;
24575 } PKCS7;
24576 
24577 struct stack_st_PKCS7 { _STACK stack; };
24578 
24579 
24580 # 227 "/usr/include/openssl/pkcs7.h" 3 4
24581 /* S/MIME related flags */
24582 # 246 "/usr/include/openssl/pkcs7.h" 3 4
24583 /* Flags: for compatibility with older code */
24584 # 258 "/usr/include/openssl/pkcs7.h" 3 4
24585 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;
24586 
24587 int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
24588                                    const EVP_MD *type, unsigned char *md,
24589                                    unsigned int *len);
24590 
24591 PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
24592 int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7);
24593 
24594 PKCS7 *PKCS7_dup(PKCS7 *p7);
24595 PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
24596 int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7);
24597 int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
24598 int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
24599 
24600 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;
24601 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;
24602 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;
24603 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;
24604 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;
24605 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;
24606 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;
24607 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;
24608 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;
24609 
24610 extern const ASN1_ITEM PKCS7_ATTR_SIGN_it;
24611 extern const ASN1_ITEM PKCS7_ATTR_VERIFY_it;
24612 
24613 int i2d_PKCS7_NDEF(PKCS7 *a, unsigned char **out);
24614 int PKCS7_print_ctx(BIO *out, PKCS7 *x, int indent, const ASN1_PCTX *pctx);
24615 
24616 long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
24617 
24618 int PKCS7_set_type(PKCS7 *p7, int type);
24619 int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
24620 int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
24621 int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
24622                           const EVP_MD *dgst);
24623 int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
24624 int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
24625 int PKCS7_add_certificate(PKCS7 *p7, X509 *x509);
24626 int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
24627 int PKCS7_content_new(PKCS7 *p7, int nid);
24628 int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
24629                      BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
24630 int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
24631                           X509 *x509);
24632 
24633 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
24634 int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
24635 BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
24636 
24637 PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
24638                                        EVP_PKEY *pkey, const EVP_MD *dgst);
24639 X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
24640 int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
24641 struct stack_st_PKCS7_SIGNER_INFO *PKCS7_get_signer_info(PKCS7 *p7);
24642 
24643 PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
24644 void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
24645                                  X509_ALGOR **pdig, X509_ALGOR **psig);
24646 void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
24647 int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
24648 int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
24649 int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
24650 int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
24651 
24652 PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
24653 ASN1_OCTET_STRING *PKCS7_digest_from_attributes(struct stack_st_X509_ATTRIBUTE *sk);
24654 int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,
24655                                void *data);
24656 int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
24657                         void *value);
24658 ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid);
24659 ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid);
24660 int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
24661                                 struct stack_st_X509_ATTRIBUTE *sk);
24662 int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
24663                          struct stack_st_X509_ATTRIBUTE *sk);
24664 
24665 PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, struct stack_st_X509 *certs,
24666                   BIO *data, int flags);
24667 
24668 PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
24669                                          X509 *signcert, EVP_PKEY *pkey,
24670                                          const EVP_MD *md, int flags);
24671 
24672 int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
24673 int PKCS7_verify(PKCS7 *p7, struct stack_st_X509 *certs, X509_STORE *store,
24674                  BIO *indata, BIO *out, int flags);
24675 struct stack_st_X509 *PKCS7_get0_signers(PKCS7 *p7, struct stack_st_X509 *certs,
24676                                    int flags);
24677 PKCS7 *PKCS7_encrypt(struct stack_st_X509 *certs, BIO *in, const EVP_CIPHER *cipher,
24678                      int flags);
24679 int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
24680                   int flags);
24681 
24682 int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
24683                               struct stack_st_X509_ALGOR *cap);
24684 struct stack_st_X509_ALGOR *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
24685 int PKCS7_simple_smimecap(struct stack_st_X509_ALGOR *sk, int nid, int arg);
24686 
24687 int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
24688 int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
24689 int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
24690                              const unsigned char *md, int mdlen);
24691 
24692 int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
24693 PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
24694 
24695 BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
24696 
24697 /* BEGIN ERROR CODES */
24698 /*
24699  * The following lines are auto generated by the script mkerr.pl. Any changes
24700  * made after this point may be overwritten when the script is next run.
24701  */
24702 void ERR_load_PKCS7_strings(void);
24703 
24704 /* Error codes for the PKCS7 functions. */
24705 
24706 /* Function codes. */
24707 # 421 "/usr/include/openssl/pkcs7.h" 3 4
24708 /* Reason codes. */
24709 # 583 "/usr/include/openssl/x509.h" 2 3 4
24710 # 592 "/usr/include/openssl/x509.h" 3 4
24711 /* #define      X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */
24712 # 608 "/usr/include/openssl/x509.h" 3 4
24713 void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
24714 X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
24715                                      int (*crl_free) (X509_CRL *crl),
24716                                      int (*crl_lookup) (X509_CRL *crl,
24717                                                         X509_REVOKED **ret,
24718                                                         ASN1_INTEGER *ser,
24719                                                         X509_NAME *issuer),
24720                                      int (*crl_verify) (X509_CRL *crl,
24721                                                         EVP_PKEY *pk));
24722 void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
24723 
24724 void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
24725 void *X509_CRL_get_meth_data(X509_CRL *crl);
24726 
24727 /*
24728  * This one is only used so that a binary form can output, as in
24729  * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf)
24730  */
24731 
24732 
24733 const char *X509_verify_cert_error_string(long n);
24734 
24735 
24736 int X509_verify(X509 *a, EVP_PKEY *r);
24737 
24738 int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
24739 int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);
24740 int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);
24741 
24742 NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len);
24743 char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
24744 EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
24745 int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
24746 
24747 int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
24748 
24749 int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
24750 int X509_signature_print(BIO *bp, X509_ALGOR *alg, ASN1_STRING *sig);
24751 
24752 int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
24753 int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
24754 int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert);
24755 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
24756 int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
24757 int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
24758 int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
24759 int X509_CRL_http_nbio(OCSP_REQ_CTX *rctx, X509_CRL **pcrl);
24760 int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
24761 
24762 int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
24763                        unsigned char *md, unsigned int *len);
24764 int X509_digest(const X509 *data, const EVP_MD *type,
24765                 unsigned char *md, unsigned int *len);
24766 int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,
24767                     unsigned char *md, unsigned int *len);
24768 int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
24769                     unsigned char *md, unsigned int *len);
24770 int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
24771                      unsigned char *md, unsigned int *len);
24772 
24773 
24774 
24775 X509 *d2i_X509_fp(FILE *fp, X509 **x509);
24776 int i2d_X509_fp(FILE *fp, X509 *x509);
24777 X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);
24778 int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl);
24779 X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);
24780 int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req);
24781 
24782 RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);
24783 int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa);
24784 RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);
24785 int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa);
24786 RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
24787 int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa);
24788 
24789 
24790 DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
24791 int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa);
24792 DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
24793 int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa);
24794 
24795 
24796 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
24797 int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
24798 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
24799 int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
24800 
24801 X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);
24802 int i2d_PKCS8_fp(FILE *fp, X509_SIG *p8);
24803 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
24804                                                 PKCS8_PRIV_KEY_INFO **p8inf);
24805 int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf);
24806 int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key);
24807 int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey);
24808 EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
24809 int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey);
24810 EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
24811 
24812 
24813 
24814 X509 *d2i_X509_bio(BIO *bp, X509 **x509);
24815 int i2d_X509_bio(BIO *bp, X509 *x509);
24816 X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
24817 int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl);
24818 X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);
24819 int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req);
24820 
24821 RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);
24822 int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa);
24823 RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
24824 int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa);
24825 RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
24826 int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa);
24827 
24828 
24829 DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
24830 int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa);
24831 DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
24832 int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);
24833 
24834 
24835 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
24836 int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);
24837 EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
24838 int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);
24839 
24840 X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);
24841 int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8);
24842 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
24843                                                  PKCS8_PRIV_KEY_INFO **p8inf);
24844 int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf);
24845 int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key);
24846 int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey);
24847 EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
24848 int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey);
24849 EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
24850 
24851 
24852 X509 *X509_dup(X509 *x509);
24853 X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);
24854 X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex);
24855 X509_CRL *X509_CRL_dup(X509_CRL *crl);
24856 X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev);
24857 X509_REQ *X509_REQ_dup(X509_REQ *req);
24858 X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
24859 int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,
24860                     void *pval);
24861 void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
24862                      X509_ALGOR *algor);
24863 void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
24864 int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
24865 
24866 X509_NAME *X509_NAME_dup(X509_NAME *xn);
24867 X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
24868 
24869 int X509_cmp_time(const ASN1_TIME *s, time_t *t);
24870 int X509_cmp_current_time(const ASN1_TIME *s);
24871 ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
24872 ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
24873                             int offset_day, long offset_sec, time_t *t);
24874 ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj);
24875 
24876 const char *X509_get_default_cert_area(void);
24877 const char *X509_get_default_cert_dir(void);
24878 const char *X509_get_default_cert_file(void);
24879 const char *X509_get_default_cert_dir_env(void);
24880 const char *X509_get_default_cert_file_env(void);
24881 const char *X509_get_default_private_dir(void);
24882 
24883 X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
24884 X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey);
24885 
24886 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;
24887 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;
24888 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;
24889 
24890 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;
24891 
24892 int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
24893 EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key);
24894 int X509_get_pubkey_parameters(EVP_PKEY *pkey, struct stack_st_X509 *chain);
24895 int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp);
24896 EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length);
24897 
24898 int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);
24899 RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length);
24900 
24901 
24902 int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp);
24903 DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
24904 
24905 
24906 int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp);
24907 EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length);
24908 
24909 
24910 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;
24911 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;
24912 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;
24913 
24914 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;
24915 X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
24916 
24917 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;
24918 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;
24919 
24920 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;
24921 
24922 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;
24923 
24924 int X509_NAME_set(X509_NAME **xn, X509_NAME *name);
24925 
24926 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;
24927 
24928 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;
24929 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;
24930 
24931 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;
24932 
24933 int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
24934                           CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
24935 int X509_set_ex_data(X509 *r, int idx, void *arg);
24936 void *X509_get_ex_data(X509 *r, int idx);
24937 int i2d_X509_AUX(X509 *a, unsigned char **pp);
24938 X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length);
24939 
24940 int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
24941 
24942 void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
24943                          const X509 *x);
24944 int X509_get_signature_nid(const X509 *x);
24945 
24946 int X509_alias_set1(X509 *x, unsigned char *name, int len);
24947 int X509_keyid_set1(X509 *x, unsigned char *id, int len);
24948 unsigned char *X509_alias_get0(X509 *x, int *len);
24949 unsigned char *X509_keyid_get0(X509 *x, int *len);
24950 int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
24951                                                                 int);
24952 int X509_TRUST_set(int *t, int trust);
24953 int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
24954 int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj);
24955 void X509_trust_clear(X509 *x);
24956 void X509_reject_clear(X509 *x);
24957 
24958 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;
24959 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;
24960 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;
24961 
24962 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
24963 int X509_CRL_get0_by_serial(X509_CRL *crl,
24964                             X509_REVOKED **ret, ASN1_INTEGER *serial);
24965 int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
24966 
24967 X509_PKEY *X509_PKEY_new(void);
24968 void X509_PKEY_free(X509_PKEY *a);
24969 int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp);
24970 X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp,
24971                          long length);
24972 
24973 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;
24974 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;
24975 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;
24976 
24977 
24978 X509_INFO *X509_INFO_new(void);
24979 void X509_INFO_free(X509_INFO *a);
24980 char *X509_NAME_oneline(X509_NAME *a, char *buf, int size);
24981 
24982 int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,
24983                 ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey);
24984 
24985 int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
24986                 unsigned char *md, unsigned int *len);
24987 
24988 int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1,
24989               X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
24990               char *data, EVP_PKEY *pkey, const EVP_MD *type);
24991 
24992 int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data,
24993                      unsigned char *md, unsigned int *len);
24994 
24995 int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,
24996                      ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey);
24997 
24998 int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1,
24999                    X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data,
25000                    EVP_PKEY *pkey, const EVP_MD *type);
25001 int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
25002                        X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
25003                        void *asn, EVP_MD_CTX *ctx);
25004 
25005 
25006 int X509_set_version(X509 *x, long version);
25007 int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
25008 ASN1_INTEGER *X509_get_serialNumber(X509 *x);
25009 int X509_set_issuer_name(X509 *x, X509_NAME *name);
25010 X509_NAME *X509_get_issuer_name(X509 *a);
25011 int X509_set_subject_name(X509 *x, X509_NAME *name);
25012 X509_NAME *X509_get_subject_name(X509 *a);
25013 int X509_set_notBefore(X509 *x, const ASN1_TIME *tm);
25014 int X509_set_notAfter(X509 *x, const ASN1_TIME *tm);
25015 int X509_set_pubkey(X509 *x, EVP_PKEY *pkey);
25016 EVP_PKEY *X509_get_pubkey(X509 *x);
25017 ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);
25018 int X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ );
25019 
25020 int X509_REQ_set_version(X509_REQ *x, long version);
25021 int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
25022 int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
25023 EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
25024 int X509_REQ_extension_nid(int nid);
25025 int *X509_REQ_get_extension_nids(void);
25026 void X509_REQ_set_extension_nids(int *nids);
25027 struct stack_st_X509_EXTENSION *X509_REQ_get_extensions(X509_REQ *req);
25028 int X509_REQ_add_extensions_nid(X509_REQ *req, struct stack_st_X509_EXTENSION *exts,
25029                                 int nid);
25030 int X509_REQ_add_extensions(X509_REQ *req, struct stack_st_X509_EXTENSION *exts);
25031 int X509_REQ_get_attr_count(const X509_REQ *req);
25032 int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);
25033 int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj,
25034                              int lastpos);
25035 X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
25036 X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
25037 int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
25038 int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
25039                               const ASN1_OBJECT *obj, int type,
25040                               const unsigned char *bytes, int len);
25041 int X509_REQ_add1_attr_by_NID(X509_REQ *req,
25042                               int nid, int type,
25043                               const unsigned char *bytes, int len);
25044 int X509_REQ_add1_attr_by_txt(X509_REQ *req,
25045                               const char *attrname, int type,
25046                               const unsigned char *bytes, int len);
25047 
25048 int X509_CRL_set_version(X509_CRL *x, long version);
25049 int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
25050 int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
25051 int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
25052 int X509_CRL_sort(X509_CRL *crl);
25053 
25054 int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
25055 int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
25056 
25057 X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer,
25058                         EVP_PKEY *skey, const EVP_MD *md, unsigned int flags);
25059 
25060 int X509_REQ_check_private_key(X509_REQ *x509, EVP_PKEY *pkey);
25061 
25062 int X509_check_private_key(X509 *x509, EVP_PKEY *pkey);
25063 int X509_chain_check_suiteb(int *perror_depth,
25064                             X509 *x, struct stack_st_X509 *chain,
25065                             unsigned long flags);
25066 int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags);
25067 struct stack_st_X509 *X509_chain_up_ref(struct stack_st_X509 *chain);
25068 
25069 int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
25070 unsigned long X509_issuer_and_serial_hash(X509 *a);
25071 
25072 int X509_issuer_name_cmp(const X509 *a, const X509 *b);
25073 unsigned long X509_issuer_name_hash(X509 *a);
25074 
25075 int X509_subject_name_cmp(const X509 *a, const X509 *b);
25076 unsigned long X509_subject_name_hash(X509 *x);
25077 
25078 
25079 unsigned long X509_issuer_name_hash_old(X509 *a);
25080 unsigned long X509_subject_name_hash_old(X509 *x);
25081 
25082 
25083 int X509_cmp(const X509 *a, const X509 *b);
25084 int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
25085 unsigned long X509_NAME_hash(X509_NAME *x);
25086 unsigned long X509_NAME_hash_old(X509_NAME *x);
25087 
25088 int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
25089 int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
25090 
25091 int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
25092                      unsigned long cflag);
25093 int X509_print_fp(FILE *bp, X509 *x);
25094 int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
25095 int X509_REQ_print_fp(FILE *bp, X509_REQ *req);
25096 int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent,
25097                           unsigned long flags);
25098 
25099 
25100 
25101 int X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
25102 int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent,
25103                        unsigned long flags);
25104 int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
25105                   unsigned long cflag);
25106 int X509_print(BIO *bp, X509 *x);
25107 int X509_ocspid_print(BIO *bp, X509 *x);
25108 int X509_CERT_AUX_print(BIO *bp, X509_CERT_AUX *x, int indent);
25109 int X509_CRL_print(BIO *bp, X509_CRL *x);
25110 int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
25111                       unsigned long cflag);
25112 int X509_REQ_print(BIO *bp, X509_REQ *req);
25113 
25114 
25115 int X509_NAME_entry_count(X509_NAME *name);
25116 int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);
25117 int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
25118                               char *buf, int len);
25119 
25120 /*
25121  * NOTE: you should be passsing -1, not 0 as lastpos.  The functions that use
25122  * lastpos, search after that position on.
25123  */
25124 int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
25125 int X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
25126                                int lastpos);
25127 X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
25128 X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
25129 int X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne,
25130                         int loc, int set);
25131 int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type,
25132                                unsigned char *bytes, int len, int loc,
25133                                int set);
25134 int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
25135                                unsigned char *bytes, int len, int loc,
25136                                int set);
25137 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
25138                                                const char *field, int type,
25139                                                const unsigned char *bytes,
25140                                                int len);
25141 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
25142                                                int type, unsigned char *bytes,
25143                                                int len);
25144 int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
25145                                const unsigned char *bytes, int len, int loc,
25146                                int set);
25147 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
25148                                                ASN1_OBJECT *obj, int type,
25149                                                const unsigned char *bytes,
25150                                                int len);
25151 int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj);
25152 int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
25153                              const unsigned char *bytes, int len);
25154 ASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
25155 ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
25156 
25157 int X509v3_get_ext_count(const struct stack_st_X509_EXTENSION *x);
25158 int X509v3_get_ext_by_NID(const struct stack_st_X509_EXTENSION *x,
25159                           int nid, int lastpos);
25160 int X509v3_get_ext_by_OBJ(const struct stack_st_X509_EXTENSION *x,
25161                           ASN1_OBJECT *obj, int lastpos);
25162 int X509v3_get_ext_by_critical(const struct stack_st_X509_EXTENSION *x,
25163                                int crit, int lastpos);
25164 X509_EXTENSION *X509v3_get_ext(const struct stack_st_X509_EXTENSION *x, int loc);
25165 X509_EXTENSION *X509v3_delete_ext(struct stack_st_X509_EXTENSION *x, int loc);
25166 struct stack_st_X509_EXTENSION *X509v3_add_ext(struct stack_st_X509_EXTENSION **x,
25167                                          X509_EXTENSION *ex, int loc);
25168 
25169 int X509_get_ext_count(X509 *x);
25170 int X509_get_ext_by_NID(X509 *x, int nid, int lastpos);
25171 int X509_get_ext_by_OBJ(X509 *x, ASN1_OBJECT *obj, int lastpos);
25172 int X509_get_ext_by_critical(X509 *x, int crit, int lastpos);
25173 X509_EXTENSION *X509_get_ext(X509 *x, int loc);
25174 X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
25175 int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
25176 void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
25177 int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
25178                       unsigned long flags);
25179 
25180 int X509_CRL_get_ext_count(X509_CRL *x);
25181 int X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos);
25182 int X509_CRL_get_ext_by_OBJ(X509_CRL *x, ASN1_OBJECT *obj, int lastpos);
25183 int X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos);
25184 X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc);
25185 X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
25186 int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
25187 void *X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx);
25188 int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
25189                           unsigned long flags);
25190 
25191 int X509_REVOKED_get_ext_count(X509_REVOKED *x);
25192 int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos);
25193 int X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x, ASN1_OBJECT *obj,
25194                                 int lastpos);
25195 int X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos);
25196 X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc);
25197 X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
25198 int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
25199 void *X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx);
25200 int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
25201                               unsigned long flags);
25202 
25203 X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
25204                                              int nid, int crit,
25205                                              ASN1_OCTET_STRING *data);
25206 X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
25207                                              ASN1_OBJECT *obj, int crit,
25208                                              ASN1_OCTET_STRING *data);
25209 int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj);
25210 int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
25211 int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
25212 ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);
25213 ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
25214 int X509_EXTENSION_get_critical(X509_EXTENSION *ex);
25215 
25216 int X509at_get_attr_count(const struct stack_st_X509_ATTRIBUTE *x);
25217 int X509at_get_attr_by_NID(const struct stack_st_X509_ATTRIBUTE *x, int nid,
25218                            int lastpos);
25219 int X509at_get_attr_by_OBJ(const struct stack_st_X509_ATTRIBUTE *sk,
25220                            ASN1_OBJECT *obj, int lastpos);
25221 X509_ATTRIBUTE *X509at_get_attr(const struct stack_st_X509_ATTRIBUTE *x, int loc);
25222 X509_ATTRIBUTE *X509at_delete_attr(struct stack_st_X509_ATTRIBUTE *x, int loc);
25223 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr(struct stack_st_X509_ATTRIBUTE **x,
25224                                            X509_ATTRIBUTE *attr);
25225 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_OBJ(struct stack_st_X509_ATTRIBUTE
25226                                                   **x, const ASN1_OBJECT *obj,
25227                                                   int type,
25228                                                   const unsigned char *bytes,
25229                                                   int len);
25230 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_NID(struct stack_st_X509_ATTRIBUTE
25231                                                   **x, int nid, int type,
25232                                                   const unsigned char *bytes,
25233                                                   int len);
25234 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_txt(struct stack_st_X509_ATTRIBUTE
25235                                                   **x, const char *attrname,
25236                                                   int type,
25237                                                   const unsigned char *bytes,
25238                                                   int len);
25239 void *X509at_get0_data_by_OBJ(struct stack_st_X509_ATTRIBUTE *x, ASN1_OBJECT *obj,
25240                               int lastpos, int type);
25241 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
25242                                              int atrtype, const void *data,
25243                                              int len);
25244 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
25245                                              const ASN1_OBJECT *obj,
25246                                              int atrtype, const void *data,
25247                                              int len);
25248 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
25249                                              const char *atrname, int type,
25250                                              const unsigned char *bytes,
25251                                              int len);
25252 int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);
25253 int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,
25254                              const void *data, int len);
25255 void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype,
25256                                void *data);
25257 int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr);
25258 ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
25259 ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
25260 
25261 int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
25262 int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);
25263 int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj,
25264                              int lastpos);
25265 X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
25266 X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
25267 int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
25268 int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
25269                               const ASN1_OBJECT *obj, int type,
25270                               const unsigned char *bytes, int len);
25271 int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
25272                               int nid, int type,
25273                               const unsigned char *bytes, int len);
25274 int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
25275                               const char *attrname, int type,
25276                               const unsigned char *bytes, int len);
25277 
25278 int X509_verify_cert(X509_STORE_CTX *ctx);
25279 
25280 /* lookup a cert from a X509 STACK */
25281 X509 *X509_find_by_issuer_and_serial(struct stack_st_X509 *sk, X509_NAME *name,
25282                                      ASN1_INTEGER *serial);
25283 X509 *X509_find_by_subject(struct stack_st_X509 *sk, X509_NAME *name);
25284 
25285 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;
25286 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;
25287 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;
25288 
25289 int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
25290                          const unsigned char *salt, int saltlen);
25291 
25292 X509_ALGOR *PKCS5_pbe_set(int alg, int iter,
25293                           const unsigned char *salt, int saltlen);
25294 X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
25295                            unsigned char *salt, int saltlen);
25296 X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
25297                               unsigned char *salt, int saltlen,
25298                               unsigned char *aiv, int prf_nid);
25299 
25300 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
25301                              int prf_nid, int keylen);
25302 
25303 /* PKCS#8 utilities */
25304 
25305 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;
25306 
25307 EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8);
25308 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey);
25309 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken);
25310 PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);
25311 
25312 int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,
25313                     int version, int ptype, void *pval,
25314                     unsigned char *penc, int penclen);
25315 int PKCS8_pkey_get0(ASN1_OBJECT **ppkalg,
25316                     const unsigned char **pk, int *ppklen,
25317                     X509_ALGOR **pa, PKCS8_PRIV_KEY_INFO *p8);
25318 
25319 int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
25320                            int ptype, void *pval,
25321                            unsigned char *penc, int penclen);
25322 int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
25323                            const unsigned char **pk, int *ppklen,
25324                            X509_ALGOR **pa, X509_PUBKEY *pub);
25325 
25326 int X509_check_trust(X509 *x, int id, int flags);
25327 int X509_TRUST_get_count(void);
25328 X509_TRUST *X509_TRUST_get0(int idx);
25329 int X509_TRUST_get_by_id(int id);
25330 int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int),
25331                    char *name, int arg1, void *arg2);
25332 void X509_TRUST_cleanup(void);
25333 int X509_TRUST_get_flags(X509_TRUST *xp);
25334 char *X509_TRUST_get0_name(X509_TRUST *xp);
25335 int X509_TRUST_get_trust(X509_TRUST *xp);
25336 
25337 /* BEGIN ERROR CODES */
25338 /*
25339  * The following lines are auto generated by the script mkerr.pl. Any changes
25340  * made after this point may be overwritten when the script is next run.
25341  */
25342 
25343 void ERR_load_X509_strings(void);
25344 
25345 /* Error codes for the X509 functions. */
25346 
25347 /* Function codes. */
25348 # 1291 "/usr/include/openssl/x509.h" 3 4
25349 /* Reason codes. */
25350 # 45 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
25351 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 1
25352 /*
25353  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25354  *
25355  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25356  * Use is subject to license terms.
25357  */
25358 
25359 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
25360 /*	  All Rights Reserved  	*/
25361 
25362 /*
25363  * BIND 4.9.3:
25364  *
25365  * Copyright (c) 1980, 1983, 1988, 1993
25366  *	The Regents of the University of California.  All rights reserved.
25367  *
25368  * Redistribution and use in source and binary forms, with or without
25369  * modification, are permitted provided that the following conditions
25370  * are met:
25371  * 1. Redistributions of source code must retain the above copyright
25372  *    notice, this list of conditions and the following disclaimer.
25373  * 2. Redistributions in binary form must reproduce the above copyright
25374  *    notice, this list of conditions and the following disclaimer in the
25375  *    documentation and/or other materials provided with the distribution.
25376  * 3. All advertising materials mentioning features or use of this software
25377  *    must display the following acknowledgement:
25378  *	This product includes software developed by the University of
25379  *	California, Berkeley and its contributors.
25380  * 4. Neither the name of the University nor the names of its contributors
25381  *    may be used to endorse or promote products derived from this software
25382  *    without specific prior written permission.
25383  *
25384  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25385  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25386  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25387  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25388  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25389  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25390  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25391  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25392  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25393  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25394  * SUCH DAMAGE.
25395  * -
25396  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
25397  *
25398  * Permission to use, copy, modify, and distribute this software for any
25399  * purpose with or without fee is hereby granted, provided that the above
25400  * copyright notice and this permission notice appear in all copies, and that
25401  * the name of Digital Equipment Corporation not be used in advertising or
25402  * publicity pertaining to distribution of the document or software without
25403  * specific, written prior permission.
25404  *
25405  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
25406  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
25407  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
25408  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
25409  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
25410  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
25411  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
25412  * SOFTWARE.
25413  * --Copyright--
25414  *
25415  * End BIND 4.9.3
25416  */
25417 
25418 /*
25419  * Structures returned by network data base library.
25420  * All addresses are supplied in host order, and
25421  * returned in network order (suitable for use in system calls).
25422  */
25423 
25424 
25425 
25426 
25427 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
25428 /*
25429  * CDDL HEADER START
25430  *
25431  * The contents of this file are subject to the terms of the
25432  * Common Development and Distribution License (the "License").
25433  * You may not use this file except in compliance with the License.
25434  *
25435  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25436  * or http://www.opensolaris.org/os/licensing.
25437  * See the License for the specific language governing permissions
25438  * and limitations under the License.
25439  *
25440  * When distributing Covered Code, include this CDDL HEADER in each
25441  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25442  * If applicable, add the following below this CDDL HEADER, with the
25443  * fields enclosed by brackets "[]" replaced with your own identifying
25444  * information: Portions Copyright [yyyy] [name of copyright owner]
25445  *
25446  * CDDL HEADER END
25447  */
25448 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25449 /*	  All Rights Reserved  	*/
25450 
25451 
25452 /*
25453  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25454  * Use is subject to license terms.
25455  *
25456  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
25457  * Copyright 2016 Joyent, Inc.
25458  */
25459 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
25460 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
25461 /*
25462  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25463  * Use is subject to license terms.
25464  *
25465  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
25466  */
25467 /*
25468  * Copyright (c) 1982, 1986 Regents of the University of California.
25469  * All rights reserved.
25470  *
25471  * Redistribution and use in source and binary forms are permitted
25472  * provided that this notice is preserved and that due credit is given
25473  * to the University of California at Berkeley. The name of the University
25474  * may not be used to endorse or promote products derived from this
25475  * software without specific prior written permission. This software
25476  * is provided ``as is'' without express or implied warranty.
25477  */
25478 
25479 /*
25480  * Constants and structures defined by the internet system,
25481  * according to following documents
25482  *
25483  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
25484  *	http://www.iana.org/assignments/protocol-numbers
25485  *	http://www.iana.org/assignments/port-numbers
25486  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
25487  *
25488  */
25489 
25490 
25491 
25492 
25493 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
25494 /*
25495  * CDDL HEADER START
25496  *
25497  * The contents of this file are subject to the terms of the
25498  * Common Development and Distribution License (the "License").
25499  * You may not use this file except in compliance with the License.
25500  *
25501  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25502  * or http://www.opensolaris.org/os/licensing.
25503  * See the License for the specific language governing permissions
25504  * and limitations under the License.
25505  *
25506  * When distributing Covered Code, include this CDDL HEADER in each
25507  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25508  * If applicable, add the following below this CDDL HEADER, with the
25509  * fields enclosed by brackets "[]" replaced with your own identifying
25510  * information: Portions Copyright [yyyy] [name of copyright owner]
25511  *
25512  * CDDL HEADER END
25513  */
25514 
25515 /*
25516  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
25517  * Copyright 2016 Joyent, Inc.
25518  *
25519  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25520  * Use is subject to license terms.
25521  */
25522 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
25523 
25524 
25525 
25526 
25527 
25528 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
25529 /*
25530  * CDDL HEADER START
25531  *
25532  * The contents of this file are subject to the terms of the
25533  * Common Development and Distribution License (the "License").
25534  * You may not use this file except in compliance with the License.
25535  *
25536  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25537  * or http://www.opensolaris.org/os/licensing.
25538  * See the License for the specific language governing permissions
25539  * and limitations under the License.
25540  *
25541  * When distributing Covered Code, include this CDDL HEADER in each
25542  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25543  * If applicable, add the following below this CDDL HEADER, with the
25544  * fields enclosed by brackets "[]" replaced with your own identifying
25545  * information: Portions Copyright [yyyy] [name of copyright owner]
25546  *
25547  * CDDL HEADER END
25548  */
25549 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25550 /*	  All Rights Reserved  	*/
25551 
25552 
25553 /*
25554  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25555  * Use is subject to license terms.
25556  *
25557  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
25558  * Copyright 2016 Joyent, Inc.
25559  */
25560 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
25561 
25562 
25563 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
25564 /*
25565  * CDDL HEADER START
25566  *
25567  * The contents of this file are subject to the terms of the
25568  * Common Development and Distribution License (the "License").
25569  * You may not use this file except in compliance with the License.
25570  *
25571  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25572  * or http://www.opensolaris.org/os/licensing.
25573  * See the License for the specific language governing permissions
25574  * and limitations under the License.
25575  *
25576  * When distributing Covered Code, include this CDDL HEADER in each
25577  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25578  * If applicable, add the following below this CDDL HEADER, with the
25579  * fields enclosed by brackets "[]" replaced with your own identifying
25580  * information: Portions Copyright [yyyy] [name of copyright owner]
25581  *
25582  * CDDL HEADER END
25583  */
25584 /*
25585  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25586  * Use is subject to license terms.
25587  */
25588 
25589 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
25590 /*	  All Rights Reserved	*/
25591 
25592 /*
25593  * Portions of this source code were derived from Berkeley 4.3 BSD
25594  * under license from the Regents of the University of California.
25595  */
25596 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h"
25597 typedef uint16_t sa_family_t;
25598 
25599 
25600 /*
25601  * Structure used by kernel to store most
25602  * addresses.
25603  */
25604 struct sockaddr {
25605  sa_family_t sa_family; /* address family */
25606  char sa_data[14]; /* up to 14 bytes of direct address */
25607 };
25608 
25609 
25610 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h" 1
25611 /*
25612  * CDDL HEADER START
25613  *
25614  * The contents of this file are subject to the terms of the
25615  * Common Development and Distribution License (the "License").
25616  * You may not use this file except in compliance with the License.
25617  *
25618  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25619  * or http://www.opensolaris.org/os/licensing.
25620  * See the License for the specific language governing permissions
25621  * and limitations under the License.
25622  *
25623  * When distributing Covered Code, include this CDDL HEADER in each
25624  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25625  * If applicable, add the following below this CDDL HEADER, with the
25626  * fields enclosed by brackets "[]" replaced with your own identifying
25627  * information: Portions Copyright [yyyy] [name of copyright owner]
25628  *
25629  * CDDL HEADER END
25630  */
25631 /*
25632  * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
25633  */
25634 
25635 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
25636 /*	  All Rights Reserved  	*/
25637 
25638 /*
25639  * University Copyright- Copyright (c) 1982, 1986, 1988
25640  * The Regents of the University of California
25641  * All Rights Reserved
25642  *
25643  * University Acknowledgment- Portions of this document are derived from
25644  * software developed by the University of California, Berkeley, and its
25645  * contributors.
25646  */
25647 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
25648 /*
25649  * Definitions for UNIX IPC domain.
25650  */
25651 struct sockaddr_un {
25652  sa_family_t sun_family; /* AF_UNIX */
25653  char sun_path[108]; /* path name (gag) */
25654 };
25655 
25656 
25657 
25658 /*
25659  * NOTE: If we ever go to BSD-style sun_len + sun_family, this macro needs to
25660  * change.
25661  *
25662  * Also, include a strlen() prototype, and we have to protect it w.r.t.
25663  * UNIX{98,03}.  And because there's strlen, we need size_t as well.
25664  */
25665 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
25666 extern size_t strlen(const char *);
25667 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
25668 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if_dl.h" 1
25669 /*
25670  * Copyright 1993-2003 Sun Microsystems, Inc.  All rights reserved.
25671  * Use is subject to license terms.
25672  */
25673 /*
25674  * Copyright (c) 1990, 1993
25675  *	The Regents of the University of California.  All rights reserved.
25676  *
25677  * Redistribution and use in source and binary forms, with or without
25678  * modification, are permitted provided that the following conditions
25679  * are met:
25680  * 1. Redistributions of source code must retain the above copyright
25681  *    notice, this list of conditions and the following disclaimer.
25682  * 2. Redistributions in binary form must reproduce the above copyright
25683  *    notice, this list of conditions and the following disclaimer in the
25684  *    documentation and/or other materials provided with the distribution.
25685  * 3. All advertising materials mentioning features or use of this software
25686  *    must display the following acknowledgement:
25687  *	This product includes software developed by the University of
25688  *	California, Berkeley and its contributors.
25689  * 4. Neither the name of the University nor the names of its contributors
25690  *    may be used to endorse or promote products derived from this software
25691  *    without specific prior written permission.
25692  *
25693  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25694  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25695  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25696  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25697  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25698  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25699  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25700  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25701  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25702  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25703  * SUCH DAMAGE.
25704  */
25705 
25706 
25707 
25708 
25709 #pragma ident "%Z%%M%	%I%	%E% SMI"
25710 /* from UCB 8.1 (Berkeley) 6/10/93 */
25711 
25712 
25713 
25714 
25715 
25716 /*
25717  * A Link-Level Sockaddr may specify the interface in one of two
25718  * ways: either by means of a system-provided index number (computed
25719  * anew and possibly differently on every reboot), or by a human-readable
25720  * string such as "il0" (for managerial convenience).
25721  *
25722  * Census taking actions, such as something akin to SIOCGCONF would return
25723  * both the index and the human name.
25724  *
25725  * High volume transactions (such as giving a link-level ``from'' address
25726  * in a recvfrom or recvmsg call) may be likely only to provide the indexed
25727  * form, (which requires fewer copy operations and less space).
25728  *
25729  * The form and interpretation  of the link-level address is purely a matter
25730  * of convention between the device driver and its consumers; however, it is
25731  * expected that all drivers for an interface of a given if_type will agree.
25732  */
25733 
25734 /*
25735  * Structure of a Link-Level sockaddr:
25736  */
25737 struct sockaddr_dl {
25738  ushort_t sdl_family; /* AF_LINK */
25739  ushort_t sdl_index; /* if != 0, system given index for interface */
25740  uchar_t sdl_type; /* interface type */
25741  uchar_t sdl_nlen; /* interface name length, no trailing 0 reqd. */
25742  uchar_t sdl_alen; /* link level address length */
25743  uchar_t sdl_slen; /* link layer selector length */
25744  char sdl_data[244]; /* contains both if name and ll address */
25745 };
25746 
25747 
25748 
25749 
25750 extern char *_link_ntoa(const unsigned char *, char *, int, int);
25751 extern unsigned char *_link_aton(const char *, int *);
25752 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
25753 
25754 
25755 
25756 /*
25757  * sockaddr_storage:
25758  * Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
25759  * structures. Has sufficient size and alignment for those sockaddrs.
25760  */
25761 
25762 /*
25763  * Desired maximum size, alignment size and related types.
25764  */
25765 
25766 
25767 /*
25768  * To represent desired sockaddr max alignment for platform, a
25769  * type is chosen which may depend on implementation platform architecture.
25770  * Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
25771  * We desire to force up to (but no more than) 64-bit (8 byte) alignment,
25772  * on platforms where it is possible to do so. (e.g not possible on ia32).
25773  * For all currently supported platforms by our implementation
25774  * in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
25775  * type "double" is suitable for that intent.
25776  *
25777  * Note: Type "double" is chosen over the more obvious integer type int64_t.
25778  *   int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
25779  */
25780 typedef double sockaddr_maxalign_t;
25781 
25782 
25783 
25784 /*
25785  * Definitions used for sockaddr_storage structure paddings design.
25786  */
25787 
25788 
25789 
25790 
25791 struct sockaddr_storage {
25792  sa_family_t ss_family; /* Address family */
25793  /* Following fields are implementation specific */
25794  char _ss_pad1[((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t))];
25795  sockaddr_maxalign_t _ss_align;
25796  char _ss_pad2[(256 - (sizeof (sa_family_t)+ ((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t)) + (sizeof (sockaddr_maxalign_t))))];
25797 };
25798 
25799 
25800 /*
25801  * To be compatible with the Linux interfaces used, this structure is
25802  * placed in socket_impl.h so that an include for <sys/socket.h> will
25803  * pickup this structure. This structure is for use with PF_PACKET
25804  * sockets.
25805  */
25806 struct sockaddr_ll {
25807  uint16_t sll_family;
25808  uint16_t sll_protocol;
25809  int32_t sll_ifindex;
25810  uint16_t sll_hatype;
25811  uint8_t sll_pkttype;
25812  uint8_t sll_halen;
25813  uint8_t sll_addr[8];
25814 };
25815 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
25816 
25817 
25818 
25819 
25820 
25821 /*
25822  * The socklen definitions are reproduced here from sys/socket.h so as to
25823  * not introduce that namespace into existing users of netinet/in.h.
25824  */
25825 
25826 
25827 
25828 typedef uint32_t socklen_t;
25829 
25830 
25831 
25832 
25833 
25834 typedef void *Psocklen_t;
25835 
25836 
25837 
25838 
25839 
25840 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 1
25841 /*
25842  * CDDL HEADER START
25843  *
25844  * The contents of this file are subject to the terms of the
25845  * Common Development and Distribution License (the "License").
25846  * You may not use this file except in compliance with the License.
25847  *
25848  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25849  * or http://www.opensolaris.org/os/licensing.
25850  * See the License for the specific language governing permissions
25851  * and limitations under the License.
25852  *
25853  * When distributing Covered Code, include this CDDL HEADER in each
25854  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25855  * If applicable, add the following below this CDDL HEADER, with the
25856  * fields enclosed by brackets "[]" replaced with your own identifying
25857  * information: Portions Copyright [yyyy] [name of copyright owner]
25858  *
25859  * CDDL HEADER END
25860  */
25861 /*
25862  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25863  * Use is subject to license terms.
25864  */
25865 
25866 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25867 /*	  All Rights Reserved  	*/
25868 
25869 
25870 
25871 
25872 
25873 /*
25874  * For source compatibility
25875  */
25876 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
25877 /*
25878  * CDDL HEADER START
25879  *
25880  * The contents of this file are subject to the terms of the
25881  * Common Development and Distribution License (the "License").
25882  * You may not use this file except in compliance with the License.
25883  *
25884  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25885  * or http://www.opensolaris.org/os/licensing.
25886  * See the License for the specific language governing permissions
25887  * and limitations under the License.
25888  *
25889  *
25890  * When distributing Covered Code, include this CDDL HEADER in each
25891  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25892  * If applicable, add the following below this CDDL HEADER, with the
25893  * fields enclosed by brackets "[]" replaced with your own identifying
25894  * information: Portions Copyright [yyyy] [name of copyright owner]
25895  *
25896  * CDDL HEADER END
25897  */
25898 
25899 /*
25900  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
25901  * Use is subject to license terms.
25902  * Copyright 2016 Joyent, Inc.
25903  */
25904 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
25905 
25906 
25907 
25908 
25909 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h" 1
25910 /*
25911  * CDDL HEADER START
25912  *
25913  * The contents of this file are subject to the terms of the
25914  * Common Development and Distribution License, Version 1.0 only
25915  * (the "License").  You may not use this file except in compliance
25916  * with the License.
25917  *
25918  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25919  * or http://www.opensolaris.org/os/licensing.
25920  * See the License for the specific language governing permissions
25921  * and limitations under the License.
25922  *
25923  * When distributing Covered Code, include this CDDL HEADER in each
25924  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25925  * If applicable, add the following below this CDDL HEADER, with the
25926  * fields enclosed by brackets "[]" replaced with your own identifying
25927  * information: Portions Copyright [yyyy] [name of copyright owner]
25928  *
25929  * CDDL HEADER END
25930  */
25931 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25932 /*	  All Rights Reserved  	*/
25933 
25934 
25935 /*
25936  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25937  *
25938  * Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
25939  * All rights reserved.
25940  */
25941 
25942 /*
25943  * Copyright 2015, Joyent, Inc.
25944  */
25945 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
25946 /*
25947  * Structure of file descriptor/event pairs supplied in
25948  * the poll arrays.
25949  */
25950 typedef struct pollfd {
25951  int fd; /* file desc to poll */
25952  short events; /* events of interest on fd */
25953  short revents; /* events that occurred on fd */
25954 } pollfd_t;
25955 
25956 typedef unsigned long nfds_t;
25957 
25958 /*
25959  * Testable select events
25960  */
25961 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
25962 /*
25963  * Non-testable poll events (may not be specified in events field,
25964  * but may be returned in revents field).
25965  */
25966 
25967 
25968 
25969 
25970 /*
25971  * These events will never be specified in revents, but may be specified in
25972  * events to control /dev/poll behavior.
25973  */
25974 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
25975 int poll(struct pollfd *, nfds_t, int);
25976 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
25977 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/strmdep.h" 1
25978 /*
25979  * CDDL HEADER START
25980  *
25981  * The contents of this file are subject to the terms of the
25982  * Common Development and Distribution License, Version 1.0 only
25983  * (the "License").  You may not use this file except in compliance
25984  * with the License.
25985  *
25986  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25987  * or http://www.opensolaris.org/os/licensing.
25988  * See the License for the specific language governing permissions
25989  * and limitations under the License.
25990  *
25991  * When distributing Covered Code, include this CDDL HEADER in each
25992  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25993  * If applicable, add the following below this CDDL HEADER, with the
25994  * fields enclosed by brackets "[]" replaced with your own identifying
25995  * information: Portions Copyright [yyyy] [name of copyright owner]
25996  *
25997  * CDDL HEADER END
25998  */
25999 /*
26000  * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
26001  * All rights reserved.
26002  */
26003 
26004 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26005 /*	  All Rights Reserved  	*/
26006 
26007 
26008 
26009 
26010 
26011 #pragma ident "%Z%%M%	%I%	%E% SMI"
26012 
26013 
26014 
26015 
26016 
26017 /*
26018  * This file contains all machine-dependent declarations
26019  * in STREAMS.
26020  */
26021 
26022 /*
26023  * Copy data from one data buffer to another.
26024  * The addresses must be word aligned - if not, use bcopy!
26025  */
26026 
26027 
26028 /*
26029  * save the address of the calling function on the 3b2 to
26030  * enable tracking of who is allocating message blocks
26031  */
26032 
26033 
26034 /*
26035  * macro to check pointer alignment
26036  * (true if alignment is sufficient for worst case)
26037  */
26038 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
26039 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
26040 /*
26041  * CDDL HEADER START
26042  *
26043  * The contents of this file are subject to the terms of the
26044  * Common Development and Distribution License (the "License").
26045  * You may not use this file except in compliance with the License.
26046  *
26047  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26048  * or http://www.opensolaris.org/os/licensing.
26049  * See the License for the specific language governing permissions
26050  * and limitations under the License.
26051  *
26052  * When distributing Covered Code, include this CDDL HEADER in each
26053  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26054  * If applicable, add the following below this CDDL HEADER, with the
26055  * fields enclosed by brackets "[]" replaced with your own identifying
26056  * information: Portions Copyright [yyyy] [name of copyright owner]
26057  *
26058  * CDDL HEADER END
26059  */
26060 /*
26061  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26062  * Use is subject to license terms.
26063  */
26064 
26065 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
26066 /*	  All Rights Reserved  	*/
26067 
26068 /*
26069  * Portions of this source code were derived from Berkeley 4.3 BSD
26070  * under license from the Regents of the University of California.
26071  */
26072 
26073 
26074 
26075 
26076 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26077 /*
26078  * CDDL HEADER START
26079  *
26080  * The contents of this file are subject to the terms of the
26081  * Common Development and Distribution License (the "License").
26082  * You may not use this file except in compliance with the License.
26083  *
26084  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26085  * or http://www.opensolaris.org/os/licensing.
26086  * See the License for the specific language governing permissions
26087  * and limitations under the License.
26088  *
26089  * When distributing Covered Code, include this CDDL HEADER in each
26090  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26091  * If applicable, add the following below this CDDL HEADER, with the
26092  * fields enclosed by brackets "[]" replaced with your own identifying
26093  * information: Portions Copyright [yyyy] [name of copyright owner]
26094  *
26095  * CDDL HEADER END
26096  */
26097 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26098 /*	  All Rights Reserved  	*/
26099 
26100 
26101 /*
26102  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26103  * Use is subject to license terms.
26104  *
26105  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26106  * Copyright 2016 Joyent, Inc.
26107  */
26108 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 2
26109 
26110 
26111 
26112 
26113 
26114 /*
26115  * The credential is an opaque kernel private data structure defined in
26116  * <sys/cred_impl.h>.
26117  */
26118 
26119 typedef struct cred cred_t;
26120 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
26121 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 1
26122 /*
26123  * CDDL HEADER START
26124  *
26125  * The contents of this file are subject to the terms of the
26126  * Common Development and Distribution License, Version 1.0 only
26127  * (the "License").  You may not use this file except in compliance
26128  * with the License.
26129  *
26130  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26131  * or http://www.opensolaris.org/os/licensing.
26132  * See the License for the specific language governing permissions
26133  * and limitations under the License.
26134  *
26135  * When distributing Covered Code, include this CDDL HEADER in each
26136  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26137  * If applicable, add the following below this CDDL HEADER, with the
26138  * fields enclosed by brackets "[]" replaced with your own identifying
26139  * information: Portions Copyright [yyyy] [name of copyright owner]
26140  *
26141  * CDDL HEADER END
26142  */
26143 /*
26144  * Copyright (c) 1991-1998 by Sun Microsystems, Inc.
26145  * All rights reserved.
26146  */
26147 
26148 /*
26149  * t_lock.h:	Prototypes for disp_locks, plus include files
26150  *		that describe the interfaces to kernel synch.
26151  *		objects.
26152  */
26153 
26154 
26155 
26156 
26157 #pragma ident "%Z%%M%	%I%	%E% SMI"
26158 
26159 
26160 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 1
26161 /*
26162  * CDDL HEADER START
26163  *
26164  * The contents of this file are subject to the terms of the
26165  * Common Development and Distribution License (the "License").
26166  * You may not use this file except in compliance with the License.
26167  *
26168  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26169  * or http://www.opensolaris.org/os/licensing.
26170  * See the License for the specific language governing permissions
26171  * and limitations under the License.
26172  *
26173  * When distributing Covered Code, include this CDDL HEADER in each
26174  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26175  * If applicable, add the following below this CDDL HEADER, with the
26176  * fields enclosed by brackets "[]" replaced with your own identifying
26177  * information: Portions Copyright [yyyy] [name of copyright owner]
26178  *
26179  * CDDL HEADER END
26180  */
26181 /*
26182  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
26183  * Use is subject to license terms.
26184  * Copyright 2016 Joyent, Inc.
26185  */
26186 
26187 
26188 
26189 
26190 #pragma ident "%Z%%M%	%I%	%E% SMI"
26191 
26192 
26193 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26194 /*
26195  * CDDL HEADER START
26196  *
26197  * The contents of this file are subject to the terms of the
26198  * Common Development and Distribution License (the "License").
26199  * You may not use this file except in compliance with the License.
26200  *
26201  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26202  * or http://www.opensolaris.org/os/licensing.
26203  * See the License for the specific language governing permissions
26204  * and limitations under the License.
26205  *
26206  * When distributing Covered Code, include this CDDL HEADER in each
26207  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26208  * If applicable, add the following below this CDDL HEADER, with the
26209  * fields enclosed by brackets "[]" replaced with your own identifying
26210  * information: Portions Copyright [yyyy] [name of copyright owner]
26211  *
26212  * CDDL HEADER END
26213  */
26214 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26215 /*	  All Rights Reserved  	*/
26216 
26217 
26218 /*
26219  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26220  * Use is subject to license terms.
26221  *
26222  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26223  * Copyright 2016 Joyent, Inc.
26224  */
26225 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
26226 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
26227 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26228 /*	  All Rights Reserved  	*/
26229 
26230 
26231 /*
26232  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
26233  * All rights reserved.  The Berkeley software License Agreement
26234  * specifies the terms and conditions for redistribution.
26235  */
26236 
26237 /*
26238  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
26239  *
26240  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26241  * Use is subject to license terms.
26242  *
26243  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26244  */
26245 
26246 /*
26247  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
26248  */
26249 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
26250 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
26251 typedef lock_t disp_lock_t; /* dispatcher lock type */
26252 
26253 /*
26254  * SPIN_LOCK() macro indicates whether lock is implemented as a spin lock or
26255  * an adaptive mutex, depending on what interrupt levels use it.
26256  */
26257 
26258 
26259 /*
26260  * Macro to control loops which spin on a lock and then check state
26261  * periodically.  Its passed an integer, and returns a boolean value
26262  * that if true indicates its a good time to get the scheduler lock and
26263  * check the state of the current owner of the lock.
26264  */
26265 
26266 
26267 /*
26268  * Externs for CLOCK_LOCK and clock resolution
26269  */
26270 extern volatile uint32_t hres_lock;
26271 extern hrtime_t hrtime_base;
26272 extern int clock_res;
26273 
26274 
26275 
26276 /*
26277  * The definitions of the symbolic interrupt levels:
26278  *
26279  *   CLOCK_LEVEL =>  The level at which one must be to block the clock.
26280  *
26281  *   LOCK_LEVEL  =>  The highest level at which one may block (and thus the
26282  *                   highest level at which one may acquire adaptive locks)
26283  *                   Also the highest level at which one may be preempted.
26284  *
26285  *   DISP_LEVEL  =>  The level at which one must be to perform dispatcher
26286  *                   operations.
26287  *
26288  * The constraints on the platform:
26289  *
26290  *  - CLOCK_LEVEL must be less than or equal to LOCK_LEVEL
26291  *  - LOCK_LEVEL must be less than DISP_LEVEL
26292  *  - DISP_LEVEL should be as close to LOCK_LEVEL as possible
26293  *
26294  * Note that LOCK_LEVEL and CLOCK_LEVEL have historically always been equal;
26295  * changing this relationship is probably possible but not advised.
26296  *
26297  */
26298 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
26299 /*
26300  * The following mask is for the cpu_intr_actv bits corresponding to
26301  * high-level PILs. It should equal:
26302  * ((((1 << PIL_MAX + 1) - 1) >> LOCK_LEVEL + 1) << LOCK_LEVEL + 1)
26303  */
26304 
26305 
26306 /*
26307  * The semaphore code depends on being able to represent a lock plus
26308  * owner in a single 32-bit word.  (Mutexes used to have a similar
26309  * dependency, but no longer.)  Thus the owner must contain at most
26310  * 24 significant bits.  At present only threads and semaphores
26311  * must be aware of this vile constraint.  Different ISAs may handle this
26312  * differently depending on their capabilities (e.g. compare-and-swap)
26313  * and limitations (e.g. constraints on alignment and/or KERNELBASE).
26314  */
26315 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
26316 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
26317 /*
26318  * CDDL HEADER START
26319  *
26320  * The contents of this file are subject to the terms of the
26321  * Common Development and Distribution License (the "License").
26322  * You may not use this file except in compliance with the License.
26323  *
26324  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26325  * or http://www.opensolaris.org/os/licensing.
26326  * See the License for the specific language governing permissions
26327  * and limitations under the License.
26328  *
26329  * When distributing Covered Code, include this CDDL HEADER in each
26330  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26331  * If applicable, add the following below this CDDL HEADER, with the
26332  * fields enclosed by brackets "[]" replaced with your own identifying
26333  * information: Portions Copyright [yyyy] [name of copyright owner]
26334  *
26335  * CDDL HEADER END
26336  */
26337 
26338 /*
26339  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
26340  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
26341  */
26342 
26343 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
26344 /*	  All Rights Reserved  	*/
26345 
26346 /*
26347  * University Copyright- Copyright (c) 1982, 1986, 1988
26348  * The Regents of the University of California
26349  * All Rights Reserved
26350  *
26351  * University Acknowledgment- Portions of this document are derived from
26352  * software developed by the University of California, Berkeley, and its
26353  * contributors.
26354  */
26355 
26356 
26357 
26358 
26359 
26360 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26361 /*
26362  * CDDL HEADER START
26363  *
26364  * The contents of this file are subject to the terms of the
26365  * Common Development and Distribution License (the "License").
26366  * You may not use this file except in compliance with the License.
26367  *
26368  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26369  * or http://www.opensolaris.org/os/licensing.
26370  * See the License for the specific language governing permissions
26371  * and limitations under the License.
26372  *
26373  * When distributing Covered Code, include this CDDL HEADER in each
26374  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26375  * If applicable, add the following below this CDDL HEADER, with the
26376  * fields enclosed by brackets "[]" replaced with your own identifying
26377  * information: Portions Copyright [yyyy] [name of copyright owner]
26378  *
26379  * CDDL HEADER END
26380  */
26381 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26382 /*	  All Rights Reserved  	*/
26383 
26384 
26385 /*
26386  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26387  * Use is subject to license terms.
26388  *
26389  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26390  * Copyright 2016 Joyent, Inc.
26391  */
26392 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
26393 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
26394 /*
26395  * CDDL HEADER START
26396  *
26397  * The contents of this file are subject to the terms of the
26398  * Common Development and Distribution License (the "License").
26399  * You may not use this file except in compliance with the License.
26400  *
26401  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26402  * or http://www.opensolaris.org/os/licensing.
26403  * See the License for the specific language governing permissions
26404  * and limitations under the License.
26405  *
26406  *
26407  * When distributing Covered Code, include this CDDL HEADER in each
26408  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26409  * If applicable, add the following below this CDDL HEADER, with the
26410  * fields enclosed by brackets "[]" replaced with your own identifying
26411  * information: Portions Copyright [yyyy] [name of copyright owner]
26412  *
26413  * CDDL HEADER END
26414  */
26415 
26416 /*
26417  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
26418  * Use is subject to license terms.
26419  * Copyright 2016 Joyent, Inc.
26420  */
26421 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
26422 
26423 
26424 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
26425 /*
26426  * This file and its contents are supplied under the terms of the
26427  * Common Development and Distribution License ("CDDL"), version 1.0.
26428  * You may only use this file in accordance with the terms of version
26429  * 1.0 of the CDDL.
26430  *
26431  * A full copy of the text of the CDDL should have accompanied this
26432  * source.  A copy of the CDDL is also available via the Internet at
26433  * http://www.illumos.org/license/CDDL.
26434  */
26435 
26436 /*
26437  * Copyright 2014-2016 PALO, Richard.
26438  */
26439 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
26440 
26441 
26442 
26443 
26444 
26445 /*
26446  * Fundamental variables; don't change too often.
26447  */
26448 
26449 /*
26450  * _POSIX_VDISABLE has historically been defined in <sys/param.h> since
26451  * an early merge with AT&T source.  It has also historically been defined
26452  * in <sys/termios.h>. The POSIX standard, IEEE Std. 1003.1-1988 initially
26453  * required the existence of _POSIX_VDISABLE in <sys/termios.h>.
26454  * Subsequent versions of the IEEE Standard as well as the X/Open
26455  * specifications required that _POSIX_VDISABLE be defined in <unistd.h>
26456  * while still allowing for it's existence in other headers.  With the
26457  * introduction of XPG6, _POSIX_VDISABLE can only be defined in <unistd.h>.
26458  */
26459 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26460     /* compatibility purposes only	*/
26461     /* and will be removed in a	*/
26462     /* later release		*/
26463 
26464 /*
26465  * These define the maximum and minimum allowable values of the
26466  * configurable parameter NGROUPS_MAX.
26467  */
26468 
26469 
26470 
26471 
26472 /*
26473  * NGROUPS_MAX_DEFAULT: *MUST* match NGROUPS_MAX value in limits.h.
26474  */
26475 
26476 
26477 /*
26478  * Default process priority.  Keep it in sync with limits.h.
26479  */
26480 
26481 
26482 /*
26483  * Fundamental constants of the implementation--cannot be changed easily.
26484  */
26485 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26486 /* REMOTE -- whether machine is primary, secondary, or regular */
26487 
26488 
26489 
26490 /*
26491  * MAXPATHLEN defines the longest permissible path length,
26492  * including the terminating null, after expanding symbolic links.
26493  * TYPICALMAXPATHLEN is used in a few places as an optimization
26494  * with a local buffer on the stack to avoid kmem_alloc().
26495  * MAXSYMLINKS defines the maximum number of symbolic links
26496  * that may be expanded in a path name. It should be set high
26497  * enough to allow all legitimate uses, but halt infinite loops
26498  * reasonably quickly.
26499  * MAXNAMELEN is the length (including the terminating null) of
26500  * the longest permissible file (component) name.
26501  */
26502 
26503 
26504 
26505 
26506 
26507 /*
26508  * MAXLINKNAMELEN defines the longest possible permitted datalink name,
26509  * including the terminating NUL.  Note that this must not be larger
26510  * than related networking constants such as LIFNAMSIZ.
26511  */
26512 
26513 
26514 
26515 
26516 
26517 
26518 /*
26519  * The following are defined to be the same as
26520  * defined in /usr/include/limits.h.  They are
26521  * needed for pipe and FIFO compatibility.
26522  */
26523 # 220 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26524 /* macros replacing interleaving functions */
26525 
26526 
26527 
26528 /*
26529  * File system parameters and macros.
26530  *
26531  * The file system is made out of blocks of at most MAXBSIZE units,
26532  * with smaller units (fragments) only in the last direct block.
26533  * MAXBSIZE primarily determines the size of buffers in the buffer
26534  * pool. It may be made larger without any effect on existing
26535  * file systems; however making it smaller make make some file
26536  * systems unmountable.
26537  *
26538  * Note that the blocked devices are assumed to have DEV_BSIZE
26539  * "sectors" and that fragments must be some multiple of this size.
26540  */
26541 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26542 /*	64 bit versions of btodb and dbtob */
26543 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26544 /*
26545  * Size of arg list passed in by user.
26546  */
26547 # 287 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26548 /*
26549  * Scale factor for scaled integers used to count
26550  * %cpu time and load averages.
26551  */
26552 
26553 
26554 
26555 /*
26556  * Delay units are in microseconds.
26557  *
26558  * XXX	These macros are not part of the DDI!
26559  */
26560 # 317 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26561 /*
26562  * The following is to free utilities from machine dependencies within
26563  * an architecture. Must be included after definition of DEV_BSIZE.
26564  */
26565 # 471 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26566 /*
26567  * The following are assorted machine dependent values which can be
26568  * obtained in a machine independent manner through sysconf(2) or
26569  * sysinfo(2). In order to guarantee that these provide the expected
26570  * value at all times, the System Private interface (leading underscore)
26571  * is used.
26572  */
26573 
26574 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
26575 /*
26576  * CDDL HEADER START
26577  *
26578  * The contents of this file are subject to the terms of the
26579  * Common Development and Distribution License (the "License").
26580  * You may not use this file except in compliance with the License.
26581  *
26582  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26583  * or http://www.opensolaris.org/os/licensing.
26584  * See the License for the specific language governing permissions
26585  * and limitations under the License.
26586  *
26587  * When distributing Covered Code, include this CDDL HEADER in each
26588  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26589  * If applicable, add the following below this CDDL HEADER, with the
26590  * fields enclosed by brackets "[]" replaced with your own identifying
26591  * information: Portions Copyright [yyyy] [name of copyright owner]
26592  *
26593  * CDDL HEADER END
26594  */
26595 
26596 /*
26597  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
26598  *	  All Rights Reserved
26599  *
26600  */
26601 
26602 /*
26603  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26604  * Use is subject to license terms.
26605  */
26606 
26607 /*
26608  * WARNING: This is an implementation-specific header,
26609  * its contents are not guaranteed. Applications
26610  * should include <unistd.h> and not this header.
26611  */
26612 # 480 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
26613 
26614 
26615 
26616 
26617 
26618 
26619 extern long _sysconf(int); /* System Private interface to sysconf() */
26620 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
26621 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 1
26622 /*
26623  * CDDL HEADER START
26624  *
26625  * The contents of this file are subject to the terms of the
26626  * Common Development and Distribution License (the "License").
26627  * You may not use this file except in compliance with the License.
26628  *
26629  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26630  * or http://www.opensolaris.org/os/licensing.
26631  * See the License for the specific language governing permissions
26632  * and limitations under the License.
26633  *
26634  * When distributing Covered Code, include this CDDL HEADER in each
26635  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26636  * If applicable, add the following below this CDDL HEADER, with the
26637  * fields enclosed by brackets "[]" replaced with your own identifying
26638  * information: Portions Copyright [yyyy] [name of copyright owner]
26639  *
26640  * CDDL HEADER END
26641  */
26642 /*
26643  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
26644  */
26645 
26646 
26647 
26648 
26649 
26650 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26651 /*
26652  * CDDL HEADER START
26653  *
26654  * The contents of this file are subject to the terms of the
26655  * Common Development and Distribution License (the "License").
26656  * You may not use this file except in compliance with the License.
26657  *
26658  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26659  * or http://www.opensolaris.org/os/licensing.
26660  * See the License for the specific language governing permissions
26661  * and limitations under the License.
26662  *
26663  * When distributing Covered Code, include this CDDL HEADER in each
26664  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26665  * If applicable, add the following below this CDDL HEADER, with the
26666  * fields enclosed by brackets "[]" replaced with your own identifying
26667  * information: Portions Copyright [yyyy] [name of copyright owner]
26668  *
26669  * CDDL HEADER END
26670  */
26671 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26672 /*	  All Rights Reserved  	*/
26673 
26674 
26675 /*
26676  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26677  * Use is subject to license terms.
26678  *
26679  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26680  * Copyright 2016 Joyent, Inc.
26681  */
26682 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 2
26683 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h"
26684 /*
26685  * Public interface to mutual exclusion locks.  See mutex(9F) for details.
26686  *
26687  * The basic mutex type is MUTEX_ADAPTIVE, which is expected to be used
26688  * in almost all of the kernel.  MUTEX_SPIN provides interrupt blocking
26689  * and must be used in interrupt handlers above LOCK_LEVEL.  The iblock
26690  * cookie argument to mutex_init() encodes the interrupt level to block.
26691  * The iblock cookie must be NULL for adaptive locks.
26692  *
26693  * MUTEX_DEFAULT is the type usually specified (except in drivers) to
26694  * mutex_init().  It is identical to MUTEX_ADAPTIVE.
26695  *
26696  * MUTEX_DRIVER is always used by drivers.  mutex_init() converts this to
26697  * either MUTEX_ADAPTIVE or MUTEX_SPIN depending on the iblock cookie.
26698  *
26699  * Mutex statistics can be gathered on the fly, without rebooting or
26700  * recompiling the kernel, via the lockstat driver (lockstat(7D)).
26701  */
26702 typedef enum {
26703  MUTEX_ADAPTIVE = 0, /* spin if owner is running, otherwise block */
26704  MUTEX_SPIN = 1, /* block interrupts and spin */
26705  MUTEX_DRIVER = 4, /* driver (DDI) mutex */
26706  MUTEX_DEFAULT = 6 /* kernel default mutex */
26707 } kmutex_type_t;
26708 
26709 typedef struct mutex {
26710 
26711 
26712 
26713  void *_opaque[2];
26714 
26715 } kmutex_t;
26716 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
26717 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 1
26718 /*
26719  * CDDL HEADER START
26720  *
26721  * The contents of this file are subject to the terms of the
26722  * Common Development and Distribution License (the "License").
26723  * You may not use this file except in compliance with the License.
26724  *
26725  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26726  * or http://www.opensolaris.org/os/licensing.
26727  * See the License for the specific language governing permissions
26728  * and limitations under the License.
26729  *
26730  * When distributing Covered Code, include this CDDL HEADER in each
26731  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26732  * If applicable, add the following below this CDDL HEADER, with the
26733  * fields enclosed by brackets "[]" replaced with your own identifying
26734  * information: Portions Copyright [yyyy] [name of copyright owner]
26735  *
26736  * CDDL HEADER END
26737  */
26738 /*
26739  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
26740  * Use is subject to license terms.
26741  */
26742 
26743 /*
26744  * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
26745  */
26746 
26747 
26748 
26749 
26750 /*
26751  * Public interface to readers/writer locks.  See rwlock(9F) for details.
26752  */
26753 
26754 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26755 /*
26756  * CDDL HEADER START
26757  *
26758  * The contents of this file are subject to the terms of the
26759  * Common Development and Distribution License (the "License").
26760  * You may not use this file except in compliance with the License.
26761  *
26762  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26763  * or http://www.opensolaris.org/os/licensing.
26764  * See the License for the specific language governing permissions
26765  * and limitations under the License.
26766  *
26767  * When distributing Covered Code, include this CDDL HEADER in each
26768  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26769  * If applicable, add the following below this CDDL HEADER, with the
26770  * fields enclosed by brackets "[]" replaced with your own identifying
26771  * information: Portions Copyright [yyyy] [name of copyright owner]
26772  *
26773  * CDDL HEADER END
26774  */
26775 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26776 /*	  All Rights Reserved  	*/
26777 
26778 
26779 /*
26780  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26781  * Use is subject to license terms.
26782  *
26783  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26784  * Copyright 2016 Joyent, Inc.
26785  */
26786 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 2
26787 
26788 
26789 
26790 
26791 
26792 
26793 
26794 typedef enum {
26795  RW_DRIVER = 2, /* driver (DDI) rwlock */
26796  RW_DEFAULT = 4 /* kernel default rwlock */
26797 } krw_type_t;
26798 
26799 typedef enum {
26800  RW_WRITER,
26801  RW_READER,
26802  RW_READER_STARVEWRITER
26803 } krw_t;
26804 
26805 typedef struct _krwlock {
26806  void *_opaque[1];
26807 } krwlock_t;
26808 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
26809 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h" 1
26810 /*
26811  * CDDL HEADER START
26812  *
26813  * The contents of this file are subject to the terms of the
26814  * Common Development and Distribution License, Version 1.0 only
26815  * (the "License").  You may not use this file except in compliance
26816  * with the License.
26817  *
26818  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26819  * or http://www.opensolaris.org/os/licensing.
26820  * See the License for the specific language governing permissions
26821  * and limitations under the License.
26822  *
26823  * When distributing Covered Code, include this CDDL HEADER in each
26824  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26825  * If applicable, add the following below this CDDL HEADER, with the
26826  * fields enclosed by brackets "[]" replaced with your own identifying
26827  * information: Portions Copyright [yyyy] [name of copyright owner]
26828  *
26829  * CDDL HEADER END
26830  */
26831 /*
26832  * Copyright (c) 1993-1998 by Sun Microsystems, Inc.
26833  * All rights reserved.
26834  */
26835 
26836 
26837 
26838 
26839 #pragma ident "%Z%%M%	%I%	%E% SMI"
26840 
26841 /*
26842  * Public interface to semaphores.  See semaphore(9F) for details.
26843  */
26844 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h"
26845 typedef enum {
26846  SEMA_DEFAULT,
26847  SEMA_DRIVER
26848 } ksema_type_t;
26849 
26850 typedef struct _ksema {
26851  void * _opaque[2]; /* 2 words on 4 byte alignment */
26852 } ksema_t;
26853 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
26854 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 1
26855 /*
26856  * CDDL HEADER START
26857  *
26858  * The contents of this file are subject to the terms of the
26859  * Common Development and Distribution License (the "License").
26860  * You may not use this file except in compliance with the License.
26861  *
26862  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26863  * or http://www.opensolaris.org/os/licensing.
26864  * See the License for the specific language governing permissions
26865  * and limitations under the License.
26866  *
26867  * When distributing Covered Code, include this CDDL HEADER in each
26868  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26869  * If applicable, add the following below this CDDL HEADER, with the
26870  * fields enclosed by brackets "[]" replaced with your own identifying
26871  * information: Portions Copyright [yyyy] [name of copyright owner]
26872  *
26873  * CDDL HEADER END
26874  */
26875 /*
26876  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26877  * Use is subject to license terms.
26878  */
26879 
26880 /*
26881  * Copyright (c) 2012 by Delphix. All rights reserved.
26882  */
26883 
26884 /*
26885  * condvar.h:
26886  *
26887  * definitions for thread synchronization primitives: condition variables
26888  * This is the public part of the interface to condition variables. The
26889  * private (implementation-specific) part is in <arch>/sys/condvar_impl.h.
26890  */
26891 
26892 
26893 
26894 
26895 
26896 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26897 /*
26898  * CDDL HEADER START
26899  *
26900  * The contents of this file are subject to the terms of the
26901  * Common Development and Distribution License (the "License").
26902  * You may not use this file except in compliance with the License.
26903  *
26904  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26905  * or http://www.opensolaris.org/os/licensing.
26906  * See the License for the specific language governing permissions
26907  * and limitations under the License.
26908  *
26909  * When distributing Covered Code, include this CDDL HEADER in each
26910  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26911  * If applicable, add the following below this CDDL HEADER, with the
26912  * fields enclosed by brackets "[]" replaced with your own identifying
26913  * information: Portions Copyright [yyyy] [name of copyright owner]
26914  *
26915  * CDDL HEADER END
26916  */
26917 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26918 /*	  All Rights Reserved  	*/
26919 
26920 
26921 /*
26922  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26923  * Use is subject to license terms.
26924  *
26925  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26926  * Copyright 2016 Joyent, Inc.
26927  */
26928 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
26929 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
26930 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26931 /*	  All Rights Reserved  	*/
26932 
26933 
26934 /*
26935  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
26936  * All rights reserved.  The Berkeley software License Agreement
26937  * specifies the terms and conditions for redistribution.
26938  */
26939 
26940 /*
26941  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
26942  *
26943  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26944  * Use is subject to license terms.
26945  *
26946  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26947  */
26948 
26949 /*
26950  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
26951  */
26952 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
26953 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h"
26954 /*
26955  * Condtion variables.
26956  */
26957 
26958 typedef struct _kcondvar {
26959  ushort_t _opaque;
26960 } kcondvar_t;
26961 
26962 typedef enum {
26963  CV_DEFAULT,
26964  CV_DRIVER
26965 } kcv_type_t;
26966 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
26967 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h"
26968 /*
26969  * Mutual exclusion locks described in common/sys/mutex.h.
26970  *
26971  * Semaphores described in common/sys/semaphore.h.
26972  *
26973  * Readers/Writer locks described in common/sys/rwlock.h.
26974  *
26975  * Condition variables described in common/sys/condvar.h
26976  */
26977 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
26978 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 1
26979 /*
26980  * CDDL HEADER START
26981  *
26982  * The contents of this file are subject to the terms of the
26983  * Common Development and Distribution License, Version 1.0 only
26984  * (the "License").  You may not use this file except in compliance
26985  * with the License.
26986  *
26987  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26988  * or http://www.opensolaris.org/os/licensing.
26989  * See the License for the specific language governing permissions
26990  * and limitations under the License.
26991  *
26992  * When distributing Covered Code, include this CDDL HEADER in each
26993  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26994  * If applicable, add the following below this CDDL HEADER, with the
26995  * fields enclosed by brackets "[]" replaced with your own identifying
26996  * information: Portions Copyright [yyyy] [name of copyright owner]
26997  *
26998  * CDDL HEADER END
26999  */
27000 /*
27001  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
27002  * Use is subject to license terms.
27003  */
27004 
27005 
27006 
27007 
27008 #pragma ident "%Z%%M%	%I%	%E% SMI"
27009 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
27010 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
27011 /*
27012  * CDDL HEADER START
27013  *
27014  * The contents of this file are subject to the terms of the
27015  * Common Development and Distribution License (the "License").
27016  * You may not use this file except in compliance with the License.
27017  *
27018  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27019  * or http://www.opensolaris.org/os/licensing.
27020  * See the License for the specific language governing permissions
27021  * and limitations under the License.
27022  *
27023  *
27024  * When distributing Covered Code, include this CDDL HEADER in each
27025  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27026  * If applicable, add the following below this CDDL HEADER, with the
27027  * fields enclosed by brackets "[]" replaced with your own identifying
27028  * information: Portions Copyright [yyyy] [name of copyright owner]
27029  *
27030  * CDDL HEADER END
27031  */
27032 
27033 /*
27034  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
27035  * Use is subject to license terms.
27036  * Copyright 2016 Joyent, Inc.
27037  */
27038 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 2
27039 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
27040 /*
27041  * XXX	Ick.  This type needs to be visible outside the above guard because
27042  * the proc structure is visible outside the _KERNEL | _KMEMUSER guard.
27043  * If we can make proc internals less visible, (which we obviously should)
27044  * then this can be invisible too.
27045  */
27046 typedef unsigned int model_t;
27047 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
27048 
27049 
27050 
27051 
27052 
27053 /*
27054  * Data queue.
27055  *
27056  * NOTE: The *only* public fields are documented in queue(9S).
27057  *       Everything else is implementation-private.
27058  *
27059  * The locking rules for the queue_t structure are extremely subtle and vary
27060  * widely depending on the field in question.  As such, each field is
27061  * annotated according to the following legend:
27062  *
27063  *   Q9S: The field is documented in queue(9S) and may be accessed without
27064  *        locks by a STREAMS module when inside an entry point (e.g., put(9E)).
27065  *        However, no fields can be directly modified unless q_lock is held
27066  *        (which is not possible in a DDI compliant STREAMS module), with the
27067  *        following exceptions:
27068  *
27069  *	   - q_ptr: can be modified as per the rules of the STREAMS module.
27070  *		    The STREAMS framework ignores q_ptr and thus imposes *no*
27071  *		    locking rules on it.
27072  *         - q_qinfo: can be modified before qprocson().
27073  *
27074  *	   - q_minpsz, q_maxpsz, q_hiwat, q_lowat: can be modified as per the
27075  *		    rules of the STREAMS module.  The STREAMS framework never
27076  *		    modifies these fields, and is tolerant of temporarily
27077  *		    stale field values.
27078  *
27079  *	  In general, the STREAMS framework employs one of the following
27080  *	  techniques to ensure STREAMS modules can safely access Q9S fields:
27081  *
27082  *	   - The field is only modified by the framework when the stream is
27083  *	     locked with strlock() (q_next).
27084  *
27085  *	   - The field is modified by the framework, but the modifies are
27086  *	     atomic, and temporarily stale values are harmless (q_count,
27087  *	     q_first, q_last).
27088  *
27089  *	   - The field is modified by the framework, but the field's visible
27090  *	     values are either constant or directly under the control
27091  *	     of the STREAMS module itself (q_flag).
27092  *
27093  *   QLK: The field must be accessed or modified under q_lock, except when
27094  *        the stream has been locked with strlock().  If multiple q_locks must
27095  *        be acquired, q_locks at higher addresses must be taken first.
27096  *
27097  *   STR: The field can be accessed without a lock, but must be modified under
27098  *	  strlock().
27099  *
27100  *   SQLK: The field must be accessed or modified under SQLOCK().
27101  *
27102  *   NOLK: The field can be accessed without a lock, but can only be modified
27103  *	   when the queue_t is not known to any other threads.
27104  *
27105  *   SVLK: The field must be accessed or modified under the service_queue lock.
27106  *         Note that service_lock must be taken after any needed q_locks,
27107  *	   and that no other lock should be taken while service_lock is held.
27108  *
27109  * In addition, it is always acceptable to modify a field that is not yet
27110  * known to any other threads -- and other special case exceptions exist in
27111  * the code.  Also, q_lock is used with q_wait to implement a stream head
27112  * monitor for reads and writes.
27113  */
27114 typedef struct queue {
27115  struct qinit *q_qinfo; /* Q9S: Q processing procedure  */
27116  struct msgb *q_first; /* Q9S: first message in Q	*/
27117  struct msgb *q_last; /* Q9S: last message in Q	*/
27118  struct queue *q_next; /* Q9S: next Q in stream	*/
27119  struct queue *q_link; /* SVLK: next Q for scheduling	*/
27120  void *q_ptr; /* Q9S: module-specific data	*/
27121  size_t q_count; /* Q9S: number of bytes on Q	*/
27122  uint_t q_flag; /* Q9S: Q state			*/
27123  ssize_t q_minpsz; /* Q9S: smallest packet OK on Q */
27124  ssize_t q_maxpsz; /* Q9S: largest packet OK on Q	*/
27125  size_t q_hiwat; /* Q9S: Q high water mark	*/
27126  size_t q_lowat; /* Q9S: Q low water mark	*/
27127  struct qband *q_bandp; /* QLK: band flow information	*/
27128  kmutex_t q_lock; /* NOLK: structure lock		*/
27129  struct stdata *q_stream; /* NOLK: stream backpointer	*/
27130  struct syncq *q_syncq; /* NOLK: associated syncq 	*/
27131  unsigned char q_nband; /* QLK: number of bands		*/
27132  kcondvar_t q_wait; /* NOLK: read/write sleep CV	*/
27133  struct queue *q_nfsrv; /* STR: next Q with svc routine */
27134  ushort_t q_draining; /* QLK: Q is draining		*/
27135  short q_struiot; /* QLK: sync streams Q UIO mode	*/
27136  clock_t q_qtstamp; /* QLK: when Q was enabled	*/
27137  size_t q_mblkcnt; /* QLK: mblk count		*/
27138  uint_t q_syncqmsgs; /* QLK: syncq message count	*/
27139  size_t q_rwcnt; /* QLK: # threads in rwnext()	*/
27140  pri_t q_spri; /* QLK: Q scheduling priority	*/
27141 
27142  /*
27143 	 * Syncq scheduling
27144 	 */
27145  struct msgb *q_sqhead; /* QLK: first syncq message	*/
27146  struct msgb *q_sqtail; /* QLK: last syncq message 	*/
27147  struct queue *q_sqnext; /* SQLK: next Q on syncq list	*/
27148  struct queue *q_sqprev; /* SQLK: prev Q on syncq list 	*/
27149  uint_t q_sqflags; /* SQLK: syncq flags		*/
27150  clock_t q_sqtstamp; /* SQLK: when Q was scheduled for sq */
27151 
27152  /*
27153 	 * NOLK: Reference to the queue's module's implementation
27154 	 * structure. This will be NULL for queues associated with drivers.
27155 	 */
27156  struct fmodsw_impl *q_fp;
27157 } queue_t;
27158 
27159 /*
27160  * Queue flags; unused flags not documented in queue(9S) can be recycled.
27161  */
27162 # 169 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27163 /*	UNUSED		0x00000200	   was QHLIST			*/
27164 /* 	UNUSED 		0x00000400	   was QUNSAFE			*/
27165 
27166 
27167 
27168 
27169 
27170 
27171      /* all MT type flags		*/
27172 
27173 
27174 
27175 
27176 
27177 
27178 /*	UNUSED		0x00400000	   was QHOT			*/
27179 /*	UNUSED		0x00800000	   was QNEXTHOT			*/
27180 /* 	UNUSED		0x01000000	   was _QNEXTLESS		*/
27181 
27182 
27183 
27184 
27185      /* direct interface to/from sockfs */
27186 
27187 /* queue sqflags (protected by SQLOCK). */
27188 
27189 
27190      /* This is also noted by the	*/
27191      /* q_draining field, but this one is */
27192      /* protected by SQLOCK */
27193 
27194 /*
27195  * Structure that describes the separate information
27196  * for each priority band in the queue.
27197  */
27198 typedef struct qband {
27199  struct qband *qb_next; /* next band's info */
27200  size_t qb_count; /* number of bytes in band */
27201  struct msgb *qb_first; /* beginning of band's data */
27202  struct msgb *qb_last; /* end of band's data */
27203  size_t qb_hiwat; /* high water mark for band */
27204  size_t qb_lowat; /* low water mark for band */
27205  uint_t qb_flag; /* see below */
27206  size_t qb_mblkcnt; /* mblk counter for runaway msgs */
27207 } qband_t;
27208 
27209 /*
27210  * qband flags
27211  */
27212 
27213 
27214 
27215 
27216 /*
27217  * Maximum number of bands.
27218  */
27219 
27220 
27221 /*
27222  * Fields that can be manipulated through strqset() and strqget().
27223  */
27224 typedef enum qfields {
27225  QHIWAT = 0, /* q_hiwat or qb_hiwat */
27226  QLOWAT = 1, /* q_lowat or qb_lowat */
27227  QMAXPSZ = 2, /* q_maxpsz */
27228  QMINPSZ = 3, /* q_minpsz */
27229  QCOUNT = 4, /* q_count or qb_count */
27230  QFIRST = 5, /* q_first or qb_first */
27231  QLAST = 6, /* q_last or qb_last */
27232  QFLAG = 7, /* q_flag or qb_flag */
27233  QSTRUIOT = 8, /* q_struiot */
27234  QBAD = 9
27235 } qfields_t;
27236 
27237 /*
27238  * Module information structure
27239  */
27240 struct module_info {
27241  ushort_t mi_idnum; /* module id number */
27242  char *mi_idname; /* module name */
27243  ssize_t mi_minpsz; /* min packet size accepted */
27244  ssize_t mi_maxpsz; /* max packet size accepted */
27245  size_t mi_hiwat; /* hi-water mark */
27246  size_t mi_lowat; /* lo-water mark */
27247 };
27248 
27249 /*
27250  * queue information structure (with Synchronous STREAMS extensions)
27251  */
27252 struct qinit {
27253  int (*qi_putp)(); /* put procedure */
27254  int (*qi_srvp)(); /* service procedure */
27255  int (*qi_qopen)(); /* called on startup */
27256  int (*qi_qclose)(); /* called on finish */
27257  int (*qi_qadmin)(); /* for future use */
27258  struct module_info *qi_minfo; /* module information structure */
27259  struct module_stat *qi_mstat; /* module statistics structure */
27260  int (*qi_rwp)(); /* r/w procedure */
27261  int (*qi_infop)(); /* information procedure */
27262  int qi_struiot; /* stream uio type for struio() */
27263 };
27264 
27265 /*
27266  * Values for qi_struiot and q_struiot:
27267  */
27268 
27269 
27270 
27271 
27272 /*
27273  * Streamtab (used in cdevsw and fmodsw to point to module or driver)
27274  */
27275 struct streamtab {
27276  struct qinit *st_rdinit;
27277  struct qinit *st_wrinit;
27278  struct qinit *st_muxrinit;
27279  struct qinit *st_muxwinit;
27280 };
27281 
27282 /*
27283  * Structure sent to mux drivers to indicate a link.
27284  */
27285 struct linkblk {
27286  queue_t *l_qtop; /* lowest level write queue of upper stream */
27287     /* (set to NULL for persistent links) */
27288  queue_t *l_qbot; /* highest level write queue of lower stream */
27289  int l_index; /* index for lower stream. */
27290 };
27291 
27292 /*
27293  * Esballoc data buffer freeing routine
27294  */
27295 typedef struct free_rtn {
27296  void (*free_func)();
27297  caddr_t free_arg;
27298 } frtn_t;
27299 
27300 /*
27301  * Data block descriptor
27302  *
27303  * NOTE: db_base, db_lim, db_ref and db_type are the *only* public fields,
27304  * as described in datab(9S).  Everything else is implementation-private.
27305  */
27306 
27307 
27308 
27309 typedef struct datab {
27310  frtn_t *db_frtnp;
27311  unsigned char *db_base;
27312  unsigned char *db_lim;
27313  unsigned char db_ref;
27314  unsigned char db_type;
27315  unsigned char db_flags;
27316  unsigned char db_struioflag;
27317  pid_t db_cpid; /* cached pid, needs verification */
27318  void *db_cache; /* kmem cache descriptor */
27319  struct msgb *db_mblk;
27320  void (*db_free)(struct msgb *, struct datab *);
27321  void (*db_lastfree)(struct msgb *, struct datab *);
27322  intptr_t db_cksumstart;
27323  intptr_t db_cksumend;
27324  intptr_t db_cksumstuff;
27325  union {
27326   double enforce_alignment;
27327   unsigned char data[8];
27328   struct {
27329    union {
27330     uint32_t u32;
27331     uint16_t u16;
27332    } cksum_val; /* used to store calculated cksum */
27333    uint16_t flags;
27334    uint16_t pad;
27335   } cksum;
27336   /*
27337 		 * Union used for future extensions (pointer to data ?).
27338 		 */
27339  } db_struioun;
27340  struct fthdr *db_fthdr;
27341  cred_t *db_credp; /* credential */
27342 } dblk_t;
27343 
27344 
27345 
27346 
27347 /*
27348  * Accessor macros for private dblk_t fields (the rest are in <sys/strsun.h>).
27349  */
27350 
27351 
27352 
27353 /*
27354  * Used by GLDv2 to store the TCI information.
27355  */
27356 
27357 
27358 /*
27359  * Message block descriptor
27360  */
27361 typedef struct msgb {
27362  struct msgb *b_next;
27363  struct msgb *b_prev;
27364  struct msgb *b_cont;
27365  unsigned char *b_rptr;
27366  unsigned char *b_wptr;
27367  struct datab *b_datap;
27368  unsigned char b_band;
27369  unsigned char b_tag;
27370  unsigned short b_flag;
27371  queue_t *b_queue; /* for sync queues */
27372 } mblk_t;
27373 
27374 /*
27375  * bcache descriptor
27376  */
27377 typedef struct bcache {
27378  kmutex_t mutex;
27379  struct kmem_cache *buffer_cache;
27380  struct kmem_cache *dblk_cache;
27381  int alloc;
27382  int destroy;
27383  size_t size;
27384  uint_t align;
27385 } bcache_t;
27386 
27387 /*
27388  * db_flags values (all implementation private!)
27389  */
27390 
27391 
27392 
27393 
27394 /*
27395  * db_struioflag values:
27396  */
27397 
27398 
27399 
27400 
27401 
27402 
27403 /*
27404  * Message flags.  These are interpreted by the stream head.
27405  */
27406 
27407 
27408     /* write side of stream */
27409 
27410 /*	UNUSED		0x08	   was MSGNOGET (can be recycled) */
27411 
27412 
27413 
27414 
27415 /*
27416  * Streams message types.
27417  */
27418 
27419 /*
27420  * Data and protocol messages (regular and priority)
27421  */
27422 
27423 
27424 
27425 
27426 /*
27427  * Control messages (regular and priority)
27428  */
27429 # 445 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27430 /*
27431  * Control messages (high priority; go to head of queue)
27432  */
27433 # 468 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27434 /*
27435  * Queue message class definitions.
27436  */
27437 
27438 
27439 
27440 /*
27441  *  IOCTL structure - this structure is the format of the M_IOCTL message type.
27442  */
27443 # 488 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27444 struct iocblk {
27445  int ioc_cmd; /* ioctl command type */
27446  cred_t *ioc_cr; /* full credentials */
27447  uint_t ioc_id; /* ioctl id */
27448  size_t ioc_count; /* count of bytes in data field */
27449  int ioc_error; /* error code */
27450  int ioc_rval; /* return value  */
27451  int ioc_fill1;
27452  uint_t ioc_flag; /* see below */
27453  int ioc_filler[2]; /* reserved for future use */
27454 };
27455 
27456 
27457 typedef struct iocblk *IOCP;
27458 
27459 /* {ioc,cp}_flags values */
27460 
27461 
27462 
27463 
27464 
27465 
27466 
27467 /*
27468  *	Is the ioctl data formatted for our native model?
27469  */
27470 
27471 
27472 
27473 /*
27474  * structure for the M_COPYIN and M_COPYOUT message types.
27475  */
27476 # 531 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27477 struct copyreq {
27478  int cq_cmd; /* ioctl command (from ioc_cmd) */
27479  cred_t *cq_cr; /* full credentials */
27480  uint_t cq_id; /* ioctl id (from ioc_id) */
27481  caddr_t cq_addr; /* address to copy data to/from */
27482  size_t cq_size; /* number of bytes to copy */
27483  uint_t cq_flag; /* must be zero */
27484  mblk_t *cq_private; /* private state information */
27485  int cq_filler[4]; /* reserved for future use */
27486 };
27487 
27488 
27489 /*
27490  * structure for the M_IOCDATA message type.
27491  */
27492 # 557 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27493 struct copyresp {
27494  int cp_cmd; /* ioctl command (from ioc_cmd) */
27495  cred_t *cp_cr; /* full credentials */
27496  uint_t cp_id; /* ioctl id (from ioc_id) */
27497  caddr_t cp_rval; /* status of request: 0 -> success */
27498      /* 		non-zero -> failure */
27499  size_t cp_pad1;
27500  uint_t cp_pad2;
27501  mblk_t *cp_private; /* private state information */
27502  uint_t cp_flag; /* datamodel IOC_ flags; see above */
27503  int cp_filler[3];
27504 };
27505 
27506 
27507 /*
27508  * Since these structures are all intended to travel in the same message
27509  * at different stages of a STREAMS ioctl, this union is used to determine
27510  * the message size in strdoioctl().
27511  */
27512 union ioctypes {
27513  struct iocblk iocblk;
27514  struct copyreq copyreq;
27515  struct copyresp copyresp;
27516 };
27517 
27518 /*
27519  * Options structure for M_SETOPTS message.  This is sent upstream
27520  * by a module or driver to set stream head options.
27521  */
27522 struct stroptions {
27523  uint_t so_flags; /* options to set */
27524  short so_readopt; /* read option */
27525  ushort_t so_wroff; /* write offset */
27526  ssize_t so_minpsz; /* minimum read packet size */
27527  ssize_t so_maxpsz; /* maximum read packet size */
27528  size_t so_hiwat; /* read queue high water mark */
27529  size_t so_lowat; /* read queue low water mark */
27530  unsigned char so_band; /* band for water marks */
27531  ushort_t so_erropt; /* error option */
27532  ssize_t so_maxblk; /* maximum message block size */
27533  ushort_t so_copyopt; /* copy options (see stropts.h) */
27534  ushort_t so_tail; /* space available at the end */
27535 };
27536 
27537 /* flags for stream options set message */
27538 # 673 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27539 /*
27540  * Miscellaneous parameters and flags.
27541  */
27542 
27543 /*
27544  * Values for stream flag in open to indicate module open, clone open,
27545  * and the return value for failure.
27546  */
27547 
27548 
27549 
27550 
27551 /*
27552  * Priority definitions for block allocation.
27553  */
27554 
27555 
27556 
27557 
27558 /*
27559  * Value for packet size that denotes infinity
27560  */
27561 
27562 
27563 /*
27564  * Flags for flushq()
27565  */
27566 
27567 
27568 
27569 /*
27570  * Flag for transparent ioctls
27571  */
27572 
27573 
27574 /*
27575  * Stream head default high/low water marks
27576  */
27577 
27578 
27579 
27580 /*
27581  * qwriter perimeter types
27582  */
27583 
27584 
27585 
27586 /*
27587  * Definitions of Streams macros and function interfaces.
27588  */
27589 
27590 /*
27591  * canenable - check if queue can be enabled by putq().
27592  */
27593 
27594 
27595 /*
27596  * Test if data block type is one of the data messages (i.e. not a control
27597  * message).
27598  */
27599 
27600 
27601 
27602 
27603 
27604 
27605 
27606 /*
27607  * Extract queue class of message block.
27608  */
27609 
27610 
27611 /*
27612  * Align address on next lower word boundary.
27613  */
27614 
27615 
27616 /*
27617  * Find the max size of data block.
27618  */
27619 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
27620 
27621 /*
27622  * Symbols such as htonl() are required to be exposed through this file,
27623  * per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
27624  */
27625 
27626 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 1
27627 /*
27628  * CDDL HEADER START
27629  *
27630  * The contents of this file are subject to the terms of the
27631  * Common Development and Distribution License (the "License").
27632  * You may not use this file except in compliance with the License.
27633  *
27634  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27635  * or http://www.opensolaris.org/os/licensing.
27636  * See the License for the specific language governing permissions
27637  * and limitations under the License.
27638  *
27639  * When distributing Covered Code, include this CDDL HEADER in each
27640  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27641  * If applicable, add the following below this CDDL HEADER, with the
27642  * fields enclosed by brackets "[]" replaced with your own identifying
27643  * information: Portions Copyright [yyyy] [name of copyright owner]
27644  *
27645  * CDDL HEADER END
27646  */
27647 
27648 /*
27649  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
27650  * Use is subject to license terms.
27651  */
27652 
27653 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
27654 /*	  All Rights Reserved  	*/
27655 
27656 /*
27657  * University Copyright- Copyright (c) 1982, 1986, 1988
27658  * The Regents of the University of California
27659  * All Rights Reserved
27660  *
27661  * University Acknowledgment- Portions of this document are derived from
27662  * software developed by the University of California, Berkeley, and its
27663  * contributors.
27664  */
27665 
27666 
27667 
27668 
27669 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
27670 /*
27671  * CDDL HEADER START
27672  *
27673  * The contents of this file are subject to the terms of the
27674  * Common Development and Distribution License (the "License").
27675  * You may not use this file except in compliance with the License.
27676  *
27677  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27678  * or http://www.opensolaris.org/os/licensing.
27679  * See the License for the specific language governing permissions
27680  * and limitations under the License.
27681  *
27682  *
27683  * When distributing Covered Code, include this CDDL HEADER in each
27684  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27685  * If applicable, add the following below this CDDL HEADER, with the
27686  * fields enclosed by brackets "[]" replaced with your own identifying
27687  * information: Portions Copyright [yyyy] [name of copyright owner]
27688  *
27689  * CDDL HEADER END
27690  */
27691 
27692 /*
27693  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
27694  * Use is subject to license terms.
27695  * Copyright 2016 Joyent, Inc.
27696  */
27697 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
27698 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
27699 /*
27700  * CDDL HEADER START
27701  *
27702  * The contents of this file are subject to the terms of the
27703  * Common Development and Distribution License, Version 1.0 only
27704  * (the "License").  You may not use this file except in compliance
27705  * with the License.
27706  *
27707  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27708  * or http://www.opensolaris.org/os/licensing.
27709  * See the License for the specific language governing permissions
27710  * and limitations under the License.
27711  *
27712  * When distributing Covered Code, include this CDDL HEADER in each
27713  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27714  * If applicable, add the following below this CDDL HEADER, with the
27715  * fields enclosed by brackets "[]" replaced with your own identifying
27716  * information: Portions Copyright [yyyy] [name of copyright owner]
27717  *
27718  * CDDL HEADER END
27719  */
27720 /*
27721  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27722  *
27723  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
27724  * Use is subject to license terms.
27725  */
27726 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
27727 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
27728 /*
27729  * macros for conversion between host and (internet) network byte order
27730  */
27731 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
27732 typedef uint16_t in_port_t;
27733 
27734 
27735 
27736 
27737 typedef uint32_t in_addr_t;
27738 
27739 
27740 
27741 extern uint32_t htonl(uint32_t);
27742 extern uint16_t htons(uint16_t);
27743 extern uint32_t ntohl(uint32_t);
27744 extern uint16_t ntohs(uint16_t);
27745 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
27746 extern uint64_t htonll(uint64_t);
27747 extern uint64_t ntohll(uint64_t);
27748 
27749 
27750 
27751 
27752 
27753 
27754 /*
27755  * Macros to reverse byte order
27756  */
27757 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
27758 /*
27759  * Macros to convert from a specific byte order to/from native byte order
27760  */
27761 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
27762 /*
27763  * Macros to read unaligned values from a specific byte order to
27764  * native byte order
27765  */
27766 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
27767 /*
27768  * Macros to write unaligned values from native byte order to a specific byte
27769  * order.
27770  */
27771 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
27772 
27773 
27774 
27775 
27776 
27777 
27778 
27779 /*
27780  * Note: IPv4 address data structures usage conventions.
27781  * The "in_addr_t" type below (required by Unix standards)
27782  * is NOT a typedef of "struct in_addr" and violates the usual
27783  * conventions where "struct <name>" and <name>_t are corresponding
27784  * typedefs.
27785  * To minimize confusion, kernel data structures/usage prefers use
27786  * of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
27787  * The user level APIs continue to follow the historic popular
27788  * practice of using "struct in_addr".
27789  */
27790 
27791 
27792 
27793 
27794 
27795 
27796 
27797 typedef uint32_t ipaddr_t;
27798 
27799 
27800 
27801 
27802 struct in6_addr {
27803  union {
27804   /*
27805 		 * Note: Static initalizers of "union" type assume
27806 		 * the constant on the RHS is the type of the first member
27807 		 * of union.
27808 		 * To make static initializers (and efficient usage) work,
27809 		 * the order of members exposed to user and kernel view of
27810 		 * this data structure is different.
27811 		 * User environment sees specified uint8_t type as first
27812 		 * member whereas kernel sees most efficient type as
27813 		 * first member.
27814 		 */
27815 
27816 
27817 
27818 
27819   uint8_t _S6_u8[16]; /* IPv6 address */
27820   uint32_t _S6_u32[4]; /* IPv6 address */
27821 
27822   uint32_t __S6_align; /* Align on 32 bit boundary */
27823  } _S6_un;
27824 };
27825 
27826 
27827 
27828 
27829 
27830 
27831 
27832 typedef struct in6_addr in6_addr_t;
27833 # 144 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27834 /*
27835  * Protocols
27836  *
27837  * Some of these constant names are copied for the DTrace IP provider in
27838  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
27839  * in sync.
27840  */
27841 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27842       /* Transmission Protocol */
27843 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27844 /*
27845  * Port/socket numbers: network standard functions
27846  *
27847  * Entries should exist here for each port number compiled into an ON
27848  * component, such as snoop.
27849  */
27850 # 208 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27851 /*
27852  * Port/socket numbers: host specific functions
27853  */
27854 # 229 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27855 /*
27856  * Internet Key Exchange (IKE) ports
27857  */
27858 
27859 
27860 
27861 /*
27862  * UNIX TCP sockets
27863  */
27864 
27865 
27866 
27867 
27868 
27869 
27870 /*
27871  * UNIX UDP sockets
27872  */
27873 
27874 
27875 
27876 
27877 
27878 
27879 
27880 /*
27881  * DHCPv6 UDP ports
27882  */
27883 
27884 
27885 
27886 
27887 
27888 /*
27889  * Ports < IPPORT_RESERVED are reserved for
27890  * privileged processes (e.g. root).
27891  * Ports > IPPORT_USERRESERVED are reserved
27892  * for servers, not necessarily privileged.
27893  */
27894 
27895 
27896 
27897 /*
27898  * Link numbers
27899  */
27900 
27901 
27902 
27903 
27904 /*
27905  * IPv4 Internet address
27906  *	This definition contains obsolete fields for compatibility
27907  *	with SunOS 3.x and 4.2bsd.  The presence of subnets renders
27908  *	divisions into fixed fields misleading at best.  New code
27909  *	should use only the s_addr field.
27910  */
27911 # 293 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27912 struct in_addr {
27913  union {
27914   struct { uint8_t s_b1, s_b2, s_b3, s_b4; } S_un_b;
27915   struct { uint16_t s_w1, s_w2; } S_un_w;
27916 
27917   uint32_t S_addr;
27918 
27919 
27920 
27921  } S_un;
27922 
27923 
27924 
27925 
27926 
27927 
27928 };
27929 
27930 /*
27931  * Definitions of bits in internet address integers.
27932  * On subnets, the decomposition of addresses to host and net parts
27933  * is done according to subnet mask, not the masks here.
27934  *
27935  * Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
27936  * IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
27937  * obsolete". IN_MULTICAST macro should be used to test if a address
27938  * is a multicast address.
27939  */
27940 # 348 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27941 /*
27942  * We have removed CLASS E checks from the kernel
27943  * But we preserve these defines for userland in order
27944  * to avoid compile  breakage of some 3rd party piece of software
27945  */
27946 # 369 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27947 /* Scoped IPv4 prefixes (in host byte-order) */
27948 # 379 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27949 /* RFC 3927 IPv4 link local address (i in host byte-order) */
27950 
27951 
27952 /* Well known 6to4 Relay Router Anycast address defined in RFC 3068 */
27953 
27954 
27955 
27956 
27957 
27958 
27959 /*
27960  * Define a macro to stuff the loopback address into an Internet address
27961  */
27962 
27963 
27964 
27965 
27966 
27967 
27968 /*
27969  * IPv4 Socket address.
27970  */
27971 struct sockaddr_in {
27972  sa_family_t sin_family;
27973  in_port_t sin_port;
27974  struct in_addr sin_addr;
27975 
27976  char sin_zero[8];
27977 
27978 
27979 
27980 };
27981 
27982 
27983 /*
27984  * IPv6 socket address.
27985  */
27986 struct sockaddr_in6 {
27987  sa_family_t sin6_family;
27988  in_port_t sin6_port;
27989  uint32_t sin6_flowinfo;
27990  struct in6_addr sin6_addr;
27991  uint32_t sin6_scope_id; /* Depends on scope of sin6_addr */
27992  uint32_t __sin6_src_id; /* Impl. specific - UDP replies */
27993 };
27994 
27995 /*
27996  * Macros for accessing the traffic class and flow label fields from
27997  * sin6_flowinfo.
27998  * These are designed to be applied to a 32-bit value.
27999  */
28000 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28001 /* masks */
28002 
28003 
28004 
28005 
28006 
28007 /*
28008  * Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
28009  * use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
28010  * only. They need to be different for User/Kernel versions because union
28011  * component data structure is defined differently (it is identical at
28012  * binary representation level).
28013  *
28014  * const struct in6_addr IN6ADDR_ANY_INIT;
28015  * const struct in6_addr IN6ADDR_LOOPBACK_INIT;
28016  */
28017 # 478 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28018 /*
28019  * RFC 2553 specifies the following macros. Their type is defined
28020  * as "int" in the RFC but they only have boolean significance
28021  * (zero or non-zero). For the purposes of our comment notation,
28022  * we assume a hypothetical type "bool" defined as follows to
28023  * write the prototypes assumed for macros in our comments better.
28024  *
28025  * typedef int bool;
28026  */
28027 
28028 /*
28029  * IN6 macros used to test for special IPv6 addresses
28030  * (Mostly from spec)
28031  *
28032  * bool  IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
28033  * bool  IN6_IS_ADDR_LOOPBACK    (const struct in6_addr *);
28034  * bool  IN6_IS_ADDR_MULTICAST   (const struct in6_addr *);
28035  * bool  IN6_IS_ADDR_LINKLOCAL   (const struct in6_addr *);
28036  * bool  IN6_IS_ADDR_SITELOCAL   (const struct in6_addr *);
28037  * bool  IN6_IS_ADDR_V4MAPPED    (const struct in6_addr *);
28038  * bool  IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
28039  * bool  IN6_IS_ADDR_V4COMPAT    (const struct in6_addr *);
28040  * bool  IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
28041  * bool  IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
28042  * bool  IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
28043  * bool  IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
28044  * bool  IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
28045  * bool  IN6_IS_ADDR_MC_GLOBAL   (const struct in6_addr *);
28046  * bool  IN6_IS_ADDR_6TO4	 (const struct in6_addr *); -- Not from RFC2553
28047  * bool  IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
28048  *	     const struct in6_addr *);			    -- Not from RFC2553
28049  * bool  IN6_IS_ADDR_LINKSCOPE	 (const struct in6addr  *); -- Not from RFC2553
28050  */
28051 # 568 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28052 /*
28053  * IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
28054  * Note: This macro is currently NOT defined in RFC2553 specification
28055  * and not a standard macro that portable applications should use.
28056  */
28057 # 587 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28058 /* Exclude loopback and unspecified address */
28059 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28060 /*
28061  * Note:
28062  * IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
28063  * specification and not a standard macro that portable applications
28064  * should use.
28065  */
28066 # 660 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28067 /*
28068  * The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
28069  * RFC, and shouldn't be used by portable applications.  It is used to see
28070  * if an address is a solicited-node multicast address, which is prefixed
28071  * with ff02:0:0:0:0:1:ff00::/104.
28072  */
28073 # 680 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28074 /*
28075  * Macros to a) test for 6to4 IPv6 address, and b) to test if two
28076  * 6to4 addresses have the same /48 prefix, and, hence, are from the
28077  * same 6to4 site.
28078  */
28079 # 699 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28080 /*
28081  * IN6_IS_ADDR_LINKSCOPE
28082  * Identifies an address as being either link-local, link-local multicast or
28083  * node-local multicast.  All types of addresses are considered to be unique
28084  * within the scope of a given link.
28085  */
28086 
28087 
28088 
28089 
28090 /*
28091  * Useful utility macros for operations with IPv6 addresses
28092  * Note: These macros are NOT defined in the RFC2553 or any other
28093  * standard specification and are not standard macros that portable
28094  * applications should use.
28095  */
28096 
28097 /*
28098  * IN6_V4MAPPED_TO_INADDR
28099  * IN6_V4MAPPED_TO_IPADDR
28100  *	Assign a IPv4-Mapped IPv6 address to an IPv4 address.
28101  *	Note: These macros are NOT defined in RFC2553 or any other standard
28102  *	specification and are not macros that portable applications should
28103  *	use.
28104  *
28105  * void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
28106  * void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
28107  *
28108  */
28109 
28110 
28111 
28112 
28113 
28114 /*
28115  * IN6_INADDR_TO_V4MAPPED
28116  * IN6_IPADDR_TO_V4MAPPED
28117  *	Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
28118  *	address.
28119  *	Note: These macros are NOT defined in RFC2553 or any other standard
28120  *	specification and are not macros that portable applications should
28121  *	use.
28122  *
28123  * void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
28124  * void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
28125  *
28126  */
28127 # 770 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28128 /*
28129  * IN6_6TO4_TO_V4ADDR
28130  *	Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
28131  *      address.
28132  *	Note: This macro is NOT defined in RFC2553 or any other standard
28133  *	specification and is not a macro that portable applications should
28134  *	use.
28135  *	Note: we don't use the IPADDR form of the macro because we need
28136  *	to do a bytewise copy; the V4ADDR in the 6to4 address is not
28137  *	32-bit aligned.
28138  *
28139  * void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
28140  *
28141  */
28142 
28143 
28144 
28145 
28146 
28147 
28148 /*
28149  * IN6_V4ADDR_TO_6TO4
28150  *	Given an IPv4 address and an IPv6 address for output, a 6to4 address
28151  *	will be created from the IPv4 Address.
28152  *	Note:  This method for creating 6to4 addresses is not standardized
28153  *	outside of Solaris.  The newly created 6to4 address will be of the form
28154  *	2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
28155  *	HOSTID will equal 1.
28156  *
28157  * void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
28158  *
28159  */
28160 # 828 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28161 /*
28162  * IN6_ARE_ADDR_EQUAL (defined in RFC2292)
28163  *	 Compares if IPv6 addresses are equal.
28164  * Note: Compares in order of high likelyhood of a miss so we minimize
28165  * compares. (Current heuristic order, compare in reverse order of
28166  * uint32_t units)
28167  *
28168  * bool  IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
28169  *			    const struct in6_addr *);
28170  */
28171 
28172 
28173 
28174 
28175 
28176 
28177 /*
28178  * IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
28179  *	Compares if prefixed parts of IPv6 addresses are equal.
28180  *
28181  * uint32_t IN6_MASK_FROM_PREFIX(int, int);
28182  * bool     IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
28183  *				       const struct in6_addr *,
28184  *				       int);
28185  */
28186 # 879 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28187 /*
28188  * Options for use with [gs]etsockopt at the IP level.
28189  *
28190  * Note: Some of the IP_ namespace has conflict with and
28191  * and is exposed through <xti.h>. (It also requires exposing
28192  * options not implemented). The options with potential
28193  * for conflicts use #ifndef guards.
28194  */
28195 # 919 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28196 /*
28197  * IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
28198  * is used to differentiate b/w the two.
28199  */
28200 
28201 
28202 
28203 
28204 
28205 /*
28206  * Different preferences that can be requested from IPSEC protocols.
28207  */
28208 
28209 
28210 
28211 
28212 /*
28213  * This can be used with the setsockopt() call to set per socket security
28214  * options. When the application uses per-socket API, we will reflect
28215  * the request on both outbound and inbound packets.
28216  */
28217 
28218 typedef struct ipsec_req {
28219  uint_t ipsr_ah_req; /* AH request */
28220  uint_t ipsr_esp_req; /* ESP request */
28221  uint_t ipsr_self_encap_req; /* Self-Encap request */
28222  uint8_t ipsr_auth_alg; /* Auth algs for AH */
28223  uint8_t ipsr_esp_alg; /* Encr algs for ESP */
28224  uint8_t ipsr_esp_auth_alg; /* Auth algs for ESP */
28225 } ipsec_req_t;
28226 
28227 /*
28228  * MCAST_* options are protocol-independent.  The actual definitions
28229  * are with the v6 options below; this comment is here to note the
28230  * namespace usage.
28231  *
28232  * #define	MCAST_JOIN_GROUP	0x29
28233  * #define	MCAST_LEAVE_GROUP	0x2a
28234  * #define	MCAST_BLOCK_SOURCE	0x2b
28235  * #define	MCAST_UNBLOCK_SOURCE	0x2c
28236  * #define	MCAST_JOIN_SOURCE_GROUP	0x2d
28237  * #define	MCAST_LEAVE_SOURCE_GROUP 0x2e
28238  */
28239 
28240 
28241 /*
28242  * SunOS private (potentially not portable) IP_ option names
28243  */
28244 
28245 
28246 
28247 /* can be reused		0x44 */
28248 
28249 
28250 /*
28251  * Option values and names (when !_XPG5) shared with <xti_inet.h>
28252  */
28253 # 988 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28254 /*
28255  * The following option values are reserved by <xti_inet.h>
28256  *
28257  * T_IP_OPTIONS	0x107	 -  IP per-packet options
28258  * T_IP_TOS	0x108	 -  IP per packet type of service
28259  */
28260 
28261 /*
28262  * Default value constants for multicast attributes controlled by
28263  * IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
28264  */
28265 
28266 
28267 
28268 
28269 /*
28270  * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
28271  */
28272 struct ip_mreq {
28273  struct in_addr imr_multiaddr; /* IP multicast address of group */
28274  struct in_addr imr_interface; /* local IP address of interface */
28275 };
28276 
28277 /*
28278  * Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
28279  * IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
28280  */
28281 struct ip_mreq_source {
28282  struct in_addr imr_multiaddr; /* IP address of group */
28283  struct in_addr imr_sourceaddr; /* IP address of source */
28284  struct in_addr imr_interface; /* IP address of interface */
28285 };
28286 
28287 /*
28288  * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
28289  * IPv6 addresses.
28290  */
28291 struct ipv6_mreq {
28292  struct in6_addr ipv6mr_multiaddr; /* IPv6 multicast addr */
28293  unsigned int ipv6mr_interface; /* interface index */
28294 };
28295 
28296 /*
28297  * Use #pragma pack() construct to force 32-bit alignment on amd64.
28298  * This is needed to keep the structure size and offsets consistent
28299  * between a 32-bit app and the 64-bit amd64 kernel in structures
28300  * where 64-bit alignment would create gaps (in this case, structures
28301  * which have a uint32_t followed by a struct sockaddr_storage).
28302  */
28303 
28304 
28305 
28306 
28307 /*
28308  * Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
28309  */
28310 struct group_req {
28311  uint32_t gr_interface; /* interface index */
28312  struct sockaddr_storage gr_group; /* group address */
28313 };
28314 
28315 /*
28316  * Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
28317  * MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
28318  */
28319 struct group_source_req {
28320  uint32_t gsr_interface; /* interface index */
28321  struct sockaddr_storage gsr_group; /* group address */
28322  struct sockaddr_storage gsr_source; /* source address */
28323 };
28324 
28325 /*
28326  * Argument for SIOC[GS]MSFILTER ioctls
28327  */
28328 struct group_filter {
28329  uint32_t gf_interface; /* interface index */
28330  struct sockaddr_storage gf_group; /* multicast address */
28331  uint32_t gf_fmode; /* filter mode */
28332  uint32_t gf_numsrc; /* number of sources */
28333  struct sockaddr_storage gf_slist[1]; /* source address */
28334 };
28335 # 1078 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28336 /*
28337  * Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
28338  */
28339 struct ip_msfilter {
28340  struct in_addr imsf_multiaddr; /* IP multicast address of group */
28341  struct in_addr imsf_interface; /* local IP address of interface */
28342  uint32_t imsf_fmode; /* filter mode */
28343  uint32_t imsf_numsrc; /* number of sources in src_list */
28344  struct in_addr imsf_slist[1]; /* start of source list */
28345 };
28346 
28347 
28348 
28349 
28350 
28351 /*
28352  * Multicast source filter manipulation functions in libsocket;
28353  * defined in RFC 3678.
28354  */
28355 int setsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t,
28356    uint_t, struct sockaddr_storage *);
28357 
28358 int getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t *,
28359    uint_t *, struct sockaddr_storage *);
28360 
28361 int setipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t,
28362    uint32_t, struct in_addr *);
28363 
28364 int getipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t *,
28365    uint32_t *, struct in_addr *);
28366 
28367 /*
28368  * Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
28369  */
28370 
28371 
28372 
28373 /*
28374  * Argument struct for IP_PKTINFO option
28375  */
28376 typedef struct in_pktinfo {
28377  unsigned int ipi_ifindex; /* send/recv interface index */
28378  struct in_addr ipi_spec_dst; /* matched source address */
28379  struct in_addr ipi_addr; /* src/dst address in IP hdr */
28380 } in_pktinfo_t;
28381 
28382 /*
28383  * Argument struct for IPV6_PKTINFO option
28384  */
28385 struct in6_pktinfo {
28386  struct in6_addr ipi6_addr; /* src/dst IPv6 address */
28387  unsigned int ipi6_ifindex; /* send/recv interface index */
28388 };
28389 
28390 /*
28391  * Argument struct for IPV6_MTUINFO option
28392  */
28393 struct ip6_mtuinfo {
28394  struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
28395  uint32_t ip6m_mtu; /* path MTU in host byte order */
28396 };
28397 
28398 /*
28399  * IPv6 routing header types
28400  */
28401 
28402 
28403 extern socklen_t inet6_rth_space(int type, int segments);
28404 extern void *inet6_rth_init(void *bp, socklen_t bp_len, int type, int segments);
28405 extern int inet6_rth_add(void *bp, const struct in6_addr *addr);
28406 extern int inet6_rth_reverse(const void *in, void *out);
28407 extern int inet6_rth_segments(const void *bp);
28408 extern struct in6_addr *inet6_rth_getaddr(const void *bp, int index);
28409 
28410 extern int inet6_opt_init(void *extbuf, socklen_t extlen);
28411 extern int inet6_opt_append(void *extbuf, socklen_t extlen, int offset,
28412  uint8_t type, socklen_t len, uint_t align, void **databufp);
28413 extern int inet6_opt_finish(void *extbuf, socklen_t extlen, int offset);
28414 extern int inet6_opt_set_val(void *databuf, int offset, void *val,
28415  socklen_t vallen);
28416 extern int inet6_opt_next(void *extbuf, socklen_t extlen, int offset,
28417  uint8_t *typep, socklen_t *lenp, void **databufp);
28418 extern int inet6_opt_find(void *extbufp, socklen_t extlen, int offset,
28419  uint8_t type, socklen_t *lenp, void **databufp);
28420 extern int inet6_opt_get_val(void *databuf, int offset, void *val,
28421  socklen_t vallen);
28422 
28423 
28424 /*
28425  * Argument structure for IP_ADD_PROXY_ADDR.
28426  * Note that this is an unstable, experimental interface. It may change
28427  * later. Don't use it unless you know what it is.
28428  */
28429 typedef struct {
28430  struct in_addr in_prefix_addr;
28431  unsigned int in_prefix_len;
28432 } in_prefix_t;
28433 
28434 
28435 
28436 /*
28437  * IPv6 options
28438  */
28439 
28440      /* packets. */
28441      /* argument type: uint_t */
28442 
28443      /* multicast packets. */
28444      /* argument type: struct in6_addr */
28445 
28446      /* multicast packets. */
28447      /* argument type: uint_t */
28448 
28449      /* multicast packets on same socket. */
28450      /* argument type: uint_t */
28451 
28452      /* argument type: struct ipv6_mreq */
28453 
28454      /* argument type: struct ipv6_mreq */
28455 
28456 /*
28457  * Other XPG6 constants.
28458  */
28459 
28460      /* decimal notation. */
28461 
28462      /* standard colon-hex notation. */
28463 
28464 
28465 
28466 
28467 
28468 /*
28469  * IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP are being kept
28470  * for backward compatibility. They have the same meaning as IPV6_JOIN_GROUP
28471  * and IPV6_LEAVE_GROUP respectively.
28472  */
28473 
28474      /* argument type: struct ipv6_mreq */
28475 
28476      /* argument type: struct ipv6_mreq */
28477 
28478 
28479      /* arg type: "struct in6_pktingo" - */
28480 
28481 
28482 
28483 
28484      /* the routing header */
28485 
28486 
28487      /* the routing header */
28488 
28489 
28490 
28491 
28492 /*
28493  * This options exists for backwards compatability and should no longer be
28494  * used.  Use IPV6_RECVDSTOPTS instead.
28495  */
28496 
28497 
28498 
28499 
28500 /*
28501  * enable/disable IPV6_RTHDRDSTOPTS.  Now obsolete.  IPV6_RECVDSTOPTS enables
28502  * the receipt of both headers.
28503  */
28504 # 1259 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28505 /*
28506  * enable/disable receipt of both both IPV6_DSTOPTS headers.
28507  */
28508 
28509 
28510 /*
28511  * protocol-independent multicast membership options.
28512  */
28513 
28514 
28515 
28516 
28517 
28518 
28519 
28520 /* 32Bit field for IPV6_SRC_PREFERENCES */
28521 # 1295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28522 /*
28523  * SunOS private (potentially not portable) IPV6_ option names
28524  */
28525 
28526 
28527      /* unspecified (all zeros) */
28528 
28529 /*
28530  * Miscellaneous IPv6 constants.
28531  */
28532 
28533 
28534 
28535 
28536 /*
28537  * Extern declarations for pre-defined global const variables
28538  */
28539 
28540 
28541 
28542 extern const struct in6_addr in6addr_any;
28543 extern const struct in6_addr in6addr_loopback;
28544 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
28545 
28546 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 1
28547 /*
28548  * CDDL HEADER START
28549  *
28550  * The contents of this file are subject to the terms of the
28551  * Common Development and Distribution License (the "License").
28552  * You may not use this file except in compliance with the License.
28553  *
28554  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28555  * or http://www.opensolaris.org/os/licensing.
28556  * See the License for the specific language governing permissions
28557  * and limitations under the License.
28558  *
28559  * When distributing Covered Code, include this CDDL HEADER in each
28560  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28561  * If applicable, add the following below this CDDL HEADER, with the
28562  * fields enclosed by brackets "[]" replaced with your own identifying
28563  * information: Portions Copyright [yyyy] [name of copyright owner]
28564  *
28565  * CDDL HEADER END
28566  */
28567 /*
28568  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28569  *
28570  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
28571  */
28572 
28573 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
28574 /*	  All Rights Reserved	*/
28575 
28576 /*
28577  * University Copyright- Copyright (c) 1982, 1986, 1988
28578  * The Regents of the University of California
28579  * All Rights Reserved
28580  *
28581  * University Acknowledgment- Portions of this document are derived from
28582  * software developed by the University of California, Berkeley, and its
28583  * contributors.
28584  */
28585 
28586 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
28587 
28588 
28589 
28590 
28591 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
28592 /*
28593  * CDDL HEADER START
28594  *
28595  * The contents of this file are subject to the terms of the
28596  * Common Development and Distribution License (the "License").
28597  * You may not use this file except in compliance with the License.
28598  *
28599  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28600  * or http://www.opensolaris.org/os/licensing.
28601  * See the License for the specific language governing permissions
28602  * and limitations under the License.
28603  *
28604  * When distributing Covered Code, include this CDDL HEADER in each
28605  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28606  * If applicable, add the following below this CDDL HEADER, with the
28607  * fields enclosed by brackets "[]" replaced with your own identifying
28608  * information: Portions Copyright [yyyy] [name of copyright owner]
28609  *
28610  * CDDL HEADER END
28611  */
28612 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28613 /*	  All Rights Reserved  	*/
28614 
28615 
28616 /*
28617  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
28618  * Use is subject to license terms.
28619  *
28620  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
28621  * Copyright 2016 Joyent, Inc.
28622  */
28623 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
28624 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 1
28625 /*
28626  * CDDL HEADER START
28627  *
28628  * The contents of this file are subject to the terms of the
28629  * Common Development and Distribution License (the "License").
28630  * You may not use this file except in compliance with the License.
28631  *
28632  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28633  * or http://www.opensolaris.org/os/licensing.
28634  * See the License for the specific language governing permissions
28635  * and limitations under the License.
28636  *
28637  * When distributing Covered Code, include this CDDL HEADER in each
28638  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28639  * If applicable, add the following below this CDDL HEADER, with the
28640  * fields enclosed by brackets "[]" replaced with your own identifying
28641  * information: Portions Copyright [yyyy] [name of copyright owner]
28642  *
28643  * CDDL HEADER END
28644  */
28645 /*
28646  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28647  *
28648  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
28649  * Use is subject to license terms.
28650  *
28651  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
28652  * Copyright (c) 2015, Joyent, Inc.  All rights reserved.
28653  */
28654 
28655 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28656 /*	  All Rights Reserved  	*/
28657 
28658 /*
28659  * University Copyright- Copyright (c) 1982, 1986, 1988
28660  * The Regents of the University of California
28661  * All Rights Reserved
28662  *
28663  * University Acknowledgment- Portions of this document are derived from
28664  * software developed by the University of California, Berkeley, and its
28665  * contributors.
28666  */
28667 
28668 
28669 
28670 
28671 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
28672 /*
28673  * CDDL HEADER START
28674  *
28675  * The contents of this file are subject to the terms of the
28676  * Common Development and Distribution License (the "License").
28677  * You may not use this file except in compliance with the License.
28678  *
28679  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28680  * or http://www.opensolaris.org/os/licensing.
28681  * See the License for the specific language governing permissions
28682  * and limitations under the License.
28683  *
28684  * When distributing Covered Code, include this CDDL HEADER in each
28685  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28686  * If applicable, add the following below this CDDL HEADER, with the
28687  * fields enclosed by brackets "[]" replaced with your own identifying
28688  * information: Portions Copyright [yyyy] [name of copyright owner]
28689  *
28690  * CDDL HEADER END
28691  */
28692 
28693 /*
28694  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
28695  * Copyright 2016 Joyent, Inc.
28696  *
28697  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
28698  * Use is subject to license terms.
28699  */
28700 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
28701 
28702 
28703 
28704 
28705 
28706 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
28707 /*
28708  * CDDL HEADER START
28709  *
28710  * The contents of this file are subject to the terms of the
28711  * Common Development and Distribution License (the "License").
28712  * You may not use this file except in compliance with the License.
28713  *
28714  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28715  * or http://www.opensolaris.org/os/licensing.
28716  * See the License for the specific language governing permissions
28717  * and limitations under the License.
28718  *
28719  * When distributing Covered Code, include this CDDL HEADER in each
28720  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28721  * If applicable, add the following below this CDDL HEADER, with the
28722  * fields enclosed by brackets "[]" replaced with your own identifying
28723  * information: Portions Copyright [yyyy] [name of copyright owner]
28724  *
28725  * CDDL HEADER END
28726  */
28727 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28728 /*	  All Rights Reserved  	*/
28729 
28730 
28731 /*
28732  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
28733  * Use is subject to license terms.
28734  *
28735  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
28736  * Copyright 2016 Joyent, Inc.
28737  */
28738 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
28739 
28740 /*
28741  * I/O parameter information.  A uio structure describes the I/O which
28742  * is to be performed by an operation.  Typically the data movement will
28743  * be performed by a routine such as uiomove(), which updates the uio
28744  * structure to reflect what was done.
28745  */
28746 
28747 
28748 
28749 
28750 
28751 
28752 
28753 typedef struct iovec {
28754  caddr_t iov_base;
28755 
28756 
28757 
28758  long iov_len;
28759 
28760 } iovec_t;
28761 # 90 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28762 /*
28763  * Segment flag values.
28764  */
28765 typedef enum uio_seg { UIO_USERSPACE, UIO_SYSSPACE, UIO_USERISPACE } uio_seg_t;
28766 
28767 typedef struct uio {
28768  iovec_t *uio_iov; /* pointer to array of iovecs */
28769  int uio_iovcnt; /* number of iovecs */
28770  lloff_t _uio_offset; /* file offset */
28771  uio_seg_t uio_segflg; /* address space (kernel or user) */
28772  uint16_t uio_fmode; /* file mode flags */
28773  uint16_t uio_extflg; /* extended flags */
28774  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
28775  ssize_t uio_resid; /* residual count */
28776 } uio_t;
28777 
28778 /*
28779  * Extended uio_t uioa_t used for asynchronous uio.
28780  *
28781  * Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
28782  *	 as there isn't a formal definition of IOV_MAX for the kernel.
28783  */
28784 
28785 
28786 typedef struct uioa_page_s { /* locked uio_iov state */
28787  int uioa_pfncnt; /* count of pfn_t(s) in *uioa_ppp */
28788  void **uioa_ppp; /* page_t or pfn_t arrary */
28789  caddr_t uioa_base; /* address base */
28790  size_t uioa_len; /* span length */
28791 } uioa_page_t;
28792 
28793 typedef struct uioa_s {
28794  iovec_t *uio_iov; /* pointer to array of iovecs */
28795  int uio_iovcnt; /* number of iovecs */
28796  lloff_t _uio_offset; /* file offset */
28797  uio_seg_t uio_segflg; /* address space (kernel or user) */
28798  uint16_t uio_fmode; /* file mode flags */
28799  uint16_t uio_extflg; /* extended flags */
28800  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
28801  ssize_t uio_resid; /* residual count */
28802  /*
28803 	 * uioa extended members.
28804 	 */
28805  uint32_t uioa_state; /* state of asynch i/o */
28806  ssize_t uioa_mbytes; /* bytes that have been uioamove()ed */
28807  uioa_page_t *uioa_lcur; /* pointer into uioa_locked[] */
28808  void **uioa_lppp; /* pointer into lcur->uioa_ppp[] */
28809  void *uioa_hwst[4]; /* opaque hardware state */
28810  uioa_page_t uioa_locked[16]; /* Per iov locked pages */
28811 } uioa_t;
28812 
28813 /*
28814  * uio extensions
28815  *
28816  * PSARC 2009/478: Copy Reduction Interfaces
28817  */
28818 typedef enum xuio_type {
28819  UIOTYPE_ASYNCIO,
28820  UIOTYPE_ZEROCOPY
28821 } xuio_type_t;
28822 
28823 typedef struct xuio {
28824  uio_t xu_uio; /* Embedded UIO structure */
28825 
28826  /* Extended uio fields */
28827  enum xuio_type xu_type; /* What kind of uio structure? */
28828  union {
28829   /* Async I/O Support, intend to replace uioa_t. */
28830   struct {
28831    uint32_t xu_a_state; /* state of async i/o */
28832    /* bytes that have been uioamove()ed */
28833    ssize_t xu_a_mbytes;
28834    uioa_page_t *xu_a_lcur; /* pointer into uioa_locked[] */
28835    /* pointer into lcur->uioa_ppp[] */
28836    void **xu_a_lppp;
28837    void *xu_a_hwst[4]; /* opaque hardware state */
28838    /* Per iov locked pages */
28839    uioa_page_t xu_a_locked[16];
28840   } xu_aio;
28841 
28842   /*
28843 		 * Copy Reduction Support -- facilate loaning / returning of
28844 		 * filesystem cache buffers.
28845 		 */
28846   struct {
28847    int xu_zc_rw; /* read or write buffer */
28848    void *xu_zc_priv; /* fs specific */
28849   } xu_zc;
28850  } xu_ext;
28851 } xuio_t;
28852 # 207 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28853 /*
28854  * I/O direction.
28855  */
28856 typedef enum uio_rw { UIO_READ, UIO_WRITE } uio_rw_t;
28857 
28858 /*
28859  * uio_extflg: extended flags
28860  *
28861  * NOTE: This flag will be used in uiomove to determine if non-temporal
28862  * access, ie, access bypassing caches, should be used.  Filesystems that
28863  * don't initialize this field could experience suboptimal performance due to
28864  * the random data the field contains.
28865  *
28866  * NOTE: This flag is also used by uioasync callers to pass an extended
28867  * uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
28868  * consumers of a uioa_t require the uio_extflg to be initialized.
28869  */
28870 
28871 
28872 
28873 
28874 
28875 
28876 /*
28877  * Global uioasync capability shadow state.
28878  */
28879 typedef struct uioasync_s {
28880  boolean_t enabled; /* Is uioasync enabled? */
28881  size_t mincnt; /* Minimum byte count for use of */
28882 } uioasync_t;
28883 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28884 extern ssize_t readv(int, const struct iovec *, int);
28885 extern ssize_t writev(int, const struct iovec *, int);
28886 
28887 /*
28888  * When in the large file compilation environment,
28889  * map preadv/pwritev to their 64 bit offset versions
28890  */
28891 
28892 
28893 
28894 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28895 #pragma redefine_extname preadv preadv64
28896 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28897 
28898 
28899 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28900 #pragma redefine_extname pwritev pwritev64
28901 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28902 
28903 
28904 
28905 
28906 
28907 
28908 
28909 /* In the LP64 compilation environment, the APIs are already large file */
28910 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28911 extern ssize_t preadv(int, const struct iovec *, int, off_t);
28912 extern ssize_t pwritev(int, const struct iovec *, int, off_t);
28913 
28914 /*
28915  * preadv64 and pwritev64 should be defined when:
28916  * - Using the transitional compilation environment, and not
28917  *     the large file compilation environment.
28918  */
28919 
28920 
28921 extern ssize_t preadv64(int, const struct iovec *, int, off64_t);
28922 extern ssize_t pwritev64(int, const struct iovec *, int, off64_t);
28923 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
28924 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
28925 /*
28926  * CDDL HEADER START
28927  *
28928  * The contents of this file are subject to the terms of the
28929  * Common Development and Distribution License (the "License").
28930  * You may not use this file except in compliance with the License.
28931  *
28932  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28933  * or http://www.opensolaris.org/os/licensing.
28934  * See the License for the specific language governing permissions
28935  * and limitations under the License.
28936  *
28937  * When distributing Covered Code, include this CDDL HEADER in each
28938  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28939  * If applicable, add the following below this CDDL HEADER, with the
28940  * fields enclosed by brackets "[]" replaced with your own identifying
28941  * information: Portions Copyright [yyyy] [name of copyright owner]
28942  *
28943  * CDDL HEADER END
28944  */
28945 
28946 /*
28947  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
28948  * Copyright 2016 Joyent, Inc.
28949  *
28950  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
28951  * Use is subject to license terms.
28952  */
28953 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
28954 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
28955 /*
28956  * CDDL HEADER START
28957  *
28958  * The contents of this file are subject to the terms of the
28959  * Common Development and Distribution License (the "License").
28960  * You may not use this file except in compliance with the License.
28961  *
28962  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28963  * or http://www.opensolaris.org/os/licensing.
28964  * See the License for the specific language governing permissions
28965  * and limitations under the License.
28966  *
28967  * When distributing Covered Code, include this CDDL HEADER in each
28968  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28969  * If applicable, add the following below this CDDL HEADER, with the
28970  * fields enclosed by brackets "[]" replaced with your own identifying
28971  * information: Portions Copyright [yyyy] [name of copyright owner]
28972  *
28973  * CDDL HEADER END
28974  */
28975 /*
28976  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
28977  * Use is subject to license terms.
28978  */
28979 
28980 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
28981 /*	  All Rights Reserved	*/
28982 
28983 /*
28984  * Portions of this source code were derived from Berkeley 4.3 BSD
28985  * under license from the Regents of the University of California.
28986  */
28987 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
28988 
28989 
28990 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h" 1
28991 /*
28992  * CDDL HEADER START
28993  *
28994  * The contents of this file are subject to the terms of the
28995  * Common Development and Distribution License, Version 1.0 only
28996  * (the "License").  You may not use this file except in compliance
28997  * with the License.
28998  *
28999  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29000  * or http://www.opensolaris.org/os/licensing.
29001  * See the License for the specific language governing permissions
29002  * and limitations under the License.
29003  *
29004  * When distributing Covered Code, include this CDDL HEADER in each
29005  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29006  * If applicable, add the following below this CDDL HEADER, with the
29007  * fields enclosed by brackets "[]" replaced with your own identifying
29008  * information: Portions Copyright [yyyy] [name of copyright owner]
29009  *
29010  * CDDL HEADER END
29011  */
29012 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
29013 /*	  All Rights Reserved  	*/
29014 
29015 
29016 /*
29017  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
29018  *
29019  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
29020  * Use is subject to license terms.
29021  */
29022 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
29023 struct netconfig {
29024  char *nc_netid; /* network identifier		*/
29025  unsigned int nc_semantics; /* defined below		*/
29026  unsigned int nc_flag; /* defined below		*/
29027  char *nc_protofmly; /* protocol family name		*/
29028  char *nc_proto; /* protocol name		*/
29029  char *nc_device; /* device name for network id	*/
29030  unsigned int nc_nlookups; /* # of entries in nc_lookups	*/
29031  char **nc_lookups; /* list of lookup directories	*/
29032  unsigned int nc_unused[8]; /* borrowed for lockd etc.	*/
29033 };
29034 
29035 typedef struct {
29036  struct netconfig **nc_head;
29037  struct netconfig **nc_curr;
29038 } NCONF_HANDLE;
29039 
29040 /*
29041  *	Values of nc_semantics
29042  */
29043 
29044 
29045 
29046 
29047 
29048 /*
29049  * NOT FOR PUBLIC USE, Solaris internal only.
29050  * This value of nc_semantics is strictly for use of Remote Direct
29051  * Memory Access provider interfaces in Solaris only and not for
29052  * general use. Do not use this value for general purpose user or
29053  * kernel programming. If used the behavior is undefined.
29054  * This is a PRIVATE interface to be used by Solaris kRPC only.
29055  */
29056 
29057 
29058 /*
29059  *	Values of nc_flag
29060  */
29061 
29062 
29063 
29064 
29065 
29066 /*
29067  *	Values of nc_protofmly
29068  */
29069 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
29070 /*
29071  * NOT FOR PUBLIC USE, Solaris internal only.
29072  * This value of nc_semantics is strictly for use of Remote Direct
29073  * Memory Access provider interfaces in Solaris only and not for
29074  * general use. Do not use this value for general purpose user or
29075  * kernel programming. If used the behavior is undefined.
29076  * This is a PRIVATE interface to be used by Solaris kRPC only.
29077  */
29078 
29079 
29080 /*
29081  *	Values for nc_proto
29082  */
29083 
29084 
29085 
29086 
29087 
29088 
29089 /*
29090  * 	Values for nc_proto for "rdma" protofmly
29091  */
29092 
29093 
29094 
29095 
29096 extern void *setnetconfig(void);
29097 extern int endnetconfig(void *);
29098 extern struct netconfig *getnetconfig(void *);
29099 extern struct netconfig *getnetconfigent(const char *);
29100 extern void freenetconfigent(struct netconfig *);
29101 extern void *setnetpath(void);
29102 extern int endnetpath(void *);
29103 extern struct netconfig *getnetpath(void *);
29104 extern void nc_perror(const char *);
29105 extern char *nc_sperror(void);
29106 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
29107 
29108 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
29109 /*
29110  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
29111  * Use is subject to license terms.
29112  *
29113  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
29114  */
29115 /*
29116  * Copyright (c) 1982, 1986 Regents of the University of California.
29117  * All rights reserved.
29118  *
29119  * Redistribution and use in source and binary forms are permitted
29120  * provided that this notice is preserved and that due credit is given
29121  * to the University of California at Berkeley. The name of the University
29122  * may not be used to endorse or promote products derived from this
29123  * software without specific prior written permission. This software
29124  * is provided ``as is'' without express or implied warranty.
29125  */
29126 
29127 /*
29128  * Constants and structures defined by the internet system,
29129  * according to following documents
29130  *
29131  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
29132  *	http://www.iana.org/assignments/protocol-numbers
29133  *	http://www.iana.org/assignments/port-numbers
29134  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
29135  *
29136  */
29137 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
29138 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29139 /*
29140  * Definitions related to sockets: types, address families, options.
29141  */
29142 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29143 /*
29144  * Types
29145  */
29146 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29147 /*
29148  * Flags for socket() and accept4()
29149  */
29150 
29151 
29152 
29153 
29154 /*
29155  * Option flags per-socket.
29156  */
29157 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29158 /*
29159  * Socket options are passed using a signed integer, but it is also rare
29160  * for more than one to ever be passed at the same time with setsockopt
29161  * and only one at a time can be retrieved with getsockopt.
29162  *
29163  * Since the lower numbers cannot be renumbered for compatibility reasons,
29164  * it would seem that we need to start a new number space (0x40000000 -
29165  * 0x7fffffff) for those that don't need to be stored as a bit flag
29166  * somewhere. This limits the flag options to 30 but that seems to be
29167  * plenty, anyway. 0x40000000 is reserved for future use.
29168  */
29169 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29170 /*
29171  * N.B.: The following definition is present only for compatibility
29172  * with release 3.0.  It will disappear in later releases.
29173  */
29174 
29175 
29176 /*
29177  * Additional options, not kept in so_options.
29178  */
29179 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29180 /* "Socket"-level control message types: */
29181 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29182 /*
29183  * Socket filter options
29184  */
29185 
29186 
29187 
29188 
29189 
29190 /*
29191  * Structure returned by FIL_LIST
29192  */
29193 struct fil_info {
29194  int fi_flags; /* see below (FILF_*) */
29195  int fi_pos; /* position (0 is bottom) */
29196  char fi_name[32]; /* filter name */
29197 };
29198 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29199 /*
29200  * Structure used for manipulating linger option.
29201  */
29202 struct linger {
29203  int l_onoff; /* option on/off */
29204  int l_linger; /* linger time */
29205 };
29206 
29207 /*
29208  * Levels for (get/set)sockopt() that don't apply to a specific protocol.
29209  */
29210 
29211 
29212 
29213 
29214 
29215 
29216 
29217 /*
29218  * Address families.
29219  *
29220  * Some of these constant names are copied for the DTrace IP provider in
29221  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
29222  * in sync.
29223  */
29224 # 300 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29225 /*
29226  * Protocol families, same as address families for now.
29227  */
29228 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29229 /*
29230  * Maximum queue length specifiable by listen.
29231  */
29232 
29233 
29234 /*
29235  * Message header for recvmsg and sendmsg calls.
29236  */
29237 struct msghdr {
29238  void *msg_name; /* optional address */
29239  socklen_t msg_namelen; /* size of address */
29240  struct iovec *msg_iov; /* scatter/gather array */
29241  int msg_iovlen; /* # elements in msg_iov */
29242 
29243 
29244 
29245 
29246 
29247 
29248  caddr_t msg_accrights; /* access rights sent/received */
29249  int msg_accrightslen;
29250 
29251 };
29252 # 412 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29253 /* Added for XPGv2 compliance */
29254 
29255 
29256 
29257 
29258 
29259      /* with left over data */
29260 /* End of XPGv2 compliance */
29261 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29262 /* Added for XPGv2 compliance */
29263 
29264 
29265 
29266 
29267 struct cmsghdr {
29268  socklen_t cmsg_len; /* data byte count, including hdr */
29269  int cmsg_level; /* originating protocol */
29270  int cmsg_type; /* protocol-specific type */
29271 };
29272 # 528 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29273 extern int accept(int, struct sockaddr *, Psocklen_t);
29274 extern int accept4(int, struct sockaddr *, Psocklen_t, int);
29275 extern int bind(int, const struct sockaddr *, socklen_t);
29276 extern int connect(int, const struct sockaddr *, socklen_t);
29277 extern int getpeername(int, struct sockaddr *, Psocklen_t);
29278 extern int getsockname(int, struct sockaddr *, Psocklen_t);
29279 extern int getsockopt(int, int, int, void *, Psocklen_t);
29280 extern int listen(int, int); /* XXX - fixme???  where do I go */
29281 extern int socketpair(int, int, int, int *);
29282 extern ssize_t recv(int, void *, size_t, int);
29283 extern ssize_t recvfrom(int, void *, size_t, int,
29284  struct sockaddr *, Psocklen_t);
29285 extern ssize_t recvmsg(int, struct msghdr *, int);
29286 extern ssize_t send(int, const void *, size_t, int);
29287 extern ssize_t sendmsg(int, const struct msghdr *, int);
29288 extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
29289  socklen_t);
29290 extern int setsockopt(int, int, int, const void *, socklen_t);
29291 extern int shutdown(int, int);
29292 extern int socket(int, int, int);
29293 
29294 
29295 extern int sockatmark(int);
29296 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
29297 
29298 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
29299 /*
29300  * CDDL HEADER START
29301  *
29302  * The contents of this file are subject to the terms of the
29303  * Common Development and Distribution License (the "License").
29304  * You may not use this file except in compliance with the License.
29305  *
29306  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29307  * or http://www.opensolaris.org/os/licensing.
29308  * See the License for the specific language governing permissions
29309  * and limitations under the License.
29310  *
29311  * When distributing Covered Code, include this CDDL HEADER in each
29312  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29313  * If applicable, add the following below this CDDL HEADER, with the
29314  * fields enclosed by brackets "[]" replaced with your own identifying
29315  * information: Portions Copyright [yyyy] [name of copyright owner]
29316  *
29317  * CDDL HEADER END
29318  */
29319 
29320 /*
29321  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
29322  * Copyright 2016 Joyent, Inc.
29323  *
29324  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
29325  * Use is subject to license terms.
29326  */
29327 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
29328 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
29329 struct hostent {
29330  char *h_name; /* official name of host */
29331  char **h_aliases; /* alias list */
29332  int h_addrtype; /* host address type */
29333  int h_length; /* length of address */
29334  char **h_addr_list; /* list of addresses from name server */
29335 
29336 };
29337 
29338 
29339 /*
29340  * addrinfo introduced with IPv6 for Protocol-Independent Hostname
29341  * and Service Name Translation.
29342  */
29343 
29344 
29345 struct addrinfo {
29346  int ai_flags; /* AI_PASSIVE, AI_CANONNAME, ... */
29347  int ai_family; /* PF_xxx */
29348  int ai_socktype; /* SOCK_xxx */
29349  int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
29350 
29351 
29352 
29353  socklen_t ai_addrlen;
29354  char *ai_canonname; /* canonical name for hostname */
29355  struct sockaddr *ai_addr; /* binary address */
29356  struct addrinfo *ai_next; /* next structure in linked list */
29357 };
29358 
29359 /*
29360  * The flag 0x8000 is currently reserved for private use between libnsl and
29361  * libsocket. See lib/libsocket/inet/getaddrinfo.c for more information.
29362  */
29363 /* addrinfo flags */
29364 
29365 
29366 
29367 
29368 
29369 /* getipnodebyname() flags */
29370 
29371 
29372 
29373 
29374 
29375 /*
29376  * These were defined in RFC 2553 but not SUSv3
29377  * or RFC 3493 which obsoleted 2553.
29378  */
29379 
29380 
29381 
29382 /* addrinfo errors */
29383 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
29384 /* getnameinfo flags */
29385 
29386 
29387 
29388 
29389 
29390 
29391 
29392 /* Not listed in any standards document */
29393 
29394 
29395 
29396 /* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */
29397 
29398 
29399 
29400 
29401 
29402 /*
29403  * Scope delimit character
29404  */
29405 
29406 
29407 
29408 /*
29409  * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
29410  * and algorithms.
29411  */
29412 
29413 typedef struct ipsecalgent {
29414  char **a_names; /* algorithm names */
29415  int a_proto_num; /* protocol number */
29416  int a_alg_num; /* algorithm number */
29417  char *a_mech_name; /* encryption framework mechanism name */
29418  int *a_block_sizes; /* supported block sizes */
29419  int *a_key_sizes; /* supported key sizes */
29420  int a_key_increment; /* key size increment */
29421  int *a_mech_params; /* mechanism specific parameters */
29422  int a_alg_flags; /* algorithm flags */
29423 } ipsecalgent_t;
29424 
29425 /* well-known IPsec protocol numbers */
29426 
29427 
29428 
29429 
29430 
29431 /*
29432  * Assumption here is that a network number
29433  * fits in 32 bits -- probably a poor one.
29434  */
29435 struct netent {
29436  char *n_name; /* official name of net */
29437  char **n_aliases; /* alias list */
29438  int n_addrtype; /* net address type */
29439  in_addr_t n_net; /* network # */
29440 };
29441 
29442 struct protoent {
29443  char *p_name; /* official protocol name */
29444  char **p_aliases; /* alias list */
29445  int p_proto; /* protocol # */
29446 };
29447 
29448 struct servent {
29449  char *s_name; /* official service name */
29450  char **s_aliases; /* alias list */
29451  int s_port; /* port # */
29452  char *s_proto; /* protocol to use */
29453 };
29454 
29455 
29456 struct hostent *gethostbyname_r
29457  (const char *, struct hostent *, char *, int, int *h_errnop);
29458 struct hostent *gethostbyaddr_r
29459  (const char *, int, int, struct hostent *, char *, int, int *h_errnop);
29460 struct hostent *getipnodebyname(const char *, int, int, int *);
29461 struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
29462 void freehostent(struct hostent *);
29463 struct hostent *gethostent_r(struct hostent *, char *, int, int *h_errnop);
29464 
29465 struct servent *getservbyname_r
29466  (const char *name, const char *, struct servent *, char *, int);
29467 struct servent *getservbyport_r
29468  (int port, const char *, struct servent *, char *, int);
29469 struct servent *getservent_r(struct servent *, char *, int);
29470 
29471 struct netent *getnetbyname_r
29472  (const char *, struct netent *, char *, int);
29473 struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int);
29474 struct netent *getnetent_r(struct netent *, char *, int);
29475 
29476 struct protoent *getprotobyname_r
29477  (const char *, struct protoent *, char *, int);
29478 struct protoent *getprotobynumber_r
29479  (int, struct protoent *, char *, int);
29480 struct protoent *getprotoent_r(struct protoent *, char *, int);
29481 
29482 int getnetgrent_r(char **, char **, char **, char *, int);
29483 int innetgr(const char *, const char *, const char *, const char *);
29484 
29485 
29486 /* Old interfaces that return a pointer to a static area;  MT-unsafe */
29487 struct hostent *gethostbyname(const char *);
29488 struct hostent *gethostent(void);
29489 struct netent *getnetbyaddr(in_addr_t, int);
29490 struct netent *getnetbyname(const char *);
29491 struct netent *getnetent(void);
29492 struct protoent *getprotobyname(const char *);
29493 struct protoent *getprotobynumber(int);
29494 struct protoent *getprotoent(void);
29495 struct servent *getservbyname(const char *, const char *);
29496 struct servent *getservbyport(int, const char *);
29497 struct servent *getservent(void);
29498 
29499 /* gethostbyaddr() second argument is a size_t only in unix95/unix98 */
29500 
29501 struct hostent *gethostbyaddr(const void *, socklen_t, int);
29502 
29503 
29504 
29505 
29506 
29507 int endhostent(void);
29508 int endnetent(void);
29509 int endprotoent(void);
29510 int endservent(void);
29511 int sethostent(int);
29512 int setnetent(int);
29513 int setprotoent(int);
29514 int setservent(int);
29515 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
29516 int getaddrinfo(const char *,
29517    const char *,
29518    const struct addrinfo *,
29519    struct addrinfo **);
29520 void freeaddrinfo(struct addrinfo *);
29521 const char *gai_strerror(int);
29522 int getnameinfo(const struct sockaddr *,
29523    socklen_t, char *, socklen_t,
29524    char *, socklen_t, int);
29525 
29526 
29527 
29528 int getnetgrent(char **, char **, char **);
29529 int setnetgrent(const char *);
29530 int endnetgrent(void);
29531 int rcmd(char **, unsigned short,
29532  const char *, const char *, const char *, int *);
29533 int rcmd_af(char **, unsigned short,
29534  const char *, const char *, const char *, int *, int);
29535 int rresvport_af(int *, int);
29536 int rresvport_addr(int *, struct sockaddr_storage *);
29537 int rexec(char **, unsigned short,
29538  const char *, const char *, const char *, int *);
29539 int rexec_af(char **, unsigned short,
29540  const char *, const char *, const char *, int *, int);
29541 int rresvport(int *);
29542 int ruserok(const char *, int, const char *, const char *);
29543 /* BIND */
29544 struct hostent *gethostbyname2(const char *, int);
29545 void herror(const char *);
29546 const char *hstrerror(int);
29547 /* End BIND */
29548 
29549 /* IPsec algorithm prototype definitions */
29550 struct ipsecalgent *getipsecalgbyname(const char *, int, int *);
29551 struct ipsecalgent *getipsecalgbynum(int, int, int *);
29552 int getipsecprotobyname(const char *doi_name);
29553 char *getipsecprotobynum(int doi_domain);
29554 void freeipsecalgent(struct ipsecalgent *ptr);
29555 /* END IPsec algorithm prototype definitions */
29556 
29557 
29558 
29559 /*
29560  * Error return codes from gethostbyname() and gethostbyaddr()
29561  * (when using the resolver)
29562  */
29563 
29564 extern int h_errno;
29565 # 377 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
29566 /*
29567  * Error return codes from gethostbyname() and gethostbyaddr()
29568  * (left in extern int h_errno).
29569  */
29570 # 389 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
29571 /* BIND */
29572 
29573 
29574 /* End BIND */
29575 # 46 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
29576 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 1
29577 /*
29578  * CDDL HEADER START
29579  *
29580  * The contents of this file are subject to the terms of the
29581  * Common Development and Distribution License, Version 1.0 only
29582  * (the "License").  You may not use this file except in compliance
29583  * with the License.
29584  *
29585  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29586  * or http://www.opensolaris.org/os/licensing.
29587  * See the License for the specific language governing permissions
29588  * and limitations under the License.
29589  *
29590  * When distributing Covered Code, include this CDDL HEADER in each
29591  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29592  * If applicable, add the following below this CDDL HEADER, with the
29593  * fields enclosed by brackets "[]" replaced with your own identifying
29594  * information: Portions Copyright [yyyy] [name of copyright owner]
29595  *
29596  * CDDL HEADER END
29597  */
29598 /*
29599  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
29600  * Use is subject to license terms.
29601  */
29602 
29603 
29604 
29605 
29606 #pragma ident "%Z%%M%	%I%	%E% SMI"
29607 
29608 
29609 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
29610 /*
29611  * CDDL HEADER START
29612  *
29613  * The contents of this file are subject to the terms of the
29614  * Common Development and Distribution License (the "License").
29615  * You may not use this file except in compliance with the License.
29616  *
29617  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29618  * or http://www.opensolaris.org/os/licensing.
29619  * See the License for the specific language governing permissions
29620  * and limitations under the License.
29621  *
29622  * When distributing Covered Code, include this CDDL HEADER in each
29623  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29624  * If applicable, add the following below this CDDL HEADER, with the
29625  * fields enclosed by brackets "[]" replaced with your own identifying
29626  * information: Portions Copyright [yyyy] [name of copyright owner]
29627  *
29628  * CDDL HEADER END
29629  */
29630 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
29631 /*	  All Rights Reserved  	*/
29632 
29633 
29634 /*
29635  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
29636  * Use is subject to license terms.
29637  *
29638  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
29639  * Copyright 2016 Joyent, Inc.
29640  */
29641 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
29642 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
29643 /*
29644  * CDDL HEADER START
29645  *
29646  * The contents of this file are subject to the terms of the
29647  * Common Development and Distribution License, Version 1.0 only
29648  * (the "License").  You may not use this file except in compliance
29649  * with the License.
29650  *
29651  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29652  * or http://www.opensolaris.org/os/licensing.
29653  * See the License for the specific language governing permissions
29654  * and limitations under the License.
29655  *
29656  * When distributing Covered Code, include this CDDL HEADER in each
29657  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29658  * If applicable, add the following below this CDDL HEADER, with the
29659  * fields enclosed by brackets "[]" replaced with your own identifying
29660  * information: Portions Copyright [yyyy] [name of copyright owner]
29661  *
29662  * CDDL HEADER END
29663  */
29664 /*
29665  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
29666  * Use is subject to license terms.
29667  */
29668 
29669 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
29670 /*	  All Rights Reserved  	*/
29671 
29672 /*
29673  * University Copyright- Copyright (c) 1982, 1986, 1988
29674  * The Regents of the University of California
29675  * All Rights Reserved
29676  *
29677  * University Acknowledgment- Portions of this document are derived from
29678  * software developed by the University of California, Berkeley, and its
29679  * contributors.
29680  */
29681 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
29682 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 1
29683 /*
29684  * CDDL HEADER START
29685  *
29686  * The contents of this file are subject to the terms of the
29687  * Common Development and Distribution License, Version 1.0 only
29688  * (the "License").  You may not use this file except in compliance
29689  * with the License.
29690  *
29691  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29692  * or http://www.opensolaris.org/os/licensing.
29693  * See the License for the specific language governing permissions
29694  * and limitations under the License.
29695  *
29696  * When distributing Covered Code, include this CDDL HEADER in each
29697  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29698  * If applicable, add the following below this CDDL HEADER, with the
29699  * fields enclosed by brackets "[]" replaced with your own identifying
29700  * information: Portions Copyright [yyyy] [name of copyright owner]
29701  *
29702  * CDDL HEADER END
29703  */
29704 /*
29705  * Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
29706  * Use is subject to license terms.
29707  */
29708 
29709 
29710 
29711 
29712 #pragma ident "%Z%%M%	%I%	%E% SMI"
29713 
29714 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
29715 /*
29716  * CDDL HEADER START
29717  *
29718  * The contents of this file are subject to the terms of the
29719  * Common Development and Distribution License (the "License").
29720  * You may not use this file except in compliance with the License.
29721  *
29722  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29723  * or http://www.opensolaris.org/os/licensing.
29724  * See the License for the specific language governing permissions
29725  * and limitations under the License.
29726  *
29727  * When distributing Covered Code, include this CDDL HEADER in each
29728  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29729  * If applicable, add the following below this CDDL HEADER, with the
29730  * fields enclosed by brackets "[]" replaced with your own identifying
29731  * information: Portions Copyright [yyyy] [name of copyright owner]
29732  *
29733  * CDDL HEADER END
29734  */
29735 
29736 /*
29737  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
29738  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
29739  */
29740 
29741 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
29742 /*	  All Rights Reserved  	*/
29743 
29744 /*
29745  * University Copyright- Copyright (c) 1982, 1986, 1988
29746  * The Regents of the University of California
29747  * All Rights Reserved
29748  *
29749  * University Acknowledgment- Portions of this document are derived from
29750  * software developed by the University of California, Berkeley, and its
29751  * contributors.
29752  */
29753 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 2
29754 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h"
29755 typedef struct {
29756  char hostname[256];
29757  ushort_t port;
29758 } url_hport_t;
29759 
29760 typedef struct {
29761  boolean_t https;
29762  url_hport_t hport;
29763  char abspath[1024];
29764 } url_t;
29765 
29766 extern int url_parse_hostport(const char *, url_hport_t *, ushort_t);
29767 extern int url_parse(const char *, url_t *);
29768 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
29769 
29770 
29771 
29772 
29773 
29774 /* State information returned by http_conn_info() */
29775 typedef struct {
29776  url_t uri; /* URI last loaded */
29777  url_hport_t proxy; /* proxy, if any being used */
29778  boolean_t keepalive; /* Keepalive setting being used */
29779  uint_t read_timeout; /* Timeout to use for socket reads */
29780 } http_conninfo_t;
29781 
29782 
29783 /* Structure for version of the http file */
29784 typedef struct {
29785  uint_t maj_ver; /* Major version */
29786  uint_t min_ver; /* Minor version */
29787  uint_t micro_ver; /* Micro version */
29788 } boot_http_ver_t;
29789 
29790 /* Internal Libhttp errors */
29791 
29792 
29793 
29794     /* necessarily the underlying transport */
29795     /* connection). */
29796 
29797     /* error. */
29798 
29799 
29800 
29801     /* No matching entry */
29802 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h"
29803 /* Sources of errors */
29804 
29805 
29806 
29807 
29808 
29809 
29810 
29811 typedef struct {
29812  uint_t code; /* status code */
29813  char *statusmsg; /* status message */
29814  uint_t nresphdrs; /* number of response headers */
29815 } http_respinfo_t;
29816 
29817 
29818 typedef void *http_handle_t;
29819 
29820 boot_http_ver_t const *http_get_version(void);
29821 void http_set_p12_format(int);
29822 void http_set_verbose(boolean_t);
29823 int http_set_cipher_list(const char *);
29824 http_handle_t http_srv_init(const url_t *);
29825 int http_set_proxy(http_handle_t, const url_hport_t *);
29826 int http_set_keepalive(http_handle_t, boolean_t);
29827 int http_set_socket_read_timeout(http_handle_t, uint_t);
29828 int http_set_basic_auth(http_handle_t, const char *, const char *);
29829 int http_set_random_file(http_handle_t, const char *);
29830 int http_set_certificate_authority_file(const char *);
29831 int http_set_client_certificate_file(http_handle_t, const char *);
29832 int http_set_password(http_handle_t, const char *);
29833 int http_set_key_file_password(http_handle_t, const char *);
29834 int http_set_private_key_file(http_handle_t, const char *);
29835 
29836 int http_srv_connect(http_handle_t);
29837 int http_head_request(http_handle_t, const char *);
29838 int http_get_request(http_handle_t, const char *);
29839 int http_get_range_request(http_handle_t, const char *, offset_t, offset_t);
29840 void http_free_respinfo(http_respinfo_t *);
29841 int http_process_headers(http_handle_t, http_respinfo_t **);
29842 int http_process_part_headers(http_handle_t, http_respinfo_t **);
29843 char *http_get_header_value(http_handle_t, const char *);
29844 char *http_get_response_header(http_handle_t, uint_t);
29845 int http_read_body(http_handle_t, char *, size_t);
29846 int http_srv_disconnect(http_handle_t);
29847 int http_srv_close(http_handle_t);
29848 http_conninfo_t *http_get_conn_info(http_handle_t);
29849 int http_conn_is_https(http_handle_t, boolean_t *);
29850 ulong_t http_get_lasterr(http_handle_t, uint_t *);
29851 void http_decode_err(ulong_t, int *, int *, int *);
29852 char const *http_errorstr(uint_t, ulong_t);
29853 # 47 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
29854 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
29855 /*
29856  * CDDL HEADER START
29857  *
29858  * The contents of this file are subject to the terms of the
29859  * Common Development and Distribution License (the "License").
29860  * You may not use this file except in compliance with the License.
29861  *
29862  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29863  * or http://www.opensolaris.org/os/licensing.
29864  * See the License for the specific language governing permissions
29865  * and limitations under the License.
29866  *
29867  * When distributing Covered Code, include this CDDL HEADER in each
29868  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29869  * If applicable, add the following below this CDDL HEADER, with the
29870  * fields enclosed by brackets "[]" replaced with your own identifying
29871  * information: Portions Copyright [yyyy] [name of copyright owner]
29872  *
29873  * CDDL HEADER END
29874  */
29875 
29876 /*
29877  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
29878  * Use is subject to license terms.
29879  */
29880 
29881 
29882 
29883 
29884 
29885 /*
29886  * Module:	pkgerr.h
29887  * Description:
29888  *
29889  *   Implements error routines to handle the creation,
29890  *   management, and destruction of error objects, which
29891  *   hold error messages and codes returned from libpkg
29892  *   routines that support the objects defined herein.
29893  */
29894 
29895 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
29896 /*
29897  * CDDL HEADER START
29898  *
29899  * The contents of this file are subject to the terms of the
29900  * Common Development and Distribution License (the "License").
29901  * You may not use this file except in compliance with the License.
29902  *
29903  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29904  * or http://www.opensolaris.org/os/licensing.
29905  * See the License for the specific language governing permissions
29906  * and limitations under the License.
29907  *
29908  * When distributing Covered Code, include this CDDL HEADER in each
29909  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29910  * If applicable, add the following below this CDDL HEADER, with the
29911  * fields enclosed by brackets "[]" replaced with your own identifying
29912  * information: Portions Copyright [yyyy] [name of copyright owner]
29913  *
29914  * CDDL HEADER END
29915  */
29916 
29917 /*
29918  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
29919  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
29920  */
29921 
29922 /*	Copyright (c) 1988 AT&T	*/
29923 /*	  All Rights Reserved  	*/
29924 
29925 /*
29926  * User-visible pieces of the ANSI C standard I/O package.
29927  */
29928 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 2
29929 
29930 
29931 
29932 
29933 
29934 /*
29935  * Public Definitions
29936  */
29937 
29938 typedef enum {
29939  PKGERR_OK = 0,
29940  PKGERR_EXIST,
29941  PKGERR_READ,
29942  PKGERR_CORRUPT,
29943  PKGERR_PARSE,
29944  PKGERR_BADPASS,
29945  PKGERR_BADALIAS,
29946  PKGERR_INTERNAL,
29947  PKGERR_UNSUP,
29948  PKGERR_NOALIAS,
29949  PKGERR_NOALIASMATCH,
29950  PKGERR_MULTIPLE,
29951  PKGERR_INCOMPLETE,
29952  PKGERR_NOPRIVKEY,
29953  PKGERR_NOPUBKEY,
29954  PKGERR_NOCACERT,
29955  PKGERR_NOMEM,
29956  PKGERR_CHAIN,
29957  PKGERR_LOCKED,
29958  PKGERR_WRITE,
29959  PKGERR_UNLOCK,
29960  PKGERR_TIME,
29961  PKGERR_DUPLICATE,
29962  PKGERR_WEB,
29963  PKGERR_VERIFY
29964 } PKG_ERR_CODE;
29965 
29966 /*
29967  * Public Structures
29968  */
29969 
29970 /* external reference to PKG_ERR object (contents private) */
29971 typedef PKG_ERR_CODE pkg_err_t;
29972 
29973 typedef struct _pkg_err_struct PKG_ERR;
29974 
29975 /*
29976  * Public Methods
29977  */
29978 
29979 PKG_ERR *pkgerr_new();
29980 void pkgerr_add(PKG_ERR *, PKG_ERR_CODE, char *, ...);
29981 void pkgerr_clear(PKG_ERR *);
29982 int pkgerr_dump(PKG_ERR *, FILE *);
29983 int pkgerr_num(PKG_ERR *);
29984 char *pkgerr_get(PKG_ERR *, int);
29985 void pkgerr_free(PKG_ERR *);
29986 # 48 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
29987 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 1
29988 /*
29989  * CDDL HEADER START
29990  *
29991  * The contents of this file are subject to the terms of the
29992  * Common Development and Distribution License (the "License").
29993  * You may not use this file except in compliance with the License.
29994  *
29995  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29996  * or http://www.opensolaris.org/os/licensing.
29997  * See the License for the specific language governing permissions
29998  * and limitations under the License.
29999  *
30000  * When distributing Covered Code, include this CDDL HEADER in each
30001  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30002  * If applicable, add the following below this CDDL HEADER, with the
30003  * fields enclosed by brackets "[]" replaced with your own identifying
30004  * information: Portions Copyright [yyyy] [name of copyright owner]
30005  *
30006  * CDDL HEADER END
30007  */
30008 
30009 /*
30010  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
30011  * Use is subject to license terms.
30012  */
30013 
30014 
30015 
30016 
30017 
30018 /*
30019  * Module:	keystore.h
30020  * Description:	This module contains the structure definitions for processing
30021  *		package keystore files.
30022  */
30023 
30024 
30025 
30026 
30027 
30028 # 1 "/usr/include/openssl/evp.h" 1 3 4
30029 /* crypto/evp/evp.h */
30030 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
30031  * All rights reserved.
30032  *
30033  * This package is an SSL implementation written
30034  * by Eric Young (eay@cryptsoft.com).
30035  * The implementation was written so as to conform with Netscapes SSL.
30036  *
30037  * This library is free for commercial and non-commercial use as long as
30038  * the following conditions are aheared to.  The following conditions
30039  * apply to all code found in this distribution, be it the RC4, RSA,
30040  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
30041  * included with this distribution is covered by the same copyright terms
30042  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
30043  *
30044  * Copyright remains Eric Young's, and as such any Copyright notices in
30045  * the code are not to be removed.
30046  * If this package is used in a product, Eric Young should be given attribution
30047  * as the author of the parts of the library used.
30048  * This can be in the form of a textual message at program startup or
30049  * in documentation (online or textual) provided with the package.
30050  *
30051  * Redistribution and use in source and binary forms, with or without
30052  * modification, are permitted provided that the following conditions
30053  * are met:
30054  * 1. Redistributions of source code must retain the copyright
30055  *    notice, this list of conditions and the following disclaimer.
30056  * 2. Redistributions in binary form must reproduce the above copyright
30057  *    notice, this list of conditions and the following disclaimer in the
30058  *    documentation and/or other materials provided with the distribution.
30059  * 3. All advertising materials mentioning features or use of this software
30060  *    must display the following acknowledgement:
30061  *    "This product includes cryptographic software written by
30062  *     Eric Young (eay@cryptsoft.com)"
30063  *    The word 'cryptographic' can be left out if the rouines from the library
30064  *    being used are not cryptographic related :-).
30065  * 4. If you include any Windows specific code (or a derivative thereof) from
30066  *    the apps directory (application code) you must include an acknowledgement:
30067  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
30068  *
30069  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
30070  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30071  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30072  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
30073  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30074  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30075  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30076  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30077  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30078  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30079  * SUCH DAMAGE.
30080  *
30081  * The licence and distribution terms for any publically available version or
30082  * derivative of this code cannot be changed.  i.e. this code cannot simply be
30083  * copied and put under another distribution licence
30084  * [including the GNU Public Licence.]
30085  */
30086 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
30087 # 1 "/usr/include/openssl/x509.h" 1 3 4
30088 /* crypto/x509/x509.h */
30089 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
30090  * All rights reserved.
30091  *
30092  * This package is an SSL implementation written
30093  * by Eric Young (eay@cryptsoft.com).
30094  * The implementation was written so as to conform with Netscapes SSL.
30095  *
30096  * This library is free for commercial and non-commercial use as long as
30097  * the following conditions are aheared to.  The following conditions
30098  * apply to all code found in this distribution, be it the RC4, RSA,
30099  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
30100  * included with this distribution is covered by the same copyright terms
30101  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
30102  *
30103  * Copyright remains Eric Young's, and as such any Copyright notices in
30104  * the code are not to be removed.
30105  * If this package is used in a product, Eric Young should be given attribution
30106  * as the author of the parts of the library used.
30107  * This can be in the form of a textual message at program startup or
30108  * in documentation (online or textual) provided with the package.
30109  *
30110  * Redistribution and use in source and binary forms, with or without
30111  * modification, are permitted provided that the following conditions
30112  * are met:
30113  * 1. Redistributions of source code must retain the copyright
30114  *    notice, this list of conditions and the following disclaimer.
30115  * 2. Redistributions in binary form must reproduce the above copyright
30116  *    notice, this list of conditions and the following disclaimer in the
30117  *    documentation and/or other materials provided with the distribution.
30118  * 3. All advertising materials mentioning features or use of this software
30119  *    must display the following acknowledgement:
30120  *    "This product includes cryptographic software written by
30121  *     Eric Young (eay@cryptsoft.com)"
30122  *    The word 'cryptographic' can be left out if the rouines from the library
30123  *    being used are not cryptographic related :-).
30124  * 4. If you include any Windows specific code (or a derivative thereof) from
30125  *    the apps directory (application code) you must include an acknowledgement:
30126  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
30127  *
30128  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
30129  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30130  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30131  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
30132  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30133  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30134  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30135  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30136  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30137  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30138  * SUCH DAMAGE.
30139  *
30140  * The licence and distribution terms for any publically available version or
30141  * derivative of this code cannot be changed.  i.e. this code cannot simply be
30142  * copied and put under another distribution licence
30143  * [including the GNU Public Licence.]
30144  */
30145 /* ====================================================================
30146  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
30147  * ECDH support in OpenSSL originally developed by
30148  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
30149  */
30150 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
30151 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
30152 /*
30153  * CDDL HEADER START
30154  *
30155  * The contents of this file are subject to the terms of the
30156  * Common Development and Distribution License (the "License").
30157  * You may not use this file except in compliance with the License.
30158  *
30159  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30160  * or http://www.opensolaris.org/os/licensing.
30161  * See the License for the specific language governing permissions
30162  * and limitations under the License.
30163  *
30164  * When distributing Covered Code, include this CDDL HEADER in each
30165  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30166  * If applicable, add the following below this CDDL HEADER, with the
30167  * fields enclosed by brackets "[]" replaced with your own identifying
30168  * information: Portions Copyright [yyyy] [name of copyright owner]
30169  *
30170  * CDDL HEADER END
30171  */
30172 
30173 /*
30174  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
30175  * Use is subject to license terms.
30176  */
30177 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
30178 
30179 /* keystore structures */
30180 
30181 /* this opaque type represents a keystore */
30182 typedef void *keystore_handle_t;
30183 
30184 /* flags passed to open_keystore */
30185 
30186 /* opens keystore read-only.  Attempts to modify results in an error */
30187 
30188 
30189 /* opens keystore read-write */
30190 
30191 
30192 /*
30193  * tells open_keystore to fall back to app-generic paths in the case that
30194  * the app-specific paths do not exist.
30195  */
30196 
30197 
30198 /*
30199  * tells open_keystore to use the app-specific paths no matter what,
30200  * failing if they cannot be used for any reason.
30201  */
30202 
30203 
30204 /* masks off various types of flags */
30205 
30206 
30207 
30208 /* default is read-only, soft */
30209 
30210 
30211 
30212 /*
30213  * possible encoding formats used by the library, used
30214  * by print_cert
30215  */
30216 typedef enum {
30217  KEYSTORE_FORMAT_PEM,
30218  KEYSTORE_FORMAT_DER,
30219  KEYSTORE_FORMAT_TEXT
30220 } keystore_encoding_format_t;
30221 
30222 /*
30223  * structure passed back to password callback for determining how
30224  * to prompt for passphrase, and where to record errors
30225  */
30226 typedef struct {
30227  PKG_ERR *err;
30228 } keystore_passphrase_data;
30229 
30230 
30231 /* max length of a passphrase.  One could use a short story! */
30232 
30233 
30234 /* callback for collecting passphrase when open_keystore() is called */
30235 typedef int keystore_passphrase_cb(char *, int, int, void *);
30236 
30237 /* names of the individual files within the keystore path */
30238 
30239 
30240 
30241 
30242 /* keystore.c */
30243 extern int open_keystore(PKG_ERR *, char *, char *,
30244     keystore_passphrase_cb, long flags, keystore_handle_t *);
30245 
30246 extern int print_certs(PKG_ERR *, keystore_handle_t, char *,
30247     keystore_encoding_format_t, FILE *);
30248 
30249 extern int check_cert(PKG_ERR *, X509 *);
30250 
30251 extern int check_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *);
30252 
30253 extern int print_cert(PKG_ERR *, X509 *,
30254     keystore_encoding_format_t, char *, boolean_t, FILE *);
30255 
30256 extern int close_keystore(PKG_ERR *, keystore_handle_t,
30257     keystore_passphrase_cb);
30258 
30259 extern int merge_ca_cert(PKG_ERR *, X509 *, keystore_handle_t);
30260 extern int merge_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *,
30261     char *, keystore_handle_t);
30262 
30263 extern int delete_cert_and_keys(PKG_ERR *, keystore_handle_t,
30264     char *);
30265 
30266 extern int find_key_cert_pair(PKG_ERR *, keystore_handle_t,
30267     char *, EVP_PKEY **, X509 **);
30268 
30269 extern int find_ca_certs(PKG_ERR *, keystore_handle_t,
30270     struct stack_st_X509 **);
30271 
30272 extern int find_cl_certs(PKG_ERR *, keystore_handle_t,
30273     struct stack_st_X509 **);
30274 # 49 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
30275 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
30276 /*
30277  * CDDL HEADER START
30278  *
30279  * The contents of this file are subject to the terms of the
30280  * Common Development and Distribution License (the "License").
30281  * You may not use this file except in compliance with the License.
30282  *
30283  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30284  * or http://www.opensolaris.org/os/licensing.
30285  * See the License for the specific language governing permissions
30286  * and limitations under the License.
30287  *
30288  * When distributing Covered Code, include this CDDL HEADER in each
30289  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30290  * If applicable, add the following below this CDDL HEADER, with the
30291  * fields enclosed by brackets "[]" replaced with your own identifying
30292  * information: Portions Copyright [yyyy] [name of copyright owner]
30293  *
30294  * CDDL HEADER END
30295  */
30296 
30297 /*
30298  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
30299  * Use is subject to license terms.
30300  */
30301 # 35 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h"
30302 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
30303 /*
30304  * CDDL HEADER START
30305  *
30306  * The contents of this file are subject to the terms of the
30307  * Common Development and Distribution License (the "License").
30308  * You may not use this file except in compliance with the License.
30309  *
30310  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30311  * or http://www.opensolaris.org/os/licensing.
30312  * See the License for the specific language governing permissions
30313  * and limitations under the License.
30314  *
30315  * When distributing Covered Code, include this CDDL HEADER in each
30316  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30317  * If applicable, add the following below this CDDL HEADER, with the
30318  * fields enclosed by brackets "[]" replaced with your own identifying
30319  * information: Portions Copyright [yyyy] [name of copyright owner]
30320  *
30321  * CDDL HEADER END
30322  */
30323 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30324 /*	  All Rights Reserved  	*/
30325 
30326 /*
30327  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
30328  * Use is subject to license terms.
30329  */
30330 # 36 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 2
30331 
30332 struct mergstat {
30333  unsigned setuid:1; /* pkgmap entry has setuid */
30334  unsigned setgid:1; /* ... and/or setgid bit set */
30335  unsigned contchg:1; /* contents of the files different */
30336  unsigned attrchg:1; /* attributes are different */
30337  unsigned shared:1; /* > 1 pkg associated with this */
30338  unsigned osetuid:1; /* installed set[ug]id process ... */
30339  unsigned osetgid:1; /* ... being overwritten by pkg. */
30340  unsigned rogue:1; /* conflicting file not owned by a package */
30341  unsigned dir2nondir:1; /* was a directory & now a non-directory */
30342  unsigned replace:1; /* merge makes no sense for this object pair */
30343  unsigned denied:1; /* for some reason this was not allowed in */
30344  unsigned preloaded:1; /* already checked in a prior pkg op */
30345  unsigned processed:1; /* already installed or removed */
30346  unsigned parentsyml2dir:1;
30347  /* parent directory changed from symlink to a directory */
30348 };
30349 
30350 /*
30351  * This is information required by pkgadd for fast operation. A
30352  * cfextra struct is tagged to each cfent structure requiring
30353  * processing. This is how we avoid some unneeded repetition. The
30354  * entries incorporating the word 'local' refer to the path that
30355  * gets us to the delivered package file. In other words, to install
30356  * a file we usually copy from 'local' to 'path' below. In the case
30357  * of a link, where no actual copying takes place, local is the source
30358  * of the link. Note that environment variables are not evaluated in
30359  * the locals unless they are links since the literal path is how
30360  * pkgadd finds the entry under the reloc directory.
30361  */
30362 struct cfextra {
30363  struct cfent cf_ent; /* basic contents file entry */
30364  struct mergstat mstat; /* merge status for installs */
30365  uint32_t fsys_value; /* fstab[] entry index */
30366  uint32_t fsys_base; /* actual base filesystem in fs_tab[] */
30367  char *client_path; /* the client-relative path */
30368  char *server_path; /* the server-relative path */
30369  char *map_path; /* as read from the pkgmap */
30370  char *client_local; /* client_relative local */
30371  char *server_local; /* server relative local */
30372 };
30373 # 50 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
30374 
30375 /*
30376  * The contents database file interface.
30377  */
30378 
30379 typedef struct pkg_server *PKGserver;
30380 
30381 /* Some commands modify the internal database: add them here */
30382 # 82 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30383 typedef enum {
30384  INVALID, /* Not initialized */
30385  NEVER, /* Don't start, does check if it is running. */
30386  FLUSH_LOG, /* Run it once to incorporate the log. */
30387  RUN_ONCE, /* Run until the current client stops. */
30388  TIMEOUT, /* Run until a timeout occurs. */
30389  PERMANENT, /* Run until it is externally terminated. */
30390  DEFAULTMODE = TIMEOUT /* The default mode, must come last */
30391 } start_mode_t;
30392 
30393 typedef struct pkgcmd {
30394  int cmd;
30395  char buf[1];
30396 } pkgcmd_t;
30397 
30398 typedef struct pkgfilter {
30399  int cmd;
30400  int len;
30401  char buf[1];
30402 } pkgfilter_t;
30403 
30404 /*
30405  * Virtual File Protocol definitions
30406  */
30407 
30408 /*
30409  * flags associated with virtual file protocol operations; note that these flags
30410  * may only occupy the low order 16 bits of the 32-bit unsigned flag.
30411  */
30412 
30413 typedef unsigned long VFPFLAGS_T;
30414 # 121 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30415 /* virtual file protocol object */
30416 
30417 typedef struct _vfp VFP_T;
30418 
30419 /* structure behind the virtual file protocol object */
30420 
30421 struct _vfp {
30422  FILE *_vfpFile; /* -> opened FILE */
30423  char *_vfpCurr; /* -> current byte to read/write */
30424  char *_vfpHighWater; /* -> last byte modified */
30425  char *_vfpEnd; /* -> last data byte */
30426  char *_vfpPath; /* -> path associated with FILE */
30427  char *_vfpStart; /* -> first data byte */
30428  void *_vfpExtra; /* undefined */
30429  size_t _vfpSize; /* size of mapped/allocated area */
30430  size_t _vfpMapSize; /* # mapped bytes */
30431  VFPFLAGS_T _vfpFlags; /* flags associated with vfp/data */
30432  int _vfpOverflow; /* non-zero if buffer write overflow */
30433  blkcnt_t _vfpCkStBlocks; /* checkpoint # blocks */
30434  dev_t _vfpCkDev; /* checkpoint device i.d. */
30435  ino_t _vfpCkIno; /* checkpoint inode # */
30436  off_t _vfpCkSize; /* checkpoint size */
30437  time_t _vfpCkMtime; /* checkpoint modification time */
30438 };
30439 
30440 /*
30441  * get highest modified byte (length) contained in vfp
30442  *
30443  * determine number of bytes to write - it will be the highest of:
30444  *  -- the current pointer into the file - this is updated whenever
30445  *	the location of the file is changed by a single byte
30446  *  -- the last "high water mark" - the last known location that
30447  *	was written to the file - updated only when the location
30448  *	of the file is directly changed - e.g. vfpSetCurrCharPtr,
30449  *	vfpTruncate, vfpRewind.
30450  * this reduces the "bookkeeping" that needs to be done to know
30451  * how many bytes to write out to the file - typically a file is
30452  * written sequentially so the current file pointer is sufficient
30453  * to determine how many bytes to write out.
30454  */
30455 # 169 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30456 /*
30457  * increment current pointer by specified delta
30458  * if the delta exceeds the buffer size, set pointer to buffer end
30459  */
30460 # 185 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30461 /* get the path associated with the vfp */
30462 
30463 
30464 /* get a string from the vfp into a fixed size buffer */
30465 # 207 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30466 /* get number of bytes remaining to read */
30467 
30468 
30469 
30470 
30471 /* get number of bytes remaining to write */
30472 
30473 
30474 
30475 
30476 /* put current character and increment to next */
30477 
30478 
30479 
30480 
30481 
30482 
30483 /* put integer to current character and increment */
30484 
30485 
30486 /* put long to current character and increment */
30487 
30488 
30489 /* get current character and increment to next */
30490 
30491 
30492 /* get current character - do not increment */
30493 
30494 
30495 /* get pointer to current character */
30496 
30497 
30498 /* increment current character pointer */
30499 
30500 
30501 /* decrement current character pointer */
30502 
30503 
30504 /* get pointer to first data byte in buffer */
30505 
30506 
30507 /* get pointer to last data byte in buffer */
30508 
30509 
30510 /* set pointer to current character */
30511 
30512 
30513 
30514 
30515 
30516 
30517 /* set pointer to last data byte in buffer */
30518 # 267 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30519 /* seek to end of file - one past last data byte in file */
30520 
30521 
30522 /* get number of bytes between current char and specified char */
30523 
30524 
30525 
30526 /* put string to current character and increment */
30527 # 284 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30528 /* put fixed number of bytes to current character and increment */
30529 # 298 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30530 /* put format one arg to current character and increment */
30531 
30532 
30533 
30534 
30535 
30536 
30537 
30538 struct dm_buf {
30539  char *text_buffer; /* start of allocated buffer */
30540  int offset; /* number of bytes into the text_buffer */
30541  int allocation; /* size of buffer in bytes */
30542 };
30543 
30544 /* This structure is used to hold a dynamically growing string */
30545 
30546 struct dstr {
30547  char *pc;
30548  int len;
30549  int max;
30550 };
30551 
30552 /* setmapmode() defines */
30553 # 330 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30554 /* max length for printed attributes */
30555 
30556 
30557 /*
30558  * These three defines indicate that the prototype file contains a '?'
30559  * meaning do not specify this data in the pkgmap entry.
30560  */
30561 # 366 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30562 /* Settings for network admin defaults */
30563 # 377 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30564 /* package header magic tokens */
30565 
30566 
30567 
30568 /* name of security files */
30569 
30570 
30571 
30572 
30573 
30574 
30575 /*
30576  * The next three mean that no mode, owner or group was specified or that the
30577  * one specified is invalid for some reason. Sometimes this is an error in
30578  * which case it is generally converted to CUR* with a warning. Other times
30579  * it means "look it up" by stating the existing file system object pointred
30580  * to in the prototype file.
30581  */
30582 
30583 
30584 
30585 
30586 /* string comparitor abbreviators */
30587 
30588 
30589 
30590 
30591 
30592 
30593 extern FILE *epopen(char *cmd, char *mode);
30594 extern char **gpkglist(char *dir, char **pkg, char **catg);
30595 extern int is_not_valid_length(char **category);
30596 extern int is_not_valid_category(char **category, char *progname);
30597 extern int is_same_CATEGORY(char **category, char *installed_category);
30598 extern char **get_categories(char *catg_arg);
30599 
30600 extern void pkglist_cont(char *keyword);
30601 extern char **pkgalias(char *pkg);
30602 extern char *get_prog_name(void);
30603 extern char *set_prog_name(char *name);
30604 extern int averify(int fix, char *ftype, char *path, struct ainfo *ainfo);
30605 extern int ckparam(char *param, char *value);
30606 extern int ckvolseq(char *dir, int part, int nparts);
30607 extern int cverify(int fix, char *ftype, char *path, struct cinfo *cinfo,
30608    int allow_checksum);
30609 extern unsigned long compute_checksum(int *r_cksumerr, char *a_path);
30610 extern int fverify(int fix, char *ftype, char *path, struct ainfo *ainfo,
30611       struct cinfo *cinfo);
30612 extern char *getErrbufAddr(void);
30613 extern int getErrbufSize(void);
30614 extern char *getErrstr(void);
30615 extern void setErrstr(char *errstr);
30616 extern int devtype(char *alias, struct pkgdev *devp);
30617 extern int ds_totread; /* total number of parts read */
30618 extern int ds_close(int pkgendflg);
30619 extern int ds_findpkg(char *device, char *pkg);
30620 extern int ds_getinfo(char *string);
30621 extern int ds_getpkg(char *device, int n, char *dstdir);
30622 extern int ds_ginit(char *device);
30623 extern boolean_t ds_fd_open(void);
30624 extern int ds_init(char *device, char **pkg, char *norewind);
30625 extern int BIO_ds_dump_header(PKG_ERR *, BIO *);
30626 extern int BIO_ds_dump(PKG_ERR *, char *, BIO *);
30627 extern int BIO_dump_cmd(char *cmd, BIO *bio);
30628 extern int ds_next(char *, char *);
30629 extern int ds_readbuf(char *device);
30630 extern int epclose(FILE *pp);
30631 extern int esystem(char *cmd, int ifd, int ofd);
30632 extern int e_ExecCmdArray(int *r_status, char **r_results,
30633    char *a_inputFile, char *a_cmd, char **a_args);
30634 extern int e_ExecCmdList(int *r_status, char **r_results,
30635    char *a_inputFile, char *a_cmd, ...);
30636 extern int gpkgmap(struct cfent *ept, FILE *fp);
30637 extern int gpkgmapvfp(struct cfent *ept, VFP_T *fpv);
30638 extern void setmapmode(int mode_no);
30639 extern int isFdRemote(int a_fd);
30640 extern int isFstypeRemote(char *a_fstype);
30641 extern int isPathRemote(char *a_path);
30642 extern int iscpio(char *path, int *iscomp);
30643 extern int isdir(char *path);
30644 extern int isfile(char *dir, char *file);
30645 extern int fmkdir(char *a_path, int a_mode);
30646 extern int pkgexecl(char *filein, char *fileout, char *uname, char *gname,
30647    ...);
30648 extern int pkgexecv(char *filein, char *fileout, char *uname, char *gname,
30649    char *arg[]);
30650 extern int pkghead(char *device);
30651 extern int pkgmount(struct pkgdev *devp, char *pkg, int part, int nparts,
30652    int getvolflg);
30653 extern int pkgtrans(char *device1, char *device2, char **pkg,
30654    int options, keystore_handle_t, char *);
30655 extern int pkgumount(struct pkgdev *devp);
30656 extern int ppkgmap(struct cfent *ept, FILE *fp);
30657 extern int putcfile(struct cfent *ept, FILE *fp);
30658 extern int putcvfpfile(struct cfent *ept, VFP_T *vfp);
30659 extern int rrmdir(char *path);
30660 extern void set_memalloc_failure_func(void (*)(int));
30661 extern void *xmalloc(size_t size);
30662 extern void *xrealloc(void *ptr, size_t size);
30663 extern char *xstrdup(char *str);
30664 extern void set_passphrase_prompt(char *);
30665 extern void set_passphrase_passarg(char *);
30666 extern int pkg_passphrase_cb(char *, int, int, void *);
30667 
30668 extern int srchcfile(struct cfent *ept, char *path, PKGserver server);
30669 extern struct group *cgrgid(gid_t gid);
30670 extern struct group *cgrnam(char *nam);
30671 extern struct passwd *cpwnam(char *nam);
30672 extern struct passwd *cpwuid(uid_t uid);
30673 extern struct group *clgrgid(gid_t gid);
30674 extern struct group *clgrnam(char *nam);
30675 extern struct passwd *clpwnam(char *nam);
30676 extern struct passwd *clpwuid(uid_t uid);
30677 extern void basepath(char *path, char *basedir, char *ir);
30678 extern void canonize(char *file);
30679 extern void canonize_slashes(char *file);
30680 extern void checksum_off(void);
30681 extern void checksum_on(void);
30682 extern void cvtpath(char *path, char *copy);
30683 extern void ds_order(char *list[]);
30684 extern void ds_putinfo(char *buf, size_t);
30685 extern void ds_skiptoend(char *device);
30686 extern void ecleanup(void);
30687 /*PRINTFLIKE1*/
30688 extern void logerr(char *fmt, ...);
30689 extern int mappath(int flag, char *path);
30690 extern int mapvar(int flag, char *varname);
30691 /*PRINTFLIKE1*/
30692 extern void progerr(char *fmt, ...);
30693 extern void pkgerr(PKG_ERR *);
30694 extern void rpterr(void);
30695 extern void tputcfent(struct cfent *ept, FILE *fp);
30696 extern void set_nonABI_symlinks(void);
30697 extern int nonABI_symlinks(void);
30698 extern void disable_attribute_check(void);
30699 extern int get_disable_attribute_check(void);
30700 
30701 /* security.c */
30702 extern void sec_init(void);
30703 extern char *get_subject_display_name(X509 *);
30704 extern char *get_issuer_display_name(X509 *);
30705 extern char *get_serial_num(X509 *);
30706 extern char *get_fingerprint(X509 *, const EVP_MD *);
30707 extern int get_cert_chain(PKG_ERR *, X509 *, struct stack_st_X509 *,
30708     struct stack_st_X509 *, struct stack_st_X509 **);
30709 
30710 /* pkgstr.c */
30711 void pkgstrConvertUllToTimeString_r(unsigned long long a_time,
30712    char *a_buf, int a_bufLen);
30713 char *pkgstrConvertPathToBasename(char *a_path);
30714 char *pkgstrConvertPathToDirname(char *a_path);
30715 char *pkgstrDup(char *a_str);
30716 char *pkgstrLocatePathBasename(char *a_path);
30717 void pkgstrScaleNumericString(char *a_buf, unsigned long long scale);
30718 void pkgstrAddToken(char **a_old, char *a_new, char a_separator);
30719 boolean_t pkgstrContainsToken(char *a_string, char *a_token,
30720    char *a_separators);
30721 void pkgstrExpandTokens(char **a_old, char *a_string,
30722    char a_separator, char *a_separators);
30723 char *pkgstrGetToken(char *r_sep, char *a_string, int a_index,
30724    char *a_separators);
30725 void pkgstrGetToken_r(char *r_sep, char *a_string, int a_index,
30726    char *a_separators, char *a_buf, int a_bufLen);
30727 unsigned long pkgstrNumTokens(char *a_string, char *a_separators);
30728 char *pkgstrPrintf(char *a_format, ...);
30729 void pkgstrPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
30730 void pkgstrRemoveToken(char **r_string, char *a_token,
30731    char *a_separators, int a_index);
30732 void pkgstrRemoveLeadingWhitespace(char **a_str);
30733 /* vfpops.c */
30734 extern int vfpCheckpointFile(VFP_T **r_destVfp, VFP_T **a_vfp,
30735    char *a_path);
30736 extern int vfpCheckpointOpen(VFP_T **a_cvfp, VFP_T **r_vfp, char *a_path,
30737    char *a_mode, VFPFLAGS_T a_flags);
30738 extern int vfpClearModified(VFP_T *a_vfp);
30739 extern int vfpClose(VFP_T **r_vfp);
30740 extern int vfpGetModified(VFP_T *a_vfp);
30741 extern int vfpOpen(VFP_T **r_vfp, char *a_path, char *a_mode,
30742    VFPFLAGS_T a_flags);
30743 extern void vfpRewind(VFP_T *a_vfp);
30744 extern ssize_t vfpSafePwrite(int a_fildes, void *a_buf,
30745    size_t a_nbyte, off_t a_offset);
30746 extern ssize_t vfpSafeWrite(int a_fildes, void *a_buf, size_t a_nbyte);
30747 extern int vfpSetFlags(VFP_T *a_vfp, VFPFLAGS_T a_flags);
30748 extern int vfpSetModified(VFP_T *a_vfp);
30749 extern int vfpSetSize(VFP_T *a_vfp, size_t a_size);
30750 extern void vfpTruncate(VFP_T *a_vfp);
30751 extern int vfpWriteToFile(VFP_T *a_vfp, char *a_path);
30752 
30753 /* handlelocalfs.c */
30754 boolean_t enable_local_fs(void);
30755 boolean_t restore_local_fs(void);
30756 
30757 /* pkgserv.c */
30758 extern PKGserver pkgopenserver(const char *, const char *, boolean_t);
30759 extern void pkgcloseserver(PKGserver);
30760 extern int pkgcmd(PKGserver, void *, size_t, char **, size_t *,
30761     int *);
30762 extern boolean_t pkgsync_needed(const char *, const char *, boolean_t);
30763 extern int pkgsync(const char *, const char *, boolean_t);
30764 extern int pkgservercommitfile(VFP_T *, PKGserver);
30765 extern int pkgopenfilter(PKGserver server, const char *pkginst);
30766 extern void pkgclosefilter(PKGserver);
30767 extern char *pkggetentry(PKGserver, int *, int *);
30768 extern char *pkggetentry_named(PKGserver, const char *, int *,
30769     int *);
30770 extern void pkgserversetmode(start_mode_t);
30771 extern start_mode_t pkgservergetmode(void);
30772 extern start_mode_t pkgparsemode(const char *);
30773 extern char *pkgmodeargument(start_mode_t);
30774 # 61 "unpack_package_from_stream.c" 2
30775 
30776 /*
30777  * local pkg command library includes
30778  */
30779 
30780 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 1
30781 /*
30782  * CDDL HEADER START
30783  *
30784  * The contents of this file are subject to the terms of the
30785  * Common Development and Distribution License (the "License").
30786  * You may not use this file except in compliance with the License.
30787  *
30788  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30789  * or http://www.opensolaris.org/os/licensing.
30790  * See the License for the specific language governing permissions
30791  * and limitations under the License.
30792  *
30793  * When distributing Covered Code, include this CDDL HEADER in each
30794  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30795  * If applicable, add the following below this CDDL HEADER, with the
30796  * fields enclosed by brackets "[]" replaced with your own identifying
30797  * information: Portions Copyright [yyyy] [name of copyright owner]
30798  *
30799  * CDDL HEADER END
30800  */
30801 
30802 /*
30803  * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
30804  */
30805 # 34 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
30806 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
30807 /*
30808  * CDDL HEADER START
30809  *
30810  * The contents of this file are subject to the terms of the
30811  * Common Development and Distribution License (the "License").
30812  * You may not use this file except in compliance with the License.
30813  *
30814  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30815  * or http://www.opensolaris.org/os/licensing.
30816  * See the License for the specific language governing permissions
30817  * and limitations under the License.
30818  *
30819  * When distributing Covered Code, include this CDDL HEADER in each
30820  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30821  * If applicable, add the following below this CDDL HEADER, with the
30822  * fields enclosed by brackets "[]" replaced with your own identifying
30823  * information: Portions Copyright [yyyy] [name of copyright owner]
30824  *
30825  * CDDL HEADER END
30826  */
30827 
30828 /*
30829  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30830  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
30831  */
30832 
30833 /*	Copyright (c) 1988 AT&T	*/
30834 /*	  All Rights Reserved  	*/
30835 
30836 /*
30837  * User-visible pieces of the ANSI C standard I/O package.
30838  */
30839 # 35 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
30840 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 1
30841 /*
30842  * CDDL HEADER START
30843  *
30844  * The contents of this file are subject to the terms of the
30845  * Common Development and Distribution License (the "License").
30846  * You may not use this file except in compliance with the License.
30847  *
30848  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30849  * or http://www.opensolaris.org/os/licensing.
30850  * See the License for the specific language governing permissions
30851  * and limitations under the License.
30852  *
30853  * When distributing Covered Code, include this CDDL HEADER in each
30854  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30855  * If applicable, add the following below this CDDL HEADER, with the
30856  * fields enclosed by brackets "[]" replaced with your own identifying
30857  * information: Portions Copyright [yyyy] [name of copyright owner]
30858  *
30859  * CDDL HEADER END
30860  */
30861 
30862 /*
30863  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30864  *
30865  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
30866  * Use is subject to license terms.
30867  */
30868 
30869 /*	Copyright (c) 1988 AT&T	*/
30870 /*	  All Rights Reserved  	*/
30871 # 36 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
30872 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
30873 /*
30874  * CDDL HEADER START
30875  *
30876  * The contents of this file are subject to the terms of the
30877  * Common Development and Distribution License (the "License").
30878  * You may not use this file except in compliance with the License.
30879  *
30880  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30881  * or http://www.opensolaris.org/os/licensing.
30882  * See the License for the specific language governing permissions
30883  * and limitations under the License.
30884  *
30885  * When distributing Covered Code, include this CDDL HEADER in each
30886  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30887  * If applicable, add the following below this CDDL HEADER, with the
30888  * fields enclosed by brackets "[]" replaced with your own identifying
30889  * information: Portions Copyright [yyyy] [name of copyright owner]
30890  *
30891  * CDDL HEADER END
30892  */
30893 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30894 /*	  All Rights Reserved  	*/
30895 
30896 
30897 /*
30898  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
30899  * Use is subject to license terms.
30900  *
30901  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
30902  * Copyright 2016 Joyent, Inc.
30903  */
30904 # 37 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
30905 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
30906 /*
30907  * CDDL HEADER START
30908  *
30909  * The contents of this file are subject to the terms of the
30910  * Common Development and Distribution License (the "License").
30911  * You may not use this file except in compliance with the License.
30912  *
30913  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30914  * or http://www.opensolaris.org/os/licensing.
30915  * See the License for the specific language governing permissions
30916  * and limitations under the License.
30917  *
30918  * When distributing Covered Code, include this CDDL HEADER in each
30919  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30920  * If applicable, add the following below this CDDL HEADER, with the
30921  * fields enclosed by brackets "[]" replaced with your own identifying
30922  * information: Portions Copyright [yyyy] [name of copyright owner]
30923  *
30924  * CDDL HEADER END
30925  */
30926 
30927 /*
30928  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30929  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
30930  */
30931 
30932 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
30933 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
30934 /*	All Rights Reserved	*/
30935 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
30936 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
30937 /*
30938  * CDDL HEADER START
30939  *
30940  * The contents of this file are subject to the terms of the
30941  * Common Development and Distribution License (the "License").
30942  * You may not use this file except in compliance with the License.
30943  *
30944  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30945  * or http://www.opensolaris.org/os/licensing.
30946  * See the License for the specific language governing permissions
30947  * and limitations under the License.
30948  *
30949  * When distributing Covered Code, include this CDDL HEADER in each
30950  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30951  * If applicable, add the following below this CDDL HEADER, with the
30952  * fields enclosed by brackets "[]" replaced with your own identifying
30953  * information: Portions Copyright [yyyy] [name of copyright owner]
30954  *
30955  * CDDL HEADER END
30956  */
30957 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30958 /*	  All Rights Reserved  	*/
30959 
30960 /*
30961  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
30962  * Use is subject to license terms.
30963  */
30964 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
30965 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
30966 /*
30967  * CDDL HEADER START
30968  *
30969  * The contents of this file are subject to the terms of the
30970  * Common Development and Distribution License, Version 1.0 only
30971  * (the "License").  You may not use this file except in compliance
30972  * with the License.
30973  *
30974  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30975  * or http://www.opensolaris.org/os/licensing.
30976  * See the License for the specific language governing permissions
30977  * and limitations under the License.
30978  *
30979  * When distributing Covered Code, include this CDDL HEADER in each
30980  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30981  * If applicable, add the following below this CDDL HEADER, with the
30982  * fields enclosed by brackets "[]" replaced with your own identifying
30983  * information: Portions Copyright [yyyy] [name of copyright owner]
30984  *
30985  * CDDL HEADER END
30986  */
30987 /*
30988  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30989  */
30990 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30991 /*	  All Rights Reserved  	*/
30992 # 40 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
30993 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
30994 /*
30995  * CDDL HEADER START
30996  *
30997  * The contents of this file are subject to the terms of the
30998  * Common Development and Distribution License (the "License").
30999  * You may not use this file except in compliance with the License.
31000  *
31001  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31002  * or http://www.opensolaris.org/os/licensing.
31003  * See the License for the specific language governing permissions
31004  * and limitations under the License.
31005  *
31006  * When distributing Covered Code, include this CDDL HEADER in each
31007  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31008  * If applicable, add the following below this CDDL HEADER, with the
31009  * fields enclosed by brackets "[]" replaced with your own identifying
31010  * information: Portions Copyright [yyyy] [name of copyright owner]
31011  *
31012  * CDDL HEADER END
31013  */
31014 
31015 /*
31016  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31017  * Use is subject to license terms.
31018  */
31019 
31020 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
31021 /* All Rights Reserved */
31022 # 41 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
31023 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
31024 /*
31025  * CDDL HEADER START
31026  *
31027  * The contents of this file are subject to the terms of the
31028  * Common Development and Distribution License (the "License").
31029  * You may not use this file except in compliance with the License.
31030  *
31031  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31032  * or http://www.opensolaris.org/os/licensing.
31033  * See the License for the specific language governing permissions
31034  * and limitations under the License.
31035  *
31036  * When distributing Covered Code, include this CDDL HEADER in each
31037  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31038  * If applicable, add the following below this CDDL HEADER, with the
31039  * fields enclosed by brackets "[]" replaced with your own identifying
31040  * information: Portions Copyright [yyyy] [name of copyright owner]
31041  *
31042  * CDDL HEADER END
31043  */
31044 
31045 /*
31046  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
31047  * Use is subject to license terms.
31048  */
31049 # 42 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
31050 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
31051 /*
31052  * CDDL HEADER START
31053  *
31054  * The contents of this file are subject to the terms of the
31055  * Common Development and Distribution License (the "License").
31056  * You may not use this file except in compliance with the License.
31057  *
31058  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31059  * or http://www.opensolaris.org/os/licensing.
31060  * See the License for the specific language governing permissions
31061  * and limitations under the License.
31062  *
31063  * When distributing Covered Code, include this CDDL HEADER in each
31064  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31065  * If applicable, add the following below this CDDL HEADER, with the
31066  * fields enclosed by brackets "[]" replaced with your own identifying
31067  * information: Portions Copyright [yyyy] [name of copyright owner]
31068  *
31069  * CDDL HEADER END
31070  */
31071 
31072 /*
31073  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
31074  * Use is subject to license terms.
31075  */
31076 
31077 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
31078 /* All Rights Reserved */
31079 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
31080 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
31081 /*
31082  * CDDL HEADER START
31083  *
31084  * The contents of this file are subject to the terms of the
31085  * Common Development and Distribution License (the "License").
31086  * You may not use this file except in compliance with the License.
31087  *
31088  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31089  * or http://www.opensolaris.org/os/licensing.
31090  * See the License for the specific language governing permissions
31091  * and limitations under the License.
31092  *
31093  * When distributing Covered Code, include this CDDL HEADER in each
31094  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31095  * If applicable, add the following below this CDDL HEADER, with the
31096  * fields enclosed by brackets "[]" replaced with your own identifying
31097  * information: Portions Copyright [yyyy] [name of copyright owner]
31098  *
31099  * CDDL HEADER END
31100  */
31101 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31102 /*	  All Rights Reserved  	*/
31103 
31104 
31105 /*
31106  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31107  * Use is subject to license terms.
31108  *
31109  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
31110  * Copyright 2016 Joyent, Inc.
31111  */
31112 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
31113 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
31114 /*
31115  * CDDL HEADER START
31116  *
31117  * The contents of this file are subject to the terms of the
31118  * Common Development and Distribution License (the "License").
31119  * You may not use this file except in compliance with the License.
31120  *
31121  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31122  * or http://www.opensolaris.org/os/licensing.
31123  * See the License for the specific language governing permissions
31124  * and limitations under the License.
31125  *
31126  * When distributing Covered Code, include this CDDL HEADER in each
31127  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31128  * If applicable, add the following below this CDDL HEADER, with the
31129  * fields enclosed by brackets "[]" replaced with your own identifying
31130  * information: Portions Copyright [yyyy] [name of copyright owner]
31131  *
31132  * CDDL HEADER END
31133  */
31134 
31135 /*
31136  * Copyright (c) 2013 Gary Mills
31137  *
31138  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
31139  * Use is subject to license terms.
31140  */
31141 
31142 /*	Copyright (c) 1988 AT&T	*/
31143 /*	  All Rights Reserved  	*/
31144 # 40 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
31145 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
31146 /*
31147  * CDDL HEADER START
31148  *
31149  * The contents of this file are subject to the terms of the
31150  * Common Development and Distribution License (the "License").
31151  * You may not use this file except in compliance with the License.
31152  *
31153  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31154  * or http://www.opensolaris.org/os/licensing.
31155  * See the License for the specific language governing permissions
31156  * and limitations under the License.
31157  *
31158  * When distributing Covered Code, include this CDDL HEADER in each
31159  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31160  * If applicable, add the following below this CDDL HEADER, with the
31161  * fields enclosed by brackets "[]" replaced with your own identifying
31162  * information: Portions Copyright [yyyy] [name of copyright owner]
31163  *
31164  * CDDL HEADER END
31165  */
31166 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31167 /*	  All Rights Reserved  	*/
31168 
31169 /*
31170  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
31171  * Use is subject to license terms.
31172  */
31173 # 41 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
31174 
31175 /* Settings for procedure scripts */
31176 
31177 
31178 
31179 
31180 
31181 
31182 /* Settings for class action scripts */
31183 
31184 
31185 
31186 
31187 
31188 /* Settings for non-privileged scripts */
31189 # 64 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
31190 /* Settings for admin "rscriptalt" option */
31191 # 80 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
31192 /* Additional cfent/cfextra codes. */
31193 
31194 
31195 
31196 /* This holds admin file data. */
31197 struct admin {
31198  char *mail;
31199  char *instance;
31200  char *partial;
31201  char *runlevel;
31202  char *idepend;
31203  char *rdepend;
31204  char *space;
31205  char *setuid;
31206  char *conflict;
31207  char *action;
31208  char *networktimeout;
31209  char *networkretries;
31210  char *authentication;
31211  char *keystore;
31212  char *proxy;
31213  char *basedir;
31214  char *rscriptalt;
31215 };
31216 
31217 /*
31218  * This table details the status of all filesystems available to the target
31219  * host.
31220  */
31221 struct fstable {
31222  char *name; /* name of filesystem, (mount point) */
31223  int namlen; /* The length of the name (mountpoint) */
31224  fsblkcnt_t bsize; /* fundamental file system block size */
31225  fsblkcnt_t frsize; /* file system fragment size */
31226  fsblkcnt_t bfree; /* total # of free blocks */
31227  fsblkcnt_t bused; /* total # of used blocks */
31228  fsblkcnt_t ffree; /* total # of free file nodes */
31229  fsblkcnt_t fused; /* total # of used file nodes */
31230  char *fstype; /* type of filesystem - nfs, lo, ... */
31231  char *remote_name; /* client's mounted filesystem */
31232  unsigned writeable:1; /* access permission */
31233  unsigned write_tested:1; /* access permission fully tested */
31234  unsigned remote:1; /* on a remote filesystem */
31235  unsigned mounted:1; /* actually mounted right now */
31236  unsigned srvr_map:1; /* use server_map() */
31237  unsigned cl_mounted:1; /* mounted in client space */
31238  unsigned mnt_failed:1; /* attempt to loopback mount failed */
31239  unsigned served:1; /* filesystem comes from a server */
31240 };
31241 # 43 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
31242 
31243 
31244 
31245 
31246 
31247 /* signal handler function definition */
31248 
31249 typedef void (sighdlrFunc_t)(int);
31250 
31251 /* maximum parameter length */
31252 
31253 
31254 
31255 /* flag for check_applicability */
31256 
31257 typedef unsigned long CAF_T;
31258 
31259 /* flags for check_applicability */
31260 
31261 
31262 
31263 
31264 
31265 /* path to the request file in the package directory */
31266 
31267 
31268 
31269 /* path to the copyright file in the package directory */
31270 
31271 
31272 
31273 /* path to the depend file in the package directory */
31274 
31275 
31276 
31277 /*
31278  * name of environment variable set to non-global zone name being installed:
31279  * pkgadd/pkginstall expects this name and passes it on to any scripts that
31280  * are run if it is set.
31281  */
31282 
31283 
31284 
31285 /*
31286  * name of environment variable set to indicate this package should be installed
31287  * in the current zone only - see PSARC/2004/789 - New Pkginfo(4) attributes
31288  * for zones
31289  */
31290 
31291 
31292 
31293 /*
31294  * name of environment variable set to indicate this package should be installed
31295  * in all zones, and only from the global zone - see PSARC/2003/460
31296  */
31297 
31298 
31299 
31300 /*
31301  * name of environment variable set to indicate this package should be installed
31302  * hollow (db update only) when installed in nonglobal zone - see PSARC/2003/460
31303  */
31304 
31305 
31306 
31307 /*
31308  * General purpose return codes used for functions which don't return a basic
31309  * success or failure. For those functions wherein a yes/no result is
31310  * possible, then 1 means OK and 0 means FAIL.
31311  */
31312 
31313 
31314 
31315 
31316 /* These are the file status indicators for the contents file */
31317 # 128 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
31318 /* control bits for pkgdbmerg() */
31319 
31320 
31321 
31322 /* control bits for file verification by class */
31323 
31324 
31325 
31326 
31327 /* control bit for path type to pass to CAS */
31328 
31329 
31330 
31331 /* findscripts() argument */
31332 
31333 
31334 
31335 struct cl_attr {
31336  char name[64 +1]; /* name of class */
31337  char *inst_script; /* install class action script */
31338  char *rem_script; /* remove class action script */
31339  unsigned src_verify:3; /* source verification level */
31340  unsigned dst_verify:4; /* destination verification level */
31341  unsigned relpath_2_CAS:1; /* CAS gets relative paths */
31342 };
31343 
31344 
31345 
31346 
31347 
31348 
31349 
31350 /* Common quit declaration used across many package commands */
31351 extern void quit(int) __attribute__((__noreturn__));
31352 
31353 
31354 /* listmgr.c */
31355 extern int bl_create (int count_per_block, int struct_size, char *desc);
31356 
31357 extern char *bl_next_avail (int list_handle);
31358 extern char *bl_get_record (int list_handle, int recno);
31359 extern void bl_free (int list_handle);
31360 extern int ar_create (int count_per_block, int struct_size, char *desc);
31361 
31362 extern char **ar_next_avail (int list_handle);
31363 extern char **ar_get_head (int list_handle);
31364 extern int ar_delete (int list_handle, int index);
31365 extern void ar_free (int list_handle);
31366 
31367 /* doulimit.c */
31368 extern int set_ulimit (char *script, char *err_msg);
31369 extern int clr_ulimit (void);
31370 extern int assign_ulimit (char *fslimit);
31371 
31372 /* dryrun.c */
31373 extern void set_continue_not_ok (void);
31374 extern int continue_is_ok (void);
31375 extern int in_dryrun_mode (void);
31376 extern int in_continue_mode (void);
31377 extern void init_dryrunfile (char *dr_dir);
31378 extern void init_contfile (char *cn_dir);
31379 extern void set_dr_exitmsg (char *value);
31380 extern void set_dr_info (int type, int value);
31381 extern void write_dryrun_file (struct cfextra **extlist);
31382 
31383 /* instvol.c */
31384 extern void regfiles_free (void);
31385 
31386 /* lockinst.c */
31387 extern int lockinst (char *util_name, char *pkg_name, char *place);
31388 extern void lockupd (char *place);
31389 extern void unlockinst (void);
31390 
31391 extern char *pathdup (char *s);
31392 extern char *pathalloc (int n);
31393 extern char *fixpath (char *path);
31394 extern char *get_info_basedir (void);
31395 extern char *get_basedir (void);
31396 extern char *get_client_basedir (void);
31397 extern int set_basedirs (int reloc, char *adm_basedir, char *pkginst, int nointeract);
31398 
31399 extern int eval_path (char **server_ptr, char **client_ptr, char **map_ptr, char *path);
31400 
31401 extern int get_orig_offset (void);
31402 extern char *get_inst_root (void);
31403 extern char *get_mount_point (uint32_t n);
31404 extern char *get_remote_path (uint32_t n);
31405 extern void set_env_cbdir (void);
31406 extern int set_inst_root (char *path);
31407 extern void put_path_params (void);
31408 extern int mkpath (char *p);
31409 extern void mkbasedir (int flag, char *path);
31410 extern int is_an_inst_root (void);
31411 extern int is_a_basedir (void);
31412 extern int is_a_cl_basedir (void);
31413 extern int is_relocatable (void);
31414 extern char *orig_path (char *path);
31415 extern char *orig_path_ptr (char *path);
31416 extern char *qreason (int caller, int retcode, int started, int includeZonename);
31417 
31418 extern char *qstrdup (char *s);
31419 extern char *srcpath (char *d, char *p, int part, int nparts);
31420 extern char *trans_srcp_pi (char *local_path);
31421 extern int copyf (char *from, char *to, time_t mytime);
31422 extern int copyFile (int, int, char *, char *, struct stat *, long);
31423 extern int openLocal (char *a_path, int a_oflag, char *a_tmpdir);
31424 extern int dockdeps (char *depfile, int removeFlag, boolean_t a_preinstallCheck);
31425 
31426 extern int finalck (struct cfent *ept, int attrchg, int contchg, boolean_t a_warning);
31427 
31428 
31429 /* dockdeps.c */
31430 extern void setUpdate (void);
31431 extern int isUpdate (void);
31432 
31433 /* mntinfo.c */
31434 extern int get_mntinfo (int map_client, char *vfstab_file);
31435 extern uint32_t fsys (char *path);
31436 extern struct fstable *get_fs_entry (uint32_t n);
31437 extern int mount_client (void);
31438 extern int unmount_client (void);
31439 extern uint32_t resolved_fsys (char *path);
31440 extern char *get_server_host (uint32_t n);
31441 extern char *server_map (char *path, uint32_t fsys_value);
31442 extern int use_srvr_map (char *path, uint32_t *fsys_value);
31443 extern int use_srvr_map_n (uint32_t n);
31444 extern int is_fs_writeable (char *path, uint32_t *fsys_value);
31445 extern int is_remote_fs (char *path, uint32_t *fsys_value);
31446 extern int is_served (char *path, uint32_t *fsys_value);
31447 extern int is_mounted (char *path, uint32_t *fsys_value);
31448 extern int is_fs_writeable_n (uint32_t n);
31449 extern int is_remote_fs_n (uint32_t n);
31450 extern int is_served_n (uint32_t n);
31451 extern int is_mounted_n (uint32_t n);
31452 extern fsblkcnt_t get_blk_size_n (uint32_t n);
31453 extern fsblkcnt_t get_frag_size_n (uint32_t n);
31454 extern fsblkcnt_t get_blk_used_n (uint32_t n);
31455 extern fsblkcnt_t get_blk_free_n (uint32_t n);
31456 extern fsblkcnt_t get_inode_used_n (uint32_t n);
31457 extern fsblkcnt_t get_inode_free_n (uint32_t n);
31458 extern void set_blk_used_n (uint32_t n, fsblkcnt_t value);
31459 extern char *get_source_name_n (uint32_t n);
31460 extern char *get_fs_name_n (uint32_t n);
31461 extern int load_fsentry (struct fstable *fs_entry, char *name, char *fstype, char *remote_name);
31462 
31463 extern int isreloc (char *pkginstdir);
31464 extern int is_local_host (char *hostname);
31465 extern void fs_tab_free (void);
31466 
31467 /* pkgdbmerg.c */
31468 extern int pkgdbmerg (PKGserver server, VFP_T *tmpvfp, struct cfextra **extlist);
31469 
31470 extern int files_installed (void);
31471 
31472 /* ocfile.c */
31473 extern int trunc_tcfile (int fd);
31474 extern int ocfile (PKGserver *serverp, VFP_T **tmpvfp, fsblkcnt_t map_blks);
31475 
31476 extern int swapcfile (PKGserver server, VFP_T **a_tmpvfp, char *pkginst, int dbchg);
31477 
31478 extern int set_cfdir (char *cfdir);
31479 extern int socfile (PKGserver *server, boolean_t quiet);
31480 extern int relslock (void);
31481 extern int pkgWlock (int verbose);
31482 extern int iscfile (void);
31483 extern int vcfile (void);
31484 
31485 extern fsblkcnt_t nblk (fsblkcnt_t size, ulong_t bsize, ulong_t frsize);
31486 
31487 extern struct cfent **procmap (VFP_T *vfp, int mapflag, char *ir);
31488 extern void repl_cfent (struct cfent *new, struct cfent *old);
31489 extern struct cfextra **pkgobjmap (VFP_T *vfp, int mapflag, char *ir);
31490 extern void pkgobjinit (void);
31491 extern int seed_pkgobjmap (struct cfextra *ext_entry, char *path, char *local);
31492 
31493 extern int init_pkgobjspace (void);
31494 
31495 /* eptstat.c */
31496 extern void pinfo_free (void);
31497 extern struct pinfo *eptstat (struct cfent *entry, char *pkg, char c);
31498 
31499 /* echo.c */
31500 /*PRINTFLIKE1*/
31501 extern void echo (char *a_fmt, ...);
31502 /*PRINTFLIKE1*/
31503 extern void echoDebug (char *a_fmt, ...);
31504 extern boolean_t echoGetFlag (void);
31505 extern boolean_t echoDebugGetFlag (void);
31506 extern boolean_t echoSetFlag (boolean_t a_debugFlag);
31507 extern boolean_t echoDebugSetFlag (boolean_t a_debugFlag);
31508 
31509 /* ptext.c */
31510 /*PRINTFLIKE2*/
31511 extern void ptext (FILE *fp, char *fmt, ...);
31512 
31513 /* putparam.c */
31514 extern void putparam (char *param, char *value);
31515 extern void getuserlocale (void);
31516 extern void putuserlocale (void);
31517 extern void putConditionInfo (char *, char *);
31518 
31519 /* setadmin.c */
31520 extern void setadminFile (char *file);
31521 extern char *setadminSetting (char *a_paramName, char *a_paramValue);
31522 
31523 extern char *set_keystore_admin (void);
31524 extern boolean_t get_proxy_port_admin (char **, ushort_t *);
31525 extern boolean_t check_keystore_admin (char **);
31526 extern int web_ck_retries (void);
31527 extern int web_ck_timeout (void);
31528 extern int web_ck_authentication (void);
31529 
31530 /* setlist.c */
31531 extern char *cl_iscript (int idx);
31532 extern char *cl_rscript (int idx);
31533 extern void find_CAS (int CAS_type, char *bin_ptr, char *inst_ptr);
31534 extern int setlist (struct cl_attr ***plist, char *slist);
31535 extern void addlist (struct cl_attr ***plist, char *item);
31536 extern char *cl_nam (int cl_idx);
31537 extern char *flex_device(char *device_name, int dev_ok);
31538 extern int cl_getn (void);
31539 extern int cl_idx (char *cl_nam);
31540 extern void cl_sets (char *slist);
31541 extern void cl_setl (struct cl_attr **cl_lst);
31542 extern void cl_putl (char *parm_name, struct cl_attr **list);
31543 extern int cl_deliscript (int i);
31544 extern unsigned cl_svfy (int i);
31545 extern unsigned cl_dvfy (int i);
31546 extern unsigned cl_pthrel (int i);
31547 
31548 /* passwd.c */
31549 extern int pkg_passphrase_cb (char *, int, int, void *);
31550 extern void set_passarg (char *);
31551 extern void set_prompt (char *);
31552 
31553 /* fixpath.c */
31554 extern void export_client_env(char *);
31555 extern void set_partial_inst(void);
31556 extern int is_partial_inst(void);
31557 extern void set_depend_pkginfo_DB(boolean_t a_setting);
31558 extern boolean_t is_depend_pkginfo_DB(void);
31559 extern void disable_spool_create(void);
31560 extern int is_spool_create(void);
31561 
31562 /* open_package_datastream.c */
31563 extern boolean_t open_package_datastream(int a_argc, char **a_argv,
31564     char *a_spoolto, char *a_device,
31565     int *r_repeat, char **r_idsName,
31566     char *a_tmpdir, struct pkgdev *a_pkgdev,
31567     int a_optind);
31568 
31569 /* setup_temporary_directory.c */
31570 extern boolean_t setup_temporary_directory(char **r_dirname,
31571     char *a_tmpdir, char *a_suffix);
31572 
31573 /* unpack_package_from_stream.c */
31574 extern boolean_t unpack_package_from_stream(char *a_idsName,
31575     char *a_pkginst, char *a_tempDir);
31576 
31577 /* pkgops.c */
31578 
31579 extern boolean_t pkgAddPackageToGzonlyList(char *a_pkgInst,
31580     char *a_rootPath);
31581 extern void pkgAddThisZonePackage(char *a_pkgInst);
31582 extern boolean_t pkgRemovePackageFromGzonlyList(char *a_rootPath,
31583     char *a_pkgInst);
31584 extern FILE *pkgOpenInGzOnlyFile(char *a_rootPath);
31585 extern void pkginfoFree(struct pkginfo **r_info);
31586 extern boolean_t pkginfoIsPkgInstalled(struct pkginfo **r_pinfo,
31587     char *a_pkgInst);
31588 extern boolean_t pkgIsPkgInGzOnly(char *a_rootPath, char *a_pkgInst);
31589 extern boolean_t pkgIsPkgInGzOnlyFP(FILE *a_fp, char *a_pkgInst);
31590 extern boolean_t pkginfoParamTruth(FILE *a_fp, char *a_param,
31591     char *a_value, boolean_t a_default);
31592 extern int pkgGetPackageList(char ***r_pkgList, char **a_argv,
31593     int a_optind, char *a_categories,
31594     char **a_categoryList, struct pkgdev *a_pkgdev);
31595 extern void pkgLocateHighestInst(char *r_path, int r_pathLen,
31596     char *r_pkgInst, int r_pkgInstLen,
31597     char *a_rootPath, char *a_pkgInst);
31598 extern boolean_t pkgPackageIsThisZone(char *a_pkgInst);
31599 extern char *pkgGetGzOnlyPath(void);
31600 extern boolean_t pkgTestInstalled(char *a_packageName, char *a_rootPath);
31601 
31602 /* depchk.c */
31603 
31604 struct depckErrorRecord {
31605  int ier_numZones;
31606  char *ier_packageName;
31607  char **ier_zones;
31608  char **ier_values;
31609 };
31610 
31611 typedef struct depckErrorRecord depckErrorRecord_t;
31612 
31613 struct depckError {
31614  int er_numEntries;
31615  depckErrorRecord_t *er_theEntries;
31616 };
31617 
31618 typedef struct depckError depckError_t;
31619 
31620 typedef int (depcklFunc_t)(char *a_msg, char *a_pkg);
31621 
31622 /*
31623  * ignore_values:
31624  *	== NULL - record one message for each instance of "name" found
31625  *	== "" - record multiple instances
31626  *	!= "" - record multiple instances if value not in ignore_values
31627  */
31628 
31629 struct depckl_struct {
31630  char *name;
31631  char *ignore_values;
31632  char **err_msg;
31633  depcklFunc_t *depcklFunc;
31634  depckError_t *record;
31635 };
31636 
31637 typedef struct depckl_struct depckl_t;
31638 
31639 extern int depchkReportErrors(depckl_t *depckl);
31640 extern void depchkRecordError(depckError_t *a_erc,
31641     char *a_pkginst, char *a_zoneName,
31642     char *a_value);
31643 
31644 /* log.c */
31645 
31646 /* types of log messages we recognize */
31647 typedef enum {
31648  LOG_MSG_ERR,
31649  LOG_MSG_WRN,
31650  LOG_MSG_INFO,
31651  LOG_MSG_DEBUG
31652 } LogMsgType;
31653 
31654 /*PRINTFLIKE2*/
31655 extern void log_msg(LogMsgType, const char *, ...);
31656 extern void log_set_verbose(boolean_t);
31657 extern boolean_t log_get_verbose(void);
31658 
31659 /*
31660  * typedef for the 'ckreturn' function
31661  */
31662 typedef void (ckreturnFunc_t)(int a_retcode);
31663 
31664 /* sml.c */
31665 
31666 /* null reference to SML_TAG object */
31667 
31668 
31669 
31670 /* null reference to SML_TAG * object */
31671 
31672 
31673 
31674 /* is reference to SML_TAG object valid? */
31675 
31676 
31677 
31678 /* is indirect reference to SML_TAG object valid? */
31679 
31680 
31681 
31682 
31683 /* definitions for sml passed from pkginstall to pkgcond */
31684 # 505 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
31685 typedef struct _sml_tag_struct SML_TAG;
31686 typedef struct _sml_parameter_struct SML_PARAM;
31687 
31688 struct _sml_tag_struct {
31689  char *name; /* tag name */
31690  int params_num; /* # params in *params */
31691  SML_PARAM *params; /* tag parameters */
31692  int tags_num; /* # subtags in *tags */
31693  SML_TAG *tags; /* tag subtags */
31694 };
31695 
31696 struct _sml_parameter_struct {
31697  char *name; /* tag name */
31698  char *value; /* parameters */
31699 };
31700 
31701 SML_TAG *smlAddTag(SML_TAG **r_tag, int a_index,
31702    SML_TAG *a_subTag);
31703 boolean_t smlFstatCompareEq(struct stat *statbuf,
31704     SML_TAG *tag, char *path);
31705 char *smlConvertTagToString(SML_TAG *tag);
31706 /*PRINTFLIKE2*/
31707 void smlDbgPrintTag(SML_TAG *a_tag, char *a_format, ...);
31708 void smlDelTag(SML_TAG *tag, SML_TAG *sub_tag);
31709 void smlDelParam(SML_TAG *tag, char *name);
31710 SML_TAG *smlDup(SML_TAG *tag);
31711 boolean_t smlFindAndDelTag(SML_TAG *tag, char *findTag);
31712 void smlFreeTag(SML_TAG *tag);
31713 char *smlGetElementName(SML_TAG *a_tag);
31714 int smlGetNumParams(SML_TAG *a_tag);
31715 char *smlGetParam(SML_TAG *tag, char *name);
31716 /*PRINTFLIKE2*/
31717 char *smlGetParamF(SML_TAG *tag, char *format, ...);
31718 void smlGetParam_r(SML_TAG *tag, char *name, char *buf,
31719    int bufLen);
31720 char *smlGetParamByTag(SML_TAG *tag, int index,
31721    char *tagName, char *parmName);
31722 char *smlGetParamByTagParam(SML_TAG *tag, int index,
31723    char *tagName, char *parmName, char *parmValue,
31724    char *parmReturn);
31725 char *smlGetParamName(SML_TAG *tag, int index);
31726 SML_TAG *smlGetTag(SML_TAG *tag, int index);
31727 SML_TAG *smlGetTagByName(SML_TAG *tag, int index, char *name);
31728 SML_TAG *smlGetTagByTagParam(SML_TAG *tag, int index,
31729    char *tagName, char *paramName, char *paramValue);
31730 boolean_t smlGetVerbose(void);
31731 int smlLoadTagFromFile(SML_TAG **r_tag, char *a_fileName);
31732 SML_TAG *smlNewTag(char *name);
31733 boolean_t smlParamEq(SML_TAG *tag, char *findTag,
31734    char *findParam, char *str);
31735 /*PRINTFLIKE4*/
31736 boolean_t smlParamEqF(SML_TAG *tag, char *findTag, char *findParam,
31737    char *format, ...);
31738 void smlPrintTag(SML_TAG *tag);
31739 int smlReadOneTag(SML_TAG **r_tag, char *a_str);
31740 int smlConvertStringToTag(SML_TAG **r_tag, char *str);
31741 void smlSetFileStatInfo(SML_TAG **tag,
31742     struct stat *statbuf, char *path);
31743 void smlSetParam(SML_TAG *tag, char *name, char *value);
31744 /*PRINTFLIKE3*/
31745 void smlSetParamF(SML_TAG *tag, char *name, char *format, ...);
31746 void smlSetVerbose(boolean_t a_setting);
31747 int smlWriteTagToFd(SML_TAG *tag, int fd);
31748 int smlWriteTagToFile(SML_TAG *tag, char *filename);
31749 /*PRINTFLIKE3*/
31750 void sml_strPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
31751 /*PRINTFLIKE1*/
31752 char *sml_strPrintf(char *a_format, ...);
31753 char *sml_XmlEncodeString(char *a_plainTextString);
31754 char *sml_XmlDecodeString(char *a_xmlEncodedString);
31755 # 67 "unpack_package_from_stream.c" 2
31756 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 1
31757 /*
31758  * CDDL HEADER START
31759  *
31760  * The contents of this file are subject to the terms of the
31761  * Common Development and Distribution License (the "License").
31762  * You may not use this file except in compliance with the License.
31763  *
31764  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31765  * or http://www.opensolaris.org/os/licensing.
31766  * See the License for the specific language governing permissions
31767  * and limitations under the License.
31768  *
31769  * When distributing Covered Code, include this CDDL HEADER in each
31770  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31771  * If applicable, add the following below this CDDL HEADER, with the
31772  * fields enclosed by brackets "[]" replaced with your own identifying
31773  * information: Portions Copyright [yyyy] [name of copyright owner]
31774  *
31775  * CDDL HEADER END
31776  */
31777 
31778 /*
31779  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
31780  * Use is subject to license terms.
31781  */
31782 
31783 
31784 
31785 
31786 
31787 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
31788 /*
31789  * CDDL HEADER START
31790  *
31791  * The contents of this file are subject to the terms of the
31792  * Common Development and Distribution License (the "License").
31793  * You may not use this file except in compliance with the License.
31794  *
31795  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31796  * or http://www.opensolaris.org/os/licensing.
31797  * See the License for the specific language governing permissions
31798  * and limitations under the License.
31799  *
31800  * When distributing Covered Code, include this CDDL HEADER in each
31801  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31802  * If applicable, add the following below this CDDL HEADER, with the
31803  * fields enclosed by brackets "[]" replaced with your own identifying
31804  * information: Portions Copyright [yyyy] [name of copyright owner]
31805  *
31806  * CDDL HEADER END
31807  */
31808 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31809 /*	  All Rights Reserved  	*/
31810 
31811 
31812 /*
31813  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31814  * Use is subject to license terms.
31815  *
31816  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
31817  * Copyright 2016 Joyent, Inc.
31818  */
31819 # 32 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
31820 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h" 1
31821 /*
31822  * CDDL HEADER START
31823  *
31824  * The contents of this file are subject to the terms of the
31825  * Common Development and Distribution License (the "License").
31826  * You may not use this file except in compliance with the License.
31827  *
31828  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31829  * or http://www.opensolaris.org/os/licensing.
31830  * See the License for the specific language governing permissions
31831  * and limitations under the License.
31832  *
31833  * When distributing Covered Code, include this CDDL HEADER in each
31834  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31835  * If applicable, add the following below this CDDL HEADER, with the
31836  * fields enclosed by brackets "[]" replaced with your own identifying
31837  * information: Portions Copyright [yyyy] [name of copyright owner]
31838  *
31839  * CDDL HEADER END
31840  */
31841 
31842 /*
31843  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
31844  *
31845  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31846  * Use is subject to license terms.
31847  * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
31848  * Copyright 2016 Toomas Soome <tsoome@me.com>
31849  */
31850 
31851 
31852 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31853 /*	  All Rights Reserved  	*/
31854 
31855 
31856 
31857 
31858 
31859 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 1
31860 /*
31861  * CDDL HEADER START
31862  *
31863  * The contents of this file are subject to the terms of the
31864  * Common Development and Distribution License (the "License").
31865  * You may not use this file except in compliance with the License.
31866  *
31867  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31868  * or http://www.opensolaris.org/os/licensing.
31869  * See the License for the specific language governing permissions
31870  * and limitations under the License.
31871  *
31872  * When distributing Covered Code, include this CDDL HEADER in each
31873  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31874  * If applicable, add the following below this CDDL HEADER, with the
31875  * fields enclosed by brackets "[]" replaced with your own identifying
31876  * information: Portions Copyright [yyyy] [name of copyright owner]
31877  *
31878  * CDDL HEADER END
31879  */
31880 
31881 /*
31882  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31883  * Use is subject to license terms.
31884  */
31885 
31886 
31887 
31888 
31889 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
31890 /*
31891  * CDDL HEADER START
31892  *
31893  * The contents of this file are subject to the terms of the
31894  * Common Development and Distribution License (the "License").
31895  * You may not use this file except in compliance with the License.
31896  *
31897  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31898  * or http://www.opensolaris.org/os/licensing.
31899  * See the License for the specific language governing permissions
31900  * and limitations under the License.
31901  *
31902  *
31903  * When distributing Covered Code, include this CDDL HEADER in each
31904  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31905  * If applicable, add the following below this CDDL HEADER, with the
31906  * fields enclosed by brackets "[]" replaced with your own identifying
31907  * information: Portions Copyright [yyyy] [name of copyright owner]
31908  *
31909  * CDDL HEADER END
31910  */
31911 
31912 /*
31913  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
31914  * Use is subject to license terms.
31915  * Copyright 2016 Joyent, Inc.
31916  */
31917 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
31918 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 1
31919 /*
31920  * CDDL HEADER START
31921  *
31922  * The contents of this file are subject to the terms of the
31923  * Common Development and Distribution License (the "License").
31924  * You may not use this file except in compliance with the License.
31925  *
31926  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31927  * or http://www.opensolaris.org/os/licensing.
31928  * See the License for the specific language governing permissions
31929  * and limitations under the License.
31930  *
31931  * When distributing Covered Code, include this CDDL HEADER in each
31932  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31933  * If applicable, add the following below this CDDL HEADER, with the
31934  * fields enclosed by brackets "[]" replaced with your own identifying
31935  * information: Portions Copyright [yyyy] [name of copyright owner]
31936  *
31937  * CDDL HEADER END
31938  */
31939 /*
31940  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
31941  * Use is subject to license terms.
31942  * Copyright 2015 Nexenta Systems, Inc.
31943  */
31944 
31945 
31946 
31947 
31948 #pragma ident "%Z%%M%	%I%	%E% SMI"
31949 
31950 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
31951 /*
31952  * CDDL HEADER START
31953  *
31954  * The contents of this file are subject to the terms of the
31955  * Common Development and Distribution License, Version 1.0 only
31956  * (the "License").  You may not use this file except in compliance
31957  * with the License.
31958  *
31959  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31960  * or http://www.opensolaris.org/os/licensing.
31961  * See the License for the specific language governing permissions
31962  * and limitations under the License.
31963  *
31964  * When distributing Covered Code, include this CDDL HEADER in each
31965  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31966  * If applicable, add the following below this CDDL HEADER, with the
31967  * fields enclosed by brackets "[]" replaced with your own identifying
31968  * information: Portions Copyright [yyyy] [name of copyright owner]
31969  *
31970  * CDDL HEADER END
31971  */
31972 /*
31973  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
31974  *
31975  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
31976  * Use is subject to license terms.
31977  */
31978 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 2
31979 
31980 
31981 
31982 
31983 
31984 /*
31985  * Interoperability types for programs. Used for:
31986  *
31987  * Crossing between 32-bit and 64-bit domains.
31988  *
31989  * On disk data formats such as filesystem meta data
31990  * and disk label.
31991  *
31992  * Note: Applications should never include this
31993  *       header file.
31994  */
31995 typedef uint32_t caddr32_t;
31996 typedef int32_t daddr32_t;
31997 typedef int32_t off32_t;
31998 typedef uint32_t ino32_t;
31999 typedef int32_t blkcnt32_t;
32000 typedef uint32_t fsblkcnt32_t;
32001 typedef uint32_t fsfilcnt32_t;
32002 typedef int32_t id32_t;
32003 typedef uint32_t major32_t;
32004 typedef uint32_t minor32_t;
32005 typedef int32_t key32_t;
32006 typedef uint32_t mode32_t;
32007 typedef uint32_t uid32_t;
32008 typedef uint32_t gid32_t;
32009 typedef uint32_t nlink32_t;
32010 typedef uint32_t dev32_t;
32011 typedef int32_t pid32_t;
32012 typedef uint32_t size32_t;
32013 typedef int32_t ssize32_t;
32014 typedef int32_t time32_t;
32015 typedef int32_t clock32_t;
32016 typedef uint32_t uintptr32_t;
32017 typedef int32_t intptr32_t;
32018 
32019 struct timeval32 {
32020  time32_t tv_sec; /* seconds */
32021  int32_t tv_usec; /* and microseconds */
32022 };
32023 
32024 typedef struct timespec32 {
32025  time32_t tv_sec; /* seconds */
32026  int32_t tv_nsec; /* and nanoseconds */
32027 } timespec32_t;
32028 
32029 typedef struct timespec32 timestruc32_t;
32030 
32031 typedef struct itimerspec32 {
32032  struct timespec32 it_interval;
32033  struct timespec32 it_value;
32034 } itimerspec32_t;
32035 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
32036 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
32037 /*
32038  * CDDL HEADER START
32039  *
32040  * The contents of this file are subject to the terms of the
32041  * Common Development and Distribution License (the "License").
32042  * You may not use this file except in compliance with the License.
32043  *
32044  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32045  * or http://www.opensolaris.org/os/licensing.
32046  * See the License for the specific language governing permissions
32047  * and limitations under the License.
32048  *
32049  *
32050  * When distributing Covered Code, include this CDDL HEADER in each
32051  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32052  * If applicable, add the following below this CDDL HEADER, with the
32053  * fields enclosed by brackets "[]" replaced with your own identifying
32054  * information: Portions Copyright [yyyy] [name of copyright owner]
32055  *
32056  * CDDL HEADER END
32057  */
32058 
32059 /*
32060  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
32061  * Use is subject to license terms.
32062  * Copyright 2016 Joyent, Inc.
32063  */
32064 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
32065 
32066 
32067 
32068 
32069 
32070 /*
32071  * Miscellaneous defines
32072  */
32073 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
32074 /*
32075  * Reserve two cylinders on SCSI disks.
32076  * One is for the backup disk label and the other is for the deviceid.
32077  *
32078  * IPI disks only reserve one cylinder, but they will go away soon.
32079  * CDROMs do not reserve any cylinders.
32080  */
32081 
32082 
32083 /*
32084  * Format of a Sun disk label.
32085  * Resides in cylinder 0, head 0, sector 0.
32086  *
32087  * sizeof (struct dk_label) should be 512 (the current sector size),
32088  * but should the sector size increase, this structure should remain
32089  * at the beginning of the sector.
32090  */
32091 
32092 
32093 
32094 
32095 
32096 
32097 
32098 typedef daddr_t blkaddr_t;
32099 typedef daddr32_t blkaddr32_t;
32100 
32101 
32102 
32103 /*
32104  * partition headers:  section 1
32105  * Returned in struct dk_allmap by ioctl DKIOC[SG]APART (dkio(7I))
32106  */
32107 struct dk_map {
32108  blkaddr_t dkl_cylno; /* starting cylinder */
32109  blkaddr_t dkl_nblk; /* number of blocks;  if == 0, */
32110      /* partition is undefined */
32111 };
32112 
32113 /*
32114  * partition headers:  section 1
32115  * Fixed size for on-disk dk_label
32116  */
32117 struct dk_map32 {
32118  blkaddr32_t dkl_cylno; /* starting cylinder */
32119  blkaddr32_t dkl_nblk; /* number of blocks;  if == 0, */
32120      /* partition is undefined */
32121 };
32122 
32123 /*
32124  * partition headers:  section 2,
32125  * brought over from AT&T SVr4 vtoc structure.
32126  */
32127 struct dk_map2 {
32128  uint16_t p_tag; /* ID tag of partition */
32129  uint16_t p_flag; /* permission flag */
32130 };
32131 
32132 struct dkl_partition {
32133  uint16_t p_tag; /* ID tag of partition */
32134  uint16_t p_flag; /* permision flags */
32135  blkaddr32_t p_start; /* start sector no of partition */
32136  blkaddr32_t p_size; /* # of blocks in partition */
32137 };
32138 
32139 
32140 /*
32141  * VTOC inclusions from AT&T SVr4
32142  * Fixed sized types for on-disk VTOC
32143  */
32144 
32145 struct dk_vtoc {
32146 
32147  uint32_t v_bootinfo[3]; /* info for mboot (unsupported) */
32148  uint32_t v_sanity; /* to verify vtoc sanity */
32149  uint32_t v_version; /* layout version */
32150  char v_volume[8]; /* volume name */
32151  uint16_t v_sectorsz; /* sector size in bytes */
32152  uint16_t v_nparts; /* number of partitions */
32153  uint32_t v_reserved[10]; /* free space */
32154  struct dkl_partition v_part[16]; /* partition headers */
32155  time32_t timestamp[16]; /* partition timestamp (unsupported) */
32156  char v_asciilabel[128]; /* for compatibility    */
32157 # 154 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
32158 };
32159 
32160 /*
32161  * define the amount of disk label padding needed to make
32162  * the entire structure occupy 512 bytes.
32163  */
32164 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
32165 struct dk_label {
32166 
32167  struct dk_vtoc dkl_vtoc; /* vtoc inclusions from AT&T SVr4 */
32168  uint32_t dkl_pcyl; /* # of physical cylinders */
32169  uint32_t dkl_ncyl; /* # of data cylinders */
32170  uint16_t dkl_acyl; /* # of alternate cylinders */
32171  uint16_t dkl_bcyl; /* cyl offset (for fixed head area) */
32172  uint32_t dkl_nhead; /* # of heads */
32173  uint32_t dkl_nsect; /* # of data sectors per track */
32174  uint16_t dkl_intrlv; /* interleave factor */
32175  uint16_t dkl_skew; /* skew factor */
32176  uint16_t dkl_apc; /* alternates per cyl (SCSI only)   */
32177  uint16_t dkl_rpm; /* revolutions per minute */
32178  uint16_t dkl_write_reinstruct; /* # sectors to skip, writes */
32179  uint16_t dkl_read_reinstruct; /* # sectors to skip, reads  */
32180  uint16_t dkl_extra[4]; /* for compatible expansion */
32181  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 */
32182 # 217 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
32183  uint16_t dkl_magic; /* identifies this label format */
32184  uint16_t dkl_cksum; /* xor checksum of sector */
32185 };
32186 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
32187 struct fk_label { /* DOS floppy label */
32188  uchar_t fkl_type;
32189  uchar_t fkl_magich;
32190  uchar_t fkl_magicl;
32191  uchar_t filler;
32192 };
32193 
32194 /*
32195  * Layout of stored fabricated device id  (on-disk)
32196  */
32197 
32198 
32199 
32200 
32201 
32202 struct dk_devid {
32203  uchar_t dkd_rev_hi; /* revision (MSB) */
32204  uchar_t dkd_rev_lo; /* revision (LSB) */
32205  uchar_t dkd_flags; /* flags (not used yet) */
32206  uchar_t dkd_devid[((512) - ((sizeof (uchar_t) * 7)))]; /* devid stored here */
32207  uchar_t dkd_checksum3; /* checksum (MSB) */
32208  uchar_t dkd_checksum2;
32209  uchar_t dkd_checksum1;
32210  uchar_t dkd_checksum0; /* checksum (LSB) */
32211 };
32212 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h" 2
32213 
32214 
32215 
32216 
32217 
32218 /*
32219  *	Note:  the VTOC is not implemented fully, nor in the manner
32220  *	that AT&T implements it.  AT&T puts the vtoc structure
32221  *	into a sector, usually the second sector (pdsector is first).
32222  *
32223  *	Sun incorporates the tag, flag, version, and volume vtoc fields into
32224  *	its Disk Label, which already has some vtoc-equivalent fields.
32225  *	Upon reading the vtoc with read_vtoc(), the following exceptions
32226  *	occur:
32227  *		v_bootinfo [all]	returned as zero
32228  *		v_sanity		returned as VTOC_SANE
32229  *						if Disk Label was sane
32230  *		v_sectorsz		returned as 512
32231  *		v_reserved [all]	retunred as zero
32232  *		timestamp [all]		returned as zero
32233  *
32234  *	See  dklabel.h, read_vtoc(), and write_vtoc().
32235  */
32236 
32237 
32238      /* (from dkio.h) */
32239 
32240 
32241 
32242 
32243 
32244 /*
32245  * Partition identification tags
32246  */
32247 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h"
32248 /* Tags for EFI/GPT labels */
32249 
32250 
32251 
32252 
32253 
32254 
32255 /*
32256  * Partition permission flags
32257  */
32258 
32259 
32260 
32261 /*
32262  * error codes for reading & writing vtoc
32263  */
32264 
32265 
32266 
32267 
32268 
32269 
32270 
32271 struct partition {
32272  ushort_t p_tag; /* ID tag of partition */
32273  ushort_t p_flag; /* permission flags */
32274  daddr_t p_start; /* start sector no of partition */
32275  long p_size; /* # of blocks in partition */
32276 };
32277 
32278 struct vtoc {
32279  unsigned long v_bootinfo[3]; /* info needed by mboot (unsupported) */
32280  unsigned long v_sanity; /* to verify vtoc sanity */
32281  unsigned long v_version; /* layout version */
32282  char v_volume[8]; /* volume name */
32283  ushort_t v_sectorsz; /* sector size in bytes */
32284  ushort_t v_nparts; /* number of partitions */
32285  unsigned long v_reserved[10]; /* free space */
32286  struct partition v_part[16]; /* partition headers */
32287  time_t timestamp[16]; /* partition timestamp (unsupported) */
32288  char v_asciilabel[128]; /* for compatibility */
32289 };
32290 
32291 struct extpartition {
32292  ushort_t p_tag; /* ID tag of partition */
32293  ushort_t p_flag; /* permission flags */
32294  ushort_t p_pad[2];
32295  diskaddr_t p_start; /* start sector no of partition */
32296  diskaddr_t p_size; /* # of blocks in partition */
32297 };
32298 
32299 
32300 struct extvtoc {
32301  uint64_t v_bootinfo[3]; /* info needed by mboot (unsupported) */
32302  uint64_t v_sanity; /* to verify vtoc sanity */
32303  uint64_t v_version; /* layout version */
32304  char v_volume[8]; /* volume name */
32305  ushort_t v_sectorsz; /* sector size in bytes */
32306  ushort_t v_nparts; /* number of partitions */
32307  ushort_t pad[2];
32308  uint64_t v_reserved[10];
32309  struct extpartition v_part[16]; /* partition headers */
32310  uint64_t timestamp[16]; /* partition timestamp (unsupported) */
32311  char v_asciilabel[128]; /* for compatibility */
32312 };
32313 # 334 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h"
32314 /*
32315  * These defines are the mode parameter for the checksum routines.
32316  */
32317 
32318 
32319 
32320 extern int read_vtoc(int, struct vtoc *);
32321 extern int write_vtoc(int, struct vtoc *);
32322 extern int read_extvtoc(int, struct extvtoc *);
32323 extern int write_extvtoc(int, struct extvtoc *);
32324 # 33 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32325 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
32326 /*
32327  * CDDL HEADER START
32328  *
32329  * The contents of this file are subject to the terms of the
32330  * Common Development and Distribution License (the "License").
32331  * You may not use this file except in compliance with the License.
32332  *
32333  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32334  * or http://www.opensolaris.org/os/licensing.
32335  * See the License for the specific language governing permissions
32336  * and limitations under the License.
32337  *
32338  * When distributing Covered Code, include this CDDL HEADER in each
32339  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32340  * If applicable, add the following below this CDDL HEADER, with the
32341  * fields enclosed by brackets "[]" replaced with your own identifying
32342  * information: Portions Copyright [yyyy] [name of copyright owner]
32343  *
32344  * CDDL HEADER END
32345  */
32346 
32347 /*
32348  * Copyright (c) 2013 Gary Mills
32349  *
32350  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
32351  * Use is subject to license terms.
32352  */
32353 
32354 /*	Copyright (c) 1988 AT&T	*/
32355 /*	  All Rights Reserved  	*/
32356 # 34 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32357 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
32358 /*
32359  * CDDL HEADER START
32360  *
32361  * The contents of this file are subject to the terms of the
32362  * Common Development and Distribution License (the "License").
32363  * You may not use this file except in compliance with the License.
32364  *
32365  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32366  * or http://www.opensolaris.org/os/licensing.
32367  * See the License for the specific language governing permissions
32368  * and limitations under the License.
32369  *
32370  * When distributing Covered Code, include this CDDL HEADER in each
32371  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32372  * If applicable, add the following below this CDDL HEADER, with the
32373  * fields enclosed by brackets "[]" replaced with your own identifying
32374  * information: Portions Copyright [yyyy] [name of copyright owner]
32375  *
32376  * CDDL HEADER END
32377  */
32378 
32379 /*
32380  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
32381  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
32382  */
32383 
32384 /*	Copyright (c) 1988 AT&T	*/
32385 /*	  All Rights Reserved  	*/
32386 
32387 /*
32388  * User-visible pieces of the ANSI C standard I/O package.
32389  */
32390 # 35 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32391 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
32392 /*
32393  * CDDL HEADER START
32394  *
32395  * The contents of this file are subject to the terms of the
32396  * Common Development and Distribution License (the "License").
32397  * You may not use this file except in compliance with the License.
32398  *
32399  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32400  * or http://www.opensolaris.org/os/licensing.
32401  * See the License for the specific language governing permissions
32402  * and limitations under the License.
32403  *
32404  * When distributing Covered Code, include this CDDL HEADER in each
32405  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32406  * If applicable, add the following below this CDDL HEADER, with the
32407  * fields enclosed by brackets "[]" replaced with your own identifying
32408  * information: Portions Copyright [yyyy] [name of copyright owner]
32409  *
32410  * CDDL HEADER END
32411  */
32412 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
32413 /*	  All Rights Reserved  	*/
32414 
32415 /*
32416  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
32417  * Use is subject to license terms.
32418  */
32419 # 36 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32420 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
32421 /*
32422  * CDDL HEADER START
32423  *
32424  * The contents of this file are subject to the terms of the
32425  * Common Development and Distribution License, Version 1.0 only
32426  * (the "License").  You may not use this file except in compliance
32427  * with the License.
32428  *
32429  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32430  * or http://www.opensolaris.org/os/licensing.
32431  * See the License for the specific language governing permissions
32432  * and limitations under the License.
32433  *
32434  * When distributing Covered Code, include this CDDL HEADER in each
32435  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32436  * If applicable, add the following below this CDDL HEADER, with the
32437  * fields enclosed by brackets "[]" replaced with your own identifying
32438  * information: Portions Copyright [yyyy] [name of copyright owner]
32439  *
32440  * CDDL HEADER END
32441  */
32442 /*
32443  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
32444  */
32445 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
32446 /*	  All Rights Reserved  	*/
32447 # 37 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32448 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/valtools.h" 1
32449 /*
32450  * CDDL HEADER START
32451  *
32452  * The contents of this file are subject to the terms of the
32453  * Common Development and Distribution License, Version 1.0 only
32454  * (the "License").  You may not use this file except in compliance
32455  * with the License.
32456  *
32457  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32458  * or http://www.opensolaris.org/os/licensing.
32459  * See the License for the specific language governing permissions
32460  * and limitations under the License.
32461  *
32462  * When distributing Covered Code, include this CDDL HEADER in each
32463  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32464  * If applicable, add the following below this CDDL HEADER, with the
32465  * fields enclosed by brackets "[]" replaced with your own identifying
32466  * information: Portions Copyright [yyyy] [name of copyright owner]
32467  *
32468  * CDDL HEADER END
32469  */
32470 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
32471 /*	  All Rights Reserved  	*/
32472 
32473 
32474 
32475 
32476 
32477 #pragma ident "%Z%%M%	%I%	%E% SMI"
32478 
32479 
32480 
32481 
32482 
32483 struct _choice_ {
32484  char *token;
32485  char *text;
32486  struct _choice_ *next;
32487 };
32488 
32489 struct _menu_ {
32490  char *label;
32491  int attr;
32492  short longest;
32493  short nchoices;
32494  struct _choice_
32495   *choice;
32496  char **invis;
32497 };
32498 
32499 typedef struct _menu_ CKMENU;
32500 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32501 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
32502 /*
32503  * CDDL HEADER START
32504  *
32505  * The contents of this file are subject to the terms of the
32506  * Common Development and Distribution License (the "License").
32507  * You may not use this file except in compliance with the License.
32508  *
32509  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32510  * or http://www.opensolaris.org/os/licensing.
32511  * See the License for the specific language governing permissions
32512  * and limitations under the License.
32513  *
32514  * When distributing Covered Code, include this CDDL HEADER in each
32515  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32516  * If applicable, add the following below this CDDL HEADER, with the
32517  * fields enclosed by brackets "[]" replaced with your own identifying
32518  * information: Portions Copyright [yyyy] [name of copyright owner]
32519  *
32520  * CDDL HEADER END
32521  */
32522 
32523 /*
32524  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
32525  * Use is subject to license terms.
32526  */
32527 
32528 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
32529 /* All Rights Reserved */
32530 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32531 # 47 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h"
32532 /*
32533  * ckdate.c
32534  */
32535 extern int ckdate_err (char *fmt, char *error);
32536 extern int ckdate_hlp (char *fmt, char *help);
32537 extern int ckdate_val (char *fmt, char *input);
32538 extern int ckdate (char *date, char *fmt, char *defstr, char *error, char *help, char *prompt);
32539 
32540 
32541 /*
32542  * ckgid.c
32543  */
32544 extern int ckgid_dsp (void);
32545 extern int ckgid_val (char *grpnm);
32546 extern int ckgrpfile (void);
32547 extern void ckgid_err (int disp, char *error);
32548 extern void ckgid_hlp (int disp, char *help);
32549 extern int ckgid (char *gid, short disp, char *defstr, char *error, char *help, char *prompt);
32550 
32551 
32552 /*
32553  * ckint.c
32554  */
32555 extern int ckint_val (char *value, short base);
32556 extern void ckint_err (short base, char *error);
32557 extern void ckint_hlp (short base, char *help);
32558 extern int ckint (long *intval, short base, char *defstr, char *error, char *help, char *prompt);
32559 
32560 
32561 /*
32562  * ckitem.c
32563  */
32564 extern CKMENU *allocmenu (char *label, int attr);
32565 extern void ckitem_err (CKMENU *menup, char *error);
32566 extern void ckitem_hlp (CKMENU *menup, char *help);
32567 extern int ckitem (CKMENU *menup, char *item[], short max, char *defstr, char *error, char *help, char *prompt);
32568 
32569 
32570 extern int setitem (CKMENU *menup, char *choice);
32571 extern int setinvis (CKMENU *menup, char *choice);
32572 extern void printmenu (CKMENU *menup);
32573 
32574 /*
32575  * ckkeywd.c
32576  */
32577 extern int ckkeywd (char *strval, char *keyword[], char *defstr, char *error, char *help, char *prompt);
32578 
32579 
32580 /*
32581  * ckpath.c
32582  */
32583 extern int ckpath_stx (int pflags);
32584 extern int ckpath_val (char *path, int pflags);
32585 extern void ckpath_err (int pflags, char *error, char *input);
32586 extern void ckpath_hlp (int pflags, char *help);
32587 extern int ckpath (char *pathval, int pflags, char *defstr, char *error, char *help, char *prompt);
32588 
32589 
32590 /*
32591  * ckrange.c
32592  */
32593 extern void ckrange_err (long lower, long upper, int base, char *error);
32594 
32595 extern void ckrange_hlp (long lower, long upper, int base, char *help);
32596 extern int ckrange_val (long lower, long upper, int base, char *input);
32597 
32598 extern int ckrange (long *rngval, long lower, long upper, short base, char *defstr, char *error, char *help, char *prompt);
32599 
32600 
32601 
32602 /*
32603  * ckstr.c
32604  */
32605 extern int ckstr_val (char *regexp[], int length, char *input);
32606 extern void ckstr_err (char *regexp[], int length, char *error, char *input);
32607 
32608 extern void ckstr_hlp (char *regexp[], int length, char *help);
32609 extern int ckstr (char *strval, char *regexp[], int length, char *defstr, char *error, char *help, char *prompt);
32610 
32611 
32612 
32613 /*
32614  * cktime.c
32615  */
32616 extern int cktime_val (char *fmt, char *input);
32617 extern int cktime_err (char *fmt, char *error);
32618 extern int cktime_hlp (char *fmt, char *help);
32619 extern int fmtcheck (char *fmt);
32620 extern int cktime (char *tod, char *fmt, char *defstr, char *error, char *help, char *prompt);
32621 
32622 
32623 /*
32624  * ckuid.c
32625  */
32626 extern int ckuid_dsp (void);
32627 extern int ckuid_val (char *usrnm);
32628 extern int ckpwdfile (void);
32629 extern void ckuid_err (short disp, char *error);
32630 extern void ckuid_hlp (int disp, char *help);
32631 extern int ckuid (char *uid, short disp, char *defstr, char *error, char *help, char *prompt);
32632 
32633 
32634 /*
32635  * ckyorn.c
32636  */
32637 extern int ckyorn_val (char *str);
32638 extern void ckyorn_err (char *error);
32639 extern void ckyorn_hlp (char *help);
32640 extern int ckyorn (char *yorn, char *defstr, char *error, char *help, char *prompt);
32641 
32642 
32643 /*
32644  * devattr.c
32645  */
32646 extern char *devattr (char *device, char *attribute);
32647 
32648 /*
32649  * devreserv.c
32650  */
32651 extern char *_rsvtabpath (void);
32652 extern int _openlkfile (void);
32653 extern int _closelkfile (void);
32654 extern int unreserv (long key, char *device);
32655 extern char **devreserv (long key, char **rsvlst[]);
32656 extern int devfree (long key, char *device);
32657 extern struct reservdev **reservdev (void);
32658 
32659 /*
32660  * devtab.c
32661  */
32662 extern void _setdevtab (void);
32663 extern void _enddevtab (void);
32664 extern char *_devtabpath (void);
32665 extern int _opendevtab (char *mode);
32666 extern int _validalias (char *alias);
32667 extern struct devtabent *_getdevtabent (void);
32668 extern void _freedevtabent (struct devtabent *ent);
32669 extern struct devtabent *_getdevrec (char *device);
32670 
32671 /*
32672  * dgrpent.c
32673  */
32674 extern void _setdgrptab (void);
32675 extern void _enddgrptab (void);
32676 extern char *_dgrptabpath (void);
32677 extern int _opendgrptab (char *mode);
32678 extern struct dgrptabent *_getdgrptabent (void);
32679 extern void _freedgrptabent (struct dgrptabent *ent);
32680 extern struct dgrptabent *_getdgrprec (char *dgroup);
32681 
32682 /*
32683  * fulldevnm.c
32684  */
32685 extern char *getfullblkname (char *cp);
32686 extern char *getfullrawname (char *cp);
32687 
32688 /*
32689  * getdev.c
32690  */
32691 extern char **getdev (char **devices, char **criteria, int options);
32692 
32693 /*
32694  * getdgrp.c
32695  */
32696 extern char **getdgrp (char **dgroups, char **criteria, int options);
32697 
32698 /*
32699  * getinput.c
32700  */
32701 extern int getinput (char *s);
32702 
32703 /*
32704  * getvol.c
32705  */
32706 extern int getvol (char *device, char *label, int options, char *prompt);
32707 
32708 extern int _getvol (char *device, char *label, int options, char *prompt, char *norewind);
32709 
32710 extern void doremovecmd (char *device, int echo);
32711 
32712 /*
32713  * listdev.c
32714  */
32715 extern char **listdev (char *device);
32716 
32717 /*
32718  * listdgrp.c
32719  */
32720 extern char **listdgrp (char *dgroup);
32721 
32722 /*
32723  * memory.c
32724  */
32725 extern long sysmem (void);
32726 extern long asysmem (void);
32727 
32728 /*
32729  * pkginfo.c
32730  */
32731 extern int pkginfo (struct pkginfo *info, char *pkginst, ...);
32732 extern int fpkginfo (struct pkginfo *info, char *pkginst);
32733 extern char *fpkginst (char *pkg, ...);
32734 
32735 /*
32736  * pkgnmchk.c
32737  */
32738 extern int pkgnmchk (register char *pkg, register char *spec, int presvr4flg);
32739 
32740 extern void set_ABI_namelngth (void);
32741 extern int get_ABI_namelngth (void);
32742 
32743 /*
32744  * pkgparam.c
32745  */
32746 extern char *fpkgparam (FILE *fp, char *param);
32747 extern char *pkgparam (char *pkg, char *param);
32748 extern void set_PKGpaths (char *path);
32749 extern char *get_PKGLOC (void);
32750 extern char *get_PKGADM (void);
32751 extern void set_PKGADM(char *newpath);
32752 extern void set_PKGLOC(char *newpath);
32753 
32754 /*
32755  * putdev.c
32756  */
32757 extern int _putdevtabrec (FILE *stream, struct devtabent *rec);
32758 extern int _adddevtabrec (char *alias, char **attrval);
32759 extern int _moddevtabrec (char *device, char **attrval);
32760 extern int _rmdevtabrec (char *device);
32761 extern int _rmdevtabattrs (char *device, char **attributes, char ***notfounds);
32762 
32763 
32764 /*
32765  * putdgrp.c
32766  */
32767 extern int _putdgrptabrec (FILE *stream, struct dgrptabent *rec);
32768 extern int _adddgrptabrec (char *dgrp, char **members);
32769 extern int _rmdgrptabrec (char *dgrp);
32770 extern int _rmdgrpmems (char *dgrp, char **mems, char ***notfounds);
32771 
32772 /*
32773  * puterror.c
32774  */
32775 extern void puterror (FILE *fp, char *defmesg, char *error);
32776 
32777 /*
32778  * puthelp.c
32779  */
32780 extern void puthelp (FILE *fp, char *defmesg, char *help);
32781 
32782 /*
32783  * putprmpt.c
32784  */
32785 extern void putprmpt (FILE *fp, char *prompt, char *choices[], char *defstr);
32786 
32787 
32788 /*
32789  * puttext.c
32790  */
32791 extern int puttext (FILE *fp, char *str, int lmarg, int rmarg);
32792 
32793 /*
32794  * rdwr_vtoc.c
32795  */
32796 extern int read_vtoc (int fd, struct vtoc *vtoc);
32797 extern int write_vtoc (int fd, struct vtoc *vtoc);
32798 # 68 "unpack_package_from_stream.c" 2
32799 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h" 1
32800 /*
32801  * CDDL HEADER START
32802  *
32803  * The contents of this file are subject to the terms of the
32804  * Common Development and Distribution License (the "License").
32805  * You may not use this file except in compliance with the License.
32806  *
32807  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32808  * or http://www.opensolaris.org/os/licensing.
32809  * See the License for the specific language governing permissions
32810  * and limitations under the License.
32811  *
32812  * When distributing Covered Code, include this CDDL HEADER in each
32813  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32814  * If applicable, add the following below this CDDL HEADER, with the
32815  * fields enclosed by brackets "[]" replaced with your own identifying
32816  * information: Portions Copyright [yyyy] [name of copyright owner]
32817  *
32818  * CDDL HEADER END
32819  */
32820 
32821 /*
32822  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
32823  */
32824 
32825 
32826 
32827 
32828 
32829 /*
32830  * Module:	messages
32831  * Group:	pkg commands
32832  * Description: l10n strings for all pkg commands
32833  */
32834 # 44 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32835 /* BEGIN CSTYLED */
32836 
32837 /*
32838  * I18N: these messages are questions asked of the user
32839  */
32840 # 57 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32841 /*
32842  * I18N: these messages are debugging message and are only displayed
32843  * when special debugging output has been enabled - these messages
32844  * will never be displayed during normal product usage
32845  */
32846 # 401 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32847 /*
32848  * I18N: these messages are error messages that can be displayed
32849  * during the normal usage of the products
32850  */
32851 # 675 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32852 /*
32853  * I18N: these messages are help messages that are displayed when the
32854  * user answers a question with "?" - asking for help to be displayed
32855  */
32856 # 852 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32857 /*
32858  * These messages are output by qreason() - they are the "reason"
32859  * for the success/fail of the operation
32860  */
32861 # 980 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32862 /* WITH ZONE NAME */
32863 # 1175 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32864 /*
32865  * I18N: MSG_GZONLY_FILE_HEADER must NOT be translated!
32866  * ----- This message is placed at the beginning of an internal (private)
32867  * ----- database file. The contents of the message is a warning telling
32868  * ----- anyone who examines the contents of the database to not modify the
32869  * ----- database manually (by hand).
32870  * ----- Do NOT change or translate this text!
32871  */
32872 # 1191 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32873 /* END CSTYLED */
32874 # 69 "unpack_package_from_stream.c" 2
32875 
32876 /*
32877  * Name:	unpack_package_from_stream
32878  * Description:	unpack a package from a stream into a temporary directory
32879  * Arguments:	a_idsName - pointer to string representing the input data
32880  *			stream containing the package to unpack
32881  *		a_pkginst - pointer to string representing the name of
32882  *			the package to unpack from the specified stream
32883  *		a_tempDir - pointer to string representing the path to a
32884  *			directory into which the package will be unpacked
32885  * Returns:	boolean_t
32886  *			== B_TRUE - package successfully unpacked from stream
32887  *			== B_FALSE - failed to unpack package from stream
32888  */
32889 
32890 boolean_t
32891 unpack_package_from_stream(char *a_idsName, char *a_pkginst, char *a_tempDir)
32892 {
32893  int dparts;
32894  char instdir[1024];
32895 
32896  /* entry assertions */
32897 
32898  (void)((a_idsName != (char *)0) || (__assert("a_idsName != (char *)NULL", "unpack_package_from_stream.c", 92), 0));
32899  (void)((a_pkginst != (char *)0) || (__assert("a_pkginst != (char *)NULL", "unpack_package_from_stream.c", 93), 0));
32900  (void)((a_tempDir != (char *)0) || (__assert("a_tempDir != (char *)NULL", "unpack_package_from_stream.c", 94), 0));
32901 
32902  /* entry debug information */
32903 
32904  echoDebug(gettext("unpack_package_from_stream:"));
32905  echoDebug(gettext("unpack package <%s> from stream <%s> into directory <%s>"), a_pkginst, a_idsName, a_tempDir);
32906 
32907  /* find the specified package in the datastream */
32908 
32909  dparts = ds_findpkg(a_idsName, a_pkginst);
32910  if (dparts < 1) {
32911   progerr(gettext(gettext("unable to find archive for <%s> in datastream")), a_pkginst);
32912   return (B_FALSE);
32913   /*NOTREACHED*/
32914  }
32915 
32916  /*
32917 	 * read in next part from stream, even if we decide
32918 	 * later that we don't need it
32919 	 */
32920 
32921  /* create directory to hold this package instance */
32922 
32923  if (snprintf(instdir, sizeof (instdir), "%s/%s", a_tempDir, a_pkginst)
32924      >= 1024) {
32925   progerr(gettext("unable to create path from <%s> and <%s>"), a_tempDir, a_pkginst);
32926   return (B_FALSE);
32927  }
32928 
32929  switch (fmkdir(instdir, 0755)) {
32930  case 0: /* directory created */
32931   break;
32932  case 1: /* could not remove existing non-directory node */
32933   progerr(gettext("unable to remove file <%s>: %s"), instdir, strerror((*(___errno()))));
32934   return (B_FALSE);
32935  case 2: /* could not create specified new directory */
32936  default:
32937   progerr(gettext("unable to create temporary package area <%s>: %s"), instdir, strerror((*(___errno()))));
32938   return (B_FALSE);
32939  }
32940 
32941  /* unpack package instance from stream to dir created */
32942 
32943  echoDebug(gettext("unpacking package <%s> from stream <%s> into temporary directory <%s>"), a_pkginst, a_idsName, instdir);
32944 
32945  if (chdir(instdir)) {
32946   progerr(gettext("unable to change current working directory to <%s>"), instdir);
32947   return (B_FALSE);
32948  }
32949 
32950  while (dparts--) {
32951   if (ds_next(a_idsName, instdir)) {
32952    progerr(gettext("unable to read part <%d> of stream <%s> to directory <%s> for package <%s>"), dparts+1, a_idsName, instdir,
32953     a_pkginst);
32954    return (B_FALSE);
32955   }
32956  }
32957 
32958  if (chdir(get_PKGADM())) {
32959   progerr(gettext(gettext("unable to change current working directory to <%s>")), get_PKGADM());
32960   return (B_FALSE);
32961  }
32962 
32963  return (B_TRUE);
32964 }
32965