1 # 1 "open_package_datastream.c"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "open_package_datastream.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 2006 Sun Microsystems, Inc.  All rights reserved.
28  * Use is subject to license terms.
29  */
30 
31 
32 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
33 /*
34  * CDDL HEADER START
35  *
36  * The contents of this file are subject to the terms of the
37  * Common Development and Distribution License (the "License").
38  * You may not use this file except in compliance with the License.
39  *
40  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
41  * or http://www.opensolaris.org/os/licensing.
42  * See the License for the specific language governing permissions
43  * and limitations under the License.
44  *
45  * When distributing Covered Code, include this CDDL HEADER in each
46  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
47  * If applicable, add the following below this CDDL HEADER, with the
48  * fields enclosed by brackets "[]" replaced with your own identifying
49  * information: Portions Copyright [yyyy] [name of copyright owner]
50  *
51  * CDDL HEADER END
52  */
53 
54 /*
55  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
56  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
57  */
58 
59 /*	Copyright (c) 1988 AT&T	*/
60 /*	  All Rights Reserved  	*/
61 
62 /*
63  * User-visible pieces of the ANSI C standard I/O package.
64  */
65 
66 
67 
68 
69 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
70 /*
71  * CDDL HEADER START
72  *
73  * The contents of this file are subject to the terms of the
74  * Common Development and Distribution License (the "License").
75  * You may not use this file except in compliance with the License.
76  *
77  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
78  * or http://www.opensolaris.org/os/licensing.
79  * See the License for the specific language governing permissions
80  * and limitations under the License.
81  *
82  * When distributing Covered Code, include this CDDL HEADER in each
83  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
84  * If applicable, add the following below this CDDL HEADER, with the
85  * fields enclosed by brackets "[]" replaced with your own identifying
86  * information: Portions Copyright [yyyy] [name of copyright owner]
87  *
88  * CDDL HEADER END
89  */
90 
91 /*
92  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
93  * Copyright 2016 Joyent, Inc.
94  *
95  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
96  * Use is subject to license terms.
97  */
98 
99 
100 
101 
102 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h" 1
103 /*
104  * CDDL HEADER START
105  *
106  * The contents of this file are subject to the terms of the
107  * Common Development and Distribution License, Version 1.0 only
108  * (the "License").  You may not use this file except in compliance
109  * with the License.
110  *
111  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
112  * or http://www.opensolaris.org/os/licensing.
113  * See the License for the specific language governing permissions
114  * and limitations under the License.
115  *
116  * When distributing Covered Code, include this CDDL HEADER in each
117  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
118  * If applicable, add the following below this CDDL HEADER, with the
119  * fields enclosed by brackets "[]" replaced with your own identifying
120  * information: Portions Copyright [yyyy] [name of copyright owner]
121  *
122  * CDDL HEADER END
123  */
124 /*
125  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
126  * Use is subject to license terms.
127  */
128 /*
129  * Copyright 2015 EveryCity Ltd. All rights reserved.
130  */
131 
132 
133 
134 
135 /*
136  * This file contains definitions designed to enable different compilers
137  * to be used harmoniously on Solaris systems.
138  */
139 
140 
141 
142 
143 
144 /*
145  * Allow for version tests for compiler bugs and features.
146  */
147 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
148 /*
149  * analogous to lint's PRINTFLIKEn
150  */
151 
152 
153 
154 
155 
156 /*
157  * Handle the kernel printf routines that can take '%b' too
158  */
159 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
160 /*
161  * This one's pretty obvious -- the function never returns
162  */
163 
164 
165 /*
166  * The function is 'extern inline' and expects GNU C89 behaviour, not C99
167  * behaviour.
168  *
169  * Should only be used on 'extern inline' definitions for GCC.
170  */
171 
172 
173 
174 
175 
176 
177 /*
178  * The function has control flow such that it may return multiple times (in
179  * the manner of setjmp or vfork)
180  */
181 
182 
183 
184 
185 
186 
187 /*
188  * This is an appropriate label for functions that do not
189  * modify their arguments, e.g. strlen()
190  */
191 
192 
193 /*
194  * This is a stronger form of __pure__. Can be used for functions
195  * that do not modify their arguments and don't depend on global
196  * memory.
197  */
198 
199 
200 
201 
202 /*
203  * This attribute, attached to a variable, means that the variable is meant to
204  * be possibly unused. GCC will not produce a warning for this variable.
205  */
206 # 138 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
207 /*
208  * Shorthand versions for readability
209  */
210 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
211 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
212 /*
213  * CDDL HEADER START
214  *
215  * The contents of this file are subject to the terms of the
216  * Common Development and Distribution License (the "License").
217  * You may not use this file except in compliance with the License.
218  *
219  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
220  * or http://www.opensolaris.org/os/licensing.
221  * See the License for the specific language governing permissions
222  * and limitations under the License.
223  *
224  *
225  * When distributing Covered Code, include this CDDL HEADER in each
226  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
227  * If applicable, add the following below this CDDL HEADER, with the
228  * fields enclosed by brackets "[]" replaced with your own identifying
229  * information: Portions Copyright [yyyy] [name of copyright owner]
230  *
231  * CDDL HEADER END
232  */
233 
234 /*
235  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
236  * Use is subject to license terms.
237  * Copyright 2016 Joyent, Inc.
238  */
239 
240 
241 
242 
243 /*
244  * This header file serves to group a set of well known defines and to
245  * set these for each instruction set architecture.  These defines may
246  * be divided into two groups;  characteristics of the processor and
247  * implementation choices for Solaris on a processor.
248  *
249  * Processor Characteristics:
250  *
251  * _LITTLE_ENDIAN / _BIG_ENDIAN:
252  *	The natural byte order of the processor.  A pointer to an int points
253  *	to the least/most significant byte of that int.
254  *
255  * _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
256  *	The processor specific direction of stack growth.  A push onto the
257  *	stack increases/decreases the stack pointer, so it stores data at
258  *	successively higher/lower addresses.  (Stackless machines ignored
259  *	without regrets).
260  *
261  * _LONG_LONG_HTOL / _LONG_LONG_LTOH:
262  *	A pointer to a long long points to the most/least significant long
263  *	within that long long.
264  *
265  * _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
266  *	The C compiler assigns bit fields from the high/low to the low/high end
267  *	of an int (most to least significant vs. least to most significant).
268  *
269  * _IEEE_754:
270  *	The processor (or supported implementations of the processor)
271  *	supports the ieee-754 floating point standard.  No other floating
272  *	point standards are supported (or significant).  Any other supported
273  *	floating point formats are expected to be cased on the ISA processor
274  *	symbol.
275  *
276  * _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
277  *	The C Compiler implements objects of type `char' as `unsigned' or
278  *	`signed' respectively.  This is really an implementation choice of
279  *	the compiler writer, but it is specified in the ABI and tends to
280  *	be uniform across compilers for an instruction set architecture.
281  *	Hence, it has the properties of a processor characteristic.
282  *
283  * _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
284  * _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
285  * _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
286  *	The ABI defines alignment requirements of each of the primitive
287  *	object types.  Some, if not all, may be hardware requirements as
288  * 	well.  The values are expressed in "byte-alignment" units.
289  *
290  * _MAX_ALIGNMENT:
291  *	The most stringent alignment requirement as specified by the ABI.
292  *	Equal to the maximum of all the above _XXX_ALIGNMENT values.
293  *
294  * _MAX_ALIGNMENT_TYPE:
295  * 	The name of the C type that has the value descried in _MAX_ALIGNMENT.
296  *
297  * _ALIGNMENT_REQUIRED:
298  *	True or false (1 or 0) whether or not the hardware requires the ABI
299  *	alignment.
300  *
301  * _LONG_LONG_ALIGNMENT_32
302  *	The 32-bit ABI supported by a 64-bit kernel may have different
303  *	alignment requirements for primitive object types.  The value of this
304  *	identifier is expressed in "byte-alignment" units.
305  *
306  * _HAVE_CPUID_INSN
307  *	This indicates that the architecture supports the 'cpuid'
308  *	instruction as defined by Intel.  (Intel allows other vendors
309  *	to extend the instruction for their own purposes.)
310  *
311  *
312  * Implementation Choices:
313  *
314  * _ILP32 / _LP64:
315  *	This specifies the compiler data type implementation as specified in
316  *	the relevant ABI.  The choice between these is strongly influenced
317  *	by the underlying hardware, but is not absolutely tied to it.
318  *	Currently only two data type models are supported:
319  *
320  *	_ILP32:
321  *		Int/Long/Pointer are 32 bits.  This is the historical UNIX
322  *		and Solaris implementation.  Due to its historical standing,
323  *		this is the default case.
324  *
325  *	_LP64:
326  *		Long/Pointer are 64 bits, Int is 32 bits.  This is the chosen
327  *		implementation for 64-bit ABIs such as SPARC V9.
328  *
329  *	_I32LPx:
330  *		A compilation environment where 'int' is 32-bit, and
331  *		longs and pointers are simply the same size.
332  *
333  *	In all cases, Char is 8 bits and Short is 16 bits.
334  *
335  * _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
336  *	This specifies the form of the disk VTOC (or label):
337  *
338  *	_SUNOS_VTOC_8:
339  *		This is a VTOC form which is upwardly compatible with the
340  *		SunOS 4.x disk label and allows 8 partitions per disk.
341  *
342  *	_SUNOS_VTOC_16:
343  *		In this format the incore vtoc image matches the ondisk
344  *		version.  It allows 16 slices per disk, and is not
345  *		compatible with the SunOS 4.x disk label.
346  *
347  *	Note that these are not the only two VTOC forms possible and
348  *	additional forms may be added.  One possible form would be the
349  *	SVr4 VTOC form.  The symbol for that is reserved now, although
350  *	it is not implemented.
351  *
352  *	_SVR4_VTOC_16:
353  *		This VTOC form is compatible with the System V Release 4
354  *		VTOC (as implemented on the SVr4 Intel and 3b ports) with
355  *		16 partitions per disk.
356  *
357  *
358  * _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
359  *	This describes the type of addresses used by system DMA:
360  *
361  *	_DMA_USES_PHYSADDR:
362  *		This type of DMA, used in the x86 implementation,
363  *		requires physical addresses for DMA buffers.  The 24-bit
364  *		addresses used by some legacy boards is the source of the
365  *		"low-memory" (<16MB) requirement for some devices using DMA.
366  *
367  *	_DMA_USES_VIRTADDR:
368  *		This method of DMA allows the use of virtual addresses for
369  *		DMA transfers.
370  *
371  * _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
372  *      This indicates the presence/absence of an fdisk table.
373  *
374  *      _FIRMWARE_NEEDS_FDISK
375  *              The fdisk table is required by system firmware.  If present,
376  *              it allows a disk to be subdivided into multiple fdisk
377  *              partitions, each of which is equivalent to a separate,
378  *              virtual disk.  This enables the co-existence of multiple
379  *              operating systems on a shared hard disk.
380  *
381  *      _NO_FDISK_PRESENT
382  *              If the fdisk table is absent, it is assumed that the entire
383  *              media is allocated for a single operating system.
384  *
385  * _HAVE_TEM_FIRMWARE
386  *	Defined if this architecture has the (fallback) option of
387  *	using prom_* calls for doing I/O if a suitable kernel driver
388  *	is not available to do it.
389  *
390  * _DONT_USE_1275_GENERIC_NAMES
391  *		Controls whether or not device tree node names should
392  *		comply with the IEEE 1275 "Generic Names" Recommended
393  *		Practice. With _DONT_USE_GENERIC_NAMES, device-specific
394  *		names identifying the particular device will be used.
395  *
396  * __i386_COMPAT
397  *	This indicates whether the i386 ABI is supported as a *non-native*
398  *	mode for the platform.  When this symbol is defined:
399  *	-	32-bit xstat-style system calls are enabled
400  *	-	32-bit xmknod-style system calls are enabled
401  *	-	32-bit system calls use i386 sizes -and- alignments
402  *
403  *	Note that this is NOT defined for the i386 native environment!
404  *
405  * __x86
406  *	This is ONLY a synonym for defined(__i386) || defined(__amd64)
407  *	which is useful only insofar as these two architectures share
408  *	common attributes.  Analogous to __sparc.
409  *
410  * _PSM_MODULES
411  *	This indicates whether or not the implementation uses PSM
412  *	modules for processor support, reading /etc/mach from inside
413  *	the kernel to extract a list.
414  *
415  * _RTC_CONFIG
416  *	This indicates whether or not the implementation uses /etc/rtc_config
417  *	to configure the real-time clock in the kernel.
418  *
419  * _UNIX_KRTLD
420  *	This indicates that the implementation uses a dynamically
421  *	linked unix + krtld to form the core kernel image at boot
422  *	time, or (in the absence of this symbol) a prelinked kernel image.
423  *
424  * _OBP
425  *	This indicates the firmware interface is OBP.
426  *
427  * _SOFT_HOSTID
428  *	This indicates that the implementation obtains the hostid
429  *	from the file /etc/hostid, rather than from hardware.
430  */
431 
432 
433 
434 
435 
436 /*
437  * The following set of definitions characterize Solaris on AMD's
438  * 64-bit systems.
439  */
440 # 305 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
441 /*
442  * Define the appropriate "processor characteristics"
443  */
444 # 333 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
445 /*
446  * Define the appropriate "implementation choices".
447  */
448 # 351 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
449 /*
450  * The following set of definitions characterize the Solaris on SPARC systems.
451  *
452  * The symbol __sparc indicates any of the SPARC family of processor
453  * architectures.  This includes SPARC V7, SPARC V8 and SPARC V9.
454  *
455  * The symbol __sparcv8 indicates the 32-bit SPARC V8 architecture as defined
456  * by Version 8 of the SPARC Architecture Manual.  (SPARC V7 is close enough
457  * to SPARC V8 for the former to be subsumed into the latter definition.)
458  *
459  * The symbol __sparcv9 indicates the 64-bit SPARC V9 architecture as defined
460  * by Version 9 of the SPARC Architecture Manual.
461  *
462  * The symbols __sparcv8 and __sparcv9 are mutually exclusive, and are only
463  * relevant when the symbol __sparc is defined.
464  */
465 /*
466  * XXX Due to the existence of 5110166, "defined(__sparcv9)" needs to be added
467  * to support backwards builds.  This workaround should be removed in s10_71.
468  */
469 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
470 
471 
472 
473 
474 
475 /*
476  * Values of _POSIX_C_SOURCE
477  *
478  *		undefined   not a POSIX compilation
479  *		1	    POSIX.1-1990 compilation
480  *		2	    POSIX.2-1992 compilation
481  *		199309L	    POSIX.1b-1993 compilation (Real Time)
482  *		199506L	    POSIX.1c-1995 compilation (POSIX Threads)
483  *		200112L	    POSIX.1-2001 compilation (Austin Group Revision)
484  *		200809L     POSIX.1-2008 compilation
485  */
486 
487 
488 
489 
490 /*
491  * The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
492  * and _STDC_C99 are Sun implementation specific macros created in order to
493  * compress common standards specified feature test macros for easier reading.
494  * These macros should not be used by the application developer as
495  * unexpected results may occur. Instead, the user should reference
496  * standards(5) for correct usage of the standards feature test macros.
497  *
498  * __XOPEN_OR_POSIX     Used in cases where a symbol is defined by both
499  *                      X/Open or POSIX or in the negative, when neither
500  *                      X/Open or POSIX defines a symbol.
501  *
502  * _STRICT_STDC         __STDC__ is specified by the C Standards and defined
503  *                      by the compiler. For Sun compilers the value of
504  *                      __STDC__ is either 1, 0, or not defined based on the
505  *                      compilation mode (see cc(1)). When the value of
506  *                      __STDC__ is 1 and in the absence of any other feature
507  *                      test macros, the namespace available to the application
508  *                      is limited to only those symbols defined by the C
509  *                      Standard. _STRICT_STDC provides a more readable means
510  *                      of identifying symbols defined by the standard, or in
511  *                      the negative, symbols that are extensions to the C
512  *                      Standard. See additional comments for GNU C differences.
513  *
514  * _STDC_C99            __STDC_VERSION__ is specified by the C standards and
515  *                      defined by the compiler and indicates the version of
516  *                      the C standard. A value of 199901L indicates a
517  *                      compiler that complies with ISO/IEC 9899:1999, other-
518  *                      wise known as the C99 standard.
519  *
520  * _STDC_C11		Like _STDC_C99 except that the value of __STDC_VERSION__
521  *                      is 201112L indicating a compiler that compiles with
522  *                      ISO/IEXC 9899:2011, otherwise known as the C11 standard.
523  *
524  * _STRICT_SYMBOLS	Used in cases where symbol visibility is restricted
525  *                      by the standards, and the user has not explicitly
526  *                      relaxed the strictness via __EXTENSIONS__.
527  */
528 
529 
530 
531 
532 
533 /*
534  * ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
535  * 99899:2011 specify the following predefined macro name:
536  *
537  * __STDC__	The integer constant 1, intended to indicate a conforming
538  *		implementation.
539  *
540  * Furthermore, a strictly conforming program shall use only those features
541  * of the language and library specified in these standards. A conforming
542  * implementation shall accept any strictly conforming program.
543  *
544  * Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
545  * strictly conforming environments and __STDC__ to 0 for environments that
546  * use ANSI C semantics but allow extensions to the C standard. For non-ANSI
547  * C semantics, Sun's C compiler does not define __STDC__.
548  *
549  * The GNU C project interpretation is that __STDC__ should always be defined
550  * to 1 for compilation modes that accept ANSI C syntax regardless of whether
551  * or not extensions to the C standard are used. Violations of conforming
552  * behavior are conditionally flagged as warnings via the use of the
553  * -pedantic option. In addition to defining __STDC__ to 1, the GNU C
554  * compiler also defines __STRICT_ANSI__ as a means of specifying strictly
555  * conforming environments using the -ansi or -std=<standard> options.
556  *
557  * In the absence of any other compiler options, Sun and GNU set the value
558  * of __STDC__ as follows when using the following options:
559  *
560  *				Value of __STDC__  __STRICT_ANSI__
561  *
562  * cc -Xa (default)			0	      undefined
563  * cc -Xt (transitional)		0             undefined
564  * cc -Xc (strictly conforming)		1	      undefined
565  * cc -Xs (K&R C)		    undefined	      undefined
566  *
567  * gcc (default)			1	      undefined
568  * gcc -ansi, -std={c89, c99,...)  	1              defined
569  * gcc -traditional (K&R)	    undefined	      undefined
570  *
571  * The default compilation modes for Sun C compilers versus GNU C compilers
572  * results in a differing value for __STDC__ which results in a more
573  * restricted namespace when using Sun compilers. To allow both GNU and Sun
574  * interpretations to peacefully co-exist, we use the following Sun
575  * implementation _STRICT_STDC_ macro:
576  */
577 # 150 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
578 /*
579  * Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
580  */
581 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
582 /*
583  * Use strict symbol visibility.
584  */
585 
586 
587 
588 
589 
590 /*
591  * Large file interfaces:
592  *
593  *	_LARGEFILE_SOURCE
594  *		1		large file-related additions to POSIX
595  *				interfaces requested (fseeko, etc.)
596  *	_LARGEFILE64_SOURCE
597  *		1		transitional large-file-related interfaces
598  *				requested (seek64, stat64, etc.)
599  *
600  * The corresponding announcement macros are respectively:
601  *	_LFS_LARGEFILE
602  *	_LFS64_LARGEFILE
603  * (These are set in <unistd.h>.)
604  *
605  * Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
606  * well.
607  *
608  * The large file interfaces are made visible regardless of the initial values
609  * of the feature test macros under certain circumstances:
610  *    -	If no explicit standards-conforming environment is requested (neither
611  *	of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
612  *	__STDC__ does not imply standards conformance).
613  *    -	Extended system interfaces are explicitly requested (__EXTENSIONS__
614  * 	is defined).
615  *    -	Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
616  *	defined).  (Note that this dependency is an artifact of the current
617  *	kernel implementation and may change in future releases.)
618  */
619 # 210 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
620 /*
621  * Large file compilation environment control:
622  *
623  * The setting of _FILE_OFFSET_BITS controls the size of various file-related
624  * types and governs the mapping between file-related source function symbol
625  * names and the corresponding binary entry points.
626  *
627  * In the 32-bit environment, the default value is 32; if not set, set it to
628  * the default here, to simplify tests in other headers.
629  *
630  * In the 64-bit compilation environment, the only value allowed is 64.
631  */
632 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
633 /*
634  * Use of _XOPEN_SOURCE
635  *
636  * The following X/Open specifications are supported:
637  *
638  * X/Open Portability Guide, Issue 3 (XPG3)
639  * X/Open CAE Specification, Issue 4 (XPG4)
640  * X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
641  * X/Open CAE Specification, Issue 5 (XPG5)
642  * Open Group Technical Standard, Issue 6 (XPG6), also referred to as
643  *    IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
644  * Open Group Technical Standard, Issue 7 (XPG7), also referred to as
645  *    IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
646  *
647  * XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
648  * XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
649  *     Version 2 (SUSv2)
650  * XPG6 is the result of a merge of the X/Open and POSIX specifications
651  *     and as such is also referred to as IEEE Std. 1003.1-2001 in
652  *     addition to UNIX 03 and SUSv3.
653  * XPG7 is also referred to as UNIX 08 and SUSv4.
654  *
655  * When writing a conforming X/Open application, as per the specification
656  * requirements, the appropriate feature test macros must be defined at
657  * compile time. These are as follows. For more info, see standards(5).
658  *
659  * Feature Test Macro				     Specification
660  * ------------------------------------------------  -------------
661  * _XOPEN_SOURCE                                         XPG3
662  * _XOPEN_SOURCE && _XOPEN_VERSION = 4                   XPG4
663  * _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1           XPG4v2
664  * _XOPEN_SOURCE = 500                                   XPG5
665  * _XOPEN_SOURCE = 600  (or POSIX_C_SOURCE=200112L)      XPG6
666  * _XOPEN_SOURCE = 700  (or POSIX_C_SOURCE=200809L)      XPG7
667  *
668  * In order to simplify the guards within the headers, the following
669  * implementation private test macros have been created. Applications
670  * must NOT use these private test macros as unexpected results will
671  * occur.
672  *
673  * Note that in general, the use of these private macros is cumulative.
674  * For example, the use of _XPG3 with no other restrictions on the X/Open
675  * namespace will make the symbols visible for XPG3 through XPG6
676  * compilation environments. The use of _XPG4_2 with no other X/Open
677  * namespace restrictions indicates that the symbols were introduced in
678  * XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
679  * environments, but not for XPG3 or XPG4 compilation environments.
680  *
681  * _XPG3    X/Open Portability Guide, Issue 3 (XPG3)
682  * _XPG4    X/Open CAE Specification, Issue 4 (XPG4)
683  * _XPG4_2  X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
684  * _XPG5    X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
685  * _XPG6    Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
686  * _XPG7    Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
687  */
688 
689 /* X/Open Portability Guide, Issue 3 */
690 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
691 /*
692  * _XOPEN_VERSION is defined by the X/Open specifications and is not
693  * normally defined by the application, except in the case of an XPG4
694  * application.  On the implementation side, _XOPEN_VERSION defined with
695  * the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
696  * with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
697  * _XOPEN_VERSION  defined with a value of 500 indicates an XPG5 (UNIX 98)
698  * application and with a value of 600 indicates an XPG6 (UNIX 03)
699  * application and with a value of 700 indicates an XPG7 (UNIX 08).
700  * The appropriate version is determined by the use of the
701  * feature test macros described earlier.  The value of _XOPEN_VERSION
702  * defaults to 3 otherwise indicating support for XPG3 applications.
703  */
704 # 368 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
705 /*
706  * ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
707  * conforming environments.  ISO 9899:1999 says it does.
708  *
709  * The presence of _LONGLONG_TYPE says "long long exists" which is therefore
710  * defined in all but strictly conforming environments that disallow it.
711  */
712 # 388 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
713 /*
714  * The following macro defines a value for the ISO C99 restrict
715  * keyword so that _RESTRICT_KYWD resolves to "restrict" if
716  * an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
717  * if any other compiler is used. This allows for the use of single
718  * prototype declarations regardless of compiler version.
719  */
720 # 410 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
721 /*
722  * The following macro defines a value for the ISO C11 _Noreturn
723  * keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
724  * an ISO C11 compiler is used and "" (null string) if any other
725  * compiler is used. This allows for the use of single prototype
726  * declarations regardless of compiler version.
727  */
728 
729 
730 
731 
732 
733 
734 
735 /*
736  * The following macro indicates header support for the ANSI C++
737  * standard.  The ISO/IEC designation for this is ISO/IEC FDIS 14882.
738  */
739 
740 
741 /*
742  * The following macro indicates header support for the C99 standard,
743  * ISO/IEC 9899:1999, Programming Languages - C.
744  */
745 
746 
747 /*
748  * The following macro indicates header support for the C99 standard,
749  * ISO/IEC 9899:2011, Programming Languages - C.
750  */
751 
752 
753 /*
754  * The following macro indicates header support for DTrace. The value is an
755  * integer that corresponds to the major version number for DTrace.
756  */
757 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
758 
759 
760 
761 
762 
763 /*
764  * Do all of our 'redefine_extname' processing before
765  * declarations of the associated functions are seen.
766  * This is necessary to keep gcc happy.
767  */
768 
769 
770 /* large file compilation environment setup */
771 
772 
773 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
774 #pragma redefine_extname fopen fopen64
775 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
776 
777 
778 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
779 #pragma redefine_extname freopen freopen64
780 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
781 
782 
783 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
784 #pragma redefine_extname tmpfile tmpfile64
785 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
786 
787 
788 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
789 #pragma redefine_extname fgetpos fgetpos64
790 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
791 
792 
793 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
794 #pragma redefine_extname fsetpos fsetpos64
795 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
796 
797 
798 
799 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
800 #pragma redefine_extname fseeko fseeko64
801 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
802 
803 
804 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
805 #pragma redefine_extname ftello ftello64
806 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
807 
808 
809 
810 
811 /* In the LP64 compilation environment, all APIs are already large file */
812 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
813 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 1
814 /*
815  * CDDL HEADER START
816  *
817  * The contents of this file are subject to the terms of the
818  * Common Development and Distribution License, Version 1.0 only
819  * (the "License").  You may not use this file except in compliance
820  * with the License.
821  *
822  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
823  * or http://www.opensolaris.org/os/licensing.
824  * See the License for the specific language governing permissions
825  * and limitations under the License.
826  *
827  * When distributing Covered Code, include this CDDL HEADER in each
828  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
829  * If applicable, add the following below this CDDL HEADER, with the
830  * fields enclosed by brackets "[]" replaced with your own identifying
831  * information: Portions Copyright [yyyy] [name of copyright owner]
832  *
833  * CDDL HEADER END
834  */
835 /*
836  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
837  * Copyright 2014 PALO, Richard.
838  *
839  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
840  * Use is subject to license terms.
841  */
842 
843 /*	Copyright (c) 1988 AT&T	*/
844 /*	  All Rights Reserved  	*/
845 
846 /*
847  * An application should not include this header directly.  Instead it
848  * should be included only through the inclusion of other Sun headers.
849  *
850  * The contents of this header is limited to identifiers specified in the
851  * C Standard.  Any new identifiers specified in future amendments to the
852  * C Standard must be placed in this header.  If these new identifiers
853  * are required to also be in the C++ Standard "std" namespace, then for
854  * anything other than macro definitions, corresponding "using" directives
855  * must also be added to <stdio.h>.
856  */
857 
858 /*
859  * User-visible pieces of the ANSI C standard I/O package.
860  */
861 
862 
863 
864 
865 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
866 /*
867  * CDDL HEADER START
868  *
869  * The contents of this file are subject to the terms of the
870  * Common Development and Distribution License (the "License").
871  * You may not use this file except in compliance with the License.
872  *
873  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
874  * or http://www.opensolaris.org/os/licensing.
875  * See the License for the specific language governing permissions
876  * and limitations under the License.
877  *
878  * When distributing Covered Code, include this CDDL HEADER in each
879  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
880  * If applicable, add the following below this CDDL HEADER, with the
881  * fields enclosed by brackets "[]" replaced with your own identifying
882  * information: Portions Copyright [yyyy] [name of copyright owner]
883  *
884  * CDDL HEADER END
885  */
886 
887 /*
888  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
889  * Copyright 2016 Joyent, Inc.
890  *
891  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
892  * Use is subject to license terms.
893  */
894 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
895 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
896 /*
897  * This file and its contents are supplied under the terms of the
898  * Common Development and Distribution License ("CDDL"), version 1.0.
899  * You may only use this file in accordance with the terms of version
900  * 1.0 of the CDDL.
901  *
902  * A full copy of the text of the CDDL should have accompanied this
903  * source.  A copy of the CDDL is also available via the Internet at
904  * http://www.illumos.org/license/CDDL.
905  */
906 
907 /*
908  * Copyright 2014-2016 PALO, Richard.
909  */
910 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
911 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1
912 /*
913  * CDDL HEADER START
914  *
915  * The contents of this file are subject to the terms of the
916  * Common Development and Distribution License, Version 1.0 only
917  * (the "License").  You may not use this file except in compliance
918  * with the License.
919  *
920  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
921  * or http://www.opensolaris.org/os/licensing.
922  * See the License for the specific language governing permissions
923  * and limitations under the License.
924  *
925  * When distributing Covered Code, include this CDDL HEADER in each
926  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
927  * If applicable, add the following below this CDDL HEADER, with the
928  * fields enclosed by brackets "[]" replaced with your own identifying
929  * information: Portions Copyright [yyyy] [name of copyright owner]
930  *
931  * CDDL HEADER END
932  */
933 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
934 /*	  All Rights Reserved	*/
935 
936 
937 /*
938  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
939  *
940  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
941  * Use is subject to license terms.
942  */
943 
944 
945 
946 
947 /*
948  * An application should not include this header directly.  Instead it
949  * should be included only through the inclusion of other Sun headers.
950  *
951  * The purpose of this header is to provide the type definitions for
952  * the va_list argument used by a number of printf and printf like
953  * functions. The headers that define these various function prototypes
954  * #include this header directly. These include but are not necessarily
955  * limited to <stdio.h>, <stdio_iso.h>, <wchar_iso.h>, <strlog.h> and
956  * <syslog.h>. The type definitions included in this header are for
957  * the benefit of consumers of va_list.
958  *
959  * Any application that accepts variable argument lists must as documented,
960  * include either <varargs.h> or the preferred <stdarg.h>. Doing so will
961  * pull in the appropriate compiler protocols defined in <sys/va_impl.h>
962  * which is in turn is included by <varargs.h> and <stdarg.h>. See comments
963  * in <sys/va_impl.h> for more detailed information regarding implementation
964  * and compiler specific protocols.
965  */
966 
967 /*
968  * The common definitions exported by this header or compilers using
969  * this header are:
970  *
971  * the identifier __builtin_va_alist for the variable list pseudo parameter
972  * the type __va_alist_type for the variable list pseudo parameter
973  * the type __va_list defining the type of the variable list iterator
974  *
975  * The feature macros (e.g. __BUILTIN_VA_STRUCT) and compiler macros
976  * (__GNUC__) and processor macros (e.g. __amd64) are intended to be
977  * defined by the compilation system, not the user of the system.
978  */
979 
980 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
981 /*
982  * CDDL HEADER START
983  *
984  * The contents of this file are subject to the terms of the
985  * Common Development and Distribution License (the "License").
986  * You may not use this file except in compliance with the License.
987  *
988  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
989  * or http://www.opensolaris.org/os/licensing.
990  * See the License for the specific language governing permissions
991  * and limitations under the License.
992  *
993  *
994  * When distributing Covered Code, include this CDDL HEADER in each
995  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
996  * If applicable, add the following below this CDDL HEADER, with the
997  * fields enclosed by brackets "[]" replaced with your own identifying
998  * information: Portions Copyright [yyyy] [name of copyright owner]
999  *
1000  * CDDL HEADER END
1001  */
1002 
1003 /*
1004  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1005  * Use is subject to license terms.
1006  * Copyright 2016 Joyent, Inc.
1007  */
1008 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 2
1009 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h"
1010 typedef __builtin_va_list __gnuc_va_list;
1011 /*
1012  * XX64 This seems unnecessary .. but is needed because vcmn_err is
1013  *	defined with __va_list instead of plain old va_list.
1014  *	Perhaps that should be fixed!
1015  */
1016 typedef __builtin_va_list __va_list;
1017 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1018 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h" 1
1019 /*
1020  * CDDL HEADER START
1021  *
1022  * The contents of this file are subject to the terms of the
1023  * Common Development and Distribution License, Version 1.0 only
1024  * (the "License").  You may not use this file except in compliance
1025  * with the License.
1026  *
1027  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1028  * or http://www.opensolaris.org/os/licensing.
1029  * See the License for the specific language governing permissions
1030  * and limitations under the License.
1031  *
1032  * When distributing Covered Code, include this CDDL HEADER in each
1033  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1034  * If applicable, add the following below this CDDL HEADER, with the
1035  * fields enclosed by brackets "[]" replaced with your own identifying
1036  * information: Portions Copyright [yyyy] [name of copyright owner]
1037  *
1038  * CDDL HEADER END
1039  */
1040 /*
1041  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1042  * Use is subject to license terms.
1043  */
1044 
1045 
1046 
1047 
1048 #pragma ident "%Z%%M%	%I%	%E% SMI"
1049 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h"
1050 typedef struct __FILE __FILE;
1051 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1052 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 1
1053 /*
1054  * CDDL HEADER START
1055  *
1056  * The contents of this file are subject to the terms of the
1057  * Common Development and Distribution License (the "License").
1058  * You may not use this file except in compliance with the License.
1059  *
1060  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1061  * or http://www.opensolaris.org/os/licensing.
1062  * See the License for the specific language governing permissions
1063  * and limitations under the License.
1064  *
1065  * When distributing Covered Code, include this CDDL HEADER in each
1066  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1067  * If applicable, add the following below this CDDL HEADER, with the
1068  * fields enclosed by brackets "[]" replaced with your own identifying
1069  * information: Portions Copyright [yyyy] [name of copyright owner]
1070  *
1071  * CDDL HEADER END
1072  */
1073 
1074 /*
1075  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1076  * Use is subject to license terms.
1077  */
1078 
1079 
1080 
1081 
1082 #pragma ident "%Z%%M%	%I%	%E% SMI"
1083 
1084 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1085 /*
1086  * CDDL HEADER START
1087  *
1088  * The contents of this file are subject to the terms of the
1089  * Common Development and Distribution License (the "License").
1090  * You may not use this file except in compliance with the License.
1091  *
1092  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1093  * or http://www.opensolaris.org/os/licensing.
1094  * See the License for the specific language governing permissions
1095  * and limitations under the License.
1096  *
1097  *
1098  * When distributing Covered Code, include this CDDL HEADER in each
1099  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1100  * If applicable, add the following below this CDDL HEADER, with the
1101  * fields enclosed by brackets "[]" replaced with your own identifying
1102  * information: Portions Copyright [yyyy] [name of copyright owner]
1103  *
1104  * CDDL HEADER END
1105  */
1106 
1107 /*
1108  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1109  * Use is subject to license terms.
1110  * Copyright 2016 Joyent, Inc.
1111  */
1112 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 2
1113 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h"
1114 struct __FILE /* needs to be binary-compatible with old versions */
1115 {
1116 
1117 
1118 
1119 
1120  int _cnt; /* number of available characters in buffer */
1121  unsigned char *_ptr; /* next character from/to here in buffer */
1122 
1123  unsigned char *_base; /* the buffer */
1124  unsigned char _flag; /* the state of the stream */
1125  unsigned char _magic; /* Old home of the file descriptor */
1126     /* Only fileno(3C) can retrieve the value now */
1127  unsigned __orientation:2; /* the orientation of the stream */
1128  unsigned __ionolock:1; /* turn off implicit locking */
1129  unsigned __seekable:1; /* is file seekable? */
1130  unsigned __extendedfd:1; /* enable extended FILE */
1131  unsigned __xf_nocheck:1; /* no extended FILE runtime check */
1132  unsigned __filler:10;
1133 };
1134 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1135 
1136 /*
1137  * If feature test macros are set that enable interfaces that use types
1138  * defined in <sys/types.h>, get those types by doing the include.
1139  *
1140  * Note that in asking for the interfaces associated with this feature test
1141  * macro one also asks for definitions of the POSIX types.
1142  */
1143 
1144 
1145 
1146 
1147 
1148 
1149 /*
1150  * The following typedefs are adopted from ones in <sys/types.h> (with leading
1151  * underscores added to avoid polluting the ANSI C name space).  See the
1152  * commentary there for further explanation.
1153  */
1154 
1155 typedef long long __longlong_t;
1156 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1157 typedef __FILE FILE;
1158 
1159 
1160 
1161 
1162 
1163 
1164 
1165 typedef unsigned int size_t; /* (historical version) */
1166 
1167 
1168 
1169 
1170 
1171 
1172 typedef __longlong_t fpos_t;
1173 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1174 /*
1175  * The value of _NFILE is defined in the Processor Specific ABI.  The value
1176  * is chosen for historical reasons rather than for truly processor related
1177  * attribute.  Note that the SPARC Processor Specific ABI uses the common
1178  * UNIX historical value of 20 so it is allowed to fall through.
1179  */
1180 # 156 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1181 extern __FILE __iob[60];
1182 # 191 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1183 extern int remove(const char *);
1184 extern int rename(const char *, const char *);
1185 extern FILE *tmpfile(void);
1186 extern char *tmpnam(char *);
1187 extern int fclose(FILE *);
1188 extern int fflush(FILE *);
1189 extern FILE *fopen(const char *, const char *);
1190 extern FILE *freopen(const char *,
1191    const char *, FILE *);
1192 extern void setbuf(FILE *, char *);
1193 extern int setvbuf(FILE *, char *, int,
1194    size_t);
1195 /* PRINTFLIKE2 */
1196 extern int fprintf(FILE *, const char *, ...);
1197 /* SCANFLIKE2 */
1198 extern int fscanf(FILE *, const char *, ...);
1199 /* PRINTFLIKE1 */
1200 extern int printf(const char *, ...);
1201 /* SCANFLIKE1 */
1202 extern int scanf(const char *, ...);
1203 /* PRINTFLIKE2 */
1204 extern int sprintf(char *, const char *, ...);
1205 /* SCANFLIKE2 */
1206 extern int sscanf(const char *,
1207    const char *, ...);
1208 extern int vfprintf(FILE *, const char *,
1209    __va_list);
1210 extern int vprintf(const char *, __va_list);
1211 extern int vsprintf(char *, const char *,
1212    __va_list);
1213 extern int fgetc(FILE *);
1214 extern char *fgets(char *, int, FILE *);
1215 extern int fputc(int, FILE *);
1216 extern int fputs(const char *, FILE *);
1217 
1218 
1219 extern int getc(FILE *);
1220 extern int putc(int, FILE *);
1221 
1222 
1223 
1224 extern int getchar(void);
1225 extern int putchar(int);
1226 
1227 
1228 /*
1229  * ISO/IEC C11 removed gets from the standard library. Therefore if a strict C11
1230  * environment has been requested, we remove it.
1231  */
1232 
1233 extern char *gets(char *);
1234 
1235 extern int puts(const char *);
1236 extern int ungetc(int, FILE *);
1237 extern size_t fread(void *, size_t, size_t,
1238  FILE *);
1239 extern size_t fwrite(const void *, size_t, size_t,
1240  FILE *);
1241 
1242 extern int fgetpos(FILE *, fpos_t *);
1243 extern int fsetpos(FILE *, const fpos_t *);
1244 
1245 extern int fseek(FILE *, long, int);
1246 extern long ftell(FILE *);
1247 extern void rewind(FILE *);
1248 
1249 
1250 extern void clearerr(FILE *);
1251 extern int feof(FILE *);
1252 extern int ferror(FILE *);
1253 
1254 extern void perror(const char *);
1255 
1256 
1257 extern int __filbuf(FILE *);
1258 extern int __flsbuf(int, FILE *);
1259 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1260 
1261 /*
1262  * If feature test macros are set that enable interfaces that use types
1263  * defined in <sys/types.h>, get those types by doing the include.
1264  *
1265  * Note that in asking for the interfaces associated with this feature test
1266  * macro one also asks for definitions of the POSIX types.
1267  */
1268 
1269 /*
1270  * Allow global visibility for symbols defined in
1271  * C++ "std" namespace in <iso/stdio_iso.h>.
1272  */
1273 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1274 /*
1275  * This header needs to be included here because it relies on the global
1276  * visibility of FILE and size_t in the C++ environment.
1277  */
1278 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h" 1
1279 /*
1280  * CDDL HEADER START
1281  *
1282  * The contents of this file are subject to the terms of the
1283  * Common Development and Distribution License, Version 1.0 only
1284  * (the "License").  You may not use this file except in compliance
1285  * with the License.
1286  *
1287  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1288  * or http://www.opensolaris.org/os/licensing.
1289  * See the License for the specific language governing permissions
1290  * and limitations under the License.
1291  *
1292  * When distributing Covered Code, include this CDDL HEADER in each
1293  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1294  * If applicable, add the following below this CDDL HEADER, with the
1295  * fields enclosed by brackets "[]" replaced with your own identifying
1296  * information: Portions Copyright [yyyy] [name of copyright owner]
1297  *
1298  * CDDL HEADER END
1299  */
1300 /*
1301  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1302  *
1303  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1304  * Use is subject to license terms.
1305  */
1306 
1307 /*
1308  * An application should not include this header directly.  Instead it
1309  * should be included only through the inclusion of other Sun headers.
1310  *
1311  * The contents of this header is limited to identifiers specified in
1312  * the C99 standard and in conflict with the C++ implementation of the
1313  * standard header.  The C++ standard may adopt the C99 standard at
1314  * which point it is expected that the symbols included here will
1315  * become part of the C++ std namespace.
1316  */
1317 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1318 /*
1319  * The following have been added as a result of the ISO/IEC 9899:1999
1320  * standard. For a strictly conforming C application, visibility is
1321  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
1322  * For non-strictly conforming C applications, there are no restrictions
1323  * on the C namespace.
1324  */
1325 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1326 extern int vfscanf(FILE *, const char *, __va_list);
1327 extern int vscanf(const char *, __va_list);
1328 extern int vsscanf(const char *, const char *,
1329   __va_list);
1330 
1331 
1332 
1333 
1334 extern int snprintf(char *, size_t, const char *,
1335  ...);
1336 extern int vsnprintf(char *, size_t, const char *,
1337  __va_list);
1338 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1339 # 163 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1340 typedef __longlong_t off_t;
1341 
1342 
1343 
1344 
1345 
1346 typedef __longlong_t off64_t;
1347 # 179 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1348 typedef __longlong_t fpos64_t;
1349 
1350 
1351 
1352 /*
1353  * XPG4 requires that va_list be defined in <stdio.h> "as described in
1354  * <stdarg.h>".  ANSI-C and POSIX require that the namespace of <stdio.h>
1355  * not be polluted with this name.
1356  */
1357 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1358 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1359 # 213 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1360 extern unsigned char _sibuf[], _sobuf[];
1361 
1362 
1363 /* large file compilation environment setup */
1364 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1365 extern unsigned char *_bufendtab[];
1366 extern FILE *_lastbuf;
1367 
1368 
1369 /* In the LP64 compilation environment, all APIs are already large file */
1370 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1371 typedef int ssize_t; /* (historical version) */
1372 
1373 
1374 
1375 
1376 
1377 
1378 extern char *tmpnam_r(char *);
1379 
1380 
1381 
1382 
1383 extern int fcloseall(void);
1384 extern void setbuffer(FILE *, char *, size_t);
1385 extern int setlinebuf(FILE *);
1386 /* PRINTFLIKE2 */
1387 extern int asprintf(char **, const char *, ...);
1388 /* PRINTFLIKE2 */
1389 extern int vasprintf(char **, const char *, __va_list);
1390 
1391 
1392 
1393 
1394  /* || defined(_XPG7) */
1395 extern ssize_t getdelim(char **, size_t *,
1396  int, FILE *);
1397 extern ssize_t getline(char **, size_t *,
1398  FILE *);
1399 
1400 
1401 /*
1402  * The following are known to POSIX and XOPEN, but not to ANSI-C.
1403  */
1404 
1405 
1406 
1407 extern FILE *fdopen(int, const char *);
1408 extern char *ctermid(char *);
1409 extern int fileno(FILE *);
1410 
1411 
1412 
1413 /*
1414  * The following are known to POSIX.1c, but not to ANSI-C or XOPEN.
1415  */
1416 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1417 /*
1418  * The following are known to XOPEN, but not to ANSI-C or POSIX.
1419  */
1420 
1421 
1422 extern FILE *popen(const char *, const char *);
1423 extern char *tempnam(const char *, const char *);
1424 extern int pclose(FILE *);
1425 
1426 extern int getsubopt(char **, char *const *, char **);
1427 
1428 
1429 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1430 
1431 extern char *cuserid(char *);
1432 extern int getopt(int, char *const *, const char *);
1433 extern char *optarg;
1434 extern int optind, opterr, optopt;
1435 extern int getw(FILE *);
1436 extern int putw(int, FILE *);
1437 
1438 
1439 
1440 
1441 /*
1442  * The following are defined as part of the Large File Summit interfaces.
1443  */
1444 
1445 extern int fseeko(FILE *, off_t, int);
1446 extern off_t ftello(FILE *);
1447 
1448 
1449 /*
1450  * The following are defined as part of the transitional Large File Summit
1451  * interfaces.
1452  */
1453 
1454 
1455 extern FILE *fopen64(const char *, const char *);
1456 extern FILE *freopen64(const char *, const char *, FILE *);
1457 extern FILE *tmpfile64(void);
1458 extern int fgetpos64(FILE *, fpos64_t *);
1459 extern int fsetpos64(FILE *, const fpos64_t *);
1460 extern int fseeko64(FILE *, off64_t, int);
1461 extern off64_t ftello64(FILE *);
1462 
1463 
1464 /*
1465  * XPG7 symbols
1466  */
1467 
1468 extern FILE *fmemopen(void *, size_t,
1469       const char *);
1470 extern FILE *open_memstream(char **, size_t *);
1471 # 29 "open_package_datastream.c" 2
1472 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
1473 /*
1474  * CDDL HEADER START
1475  *
1476  * The contents of this file are subject to the terms of the
1477  * Common Development and Distribution License (the "License").
1478  * You may not use this file except in compliance with the License.
1479  *
1480  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1481  * or http://www.opensolaris.org/os/licensing.
1482  * See the License for the specific language governing permissions
1483  * and limitations under the License.
1484  *
1485  * When distributing Covered Code, include this CDDL HEADER in each
1486  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1487  * If applicable, add the following below this CDDL HEADER, with the
1488  * fields enclosed by brackets "[]" replaced with your own identifying
1489  * information: Portions Copyright [yyyy] [name of copyright owner]
1490  *
1491  * CDDL HEADER END
1492  */
1493 /*	Copyright (c) 1988 AT&T	*/
1494 /*	  All Rights Reserved  	*/
1495 
1496 
1497 /*
1498  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1499  *
1500  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
1501  * Use is subject to license terms.
1502  */
1503 /*
1504  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
1505  * Copyright 2016 Joyent, Inc.
1506  */
1507 
1508 
1509 
1510 
1511 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1512 /*
1513  * CDDL HEADER START
1514  *
1515  * The contents of this file are subject to the terms of the
1516  * Common Development and Distribution License (the "License").
1517  * You may not use this file except in compliance with the License.
1518  *
1519  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1520  * or http://www.opensolaris.org/os/licensing.
1521  * See the License for the specific language governing permissions
1522  * and limitations under the License.
1523  *
1524  * When distributing Covered Code, include this CDDL HEADER in each
1525  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1526  * If applicable, add the following below this CDDL HEADER, with the
1527  * fields enclosed by brackets "[]" replaced with your own identifying
1528  * information: Portions Copyright [yyyy] [name of copyright owner]
1529  *
1530  * CDDL HEADER END
1531  */
1532 
1533 /*
1534  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1535  * Copyright 2016 Joyent, Inc.
1536  *
1537  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1538  * Use is subject to license terms.
1539  */
1540 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
1541 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 1
1542 /*
1543  * CDDL HEADER START
1544  *
1545  * The contents of this file are subject to the terms of the
1546  * Common Development and Distribution License, Version 1.0 only
1547  * (the "License").  You may not use this file except in compliance
1548  * with the License.
1549  *
1550  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1551  * or http://www.opensolaris.org/os/licensing.
1552  * See the License for the specific language governing permissions
1553  * and limitations under the License.
1554  *
1555  * When distributing Covered Code, include this CDDL HEADER in each
1556  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1557  * If applicable, add the following below this CDDL HEADER, with the
1558  * fields enclosed by brackets "[]" replaced with your own identifying
1559  * information: Portions Copyright [yyyy] [name of copyright owner]
1560  *
1561  * CDDL HEADER END
1562  */
1563 /*	Copyright (c) 1988 AT&T	*/
1564 /*	  All Rights Reserved  	*/
1565 
1566 /*
1567  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1568  * Copyright 2014 PALO, Richard.
1569  *
1570  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1571  * Use is subject to license terms.
1572  */
1573 
1574 /*
1575  * An application should not include this header directly.  Instead it
1576  * should be included only through the inclusion of other Sun headers.
1577  *
1578  * The contents of this header is limited to identifiers specified in the
1579  * C Standard.  Any new identifiers specified in future amendments to the
1580  * C Standard must be placed in this header.  If these new identifiers
1581  * are required to also be in the C++ Standard "std" namespace, then for
1582  * anything other than macro definitions, corresponding "using" directives
1583  * must also be added to <time.h.h>.
1584  */
1585 
1586 
1587 
1588 
1589 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1590 /*
1591  * CDDL HEADER START
1592  *
1593  * The contents of this file are subject to the terms of the
1594  * Common Development and Distribution License (the "License").
1595  * You may not use this file except in compliance with the License.
1596  *
1597  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1598  * or http://www.opensolaris.org/os/licensing.
1599  * See the License for the specific language governing permissions
1600  * and limitations under the License.
1601  *
1602  * When distributing Covered Code, include this CDDL HEADER in each
1603  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1604  * If applicable, add the following below this CDDL HEADER, with the
1605  * fields enclosed by brackets "[]" replaced with your own identifying
1606  * information: Portions Copyright [yyyy] [name of copyright owner]
1607  *
1608  * CDDL HEADER END
1609  */
1610 
1611 /*
1612  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1613  * Copyright 2016 Joyent, Inc.
1614  *
1615  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1616  * Use is subject to license terms.
1617  */
1618 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
1619 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
1620 /*
1621  * This file and its contents are supplied under the terms of the
1622  * Common Development and Distribution License ("CDDL"), version 1.0.
1623  * You may only use this file in accordance with the terms of version
1624  * 1.0 of the CDDL.
1625  *
1626  * A full copy of the text of the CDDL should have accompanied this
1627  * source.  A copy of the CDDL is also available via the Internet at
1628  * http://www.illumos.org/license/CDDL.
1629  */
1630 
1631 /*
1632  * Copyright 2014-2016 PALO, Richard.
1633  */
1634 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
1635 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h"
1636 typedef long clock_t;
1637 
1638 
1639 
1640 
1641 typedef long time_t;
1642 
1643 
1644 
1645 
1646 struct tm { /* see ctime(3) */
1647  int tm_sec;
1648  int tm_min;
1649  int tm_hour;
1650  int tm_mday;
1651  int tm_mon;
1652  int tm_year;
1653  int tm_wday;
1654  int tm_yday;
1655  int tm_isdst;
1656 };
1657 
1658 
1659 extern char *asctime(const struct tm *);
1660 extern clock_t clock(void);
1661 extern char *ctime(const time_t *);
1662 extern double difftime(time_t, time_t);
1663 extern struct tm *gmtime(const time_t *);
1664 extern struct tm *localtime(const time_t *);
1665 extern time_t mktime(struct tm *);
1666 extern time_t time(time_t *);
1667 extern size_t strftime(char *, size_t, const char *,
1668  const struct tm *);
1669 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
1670 /*
1671  * C11 requires sys/time_impl.h for the definition of the struct timespec.
1672  */
1673 
1674 
1675 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
1676 /*
1677  * CDDL HEADER START
1678  *
1679  * The contents of this file are subject to the terms of the
1680  * Common Development and Distribution License (the "License").
1681  * You may not use this file except in compliance with the License.
1682  *
1683  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1684  * or http://www.opensolaris.org/os/licensing.
1685  * See the License for the specific language governing permissions
1686  * and limitations under the License.
1687  *
1688  * When distributing Covered Code, include this CDDL HEADER in each
1689  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1690  * If applicable, add the following below this CDDL HEADER, with the
1691  * fields enclosed by brackets "[]" replaced with your own identifying
1692  * information: Portions Copyright [yyyy] [name of copyright owner]
1693  *
1694  * CDDL HEADER END
1695  */
1696 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
1697 /*	  All Rights Reserved  	*/
1698 
1699 
1700 /*
1701  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
1702  * Use is subject to license terms.
1703  *
1704  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
1705  * Copyright 2016 Joyent, Inc.
1706  */
1707 
1708 
1709 
1710 
1711 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1712 /*
1713  * CDDL HEADER START
1714  *
1715  * The contents of this file are subject to the terms of the
1716  * Common Development and Distribution License (the "License").
1717  * You may not use this file except in compliance with the License.
1718  *
1719  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1720  * or http://www.opensolaris.org/os/licensing.
1721  * See the License for the specific language governing permissions
1722  * and limitations under the License.
1723  *
1724  * When distributing Covered Code, include this CDDL HEADER in each
1725  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1726  * If applicable, add the following below this CDDL HEADER, with the
1727  * fields enclosed by brackets "[]" replaced with your own identifying
1728  * information: Portions Copyright [yyyy] [name of copyright owner]
1729  *
1730  * CDDL HEADER END
1731  */
1732 
1733 /*
1734  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1735  * Copyright 2016 Joyent, Inc.
1736  *
1737  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1738  * Use is subject to license terms.
1739  */
1740 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1741 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1742 /*
1743  * CDDL HEADER START
1744  *
1745  * The contents of this file are subject to the terms of the
1746  * Common Development and Distribution License (the "License").
1747  * You may not use this file except in compliance with the License.
1748  *
1749  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1750  * or http://www.opensolaris.org/os/licensing.
1751  * See the License for the specific language governing permissions
1752  * and limitations under the License.
1753  *
1754  *
1755  * When distributing Covered Code, include this CDDL HEADER in each
1756  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1757  * If applicable, add the following below this CDDL HEADER, with the
1758  * fields enclosed by brackets "[]" replaced with your own identifying
1759  * information: Portions Copyright [yyyy] [name of copyright owner]
1760  *
1761  * CDDL HEADER END
1762  */
1763 
1764 /*
1765  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1766  * Use is subject to license terms.
1767  * Copyright 2016 Joyent, Inc.
1768  */
1769 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1770 
1771 /*
1772  * Machine dependent definitions moved to <sys/machtypes.h>.
1773  */
1774 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 1
1775 /*
1776  * CDDL HEADER START
1777  *
1778  * The contents of this file are subject to the terms of the
1779  * Common Development and Distribution License, Version 1.0 only
1780  * (the "License").  You may not use this file except in compliance
1781  * with the License.
1782  *
1783  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1784  * or http://www.opensolaris.org/os/licensing.
1785  * See the License for the specific language governing permissions
1786  * and limitations under the License.
1787  *
1788  * When distributing Covered Code, include this CDDL HEADER in each
1789  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1790  * If applicable, add the following below this CDDL HEADER, with the
1791  * fields enclosed by brackets "[]" replaced with your own identifying
1792  * information: Portions Copyright [yyyy] [name of copyright owner]
1793  *
1794  * CDDL HEADER END
1795  */
1796 /*
1797  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1798  * Use is subject to license terms.
1799  */
1800 
1801 
1802 
1803 
1804 #pragma ident "%Z%%M%	%I%	%E% SMI"
1805 
1806 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1807 /*
1808  * CDDL HEADER START
1809  *
1810  * The contents of this file are subject to the terms of the
1811  * Common Development and Distribution License (the "License").
1812  * You may not use this file except in compliance with the License.
1813  *
1814  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1815  * or http://www.opensolaris.org/os/licensing.
1816  * See the License for the specific language governing permissions
1817  * and limitations under the License.
1818  *
1819  * When distributing Covered Code, include this CDDL HEADER in each
1820  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1821  * If applicable, add the following below this CDDL HEADER, with the
1822  * fields enclosed by brackets "[]" replaced with your own identifying
1823  * information: Portions Copyright [yyyy] [name of copyright owner]
1824  *
1825  * CDDL HEADER END
1826  */
1827 
1828 /*
1829  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1830  * Copyright 2016 Joyent, Inc.
1831  *
1832  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1833  * Use is subject to license terms.
1834  */
1835 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
1836 
1837 
1838 
1839 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h" 1
1840 /*
1841  * CDDL HEADER START
1842  *
1843  * The contents of this file are subject to the terms of the
1844  * Common Development and Distribution License (the "License").
1845  * You may not use this file except in compliance with the License.
1846  *
1847  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1848  * or http://www.opensolaris.org/os/licensing.
1849  * See the License for the specific language governing permissions
1850  * and limitations under the License.
1851  *
1852  * When distributing Covered Code, include this CDDL HEADER in each
1853  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1854  * If applicable, add the following below this CDDL HEADER, with the
1855  * fields enclosed by brackets "[]" replaced with your own identifying
1856  * information: Portions Copyright [yyyy] [name of copyright owner]
1857  *
1858  * CDDL HEADER END
1859  */
1860 /*
1861  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
1862  * Use is subject to license terms.
1863  */
1864 
1865 
1866 
1867 
1868 #pragma ident "%Z%%M%	%I%	%E% SMI"
1869 
1870 
1871 
1872 
1873 
1874 /*
1875  * Machine dependent types:
1876  *
1877  *	intel ia32 Version
1878  */
1879 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h"
1880 typedef struct _label_t { long val[6]; } label_t;
1881 
1882 
1883 
1884 typedef unsigned char lock_t; /* lock work for busy wait */
1885 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
1886 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1887 
1888 /*
1889  * Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
1890  * committee's working draft for the revision of the current ISO C standard,
1891  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
1892  * required by any standard but constitute a useful, general purpose set
1893  * of type definitions which is namespace clean with respect to all standards.
1894  */
1895 
1896 
1897 
1898 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
1899 /*
1900  * CDDL HEADER START
1901  *
1902  * The contents of this file are subject to the terms of the
1903  * Common Development and Distribution License, Version 1.0 only
1904  * (the "License").  You may not use this file except in compliance
1905  * with the License.
1906  *
1907  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1908  * or http://www.opensolaris.org/os/licensing.
1909  * See the License for the specific language governing permissions
1910  * and limitations under the License.
1911  *
1912  * When distributing Covered Code, include this CDDL HEADER in each
1913  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1914  * If applicable, add the following below this CDDL HEADER, with the
1915  * fields enclosed by brackets "[]" replaced with your own identifying
1916  * information: Portions Copyright [yyyy] [name of copyright owner]
1917  *
1918  * CDDL HEADER END
1919  */
1920 /*
1921  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1922  *
1923  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1924  * Use is subject to license terms.
1925  */
1926 
1927 
1928 
1929 
1930 /*
1931  * This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
1932  * of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
1933  * Programming language - C.
1934  *
1935  * Programs/Modules should not directly include this file.  Access to the
1936  * types defined in this file should be through the inclusion of one of the
1937  * following files:
1938  *
1939  *	<sys/types.h>		Provides only the "_t" types defined in this
1940  *				file which is a subset of the contents of
1941  *				<inttypes.h>.  (This can be appropriate for
1942  *				all programs/modules except those claiming
1943  *				ANSI-C conformance.)
1944  *
1945  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
1946  *				components of <inttypes.h>.
1947  *
1948  *	<inttypes.h>		For use by applications.
1949  *
1950  * See these files for more details.
1951  */
1952 
1953 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1954 /*
1955  * CDDL HEADER START
1956  *
1957  * The contents of this file are subject to the terms of the
1958  * Common Development and Distribution License (the "License").
1959  * You may not use this file except in compliance with the License.
1960  *
1961  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1962  * or http://www.opensolaris.org/os/licensing.
1963  * See the License for the specific language governing permissions
1964  * and limitations under the License.
1965  *
1966  * When distributing Covered Code, include this CDDL HEADER in each
1967  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1968  * If applicable, add the following below this CDDL HEADER, with the
1969  * fields enclosed by brackets "[]" replaced with your own identifying
1970  * information: Portions Copyright [yyyy] [name of copyright owner]
1971  *
1972  * CDDL HEADER END
1973  */
1974 
1975 /*
1976  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1977  * Copyright 2016 Joyent, Inc.
1978  *
1979  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1980  * Use is subject to license terms.
1981  */
1982 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 2
1983 
1984 
1985 
1986 
1987 
1988 /*
1989  * Basic / Extended integer types
1990  *
1991  * The following defines the basic fixed-size integer types.
1992  *
1993  * Implementations are free to typedef them to Standard C integer types or
1994  * extensions that they support. If an implementation does not support one
1995  * of the particular integer data types below, then it should not define the
1996  * typedefs and macros corresponding to that data type.  Note that int8_t
1997  * is not defined in -Xs mode on ISAs for which the ABI specifies "char"
1998  * as an unsigned entity because there is no way to define an eight bit
1999  * signed integral.
2000  */
2001 
2002 typedef char int8_t;
2003 
2004 
2005 
2006 typedef short int16_t;
2007 typedef int int32_t;
2008 
2009 
2010 
2011 
2012 
2013 
2014 typedef long long int64_t;
2015 
2016 
2017 
2018 typedef unsigned char uint8_t;
2019 typedef unsigned short uint16_t;
2020 typedef unsigned int uint32_t;
2021 
2022 
2023 
2024 
2025 typedef unsigned long long uint64_t;
2026 
2027 
2028 
2029 /*
2030  * intmax_t and uintmax_t are to be the longest (in number of bits) signed
2031  * and unsigned integer types supported by the implementation.
2032  */
2033 
2034 typedef int64_t intmax_t;
2035 typedef uint64_t uintmax_t;
2036 
2037 
2038 
2039 
2040 
2041 /*
2042  * intptr_t and uintptr_t are signed and unsigned integer types large enough
2043  * to hold any data pointer; that is, data pointers can be assigned into or
2044  * from these integer types without losing precision.
2045  */
2046 
2047 
2048 
2049 
2050 typedef int intptr_t;
2051 typedef unsigned int uintptr_t;
2052 
2053 
2054 /*
2055  * The following define the fastest integer types that can hold the
2056  * specified number of bits.
2057  */
2058 
2059 typedef char int_fast8_t;
2060 
2061 
2062 
2063 typedef int int_fast16_t;
2064 typedef int int_fast32_t;
2065 
2066 
2067 
2068 
2069 typedef long long int_fast64_t;
2070 
2071 
2072 
2073 typedef unsigned char uint_fast8_t;
2074 typedef unsigned int uint_fast16_t;
2075 typedef unsigned int uint_fast32_t;
2076 
2077 
2078 
2079 
2080 typedef unsigned long long uint_fast64_t;
2081 
2082 
2083 
2084 /*
2085  * The following define the smallest integer types that can hold the
2086  * specified number of bits.
2087  */
2088 
2089 typedef char int_least8_t;
2090 
2091 
2092 
2093 typedef short int_least16_t;
2094 typedef int int_least32_t;
2095 
2096 
2097 
2098 
2099 typedef long long int_least64_t;
2100 
2101 
2102 
2103 /*
2104  * If these are changed, please update char16_t and char32_t in head/uchar.h.
2105  */
2106 typedef unsigned char uint_least8_t;
2107 typedef unsigned short uint_least16_t;
2108 typedef unsigned int uint_least32_t;
2109 
2110 
2111 
2112 
2113 typedef unsigned long long uint_least64_t;
2114 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
2115 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2116 /*
2117  * Strictly conforming ANSI C environments prior to the 1999
2118  * revision of the C Standard (ISO/IEC 9899:1999) do not have
2119  * the long long data type.
2120  */
2121 
2122 typedef long long longlong_t;
2123 typedef unsigned long long u_longlong_t;
2124 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2125 /*
2126  * These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
2127  * to use them instead of int32_t and uint32_t because DEC had
2128  * shipped 64-bit wide.
2129  */
2130 
2131 
2132 
2133 
2134 typedef long t_scalar_t; /* historical versions */
2135 typedef unsigned long t_uscalar_t;
2136 
2137 
2138 /*
2139  * POSIX Extensions
2140  */
2141 typedef unsigned char uchar_t;
2142 typedef unsigned short ushort_t;
2143 typedef unsigned int uint_t;
2144 typedef unsigned long ulong_t;
2145 
2146 typedef char *caddr_t; /* ?<core address> type */
2147 typedef long daddr_t; /* <disk address> type */
2148 typedef short cnt_t; /* ?<count> type */
2149 
2150 
2151 
2152 
2153 
2154 
2155 typedef int ptrdiff_t; /* (historical version) */
2156 
2157 
2158 
2159 /*
2160  * VM-related types
2161  */
2162 typedef ulong_t pfn_t; /* page frame number */
2163 typedef ulong_t pgcnt_t; /* number of pages */
2164 typedef long spgcnt_t; /* signed number of pages */
2165 
2166 typedef uchar_t use_t; /* use count for swap.  */
2167 typedef short sysid_t;
2168 typedef short index_t;
2169 typedef void *timeout_id_t; /* opaque handle from timeout(9F) */
2170 typedef void *bufcall_id_t; /* opaque handle from bufcall(9F) */
2171 
2172 /*
2173  * The size of off_t and related types depends on the setting of
2174  * _FILE_OFFSET_BITS.  (Note that other system headers define other types
2175  * related to those defined here.)
2176  *
2177  * If _LARGEFILE64_SOURCE is defined, variants of these types that are
2178  * explicitly 64 bits wide become available.
2179  */
2180 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2181 typedef u_longlong_t ino_t; /* expanded inode type	*/
2182 typedef longlong_t blkcnt_t; /* count of file blocks */
2183 typedef u_longlong_t fsblkcnt_t; /* count of file system blocks */
2184 typedef u_longlong_t fsfilcnt_t; /* count of files */
2185 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2186 typedef u_longlong_t ino64_t; /* expanded inode type	*/
2187 typedef longlong_t blkcnt64_t; /* count of file blocks */
2188 typedef u_longlong_t fsblkcnt64_t; /* count of file system blocks */
2189 typedef u_longlong_t fsfilcnt64_t; /* count of files */
2190 
2191 
2192 
2193 
2194 
2195 
2196 typedef long blksize_t; /* used for block sizes */
2197 
2198 
2199 
2200 
2201 
2202 typedef enum { B_FALSE, B_TRUE } boolean_t;
2203 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2204 /*
2205  * The {u,}pad64_t types can be used in structures such that those structures
2206  * may be accessed by code produced by compilation environments which don't
2207  * support a 64 bit integral datatype.  The intention is not to allow
2208  * use of these fields in such environments, but to maintain the alignment
2209  * and offsets of the structure.
2210  *
2211  * Similar comments for {u,}pad128_t.
2212  *
2213  * Note that these types do NOT generate any stronger alignment constraints
2214  * than those available in the underlying ABI.  See <sys/isa_defs.h>
2215  */
2216 
2217 typedef int64_t pad64_t;
2218 typedef uint64_t upad64_t;
2219 # 232 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2220 typedef union {
2221  long double _q;
2222  int32_t _l[4];
2223 } pad128_t;
2224 
2225 typedef union {
2226  long double _q;
2227  uint32_t _l[4];
2228 } upad128_t;
2229 
2230 typedef longlong_t offset_t;
2231 typedef u_longlong_t u_offset_t;
2232 typedef u_longlong_t len_t;
2233 typedef u_longlong_t diskaddr_t;
2234 
2235 
2236 
2237 
2238 /*
2239  * Definitions remaining from previous partial support for 64-bit file
2240  * offsets.  This partial support for devices greater than 2gb requires
2241  * compiler support for long long.
2242  */
2243 
2244 typedef union {
2245  offset_t _f; /* Full 64 bit offset value */
2246  struct {
2247   int32_t _l; /* lower 32 bits of offset value */
2248   int32_t _u; /* upper 32 bits of offset value */
2249  } _p;
2250 } lloff_t;
2251 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2252 typedef union {
2253  longlong_t _f; /* Full 64 bit disk address value */
2254  struct {
2255   int32_t _l; /* lower 32 bits of disk address value */
2256   int32_t _u; /* upper 32 bits of disk address value */
2257  } _p;
2258 } lldaddr_t;
2259 # 295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2260 typedef uint_t k_fltset_t; /* kernel fault set type */
2261 
2262 /*
2263  * The following type is for various kinds of identifiers.  The
2264  * actual type must be the same for all since some system calls
2265  * (such as sigsend) take arguments that may be any of these
2266  * types.  The enumeration type idtype_t defined in sys/procset.h
2267  * is used to indicate what type of id is being specified --
2268  * a process id, process group id, session id, scheduling class id,
2269  * user id, group id, project id, task id or zone id.
2270  */
2271 
2272 
2273 
2274 typedef long id_t; /* (historical version) */
2275 
2276 
2277 typedef id_t lgrp_id_t; /* lgroup ID */
2278 
2279 /*
2280  * Type useconds_t is an unsigned integral type capable of storing
2281  * values at least in the range of zero to 1,000,000.
2282  */
2283 typedef uint_t useconds_t; /* Time, in microseconds */
2284 
2285 
2286 
2287 typedef long suseconds_t; /* signed # of microseconds */
2288 
2289 
2290 /*
2291  * Typedefs for dev_t components.
2292  */
2293 
2294 
2295 
2296 
2297 typedef ulong_t major_t; /* (historical version) */
2298 typedef ulong_t minor_t; /* (historical version) */
2299 
2300 
2301 /*
2302  * The data type of a thread priority.
2303  */
2304 typedef short pri_t;
2305 
2306 /*
2307  * The data type for a CPU flags field.  (Can be extended to larger unsigned
2308  * types, if needed, limited by ability to update atomically.)
2309  */
2310 typedef ushort_t cpu_flag_t;
2311 
2312 /*
2313  * For compatibility reasons the following typedefs (prefixed o_)
2314  * can't grow regardless of the EFT definition. Although,
2315  * applications should not explicitly use these typedefs
2316  * they may be included via a system header definition.
2317  * WARNING: These typedefs may be removed in a future
2318  * release.
2319  *		ex. the definitions in s5inode.h (now obsoleted)
2320  *			remained small to preserve compatibility
2321  *			in the S5 file system type.
2322  */
2323 typedef ushort_t o_mode_t; /* old file attribute type */
2324 typedef short o_dev_t; /* old device type	*/
2325 typedef ushort_t o_uid_t; /* old UID type		*/
2326 typedef o_uid_t o_gid_t; /* old GID type		*/
2327 typedef short o_nlink_t; /* old file link type	*/
2328 typedef short o_pid_t; /* old process id type	*/
2329 typedef ushort_t o_ino_t; /* old inode type	*/
2330 
2331 
2332 /*
2333  * POSIX and XOPEN Declarations
2334  */
2335 typedef int key_t; /* IPC key type		*/
2336 
2337 
2338 
2339 typedef ulong_t mode_t; /* (historical version) */
2340 
2341 
2342 
2343 
2344 typedef unsigned int uid_t; /* UID type		*/
2345 
2346 
2347 typedef uid_t gid_t; /* GID type		*/
2348 
2349 typedef uint32_t datalink_id_t;
2350 typedef uint32_t vrid_t;
2351 
2352 typedef id_t taskid_t;
2353 typedef id_t projid_t;
2354 typedef id_t poolid_t;
2355 typedef id_t zoneid_t;
2356 typedef id_t ctid_t;
2357 
2358 /*
2359  * POSIX definitions are same as defined in thread.h and synch.h.
2360  * Any changes made to here should be reflected in corresponding
2361  * files as described in comments.
2362  */
2363 typedef uint_t pthread_t; /* = thread_t in thread.h */
2364 typedef uint_t pthread_key_t; /* = thread_key_t in thread.h */
2365 
2366 /* "Magic numbers" tagging synchronization object types */
2367 
2368 
2369 
2370 
2371 
2372 typedef struct _pthread_mutex { /* = mutex_t in synch.h */
2373  struct {
2374   uint16_t __pthread_mutex_flag1;
2375   uint8_t __pthread_mutex_flag2;
2376   uint8_t __pthread_mutex_ceiling;
2377   uint16_t __pthread_mutex_type;
2378   uint16_t __pthread_mutex_magic;
2379  } __pthread_mutex_flags;
2380  union {
2381   struct {
2382    uint8_t __pthread_mutex_pad[8];
2383   } __pthread_mutex_lock64;
2384   struct {
2385    uint32_t __pthread_ownerpid;
2386    uint32_t __pthread_lockword;
2387   } __pthread_mutex_lock32;
2388   upad64_t __pthread_mutex_owner64;
2389  } __pthread_mutex_lock;
2390  upad64_t __pthread_mutex_data;
2391 } pthread_mutex_t;
2392 
2393 typedef struct _pthread_cond { /* = cond_t in synch.h */
2394  struct {
2395   uint8_t __pthread_cond_flag[4];
2396   uint16_t __pthread_cond_type;
2397   uint16_t __pthread_cond_magic;
2398  } __pthread_cond_flags;
2399  upad64_t __pthread_cond_data;
2400 } pthread_cond_t;
2401 
2402 /*
2403  * UNIX 98 Extension
2404  */
2405 typedef struct _pthread_rwlock { /* = rwlock_t in synch.h */
2406  int32_t __pthread_rwlock_readers;
2407  uint16_t __pthread_rwlock_type;
2408  uint16_t __pthread_rwlock_magic;
2409  pthread_mutex_t __pthread_rwlock_mutex;
2410  pthread_cond_t __pthread_rwlock_readercv;
2411  pthread_cond_t __pthread_rwlock_writercv;
2412 } pthread_rwlock_t;
2413 
2414 /*
2415  * SUSV3
2416  */
2417 typedef struct {
2418  uint32_t __pthread_barrier_count;
2419  uint32_t __pthread_barrier_current;
2420  upad64_t __pthread_barrier_cycle;
2421  upad64_t __pthread_barrier_reserved;
2422  pthread_mutex_t __pthread_barrier_lock;
2423  pthread_cond_t __pthread_barrier_cond;
2424 } pthread_barrier_t;
2425 
2426 typedef pthread_mutex_t pthread_spinlock_t;
2427 
2428 /*
2429  * attributes for threads, dynamically allocated by library
2430  */
2431 typedef struct _pthread_attr {
2432  void *__pthread_attrp;
2433 } pthread_attr_t;
2434 
2435 /*
2436  * attributes for mutex, dynamically allocated by library
2437  */
2438 typedef struct _pthread_mutexattr {
2439  void *__pthread_mutexattrp;
2440 } pthread_mutexattr_t;
2441 
2442 /*
2443  * attributes for cond, dynamically allocated by library
2444  */
2445 typedef struct _pthread_condattr {
2446  void *__pthread_condattrp;
2447 } pthread_condattr_t;
2448 
2449 /*
2450  * pthread_once
2451  */
2452 typedef struct _once {
2453  upad64_t __pthread_once_pad[4];
2454 } pthread_once_t;
2455 
2456 /*
2457  * UNIX 98 Extensions
2458  * attributes for rwlock, dynamically allocated by library
2459  */
2460 typedef struct _pthread_rwlockattr {
2461  void *__pthread_rwlockattrp;
2462 } pthread_rwlockattr_t;
2463 
2464 /*
2465  * SUSV3
2466  * attributes for pthread_barrier_t, dynamically allocated by library
2467  */
2468 typedef struct {
2469  void *__pthread_barrierattrp;
2470 } pthread_barrierattr_t;
2471 
2472 typedef ulong_t dev_t; /* expanded device type */
2473 
2474 
2475 
2476 
2477 
2478 typedef ulong_t nlink_t; /* (historical version) */
2479 typedef long pid_t; /* (historical version) */
2480 # 547 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2481 typedef int clockid_t; /* clock identifier type */
2482 
2483 
2484 
2485 
2486 typedef int timer_t; /* timer identifier type */
2487 
2488 
2489 
2490 
2491 /* BEGIN CSTYLED */
2492 typedef unsigned char unchar;
2493 typedef unsigned short ushort;
2494 typedef unsigned int uint;
2495 typedef unsigned long ulong;
2496 /* END CSTYLED */
2497 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2498 /*
2499  * The following is the value of type id_t to use to indicate the
2500  * caller's current id.  See procset.h for the type idtype_t
2501  * which defines which kind of id is being specified.
2502  */
2503 # 620 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2504 /*
2505  * The following value of type pfn_t is used to indicate
2506  * invalid page frame number.
2507  */
2508 
2509 
2510 
2511 /* BEGIN CSTYLED */
2512 typedef unsigned char u_char;
2513 typedef unsigned short u_short;
2514 typedef unsigned int u_int;
2515 typedef unsigned long u_long;
2516 typedef struct _quad { int val[2]; } quad_t; /* used by UFS */
2517 typedef quad_t quad; /* used by UFS */
2518 /* END CSTYLED */
2519 
2520 /*
2521  * Nested include for BSD/sockets source compatibility.
2522  * (The select macros used to be defined here).
2523  */
2524 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
2525 /*
2526  * CDDL HEADER START
2527  *
2528  * The contents of this file are subject to the terms of the
2529  * Common Development and Distribution License (the "License").
2530  * You may not use this file except in compliance with the License.
2531  *
2532  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2533  * or http://www.opensolaris.org/os/licensing.
2534  * See the License for the specific language governing permissions
2535  * and limitations under the License.
2536  *
2537  * When distributing Covered Code, include this CDDL HEADER in each
2538  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2539  * If applicable, add the following below this CDDL HEADER, with the
2540  * fields enclosed by brackets "[]" replaced with your own identifying
2541  * information: Portions Copyright [yyyy] [name of copyright owner]
2542  *
2543  * CDDL HEADER END
2544  */
2545 
2546 /*
2547  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2548  *
2549  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2550  *
2551  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
2552  * Use is subject to license terms.
2553  */
2554 
2555 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2556 /*	  All Rights Reserved	*/
2557 
2558 /*
2559  * University Copyright- Copyright (c) 1982, 1986, 1988
2560  * The Regents of the University of California
2561  * All Rights Reserved
2562  *
2563  * University Acknowledgment- Portions of this document are derived from
2564  * software developed by the University of California, Berkeley, and its
2565  * contributors.
2566  */
2567 
2568 
2569 
2570 
2571 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2572 /*
2573  * CDDL HEADER START
2574  *
2575  * The contents of this file are subject to the terms of the
2576  * Common Development and Distribution License (the "License").
2577  * You may not use this file except in compliance with the License.
2578  *
2579  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2580  * or http://www.opensolaris.org/os/licensing.
2581  * See the License for the specific language governing permissions
2582  * and limitations under the License.
2583  *
2584  * When distributing Covered Code, include this CDDL HEADER in each
2585  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2586  * If applicable, add the following below this CDDL HEADER, with the
2587  * fields enclosed by brackets "[]" replaced with your own identifying
2588  * information: Portions Copyright [yyyy] [name of copyright owner]
2589  *
2590  * CDDL HEADER END
2591  */
2592 
2593 /*
2594  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2595  * Copyright 2016 Joyent, Inc.
2596  *
2597  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2598  * Use is subject to license terms.
2599  */
2600 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
2601 
2602 
2603 
2604 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
2605 /*
2606  * CDDL HEADER START
2607  *
2608  * The contents of this file are subject to the terms of the
2609  * Common Development and Distribution License, Version 1.0 only
2610  * (the "License").  You may not use this file except in compliance
2611  * with the License.
2612  *
2613  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2614  * or http://www.opensolaris.org/os/licensing.
2615  * See the License for the specific language governing permissions
2616  * and limitations under the License.
2617  *
2618  * When distributing Covered Code, include this CDDL HEADER in each
2619  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2620  * If applicable, add the following below this CDDL HEADER, with the
2621  * fields enclosed by brackets "[]" replaced with your own identifying
2622  * information: Portions Copyright [yyyy] [name of copyright owner]
2623  *
2624  * CDDL HEADER END
2625  */
2626 /*
2627  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
2628  * Use is subject to license terms.
2629  */
2630 
2631 /*
2632  * Implementation-private.  This header should not be included
2633  * directly by an application.  The application should instead
2634  * include <time.h> which includes this header conditionally
2635  * depending on which feature test macros are defined. By default,
2636  * this header is included by <time.h>.  X/Open and POSIX
2637  * standards requirements result in this header being included
2638  * by <time.h> only under a restricted set of conditions.
2639  */
2640 
2641 
2642 
2643 
2644 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2645 /*
2646  * CDDL HEADER START
2647  *
2648  * The contents of this file are subject to the terms of the
2649  * Common Development and Distribution License (the "License").
2650  * You may not use this file except in compliance with the License.
2651  *
2652  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2653  * or http://www.opensolaris.org/os/licensing.
2654  * See the License for the specific language governing permissions
2655  * and limitations under the License.
2656  *
2657  * When distributing Covered Code, include this CDDL HEADER in each
2658  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2659  * If applicable, add the following below this CDDL HEADER, with the
2660  * fields enclosed by brackets "[]" replaced with your own identifying
2661  * information: Portions Copyright [yyyy] [name of copyright owner]
2662  *
2663  * CDDL HEADER END
2664  */
2665 
2666 /*
2667  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2668  * Copyright 2016 Joyent, Inc.
2669  *
2670  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2671  * Use is subject to license terms.
2672  */
2673 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 2
2674 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
2675 /*
2676  * Time expressed in seconds and nanoseconds
2677  */
2678 
2679 typedef struct timespec { /* definition per POSIX.4 */
2680  time_t tv_sec; /* seconds */
2681  long tv_nsec; /* and nanoseconds */
2682 } timespec_t;
2683 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
2684 typedef struct timespec timestruc_t; /* definition per SVr4 */
2685 
2686 /*
2687  * The following has been left in for backward compatibility. Portable
2688  * applications should not use the structure name timestruc.
2689  */
2690 
2691 
2692 
2693 
2694 
2695 /*
2696  * Timer specification
2697  */
2698 typedef struct itimerspec { /* definition per POSIX.4 */
2699  struct timespec it_interval; /* timer period */
2700  struct timespec it_value; /* timer expiration */
2701 } itimerspec_t;
2702 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
2703 
2704 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
2705 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2706 /*	  All Rights Reserved  	*/
2707 
2708 
2709 /*
2710  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
2711  * All rights reserved.  The Berkeley software License Agreement
2712  * specifies the terms and conditions for redistribution.
2713  */
2714 
2715 /*
2716  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2717  *
2718  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2719  * Use is subject to license terms.
2720  *
2721  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2722  */
2723 
2724 /*
2725  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
2726  */
2727 
2728 
2729 
2730 
2731 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2732 /*
2733  * CDDL HEADER START
2734  *
2735  * The contents of this file are subject to the terms of the
2736  * Common Development and Distribution License (the "License").
2737  * You may not use this file except in compliance with the License.
2738  *
2739  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2740  * or http://www.opensolaris.org/os/licensing.
2741  * See the License for the specific language governing permissions
2742  * and limitations under the License.
2743  *
2744  * When distributing Covered Code, include this CDDL HEADER in each
2745  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2746  * If applicable, add the following below this CDDL HEADER, with the
2747  * fields enclosed by brackets "[]" replaced with your own identifying
2748  * information: Portions Copyright [yyyy] [name of copyright owner]
2749  *
2750  * CDDL HEADER END
2751  */
2752 
2753 /*
2754  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2755  * Copyright 2016 Joyent, Inc.
2756  *
2757  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2758  * Use is subject to license terms.
2759  */
2760 # 28 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2761 
2762 /*
2763  * Structure returned by gettimeofday(2) system call,
2764  * and used in other calls.
2765  */
2766 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2767 struct timeval {
2768  time_t tv_sec; /* seconds */
2769  suseconds_t tv_usec; /* and microseconds */
2770 };
2771 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2772 struct timezone {
2773  int tz_minuteswest; /* minutes west of Greenwich */
2774  int tz_dsttime; /* type of dst correction */
2775 };
2776 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2777 /*
2778  * Needed for longlong_t type.  Placement of this due to <sys/types.h>
2779  * including <sys/select.h> which relies on the presense of the itimerval
2780  * structure.
2781  */
2782 
2783 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
2784 /*
2785  * CDDL HEADER START
2786  *
2787  * The contents of this file are subject to the terms of the
2788  * Common Development and Distribution License (the "License").
2789  * You may not use this file except in compliance with the License.
2790  *
2791  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2792  * or http://www.opensolaris.org/os/licensing.
2793  * See the License for the specific language governing permissions
2794  * and limitations under the License.
2795  *
2796  * When distributing Covered Code, include this CDDL HEADER in each
2797  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2798  * If applicable, add the following below this CDDL HEADER, with the
2799  * fields enclosed by brackets "[]" replaced with your own identifying
2800  * information: Portions Copyright [yyyy] [name of copyright owner]
2801  *
2802  * CDDL HEADER END
2803  */
2804 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2805 /*	  All Rights Reserved  	*/
2806 
2807 
2808 /*
2809  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2810  * Use is subject to license terms.
2811  *
2812  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2813  * Copyright 2016 Joyent, Inc.
2814  */
2815 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2816 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2817 /*
2818  * Operations on timevals.
2819  */
2820 # 193 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2821 /*
2822  * Names of the interval timers, and structure
2823  * defining a timer setting.
2824  */
2825 
2826 
2827 
2828     /* time and when system is running on */
2829     /* behalf of the process. */
2830 
2831     /* time profiling of multithreaded */
2832     /* programs. */
2833 
2834 
2835 struct itimerval {
2836  struct timeval it_interval; /* timer interval */
2837  struct timeval it_value; /* current value */
2838 };
2839 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2840 /*
2841  *	Definitions for commonly used resolutions.
2842  */
2843 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2844 /*
2845  * Time expressed as a 64-bit nanosecond counter.
2846  */
2847 typedef longlong_t hrtime_t;
2848 # 386 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2849 int adjtime(struct timeval *, struct timeval *);
2850 
2851 
2852 
2853 
2854 int futimesat(int, const char *, const struct timeval *);
2855 
2856 
2857 
2858 
2859 
2860 int getitimer(int, struct itimerval *);
2861 int utimes(const char *, const struct timeval *);
2862 
2863 
2864 
2865 
2866 int setitimer(int, struct itimerval *,
2867  struct itimerval *);
2868 
2869 
2870 
2871 
2872 /*
2873  * gettimeofday() and settimeofday() were included in SVr4 due to their
2874  * common use in BSD based applications.  They were to be included exactly
2875  * as in BSD, with two parameters.  However, AT&T/USL noted that the second
2876  * parameter was unused and deleted it, thereby making a routine included
2877  * for compatibility, incompatible.
2878  *
2879  * XSH4.2 (spec 1170) defines gettimeofday and settimeofday to have two
2880  * parameters.
2881  *
2882  * This has caused general disagreement in the application community as to
2883  * the syntax of these routines.  Solaris defaults to the XSH4.2 definition.
2884  * The flag _SVID_GETTOD may be used to force the SVID version.
2885  */
2886 
2887 
2888 
2889 
2890 
2891 int settimeofday(struct timeval *, void *);
2892 
2893 hrtime_t gethrtime(void);
2894 hrtime_t gethrvtime(void);
2895 # 441 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2896 int gettimeofday(struct timeval *, void *);
2897 
2898 
2899 
2900 
2901 /*
2902  * The inclusion of <time.h> is historical and was added for
2903  * backward compatibility in delta 1.2 when a number of definitions
2904  * were moved out of <sys/time.h>.  More recently, the timespec and
2905  * itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
2906  * _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
2907  * which is now included by <time.h>.  This change was due to POSIX
2908  * 1003.1b-1993 and X/Open UNIX 98 requirements.  For non-POSIX and
2909  * non-X/Open applications, including this header will still make
2910  * visible these definitions.
2911  */
2912 
2913 
2914 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
2915 /*
2916  * CDDL HEADER START
2917  *
2918  * The contents of this file are subject to the terms of the
2919  * Common Development and Distribution License (the "License").
2920  * You may not use this file except in compliance with the License.
2921  *
2922  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2923  * or http://www.opensolaris.org/os/licensing.
2924  * See the License for the specific language governing permissions
2925  * and limitations under the License.
2926  *
2927  * When distributing Covered Code, include this CDDL HEADER in each
2928  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2929  * If applicable, add the following below this CDDL HEADER, with the
2930  * fields enclosed by brackets "[]" replaced with your own identifying
2931  * information: Portions Copyright [yyyy] [name of copyright owner]
2932  *
2933  * CDDL HEADER END
2934  */
2935 /*	Copyright (c) 1988 AT&T	*/
2936 /*	  All Rights Reserved  	*/
2937 
2938 
2939 /*
2940  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2941  *
2942  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
2943  * Use is subject to license terms.
2944  */
2945 /*
2946  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
2947  * Copyright 2016 Joyent, Inc.
2948  */
2949 # 460 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2950 
2951 
2952 /*
2953  * The inclusion of <sys/select.h> is needed for the FD_CLR,
2954  * FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
2955  * select() prototype defined in the XOpen specifications
2956  * beginning with XSH4v2.  Placement required after definition
2957  * for itimerval.
2958  */
2959 
2960 
2961 
2962 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
2963 /*
2964  * CDDL HEADER START
2965  *
2966  * The contents of this file are subject to the terms of the
2967  * Common Development and Distribution License (the "License").
2968  * You may not use this file except in compliance with the License.
2969  *
2970  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2971  * or http://www.opensolaris.org/os/licensing.
2972  * See the License for the specific language governing permissions
2973  * and limitations under the License.
2974  *
2975  * When distributing Covered Code, include this CDDL HEADER in each
2976  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2977  * If applicable, add the following below this CDDL HEADER, with the
2978  * fields enclosed by brackets "[]" replaced with your own identifying
2979  * information: Portions Copyright [yyyy] [name of copyright owner]
2980  *
2981  * CDDL HEADER END
2982  */
2983 
2984 /*
2985  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2986  *
2987  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2988  *
2989  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
2990  * Use is subject to license terms.
2991  */
2992 
2993 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2994 /*	  All Rights Reserved	*/
2995 
2996 /*
2997  * University Copyright- Copyright (c) 1982, 1986, 1988
2998  * The Regents of the University of California
2999  * All Rights Reserved
3000  *
3001  * University Acknowledgment- Portions of this document are derived from
3002  * software developed by the University of California, Berkeley, and its
3003  * contributors.
3004  */
3005 # 473 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
3006 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
3007 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3008 /*
3009  * The sigset_t type is defined in <sys/signal.h> and duplicated
3010  * in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
3011  * now allows the visibility of signal.h in this header, however
3012  * an order of inclusion problem occurs as a result of inclusion
3013  * of <sys/select.h> in <signal.h> under certain conditions.
3014  * Rather than include <sys/signal.h> here, we've duplicated
3015  * the sigset_t type instead. This type is required for the XPG6
3016  * introduced pselect() function also declared in this header.
3017  */
3018 
3019 
3020 typedef struct { /* signal set type */
3021  unsigned int __sigbits[4];
3022 } sigset_t;
3023 
3024 
3025 
3026 
3027 /*
3028  * Select uses bit masks of file descriptors in longs.
3029  * These macros manipulate such bit fields.
3030  * FD_SETSIZE may be defined by the user, but the default here
3031  * should be >= NOFILE (param.h).
3032  */
3033 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3034 typedef long fd_mask;
3035 
3036 typedef long fds_mask;
3037 
3038 /*
3039  *  The value of _NBBY needs to be consistant with the value
3040  *  of NBBY in <sys/param.h>.
3041  */
3042 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3043 typedef struct fd_set {
3044 
3045 
3046 
3047  long fds_bits[(((1024)+(((sizeof (fds_mask) * 8))-1))/((sizeof (fds_mask) * 8)))];
3048 } fd_set;
3049 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3050 extern int select(int, fd_set *, fd_set *,
3051  fd_set *, struct timeval *);
3052 
3053 
3054 extern int pselect(int, fd_set *, fd_set *,
3055  fd_set *, const struct timespec *,
3056  const sigset_t *);
3057 # 641 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3058 
3059 
3060 
3061 /*
3062  * _VOID was defined to be either void or char but this is not
3063  * required because previous SunOS compilers have accepted the void
3064  * type. However, because many system header and source files use the
3065  * void keyword, the volatile keyword, and ANSI C function prototypes,
3066  * non-ANSI compilers cannot compile the system anyway. The _VOID macro
3067  * should therefore not be used and remains for source compatibility
3068  * only.
3069  */
3070 /* CSTYLED */
3071 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3072 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
3073 /*
3074  * CDDL HEADER START
3075  *
3076  * The contents of this file are subject to the terms of the
3077  * Common Development and Distribution License, Version 1.0 only
3078  * (the "License").  You may not use this file except in compliance
3079  * with the License.
3080  *
3081  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3082  * or http://www.opensolaris.org/os/licensing.
3083  * See the License for the specific language governing permissions
3084  * and limitations under the License.
3085  *
3086  * When distributing Covered Code, include this CDDL HEADER in each
3087  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3088  * If applicable, add the following below this CDDL HEADER, with the
3089  * fields enclosed by brackets "[]" replaced with your own identifying
3090  * information: Portions Copyright [yyyy] [name of copyright owner]
3091  *
3092  * CDDL HEADER END
3093  */
3094 /*
3095  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3096  * Use is subject to license terms.
3097  */
3098 
3099 /*
3100  * Implementation-private.  This header should not be included
3101  * directly by an application.  The application should instead
3102  * include <time.h> which includes this header conditionally
3103  * depending on which feature test macros are defined. By default,
3104  * this header is included by <time.h>.  X/Open and POSIX
3105  * standards requirements result in this header being included
3106  * by <time.h> only under a restricted set of conditions.
3107  */
3108 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3109 
3110 
3111 /*
3112  * Allow global visibility for symbols defined in
3113  * C++ "std" namespace in <iso/time_iso.h>.
3114  */
3115 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3116 extern struct tm *gmtime_r(const time_t *,
3117    struct tm *);
3118 extern struct tm *localtime_r(const time_t *,
3119    struct tm *);
3120 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3121 extern char *strptime(const char *, const char *,
3122   struct tm *);
3123 
3124 
3125 
3126 
3127 
3128 /*
3129  * Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
3130  * definition of the sigevent structure.  Both require the inclusion
3131  * of <signal.h> and <time.h> when using the timer_create() function.
3132  * However, X/Open also specifies that the sigevent structure be defined
3133  * in <time.h> as described in the header <signal.h>.  This prevents
3134  * compiler warnings for applications that only include <time.h> and not
3135  * also <signal.h>.  The sigval union and the sigevent structure is
3136  * therefore defined both here and in <sys/siginfo.h> which gets included
3137  * via inclusion of <signal.h>.
3138  */
3139 
3140 
3141 union sigval {
3142  int sival_int; /* integer value */
3143  void *sival_ptr; /* pointer value */
3144 };
3145 
3146 
3147 
3148 
3149 struct sigevent {
3150  int sigev_notify; /* notification mode */
3151  int sigev_signo; /* signal number */
3152  union sigval sigev_value; /* signal value */
3153  void (*sigev_notify_function)(union sigval);
3154  pthread_attr_t *sigev_notify_attributes;
3155  int __sigev_pad2;
3156 };
3157 
3158 
3159 extern int clock_getres(clockid_t, struct timespec *);
3160 extern int clock_gettime(clockid_t, struct timespec *);
3161 extern int clock_settime(clockid_t, const struct timespec *);
3162 extern int timer_create(clockid_t, struct sigevent *,
3163   timer_t *);
3164 extern int timer_delete(timer_t);
3165 extern int timer_getoverrun(timer_t);
3166 extern int timer_gettime(timer_t, struct itimerspec *);
3167 extern int timer_settime(timer_t, int, const struct itimerspec *,
3168   struct itimerspec *);
3169 
3170 extern int nanosleep(const struct timespec *, struct timespec *);
3171 extern int clock_nanosleep(clockid_t, int,
3172  const struct timespec *, struct timespec *);
3173 
3174 
3175 
3176 
3177 
3178 
3179 extern void tzset(void);
3180 extern char *tzname[2];
3181 
3182 /* CLK_TCK marked as LEGACY in SUSv2 and removed in SUSv3 */
3183 
3184 
3185 extern long _sysconf(int); /* System Private interface to sysconf() */
3186 
3187     /* 3 is _SC_CLK_TCK */
3188 
3189 
3190 
3191 
3192 
3193 extern long timezone;
3194 extern int daylight;
3195 
3196 
3197 
3198 
3199 
3200 
3201 extern time_t timegm(struct tm *);
3202 extern int cftime(char *, char *, const time_t *);
3203 extern int ascftime(char *, const char *, const struct tm *);
3204 extern long altzone;
3205 
3206 
3207 
3208 
3209 extern struct tm *getdate(const char *);
3210 
3211 
3212 
3213 
3214 
3215 extern int getdate_err;
3216 
3217 
3218 
3219 /*
3220  * ctime_r() & asctime_r() prototypes are defined here.
3221  */
3222 
3223 /*
3224  * Previous releases of Solaris, starting at 2.3, provided definitions of
3225  * various functions as specified in POSIX.1c, Draft 6.  For some of these
3226  * functions, the final POSIX 1003.1c standard had a different number of
3227  * arguments and return values.
3228  *
3229  * The following segment of this header provides support for the standard
3230  * interfaces while supporting applications written under earlier
3231  * releases.  The application defines appropriate values of the feature
3232  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
3233  * whether it was written to expect the Draft 6 or standard versions of
3234  * these interfaces, before including this header.  This header then
3235  * provides a mapping from the source version of the interface to an
3236  * appropriate binary interface.  Such mappings permit an application
3237  * to be built from libraries and objects which have mixed expectations
3238  * of the definitions of these functions.
3239  *
3240  * For applications using the Draft 6 definitions, the binary symbol is the
3241  * same as the source symbol, and no explicit mapping is needed.  For the
3242  * standard interface, the function func() is mapped to the binary symbol
3243  * _posix_func().  The preferred mechanism for the remapping is a compiler
3244  * #pragma.  If the compiler does not provide such a #pragma, the header file
3245  * defines a static function func() which calls the _posix_func() version;
3246  * this has to be done instead of #define since POSIX specifies that an
3247  * application can #undef the symbol and still be bound to the correct
3248  * implementation.  Unfortunately, the statics confuse lint so we fallback to
3249  * #define in that case.
3250  *
3251  * NOTE: Support for the Draft 6 definitions is provided for compatibility
3252  * only.  New applications/libraries should use the standard definitions.
3253  */
3254 # 280 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3255 extern char *asctime_r(const struct tm *, char *, int);
3256 extern char *ctime_r(const time_t *, char *, int);
3257 # 292 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3258 typedef struct _locale *locale_t;
3259 
3260 
3261 extern size_t strftime_l(char *, size_t,
3262  const char *, const struct tm *, locale_t);
3263 
3264 
3265 
3266 
3267 
3268 /*
3269  * Note, the C11 standard requires that all the various base values that are
3270  * passed into timespec_get() be non-zero. Hence why TIME_UTC starts at one.
3271  */
3272 
3273 
3274 extern int timespec_get(struct timespec *, int);
3275 # 30 "open_package_datastream.c" 2
3276 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 1
3277 /*
3278  * CDDL HEADER START
3279  *
3280  * The contents of this file are subject to the terms of the
3281  * Common Development and Distribution License, Version 1.0 only
3282  * (the "License").  You may not use this file except in compliance
3283  * with the License.
3284  *
3285  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3286  * or http://www.opensolaris.org/os/licensing.
3287  * See the License for the specific language governing permissions
3288  * and limitations under the License.
3289  *
3290  * When distributing Covered Code, include this CDDL HEADER in each
3291  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3292  * If applicable, add the following below this CDDL HEADER, with the
3293  * fields enclosed by brackets "[]" replaced with your own identifying
3294  * information: Portions Copyright [yyyy] [name of copyright owner]
3295  *
3296  * CDDL HEADER END
3297  */
3298 /*
3299  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3300  */
3301 /*	Copyright (c) 1988 AT&T	*/
3302 /*	  All Rights Reserved  	*/
3303 
3304 
3305 
3306 
3307 
3308 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
3309 /*
3310  * CDDL HEADER START
3311  *
3312  * The contents of this file are subject to the terms of the
3313  * Common Development and Distribution License (the "License").
3314  * You may not use this file except in compliance with the License.
3315  *
3316  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3317  * or http://www.opensolaris.org/os/licensing.
3318  * See the License for the specific language governing permissions
3319  * and limitations under the License.
3320  *
3321  * When distributing Covered Code, include this CDDL HEADER in each
3322  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3323  * If applicable, add the following below this CDDL HEADER, with the
3324  * fields enclosed by brackets "[]" replaced with your own identifying
3325  * information: Portions Copyright [yyyy] [name of copyright owner]
3326  *
3327  * CDDL HEADER END
3328  */
3329 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3330 /*	  All Rights Reserved  	*/
3331 
3332 
3333 /*
3334  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3335  * Use is subject to license terms.
3336  *
3337  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3338  * Copyright 2016 Joyent, Inc.
3339  */
3340 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 2
3341 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
3342 /*
3343  * CDDL HEADER START
3344  *
3345  * The contents of this file are subject to the terms of the
3346  * Common Development and Distribution License, Version 1.0 only
3347  * (the "License").  You may not use this file except in compliance
3348  * with the License.
3349  *
3350  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3351  * or http://www.opensolaris.org/os/licensing.
3352  * See the License for the specific language governing permissions
3353  * and limitations under the License.
3354  *
3355  * When distributing Covered Code, include this CDDL HEADER in each
3356  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3357  * If applicable, add the following below this CDDL HEADER, with the
3358  * fields enclosed by brackets "[]" replaced with your own identifying
3359  * information: Portions Copyright [yyyy] [name of copyright owner]
3360  *
3361  * CDDL HEADER END
3362  */
3363 /*
3364  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3365  * Use is subject to license terms.
3366  */
3367 
3368 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3369 /*	  All Rights Reserved  	*/
3370 
3371 
3372 
3373 
3374 #pragma ident "%Z%%M%	%I%	%E% SMI"
3375 
3376 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3377 /*
3378  * CDDL HEADER START
3379  *
3380  * The contents of this file are subject to the terms of the
3381  * Common Development and Distribution License (the "License").
3382  * You may not use this file except in compliance with the License.
3383  *
3384  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3385  * or http://www.opensolaris.org/os/licensing.
3386  * See the License for the specific language governing permissions
3387  * and limitations under the License.
3388  *
3389  * When distributing Covered Code, include this CDDL HEADER in each
3390  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3391  * If applicable, add the following below this CDDL HEADER, with the
3392  * fields enclosed by brackets "[]" replaced with your own identifying
3393  * information: Portions Copyright [yyyy] [name of copyright owner]
3394  *
3395  * CDDL HEADER END
3396  */
3397 
3398 /*
3399  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3400  * Copyright 2016 Joyent, Inc.
3401  *
3402  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3403  * Use is subject to license terms.
3404  */
3405 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
3406 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
3407 /*
3408  * CDDL HEADER START
3409  *
3410  * The contents of this file are subject to the terms of the
3411  * Common Development and Distribution License (the "License").
3412  * You may not use this file except in compliance with the License.
3413  *
3414  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3415  * or http://www.opensolaris.org/os/licensing.
3416  * See the License for the specific language governing permissions
3417  * and limitations under the License.
3418  *
3419  * When distributing Covered Code, include this CDDL HEADER in each
3420  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3421  * If applicable, add the following below this CDDL HEADER, with the
3422  * fields enclosed by brackets "[]" replaced with your own identifying
3423  * information: Portions Copyright [yyyy] [name of copyright owner]
3424  *
3425  * CDDL HEADER END
3426  */
3427 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3428 /*	  All Rights Reserved  	*/
3429 
3430 
3431 /*
3432  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3433  * Use is subject to license terms.
3434  *
3435  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3436  * Copyright 2016 Joyent, Inc.
3437  */
3438 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
3439 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3440 /*
3441  * The union sigval is also defined in <time.h> as per X/Open and
3442  * POSIX requirements.
3443  */
3444 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3445 /*
3446  * The sigevent structure is also defined in <time.h> as per X/Open and
3447  * POSIX requirements.
3448  */
3449 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3450 /* values of sigev_notify */
3451 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3452 /*
3453  * negative signal codes are reserved for future use for user generated
3454  * signals
3455  */
3456 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3457 /*
3458  * Get the machine dependent signal codes (SIGILL, SIGFPE, SIGSEGV, and
3459  * SIGBUS) from <sys/machsig.h>
3460  */
3461 
3462 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 1
3463 /*
3464  * CDDL HEADER START
3465  *
3466  * The contents of this file are subject to the terms of the
3467  * Common Development and Distribution License, Version 1.0 only
3468  * (the "License").  You may not use this file except in compliance
3469  * with the License.
3470  *
3471  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3472  * or http://www.opensolaris.org/os/licensing.
3473  * See the License for the specific language governing permissions
3474  * and limitations under the License.
3475  *
3476  * When distributing Covered Code, include this CDDL HEADER in each
3477  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3478  * If applicable, add the following below this CDDL HEADER, with the
3479  * fields enclosed by brackets "[]" replaced with your own identifying
3480  * information: Portions Copyright [yyyy] [name of copyright owner]
3481  *
3482  * CDDL HEADER END
3483  */
3484 /*
3485  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
3486  * Use is subject to license terms.
3487  */
3488 
3489 /*	Copyright (c) 1988 AT&T	*/
3490 /*	  All Rights Reserved  	*/
3491 
3492 
3493 
3494 
3495 
3496 #pragma ident "%Z%%M%	%I%	%E% SMI"
3497 
3498 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3499 /*
3500  * CDDL HEADER START
3501  *
3502  * The contents of this file are subject to the terms of the
3503  * Common Development and Distribution License (the "License").
3504  * You may not use this file except in compliance with the License.
3505  *
3506  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3507  * or http://www.opensolaris.org/os/licensing.
3508  * See the License for the specific language governing permissions
3509  * and limitations under the License.
3510  *
3511  * When distributing Covered Code, include this CDDL HEADER in each
3512  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3513  * If applicable, add the following below this CDDL HEADER, with the
3514  * fields enclosed by brackets "[]" replaced with your own identifying
3515  * information: Portions Copyright [yyyy] [name of copyright owner]
3516  *
3517  * CDDL HEADER END
3518  */
3519 
3520 /*
3521  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3522  * Copyright 2016 Joyent, Inc.
3523  *
3524  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3525  * Use is subject to license terms.
3526  */
3527 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 2
3528 
3529 
3530 
3531 
3532 
3533 /*
3534  * machsig.h is the machine dependent portion of siginfo.h (and is
3535  * included by siginfo.h). A version of machsig.h should exist for
3536  * each architecture. The codes for SIGILL, SIGFPU, SIGSEGV and SIGBUS
3537  * are in this file. The codes for SIGTRAP, SIGCLD(SIGCHLD), and
3538  * SIGPOLL are architecture independent and may be found in siginfo.h.
3539  */
3540 
3541 
3542 
3543 
3544 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/vm/faultcode.h" 1
3545 /*
3546  * CDDL HEADER START
3547  *
3548  * The contents of this file are subject to the terms of the
3549  * Common Development and Distribution License (the "License").
3550  * You may not use this file except in compliance with the License.
3551  *
3552  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3553  * or http://www.opensolaris.org/os/licensing.
3554  * See the License for the specific language governing permissions
3555  * and limitations under the License.
3556  *
3557  * When distributing Covered Code, include this CDDL HEADER in each
3558  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3559  * If applicable, add the following below this CDDL HEADER, with the
3560  * fields enclosed by brackets "[]" replaced with your own identifying
3561  * information: Portions Copyright [yyyy] [name of copyright owner]
3562  *
3563  * CDDL HEADER END
3564  */
3565 /*
3566  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
3567  * Use is subject to license terms.
3568  */
3569 
3570 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3571 /*	  All Rights Reserved  	*/
3572 
3573 /*
3574  * University Copyright- Copyright (c) 1982, 1986, 1988
3575  * The Regents of the University of California
3576  * All Rights Reserved
3577  *
3578  * University Acknowledgment- Portions of this document are derived from
3579  * software developed by the University of California, Berkeley, and its
3580  * contributors.
3581  */
3582 
3583 
3584 
3585 
3586 #pragma ident "%Z%%M%	%I%	%E% SMI"
3587 
3588 
3589 
3590 
3591 
3592 /*
3593  * This file describes the data type returned by vm routines
3594  * which handle faults.
3595  *
3596  * If FC_CODE(fc) == FC_OBJERR, then FC_ERRNO(fc) contains the errno value
3597  * returned by the underlying object mapped at the fault address.
3598  */
3599 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/vm/faultcode.h"
3600 typedef int faultcode_t; /* type returned by vm fault routines */
3601 
3602 extern int fc_decode(faultcode_t);
3603 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 2
3604 
3605 
3606 /*
3607  * SIGILL signal codes
3608  */
3609 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h"
3610 /*
3611  * SIGEMT signal codes
3612  */
3613 
3614 
3615 
3616 
3617 
3618 
3619 /*
3620  * SIGFPE signal codes
3621  */
3622 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h"
3623 /*
3624  * SIGSEGV signal codes
3625  */
3626 
3627 
3628 
3629 
3630 
3631 
3632 
3633 /*
3634  * SIGBUS signal codes
3635  */
3636 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
3637 
3638 /*
3639  * SIGTRAP signal codes
3640  */
3641 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3642 /*
3643  * SIGCLD signal codes
3644  */
3645 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3646 /*
3647  * SIGPOLL signal codes
3648  */
3649 # 195 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3650 /*
3651  * SIGPROF signal codes
3652  */
3653 # 215 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3654 /*
3655  * Inclusion of <sys/time_impl.h> is needed for the declaration of
3656  * timestruc_t.  However, since inclusion of <sys/time_impl.h> results
3657  * in X/Open and POSIX namespace pollution, the definition for
3658  * timestruct_t has been duplicated in a standards namespace safe header
3659  * <sys/time_std_impl.h>.  In <sys/time_std_impl.h>, the structure
3660  * name, tag, and member names, as well as the type itself, all have
3661  * leading underscores to protect namespace.
3662  */
3663 
3664 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
3665 /*
3666  * CDDL HEADER START
3667  *
3668  * The contents of this file are subject to the terms of the
3669  * Common Development and Distribution License, Version 1.0 only
3670  * (the "License").  You may not use this file except in compliance
3671  * with the License.
3672  *
3673  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3674  * or http://www.opensolaris.org/os/licensing.
3675  * See the License for the specific language governing permissions
3676  * and limitations under the License.
3677  *
3678  * When distributing Covered Code, include this CDDL HEADER in each
3679  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3680  * If applicable, add the following below this CDDL HEADER, with the
3681  * fields enclosed by brackets "[]" replaced with your own identifying
3682  * information: Portions Copyright [yyyy] [name of copyright owner]
3683  *
3684  * CDDL HEADER END
3685  */
3686 /*
3687  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3688  * Use is subject to license terms.
3689  */
3690 
3691 /*
3692  * Implementation-private.  This header should not be included
3693  * directly by an application.  The application should instead
3694  * include <time.h> which includes this header conditionally
3695  * depending on which feature test macros are defined. By default,
3696  * this header is included by <time.h>.  X/Open and POSIX
3697  * standards requirements result in this header being included
3698  * by <time.h> only under a restricted set of conditions.
3699  */
3700 # 226 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
3701 
3702 
3703 
3704 
3705 /*
3706  * The inclusion of <sys/types.h> is needed for definitions of pid_t, etc.
3707  * Placement here is due to a dependency in <sys/select.h> which is included
3708  * by <sys/types.h> for the sigevent structure.  Hence this inclusion must
3709  * follow that definition.
3710  */
3711 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
3712 /*
3713  * CDDL HEADER START
3714  *
3715  * The contents of this file are subject to the terms of the
3716  * Common Development and Distribution License (the "License").
3717  * You may not use this file except in compliance with the License.
3718  *
3719  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3720  * or http://www.opensolaris.org/os/licensing.
3721  * See the License for the specific language governing permissions
3722  * and limitations under the License.
3723  *
3724  * When distributing Covered Code, include this CDDL HEADER in each
3725  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3726  * If applicable, add the following below this CDDL HEADER, with the
3727  * fields enclosed by brackets "[]" replaced with your own identifying
3728  * information: Portions Copyright [yyyy] [name of copyright owner]
3729  *
3730  * CDDL HEADER END
3731  */
3732 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3733 /*	  All Rights Reserved  	*/
3734 
3735 
3736 /*
3737  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3738  * Use is subject to license terms.
3739  *
3740  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3741  * Copyright 2016 Joyent, Inc.
3742  */
3743 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
3744 
3745 
3746 typedef struct siginfo { /* pollutes POSIX/XOPEN namespace */
3747 
3748 
3749 
3750  int si_signo; /* signal from signal.h	*/
3751  int si_code; /* code from above	*/
3752  int si_errno; /* error from errno.h	*/
3753 
3754 
3755 
3756  union {
3757 
3758   int __pad[((128 / sizeof (int)) - 3)]; /* for future growth	*/
3759 
3760   struct { /* kill(), SIGCLD, siqqueue() */
3761    pid_t __pid; /* process ID		*/
3762    union {
3763     struct {
3764      uid_t __uid;
3765 
3766 
3767      union sigval __value;
3768 
3769 
3770 
3771     } __kill;
3772     struct {
3773      clock_t __utime;
3774      int __status;
3775      clock_t __stime;
3776     } __cld;
3777    } __pdata;
3778    ctid_t __ctid; /* contract ID		*/
3779    zoneid_t __zoneid; /* zone ID		*/
3780   } __proc;
3781 
3782   struct { /* SIGSEGV, SIGBUS, SIGILL, SIGTRAP, SIGFPE */
3783    void *__addr; /* faulting address	*/
3784    int __trapno; /* illegal trap number	*/
3785    caddr_t __pc; /* instruction address	*/
3786   } __fault;
3787 
3788   struct { /* SIGPOLL, SIGXFSZ	*/
3789   /* fd not currently available for SIGPOLL */
3790    int __fd; /* file descriptor	*/
3791    long __band;
3792   } __file;
3793 
3794   struct { /* SIGPROF */
3795    caddr_t __faddr; /* last fault address	*/
3796 
3797    timestruc_t __tstamp; /* real time stamp	*/
3798 
3799 
3800 
3801    short __syscall; /* current syscall	*/
3802    char __nsysarg; /* number of arguments	*/
3803    char __fault; /* last fault type	*/
3804    long __sysarg[8]; /* syscall arguments	*/
3805    int __mstate[10]; /* see <sys/msacct.h>	*/
3806   } __prof;
3807 
3808   struct { /* SI_RCTL */
3809    int32_t __entity; /* type of entity exceeding */
3810   } __rctl;
3811  } __data;
3812 
3813 } siginfo_t;
3814 # 374 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3815 /*
3816  * XXX -- internal version is identical to siginfo_t but without the padding.
3817  * This must be maintained in sync with it.
3818  */
3819 
3820 
3821 
3822 typedef struct k_siginfo {
3823  int si_signo; /* signal from signal.h	*/
3824  int si_code; /* code from above	*/
3825  int si_errno; /* error from errno.h	*/
3826 
3827 
3828 
3829  union {
3830   struct { /* kill(), SIGCLD, siqqueue() */
3831    pid_t __pid; /* process ID		*/
3832    union {
3833     struct {
3834      uid_t __uid;
3835      union sigval __value;
3836     } __kill;
3837     struct {
3838      clock_t __utime;
3839      int __status;
3840      clock_t __stime;
3841     } __cld;
3842    } __pdata;
3843    ctid_t __ctid; /* contract ID		*/
3844    zoneid_t __zoneid; /* zone ID		*/
3845   } __proc;
3846 
3847   struct { /* SIGSEGV, SIGBUS, SIGILL, SIGTRAP, SIGFPE */
3848    void *__addr; /* faulting address	*/
3849    int __trapno; /* illegal trap number	*/
3850    caddr_t __pc; /* instruction address	*/
3851   } __fault;
3852 
3853   struct { /* SIGPOLL, SIGXFSZ	*/
3854   /* fd not currently available for SIGPOLL */
3855    int __fd; /* file descriptor	*/
3856    long __band;
3857   } __file;
3858 
3859   struct { /* SIGPROF */
3860    caddr_t __faddr; /* last fault address	*/
3861 
3862 
3863    timestruc_t __tstamp; /* real time stamp	*/
3864 
3865 
3866 
3867    short __syscall; /* current syscall	*/
3868    char __nsysarg; /* number of arguments	*/
3869    char __fault; /* last fault type	*/
3870    /* these are omitted to keep k_siginfo_t small	*/
3871    /* long	__sysarg[8]; */
3872    /* int	__mstate[10]; */
3873   } __prof;
3874 
3875   struct { /* SI_RCTL */
3876    int32_t __entity; /* type of entity exceeding */
3877   } __rctl;
3878 
3879  } __data;
3880 
3881 } k_siginfo_t;
3882 
3883 typedef struct sigqueue {
3884  struct sigqueue *sq_next;
3885  k_siginfo_t sq_info;
3886  void (*sq_func)(struct sigqueue *); /* destructor function */
3887  void *sq_backptr; /* pointer to the data structure */
3888      /* associated by sq_func()	*/
3889  int sq_external; /* comes from outside the contract */
3890 } sigqueue_t;
3891 
3892 /*  indication whether to queue the signal or not */
3893 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 2
3894 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
3895 /*
3896  * CDDL HEADER START
3897  *
3898  * The contents of this file are subject to the terms of the
3899  * Common Development and Distribution License, Version 1.0 only
3900  * (the "License").  You may not use this file except in compliance
3901  * with the License.
3902  *
3903  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3904  * or http://www.opensolaris.org/os/licensing.
3905  * See the License for the specific language governing permissions
3906  * and limitations under the License.
3907  *
3908  * When distributing Covered Code, include this CDDL HEADER in each
3909  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3910  * If applicable, add the following below this CDDL HEADER, with the
3911  * fields enclosed by brackets "[]" replaced with your own identifying
3912  * information: Portions Copyright [yyyy] [name of copyright owner]
3913  *
3914  * CDDL HEADER END
3915  */
3916 /*
3917  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3918  * Use is subject to license terms.
3919  */
3920 
3921 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3922 /*	  All Rights Reserved  	*/
3923 
3924 
3925 
3926 
3927 
3928 #pragma ident "%Z%%M%	%I%	%E% SMI"
3929 
3930 
3931 
3932 
3933 
3934 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3935 /*
3936  * CDDL HEADER START
3937  *
3938  * The contents of this file are subject to the terms of the
3939  * Common Development and Distribution License (the "License").
3940  * You may not use this file except in compliance with the License.
3941  *
3942  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3943  * or http://www.opensolaris.org/os/licensing.
3944  * See the License for the specific language governing permissions
3945  * and limitations under the License.
3946  *
3947  * When distributing Covered Code, include this CDDL HEADER in each
3948  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3949  * If applicable, add the following below this CDDL HEADER, with the
3950  * fields enclosed by brackets "[]" replaced with your own identifying
3951  * information: Portions Copyright [yyyy] [name of copyright owner]
3952  *
3953  * CDDL HEADER END
3954  */
3955 
3956 /*
3957  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3958  * Copyright 2016 Joyent, Inc.
3959  *
3960  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3961  * Use is subject to license terms.
3962  */
3963 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
3964 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
3965 /*
3966  * CDDL HEADER START
3967  *
3968  * The contents of this file are subject to the terms of the
3969  * Common Development and Distribution License (the "License").
3970  * You may not use this file except in compliance with the License.
3971  *
3972  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3973  * or http://www.opensolaris.org/os/licensing.
3974  * See the License for the specific language governing permissions
3975  * and limitations under the License.
3976  *
3977  * When distributing Covered Code, include this CDDL HEADER in each
3978  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3979  * If applicable, add the following below this CDDL HEADER, with the
3980  * fields enclosed by brackets "[]" replaced with your own identifying
3981  * information: Portions Copyright [yyyy] [name of copyright owner]
3982  *
3983  * CDDL HEADER END
3984  */
3985 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3986 /*	  All Rights Reserved  	*/
3987 
3988 
3989 /*
3990  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3991  * Use is subject to license terms.
3992  *
3993  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3994  * Copyright 2016 Joyent, Inc.
3995  */
3996 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
3997 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 1
3998 /*
3999  * CDDL HEADER START
4000  *
4001  * The contents of this file are subject to the terms of the
4002  * Common Development and Distribution License (the "License").
4003  * You may not use this file except in compliance with the License.
4004  *
4005  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4006  * or http://www.opensolaris.org/os/licensing.
4007  * See the License for the specific language governing permissions
4008  * and limitations under the License.
4009  *
4010  * When distributing Covered Code, include this CDDL HEADER in each
4011  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4012  * If applicable, add the following below this CDDL HEADER, with the
4013  * fields enclosed by brackets "[]" replaced with your own identifying
4014  * information: Portions Copyright [yyyy] [name of copyright owner]
4015  *
4016  * CDDL HEADER END
4017  */
4018 
4019 /*
4020  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
4021  * Use is subject to license terms.
4022  */
4023 
4024 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4025 /*	  All Rights Reserved  	*/
4026 
4027 /*
4028  * University Copyright- Copyright (c) 1982, 1986, 1988
4029  * The Regents of the University of California
4030  * All Rights Reserved
4031  *
4032  * University Acknowledgment- Portions of this document are derived from
4033  * software developed by the University of California, Berkeley, and its
4034  * contributors.
4035  */
4036 
4037 
4038 
4039 
4040 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4041 /*
4042  * CDDL HEADER START
4043  *
4044  * The contents of this file are subject to the terms of the
4045  * Common Development and Distribution License (the "License").
4046  * You may not use this file except in compliance with the License.
4047  *
4048  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4049  * or http://www.opensolaris.org/os/licensing.
4050  * See the License for the specific language governing permissions
4051  * and limitations under the License.
4052  *
4053  * When distributing Covered Code, include this CDDL HEADER in each
4054  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4055  * If applicable, add the following below this CDDL HEADER, with the
4056  * fields enclosed by brackets "[]" replaced with your own identifying
4057  * information: Portions Copyright [yyyy] [name of copyright owner]
4058  *
4059  * CDDL HEADER END
4060  */
4061 
4062 /*
4063  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4064  * Copyright 2016 Joyent, Inc.
4065  *
4066  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4067  * Use is subject to license terms.
4068  */
4069 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
4070 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 1
4071 /*
4072  * CDDL HEADER START
4073  *
4074  * The contents of this file are subject to the terms of the
4075  * Common Development and Distribution License (the "License").
4076  * You may not use this file except in compliance with the License.
4077  *
4078  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4079  * or http://www.opensolaris.org/os/licensing.
4080  * See the License for the specific language governing permissions
4081  * and limitations under the License.
4082  *
4083  * When distributing Covered Code, include this CDDL HEADER in each
4084  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4085  * If applicable, add the following below this CDDL HEADER, with the
4086  * fields enclosed by brackets "[]" replaced with your own identifying
4087  * information: Portions Copyright [yyyy] [name of copyright owner]
4088  *
4089  * CDDL HEADER END
4090  */
4091 
4092 /*
4093  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
4094  * Use is subject to license terms.
4095  */
4096 
4097 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4098 /*	  All Rights Reserved  	*/
4099 
4100 /*
4101  * An application should not include this header directly.  Instead it
4102  * should be included only through the inclusion of other Sun headers.
4103  *
4104  * The contents of this header is limited to identifiers specified in the
4105  * C Standard.  Any new identifiers specified in future amendments to the
4106  * C Standard must be placed in this header.  If these new identifiers
4107  * are required to also be in the C++ Standard "std" namespace, then for
4108  * anything other than macro definitions, corresponding "using" directives
4109  * must also be added to <sys/signal.h.h>.
4110  */
4111 
4112 
4113 
4114 
4115 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
4116 /*
4117  * CDDL HEADER START
4118  *
4119  * The contents of this file are subject to the terms of the
4120  * Common Development and Distribution License (the "License").
4121  * You may not use this file except in compliance with the License.
4122  *
4123  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4124  * or http://www.opensolaris.org/os/licensing.
4125  * See the License for the specific language governing permissions
4126  * and limitations under the License.
4127  *
4128  * When distributing Covered Code, include this CDDL HEADER in each
4129  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4130  * If applicable, add the following below this CDDL HEADER, with the
4131  * fields enclosed by brackets "[]" replaced with your own identifying
4132  * information: Portions Copyright [yyyy] [name of copyright owner]
4133  *
4134  * CDDL HEADER END
4135  */
4136 
4137 /*
4138  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
4139  *	  All Rights Reserved
4140  *
4141  */
4142 
4143 /*
4144  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4145  * Use is subject to license terms.
4146  */
4147 
4148 /*
4149  * WARNING: This is an implementation-specific header,
4150  * its contents are not guaranteed. Applications
4151  * should include <unistd.h> and not this header.
4152  */
4153 
4154 
4155 
4156 
4157 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4158 /*
4159  * CDDL HEADER START
4160  *
4161  * The contents of this file are subject to the terms of the
4162  * Common Development and Distribution License (the "License").
4163  * You may not use this file except in compliance with the License.
4164  *
4165  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4166  * or http://www.opensolaris.org/os/licensing.
4167  * See the License for the specific language governing permissions
4168  * and limitations under the License.
4169  *
4170  * When distributing Covered Code, include this CDDL HEADER in each
4171  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4172  * If applicable, add the following below this CDDL HEADER, with the
4173  * fields enclosed by brackets "[]" replaced with your own identifying
4174  * information: Portions Copyright [yyyy] [name of copyright owner]
4175  *
4176  * CDDL HEADER END
4177  */
4178 
4179 /*
4180  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4181  * Copyright 2016 Joyent, Inc.
4182  *
4183  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4184  * Use is subject to license terms.
4185  */
4186 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 2
4187 
4188 
4189 
4190 
4191 
4192 /* command names for confstr */
4193 
4194 
4195 
4196 /*
4197  * command names for large file configuration information
4198  */
4199 /* large file compilation environment configuration */
4200 
4201 
4202 
4203 
4204 /* transitional large file interface configuration */
4205 
4206 
4207 
4208 
4209 
4210 /* UNIX 98 */
4211 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4212 /* UNIX 03 */
4213 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4214 /* command names for POSIX sysconf */
4215 
4216 /* POSIX.1 names */
4217 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4218 /* SVR4 names */
4219 
4220 
4221 
4222 
4223 /* 13 reserved for SVr4-ES/MP _SC_NACLS_MAX */
4224 
4225 
4226 
4227 
4228 /* POSIX.4 names */
4229 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4230 /* XPG4 names */
4231 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4232 /* additional XSH4/XCU4 command names for sysconf */
4233 
4234 
4235 
4236 /* additional XPG4v2 (UNIX 95) command names */
4237 
4238 
4239 
4240 
4241 
4242 /* defined for XTI (XNS Issue 5) */
4243 
4244 
4245 
4246 
4247 
4248 
4249 
4250 /*
4251  * Hardware specific items
4252  * Note that not all items are supported on all architectures
4253  */
4254 # 214 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4255 /*
4256  * POSIX.1c (pthreads) names. These values are defined above
4257  * the sub-500 range. See psarc case 1995/257.
4258  */
4259 # 235 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4260 /* UNIX 98 */
4261 # 244 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4262 /* UNIX 03 */
4263 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4264 /* command names for POSIX pathconf */
4265 
4266 /* POSIX.1 names */
4267 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4268 /* POSIX.4 names */
4269 
4270 
4271 
4272 /* UNIX 03 names */
4273 # 315 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4274 /* UNIX 08 names */
4275 
4276 
4277 /*
4278  * Large File Summit names
4279  *
4280  * This value matches the MIPS ABI choice, but leaves a large gap in the
4281  * value space.
4282  */
4283 
4284 
4285 /*
4286  * Extended attributes
4287  */
4288 
4289 
4290 
4291 /*
4292  * If you add a _PC define above 101, you must change _PC_LAST (and truss).
4293  */
4294 
4295 
4296 /*
4297  * Case sensitivity values (related to _PC_CASE_BEHAVIOR)
4298  */
4299 
4300 
4301 
4302 /*
4303  * The value of 0 is returned when
4304  * ACL's are not supported
4305  */
4306 # 366 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4307 /*
4308  * Marked LEGACY in SUSv2 and removed in SUSv3. Though SUSv3 applications
4309  * should not rely on this value, it has been aligned with the current
4310  * standard to avoid confusion if used.
4311  */
4312 # 408 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
4313 /* UNIX 03 names */
4314 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 2
4315 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h"
4316 /* insert new signals here, and move _SIGRTM* appropriately */
4317 
4318 
4319 extern long _sysconf(int); /* System Private interface to sysconf() */
4320 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
4321 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4322 /*
4323  * We need <sys/siginfo.h> for the declaration of siginfo_t.
4324  */
4325 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
4326 /*
4327  * CDDL HEADER START
4328  *
4329  * The contents of this file are subject to the terms of the
4330  * Common Development and Distribution License, Version 1.0 only
4331  * (the "License").  You may not use this file except in compliance
4332  * with the License.
4333  *
4334  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4335  * or http://www.opensolaris.org/os/licensing.
4336  * See the License for the specific language governing permissions
4337  * and limitations under the License.
4338  *
4339  * When distributing Covered Code, include this CDDL HEADER in each
4340  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4341  * If applicable, add the following below this CDDL HEADER, with the
4342  * fields enclosed by brackets "[]" replaced with your own identifying
4343  * information: Portions Copyright [yyyy] [name of copyright owner]
4344  *
4345  * CDDL HEADER END
4346  */
4347 /*
4348  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4349  * Use is subject to license terms.
4350  */
4351 
4352 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4353 /*	  All Rights Reserved  	*/
4354 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
4355 
4356 
4357 /* Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements */
4358 
4359 
4360 
4361 
4362 
4363 
4364 
4365 typedef struct {
4366  unsigned int __sigbits[3];
4367 } k_sigset_t;
4368 
4369 /*
4370  * The signal handler routine can have either one or three arguments.
4371  * Existing C code has used either form so not specifing the arguments
4372  * neatly finesses the problem.  C++ doesn't accept this.  To C++
4373  * "(*sa_handler)()" indicates a routine with no arguments (ANSI C would
4374  * specify this as "(*sa_handler)(void)").  One or the other form must be
4375  * used for C++ and the only logical choice is "(*sa_handler)(int)" to allow
4376  * the SIG_* defines to work.  "(*sa_sigaction)(int, siginfo_t *, void *)"
4377  * can be used for the three argument form.
4378  */
4379 
4380 /*
4381  * Note: storage overlap by sa_handler and sa_sigaction
4382  */
4383 struct sigaction {
4384  int sa_flags;
4385  union {
4386 
4387 
4388 
4389   void (*_handler)();
4390 
4391 
4392 
4393 
4394   void (*_sigaction)(int, siginfo_t *, void *);
4395 
4396  } _funcptr;
4397  sigset_t sa_mask;
4398 
4399  int sa_resv[2];
4400 
4401 };
4402 # 126 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4403 /* this is only valid for SIGCLD */
4404 
4405 
4406 
4407 
4408 
4409 
4410 
4411    /* non-conformant ANSI compilation	*/
4412 
4413 /* definitions for the sa_flags field */
4414 # 153 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4415 /* this is only valid for SIGCLD */
4416 
4417 
4418 
4419 /*
4420  * use of these symbols by applications is injurious
4421  *	to binary compatibility
4422  */
4423 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4424 /* Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements. */
4425 
4426 
4427 
4428 typedef struct sigaltstack {
4429 
4430 
4431 
4432  void *ss_sp;
4433  size_t ss_size;
4434  int ss_flags;
4435 } stack_t;
4436 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4437 /* signotify id used only by libc for mq_notify()/aio_notify() */
4438 typedef struct signotify_id { /* signotify id struct		*/
4439  pid_t sn_pid; /* pid of proc to be notified	*/
4440  int sn_index; /* index in preallocated pool	*/
4441  int sn_pad; /* reserved			*/
4442 } signotify_id_t;
4443 # 222 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4444 /* Command codes for sig_notify call */
4445 
4446 
4447 
4448 
4449 
4450 
4451 
4452 /* Added as per XPG4v2 */
4453 
4454 
4455 
4456 struct sigstack {
4457  void *ss_sp;
4458  int ss_onstack;
4459 };
4460 
4461 
4462 /*
4463  * For definition of ucontext_t; must follow struct definition
4464  * for  sigset_t
4465  */
4466 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
4467 
4468 /*
4469  *	This file defines the data needed to specify a set of
4470  *	processes.  These types are used by the sigsend, sigsendset,
4471  *	priocntl, priocntlset, waitid, evexit, and evexitset system
4472  *	calls.
4473  */
4474 
4475 
4476 
4477 
4478 
4479 /*
4480  *	The following defines the values for an identifier type.  It
4481  *	specifies the interpretation of an id value.  An idtype and
4482  *	id together define a simple set of processes.
4483  */
4484 typedef enum
4485 
4486  idtype /* pollutes XPG4.2 namespace */
4487 
4488   {
4489  P_PID, /* A process identifier.		*/
4490  P_PPID, /* A parent process identifier.		*/
4491  P_PGID, /* A process group (job control group)	*/
4492    /* identifier.				*/
4493  P_SID, /* A session identifier.		*/
4494  P_CID, /* A scheduling class identifier.	*/
4495  P_UID, /* A user identifier.			*/
4496  P_GID, /* A group identifier.			*/
4497  P_ALL, /* All processes.			*/
4498  P_LWPID, /* An LWP identifier.			*/
4499  P_TASKID, /* A task identifier.			*/
4500  P_PROJID, /* A project identifier.		*/
4501  P_POOLID, /* A pool identifier.			*/
4502  P_ZONEID, /* A zone identifier.			*/
4503  P_CTID, /* A (process) contract identifier.	*/
4504  P_CPUID, /* CPU identifier.			*/
4505  P_PSETID /* Processor set identifier		*/
4506 } idtype_t;
4507 
4508 
4509 /*
4510  *	The following defines the operations which can be performed to
4511  *	combine two simple sets of processes to form another set of
4512  *	processes.
4513  */
4514 
4515 typedef enum idop {
4516  POP_DIFF, /* Set difference.  The processes which	*/
4517    /* are in the left operand set and not	*/
4518    /* in the right operand set.		*/
4519  POP_AND, /* Set disjunction.  The processes	*/
4520    /* which are in both the left and right	*/
4521    /* operand sets.			*/
4522  POP_OR, /* Set conjunction.  The processes	*/
4523    /* which are in either the left or the	*/
4524    /* right operand sets (or both).	*/
4525  POP_XOR /* Set exclusive or.  The processes 	*/
4526    /* which are in either the left or	*/
4527    /* right operand sets but not in both.	*/
4528 } idop_t;
4529 
4530 
4531 /*
4532  *	The following structure is used to define a set of processes.
4533  *	The set is defined in terms of two simple sets of processes
4534  *	and an operator which operates on these two operand sets.
4535  */
4536 typedef struct procset {
4537  idop_t p_op; /* The operator connection the	*/
4538     /* following two operands each	*/
4539     /* of which is a simple set of	*/
4540     /* processes.			*/
4541 
4542  idtype_t p_lidtype;
4543     /* The type of the left operand	*/
4544     /* simple set.			*/
4545  id_t p_lid; /* The id of the left operand.	*/
4546 
4547  idtype_t p_ridtype;
4548     /* The type of the right	*/
4549     /* operand simple set.		*/
4550  id_t p_rid; /* The id of the right operand.	*/
4551 } procset_t;
4552 
4553 /*
4554  *	The following macro can be used to initialize a procset_t
4555  *	structure.
4556  */
4557 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 2
4558 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 1
4559 /*
4560  * CDDL HEADER START
4561  *
4562  * The contents of this file are subject to the terms of the
4563  * Common Development and Distribution License, Version 1.0 only
4564  * (the "License").  You may not use this file except in compliance
4565  * with the License.
4566  *
4567  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4568  * or http://www.opensolaris.org/os/licensing.
4569  * See the License for the specific language governing permissions
4570  * and limitations under the License.
4571  *
4572  * When distributing Covered Code, include this CDDL HEADER in each
4573  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4574  * If applicable, add the following below this CDDL HEADER, with the
4575  * fields enclosed by brackets "[]" replaced with your own identifying
4576  * information: Portions Copyright [yyyy] [name of copyright owner]
4577  *
4578  * CDDL HEADER END
4579  */
4580 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4581 /*	  All Rights Reserved  	*/
4582 
4583 /*
4584  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4585  *
4586  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4587  * Use is subject to license terms.
4588  */
4589 
4590 
4591 
4592 
4593 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4594 /*
4595  * CDDL HEADER START
4596  *
4597  * The contents of this file are subject to the terms of the
4598  * Common Development and Distribution License (the "License").
4599  * You may not use this file except in compliance with the License.
4600  *
4601  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4602  * or http://www.opensolaris.org/os/licensing.
4603  * See the License for the specific language governing permissions
4604  * and limitations under the License.
4605  *
4606  * When distributing Covered Code, include this CDDL HEADER in each
4607  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4608  * If applicable, add the following below this CDDL HEADER, with the
4609  * fields enclosed by brackets "[]" replaced with your own identifying
4610  * information: Portions Copyright [yyyy] [name of copyright owner]
4611  *
4612  * CDDL HEADER END
4613  */
4614 
4615 /*
4616  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4617  * Copyright 2016 Joyent, Inc.
4618  *
4619  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4620  * Use is subject to license terms.
4621  */
4622 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
4623 
4624 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4625 /*
4626  * CDDL HEADER START
4627  *
4628  * The contents of this file are subject to the terms of the
4629  * Common Development and Distribution License (the "License").
4630  * You may not use this file except in compliance with the License.
4631  *
4632  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4633  * or http://www.opensolaris.org/os/licensing.
4634  * See the License for the specific language governing permissions
4635  * and limitations under the License.
4636  *
4637  * When distributing Covered Code, include this CDDL HEADER in each
4638  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4639  * If applicable, add the following below this CDDL HEADER, with the
4640  * fields enclosed by brackets "[]" replaced with your own identifying
4641  * information: Portions Copyright [yyyy] [name of copyright owner]
4642  *
4643  * CDDL HEADER END
4644  */
4645 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4646 /*	  All Rights Reserved  	*/
4647 
4648 
4649 /*
4650  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4651  * Use is subject to license terms.
4652  *
4653  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4654  * Copyright 2016 Joyent, Inc.
4655  */
4656 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
4657 
4658 
4659 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 1
4660 /*
4661  * CDDL HEADER START
4662  *
4663  * The contents of this file are subject to the terms of the
4664  * Common Development and Distribution License (the "License").
4665  * You may not use this file except in compliance with the License.
4666  *
4667  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4668  * or http://www.opensolaris.org/os/licensing.
4669  * See the License for the specific language governing permissions
4670  * and limitations under the License.
4671  *
4672  * When distributing Covered Code, include this CDDL HEADER in each
4673  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4674  * If applicable, add the following below this CDDL HEADER, with the
4675  * fields enclosed by brackets "[]" replaced with your own identifying
4676  * information: Portions Copyright [yyyy] [name of copyright owner]
4677  *
4678  * CDDL HEADER END
4679  */
4680 /*
4681  * Copyright 2014 Garrrett D'Amore <garrett@damore.org>
4682  *
4683  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4684  * Use is subject to license terms.
4685  */
4686 
4687 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4688 /*	  All Rights Reserved  	*/
4689 
4690 /*
4691  * University Copyright- Copyright (c) 1982, 1986, 1988
4692  * The Regents of the University of California
4693  * All Rights Reserved
4694  *
4695  * University Acknowledgment- Portions of this document are derived from
4696  * software developed by the University of California, Berkeley, and its
4697  * contributors.
4698  */
4699 
4700 
4701 
4702 
4703 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4704 /*
4705  * CDDL HEADER START
4706  *
4707  * The contents of this file are subject to the terms of the
4708  * Common Development and Distribution License (the "License").
4709  * You may not use this file except in compliance with the License.
4710  *
4711  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4712  * or http://www.opensolaris.org/os/licensing.
4713  * See the License for the specific language governing permissions
4714  * and limitations under the License.
4715  *
4716  * When distributing Covered Code, include this CDDL HEADER in each
4717  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4718  * If applicable, add the following below this CDDL HEADER, with the
4719  * fields enclosed by brackets "[]" replaced with your own identifying
4720  * information: Portions Copyright [yyyy] [name of copyright owner]
4721  *
4722  * CDDL HEADER END
4723  */
4724 
4725 /*
4726  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4727  * Copyright 2016 Joyent, Inc.
4728  *
4729  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4730  * Use is subject to license terms.
4731  */
4732 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
4733 
4734 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4735 /*
4736  * CDDL HEADER START
4737  *
4738  * The contents of this file are subject to the terms of the
4739  * Common Development and Distribution License (the "License").
4740  * You may not use this file except in compliance with the License.
4741  *
4742  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4743  * or http://www.opensolaris.org/os/licensing.
4744  * See the License for the specific language governing permissions
4745  * and limitations under the License.
4746  *
4747  * When distributing Covered Code, include this CDDL HEADER in each
4748  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4749  * If applicable, add the following below this CDDL HEADER, with the
4750  * fields enclosed by brackets "[]" replaced with your own identifying
4751  * information: Portions Copyright [yyyy] [name of copyright owner]
4752  *
4753  * CDDL HEADER END
4754  */
4755 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4756 /*	  All Rights Reserved  	*/
4757 
4758 
4759 /*
4760  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4761  * Use is subject to license terms.
4762  *
4763  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4764  * Copyright 2016 Joyent, Inc.
4765  */
4766 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
4767 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
4768 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4769 /*	  All Rights Reserved  	*/
4770 
4771 
4772 /*
4773  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
4774  * All rights reserved.  The Berkeley software License Agreement
4775  * specifies the terms and conditions for redistribution.
4776  */
4777 
4778 /*
4779  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4780  *
4781  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4782  * Use is subject to license terms.
4783  *
4784  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4785  */
4786 
4787 /*
4788  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
4789  */
4790 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h" 2
4791 
4792 
4793 
4794 
4795 
4796 /*
4797  * Process priority specifications
4798  */
4799 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4800 /*
4801  * Resource limits
4802  */
4803 # 91 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4804 /*
4805  * The definitions of the following types and constants differ between the
4806  * regular and large file compilation environments.
4807  */
4808 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4809 typedef u_longlong_t rlim_t;
4810 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4811 struct rlimit {
4812  rlim_t rlim_cur; /* current limit */
4813  rlim_t rlim_max; /* maximum value for rlim_cur */
4814 };
4815 
4816 /* transitional large file interface versions */
4817 
4818 
4819 typedef u_longlong_t rlim64_t;
4820 
4821 
4822 
4823 
4824 
4825 struct rlimit64 {
4826  rlim64_t rlim_cur; /* current limit */
4827  rlim64_t rlim_max; /* maximum value for rlim_cur */
4828 };
4829 
4830 
4831 
4832 /*
4833  * Although the saved rlimits were initially introduced by the large file API,
4834  * they are now available for all resource limits on the 64-bit kernel and for
4835  * cpu time and file size limits on the 32-bit kernel.
4836  */
4837 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4838 struct rusage {
4839  struct timeval ru_utime; /* user time used */
4840  struct timeval ru_stime; /* system time used */
4841  long ru_maxrss; /* <unimp> */
4842  long ru_ixrss; /* <unimp> */
4843  long ru_idrss; /* <unimp> */
4844  long ru_isrss; /* <unimp> */
4845  long ru_minflt; /* any page faults not requiring I/O */
4846  long ru_majflt; /* any page faults requiring I/O */
4847  long ru_nswap; /* swaps */
4848  long ru_inblock; /* block input operations */
4849  long ru_oublock; /* block output operations */
4850  long ru_msgsnd; /* streams messsages sent */
4851  long ru_msgrcv; /* streams messages received */
4852  long ru_nsignals; /* signals received */
4853  long ru_nvcsw; /* voluntary context switches */
4854  long ru_nivcsw; /* involuntary " */
4855 };
4856 # 233 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4857 /*
4858  * large file compilation environment setup
4859  */
4860 
4861 
4862 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4863 #pragma redefine_extname setrlimit setrlimit64
4864 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4865 
4866 
4867 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4868 #pragma redefine_extname getrlimit getrlimit64
4869 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4870 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/resource.h"
4871 extern int setrlimit(int, const struct rlimit *);
4872 extern int getrlimit(int, struct rlimit *);
4873 
4874 /* transitional large file interfaces */
4875 
4876 
4877 extern int setrlimit64(int, const struct rlimit64 *);
4878 extern int getrlimit64(int, struct rlimit64 *);
4879 
4880 
4881 extern int getpriority(int, id_t);
4882 extern int setpriority(int, id_t, int);
4883 extern int getrusage(int, struct rusage *);
4884 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
4885 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
4886 /*
4887  * CDDL HEADER START
4888  *
4889  * The contents of this file are subject to the terms of the
4890  * Common Development and Distribution License, Version 1.0 only
4891  * (the "License").  You may not use this file except in compliance
4892  * with the License.
4893  *
4894  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4895  * or http://www.opensolaris.org/os/licensing.
4896  * See the License for the specific language governing permissions
4897  * and limitations under the License.
4898  *
4899  * When distributing Covered Code, include this CDDL HEADER in each
4900  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4901  * If applicable, add the following below this CDDL HEADER, with the
4902  * fields enclosed by brackets "[]" replaced with your own identifying
4903  * information: Portions Copyright [yyyy] [name of copyright owner]
4904  *
4905  * CDDL HEADER END
4906  */
4907 /*
4908  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4909  * Use is subject to license terms.
4910  */
4911 
4912 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4913 /*	  All Rights Reserved  	*/
4914 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
4915 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
4916 /*
4917  * CDDL HEADER START
4918  *
4919  * The contents of this file are subject to the terms of the
4920  * Common Development and Distribution License, Version 1.0 only
4921  * (the "License").  You may not use this file except in compliance
4922  * with the License.
4923  *
4924  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4925  * or http://www.opensolaris.org/os/licensing.
4926  * See the License for the specific language governing permissions
4927  * and limitations under the License.
4928  *
4929  * When distributing Covered Code, include this CDDL HEADER in each
4930  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4931  * If applicable, add the following below this CDDL HEADER, with the
4932  * fields enclosed by brackets "[]" replaced with your own identifying
4933  * information: Portions Copyright [yyyy] [name of copyright owner]
4934  *
4935  * CDDL HEADER END
4936  */
4937 /*
4938  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4939  * Use is subject to license terms.
4940  */
4941 
4942 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4943 /*	  All Rights Reserved  	*/
4944 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h" 2
4945 
4946 
4947 
4948 
4949 
4950 
4951 /*
4952  * arguments to wait functions
4953  */
4954 # 66 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h"
4955 /*
4956  * macros for stat return from wait functions
4957  */
4958 # 98 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/wait.h"
4959 extern pid_t wait(int *);
4960 extern pid_t waitpid(pid_t, int *, int);
4961 
4962 
4963 extern int waitid(idtype_t, id_t, siginfo_t *, int);
4964 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
4965 
4966 extern pid_t wait3(int *, int, struct rusage *);
4967 
4968 
4969 
4970 
4971 extern pid_t wait4(pid_t, int *, int, struct rusage *);
4972 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/wait.h" 2
4973 
4974 
4975 
4976 
4977 
4978 extern pid_t wait(int *);
4979 extern pid_t waitpid(pid_t, int *, int);
4980 extern int waitid(idtype_t, id_t, siginfo_t *, int);
4981 # 31 "open_package_datastream.c" 2
4982 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1
4983 /*
4984  * CDDL HEADER START
4985  *
4986  * The contents of this file are subject to the terms of the
4987  * Common Development and Distribution License (the "License").
4988  * You may not use this file except in compliance with the License.
4989  *
4990  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4991  * or http://www.opensolaris.org/os/licensing.
4992  * See the License for the specific language governing permissions
4993  * and limitations under the License.
4994  *
4995  * When distributing Covered Code, include this CDDL HEADER in each
4996  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4997  * If applicable, add the following below this CDDL HEADER, with the
4998  * fields enclosed by brackets "[]" replaced with your own identifying
4999  * information: Portions Copyright [yyyy] [name of copyright owner]
5000  *
5001  * CDDL HEADER END
5002  */
5003 
5004 /*
5005  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5006  * Copyright (c) 2013 Gary Mills
5007  *
5008  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
5009  */
5010 
5011 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
5012 
5013 /*	Copyright (c) 1988 AT&T	*/
5014 /*	  All Rights Reserved  	*/
5015 
5016 
5017 
5018 
5019 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 1
5020 /*
5021  * CDDL HEADER START
5022  *
5023  * The contents of this file are subject to the terms of the
5024  * Common Development and Distribution License, Version 1.0 only
5025  * (the "License").  You may not use this file except in compliance
5026  * with the License.
5027  *
5028  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5029  * or http://www.opensolaris.org/os/licensing.
5030  * See the License for the specific language governing permissions
5031  * and limitations under the License.
5032  *
5033  * When distributing Covered Code, include this CDDL HEADER in each
5034  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5035  * If applicable, add the following below this CDDL HEADER, with the
5036  * fields enclosed by brackets "[]" replaced with your own identifying
5037  * information: Portions Copyright [yyyy] [name of copyright owner]
5038  *
5039  * CDDL HEADER END
5040  */
5041 /*
5042  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5043  * Copyright 2014 PALO, Richard.
5044  *
5045  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5046  * Use is subject to license terms.
5047  */
5048 
5049 /*	Copyright (c) 1988 AT&T	*/
5050 /*	  All Rights Reserved  	*/
5051 
5052 
5053 /*
5054  * An application should not include this header directly.  Instead it
5055  * should be included only through the inclusion of other Sun headers.
5056  *
5057  * The contents of this header is limited to identifiers specified in the
5058  * C Standard.  Any new identifiers specified in future amendments to the
5059  * C Standard must be placed in this header.  If these new identifiers
5060  * are required to also be in the C++ Standard "std" namespace, then for
5061  * anything other than macro definitions, corresponding "using" directives
5062  * must also be added to <locale.h>.
5063  */
5064 
5065 
5066 
5067 
5068 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5069 /*
5070  * CDDL HEADER START
5071  *
5072  * The contents of this file are subject to the terms of the
5073  * Common Development and Distribution License (the "License").
5074  * You may not use this file except in compliance with the License.
5075  *
5076  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5077  * or http://www.opensolaris.org/os/licensing.
5078  * See the License for the specific language governing permissions
5079  * and limitations under the License.
5080  *
5081  * When distributing Covered Code, include this CDDL HEADER in each
5082  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5083  * If applicable, add the following below this CDDL HEADER, with the
5084  * fields enclosed by brackets "[]" replaced with your own identifying
5085  * information: Portions Copyright [yyyy] [name of copyright owner]
5086  *
5087  * CDDL HEADER END
5088  */
5089 
5090 /*
5091  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5092  * Copyright 2016 Joyent, Inc.
5093  *
5094  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5095  * Use is subject to license terms.
5096  */
5097 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
5098 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
5099 /*
5100  * This file and its contents are supplied under the terms of the
5101  * Common Development and Distribution License ("CDDL"), version 1.0.
5102  * You may only use this file in accordance with the terms of version
5103  * 1.0 of the CDDL.
5104  *
5105  * A full copy of the text of the CDDL should have accompanied this
5106  * source.  A copy of the CDDL is also available via the Internet at
5107  * http://www.illumos.org/license/CDDL.
5108  */
5109 
5110 /*
5111  * Copyright 2014-2016 PALO, Richard.
5112  */
5113 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
5114 
5115 
5116 
5117 
5118 
5119 unsigned char __mb_cur_max(void);
5120 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
5121 typedef struct {
5122  int quot;
5123  int rem;
5124 } div_t;
5125 
5126 typedef struct {
5127  long quot;
5128  long rem;
5129 } ldiv_t;
5130 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
5131 /*
5132  * wchar_t is a built-in type in standard C++ and as such is not
5133  * defined here when using standard C++. However, the GNU compiler
5134  * fixincludes utility nonetheless creates its own version of this
5135  * header for use by gcc and g++. In that version it adds a redundant
5136  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
5137  * header we need to include the following magic comment:
5138  *
5139  * we must use the C++ compiler's type
5140  *
5141  * The above comment should not be removed or changed until GNU
5142  * gcc/fixinc/inclhack.def is updated to bypass this header.
5143  */
5144 
5145 
5146 
5147 
5148 
5149 
5150 typedef long wchar_t;
5151 # 120 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
5152 extern void abort(void) __attribute__((__noreturn__));
5153 extern int abs(int);
5154 extern int atexit(void (*)(void));
5155 extern double atof(const char *);
5156 extern int atoi(const char *);
5157 extern long int atol(const char *);
5158 extern void *bsearch(const void *, const void *, size_t, size_t,
5159  int (*)(const void *, const void *));
5160 
5161 
5162 
5163 
5164 
5165 
5166 extern void *calloc(size_t, size_t);
5167 extern div_t div(int, int);
5168 extern void exit(int)
5169  __attribute__((__noreturn__));
5170 extern void free(void *);
5171 extern char *getenv(const char *);
5172 extern long int labs(long);
5173 extern ldiv_t ldiv(long, long);
5174 extern void *malloc(size_t);
5175 extern int mblen(const char *, size_t);
5176 extern size_t mbstowcs(wchar_t *, const char *,
5177  size_t);
5178 extern int mbtowc(wchar_t *, const char *, size_t);
5179 extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
5180 
5181 
5182 
5183 
5184 
5185 extern int rand(void);
5186 extern void *realloc(void *, size_t);
5187 extern void srand(unsigned int);
5188 extern double strtod(const char *, char **);
5189 extern long int strtol(const char *, char **, int);
5190 extern unsigned long int strtoul(const char *,
5191  char **, int);
5192 extern int system(const char *);
5193 extern int wctomb(char *, wchar_t);
5194 extern size_t wcstombs(char *, const wchar_t *,
5195  size_t);
5196 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
5197 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 1
5198 /*
5199  * CDDL HEADER START
5200  *
5201  * The contents of this file are subject to the terms of the
5202  * Common Development and Distribution License, Version 1.0 only
5203  * (the "License").  You may not use this file except in compliance
5204  * with the License.
5205  *
5206  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5207  * or http://www.opensolaris.org/os/licensing.
5208  * See the License for the specific language governing permissions
5209  * and limitations under the License.
5210  *
5211  * When distributing Covered Code, include this CDDL HEADER in each
5212  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5213  * If applicable, add the following below this CDDL HEADER, with the
5214  * fields enclosed by brackets "[]" replaced with your own identifying
5215  * information: Portions Copyright [yyyy] [name of copyright owner]
5216  *
5217  * CDDL HEADER END
5218  */
5219 /*
5220  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5221  *
5222  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5223  * Use is subject to license terms.
5224  */
5225 
5226 /*
5227  * An application should not include this header directly.  Instead it
5228  * should be included only through the inclusion of other Sun headers.
5229  *
5230  * The contents of this header is limited to identifiers specified in
5231  * the C99 standard and in conflict with the C++ implementation of the
5232  * standard header.  The C++ standard may adopt the C99 standard at
5233  * which point it is expected that the symbols included here will
5234  * become part of the C++ std namespace.
5235  */
5236 
5237 
5238 
5239 
5240 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5241 /*
5242  * CDDL HEADER START
5243  *
5244  * The contents of this file are subject to the terms of the
5245  * Common Development and Distribution License (the "License").
5246  * You may not use this file except in compliance with the License.
5247  *
5248  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5249  * or http://www.opensolaris.org/os/licensing.
5250  * See the License for the specific language governing permissions
5251  * and limitations under the License.
5252  *
5253  * When distributing Covered Code, include this CDDL HEADER in each
5254  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5255  * If applicable, add the following below this CDDL HEADER, with the
5256  * fields enclosed by brackets "[]" replaced with your own identifying
5257  * information: Portions Copyright [yyyy] [name of copyright owner]
5258  *
5259  * CDDL HEADER END
5260  */
5261 
5262 /*
5263  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5264  * Copyright 2016 Joyent, Inc.
5265  *
5266  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5267  * Use is subject to license terms.
5268  */
5269 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 2
5270 
5271 
5272 
5273 
5274 
5275 /*
5276  * The following have been added as a result of the ISO/IEC 9899:1999
5277  * standard. For a strictly conforming C application, visibility is
5278  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
5279  * For non-strictly conforming C applications, there are no restrictions
5280  * on the C namespace.
5281  */
5282 
5283 
5284 typedef struct {
5285  long long quot;
5286  long long rem;
5287 } lldiv_t;
5288 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h"
5289 extern void _Exit(int);
5290 extern float strtof(const char *, char **);
5291 extern long double strtold(const char *, char **);
5292 
5293 
5294 extern long long atoll(const char *);
5295 extern long long llabs(long long);
5296 extern lldiv_t lldiv(long long, long long);
5297 extern long long strtoll(const char *, char **,
5298  int);
5299 extern unsigned long long strtoull(const char *,
5300  char **, int);
5301 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
5302 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 1
5303 /*
5304  * This file and its contents are supplied under the terms of the
5305  * Common Development and Distribution License ("CDDL"), version 1.0.
5306  * You may only use this file in accordance with the terms of version
5307  * 1.0 of the CDDL.
5308  *
5309  * A full copy of the text of the CDDL should have accompanied this
5310  * source.  A copy of the CDDL is also available via the Internet at
5311  * http://www.illumos.org/license/CDDL.
5312  */
5313 
5314 /*
5315  * Copyright 2016 Joyent, Inc.
5316  */
5317 
5318 /*
5319  * An application should not include this header directly.  Instead it
5320  * should be included only through the inclusion of other illumos headers.
5321  *
5322  * The contents of this header is limited to identifiers specified in
5323  * the C11 standard and in conflict with the C++ implementation of the
5324  * standard header.  The C++ standard may adopt the C11 standard at
5325  * which point it is expected that the symbols included here will
5326  * become part of the C++ std namespace.
5327  */
5328 
5329 
5330 
5331 
5332 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5333 /*
5334  * CDDL HEADER START
5335  *
5336  * The contents of this file are subject to the terms of the
5337  * Common Development and Distribution License (the "License").
5338  * You may not use this file except in compliance with the License.
5339  *
5340  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5341  * or http://www.opensolaris.org/os/licensing.
5342  * See the License for the specific language governing permissions
5343  * and limitations under the License.
5344  *
5345  * When distributing Covered Code, include this CDDL HEADER in each
5346  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5347  * If applicable, add the following below this CDDL HEADER, with the
5348  * fields enclosed by brackets "[]" replaced with your own identifying
5349  * information: Portions Copyright [yyyy] [name of copyright owner]
5350  *
5351  * CDDL HEADER END
5352  */
5353 
5354 /*
5355  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5356  * Copyright 2016 Joyent, Inc.
5357  *
5358  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5359  * Use is subject to license terms.
5360  */
5361 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 2
5362 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
5363 /*
5364  * The following have been added as a result of the ISO/IEC 9899:2011
5365  * standard. For a strictly conforming C application, visibility is
5366  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
5367  * For non-strictly conforming C applications, there are no restrictions
5368  * on the C namespace.
5369  */
5370 
5371 /*
5372  * Work around fix-includes and other bad actors with using multiple headers.
5373  */
5374 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
5375 extern void *aligned_alloc(size_t, size_t);
5376 extern int at_quick_exit(void (*)(void));
5377 extern void quick_exit(int);
5378 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
5379 
5380 
5381 
5382 
5383 
5384 /*
5385  * Allow global visibility for symbols defined in
5386  * C++ "std" namespace in <iso/stdlib_iso.h>.
5387  */
5388 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5389 /*
5390  * Allow global visibility for symbols defined in
5391  * C++ "std" namespace in <iso/stdlib_c11.h>.
5392  */
5393 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5394 /* large file compilation environment setup */
5395 
5396 
5397 
5398 
5399 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5400 #pragma redefine_extname mkstemp mkstemp64
5401 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5402 
5403 
5404 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5405 #pragma redefine_extname mkstemps mkstemps64
5406 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5407 
5408 
5409 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5410 #pragma redefine_extname mkostemp mkostemp64
5411 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5412 
5413 
5414 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5415 #pragma redefine_extname mkostemps mkostemps64
5416 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5417 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5418 /* In the LP64 compilation environment, all APIs are already large file */
5419 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5420 extern int rand_r(unsigned int *);
5421 
5422 
5423 extern void _exithandle(void);
5424 
5425 
5426 
5427 
5428 extern double drand48(void);
5429 extern double erand48(unsigned short *);
5430 extern long jrand48(unsigned short *);
5431 extern void lcong48(unsigned short *);
5432 extern long lrand48(void);
5433 extern long mrand48(void);
5434 extern long nrand48(unsigned short *);
5435 extern unsigned short *seed48(unsigned short *);
5436 extern void srand48(long);
5437 extern int putenv(char *);
5438 extern void setkey(const char *);
5439 
5440 
5441 /*
5442  * swab() has historically been in <stdlib.h> as delivered from AT&T
5443  * and continues to be visible in the default compilation environment.
5444  * As of Issue 4 of the X/Open Portability Guides, swab() was declared
5445  * in <unistd.h>. As a result, with respect to X/Open namespace the
5446  * swab() declaration in this header is only visible for the XPG3
5447  * environment.
5448  */
5449 # 182 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5450 extern void swab(const char *, char *, ssize_t);
5451 
5452 
5453 
5454 
5455 
5456 extern int mkstemp(char *);
5457 
5458 extern int mkstemps(char *, int);
5459 
5460 
5461 
5462 
5463 
5464 extern int mkstemp64(char *);
5465 
5466 extern int mkstemps64(char *, int);
5467 
5468 
5469 
5470 
5471 extern char *mkdtemp(char *);
5472 
5473 
5474 
5475 extern int mkostemp(char *, int);
5476 extern int mkostemps(char *, int, int);
5477 
5478 
5479 extern int mkostemp64(char *, int);
5480 extern int mkostemps64(char *, int, int);
5481 
5482 
5483 
5484 
5485 
5486 
5487 extern long a64l(const char *);
5488 extern char *ecvt(double, int, int *, int *);
5489 extern char *fcvt(double, int, int *, int *);
5490 extern char *gcvt(double, int, char *);
5491 extern int getsubopt(char **, char *const *, char **);
5492 extern int grantpt(int);
5493 extern char *initstate(unsigned, char *, size_t);
5494 extern char *l64a(long);
5495 extern char *mktemp(char *);
5496 extern char *ptsname(int);
5497 extern long random(void);
5498 extern char *realpath(const char *, char *);
5499 extern char *setstate(const char *);
5500 extern void srandom(unsigned);
5501 extern int unlockpt(int);
5502 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
5503 
5504 extern int ttyslot(void);
5505 extern void *valloc(size_t);
5506 
5507 
5508 
5509 
5510 
5511 
5512 extern int posix_memalign(void **, size_t, size_t);
5513 extern int posix_openpt(int);
5514 extern int setenv(const char *, const char *, int);
5515 extern int unsetenv(const char *);
5516 
5517 
5518 
5519 
5520 extern char *canonicalize_file_name(const char *);
5521 extern int clearenv(void);
5522 extern void closefrom(int);
5523 extern int daemon(int, int);
5524 extern int dup2(int, int);
5525 extern int dup3(int, int, int);
5526 extern int fdwalk(int (*)(void *, int), void *);
5527 extern char *qecvt(long double, int, int *, int *);
5528 extern char *qfcvt(long double, int, int *, int *);
5529 extern char *qgcvt(long double, int, char *);
5530 extern char *getcwd(char *, size_t);
5531 extern const char *getexecname(void);
5532 
5533 
5534 
5535 
5536 
5537 
5538 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5539 #pragma redefine_extname getlogin getloginx
5540 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5541 
5542 
5543 
5544 
5545 
5546 
5547 extern char *getlogin(void);
5548 
5549 
5550 extern int getopt(int, char *const *, const char *);
5551 extern char *optarg;
5552 extern int optind, opterr, optopt;
5553 extern char *getpass(const char *);
5554 extern char *getpassphrase(const char *);
5555 extern int getpw(uid_t, char *);
5556 extern int isatty(int);
5557 extern void *memalign(size_t, size_t);
5558 extern char *ttyname(int);
5559 extern char *mkdtemp(char *);
5560 extern const char *getprogname(void);
5561 extern void setprogname(const char *);
5562 
5563 
5564 extern char *lltostr(long long, char *);
5565 extern char *ulltostr(unsigned long long, char *);
5566 
5567 
5568 
5569 
5570 /* OpenBSD compatibility functions */
5571 
5572 
5573 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 1
5574 /*
5575  * CDDL HEADER START
5576  *
5577  * The contents of this file are subject to the terms of the
5578  * Common Development and Distribution License, Version 1.0 only
5579  * (the "License").  You may not use this file except in compliance
5580  * with the License.
5581  *
5582  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5583  * or http://www.opensolaris.org/os/licensing.
5584  * See the License for the specific language governing permissions
5585  * and limitations under the License.
5586  *
5587  * When distributing Covered Code, include this CDDL HEADER in each
5588  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5589  * If applicable, add the following below this CDDL HEADER, with the
5590  * fields enclosed by brackets "[]" replaced with your own identifying
5591  * information: Portions Copyright [yyyy] [name of copyright owner]
5592  *
5593  * CDDL HEADER END
5594  */
5595 /*
5596  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5597  *
5598  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5599  * Use is subject to license terms.
5600  */
5601 
5602 
5603 
5604 
5605 /*
5606  * This file, <inttypes.h>, is specified by the ISO C standard,
5607  * standard, ISO/IEC 9899:1999 Programming language - C and is
5608  * also defined by SUSv3.
5609  *
5610  * ISO	  International Organization for Standardization.
5611  * SUSv3  Single Unix Specification, Version 3
5612  */
5613 
5614 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5615 /*
5616  * CDDL HEADER START
5617  *
5618  * The contents of this file are subject to the terms of the
5619  * Common Development and Distribution License (the "License").
5620  * You may not use this file except in compliance with the License.
5621  *
5622  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5623  * or http://www.opensolaris.org/os/licensing.
5624  * See the License for the specific language governing permissions
5625  * and limitations under the License.
5626  *
5627  * When distributing Covered Code, include this CDDL HEADER in each
5628  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5629  * If applicable, add the following below this CDDL HEADER, with the
5630  * fields enclosed by brackets "[]" replaced with your own identifying
5631  * information: Portions Copyright [yyyy] [name of copyright owner]
5632  *
5633  * CDDL HEADER END
5634  */
5635 
5636 /*
5637  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5638  * Copyright 2016 Joyent, Inc.
5639  *
5640  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5641  * Use is subject to license terms.
5642  */
5643 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
5644 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 1
5645 /*
5646  * CDDL HEADER START
5647  *
5648  * The contents of this file are subject to the terms of the
5649  * Common Development and Distribution License, Version 1.0 only
5650  * (the "License").  You may not use this file except in compliance
5651  * with the License.
5652  *
5653  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5654  * or http://www.opensolaris.org/os/licensing.
5655  * See the License for the specific language governing permissions
5656  * and limitations under the License.
5657  *
5658  * When distributing Covered Code, include this CDDL HEADER in each
5659  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5660  * If applicable, add the following below this CDDL HEADER, with the
5661  * fields enclosed by brackets "[]" replaced with your own identifying
5662  * information: Portions Copyright [yyyy] [name of copyright owner]
5663  *
5664  * CDDL HEADER END
5665  */
5666 /*
5667  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
5668  * Use is subject to license terms.
5669  */
5670 
5671 
5672 
5673 
5674 #pragma ident "%Z%%M%	%I%	%E% SMI"
5675 
5676 /*
5677  * This header, <sys/inttypes.h>, contains (through nested inclusion) the
5678  * vast majority of the facilities specified for <inttypes.h> as defined
5679  * by the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
5680  *
5681  * Kernel/Driver developers are encouraged to include this file to access
5682  * the fixed size types, limits and utility macros. Application developers
5683  * should use the standard defined header <inttypes.h>.
5684  */
5685 
5686 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5687 /*
5688  * CDDL HEADER START
5689  *
5690  * The contents of this file are subject to the terms of the
5691  * Common Development and Distribution License (the "License").
5692  * You may not use this file except in compliance with the License.
5693  *
5694  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5695  * or http://www.opensolaris.org/os/licensing.
5696  * See the License for the specific language governing permissions
5697  * and limitations under the License.
5698  *
5699  * When distributing Covered Code, include this CDDL HEADER in each
5700  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5701  * If applicable, add the following below this CDDL HEADER, with the
5702  * fields enclosed by brackets "[]" replaced with your own identifying
5703  * information: Portions Copyright [yyyy] [name of copyright owner]
5704  *
5705  * CDDL HEADER END
5706  */
5707 
5708 /*
5709  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5710  * Copyright 2016 Joyent, Inc.
5711  *
5712  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5713  * Use is subject to license terms.
5714  */
5715 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
5716 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
5717 /*
5718  * CDDL HEADER START
5719  *
5720  * The contents of this file are subject to the terms of the
5721  * Common Development and Distribution License, Version 1.0 only
5722  * (the "License").  You may not use this file except in compliance
5723  * with the License.
5724  *
5725  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5726  * or http://www.opensolaris.org/os/licensing.
5727  * See the License for the specific language governing permissions
5728  * and limitations under the License.
5729  *
5730  * When distributing Covered Code, include this CDDL HEADER in each
5731  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5732  * If applicable, add the following below this CDDL HEADER, with the
5733  * fields enclosed by brackets "[]" replaced with your own identifying
5734  * information: Portions Copyright [yyyy] [name of copyright owner]
5735  *
5736  * CDDL HEADER END
5737  */
5738 /*
5739  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5740  *
5741  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5742  * Use is subject to license terms.
5743  */
5744 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
5745 
5746 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
5747 /*
5748  * CDDL HEADER START
5749  *
5750  * The contents of this file are subject to the terms of the
5751  * Common Development and Distribution License, Version 1.0 only
5752  * (the "License").  You may not use this file except in compliance
5753  * with the License.
5754  *
5755  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5756  * or http://www.opensolaris.org/os/licensing.
5757  * See the License for the specific language governing permissions
5758  * and limitations under the License.
5759  *
5760  * When distributing Covered Code, include this CDDL HEADER in each
5761  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5762  * If applicable, add the following below this CDDL HEADER, with the
5763  * fields enclosed by brackets "[]" replaced with your own identifying
5764  * information: Portions Copyright [yyyy] [name of copyright owner]
5765  *
5766  * CDDL HEADER END
5767  */
5768 /*
5769  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5770  *
5771  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5772  * Use is subject to license terms.
5773  */
5774 
5775 
5776 
5777 
5778 /*
5779  * This file, <sys/int_limits.h>, is part of the Sun Microsystems implementation
5780  * of <inttypes.h> as defined in the ISO C standard, ISO/IEC 9899:1999
5781  * Programming language - C.
5782  *
5783  * Programs/Modules should not directly include this file.  Access to the
5784  * types defined in this file should be through the inclusion of one of the
5785  * following files:
5786  *
5787  *	<limits.h>		This nested inclusion is disabled for strictly
5788  *				ANSI-C conforming compilations.  The *_MIN
5789  *				definitions are not visible to POSIX or XPG
5790  *				conforming applications (due to what may be
5791  *				a bug in the specification - this is under
5792  *				investigation)
5793  *
5794  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
5795  *				components of <inttypes.h>.
5796  *
5797  *	<inttypes.h>		For use by applications.
5798  *
5799  * See these files for more details.
5800  */
5801 
5802 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5803 /*
5804  * CDDL HEADER START
5805  *
5806  * The contents of this file are subject to the terms of the
5807  * Common Development and Distribution License (the "License").
5808  * You may not use this file except in compliance with the License.
5809  *
5810  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5811  * or http://www.opensolaris.org/os/licensing.
5812  * See the License for the specific language governing permissions
5813  * and limitations under the License.
5814  *
5815  * When distributing Covered Code, include this CDDL HEADER in each
5816  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5817  * If applicable, add the following below this CDDL HEADER, with the
5818  * fields enclosed by brackets "[]" replaced with your own identifying
5819  * information: Portions Copyright [yyyy] [name of copyright owner]
5820  *
5821  * CDDL HEADER END
5822  */
5823 
5824 /*
5825  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5826  * Copyright 2016 Joyent, Inc.
5827  *
5828  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5829  * Use is subject to license terms.
5830  */
5831 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 2
5832 
5833 
5834 
5835 
5836 
5837 /*
5838  * Limits
5839  *
5840  * The following define the limits for the types defined in <sys/int_types.h>.
5841  *
5842  * INTMAX_MIN (minimum value of the largest supported signed integer type),
5843  * INTMAX_MAX (maximum value of the largest supported signed integer type),
5844  * and UINTMAX_MAX (maximum value of the largest supported unsigned integer
5845  * type) can be set to implementation defined limits.
5846  *
5847  * NOTE : A programmer can test to see whether an implementation supports
5848  * a particular size of integer by testing if the macro that gives the
5849  * maximum for that datatype is defined. For example, if #ifdef UINT64_MAX
5850  * tests false, the implementation does not support unsigned 64 bit integers.
5851  *
5852  * The type of these macros is intentionally unspecified.
5853  *
5854  * The types int8_t, int_least8_t, and int_fast8_t are not defined for ISAs
5855  * where the ABI specifies "char" as unsigned when the translation mode is
5856  * not ANSI-C.
5857  */
5858 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
5859 /*
5860  * The following 2 macros are provided for testing whether the types
5861  * intptr_t and uintptr_t (integers large enough to hold a void *) are
5862  * defined in this header. They are needed in case the architecture can't
5863  * represent a pointer in any standard integral type.
5864  */
5865 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
5866 /* Maximum limits of ptrdiff_t defined in <sys/types.h> */
5867 
5868 
5869 
5870 
5871 
5872 
5873 /*
5874  * Maximum value of a "size_t".  SIZE_MAX was previously defined
5875  * in <limits.h>, however, the standards specify it be defined
5876  * in <stdint.h>. The <stdint.h> headers includes this header as
5877  * does <limits.h>. The value of SIZE_MAX should not deviate
5878  * from the value of ULONG_MAX defined <sys/types.h>.
5879  */
5880 
5881 
5882 
5883 
5884 
5885 
5886 /* Maximum limit of sig_atomic_t defined in <sys/types.h> */
5887 
5888 
5889 
5890 
5891 /*
5892  * Maximum limit of wchar_t. The WCHAR_* macros are also
5893  * defined in <iso/wchar_iso.h>, but inclusion of that header
5894  * will break ISO/IEC C namespace.
5895  */
5896 
5897 
5898 
5899 
5900 /* Maximum limit of wint_t */
5901 
5902 
5903 
5904 
5905 /*
5906  * It is probably a bug in the POSIX specification (IEEE-1003.1-1990) that
5907  * when including <limits.h> that the suffix _MAX is reserved but not the
5908  * suffix _MIN.  However, until that issue is resolved....
5909  */
5910 # 230 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
5911 /* Minimum value of a pointer-holding signed integer type */
5912 
5913 
5914 
5915 
5916 
5917 
5918 /* Minimum limits of ptrdiff_t defined in <sys/types.h> */
5919 
5920 
5921 
5922 
5923 
5924 
5925 /* Minimum limit of sig_atomic_t defined in <sys/types.h> */
5926 
5927 
5928 
5929 
5930 /*
5931  * Minimum limit of wchar_t. The WCHAR_* macros are also
5932  * defined in <iso/wchar_iso.h>, but inclusion of that header
5933  * will break ISO/IEC C namespace.
5934  */
5935 
5936 
5937 
5938 
5939 /* Minimum limit of wint_t */
5940 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
5941 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
5942 /*
5943  * CDDL HEADER START
5944  *
5945  * The contents of this file are subject to the terms of the
5946  * Common Development and Distribution License, Version 1.0 only
5947  * (the "License").  You may not use this file except in compliance
5948  * with the License.
5949  *
5950  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5951  * or http://www.opensolaris.org/os/licensing.
5952  * See the License for the specific language governing permissions
5953  * and limitations under the License.
5954  *
5955  * When distributing Covered Code, include this CDDL HEADER in each
5956  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5957  * If applicable, add the following below this CDDL HEADER, with the
5958  * fields enclosed by brackets "[]" replaced with your own identifying
5959  * information: Portions Copyright [yyyy] [name of copyright owner]
5960  *
5961  * CDDL HEADER END
5962  */
5963 /*
5964  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5965  *
5966  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5967  * Use is subject to license terms.
5968  */
5969 
5970 
5971 
5972 
5973 /*
5974  * This file, <sys/int_const.h>, is part of the Sun Microsystems implementation
5975  * of <inttypes.h> as proposed in the ISO/JTC1/SC22/WG14 C committee's working
5976  * draft for the revision of the current ISO C standard, ISO/IEC 9899:1990
5977  * Programming language - C.
5978  *
5979  * Programs/Modules should not directly include this file.  Access to the
5980  * types defined in this file should be through the inclusion of one of the
5981  * following files:
5982  *
5983  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
5984  *				components of <inttypes.h>.
5985  *
5986  *	<inttypes.h>		For use by applications.
5987  *
5988  * See these files for more details.
5989  *
5990  * Use at your own risk.  This file will track the evolution of the revision
5991  * of the current ISO C standard.  As of February 1996, the committee is
5992  * squarely behind the fixed sized types.
5993  */
5994 
5995 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5996 /*
5997  * CDDL HEADER START
5998  *
5999  * The contents of this file are subject to the terms of the
6000  * Common Development and Distribution License (the "License").
6001  * You may not use this file except in compliance with the License.
6002  *
6003  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6004  * or http://www.opensolaris.org/os/licensing.
6005  * See the License for the specific language governing permissions
6006  * and limitations under the License.
6007  *
6008  * When distributing Covered Code, include this CDDL HEADER in each
6009  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6010  * If applicable, add the following below this CDDL HEADER, with the
6011  * fields enclosed by brackets "[]" replaced with your own identifying
6012  * information: Portions Copyright [yyyy] [name of copyright owner]
6013  *
6014  * CDDL HEADER END
6015  */
6016 
6017 /*
6018  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6019  * Copyright 2016 Joyent, Inc.
6020  *
6021  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6022  * Use is subject to license terms.
6023  */
6024 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 2
6025 
6026 
6027 
6028 
6029 
6030 /*
6031  * Constants
6032  *
6033  * The following macros create constants of the types defined in
6034  * <sys/int_types.h>. The intent is that:
6035  *	Constants defined using these macros have a specific size and
6036  *	signedness. The suffix used for int64_t and uint64_t (ll and ull)
6037  *	are for examples only. Implementations are permitted to use other
6038  *	suffixes.
6039  *
6040  * The "CSTYLED" comments are flags to an internal code style analysis tool
6041  * telling it to silently accept the line which follows.  This internal
6042  * standard requires a space between arguments, but the historical,
6043  * non-ANSI-C ``method'' of concatenation can't tolerate those spaces.
6044  */
6045 /* CSTYLED */
6046 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
6047 /* CSTYLED */
6048 
6049 
6050 
6051 
6052 /* CSTYLED */
6053 
6054 /* CSTYLED */
6055 
6056 /* CSTYLED */
6057 
6058 
6059 
6060 
6061 
6062 
6063 /* CSTYLED */
6064 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
6065 /* CSTYLED */
6066 
6067 /* CSTYLED */
6068 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6069 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 1
6070 /*
6071  * CDDL HEADER START
6072  *
6073  * The contents of this file are subject to the terms of the
6074  * Common Development and Distribution License, Version 1.0 only
6075  * (the "License").  You may not use this file except in compliance
6076  * with the License.
6077  *
6078  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6079  * or http://www.opensolaris.org/os/licensing.
6080  * See the License for the specific language governing permissions
6081  * and limitations under the License.
6082  *
6083  * When distributing Covered Code, include this CDDL HEADER in each
6084  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6085  * If applicable, add the following below this CDDL HEADER, with the
6086  * fields enclosed by brackets "[]" replaced with your own identifying
6087  * information: Portions Copyright [yyyy] [name of copyright owner]
6088  *
6089  * CDDL HEADER END
6090  */
6091 /*
6092  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6093  *
6094  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6095  * Use is subject to license terms.
6096  */
6097 
6098 
6099 
6100 
6101 /*
6102  * This file, <sys/int_fmtio.h>, is part of the Sun Microsystems implementation
6103  * of <inttypes.h> as defined by the ISO C Standard, ISO/IEC 9899:1999
6104  * Programming language - C.
6105  *
6106  * ISO  International Organization for Standardization.
6107  *
6108  * Programs/Modules should not directly include this file.  Access to the
6109  * types defined in this file should be through the inclusion of one of the
6110  * following files:
6111  *
6112  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
6113  *				components of <inttypes.h>.
6114  *
6115  *	<inttypes.h>		For use by applications.
6116  *
6117  * See these files for more details.
6118  */
6119 
6120 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6121 /*
6122  * CDDL HEADER START
6123  *
6124  * The contents of this file are subject to the terms of the
6125  * Common Development and Distribution License (the "License").
6126  * You may not use this file except in compliance with the License.
6127  *
6128  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6129  * or http://www.opensolaris.org/os/licensing.
6130  * See the License for the specific language governing permissions
6131  * and limitations under the License.
6132  *
6133  * When distributing Covered Code, include this CDDL HEADER in each
6134  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6135  * If applicable, add the following below this CDDL HEADER, with the
6136  * fields enclosed by brackets "[]" replaced with your own identifying
6137  * information: Portions Copyright [yyyy] [name of copyright owner]
6138  *
6139  * CDDL HEADER END
6140  */
6141 
6142 /*
6143  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6144  * Copyright 2016 Joyent, Inc.
6145  *
6146  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6147  * Use is subject to license terms.
6148  */
6149 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 2
6150 
6151 
6152 
6153 
6154 
6155 /*
6156  * Formatted I/O
6157  *
6158  * The following macros can be used even when an implementation has not
6159  * extended the printf/scanf family of functions.
6160  *
6161  * The form of the names of the macros is either "PRI" for printf specifiers
6162  * or "SCN" for scanf specifiers, followed by the conversion specifier letter
6163  * followed by the datatype size. For example, PRId32 is the macro for
6164  * the printf d conversion specifier with the flags for 32 bit datatype.
6165  *
6166  * An example using one of these macros:
6167  *
6168  *	uint64_t u;
6169  *	printf("u = %016" PRIx64 "\n", u);
6170  *
6171  * For the purpose of example, the definitions of the printf/scanf macros
6172  * below have the values appropriate for a machine with 8 bit shorts, 16
6173  * bit shorts, 32 bit ints, 32 or 64 bit longs depending on compilation
6174  * mode, and 64 bit long longs.
6175  */
6176 
6177 /*
6178  * fprintf macros for signed integers
6179  */
6180 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6181 /*
6182  * fprintf macros for unsigned integers
6183  */
6184 # 227 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6185 /*
6186  * fprintf macros for pointers
6187  */
6188 # 247 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6189 /*
6190  * fscanf macros for signed integers
6191  */
6192 # 282 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6193 /*
6194  * fscanf macros for unsigned integers
6195  */
6196 # 349 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6197 /*
6198  * The following macros define I/O formats for intmax_t and uintmax_t.
6199  */
6200 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6201 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
6202 
6203 
6204 
6205 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 1
6206 /*
6207  * CDDL HEADER START
6208  *
6209  * The contents of this file are subject to the terms of the
6210  * Common Development and Distribution License, Version 1.0 only
6211  * (the "License").  You may not use this file except in compliance
6212  * with the License.
6213  *
6214  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6215  * or http://www.opensolaris.org/os/licensing.
6216  * See the License for the specific language governing permissions
6217  * and limitations under the License.
6218  *
6219  * When distributing Covered Code, include this CDDL HEADER in each
6220  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6221  * If applicable, add the following below this CDDL HEADER, with the
6222  * fields enclosed by brackets "[]" replaced with your own identifying
6223  * information: Portions Copyright [yyyy] [name of copyright owner]
6224  *
6225  * CDDL HEADER END
6226  */
6227 /*
6228  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
6229  * Use is subject to license terms.
6230  */
6231 
6232 
6233 
6234 
6235 #pragma ident "%Z%%M%	%I%	%E% SMI"
6236 
6237 /*
6238  * This header is included by <stdint.h> which was introduced by
6239  * the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
6240  * The header is a subset of the <inttypes.h> header.
6241  */
6242 
6243 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
6244 /*
6245  * CDDL HEADER START
6246  *
6247  * The contents of this file are subject to the terms of the
6248  * Common Development and Distribution License, Version 1.0 only
6249  * (the "License").  You may not use this file except in compliance
6250  * with the License.
6251  *
6252  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6253  * or http://www.opensolaris.org/os/licensing.
6254  * See the License for the specific language governing permissions
6255  * and limitations under the License.
6256  *
6257  * When distributing Covered Code, include this CDDL HEADER in each
6258  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6259  * If applicable, add the following below this CDDL HEADER, with the
6260  * fields enclosed by brackets "[]" replaced with your own identifying
6261  * information: Portions Copyright [yyyy] [name of copyright owner]
6262  *
6263  * CDDL HEADER END
6264  */
6265 /*
6266  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6267  *
6268  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6269  * Use is subject to license terms.
6270  */
6271 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6272 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
6273 /*
6274  * CDDL HEADER START
6275  *
6276  * The contents of this file are subject to the terms of the
6277  * Common Development and Distribution License, Version 1.0 only
6278  * (the "License").  You may not use this file except in compliance
6279  * with the License.
6280  *
6281  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6282  * or http://www.opensolaris.org/os/licensing.
6283  * See the License for the specific language governing permissions
6284  * and limitations under the License.
6285  *
6286  * When distributing Covered Code, include this CDDL HEADER in each
6287  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6288  * If applicable, add the following below this CDDL HEADER, with the
6289  * fields enclosed by brackets "[]" replaced with your own identifying
6290  * information: Portions Copyright [yyyy] [name of copyright owner]
6291  *
6292  * CDDL HEADER END
6293  */
6294 /*
6295  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6296  *
6297  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6298  * Use is subject to license terms.
6299  */
6300 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6301 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
6302 /*
6303  * CDDL HEADER START
6304  *
6305  * The contents of this file are subject to the terms of the
6306  * Common Development and Distribution License, Version 1.0 only
6307  * (the "License").  You may not use this file except in compliance
6308  * with the License.
6309  *
6310  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6311  * or http://www.opensolaris.org/os/licensing.
6312  * See the License for the specific language governing permissions
6313  * and limitations under the License.
6314  *
6315  * When distributing Covered Code, include this CDDL HEADER in each
6316  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6317  * If applicable, add the following below this CDDL HEADER, with the
6318  * fields enclosed by brackets "[]" replaced with your own identifying
6319  * information: Portions Copyright [yyyy] [name of copyright owner]
6320  *
6321  * CDDL HEADER END
6322  */
6323 /*
6324  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6325  *
6326  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6327  * Use is subject to license terms.
6328  */
6329 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6330 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
6331 
6332 
6333 
6334 
6335 
6336 
6337 /* Inclusion of <stddef.h> breaks namespace, therefore define wchar_t */
6338 
6339 /*
6340  * wchar_t is a built-in type in standard C++ and as such is not
6341  * defined here when using standard C++. However, the GNU compiler
6342  * fixincludes utility nonetheless creates its own version of this
6343  * header for use by gcc and g++. In that version it adds a redundant
6344  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
6345  * header we need to include the following magic comment:
6346  *
6347  * we must use the C++ compiler's type
6348  *
6349  * The above comment should not be removed or changed until GNU
6350  * gcc/fixinc/inclhack.def is updated to bypass this header.
6351  */
6352 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
6353 typedef struct {
6354  intmax_t quot;
6355  intmax_t rem;
6356 } imaxdiv_t;
6357 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
6358 extern intmax_t imaxabs(intmax_t);
6359 extern imaxdiv_t imaxdiv(intmax_t, intmax_t);
6360 extern intmax_t strtoimax(const char *, char **,
6361  int);
6362 extern uintmax_t strtoumax(const char *, char **,
6363  int);
6364 extern intmax_t wcstoimax(const wchar_t *,
6365  wchar_t **, int);
6366 extern uintmax_t wcstoumax(const wchar_t *,
6367  wchar_t **, int);
6368 # 302 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
6369 extern uint32_t arc4random(void);
6370 extern void arc4random_buf(void *, size_t);
6371 extern uint32_t arc4random_uniform(uint32_t);
6372 extern void freezero(void *, size_t);
6373 extern void *recallocarray(void *, size_t, size_t, size_t);
6374 # 32 "open_package_datastream.c" 2
6375 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 1
6376 /*
6377  * CDDL HEADER START
6378  *
6379  * The contents of this file are subject to the terms of the
6380  * Common Development and Distribution License (the "License").
6381  * You may not use this file except in compliance with the License.
6382  *
6383  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6384  * or http://www.opensolaris.org/os/licensing.
6385  * See the License for the specific language governing permissions
6386  * and limitations under the License.
6387  *
6388  * When distributing Covered Code, include this CDDL HEADER in each
6389  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6390  * If applicable, add the following below this CDDL HEADER, with the
6391  * fields enclosed by brackets "[]" replaced with your own identifying
6392  * information: Portions Copyright [yyyy] [name of copyright owner]
6393  *
6394  * CDDL HEADER END
6395  */
6396 
6397 /*
6398  * Copyright 2014 PALO, Richard.
6399  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6400  * Copyright (c) 2013 Gary Mills
6401  *
6402  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
6403  */
6404 
6405 /*	Copyright (c) 1988 AT&T	*/
6406 /*	  All Rights Reserved  	*/
6407 
6408 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
6409 
6410 
6411 
6412 
6413 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6414 /*
6415  * CDDL HEADER START
6416  *
6417  * The contents of this file are subject to the terms of the
6418  * Common Development and Distribution License (the "License").
6419  * You may not use this file except in compliance with the License.
6420  *
6421  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6422  * or http://www.opensolaris.org/os/licensing.
6423  * See the License for the specific language governing permissions
6424  * and limitations under the License.
6425  *
6426  * When distributing Covered Code, include this CDDL HEADER in each
6427  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6428  * If applicable, add the following below this CDDL HEADER, with the
6429  * fields enclosed by brackets "[]" replaced with your own identifying
6430  * information: Portions Copyright [yyyy] [name of copyright owner]
6431  *
6432  * CDDL HEADER END
6433  */
6434 
6435 /*
6436  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6437  * Copyright 2016 Joyent, Inc.
6438  *
6439  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6440  * Use is subject to license terms.
6441  */
6442 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6443 
6444 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
6445 /*
6446  * This file and its contents are supplied under the terms of the
6447  * Common Development and Distribution License ("CDDL"), version 1.0.
6448  * You may only use this file in accordance with the terms of version
6449  * 1.0 of the CDDL.
6450  *
6451  * A full copy of the text of the CDDL should have accompanied this
6452  * source.  A copy of the CDDL is also available via the Internet at
6453  * http://www.illumos.org/license/CDDL.
6454  */
6455 
6456 /*
6457  * Copyright 2014-2016 PALO, Richard.
6458  */
6459 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6460 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6461 /*
6462  * CDDL HEADER START
6463  *
6464  * The contents of this file are subject to the terms of the
6465  * Common Development and Distribution License (the "License").
6466  * You may not use this file except in compliance with the License.
6467  *
6468  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6469  * or http://www.opensolaris.org/os/licensing.
6470  * See the License for the specific language governing permissions
6471  * and limitations under the License.
6472  *
6473  * When distributing Covered Code, include this CDDL HEADER in each
6474  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6475  * If applicable, add the following below this CDDL HEADER, with the
6476  * fields enclosed by brackets "[]" replaced with your own identifying
6477  * information: Portions Copyright [yyyy] [name of copyright owner]
6478  *
6479  * CDDL HEADER END
6480  */
6481 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6482 /*	  All Rights Reserved  	*/
6483 
6484 
6485 /*
6486  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6487  * Use is subject to license terms.
6488  *
6489  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6490  * Copyright 2016 Joyent, Inc.
6491  */
6492 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6493 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
6494 /*
6495  * CDDL HEADER START
6496  *
6497  * The contents of this file are subject to the terms of the
6498  * Common Development and Distribution License (the "License").
6499  * You may not use this file except in compliance with the License.
6500  *
6501  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6502  * or http://www.opensolaris.org/os/licensing.
6503  * See the License for the specific language governing permissions
6504  * and limitations under the License.
6505  *
6506  * When distributing Covered Code, include this CDDL HEADER in each
6507  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6508  * If applicable, add the following below this CDDL HEADER, with the
6509  * fields enclosed by brackets "[]" replaced with your own identifying
6510  * information: Portions Copyright [yyyy] [name of copyright owner]
6511  *
6512  * CDDL HEADER END
6513  */
6514 
6515 /*
6516  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
6517  *	  All Rights Reserved
6518  *
6519  */
6520 
6521 /*
6522  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6523  * Use is subject to license terms.
6524  */
6525 
6526 /*
6527  * WARNING: This is an implementation-specific header,
6528  * its contents are not guaranteed. Applications
6529  * should include <unistd.h> and not this header.
6530  */
6531 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6532 
6533 
6534 
6535 
6536 
6537 /* Symbolic constants for the "access" routine: */
6538 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6539 /* Symbolic constants for the "lseek" routine: */
6540 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6541 /* Path names: */
6542 
6543 
6544 
6545 
6546 /*
6547  * compile-time symbolic constants,
6548  * Support does not mean the feature is enabled.
6549  * Use pathconf/sysconf to obtain actual configuration value.
6550  */
6551 
6552 /* Values unchanged in UNIX 03 */
6553 
6554 
6555 
6556 
6557 
6558 /*
6559  * POSIX.1b compile-time symbolic constants.
6560  */
6561 # 134 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6562 /*
6563  * POSIX.1c compile-time symbolic constants.
6564  */
6565 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6566 /* New in UNIX 03 */
6567 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6568 /*
6569  * Support for the POSIX.1 mutex protocol attribute. For realtime applications
6570  * which need mutexes to support priority inheritance/ceiling.
6571  */
6572 # 187 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6573 /*
6574  * Large File Summit-related announcement macros.  The system supports both
6575  * the additional and transitional Large File Summit interfaces.  (The final
6576  * two macros provide a finer granularity breakdown of _LFS64_LARGEFILE.)
6577  */
6578 
6579 
6580 
6581 
6582 
6583 /* large file compilation environment setup */
6584 
6585 
6586 
6587 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6588 #pragma redefine_extname ftruncate ftruncate64
6589 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6590 
6591 
6592 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6593 #pragma redefine_extname lseek lseek64
6594 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6595 
6596 
6597 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6598 #pragma redefine_extname pread pread64
6599 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6600 
6601 
6602 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6603 #pragma redefine_extname pwrite pwrite64
6604 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6605 
6606 
6607 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6608 #pragma redefine_extname truncate truncate64
6609 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6610 
6611 
6612 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6613 #pragma redefine_extname lockf lockf64
6614 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6615 
6616 
6617 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6618 #pragma redefine_extname tell tell64
6619 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6620 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6621 /* In the LP64 compilation environment, the APIs are already large file */
6622 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6623 extern int access(const char *, int);
6624 
6625 extern int acct(const char *);
6626 
6627 extern unsigned alarm(unsigned);
6628 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6629 
6630 
6631 extern int brk(void *);
6632 
6633 extern int chdir(const char *);
6634 extern int chown(const char *, uid_t, gid_t);
6635 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6636 
6637 
6638 extern int chroot(const char *);
6639 
6640 extern int close(int);
6641 
6642 
6643 
6644 
6645 
6646 
6647 extern char *ctermid(char *);
6648 
6649 
6650 extern char *ctermid_r(char *);
6651 
6652 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6653 
6654 extern char *cuserid(char *);
6655 
6656 extern int dup(int);
6657 extern int dup2(int, int);
6658 extern int dup3(int, int, int);
6659 
6660 
6661 
6662 
6663 extern void endusershell(void);
6664 
6665 extern int execl(const char *, const char *, ...);
6666 extern int execle(const char *, const char *, ...);
6667 extern int execlp(const char *, const char *, ...);
6668 extern int execv(const char *, char *const *);
6669 extern int execve(const char *, char *const *, char *const *);
6670 extern int execvp(const char *, char *const *);
6671 extern void _exit(int)
6672  __attribute__((__noreturn__));
6673 /*
6674  * The following fattach prototype is duplicated in <stropts.h>. The
6675  * duplication is necessitated by XPG4.2 which requires the prototype
6676  * be defined in <stropts.h>.
6677  */
6678 
6679 extern int fattach(int, const char *);
6680 
6681 
6682 extern int fchdir(int);
6683 extern int fchown(int, uid_t, gid_t);
6684 
6685 
6686 extern int fchroot(int);
6687 
6688 
6689 
6690 extern int fdatasync(int);
6691 
6692 /*
6693  * The following fdetach prototype is duplicated in <stropts.h>. The
6694  * duplication is necessitated by XPG4.2 which requires the prototype
6695  * be defined in <stropts.h>.
6696  */
6697 
6698 extern int fdetach(const char *);
6699 
6700 extern pid_t fork(void);
6701 
6702 extern pid_t fork1(void);
6703 extern pid_t forkall(void);
6704 
6705 extern long fpathconf(int, int);
6706 
6707 
6708 extern int fsync(int);
6709 
6710 
6711 
6712 
6713 extern int ftruncate(int, off_t);
6714 
6715 extern char *getcwd(char *, size_t);
6716 
6717 
6718 extern int getdtablesize(void);
6719 
6720 extern gid_t getegid(void);
6721 extern uid_t geteuid(void);
6722 extern gid_t getgid(void);
6723 extern int getgroups(int, gid_t *);
6724 
6725 extern long gethostid(void);
6726 
6727 
6728 
6729 
6730 extern int gethostname(char *, int);
6731 # 372 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6732 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6733 
6734 extern int getpagesize(void);
6735 
6736 extern pid_t getpgid(pid_t);
6737 
6738 extern pid_t getpid(void);
6739 extern pid_t getppid(void);
6740 extern pid_t getpgrp(void);
6741 
6742 
6743 char *gettxt(const char *, const char *);
6744 
6745 
6746 extern pid_t getsid(pid_t);
6747 
6748 extern uid_t getuid(void);
6749 
6750 extern char *getusershell(void);
6751 
6752 /*
6753  * The following ioctl prototype is duplicated in <stropts.h>. The
6754  * duplication is necessitated by XPG4.2 which requires the prototype
6755  * be defined in <stropts.h>.
6756  */
6757 
6758 extern int ioctl(int, int, ...);
6759 extern int isaexec(const char *, char *const *, char *const *);
6760 extern int issetugid(void);
6761 
6762 extern int isatty(int);
6763 
6764 extern int lchown(const char *, uid_t, gid_t);
6765 
6766 extern int link(const char *, const char *);
6767 
6768 extern offset_t llseek(int, offset_t, int);
6769 
6770 
6771 
6772 
6773 extern int lockf(int, int, off_t);
6774 
6775 extern off_t lseek(int, off_t, int);
6776 
6777 
6778 extern int nice(int);
6779 
6780 
6781 extern int mincore(caddr_t, size_t, char *);
6782 
6783 extern long pathconf(const char *, int);
6784 extern int pause(void);
6785 extern int pipe(int *);
6786 extern int pipe2(int *, int);
6787 
6788 
6789 
6790 extern ssize_t pread(int, void *, size_t, off_t);
6791 
6792 
6793 extern void profil(unsigned short *, size_t, unsigned long, unsigned int);
6794 
6795 /*
6796  * pthread_atfork() is also declared in <pthread.h> as per SUSv3. The
6797  * declarations are identical. A change to either one may also require
6798  * appropriate namespace updates in order to avoid redeclaration
6799  * warnings in the case where both prototypes are exposed via inclusion
6800  * of both <pthread.h> and <unistd.h>.
6801  */
6802 
6803 
6804 
6805 extern int pthread_atfork(void (*) (void), void (*) (void), void (*) (void));
6806 
6807 
6808 
6809 extern int ptrace(int, pid_t, int, int);
6810 
6811 
6812 
6813 
6814 extern ssize_t pwrite(int, const void *, size_t, off_t);
6815 
6816 
6817 /* per RFC 3542; This is also defined in netdb.h */
6818 extern int rcmd_af(char **, unsigned short, const char *, const char *,
6819  const char *, int *, int);
6820 
6821 extern ssize_t read(int, void *, size_t);
6822 
6823 
6824 extern ssize_t readlink(const char *, char *,
6825  size_t);
6826 
6827 
6828 
6829 
6830 
6831 
6832 extern int rename(const char *, const char *);
6833 
6834 
6835 
6836 
6837 
6838 
6839 
6840 extern int resolvepath(const char *, char *, size_t);
6841 /* per RFC 3542; This is also defined in netdb.h */
6842 extern int rexec_af(char **, unsigned short, const char *, const char *,
6843  const char *, int *, int);
6844 
6845 extern int rmdir(const char *);
6846 
6847 /* per RFC 3542; This is also defined in netdb.h */
6848 extern int rresvport_af(int *, int);
6849 
6850 
6851 
6852 
6853 extern void *sbrk(intptr_t);
6854 
6855 
6856 extern int setegid(gid_t);
6857 extern int seteuid(uid_t);
6858 
6859 extern int setgid(gid_t);
6860 
6861 extern int setgroups(int, const gid_t *);
6862 extern int sethostname(char *, int);
6863 
6864 extern int setpgid(pid_t, pid_t);
6865 
6866 extern pid_t setpgrp(void);
6867 extern int setregid(gid_t, gid_t);
6868 extern int setreuid(uid_t, uid_t);
6869 
6870 extern pid_t setsid(void);
6871 extern int setuid(uid_t);
6872 
6873 extern void setusershell(void);
6874 
6875 extern unsigned sleep(unsigned);
6876 
6877 extern int stime(const time_t *);
6878 
6879 
6880 
6881 
6882 
6883 
6884 extern int symlink(const char *, const char *);
6885 extern void sync(void);
6886 # 534 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6887 extern long sysconf(int);
6888 extern pid_t tcgetpgrp(int);
6889 extern int tcsetpgrp(int, pid_t);
6890 
6891 
6892 
6893 extern off_t tell(int);
6894 
6895 
6896 
6897 
6898 extern int truncate(const char *, off_t);
6899 
6900 extern char *ttyname(int);
6901 
6902 extern useconds_t ualarm(useconds_t, useconds_t);
6903 
6904 extern int unlink(const char *);
6905 
6906 extern char *getwd(char *);
6907 extern int usleep(useconds_t);
6908 extern pid_t vfork(void) __attribute__((__returns_twice__));
6909 #pragma unknown_control_flow(vfork)
6910 
6911 
6912 extern void vhangup(void);
6913 
6914 extern ssize_t write(int, const void *, size_t);
6915 
6916 extern void yield(void);
6917 
6918 
6919 
6920 
6921  /* || defined(_XPG7) */
6922 extern int faccessat(int, const char *, int, int);
6923 extern int fchownat(int, const char *, uid_t, gid_t, int);
6924 extern int linkat(int, const char *, int, const char *, int);
6925 extern ssize_t readlinkat(int, const char *,
6926  char *, size_t);
6927 extern int renameat(int, const char *, int, const char *);
6928 extern int symlinkat(const char *, int, const char *);
6929 extern int unlinkat(int, const char *, int);
6930 
6931 
6932 extern int get_nprocs(void);
6933 extern int get_nprocs_conf(void);
6934 
6935 
6936 /* transitional large file interface versions */
6937 
6938 
6939 extern int ftruncate64(int, off64_t);
6940 extern off64_t lseek64(int, off64_t, int);
6941 extern ssize_t pread64(int, void *, size_t, off64_t);
6942 extern ssize_t pwrite64(int, const void *, size_t, off64_t);
6943 extern off64_t tell64(int);
6944 extern int truncate64(const char *, off64_t);
6945 extern int lockf64(int, int, off64_t);
6946 
6947 
6948 /*
6949  * getlogin_r() & ttyname_r() prototypes are defined here.
6950  */
6951 
6952 /*
6953  * Previous releases of Solaris, starting at 2.3, provided definitions of
6954  * various functions as specified in POSIX.1c, Draft 6.  For some of these
6955  * functions, the final POSIX 1003.1c standard had a different number of
6956  * arguments and return values.
6957  *
6958  * The following segment of this header provides support for the standard
6959  * interfaces while supporting applications written under earlier
6960  * releases.  The application defines appropriate values of the feature
6961  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
6962  * whether it was written to expect the Draft 6 or standard versions of
6963  * these interfaces, before including this header.  This header then
6964  * provides a mapping from the source version of the interface to an
6965  * appropriate binary interface.  Such mappings permit an application
6966  * to be built from libraries and objects which have mixed expectations
6967  * of the definitions of these functions.
6968  *
6969  * For applications using the Draft 6 definitions, the binary symbol is the
6970  * same as the source symbol, and no explicit mapping is needed.  For the
6971  * standard interface, the function func() is mapped to the binary symbol
6972  * _posix_func().  The preferred mechanism for the remapping is a compiler
6973  * #pragma.  If the compiler does not provide such a #pragma, the header file
6974  * defines a static function func() which calls the _posix_func() version;
6975  * this has to be done instead of #define since POSIX specifies that an
6976  * application can #undef the symbol and still be bound to the correct
6977  * implementation.  Unfortunately, the statics confuse lint so we fallback to
6978  * #define in that case.
6979  *
6980  * NOTE: Support for the Draft 6 definitions is provided for compatibility
6981  * only.  New applications/libraries should use the standard definitions.
6982  */
6983 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6984 
6985 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6986 #pragma redefine_extname getlogin_r getloginx_r
6987 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6988 
6989 
6990 
6991 
6992 
6993 
6994 extern char *getlogin_r(char *, int);
6995 
6996 extern char *ttyname_r(int, char *, int);
6997 
6998 
6999 
7000 
7001 
7002 
7003 extern int getentropy(void *, size_t);
7004 # 33 "open_package_datastream.c" 2
7005 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ulimit.h" 1
7006 /*
7007  * CDDL HEADER START
7008  *
7009  * The contents of this file are subject to the terms of the
7010  * Common Development and Distribution License, Version 1.0 only
7011  * (the "License").  You may not use this file except in compliance
7012  * with the License.
7013  *
7014  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7015  * or http://www.opensolaris.org/os/licensing.
7016  * See the License for the specific language governing permissions
7017  * and limitations under the License.
7018  *
7019  * When distributing Covered Code, include this CDDL HEADER in each
7020  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7021  * If applicable, add the following below this CDDL HEADER, with the
7022  * fields enclosed by brackets "[]" replaced with your own identifying
7023  * information: Portions Copyright [yyyy] [name of copyright owner]
7024  *
7025  * CDDL HEADER END
7026  */
7027 /*
7028  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7029  */
7030 /*	Copyright (c) 1988 AT&T	*/
7031 /*	  All Rights Reserved  	*/
7032 
7033 
7034 
7035 
7036 
7037 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ulimit.h" 1
7038 /*
7039  * CDDL HEADER START
7040  *
7041  * The contents of this file are subject to the terms of the
7042  * Common Development and Distribution License, Version 1.0 only
7043  * (the "License").  You may not use this file except in compliance
7044  * with the License.
7045  *
7046  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7047  * or http://www.opensolaris.org/os/licensing.
7048  * See the License for the specific language governing permissions
7049  * and limitations under the License.
7050  *
7051  * When distributing Covered Code, include this CDDL HEADER in each
7052  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7053  * If applicable, add the following below this CDDL HEADER, with the
7054  * fields enclosed by brackets "[]" replaced with your own identifying
7055  * information: Portions Copyright [yyyy] [name of copyright owner]
7056  *
7057  * CDDL HEADER END
7058  */
7059 /*
7060  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
7061  * Use is subject to license terms.
7062  */
7063 
7064 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7065 /*	  All Rights Reserved  	*/
7066 
7067 /*	Copyright (c) 1987, 1988 Microsoft Corporation	*/
7068 /*	  All Rights Reserved	*/
7069 
7070 
7071 
7072 
7073 #pragma ident "%Z%%M%	%I%	%E% SMI"
7074 
7075 
7076 
7077 
7078 
7079 /*
7080  * The following are codes which can be
7081  * passed to the ulimit system call.
7082  */
7083 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ulimit.h"
7084 /*
7085  * The following are symbolic constants required for
7086  * X/Open Conformance.   They are the equivalents of
7087  * the constants above.
7088  */
7089 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ulimit.h" 2
7090 
7091 
7092 
7093 
7094 
7095 extern long ulimit(int, ...);
7096 # 34 "open_package_datastream.c" 2
7097 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
7098 /*
7099  * CDDL HEADER START
7100  *
7101  * The contents of this file are subject to the terms of the
7102  * Common Development and Distribution License (the "License").
7103  * You may not use this file except in compliance with the License.
7104  *
7105  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7106  * or http://www.opensolaris.org/os/licensing.
7107  * See the License for the specific language governing permissions
7108  * and limitations under the License.
7109  *
7110  * When distributing Covered Code, include this CDDL HEADER in each
7111  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7112  * If applicable, add the following below this CDDL HEADER, with the
7113  * fields enclosed by brackets "[]" replaced with your own identifying
7114  * information: Portions Copyright [yyyy] [name of copyright owner]
7115  *
7116  * CDDL HEADER END
7117  */
7118 
7119 /*
7120  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7121  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
7122  */
7123 
7124 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
7125 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
7126 /*	All Rights Reserved	*/
7127 
7128 
7129 
7130 
7131 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7132 /*
7133  * CDDL HEADER START
7134  *
7135  * The contents of this file are subject to the terms of the
7136  * Common Development and Distribution License (the "License").
7137  * You may not use this file except in compliance with the License.
7138  *
7139  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7140  * or http://www.opensolaris.org/os/licensing.
7141  * See the License for the specific language governing permissions
7142  * and limitations under the License.
7143  *
7144  * When distributing Covered Code, include this CDDL HEADER in each
7145  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7146  * If applicable, add the following below this CDDL HEADER, with the
7147  * fields enclosed by brackets "[]" replaced with your own identifying
7148  * information: Portions Copyright [yyyy] [name of copyright owner]
7149  *
7150  * CDDL HEADER END
7151  */
7152 
7153 /*
7154  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7155  * Copyright 2016 Joyent, Inc.
7156  *
7157  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7158  * Use is subject to license terms.
7159  */
7160 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7161 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7162 /*
7163  * CDDL HEADER START
7164  *
7165  * The contents of this file are subject to the terms of the
7166  * Common Development and Distribution License (the "License").
7167  * You may not use this file except in compliance with the License.
7168  *
7169  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7170  * or http://www.opensolaris.org/os/licensing.
7171  * See the License for the specific language governing permissions
7172  * and limitations under the License.
7173  *
7174  * When distributing Covered Code, include this CDDL HEADER in each
7175  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7176  * If applicable, add the following below this CDDL HEADER, with the
7177  * fields enclosed by brackets "[]" replaced with your own identifying
7178  * information: Portions Copyright [yyyy] [name of copyright owner]
7179  *
7180  * CDDL HEADER END
7181  */
7182 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7183 /*	  All Rights Reserved  	*/
7184 
7185 
7186 /*
7187  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7188  * Use is subject to license terms.
7189  *
7190  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7191  * Copyright 2016 Joyent, Inc.
7192  */
7193 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7194 
7195 
7196 
7197 
7198 
7199 /*
7200  * The implementation specific header <sys/time_impl.h> includes a
7201  * definition for timestruc_t needed by the stat structure.  However,
7202  * including either <time.h>, which includes <sys/time_impl.h>, or
7203  * including <sys/time_impl.h> directly will break both X/Open and
7204  * POSIX namespace. Preceeding tag, structure, and structure member
7205  * names with underscores eliminates the namespace breakage and at the
7206  * same time, with unique type names, eliminates the possibility of
7207  * timespec_t or timestruct_t naming conflicts that could otherwise
7208  * result based on the order of inclusion of <sys/stat.h> and
7209  * <sys/time.h>.  The header <sys/time_std_impl.h> contains the
7210  * standards namespace safe versions of these definitions.
7211  */
7212 
7213 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
7214 /*
7215  * CDDL HEADER START
7216  *
7217  * The contents of this file are subject to the terms of the
7218  * Common Development and Distribution License, Version 1.0 only
7219  * (the "License").  You may not use this file except in compliance
7220  * with the License.
7221  *
7222  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7223  * or http://www.opensolaris.org/os/licensing.
7224  * See the License for the specific language governing permissions
7225  * and limitations under the License.
7226  *
7227  * When distributing Covered Code, include this CDDL HEADER in each
7228  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7229  * If applicable, add the following below this CDDL HEADER, with the
7230  * fields enclosed by brackets "[]" replaced with your own identifying
7231  * information: Portions Copyright [yyyy] [name of copyright owner]
7232  *
7233  * CDDL HEADER END
7234  */
7235 /*
7236  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
7237  * Use is subject to license terms.
7238  */
7239 
7240 /*
7241  * Implementation-private.  This header should not be included
7242  * directly by an application.  The application should instead
7243  * include <time.h> which includes this header conditionally
7244  * depending on which feature test macros are defined. By default,
7245  * this header is included by <time.h>.  X/Open and POSIX
7246  * standards requirements result in this header being included
7247  * by <time.h> only under a restricted set of conditions.
7248  */
7249 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7250 
7251 
7252 
7253 
7254 
7255 
7256 /*
7257  * stat structure, used by stat(2) and fstat(2)
7258  */
7259 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7260 /*
7261  * large file compilation environment setup
7262  */
7263 
7264 
7265 
7266 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7267 #pragma redefine_extname fstat fstat64
7268 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7269 
7270 
7271 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7272 #pragma redefine_extname stat stat64
7273 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7274 
7275 
7276 
7277 
7278 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7279 #pragma redefine_extname fstatat fstatat64
7280 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7281 
7282 
7283 
7284 
7285 
7286 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7287 #pragma redefine_extname lstat lstat64
7288 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7289 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7290 /*
7291  * In the LP64 compilation environment, map large file interfaces
7292  * back to native versions where possible.
7293  */
7294 # 211 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7295 /*
7296  * User level stat structure definitions.
7297  */
7298 # 242 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7299 struct stat {
7300  dev_t st_dev;
7301  long st_pad1[3]; /* reserved for network id */
7302  ino_t st_ino;
7303  mode_t st_mode;
7304  nlink_t st_nlink;
7305  uid_t st_uid;
7306  gid_t st_gid;
7307  dev_t st_rdev;
7308  long st_pad2[2];
7309  off_t st_size;
7310 
7311 
7312 
7313 
7314  timestruc_t st_atim;
7315  timestruc_t st_mtim;
7316  timestruc_t st_ctim;
7317 
7318 
7319 
7320 
7321 
7322  blksize_t st_blksize;
7323  blkcnt_t st_blocks;
7324  char st_fstype[16];
7325  long st_pad4[8]; /* expansion area */
7326 };
7327 
7328 
7329 
7330 /* transitional large file interface version */
7331 # 303 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7332 struct stat64 {
7333  dev_t st_dev;
7334  long st_pad1[3]; /* reserved for network id */
7335  ino64_t st_ino;
7336  mode_t st_mode;
7337  nlink_t st_nlink;
7338  uid_t st_uid;
7339  gid_t st_gid;
7340  dev_t st_rdev;
7341  long st_pad2[2];
7342  off64_t st_size;
7343 
7344  timestruc_t st_atim;
7345  timestruc_t st_mtim;
7346  timestruc_t st_ctim;
7347 
7348 
7349 
7350 
7351 
7352  blksize_t st_blksize;
7353  blkcnt64_t st_blocks;
7354  char st_fstype[16];
7355  long st_pad4[8]; /* expansion area */
7356 };
7357 # 401 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7358 /* MODE MASKS */
7359 
7360 /* de facto standard definitions */
7361 
7362 
7363 
7364 
7365 
7366 
7367 /* XENIX definitions are not relevant to Solaris */
7368 # 428 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7369 /* the following macros are for POSIX conformance */
7370 # 454 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7371 /* POSIX.4 macros */
7372 
7373 
7374 
7375 
7376 
7377 
7378 /*
7379  * A version number is included in the x86 SVR4 stat and mknod interfaces
7380  * so that SVR4 binaries can be supported.  An LP64 kernel that supports
7381  * the i386 ABI need to be aware of this too.
7382  */
7383 # 476 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7384  /* || defined(_XPG7) */
7385 /* for use with futimens() and utimensat() */
7386 # 486 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
7387 extern int fchmod(int, mode_t);
7388 
7389 
7390 extern int chmod(const char *, mode_t);
7391 extern int mkdir(const char *, mode_t);
7392 extern int mkfifo(const char *, mode_t);
7393 extern mode_t umask(mode_t);
7394 
7395 /* transitional large file interfaces */
7396 
7397 
7398 extern int fstat64(int, struct stat64 *);
7399 extern int stat64(const char *, struct stat64 *);
7400 extern int lstat64(const char *, struct stat64 *);
7401 
7402 
7403 extern int fstatat64(int, const char *, struct stat64 *, int);
7404 
7405 
7406 
7407 
7408 
7409  /* || defined(_XPG7) */
7410 extern int mkdirat(int, const char *, mode_t);
7411 extern int mkfifoat(int, const char *, mode_t);
7412 extern int mknodat(int, const char *, mode_t, dev_t);
7413 extern int fchmodat(int, const char *, mode_t, int);
7414 extern int futimens(int, const struct timespec[2]);
7415 extern int utimensat(int, const char *, const struct timespec[2], int);
7416 
7417 
7418 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 1
7419 /*
7420  * CDDL HEADER START
7421  *
7422  * The contents of this file are subject to the terms of the
7423  * Common Development and Distribution License (the "License").
7424  * You may not use this file except in compliance with the License.
7425  *
7426  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7427  * or http://www.opensolaris.org/os/licensing.
7428  * See the License for the specific language governing permissions
7429  * and limitations under the License.
7430  *
7431  * When distributing Covered Code, include this CDDL HEADER in each
7432  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7433  * If applicable, add the following below this CDDL HEADER, with the
7434  * fields enclosed by brackets "[]" replaced with your own identifying
7435  * information: Portions Copyright [yyyy] [name of copyright owner]
7436  *
7437  * CDDL HEADER END
7438  */
7439 
7440 /*
7441  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
7442  * Use is subject to license terms.
7443  */
7444 
7445 
7446 
7447 
7448 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7449 /*
7450  * CDDL HEADER START
7451  *
7452  * The contents of this file are subject to the terms of the
7453  * Common Development and Distribution License (the "License").
7454  * You may not use this file except in compliance with the License.
7455  *
7456  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7457  * or http://www.opensolaris.org/os/licensing.
7458  * See the License for the specific language governing permissions
7459  * and limitations under the License.
7460  *
7461  * When distributing Covered Code, include this CDDL HEADER in each
7462  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7463  * If applicable, add the following below this CDDL HEADER, with the
7464  * fields enclosed by brackets "[]" replaced with your own identifying
7465  * information: Portions Copyright [yyyy] [name of copyright owner]
7466  *
7467  * CDDL HEADER END
7468  */
7469 
7470 /*
7471  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7472  * Copyright 2016 Joyent, Inc.
7473  *
7474  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7475  * Use is subject to license terms.
7476  */
7477 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
7478 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7479 /*
7480  * CDDL HEADER START
7481  *
7482  * The contents of this file are subject to the terms of the
7483  * Common Development and Distribution License (the "License").
7484  * You may not use this file except in compliance with the License.
7485  *
7486  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7487  * or http://www.opensolaris.org/os/licensing.
7488  * See the License for the specific language governing permissions
7489  * and limitations under the License.
7490  *
7491  * When distributing Covered Code, include this CDDL HEADER in each
7492  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7493  * If applicable, add the following below this CDDL HEADER, with the
7494  * fields enclosed by brackets "[]" replaced with your own identifying
7495  * information: Portions Copyright [yyyy] [name of copyright owner]
7496  *
7497  * CDDL HEADER END
7498  */
7499 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7500 /*	  All Rights Reserved  	*/
7501 
7502 
7503 /*
7504  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7505  * Use is subject to license terms.
7506  *
7507  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7508  * Copyright 2016 Joyent, Inc.
7509  */
7510 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
7511 
7512 
7513 
7514 
7515 
7516 /*
7517  * The implementation specific header for <sys/stat.h>
7518  */
7519 
7520 
7521 
7522 
7523 
7524 extern int fstat(int, struct stat *);
7525 extern int stat(const char *, struct stat *);
7526 
7527 
7528 
7529 extern int fstatat(int, const char *, struct stat *, int);
7530 
7531 
7532 
7533 extern int lstat(const char *, struct stat *);
7534 extern int mknod(const char *, mode_t, dev_t);
7535 # 518 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
7536 # 35 "open_package_datastream.c" 2
7537 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h" 1
7538 /*
7539  * CDDL HEADER START
7540  *
7541  * The contents of this file are subject to the terms of the
7542  * Common Development and Distribution License, Version 1.0 only
7543  * (the "License").  You may not use this file except in compliance
7544  * with the License.
7545  *
7546  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7547  * or http://www.opensolaris.org/os/licensing.
7548  * See the License for the specific language governing permissions
7549  * and limitations under the License.
7550  *
7551  * When distributing Covered Code, include this CDDL HEADER in each
7552  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7553  * If applicable, add the following below this CDDL HEADER, with the
7554  * fields enclosed by brackets "[]" replaced with your own identifying
7555  * information: Portions Copyright [yyyy] [name of copyright owner]
7556  *
7557  * CDDL HEADER END
7558  */
7559 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7560 /*	  All Rights Reserved  	*/
7561 
7562 /*
7563  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7564  *
7565  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7566  * Use is subject to license terms.
7567  */
7568 
7569 
7570 
7571 
7572 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7573 /*
7574  * CDDL HEADER START
7575  *
7576  * The contents of this file are subject to the terms of the
7577  * Common Development and Distribution License (the "License").
7578  * You may not use this file except in compliance with the License.
7579  *
7580  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7581  * or http://www.opensolaris.org/os/licensing.
7582  * See the License for the specific language governing permissions
7583  * and limitations under the License.
7584  *
7585  * When distributing Covered Code, include this CDDL HEADER in each
7586  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7587  * If applicable, add the following below this CDDL HEADER, with the
7588  * fields enclosed by brackets "[]" replaced with your own identifying
7589  * information: Portions Copyright [yyyy] [name of copyright owner]
7590  *
7591  * CDDL HEADER END
7592  */
7593 
7594 /*
7595  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7596  * Copyright 2016 Joyent, Inc.
7597  *
7598  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7599  * Use is subject to license terms.
7600  */
7601 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h" 2
7602 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7603 /*
7604  * CDDL HEADER START
7605  *
7606  * The contents of this file are subject to the terms of the
7607  * Common Development and Distribution License (the "License").
7608  * You may not use this file except in compliance with the License.
7609  *
7610  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7611  * or http://www.opensolaris.org/os/licensing.
7612  * See the License for the specific language governing permissions
7613  * and limitations under the License.
7614  *
7615  * When distributing Covered Code, include this CDDL HEADER in each
7616  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7617  * If applicable, add the following below this CDDL HEADER, with the
7618  * fields enclosed by brackets "[]" replaced with your own identifying
7619  * information: Portions Copyright [yyyy] [name of copyright owner]
7620  *
7621  * CDDL HEADER END
7622  */
7623 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7624 /*	  All Rights Reserved  	*/
7625 
7626 
7627 /*
7628  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7629  * Use is subject to license terms.
7630  *
7631  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7632  * Copyright 2016 Joyent, Inc.
7633  */
7634 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h" 2
7635 
7636 
7637 
7638 
7639 
7640 /*
7641  * Structure returned by statvfs(2).
7642  */
7643 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7644 typedef struct statvfs {
7645  unsigned long f_bsize; /* fundamental file system block size */
7646  unsigned long f_frsize; /* fragment size */
7647  fsblkcnt_t f_blocks; /* total blocks of f_frsize on fs */
7648  fsblkcnt_t f_bfree; /* total free blocks of f_frsize */
7649  fsblkcnt_t f_bavail; /* free blocks avail to non-superuser */
7650  fsfilcnt_t f_files; /* total file nodes (inodes) */
7651  fsfilcnt_t f_ffree; /* total free file nodes */
7652  fsfilcnt_t f_favail; /* free nodes avail to non-superuser */
7653  unsigned long f_fsid; /* file system id (dev for now) */
7654  char f_basetype[16]; /* target fs type name, */
7655       /* null-terminated */
7656  unsigned long f_flag; /* bit-mask of flags */
7657  unsigned long f_namemax; /* maximum file name length */
7658  char f_fstr[32]; /* filesystem-specific string */
7659 
7660  unsigned long f_filler[16]; /* reserved for future expansion */
7661 
7662 } statvfs_t;
7663 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7664 /* transitional large file interface version */
7665 
7666 typedef struct statvfs64 {
7667  unsigned long f_bsize; /* preferred file system block size */
7668  unsigned long f_frsize; /* fundamental file system block size */
7669  fsblkcnt64_t f_blocks; /* total blocks of f_frsize */
7670  fsblkcnt64_t f_bfree; /* total free blocks of f_frsize */
7671  fsblkcnt64_t f_bavail; /* free blocks avail to non-superuser */
7672  fsfilcnt64_t f_files; /* total # of file nodes (inodes) */
7673  fsfilcnt64_t f_ffree; /* total # of free file nodes */
7674  fsfilcnt64_t f_favail; /* free nodes avail to non-superuser */
7675  unsigned long f_fsid; /* file system id (dev for now) */
7676  char f_basetype[16]; /* target fs type name, */
7677       /* null-terminated */
7678  unsigned long f_flag; /* bit-mask of flags */
7679  unsigned long f_namemax; /* maximum file name length */
7680  char f_fstr[32]; /* filesystem-specific string */
7681 
7682  unsigned long f_filler[16]; /* reserved for future expansion */
7683 
7684 } statvfs64_t;
7685 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7686 /*
7687  * Flag definitions.
7688  */
7689 
7690 
7691 
7692 
7693 
7694 
7695 /*
7696  * large file compilation environment setup
7697  */
7698 
7699 
7700 
7701 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7702 #pragma redefine_extname statvfs statvfs64
7703 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7704 
7705 
7706 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7707 #pragma redefine_extname fstatvfs fstatvfs64
7708 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7709 # 190 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/statvfs.h"
7710 int statvfs(const char *, statvfs_t *);
7711 int fstatvfs(int, statvfs_t *);
7712 
7713 /* transitional large file interface versions */
7714 
7715 
7716 int statvfs64(const char *, statvfs64_t *);
7717 int fstatvfs64(int, statvfs64_t *);
7718 # 36 "open_package_datastream.c" 2
7719 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h" 1
7720 /*
7721  * CDDL HEADER START
7722  *
7723  * The contents of this file are subject to the terms of the
7724  * Common Development and Distribution License, Version 1.0 only
7725  * (the "License").  You may not use this file except in compliance
7726  * with the License.
7727  *
7728  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7729  * or http://www.opensolaris.org/os/licensing.
7730  * See the License for the specific language governing permissions
7731  * and limitations under the License.
7732  *
7733  * When distributing Covered Code, include this CDDL HEADER in each
7734  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7735  * If applicable, add the following below this CDDL HEADER, with the
7736  * fields enclosed by brackets "[]" replaced with your own identifying
7737  * information: Portions Copyright [yyyy] [name of copyright owner]
7738  *
7739  * CDDL HEADER END
7740  */
7741 /*	Copyright (c) 1988 AT&T	*/
7742 /*	  All Rights Reserved  	*/
7743 
7744 /*
7745  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7746  * Copyright 2016 Joyent, Inc.
7747  * Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
7748  *
7749  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7750  * Use is subject to license terms.
7751  */
7752 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h"
7753 extern void __assert(const char *, const char *, int);
7754 
7755 
7756 /*
7757  * In C11 the static_assert macro is always defined, unlike the assert macro.
7758  */
7759 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h"
7760 /*
7761  * Note that the ANSI C Standard requires all headers to be idempotent except
7762  * <assert.h> which is explicitly required not to be idempotent (section 4.1.2).
7763  * Therefore, it is by intent that the header guards (#ifndef _ASSERT_H) do
7764  * not span this entire file.
7765  */
7766 # 37 "open_package_datastream.c" 2
7767 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 1
7768 /*
7769  * CDDL HEADER START
7770  *
7771  * The contents of this file are subject to the terms of the
7772  * Common Development and Distribution License (the "License").
7773  * You may not use this file except in compliance with the License.
7774  *
7775  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7776  * or http://www.opensolaris.org/os/licensing.
7777  * See the License for the specific language governing permissions
7778  * and limitations under the License.
7779  *
7780  * When distributing Covered Code, include this CDDL HEADER in each
7781  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7782  * If applicable, add the following below this CDDL HEADER, with the
7783  * fields enclosed by brackets "[]" replaced with your own identifying
7784  * information: Portions Copyright [yyyy] [name of copyright owner]
7785  *
7786  * CDDL HEADER END
7787  */
7788 
7789 /*
7790  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7791  *
7792  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
7793  * Use is subject to license terms.
7794  */
7795 
7796 /*	Copyright (c) 1988 AT&T	*/
7797 /*	  All Rights Reserved  	*/
7798 
7799 
7800 
7801 
7802 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7803 /*
7804  * CDDL HEADER START
7805  *
7806  * The contents of this file are subject to the terms of the
7807  * Common Development and Distribution License (the "License").
7808  * You may not use this file except in compliance with the License.
7809  *
7810  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7811  * or http://www.opensolaris.org/os/licensing.
7812  * See the License for the specific language governing permissions
7813  * and limitations under the License.
7814  *
7815  * When distributing Covered Code, include this CDDL HEADER in each
7816  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7817  * If applicable, add the following below this CDDL HEADER, with the
7818  * fields enclosed by brackets "[]" replaced with your own identifying
7819  * information: Portions Copyright [yyyy] [name of copyright owner]
7820  *
7821  * CDDL HEADER END
7822  */
7823 
7824 /*
7825  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7826  * Copyright 2016 Joyent, Inc.
7827  *
7828  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7829  * Use is subject to license terms.
7830  */
7831 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
7832 
7833 
7834 
7835 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7836 /*
7837  * CDDL HEADER START
7838  *
7839  * The contents of this file are subject to the terms of the
7840  * Common Development and Distribution License (the "License").
7841  * You may not use this file except in compliance with the License.
7842  *
7843  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7844  * or http://www.opensolaris.org/os/licensing.
7845  * See the License for the specific language governing permissions
7846  * and limitations under the License.
7847  *
7848  * When distributing Covered Code, include this CDDL HEADER in each
7849  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7850  * If applicable, add the following below this CDDL HEADER, with the
7851  * fields enclosed by brackets "[]" replaced with your own identifying
7852  * information: Portions Copyright [yyyy] [name of copyright owner]
7853  *
7854  * CDDL HEADER END
7855  */
7856 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7857 /*	  All Rights Reserved  	*/
7858 
7859 
7860 /*
7861  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7862  * Use is subject to license terms.
7863  *
7864  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7865  * Copyright 2016 Joyent, Inc.
7866  */
7867 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
7868 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 1
7869 /*
7870  * CDDL HEADER START
7871  *
7872  * The contents of this file are subject to the terms of the
7873  * Common Development and Distribution License (the "License").
7874  * You may not use this file except in compliance with the License.
7875  *
7876  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7877  * or http://www.opensolaris.org/os/licensing.
7878  * See the License for the specific language governing permissions
7879  * and limitations under the License.
7880  *
7881  * When distributing Covered Code, include this CDDL HEADER in each
7882  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7883  * If applicable, add the following below this CDDL HEADER, with the
7884  * fields enclosed by brackets "[]" replaced with your own identifying
7885  * information: Portions Copyright [yyyy] [name of copyright owner]
7886  *
7887  * CDDL HEADER END
7888  */
7889 
7890 /*
7891  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
7892  */
7893 
7894 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7895 /*	  All Rights Reserved  	*/
7896 
7897 /*
7898  * University Copyright- Copyright (c) 1982, 1986, 1988
7899  * The Regents of the University of California
7900  * All Rights Reserved
7901  *
7902  * University Acknowledgment- Portions of this document are derived from
7903  * software developed by the University of California, Berkeley, and its
7904  * contributors.
7905  */
7906 
7907 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
7908 /* Copyright 2015, Joyent, Inc. */
7909 
7910 
7911 
7912 
7913 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7914 /*
7915  * CDDL HEADER START
7916  *
7917  * The contents of this file are subject to the terms of the
7918  * Common Development and Distribution License (the "License").
7919  * You may not use this file except in compliance with the License.
7920  *
7921  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7922  * or http://www.opensolaris.org/os/licensing.
7923  * See the License for the specific language governing permissions
7924  * and limitations under the License.
7925  *
7926  * When distributing Covered Code, include this CDDL HEADER in each
7927  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7928  * If applicable, add the following below this CDDL HEADER, with the
7929  * fields enclosed by brackets "[]" replaced with your own identifying
7930  * information: Portions Copyright [yyyy] [name of copyright owner]
7931  *
7932  * CDDL HEADER END
7933  */
7934 
7935 /*
7936  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7937  * Copyright 2016 Joyent, Inc.
7938  *
7939  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7940  * Use is subject to license terms.
7941  */
7942 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 2
7943 
7944 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7945 /*
7946  * CDDL HEADER START
7947  *
7948  * The contents of this file are subject to the terms of the
7949  * Common Development and Distribution License (the "License").
7950  * You may not use this file except in compliance with the License.
7951  *
7952  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7953  * or http://www.opensolaris.org/os/licensing.
7954  * See the License for the specific language governing permissions
7955  * and limitations under the License.
7956  *
7957  * When distributing Covered Code, include this CDDL HEADER in each
7958  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7959  * If applicable, add the following below this CDDL HEADER, with the
7960  * fields enclosed by brackets "[]" replaced with your own identifying
7961  * information: Portions Copyright [yyyy] [name of copyright owner]
7962  *
7963  * CDDL HEADER END
7964  */
7965 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7966 /*	  All Rights Reserved  	*/
7967 
7968 
7969 /*
7970  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7971  * Use is subject to license terms.
7972  *
7973  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7974  * Copyright 2016 Joyent, Inc.
7975  */
7976 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 2
7977 
7978 
7979 
7980 
7981 
7982 /*
7983  * Flag values accessible to open(2) and fcntl(2)
7984  * The first five can only be set (exclusively) by open(2).
7985  */
7986 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7987     /* defines read/write file integrity */
7988 
7989 
7990 
7991 
7992 
7993 
7994 /*
7995  * Flag values accessible only to open(2).
7996  */
7997 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
7998 /*
7999  * fcntl(2) requests
8000  *
8001  * N.B.: values are not necessarily assigned sequentially below.
8002  */
8003 
8004 
8005 
8006 
8007 
8008 
8009 
8010 /*
8011  * Applications that read /dev/mem must be built like the kernel.  A
8012  * new symbol "_KMEMUSER" is defined for this purpose.
8013  */
8014 # 128 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8015      /* EINVAL is fildes matches arg1 */
8016 # 137 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8017 /*
8018  * Numbers 20-22 have been removed and should not be reused.
8019  */
8020 
8021 
8022 
8023 
8024 
8025     /* manager */
8026 
8027 /*
8028  * Commands that refer to flock structures.  The argument types differ between
8029  * the large and small file environments; therefore, the #defined values must
8030  * as well.
8031  * The NBMAND forms are private and should not be used.
8032  * The FLOCK forms are also private and should not be used.
8033  */
8034 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8035 /* ILP32 large file application compilation environment version */
8036 # 190 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8037 /*
8038  * transitional large file interface version
8039  * These are only valid in a 32 bit application compiled with large files
8040  * option, for source compatibility, the 64-bit versions are mapped back
8041  * to the native versions.
8042  */
8043 # 233 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8044 /*
8045  * File segment locking set data type - information passed to system by user.
8046  */
8047 
8048 /* regular version, for both small and large file compilation environment */
8049 typedef struct flock {
8050  short l_type;
8051  short l_whence;
8052  off_t l_start;
8053  off_t l_len; /* len == 0 means until end of file */
8054  int l_sysid;
8055  pid_t l_pid;
8056  long l_pad[4]; /* reserve area */
8057 } flock_t;
8058 # 264 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8059 /* transitional large file interface version */
8060 
8061 
8062 
8063 typedef struct flock64 {
8064  short l_type;
8065  short l_whence;
8066  off64_t l_start;
8067  off64_t l_len; /* len == 0 means until end of file */
8068  int l_sysid;
8069  pid_t l_pid;
8070  long l_pad[4]; /* reserve area */
8071 } flock64_t;
8072 # 328 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8073 /*
8074  * File segment locking types.
8075  */
8076 
8077 
8078 
8079 
8080 
8081 /*
8082  * POSIX constants
8083  */
8084 
8085 /* Mask for file access modes */
8086 
8087 
8088 
8089 /*
8090  * DIRECTIO
8091  */
8092 
8093 
8094 
8095 
8096 /*
8097  * File share reservation type
8098  */
8099 typedef struct fshare {
8100  short f_access;
8101  short f_deny;
8102  int f_id;
8103 } fshare_t;
8104 
8105 /*
8106  * f_access values
8107  */
8108 
8109 
8110 
8111 
8112 
8113 
8114 /*
8115  * f_deny values
8116  */
8117 # 381 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8118 /*
8119  * Special flags for functions such as openat(), fstatat()....
8120  */
8121 
8122 
8123  /* || defined(_XPG7) */
8124 # 396 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
8125 /* advice for posix_fadvise */
8126 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
8127 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8128 /* large file compilation environment setup */
8129 
8130 
8131 
8132 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8133 #pragma redefine_extname open open64
8134 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8135 
8136 
8137 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8138 #pragma redefine_extname creat creat64
8139 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8140 
8141 
8142 
8143 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8144 #pragma redefine_extname posix_fadvise posix_fadvise64
8145 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8146 
8147 
8148 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8149 #pragma redefine_extname posix_fallocate posix_fallocate64
8150 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8151 
8152 
8153 
8154 
8155 
8156 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8157 #pragma redefine_extname openat openat64
8158 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8159 
8160 
8161 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8162 #pragma redefine_extname attropen attropen64
8163 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8164 # 131 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
8165 extern int fcntl(int, int, ...);
8166 extern int open(const char *, int, ...);
8167 extern int creat(const char *, mode_t);
8168 
8169 extern int posix_fadvise(int, off_t, off_t, int);
8170 extern int posix_fallocate(int, off_t, off_t);
8171 
8172 
8173 
8174 extern int openat(int, const char *, int, ...);
8175 extern int attropen(const char *, const char *, int, ...);
8176 
8177 
8178 extern int directio(int, int);
8179 
8180 
8181 /* transitional large file interface versions */
8182 
8183 
8184 extern int open64(const char *, int, ...);
8185 extern int creat64(const char *, mode_t);
8186 
8187 extern int posix_fadvise64(int, off64_t, off64_t, int);
8188 extern int posix_fallocate64(int, off64_t, off64_t);
8189 
8190 
8191 
8192 extern int openat64(int, const char *, int, ...);
8193 extern int attropen64(const char *, const char *, int, ...);
8194 # 38 "open_package_datastream.c" 2
8195 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h" 1
8196 /*
8197  * CDDL HEADER START
8198  *
8199  * The contents of this file are subject to the terms of the
8200  * Common Development and Distribution License, Version 1.0 only
8201  * (the "License").  You may not use this file except in compliance
8202  * with the License.
8203  *
8204  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8205  * or http://www.opensolaris.org/os/licensing.
8206  * See the License for the specific language governing permissions
8207  * and limitations under the License.
8208  *
8209  * When distributing Covered Code, include this CDDL HEADER in each
8210  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8211  * If applicable, add the following below this CDDL HEADER, with the
8212  * fields enclosed by brackets "[]" replaced with your own identifying
8213  * information: Portions Copyright [yyyy] [name of copyright owner]
8214  *
8215  * CDDL HEADER END
8216  */
8217 /*	Copyright (c) 1988 AT&T	*/
8218 /*	  All Rights Reserved  	*/
8219 
8220 
8221 /*
8222  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
8223  * Use is subject to license terms.
8224  */
8225 
8226 
8227 
8228 
8229 
8230 #pragma ident "%Z%%M%	%I%	%E% SMI"
8231 
8232 /*
8233  * Error codes
8234  */
8235 
8236 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
8237 /*
8238  * CDDL HEADER START
8239  *
8240  * The contents of this file are subject to the terms of the
8241  * Common Development and Distribution License, Version 1.0 only
8242  * (the "License").  You may not use this file except in compliance
8243  * with the License.
8244  *
8245  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8246  * or http://www.opensolaris.org/os/licensing.
8247  * See the License for the specific language governing permissions
8248  * and limitations under the License.
8249  *
8250  * When distributing Covered Code, include this CDDL HEADER in each
8251  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8252  * If applicable, add the following below this CDDL HEADER, with the
8253  * fields enclosed by brackets "[]" replaced with your own identifying
8254  * information: Portions Copyright [yyyy] [name of copyright owner]
8255  *
8256  * CDDL HEADER END
8257  */
8258 /*
8259  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
8260  * Use is subject to license terms.
8261  */
8262 
8263 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
8264 /*	  All Rights Reserved  	*/
8265 
8266 /*
8267  * University Copyright- Copyright (c) 1982, 1986, 1988
8268  * The Regents of the University of California
8269  * All Rights Reserved
8270  *
8271  * University Acknowledgment- Portions of this document are derived from
8272  * software developed by the University of California, Berkeley, and its
8273  * contributors.
8274  */
8275 
8276 
8277 
8278 
8279 #pragma ident "%Z%%M%	%I%	%E% SMI"
8280 
8281 
8282 
8283 
8284 
8285 /*
8286  * Error codes
8287  */
8288 # 102 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8289 /* Filesystem Quotas */
8290 
8291 
8292 /* Convergent Error Returns */
8293 # 116 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8294 /* Interprocess Robust Locks */
8295 
8296 
8297 
8298 /* stream problems */
8299 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8300 /* Interprocess Robust Locks */
8301 # 148 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8302 /* shared library problems */
8303 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8304 /* BSD Networking Software */
8305  /* argument errors */
8306 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8307     /* protocol family */
8308 
8309 
8310  /* operational errors */
8311 
8312 
8313 
8314     /* of reset */
8315 
8316 
8317 
8318 
8319 
8320 /* XENIX has 135 - 142 */
8321 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
8322 /* SUN Network File System */
8323 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h" 2
8324 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h"
8325 extern int *___errno();
8326 # 39 "open_package_datastream.c" 2
8327 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ctype.h" 1
8328 /*
8329  * CDDL HEADER START
8330  *
8331  * The contents of this file are subject to the terms of the
8332  * Common Development and Distribution License, Version 1.0 only
8333  * (the "License").  You may not use this file except in compliance
8334  * with the License.
8335  *
8336  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8337  * or http://www.opensolaris.org/os/licensing.
8338  * See the License for the specific language governing permissions
8339  * and limitations under the License.
8340  *
8341  * When distributing Covered Code, include this CDDL HEADER in each
8342  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8343  * If applicable, add the following below this CDDL HEADER, with the
8344  * fields enclosed by brackets "[]" replaced with your own identifying
8345  * information: Portions Copyright [yyyy] [name of copyright owner]
8346  *
8347  * CDDL HEADER END
8348  */
8349 /*	Copyright (c) 1988 AT&T	*/
8350 /*	  All Rights Reserved  	*/
8351 
8352 
8353 /*
8354  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8355  *
8356  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8357  * Use is subject to license terms.
8358  */
8359 
8360 
8361 
8362 
8363 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/ctype_iso.h" 1
8364 /*
8365  * CDDL HEADER START
8366  *
8367  * The contents of this file are subject to the terms of the
8368  * Common Development and Distribution License, Version 1.0 only
8369  * (the "License").  You may not use this file except in compliance
8370  * with the License.
8371  *
8372  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8373  * or http://www.opensolaris.org/os/licensing.
8374  * See the License for the specific language governing permissions
8375  * and limitations under the License.
8376  *
8377  * When distributing Covered Code, include this CDDL HEADER in each
8378  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8379  * If applicable, add the following below this CDDL HEADER, with the
8380  * fields enclosed by brackets "[]" replaced with your own identifying
8381  * information: Portions Copyright [yyyy] [name of copyright owner]
8382  *
8383  * CDDL HEADER END
8384  */
8385 /*	Copyright (c) 1988 AT&T	*/
8386 /*	  All Rights Reserved  	*/
8387 
8388 /*
8389  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8390  *
8391  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8392  * Use is subject to license terms.
8393  */
8394 
8395 /*
8396  * An application should not include this header directly.  Instead it
8397  * should be included only through the inclusion of other Sun headers.
8398  *
8399  * The contents of this header is limited to identifiers specified in the
8400  * C Standard.  Any new identifiers specified in future amendments to the
8401  * C Standard must be placed in this header.  If these new identifiers
8402  * are required to also be in the C++ Standard "std" namespace, then for
8403  * anything other than macro definitions, corresponding "using" directives
8404  * must also be added to <ctype.h>.
8405  */
8406 
8407 
8408 
8409 
8410 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
8411 /*
8412  * CDDL HEADER START
8413  *
8414  * The contents of this file are subject to the terms of the
8415  * Common Development and Distribution License (the "License").
8416  * You may not use this file except in compliance with the License.
8417  *
8418  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8419  * or http://www.opensolaris.org/os/licensing.
8420  * See the License for the specific language governing permissions
8421  * and limitations under the License.
8422  *
8423  * When distributing Covered Code, include this CDDL HEADER in each
8424  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8425  * If applicable, add the following below this CDDL HEADER, with the
8426  * fields enclosed by brackets "[]" replaced with your own identifying
8427  * information: Portions Copyright [yyyy] [name of copyright owner]
8428  *
8429  * CDDL HEADER END
8430  */
8431 
8432 /*
8433  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8434  * Copyright 2016 Joyent, Inc.
8435  *
8436  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8437  * Use is subject to license terms.
8438  */
8439 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/ctype_iso.h" 2
8440 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/ctype_iso.h"
8441 extern unsigned char __ctype[];
8442 extern unsigned int *__ctype_mask;
8443 extern int *__trans_upper;
8444 extern int *__trans_lower;
8445 
8446 
8447 
8448 
8449 
8450 /*
8451  * These used to be macros, which while more efficient, precludes operation
8452  * with thread specific locales.  The old macros will still work, but new
8453  * code compiles to use functions.  This is specifically permitted by the
8454  * various standards.  Only _tolower and _toupper were required to be
8455  * delivered in macro form.
8456  */
8457 extern int isalnum(int);
8458 extern int isalpha(int);
8459 extern int iscntrl(int);
8460 extern int isdigit(int);
8461 extern int isgraph(int);
8462 extern int islower(int);
8463 extern int isprint(int);
8464 extern int ispunct(int);
8465 extern int isspace(int);
8466 extern int isupper(int);
8467 extern int isxdigit(int);
8468 
8469 extern int isblank(int);
8470 
8471 
8472 extern int tolower(int);
8473 extern int toupper(int);
8474 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ctype.h" 2
8475 
8476 /*
8477  * Allow global visibility for symbols defined in
8478  * C++ "std" namespace in <iso/ctype_iso.h>.
8479  */
8480 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ctype.h"
8481 extern int isascii(int);
8482 extern int toascii(int);
8483 extern int _tolower(int);
8484 extern int _toupper(int);
8485 # 98 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ctype.h"
8486 extern int isalnum_l(int, locale_t);
8487 extern int isalpha_l(int, locale_t);
8488 extern int isblank_l(int, locale_t);
8489 extern int iscntrl_l(int, locale_t);
8490 extern int isdigit_l(int, locale_t);
8491 extern int isgraph_l(int, locale_t);
8492 extern int islower_l(int, locale_t);
8493 extern int isprint_l(int, locale_t);
8494 extern int ispunct_l(int, locale_t);
8495 extern int isspace_l(int, locale_t);
8496 extern int isupper_l(int, locale_t);
8497 extern int isxdigit_l(int, locale_t);
8498 extern int tolower_l(int, locale_t);
8499 extern int toupper_l(int, locale_t);
8500 # 40 "open_package_datastream.c" 2
8501 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 1
8502 /*
8503  * CDDL HEADER START
8504  *
8505  * The contents of this file are subject to the terms of the
8506  * Common Development and Distribution License (the "License").
8507  * You may not use this file except in compliance with the License.
8508  *
8509  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8510  * or http://www.opensolaris.org/os/licensing.
8511  * See the License for the specific language governing permissions
8512  * and limitations under the License.
8513  *
8514  * When distributing Covered Code, include this CDDL HEADER in each
8515  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8516  * If applicable, add the following below this CDDL HEADER, with the
8517  * fields enclosed by brackets "[]" replaced with your own identifying
8518  * information: Portions Copyright [yyyy] [name of copyright owner]
8519  *
8520  * CDDL HEADER END
8521  */
8522 
8523 /*
8524  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8525  *
8526  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
8527  * Use is subject to license terms.
8528  */
8529 
8530 /*	Copyright (c) 1988 AT&T	*/
8531 /*	  All Rights Reserved  	*/
8532 
8533 
8534 
8535 
8536 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
8537 /*
8538  * CDDL HEADER START
8539  *
8540  * The contents of this file are subject to the terms of the
8541  * Common Development and Distribution License (the "License").
8542  * You may not use this file except in compliance with the License.
8543  *
8544  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8545  * or http://www.opensolaris.org/os/licensing.
8546  * See the License for the specific language governing permissions
8547  * and limitations under the License.
8548  *
8549  * When distributing Covered Code, include this CDDL HEADER in each
8550  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8551  * If applicable, add the following below this CDDL HEADER, with the
8552  * fields enclosed by brackets "[]" replaced with your own identifying
8553  * information: Portions Copyright [yyyy] [name of copyright owner]
8554  *
8555  * CDDL HEADER END
8556  */
8557 
8558 /*
8559  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8560  * Copyright 2016 Joyent, Inc.
8561  *
8562  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8563  * Use is subject to license terms.
8564  */
8565 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 2
8566 
8567 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
8568 /*
8569  * CDDL HEADER START
8570  *
8571  * The contents of this file are subject to the terms of the
8572  * Common Development and Distribution License (the "License").
8573  * You may not use this file except in compliance with the License.
8574  *
8575  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8576  * or http://www.opensolaris.org/os/licensing.
8577  * See the License for the specific language governing permissions
8578  * and limitations under the License.
8579  *
8580  * When distributing Covered Code, include this CDDL HEADER in each
8581  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8582  * If applicable, add the following below this CDDL HEADER, with the
8583  * fields enclosed by brackets "[]" replaced with your own identifying
8584  * information: Portions Copyright [yyyy] [name of copyright owner]
8585  *
8586  * CDDL HEADER END
8587  */
8588 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8589 /*	  All Rights Reserved  	*/
8590 
8591 
8592 /*
8593  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
8594  * Use is subject to license terms.
8595  *
8596  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
8597  * Copyright 2016 Joyent, Inc.
8598  */
8599 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 2
8600 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h" 1
8601 /*
8602  * CDDL HEADER START
8603  *
8604  * The contents of this file are subject to the terms of the
8605  * Common Development and Distribution License (the "License").
8606  * You may not use this file except in compliance with the License.
8607  *
8608  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8609  * or http://www.opensolaris.org/os/licensing.
8610  * See the License for the specific language governing permissions
8611  * and limitations under the License.
8612  *
8613  * When distributing Covered Code, include this CDDL HEADER in each
8614  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8615  * If applicable, add the following below this CDDL HEADER, with the
8616  * fields enclosed by brackets "[]" replaced with your own identifying
8617  * information: Portions Copyright [yyyy] [name of copyright owner]
8618  *
8619  * CDDL HEADER END
8620  */
8621 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8622 /*	  All Rights Reserved  	*/
8623 
8624 
8625 /*
8626  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8627  *
8628  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
8629  * Use is subject to license terms.
8630  */
8631 
8632 
8633 
8634 
8635 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
8636 /*
8637  * CDDL HEADER START
8638  *
8639  * The contents of this file are subject to the terms of the
8640  * Common Development and Distribution License (the "License").
8641  * You may not use this file except in compliance with the License.
8642  *
8643  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8644  * or http://www.opensolaris.org/os/licensing.
8645  * See the License for the specific language governing permissions
8646  * and limitations under the License.
8647  *
8648  * When distributing Covered Code, include this CDDL HEADER in each
8649  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8650  * If applicable, add the following below this CDDL HEADER, with the
8651  * fields enclosed by brackets "[]" replaced with your own identifying
8652  * information: Portions Copyright [yyyy] [name of copyright owner]
8653  *
8654  * CDDL HEADER END
8655  */
8656 
8657 /*
8658  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8659  * Copyright 2016 Joyent, Inc.
8660  *
8661  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8662  * Use is subject to license terms.
8663  */
8664 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h" 2
8665 
8666 
8667 
8668 
8669 
8670 /*
8671  * File-system independent directory entry.
8672  */
8673 typedef struct dirent {
8674  ino_t d_ino; /* "inode number" of entry */
8675  off_t d_off; /* offset of disk directory entry */
8676  unsigned short d_reclen; /* length of this record */
8677  char d_name[1]; /* name of file */
8678 } dirent_t;
8679 # 66 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
8680 /*
8681  * transitional large file interface version AND kernel internal version
8682  */
8683 typedef struct dirent64 {
8684  ino64_t d_ino; /* "inode number" of entry */
8685  off64_t d_off; /* offset of disk directory entry */
8686  unsigned short d_reclen; /* length of this record */
8687  char d_name[1]; /* name of file */
8688 } dirent64_t;
8689 # 90 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
8690 /*
8691  * This is the maximum number of bytes that getdents(2) will store in
8692  * user-supplied dirent buffers.
8693  */
8694 
8695 
8696 
8697 
8698 /*
8699  * large file compilation environment setup
8700  *
8701  * In the LP64 compilation environment, map large file interfaces
8702  * back to native versions where possible. (This only works because
8703  * a 'struct dirent' == 'struct dirent64').
8704  */
8705 
8706 
8707 
8708 
8709 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
8710 #pragma redefine_extname getdents getdents64
8711 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
8712 # 124 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
8713 extern int getdents(int, struct dirent *, size_t);
8714 
8715 /* N.B.: transitional large file interface version deliberately not provided */
8716 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 2
8717 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8718 typedef struct {
8719  int dd_fd; /* file descriptor */
8720  int dd_loc; /* offset in block */
8721  int dd_size; /* amount of valid data */
8722  char *dd_buf; /* directory block */
8723 } DIR; /* stream data from opendir() */
8724 # 72 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8725 /* large file compilation environment setup */
8726 
8727 
8728 
8729 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8730 #pragma redefine_extname readdir readdir64
8731 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8732 
8733 
8734 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8735 #pragma redefine_extname scandir scandir64
8736 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8737 
8738 
8739 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8740 #pragma redefine_extname alphasort alphasort64
8741 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8742 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8743 /* In the LP64 compilation environment, all APIs are already large file */
8744 # 98 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8745 extern DIR *opendir(const char *);
8746 
8747 
8748 extern DIR *fdopendir(int);
8749 extern int dirfd(DIR *);
8750 
8751 
8752 extern int scandir(const char *, struct dirent *(*[]),
8753     int (*)(const struct dirent *),
8754     int (*)(const struct dirent **,
8755      const struct dirent **));
8756 extern int alphasort(const struct dirent **,
8757      const struct dirent **);
8758 
8759 extern struct dirent *readdir(DIR *);
8760 
8761 
8762 extern long telldir(DIR *);
8763 extern void seekdir(DIR *, long);
8764 
8765 extern void rewinddir(DIR *);
8766 extern int closedir(DIR *);
8767 
8768 /* transitional large file interface */
8769 
8770 
8771 extern struct dirent64 *readdir64(DIR *);
8772 
8773 extern int scandir64(const char *, struct dirent64 *(*[]),
8774    int (*)(const struct dirent64 *),
8775    int (*)(const struct dirent64 **,
8776     const struct dirent64 **));
8777 extern int alphasort64(const struct dirent64 **, const struct dirent64 **);
8778 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8779 /*
8780  * readdir_r() prototype is defined here.
8781  *
8782  * There are several variations, depending on whether compatibility with old
8783  * POSIX draft specifications or the final specification is desired and on
8784  * whether the large file compilation environment is active.  To combat a
8785  * combinatorial explosion, enabling large files implies using the final
8786  * specification (since the definition of the large file environment
8787  * considerably postdates that of the final readdir_r specification).
8788  *
8789  * In the LP64 compilation environment, all APIs are already large file,
8790  * and since there are no 64-bit applications that can have seen the
8791  * draft implementation, again, we use the final POSIX specification.
8792  */
8793 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8794 
8795 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8796 #pragma redefine_extname readdir_r readdir64_r
8797 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
8798 
8799 
8800 
8801 
8802 
8803 extern int readdir_r(DIR *, struct dirent *,
8804  struct dirent **);
8805 
8806 
8807 
8808 
8809 
8810 /* transitional large file interface */
8811 extern int readdir64_r(DIR *, struct dirent64 *,
8812  struct dirent64 **);
8813 # 41 "open_package_datastream.c" 2
8814 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 1
8815 /*
8816  * CDDL HEADER START
8817  *
8818  * The contents of this file are subject to the terms of the
8819  * Common Development and Distribution License (the "License").
8820  * You may not use this file except in compliance with the License.
8821  *
8822  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8823  * or http://www.opensolaris.org/os/licensing.
8824  * See the License for the specific language governing permissions
8825  * and limitations under the License.
8826  *
8827  * When distributing Covered Code, include this CDDL HEADER in each
8828  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8829  * If applicable, add the following below this CDDL HEADER, with the
8830  * fields enclosed by brackets "[]" replaced with your own identifying
8831  * information: Portions Copyright [yyyy] [name of copyright owner]
8832  *
8833  * CDDL HEADER END
8834  */
8835 
8836 /*
8837  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8838  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
8839  */
8840 
8841 /*	Copyright (c) 1988 AT&T	*/
8842 /*	  All Rights Reserved  	*/
8843 
8844 
8845 
8846 
8847 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 1
8848 /*
8849  * CDDL HEADER START
8850  *
8851  * The contents of this file are subject to the terms of the
8852  * Common Development and Distribution License, Version 1.0 only
8853  * (the "License").  You may not use this file except in compliance
8854  * with the License.
8855  *
8856  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8857  * or http://www.opensolaris.org/os/licensing.
8858  * See the License for the specific language governing permissions
8859  * and limitations under the License.
8860  *
8861  * When distributing Covered Code, include this CDDL HEADER in each
8862  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8863  * If applicable, add the following below this CDDL HEADER, with the
8864  * fields enclosed by brackets "[]" replaced with your own identifying
8865  * information: Portions Copyright [yyyy] [name of copyright owner]
8866  *
8867  * CDDL HEADER END
8868  */
8869 /*	Copyright (c) 1988 AT&T	*/
8870 /*	  All Rights Reserved  	*/
8871 
8872 
8873 /*
8874  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8875  * Copyright 2014 PALO, Richard.
8876  *
8877  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8878  * Use is subject to license terms.
8879  */
8880 
8881 /*
8882  * An application should not include this header directly.  Instead it
8883  * should be included only through the inclusion of other Sun headers.
8884  *
8885  * The contents of this header is limited to identifiers specified in the
8886  * C Standard.  Any new identifiers specified in future amendments to the
8887  * C Standard must be placed in this header.  If these new identifiers
8888  * are required to also be in the C++ Standard "std" namespace, then for
8889  * anything other than macro definitions, corresponding "using" directives
8890  * must also be added to <string.h>.
8891  */
8892 
8893 
8894 
8895 
8896 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
8897 /*
8898  * CDDL HEADER START
8899  *
8900  * The contents of this file are subject to the terms of the
8901  * Common Development and Distribution License (the "License").
8902  * You may not use this file except in compliance with the License.
8903  *
8904  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8905  * or http://www.opensolaris.org/os/licensing.
8906  * See the License for the specific language governing permissions
8907  * and limitations under the License.
8908  *
8909  * When distributing Covered Code, include this CDDL HEADER in each
8910  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8911  * If applicable, add the following below this CDDL HEADER, with the
8912  * fields enclosed by brackets "[]" replaced with your own identifying
8913  * information: Portions Copyright [yyyy] [name of copyright owner]
8914  *
8915  * CDDL HEADER END
8916  */
8917 
8918 /*
8919  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8920  * Copyright 2016 Joyent, Inc.
8921  *
8922  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8923  * Use is subject to license terms.
8924  */
8925 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
8926 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
8927 /*
8928  * This file and its contents are supplied under the terms of the
8929  * Common Development and Distribution License ("CDDL"), version 1.0.
8930  * You may only use this file in accordance with the terms of version
8931  * 1.0 of the CDDL.
8932  *
8933  * A full copy of the text of the CDDL should have accompanied this
8934  * source.  A copy of the CDDL is also available via the Internet at
8935  * http://www.illumos.org/license/CDDL.
8936  */
8937 
8938 /*
8939  * Copyright 2014-2016 PALO, Richard.
8940  */
8941 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
8942 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
8943 extern int memcmp(const void *, const void *, size_t);
8944 extern void *memcpy(void *, const void *, size_t);
8945 extern void *memmove(void *, const void *, size_t);
8946 extern void *memset(void *, int, size_t);
8947 extern char *strcat(char *, const char *);
8948 extern int strcmp(const char *, const char *);
8949 extern char *strcpy(char *, const char *);
8950 extern int strcoll(const char *, const char *);
8951 extern size_t strcspn(const char *, const char *);
8952 extern char *strerror(int);
8953 extern size_t strlen(const char *);
8954 extern char *strncat(char *, const char *, size_t);
8955 extern int strncmp(const char *, const char *, size_t);
8956 extern char *strncpy(char *, const char *, size_t);
8957 extern size_t strspn(const char *, const char *);
8958 extern char *strtok(char *, const char *);
8959 extern size_t strxfrm(char *, const char *, size_t);
8960 
8961 /*
8962  * The C++ Standard (ISO/IEC 14882:1998) specifies that each of the
8963  * function signatures for the following functions be replaced by
8964  * two declarations, both of which have the same behavior.
8965  */
8966 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
8967 extern void *memchr(const void *, int, size_t);
8968 extern char *strchr(const char *, int);
8969 extern char *strpbrk(const char *, const char *);
8970 extern char *strrchr(const char *, int);
8971 extern char *strstr(const char *, const char *);
8972 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 2
8973 
8974 /*
8975  * Allow global visibility for symbols defined in
8976  * C++ "std" namespace in <iso/string_iso.h>.
8977  */
8978 # 72 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h"
8979 extern int strerror_r(int, char *, size_t);
8980 
8981 
8982 
8983 
8984 
8985 extern char *strtok_r(char *, const char *,
8986  char **);
8987 
8988 
8989 
8990 
8991 extern void *memccpy(void *, const void *,
8992   int, size_t);
8993 
8994 
8995 
8996 
8997 extern char *stpcpy(char *, const char *);
8998 extern char *stpncpy(char *, const char *, size_t);
8999 extern char *strndup(const char *, size_t);
9000 extern size_t strnlen(const char *, size_t);
9001 extern char *strsignal(int);
9002 
9003 
9004 
9005 
9006 
9007 
9008 extern int strcoll_l(const char *, const char *, locale_t);
9009 extern size_t strxfrm_l(char *, const char *,
9010     size_t, locale_t);
9011 extern int strcasecmp_l(const char *, const char *, locale_t);
9012 extern int strncasecmp_l(const char *, const char *, size_t, locale_t);
9013 extern char *strerror_l(int, locale_t);
9014 
9015 
9016 
9017 
9018 
9019 /* Note that some of these are also declared in strings.h for XPG4_2+ */
9020 extern void explicit_bzero(void *, size_t);
9021 extern int uucopy(const void *, void *, size_t);
9022 extern int uucopystr(const void *, void *, size_t);
9023 extern int ffs(int);
9024 extern int ffsl(long);
9025 extern int ffsll(long long);
9026 extern int fls(int);
9027 extern int flsl(long);
9028 extern int flsll(long long);
9029 extern void *memmem(const void *, size_t, const void *, size_t);
9030 extern char *strcasestr(const char *, const char *);
9031 extern char *strnstr(const char *, const char *, size_t);
9032 extern size_t strlcpy(char *, const char *, size_t);
9033 extern size_t strlcat(char *, const char *, size_t);
9034 extern char *strsep(char **stringp, const char *delim);
9035 extern char *strchrnul(const char *, int);
9036 extern char *strcasestr_l(const char *, const char *, locale_t);
9037 extern int strcasecmp(const char *, const char *);
9038 extern int strncasecmp(const char *, const char *, size_t);
9039 
9040 
9041 
9042 
9043 
9044 extern char *strdup(const char *);
9045 
9046 
9047 
9048 
9049 
9050 
9051 /*
9052  * gcc provides this inlining facility but Studio C does not.
9053  * We should use it exclusively once Studio C also provides it.
9054  */
9055 extern void *__builtin_alloca(size_t);
9056 # 42 "open_package_datastream.c" 2
9057 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 1
9058 /*
9059  * CDDL HEADER START
9060  *
9061  * The contents of this file are subject to the terms of the
9062  * Common Development and Distribution License, Version 1.0 only
9063  * (the "License").  You may not use this file except in compliance
9064  * with the License.
9065  *
9066  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9067  * or http://www.opensolaris.org/os/licensing.
9068  * See the License for the specific language governing permissions
9069  * and limitations under the License.
9070  *
9071  * When distributing Covered Code, include this CDDL HEADER in each
9072  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9073  * If applicable, add the following below this CDDL HEADER, with the
9074  * fields enclosed by brackets "[]" replaced with your own identifying
9075  * information: Portions Copyright [yyyy] [name of copyright owner]
9076  *
9077  * CDDL HEADER END
9078  */
9079 /*	Copyright (c) 1988 AT&T	*/
9080 /*	  All Rights Reserved  	*/
9081 
9082 /*
9083  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9084  *
9085  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
9086  * Use is subject to license terms.
9087  */
9088 
9089 
9090 
9091 
9092 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
9093 /*
9094  * CDDL HEADER START
9095  *
9096  * The contents of this file are subject to the terms of the
9097  * Common Development and Distribution License (the "License").
9098  * You may not use this file except in compliance with the License.
9099  *
9100  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9101  * or http://www.opensolaris.org/os/licensing.
9102  * See the License for the specific language governing permissions
9103  * and limitations under the License.
9104  *
9105  * When distributing Covered Code, include this CDDL HEADER in each
9106  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9107  * If applicable, add the following below this CDDL HEADER, with the
9108  * fields enclosed by brackets "[]" replaced with your own identifying
9109  * information: Portions Copyright [yyyy] [name of copyright owner]
9110  *
9111  * CDDL HEADER END
9112  */
9113 
9114 /*
9115  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
9116  * Copyright 2016 Joyent, Inc.
9117  *
9118  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
9119  * Use is subject to license terms.
9120  */
9121 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9122 
9123 
9124 
9125 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
9126 /*
9127  * CDDL HEADER START
9128  *
9129  * The contents of this file are subject to the terms of the
9130  * Common Development and Distribution License (the "License").
9131  * You may not use this file except in compliance with the License.
9132  *
9133  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9134  * or http://www.opensolaris.org/os/licensing.
9135  * See the License for the specific language governing permissions
9136  * and limitations under the License.
9137  *
9138  * When distributing Covered Code, include this CDDL HEADER in each
9139  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9140  * If applicable, add the following below this CDDL HEADER, with the
9141  * fields enclosed by brackets "[]" replaced with your own identifying
9142  * information: Portions Copyright [yyyy] [name of copyright owner]
9143  *
9144  * CDDL HEADER END
9145  */
9146 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9147 /*	  All Rights Reserved  	*/
9148 
9149 
9150 /*
9151  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
9152  * Use is subject to license terms.
9153  *
9154  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
9155  * Copyright 2016 Joyent, Inc.
9156  */
9157 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9158 
9159 
9160 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h" 1
9161 /*
9162  * CDDL HEADER START
9163  *
9164  * The contents of this file are subject to the terms of the
9165  * Common Development and Distribution License, Version 1.0 only
9166  * (the "License").  You may not use this file except in compliance
9167  * with the License.
9168  *
9169  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9170  * or http://www.opensolaris.org/os/licensing.
9171  * See the License for the specific language governing permissions
9172  * and limitations under the License.
9173  *
9174  * When distributing Covered Code, include this CDDL HEADER in each
9175  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9176  * If applicable, add the following below this CDDL HEADER, with the
9177  * fields enclosed by brackets "[]" replaced with your own identifying
9178  * information: Portions Copyright [yyyy] [name of copyright owner]
9179  *
9180  * CDDL HEADER END
9181  */
9182 /*	Copyright (c) 1988 AT&T	*/
9183 /*	  All Rights Reserved  	*/
9184 
9185 
9186 /*
9187  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9188  *
9189  * Copyright (c) 1998-1999, by Sun Microsystems, Inc.
9190  * All rights reserved.
9191  */
9192 
9193 /*
9194  * An application should not include this header directly.  Instead it
9195  * should be included only through the inclusion of other Sun headers.
9196  *
9197  * The contents of this header is limited to identifiers specified in the
9198  * C Standard.  Any new identifiers specified in future amendments to the
9199  * C Standard must be placed in this header.  If these new identifiers
9200  * are required to also be in the C++ Standard "std" namespace, then for
9201  * anything other than macro definitions, corresponding "using" directives
9202  * must also be added to <signal.h>.
9203  */
9204 
9205 
9206 
9207 
9208 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 1
9209 /*
9210  * CDDL HEADER START
9211  *
9212  * The contents of this file are subject to the terms of the
9213  * Common Development and Distribution License (the "License").
9214  * You may not use this file except in compliance with the License.
9215  *
9216  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9217  * or http://www.opensolaris.org/os/licensing.
9218  * See the License for the specific language governing permissions
9219  * and limitations under the License.
9220  *
9221  * When distributing Covered Code, include this CDDL HEADER in each
9222  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9223  * If applicable, add the following below this CDDL HEADER, with the
9224  * fields enclosed by brackets "[]" replaced with your own identifying
9225  * information: Portions Copyright [yyyy] [name of copyright owner]
9226  *
9227  * CDDL HEADER END
9228  */
9229 
9230 /*
9231  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
9232  * Use is subject to license terms.
9233  */
9234 
9235 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9236 /*	  All Rights Reserved  	*/
9237 
9238 /*
9239  * An application should not include this header directly.  Instead it
9240  * should be included only through the inclusion of other Sun headers.
9241  *
9242  * The contents of this header is limited to identifiers specified in the
9243  * C Standard.  Any new identifiers specified in future amendments to the
9244  * C Standard must be placed in this header.  If these new identifiers
9245  * are required to also be in the C++ Standard "std" namespace, then for
9246  * anything other than macro definitions, corresponding "using" directives
9247  * must also be added to <sys/signal.h.h>.
9248  */
9249 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h" 2
9250 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h"
9251 typedef int sig_atomic_t;
9252 
9253 
9254 
9255 
9256 extern void (*signal(int, void (*)(int)))(int);
9257 
9258 extern int raise(int);
9259 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9260 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 1
9261 /*
9262  * CDDL HEADER START
9263  *
9264  * The contents of this file are subject to the terms of the
9265  * Common Development and Distribution License (the "License").
9266  * You may not use this file except in compliance with the License.
9267  *
9268  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9269  * or http://www.opensolaris.org/os/licensing.
9270  * See the License for the specific language governing permissions
9271  * and limitations under the License.
9272  *
9273  * When distributing Covered Code, include this CDDL HEADER in each
9274  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9275  * If applicable, add the following below this CDDL HEADER, with the
9276  * fields enclosed by brackets "[]" replaced with your own identifying
9277  * information: Portions Copyright [yyyy] [name of copyright owner]
9278  *
9279  * CDDL HEADER END
9280  */
9281 
9282 /*
9283  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
9284  * Use is subject to license terms.
9285  */
9286 
9287 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9288 /*	  All Rights Reserved  	*/
9289 
9290 /*
9291  * University Copyright- Copyright (c) 1982, 1986, 1988
9292  * The Regents of the University of California
9293  * All Rights Reserved
9294  *
9295  * University Acknowledgment- Portions of this document are derived from
9296  * software developed by the University of California, Berkeley, and its
9297  * contributors.
9298  */
9299 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9300 
9301 /*
9302  * Allow global visibility for symbols defined in
9303  * C++ "std" namespace in <iso/signal_iso.h>.
9304  */
9305 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
9306 extern const char **_sys_siglistp; /* signal descriptions */
9307 extern const int _sys_siglistn; /* # of signal descriptions */
9308 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
9309 extern int kill(pid_t, int);
9310 extern int sigaction(int, const struct sigaction *,
9311  struct sigaction *);
9312 
9313 extern int sigaddset(sigset_t *, int);
9314 extern int sigdelset(sigset_t *, int);
9315 extern int sigemptyset(sigset_t *);
9316 extern int sigfillset(sigset_t *);
9317 extern int sigismember(const sigset_t *, int);
9318 
9319 extern int sigpending(sigset_t *);
9320 extern int sigprocmask(int, const sigset_t *,
9321  sigset_t *);
9322 extern int sigsuspend(const sigset_t *);
9323 
9324 
9325 
9326 
9327 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
9328 /*
9329  * CDDL HEADER START
9330  *
9331  * The contents of this file are subject to the terms of the
9332  * Common Development and Distribution License, Version 1.0 only
9333  * (the "License").  You may not use this file except in compliance
9334  * with the License.
9335  *
9336  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9337  * or http://www.opensolaris.org/os/licensing.
9338  * See the License for the specific language governing permissions
9339  * and limitations under the License.
9340  *
9341  * When distributing Covered Code, include this CDDL HEADER in each
9342  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9343  * If applicable, add the following below this CDDL HEADER, with the
9344  * fields enclosed by brackets "[]" replaced with your own identifying
9345  * information: Portions Copyright [yyyy] [name of copyright owner]
9346  *
9347  * CDDL HEADER END
9348  */
9349 /*
9350  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
9351  * Use is subject to license terms.
9352  */
9353 
9354 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9355 /*	  All Rights Reserved  	*/
9356 # 89 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9357 extern int gsignal(int);
9358 extern int (*ssignal(int, int (*)(int)))(int);
9359 extern int sigsend(idtype_t, id_t, int);
9360 extern int sigsendset(const procset_t *, int);
9361 extern int sig2str(int, char *);
9362 extern int str2sig(const char *, int *);
9363 
9364 
9365 
9366 
9367 
9368 extern void (*bsd_signal(int, void (*)(int)))(int);
9369 extern int killpg(pid_t, int);
9370 extern int siginterrupt(int, int);
9371 extern int sigaltstack(const stack_t *, stack_t *);
9372 extern int sighold(int);
9373 extern int sigignore(int);
9374 extern int sigpause(int);
9375 extern int sigrelse(int);
9376 extern void (*sigset(int, void (*)(int)))(int);
9377 
9378 
9379 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
9380 
9381 
9382 
9383 extern int sigstack(struct sigstack *, struct sigstack *);
9384 
9385 
9386 
9387 
9388 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
9389 /*
9390  * CDDL HEADER START
9391  *
9392  * The contents of this file are subject to the terms of the
9393  * Common Development and Distribution License, Version 1.0 only
9394  * (the "License").  You may not use this file except in compliance
9395  * with the License.
9396  *
9397  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9398  * or http://www.opensolaris.org/os/licensing.
9399  * See the License for the specific language governing permissions
9400  * and limitations under the License.
9401  *
9402  * When distributing Covered Code, include this CDDL HEADER in each
9403  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9404  * If applicable, add the following below this CDDL HEADER, with the
9405  * fields enclosed by brackets "[]" replaced with your own identifying
9406  * information: Portions Copyright [yyyy] [name of copyright owner]
9407  *
9408  * CDDL HEADER END
9409  */
9410 /*
9411  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
9412  * Use is subject to license terms.
9413  */
9414 
9415 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9416 /*	  All Rights Reserved  	*/
9417 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9418 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
9419 /*
9420  * CDDL HEADER START
9421  *
9422  * The contents of this file are subject to the terms of the
9423  * Common Development and Distribution License (the "License").
9424  * You may not use this file except in compliance with the License.
9425  *
9426  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9427  * or http://www.opensolaris.org/os/licensing.
9428  * See the License for the specific language governing permissions
9429  * and limitations under the License.
9430  *
9431  * When distributing Covered Code, include this CDDL HEADER in each
9432  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9433  * If applicable, add the following below this CDDL HEADER, with the
9434  * fields enclosed by brackets "[]" replaced with your own identifying
9435  * information: Portions Copyright [yyyy] [name of copyright owner]
9436  *
9437  * CDDL HEADER END
9438  */
9439 /*	Copyright (c) 1988 AT&T	*/
9440 /*	  All Rights Reserved  	*/
9441 
9442 
9443 /*
9444  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9445  *
9446  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
9447  * Use is subject to license terms.
9448  */
9449 /*
9450  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
9451  * Copyright 2016 Joyent, Inc.
9452  */
9453 # 122 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
9454 extern int pthread_kill(pthread_t, int);
9455 extern int pthread_sigmask(int, const sigset_t *,
9456  sigset_t *);
9457 extern int sigwaitinfo(const sigset_t *,
9458  siginfo_t *);
9459 extern int sigtimedwait(const sigset_t *,
9460  siginfo_t *, const struct timespec *);
9461 extern int sigqueue(pid_t, int, const union sigval);
9462 
9463 
9464 /*
9465  * sigwait() prototype is defined here.
9466  */
9467 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
9468 extern int sigwait(sigset_t *);
9469 # 43 "open_package_datastream.c" 2
9470 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 1
9471 /*
9472  * CDDL HEADER START
9473  *
9474  * The contents of this file are subject to the terms of the
9475  * Common Development and Distribution License, Version 1.0 only
9476  * (the "License").  You may not use this file except in compliance
9477  * with the License.
9478  *
9479  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9480  * or http://www.opensolaris.org/os/licensing.
9481  * See the License for the specific language governing permissions
9482  * and limitations under the License.
9483  *
9484  * When distributing Covered Code, include this CDDL HEADER in each
9485  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9486  * If applicable, add the following below this CDDL HEADER, with the
9487  * fields enclosed by brackets "[]" replaced with your own identifying
9488  * information: Portions Copyright [yyyy] [name of copyright owner]
9489  *
9490  * CDDL HEADER END
9491  */
9492 /*
9493  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
9494  * Use is subject to license terms.
9495  */
9496 
9497 /*
9498  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9499  *
9500  * Portions of this file developed by Garrett D'Amore are licensed
9501  * under the terms of the Common Development and Distribution License (CDDL)
9502  * version 1.0 only.  The use of subsequent versions of the License are
9503  * is specifically prohibited unless those terms are not in conflict with
9504  * version 1.0 of the License.  You can find this license on-line at
9505  * http://www.illumos.org/license/CDDL
9506  */
9507 
9508 
9509 
9510 
9511 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 1
9512 /*
9513  * CDDL HEADER START
9514  *
9515  * The contents of this file are subject to the terms of the
9516  * Common Development and Distribution License, Version 1.0 only
9517  * (the "License").  You may not use this file except in compliance
9518  * with the License.
9519  *
9520  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9521  * or http://www.opensolaris.org/os/licensing.
9522  * See the License for the specific language governing permissions
9523  * and limitations under the License.
9524  *
9525  * When distributing Covered Code, include this CDDL HEADER in each
9526  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9527  * If applicable, add the following below this CDDL HEADER, with the
9528  * fields enclosed by brackets "[]" replaced with your own identifying
9529  * information: Portions Copyright [yyyy] [name of copyright owner]
9530  *
9531  * CDDL HEADER END
9532  */
9533 /*
9534  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9535  * Copyright 2014 PALO, Richard.
9536  *
9537  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
9538  * Use is subject to license terms.
9539  */
9540 
9541 /*	Copyright (c) 1988 AT&T	*/
9542 /*	  All Rights Reserved  	*/
9543 
9544 
9545 /*
9546  * An application should not include this header directly.  Instead it
9547  * should be included only through the inclusion of other Sun headers.
9548  *
9549  * The contents of this header is limited to identifiers specified in the
9550  * C Standard.  Any new identifiers specified in future amendments to the
9551  * C Standard must be placed in this header.  If these new identifiers
9552  * are required to also be in the C++ Standard "std" namespace, then for
9553  * anything other than macro definitions, corresponding "using" directives
9554  * must also be added to <locale.h>.
9555  */
9556 
9557 
9558 
9559 
9560 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
9561 /*
9562  * CDDL HEADER START
9563  *
9564  * The contents of this file are subject to the terms of the
9565  * Common Development and Distribution License (the "License").
9566  * You may not use this file except in compliance with the License.
9567  *
9568  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9569  * or http://www.opensolaris.org/os/licensing.
9570  * See the License for the specific language governing permissions
9571  * and limitations under the License.
9572  *
9573  * When distributing Covered Code, include this CDDL HEADER in each
9574  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9575  * If applicable, add the following below this CDDL HEADER, with the
9576  * fields enclosed by brackets "[]" replaced with your own identifying
9577  * information: Portions Copyright [yyyy] [name of copyright owner]
9578  *
9579  * CDDL HEADER END
9580  */
9581 
9582 /*
9583  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
9584  * Copyright 2016 Joyent, Inc.
9585  *
9586  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
9587  * Use is subject to license terms.
9588  */
9589 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
9590 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
9591 /*
9592  * This file and its contents are supplied under the terms of the
9593  * Common Development and Distribution License ("CDDL"), version 1.0.
9594  * You may only use this file in accordance with the terms of version
9595  * 1.0 of the CDDL.
9596  *
9597  * A full copy of the text of the CDDL should have accompanied this
9598  * source.  A copy of the CDDL is also available via the Internet at
9599  * http://www.illumos.org/license/CDDL.
9600  */
9601 
9602 /*
9603  * Copyright 2014-2016 PALO, Richard.
9604  */
9605 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
9606 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
9607 struct lconv {
9608  char *decimal_point;
9609  char *thousands_sep;
9610  char *grouping;
9611  char *int_curr_symbol;
9612  char *currency_symbol;
9613  char *mon_decimal_point;
9614  char *mon_thousands_sep;
9615  char *mon_grouping;
9616  char *positive_sign;
9617  char *negative_sign;
9618  char int_frac_digits;
9619  char frac_digits;
9620  char p_cs_precedes;
9621  char p_sep_by_space;
9622  char n_cs_precedes;
9623  char n_sep_by_space;
9624  char p_sign_posn;
9625  char n_sign_posn;
9626 
9627 /*
9628  * New in IEEE Std 1003.1-2001 for alignment with the ISO/IEC 9899:1999
9629  * standard.  Namespace and binary compatibility dictate that visibility
9630  * of these new members be limited.  Visibility is limited to a strictly
9631  * conforming ANSI C environment (-Xc) or if _LCONV_C99 is defined.
9632  */
9633 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
9634 };
9635 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
9636 extern char *setlocale(int, const char *);
9637 extern struct lconv *localeconv(void);
9638 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
9639 
9640 
9641 
9642 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
9643 /*
9644  * CDDL HEADER START
9645  *
9646  * The contents of this file are subject to the terms of the
9647  * Common Development and Distribution License (the "License").
9648  * You may not use this file except in compliance with the License.
9649  *
9650  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9651  * or http://www.opensolaris.org/os/licensing.
9652  * See the License for the specific language governing permissions
9653  * and limitations under the License.
9654  *
9655  * When distributing Covered Code, include this CDDL HEADER in each
9656  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9657  * If applicable, add the following below this CDDL HEADER, with the
9658  * fields enclosed by brackets "[]" replaced with your own identifying
9659  * information: Portions Copyright [yyyy] [name of copyright owner]
9660  *
9661  * CDDL HEADER END
9662  */
9663 /*
9664  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9665  *
9666  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9667  * Use is subject to license terms.
9668  */
9669 
9670 
9671 
9672 
9673 
9674 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
9675 /*
9676  * CDDL HEADER START
9677  *
9678  * The contents of this file are subject to the terms of the
9679  * Common Development and Distribution License (the "License").
9680  * You may not use this file except in compliance with the License.
9681  *
9682  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9683  * or http://www.opensolaris.org/os/licensing.
9684  * See the License for the specific language governing permissions
9685  * and limitations under the License.
9686  *
9687  *
9688  * When distributing Covered Code, include this CDDL HEADER in each
9689  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9690  * If applicable, add the following below this CDDL HEADER, with the
9691  * fields enclosed by brackets "[]" replaced with your own identifying
9692  * information: Portions Copyright [yyyy] [name of copyright owner]
9693  *
9694  * CDDL HEADER END
9695  */
9696 
9697 /*
9698  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9699  * Use is subject to license terms.
9700  * Copyright 2016 Joyent, Inc.
9701  */
9702 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 2
9703 
9704 
9705 
9706 
9707 
9708 /*
9709  * wchar_t is a built-in type in standard C++ and as such is not
9710  * defined here when using standard C++. However, the GNU compiler
9711  * fixincludes utility nonetheless creates its own version of this
9712  * header for use by gcc and g++. In that version it adds a redundant
9713  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
9714  * header we need to include the following magic comment:
9715  *
9716  * we must use the C++ compiler's type
9717  *
9718  * The above comment should not be removed or changed until GNU
9719  * gcc/fixinc/inclhack.def is updated to bypass this header.
9720  */
9721 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h"
9722 extern char *dcgettext(const char *, const char *, const int);
9723 extern char *dgettext(const char *, const char *);
9724 extern char *gettext(const char *);
9725 extern char *textdomain(const char *);
9726 extern char *bindtextdomain(const char *, const char *);
9727 
9728 /*
9729  * LI18NUX 2000 Globalization Specification Version 1.0
9730  * with Amendment 2
9731  */
9732 extern char *dcngettext(const char *, const char *,
9733  const char *, unsigned long int, int);
9734 extern char *dngettext(const char *, const char *,
9735  const char *, unsigned long int);
9736 extern char *ngettext(const char *, const char *, unsigned long int);
9737 extern char *bind_textdomain_codeset(const char *, const char *);
9738 
9739 /* Word handling functions --- requires dynamic linking */
9740 /* Warning: these are experimental and subject to change. */
9741 extern int wdinit(void);
9742 extern int wdchkind(wchar_t);
9743 extern int wdbindf(wchar_t, wchar_t, int);
9744 extern wchar_t *wddelim(wchar_t, wchar_t, int);
9745 extern wchar_t mcfiller(void);
9746 extern int mcwrap(void);
9747 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
9748 
9749 
9750 /*
9751  * Allow global visibility for symbols defined in
9752  * C++ "std" namespace in <iso/locale_iso.h>.
9753  */
9754 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
9755 /*
9756  * These were added in POSIX 2008 as part of the newlocale() specification.
9757  */
9758 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
9759 extern locale_t duplocale(locale_t);
9760 extern void freelocale(locale_t);
9761 extern locale_t newlocale(int, const char *, locale_t);
9762 extern locale_t uselocale(locale_t);
9763 
9764 
9765 extern locale_t __global_locale(void);
9766 # 44 "open_package_datastream.c" 2
9767 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
9768 /*
9769  * CDDL HEADER START
9770  *
9771  * The contents of this file are subject to the terms of the
9772  * Common Development and Distribution License (the "License").
9773  * You may not use this file except in compliance with the License.
9774  *
9775  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9776  * or http://www.opensolaris.org/os/licensing.
9777  * See the License for the specific language governing permissions
9778  * and limitations under the License.
9779  *
9780  * When distributing Covered Code, include this CDDL HEADER in each
9781  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9782  * If applicable, add the following below this CDDL HEADER, with the
9783  * fields enclosed by brackets "[]" replaced with your own identifying
9784  * information: Portions Copyright [yyyy] [name of copyright owner]
9785  *
9786  * CDDL HEADER END
9787  */
9788 /*
9789  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9790  *
9791  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9792  * Use is subject to license terms.
9793  */
9794 # 45 "open_package_datastream.c" 2
9795 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
9796 /*
9797  * CDDL HEADER START
9798  *
9799  * The contents of this file are subject to the terms of the
9800  * Common Development and Distribution License (the "License").
9801  * You may not use this file except in compliance with the License.
9802  *
9803  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9804  * or http://www.opensolaris.org/os/licensing.
9805  * See the License for the specific language governing permissions
9806  * and limitations under the License.
9807  *
9808  * When distributing Covered Code, include this CDDL HEADER in each
9809  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9810  * If applicable, add the following below this CDDL HEADER, with the
9811  * fields enclosed by brackets "[]" replaced with your own identifying
9812  * information: Portions Copyright [yyyy] [name of copyright owner]
9813  *
9814  * CDDL HEADER END
9815  */
9816 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9817 /*	  All Rights Reserved  	*/
9818 
9819 /*
9820  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
9821  * Use is subject to license terms.
9822  */
9823 
9824 
9825 
9826 
9827 #pragma ident "%Z%%M%	%I%	%E% SMI"
9828 
9829 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
9830 /*
9831  * CDDL HEADER START
9832  *
9833  * The contents of this file are subject to the terms of the
9834  * Common Development and Distribution License (the "License").
9835  * You may not use this file except in compliance with the License.
9836  *
9837  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9838  * or http://www.opensolaris.org/os/licensing.
9839  * See the License for the specific language governing permissions
9840  * and limitations under the License.
9841  *
9842  * When distributing Covered Code, include this CDDL HEADER in each
9843  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9844  * If applicable, add the following below this CDDL HEADER, with the
9845  * fields enclosed by brackets "[]" replaced with your own identifying
9846  * information: Portions Copyright [yyyy] [name of copyright owner]
9847  *
9848  * CDDL HEADER END
9849  */
9850 /*	Copyright (c) 1988 AT&T	*/
9851 /*	  All Rights Reserved  	*/
9852 
9853 
9854 /*
9855  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9856  *
9857  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
9858  * Use is subject to license terms.
9859  */
9860 /*
9861  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
9862  * Copyright 2016 Joyent, Inc.
9863  */
9864 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 2
9865 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h"
9866 extern char *errstr;
9867 
9868 struct ainfo {
9869  char *local;
9870  mode_t mode;
9871  char owner[64 +1];
9872  char group[64 +1];
9873  major_t major;
9874  minor_t minor;
9875 };
9876 
9877 struct cinfo {
9878  long cksum;
9879  fsblkcnt_t size;
9880  time_t modtime;
9881 };
9882 
9883 struct pinfo {
9884  char status;
9885  char pkg[64 +1];
9886  char editflag;
9887  char aclass[64 +1];
9888  struct pinfo
9889   *next;
9890 };
9891 
9892 struct cfent {
9893  short volno;
9894  char ftype;
9895  char pkg_class[64 +1];
9896  int pkg_class_idx;
9897  char *path;
9898  struct ainfo ainfo;
9899  struct cinfo cinfo;
9900  short npkgs;
9901  struct pinfo
9902   *pinfo;
9903 };
9904 
9905 /* averify() & cverify() error codes */
9906 # 46 "open_package_datastream.c" 2
9907 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
9908 /*
9909  * CDDL HEADER START
9910  *
9911  * The contents of this file are subject to the terms of the
9912  * Common Development and Distribution License, Version 1.0 only
9913  * (the "License").  You may not use this file except in compliance
9914  * with the License.
9915  *
9916  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9917  * or http://www.opensolaris.org/os/licensing.
9918  * See the License for the specific language governing permissions
9919  * and limitations under the License.
9920  *
9921  * When distributing Covered Code, include this CDDL HEADER in each
9922  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9923  * If applicable, add the following below this CDDL HEADER, with the
9924  * fields enclosed by brackets "[]" replaced with your own identifying
9925  * information: Portions Copyright [yyyy] [name of copyright owner]
9926  *
9927  * CDDL HEADER END
9928  */
9929 /*
9930  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9931  */
9932 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9933 /*	  All Rights Reserved  	*/
9934 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h"
9935 struct pkginfo {
9936  char *pkginst;
9937  char *name;
9938  char *arch;
9939  char *version;
9940  char *vendor;
9941  char *basedir;
9942  char *catg;
9943  char status;
9944 };
9945 
9946 extern char *pkgdir;
9947 
9948 extern char *pkgparam(char *, char *);
9949 extern int pkginfo(struct pkginfo *, char *, ...),
9950   pkgnmchk(char *, char *, int);
9951 # 47 "open_package_datastream.c" 2
9952 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 1
9953 /*
9954  * CDDL HEADER START
9955  *
9956  * The contents of this file are subject to the terms of the
9957  * Common Development and Distribution License, Version 1.0 only
9958  * (the "License").  You may not use this file except in compliance
9959  * with the License.
9960  *
9961  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9962  * or http://www.opensolaris.org/os/licensing.
9963  * See the License for the specific language governing permissions
9964  * and limitations under the License.
9965  *
9966  * When distributing Covered Code, include this CDDL HEADER in each
9967  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9968  * If applicable, add the following below this CDDL HEADER, with the
9969  * fields enclosed by brackets "[]" replaced with your own identifying
9970  * information: Portions Copyright [yyyy] [name of copyright owner]
9971  *
9972  * CDDL HEADER END
9973  */
9974 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
9975 /*	  All Rights Reserved  	*/
9976 
9977 
9978 
9979 
9980 
9981 #pragma ident "%Z%%M%	%I%	%E% SMI"
9982 
9983 
9984 
9985 
9986 
9987 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
9988 /*
9989  * CDDL HEADER START
9990  *
9991  * The contents of this file are subject to the terms of the
9992  * Common Development and Distribution License (the "License").
9993  * You may not use this file except in compliance with the License.
9994  *
9995  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9996  * or http://www.opensolaris.org/os/licensing.
9997  * See the License for the specific language governing permissions
9998  * and limitations under the License.
9999  *
10000  * When distributing Covered Code, include this CDDL HEADER in each
10001  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10002  * If applicable, add the following below this CDDL HEADER, with the
10003  * fields enclosed by brackets "[]" replaced with your own identifying
10004  * information: Portions Copyright [yyyy] [name of copyright owner]
10005  *
10006  * CDDL HEADER END
10007  */
10008 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10009 /*	  All Rights Reserved  	*/
10010 
10011 
10012 /*
10013  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
10014  * Use is subject to license terms.
10015  *
10016  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
10017  * Copyright 2016 Joyent, Inc.
10018  */
10019 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 2
10020 
10021 struct pkgdev {
10022  int rdonly;
10023  int mntflg;
10024  longlong_t capacity; /* number of 512-blocks on device */
10025  char *name;
10026  char *dirname;
10027  char *pathname;
10028  char *mount;
10029  char *fstyp;
10030  char *cdevice;
10031  char *bdevice;
10032  char *norewind;
10033 };
10034 # 48 "open_package_datastream.c" 2
10035 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkglocs.h" 1
10036 /*
10037  * CDDL HEADER START
10038  *
10039  * The contents of this file are subject to the terms of the
10040  * Common Development and Distribution License, Version 1.0 only
10041  * (the "License").  You may not use this file except in compliance
10042  * with the License.
10043  *
10044  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10045  * or http://www.opensolaris.org/os/licensing.
10046  * See the License for the specific language governing permissions
10047  * and limitations under the License.
10048  *
10049  * When distributing Covered Code, include this CDDL HEADER in each
10050  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10051  * If applicable, add the following below this CDDL HEADER, with the
10052  * fields enclosed by brackets "[]" replaced with your own identifying
10053  * information: Portions Copyright [yyyy] [name of copyright owner]
10054  *
10055  * CDDL HEADER END
10056  */
10057 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10058 /*	  All Rights Reserved  	*/
10059 # 49 "open_package_datastream.c" 2
10060 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pwd.h" 1
10061 /*
10062  * CDDL HEADER START
10063  *
10064  * The contents of this file are subject to the terms of the
10065  * Common Development and Distribution License, Version 1.0 only
10066  * (the "License").  You may not use this file except in compliance
10067  * with the License.
10068  *
10069  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10070  * or http://www.opensolaris.org/os/licensing.
10071  * See the License for the specific language governing permissions
10072  * and limitations under the License.
10073  *
10074  * When distributing Covered Code, include this CDDL HEADER in each
10075  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10076  * If applicable, add the following below this CDDL HEADER, with the
10077  * fields enclosed by brackets "[]" replaced with your own identifying
10078  * information: Portions Copyright [yyyy] [name of copyright owner]
10079  *
10080  * CDDL HEADER END
10081  */
10082 /*	Copyright (c) 1988 AT&T	*/
10083 /*	  All Rights Reserved  	*/
10084 
10085 
10086 /*
10087  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10088  *
10089  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
10090  * Use is subject to license terms.
10091  */
10092 
10093 
10094 
10095 
10096 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
10097 /*
10098  * CDDL HEADER START
10099  *
10100  * The contents of this file are subject to the terms of the
10101  * Common Development and Distribution License (the "License").
10102  * You may not use this file except in compliance with the License.
10103  *
10104  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10105  * or http://www.opensolaris.org/os/licensing.
10106  * See the License for the specific language governing permissions
10107  * and limitations under the License.
10108  *
10109  * When distributing Covered Code, include this CDDL HEADER in each
10110  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10111  * If applicable, add the following below this CDDL HEADER, with the
10112  * fields enclosed by brackets "[]" replaced with your own identifying
10113  * information: Portions Copyright [yyyy] [name of copyright owner]
10114  *
10115  * CDDL HEADER END
10116  */
10117 
10118 /*
10119  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
10120  * Copyright 2016 Joyent, Inc.
10121  *
10122  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
10123  * Use is subject to license terms.
10124  */
10125 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pwd.h" 2
10126 
10127 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
10128 /*
10129  * CDDL HEADER START
10130  *
10131  * The contents of this file are subject to the terms of the
10132  * Common Development and Distribution License (the "License").
10133  * You may not use this file except in compliance with the License.
10134  *
10135  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10136  * or http://www.opensolaris.org/os/licensing.
10137  * See the License for the specific language governing permissions
10138  * and limitations under the License.
10139  *
10140  * When distributing Covered Code, include this CDDL HEADER in each
10141  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10142  * If applicable, add the following below this CDDL HEADER, with the
10143  * fields enclosed by brackets "[]" replaced with your own identifying
10144  * information: Portions Copyright [yyyy] [name of copyright owner]
10145  *
10146  * CDDL HEADER END
10147  */
10148 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10149 /*	  All Rights Reserved  	*/
10150 
10151 
10152 /*
10153  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
10154  * Use is subject to license terms.
10155  *
10156  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
10157  * Copyright 2016 Joyent, Inc.
10158  */
10159 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pwd.h" 2
10160 
10161 
10162 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
10163 /*
10164  * CDDL HEADER START
10165  *
10166  * The contents of this file are subject to the terms of the
10167  * Common Development and Distribution License (the "License").
10168  * You may not use this file except in compliance with the License.
10169  *
10170  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10171  * or http://www.opensolaris.org/os/licensing.
10172  * See the License for the specific language governing permissions
10173  * and limitations under the License.
10174  *
10175  * When distributing Covered Code, include this CDDL HEADER in each
10176  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10177  * If applicable, add the following below this CDDL HEADER, with the
10178  * fields enclosed by brackets "[]" replaced with your own identifying
10179  * information: Portions Copyright [yyyy] [name of copyright owner]
10180  *
10181  * CDDL HEADER END
10182  */
10183 
10184 /*
10185  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10186  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
10187  */
10188 
10189 /*	Copyright (c) 1988 AT&T	*/
10190 /*	  All Rights Reserved  	*/
10191 
10192 /*
10193  * User-visible pieces of the ANSI C standard I/O package.
10194  */
10195 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pwd.h" 2
10196 
10197 
10198 
10199 
10200 
10201 
10202 struct passwd {
10203  char *pw_name;
10204  char *pw_passwd;
10205  uid_t pw_uid;
10206  gid_t pw_gid;
10207  char *pw_age;
10208  char *pw_comment;
10209  char *pw_gecos;
10210  char *pw_dir;
10211  char *pw_shell;
10212 };
10213 
10214 
10215 struct comment {
10216  char *c_dept;
10217  char *c_name;
10218  char *c_acct;
10219  char *c_bin;
10220 };
10221 
10222 
10223 extern struct passwd *getpwuid(uid_t); /* MT-unsafe */
10224 extern struct passwd *getpwnam(const char *); /* MT-unsafe */
10225 
10226 
10227 extern struct passwd *getpwent_r(struct passwd *, char *, int);
10228 extern struct passwd *fgetpwent_r(FILE *, struct passwd *, char *, int);
10229 extern struct passwd *fgetpwent(FILE *); /* MT-unsafe */
10230 extern int putpwent(const struct passwd *, FILE *);
10231 
10232 
10233 
10234 
10235 extern void endpwent(void);
10236 extern struct passwd *getpwent(void); /* MT-unsafe */
10237 extern void setpwent(void);
10238 
10239 
10240 /*
10241  * getpwuid_r() & getpwnam_r() prototypes are defined here.
10242  */
10243 
10244 /*
10245  * Previous releases of Solaris, starting at 2.3, provided definitions of
10246  * various functions as specified in POSIX.1c, Draft 6.  For some of these
10247  * functions, the final POSIX 1003.1c standard had a different number of
10248  * arguments and return values.
10249  *
10250  * The following segment of this header provides support for the standard
10251  * interfaces while supporting applications written under earlier
10252  * releases.  The application defines appropriate values of the feature
10253  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
10254  * whether it was written to expect the Draft 6 or standard versions of
10255  * these interfaces, before including this header.  This header then
10256  * provides a mapping from the source version of the interface to an
10257  * appropriate binary interface.  Such mappings permit an application
10258  * to be built from libraries and objects which have mixed expectations
10259  * of the definitions of these functions.
10260  *
10261  * For applications using the Draft 6 definitions, the binary symbol is the
10262  * same as the source symbol, and no explicit mapping is needed.  For the
10263  * standard interface, the function func() is mapped to the binary symbol
10264  * _posix_func().  The preferred mechanism for the remapping is a compiler
10265  * #pragma.  If the compiler does not provide such a #pragma, the header file
10266  * defines a static function func() which calls the _posix_func() version;
10267  * this has to be done instead of #define since POSIX specifies that an
10268  * application can #undef the symbol and still be bound to the correct
10269  * implementation.  Unfortunately, the statics confuse lint so we fallback to
10270  * #define in that case.
10271  *
10272  * NOTE: Support for the Draft 6 definitions is provided for compatibility
10273  * only.  New applications/libraries should use the standard definitions.
10274  */
10275 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pwd.h"
10276 extern struct passwd *getpwuid_r(uid_t, struct passwd *, char *, int);
10277 extern struct passwd *getpwnam_r(const char *, struct passwd *, char *, int);
10278 # 50 "open_package_datastream.c" 2
10279 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
10280 /*
10281  * CDDL HEADER START
10282  *
10283  * The contents of this file are subject to the terms of the
10284  * Common Development and Distribution License (the "License").
10285  * You may not use this file except in compliance with the License.
10286  *
10287  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10288  * or http://www.opensolaris.org/os/licensing.
10289  * See the License for the specific language governing permissions
10290  * and limitations under the License.
10291  *
10292  * When distributing Covered Code, include this CDDL HEADER in each
10293  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10294  * If applicable, add the following below this CDDL HEADER, with the
10295  * fields enclosed by brackets "[]" replaced with your own identifying
10296  * information: Portions Copyright [yyyy] [name of copyright owner]
10297  *
10298  * CDDL HEADER END
10299  */
10300 
10301 /*
10302  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
10303  * Use is subject to license terms.
10304  */
10305 
10306 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
10307 /* All Rights Reserved */
10308 # 38 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
10309 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
10310 /*
10311  * CDDL HEADER START
10312  *
10313  * The contents of this file are subject to the terms of the
10314  * Common Development and Distribution License (the "License").
10315  * You may not use this file except in compliance with the License.
10316  *
10317  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10318  * or http://www.opensolaris.org/os/licensing.
10319  * See the License for the specific language governing permissions
10320  * and limitations under the License.
10321  *
10322  * When distributing Covered Code, include this CDDL HEADER in each
10323  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10324  * If applicable, add the following below this CDDL HEADER, with the
10325  * fields enclosed by brackets "[]" replaced with your own identifying
10326  * information: Portions Copyright [yyyy] [name of copyright owner]
10327  *
10328  * CDDL HEADER END
10329  */
10330 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10331 /*	  All Rights Reserved  	*/
10332 
10333 
10334 /*
10335  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
10336  * Use is subject to license terms.
10337  *
10338  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
10339  * Copyright 2016 Joyent, Inc.
10340  */
10341 # 39 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
10342 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
10343 /*
10344  * CDDL HEADER START
10345  *
10346  * The contents of this file are subject to the terms of the
10347  * Common Development and Distribution License (the "License").
10348  * You may not use this file except in compliance with the License.
10349  *
10350  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10351  * or http://www.opensolaris.org/os/licensing.
10352  * See the License for the specific language governing permissions
10353  * and limitations under the License.
10354  *
10355  * When distributing Covered Code, include this CDDL HEADER in each
10356  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10357  * If applicable, add the following below this CDDL HEADER, with the
10358  * fields enclosed by brackets "[]" replaced with your own identifying
10359  * information: Portions Copyright [yyyy] [name of copyright owner]
10360  *
10361  * CDDL HEADER END
10362  */
10363 
10364 /*
10365  * Copyright (c) 2013 Gary Mills
10366  *
10367  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
10368  * Use is subject to license terms.
10369  */
10370 
10371 /*	Copyright (c) 1988 AT&T	*/
10372 /*	  All Rights Reserved  	*/
10373 
10374 
10375 
10376 
10377 
10378 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
10379 /*
10380  * CDDL HEADER START
10381  *
10382  * The contents of this file are subject to the terms of the
10383  * Common Development and Distribution License (the "License").
10384  * You may not use this file except in compliance with the License.
10385  *
10386  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10387  * or http://www.opensolaris.org/os/licensing.
10388  * See the License for the specific language governing permissions
10389  * and limitations under the License.
10390  *
10391  * When distributing Covered Code, include this CDDL HEADER in each
10392  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10393  * If applicable, add the following below this CDDL HEADER, with the
10394  * fields enclosed by brackets "[]" replaced with your own identifying
10395  * information: Portions Copyright [yyyy] [name of copyright owner]
10396  *
10397  * CDDL HEADER END
10398  */
10399 
10400 /*
10401  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
10402  * Copyright 2016 Joyent, Inc.
10403  *
10404  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
10405  * Use is subject to license terms.
10406  */
10407 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
10408 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
10409 /*
10410  * CDDL HEADER START
10411  *
10412  * The contents of this file are subject to the terms of the
10413  * Common Development and Distribution License (the "License").
10414  * You may not use this file except in compliance with the License.
10415  *
10416  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10417  * or http://www.opensolaris.org/os/licensing.
10418  * See the License for the specific language governing permissions
10419  * and limitations under the License.
10420  *
10421  *
10422  * When distributing Covered Code, include this CDDL HEADER in each
10423  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10424  * If applicable, add the following below this CDDL HEADER, with the
10425  * fields enclosed by brackets "[]" replaced with your own identifying
10426  * information: Portions Copyright [yyyy] [name of copyright owner]
10427  *
10428  * CDDL HEADER END
10429  */
10430 
10431 /*
10432  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
10433  * Use is subject to license terms.
10434  * Copyright 2016 Joyent, Inc.
10435  */
10436 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
10437 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h" 1
10438 /*
10439  * CDDL HEADER START
10440  *
10441  * The contents of this file are subject to the terms of the
10442  * Common Development and Distribution License, Version 1.0 only
10443  * (the "License").  You may not use this file except in compliance
10444  * with the License.
10445  *
10446  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10447  * or http://www.opensolaris.org/os/licensing.
10448  * See the License for the specific language governing permissions
10449  * and limitations under the License.
10450  *
10451  * When distributing Covered Code, include this CDDL HEADER in each
10452  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10453  * If applicable, add the following below this CDDL HEADER, with the
10454  * fields enclosed by brackets "[]" replaced with your own identifying
10455  * information: Portions Copyright [yyyy] [name of copyright owner]
10456  *
10457  * CDDL HEADER END
10458  */
10459 /*
10460  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
10461  * Use is subject to license terms.
10462  */
10463 
10464 /*	Copyright (c) 1988 AT&T	*/
10465 /*	  All Rights Reserved  	*/
10466 
10467 
10468 /*
10469  * An application should not include this header directly.  Instead it
10470  * should be included only through the inclusion of other Sun headers.
10471  *
10472  * The contents of this header is limited to identifiers specified in the
10473  * C Standard.  Any new identifiers specified in future amendments to the
10474  * C Standard must be placed in this header.  If these new identifiers
10475  * are required to also be in the C++ Standard "std" namespace, then for
10476  * anything other than macro definitions, corresponding "using" directives
10477  * must also be added to <limits.h>.
10478  */
10479 
10480 
10481 
10482 
10483 #pragma ident "%Z%%M%	%I%	%E% SMI"
10484 
10485 
10486 
10487 
10488 
10489 /*
10490  * Sizes of integral types
10491  */
10492 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h"
10493      /* min value of a "long int" */
10494 
10495 
10496 
10497 
10498 
10499      /* min value of a long long */
10500 
10501      /* max value of a long long */
10502 
10503      /* max value of "unsigned long long */
10504 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
10505 
10506 /*
10507  * Include fixed width type limits as proposed by the ISO/JTC1/SC22/WG14 C
10508  * committee's working draft for the revision of the current ISO C standard,
10509  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
10510  * required by any standard but constitute a useful, general purpose set
10511  * of type definitions and limits which is namespace clean with respect to
10512  * all standards.
10513  */
10514 
10515 
10516 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
10517 /*
10518  * CDDL HEADER START
10519  *
10520  * The contents of this file are subject to the terms of the
10521  * Common Development and Distribution License, Version 1.0 only
10522  * (the "License").  You may not use this file except in compliance
10523  * with the License.
10524  *
10525  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10526  * or http://www.opensolaris.org/os/licensing.
10527  * See the License for the specific language governing permissions
10528  * and limitations under the License.
10529  *
10530  * When distributing Covered Code, include this CDDL HEADER in each
10531  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10532  * If applicable, add the following below this CDDL HEADER, with the
10533  * fields enclosed by brackets "[]" replaced with your own identifying
10534  * information: Portions Copyright [yyyy] [name of copyright owner]
10535  *
10536  * CDDL HEADER END
10537  */
10538 /*
10539  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10540  *
10541  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
10542  * Use is subject to license terms.
10543  */
10544 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
10545 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10546 /*
10547  * ARG_MAX is calculated as follows:
10548  * NCARGS - space for other stuff on initial stack
10549  * like aux vectors, saved registers, etc..
10550  */
10551 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10552 /*
10553  * POSIX conformant definitions - An implementation may define
10554  * other symbols which reflect the actual implementation. Alternate
10555  * definitions may not be as restrictive as the POSIX definitions.
10556  */
10557 # 140 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10558 /* POSIX.1c conformant */
10559 
10560 
10561 
10562 
10563 
10564 /* UNIX 03 conformant */
10565 
10566 
10567 
10568 
10569 
10570 /*
10571  * POSIX.2 and XPG4-XSH4 conformant definitions
10572  */
10573 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10574 /* UNIX 03 conformant */
10575 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10576 /*
10577  * For dual definitions for PASS_MAX and sysconf.c
10578  */
10579 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10580     /* NLS printf() and scanf() */
10581 # 216 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10582 /* Marked as LEGACY in SUSv2 and removed in UNIX 03 */
10583 
10584 
10585 
10586        /* of a double */
10587 
10588 
10589        /* of a "float" */
10590 
10591 
10592 /* Marked as LEGACY in SUSv1 and removed in SUSv2 */
10593 
10594 
10595        /* of a double */
10596 
10597        /* of a float */
10598 # 248 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10599 /*
10600  * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
10601  * related text states:
10602  *
10603  * A definition of one of the values from Table 2-5 shall be omitted from the
10604  * <limits.h> on specific implementations where the corresponding value is
10605  * equal to or greater than the stated minimum, but where the value can vary
10606  * depending on the file to which it is applied. The actual value supported for
10607  * a specific pathname shall be provided by the pathconf() (5.7.1) function.
10608  *
10609  * This is clear that any machine supporting multiple file system types
10610  * and/or a network can not include this define, regardless of protection
10611  * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags.
10612  *
10613  * #define	NAME_MAX	14
10614  */
10615 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
10616     /* Increased for illumos */
10617 # 40 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
10618 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
10619 /*
10620  * CDDL HEADER START
10621  *
10622  * The contents of this file are subject to the terms of the
10623  * Common Development and Distribution License (the "License").
10624  * You may not use this file except in compliance with the License.
10625  *
10626  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10627  * or http://www.opensolaris.org/os/licensing.
10628  * See the License for the specific language governing permissions
10629  * and limitations under the License.
10630  *
10631  * When distributing Covered Code, include this CDDL HEADER in each
10632  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10633  * If applicable, add the following below this CDDL HEADER, with the
10634  * fields enclosed by brackets "[]" replaced with your own identifying
10635  * information: Portions Copyright [yyyy] [name of copyright owner]
10636  *
10637  * CDDL HEADER END
10638  */
10639 
10640 /*
10641  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10642  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
10643  */
10644 
10645 /*	Copyright (c) 1988 AT&T	*/
10646 /*	  All Rights Reserved  	*/
10647 
10648 /*
10649  * User-visible pieces of the ANSI C standard I/O package.
10650  */
10651 # 41 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
10652 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 1
10653 /*
10654  * CDDL HEADER START
10655  *
10656  * The contents of this file are subject to the terms of the
10657  * Common Development and Distribution License, Version 1.0 only
10658  * (the "License").  You may not use this file except in compliance
10659  * with the License.
10660  *
10661  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10662  * or http://www.opensolaris.org/os/licensing.
10663  * See the License for the specific language governing permissions
10664  * and limitations under the License.
10665  *
10666  * When distributing Covered Code, include this CDDL HEADER in each
10667  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10668  * If applicable, add the following below this CDDL HEADER, with the
10669  * fields enclosed by brackets "[]" replaced with your own identifying
10670  * information: Portions Copyright [yyyy] [name of copyright owner]
10671  *
10672  * CDDL HEADER END
10673  */
10674 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10675 /*	  All Rights Reserved  	*/
10676 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
10677 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
10678 /*
10679  * CDDL HEADER START
10680  *
10681  * The contents of this file are subject to the terms of the
10682  * Common Development and Distribution License (the "License").
10683  * You may not use this file except in compliance with the License.
10684  *
10685  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10686  * or http://www.opensolaris.org/os/licensing.
10687  * See the License for the specific language governing permissions
10688  * and limitations under the License.
10689  *
10690  * When distributing Covered Code, include this CDDL HEADER in each
10691  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10692  * If applicable, add the following below this CDDL HEADER, with the
10693  * fields enclosed by brackets "[]" replaced with your own identifying
10694  * information: Portions Copyright [yyyy] [name of copyright owner]
10695  *
10696  * CDDL HEADER END
10697  */
10698 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10699 /*	  All Rights Reserved  	*/
10700 
10701 /*
10702  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
10703  * Use is subject to license terms.
10704  */
10705 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
10706 # 1 "/usr/include/openssl/bio.h" 1 3 4
10707 /* crypto/bio/bio.h */
10708 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10709  * All rights reserved.
10710  *
10711  * This package is an SSL implementation written
10712  * by Eric Young (eay@cryptsoft.com).
10713  * The implementation was written so as to conform with Netscapes SSL.
10714  *
10715  * This library is free for commercial and non-commercial use as long as
10716  * the following conditions are aheared to.  The following conditions
10717  * apply to all code found in this distribution, be it the RC4, RSA,
10718  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10719  * included with this distribution is covered by the same copyright terms
10720  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10721  *
10722  * Copyright remains Eric Young's, and as such any Copyright notices in
10723  * the code are not to be removed.
10724  * If this package is used in a product, Eric Young should be given attribution
10725  * as the author of the parts of the library used.
10726  * This can be in the form of a textual message at program startup or
10727  * in documentation (online or textual) provided with the package.
10728  *
10729  * Redistribution and use in source and binary forms, with or without
10730  * modification, are permitted provided that the following conditions
10731  * are met:
10732  * 1. Redistributions of source code must retain the copyright
10733  *    notice, this list of conditions and the following disclaimer.
10734  * 2. Redistributions in binary form must reproduce the above copyright
10735  *    notice, this list of conditions and the following disclaimer in the
10736  *    documentation and/or other materials provided with the distribution.
10737  * 3. All advertising materials mentioning features or use of this software
10738  *    must display the following acknowledgement:
10739  *    "This product includes cryptographic software written by
10740  *     Eric Young (eay@cryptsoft.com)"
10741  *    The word 'cryptographic' can be left out if the rouines from the library
10742  *    being used are not cryptographic related :-).
10743  * 4. If you include any Windows specific code (or a derivative thereof) from
10744  *    the apps directory (application code) you must include an acknowledgement:
10745  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10746  *
10747  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10748  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10749  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10750  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10751  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10752  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10753  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10754  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10755  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10756  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10757  * SUCH DAMAGE.
10758  *
10759  * The licence and distribution terms for any publically available version or
10760  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10761  * copied and put under another distribution licence
10762  * [including the GNU Public Licence.]
10763  */
10764 
10765 
10766 
10767 
10768 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
10769 /* e_os2.h */
10770 /* ====================================================================
10771  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
10772  *
10773  * Redistribution and use in source and binary forms, with or without
10774  * modification, are permitted provided that the following conditions
10775  * are met:
10776  *
10777  * 1. Redistributions of source code must retain the above copyright
10778  *    notice, this list of conditions and the following disclaimer.
10779  *
10780  * 2. Redistributions in binary form must reproduce the above copyright
10781  *    notice, this list of conditions and the following disclaimer in
10782  *    the documentation and/or other materials provided with the
10783  *    distribution.
10784  *
10785  * 3. All advertising materials mentioning features or use of this
10786  *    software must display the following acknowledgment:
10787  *    "This product includes software developed by the OpenSSL Project
10788  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10789  *
10790  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10791  *    endorse or promote products derived from this software without
10792  *    prior written permission. For written permission, please contact
10793  *    openssl-core@openssl.org.
10794  *
10795  * 5. Products derived from this software may not be called "OpenSSL"
10796  *    nor may "OpenSSL" appear in their names without prior written
10797  *    permission of the OpenSSL Project.
10798  *
10799  * 6. Redistributions of any form whatsoever must retain the following
10800  *    acknowledgment:
10801  *    "This product includes software developed by the OpenSSL Project
10802  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10803  *
10804  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10805  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10806  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10807  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10808  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10809  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10810  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10811  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10812  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10813  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10814  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10815  * OF THE POSSIBILITY OF SUCH DAMAGE.
10816  * ====================================================================
10817  *
10818  * This product includes cryptographic software written by Eric Young
10819  * (eay@cryptsoft.com).  This product includes software written by Tim
10820  * Hudson (tjh@cryptsoft.com).
10821  *
10822  */
10823 
10824 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
10825 /* opensslconf.h */
10826 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
10827 
10828 
10829 
10830 
10831 /* OpenSSL was configured with the following options: */
10832 # 108 "/usr/include/openssl/opensslconf.h" 3 4
10833 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
10834    asks for it.  This is a transient feature that is provided for those
10835    who haven't had the time to do the appropriate changes in their
10836    applications.  */
10837 # 204 "/usr/include/openssl/opensslconf.h" 3 4
10838 /* crypto/opensslconf.h.in */
10839 
10840 /* Generate 80386 code? */
10841 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
10842 # 65 "/usr/include/openssl/e_os2.h" 3 4
10843 /******************************************************************************
10844  * Detect operating systems.  This probably needs completing.
10845  * The result is that at least one OPENSSL_SYS_os macro should be defined.
10846  * However, if none is defined, Unix is assumed.
10847  **/
10848 
10849 
10850 
10851 /* ---------------------- Macintosh, before MacOS X ----------------------- */
10852 
10853 
10854 
10855 
10856 
10857 /* ---------------------- NetWare ----------------------------------------- */
10858 
10859 
10860 
10861 
10862 
10863 /* --------------------- Microsoft operating systems ---------------------- */
10864 
10865 /*
10866  * Note that MSDOS actually denotes 32-bit environments running on top of
10867  * MS-DOS, such as DJGPP one.
10868  */
10869 
10870 
10871 
10872 
10873 
10874 /*
10875  * For 32 bit environment, there seems to be the CygWin environment and then
10876  * all the others that try to do the same thing Microsoft does...
10877  */
10878 # 129 "/usr/include/openssl/e_os2.h" 3 4
10879 /* Anything that tries to look like Microsoft is "Windows" */
10880 # 138 "/usr/include/openssl/e_os2.h" 3 4
10881 /*
10882  * DLL settings.  This part is a bit tough, because it's up to the
10883  * application implementor how he or she will link the application, so it
10884  * requires some macro to be used.
10885  */
10886 # 152 "/usr/include/openssl/e_os2.h" 3 4
10887 /* ------------------------------- OpenVMS -------------------------------- */
10888 # 166 "/usr/include/openssl/e_os2.h" 3 4
10889 /* -------------------------------- OS/2 ---------------------------------- */
10890 
10891 
10892 
10893 
10894 
10895 /* -------------------------------- Unix ---------------------------------- */
10896 # 207 "/usr/include/openssl/e_os2.h" 3 4
10897 /* -------------------------------- VOS ----------------------------------- */
10898 # 218 "/usr/include/openssl/e_os2.h" 3 4
10899 /* ------------------------------ VxWorks --------------------------------- */
10900 
10901 
10902 
10903 
10904 /* -------------------------------- BeOS ---------------------------------- */
10905 # 234 "/usr/include/openssl/e_os2.h" 3 4
10906 /**
10907  * That's it for OS-specific stuff
10908  *****************************************************************************/
10909 
10910 /* Specials for I/O an exit */
10911 # 247 "/usr/include/openssl/e_os2.h" 3 4
10912 /*-
10913  * Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare
10914  * certain global symbols that, with some compilers under VMS, have to be
10915  * defined and declared explicitely with globaldef and globalref.
10916  * Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare
10917  * DLL exports and imports for compilers under Win32.  These are a little
10918  * more complicated to use.  Basically, for any library that exports some
10919  * global variables, the following code must be present in the header file
10920  * that declares them, before OPENSSL_EXTERN is used:
10921  *
10922  * #ifdef SOME_BUILD_FLAG_MACRO
10923  * # undef OPENSSL_EXTERN
10924  * # define OPENSSL_EXTERN OPENSSL_EXPORT
10925  * #endif
10926  *
10927  * The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL
10928  * have some generally sensible values, and for OPENSSL_EXTERN to have the
10929  * value OPENSSL_IMPORT.
10930  */
10931 # 282 "/usr/include/openssl/e_os2.h" 3 4
10932 /*-
10933  * Macros to allow global variables to be reached through function calls when
10934  * required (if a shared library version requires it, for example.
10935  * The way it's done allows definitions like this:
10936  *
10937  *      // in foobar.c
10938  *      OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
10939  *      // in foobar.h
10940  *      OPENSSL_DECLARE_GLOBAL(int,foobar);
10941  *      #define foobar OPENSSL_GLOBAL_REF(foobar)
10942  */
10943 # 63 "/usr/include/openssl/bio.h" 2 3 4
10944 
10945 
10946 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
10947 /*
10948  * CDDL HEADER START
10949  *
10950  * The contents of this file are subject to the terms of the
10951  * Common Development and Distribution License (the "License").
10952  * You may not use this file except in compliance with the License.
10953  *
10954  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10955  * or http://www.opensolaris.org/os/licensing.
10956  * See the License for the specific language governing permissions
10957  * and limitations under the License.
10958  *
10959  * When distributing Covered Code, include this CDDL HEADER in each
10960  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10961  * If applicable, add the following below this CDDL HEADER, with the
10962  * fields enclosed by brackets "[]" replaced with your own identifying
10963  * information: Portions Copyright [yyyy] [name of copyright owner]
10964  *
10965  * CDDL HEADER END
10966  */
10967 
10968 /*
10969  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10970  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
10971  */
10972 
10973 /*	Copyright (c) 1988 AT&T	*/
10974 /*	  All Rights Reserved  	*/
10975 
10976 /*
10977  * User-visible pieces of the ANSI C standard I/O package.
10978  */
10979 # 66 "/usr/include/openssl/bio.h" 2 3 4
10980 
10981 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1 3 4
10982 /*
10983  * CDDL HEADER START
10984  *
10985  * The contents of this file are subject to the terms of the
10986  * Common Development and Distribution License, Version 1.0 only
10987  * (the "License").  You may not use this file except in compliance
10988  * with the License.
10989  *
10990  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10991  * or http://www.opensolaris.org/os/licensing.
10992  * See the License for the specific language governing permissions
10993  * and limitations under the License.
10994  *
10995  * When distributing Covered Code, include this CDDL HEADER in each
10996  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10997  * If applicable, add the following below this CDDL HEADER, with the
10998  * fields enclosed by brackets "[]" replaced with your own identifying
10999  * information: Portions Copyright [yyyy] [name of copyright owner]
11000  *
11001  * CDDL HEADER END
11002  */
11003 /*	Copyright (c) 1988 AT&T	*/
11004 /*	  All Rights Reserved	*/
11005 
11006 /*
11007  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11008  *
11009  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
11010  * Use is subject to license terms.
11011  */
11012 
11013 
11014 
11015 
11016 /*
11017  * This header defines the ISO C 1989, ISO C++ 1998, and ISO C 1999
11018  * variable argument definitions.  For legacy support, it also defines
11019  * the pre-standard variable argument definitions.
11020  *
11021  * The varargs definitions within this header are defined in terms of
11022  * implementation definitions.  These implementation definitions reside
11023  * in <sys/va_list.h>.  This organization enables protected use of
11024  * the implementation by other standard headers without introducing
11025  * names into the users' namespace.
11026  */
11027 
11028 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 1 3 4
11029 /*
11030  * CDDL HEADER START
11031  *
11032  * The contents of this file are subject to the terms of the
11033  * Common Development and Distribution License, Version 1.0 only
11034  * (the "License").  You may not use this file except in compliance
11035  * with the License.
11036  *
11037  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11038  * or http://www.opensolaris.org/os/licensing.
11039  * See the License for the specific language governing permissions
11040  * and limitations under the License.
11041  *
11042  * When distributing Covered Code, include this CDDL HEADER in each
11043  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11044  * If applicable, add the following below this CDDL HEADER, with the
11045  * fields enclosed by brackets "[]" replaced with your own identifying
11046  * information: Portions Copyright [yyyy] [name of copyright owner]
11047  *
11048  * CDDL HEADER END
11049  */
11050 /*	Copyright (c) 1988 AT&T	*/
11051 /*	  All Rights Reserved  	*/
11052 
11053 
11054 /*
11055  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
11056  * Use is subject to license terms.
11057  */
11058 
11059 /*
11060  * An application should not include this header directly.  Instead it
11061  * should be included only through the inclusion of other Sun headers.
11062  *
11063  * The contents of this header is limited to identifiers specified in the
11064  * C Standard.  Any new identifiers specified in future amendments to the
11065  * C Standard must be placed in this header.  If these new identifiers
11066  * are required to also be in the C++ Standard "std" namespace, then for
11067  * anything other than macro definitions, corresponding "using" directives
11068  * must also be added to <stdarg.h>.
11069  */
11070 
11071 
11072 
11073 
11074 #pragma ident "%Z%%M%	%I%	%E% SMI"
11075 
11076 /*
11077  * This header defines the ISO C 1989 and ISO C++ 1998 variable
11078  * argument definitions.
11079  *
11080  * The varargs definitions within this header are defined in terms of
11081  * implementation definitions.  These implementation definitions reside
11082  * in <sys/va_impl.h>.  This organization enables protected use of
11083  * the implementation by other standard headers without introducing
11084  * names into the users' namespace.
11085  */
11086 
11087 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 1 3 4
11088 /*
11089  * CDDL HEADER START
11090  *
11091  * The contents of this file are subject to the terms of the
11092  * Common Development and Distribution License, Version 1.0 only
11093  * (the "License").  You may not use this file except in compliance
11094  * with the License.
11095  *
11096  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11097  * or http://www.opensolaris.org/os/licensing.
11098  * See the License for the specific language governing permissions
11099  * and limitations under the License.
11100  *
11101  * When distributing Covered Code, include this CDDL HEADER in each
11102  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11103  * If applicable, add the following below this CDDL HEADER, with the
11104  * fields enclosed by brackets "[]" replaced with your own identifying
11105  * information: Portions Copyright [yyyy] [name of copyright owner]
11106  *
11107  * CDDL HEADER END
11108  */
11109 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
11110 /*	  All Rights Reserved	*/
11111 
11112 
11113 /*
11114  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11115  *
11116  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
11117  * Use is subject to license terms.
11118  */
11119 
11120 
11121 
11122 
11123 /*
11124  * An application should not include this header directly.  Instead it
11125  * should be included only through the inclusion of other Sun headers,
11126  * specifically <stdarg.h> and <varargs.h>.
11127  *
11128  * This header serves two purposes.
11129  *
11130  * First, it provides a common set of definitions that implementations
11131  * of the various standards for variable argument lists may use.  These
11132  * various standards are implemented in <varargs.h>, <stdarg.h>,
11133  * <iso/stdarg_iso.h>, <iso/stdarg_c99.h>, and <sys/varargs.h>.
11134  *
11135  * Second, it provides varying implementations of the common definitions,
11136  * depending upon the compiler.
11137  */
11138 
11139 /*
11140  * The common definitions exported by this header or compilers using
11141  * this header are:
11142  *
11143  * the macro __va_start(list, name) starting the list iteration
11144  * the macro __va_arg(list, type) getting the current arg and iterating
11145  * the macro __va_copy(to, from) to bookmark the list iteration
11146  * the macro __va_end(list) to end the iteration
11147  *
11148  * In addition, the following are exported via inclusion of <sys/va_list.h>:
11149  *
11150  * the identifier __builtin_va_alist for the variable list pseudo parameter
11151  * the type __va_alist_type for the variable list pseudo parameter
11152  * the type __va_list defining the type of the variable list iterator
11153  */
11154 
11155 /*
11156  * This header uses feature macros (e.g. __BUILTIN_VA_ARG_INCR and
11157  * __BUILTIN_VA_STRUCT), compiler macros (e.g. __GNUC__), and processor
11158  * macros (e.g. __sparc) to determine the protocol appropriate to the
11159  * current compilation.  It is intended that the compilation system
11160  * define the feature, processor, and compiler macros, not the user of
11161  * the system.
11162  */
11163 
11164 /*
11165  * Many compilation systems depend upon the use of special functions
11166  * built into the the compilation system to handle variable argument
11167  * lists.  These built-in symbols may include one or more of the
11168  * following:
11169  *
11170  *      __builtin_va_alist
11171  *      __builtin_va_start
11172  *      __builtin_va_arg_incr
11173  *      __builtin_stdarg_start
11174  *      __builtin_va_end
11175  *      __builtin_va_arg
11176  *      __builtin_va_copy
11177  */
11178 
11179 /*
11180  * The following are defined in <sys/va_list.h>:
11181  *
11182  *      __va_alist_type
11183  *      __va_void()
11184  *      __va_ptr_base
11185  *      ISA definitions via inclusion of <sys/isa_defs.h>
11186  *
11187  * Inclusion of this header also makes visible the symbols in <sys/va_list.h>.
11188  * This header is included in <varargs.h>, <sys/varargs.h> and in <stdarg.h>
11189  * via inclusion of <iso/stdarg_iso.h>.
11190  */
11191 
11192 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1 3 4
11193 /*
11194  * CDDL HEADER START
11195  *
11196  * The contents of this file are subject to the terms of the
11197  * Common Development and Distribution License, Version 1.0 only
11198  * (the "License").  You may not use this file except in compliance
11199  * with the License.
11200  *
11201  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11202  * or http://www.opensolaris.org/os/licensing.
11203  * See the License for the specific language governing permissions
11204  * and limitations under the License.
11205  *
11206  * When distributing Covered Code, include this CDDL HEADER in each
11207  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11208  * If applicable, add the following below this CDDL HEADER, with the
11209  * fields enclosed by brackets "[]" replaced with your own identifying
11210  * information: Portions Copyright [yyyy] [name of copyright owner]
11211  *
11212  * CDDL HEADER END
11213  */
11214 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
11215 /*	  All Rights Reserved	*/
11216 
11217 
11218 /*
11219  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11220  *
11221  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
11222  * Use is subject to license terms.
11223  */
11224 # 106 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 2 3 4
11225 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 2 3 4
11226 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 3 4
11227 typedef __va_list va_list;
11228 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
11229 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 1 3 4
11230 /*
11231  * CDDL HEADER START
11232  *
11233  * The contents of this file are subject to the terms of the
11234  * Common Development and Distribution License, Version 1.0 only
11235  * (the "License").  You may not use this file except in compliance
11236  * with the License.
11237  *
11238  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11239  * or http://www.opensolaris.org/os/licensing.
11240  * See the License for the specific language governing permissions
11241  * and limitations under the License.
11242  *
11243  * When distributing Covered Code, include this CDDL HEADER in each
11244  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11245  * If applicable, add the following below this CDDL HEADER, with the
11246  * fields enclosed by brackets "[]" replaced with your own identifying
11247  * information: Portions Copyright [yyyy] [name of copyright owner]
11248  *
11249  * CDDL HEADER END
11250  */
11251 /*	Copyright (c) 1988 AT&T	*/
11252 /*	  All Rights Reserved	*/
11253 
11254 
11255 /*
11256  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
11257  * Use is subject to license terms.
11258  */
11259 
11260 
11261 
11262 
11263 #pragma ident "%Z%%M%	%I%	%E% SMI"
11264 
11265 /*
11266  * An application should not include this header directly.  Instead it
11267  * should be included only through the inclusion of other Sun headers.
11268  *
11269  * This header defines the va_copy variable argument macro, which is
11270  * new in ISO C 1999, and thus not present in ISO C 1989 and ISO C++
11271  * 1998.  Because this macro is a long-standing Solaris extension, it
11272  * is also permitted in other contexts.
11273  *
11274  * The varargs definitions within this header are defined in terms of
11275  * implementation definitions.  These implementation definitions reside
11276  * in <sys/va_list.h>.  This organization enables protected use of
11277  * the implementation by other standard headers without introducing
11278  * names into the users' namespace.
11279  */
11280 
11281 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
11282 /*
11283  * CDDL HEADER START
11284  *
11285  * The contents of this file are subject to the terms of the
11286  * Common Development and Distribution License (the "License").
11287  * You may not use this file except in compliance with the License.
11288  *
11289  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11290  * or http://www.opensolaris.org/os/licensing.
11291  * See the License for the specific language governing permissions
11292  * and limitations under the License.
11293  *
11294  * When distributing Covered Code, include this CDDL HEADER in each
11295  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11296  * If applicable, add the following below this CDDL HEADER, with the
11297  * fields enclosed by brackets "[]" replaced with your own identifying
11298  * information: Portions Copyright [yyyy] [name of copyright owner]
11299  *
11300  * CDDL HEADER END
11301  */
11302 
11303 /*
11304  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
11305  * Copyright 2016 Joyent, Inc.
11306  *
11307  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
11308  * Use is subject to license terms.
11309  */
11310 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 2 3 4
11311 
11312 
11313 
11314 
11315 
11316 /*
11317  * va_copy was initially a Solaris extension to provide a portable
11318  * way to perform a variable argument list ``bookmarking'' function.
11319  * It is now specified in the ISO/IEC 9899:1999 standard.
11320  */
11321 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
11322 
11323 /*
11324  * Allow global visibility for symbols defined in
11325  * C++ "std" namespace in <iso/stdarg_iso.h>.
11326  */
11327 # 68 "/usr/include/openssl/bio.h" 2 3 4
11328 
11329 # 1 "/usr/include/openssl/crypto.h" 1 3 4
11330 /* crypto/crypto.h */
11331 /* ====================================================================
11332  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
11333  *
11334  * Redistribution and use in source and binary forms, with or without
11335  * modification, are permitted provided that the following conditions
11336  * are met:
11337  *
11338  * 1. Redistributions of source code must retain the above copyright
11339  *    notice, this list of conditions and the following disclaimer.
11340  *
11341  * 2. Redistributions in binary form must reproduce the above copyright
11342  *    notice, this list of conditions and the following disclaimer in
11343  *    the documentation and/or other materials provided with the
11344  *    distribution.
11345  *
11346  * 3. All advertising materials mentioning features or use of this
11347  *    software must display the following acknowledgment:
11348  *    "This product includes software developed by the OpenSSL Project
11349  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11350  *
11351  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11352  *    endorse or promote products derived from this software without
11353  *    prior written permission. For written permission, please contact
11354  *    openssl-core@openssl.org.
11355  *
11356  * 5. Products derived from this software may not be called "OpenSSL"
11357  *    nor may "OpenSSL" appear in their names without prior written
11358  *    permission of the OpenSSL Project.
11359  *
11360  * 6. Redistributions of any form whatsoever must retain the following
11361  *    acknowledgment:
11362  *    "This product includes software developed by the OpenSSL Project
11363  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11364  *
11365  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11366  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11367  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11368  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11369  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11370  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11371  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11372  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11373  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11374  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11375  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11376  * OF THE POSSIBILITY OF SUCH DAMAGE.
11377  * ====================================================================
11378  *
11379  * This product includes cryptographic software written by Eric Young
11380  * (eay@cryptsoft.com).  This product includes software written by Tim
11381  * Hudson (tjh@cryptsoft.com).
11382  *
11383  */
11384 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11385  * All rights reserved.
11386  *
11387  * This package is an SSL implementation written
11388  * by Eric Young (eay@cryptsoft.com).
11389  * The implementation was written so as to conform with Netscapes SSL.
11390  *
11391  * This library is free for commercial and non-commercial use as long as
11392  * the following conditions are aheared to.  The following conditions
11393  * apply to all code found in this distribution, be it the RC4, RSA,
11394  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11395  * included with this distribution is covered by the same copyright terms
11396  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11397  *
11398  * Copyright remains Eric Young's, and as such any Copyright notices in
11399  * the code are not to be removed.
11400  * If this package is used in a product, Eric Young should be given attribution
11401  * as the author of the parts of the library used.
11402  * This can be in the form of a textual message at program startup or
11403  * in documentation (online or textual) provided with the package.
11404  *
11405  * Redistribution and use in source and binary forms, with or without
11406  * modification, are permitted provided that the following conditions
11407  * are met:
11408  * 1. Redistributions of source code must retain the copyright
11409  *    notice, this list of conditions and the following disclaimer.
11410  * 2. Redistributions in binary form must reproduce the above copyright
11411  *    notice, this list of conditions and the following disclaimer in the
11412  *    documentation and/or other materials provided with the distribution.
11413  * 3. All advertising materials mentioning features or use of this software
11414  *    must display the following acknowledgement:
11415  *    "This product includes cryptographic software written by
11416  *     Eric Young (eay@cryptsoft.com)"
11417  *    The word 'cryptographic' can be left out if the rouines from the library
11418  *    being used are not cryptographic related :-).
11419  * 4. If you include any Windows specific code (or a derivative thereof) from
11420  *    the apps directory (application code) you must include an acknowledgement:
11421  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11422  *
11423  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11424  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11425  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11426  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11427  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11428  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11429  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11430  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11431  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11432  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11433  * SUCH DAMAGE.
11434  *
11435  * The licence and distribution terms for any publically available version or
11436  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11437  * copied and put under another distribution licence
11438  * [including the GNU Public Licence.]
11439  */
11440 /* ====================================================================
11441  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
11442  * ECDH support in OpenSSL originally developed by
11443  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
11444  */
11445 
11446 
11447 
11448 
11449 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1 3 4
11450 /*
11451  * CDDL HEADER START
11452  *
11453  * The contents of this file are subject to the terms of the
11454  * Common Development and Distribution License (the "License").
11455  * You may not use this file except in compliance with the License.
11456  *
11457  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11458  * or http://www.opensolaris.org/os/licensing.
11459  * See the License for the specific language governing permissions
11460  * and limitations under the License.
11461  *
11462  * When distributing Covered Code, include this CDDL HEADER in each
11463  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11464  * If applicable, add the following below this CDDL HEADER, with the
11465  * fields enclosed by brackets "[]" replaced with your own identifying
11466  * information: Portions Copyright [yyyy] [name of copyright owner]
11467  *
11468  * CDDL HEADER END
11469  */
11470 
11471 /*
11472  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11473  * Copyright (c) 2013 Gary Mills
11474  *
11475  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
11476  */
11477 
11478 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
11479 
11480 /*	Copyright (c) 1988 AT&T	*/
11481 /*	  All Rights Reserved  	*/
11482 # 121 "/usr/include/openssl/crypto.h" 2 3 4
11483 
11484 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
11485 /* e_os2.h */
11486 /* ====================================================================
11487  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
11488  *
11489  * Redistribution and use in source and binary forms, with or without
11490  * modification, are permitted provided that the following conditions
11491  * are met:
11492  *
11493  * 1. Redistributions of source code must retain the above copyright
11494  *    notice, this list of conditions and the following disclaimer.
11495  *
11496  * 2. Redistributions in binary form must reproduce the above copyright
11497  *    notice, this list of conditions and the following disclaimer in
11498  *    the documentation and/or other materials provided with the
11499  *    distribution.
11500  *
11501  * 3. All advertising materials mentioning features or use of this
11502  *    software must display the following acknowledgment:
11503  *    "This product includes software developed by the OpenSSL Project
11504  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11505  *
11506  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11507  *    endorse or promote products derived from this software without
11508  *    prior written permission. For written permission, please contact
11509  *    openssl-core@openssl.org.
11510  *
11511  * 5. Products derived from this software may not be called "OpenSSL"
11512  *    nor may "OpenSSL" appear in their names without prior written
11513  *    permission of the OpenSSL Project.
11514  *
11515  * 6. Redistributions of any form whatsoever must retain the following
11516  *    acknowledgment:
11517  *    "This product includes software developed by the OpenSSL Project
11518  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11519  *
11520  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11521  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11522  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11523  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11524  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11525  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11526  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11527  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11528  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11529  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11530  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11531  * OF THE POSSIBILITY OF SUCH DAMAGE.
11532  * ====================================================================
11533  *
11534  * This product includes cryptographic software written by Eric Young
11535  * (eay@cryptsoft.com).  This product includes software written by Tim
11536  * Hudson (tjh@cryptsoft.com).
11537  *
11538  */
11539 
11540 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
11541 /* opensslconf.h */
11542 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
11543 
11544 
11545 
11546 
11547 /* OpenSSL was configured with the following options: */
11548 # 108 "/usr/include/openssl/opensslconf.h" 3 4
11549 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
11550    asks for it.  This is a transient feature that is provided for those
11551    who haven't had the time to do the appropriate changes in their
11552    applications.  */
11553 # 204 "/usr/include/openssl/opensslconf.h" 3 4
11554 /* crypto/opensslconf.h.in */
11555 
11556 /* Generate 80386 code? */
11557 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
11558 # 123 "/usr/include/openssl/crypto.h" 2 3 4
11559 
11560 
11561 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
11562 /*
11563  * CDDL HEADER START
11564  *
11565  * The contents of this file are subject to the terms of the
11566  * Common Development and Distribution License (the "License").
11567  * You may not use this file except in compliance with the License.
11568  *
11569  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11570  * or http://www.opensolaris.org/os/licensing.
11571  * See the License for the specific language governing permissions
11572  * and limitations under the License.
11573  *
11574  * When distributing Covered Code, include this CDDL HEADER in each
11575  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11576  * If applicable, add the following below this CDDL HEADER, with the
11577  * fields enclosed by brackets "[]" replaced with your own identifying
11578  * information: Portions Copyright [yyyy] [name of copyright owner]
11579  *
11580  * CDDL HEADER END
11581  */
11582 
11583 /*
11584  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11585  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
11586  */
11587 
11588 /*	Copyright (c) 1988 AT&T	*/
11589 /*	  All Rights Reserved  	*/
11590 
11591 /*
11592  * User-visible pieces of the ANSI C standard I/O package.
11593  */
11594 # 126 "/usr/include/openssl/crypto.h" 2 3 4
11595 
11596 
11597 # 1 "/usr/include/openssl/stack.h" 1 3 4
11598 /* crypto/stack/stack.h */
11599 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11600  * All rights reserved.
11601  *
11602  * This package is an SSL implementation written
11603  * by Eric Young (eay@cryptsoft.com).
11604  * The implementation was written so as to conform with Netscapes SSL.
11605  *
11606  * This library is free for commercial and non-commercial use as long as
11607  * the following conditions are aheared to.  The following conditions
11608  * apply to all code found in this distribution, be it the RC4, RSA,
11609  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11610  * included with this distribution is covered by the same copyright terms
11611  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11612  *
11613  * Copyright remains Eric Young's, and as such any Copyright notices in
11614  * the code are not to be removed.
11615  * If this package is used in a product, Eric Young should be given attribution
11616  * as the author of the parts of the library used.
11617  * This can be in the form of a textual message at program startup or
11618  * in documentation (online or textual) provided with the package.
11619  *
11620  * Redistribution and use in source and binary forms, with or without
11621  * modification, are permitted provided that the following conditions
11622  * are met:
11623  * 1. Redistributions of source code must retain the copyright
11624  *    notice, this list of conditions and the following disclaimer.
11625  * 2. Redistributions in binary form must reproduce the above copyright
11626  *    notice, this list of conditions and the following disclaimer in the
11627  *    documentation and/or other materials provided with the distribution.
11628  * 3. All advertising materials mentioning features or use of this software
11629  *    must display the following acknowledgement:
11630  *    "This product includes cryptographic software written by
11631  *     Eric Young (eay@cryptsoft.com)"
11632  *    The word 'cryptographic' can be left out if the rouines from the library
11633  *    being used are not cryptographic related :-).
11634  * 4. If you include any Windows specific code (or a derivative thereof) from
11635  *    the apps directory (application code) you must include an acknowledgement:
11636  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11637  *
11638  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11639  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11640  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11641  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11642  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11643  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11644  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11645  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11646  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11647  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11648  * SUCH DAMAGE.
11649  *
11650  * The licence and distribution terms for any publically available version or
11651  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11652  * copied and put under another distribution licence
11653  * [including the GNU Public Licence.]
11654  */
11655 # 66 "/usr/include/openssl/stack.h" 3 4
11656 typedef struct stack_st {
11657     int num;
11658     char **data;
11659     int sorted;
11660     int num_alloc;
11661     int (*comp) (const void *, const void *);
11662 } _STACK; /* Use STACK_OF(...) instead */
11663 
11664 
11665 
11666 
11667 int sk_num(const _STACK *);
11668 void *sk_value(const _STACK *, int);
11669 
11670 void *sk_set(_STACK *, int, void *);
11671 
11672 _STACK *sk_new(int (*cmp) (const void *, const void *));
11673 _STACK *sk_new_null(void);
11674 void sk_free(_STACK *);
11675 void sk_pop_free(_STACK *st, void (*func) (void *));
11676 _STACK *sk_deep_copy(_STACK *, void *(*)(void *), void (*)(void *));
11677 int sk_insert(_STACK *sk, void *data, int where);
11678 void *sk_delete(_STACK *st, int loc);
11679 void *sk_delete_ptr(_STACK *st, void *p);
11680 int sk_find(_STACK *st, void *data);
11681 int sk_find_ex(_STACK *st, void *data);
11682 int sk_push(_STACK *st, void *data);
11683 int sk_unshift(_STACK *st, void *data);
11684 void *sk_shift(_STACK *st);
11685 void *sk_pop(_STACK *st);
11686 void sk_zero(_STACK *st);
11687 int (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *)))
11688  (const void *, const void *);
11689 _STACK *sk_dup(_STACK *st);
11690 void sk_sort(_STACK *st);
11691 int sk_is_sorted(const _STACK *st);
11692 # 129 "/usr/include/openssl/crypto.h" 2 3 4
11693 # 1 "/usr/include/openssl/safestack.h" 1 3 4
11694 /* ====================================================================
11695  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
11696  *
11697  * Redistribution and use in source and binary forms, with or without
11698  * modification, are permitted provided that the following conditions
11699  * are met:
11700  *
11701  * 1. Redistributions of source code must retain the above copyright
11702  *    notice, this list of conditions and the following disclaimer.
11703  *
11704  * 2. Redistributions in binary form must reproduce the above copyright
11705  *    notice, this list of conditions and the following disclaimer in
11706  *    the documentation and/or other materials provided with the
11707  *    distribution.
11708  *
11709  * 3. All advertising materials mentioning features or use of this
11710  *    software must display the following acknowledgment:
11711  *    "This product includes software developed by the OpenSSL Project
11712  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11713  *
11714  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11715  *    endorse or promote products derived from this software without
11716  *    prior written permission. For written permission, please contact
11717  *    openssl-core@openssl.org.
11718  *
11719  * 5. Products derived from this software may not be called "OpenSSL"
11720  *    nor may "OpenSSL" appear in their names without prior written
11721  *    permission of the OpenSSL Project.
11722  *
11723  * 6. Redistributions of any form whatsoever must retain the following
11724  *    acknowledgment:
11725  *    "This product includes software developed by the OpenSSL Project
11726  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11727  *
11728  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11729  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11730  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11731  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11732  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11733  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11734  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11735  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11736  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11737  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11738  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11739  * OF THE POSSIBILITY OF SUCH DAMAGE.
11740  * ====================================================================
11741  *
11742  * This product includes cryptographic software written by Eric Young
11743  * (eay@cryptsoft.com).  This product includes software written by Tim
11744  * Hudson (tjh@cryptsoft.com).
11745  *
11746  */
11747 
11748 
11749 
11750 
11751 # 1 "/usr/include/openssl/stack.h" 1 3 4
11752 /* crypto/stack/stack.h */
11753 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11754  * All rights reserved.
11755  *
11756  * This package is an SSL implementation written
11757  * by Eric Young (eay@cryptsoft.com).
11758  * The implementation was written so as to conform with Netscapes SSL.
11759  *
11760  * This library is free for commercial and non-commercial use as long as
11761  * the following conditions are aheared to.  The following conditions
11762  * apply to all code found in this distribution, be it the RC4, RSA,
11763  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11764  * included with this distribution is covered by the same copyright terms
11765  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11766  *
11767  * Copyright remains Eric Young's, and as such any Copyright notices in
11768  * the code are not to be removed.
11769  * If this package is used in a product, Eric Young should be given attribution
11770  * as the author of the parts of the library used.
11771  * This can be in the form of a textual message at program startup or
11772  * in documentation (online or textual) provided with the package.
11773  *
11774  * Redistribution and use in source and binary forms, with or without
11775  * modification, are permitted provided that the following conditions
11776  * are met:
11777  * 1. Redistributions of source code must retain the copyright
11778  *    notice, this list of conditions and the following disclaimer.
11779  * 2. Redistributions in binary form must reproduce the above copyright
11780  *    notice, this list of conditions and the following disclaimer in the
11781  *    documentation and/or other materials provided with the distribution.
11782  * 3. All advertising materials mentioning features or use of this software
11783  *    must display the following acknowledgement:
11784  *    "This product includes cryptographic software written by
11785  *     Eric Young (eay@cryptsoft.com)"
11786  *    The word 'cryptographic' can be left out if the rouines from the library
11787  *    being used are not cryptographic related :-).
11788  * 4. If you include any Windows specific code (or a derivative thereof) from
11789  *    the apps directory (application code) you must include an acknowledgement:
11790  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11791  *
11792  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11793  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11794  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11795  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11796  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11797  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11798  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11799  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11800  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11801  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11802  * SUCH DAMAGE.
11803  *
11804  * The licence and distribution terms for any publically available version or
11805  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11806  * copied and put under another distribution licence
11807  * [including the GNU Public Licence.]
11808  */
11809 # 59 "/usr/include/openssl/safestack.h" 2 3 4
11810 # 69 "/usr/include/openssl/safestack.h" 3 4
11811 /*
11812  * In C++ we get problems because an explicit cast is needed from (void *) we
11813  * use CHECKED_STACK_OF to ensure the correct type is passed in the macros
11814  * below.
11815  */
11816 # 102 "/usr/include/openssl/safestack.h" 3 4
11817 /* nada (obsolete in new safestack approach)*/
11818 
11819 
11820 /*-
11821  * Strings are special: normally an lhash entry will point to a single
11822  * (somewhat) mutable object. In the case of strings:
11823  *
11824  * a) Instead of a single char, there is an array of chars, NUL-terminated.
11825  * b) The string may have be immutable.
11826  *
11827  * So, they need their own declarations. Especially important for
11828  * type-checking tools, such as Deputy.
11829  *
11830  * In practice, however, it appears to be hard to have a const
11831  * string. For now, I'm settling for dealing with the fact it is a
11832  * string at all.
11833  */
11834 typedef char *OPENSSL_STRING;
11835 
11836 typedef const char *OPENSSL_CSTRING;
11837 
11838 /*
11839  * Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
11840  * STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned
11841  * above, instead of a single char each entry is a NUL-terminated array of
11842  * chars. So, we have to implement STRING specially for STACK_OF. This is
11843  * dealt with in the autogenerated macros below.
11844  */
11845 
11846 struct stack_st_OPENSSL_STRING { _STACK stack; };
11847 
11848 /*
11849  * Similarly, we sometimes use a block of characters, NOT nul-terminated.
11850  * These should also be distinguished from "normal" stacks.
11851  */
11852 typedef void *OPENSSL_BLOCK;
11853 struct stack_st_OPENSSL_BLOCK { _STACK stack; };
11854 
11855 /*
11856  * SKM_sk_... stack macros are internal to safestack.h: never use them
11857  * directly, use sk_<type>_... instead
11858  */
11859 # 211 "/usr/include/openssl/safestack.h" 3 4
11860 /*
11861  * This block of defines is updated by util/mkstack.pl, please do not touch!
11862  */
11863 # 130 "/usr/include/openssl/crypto.h" 2 3 4
11864 # 1 "/usr/include/openssl/opensslv.h" 1 3 4
11865 
11866 
11867 
11868 
11869 
11870 
11871 
11872 /*-
11873  * Numeric release version identifier:
11874  * MNNFFPPS: major minor fix patch status
11875  * The status nibble has one of the values 0 for development, 1 to e for betas
11876  * 1 to 14, and f for release.  The patch level is exactly that.
11877  * For example:
11878  * 0.9.3-dev      0x00903000
11879  * 0.9.3-beta1    0x00903001
11880  * 0.9.3-beta2-dev 0x00903002
11881  * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)
11882  * 0.9.3          0x0090300f
11883  * 0.9.3a         0x0090301f
11884  * 0.9.4          0x0090400f
11885  * 1.2.3z         0x102031af
11886  *
11887  * For continuity reasons (because 0.9.5 is already out, and is coded
11888  * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
11889  * part is slightly different, by setting the highest bit.  This means
11890  * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start
11891  * with 0x0090600S...
11892  *
11893  * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
11894  * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
11895  *  major minor fix final patch/beta)
11896  */
11897 # 41 "/usr/include/openssl/opensslv.h" 3 4
11898 /*-
11899  * The macros below are to be used for shared library (.so, .dll, ...)
11900  * versioning.  That kind of versioning works a bit differently between
11901  * operating systems.  The most usual scheme is to set a major and a minor
11902  * number, and have the runtime loader check that the major number is equal
11903  * to what it was at application link time, while the minor number has to
11904  * be greater or equal to what it was at application link time.  With this
11905  * scheme, the version number is usually part of the file name, like this:
11906  *
11907  *      libcrypto.so.0.9
11908  *
11909  * Some unixen also make a softlink with the major verson number only:
11910  *
11911  *      libcrypto.so.0
11912  *
11913  * On Tru64 and IRIX 6.x it works a little bit differently.  There, the
11914  * shared library version is stored in the file, and is actually a series
11915  * of versions, separated by colons.  The rightmost version present in the
11916  * library when linking an application is stored in the application to be
11917  * matched at run time.  When the application is run, a check is done to
11918  * see if the library version stored in the application matches any of the
11919  * versions in the version string of the library itself.
11920  * This version string can be constructed in any way, depending on what
11921  * kind of matching is desired.  However, to implement the same scheme as
11922  * the one used in the other unixen, all compatible versions, from lowest
11923  * to highest, should be part of the string.  Consecutive builds would
11924  * give the following versions strings:
11925  *
11926  *      3.0
11927  *      3.0:3.1
11928  *      3.0:3.1:3.2
11929  *      4.0
11930  *      4.0:4.1
11931  *
11932  * Notice how version 4 is completely incompatible with version, and
11933  * therefore give the breach you can see.
11934  *
11935  * There may be other schemes as well that I haven't yet discovered.
11936  *
11937  * So, here's the way it works here: first of all, the library version
11938  * number doesn't need at all to match the overall OpenSSL version.
11939  * However, it's nice and more understandable if it actually does.
11940  * The current library version is stored in the macro SHLIB_VERSION_NUMBER,
11941  * which is just a piece of text in the format "M.m.e" (Major, minor, edit).
11942  * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
11943  * we need to keep a history of version numbers, which is done in the
11944  * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and
11945  * should only keep the versions that are binary compatible with the current.
11946  */
11947 # 131 "/usr/include/openssl/crypto.h" 2 3 4
11948 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
11949 /* ====================================================================
11950  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
11951  *
11952  * Redistribution and use in source and binary forms, with or without
11953  * modification, are permitted provided that the following conditions
11954  * are met:
11955  *
11956  * 1. Redistributions of source code must retain the above copyright
11957  *    notice, this list of conditions and the following disclaimer.
11958  *
11959  * 2. Redistributions in binary form must reproduce the above copyright
11960  *    notice, this list of conditions and the following disclaimer in
11961  *    the documentation and/or other materials provided with the
11962  *    distribution.
11963  *
11964  * 3. All advertising materials mentioning features or use of this
11965  *    software must display the following acknowledgment:
11966  *    "This product includes software developed by the OpenSSL Project
11967  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11968  *
11969  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11970  *    endorse or promote products derived from this software without
11971  *    prior written permission. For written permission, please contact
11972  *    openssl-core@openssl.org.
11973  *
11974  * 5. Products derived from this software may not be called "OpenSSL"
11975  *    nor may "OpenSSL" appear in their names without prior written
11976  *    permission of the OpenSSL Project.
11977  *
11978  * 6. Redistributions of any form whatsoever must retain the following
11979  *    acknowledgment:
11980  *    "This product includes software developed by the OpenSSL Project
11981  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11982  *
11983  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11984  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11985  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11986  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11987  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11988  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11989  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11990  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11991  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11992  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11993  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11994  * OF THE POSSIBILITY OF SUCH DAMAGE.
11995  * ====================================================================
11996  *
11997  * This product includes cryptographic software written by Eric Young
11998  * (eay@cryptsoft.com).  This product includes software written by Tim
11999  * Hudson (tjh@cryptsoft.com).
12000  *
12001  */
12002 # 62 "/usr/include/openssl/ossl_typ.h" 3 4
12003 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
12004 /* e_os2.h */
12005 /* ====================================================================
12006  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
12007  *
12008  * Redistribution and use in source and binary forms, with or without
12009  * modification, are permitted provided that the following conditions
12010  * are met:
12011  *
12012  * 1. Redistributions of source code must retain the above copyright
12013  *    notice, this list of conditions and the following disclaimer.
12014  *
12015  * 2. Redistributions in binary form must reproduce the above copyright
12016  *    notice, this list of conditions and the following disclaimer in
12017  *    the documentation and/or other materials provided with the
12018  *    distribution.
12019  *
12020  * 3. All advertising materials mentioning features or use of this
12021  *    software must display the following acknowledgment:
12022  *    "This product includes software developed by the OpenSSL Project
12023  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12024  *
12025  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12026  *    endorse or promote products derived from this software without
12027  *    prior written permission. For written permission, please contact
12028  *    openssl-core@openssl.org.
12029  *
12030  * 5. Products derived from this software may not be called "OpenSSL"
12031  *    nor may "OpenSSL" appear in their names without prior written
12032  *    permission of the OpenSSL Project.
12033  *
12034  * 6. Redistributions of any form whatsoever must retain the following
12035  *    acknowledgment:
12036  *    "This product includes software developed by the OpenSSL Project
12037  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12038  *
12039  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12040  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12041  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12042  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12043  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12044  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12045  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12046  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12047  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12048  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12049  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12050  * OF THE POSSIBILITY OF SUCH DAMAGE.
12051  * ====================================================================
12052  *
12053  * This product includes cryptographic software written by Eric Young
12054  * (eay@cryptsoft.com).  This product includes software written by Tim
12055  * Hudson (tjh@cryptsoft.com).
12056  *
12057  */
12058 
12059 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
12060 /* opensslconf.h */
12061 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
12062 
12063 
12064 
12065 
12066 /* OpenSSL was configured with the following options: */
12067 # 108 "/usr/include/openssl/opensslconf.h" 3 4
12068 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
12069    asks for it.  This is a transient feature that is provided for those
12070    who haven't had the time to do the appropriate changes in their
12071    applications.  */
12072 # 204 "/usr/include/openssl/opensslconf.h" 3 4
12073 /* crypto/opensslconf.h.in */
12074 
12075 /* Generate 80386 code? */
12076 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
12077 # 63 "/usr/include/openssl/ossl_typ.h" 2 3 4
12078 # 83 "/usr/include/openssl/ossl_typ.h" 3 4
12079 typedef struct asn1_string_st ASN1_INTEGER;
12080 typedef struct asn1_string_st ASN1_ENUMERATED;
12081 typedef struct asn1_string_st ASN1_BIT_STRING;
12082 typedef struct asn1_string_st ASN1_OCTET_STRING;
12083 typedef struct asn1_string_st ASN1_PRINTABLESTRING;
12084 typedef struct asn1_string_st ASN1_T61STRING;
12085 typedef struct asn1_string_st ASN1_IA5STRING;
12086 typedef struct asn1_string_st ASN1_GENERALSTRING;
12087 typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
12088 typedef struct asn1_string_st ASN1_BMPSTRING;
12089 typedef struct asn1_string_st ASN1_UTCTIME;
12090 typedef struct asn1_string_st ASN1_TIME;
12091 typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
12092 typedef struct asn1_string_st ASN1_VISIBLESTRING;
12093 typedef struct asn1_string_st ASN1_UTF8STRING;
12094 typedef struct asn1_string_st ASN1_STRING;
12095 typedef int ASN1_BOOLEAN;
12096 typedef int ASN1_NULL;
12097 
12098 
12099 typedef struct asn1_object_st ASN1_OBJECT;
12100 
12101 typedef struct ASN1_ITEM_st ASN1_ITEM;
12102 typedef struct asn1_pctx_st ASN1_PCTX;
12103 # 120 "/usr/include/openssl/ossl_typ.h" 3 4
12104 typedef struct bignum_st BIGNUM;
12105 typedef struct bignum_ctx BN_CTX;
12106 typedef struct bn_blinding_st BN_BLINDING;
12107 typedef struct bn_mont_ctx_st BN_MONT_CTX;
12108 typedef struct bn_recp_ctx_st BN_RECP_CTX;
12109 typedef struct bn_gencb_st BN_GENCB;
12110 
12111 typedef struct buf_mem_st BUF_MEM;
12112 
12113 typedef struct evp_cipher_st EVP_CIPHER;
12114 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
12115 typedef struct env_md_st EVP_MD;
12116 typedef struct env_md_ctx_st EVP_MD_CTX;
12117 typedef struct evp_pkey_st EVP_PKEY;
12118 
12119 typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
12120 
12121 typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
12122 typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
12123 
12124 typedef struct dh_st DH;
12125 typedef struct dh_method DH_METHOD;
12126 
12127 typedef struct dsa_st DSA;
12128 typedef struct dsa_method DSA_METHOD;
12129 
12130 typedef struct rsa_st RSA;
12131 typedef struct rsa_meth_st RSA_METHOD;
12132 
12133 typedef struct rand_meth_st RAND_METHOD;
12134 
12135 typedef struct ecdh_method ECDH_METHOD;
12136 typedef struct ecdsa_method ECDSA_METHOD;
12137 
12138 typedef struct x509_st X509;
12139 typedef struct X509_algor_st X509_ALGOR;
12140 typedef struct X509_crl_st X509_CRL;
12141 typedef struct x509_crl_method_st X509_CRL_METHOD;
12142 typedef struct x509_revoked_st X509_REVOKED;
12143 typedef struct X509_name_st X509_NAME;
12144 typedef struct X509_pubkey_st X509_PUBKEY;
12145 typedef struct x509_store_st X509_STORE;
12146 typedef struct x509_store_ctx_st X509_STORE_CTX;
12147 
12148 typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
12149 
12150 typedef struct v3_ext_ctx X509V3_CTX;
12151 typedef struct conf_st CONF;
12152 
12153 typedef struct store_st STORE;
12154 typedef struct store_method_st STORE_METHOD;
12155 
12156 typedef struct ui_st UI;
12157 typedef struct ui_method_st UI_METHOD;
12158 
12159 typedef struct st_ERR_FNS ERR_FNS;
12160 
12161 typedef struct engine_st ENGINE;
12162 typedef struct ssl_st SSL;
12163 typedef struct ssl_ctx_st SSL_CTX;
12164 
12165 typedef struct comp_method_st COMP_METHOD;
12166 
12167 typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
12168 typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
12169 typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
12170 typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
12171 
12172 typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
12173 typedef struct DIST_POINT_st DIST_POINT;
12174 typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
12175 typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
12176 
12177   /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */
12178 
12179 
12180 
12181 typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
12182 /* Callback types for crypto.h */
12183 typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
12184                            int idx, long argl, void *argp);
12185 typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
12186                              int idx, long argl, void *argp);
12187 typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
12188                            void *from_d, int idx, long argl, void *argp);
12189 
12190 typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
12191 typedef struct ocsp_response_st OCSP_RESPONSE;
12192 typedef struct ocsp_responder_id_st OCSP_RESPID;
12193 # 132 "/usr/include/openssl/crypto.h" 2 3 4
12194 
12195 
12196 
12197 
12198 
12199 /*
12200  * Resolve problems on some operating systems with symbol names that clash
12201  * one way or another
12202  */
12203 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
12204 /* ====================================================================
12205  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
12206  *
12207  * Redistribution and use in source and binary forms, with or without
12208  * modification, are permitted provided that the following conditions
12209  * are met:
12210  *
12211  * 1. Redistributions of source code must retain the above copyright
12212  *    notice, this list of conditions and the following disclaimer.
12213  *
12214  * 2. Redistributions in binary form must reproduce the above copyright
12215  *    notice, this list of conditions and the following disclaimer in
12216  *    the documentation and/or other materials provided with the
12217  *    distribution.
12218  *
12219  * 3. All advertising materials mentioning features or use of this
12220  *    software must display the following acknowledgment:
12221  *    "This product includes software developed by the OpenSSL Project
12222  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12223  *
12224  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12225  *    endorse or promote products derived from this software without
12226  *    prior written permission. For written permission, please contact
12227  *    openssl-core@openssl.org.
12228  *
12229  * 5. Products derived from this software may not be called "OpenSSL"
12230  *    nor may "OpenSSL" appear in their names without prior written
12231  *    permission of the OpenSSL Project.
12232  *
12233  * 6. Redistributions of any form whatsoever must retain the following
12234  *    acknowledgment:
12235  *    "This product includes software developed by the OpenSSL Project
12236  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12237  *
12238  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12239  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12240  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12241  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12242  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12243  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12244  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12245  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12246  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12247  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12248  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12249  * OF THE POSSIBILITY OF SUCH DAMAGE.
12250  * ====================================================================
12251  *
12252  * This product includes cryptographic software written by Eric Young
12253  * (eay@cryptsoft.com).  This product includes software written by Tim
12254  * Hudson (tjh@cryptsoft.com).
12255  *
12256  */
12257 
12258 
12259 
12260 
12261 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
12262 /* e_os2.h */
12263 /* ====================================================================
12264  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
12265  *
12266  * Redistribution and use in source and binary forms, with or without
12267  * modification, are permitted provided that the following conditions
12268  * are met:
12269  *
12270  * 1. Redistributions of source code must retain the above copyright
12271  *    notice, this list of conditions and the following disclaimer.
12272  *
12273  * 2. Redistributions in binary form must reproduce the above copyright
12274  *    notice, this list of conditions and the following disclaimer in
12275  *    the documentation and/or other materials provided with the
12276  *    distribution.
12277  *
12278  * 3. All advertising materials mentioning features or use of this
12279  *    software must display the following acknowledgment:
12280  *    "This product includes software developed by the OpenSSL Project
12281  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12282  *
12283  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12284  *    endorse or promote products derived from this software without
12285  *    prior written permission. For written permission, please contact
12286  *    openssl-core@openssl.org.
12287  *
12288  * 5. Products derived from this software may not be called "OpenSSL"
12289  *    nor may "OpenSSL" appear in their names without prior written
12290  *    permission of the OpenSSL Project.
12291  *
12292  * 6. Redistributions of any form whatsoever must retain the following
12293  *    acknowledgment:
12294  *    "This product includes software developed by the OpenSSL Project
12295  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12296  *
12297  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12298  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12299  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12300  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12301  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12302  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12303  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12304  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12305  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12306  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12307  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12308  * OF THE POSSIBILITY OF SUCH DAMAGE.
12309  * ====================================================================
12310  *
12311  * This product includes cryptographic software written by Eric Young
12312  * (eay@cryptsoft.com).  This product includes software written by Tim
12313  * Hudson (tjh@cryptsoft.com).
12314  *
12315  */
12316 
12317 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
12318 /* opensslconf.h */
12319 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
12320 
12321 
12322 
12323 
12324 /* OpenSSL was configured with the following options: */
12325 # 108 "/usr/include/openssl/opensslconf.h" 3 4
12326 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
12327    asks for it.  This is a transient feature that is provided for those
12328    who haven't had the time to do the appropriate changes in their
12329    applications.  */
12330 # 204 "/usr/include/openssl/opensslconf.h" 3 4
12331 /* crypto/opensslconf.h.in */
12332 
12333 /* Generate 80386 code? */
12334 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
12335 # 59 "/usr/include/openssl/symhacks.h" 2 3 4
12336 
12337 /*
12338  * Hacks to solve the problem with linkers incapable of handling very long
12339  * symbol names.  In the case of VMS, the limit is 31 characters on VMS for
12340  * VAX.
12341  */
12342 /*
12343  * Note that this affects util/libeay.num and util/ssleay.num...  you may
12344  * change those manually, but that's not recommended, as those files are
12345  * controlled centrally and updated on Unix, and the central definition may
12346  * disagree with yours, which in turn may come with shareable library
12347  * incompatibilities.
12348  */
12349 # 481 "/usr/include/openssl/symhacks.h" 3 4
12350 /* Case insensitive linking causes problems.... */
12351 # 142 "/usr/include/openssl/crypto.h" 2 3 4
12352 
12353 
12354 
12355 
12356 
12357 /* Backward compatibility to SSLeay */
12358 /*
12359  * This is more to be used to check the correct DLL is being used in the MS
12360  * world.
12361  */
12362 
12363 
12364 /* #define SSLEAY_OPTIONS       1 no longer supported */
12365 
12366 
12367 
12368 
12369 
12370 /* Already declared in ossl_typ.h */
12371 # 174 "/usr/include/openssl/crypto.h" 3 4
12372 /* A generic structure to pass assorted data in a expandable way */
12373 typedef struct openssl_item_st {
12374     int code;
12375     void *value; /* Not used for flag attributes */
12376     size_t value_size; /* Max size of value for output, length for
12377                                  * input */
12378     size_t *value_length; /* Returned length of value for output */
12379 } OPENSSL_ITEM;
12380 
12381 /*
12382  * When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
12383  * names in cryptlib.c
12384  */
12385 # 256 "/usr/include/openssl/crypto.h" 3 4
12386 /*
12387  * Some applications as well as some parts of OpenSSL need to allocate and
12388  * deallocate locks in a dynamic fashion.  The following typedef makes this
12389  * possible in a type-safe manner.
12390  */
12391 /* struct CRYPTO_dynlock_value has to be defined by the application. */
12392 typedef struct {
12393     int references;
12394     struct CRYPTO_dynlock_value *data;
12395 } CRYPTO_dynlock;
12396 
12397 /*
12398  * The following can be used to detect memory leaks in the SSLeay library. It
12399  * used, it turns on malloc checking
12400  */
12401 
12402 
12403 
12404 
12405 
12406 
12407 /*
12408  * The following are bit values to turn on or off options connected to the
12409  * malloc checking functionality
12410  */
12411 
12412 /* Adds time to the memory checking information */
12413 
12414 /* Adds thread number to the memory checking information */
12415 
12416 
12417 
12418 
12419 /* predec of the BIO type */
12420 typedef struct bio_st BIO_dummy;
12421 
12422 struct crypto_ex_data_st {
12423     struct stack_st_void *sk;
12424     /* gcc is screwing up this data structure :-( */
12425     int dummy;
12426 };
12427 struct stack_st_void { _STACK stack; };
12428 
12429 /*
12430  * This stuff is basically class callback functions The current classes are
12431  * SSL_CTX, SSL, SSL_SESSION, and a few more
12432  */
12433 
12434 typedef struct crypto_ex_data_func_st {
12435     long argl; /* Arbitary long */
12436     void *argp; /* Arbitary void * */
12437     CRYPTO_EX_new *new_func;
12438     CRYPTO_EX_free *free_func;
12439     CRYPTO_EX_dup *dup_func;
12440 } CRYPTO_EX_DATA_FUNCS;
12441 
12442 struct stack_st_CRYPTO_EX_DATA_FUNCS { _STACK stack; };
12443 
12444 /*
12445  * Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA
12446  * entry.
12447  */
12448 # 336 "/usr/include/openssl/crypto.h" 3 4
12449 /*
12450  * Dynamically assigned indexes start from this value (don't use directly,
12451  * use via CRYPTO_ex_data_new_class).
12452  */
12453 
12454 
12455 /*
12456  * This is the default callbacks, but we can have others as well: this is
12457  * needed in Win32 where the application malloc and the library malloc may
12458  * not be the same.
12459  */
12460 # 356 "/usr/include/openssl/crypto.h" 3 4
12461 /*
12462  * Set standard debugging functions (not done by default unless CRYPTO_MDEBUG
12463  * is defined)
12464  */
12465 # 369 "/usr/include/openssl/crypto.h" 3 4
12466 int CRYPTO_mem_ctrl(int mode);
12467 int CRYPTO_is_mem_check_on(void);
12468 
12469 /* for applications */
12470 
12471 
12472 
12473 /* for library-internal use */
12474 # 396 "/usr/include/openssl/crypto.h" 3 4
12475 const char *SSLeay_version(int type);
12476 unsigned long SSLeay(void);
12477 
12478 int OPENSSL_issetugid(void);
12479 
12480 /* An opaque type representing an implementation of "ex_data" support */
12481 typedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL;
12482 /* Return an opaque pointer to the current "ex_data" implementation */
12483 const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void);
12484 /* Sets the "ex_data" implementation to be used (if it's not too late) */
12485 int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i);
12486 /* Get a new "ex_data" class, and return the corresponding "class_index" */
12487 int CRYPTO_ex_data_new_class(void);
12488 /* Within a given class, get/register a new index */
12489 int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
12490                             CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
12491                             CRYPTO_EX_free *free_func);
12492 /*
12493  * Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a
12494  * given class (invokes whatever per-class callbacks are applicable)
12495  */
12496 int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
12497 int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
12498                        CRYPTO_EX_DATA *from);
12499 void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
12500 /*
12501  * Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular
12502  * index (relative to the class type involved)
12503  */
12504 int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
12505 void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
12506 /*
12507  * This function cleans up all "ex_data" state. It mustn't be called under
12508  * potential race-conditions.
12509  */
12510 void CRYPTO_cleanup_all_ex_data(void);
12511 
12512 int CRYPTO_get_new_lockid(char *name);
12513 
12514 int CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */
12515 void CRYPTO_lock(int mode, int type, const char *file, int line);
12516 void CRYPTO_set_locking_callback(void (*func) (int mode, int type,
12517                                                const char *file, int line));
12518 void (*CRYPTO_get_locking_callback(void)) (int mode, int type,
12519                                            const char *file, int line);
12520 void CRYPTO_set_add_lock_callback(int (*func)
12521                                    (int *num, int mount, int type,
12522                                     const char *file, int line));
12523 int (*CRYPTO_get_add_lock_callback(void)) (int *num, int mount, int type,
12524                                            const char *file, int line);
12525 
12526 /* Don't use this structure directly. */
12527 typedef struct crypto_threadid_st {
12528     void *ptr;
12529     unsigned long val;
12530 } CRYPTO_THREADID;
12531 /* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
12532 void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val);
12533 void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr);
12534 int CRYPTO_THREADID_set_callback(void (*threadid_func) (CRYPTO_THREADID *));
12535 void (*CRYPTO_THREADID_get_callback(void)) (CRYPTO_THREADID *);
12536 void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
12537 int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
12538 void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
12539 unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
12540 
12541 void CRYPTO_set_id_callback(unsigned long (*func) (void));
12542 unsigned long (*CRYPTO_get_id_callback(void)) (void);
12543 unsigned long CRYPTO_thread_id(void);
12544 
12545 
12546 const char *CRYPTO_get_lock_name(int type);
12547 int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
12548                     int line);
12549 
12550 int CRYPTO_get_new_dynlockid(void);
12551 void CRYPTO_destroy_dynlockid(int i);
12552 struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
12553 void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value
12554                                         *(*dyn_create_function) (const char
12555                                                                  *file,
12556                                                                  int line));
12557 void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)
12558                                        (int mode,
12559                                         struct CRYPTO_dynlock_value *l,
12560                                         const char *file, int line));
12561 void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)
12562                                           (struct CRYPTO_dynlock_value *l,
12563                                            const char *file, int line));
12564 struct CRYPTO_dynlock_value
12565 *(*CRYPTO_get_dynlock_create_callback(void)) (const char *file, int line);
12566 void (*CRYPTO_get_dynlock_lock_callback(void)) (int mode,
12567                                                 struct CRYPTO_dynlock_value
12568                                                 *l, const char *file,
12569                                                 int line);
12570 void (*CRYPTO_get_dynlock_destroy_callback(void)) (struct CRYPTO_dynlock_value
12571                                                    *l, const char *file,
12572                                                    int line);
12573 
12574 /*
12575  * CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- call
12576  * the latter last if you need different functions
12577  */
12578 int CRYPTO_set_mem_functions(void *(*m) (size_t), void *(*r) (void *, size_t),
12579                              void (*f) (void *));
12580 int CRYPTO_set_locked_mem_functions(void *(*m) (size_t),
12581                                     void (*free_func) (void *));
12582 int CRYPTO_set_mem_ex_functions(void *(*m) (size_t, const char *, int),
12583                                 void *(*r) (void *, size_t, const char *,
12584                                             int), void (*f) (void *));
12585 int CRYPTO_set_locked_mem_ex_functions(void *(*m) (size_t, const char *, int),
12586                                        void (*free_func) (void *));
12587 int CRYPTO_set_mem_debug_functions(void (*m)
12588                                     (void *, int, const char *, int, int),
12589                                    void (*r) (void *, void *, int,
12590                                               const char *, int, int),
12591                                    void (*f) (void *, int), void (*so) (long),
12592                                    long (*go) (void));
12593 void CRYPTO_get_mem_functions(void *(**m) (size_t),
12594                               void *(**r) (void *, size_t),
12595                               void (**f) (void *));
12596 void CRYPTO_get_locked_mem_functions(void *(**m) (size_t),
12597                                      void (**f) (void *));
12598 void CRYPTO_get_mem_ex_functions(void *(**m) (size_t, const char *, int),
12599                                  void *(**r) (void *, size_t, const char *,
12600                                               int), void (**f) (void *));
12601 void CRYPTO_get_locked_mem_ex_functions(void
12602                                         *(**m) (size_t, const char *, int),
12603                                         void (**f) (void *));
12604 void CRYPTO_get_mem_debug_functions(void (**m)
12605                                      (void *, int, const char *, int, int),
12606                                     void (**r) (void *, void *, int,
12607                                                 const char *, int, int),
12608                                     void (**f) (void *, int),
12609                                     void (**so) (long), long (**go) (void));
12610 
12611 void *CRYPTO_malloc_locked(int num, const char *file, int line);
12612 void CRYPTO_free_locked(void *ptr);
12613 void *CRYPTO_malloc(int num, const char *file, int line);
12614 char *CRYPTO_strdup(const char *str, const char *file, int line);
12615 void CRYPTO_free(void *ptr);
12616 void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
12617 void *CRYPTO_realloc_clean(void *addr, int old_num, int num, const char *file,
12618                            int line);
12619 void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
12620 
12621 void OPENSSL_cleanse(void *ptr, size_t len);
12622 
12623 void CRYPTO_set_mem_debug_options(long bits);
12624 long CRYPTO_get_mem_debug_options(void);
12625 
12626 
12627 
12628 int CRYPTO_push_info_(const char *info, const char *file, int line);
12629 int CRYPTO_pop_info(void);
12630 int CRYPTO_remove_all_info(void);
12631 
12632 /*
12633  * Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro;
12634  * used as default in CRYPTO_MDEBUG compilations):
12635  */
12636 /*-
12637  * The last argument has the following significance:
12638  *
12639  * 0:   called before the actual memory allocation has taken place
12640  * 1:   called after the actual memory allocation has taken place
12641  */
12642 void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,
12643                        int before_p);
12644 void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, const char *file,
12645                         int line, int before_p);
12646 void CRYPTO_dbg_free(void *addr, int before_p);
12647 /*-
12648  * Tell the debugging code about options.  By default, the following values
12649  * apply:
12650  *
12651  * 0:                           Clear all options.
12652  * V_CRYPTO_MDEBUG_TIME (1):    Set the "Show Time" option.
12653  * V_CRYPTO_MDEBUG_THREAD (2):  Set the "Show Thread Number" option.
12654  * V_CRYPTO_MDEBUG_ALL (3):     1 + 2
12655  */
12656 void CRYPTO_dbg_set_options(long bits);
12657 long CRYPTO_dbg_get_options(void);
12658 
12659 
12660 void CRYPTO_mem_leaks_fp(FILE *);
12661 
12662 void CRYPTO_mem_leaks(struct bio_st *bio);
12663 /* unsigned long order, char *file, int line, int num_bytes, char *addr */
12664 typedef void *CRYPTO_MEM_LEAK_CB (unsigned long, const char *, int, int,
12665                                   void *);
12666 void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
12667 
12668 /* die if we have to */
12669 void OpenSSLDie(const char *file, int line, const char *assertion);
12670 
12671 
12672 unsigned long *OPENSSL_ia32cap_loc(void);
12673 
12674 int OPENSSL_isservice(void);
12675 
12676 int FIPS_mode(void);
12677 int FIPS_mode_set(int r);
12678 
12679 void OPENSSL_init(void);
12680 # 624 "/usr/include/openssl/crypto.h" 3 4
12681 /*
12682  * CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.
12683  * It takes an amount of time dependent on |len|, but independent of the
12684  * contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements
12685  * into a defined order as the return value when a != b is undefined, other
12686  * than to be non-zero.
12687  */
12688 int CRYPTO_memcmp(const volatile void *a, const volatile void *b, size_t len);
12689 
12690 /* BEGIN ERROR CODES */
12691 /*
12692  * The following lines are auto generated by the script mkerr.pl. Any changes
12693  * made after this point may be overwritten when the script is next run.
12694  */
12695 void ERR_load_CRYPTO_strings(void);
12696 
12697 /* Error codes for the CRYPTO functions. */
12698 
12699 /* Function codes. */
12700 # 654 "/usr/include/openssl/crypto.h" 3 4
12701 /* Reason codes. */
12702 # 70 "/usr/include/openssl/bio.h" 2 3 4
12703 # 83 "/usr/include/openssl/bio.h" 3 4
12704 /* These are the 'types' of BIOs */
12705 # 116 "/usr/include/openssl/bio.h" 3 4
12706 /*
12707  * BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
12708  * BIO_set_fp(in,stdin,BIO_NOCLOSE);
12709  */
12710 
12711 
12712 
12713 /*
12714  * These are used in the following macros and are passed to BIO_ctrl()
12715  */
12716 # 139 "/usr/include/openssl/bio.h" 3 4
12717 /* callback is int cb(BIO *bio,state,ret); */
12718 
12719 
12720 
12721 
12722 
12723 /* dgram BIO stuff */
12724 # 157 "/usr/include/openssl/bio.h" 3 4
12725 /* #ifdef IP_MTU_DISCOVER */
12726 
12727 /* #endif */
12728 # 196 "/usr/include/openssl/bio.h" 3 4
12729 /* modifiers */
12730 # 208 "/usr/include/openssl/bio.h" 3 4
12731 /*
12732  * "UPLINK" flag denotes file descriptors provided by application. It
12733  * defaults to 0, as most platforms don't require UPLINK interface.
12734  */
12735 
12736 
12737 
12738 /* Used in BIO_gethostbyname() */
12739 
12740 
12741 
12742 
12743 
12744 
12745 /* Mostly used in the SSL BIO */
12746 /*-
12747  * Not used anymore
12748  * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10
12749  * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20
12750  * #define BIO_FLAGS_PROTOCOL_STARTUP   0x40
12751  */
12752 
12753 
12754 
12755 /*
12756  * This is used with memory BIOs: it means we shouldn't free up or change the
12757  * data in any way.
12758  */
12759 
12760 
12761 typedef struct bio_st BIO;
12762 
12763 void BIO_set_flags(BIO *b, int flags);
12764 int BIO_test_flags(const BIO *b, int flags);
12765 void BIO_clear_flags(BIO *b, int flags);
12766 # 252 "/usr/include/openssl/bio.h" 3 4
12767 /* These are normally used internally in BIOs */
12768 
12769 
12770 
12771 
12772 
12773 /* These should be used by the application to tell why we should retry */
12774 
12775 
12776 
12777 
12778 
12779 
12780 /*
12781  * The next three are used in conjunction with the BIO_should_io_special()
12782  * condition.  After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
12783  * *reason); will walk the BIO stack and return the 'reason' for the special
12784  * and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
12785  * the code.
12786  */
12787 /*
12788  * Returned from the SSL bio when the certificate retrieval code had an error
12789  */
12790 
12791 /* Returned from the connect BIO when a connect would have blocked */
12792 
12793 /* Returned from the accept BIO when an accept would have blocked */
12794 
12795 
12796 /* These are passed by the BIO callback */
12797 
12798 
12799 
12800 
12801 
12802 
12803 
12804 /*
12805  * The callback is called before and after the underling operation, The
12806  * BIO_CB_RETURN flag indicates if it is after the call
12807  */
12808 
12809 
12810 
12811 
12812 
12813 long (*BIO_get_callback(const BIO *b)) (struct bio_st *, int, const char *,
12814                                         int, long, long);
12815 void BIO_set_callback(BIO *b,
12816                       long (*callback) (struct bio_st *, int, const char *,
12817                                         int, long, long));
12818 char *BIO_get_callback_arg(const BIO *b);
12819 void BIO_set_callback_arg(BIO *b, char *arg);
12820 
12821 const char *BIO_method_name(const BIO *b);
12822 int BIO_method_type(const BIO *b);
12823 
12824 typedef void bio_info_cb (struct bio_st *, int, const char *, int, long,
12825                           long);
12826 
12827 typedef struct bio_method_st {
12828     int type;
12829     const char *name;
12830     int (*bwrite) (BIO *, const char *, int);
12831     int (*bread) (BIO *, char *, int);
12832     int (*bputs) (BIO *, const char *);
12833     int (*bgets) (BIO *, char *, int);
12834     long (*ctrl) (BIO *, int, long, void *);
12835     int (*create) (BIO *);
12836     int (*destroy) (BIO *);
12837     long (*callback_ctrl) (BIO *, int, bio_info_cb *);
12838 } BIO_METHOD;
12839 
12840 struct bio_st {
12841     BIO_METHOD *method;
12842     /* bio, mode, argp, argi, argl, ret */
12843     long (*callback) (struct bio_st *, int, const char *, int, long, long);
12844     char *cb_arg; /* first argument for the callback */
12845     int init;
12846     int shutdown;
12847     int flags; /* extra storage */
12848     int retry_reason;
12849     int num;
12850     void *ptr;
12851     struct bio_st *next_bio; /* used by filter BIOs */
12852     struct bio_st *prev_bio; /* used by filter BIOs */
12853     int references;
12854     unsigned long num_read;
12855     unsigned long num_write;
12856     CRYPTO_EX_DATA ex_data;
12857 };
12858 
12859 struct stack_st_BIO { _STACK stack; };
12860 
12861 typedef struct bio_f_buffer_ctx_struct {
12862     /*-
12863      * Buffers are setup like this:
12864      *
12865      * <---------------------- size ----------------------->
12866      * +---------------------------------------------------+
12867      * | consumed | remaining          | free space        |
12868      * +---------------------------------------------------+
12869      * <-- off --><------- len ------->
12870      */
12871     /*- BIO *bio; *//*
12872      * this is now in the BIO struct
12873      */
12874     int ibuf_size; /* how big is the input buffer */
12875     int obuf_size; /* how big is the output buffer */
12876     char *ibuf; /* the char array */
12877     int ibuf_len; /* how many bytes are in it */
12878     int ibuf_off; /* write/read offset */
12879     char *obuf; /* the char array */
12880     int obuf_len; /* how many bytes are in it */
12881     int obuf_off; /* write/read offset */
12882 } BIO_F_BUFFER_CTX;
12883 
12884 /* Prefix and suffix callback in ASN1 BIO */
12885 typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
12886                           void *parg);
12887 # 398 "/usr/include/openssl/bio.h" 3 4
12888 /* connect BIO stuff */
12889 # 407 "/usr/include/openssl/bio.h" 3 4
12890 /*
12891  * #define BIO_CONN_get_param_hostname BIO_ctrl
12892  */
12893 # 474 "/usr/include/openssl/bio.h" 3 4
12894 /* BIO_s_connect() and BIO_s_socks4a_connect() */
12895 # 486 "/usr/include/openssl/bio.h" 3 4
12896 /* BIO_s_accept() */
12897 
12898 
12899 /* #define BIO_set_nbio(b,n)    BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
12900 # 499 "/usr/include/openssl/bio.h" 3 4
12901 /* BIO_s_accept() and BIO_s_connect() */
12902 
12903 
12904 
12905 
12906 /* BIO_s_proxy_client() */
12907 
12908 
12909 /* BIO_set_nbio(b,n) */
12910 
12911 /* BIO *BIO_get_filter_bio(BIO *bio); */
12912 # 519 "/usr/include/openssl/bio.h" 3 4
12913 /* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
12914 
12915 
12916 
12917 /* BIO_s_file() */
12918 
12919 
12920 
12921 /* BIO_s_fd() and BIO_s_file() */
12922 
12923 
12924 
12925 /*
12926  * name is cast to lose const, but might be better to route through a
12927  * function so we can do it safely
12928  */
12929 # 552 "/usr/include/openssl/bio.h" 3 4
12930 /*
12931  * WARNING WARNING, this ups the reference count on the read bio of the SSL
12932  * structure.  This is because the ssl read BIO is now pointed to by the
12933  * next_bio field in the bio.  So when you free the BIO, make sure you are
12934  * doing a BIO_free_all() to catch the underlying BIO.
12935  */
12936 # 568 "/usr/include/openssl/bio.h" 3 4
12937 /* defined in evp.h */
12938 /* #define BIO_set_md(b,md)     BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */
12939 
12940 
12941 
12942 
12943 
12944 
12945 
12946 /* For the BIO_f_buffer() type */
12947 
12948 
12949 
12950 
12951 
12952 
12953 /* Don't use the next one unless you know what you are doing :-) */
12954 # 593 "/usr/include/openssl/bio.h" 3 4
12955 /* ...pending macros have inappropriate return type */
12956 size_t BIO_ctrl_pending(BIO *b);
12957 size_t BIO_ctrl_wpending(BIO *b);
12958 
12959 
12960 
12961 
12962 
12963 /* For the BIO_f_buffer() type */
12964 
12965 
12966 /* For BIO_s_bio() */
12967 
12968 
12969 
12970 
12971 
12972 /* macros with inappropriate type -- but ...pending macros use int too: */
12973 
12974 
12975 size_t BIO_ctrl_get_write_guarantee(BIO *b);
12976 size_t BIO_ctrl_get_read_request(BIO *b);
12977 int BIO_ctrl_reset_read_request(BIO *b);
12978 
12979 /* ctrl macros for dgram */
12980 # 633 "/usr/include/openssl/bio.h" 3 4
12981 /* These two aren't currently implemented */
12982 /* int BIO_get_ex_num(BIO *bio); */
12983 /* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */
12984 int BIO_set_ex_data(BIO *bio, int idx, void *data);
12985 void *BIO_get_ex_data(BIO *bio, int idx);
12986 int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
12987                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
12988 unsigned long BIO_number_read(BIO *bio);
12989 unsigned long BIO_number_written(BIO *bio);
12990 
12991 /* For BIO_f_asn1() */
12992 int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
12993                         asn1_ps_func *prefix_free);
12994 int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
12995                         asn1_ps_func **pprefix_free);
12996 int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
12997                         asn1_ps_func *suffix_free);
12998 int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
12999                         asn1_ps_func **psuffix_free);
13000 
13001 
13002 BIO_METHOD *BIO_s_file(void);
13003 BIO *BIO_new_file(const char *filename, const char *mode);
13004 BIO *BIO_new_fp(FILE *stream, int close_flag);
13005 
13006 
13007 BIO *BIO_new(BIO_METHOD *type);
13008 int BIO_set(BIO *a, BIO_METHOD *type);
13009 int BIO_free(BIO *a);
13010 void BIO_vfree(BIO *a);
13011 int BIO_read(BIO *b, void *data, int len);
13012 int BIO_gets(BIO *bp, char *buf, int size);
13013 int BIO_write(BIO *b, const void *data, int len);
13014 int BIO_puts(BIO *bp, const char *buf);
13015 int BIO_indent(BIO *b, int indent, int max);
13016 long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
13017 long BIO_callback_ctrl(BIO *b, int cmd,
13018                        void (*fp) (struct bio_st *, int, const char *, int,
13019                                    long, long));
13020 char *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
13021 long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
13022 BIO *BIO_push(BIO *b, BIO *append);
13023 BIO *BIO_pop(BIO *b);
13024 void BIO_free_all(BIO *a);
13025 BIO *BIO_find_type(BIO *b, int bio_type);
13026 BIO *BIO_next(BIO *b);
13027 BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
13028 int BIO_get_retry_reason(BIO *bio);
13029 BIO *BIO_dup_chain(BIO *in);
13030 
13031 int BIO_nread0(BIO *bio, char **buf);
13032 int BIO_nread(BIO *bio, char **buf, int num);
13033 int BIO_nwrite0(BIO *bio, char **buf);
13034 int BIO_nwrite(BIO *bio, char **buf, int num);
13035 
13036 long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
13037                         long argl, long ret);
13038 
13039 BIO_METHOD *BIO_s_mem(void);
13040 BIO *BIO_new_mem_buf(const void *buf, int len);
13041 BIO_METHOD *BIO_s_socket(void);
13042 BIO_METHOD *BIO_s_connect(void);
13043 BIO_METHOD *BIO_s_accept(void);
13044 BIO_METHOD *BIO_s_fd(void);
13045 
13046 BIO_METHOD *BIO_s_log(void);
13047 
13048 BIO_METHOD *BIO_s_bio(void);
13049 BIO_METHOD *BIO_s_null(void);
13050 BIO_METHOD *BIO_f_null(void);
13051 BIO_METHOD *BIO_f_buffer(void);
13052 
13053 
13054 
13055 BIO_METHOD *BIO_f_nbio_test(void);
13056 
13057 BIO_METHOD *BIO_s_datagram(void);
13058 
13059 
13060 
13061 
13062 
13063 /* BIO_METHOD *BIO_f_ber(void); */
13064 
13065 int BIO_sock_should_retry(int i);
13066 int BIO_sock_non_fatal_error(int error);
13067 int BIO_dgram_non_fatal_error(int error);
13068 
13069 int BIO_fd_should_retry(int i);
13070 int BIO_fd_non_fatal_error(int error);
13071 int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
13072                 void *u, const char *s, int len);
13073 int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
13074                        void *u, const char *s, int len, int indent);
13075 int BIO_dump(BIO *b, const char *bytes, int len);
13076 int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent);
13077 
13078 int BIO_dump_fp(FILE *fp, const char *s, int len);
13079 int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
13080 
13081 int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data,
13082                    int datalen);
13083 
13084 struct hostent *BIO_gethostbyname(const char *name);
13085 /*-
13086  * We might want a thread-safe interface too:
13087  * struct hostent *BIO_gethostbyname_r(const char *name,
13088  *     struct hostent *result, void *buffer, size_t buflen);
13089  * or something similar (caller allocates a struct hostent,
13090  * pointed to by "result", and additional buffer space for the various
13091  * substructures; if the buffer does not suffice, NULL is returned
13092  * and an appropriate error code is set).
13093  */
13094 int BIO_sock_error(int sock);
13095 int BIO_socket_ioctl(int fd, long type, void *arg);
13096 int BIO_socket_nbio(int fd, int mode);
13097 int BIO_get_port(const char *str, unsigned short *port_ptr);
13098 int BIO_get_host_ip(const char *str, unsigned char *ip);
13099 int BIO_get_accept_socket(char *host_port, int mode);
13100 int BIO_accept(int sock, char **ip_port);
13101 int BIO_sock_init(void);
13102 void BIO_sock_cleanup(void);
13103 int BIO_set_tcp_ndelay(int sock, int turn_on);
13104 
13105 BIO *BIO_new_socket(int sock, int close_flag);
13106 BIO *BIO_new_dgram(int fd, int close_flag);
13107 # 771 "/usr/include/openssl/bio.h" 3 4
13108 BIO *BIO_new_fd(int fd, int close_flag);
13109 BIO *BIO_new_connect(const char *host_port);
13110 BIO *BIO_new_accept(const char *host_port);
13111 
13112 int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
13113                      BIO **bio2, size_t writebuf2);
13114 /*
13115  * If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
13116  * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
13117  * value.
13118  */
13119 
13120 void BIO_copy_next_retry(BIO *b);
13121 
13122 /*
13123  * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
13124  */
13125 
13126 
13127 
13128 
13129 
13130 
13131 int BIO_printf(BIO *bio, const char *format, ...)
13132 __attribute__((__format__(__printf__, 2, 3)));
13133 int BIO_vprintf(BIO *bio, const char *format, va_list args)
13134 __attribute__((__format__(__printf__, 2, 0)));
13135 int BIO_snprintf(char *buf, size_t n, const char *format, ...)
13136 __attribute__((__format__(__printf__, 3, 4)));
13137 int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
13138 __attribute__((__format__(__printf__, 3, 0)));
13139 
13140 
13141 /* BEGIN ERROR CODES */
13142 /*
13143  * The following lines are auto generated by the script mkerr.pl. Any changes
13144  * made after this point may be overwritten when the script is next run.
13145  */
13146 void ERR_load_BIO_strings(void);
13147 
13148 /* Error codes for the BIO functions. */
13149 
13150 /* Function codes. */
13151 # 849 "/usr/include/openssl/bio.h" 3 4
13152 /* Reason codes. */
13153 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
13154 # 1 "/usr/include/openssl/x509.h" 1 3 4
13155 /* crypto/x509/x509.h */
13156 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
13157  * All rights reserved.
13158  *
13159  * This package is an SSL implementation written
13160  * by Eric Young (eay@cryptsoft.com).
13161  * The implementation was written so as to conform with Netscapes SSL.
13162  *
13163  * This library is free for commercial and non-commercial use as long as
13164  * the following conditions are aheared to.  The following conditions
13165  * apply to all code found in this distribution, be it the RC4, RSA,
13166  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
13167  * included with this distribution is covered by the same copyright terms
13168  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
13169  *
13170  * Copyright remains Eric Young's, and as such any Copyright notices in
13171  * the code are not to be removed.
13172  * If this package is used in a product, Eric Young should be given attribution
13173  * as the author of the parts of the library used.
13174  * This can be in the form of a textual message at program startup or
13175  * in documentation (online or textual) provided with the package.
13176  *
13177  * Redistribution and use in source and binary forms, with or without
13178  * modification, are permitted provided that the following conditions
13179  * are met:
13180  * 1. Redistributions of source code must retain the copyright
13181  *    notice, this list of conditions and the following disclaimer.
13182  * 2. Redistributions in binary form must reproduce the above copyright
13183  *    notice, this list of conditions and the following disclaimer in the
13184  *    documentation and/or other materials provided with the distribution.
13185  * 3. All advertising materials mentioning features or use of this software
13186  *    must display the following acknowledgement:
13187  *    "This product includes cryptographic software written by
13188  *     Eric Young (eay@cryptsoft.com)"
13189  *    The word 'cryptographic' can be left out if the rouines from the library
13190  *    being used are not cryptographic related :-).
13191  * 4. If you include any Windows specific code (or a derivative thereof) from
13192  *    the apps directory (application code) you must include an acknowledgement:
13193  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
13194  *
13195  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
13196  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13197  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
13198  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
13199  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
13200  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
13201  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13202  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
13203  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
13204  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
13205  * SUCH DAMAGE.
13206  *
13207  * The licence and distribution terms for any publically available version or
13208  * derivative of this code cannot be changed.  i.e. this code cannot simply be
13209  * copied and put under another distribution licence
13210  * [including the GNU Public Licence.]
13211  */
13212 /* ====================================================================
13213  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
13214  * ECDH support in OpenSSL originally developed by
13215  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
13216  */
13217 
13218 
13219 
13220 
13221 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
13222 /* e_os2.h */
13223 /* ====================================================================
13224  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
13225  *
13226  * Redistribution and use in source and binary forms, with or without
13227  * modification, are permitted provided that the following conditions
13228  * are met:
13229  *
13230  * 1. Redistributions of source code must retain the above copyright
13231  *    notice, this list of conditions and the following disclaimer.
13232  *
13233  * 2. Redistributions in binary form must reproduce the above copyright
13234  *    notice, this list of conditions and the following disclaimer in
13235  *    the documentation and/or other materials provided with the
13236  *    distribution.
13237  *
13238  * 3. All advertising materials mentioning features or use of this
13239  *    software must display the following acknowledgment:
13240  *    "This product includes software developed by the OpenSSL Project
13241  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
13242  *
13243  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
13244  *    endorse or promote products derived from this software without
13245  *    prior written permission. For written permission, please contact
13246  *    openssl-core@openssl.org.
13247  *
13248  * 5. Products derived from this software may not be called "OpenSSL"
13249  *    nor may "OpenSSL" appear in their names without prior written
13250  *    permission of the OpenSSL Project.
13251  *
13252  * 6. Redistributions of any form whatsoever must retain the following
13253  *    acknowledgment:
13254  *    "This product includes software developed by the OpenSSL Project
13255  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
13256  *
13257  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
13258  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13259  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13260  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
13261  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13262  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
13263  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
13264  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13265  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
13266  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
13267  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
13268  * OF THE POSSIBILITY OF SUCH DAMAGE.
13269  * ====================================================================
13270  *
13271  * This product includes cryptographic software written by Eric Young
13272  * (eay@cryptsoft.com).  This product includes software written by Tim
13273  * Hudson (tjh@cryptsoft.com).
13274  *
13275  */
13276 
13277 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
13278 /* opensslconf.h */
13279 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
13280 
13281 
13282 
13283 
13284 /* OpenSSL was configured with the following options: */
13285 # 108 "/usr/include/openssl/opensslconf.h" 3 4
13286 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
13287    asks for it.  This is a transient feature that is provided for those
13288    who haven't had the time to do the appropriate changes in their
13289    applications.  */
13290 # 204 "/usr/include/openssl/opensslconf.h" 3 4
13291 /* crypto/opensslconf.h.in */
13292 
13293 /* Generate 80386 code? */
13294 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
13295 # 68 "/usr/include/openssl/x509.h" 2 3 4
13296 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
13297 /* ====================================================================
13298  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
13299  *
13300  * Redistribution and use in source and binary forms, with or without
13301  * modification, are permitted provided that the following conditions
13302  * are met:
13303  *
13304  * 1. Redistributions of source code must retain the above copyright
13305  *    notice, this list of conditions and the following disclaimer.
13306  *
13307  * 2. Redistributions in binary form must reproduce the above copyright
13308  *    notice, this list of conditions and the following disclaimer in
13309  *    the documentation and/or other materials provided with the
13310  *    distribution.
13311  *
13312  * 3. All advertising materials mentioning features or use of this
13313  *    software must display the following acknowledgment:
13314  *    "This product includes software developed by the OpenSSL Project
13315  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
13316  *
13317  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
13318  *    endorse or promote products derived from this software without
13319  *    prior written permission. For written permission, please contact
13320  *    openssl-core@openssl.org.
13321  *
13322  * 5. Products derived from this software may not be called "OpenSSL"
13323  *    nor may "OpenSSL" appear in their names without prior written
13324  *    permission of the OpenSSL Project.
13325  *
13326  * 6. Redistributions of any form whatsoever must retain the following
13327  *    acknowledgment:
13328  *    "This product includes software developed by the OpenSSL Project
13329  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
13330  *
13331  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
13332  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13333  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13334  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
13335  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13336  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
13337  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
13338  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13339  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
13340  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
13341  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
13342  * OF THE POSSIBILITY OF SUCH DAMAGE.
13343  * ====================================================================
13344  *
13345  * This product includes cryptographic software written by Eric Young
13346  * (eay@cryptsoft.com).  This product includes software written by Tim
13347  * Hudson (tjh@cryptsoft.com).
13348  *
13349  */
13350 # 69 "/usr/include/openssl/x509.h" 2 3 4
13351 
13352 # 1 "/usr/include/openssl/buffer.h" 1 3 4
13353 /* crypto/buffer/buffer.h */
13354 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
13355  * All rights reserved.
13356  *
13357  * This package is an SSL implementation written
13358  * by Eric Young (eay@cryptsoft.com).
13359  * The implementation was written so as to conform with Netscapes SSL.
13360  *
13361  * This library is free for commercial and non-commercial use as long as
13362  * the following conditions are aheared to.  The following conditions
13363  * apply to all code found in this distribution, be it the RC4, RSA,
13364  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
13365  * included with this distribution is covered by the same copyright terms
13366  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
13367  *
13368  * Copyright remains Eric Young's, and as such any Copyright notices in
13369  * the code are not to be removed.
13370  * If this package is used in a product, Eric Young should be given attribution
13371  * as the author of the parts of the library used.
13372  * This can be in the form of a textual message at program startup or
13373  * in documentation (online or textual) provided with the package.
13374  *
13375  * Redistribution and use in source and binary forms, with or without
13376  * modification, are permitted provided that the following conditions
13377  * are met:
13378  * 1. Redistributions of source code must retain the copyright
13379  *    notice, this list of conditions and the following disclaimer.
13380  * 2. Redistributions in binary form must reproduce the above copyright
13381  *    notice, this list of conditions and the following disclaimer in the
13382  *    documentation and/or other materials provided with the distribution.
13383  * 3. All advertising materials mentioning features or use of this software
13384  *    must display the following acknowledgement:
13385  *    "This product includes cryptographic software written by
13386  *     Eric Young (eay@cryptsoft.com)"
13387  *    The word 'cryptographic' can be left out if the rouines from the library
13388  *    being used are not cryptographic related :-).
13389  * 4. If you include any Windows specific code (or a derivative thereof) from
13390  *    the apps directory (application code) you must include an acknowledgement:
13391  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
13392  *
13393  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
13394  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13395  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
13396  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
13397  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
13398  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
13399  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13400  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
13401  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
13402  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
13403  * SUCH DAMAGE.
13404  *
13405  * The licence and distribution terms for any publically available version or
13406  * derivative of this code cannot be changed.  i.e. this code cannot simply be
13407  * copied and put under another distribution licence
13408  * [including the GNU Public Licence.]
13409  */
13410 
13411 
13412 
13413 
13414 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
13415 /* ====================================================================
13416  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
13417  *
13418  * Redistribution and use in source and binary forms, with or without
13419  * modification, are permitted provided that the following conditions
13420  * are met:
13421  *
13422  * 1. Redistributions of source code must retain the above copyright
13423  *    notice, this list of conditions and the following disclaimer.
13424  *
13425  * 2. Redistributions in binary form must reproduce the above copyright
13426  *    notice, this list of conditions and the following disclaimer in
13427  *    the documentation and/or other materials provided with the
13428  *    distribution.
13429  *
13430  * 3. All advertising materials mentioning features or use of this
13431  *    software must display the following acknowledgment:
13432  *    "This product includes software developed by the OpenSSL Project
13433  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
13434  *
13435  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
13436  *    endorse or promote products derived from this software without
13437  *    prior written permission. For written permission, please contact
13438  *    openssl-core@openssl.org.
13439  *
13440  * 5. Products derived from this software may not be called "OpenSSL"
13441  *    nor may "OpenSSL" appear in their names without prior written
13442  *    permission of the OpenSSL Project.
13443  *
13444  * 6. Redistributions of any form whatsoever must retain the following
13445  *    acknowledgment:
13446  *    "This product includes software developed by the OpenSSL Project
13447  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
13448  *
13449  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
13450  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13451  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13452  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
13453  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13454  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
13455  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
13456  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13457  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
13458  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
13459  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
13460  * OF THE POSSIBILITY OF SUCH DAMAGE.
13461  * ====================================================================
13462  *
13463  * This product includes cryptographic software written by Eric Young
13464  * (eay@cryptsoft.com).  This product includes software written by Tim
13465  * Hudson (tjh@cryptsoft.com).
13466  *
13467  */
13468 # 63 "/usr/include/openssl/buffer.h" 2 3 4
13469 
13470 
13471 
13472 
13473 
13474 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
13475 /*
13476  * CDDL HEADER START
13477  *
13478  * The contents of this file are subject to the terms of the
13479  * Common Development and Distribution License, Version 1.0 only
13480  * (the "License").  You may not use this file except in compliance
13481  * with the License.
13482  *
13483  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13484  * or http://www.opensolaris.org/os/licensing.
13485  * See the License for the specific language governing permissions
13486  * and limitations under the License.
13487  *
13488  * When distributing Covered Code, include this CDDL HEADER in each
13489  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13490  * If applicable, add the following below this CDDL HEADER, with the
13491  * fields enclosed by brackets "[]" replaced with your own identifying
13492  * information: Portions Copyright [yyyy] [name of copyright owner]
13493  *
13494  * CDDL HEADER END
13495  */
13496 /*	Copyright (c) 1988 AT&T	*/
13497 /*	  All Rights Reserved  	*/
13498 
13499 
13500 /*
13501  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
13502  * Use is subject to license terms.
13503  */
13504 
13505 
13506 
13507 
13508 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
13509 /*
13510  * CDDL HEADER START
13511  *
13512  * The contents of this file are subject to the terms of the
13513  * Common Development and Distribution License (the "License").
13514  * You may not use this file except in compliance with the License.
13515  *
13516  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13517  * or http://www.opensolaris.org/os/licensing.
13518  * See the License for the specific language governing permissions
13519  * and limitations under the License.
13520  *
13521  *
13522  * When distributing Covered Code, include this CDDL HEADER in each
13523  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13524  * If applicable, add the following below this CDDL HEADER, with the
13525  * fields enclosed by brackets "[]" replaced with your own identifying
13526  * information: Portions Copyright [yyyy] [name of copyright owner]
13527  *
13528  * CDDL HEADER END
13529  */
13530 
13531 /*
13532  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
13533  * Use is subject to license terms.
13534  * Copyright 2016 Joyent, Inc.
13535  */
13536 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
13537 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 1 3 4
13538 /*
13539  * CDDL HEADER START
13540  *
13541  * The contents of this file are subject to the terms of the
13542  * Common Development and Distribution License, Version 1.0 only
13543  * (the "License").  You may not use this file except in compliance
13544  * with the License.
13545  *
13546  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13547  * or http://www.opensolaris.org/os/licensing.
13548  * See the License for the specific language governing permissions
13549  * and limitations under the License.
13550  *
13551  * When distributing Covered Code, include this CDDL HEADER in each
13552  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13553  * If applicable, add the following below this CDDL HEADER, with the
13554  * fields enclosed by brackets "[]" replaced with your own identifying
13555  * information: Portions Copyright [yyyy] [name of copyright owner]
13556  *
13557  * CDDL HEADER END
13558  */
13559 /*	Copyright (c) 1988 AT&T	*/
13560 /*	  All Rights Reserved  	*/
13561 
13562 
13563 /*
13564  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
13565  * Use is subject to license terms.
13566  */
13567 
13568 /*
13569  * Copyright 2014 PALO, Richard.
13570  * Copyright 2016 Joyent, Inc.
13571  */
13572 
13573 /*
13574  * An application should not include this header directly.  Instead it
13575  * should be included only through the inclusion of other Sun headers.
13576  *
13577  * The contents of this header is limited to identifiers specified in the
13578  * C Standard.  Any new identifiers specified in future amendments to the
13579  * C Standard must be placed in this header.  If these new identifiers
13580  * are required to also be in the C++ Standard "std" namespace, then for
13581  * anything other than macro definitions, corresponding "using" directives
13582  * must also be added to <stddef.h.h>.
13583  */
13584 
13585 
13586 
13587 
13588 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
13589 /*
13590  * CDDL HEADER START
13591  *
13592  * The contents of this file are subject to the terms of the
13593  * Common Development and Distribution License (the "License").
13594  * You may not use this file except in compliance with the License.
13595  *
13596  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13597  * or http://www.opensolaris.org/os/licensing.
13598  * See the License for the specific language governing permissions
13599  * and limitations under the License.
13600  *
13601  *
13602  * When distributing Covered Code, include this CDDL HEADER in each
13603  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13604  * If applicable, add the following below this CDDL HEADER, with the
13605  * fields enclosed by brackets "[]" replaced with your own identifying
13606  * information: Portions Copyright [yyyy] [name of copyright owner]
13607  *
13608  * CDDL HEADER END
13609  */
13610 
13611 /*
13612  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
13613  * Use is subject to license terms.
13614  * Copyright 2016 Joyent, Inc.
13615  */
13616 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
13617 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
13618 /*
13619  * CDDL HEADER START
13620  *
13621  * The contents of this file are subject to the terms of the
13622  * Common Development and Distribution License (the "License").
13623  * You may not use this file except in compliance with the License.
13624  *
13625  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13626  * or http://www.opensolaris.org/os/licensing.
13627  * See the License for the specific language governing permissions
13628  * and limitations under the License.
13629  *
13630  * When distributing Covered Code, include this CDDL HEADER in each
13631  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13632  * If applicable, add the following below this CDDL HEADER, with the
13633  * fields enclosed by brackets "[]" replaced with your own identifying
13634  * information: Portions Copyright [yyyy] [name of copyright owner]
13635  *
13636  * CDDL HEADER END
13637  */
13638 
13639 /*
13640  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
13641  * Copyright 2016 Joyent, Inc.
13642  *
13643  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
13644  * Use is subject to license terms.
13645  */
13646 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
13647 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1 3 4
13648 /*
13649  * This file and its contents are supplied under the terms of the
13650  * Common Development and Distribution License ("CDDL"), version 1.0.
13651  * You may only use this file in accordance with the terms of version
13652  * 1.0 of the CDDL.
13653  *
13654  * A full copy of the text of the CDDL should have accompanied this
13655  * source.  A copy of the CDDL is also available via the Internet at
13656  * http://www.illumos.org/license/CDDL.
13657  */
13658 
13659 /*
13660  * Copyright 2014-2016 PALO, Richard.
13661  */
13662 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
13663 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 3 4
13664 typedef long max_align_t;
13665 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
13666 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 1 3 4
13667 /*
13668  * This file and its contents are supplied under the terms of the
13669  * Common Development and Distribution License ("CDDL"), version 1.0.
13670  * You may only use this file in accordance with the terms of version
13671  * 1.0 of the CDDL.
13672  *
13673  * A full copy of the text of the CDDL should have accompanied this
13674  * source.  A copy of the CDDL is also available via the Internet at
13675  * http://www.illumos.org/license/CDDL.
13676  */
13677 
13678 /*
13679  * Copyright 2017 Toomas Soome <tsoome@me.com>
13680  */
13681 
13682 
13683 
13684 
13685 /*
13686  * Commonly used macros and definitions.
13687  */
13688 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 3 4
13689 /*
13690  * We must not expose container_of() to userland, but we want it
13691  * to be available for early boot and for the kernel.
13692  */
13693 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
13694 
13695 /*
13696  * Allow global visibility for symbols defined in
13697  * C++ "std" namespace in <iso/stddef_iso.h>.
13698  */
13699 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 3 4
13700 /*
13701  * wchar_t is a built-in type in standard C++ and as such is not
13702  * defined here when using standard C++. However, the GNU compiler
13703  * fixincludes utility nonetheless creates its own version of this
13704  * header for use by gcc and g++. In that version it adds a redundant
13705  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
13706  * header we need to include the following magic comment:
13707  *
13708  * we must use the C++ compiler's type
13709  *
13710  * The above comment should not be removed or changed until GNU
13711  * gcc/fixinc/inclhack.def is updated to bypass this header.
13712  */
13713 # 69 "/usr/include/openssl/buffer.h" 2 3 4
13714 
13715 
13716 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1 3 4
13717 /*
13718  * CDDL HEADER START
13719  *
13720  * The contents of this file are subject to the terms of the
13721  * Common Development and Distribution License (the "License").
13722  * You may not use this file except in compliance with the License.
13723  *
13724  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13725  * or http://www.opensolaris.org/os/licensing.
13726  * See the License for the specific language governing permissions
13727  * and limitations under the License.
13728  *
13729  * When distributing Covered Code, include this CDDL HEADER in each
13730  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13731  * If applicable, add the following below this CDDL HEADER, with the
13732  * fields enclosed by brackets "[]" replaced with your own identifying
13733  * information: Portions Copyright [yyyy] [name of copyright owner]
13734  *
13735  * CDDL HEADER END
13736  */
13737 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
13738 /*	  All Rights Reserved  	*/
13739 
13740 
13741 /*
13742  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
13743  * Use is subject to license terms.
13744  *
13745  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
13746  * Copyright 2016 Joyent, Inc.
13747  */
13748 # 72 "/usr/include/openssl/buffer.h" 2 3 4
13749 
13750 
13751 /* Already declared in ossl_typ.h */
13752 /* typedef struct buf_mem_st BUF_MEM; */
13753 
13754 struct buf_mem_st {
13755     size_t length; /* current number of bytes */
13756     char *data;
13757     size_t max; /* size of buffer */
13758 };
13759 
13760 BUF_MEM *BUF_MEM_new(void);
13761 void BUF_MEM_free(BUF_MEM *a);
13762 int BUF_MEM_grow(BUF_MEM *str, size_t len);
13763 int BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
13764 size_t BUF_strnlen(const char *str, size_t maxlen);
13765 char *BUF_strdup(const char *str);
13766 
13767 /*
13768  * Like strndup, but in addition, explicitly guarantees to never read past the
13769  * first |siz| bytes of |str|.
13770  */
13771 char *BUF_strndup(const char *str, size_t siz);
13772 
13773 void *BUF_memdup(const void *data, size_t siz);
13774 void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
13775 
13776 /* safe string functions */
13777 size_t BUF_strlcpy(char *dst, const char *src, size_t siz);
13778 size_t BUF_strlcat(char *dst, const char *src, size_t siz);
13779 
13780 /* BEGIN ERROR CODES */
13781 /*
13782  * The following lines are auto generated by the script mkerr.pl. Any changes
13783  * made after this point may be overwritten when the script is next run.
13784  */
13785 void ERR_load_BUF_strings(void);
13786 
13787 /* Error codes for the BUF functions. */
13788 
13789 /* Function codes. */
13790 
13791 
13792 
13793 
13794 
13795 
13796 
13797 /* Reason codes. */
13798 # 71 "/usr/include/openssl/x509.h" 2 3 4
13799 
13800 
13801 # 1 "/usr/include/openssl/evp.h" 1 3 4
13802 /* crypto/evp/evp.h */
13803 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
13804  * All rights reserved.
13805  *
13806  * This package is an SSL implementation written
13807  * by Eric Young (eay@cryptsoft.com).
13808  * The implementation was written so as to conform with Netscapes SSL.
13809  *
13810  * This library is free for commercial and non-commercial use as long as
13811  * the following conditions are aheared to.  The following conditions
13812  * apply to all code found in this distribution, be it the RC4, RSA,
13813  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
13814  * included with this distribution is covered by the same copyright terms
13815  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
13816  *
13817  * Copyright remains Eric Young's, and as such any Copyright notices in
13818  * the code are not to be removed.
13819  * If this package is used in a product, Eric Young should be given attribution
13820  * as the author of the parts of the library used.
13821  * This can be in the form of a textual message at program startup or
13822  * in documentation (online or textual) provided with the package.
13823  *
13824  * Redistribution and use in source and binary forms, with or without
13825  * modification, are permitted provided that the following conditions
13826  * are met:
13827  * 1. Redistributions of source code must retain the copyright
13828  *    notice, this list of conditions and the following disclaimer.
13829  * 2. Redistributions in binary form must reproduce the above copyright
13830  *    notice, this list of conditions and the following disclaimer in the
13831  *    documentation and/or other materials provided with the distribution.
13832  * 3. All advertising materials mentioning features or use of this software
13833  *    must display the following acknowledgement:
13834  *    "This product includes cryptographic software written by
13835  *     Eric Young (eay@cryptsoft.com)"
13836  *    The word 'cryptographic' can be left out if the rouines from the library
13837  *    being used are not cryptographic related :-).
13838  * 4. If you include any Windows specific code (or a derivative thereof) from
13839  *    the apps directory (application code) you must include an acknowledgement:
13840  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
13841  *
13842  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
13843  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13844  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
13845  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
13846  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
13847  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
13848  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13849  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
13850  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
13851  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
13852  * SUCH DAMAGE.
13853  *
13854  * The licence and distribution terms for any publically available version or
13855  * derivative of this code cannot be changed.  i.e. this code cannot simply be
13856  * copied and put under another distribution licence
13857  * [including the GNU Public Licence.]
13858  */
13859 # 66 "/usr/include/openssl/evp.h" 3 4
13860 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
13861 /* opensslconf.h */
13862 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
13863 
13864 
13865 
13866 
13867 /* OpenSSL was configured with the following options: */
13868 # 108 "/usr/include/openssl/opensslconf.h" 3 4
13869 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
13870    asks for it.  This is a transient feature that is provided for those
13871    who haven't had the time to do the appropriate changes in their
13872    applications.  */
13873 # 204 "/usr/include/openssl/opensslconf.h" 3 4
13874 /* crypto/opensslconf.h.in */
13875 
13876 /* Generate 80386 code? */
13877 # 67 "/usr/include/openssl/evp.h" 2 3 4
13878 
13879 
13880 
13881 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
13882 /* ====================================================================
13883  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
13884  *
13885  * Redistribution and use in source and binary forms, with or without
13886  * modification, are permitted provided that the following conditions
13887  * are met:
13888  *
13889  * 1. Redistributions of source code must retain the above copyright
13890  *    notice, this list of conditions and the following disclaimer.
13891  *
13892  * 2. Redistributions in binary form must reproduce the above copyright
13893  *    notice, this list of conditions and the following disclaimer in
13894  *    the documentation and/or other materials provided with the
13895  *    distribution.
13896  *
13897  * 3. All advertising materials mentioning features or use of this
13898  *    software must display the following acknowledgment:
13899  *    "This product includes software developed by the OpenSSL Project
13900  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
13901  *
13902  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
13903  *    endorse or promote products derived from this software without
13904  *    prior written permission. For written permission, please contact
13905  *    openssl-core@openssl.org.
13906  *
13907  * 5. Products derived from this software may not be called "OpenSSL"
13908  *    nor may "OpenSSL" appear in their names without prior written
13909  *    permission of the OpenSSL Project.
13910  *
13911  * 6. Redistributions of any form whatsoever must retain the following
13912  *    acknowledgment:
13913  *    "This product includes software developed by the OpenSSL Project
13914  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
13915  *
13916  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
13917  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13918  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13919  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
13920  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13921  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
13922  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
13923  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13924  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
13925  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
13926  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
13927  * OF THE POSSIBILITY OF SUCH DAMAGE.
13928  * ====================================================================
13929  *
13930  * This product includes cryptographic software written by Eric Young
13931  * (eay@cryptsoft.com).  This product includes software written by Tim
13932  * Hudson (tjh@cryptsoft.com).
13933  *
13934  */
13935 # 71 "/usr/include/openssl/evp.h" 2 3 4
13936 
13937 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
13938 /* ====================================================================
13939  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
13940  *
13941  * Redistribution and use in source and binary forms, with or without
13942  * modification, are permitted provided that the following conditions
13943  * are met:
13944  *
13945  * 1. Redistributions of source code must retain the above copyright
13946  *    notice, this list of conditions and the following disclaimer.
13947  *
13948  * 2. Redistributions in binary form must reproduce the above copyright
13949  *    notice, this list of conditions and the following disclaimer in
13950  *    the documentation and/or other materials provided with the
13951  *    distribution.
13952  *
13953  * 3. All advertising materials mentioning features or use of this
13954  *    software must display the following acknowledgment:
13955  *    "This product includes software developed by the OpenSSL Project
13956  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
13957  *
13958  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
13959  *    endorse or promote products derived from this software without
13960  *    prior written permission. For written permission, please contact
13961  *    openssl-core@openssl.org.
13962  *
13963  * 5. Products derived from this software may not be called "OpenSSL"
13964  *    nor may "OpenSSL" appear in their names without prior written
13965  *    permission of the OpenSSL Project.
13966  *
13967  * 6. Redistributions of any form whatsoever must retain the following
13968  *    acknowledgment:
13969  *    "This product includes software developed by the OpenSSL Project
13970  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
13971  *
13972  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
13973  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13974  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13975  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
13976  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13977  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
13978  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
13979  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13980  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
13981  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
13982  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
13983  * OF THE POSSIBILITY OF SUCH DAMAGE.
13984  * ====================================================================
13985  *
13986  * This product includes cryptographic software written by Eric Young
13987  * (eay@cryptsoft.com).  This product includes software written by Tim
13988  * Hudson (tjh@cryptsoft.com).
13989  *
13990  */
13991 # 73 "/usr/include/openssl/evp.h" 2 3 4
13992 
13993 
13994 # 1 "/usr/include/openssl/bio.h" 1 3 4
13995 /* crypto/bio/bio.h */
13996 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
13997  * All rights reserved.
13998  *
13999  * This package is an SSL implementation written
14000  * by Eric Young (eay@cryptsoft.com).
14001  * The implementation was written so as to conform with Netscapes SSL.
14002  *
14003  * This library is free for commercial and non-commercial use as long as
14004  * the following conditions are aheared to.  The following conditions
14005  * apply to all code found in this distribution, be it the RC4, RSA,
14006  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14007  * included with this distribution is covered by the same copyright terms
14008  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14009  *
14010  * Copyright remains Eric Young's, and as such any Copyright notices in
14011  * the code are not to be removed.
14012  * If this package is used in a product, Eric Young should be given attribution
14013  * as the author of the parts of the library used.
14014  * This can be in the form of a textual message at program startup or
14015  * in documentation (online or textual) provided with the package.
14016  *
14017  * Redistribution and use in source and binary forms, with or without
14018  * modification, are permitted provided that the following conditions
14019  * are met:
14020  * 1. Redistributions of source code must retain the copyright
14021  *    notice, this list of conditions and the following disclaimer.
14022  * 2. Redistributions in binary form must reproduce the above copyright
14023  *    notice, this list of conditions and the following disclaimer in the
14024  *    documentation and/or other materials provided with the distribution.
14025  * 3. All advertising materials mentioning features or use of this software
14026  *    must display the following acknowledgement:
14027  *    "This product includes cryptographic software written by
14028  *     Eric Young (eay@cryptsoft.com)"
14029  *    The word 'cryptographic' can be left out if the rouines from the library
14030  *    being used are not cryptographic related :-).
14031  * 4. If you include any Windows specific code (or a derivative thereof) from
14032  *    the apps directory (application code) you must include an acknowledgement:
14033  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14034  *
14035  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14036  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14037  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14038  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14039  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14040  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14041  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14042  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14043  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14044  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14045  * SUCH DAMAGE.
14046  *
14047  * The licence and distribution terms for any publically available version or
14048  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14049  * copied and put under another distribution licence
14050  * [including the GNU Public Licence.]
14051  */
14052 # 76 "/usr/include/openssl/evp.h" 2 3 4
14053 
14054 
14055 /*-
14056 #define EVP_RC2_KEY_SIZE                16
14057 #define EVP_RC4_KEY_SIZE                16
14058 #define EVP_BLOWFISH_KEY_SIZE           16
14059 #define EVP_CAST5_KEY_SIZE              16
14060 #define EVP_RC5_32_12_16_KEY_SIZE       16
14061 */
14062 
14063 
14064 
14065 
14066 
14067 
14068 /* Default PKCS#5 iteration count */
14069 
14070 
14071 # 1 "/usr/include/openssl/objects.h" 1 3 4
14072 /* crypto/objects/objects.h */
14073 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14074  * All rights reserved.
14075  *
14076  * This package is an SSL implementation written
14077  * by Eric Young (eay@cryptsoft.com).
14078  * The implementation was written so as to conform with Netscapes SSL.
14079  *
14080  * This library is free for commercial and non-commercial use as long as
14081  * the following conditions are aheared to.  The following conditions
14082  * apply to all code found in this distribution, be it the RC4, RSA,
14083  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14084  * included with this distribution is covered by the same copyright terms
14085  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14086  *
14087  * Copyright remains Eric Young's, and as such any Copyright notices in
14088  * the code are not to be removed.
14089  * If this package is used in a product, Eric Young should be given attribution
14090  * as the author of the parts of the library used.
14091  * This can be in the form of a textual message at program startup or
14092  * in documentation (online or textual) provided with the package.
14093  *
14094  * Redistribution and use in source and binary forms, with or without
14095  * modification, are permitted provided that the following conditions
14096  * are met:
14097  * 1. Redistributions of source code must retain the copyright
14098  *    notice, this list of conditions and the following disclaimer.
14099  * 2. Redistributions in binary form must reproduce the above copyright
14100  *    notice, this list of conditions and the following disclaimer in the
14101  *    documentation and/or other materials provided with the distribution.
14102  * 3. All advertising materials mentioning features or use of this software
14103  *    must display the following acknowledgement:
14104  *    "This product includes cryptographic software written by
14105  *     Eric Young (eay@cryptsoft.com)"
14106  *    The word 'cryptographic' can be left out if the rouines from the library
14107  *    being used are not cryptographic related :-).
14108  * 4. If you include any Windows specific code (or a derivative thereof) from
14109  *    the apps directory (application code) you must include an acknowledgement:
14110  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14111  *
14112  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14113  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14114  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14115  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14116  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14117  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14118  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14119  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14120  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14121  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14122  * SUCH DAMAGE.
14123  *
14124  * The licence and distribution terms for any publically available version or
14125  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14126  * copied and put under another distribution licence
14127  * [including the GNU Public Licence.]
14128  */
14129 
14130 
14131 
14132 
14133 
14134 
14135 
14136 # 1 "/usr/include/openssl/obj_mac.h" 1 3 4
14137 /* crypto/objects/obj_mac.h */
14138 
14139 /*
14140  * THIS FILE IS GENERATED FROM objects.txt by objects.pl via the following
14141  * command: perl objects.pl objects.txt obj_mac.num obj_mac.h
14142  */
14143 
14144 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
14145  * All rights reserved.
14146  *
14147  * This package is an SSL implementation written
14148  * by Eric Young (eay@cryptsoft.com).
14149  * The implementation was written so as to conform with Netscapes SSL.
14150  *
14151  * This library is free for commercial and non-commercial use as long as
14152  * the following conditions are aheared to.  The following conditions
14153  * apply to all code found in this distribution, be it the RC4, RSA,
14154  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14155  * included with this distribution is covered by the same copyright terms
14156  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14157  *
14158  * Copyright remains Eric Young's, and as such any Copyright notices in
14159  * the code are not to be removed.
14160  * If this package is used in a product, Eric Young should be given attribution
14161  * as the author of the parts of the library used.
14162  * This can be in the form of a textual message at program startup or
14163  * in documentation (online or textual) provided with the package.
14164  *
14165  * Redistribution and use in source and binary forms, with or without
14166  * modification, are permitted provided that the following conditions
14167  * are met:
14168  * 1. Redistributions of source code must retain the copyright
14169  *    notice, this list of conditions and the following disclaimer.
14170  * 2. Redistributions in binary form must reproduce the above copyright
14171  *    notice, this list of conditions and the following disclaimer in the
14172  *    documentation and/or other materials provided with the distribution.
14173  * 3. All advertising materials mentioning features or use of this software
14174  *    must display the following acknowledgement:
14175  *    "This product includes cryptographic software written by
14176  *     Eric Young (eay@cryptsoft.com)"
14177  *    The word 'cryptographic' can be left out if the rouines from the library
14178  *    being used are not cryptographic related :-).
14179  * 4. If you include any Windows specific code (or a derivative thereof) from
14180  *    the apps directory (application code) you must include an acknowledgement:
14181  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14182  *
14183  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14184  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14185  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14186  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14187  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14188  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14189  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14190  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14191  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14192  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14193  * SUCH DAMAGE.
14194  *
14195  * The licence and distribution terms for any publically available version or
14196  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14197  * copied and put under another distribution licence
14198  * [including the GNU Public Licence.]
14199  */
14200 # 66 "/usr/include/openssl/objects.h" 2 3 4
14201 # 964 "/usr/include/openssl/objects.h" 3 4
14202 # 1 "/usr/include/openssl/bio.h" 1 3 4
14203 /* crypto/bio/bio.h */
14204 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14205  * All rights reserved.
14206  *
14207  * This package is an SSL implementation written
14208  * by Eric Young (eay@cryptsoft.com).
14209  * The implementation was written so as to conform with Netscapes SSL.
14210  *
14211  * This library is free for commercial and non-commercial use as long as
14212  * the following conditions are aheared to.  The following conditions
14213  * apply to all code found in this distribution, be it the RC4, RSA,
14214  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14215  * included with this distribution is covered by the same copyright terms
14216  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14217  *
14218  * Copyright remains Eric Young's, and as such any Copyright notices in
14219  * the code are not to be removed.
14220  * If this package is used in a product, Eric Young should be given attribution
14221  * as the author of the parts of the library used.
14222  * This can be in the form of a textual message at program startup or
14223  * in documentation (online or textual) provided with the package.
14224  *
14225  * Redistribution and use in source and binary forms, with or without
14226  * modification, are permitted provided that the following conditions
14227  * are met:
14228  * 1. Redistributions of source code must retain the copyright
14229  *    notice, this list of conditions and the following disclaimer.
14230  * 2. Redistributions in binary form must reproduce the above copyright
14231  *    notice, this list of conditions and the following disclaimer in the
14232  *    documentation and/or other materials provided with the distribution.
14233  * 3. All advertising materials mentioning features or use of this software
14234  *    must display the following acknowledgement:
14235  *    "This product includes cryptographic software written by
14236  *     Eric Young (eay@cryptsoft.com)"
14237  *    The word 'cryptographic' can be left out if the rouines from the library
14238  *    being used are not cryptographic related :-).
14239  * 4. If you include any Windows specific code (or a derivative thereof) from
14240  *    the apps directory (application code) you must include an acknowledgement:
14241  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14242  *
14243  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14244  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14245  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14246  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14247  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14248  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14249  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14250  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14251  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14252  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14253  * SUCH DAMAGE.
14254  *
14255  * The licence and distribution terms for any publically available version or
14256  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14257  * copied and put under another distribution licence
14258  * [including the GNU Public Licence.]
14259  */
14260 # 965 "/usr/include/openssl/objects.h" 2 3 4
14261 # 1 "/usr/include/openssl/asn1.h" 1 3 4
14262 /* crypto/asn1/asn1.h */
14263 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14264  * All rights reserved.
14265  *
14266  * This package is an SSL implementation written
14267  * by Eric Young (eay@cryptsoft.com).
14268  * The implementation was written so as to conform with Netscapes SSL.
14269  *
14270  * This library is free for commercial and non-commercial use as long as
14271  * the following conditions are aheared to.  The following conditions
14272  * apply to all code found in this distribution, be it the RC4, RSA,
14273  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14274  * included with this distribution is covered by the same copyright terms
14275  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14276  *
14277  * Copyright remains Eric Young's, and as such any Copyright notices in
14278  * the code are not to be removed.
14279  * If this package is used in a product, Eric Young should be given attribution
14280  * as the author of the parts of the library used.
14281  * This can be in the form of a textual message at program startup or
14282  * in documentation (online or textual) provided with the package.
14283  *
14284  * Redistribution and use in source and binary forms, with or without
14285  * modification, are permitted provided that the following conditions
14286  * are met:
14287  * 1. Redistributions of source code must retain the copyright
14288  *    notice, this list of conditions and the following disclaimer.
14289  * 2. Redistributions in binary form must reproduce the above copyright
14290  *    notice, this list of conditions and the following disclaimer in the
14291  *    documentation and/or other materials provided with the distribution.
14292  * 3. All advertising materials mentioning features or use of this software
14293  *    must display the following acknowledgement:
14294  *    "This product includes cryptographic software written by
14295  *     Eric Young (eay@cryptsoft.com)"
14296  *    The word 'cryptographic' can be left out if the rouines from the library
14297  *    being used are not cryptographic related :-).
14298  * 4. If you include any Windows specific code (or a derivative thereof) from
14299  *    the apps directory (application code) you must include an acknowledgement:
14300  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14301  *
14302  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14303  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14304  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14305  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14306  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14307  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14308  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14309  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14310  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14311  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14312  * SUCH DAMAGE.
14313  *
14314  * The licence and distribution terms for any publically available version or
14315  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14316  * copied and put under another distribution licence
14317  * [including the GNU Public Licence.]
14318  */
14319 
14320 
14321 
14322 
14323 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1 3 4
14324 /*
14325  * CDDL HEADER START
14326  *
14327  * The contents of this file are subject to the terms of the
14328  * Common Development and Distribution License (the "License").
14329  * You may not use this file except in compliance with the License.
14330  *
14331  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14332  * or http://www.opensolaris.org/os/licensing.
14333  * See the License for the specific language governing permissions
14334  * and limitations under the License.
14335  *
14336  * When distributing Covered Code, include this CDDL HEADER in each
14337  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14338  * If applicable, add the following below this CDDL HEADER, with the
14339  * fields enclosed by brackets "[]" replaced with your own identifying
14340  * information: Portions Copyright [yyyy] [name of copyright owner]
14341  *
14342  * CDDL HEADER END
14343  */
14344 /*	Copyright (c) 1988 AT&T	*/
14345 /*	  All Rights Reserved  	*/
14346 
14347 
14348 /*
14349  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
14350  *
14351  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
14352  * Use is subject to license terms.
14353  */
14354 /*
14355  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
14356  * Copyright 2016 Joyent, Inc.
14357  */
14358 # 63 "/usr/include/openssl/asn1.h" 2 3 4
14359 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
14360 /* e_os2.h */
14361 /* ====================================================================
14362  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
14363  *
14364  * Redistribution and use in source and binary forms, with or without
14365  * modification, are permitted provided that the following conditions
14366  * are met:
14367  *
14368  * 1. Redistributions of source code must retain the above copyright
14369  *    notice, this list of conditions and the following disclaimer.
14370  *
14371  * 2. Redistributions in binary form must reproduce the above copyright
14372  *    notice, this list of conditions and the following disclaimer in
14373  *    the documentation and/or other materials provided with the
14374  *    distribution.
14375  *
14376  * 3. All advertising materials mentioning features or use of this
14377  *    software must display the following acknowledgment:
14378  *    "This product includes software developed by the OpenSSL Project
14379  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14380  *
14381  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14382  *    endorse or promote products derived from this software without
14383  *    prior written permission. For written permission, please contact
14384  *    openssl-core@openssl.org.
14385  *
14386  * 5. Products derived from this software may not be called "OpenSSL"
14387  *    nor may "OpenSSL" appear in their names without prior written
14388  *    permission of the OpenSSL Project.
14389  *
14390  * 6. Redistributions of any form whatsoever must retain the following
14391  *    acknowledgment:
14392  *    "This product includes software developed by the OpenSSL Project
14393  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14394  *
14395  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14396  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14397  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14398  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14399  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14400  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14401  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14402  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14403  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14404  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14405  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14406  * OF THE POSSIBILITY OF SUCH DAMAGE.
14407  * ====================================================================
14408  *
14409  * This product includes cryptographic software written by Eric Young
14410  * (eay@cryptsoft.com).  This product includes software written by Tim
14411  * Hudson (tjh@cryptsoft.com).
14412  *
14413  */
14414 
14415 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
14416 /* opensslconf.h */
14417 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
14418 
14419 
14420 
14421 
14422 /* OpenSSL was configured with the following options: */
14423 # 108 "/usr/include/openssl/opensslconf.h" 3 4
14424 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
14425    asks for it.  This is a transient feature that is provided for those
14426    who haven't had the time to do the appropriate changes in their
14427    applications.  */
14428 # 204 "/usr/include/openssl/opensslconf.h" 3 4
14429 /* crypto/opensslconf.h.in */
14430 
14431 /* Generate 80386 code? */
14432 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
14433 # 64 "/usr/include/openssl/asn1.h" 2 3 4
14434 
14435 # 1 "/usr/include/openssl/bio.h" 1 3 4
14436 /* crypto/bio/bio.h */
14437 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14438  * All rights reserved.
14439  *
14440  * This package is an SSL implementation written
14441  * by Eric Young (eay@cryptsoft.com).
14442  * The implementation was written so as to conform with Netscapes SSL.
14443  *
14444  * This library is free for commercial and non-commercial use as long as
14445  * the following conditions are aheared to.  The following conditions
14446  * apply to all code found in this distribution, be it the RC4, RSA,
14447  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14448  * included with this distribution is covered by the same copyright terms
14449  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14450  *
14451  * Copyright remains Eric Young's, and as such any Copyright notices in
14452  * the code are not to be removed.
14453  * If this package is used in a product, Eric Young should be given attribution
14454  * as the author of the parts of the library used.
14455  * This can be in the form of a textual message at program startup or
14456  * in documentation (online or textual) provided with the package.
14457  *
14458  * Redistribution and use in source and binary forms, with or without
14459  * modification, are permitted provided that the following conditions
14460  * are met:
14461  * 1. Redistributions of source code must retain the copyright
14462  *    notice, this list of conditions and the following disclaimer.
14463  * 2. Redistributions in binary form must reproduce the above copyright
14464  *    notice, this list of conditions and the following disclaimer in the
14465  *    documentation and/or other materials provided with the distribution.
14466  * 3. All advertising materials mentioning features or use of this software
14467  *    must display the following acknowledgement:
14468  *    "This product includes cryptographic software written by
14469  *     Eric Young (eay@cryptsoft.com)"
14470  *    The word 'cryptographic' can be left out if the rouines from the library
14471  *    being used are not cryptographic related :-).
14472  * 4. If you include any Windows specific code (or a derivative thereof) from
14473  *    the apps directory (application code) you must include an acknowledgement:
14474  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14475  *
14476  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14477  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14478  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14479  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14480  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14481  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14482  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14483  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14484  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14485  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14486  * SUCH DAMAGE.
14487  *
14488  * The licence and distribution terms for any publically available version or
14489  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14490  * copied and put under another distribution licence
14491  * [including the GNU Public Licence.]
14492  */
14493 # 66 "/usr/include/openssl/asn1.h" 2 3 4
14494 
14495 # 1 "/usr/include/openssl/stack.h" 1 3 4
14496 /* crypto/stack/stack.h */
14497 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14498  * All rights reserved.
14499  *
14500  * This package is an SSL implementation written
14501  * by Eric Young (eay@cryptsoft.com).
14502  * The implementation was written so as to conform with Netscapes SSL.
14503  *
14504  * This library is free for commercial and non-commercial use as long as
14505  * the following conditions are aheared to.  The following conditions
14506  * apply to all code found in this distribution, be it the RC4, RSA,
14507  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14508  * included with this distribution is covered by the same copyright terms
14509  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14510  *
14511  * Copyright remains Eric Young's, and as such any Copyright notices in
14512  * the code are not to be removed.
14513  * If this package is used in a product, Eric Young should be given attribution
14514  * as the author of the parts of the library used.
14515  * This can be in the form of a textual message at program startup or
14516  * in documentation (online or textual) provided with the package.
14517  *
14518  * Redistribution and use in source and binary forms, with or without
14519  * modification, are permitted provided that the following conditions
14520  * are met:
14521  * 1. Redistributions of source code must retain the copyright
14522  *    notice, this list of conditions and the following disclaimer.
14523  * 2. Redistributions in binary form must reproduce the above copyright
14524  *    notice, this list of conditions and the following disclaimer in the
14525  *    documentation and/or other materials provided with the distribution.
14526  * 3. All advertising materials mentioning features or use of this software
14527  *    must display the following acknowledgement:
14528  *    "This product includes cryptographic software written by
14529  *     Eric Young (eay@cryptsoft.com)"
14530  *    The word 'cryptographic' can be left out if the rouines from the library
14531  *    being used are not cryptographic related :-).
14532  * 4. If you include any Windows specific code (or a derivative thereof) from
14533  *    the apps directory (application code) you must include an acknowledgement:
14534  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14535  *
14536  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14537  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14538  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14539  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14540  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14541  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14542  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14543  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14544  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14545  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14546  * SUCH DAMAGE.
14547  *
14548  * The licence and distribution terms for any publically available version or
14549  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14550  * copied and put under another distribution licence
14551  * [including the GNU Public Licence.]
14552  */
14553 # 68 "/usr/include/openssl/asn1.h" 2 3 4
14554 # 1 "/usr/include/openssl/safestack.h" 1 3 4
14555 /* ====================================================================
14556  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
14557  *
14558  * Redistribution and use in source and binary forms, with or without
14559  * modification, are permitted provided that the following conditions
14560  * are met:
14561  *
14562  * 1. Redistributions of source code must retain the above copyright
14563  *    notice, this list of conditions and the following disclaimer.
14564  *
14565  * 2. Redistributions in binary form must reproduce the above copyright
14566  *    notice, this list of conditions and the following disclaimer in
14567  *    the documentation and/or other materials provided with the
14568  *    distribution.
14569  *
14570  * 3. All advertising materials mentioning features or use of this
14571  *    software must display the following acknowledgment:
14572  *    "This product includes software developed by the OpenSSL Project
14573  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14574  *
14575  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14576  *    endorse or promote products derived from this software without
14577  *    prior written permission. For written permission, please contact
14578  *    openssl-core@openssl.org.
14579  *
14580  * 5. Products derived from this software may not be called "OpenSSL"
14581  *    nor may "OpenSSL" appear in their names without prior written
14582  *    permission of the OpenSSL Project.
14583  *
14584  * 6. Redistributions of any form whatsoever must retain the following
14585  *    acknowledgment:
14586  *    "This product includes software developed by the OpenSSL Project
14587  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14588  *
14589  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14590  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14591  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14592  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14593  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14594  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14595  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14596  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14597  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14598  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14599  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14600  * OF THE POSSIBILITY OF SUCH DAMAGE.
14601  * ====================================================================
14602  *
14603  * This product includes cryptographic software written by Eric Young
14604  * (eay@cryptsoft.com).  This product includes software written by Tim
14605  * Hudson (tjh@cryptsoft.com).
14606  *
14607  */
14608 # 69 "/usr/include/openssl/asn1.h" 2 3 4
14609 
14610 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
14611 /* ====================================================================
14612  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
14613  *
14614  * Redistribution and use in source and binary forms, with or without
14615  * modification, are permitted provided that the following conditions
14616  * are met:
14617  *
14618  * 1. Redistributions of source code must retain the above copyright
14619  *    notice, this list of conditions and the following disclaimer.
14620  *
14621  * 2. Redistributions in binary form must reproduce the above copyright
14622  *    notice, this list of conditions and the following disclaimer in
14623  *    the documentation and/or other materials provided with the
14624  *    distribution.
14625  *
14626  * 3. All advertising materials mentioning features or use of this
14627  *    software must display the following acknowledgment:
14628  *    "This product includes software developed by the OpenSSL Project
14629  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14630  *
14631  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14632  *    endorse or promote products derived from this software without
14633  *    prior written permission. For written permission, please contact
14634  *    openssl-core@openssl.org.
14635  *
14636  * 5. Products derived from this software may not be called "OpenSSL"
14637  *    nor may "OpenSSL" appear in their names without prior written
14638  *    permission of the OpenSSL Project.
14639  *
14640  * 6. Redistributions of any form whatsoever must retain the following
14641  *    acknowledgment:
14642  *    "This product includes software developed by the OpenSSL Project
14643  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14644  *
14645  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14646  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14647  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14648  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14649  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14650  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14651  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14652  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14653  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14654  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14655  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14656  * OF THE POSSIBILITY OF SUCH DAMAGE.
14657  * ====================================================================
14658  *
14659  * This product includes cryptographic software written by Eric Young
14660  * (eay@cryptsoft.com).  This product includes software written by Tim
14661  * Hudson (tjh@cryptsoft.com).
14662  *
14663  */
14664 # 71 "/usr/include/openssl/asn1.h" 2 3 4
14665 
14666 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
14667 /* ====================================================================
14668  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
14669  *
14670  * Redistribution and use in source and binary forms, with or without
14671  * modification, are permitted provided that the following conditions
14672  * are met:
14673  *
14674  * 1. Redistributions of source code must retain the above copyright
14675  *    notice, this list of conditions and the following disclaimer.
14676  *
14677  * 2. Redistributions in binary form must reproduce the above copyright
14678  *    notice, this list of conditions and the following disclaimer in
14679  *    the documentation and/or other materials provided with the
14680  *    distribution.
14681  *
14682  * 3. All advertising materials mentioning features or use of this
14683  *    software must display the following acknowledgment:
14684  *    "This product includes software developed by the OpenSSL Project
14685  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14686  *
14687  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14688  *    endorse or promote products derived from this software without
14689  *    prior written permission. For written permission, please contact
14690  *    openssl-core@openssl.org.
14691  *
14692  * 5. Products derived from this software may not be called "OpenSSL"
14693  *    nor may "OpenSSL" appear in their names without prior written
14694  *    permission of the OpenSSL Project.
14695  *
14696  * 6. Redistributions of any form whatsoever must retain the following
14697  *    acknowledgment:
14698  *    "This product includes software developed by the OpenSSL Project
14699  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14700  *
14701  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14702  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14703  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14704  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14705  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14706  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14707  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14708  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14709  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14710  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14711  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14712  * OF THE POSSIBILITY OF SUCH DAMAGE.
14713  * ====================================================================
14714  *
14715  * This product includes cryptographic software written by Eric Young
14716  * (eay@cryptsoft.com).  This product includes software written by Tim
14717  * Hudson (tjh@cryptsoft.com).
14718  *
14719  */
14720 # 73 "/usr/include/openssl/asn1.h" 2 3 4
14721 
14722 # 1 "/usr/include/openssl/bn.h" 1 3 4
14723 /* crypto/bn/bn.h */
14724 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
14725  * All rights reserved.
14726  *
14727  * This package is an SSL implementation written
14728  * by Eric Young (eay@cryptsoft.com).
14729  * The implementation was written so as to conform with Netscapes SSL.
14730  *
14731  * This library is free for commercial and non-commercial use as long as
14732  * the following conditions are aheared to.  The following conditions
14733  * apply to all code found in this distribution, be it the RC4, RSA,
14734  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14735  * included with this distribution is covered by the same copyright terms
14736  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14737  *
14738  * Copyright remains Eric Young's, and as such any Copyright notices in
14739  * the code are not to be removed.
14740  * If this package is used in a product, Eric Young should be given attribution
14741  * as the author of the parts of the library used.
14742  * This can be in the form of a textual message at program startup or
14743  * in documentation (online or textual) provided with the package.
14744  *
14745  * Redistribution and use in source and binary forms, with or without
14746  * modification, are permitted provided that the following conditions
14747  * are met:
14748  * 1. Redistributions of source code must retain the copyright
14749  *    notice, this list of conditions and the following disclaimer.
14750  * 2. Redistributions in binary form must reproduce the above copyright
14751  *    notice, this list of conditions and the following disclaimer in the
14752  *    documentation and/or other materials provided with the distribution.
14753  * 3. All advertising materials mentioning features or use of this software
14754  *    must display the following acknowledgement:
14755  *    "This product includes cryptographic software written by
14756  *     Eric Young (eay@cryptsoft.com)"
14757  *    The word 'cryptographic' can be left out if the rouines from the library
14758  *    being used are not cryptographic related :-).
14759  * 4. If you include any Windows specific code (or a derivative thereof) from
14760  *    the apps directory (application code) you must include an acknowledgement:
14761  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14762  *
14763  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14764  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14765  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14766  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14767  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14768  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14769  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14770  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14771  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14772  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14773  * SUCH DAMAGE.
14774  *
14775  * The licence and distribution terms for any publically available version or
14776  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14777  * copied and put under another distribution licence
14778  * [including the GNU Public Licence.]
14779  */
14780 /* ====================================================================
14781  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
14782  *
14783  * Redistribution and use in source and binary forms, with or without
14784  * modification, are permitted provided that the following conditions
14785  * are met:
14786  *
14787  * 1. Redistributions of source code must retain the above copyright
14788  *    notice, this list of conditions and the following disclaimer.
14789  *
14790  * 2. Redistributions in binary form must reproduce the above copyright
14791  *    notice, this list of conditions and the following disclaimer in
14792  *    the documentation and/or other materials provided with the
14793  *    distribution.
14794  *
14795  * 3. All advertising materials mentioning features or use of this
14796  *    software must display the following acknowledgment:
14797  *    "This product includes software developed by the OpenSSL Project
14798  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14799  *
14800  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14801  *    endorse or promote products derived from this software without
14802  *    prior written permission. For written permission, please contact
14803  *    openssl-core@openssl.org.
14804  *
14805  * 5. Products derived from this software may not be called "OpenSSL"
14806  *    nor may "OpenSSL" appear in their names without prior written
14807  *    permission of the OpenSSL Project.
14808  *
14809  * 6. Redistributions of any form whatsoever must retain the following
14810  *    acknowledgment:
14811  *    "This product includes software developed by the OpenSSL Project
14812  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14813  *
14814  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14815  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14816  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14817  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14818  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14819  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14820  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14821  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14822  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14823  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14824  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14825  * OF THE POSSIBILITY OF SUCH DAMAGE.
14826  * ====================================================================
14827  *
14828  * This product includes cryptographic software written by Eric Young
14829  * (eay@cryptsoft.com).  This product includes software written by Tim
14830  * Hudson (tjh@cryptsoft.com).
14831  *
14832  */
14833 /* ====================================================================
14834  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
14835  *
14836  * Portions of the attached software ("Contribution") are developed by
14837  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
14838  *
14839  * The Contribution is licensed pursuant to the Eric Young open source
14840  * license provided above.
14841  *
14842  * The binary polynomial arithmetic software is originally written by
14843  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
14844  *
14845  */
14846 
14847 
14848 
14849 
14850 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1 3 4
14851 /*
14852  * CDDL HEADER START
14853  *
14854  * The contents of this file are subject to the terms of the
14855  * Common Development and Distribution License (the "License").
14856  * You may not use this file except in compliance with the License.
14857  *
14858  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14859  * or http://www.opensolaris.org/os/licensing.
14860  * See the License for the specific language governing permissions
14861  * and limitations under the License.
14862  *
14863  * When distributing Covered Code, include this CDDL HEADER in each
14864  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14865  * If applicable, add the following below this CDDL HEADER, with the
14866  * fields enclosed by brackets "[]" replaced with your own identifying
14867  * information: Portions Copyright [yyyy] [name of copyright owner]
14868  *
14869  * CDDL HEADER END
14870  */
14871 
14872 /*
14873  * Copyright (c) 2013 Gary Mills
14874  *
14875  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
14876  * Use is subject to license terms.
14877  */
14878 
14879 /*	Copyright (c) 1988 AT&T	*/
14880 /*	  All Rights Reserved  	*/
14881 # 129 "/usr/include/openssl/bn.h" 2 3 4
14882 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
14883 /* e_os2.h */
14884 /* ====================================================================
14885  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
14886  *
14887  * Redistribution and use in source and binary forms, with or without
14888  * modification, are permitted provided that the following conditions
14889  * are met:
14890  *
14891  * 1. Redistributions of source code must retain the above copyright
14892  *    notice, this list of conditions and the following disclaimer.
14893  *
14894  * 2. Redistributions in binary form must reproduce the above copyright
14895  *    notice, this list of conditions and the following disclaimer in
14896  *    the documentation and/or other materials provided with the
14897  *    distribution.
14898  *
14899  * 3. All advertising materials mentioning features or use of this
14900  *    software must display the following acknowledgment:
14901  *    "This product includes software developed by the OpenSSL Project
14902  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14903  *
14904  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14905  *    endorse or promote products derived from this software without
14906  *    prior written permission. For written permission, please contact
14907  *    openssl-core@openssl.org.
14908  *
14909  * 5. Products derived from this software may not be called "OpenSSL"
14910  *    nor may "OpenSSL" appear in their names without prior written
14911  *    permission of the OpenSSL Project.
14912  *
14913  * 6. Redistributions of any form whatsoever must retain the following
14914  *    acknowledgment:
14915  *    "This product includes software developed by the OpenSSL Project
14916  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14917  *
14918  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14919  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14920  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14921  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14922  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14923  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14924  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14925  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14926  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14927  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14928  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14929  * OF THE POSSIBILITY OF SUCH DAMAGE.
14930  * ====================================================================
14931  *
14932  * This product includes cryptographic software written by Eric Young
14933  * (eay@cryptsoft.com).  This product includes software written by Tim
14934  * Hudson (tjh@cryptsoft.com).
14935  *
14936  */
14937 
14938 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
14939 /* opensslconf.h */
14940 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
14941 
14942 
14943 
14944 
14945 /* OpenSSL was configured with the following options: */
14946 # 108 "/usr/include/openssl/opensslconf.h" 3 4
14947 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
14948    asks for it.  This is a transient feature that is provided for those
14949    who haven't had the time to do the appropriate changes in their
14950    applications.  */
14951 # 204 "/usr/include/openssl/opensslconf.h" 3 4
14952 /* crypto/opensslconf.h.in */
14953 
14954 /* Generate 80386 code? */
14955 # 272 "/usr/include/openssl/opensslconf.h" 3 4
14956 /*
14957  * OpenSSL revision 1.521 from 2005-12-15 in OpenSSL_1_0_0-stable branch changed
14958  * 64 bit sparcv9 configuration from SIXTY_FOUR_BIT_LONG to BN_LLONG.
14959  */
14960 
14961 
14962 
14963 
14964 
14965 
14966 /* Should we define BN_DIV2W here? */
14967 
14968 /* Only one for the following should be defined */
14969 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
14970 # 130 "/usr/include/openssl/bn.h" 2 3 4
14971 
14972 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
14973 /*
14974  * CDDL HEADER START
14975  *
14976  * The contents of this file are subject to the terms of the
14977  * Common Development and Distribution License (the "License").
14978  * You may not use this file except in compliance with the License.
14979  *
14980  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14981  * or http://www.opensolaris.org/os/licensing.
14982  * See the License for the specific language governing permissions
14983  * and limitations under the License.
14984  *
14985  * When distributing Covered Code, include this CDDL HEADER in each
14986  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14987  * If applicable, add the following below this CDDL HEADER, with the
14988  * fields enclosed by brackets "[]" replaced with your own identifying
14989  * information: Portions Copyright [yyyy] [name of copyright owner]
14990  *
14991  * CDDL HEADER END
14992  */
14993 
14994 /*
14995  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
14996  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
14997  */
14998 
14999 /*	Copyright (c) 1988 AT&T	*/
15000 /*	  All Rights Reserved  	*/
15001 
15002 /*
15003  * User-visible pieces of the ANSI C standard I/O package.
15004  */
15005 # 132 "/usr/include/openssl/bn.h" 2 3 4
15006 
15007 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
15008 /* ====================================================================
15009  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
15010  *
15011  * Redistribution and use in source and binary forms, with or without
15012  * modification, are permitted provided that the following conditions
15013  * are met:
15014  *
15015  * 1. Redistributions of source code must retain the above copyright
15016  *    notice, this list of conditions and the following disclaimer.
15017  *
15018  * 2. Redistributions in binary form must reproduce the above copyright
15019  *    notice, this list of conditions and the following disclaimer in
15020  *    the documentation and/or other materials provided with the
15021  *    distribution.
15022  *
15023  * 3. All advertising materials mentioning features or use of this
15024  *    software must display the following acknowledgment:
15025  *    "This product includes software developed by the OpenSSL Project
15026  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15027  *
15028  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15029  *    endorse or promote products derived from this software without
15030  *    prior written permission. For written permission, please contact
15031  *    openssl-core@openssl.org.
15032  *
15033  * 5. Products derived from this software may not be called "OpenSSL"
15034  *    nor may "OpenSSL" appear in their names without prior written
15035  *    permission of the OpenSSL Project.
15036  *
15037  * 6. Redistributions of any form whatsoever must retain the following
15038  *    acknowledgment:
15039  *    "This product includes software developed by the OpenSSL Project
15040  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15041  *
15042  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15043  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15044  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15045  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15046  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15047  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15048  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15049  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15050  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15051  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15052  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15053  * OF THE POSSIBILITY OF SUCH DAMAGE.
15054  * ====================================================================
15055  *
15056  * This product includes cryptographic software written by Eric Young
15057  * (eay@cryptsoft.com).  This product includes software written by Tim
15058  * Hudson (tjh@cryptsoft.com).
15059  *
15060  */
15061 # 134 "/usr/include/openssl/bn.h" 2 3 4
15062 # 1 "/usr/include/openssl/crypto.h" 1 3 4
15063 /* crypto/crypto.h */
15064 /* ====================================================================
15065  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
15066  *
15067  * Redistribution and use in source and binary forms, with or without
15068  * modification, are permitted provided that the following conditions
15069  * are met:
15070  *
15071  * 1. Redistributions of source code must retain the above copyright
15072  *    notice, this list of conditions and the following disclaimer.
15073  *
15074  * 2. Redistributions in binary form must reproduce the above copyright
15075  *    notice, this list of conditions and the following disclaimer in
15076  *    the documentation and/or other materials provided with the
15077  *    distribution.
15078  *
15079  * 3. All advertising materials mentioning features or use of this
15080  *    software must display the following acknowledgment:
15081  *    "This product includes software developed by the OpenSSL Project
15082  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15083  *
15084  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15085  *    endorse or promote products derived from this software without
15086  *    prior written permission. For written permission, please contact
15087  *    openssl-core@openssl.org.
15088  *
15089  * 5. Products derived from this software may not be called "OpenSSL"
15090  *    nor may "OpenSSL" appear in their names without prior written
15091  *    permission of the OpenSSL Project.
15092  *
15093  * 6. Redistributions of any form whatsoever must retain the following
15094  *    acknowledgment:
15095  *    "This product includes software developed by the OpenSSL Project
15096  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15097  *
15098  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15099  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15100  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15101  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15102  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15103  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15104  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15105  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15106  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15107  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15108  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15109  * OF THE POSSIBILITY OF SUCH DAMAGE.
15110  * ====================================================================
15111  *
15112  * This product includes cryptographic software written by Eric Young
15113  * (eay@cryptsoft.com).  This product includes software written by Tim
15114  * Hudson (tjh@cryptsoft.com).
15115  *
15116  */
15117 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
15118  * All rights reserved.
15119  *
15120  * This package is an SSL implementation written
15121  * by Eric Young (eay@cryptsoft.com).
15122  * The implementation was written so as to conform with Netscapes SSL.
15123  *
15124  * This library is free for commercial and non-commercial use as long as
15125  * the following conditions are aheared to.  The following conditions
15126  * apply to all code found in this distribution, be it the RC4, RSA,
15127  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15128  * included with this distribution is covered by the same copyright terms
15129  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15130  *
15131  * Copyright remains Eric Young's, and as such any Copyright notices in
15132  * the code are not to be removed.
15133  * If this package is used in a product, Eric Young should be given attribution
15134  * as the author of the parts of the library used.
15135  * This can be in the form of a textual message at program startup or
15136  * in documentation (online or textual) provided with the package.
15137  *
15138  * Redistribution and use in source and binary forms, with or without
15139  * modification, are permitted provided that the following conditions
15140  * are met:
15141  * 1. Redistributions of source code must retain the copyright
15142  *    notice, this list of conditions and the following disclaimer.
15143  * 2. Redistributions in binary form must reproduce the above copyright
15144  *    notice, this list of conditions and the following disclaimer in the
15145  *    documentation and/or other materials provided with the distribution.
15146  * 3. All advertising materials mentioning features or use of this software
15147  *    must display the following acknowledgement:
15148  *    "This product includes cryptographic software written by
15149  *     Eric Young (eay@cryptsoft.com)"
15150  *    The word 'cryptographic' can be left out if the rouines from the library
15151  *    being used are not cryptographic related :-).
15152  * 4. If you include any Windows specific code (or a derivative thereof) from
15153  *    the apps directory (application code) you must include an acknowledgement:
15154  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15155  *
15156  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15157  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15158  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15159  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15160  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15161  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15162  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15163  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15164  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15165  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15166  * SUCH DAMAGE.
15167  *
15168  * The licence and distribution terms for any publically available version or
15169  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15170  * copied and put under another distribution licence
15171  * [including the GNU Public Licence.]
15172  */
15173 /* ====================================================================
15174  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
15175  * ECDH support in OpenSSL originally developed by
15176  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
15177  */
15178 # 135 "/usr/include/openssl/bn.h" 2 3 4
15179 
15180 
15181 
15182 
15183 
15184 /*
15185  * These preprocessor symbols control various aspects of the bignum headers
15186  * and library code. They're not defined by any "normal" configuration, as
15187  * they are intended for development and testing purposes. NB: defining all
15188  * three can be useful for debugging application code as well as openssl
15189  * itself. BN_DEBUG - turn on various debugging alterations to the bignum
15190  * code BN_DEBUG_RAND - uses random poisoning of unused words to trip up
15191  * mismanagement of bignum internals. You must also define BN_DEBUG.
15192  */
15193 /* #define BN_DEBUG */
15194 /* #define BN_DEBUG_RAND */
15195 
15196 
15197 
15198 
15199 
15200 
15201 
15202 /*
15203  * This next option uses the C libraries (2 word)/(1 word) function. If it is
15204  * not defined, I use my C version (which is slower). The reason for this
15205  * flag is that when the particular C compiler library routine is used, and
15206  * the library is linked with a different compiler, the library is missing.
15207  * This mostly happens when the library is built with gcc and then linked
15208  * using normal cc.  This would be a common occurrence because gcc normally
15209  * produces code that is 2 times faster than system compilers for the big
15210  * number stuff. For machines with only one compiler (or shared libraries),
15211  * this should be on.  Again this in only really a problem on machines using
15212  * "long long's", are 32bit, and are not using my assembler code.
15213  */
15214 
15215 
15216 
15217 
15218 
15219 
15220 
15221 /*
15222  * assuming long is 64bit - this is the DEC Alpha unsigned long long is only
15223  * 64 bits :-(, don't define BN_LLONG for the DEC Alpha
15224  */
15225 # 203 "/usr/include/openssl/bn.h" 3 4
15226 /*
15227  * This is where the long long data type is 64 bits, but long is 32. For
15228  * machines where there are 64bit registers, this is the mode to use. IRIX,
15229  * on R4000 and above should use this mode, along with the relevant assembler
15230  * code :-).  Do NOT define BN_LLONG.
15231  */
15232 # 265 "/usr/include/openssl/bn.h" 3 4
15233 /*
15234  * avoid leaking exponent information through timing,
15235  * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
15236  * BN_div() will call BN_div_no_branch,
15237  * BN_mod_inverse() will call BN_mod_inverse_no_branch.
15238  */
15239 # 284 "/usr/include/openssl/bn.h" 3 4
15240                                        /* used for debuging */
15241 
15242 
15243 
15244 
15245 /*
15246  * get a clone of a BIGNUM with changed flags, for *temporary* use only (the
15247  * two BIGNUMs cannot not be used in parallel!)
15248  */
15249 # 302 "/usr/include/openssl/bn.h" 3 4
15250 /* Already declared in ossl_typ.h */
15251 # 313 "/usr/include/openssl/bn.h" 3 4
15252 struct bignum_st {
15253     unsigned int *d; /* Pointer to an array of 'BN_BITS2' bit
15254                                  * chunks. */
15255     int top; /* Index of last used d +1. */
15256     /* The next are internal book keeping for bn_expand. */
15257     int dmax; /* Size of the d array. */
15258     int neg; /* one if the number is negative */
15259     int flags;
15260 };
15261 
15262 /* Used for montgomery multiplication */
15263 struct bn_mont_ctx_st {
15264     int ri; /* number of bits in R */
15265     BIGNUM RR; /* used to convert to montgomery form */
15266     BIGNUM N; /* The modulus */
15267     BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 (Ni is only
15268                                  * stored for bignum algorithm) */
15269     unsigned int n0[2]; /* least significant word(s) of Ni; (type
15270                                  * changed with 0.9.9, was "BN_ULONG n0;"
15271                                  * before) */
15272     int flags;
15273 };
15274 
15275 /*
15276  * Used for reciprocal division/mod functions It cannot be shared between
15277  * threads
15278  */
15279 struct bn_recp_ctx_st {
15280     BIGNUM N; /* the divisor */
15281     BIGNUM Nr; /* the reciprocal */
15282     int num_bits;
15283     int shift;
15284     int flags;
15285 };
15286 
15287 /* Used for slow "generation" functions. */
15288 struct bn_gencb_st {
15289     unsigned int ver; /* To handle binary (in)compatibility */
15290     void *arg; /* callback-specific data */
15291     union {
15292         /* if(ver==1) - handles old style callbacks */
15293         void (*cb_1) (int, int, void *);
15294         /* if(ver==2) - new callback style */
15295         int (*cb_2) (int, int, BN_GENCB *);
15296     } cb;
15297 };
15298 /* Wrapper function to make using BN_GENCB easier,  */
15299 int BN_GENCB_call(BN_GENCB *cb, int a, int b);
15300 /* Macro to populate a BN_GENCB structure with an "old"-style callback */
15301 
15302 
15303 
15304 
15305 
15306 /* Macro to populate a BN_GENCB structure with a "new"-style callback */
15307 # 377 "/usr/include/openssl/bn.h" 3 4
15308 /*
15309  * BN_prime_checks_for_size() returns the number of Miller-Rabin iterations
15310  * that will be done for checking that a random number is probably prime. The
15311  * error rate for accepting a composite number as prime depends on the size of
15312  * the prime |b|. The error rates used are for calculating an RSA key with 2 primes,
15313  * and so the level is what you would expect for a key of double the size of the
15314  * prime.
15315  *
15316  * This table is generated using the algorithm of FIPS PUB 186-4
15317  * Digital Signature Standard (DSS), section F.1, page 117.
15318  * (https://dx.doi.org/10.6028/NIST.FIPS.186-4)
15319  *
15320  * The following magma script was used to generate the output:
15321  * securitybits:=125;
15322  * k:=1024;
15323  * for t:=1 to 65 do
15324  *   for M:=3 to Floor(2*Sqrt(k-1)-1) do
15325  *     S:=0;
15326  *     // Sum over m
15327  *     for m:=3 to M do
15328  *       s:=0;
15329  *       // Sum over j
15330  *       for j:=2 to m do
15331  *         s+:=(RealField(32)!2)^-(j+(k-1)/j);
15332  *       end for;
15333  *       S+:=2^(m-(m-1)*t)*s;
15334  *     end for;
15335  *     A:=2^(k-2-M*t);
15336  *     B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S;
15337  *     pkt:=2.00743*Log(2)*k*2^-k*(A+B);
15338  *     seclevel:=Floor(-Log(2,pkt));
15339  *     if seclevel ge securitybits then
15340  *       printf "k: %5o, security: %o bits  (t: %o, M: %o)\n",k,seclevel,t,M;
15341  *       break;
15342  *     end if;
15343  *   end for;
15344  *   if seclevel ge securitybits then break; end if;
15345  * end for;
15346  *
15347  * It can be run online at:
15348  * http://magma.maths.usyd.edu.au/calc
15349  *
15350  * And will output:
15351  * k:  1024, security: 129 bits  (t: 6, M: 23)
15352  *
15353  * k is the number of bits of the prime, securitybits is the level we want to
15354  * reach.
15355  *
15356  * prime length | RSA key size | # MR tests | security level
15357  * -------------+--------------|------------+---------------
15358  *  (b) >= 6394 |     >= 12788 |          3 |        256 bit
15359  *  (b) >= 3747 |     >=  7494 |          3 |        192 bit
15360  *  (b) >= 1345 |     >=  2690 |          4 |        128 bit
15361  *  (b) >= 1080 |     >=  2160 |          5 |        128 bit
15362  *  (b) >=  852 |     >=  1704 |          5 |        112 bit
15363  *  (b) >=  476 |     >=   952 |          5 |         80 bit
15364  *  (b) >=  400 |     >=   800 |          6 |         80 bit
15365  *  (b) >=  347 |     >=   694 |          7 |         80 bit
15366  *  (b) >=  308 |     >=   616 |          8 |         80 bit
15367  *  (b) >=   55 |     >=   110 |         27 |         64 bit
15368  *  (b) >=    6 |     >=    12 |         34 |         64 bit
15369  */
15370 # 451 "/usr/include/openssl/bn.h" 3 4
15371 /* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
15372 # 472 "/usr/include/openssl/bn.h" 3 4
15373 const BIGNUM *BN_value_one(void);
15374 char *BN_options(void);
15375 BN_CTX *BN_CTX_new(void);
15376 
15377 void BN_CTX_init(BN_CTX *c);
15378 
15379 void BN_CTX_free(BN_CTX *c);
15380 void BN_CTX_start(BN_CTX *ctx);
15381 BIGNUM *BN_CTX_get(BN_CTX *ctx);
15382 void BN_CTX_end(BN_CTX *ctx);
15383 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
15384 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
15385 int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
15386 int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
15387 int BN_num_bits(const BIGNUM *a);
15388 int BN_num_bits_word(unsigned int);
15389 BIGNUM *BN_new(void);
15390 void BN_init(BIGNUM *);
15391 void BN_clear_free(BIGNUM *a);
15392 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
15393 void BN_swap(BIGNUM *a, BIGNUM *b);
15394 BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
15395 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
15396 BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
15397 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
15398 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
15399 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
15400 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
15401 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
15402 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
15403 int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
15404 /** BN_set_negative sets sign of a BIGNUM
15405  * \param  b  pointer to the BIGNUM object
15406  * \param  n  0 if the BIGNUM b should be positive and a value != 0 otherwise
15407  */
15408 void BN_set_negative(BIGNUM *b, int n);
15409 /** BN_is_negative returns 1 if the BIGNUM is negative
15410  * \param  a  pointer to the BIGNUM object
15411  * \return 1 if a < 0 and 0 otherwise
15412  */
15413 
15414 
15415 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
15416            BN_CTX *ctx);
15417 
15418 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
15419 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
15420                BN_CTX *ctx);
15421 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15422                      const BIGNUM *m);
15423 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
15424                BN_CTX *ctx);
15425 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15426                      const BIGNUM *m);
15427 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
15428                BN_CTX *ctx);
15429 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
15430 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
15431 int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
15432 int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
15433                   BN_CTX *ctx);
15434 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
15435 
15436 unsigned int BN_mod_word(const BIGNUM *a, unsigned int w);
15437 unsigned int BN_div_word(BIGNUM *a, unsigned int w);
15438 int BN_mul_word(BIGNUM *a, unsigned int w);
15439 int BN_add_word(BIGNUM *a, unsigned int w);
15440 int BN_sub_word(BIGNUM *a, unsigned int w);
15441 int BN_set_word(BIGNUM *a, unsigned int w);
15442 unsigned int BN_get_word(const BIGNUM *a);
15443 
15444 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
15445 void BN_free(BIGNUM *a);
15446 int BN_is_bit_set(const BIGNUM *a, int n);
15447 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
15448 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
15449 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15450 
15451 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
15452                const BIGNUM *m, BN_CTX *ctx);
15453 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
15454                     const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
15455 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
15456                               const BIGNUM *m, BN_CTX *ctx,
15457                               BN_MONT_CTX *in_mont);
15458 int BN_mod_exp_mont_word(BIGNUM *r, unsigned int a, const BIGNUM *p,
15459                          const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
15460 int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
15461                      const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
15462                      BN_CTX *ctx, BN_MONT_CTX *m_ctx);
15463 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
15464                       const BIGNUM *m, BN_CTX *ctx);
15465 
15466 int BN_mask_bits(BIGNUM *a, int n);
15467 
15468 int BN_print_fp(FILE *fp, const BIGNUM *a);
15469 
15470 
15471 int BN_print(BIO *fp, const BIGNUM *a);
15472 
15473 
15474 
15475 int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
15476 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
15477 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
15478 void BN_clear(BIGNUM *a);
15479 BIGNUM *BN_dup(const BIGNUM *a);
15480 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
15481 int BN_set_bit(BIGNUM *a, int n);
15482 int BN_clear_bit(BIGNUM *a, int n);
15483 char *BN_bn2hex(const BIGNUM *a);
15484 char *BN_bn2dec(const BIGNUM *a);
15485 int BN_hex2bn(BIGNUM **a, const char *str);
15486 int BN_dec2bn(BIGNUM **a, const char *str);
15487 int BN_asc2bn(BIGNUM **a, const char *str);
15488 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
15489 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
15490                                                                   * -2 for
15491                                                                   * error */
15492 BIGNUM *BN_mod_inverse(BIGNUM *ret,
15493                        const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
15494 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
15495                     const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
15496 
15497 void BN_consttime_swap(unsigned int swap, BIGNUM *a, BIGNUM *b, int nwords);
15498 
15499 /* Deprecated versions */
15500 
15501 BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
15502                           const BIGNUM *add, const BIGNUM *rem,
15503                           void (*callback) (int, int, void *), void *cb_arg);
15504 int BN_is_prime(const BIGNUM *p, int nchecks,
15505                 void (*callback) (int, int, void *),
15506                 BN_CTX *ctx, void *cb_arg);
15507 int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
15508                          void (*callback) (int, int, void *), BN_CTX *ctx,
15509                          void *cb_arg, int do_trial_division);
15510 
15511 
15512 /* Newer versions */
15513 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
15514                          const BIGNUM *rem, BN_GENCB *cb);
15515 int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
15516 int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
15517                             int do_trial_division, BN_GENCB *cb);
15518 
15519 int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
15520 
15521 int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
15522                             const BIGNUM *Xp, const BIGNUM *Xp1,
15523                             const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
15524                             BN_GENCB *cb);
15525 int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
15526                               BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
15527                               BN_CTX *ctx, BN_GENCB *cb);
15528 
15529 BN_MONT_CTX *BN_MONT_CTX_new(void);
15530 void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
15531 int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15532                           BN_MONT_CTX *mont, BN_CTX *ctx);
15533 
15534 
15535 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a,
15536                        BN_MONT_CTX *mont, BN_CTX *ctx);
15537 void BN_MONT_CTX_free(BN_MONT_CTX *mont);
15538 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
15539 BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
15540 BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
15541                                     const BIGNUM *mod, BN_CTX *ctx);
15542 
15543 /* BN_BLINDING flags */
15544 
15545 
15546 
15547 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
15548 void BN_BLINDING_free(BN_BLINDING *b);
15549 int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
15550 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
15551 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
15552 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
15553 int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
15554                           BN_CTX *);
15555 
15556 unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);
15557 void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);
15558 
15559 CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);
15560 unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
15561 void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
15562 BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
15563                                       const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
15564                                       int (*bn_mod_exp) (BIGNUM *r,
15565                                                          const BIGNUM *a,
15566                                                          const BIGNUM *p,
15567                                                          const BIGNUM *m,
15568                                                          BN_CTX *ctx,
15569                                                          BN_MONT_CTX *m_ctx),
15570                                       BN_MONT_CTX *m_ctx);
15571 
15572 
15573 void BN_set_params(int mul, int high, int low, int mont);
15574 int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
15575 
15576 
15577 void BN_RECP_CTX_init(BN_RECP_CTX *recp);
15578 BN_RECP_CTX *BN_RECP_CTX_new(void);
15579 void BN_RECP_CTX_free(BN_RECP_CTX *recp);
15580 int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
15581 int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
15582                           BN_RECP_CTX *recp, BN_CTX *ctx);
15583 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
15584                     const BIGNUM *m, BN_CTX *ctx);
15585 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
15586                 BN_RECP_CTX *recp, BN_CTX *ctx);
15587 
15588 
15589 
15590 /*
15591  * Functions for arithmetic over binary polynomials represented by BIGNUMs.
15592  * The BIGNUM::neg property of BIGNUMs representing binary polynomials is
15593  * ignored. Note that input arguments are not const so that their bit arrays
15594  * can be expanded to the appropriate size if needed.
15595  */
15596 
15597 /*
15598  * r = a + b
15599  */
15600 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
15601 
15602 /*
15603  * r=a mod p
15604  */
15605 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
15606 /* r = (a * b) mod p */
15607 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15608                     const BIGNUM *p, BN_CTX *ctx);
15609 /* r = (a * a) mod p */
15610 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15611 /* r = (1 / b) mod p */
15612 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
15613 /* r = (a / b) mod p */
15614 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15615                     const BIGNUM *p, BN_CTX *ctx);
15616 /* r = (a ^ b) mod p */
15617 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15618                     const BIGNUM *p, BN_CTX *ctx);
15619 /* r = sqrt(a) mod p */
15620 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
15621                      BN_CTX *ctx);
15622 /* r^2 + r = a mod p */
15623 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
15624                            BN_CTX *ctx);
15625 
15626 /*-
15627  * Some functions allow for representation of the irreducible polynomials
15628  * as an unsigned int[], say p.  The irreducible f(t) is then of the form:
15629  *     t^p[0] + t^p[1] + ... + t^p[k]
15630  * where m = p[0] > p[1] > ... > p[k] = 0.
15631  */
15632 /* r = a mod p */
15633 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
15634 /* r = (a * b) mod p */
15635 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15636                         const int p[], BN_CTX *ctx);
15637 /* r = (a * a) mod p */
15638 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
15639                         BN_CTX *ctx);
15640 /* r = (1 / b) mod p */
15641 int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
15642                         BN_CTX *ctx);
15643 /* r = (a / b) mod p */
15644 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15645                         const int p[], BN_CTX *ctx);
15646 /* r = (a ^ b) mod p */
15647 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
15648                         const int p[], BN_CTX *ctx);
15649 /* r = sqrt(a) mod p */
15650 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
15651                          const int p[], BN_CTX *ctx);
15652 /* r^2 + r = a mod p */
15653 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
15654                                const int p[], BN_CTX *ctx);
15655 int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
15656 int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
15657 
15658 
15659 
15660 /*
15661  * faster mod functions for the 'NIST primes' 0 <= a < p^2
15662  */
15663 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15664 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15665 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15666 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15667 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
15668 
15669 const BIGNUM *BN_get0_nist_prime_192(void);
15670 const BIGNUM *BN_get0_nist_prime_224(void);
15671 const BIGNUM *BN_get0_nist_prime_256(void);
15672 const BIGNUM *BN_get0_nist_prime_384(void);
15673 const BIGNUM *BN_get0_nist_prime_521(void);
15674 
15675 /* library internal functions */
15676 # 788 "/usr/include/openssl/bn.h" 3 4
15677 BIGNUM *bn_expand2(BIGNUM *a, int words);
15678 
15679 BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
15680 
15681 
15682 /*-
15683  * Bignum consistency macros
15684  * There is one "API" macro, bn_fix_top(), for stripping leading zeroes from
15685  * bignum data after direct manipulations on the data. There is also an
15686  * "internal" macro, bn_check_top(), for verifying that there are no leading
15687  * zeroes. Unfortunately, some auditing is required due to the fact that
15688  * bn_fix_top() has become an overabused duct-tape because bignum data is
15689  * occasionally passed around in an inconsistent state. So the following
15690  * changes have been made to sort this out;
15691  * - bn_fix_top()s implementation has been moved to bn_correct_top()
15692  * - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and
15693  *   bn_check_top() is as before.
15694  * - if BN_DEBUG *is* defined;
15695  *   - bn_check_top() tries to pollute unused words even if the bignum 'top' is
15696  *     consistent. (ed: only if BN_DEBUG_RAND is defined)
15697  *   - bn_fix_top() maps to bn_check_top() rather than "fixing" anything.
15698  * The idea is to have debug builds flag up inconsistent bignums when they
15699  * occur. If that occurs in a bn_fix_top(), we examine the code in question; if
15700  * the use of bn_fix_top() was appropriate (ie. it follows directly after code
15701  * that manipulates the bignum) it is converted to bn_correct_top(), and if it
15702  * was not appropriate, we convert it permanently to bn_check_top() and track
15703  * down the cause of the bug. Eventually, no internal code should be using the
15704  * bn_fix_top() macro. External applications and libraries should try this with
15705  * their own code too, both in terms of building against the openssl headers
15706  * with BN_DEBUG defined *and* linking with a version of OpenSSL built with it
15707  * defined. This not only improves external code, it provides more test
15708  * coverage for openssl's own code.
15709  */
15710 # 914 "/usr/include/openssl/bn.h" 3 4
15711 unsigned int bn_mul_add_words(unsigned int *rp, const unsigned int *ap, int num,
15712                           unsigned int w);
15713 unsigned int bn_mul_words(unsigned int *rp, const unsigned int *ap, int num, unsigned int w);
15714 void bn_sqr_words(unsigned int *rp, const unsigned int *ap, int num);
15715 unsigned int bn_div_words(unsigned int h, unsigned int l, unsigned int d);
15716 unsigned int bn_add_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
15717                       int num);
15718 unsigned int bn_sub_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
15719                       int num);
15720 
15721 /* Primes from RFC 2409 */
15722 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
15723 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
15724 
15725 /* Primes from RFC 3526 */
15726 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
15727 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
15728 BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
15729 BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
15730 BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
15731 BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
15732 
15733 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
15734 
15735 /* BEGIN ERROR CODES */
15736 /*
15737  * The following lines are auto generated by the script mkerr.pl. Any changes
15738  * made after this point may be overwritten when the script is next run.
15739  */
15740 void ERR_load_BN_strings(void);
15741 
15742 /* Error codes for the BN functions. */
15743 
15744 /* Function codes. */
15745 # 991 "/usr/include/openssl/bn.h" 3 4
15746 /* Reason codes. */
15747 # 75 "/usr/include/openssl/asn1.h" 2 3 4
15748 # 132 "/usr/include/openssl/asn1.h" 3 4
15749 /* For use with d2i_ASN1_type_bytes() */
15750 # 152 "/usr/include/openssl/asn1.h" 3 4
15751 /* For use with ASN1_mbstring_copy() */
15752 # 161 "/usr/include/openssl/asn1.h" 3 4
15753     struct X509_algor_st;
15754 struct stack_st_X509_ALGOR { _STACK stack; };
15755 
15756 
15757 
15758 
15759 /*
15760  * We MUST make sure that, except for constness, asn1_ctx_st and
15761  * asn1_const_ctx are exactly the same.  Fortunately, as soon as the old ASN1
15762  * parsing macros are gone, we can throw this away as well...
15763  */
15764 typedef struct asn1_ctx_st {
15765     unsigned char *p; /* work char pointer */
15766     int eos; /* end of sequence read for indefinite
15767                                  * encoding */
15768     int error; /* error code to use when returning an error */
15769     int inf; /* constructed if 0x20, indefinite is 0x21 */
15770     int tag; /* tag from last 'get object' */
15771     int xclass; /* class from last 'get object' */
15772     long slen; /* length of last 'get object' */
15773     unsigned char *max; /* largest value of p allowed */
15774     unsigned char *q; /* temporary variable */
15775     unsigned char **pp; /* variable */
15776     int line; /* used in error processing */
15777 } ASN1_CTX;
15778 
15779 typedef struct asn1_const_ctx_st {
15780     const unsigned char *p; /* work char pointer */
15781     int eos; /* end of sequence read for indefinite
15782                                  * encoding */
15783     int error; /* error code to use when returning an error */
15784     int inf; /* constructed if 0x20, indefinite is 0x21 */
15785     int tag; /* tag from last 'get object' */
15786     int xclass; /* class from last 'get object' */
15787     long slen; /* length of last 'get object' */
15788     const unsigned char *max; /* largest value of p allowed */
15789     const unsigned char *q; /* temporary variable */
15790     const unsigned char **pp; /* variable */
15791     int line; /* used in error processing */
15792 } ASN1_const_CTX;
15793 
15794 /*
15795  * These are used internally in the ASN1_OBJECT to keep track of whether the
15796  * names and data need to be free()ed
15797  */
15798 
15799 
15800 
15801 
15802 struct asn1_object_st {
15803     const char *sn, *ln;
15804     int nid;
15805     int length;
15806     const unsigned char *data; /* data remains const after init */
15807     int flags; /* Should we free this one */
15808 };
15809 
15810 
15811 /*
15812  * This indicates that the ASN1_STRING is not a real value but just a place
15813  * holder for the location where indefinite length constructed data should be
15814  * inserted in the memory buffer
15815  */
15816 
15817 
15818 /*
15819  * This flag is used by the CMS code to indicate that a string is not
15820  * complete and is a place holder for content when it had all been accessed.
15821  * The flag will be reset when content has been written to it.
15822  */
15823 
15824 
15825 /*
15826  * This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
15827  * type.
15828  */
15829 
15830 /* This is the base type that holds just about everything :-) */
15831 struct asn1_string_st {
15832     int length;
15833     int type;
15834     unsigned char *data;
15835     /*
15836      * The value of the following field depends on the type being held.  It
15837      * is mostly being used for BIT_STRING so if the input data has a
15838      * non-zero 'unused bits' value, it will be handled correctly
15839      */
15840     long flags;
15841 };
15842 
15843 /*
15844  * ASN1_ENCODING structure: this is used to save the received encoding of an
15845  * ASN1 type. This is useful to get round problems with invalid encodings
15846  * which can break signatures.
15847  */
15848 
15849 typedef struct ASN1_ENCODING_st {
15850     unsigned char *enc; /* DER encoding */
15851     long len; /* Length of encoding */
15852     int modified; /* set to 1 if 'enc' is invalid */
15853 } ASN1_ENCODING;
15854 
15855 /* Used with ASN1 LONG type: if a long is set to this it is omitted */
15856 # 272 "/usr/include/openssl/asn1.h" 3 4
15857 typedef struct asn1_string_table_st {
15858     int nid;
15859     long minsize;
15860     long maxsize;
15861     unsigned long mask;
15862     unsigned long flags;
15863 } ASN1_STRING_TABLE;
15864 
15865 struct stack_st_ASN1_STRING_TABLE { _STACK stack; };
15866 
15867 /* size limits: this stuff is taken straight from RFC2459 */
15868 # 293 "/usr/include/openssl/asn1.h" 3 4
15869 /*
15870  * Declarations for template structures: for full definitions see asn1t.h
15871  */
15872 typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
15873 typedef struct ASN1_TLC_st ASN1_TLC;
15874 /* This is just an opaque pointer */
15875 typedef struct ASN1_VALUE_st ASN1_VALUE;
15876 
15877 /* Declare ASN1 functions: the implement macro in in asn1t.h */
15878 # 363 "/usr/include/openssl/asn1.h" 3 4
15879 typedef void *d2i_of_void(void **,const unsigned char **,long); typedef int i2d_of_void(void *,unsigned char **);
15880 
15881 /*-
15882  * The following macros and typedefs allow an ASN1_ITEM
15883  * to be embedded in a structure and referenced. Since
15884  * the ASN1_ITEM pointers need to be globally accessible
15885  * (possibly from shared libraries) they may exist in
15886  * different forms. On platforms that support it the
15887  * ASN1_ITEM structure itself will be globally exported.
15888  * Other platforms will export a function that returns
15889  * an ASN1_ITEM pointer.
15890  *
15891  * To handle both cases transparently the macros below
15892  * should be used instead of hard coding an ASN1_ITEM
15893  * pointer in a structure.
15894  *
15895  * The structure will look like this:
15896  *
15897  * typedef struct SOMETHING_st {
15898  *      ...
15899  *      ASN1_ITEM_EXP *iptr;
15900  *      ...
15901  * } SOMETHING;
15902  *
15903  * It would be initialised as e.g.:
15904  *
15905  * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
15906  *
15907  * and the actual pointer extracted with:
15908  *
15909  * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
15910  *
15911  * Finally an ASN1_ITEM pointer can be extracted from an
15912  * appropriate reference with: ASN1_ITEM_rptr(X509). This
15913  * would be used when a function takes an ASN1_ITEM * argument.
15914  *
15915  */
15916 
15917 
15918 
15919 /* ASN1_ITEM pointer exported type */
15920 typedef const ASN1_ITEM ASN1_ITEM_EXP;
15921 
15922 /* Macro to obtain ASN1_ITEM pointer from exported type */
15923 
15924 
15925 /* Macro to include ASN1_ITEM pointer from base type */
15926 # 440 "/usr/include/openssl/asn1.h" 3 4
15927 /* Parameters used by ASN1_STRING_print_ex() */
15928 
15929 /*
15930  * These determine which characters to escape: RFC2253 special characters,
15931  * control characters and MSB set characters
15932  */
15933 
15934 
15935 
15936 
15937 
15938 /*
15939  * This flag determines how we do escaping: normally RC2253 backslash only,
15940  * set this to use backslash and quote.
15941  */
15942 
15943 
15944 
15945 /* These three flags are internal use only. */
15946 
15947 /* Character is a valid PrintableString character */
15948 
15949 /* Character needs escaping if it is the first character */
15950 
15951 /* Character needs escaping if it is the last character */
15952 
15953 
15954 /*
15955  * NB the internal flags are safely reused below by flags handled at the top
15956  * level.
15957  */
15958 
15959 /*
15960  * If this is set we convert all character strings to UTF8 first
15961  */
15962 
15963 
15964 
15965 /*
15966  * If this is set we don't attempt to interpret content: just assume all
15967  * strings are 1 byte per character. This will produce some pretty odd
15968  * looking output!
15969  */
15970 
15971 
15972 
15973 /* If this is set we include the string type in the output */
15974 
15975 
15976 /*
15977  * This determines which strings to display and which to 'dump' (hex dump of
15978  * content octets or DER encoding). We can only dump non character strings or
15979  * everything. If we don't dump 'unknown' they are interpreted as character
15980  * strings with 1 octet per character and are subject to the usual escaping
15981  * options.
15982  */
15983 
15984 
15985 
15986 
15987 /*
15988  * These determine what 'dumping' does, we can dump the content octets or the
15989  * DER encoding: both use the RFC2253 #XXXXX notation.
15990  */
15991 
15992 
15993 
15994 /*
15995  * All the string flags consistent with RFC2253, escaping control characters
15996  * isn't essential in RFC2253 but it is advisable anyway.
15997  */
15998 # 519 "/usr/include/openssl/asn1.h" 3 4
15999 struct stack_st_ASN1_INTEGER { _STACK stack; };
16000 
16001 
16002 struct stack_st_ASN1_GENERALSTRING { _STACK stack; };
16003 
16004 typedef struct asn1_type_st {
16005     int type;
16006     union {
16007         char *ptr;
16008         ASN1_BOOLEAN boolean;
16009         ASN1_STRING *asn1_string;
16010         ASN1_OBJECT *object;
16011         ASN1_INTEGER *integer;
16012         ASN1_ENUMERATED *enumerated;
16013         ASN1_BIT_STRING *bit_string;
16014         ASN1_OCTET_STRING *octet_string;
16015         ASN1_PRINTABLESTRING *printablestring;
16016         ASN1_T61STRING *t61string;
16017         ASN1_IA5STRING *ia5string;
16018         ASN1_GENERALSTRING *generalstring;
16019         ASN1_BMPSTRING *bmpstring;
16020         ASN1_UNIVERSALSTRING *universalstring;
16021         ASN1_UTCTIME *utctime;
16022         ASN1_GENERALIZEDTIME *generalizedtime;
16023         ASN1_VISIBLESTRING *visiblestring;
16024         ASN1_UTF8STRING *utf8string;
16025         /*
16026          * set and sequence are left complete and still contain the set or
16027          * sequence bytes
16028          */
16029         ASN1_STRING *set;
16030         ASN1_STRING *sequence;
16031         ASN1_VALUE *asn1_value;
16032     } value;
16033 } ASN1_TYPE;
16034 
16035 struct stack_st_ASN1_TYPE { _STACK stack; };
16036 
16037 
16038 typedef struct stack_st_ASN1_TYPE ASN1_SEQUENCE_ANY;
16039 
16040 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;
16041 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;
16042 
16043 typedef struct NETSCAPE_X509_st {
16044     ASN1_OCTET_STRING *header;
16045     X509 *cert;
16046 } NETSCAPE_X509;
16047 
16048 /* This is used to contain a list of bit names */
16049 typedef struct BIT_STRING_BITNAME_st {
16050     int bitnum;
16051     const char *lname;
16052     const char *sname;
16053 } BIT_STRING_BITNAME;
16054 
16055 
16056 
16057 
16058 
16059 
16060 /* Macros for string operations */
16061 # 772 "/usr/include/openssl/asn1.h" 3 4
16062   /* for the is_set parameter to i2d_ASN1_SET */
16063 
16064 
16065 
16066 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;
16067 
16068 int ASN1_TYPE_get(ASN1_TYPE *a);
16069 void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
16070 int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
16071 int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
16072 
16073 ASN1_OBJECT *ASN1_OBJECT_new(void);
16074 void ASN1_OBJECT_free(ASN1_OBJECT *a);
16075 int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp);
16076 ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
16077                              long length);
16078 ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
16079                              long length);
16080 
16081 extern const ASN1_ITEM ASN1_OBJECT_it;
16082 
16083 struct stack_st_ASN1_OBJECT { _STACK stack; };
16084 
16085 
16086 ASN1_STRING *ASN1_STRING_new(void);
16087 void ASN1_STRING_free(ASN1_STRING *a);
16088 void ASN1_STRING_clear_free(ASN1_STRING *a);
16089 int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
16090 ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a);
16091 ASN1_STRING *ASN1_STRING_type_new(int type);
16092 int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
16093   /*
16094    * Since this is used to store all sorts of things, via macros, for now,
16095    * make its data void *
16096    */
16097 int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
16098 void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
16099 int ASN1_STRING_length(const ASN1_STRING *x);
16100 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
16101 int ASN1_STRING_type(ASN1_STRING *x);
16102 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
16103 
16104 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;
16105 int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp);
16106 ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
16107                                      const unsigned char **pp, long length);
16108 int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
16109 int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
16110 int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);
16111 int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a,
16112                           unsigned char *flags, int flags_len);
16113 
16114 
16115 int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
16116                                BIT_STRING_BITNAME *tbl, int indent);
16117 
16118 int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl);
16119 int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
16120                             BIT_STRING_BITNAME *tbl);
16121 
16122 int i2d_ASN1_BOOLEAN(int a, unsigned char **pp);
16123 int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length);
16124 
16125 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;
16126 int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp);
16127 ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp,
16128                                long length);
16129 ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
16130                                 long length);
16131 ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x);
16132 int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
16133 
16134 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;
16135 
16136 int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
16137 ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
16138 ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
16139                                int offset_day, long offset_sec);
16140 int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
16141 int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
16142 
16143 
16144 
16145 
16146 int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
16147 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
16148                                                time_t t);
16149 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
16150                                                time_t t, int offset_day,
16151                                                long offset_sec);
16152 int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
16153 int ASN1_TIME_diff(int *pday, int *psec,
16154                    const ASN1_TIME *from, const ASN1_TIME *to);
16155 
16156 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;
16157 ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a);
16158 int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
16159                           const ASN1_OCTET_STRING *b);
16160 int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
16161                           int len);
16162 
16163 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;
16164 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;
16165 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;
16166 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;
16167 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;
16168 
16169 int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
16170 int UTF8_putc(unsigned char *str, int len, unsigned long value);
16171 
16172 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;
16173 
16174 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;
16175 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;
16176 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;
16177 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;
16178 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;
16179 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;
16180 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;
16181 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;
16182 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;
16183 
16184 extern const ASN1_ITEM ASN1_OCTET_STRING_NDEF_it;
16185 
16186 ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
16187 ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
16188                          int offset_day, long offset_sec);
16189 int ASN1_TIME_check(ASN1_TIME *t);
16190 ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME
16191                                                    **out);
16192 int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
16193 
16194 int i2d_ASN1_SET(struct stack_st_OPENSSL_BLOCK *a, unsigned char **pp,
16195                  i2d_of_void *i2d, int ex_tag, int ex_class, int is_set);
16196 struct stack_st_OPENSSL_BLOCK *d2i_ASN1_SET(struct stack_st_OPENSSL_BLOCK **a,
16197                                       const unsigned char **pp,
16198                                       long length, d2i_of_void *d2i,
16199                                       void (*free_func) (OPENSSL_BLOCK),
16200                                       int ex_tag, int ex_class);
16201 
16202 
16203 int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);
16204 int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
16205 int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
16206 int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
16207 int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a);
16208 int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
16209 int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type);
16210 
16211 int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a);
16212 
16213 int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
16214 ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
16215                                 const char *sn, const char *ln);
16216 
16217 int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
16218 long ASN1_INTEGER_get(const ASN1_INTEGER *a);
16219 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
16220 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
16221 
16222 int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
16223 long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a);
16224 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai);
16225 BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn);
16226 
16227 /* General */
16228 /* given a string, return the correct type, max is the maximum length */
16229 int ASN1_PRINTABLE_type(const unsigned char *s, int max);
16230 
16231 int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass);
16232 ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
16233                             long length, int Ptag, int Pclass);
16234 unsigned long ASN1_tag2bit(int tag);
16235 /* type is one or more of the B_ASN1_ values. */
16236 ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp,
16237                                  long length, int type);
16238 
16239 /* PARSING */
16240 int asn1_Finish(ASN1_CTX *c);
16241 int asn1_const_Finish(ASN1_const_CTX *c);
16242 
16243 /* SPECIALS */
16244 int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
16245                     int *pclass, long omax);
16246 int ASN1_check_infinite_end(unsigned char **p, long len);
16247 int ASN1_const_check_infinite_end(const unsigned char **p, long len);
16248 void ASN1_put_object(unsigned char **pp, int constructed, int length,
16249                      int tag, int xclass);
16250 int ASN1_put_eoc(unsigned char **pp);
16251 int ASN1_object_size(int constructed, int length, int tag);
16252 
16253 /* Used to implement other functions */
16254 void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);
16255 # 976 "/usr/include/openssl/asn1.h" 3 4
16256 void *ASN1_item_dup(const ASN1_ITEM *it, void *x);
16257 
16258 /* ASN1 alloc/free macros for when a type is only used internally */
16259 
16260 
16261 
16262 
16263 
16264 
16265 void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
16266 
16267 
16268 
16269 
16270 
16271 
16272 
16273 void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
16274 int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x);
16275 # 1006 "/usr/include/openssl/asn1.h" 3 4
16276 int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x);
16277 int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);
16278 
16279 
16280 int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in);
16281 
16282 
16283 void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
16284 
16285 
16286 
16287 
16288 
16289 
16290 
16291 void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x);
16292 int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x);
16293 # 1034 "/usr/include/openssl/asn1.h" 3 4
16294 int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x);
16295 int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
16296 int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
16297 int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);
16298 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
16299 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);
16300 int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
16301                   unsigned char *buf, int off);
16302 int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
16303 int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
16304                     int dump);
16305 
16306 const char *ASN1_tag2str(int tag);
16307 
16308 /* Used to load and write netscape format cert */
16309 
16310 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;
16311 
16312 int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
16313 
16314 int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
16315 int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, int max_len);
16316 int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
16317                                   unsigned char *data, int len);
16318 int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num,
16319                                   unsigned char *data, int max_len);
16320 
16321 struct stack_st_OPENSSL_BLOCK *ASN1_seq_unpack(const unsigned char *buf, int len,
16322                                          d2i_of_void *d2i,
16323                                          void (*free_func) (OPENSSL_BLOCK));
16324 unsigned char *ASN1_seq_pack(struct stack_st_OPENSSL_BLOCK *safes, i2d_of_void *i2d,
16325                              unsigned char **buf, int *len);
16326 void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);
16327 void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
16328 ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d,
16329                               ASN1_OCTET_STRING **oct);
16330 
16331 
16332 
16333 
16334 
16335 
16336 ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
16337                             ASN1_OCTET_STRING **oct);
16338 
16339 void ASN1_STRING_set_default_mask(unsigned long mask);
16340 int ASN1_STRING_set_default_mask_asc(const char *p);
16341 unsigned long ASN1_STRING_get_default_mask(void);
16342 int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
16343                        int inform, unsigned long mask);
16344 int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
16345                         int inform, unsigned long mask,
16346                         long minsize, long maxsize);
16347 
16348 ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
16349                                     const unsigned char *in, int inlen,
16350                                     int inform, int nid);
16351 ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
16352 int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
16353 void ASN1_STRING_TABLE_cleanup(void);
16354 
16355 /* ASN1 template functions */
16356 
16357 /* Old API compatible functions */
16358 ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
16359 void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
16360 ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
16361                           long len, const ASN1_ITEM *it);
16362 int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
16363 int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out,
16364                        const ASN1_ITEM *it);
16365 
16366 void ASN1_add_oid_module(void);
16367 
16368 ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf);
16369 ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
16370 
16371 /* ASN1 Print flags */
16372 
16373 /* Indicate missing OPTIONAL fields */
16374 
16375 /* Mark start and end of SEQUENCE */
16376 
16377 /* Mark start and end of SEQUENCE/SET OF */
16378 
16379 /* Show the ASN1 type of primitives */
16380 
16381 /* Don't show ASN1 type of ANY */
16382 
16383 /* Don't show ASN1 type of MSTRINGs */
16384 
16385 /* Don't show field names in SEQUENCE */
16386 
16387 /* Show structure names of each SEQUENCE field */
16388 
16389 /* Don't show structure name even at top level */
16390 
16391 
16392 int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent,
16393                     const ASN1_ITEM *it, const ASN1_PCTX *pctx);
16394 ASN1_PCTX *ASN1_PCTX_new(void);
16395 void ASN1_PCTX_free(ASN1_PCTX *p);
16396 unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p);
16397 void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
16398 unsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p);
16399 void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
16400 unsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p);
16401 void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
16402 unsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p);
16403 void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
16404 unsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p);
16405 void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
16406 
16407 BIO_METHOD *BIO_f_asn1(void);
16408 
16409 BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
16410 
16411 int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
16412                         const ASN1_ITEM *it);
16413 int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
16414                               const char *hdr, const ASN1_ITEM *it);
16415 int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
16416                      int ctype_nid, int econt_nid,
16417                      struct stack_st_X509_ALGOR *mdalgs, const ASN1_ITEM *it);
16418 ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
16419 int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
16420 int SMIME_text(BIO *in, BIO *out);
16421 
16422 /* BEGIN ERROR CODES */
16423 /*
16424  * The following lines are auto generated by the script mkerr.pl. Any changes
16425  * made after this point may be overwritten when the script is next run.
16426  */
16427 
16428 void ERR_load_ASN1_strings(void);
16429 
16430 /* Error codes for the ASN1 functions. */
16431 
16432 /* Function codes. */
16433 # 1298 "/usr/include/openssl/asn1.h" 3 4
16434 /* Reason codes. */
16435 # 966 "/usr/include/openssl/objects.h" 2 3 4
16436 # 984 "/usr/include/openssl/objects.h" 3 4
16437 typedef struct obj_name_st {
16438     int type;
16439     int alias;
16440     const char *name;
16441     const char *data;
16442 } OBJ_NAME;
16443 
16444 
16445 
16446 int OBJ_NAME_init(void);
16447 int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
16448                        int (*cmp_func) (const char *, const char *),
16449                        void (*free_func) (const char *, int, const char *));
16450 const char *OBJ_NAME_get(const char *name, int type);
16451 int OBJ_NAME_add(const char *name, int type, const char *data);
16452 int OBJ_NAME_remove(const char *name, int type);
16453 void OBJ_NAME_cleanup(int type); /* -1 for everything */
16454 void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg),
16455                      void *arg);
16456 void OBJ_NAME_do_all_sorted(int type,
16457                             void (*fn) (const OBJ_NAME *, void *arg),
16458                             void *arg);
16459 
16460 ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o);
16461 ASN1_OBJECT *OBJ_nid2obj(int n);
16462 const char *OBJ_nid2ln(int n);
16463 const char *OBJ_nid2sn(int n);
16464 int OBJ_obj2nid(const ASN1_OBJECT *o);
16465 ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name);
16466 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
16467 int OBJ_txt2nid(const char *s);
16468 int OBJ_ln2nid(const char *s);
16469 int OBJ_sn2nid(const char *s);
16470 int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
16471 const void *OBJ_bsearch_(const void *key, const void *base, int num, int size,
16472                          int (*cmp) (const void *, const void *));
16473 const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
16474                             int size,
16475                             int (*cmp) (const void *, const void *),
16476                             int flags);
16477 # 1035 "/usr/include/openssl/objects.h" 3 4
16478 /*-
16479  * Unsolved problem: if a type is actually a pointer type, like
16480  * nid_triple is, then its impossible to get a const where you need
16481  * it. Consider:
16482  *
16483  * typedef int nid_triple[3];
16484  * const void *a_;
16485  * const nid_triple const *a = a_;
16486  *
16487  * The assignement discards a const because what you really want is:
16488  *
16489  * const int const * const *a = a_;
16490  *
16491  * But if you do that, you lose the fact that a is an array of 3 ints,
16492  * which breaks comparison functions.
16493  *
16494  * Thus we end up having to cast, sadly, or unpack the
16495  * declarations. Or, as I finally did in this case, delcare nid_triple
16496  * to be a struct, which it should have been in the first place.
16497  *
16498  * Ben, August 2008.
16499  *
16500  * Also, strictly speaking not all types need be const, but handling
16501  * the non-constness means a lot of complication, and in practice
16502  * comparison routines do always not touch their arguments.
16503  */
16504 # 1104 "/usr/include/openssl/objects.h" 3 4
16505 int OBJ_new_nid(int num);
16506 int OBJ_add_object(const ASN1_OBJECT *obj);
16507 int OBJ_create(const char *oid, const char *sn, const char *ln);
16508 void OBJ_cleanup(void);
16509 int OBJ_create_objects(BIO *in);
16510 
16511 int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);
16512 int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
16513 int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
16514 void OBJ_sigid_free(void);
16515 
16516 extern int obj_cleanup_defer;
16517 void check_defer(int nid);
16518 
16519 /* BEGIN ERROR CODES */
16520 /*
16521  * The following lines are auto generated by the script mkerr.pl. Any changes
16522  * made after this point may be overwritten when the script is next run.
16523  */
16524 void ERR_load_OBJ_strings(void);
16525 
16526 /* Error codes for the OBJ functions. */
16527 
16528 /* Function codes. */
16529 # 1136 "/usr/include/openssl/objects.h" 3 4
16530 /* Reason codes. */
16531 # 95 "/usr/include/openssl/evp.h" 2 3 4
16532 # 125 "/usr/include/openssl/evp.h" 3 4
16533 /*
16534  * Type needs to be a bit field Sub-type needs to be for variations on the
16535  * method, as in, can it do arbitrary encryption....
16536  */
16537 struct evp_pkey_st {
16538     int type;
16539     int save_type;
16540     int references;
16541     const EVP_PKEY_ASN1_METHOD *ameth;
16542     ENGINE *engine;
16543     union {
16544         char *ptr;
16545 
16546         struct rsa_st *rsa; /* RSA */
16547 
16548 
16549         struct dsa_st *dsa; /* DSA */
16550 
16551 
16552         struct dh_st *dh; /* DH */
16553 
16554 
16555         struct ec_key_st *ec; /* ECC */
16556 
16557     } pkey;
16558     int save_parameters;
16559     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
16560 } /* EVP_PKEY */ ;
16561 
16562 
16563 
16564 
16565 
16566 
16567 
16568 struct env_md_st {
16569     int type;
16570     int pkey_type;
16571     int md_size;
16572     unsigned long flags;
16573     int (*init) (EVP_MD_CTX *ctx);
16574     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
16575     int (*final) (EVP_MD_CTX *ctx, unsigned char *md);
16576     int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from);
16577     int (*cleanup) (EVP_MD_CTX *ctx);
16578     /* FIXME: prototype these some day */
16579     int (*sign) (int type, const unsigned char *m, unsigned int m_length,
16580                  unsigned char *sigret, unsigned int *siglen, void *key);
16581     int (*verify) (int type, const unsigned char *m, unsigned int m_length,
16582                    const unsigned char *sigbuf, unsigned int siglen,
16583                    void *key);
16584     int required_pkey_type[5]; /* EVP_PKEY_xxx */
16585     int block_size;
16586     int ctx_size; /* how big does the ctx->md_data need to be */
16587     /* control function */
16588     int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
16589 } /* EVP_MD */ ;
16590 
16591 typedef int evp_sign_method(int type, const unsigned char *m,
16592                             unsigned int m_length, unsigned char *sigret,
16593                             unsigned int *siglen, void *key);
16594 typedef int evp_verify_method(int type, const unsigned char *m,
16595                               unsigned int m_length,
16596                               const unsigned char *sigbuf,
16597                               unsigned int siglen, void *key);
16598 
16599 /* digest can only handle a single block */
16600 
16601 
16602 /*
16603  * digest is a "clone" digest used
16604  * which is a copy of an existing
16605  * one for a specific public key type.
16606  * EVP_dss1() etc
16607  */
16608 
16609 
16610 /* Digest uses EVP_PKEY_METHOD for signing instead of MD specific signing */
16611 
16612 
16613 
16614 /* DigestAlgorithmIdentifier flags... */
16615 
16616 
16617 
16618 /* NULL or absent parameter accepted. Use NULL */
16619 
16620 
16621 
16622 /* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */
16623 
16624 
16625 
16626 /* Custom handling via ctrl */
16627 
16628 
16629 
16630 /* Note if suitable for use in FIPS mode */
16631 
16632 
16633 /* Digest ctrls */
16634 
16635 
16636 
16637 
16638 /* Minimum Algorithm specific ctrl value */
16639 # 268 "/usr/include/openssl/evp.h" 3 4
16640 struct env_md_ctx_st {
16641     const EVP_MD *digest;
16642     ENGINE *engine; /* functional reference if 'digest' is
16643                                  * ENGINE-provided */
16644     unsigned long flags;
16645     void *md_data;
16646     /* Public key context for sign/verify */
16647     EVP_PKEY_CTX *pctx;
16648     /* Update function: usually copied from EVP_MD */
16649     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
16650 } /* EVP_MD_CTX */ ;
16651 
16652 /* values for EVP_MD_CTX flags */
16653 
16654 
16655 
16656 
16657 
16658 
16659 
16660 /*
16661  * FIPS and pad options are ignored in 1.0.0, definitions are here so we
16662  * don't accidentally reuse the values for other purposes.
16663  */
16664 
16665 
16666 
16667 
16668 /*
16669  * The following PAD options are also currently ignored in 1.0.0, digest
16670  * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*()
16671  * instead.
16672  */
16673 
16674 
16675 
16676 
16677 
16678 
16679 
16680 struct evp_cipher_st {
16681     int nid;
16682     int block_size;
16683     /* Default value for variable length ciphers */
16684     int key_len;
16685     int iv_len;
16686     /* Various flags */
16687     unsigned long flags;
16688     /* init key */
16689     int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key,
16690                  const unsigned char *iv, int enc);
16691     /* encrypt/decrypt data */
16692     int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out,
16693                       const unsigned char *in, size_t inl);
16694     /* cleanup ctx */
16695     int (*cleanup) (EVP_CIPHER_CTX *);
16696     /* how big ctx->cipher_data needs to be */
16697     int ctx_size;
16698     /* Populate a ASN1_TYPE with parameters */
16699     int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
16700     /* Get parameters from a ASN1_TYPE */
16701     int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
16702     /* Miscellaneous operations */
16703     int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr);
16704     /* Application data */
16705     void *app_data;
16706 } /* EVP_CIPHER */ ;
16707 
16708 /* Values for cipher flags */
16709 
16710 /* Modes for ciphers */
16711 # 351 "/usr/include/openssl/evp.h" 3 4
16712 /* Set if variable length cipher */
16713 
16714 /* Set if the iv handling should be done by the cipher itself */
16715 
16716 /* Set if the cipher's init() function should be called if key is NULL */
16717 
16718 /* Call ctrl() to init cipher parameters */
16719 
16720 /* Don't use standard key length function */
16721 
16722 /* Don't use standard block padding */
16723 
16724 /* cipher handles random key generation */
16725 
16726 /* cipher has its own additional copying logic */
16727 
16728 /* Allow use default ASN1 get/set iv */
16729 
16730 /* Buffer length in bits not bytes: CFB1 mode only */
16731 
16732 /* Note if suitable for use in FIPS mode */
16733 
16734 /* Allow non FIPS cipher in FIPS mode */
16735 
16736 /*
16737  * Cipher handles any and all padding logic as well as finalisation.
16738  */
16739 
16740 
16741 
16742 
16743 /*
16744  * Cipher context flag to indicate we can handle wrap mode: if allowed in
16745  * older applications it could overflow buffers.
16746  */
16747 
16748 
16749 
16750 /* ctrl() values */
16751 # 410 "/usr/include/openssl/evp.h" 3 4
16752 /*
16753  * AEAD cipher deduces payload length and returns number of bytes required to
16754  * store MAC and eventual padding. Subsequent call to EVP_Cipher even
16755  * appends/verifies MAC.
16756  */
16757 
16758 /* Used by composite AEAD ciphers, no-op in GCM, CCM... */
16759 
16760 /* Set the GCM invocation field, decrypt only */
16761 
16762 
16763 
16764 
16765 
16766 
16767 
16768 /* RFC 5246 defines additional data to be 13 bytes in length */
16769 
16770 
16771 typedef struct {
16772     unsigned char *out;
16773     const unsigned char *inp;
16774     size_t len;
16775     unsigned int interleave;
16776 } EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM;
16777 
16778 /* GCM TLS constants */
16779 /* Length of fixed part of IV derived from PRF */
16780 
16781 /* Length of explicit part of IV part of TLS records */
16782 
16783 /* Length of tag for TLS */
16784 
16785 
16786 typedef struct evp_cipher_info_st {
16787     const EVP_CIPHER *cipher;
16788     unsigned char iv[16];
16789 } EVP_CIPHER_INFO;
16790 
16791 struct evp_cipher_ctx_st {
16792     const EVP_CIPHER *cipher;
16793     ENGINE *engine; /* functional reference if 'cipher' is
16794                                  * ENGINE-provided */
16795     int encrypt; /* encrypt or decrypt */
16796     int buf_len; /* number we have left */
16797     unsigned char oiv[16]; /* original iv */
16798     unsigned char iv[16]; /* working iv */
16799     unsigned char buf[32]; /* saved partial block */
16800     int num; /* used by cfb/ofb/ctr mode */
16801     void *app_data; /* application stuff */
16802     int key_len; /* May change for variable length cipher */
16803     unsigned long flags; /* Various flags */
16804     void *cipher_data; /* per EVP data */
16805     int final_used;
16806     int block_mask;
16807     unsigned char final[32]; /* possible final block */
16808 } /* EVP_CIPHER_CTX */ ;
16809 
16810 typedef struct evp_Encode_Ctx_st {
16811     /* number saved in a partial encode/decode */
16812     int num;
16813     /*
16814      * The length is either the output line length (in input bytes) or the
16815      * shortest input line length that is ok.  Once decoding begins, the
16816      * length is adjusted up each time a longer line is decoded
16817      */
16818     int length;
16819     /* data to encode */
16820     unsigned char enc_data[80];
16821     /* number read on current line */
16822     int line_num;
16823     int expect_nl;
16824 } EVP_ENCODE_CTX;
16825 
16826 /* Password based encryption function */
16827 typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass,
16828                               int passlen, ASN1_TYPE *param,
16829                               const EVP_CIPHER *cipher, const EVP_MD *md,
16830                               int en_de);
16831 # 510 "/usr/include/openssl/evp.h" 3 4
16832 /* Add some extra combinations */
16833 
16834 
16835 
16836 
16837 
16838 int EVP_MD_type(const EVP_MD *md);
16839 
16840 
16841 int EVP_MD_pkey_type(const EVP_MD *md);
16842 int EVP_MD_size(const EVP_MD *md);
16843 int EVP_MD_block_size(const EVP_MD *md);
16844 unsigned long EVP_MD_flags(const EVP_MD *md);
16845 
16846 const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
16847 
16848 
16849 
16850 
16851 int EVP_CIPHER_nid(const EVP_CIPHER *cipher);
16852 
16853 int EVP_CIPHER_block_size(const EVP_CIPHER *cipher);
16854 int EVP_CIPHER_key_length(const EVP_CIPHER *cipher);
16855 int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher);
16856 unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher);
16857 
16858 
16859 const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);
16860 int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx);
16861 int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx);
16862 int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx);
16863 int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx);
16864 int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
16865 void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
16866 void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);
16867 
16868 unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx);
16869 # 574 "/usr/include/openssl/evp.h" 3 4
16870 int EVP_Cipher(EVP_CIPHER_CTX *c,
16871                unsigned char *out, const unsigned char *in, unsigned int inl);
16872 # 586 "/usr/include/openssl/evp.h" 3 4
16873 void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
16874 int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
16875 EVP_MD_CTX *EVP_MD_CTX_create(void);
16876 void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
16877 int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
16878 void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
16879 void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
16880 int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
16881 int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
16882 int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
16883 int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
16884 int EVP_Digest(const void *data, size_t count,
16885                unsigned char *md, unsigned int *size, const EVP_MD *type,
16886                ENGINE *impl);
16887 
16888 int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in);
16889 int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
16890 int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
16891 
16892 int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);
16893 int EVP_read_pw_string_min(char *buf, int minlen, int maxlen,
16894                            const char *prompt, int verify);
16895 void EVP_set_pw_prompt(const char *prompt);
16896 char *EVP_get_pw_prompt(void);
16897 
16898 int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
16899                    const unsigned char *salt, const unsigned char *data,
16900                    int datal, int count, unsigned char *key,
16901                    unsigned char *iv);
16902 
16903 void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
16904 void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
16905 int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);
16906 
16907 int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
16908                     const unsigned char *key, const unsigned char *iv);
16909 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
16910                        ENGINE *impl, const unsigned char *key,
16911                        const unsigned char *iv);
16912 int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
16913                       const unsigned char *in, int inl);
16914 int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
16915 int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
16916 
16917 int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
16918                     const unsigned char *key, const unsigned char *iv);
16919 int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
16920                        ENGINE *impl, const unsigned char *key,
16921                        const unsigned char *iv);
16922 int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
16923                       const unsigned char *in, int inl);
16924 int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
16925 int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
16926 
16927 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
16928                    const unsigned char *key, const unsigned char *iv,
16929                    int enc);
16930 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
16931                       ENGINE *impl, const unsigned char *key,
16932                       const unsigned char *iv, int enc);
16933 int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
16934                      const unsigned char *in, int inl);
16935 int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
16936 int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
16937 
16938 int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
16939                   EVP_PKEY *pkey);
16940 
16941 int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
16942                     unsigned int siglen, EVP_PKEY *pkey);
16943 
16944 int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
16945                        const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
16946 int EVP_DigestSignFinal(EVP_MD_CTX *ctx,
16947                         unsigned char *sigret, size_t *siglen);
16948 
16949 int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
16950                          const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
16951 int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx,
16952                           const unsigned char *sig, size_t siglen);
16953 
16954 int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
16955                  const unsigned char *ek, int ekl, const unsigned char *iv,
16956                  EVP_PKEY *priv);
16957 int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
16958 
16959 int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
16960                  unsigned char **ek, int *ekl, unsigned char *iv,
16961                  EVP_PKEY **pubk, int npubk);
16962 int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
16963 
16964 void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
16965 void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
16966                       const unsigned char *in, int inl);
16967 void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
16968 int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
16969 
16970 void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
16971 int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
16972                      const unsigned char *in, int inl);
16973 int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
16974                     char *out, int *outl);
16975 int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
16976 
16977 void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
16978 int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
16979 EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
16980 void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a);
16981 int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
16982 int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
16983 int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
16984 int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
16985 
16986 
16987 BIO_METHOD *BIO_f_md(void);
16988 BIO_METHOD *BIO_f_base64(void);
16989 BIO_METHOD *BIO_f_cipher(void);
16990 BIO_METHOD *BIO_f_reliable(void);
16991 void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
16992                     const unsigned char *i, int enc);
16993 
16994 
16995 const EVP_MD *EVP_md_null(void);
16996 
16997 const EVP_MD *EVP_md2(void);
16998 
16999 
17000 const EVP_MD *EVP_md4(void);
17001 
17002 
17003 const EVP_MD *EVP_md5(void);
17004 
17005 
17006 const EVP_MD *EVP_sha(void);
17007 const EVP_MD *EVP_sha1(void);
17008 const EVP_MD *EVP_dss(void);
17009 const EVP_MD *EVP_dss1(void);
17010 const EVP_MD *EVP_ecdsa(void);
17011 
17012 
17013 const EVP_MD *EVP_sha224(void);
17014 const EVP_MD *EVP_sha256(void);
17015 
17016 
17017 const EVP_MD *EVP_sha384(void);
17018 const EVP_MD *EVP_sha512(void);
17019 
17020 
17021 
17022 
17023 
17024 const EVP_MD *EVP_ripemd160(void);
17025 
17026 
17027 
17028 
17029 const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */
17030 
17031 const EVP_CIPHER *EVP_des_ecb(void);
17032 const EVP_CIPHER *EVP_des_ede(void);
17033 const EVP_CIPHER *EVP_des_ede3(void);
17034 const EVP_CIPHER *EVP_des_ede_ecb(void);
17035 const EVP_CIPHER *EVP_des_ede3_ecb(void);
17036 const EVP_CIPHER *EVP_des_cfb64(void);
17037 
17038 const EVP_CIPHER *EVP_des_cfb1(void);
17039 const EVP_CIPHER *EVP_des_cfb8(void);
17040 const EVP_CIPHER *EVP_des_ede_cfb64(void);
17041 
17042 
17043 
17044 
17045 
17046 const EVP_CIPHER *EVP_des_ede3_cfb64(void);
17047 
17048 const EVP_CIPHER *EVP_des_ede3_cfb1(void);
17049 const EVP_CIPHER *EVP_des_ede3_cfb8(void);
17050 const EVP_CIPHER *EVP_des_ofb(void);
17051 const EVP_CIPHER *EVP_des_ede_ofb(void);
17052 const EVP_CIPHER *EVP_des_ede3_ofb(void);
17053 const EVP_CIPHER *EVP_des_cbc(void);
17054 const EVP_CIPHER *EVP_des_ede_cbc(void);
17055 const EVP_CIPHER *EVP_des_ede3_cbc(void);
17056 const EVP_CIPHER *EVP_desx_cbc(void);
17057 const EVP_CIPHER *EVP_des_ede3_wrap(void);
17058 /*
17059  * This should now be supported through the dev_crypto ENGINE. But also, why
17060  * are rc4 and md5 declarations made here inside a "NO_DES" precompiler
17061  * branch?
17062  */
17063 # 785 "/usr/include/openssl/evp.h" 3 4
17064 const EVP_CIPHER *EVP_rc4(void);
17065 const EVP_CIPHER *EVP_rc4_40(void);
17066 
17067 const EVP_CIPHER *EVP_rc4_hmac_md5(void);
17068 # 799 "/usr/include/openssl/evp.h" 3 4
17069 const EVP_CIPHER *EVP_rc2_ecb(void);
17070 const EVP_CIPHER *EVP_rc2_cbc(void);
17071 const EVP_CIPHER *EVP_rc2_40_cbc(void);
17072 const EVP_CIPHER *EVP_rc2_64_cbc(void);
17073 const EVP_CIPHER *EVP_rc2_cfb64(void);
17074 
17075 const EVP_CIPHER *EVP_rc2_ofb(void);
17076 
17077 
17078 const EVP_CIPHER *EVP_bf_ecb(void);
17079 const EVP_CIPHER *EVP_bf_cbc(void);
17080 const EVP_CIPHER *EVP_bf_cfb64(void);
17081 
17082 const EVP_CIPHER *EVP_bf_ofb(void);
17083 
17084 
17085 const EVP_CIPHER *EVP_cast5_ecb(void);
17086 const EVP_CIPHER *EVP_cast5_cbc(void);
17087 const EVP_CIPHER *EVP_cast5_cfb64(void);
17088 
17089 const EVP_CIPHER *EVP_cast5_ofb(void);
17090 # 829 "/usr/include/openssl/evp.h" 3 4
17091 const EVP_CIPHER *EVP_aes_128_ecb(void);
17092 const EVP_CIPHER *EVP_aes_128_cbc(void);
17093 const EVP_CIPHER *EVP_aes_128_cfb1(void);
17094 const EVP_CIPHER *EVP_aes_128_cfb8(void);
17095 const EVP_CIPHER *EVP_aes_128_cfb128(void);
17096 
17097 const EVP_CIPHER *EVP_aes_128_ofb(void);
17098 const EVP_CIPHER *EVP_aes_128_ctr(void);
17099 const EVP_CIPHER *EVP_aes_128_ccm(void);
17100 const EVP_CIPHER *EVP_aes_128_gcm(void);
17101 const EVP_CIPHER *EVP_aes_128_xts(void);
17102 const EVP_CIPHER *EVP_aes_128_wrap(void);
17103 const EVP_CIPHER *EVP_aes_192_ecb(void);
17104 const EVP_CIPHER *EVP_aes_192_cbc(void);
17105 const EVP_CIPHER *EVP_aes_192_cfb1(void);
17106 const EVP_CIPHER *EVP_aes_192_cfb8(void);
17107 const EVP_CIPHER *EVP_aes_192_cfb128(void);
17108 
17109 const EVP_CIPHER *EVP_aes_192_ofb(void);
17110 const EVP_CIPHER *EVP_aes_192_ctr(void);
17111 const EVP_CIPHER *EVP_aes_192_ccm(void);
17112 const EVP_CIPHER *EVP_aes_192_gcm(void);
17113 const EVP_CIPHER *EVP_aes_192_wrap(void);
17114 const EVP_CIPHER *EVP_aes_256_ecb(void);
17115 const EVP_CIPHER *EVP_aes_256_cbc(void);
17116 const EVP_CIPHER *EVP_aes_256_cfb1(void);
17117 const EVP_CIPHER *EVP_aes_256_cfb8(void);
17118 const EVP_CIPHER *EVP_aes_256_cfb128(void);
17119 
17120 const EVP_CIPHER *EVP_aes_256_ofb(void);
17121 const EVP_CIPHER *EVP_aes_256_ctr(void);
17122 const EVP_CIPHER *EVP_aes_256_ccm(void);
17123 const EVP_CIPHER *EVP_aes_256_gcm(void);
17124 const EVP_CIPHER *EVP_aes_256_xts(void);
17125 const EVP_CIPHER *EVP_aes_256_wrap(void);
17126 
17127 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void);
17128 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void);
17129 
17130 
17131 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void);
17132 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void);
17133 
17134 
17135 
17136 const EVP_CIPHER *EVP_camellia_128_ecb(void);
17137 const EVP_CIPHER *EVP_camellia_128_cbc(void);
17138 const EVP_CIPHER *EVP_camellia_128_cfb1(void);
17139 const EVP_CIPHER *EVP_camellia_128_cfb8(void);
17140 const EVP_CIPHER *EVP_camellia_128_cfb128(void);
17141 
17142 const EVP_CIPHER *EVP_camellia_128_ofb(void);
17143 const EVP_CIPHER *EVP_camellia_192_ecb(void);
17144 const EVP_CIPHER *EVP_camellia_192_cbc(void);
17145 const EVP_CIPHER *EVP_camellia_192_cfb1(void);
17146 const EVP_CIPHER *EVP_camellia_192_cfb8(void);
17147 const EVP_CIPHER *EVP_camellia_192_cfb128(void);
17148 
17149 const EVP_CIPHER *EVP_camellia_192_ofb(void);
17150 const EVP_CIPHER *EVP_camellia_256_ecb(void);
17151 const EVP_CIPHER *EVP_camellia_256_cbc(void);
17152 const EVP_CIPHER *EVP_camellia_256_cfb1(void);
17153 const EVP_CIPHER *EVP_camellia_256_cfb8(void);
17154 const EVP_CIPHER *EVP_camellia_256_cfb128(void);
17155 
17156 const EVP_CIPHER *EVP_camellia_256_ofb(void);
17157 # 905 "/usr/include/openssl/evp.h" 3 4
17158 void OPENSSL_add_all_algorithms_noconf(void);
17159 void OPENSSL_add_all_algorithms_conf(void);
17160 # 916 "/usr/include/openssl/evp.h" 3 4
17161 void OpenSSL_add_all_ciphers(void);
17162 void OpenSSL_add_all_digests(void);
17163 
17164 
17165 
17166 
17167 int EVP_add_cipher(const EVP_CIPHER *cipher);
17168 int EVP_add_digest(const EVP_MD *digest);
17169 
17170 const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
17171 const EVP_MD *EVP_get_digestbyname(const char *name);
17172 void EVP_cleanup(void);
17173 
17174 void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph,
17175                                    const char *from, const char *to, void *x),
17176                        void *arg);
17177 void EVP_CIPHER_do_all_sorted(void (*fn)
17178                                (const EVP_CIPHER *ciph, const char *from,
17179                                 const char *to, void *x), void *arg);
17180 
17181 void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph,
17182                                const char *from, const char *to, void *x),
17183                    void *arg);
17184 void EVP_MD_do_all_sorted(void (*fn)
17185                            (const EVP_MD *ciph, const char *from,
17186                             const char *to, void *x), void *arg);
17187 
17188 int EVP_PKEY_decrypt_old(unsigned char *dec_key,
17189                          const unsigned char *enc_key, int enc_key_len,
17190                          EVP_PKEY *private_key);
17191 int EVP_PKEY_encrypt_old(unsigned char *enc_key,
17192                          const unsigned char *key, int key_len,
17193                          EVP_PKEY *pub_key);
17194 int EVP_PKEY_type(int type);
17195 int EVP_PKEY_id(const EVP_PKEY *pkey);
17196 int EVP_PKEY_base_id(const EVP_PKEY *pkey);
17197 int EVP_PKEY_bits(EVP_PKEY *pkey);
17198 int EVP_PKEY_size(EVP_PKEY *pkey);
17199 int EVP_PKEY_set_type(EVP_PKEY *pkey, int type);
17200 int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
17201 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
17202 void *EVP_PKEY_get0(EVP_PKEY *pkey);
17203 
17204 
17205 struct rsa_st;
17206 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key);
17207 struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
17208 
17209 
17210 struct dsa_st;
17211 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key);
17212 struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
17213 
17214 
17215 struct dh_st;
17216 int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key);
17217 struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
17218 
17219 
17220 struct ec_key_st;
17221 int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);
17222 struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
17223 
17224 
17225 EVP_PKEY *EVP_PKEY_new(void);
17226 void EVP_PKEY_free(EVP_PKEY *pkey);
17227 
17228 EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
17229                         long length);
17230 int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);
17231 
17232 EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
17233                          long length);
17234 EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,
17235                              long length);
17236 int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp);
17237 
17238 int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
17239 int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
17240 int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);
17241 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
17242 
17243 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
17244 
17245 int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
17246                           int indent, ASN1_PCTX *pctx);
17247 int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
17248                            int indent, ASN1_PCTX *pctx);
17249 int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
17250                           int indent, ASN1_PCTX *pctx);
17251 
17252 int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
17253 
17254 int EVP_CIPHER_type(const EVP_CIPHER *ctx);
17255 
17256 /* calls methods */
17257 int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
17258 int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
17259 
17260 /* These are used by EVP_CIPHER methods */
17261 int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
17262 int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
17263 
17264 /* PKCS5 password based encryption */
17265 int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
17266                        ASN1_TYPE *param, const EVP_CIPHER *cipher,
17267                        const EVP_MD *md, int en_de);
17268 int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
17269                            const unsigned char *salt, int saltlen, int iter,
17270                            int keylen, unsigned char *out);
17271 int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
17272                       const unsigned char *salt, int saltlen, int iter,
17273                       const EVP_MD *digest, int keylen, unsigned char *out);
17274 int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
17275                           ASN1_TYPE *param, const EVP_CIPHER *cipher,
17276                           const EVP_MD *md, int en_de);
17277 
17278 void PKCS5_PBE_add(void);
17279 
17280 int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
17281                        ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
17282 
17283 /* PBE type */
17284 
17285 /* Can appear as the outermost AlgorithmIdentifier */
17286 
17287 /* Is an PRF type OID */
17288 
17289 
17290 int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
17291                          int md_nid, EVP_PBE_KEYGEN *keygen);
17292 int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
17293                     EVP_PBE_KEYGEN *keygen);
17294 int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid,
17295                  EVP_PBE_KEYGEN **pkeygen);
17296 void EVP_PBE_cleanup(void);
17297 # 1064 "/usr/include/openssl/evp.h" 3 4
17298 int EVP_PKEY_asn1_get_count(void);
17299 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
17300 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
17301 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
17302                                                    const char *str, int len);
17303 int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
17304 int EVP_PKEY_asn1_add_alias(int to, int from);
17305 int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
17306                             int *ppkey_flags, const char **pinfo,
17307                             const char **ppem_str,
17308                             const EVP_PKEY_ASN1_METHOD *ameth);
17309 
17310 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(EVP_PKEY *pkey);
17311 EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,
17312                                         const char *pem_str,
17313                                         const char *info);
17314 void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
17315                         const EVP_PKEY_ASN1_METHOD *src);
17316 void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
17317 void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
17318                               int (*pub_decode) (EVP_PKEY *pk,
17319                                                  X509_PUBKEY *pub),
17320                               int (*pub_encode) (X509_PUBKEY *pub,
17321                                                  const EVP_PKEY *pk),
17322                               int (*pub_cmp) (const EVP_PKEY *a,
17323                                               const EVP_PKEY *b),
17324                               int (*pub_print) (BIO *out,
17325                                                 const EVP_PKEY *pkey,
17326                                                 int indent, ASN1_PCTX *pctx),
17327                               int (*pkey_size) (const EVP_PKEY *pk),
17328                               int (*pkey_bits) (const EVP_PKEY *pk));
17329 void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
17330                                int (*priv_decode) (EVP_PKEY *pk,
17331                                                    PKCS8_PRIV_KEY_INFO
17332                                                    *p8inf),
17333                                int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8,
17334                                                    const EVP_PKEY *pk),
17335                                int (*priv_print) (BIO *out,
17336                                                   const EVP_PKEY *pkey,
17337                                                   int indent,
17338                                                   ASN1_PCTX *pctx));
17339 void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
17340                              int (*param_decode) (EVP_PKEY *pkey,
17341                                                   const unsigned char **pder,
17342                                                   int derlen),
17343                              int (*param_encode) (const EVP_PKEY *pkey,
17344                                                   unsigned char **pder),
17345                              int (*param_missing) (const EVP_PKEY *pk),
17346                              int (*param_copy) (EVP_PKEY *to,
17347                                                 const EVP_PKEY *from),
17348                              int (*param_cmp) (const EVP_PKEY *a,
17349                                                const EVP_PKEY *b),
17350                              int (*param_print) (BIO *out,
17351                                                  const EVP_PKEY *pkey,
17352                                                  int indent,
17353                                                  ASN1_PCTX *pctx));
17354 
17355 void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
17356                             void (*pkey_free) (EVP_PKEY *pkey));
17357 void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
17358                             int (*pkey_ctrl) (EVP_PKEY *pkey, int op,
17359                                               long arg1, void *arg2));
17360 void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
17361                             int (*item_verify) (EVP_MD_CTX *ctx,
17362                                                 const ASN1_ITEM *it,
17363                                                 void *asn,
17364                                                 X509_ALGOR *a,
17365                                                 ASN1_BIT_STRING *sig,
17366                                                 EVP_PKEY *pkey),
17367                             int (*item_sign) (EVP_MD_CTX *ctx,
17368                                               const ASN1_ITEM *it,
17369                                               void *asn,
17370                                               X509_ALGOR *alg1,
17371                                               X509_ALGOR *alg2,
17372                                               ASN1_BIT_STRING *sig));
17373 # 1185 "/usr/include/openssl/evp.h" 3 4
17374 /* Used by GOST key encryption in TLS */
17375 # 1199 "/usr/include/openssl/evp.h" 3 4
17376 /*
17377  * Method handles all operations: don't assume any digest related defaults.
17378  */
17379 
17380 
17381 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
17382 EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);
17383 void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
17384                              const EVP_PKEY_METHOD *meth);
17385 void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src);
17386 void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
17387 int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
17388 
17389 EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
17390 EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
17391 EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
17392 void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
17393 
17394 int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
17395                       int cmd, int p1, void *p2);
17396 int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
17397                           const char *value);
17398 
17399 int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);
17400 void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);
17401 
17402 EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
17403                                const unsigned char *key, int keylen);
17404 
17405 void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
17406 void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx);
17407 EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
17408 
17409 EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
17410 
17411 void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
17412 void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
17413 
17414 int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
17415 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
17416                   unsigned char *sig, size_t *siglen,
17417                   const unsigned char *tbs, size_t tbslen);
17418 int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
17419 int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
17420                     const unsigned char *sig, size_t siglen,
17421                     const unsigned char *tbs, size_t tbslen);
17422 int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
17423 int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
17424                             unsigned char *rout, size_t *routlen,
17425                             const unsigned char *sig, size_t siglen);
17426 int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
17427 int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
17428                      unsigned char *out, size_t *outlen,
17429                      const unsigned char *in, size_t inlen);
17430 int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
17431 int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
17432                      unsigned char *out, size_t *outlen,
17433                      const unsigned char *in, size_t inlen);
17434 
17435 int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
17436 int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
17437 int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
17438 
17439 typedef int EVP_PKEY_gen_cb (EVP_PKEY_CTX *ctx);
17440 
17441 int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
17442 int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
17443 int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
17444 int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
17445 
17446 void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
17447 EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
17448 
17449 int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
17450 
17451 void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
17452                             int (*init) (EVP_PKEY_CTX *ctx));
17453 
17454 void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth,
17455                             int (*copy) (EVP_PKEY_CTX *dst,
17456                                          EVP_PKEY_CTX *src));
17457 
17458 void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth,
17459                                void (*cleanup) (EVP_PKEY_CTX *ctx));
17460 
17461 void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth,
17462                                 int (*paramgen_init) (EVP_PKEY_CTX *ctx),
17463                                 int (*paramgen) (EVP_PKEY_CTX *ctx,
17464                                                  EVP_PKEY *pkey));
17465 
17466 void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth,
17467                               int (*keygen_init) (EVP_PKEY_CTX *ctx),
17468                               int (*keygen) (EVP_PKEY_CTX *ctx,
17469                                              EVP_PKEY *pkey));
17470 
17471 void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth,
17472                             int (*sign_init) (EVP_PKEY_CTX *ctx),
17473                             int (*sign) (EVP_PKEY_CTX *ctx,
17474                                          unsigned char *sig, size_t *siglen,
17475                                          const unsigned char *tbs,
17476                                          size_t tbslen));
17477 
17478 void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth,
17479                               int (*verify_init) (EVP_PKEY_CTX *ctx),
17480                               int (*verify) (EVP_PKEY_CTX *ctx,
17481                                              const unsigned char *sig,
17482                                              size_t siglen,
17483                                              const unsigned char *tbs,
17484                                              size_t tbslen));
17485 
17486 void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth,
17487                                       int (*verify_recover_init) (EVP_PKEY_CTX
17488                                                                   *ctx),
17489                                       int (*verify_recover) (EVP_PKEY_CTX
17490                                                              *ctx,
17491                                                              unsigned char
17492                                                              *sig,
17493                                                              size_t *siglen,
17494                                                              const unsigned
17495                                                              char *tbs,
17496                                                              size_t tbslen));
17497 
17498 void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth,
17499                                int (*signctx_init) (EVP_PKEY_CTX *ctx,
17500                                                     EVP_MD_CTX *mctx),
17501                                int (*signctx) (EVP_PKEY_CTX *ctx,
17502                                                unsigned char *sig,
17503                                                size_t *siglen,
17504                                                EVP_MD_CTX *mctx));
17505 
17506 void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth,
17507                                  int (*verifyctx_init) (EVP_PKEY_CTX *ctx,
17508                                                         EVP_MD_CTX *mctx),
17509                                  int (*verifyctx) (EVP_PKEY_CTX *ctx,
17510                                                    const unsigned char *sig,
17511                                                    int siglen,
17512                                                    EVP_MD_CTX *mctx));
17513 
17514 void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth,
17515                                int (*encrypt_init) (EVP_PKEY_CTX *ctx),
17516                                int (*encryptfn) (EVP_PKEY_CTX *ctx,
17517                                                  unsigned char *out,
17518                                                  size_t *outlen,
17519                                                  const unsigned char *in,
17520                                                  size_t inlen));
17521 
17522 void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth,
17523                                int (*decrypt_init) (EVP_PKEY_CTX *ctx),
17524                                int (*decrypt) (EVP_PKEY_CTX *ctx,
17525                                                unsigned char *out,
17526                                                size_t *outlen,
17527                                                const unsigned char *in,
17528                                                size_t inlen));
17529 
17530 void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth,
17531                               int (*derive_init) (EVP_PKEY_CTX *ctx),
17532                               int (*derive) (EVP_PKEY_CTX *ctx,
17533                                              unsigned char *key,
17534                                              size_t *keylen));
17535 
17536 void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
17537                             int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
17538                                          void *p2),
17539                             int (*ctrl_str) (EVP_PKEY_CTX *ctx,
17540                                              const char *type,
17541                                              const char *value));
17542 
17543 void EVP_PKEY_meth_get_init(EVP_PKEY_METHOD *pmeth,
17544                             int (**pinit) (EVP_PKEY_CTX *ctx));
17545 
17546 void EVP_PKEY_meth_get_copy(EVP_PKEY_METHOD *pmeth,
17547                             int (**pcopy) (EVP_PKEY_CTX *dst,
17548                                            EVP_PKEY_CTX *src));
17549 
17550 void EVP_PKEY_meth_get_cleanup(EVP_PKEY_METHOD *pmeth,
17551                                void (**pcleanup) (EVP_PKEY_CTX *ctx));
17552 
17553 void EVP_PKEY_meth_get_paramgen(EVP_PKEY_METHOD *pmeth,
17554                                 int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
17555                                 int (**pparamgen) (EVP_PKEY_CTX *ctx,
17556                                                    EVP_PKEY *pkey));
17557 
17558 void EVP_PKEY_meth_get_keygen(EVP_PKEY_METHOD *pmeth,
17559                               int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
17560                               int (**pkeygen) (EVP_PKEY_CTX *ctx,
17561                                                EVP_PKEY *pkey));
17562 
17563 void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
17564                             int (**psign_init) (EVP_PKEY_CTX *ctx),
17565                             int (**psign) (EVP_PKEY_CTX *ctx,
17566                                            unsigned char *sig, size_t *siglen,
17567                                            const unsigned char *tbs,
17568                                            size_t tbslen));
17569 
17570 void EVP_PKEY_meth_get_verify(EVP_PKEY_METHOD *pmeth,
17571                               int (**pverify_init) (EVP_PKEY_CTX *ctx),
17572                               int (**pverify) (EVP_PKEY_CTX *ctx,
17573                                                const unsigned char *sig,
17574                                                size_t siglen,
17575                                                const unsigned char *tbs,
17576                                                size_t tbslen));
17577 
17578 void EVP_PKEY_meth_get_verify_recover(EVP_PKEY_METHOD *pmeth,
17579                                       int (**pverify_recover_init) (EVP_PKEY_CTX
17580                                                                     *ctx),
17581                                       int (**pverify_recover) (EVP_PKEY_CTX
17582                                                                *ctx,
17583                                                                unsigned char
17584                                                                *sig,
17585                                                                size_t *siglen,
17586                                                                const unsigned
17587                                                                char *tbs,
17588                                                                size_t tbslen));
17589 
17590 void EVP_PKEY_meth_get_signctx(EVP_PKEY_METHOD *pmeth,
17591                                int (**psignctx_init) (EVP_PKEY_CTX *ctx,
17592                                                       EVP_MD_CTX *mctx),
17593                                int (**psignctx) (EVP_PKEY_CTX *ctx,
17594                                                  unsigned char *sig,
17595                                                  size_t *siglen,
17596                                                  EVP_MD_CTX *mctx));
17597 
17598 void EVP_PKEY_meth_get_verifyctx(EVP_PKEY_METHOD *pmeth,
17599                                  int (**pverifyctx_init) (EVP_PKEY_CTX *ctx,
17600                                                           EVP_MD_CTX *mctx),
17601                                  int (**pverifyctx) (EVP_PKEY_CTX *ctx,
17602                                                      const unsigned char *sig,
17603                                                      int siglen,
17604                                                      EVP_MD_CTX *mctx));
17605 
17606 void EVP_PKEY_meth_get_encrypt(EVP_PKEY_METHOD *pmeth,
17607                                int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
17608                                int (**pencryptfn) (EVP_PKEY_CTX *ctx,
17609                                                    unsigned char *out,
17610                                                    size_t *outlen,
17611                                                    const unsigned char *in,
17612                                                    size_t inlen));
17613 
17614 void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
17615                                int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
17616                                int (**pdecrypt) (EVP_PKEY_CTX *ctx,
17617                                                  unsigned char *out,
17618                                                  size_t *outlen,
17619                                                  const unsigned char *in,
17620                                                  size_t inlen));
17621 
17622 void EVP_PKEY_meth_get_derive(EVP_PKEY_METHOD *pmeth,
17623                               int (**pderive_init) (EVP_PKEY_CTX *ctx),
17624                               int (**pderive) (EVP_PKEY_CTX *ctx,
17625                                                unsigned char *key,
17626                                                size_t *keylen));
17627 
17628 void EVP_PKEY_meth_get_ctrl(EVP_PKEY_METHOD *pmeth,
17629                             int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
17630                                            void *p2),
17631                             int (**pctrl_str) (EVP_PKEY_CTX *ctx,
17632                                                const char *type,
17633                                                const char *value));
17634 
17635 void EVP_add_alg_module(void);
17636 
17637 /* BEGIN ERROR CODES */
17638 /*
17639  * The following lines are auto generated by the script mkerr.pl. Any changes
17640  * made after this point may be overwritten when the script is next run.
17641  */
17642 
17643 void ERR_load_EVP_strings(void);
17644 
17645 /* Error codes for the EVP functions. */
17646 
17647 /* Function codes. */
17648 # 1554 "/usr/include/openssl/evp.h" 3 4
17649 /* Reason codes. */
17650 # 74 "/usr/include/openssl/x509.h" 2 3 4
17651 
17652 
17653 # 1 "/usr/include/openssl/bio.h" 1 3 4
17654 /* crypto/bio/bio.h */
17655 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17656  * All rights reserved.
17657  *
17658  * This package is an SSL implementation written
17659  * by Eric Young (eay@cryptsoft.com).
17660  * The implementation was written so as to conform with Netscapes SSL.
17661  *
17662  * This library is free for commercial and non-commercial use as long as
17663  * the following conditions are aheared to.  The following conditions
17664  * apply to all code found in this distribution, be it the RC4, RSA,
17665  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17666  * included with this distribution is covered by the same copyright terms
17667  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17668  *
17669  * Copyright remains Eric Young's, and as such any Copyright notices in
17670  * the code are not to be removed.
17671  * If this package is used in a product, Eric Young should be given attribution
17672  * as the author of the parts of the library used.
17673  * This can be in the form of a textual message at program startup or
17674  * in documentation (online or textual) provided with the package.
17675  *
17676  * Redistribution and use in source and binary forms, with or without
17677  * modification, are permitted provided that the following conditions
17678  * are met:
17679  * 1. Redistributions of source code must retain the copyright
17680  *    notice, this list of conditions and the following disclaimer.
17681  * 2. Redistributions in binary form must reproduce the above copyright
17682  *    notice, this list of conditions and the following disclaimer in the
17683  *    documentation and/or other materials provided with the distribution.
17684  * 3. All advertising materials mentioning features or use of this software
17685  *    must display the following acknowledgement:
17686  *    "This product includes cryptographic software written by
17687  *     Eric Young (eay@cryptsoft.com)"
17688  *    The word 'cryptographic' can be left out if the rouines from the library
17689  *    being used are not cryptographic related :-).
17690  * 4. If you include any Windows specific code (or a derivative thereof) from
17691  *    the apps directory (application code) you must include an acknowledgement:
17692  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17693  *
17694  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17695  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17696  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17697  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17698  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17699  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17700  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17701  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17702  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17703  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17704  * SUCH DAMAGE.
17705  *
17706  * The licence and distribution terms for any publically available version or
17707  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17708  * copied and put under another distribution licence
17709  * [including the GNU Public Licence.]
17710  */
17711 # 77 "/usr/include/openssl/x509.h" 2 3 4
17712 
17713 # 1 "/usr/include/openssl/stack.h" 1 3 4
17714 /* crypto/stack/stack.h */
17715 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17716  * All rights reserved.
17717  *
17718  * This package is an SSL implementation written
17719  * by Eric Young (eay@cryptsoft.com).
17720  * The implementation was written so as to conform with Netscapes SSL.
17721  *
17722  * This library is free for commercial and non-commercial use as long as
17723  * the following conditions are aheared to.  The following conditions
17724  * apply to all code found in this distribution, be it the RC4, RSA,
17725  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17726  * included with this distribution is covered by the same copyright terms
17727  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17728  *
17729  * Copyright remains Eric Young's, and as such any Copyright notices in
17730  * the code are not to be removed.
17731  * If this package is used in a product, Eric Young should be given attribution
17732  * as the author of the parts of the library used.
17733  * This can be in the form of a textual message at program startup or
17734  * in documentation (online or textual) provided with the package.
17735  *
17736  * Redistribution and use in source and binary forms, with or without
17737  * modification, are permitted provided that the following conditions
17738  * are met:
17739  * 1. Redistributions of source code must retain the copyright
17740  *    notice, this list of conditions and the following disclaimer.
17741  * 2. Redistributions in binary form must reproduce the above copyright
17742  *    notice, this list of conditions and the following disclaimer in the
17743  *    documentation and/or other materials provided with the distribution.
17744  * 3. All advertising materials mentioning features or use of this software
17745  *    must display the following acknowledgement:
17746  *    "This product includes cryptographic software written by
17747  *     Eric Young (eay@cryptsoft.com)"
17748  *    The word 'cryptographic' can be left out if the rouines from the library
17749  *    being used are not cryptographic related :-).
17750  * 4. If you include any Windows specific code (or a derivative thereof) from
17751  *    the apps directory (application code) you must include an acknowledgement:
17752  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17753  *
17754  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17755  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17756  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17757  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17758  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17759  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17760  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17761  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17762  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17763  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17764  * SUCH DAMAGE.
17765  *
17766  * The licence and distribution terms for any publically available version or
17767  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17768  * copied and put under another distribution licence
17769  * [including the GNU Public Licence.]
17770  */
17771 # 79 "/usr/include/openssl/x509.h" 2 3 4
17772 # 1 "/usr/include/openssl/asn1.h" 1 3 4
17773 /* crypto/asn1/asn1.h */
17774 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17775  * All rights reserved.
17776  *
17777  * This package is an SSL implementation written
17778  * by Eric Young (eay@cryptsoft.com).
17779  * The implementation was written so as to conform with Netscapes SSL.
17780  *
17781  * This library is free for commercial and non-commercial use as long as
17782  * the following conditions are aheared to.  The following conditions
17783  * apply to all code found in this distribution, be it the RC4, RSA,
17784  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17785  * included with this distribution is covered by the same copyright terms
17786  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17787  *
17788  * Copyright remains Eric Young's, and as such any Copyright notices in
17789  * the code are not to be removed.
17790  * If this package is used in a product, Eric Young should be given attribution
17791  * as the author of the parts of the library used.
17792  * This can be in the form of a textual message at program startup or
17793  * in documentation (online or textual) provided with the package.
17794  *
17795  * Redistribution and use in source and binary forms, with or without
17796  * modification, are permitted provided that the following conditions
17797  * are met:
17798  * 1. Redistributions of source code must retain the copyright
17799  *    notice, this list of conditions and the following disclaimer.
17800  * 2. Redistributions in binary form must reproduce the above copyright
17801  *    notice, this list of conditions and the following disclaimer in the
17802  *    documentation and/or other materials provided with the distribution.
17803  * 3. All advertising materials mentioning features or use of this software
17804  *    must display the following acknowledgement:
17805  *    "This product includes cryptographic software written by
17806  *     Eric Young (eay@cryptsoft.com)"
17807  *    The word 'cryptographic' can be left out if the rouines from the library
17808  *    being used are not cryptographic related :-).
17809  * 4. If you include any Windows specific code (or a derivative thereof) from
17810  *    the apps directory (application code) you must include an acknowledgement:
17811  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17812  *
17813  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17814  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17815  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17816  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17817  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17818  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17819  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17820  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17821  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17822  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17823  * SUCH DAMAGE.
17824  *
17825  * The licence and distribution terms for any publically available version or
17826  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17827  * copied and put under another distribution licence
17828  * [including the GNU Public Licence.]
17829  */
17830 # 80 "/usr/include/openssl/x509.h" 2 3 4
17831 # 1 "/usr/include/openssl/safestack.h" 1 3 4
17832 /* ====================================================================
17833  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
17834  *
17835  * Redistribution and use in source and binary forms, with or without
17836  * modification, are permitted provided that the following conditions
17837  * are met:
17838  *
17839  * 1. Redistributions of source code must retain the above copyright
17840  *    notice, this list of conditions and the following disclaimer.
17841  *
17842  * 2. Redistributions in binary form must reproduce the above copyright
17843  *    notice, this list of conditions and the following disclaimer in
17844  *    the documentation and/or other materials provided with the
17845  *    distribution.
17846  *
17847  * 3. All advertising materials mentioning features or use of this
17848  *    software must display the following acknowledgment:
17849  *    "This product includes software developed by the OpenSSL Project
17850  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17851  *
17852  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17853  *    endorse or promote products derived from this software without
17854  *    prior written permission. For written permission, please contact
17855  *    openssl-core@openssl.org.
17856  *
17857  * 5. Products derived from this software may not be called "OpenSSL"
17858  *    nor may "OpenSSL" appear in their names without prior written
17859  *    permission of the OpenSSL Project.
17860  *
17861  * 6. Redistributions of any form whatsoever must retain the following
17862  *    acknowledgment:
17863  *    "This product includes software developed by the OpenSSL Project
17864  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17865  *
17866  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17867  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17868  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17869  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17870  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17871  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17872  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17873  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17874  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17875  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17876  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17877  * OF THE POSSIBILITY OF SUCH DAMAGE.
17878  * ====================================================================
17879  *
17880  * This product includes cryptographic software written by Eric Young
17881  * (eay@cryptsoft.com).  This product includes software written by Tim
17882  * Hudson (tjh@cryptsoft.com).
17883  *
17884  */
17885 # 81 "/usr/include/openssl/x509.h" 2 3 4
17886 
17887 
17888 # 1 "/usr/include/openssl/ec.h" 1 3 4
17889 /* crypto/ec/ec.h */
17890 /*
17891  * Originally written by Bodo Moeller for the OpenSSL project.
17892  */
17893 /**
17894  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
17895  * \author Originally written by Bodo Moeller for the OpenSSL project
17896  */
17897 /* ====================================================================
17898  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
17899  *
17900  * Redistribution and use in source and binary forms, with or without
17901  * modification, are permitted provided that the following conditions
17902  * are met:
17903  *
17904  * 1. Redistributions of source code must retain the above copyright
17905  *    notice, this list of conditions and the following disclaimer.
17906  *
17907  * 2. Redistributions in binary form must reproduce the above copyright
17908  *    notice, this list of conditions and the following disclaimer in
17909  *    the documentation and/or other materials provided with the
17910  *    distribution.
17911  *
17912  * 3. All advertising materials mentioning features or use of this
17913  *    software must display the following acknowledgment:
17914  *    "This product includes software developed by the OpenSSL Project
17915  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17916  *
17917  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17918  *    endorse or promote products derived from this software without
17919  *    prior written permission. For written permission, please contact
17920  *    openssl-core@openssl.org.
17921  *
17922  * 5. Products derived from this software may not be called "OpenSSL"
17923  *    nor may "OpenSSL" appear in their names without prior written
17924  *    permission of the OpenSSL Project.
17925  *
17926  * 6. Redistributions of any form whatsoever must retain the following
17927  *    acknowledgment:
17928  *    "This product includes software developed by the OpenSSL Project
17929  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17930  *
17931  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17932  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17933  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17934  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17935  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17936  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17937  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17938  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17939  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17940  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17941  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17942  * OF THE POSSIBILITY OF SUCH DAMAGE.
17943  * ====================================================================
17944  *
17945  * This product includes cryptographic software written by Eric Young
17946  * (eay@cryptsoft.com).  This product includes software written by Tim
17947  * Hudson (tjh@cryptsoft.com).
17948  *
17949  */
17950 /* ====================================================================
17951  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
17952  *
17953  * Portions of the attached software ("Contribution") are developed by
17954  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
17955  *
17956  * The Contribution is licensed pursuant to the OpenSSL open source
17957  * license provided above.
17958  *
17959  * The elliptic curve binary polynomial software is originally written by
17960  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
17961  *
17962  */
17963 
17964 
17965 
17966 
17967 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
17968 /* opensslconf.h */
17969 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
17970 
17971 
17972 
17973 
17974 /* OpenSSL was configured with the following options: */
17975 # 108 "/usr/include/openssl/opensslconf.h" 3 4
17976 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
17977    asks for it.  This is a transient feature that is provided for those
17978    who haven't had the time to do the appropriate changes in their
17979    applications.  */
17980 # 204 "/usr/include/openssl/opensslconf.h" 3 4
17981 /* crypto/opensslconf.h.in */
17982 
17983 /* Generate 80386 code? */
17984 # 80 "/usr/include/openssl/ec.h" 2 3 4
17985 
17986 
17987 
17988 
17989 
17990 # 1 "/usr/include/openssl/asn1.h" 1 3 4
17991 /* crypto/asn1/asn1.h */
17992 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17993  * All rights reserved.
17994  *
17995  * This package is an SSL implementation written
17996  * by Eric Young (eay@cryptsoft.com).
17997  * The implementation was written so as to conform with Netscapes SSL.
17998  *
17999  * This library is free for commercial and non-commercial use as long as
18000  * the following conditions are aheared to.  The following conditions
18001  * apply to all code found in this distribution, be it the RC4, RSA,
18002  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18003  * included with this distribution is covered by the same copyright terms
18004  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18005  *
18006  * Copyright remains Eric Young's, and as such any Copyright notices in
18007  * the code are not to be removed.
18008  * If this package is used in a product, Eric Young should be given attribution
18009  * as the author of the parts of the library used.
18010  * This can be in the form of a textual message at program startup or
18011  * in documentation (online or textual) provided with the package.
18012  *
18013  * Redistribution and use in source and binary forms, with or without
18014  * modification, are permitted provided that the following conditions
18015  * are met:
18016  * 1. Redistributions of source code must retain the copyright
18017  *    notice, this list of conditions and the following disclaimer.
18018  * 2. Redistributions in binary form must reproduce the above copyright
18019  *    notice, this list of conditions and the following disclaimer in the
18020  *    documentation and/or other materials provided with the distribution.
18021  * 3. All advertising materials mentioning features or use of this software
18022  *    must display the following acknowledgement:
18023  *    "This product includes cryptographic software written by
18024  *     Eric Young (eay@cryptsoft.com)"
18025  *    The word 'cryptographic' can be left out if the rouines from the library
18026  *    being used are not cryptographic related :-).
18027  * 4. If you include any Windows specific code (or a derivative thereof) from
18028  *    the apps directory (application code) you must include an acknowledgement:
18029  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18030  *
18031  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18032  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18033  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18034  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18035  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18036  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18037  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18038  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18039  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18040  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18041  * SUCH DAMAGE.
18042  *
18043  * The licence and distribution terms for any publically available version or
18044  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18045  * copied and put under another distribution licence
18046  * [including the GNU Public Licence.]
18047  */
18048 # 86 "/usr/include/openssl/ec.h" 2 3 4
18049 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
18050 /* ====================================================================
18051  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
18052  *
18053  * Redistribution and use in source and binary forms, with or without
18054  * modification, are permitted provided that the following conditions
18055  * are met:
18056  *
18057  * 1. Redistributions of source code must retain the above copyright
18058  *    notice, this list of conditions and the following disclaimer.
18059  *
18060  * 2. Redistributions in binary form must reproduce the above copyright
18061  *    notice, this list of conditions and the following disclaimer in
18062  *    the documentation and/or other materials provided with the
18063  *    distribution.
18064  *
18065  * 3. All advertising materials mentioning features or use of this
18066  *    software must display the following acknowledgment:
18067  *    "This product includes software developed by the OpenSSL Project
18068  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18069  *
18070  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18071  *    endorse or promote products derived from this software without
18072  *    prior written permission. For written permission, please contact
18073  *    openssl-core@openssl.org.
18074  *
18075  * 5. Products derived from this software may not be called "OpenSSL"
18076  *    nor may "OpenSSL" appear in their names without prior written
18077  *    permission of the OpenSSL Project.
18078  *
18079  * 6. Redistributions of any form whatsoever must retain the following
18080  *    acknowledgment:
18081  *    "This product includes software developed by the OpenSSL Project
18082  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18083  *
18084  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18085  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18086  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18087  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18088  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18089  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18090  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18091  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18092  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18093  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18094  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18095  * OF THE POSSIBILITY OF SUCH DAMAGE.
18096  * ====================================================================
18097  *
18098  * This product includes cryptographic software written by Eric Young
18099  * (eay@cryptsoft.com).  This product includes software written by Tim
18100  * Hudson (tjh@cryptsoft.com).
18101  *
18102  */
18103 # 87 "/usr/include/openssl/ec.h" 2 3 4
18104 
18105 # 1 "/usr/include/openssl/bn.h" 1 3 4
18106 /* crypto/bn/bn.h */
18107 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
18108  * All rights reserved.
18109  *
18110  * This package is an SSL implementation written
18111  * by Eric Young (eay@cryptsoft.com).
18112  * The implementation was written so as to conform with Netscapes SSL.
18113  *
18114  * This library is free for commercial and non-commercial use as long as
18115  * the following conditions are aheared to.  The following conditions
18116  * apply to all code found in this distribution, be it the RC4, RSA,
18117  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18118  * included with this distribution is covered by the same copyright terms
18119  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18120  *
18121  * Copyright remains Eric Young's, and as such any Copyright notices in
18122  * the code are not to be removed.
18123  * If this package is used in a product, Eric Young should be given attribution
18124  * as the author of the parts of the library used.
18125  * This can be in the form of a textual message at program startup or
18126  * in documentation (online or textual) provided with the package.
18127  *
18128  * Redistribution and use in source and binary forms, with or without
18129  * modification, are permitted provided that the following conditions
18130  * are met:
18131  * 1. Redistributions of source code must retain the copyright
18132  *    notice, this list of conditions and the following disclaimer.
18133  * 2. Redistributions in binary form must reproduce the above copyright
18134  *    notice, this list of conditions and the following disclaimer in the
18135  *    documentation and/or other materials provided with the distribution.
18136  * 3. All advertising materials mentioning features or use of this software
18137  *    must display the following acknowledgement:
18138  *    "This product includes cryptographic software written by
18139  *     Eric Young (eay@cryptsoft.com)"
18140  *    The word 'cryptographic' can be left out if the rouines from the library
18141  *    being used are not cryptographic related :-).
18142  * 4. If you include any Windows specific code (or a derivative thereof) from
18143  *    the apps directory (application code) you must include an acknowledgement:
18144  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18145  *
18146  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18147  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18148  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18149  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18150  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18151  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18152  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18153  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18154  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18155  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18156  * SUCH DAMAGE.
18157  *
18158  * The licence and distribution terms for any publically available version or
18159  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18160  * copied and put under another distribution licence
18161  * [including the GNU Public Licence.]
18162  */
18163 /* ====================================================================
18164  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
18165  *
18166  * Redistribution and use in source and binary forms, with or without
18167  * modification, are permitted provided that the following conditions
18168  * are met:
18169  *
18170  * 1. Redistributions of source code must retain the above copyright
18171  *    notice, this list of conditions and the following disclaimer.
18172  *
18173  * 2. Redistributions in binary form must reproduce the above copyright
18174  *    notice, this list of conditions and the following disclaimer in
18175  *    the documentation and/or other materials provided with the
18176  *    distribution.
18177  *
18178  * 3. All advertising materials mentioning features or use of this
18179  *    software must display the following acknowledgment:
18180  *    "This product includes software developed by the OpenSSL Project
18181  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18182  *
18183  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18184  *    endorse or promote products derived from this software without
18185  *    prior written permission. For written permission, please contact
18186  *    openssl-core@openssl.org.
18187  *
18188  * 5. Products derived from this software may not be called "OpenSSL"
18189  *    nor may "OpenSSL" appear in their names without prior written
18190  *    permission of the OpenSSL Project.
18191  *
18192  * 6. Redistributions of any form whatsoever must retain the following
18193  *    acknowledgment:
18194  *    "This product includes software developed by the OpenSSL Project
18195  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18196  *
18197  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18198  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18199  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18200  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18201  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18202  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18203  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18204  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18205  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18206  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18207  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18208  * OF THE POSSIBILITY OF SUCH DAMAGE.
18209  * ====================================================================
18210  *
18211  * This product includes cryptographic software written by Eric Young
18212  * (eay@cryptsoft.com).  This product includes software written by Tim
18213  * Hudson (tjh@cryptsoft.com).
18214  *
18215  */
18216 /* ====================================================================
18217  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
18218  *
18219  * Portions of the attached software ("Contribution") are developed by
18220  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
18221  *
18222  * The Contribution is licensed pursuant to the Eric Young open source
18223  * license provided above.
18224  *
18225  * The binary polynomial arithmetic software is originally written by
18226  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
18227  *
18228  */
18229 # 89 "/usr/include/openssl/ec.h" 2 3 4
18230 # 103 "/usr/include/openssl/ec.h" 3 4
18231 /** Enum for the point conversion form as defined in X9.62 (ECDSA)
18232  *  for the encoding of a elliptic curve point (x,y) */
18233 typedef enum {
18234         /** the point is encoded as z||x, where the octet z specifies
18235          *  which solution of the quadratic equation y is  */
18236     POINT_CONVERSION_COMPRESSED = 2,
18237         /** the point is encoded as z||x||y, where z is the octet 0x04  */
18238     POINT_CONVERSION_UNCOMPRESSED = 4,
18239         /** the point is encoded as z||x||y, where the octet z specifies
18240          *  which solution of the quadratic equation y is  */
18241     POINT_CONVERSION_HYBRID = 6
18242 } point_conversion_form_t;
18243 
18244 typedef struct ec_method_st EC_METHOD;
18245 
18246 typedef struct ec_group_st
18247     /*-
18248      EC_METHOD *meth;
18249      -- field definition
18250      -- curve coefficients
18251      -- optional generator with associated information (order, cofactor)
18252      -- optional extra data (precomputed table for fast computation of multiples of generator)
18253      -- ASN1 stuff
18254     */
18255     EC_GROUP;
18256 
18257 typedef struct ec_point_st EC_POINT;
18258 
18259 /********************************************************************/
18260 /*               EC_METHODs for curves over GF(p)                   */
18261 /********************************************************************/
18262 
18263 /** Returns the basic GFp ec methods which provides the basis for the
18264  *  optimized methods.
18265  *  \return  EC_METHOD object
18266  */
18267 const EC_METHOD *EC_GFp_simple_method(void);
18268 
18269 /** Returns GFp methods using montgomery multiplication.
18270  *  \return  EC_METHOD object
18271  */
18272 const EC_METHOD *EC_GFp_mont_method(void);
18273 
18274 /** Returns GFp methods using optimized methods for NIST recommended curves
18275  *  \return  EC_METHOD object
18276  */
18277 const EC_METHOD *EC_GFp_nist_method(void);
18278 # 169 "/usr/include/openssl/ec.h" 3 4
18279 /********************************************************************/
18280 /*           EC_METHOD for curves over GF(2^m)                      */
18281 /********************************************************************/
18282 
18283 /** Returns the basic GF2m ec method
18284  *  \return  EC_METHOD object
18285  */
18286 const EC_METHOD *EC_GF2m_simple_method(void);
18287 
18288 
18289 
18290 /********************************************************************/
18291 /*                   EC_GROUP functions                             */
18292 /********************************************************************/
18293 
18294 /** Creates a new EC_GROUP object
18295  *  \param   meth  EC_METHOD to use
18296  *  \return  newly created EC_GROUP object or NULL in case of an error.
18297  */
18298 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
18299 
18300 /** Frees a EC_GROUP object
18301  *  \param  group  EC_GROUP object to be freed.
18302  */
18303 void EC_GROUP_free(EC_GROUP *group);
18304 
18305 /** Clears and frees a EC_GROUP object
18306  *  \param  group  EC_GROUP object to be cleared and freed.
18307  */
18308 void EC_GROUP_clear_free(EC_GROUP *group);
18309 
18310 /** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.
18311  *  \param  dst  destination EC_GROUP object
18312  *  \param  src  source EC_GROUP object
18313  *  \return 1 on success and 0 if an error occurred.
18314  */
18315 int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
18316 
18317 /** Creates a new EC_GROUP object and copies the copies the content
18318  *  form src to the newly created EC_KEY object
18319  *  \param  src  source EC_GROUP object
18320  *  \return newly created EC_GROUP object or NULL in case of an error.
18321  */
18322 EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
18323 
18324 /** Returns the EC_METHOD of the EC_GROUP object.
18325  *  \param  group  EC_GROUP object
18326  *  \return EC_METHOD used in this EC_GROUP object.
18327  */
18328 const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);
18329 
18330 /** Returns the field type of the EC_METHOD.
18331  *  \param  meth  EC_METHOD object
18332  *  \return NID of the underlying field type OID.
18333  */
18334 int EC_METHOD_get_field_type(const EC_METHOD *meth);
18335 
18336 /** Sets the generator and it's order/cofactor of a EC_GROUP object.
18337  *  \param  group      EC_GROUP object
18338  *  \param  generator  EC_POINT object with the generator.
18339  *  \param  order      the order of the group generated by the generator.
18340  *  \param  cofactor   the index of the sub-group generated by the generator
18341  *                     in the group of all points on the elliptic curve.
18342  *  \return 1 on success and 0 if an error occured
18343  */
18344 int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
18345                            const BIGNUM *order, const BIGNUM *cofactor);
18346 
18347 /** Returns the generator of a EC_GROUP object.
18348  *  \param  group  EC_GROUP object
18349  *  \return the currently used generator (possibly NULL).
18350  */
18351 const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
18352 
18353 /** Returns the montgomery data for order(Generator)
18354  *  \param  group  EC_GROUP object
18355  *  \return the currently used generator (possibly NULL).
18356 */
18357 BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group);
18358 
18359 /** Gets the order of a EC_GROUP
18360  *  \param  group  EC_GROUP object
18361  *  \param  order  BIGNUM to which the order is copied
18362  *  \param  ctx    BN_CTX object (optional)
18363  *  \return 1 on success and 0 if an error occured
18364  */
18365 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
18366 
18367 /** Gets the cofactor of a EC_GROUP
18368  *  \param  group     EC_GROUP object
18369  *  \param  cofactor  BIGNUM to which the cofactor is copied
18370  *  \param  ctx       BN_CTX object (optional)
18371  *  \return 1 on success and 0 if an error occured
18372  */
18373 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
18374                           BN_CTX *ctx);
18375 
18376 /** Sets the name of a EC_GROUP object
18377  *  \param  group  EC_GROUP object
18378  *  \param  nid    NID of the curve name OID
18379  */
18380 void EC_GROUP_set_curve_name(EC_GROUP *group, int nid);
18381 
18382 /** Returns the curve name of a EC_GROUP object
18383  *  \param  group  EC_GROUP object
18384  *  \return NID of the curve name OID or 0 if not set.
18385  */
18386 int EC_GROUP_get_curve_name(const EC_GROUP *group);
18387 
18388 void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
18389 int EC_GROUP_get_asn1_flag(const EC_GROUP *group);
18390 
18391 void EC_GROUP_set_point_conversion_form(EC_GROUP *group,
18392                                         point_conversion_form_t form);
18393 point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
18394 
18395 unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x);
18396 size_t EC_GROUP_get_seed_len(const EC_GROUP *);
18397 size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
18398 
18399 /** Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b
18400  *  \param  group  EC_GROUP object
18401  *  \param  p      BIGNUM with the prime number
18402  *  \param  a      BIGNUM with parameter a of the equation
18403  *  \param  b      BIGNUM with parameter b of the equation
18404  *  \param  ctx    BN_CTX object (optional)
18405  *  \return 1 on success and 0 if an error occured
18406  */
18407 int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
18408                            const BIGNUM *b, BN_CTX *ctx);
18409 
18410 /** Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b
18411  *  \param  group  EC_GROUP object
18412  *  \param  p      BIGNUM for the prime number
18413  *  \param  a      BIGNUM for parameter a of the equation
18414  *  \param  b      BIGNUM for parameter b of the equation
18415  *  \param  ctx    BN_CTX object (optional)
18416  *  \return 1 on success and 0 if an error occured
18417  */
18418 int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
18419                            BIGNUM *b, BN_CTX *ctx);
18420 
18421 
18422 /** Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
18423  *  \param  group  EC_GROUP object
18424  *  \param  p      BIGNUM with the polynomial defining the underlying field
18425  *  \param  a      BIGNUM with parameter a of the equation
18426  *  \param  b      BIGNUM with parameter b of the equation
18427  *  \param  ctx    BN_CTX object (optional)
18428  *  \return 1 on success and 0 if an error occured
18429  */
18430 int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
18431                             const BIGNUM *b, BN_CTX *ctx);
18432 
18433 /** Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
18434  *  \param  group  EC_GROUP object
18435  *  \param  p      BIGNUM for the polynomial defining the underlying field
18436  *  \param  a      BIGNUM for parameter a of the equation
18437  *  \param  b      BIGNUM for parameter b of the equation
18438  *  \param  ctx    BN_CTX object (optional)
18439  *  \return 1 on success and 0 if an error occured
18440  */
18441 int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
18442                             BIGNUM *b, BN_CTX *ctx);
18443 
18444 /** Returns the number of bits needed to represent a field element
18445  *  \param  group  EC_GROUP object
18446  *  \return number of bits needed to represent a field element
18447  */
18448 int EC_GROUP_get_degree(const EC_GROUP *group);
18449 
18450 /** Checks whether the parameter in the EC_GROUP define a valid ec group
18451  *  \param  group  EC_GROUP object
18452  *  \param  ctx    BN_CTX object (optional)
18453  *  \return 1 if group is a valid ec group and 0 otherwise
18454  */
18455 int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
18456 
18457 /** Checks whether the discriminant of the elliptic curve is zero or not
18458  *  \param  group  EC_GROUP object
18459  *  \param  ctx    BN_CTX object (optional)
18460  *  \return 1 if the discriminant is not zero and 0 otherwise
18461  */
18462 int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);
18463 
18464 /** Compares two EC_GROUP objects
18465  *  \param  a    first EC_GROUP object
18466  *  \param  b    second EC_GROUP object
18467  *  \param  ctx  BN_CTX object (optional)
18468  *  \return 0 if both groups are equal and 1 otherwise
18469  */
18470 int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);
18471 
18472 /*
18473  * EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() after
18474  * choosing an appropriate EC_METHOD
18475  */
18476 
18477 /** Creates a new EC_GROUP object with the specified parameters defined
18478  *  over GFp (defined by the equation y^2 = x^3 + a*x + b)
18479  *  \param  p    BIGNUM with the prime number
18480  *  \param  a    BIGNUM with the parameter a of the equation
18481  *  \param  b    BIGNUM with the parameter b of the equation
18482  *  \param  ctx  BN_CTX object (optional)
18483  *  \return newly created EC_GROUP object with the specified parameters
18484  */
18485 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
18486                                  const BIGNUM *b, BN_CTX *ctx);
18487 
18488 /** Creates a new EC_GROUP object with the specified parameters defined
18489  *  over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b)
18490  *  \param  p    BIGNUM with the polynomial defining the underlying field
18491  *  \param  a    BIGNUM with the parameter a of the equation
18492  *  \param  b    BIGNUM with the parameter b of the equation
18493  *  \param  ctx  BN_CTX object (optional)
18494  *  \return newly created EC_GROUP object with the specified parameters
18495  */
18496 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
18497                                   const BIGNUM *b, BN_CTX *ctx);
18498 
18499 /** Creates a EC_GROUP object with a curve specified by a NID
18500  *  \param  nid  NID of the OID of the curve name
18501  *  \return newly created EC_GROUP object with specified curve or NULL
18502  *          if an error occurred
18503  */
18504 EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
18505 
18506 /********************************************************************/
18507 /*               handling of internal curves                        */
18508 /********************************************************************/
18509 
18510 typedef struct {
18511     int nid;
18512     const char *comment;
18513 } EC_builtin_curve;
18514 
18515 /*
18516  * EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all
18517  * available curves or zero if a error occurred. In case r ist not zero
18518  * nitems EC_builtin_curve structures are filled with the data of the first
18519  * nitems internal groups
18520  */
18521 size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
18522 
18523 const char *EC_curve_nid2nist(int nid);
18524 int EC_curve_nist2nid(const char *name);
18525 
18526 /********************************************************************/
18527 /*                    EC_POINT functions                            */
18528 /********************************************************************/
18529 
18530 /** Creates a new EC_POINT object for the specified EC_GROUP
18531  *  \param  group  EC_GROUP the underlying EC_GROUP object
18532  *  \return newly created EC_POINT object or NULL if an error occurred
18533  */
18534 EC_POINT *EC_POINT_new(const EC_GROUP *group);
18535 
18536 /** Frees a EC_POINT object
18537  *  \param  point  EC_POINT object to be freed
18538  */
18539 void EC_POINT_free(EC_POINT *point);
18540 
18541 /** Clears and frees a EC_POINT object
18542  *  \param  point  EC_POINT object to be cleared and freed
18543  */
18544 void EC_POINT_clear_free(EC_POINT *point);
18545 
18546 /** Copies EC_POINT object
18547  *  \param  dst  destination EC_POINT object
18548  *  \param  src  source EC_POINT object
18549  *  \return 1 on success and 0 if an error occured
18550  */
18551 int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
18552 
18553 /** Creates a new EC_POINT object and copies the content of the supplied
18554  *  EC_POINT
18555  *  \param  src    source EC_POINT object
18556  *  \param  group  underlying the EC_GROUP object
18557  *  \return newly created EC_POINT object or NULL if an error occurred
18558  */
18559 EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
18560 
18561 /** Returns the EC_METHOD used in EC_POINT object
18562  *  \param  point  EC_POINT object
18563  *  \return the EC_METHOD used
18564  */
18565 const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
18566 
18567 /** Sets a point to infinity (neutral element)
18568  *  \param  group  underlying EC_GROUP object
18569  *  \param  point  EC_POINT to set to infinity
18570  *  \return 1 on success and 0 if an error occured
18571  */
18572 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
18573 
18574 /** Sets the jacobian projective coordinates of a EC_POINT over GFp
18575  *  \param  group  underlying EC_GROUP object
18576  *  \param  p      EC_POINT object
18577  *  \param  x      BIGNUM with the x-coordinate
18578  *  \param  y      BIGNUM with the y-coordinate
18579  *  \param  z      BIGNUM with the z-coordinate
18580  *  \param  ctx    BN_CTX object (optional)
18581  *  \return 1 on success and 0 if an error occured
18582  */
18583 int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group,
18584                                              EC_POINT *p, const BIGNUM *x,
18585                                              const BIGNUM *y, const BIGNUM *z,
18586                                              BN_CTX *ctx);
18587 
18588 /** Gets the jacobian projective coordinates of a EC_POINT over GFp
18589  *  \param  group  underlying EC_GROUP object
18590  *  \param  p      EC_POINT object
18591  *  \param  x      BIGNUM for the x-coordinate
18592  *  \param  y      BIGNUM for the y-coordinate
18593  *  \param  z      BIGNUM for the z-coordinate
18594  *  \param  ctx    BN_CTX object (optional)
18595  *  \return 1 on success and 0 if an error occured
18596  */
18597 int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
18598                                              const EC_POINT *p, BIGNUM *x,
18599                                              BIGNUM *y, BIGNUM *z,
18600                                              BN_CTX *ctx);
18601 
18602 /** Sets the affine coordinates of a EC_POINT over GFp
18603  *  \param  group  underlying EC_GROUP object
18604  *  \param  p      EC_POINT object
18605  *  \param  x      BIGNUM with the x-coordinate
18606  *  \param  y      BIGNUM with the y-coordinate
18607  *  \param  ctx    BN_CTX object (optional)
18608  *  \return 1 on success and 0 if an error occured
18609  */
18610 int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
18611                                         const BIGNUM *x, const BIGNUM *y,
18612                                         BN_CTX *ctx);
18613 
18614 /** Gets the affine coordinates of a EC_POINT over GFp
18615  *  \param  group  underlying EC_GROUP object
18616  *  \param  p      EC_POINT object
18617  *  \param  x      BIGNUM for the x-coordinate
18618  *  \param  y      BIGNUM for the y-coordinate
18619  *  \param  ctx    BN_CTX object (optional)
18620  *  \return 1 on success and 0 if an error occured
18621  */
18622 int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
18623                                         const EC_POINT *p, BIGNUM *x,
18624                                         BIGNUM *y, BN_CTX *ctx);
18625 
18626 /** Sets the x9.62 compressed coordinates of a EC_POINT over GFp
18627  *  \param  group  underlying EC_GROUP object
18628  *  \param  p      EC_POINT object
18629  *  \param  x      BIGNUM with x-coordinate
18630  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
18631  *  \param  ctx    BN_CTX object (optional)
18632  *  \return 1 on success and 0 if an error occured
18633  */
18634 int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,
18635                                             EC_POINT *p, const BIGNUM *x,
18636                                             int y_bit, BN_CTX *ctx);
18637 
18638 /** Sets the affine coordinates of a EC_POINT over GF2m
18639  *  \param  group  underlying EC_GROUP object
18640  *  \param  p      EC_POINT object
18641  *  \param  x      BIGNUM with the x-coordinate
18642  *  \param  y      BIGNUM with the y-coordinate
18643  *  \param  ctx    BN_CTX object (optional)
18644  *  \return 1 on success and 0 if an error occured
18645  */
18646 int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,
18647                                          const BIGNUM *x, const BIGNUM *y,
18648                                          BN_CTX *ctx);
18649 
18650 /** Gets the affine coordinates of a EC_POINT over GF2m
18651  *  \param  group  underlying EC_GROUP object
18652  *  \param  p      EC_POINT object
18653  *  \param  x      BIGNUM for the x-coordinate
18654  *  \param  y      BIGNUM for the y-coordinate
18655  *  \param  ctx    BN_CTX object (optional)
18656  *  \return 1 on success and 0 if an error occured
18657  */
18658 int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
18659                                          const EC_POINT *p, BIGNUM *x,
18660                                          BIGNUM *y, BN_CTX *ctx);
18661 
18662 /** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m
18663  *  \param  group  underlying EC_GROUP object
18664  *  \param  p      EC_POINT object
18665  *  \param  x      BIGNUM with x-coordinate
18666  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
18667  *  \param  ctx    BN_CTX object (optional)
18668  *  \return 1 on success and 0 if an error occured
18669  */
18670 int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
18671                                              EC_POINT *p, const BIGNUM *x,
18672                                              int y_bit, BN_CTX *ctx);
18673 
18674 /** Encodes a EC_POINT object to a octet string
18675  *  \param  group  underlying EC_GROUP object
18676  *  \param  p      EC_POINT object
18677  *  \param  form   point conversion form
18678  *  \param  buf    memory buffer for the result. If NULL the function returns
18679  *                 required buffer size.
18680  *  \param  len    length of the memory buffer
18681  *  \param  ctx    BN_CTX object (optional)
18682  *  \return the length of the encoded octet string or 0 if an error occurred
18683  */
18684 size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
18685                           point_conversion_form_t form,
18686                           unsigned char *buf, size_t len, BN_CTX *ctx);
18687 
18688 /** Decodes a EC_POINT from a octet string
18689  *  \param  group  underlying EC_GROUP object
18690  *  \param  p      EC_POINT object
18691  *  \param  buf    memory buffer with the encoded ec point
18692  *  \param  len    length of the encoded ec point
18693  *  \param  ctx    BN_CTX object (optional)
18694  *  \return 1 on success and 0 if an error occured
18695  */
18696 int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
18697                        const unsigned char *buf, size_t len, BN_CTX *ctx);
18698 
18699 /* other interfaces to point2oct/oct2point: */
18700 BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
18701                           point_conversion_form_t form, BIGNUM *, BN_CTX *);
18702 EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
18703                             EC_POINT *, BN_CTX *);
18704 char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
18705                          point_conversion_form_t form, BN_CTX *);
18706 EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
18707                              EC_POINT *, BN_CTX *);
18708 
18709 /********************************************************************/
18710 /*         functions for doing EC_POINT arithmetic                  */
18711 /********************************************************************/
18712 
18713 /** Computes the sum of two EC_POINT
18714  *  \param  group  underlying EC_GROUP object
18715  *  \param  r      EC_POINT object for the result (r = a + b)
18716  *  \param  a      EC_POINT object with the first summand
18717  *  \param  b      EC_POINT object with the second summand
18718  *  \param  ctx    BN_CTX object (optional)
18719  *  \return 1 on success and 0 if an error occured
18720  */
18721 int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
18722                  const EC_POINT *b, BN_CTX *ctx);
18723 
18724 /** Computes the double of a EC_POINT
18725  *  \param  group  underlying EC_GROUP object
18726  *  \param  r      EC_POINT object for the result (r = 2 * a)
18727  *  \param  a      EC_POINT object
18728  *  \param  ctx    BN_CTX object (optional)
18729  *  \return 1 on success and 0 if an error occured
18730  */
18731 int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
18732                  BN_CTX *ctx);
18733 
18734 /** Computes the inverse of a EC_POINT
18735  *  \param  group  underlying EC_GROUP object
18736  *  \param  a      EC_POINT object to be inverted (it's used for the result as well)
18737  *  \param  ctx    BN_CTX object (optional)
18738  *  \return 1 on success and 0 if an error occured
18739  */
18740 int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
18741 
18742 /** Checks whether the point is the neutral element of the group
18743  *  \param  group  the underlying EC_GROUP object
18744  *  \param  p      EC_POINT object
18745  *  \return 1 if the point is the neutral element and 0 otherwise
18746  */
18747 int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);
18748 
18749 /** Checks whether the point is on the curve
18750  *  \param  group  underlying EC_GROUP object
18751  *  \param  point  EC_POINT object to check
18752  *  \param  ctx    BN_CTX object (optional)
18753  *  \return 1 if point if on the curve and 0 otherwise
18754  */
18755 int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
18756                          BN_CTX *ctx);
18757 
18758 /** Compares two EC_POINTs
18759  *  \param  group  underlying EC_GROUP object
18760  *  \param  a      first EC_POINT object
18761  *  \param  b      second EC_POINT object
18762  *  \param  ctx    BN_CTX object (optional)
18763  *  \return 0 if both points are equal and a value != 0 otherwise
18764  */
18765 int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,
18766                  BN_CTX *ctx);
18767 
18768 int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx);
18769 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
18770                           EC_POINT *points[], BN_CTX *ctx);
18771 
18772 /** Computes r = generator * n sum_{i=0}^{num-1} p[i] * m[i]
18773  *  \param  group  underlying EC_GROUP object
18774  *  \param  r      EC_POINT object for the result
18775  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
18776  *  \param  num    number futher summands
18777  *  \param  p      array of size num of EC_POINT objects
18778  *  \param  m      array of size num of BIGNUM objects
18779  *  \param  ctx    BN_CTX object (optional)
18780  *  \return 1 on success and 0 if an error occured
18781  */
18782 int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
18783                   size_t num, const EC_POINT *p[], const BIGNUM *m[],
18784                   BN_CTX *ctx);
18785 
18786 /** Computes r = generator * n + q * m
18787  *  \param  group  underlying EC_GROUP object
18788  *  \param  r      EC_POINT object for the result
18789  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
18790  *  \param  q      EC_POINT object with the first factor of the second summand
18791  *  \param  m      BIGNUM with the second factor of the second summand
18792  *  \param  ctx    BN_CTX object (optional)
18793  *  \return 1 on success and 0 if an error occured
18794  */
18795 int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
18796                  const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
18797 
18798 /** Stores multiples of generator for faster point multiplication
18799  *  \param  group  EC_GROUP object
18800  *  \param  ctx    BN_CTX object (optional)
18801  *  \return 1 on success and 0 if an error occured
18802  */
18803 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
18804 
18805 /** Reports whether a precomputation has been done
18806  *  \param  group  EC_GROUP object
18807  *  \return 1 if a pre-computation has been done and 0 otherwise
18808  */
18809 int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
18810 
18811 /********************************************************************/
18812 /*                       ASN1 stuff                                 */
18813 /********************************************************************/
18814 
18815 /*
18816  * EC_GROUP_get_basis_type() returns the NID of the basis type used to
18817  * represent the field elements
18818  */
18819 int EC_GROUP_get_basis_type(const EC_GROUP *);
18820 
18821 int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
18822 int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
18823                                    unsigned int *k2, unsigned int *k3);
18824 
18825 
18826 
18827 
18828 typedef struct ecpk_parameters_st ECPKPARAMETERS;
18829 
18830 EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
18831 int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
18832 # 731 "/usr/include/openssl/ec.h" 3 4
18833 int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
18834 
18835 
18836 int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
18837 
18838 
18839 /********************************************************************/
18840 /*                      EC_KEY functions                            */
18841 /********************************************************************/
18842 
18843 typedef struct ec_key_st EC_KEY;
18844 
18845 /* some values for the encoding_flag */
18846 
18847 
18848 
18849 /* some values for the flags field */
18850 
18851 
18852 
18853 /** Creates a new EC_KEY object.
18854  *  \return EC_KEY object or NULL if an error occurred.
18855  */
18856 EC_KEY *EC_KEY_new(void);
18857 
18858 int EC_KEY_get_flags(const EC_KEY *key);
18859 
18860 void EC_KEY_set_flags(EC_KEY *key, int flags);
18861 
18862 void EC_KEY_clear_flags(EC_KEY *key, int flags);
18863 
18864 /** Creates a new EC_KEY object using a named curve as underlying
18865  *  EC_GROUP object.
18866  *  \param  nid  NID of the named curve.
18867  *  \return EC_KEY object or NULL if an error occurred.
18868  */
18869 EC_KEY *EC_KEY_new_by_curve_name(int nid);
18870 
18871 /** Frees a EC_KEY object.
18872  *  \param  key  EC_KEY object to be freed.
18873  */
18874 void EC_KEY_free(EC_KEY *key);
18875 
18876 /** Copies a EC_KEY object.
18877  *  \param  dst  destination EC_KEY object
18878  *  \param  src  src EC_KEY object
18879  *  \return dst or NULL if an error occurred.
18880  */
18881 EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
18882 
18883 /** Creates a new EC_KEY object and copies the content from src to it.
18884  *  \param  src  the source EC_KEY object
18885  *  \return newly created EC_KEY object or NULL if an error occurred.
18886  */
18887 EC_KEY *EC_KEY_dup(const EC_KEY *src);
18888 
18889 /** Increases the internal reference count of a EC_KEY object.
18890  *  \param  key  EC_KEY object
18891  *  \return 1 on success and 0 if an error occurred.
18892  */
18893 int EC_KEY_up_ref(EC_KEY *key);
18894 
18895 /** Returns the EC_GROUP object of a EC_KEY object
18896  *  \param  key  EC_KEY object
18897  *  \return the EC_GROUP object (possibly NULL).
18898  */
18899 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
18900 
18901 /** Sets the EC_GROUP of a EC_KEY object.
18902  *  \param  key    EC_KEY object
18903  *  \param  group  EC_GROUP to use in the EC_KEY object (note: the EC_KEY
18904  *                 object will use an own copy of the EC_GROUP).
18905  *  \return 1 on success and 0 if an error occurred.
18906  */
18907 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
18908 
18909 /** Returns the private key of a EC_KEY object.
18910  *  \param  key  EC_KEY object
18911  *  \return a BIGNUM with the private key (possibly NULL).
18912  */
18913 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
18914 
18915 /** Sets the private key of a EC_KEY object.
18916  *  \param  key  EC_KEY object
18917  *  \param  prv  BIGNUM with the private key (note: the EC_KEY object
18918  *               will use an own copy of the BIGNUM).
18919  *  \return 1 on success and 0 if an error occurred.
18920  */
18921 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
18922 
18923 /** Returns the public key of a EC_KEY object.
18924  *  \param  key  the EC_KEY object
18925  *  \return a EC_POINT object with the public key (possibly NULL)
18926  */
18927 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
18928 
18929 /** Sets the public key of a EC_KEY object.
18930  *  \param  key  EC_KEY object
18931  *  \param  pub  EC_POINT object with the public key (note: the EC_KEY object
18932  *               will use an own copy of the EC_POINT object).
18933  *  \return 1 on success and 0 if an error occurred.
18934  */
18935 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
18936 
18937 unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
18938 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
18939 point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);
18940 void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform);
18941 /* functions to set/get method specific data  */
18942 void *EC_KEY_get_key_method_data(EC_KEY *key,
18943                                  void *(*dup_func) (void *),
18944                                  void (*free_func) (void *),
18945                                  void (*clear_free_func) (void *));
18946 /** Sets the key method data of an EC_KEY object, if none has yet been set.
18947  *  \param  key              EC_KEY object
18948  *  \param  data             opaque data to install.
18949  *  \param  dup_func         a function that duplicates |data|.
18950  *  \param  free_func        a function that frees |data|.
18951  *  \param  clear_free_func  a function that wipes and frees |data|.
18952  *  \return the previously set data pointer, or NULL if |data| was inserted.
18953  */
18954 void *EC_KEY_insert_key_method_data(EC_KEY *key, void *data,
18955                                     void *(*dup_func) (void *),
18956                                     void (*free_func) (void *),
18957                                     void (*clear_free_func) (void *));
18958 /* wrapper functions for the underlying EC_GROUP object */
18959 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
18960 
18961 /** Creates a table of pre-computed multiples of the generator to
18962  *  accelerate further EC_KEY operations.
18963  *  \param  key  EC_KEY object
18964  *  \param  ctx  BN_CTX object (optional)
18965  *  \return 1 on success and 0 if an error occurred.
18966  */
18967 int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
18968 
18969 /** Creates a new ec private (and optional a new public) key.
18970  *  \param  key  EC_KEY object
18971  *  \return 1 on success and 0 if an error occurred.
18972  */
18973 int EC_KEY_generate_key(EC_KEY *key);
18974 
18975 /** Verifies that a private and/or public key is valid.
18976  *  \param  key  the EC_KEY object
18977  *  \return 1 on success and 0 otherwise.
18978  */
18979 int EC_KEY_check_key(const EC_KEY *key);
18980 
18981 /** Sets a public key from affine coordindates performing
18982  *  neccessary NIST PKV tests.
18983  *  \param  key  the EC_KEY object
18984  *  \param  x    public key x coordinate
18985  *  \param  y    public key y coordinate
18986  *  \return 1 on success and 0 otherwise.
18987  */
18988 int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
18989                                              BIGNUM *y);
18990 
18991 /********************************************************************/
18992 /*        de- and encoding functions for SEC1 ECPrivateKey          */
18993 /********************************************************************/
18994 
18995 /** Decodes a private key from a memory buffer.
18996  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
18997  *  \param  in   pointer to memory with the DER encoded private key
18998  *  \param  len  length of the DER encoded private key
18999  *  \return the decoded private key or NULL if an error occurred.
19000  */
19001 EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len);
19002 
19003 /** Encodes a private key object and stores the result in a buffer.
19004  *  \param  key  the EC_KEY object to encode
19005  *  \param  out  the buffer for the result (if NULL the function returns number
19006  *               of bytes needed).
19007  *  \return 1 on success and 0 if an error occurred.
19008  */
19009 int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out);
19010 
19011 /********************************************************************/
19012 /*        de- and encoding functions for EC parameters              */
19013 /********************************************************************/
19014 
19015 /** Decodes ec parameter from a memory buffer.
19016  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
19017  *  \param  in   pointer to memory with the DER encoded ec parameters
19018  *  \param  len  length of the DER encoded ec parameters
19019  *  \return a EC_KEY object with the decoded parameters or NULL if an error
19020  *          occurred.
19021  */
19022 EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len);
19023 
19024 /** Encodes ec parameter and stores the result in a buffer.
19025  *  \param  key  the EC_KEY object with ec paramters to encode
19026  *  \param  out  the buffer for the result (if NULL the function returns number
19027  *               of bytes needed).
19028  *  \return 1 on success and 0 if an error occurred.
19029  */
19030 int i2d_ECParameters(EC_KEY *key, unsigned char **out);
19031 
19032 /********************************************************************/
19033 /*         de- and encoding functions for EC public key             */
19034 /*         (octet string, not DER -- hence 'o2i' and 'i2o')         */
19035 /********************************************************************/
19036 
19037 /** Decodes a ec public key from a octet string.
19038  *  \param  key  a pointer to a EC_KEY object which should be used
19039  *  \param  in   memory buffer with the encoded public key
19040  *  \param  len  length of the encoded public key
19041  *  \return EC_KEY object with decoded public key or NULL if an error
19042  *          occurred.
19043  */
19044 EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len);
19045 
19046 /** Encodes a ec public key in an octet string.
19047  *  \param  key  the EC_KEY object with the public key
19048  *  \param  out  the buffer for the result (if NULL the function returns number
19049  *               of bytes needed).
19050  *  \return 1 on success and 0 if an error occurred
19051  */
19052 int i2o_ECPublicKey(EC_KEY *key, unsigned char **out);
19053 
19054 
19055 /** Prints out the ec parameters on human readable form.
19056  *  \param  bp   BIO object to which the information is printed
19057  *  \param  key  EC_KEY object
19058  *  \return 1 on success and 0 if an error occurred
19059  */
19060 int ECParameters_print(BIO *bp, const EC_KEY *key);
19061 
19062 /** Prints out the contents of a EC_KEY object
19063  *  \param  bp   BIO object to which the information is printed
19064  *  \param  key  EC_KEY object
19065  *  \param  off  line offset
19066  *  \return 1 on success and 0 if an error occurred
19067  */
19068 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
19069 
19070 
19071 
19072 /** Prints out the ec parameters on human readable form.
19073  *  \param  fp   file descriptor to which the information is printed
19074  *  \param  key  EC_KEY object
19075  *  \return 1 on success and 0 if an error occurred
19076  */
19077 int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
19078 
19079 /** Prints out the contents of a EC_KEY object
19080  *  \param  fp   file descriptor to which the information is printed
19081  *  \param  key  EC_KEY object
19082  *  \param  off  line offset
19083  *  \return 1 on success and 0 if an error occurred
19084  */
19085 int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
19086 # 1067 "/usr/include/openssl/ec.h" 3 4
19087 /* KDF types */
19088 
19089 
19090 
19091 /* BEGIN ERROR CODES */
19092 /*
19093  * The following lines are auto generated by the script mkerr.pl. Any changes
19094  * made after this point may be overwritten when the script is next run.
19095  */
19096 
19097 void ERR_load_EC_strings(void);
19098 
19099 /* Error codes for the EC functions. */
19100 
19101 /* Function codes. */
19102 # 1227 "/usr/include/openssl/ec.h" 3 4
19103 /* Reason codes. */
19104 # 84 "/usr/include/openssl/x509.h" 2 3 4
19105 
19106 
19107 
19108 # 1 "/usr/include/openssl/ecdsa.h" 1 3 4
19109 /* crypto/ecdsa/ecdsa.h */
19110 /**
19111  * \file   crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
19112  * \author Written by Nils Larsch for the OpenSSL project
19113  */
19114 /* ====================================================================
19115  * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
19116  *
19117  * Redistribution and use in source and binary forms, with or without
19118  * modification, are permitted provided that the following conditions
19119  * are met:
19120  *
19121  * 1. Redistributions of source code must retain the above copyright
19122  *    notice, this list of conditions and the following disclaimer.
19123  *
19124  * 2. Redistributions in binary form must reproduce the above copyright
19125  *    notice, this list of conditions and the following disclaimer in
19126  *    the documentation and/or other materials provided with the
19127  *    distribution.
19128  *
19129  * 3. All advertising materials mentioning features or use of this
19130  *    software must display the following acknowledgment:
19131  *    "This product includes software developed by the OpenSSL Project
19132  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
19133  *
19134  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19135  *    endorse or promote products derived from this software without
19136  *    prior written permission. For written permission, please contact
19137  *    licensing@OpenSSL.org.
19138  *
19139  * 5. Products derived from this software may not be called "OpenSSL"
19140  *    nor may "OpenSSL" appear in their names without prior written
19141  *    permission of the OpenSSL Project.
19142  *
19143  * 6. Redistributions of any form whatsoever must retain the following
19144  *    acknowledgment:
19145  *    "This product includes software developed by the OpenSSL Project
19146  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
19147  *
19148  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19149  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19150  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19151  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19152  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19153  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19154  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19155  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19156  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19157  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19158  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19159  * OF THE POSSIBILITY OF SUCH DAMAGE.
19160  * ====================================================================
19161  *
19162  * This product includes cryptographic software written by Eric Young
19163  * (eay@cryptsoft.com).  This product includes software written by Tim
19164  * Hudson (tjh@cryptsoft.com).
19165  *
19166  */
19167 
19168 
19169 
19170 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
19171 /* opensslconf.h */
19172 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
19173 
19174 
19175 
19176 
19177 /* OpenSSL was configured with the following options: */
19178 # 108 "/usr/include/openssl/opensslconf.h" 3 4
19179 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
19180    asks for it.  This is a transient feature that is provided for those
19181    who haven't had the time to do the appropriate changes in their
19182    applications.  */
19183 # 204 "/usr/include/openssl/opensslconf.h" 3 4
19184 /* crypto/opensslconf.h.in */
19185 
19186 /* Generate 80386 code? */
19187 # 63 "/usr/include/openssl/ecdsa.h" 2 3 4
19188 
19189 
19190 
19191 
19192 
19193 # 1 "/usr/include/openssl/ec.h" 1 3 4
19194 /* crypto/ec/ec.h */
19195 /*
19196  * Originally written by Bodo Moeller for the OpenSSL project.
19197  */
19198 /**
19199  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
19200  * \author Originally written by Bodo Moeller for the OpenSSL project
19201  */
19202 /* ====================================================================
19203  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
19204  *
19205  * Redistribution and use in source and binary forms, with or without
19206  * modification, are permitted provided that the following conditions
19207  * are met:
19208  *
19209  * 1. Redistributions of source code must retain the above copyright
19210  *    notice, this list of conditions and the following disclaimer.
19211  *
19212  * 2. Redistributions in binary form must reproduce the above copyright
19213  *    notice, this list of conditions and the following disclaimer in
19214  *    the documentation and/or other materials provided with the
19215  *    distribution.
19216  *
19217  * 3. All advertising materials mentioning features or use of this
19218  *    software must display the following acknowledgment:
19219  *    "This product includes software developed by the OpenSSL Project
19220  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19221  *
19222  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19223  *    endorse or promote products derived from this software without
19224  *    prior written permission. For written permission, please contact
19225  *    openssl-core@openssl.org.
19226  *
19227  * 5. Products derived from this software may not be called "OpenSSL"
19228  *    nor may "OpenSSL" appear in their names without prior written
19229  *    permission of the OpenSSL Project.
19230  *
19231  * 6. Redistributions of any form whatsoever must retain the following
19232  *    acknowledgment:
19233  *    "This product includes software developed by the OpenSSL Project
19234  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19235  *
19236  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19237  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19238  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19239  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19240  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19241  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19242  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19243  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19244  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19245  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19246  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19247  * OF THE POSSIBILITY OF SUCH DAMAGE.
19248  * ====================================================================
19249  *
19250  * This product includes cryptographic software written by Eric Young
19251  * (eay@cryptsoft.com).  This product includes software written by Tim
19252  * Hudson (tjh@cryptsoft.com).
19253  *
19254  */
19255 /* ====================================================================
19256  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
19257  *
19258  * Portions of the attached software ("Contribution") are developed by
19259  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
19260  *
19261  * The Contribution is licensed pursuant to the OpenSSL open source
19262  * license provided above.
19263  *
19264  * The elliptic curve binary polynomial software is originally written by
19265  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
19266  *
19267  */
19268 # 69 "/usr/include/openssl/ecdsa.h" 2 3 4
19269 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
19270 /* ====================================================================
19271  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
19272  *
19273  * Redistribution and use in source and binary forms, with or without
19274  * modification, are permitted provided that the following conditions
19275  * are met:
19276  *
19277  * 1. Redistributions of source code must retain the above copyright
19278  *    notice, this list of conditions and the following disclaimer.
19279  *
19280  * 2. Redistributions in binary form must reproduce the above copyright
19281  *    notice, this list of conditions and the following disclaimer in
19282  *    the documentation and/or other materials provided with the
19283  *    distribution.
19284  *
19285  * 3. All advertising materials mentioning features or use of this
19286  *    software must display the following acknowledgment:
19287  *    "This product includes software developed by the OpenSSL Project
19288  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19289  *
19290  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19291  *    endorse or promote products derived from this software without
19292  *    prior written permission. For written permission, please contact
19293  *    openssl-core@openssl.org.
19294  *
19295  * 5. Products derived from this software may not be called "OpenSSL"
19296  *    nor may "OpenSSL" appear in their names without prior written
19297  *    permission of the OpenSSL Project.
19298  *
19299  * 6. Redistributions of any form whatsoever must retain the following
19300  *    acknowledgment:
19301  *    "This product includes software developed by the OpenSSL Project
19302  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19303  *
19304  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19305  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19306  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19307  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19308  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19309  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19310  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19311  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19312  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19313  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19314  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19315  * OF THE POSSIBILITY OF SUCH DAMAGE.
19316  * ====================================================================
19317  *
19318  * This product includes cryptographic software written by Eric Young
19319  * (eay@cryptsoft.com).  This product includes software written by Tim
19320  * Hudson (tjh@cryptsoft.com).
19321  *
19322  */
19323 # 70 "/usr/include/openssl/ecdsa.h" 2 3 4
19324 
19325 # 1 "/usr/include/openssl/bn.h" 1 3 4
19326 /* crypto/bn/bn.h */
19327 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
19328  * All rights reserved.
19329  *
19330  * This package is an SSL implementation written
19331  * by Eric Young (eay@cryptsoft.com).
19332  * The implementation was written so as to conform with Netscapes SSL.
19333  *
19334  * This library is free for commercial and non-commercial use as long as
19335  * the following conditions are aheared to.  The following conditions
19336  * apply to all code found in this distribution, be it the RC4, RSA,
19337  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19338  * included with this distribution is covered by the same copyright terms
19339  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19340  *
19341  * Copyright remains Eric Young's, and as such any Copyright notices in
19342  * the code are not to be removed.
19343  * If this package is used in a product, Eric Young should be given attribution
19344  * as the author of the parts of the library used.
19345  * This can be in the form of a textual message at program startup or
19346  * in documentation (online or textual) provided with the package.
19347  *
19348  * Redistribution and use in source and binary forms, with or without
19349  * modification, are permitted provided that the following conditions
19350  * are met:
19351  * 1. Redistributions of source code must retain the copyright
19352  *    notice, this list of conditions and the following disclaimer.
19353  * 2. Redistributions in binary form must reproduce the above copyright
19354  *    notice, this list of conditions and the following disclaimer in the
19355  *    documentation and/or other materials provided with the distribution.
19356  * 3. All advertising materials mentioning features or use of this software
19357  *    must display the following acknowledgement:
19358  *    "This product includes cryptographic software written by
19359  *     Eric Young (eay@cryptsoft.com)"
19360  *    The word 'cryptographic' can be left out if the rouines from the library
19361  *    being used are not cryptographic related :-).
19362  * 4. If you include any Windows specific code (or a derivative thereof) from
19363  *    the apps directory (application code) you must include an acknowledgement:
19364  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19365  *
19366  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19367  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19368  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19369  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19370  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19371  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19372  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19373  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19374  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19375  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19376  * SUCH DAMAGE.
19377  *
19378  * The licence and distribution terms for any publically available version or
19379  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19380  * copied and put under another distribution licence
19381  * [including the GNU Public Licence.]
19382  */
19383 /* ====================================================================
19384  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
19385  *
19386  * Redistribution and use in source and binary forms, with or without
19387  * modification, are permitted provided that the following conditions
19388  * are met:
19389  *
19390  * 1. Redistributions of source code must retain the above copyright
19391  *    notice, this list of conditions and the following disclaimer.
19392  *
19393  * 2. Redistributions in binary form must reproduce the above copyright
19394  *    notice, this list of conditions and the following disclaimer in
19395  *    the documentation and/or other materials provided with the
19396  *    distribution.
19397  *
19398  * 3. All advertising materials mentioning features or use of this
19399  *    software must display the following acknowledgment:
19400  *    "This product includes software developed by the OpenSSL Project
19401  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19402  *
19403  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19404  *    endorse or promote products derived from this software without
19405  *    prior written permission. For written permission, please contact
19406  *    openssl-core@openssl.org.
19407  *
19408  * 5. Products derived from this software may not be called "OpenSSL"
19409  *    nor may "OpenSSL" appear in their names without prior written
19410  *    permission of the OpenSSL Project.
19411  *
19412  * 6. Redistributions of any form whatsoever must retain the following
19413  *    acknowledgment:
19414  *    "This product includes software developed by the OpenSSL Project
19415  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19416  *
19417  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19418  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19419  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19420  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19421  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19422  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19423  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19424  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19425  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19426  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19427  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19428  * OF THE POSSIBILITY OF SUCH DAMAGE.
19429  * ====================================================================
19430  *
19431  * This product includes cryptographic software written by Eric Young
19432  * (eay@cryptsoft.com).  This product includes software written by Tim
19433  * Hudson (tjh@cryptsoft.com).
19434  *
19435  */
19436 /* ====================================================================
19437  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
19438  *
19439  * Portions of the attached software ("Contribution") are developed by
19440  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
19441  *
19442  * The Contribution is licensed pursuant to the Eric Young open source
19443  * license provided above.
19444  *
19445  * The binary polynomial arithmetic software is originally written by
19446  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
19447  *
19448  */
19449 # 72 "/usr/include/openssl/ecdsa.h" 2 3 4
19450 
19451 
19452 
19453 
19454 
19455 
19456 typedef struct ECDSA_SIG_st {
19457     BIGNUM *r;
19458     BIGNUM *s;
19459 } ECDSA_SIG;
19460 
19461 /** Allocates and initialize a ECDSA_SIG structure
19462  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
19463  */
19464 ECDSA_SIG *ECDSA_SIG_new(void);
19465 
19466 /** frees a ECDSA_SIG structure
19467  *  \param  sig  pointer to the ECDSA_SIG structure
19468  */
19469 void ECDSA_SIG_free(ECDSA_SIG *sig);
19470 
19471 /** DER encode content of ECDSA_SIG object (note: this function modifies *pp
19472  *  (*pp += length of the DER encoded signature)).
19473  *  \param  sig  pointer to the ECDSA_SIG object
19474  *  \param  pp   pointer to a unsigned char pointer for the output or NULL
19475  *  \return the length of the DER encoded ECDSA_SIG object or 0
19476  */
19477 int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
19478 
19479 /** Decodes a DER encoded ECDSA signature (note: this function changes *pp
19480  *  (*pp += len)).
19481  *  \param  sig  pointer to ECDSA_SIG pointer (may be NULL)
19482  *  \param  pp   memory buffer with the DER encoded signature
19483  *  \param  len  length of the buffer
19484  *  \return pointer to the decoded ECDSA_SIG structure (or NULL)
19485  */
19486 ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);
19487 
19488 /** Computes the ECDSA signature of the given hash value using
19489  *  the supplied private key and returns the created signature.
19490  *  \param  dgst      pointer to the hash value
19491  *  \param  dgst_len  length of the hash value
19492  *  \param  eckey     EC_KEY object containing a private EC key
19493  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
19494  */
19495 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len,
19496                          EC_KEY *eckey);
19497 
19498 /** Computes ECDSA signature of a given hash value using the supplied
19499  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
19500  *  \param  dgst     pointer to the hash value to sign
19501  *  \param  dgstlen  length of the hash value
19502  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
19503  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
19504  *                   see ECDSA_sign_setup
19505  *  \param  eckey    EC_KEY object containing a private EC key
19506  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
19507  */
19508 ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen,
19509                             const BIGNUM *kinv, const BIGNUM *rp,
19510                             EC_KEY *eckey);
19511 
19512 /** Verifies that the supplied signature is a valid ECDSA
19513  *  signature of the supplied hash value using the supplied public key.
19514  *  \param  dgst      pointer to the hash value
19515  *  \param  dgst_len  length of the hash value
19516  *  \param  sig       ECDSA_SIG structure
19517  *  \param  eckey     EC_KEY object containing a public EC key
19518  *  \return 1 if the signature is valid, 0 if the signature is invalid
19519  *          and -1 on error
19520  */
19521 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
19522                     const ECDSA_SIG *sig, EC_KEY *eckey);
19523 
19524 const ECDSA_METHOD *ECDSA_OpenSSL(void);
19525 
19526 /** Sets the default ECDSA method
19527  *  \param  meth  new default ECDSA_METHOD
19528  */
19529 void ECDSA_set_default_method(const ECDSA_METHOD *meth);
19530 
19531 /** Returns the default ECDSA method
19532  *  \return pointer to ECDSA_METHOD structure containing the default method
19533  */
19534 const ECDSA_METHOD *ECDSA_get_default_method(void);
19535 
19536 /** Sets method to be used for the ECDSA operations
19537  *  \param  eckey  EC_KEY object
19538  *  \param  meth   new method
19539  *  \return 1 on success and 0 otherwise
19540  */
19541 int ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth);
19542 
19543 /** Returns the maximum length of the DER encoded signature
19544  *  \param  eckey  EC_KEY object
19545  *  \return numbers of bytes required for the DER encoded signature
19546  */
19547 int ECDSA_size(const EC_KEY *eckey);
19548 
19549 /** Precompute parts of the signing operation
19550  *  \param  eckey  EC_KEY object containing a private EC key
19551  *  \param  ctx    BN_CTX object (optional)
19552  *  \param  kinv   BIGNUM pointer for the inverse of k
19553  *  \param  rp     BIGNUM pointer for x coordinate of k * generator
19554  *  \return 1 on success and 0 otherwise
19555  */
19556 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp);
19557 
19558 /** Computes ECDSA signature of a given hash value using the supplied
19559  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
19560  *  \param  type     this parameter is ignored
19561  *  \param  dgst     pointer to the hash value to sign
19562  *  \param  dgstlen  length of the hash value
19563  *  \param  sig      memory for the DER encoded created signature
19564  *  \param  siglen   pointer to the length of the returned signature
19565  *  \param  eckey    EC_KEY object containing a private EC key
19566  *  \return 1 on success and 0 otherwise
19567  */
19568 int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,
19569                unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
19570 
19571 /** Computes ECDSA signature of a given hash value using the supplied
19572  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
19573  *  \param  type     this parameter is ignored
19574  *  \param  dgst     pointer to the hash value to sign
19575  *  \param  dgstlen  length of the hash value
19576  *  \param  sig      buffer to hold the DER encoded signature
19577  *  \param  siglen   pointer to the length of the returned signature
19578  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
19579  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
19580  *                   see ECDSA_sign_setup
19581  *  \param  eckey    EC_KEY object containing a private EC key
19582  *  \return 1 on success and 0 otherwise
19583  */
19584 int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen,
19585                   unsigned char *sig, unsigned int *siglen,
19586                   const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey);
19587 
19588 /** Verifies that the given signature is valid ECDSA signature
19589  *  of the supplied hash value using the specified public key.
19590  *  \param  type     this parameter is ignored
19591  *  \param  dgst     pointer to the hash value
19592  *  \param  dgstlen  length of the hash value
19593  *  \param  sig      pointer to the DER encoded signature
19594  *  \param  siglen   length of the DER encoded signature
19595  *  \param  eckey    EC_KEY object containing a public EC key
19596  *  \return 1 if the signature is valid, 0 if the signature is invalid
19597  *          and -1 on error
19598  */
19599 int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen,
19600                  const unsigned char *sig, int siglen, EC_KEY *eckey);
19601 
19602 /* the standard ex_data functions */
19603 int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
19604                            *new_func, CRYPTO_EX_dup *dup_func,
19605                            CRYPTO_EX_free *free_func);
19606 int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg);
19607 void *ECDSA_get_ex_data(EC_KEY *d, int idx);
19608 
19609 /** Allocates and initialize a ECDSA_METHOD structure
19610  *  \param ecdsa_method pointer to ECDSA_METHOD to copy.  (May be NULL)
19611  *  \return pointer to a ECDSA_METHOD structure or NULL if an error occurred
19612  */
19613 
19614 ECDSA_METHOD *ECDSA_METHOD_new(const ECDSA_METHOD *ecdsa_method);
19615 
19616 /** frees a ECDSA_METHOD structure
19617  *  \param  ecdsa_method  pointer to the ECDSA_METHOD structure
19618  */
19619 void ECDSA_METHOD_free(ECDSA_METHOD *ecdsa_method);
19620 
19621 /**  Sets application specific data in the ECDSA_METHOD
19622  *   \param  ecdsa_method pointer to existing ECDSA_METHOD
19623  *   \param  app application specific data to set
19624  */
19625 
19626 void ECDSA_METHOD_set_app_data(ECDSA_METHOD *ecdsa_method, void *app);
19627 
19628 /** Returns application specific data from a ECDSA_METHOD structure
19629  *  \param ecdsa_method pointer to ECDSA_METHOD structure
19630  *  \return pointer to application specific data.
19631  */
19632 
19633 void *ECDSA_METHOD_get_app_data(ECDSA_METHOD *ecdsa_method);
19634 
19635 /**  Set the ECDSA_do_sign function in the ECDSA_METHOD
19636  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
19637  *   \param  ecdsa_do_sign a funtion of type ECDSA_do_sign
19638  */
19639 
19640 void ECDSA_METHOD_set_sign(ECDSA_METHOD *ecdsa_method,
19641                            ECDSA_SIG *(*ecdsa_do_sign) (const unsigned char
19642                                                         *dgst, int dgst_len,
19643                                                         const BIGNUM *inv,
19644                                                         const BIGNUM *rp,
19645                                                         EC_KEY *eckey));
19646 
19647 /**  Set the  ECDSA_sign_setup function in the ECDSA_METHOD
19648  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
19649  *   \param  ecdsa_sign_setup a funtion of type ECDSA_sign_setup
19650  */
19651 
19652 void ECDSA_METHOD_set_sign_setup(ECDSA_METHOD *ecdsa_method,
19653                                  int (*ecdsa_sign_setup) (EC_KEY *eckey,
19654                                                           BN_CTX *ctx,
19655                                                           BIGNUM **kinv,
19656                                                           BIGNUM **r));
19657 
19658 /**  Set the ECDSA_do_verify function in the ECDSA_METHOD
19659  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
19660  *   \param  ecdsa_do_verify a funtion of type ECDSA_do_verify
19661  */
19662 
19663 void ECDSA_METHOD_set_verify(ECDSA_METHOD *ecdsa_method,
19664                              int (*ecdsa_do_verify) (const unsigned char
19665                                                      *dgst, int dgst_len,
19666                                                      const ECDSA_SIG *sig,
19667                                                      EC_KEY *eckey));
19668 
19669 void ECDSA_METHOD_set_flags(ECDSA_METHOD *ecdsa_method, int flags);
19670 
19671 /**  Set the flags field in the ECDSA_METHOD
19672  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
19673  *   \param  flags flags value to set
19674  */
19675 
19676 void ECDSA_METHOD_set_name(ECDSA_METHOD *ecdsa_method, char *name);
19677 
19678 /**  Set the name field in the ECDSA_METHOD
19679  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
19680  *   \param  name name to set
19681  */
19682 
19683 /* BEGIN ERROR CODES */
19684 /*
19685  * The following lines are auto generated by the script mkerr.pl. Any changes
19686  * made after this point may be overwritten when the script is next run.
19687  */
19688 void ERR_load_ECDSA_strings(void);
19689 
19690 /* Error codes for the ECDSA functions. */
19691 
19692 /* Function codes. */
19693 
19694 
19695 
19696 
19697 
19698 
19699 
19700 /* Reason codes. */
19701 # 88 "/usr/include/openssl/x509.h" 2 3 4
19702 
19703 
19704 
19705 # 1 "/usr/include/openssl/ecdh.h" 1 3 4
19706 /* crypto/ecdh/ecdh.h */
19707 /* ====================================================================
19708  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
19709  *
19710  * The Elliptic Curve Public-Key Crypto Library (ECC Code) included
19711  * herein is developed by SUN MICROSYSTEMS, INC., and is contributed
19712  * to the OpenSSL project.
19713  *
19714  * The ECC Code is licensed pursuant to the OpenSSL open source
19715  * license provided below.
19716  *
19717  * The ECDH software is originally written by Douglas Stebila of
19718  * Sun Microsystems Laboratories.
19719  *
19720  */
19721 /* ====================================================================
19722  * Copyright (c) 2000-2002 The OpenSSL Project.  All rights reserved.
19723  *
19724  * Redistribution and use in source and binary forms, with or without
19725  * modification, are permitted provided that the following conditions
19726  * are met:
19727  *
19728  * 1. Redistributions of source code must retain the above copyright
19729  *    notice, this list of conditions and the following disclaimer.
19730  *
19731  * 2. Redistributions in binary form must reproduce the above copyright
19732  *    notice, this list of conditions and the following disclaimer in
19733  *    the documentation and/or other materials provided with the
19734  *    distribution.
19735  *
19736  * 3. All advertising materials mentioning features or use of this
19737  *    software must display the following acknowledgment:
19738  *    "This product includes software developed by the OpenSSL Project
19739  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
19740  *
19741  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19742  *    endorse or promote products derived from this software without
19743  *    prior written permission. For written permission, please contact
19744  *    licensing@OpenSSL.org.
19745  *
19746  * 5. Products derived from this software may not be called "OpenSSL"
19747  *    nor may "OpenSSL" appear in their names without prior written
19748  *    permission of the OpenSSL Project.
19749  *
19750  * 6. Redistributions of any form whatsoever must retain the following
19751  *    acknowledgment:
19752  *    "This product includes software developed by the OpenSSL Project
19753  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
19754  *
19755  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19756  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19757  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19758  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19759  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19760  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19761  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19762  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19763  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19764  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19765  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19766  * OF THE POSSIBILITY OF SUCH DAMAGE.
19767  * ====================================================================
19768  *
19769  * This product includes cryptographic software written by Eric Young
19770  * (eay@cryptsoft.com).  This product includes software written by Tim
19771  * Hudson (tjh@cryptsoft.com).
19772  *
19773  */
19774 
19775 
19776 
19777 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
19778 /* opensslconf.h */
19779 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
19780 
19781 
19782 
19783 
19784 /* OpenSSL was configured with the following options: */
19785 # 108 "/usr/include/openssl/opensslconf.h" 3 4
19786 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
19787    asks for it.  This is a transient feature that is provided for those
19788    who haven't had the time to do the appropriate changes in their
19789    applications.  */
19790 # 204 "/usr/include/openssl/opensslconf.h" 3 4
19791 /* crypto/opensslconf.h.in */
19792 
19793 /* Generate 80386 code? */
19794 # 73 "/usr/include/openssl/ecdh.h" 2 3 4
19795 
19796 
19797 
19798 
19799 
19800 # 1 "/usr/include/openssl/ec.h" 1 3 4
19801 /* crypto/ec/ec.h */
19802 /*
19803  * Originally written by Bodo Moeller for the OpenSSL project.
19804  */
19805 /**
19806  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
19807  * \author Originally written by Bodo Moeller for the OpenSSL project
19808  */
19809 /* ====================================================================
19810  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
19811  *
19812  * Redistribution and use in source and binary forms, with or without
19813  * modification, are permitted provided that the following conditions
19814  * are met:
19815  *
19816  * 1. Redistributions of source code must retain the above copyright
19817  *    notice, this list of conditions and the following disclaimer.
19818  *
19819  * 2. Redistributions in binary form must reproduce the above copyright
19820  *    notice, this list of conditions and the following disclaimer in
19821  *    the documentation and/or other materials provided with the
19822  *    distribution.
19823  *
19824  * 3. All advertising materials mentioning features or use of this
19825  *    software must display the following acknowledgment:
19826  *    "This product includes software developed by the OpenSSL Project
19827  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19828  *
19829  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19830  *    endorse or promote products derived from this software without
19831  *    prior written permission. For written permission, please contact
19832  *    openssl-core@openssl.org.
19833  *
19834  * 5. Products derived from this software may not be called "OpenSSL"
19835  *    nor may "OpenSSL" appear in their names without prior written
19836  *    permission of the OpenSSL Project.
19837  *
19838  * 6. Redistributions of any form whatsoever must retain the following
19839  *    acknowledgment:
19840  *    "This product includes software developed by the OpenSSL Project
19841  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19842  *
19843  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19844  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19845  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19846  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19847  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19848  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19849  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19850  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19851  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19852  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19853  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19854  * OF THE POSSIBILITY OF SUCH DAMAGE.
19855  * ====================================================================
19856  *
19857  * This product includes cryptographic software written by Eric Young
19858  * (eay@cryptsoft.com).  This product includes software written by Tim
19859  * Hudson (tjh@cryptsoft.com).
19860  *
19861  */
19862 /* ====================================================================
19863  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
19864  *
19865  * Portions of the attached software ("Contribution") are developed by
19866  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
19867  *
19868  * The Contribution is licensed pursuant to the OpenSSL open source
19869  * license provided above.
19870  *
19871  * The elliptic curve binary polynomial software is originally written by
19872  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
19873  *
19874  */
19875 # 79 "/usr/include/openssl/ecdh.h" 2 3 4
19876 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
19877 /* ====================================================================
19878  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
19879  *
19880  * Redistribution and use in source and binary forms, with or without
19881  * modification, are permitted provided that the following conditions
19882  * are met:
19883  *
19884  * 1. Redistributions of source code must retain the above copyright
19885  *    notice, this list of conditions and the following disclaimer.
19886  *
19887  * 2. Redistributions in binary form must reproduce the above copyright
19888  *    notice, this list of conditions and the following disclaimer in
19889  *    the documentation and/or other materials provided with the
19890  *    distribution.
19891  *
19892  * 3. All advertising materials mentioning features or use of this
19893  *    software must display the following acknowledgment:
19894  *    "This product includes software developed by the OpenSSL Project
19895  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19896  *
19897  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19898  *    endorse or promote products derived from this software without
19899  *    prior written permission. For written permission, please contact
19900  *    openssl-core@openssl.org.
19901  *
19902  * 5. Products derived from this software may not be called "OpenSSL"
19903  *    nor may "OpenSSL" appear in their names without prior written
19904  *    permission of the OpenSSL Project.
19905  *
19906  * 6. Redistributions of any form whatsoever must retain the following
19907  *    acknowledgment:
19908  *    "This product includes software developed by the OpenSSL Project
19909  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19910  *
19911  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19912  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19913  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19914  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19915  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19916  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19917  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19918  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19919  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19920  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19921  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19922  * OF THE POSSIBILITY OF SUCH DAMAGE.
19923  * ====================================================================
19924  *
19925  * This product includes cryptographic software written by Eric Young
19926  * (eay@cryptsoft.com).  This product includes software written by Tim
19927  * Hudson (tjh@cryptsoft.com).
19928  *
19929  */
19930 # 80 "/usr/include/openssl/ecdh.h" 2 3 4
19931 
19932 # 1 "/usr/include/openssl/bn.h" 1 3 4
19933 /* crypto/bn/bn.h */
19934 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
19935  * All rights reserved.
19936  *
19937  * This package is an SSL implementation written
19938  * by Eric Young (eay@cryptsoft.com).
19939  * The implementation was written so as to conform with Netscapes SSL.
19940  *
19941  * This library is free for commercial and non-commercial use as long as
19942  * the following conditions are aheared to.  The following conditions
19943  * apply to all code found in this distribution, be it the RC4, RSA,
19944  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19945  * included with this distribution is covered by the same copyright terms
19946  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19947  *
19948  * Copyright remains Eric Young's, and as such any Copyright notices in
19949  * the code are not to be removed.
19950  * If this package is used in a product, Eric Young should be given attribution
19951  * as the author of the parts of the library used.
19952  * This can be in the form of a textual message at program startup or
19953  * in documentation (online or textual) provided with the package.
19954  *
19955  * Redistribution and use in source and binary forms, with or without
19956  * modification, are permitted provided that the following conditions
19957  * are met:
19958  * 1. Redistributions of source code must retain the copyright
19959  *    notice, this list of conditions and the following disclaimer.
19960  * 2. Redistributions in binary form must reproduce the above copyright
19961  *    notice, this list of conditions and the following disclaimer in the
19962  *    documentation and/or other materials provided with the distribution.
19963  * 3. All advertising materials mentioning features or use of this software
19964  *    must display the following acknowledgement:
19965  *    "This product includes cryptographic software written by
19966  *     Eric Young (eay@cryptsoft.com)"
19967  *    The word 'cryptographic' can be left out if the rouines from the library
19968  *    being used are not cryptographic related :-).
19969  * 4. If you include any Windows specific code (or a derivative thereof) from
19970  *    the apps directory (application code) you must include an acknowledgement:
19971  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19972  *
19973  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19974  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19975  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19976  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19977  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19978  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19979  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19980  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19981  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19982  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19983  * SUCH DAMAGE.
19984  *
19985  * The licence and distribution terms for any publically available version or
19986  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19987  * copied and put under another distribution licence
19988  * [including the GNU Public Licence.]
19989  */
19990 /* ====================================================================
19991  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
19992  *
19993  * Redistribution and use in source and binary forms, with or without
19994  * modification, are permitted provided that the following conditions
19995  * are met:
19996  *
19997  * 1. Redistributions of source code must retain the above copyright
19998  *    notice, this list of conditions and the following disclaimer.
19999  *
20000  * 2. Redistributions in binary form must reproduce the above copyright
20001  *    notice, this list of conditions and the following disclaimer in
20002  *    the documentation and/or other materials provided with the
20003  *    distribution.
20004  *
20005  * 3. All advertising materials mentioning features or use of this
20006  *    software must display the following acknowledgment:
20007  *    "This product includes software developed by the OpenSSL Project
20008  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20009  *
20010  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20011  *    endorse or promote products derived from this software without
20012  *    prior written permission. For written permission, please contact
20013  *    openssl-core@openssl.org.
20014  *
20015  * 5. Products derived from this software may not be called "OpenSSL"
20016  *    nor may "OpenSSL" appear in their names without prior written
20017  *    permission of the OpenSSL Project.
20018  *
20019  * 6. Redistributions of any form whatsoever must retain the following
20020  *    acknowledgment:
20021  *    "This product includes software developed by the OpenSSL Project
20022  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20023  *
20024  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20025  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20026  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20027  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20028  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20029  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20030  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20031  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20032  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20033  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20034  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20035  * OF THE POSSIBILITY OF SUCH DAMAGE.
20036  * ====================================================================
20037  *
20038  * This product includes cryptographic software written by Eric Young
20039  * (eay@cryptsoft.com).  This product includes software written by Tim
20040  * Hudson (tjh@cryptsoft.com).
20041  *
20042  */
20043 /* ====================================================================
20044  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
20045  *
20046  * Portions of the attached software ("Contribution") are developed by
20047  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
20048  *
20049  * The Contribution is licensed pursuant to the Eric Young open source
20050  * license provided above.
20051  *
20052  * The binary polynomial arithmetic software is originally written by
20053  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
20054  *
20055  */
20056 # 82 "/usr/include/openssl/ecdh.h" 2 3 4
20057 # 90 "/usr/include/openssl/ecdh.h" 3 4
20058 const ECDH_METHOD *ECDH_OpenSSL(void);
20059 
20060 void ECDH_set_default_method(const ECDH_METHOD *);
20061 const ECDH_METHOD *ECDH_get_default_method(void);
20062 int ECDH_set_method(EC_KEY *, const ECDH_METHOD *);
20063 
20064 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
20065                      EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen,
20066                                                  void *out, size_t *outlen));
20067 
20068 int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
20069                           *new_func, CRYPTO_EX_dup *dup_func,
20070                           CRYPTO_EX_free *free_func);
20071 int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg);
20072 void *ECDH_get_ex_data(EC_KEY *d, int idx);
20073 
20074 int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
20075                    const unsigned char *Z, size_t Zlen,
20076                    const unsigned char *sinfo, size_t sinfolen,
20077                    const EVP_MD *md);
20078 
20079 /* BEGIN ERROR CODES */
20080 /*
20081  * The following lines are auto generated by the script mkerr.pl. Any changes
20082  * made after this point may be overwritten when the script is next run.
20083  */
20084 void ERR_load_ECDH_strings(void);
20085 
20086 /* Error codes for the ECDH functions. */
20087 
20088 /* Function codes. */
20089 
20090 
20091 
20092 
20093 /* Reason codes. */
20094 # 92 "/usr/include/openssl/x509.h" 2 3 4
20095 
20096 
20097 
20098 
20099 # 1 "/usr/include/openssl/rsa.h" 1 3 4
20100 /* crypto/rsa/rsa.h */
20101 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20102  * All rights reserved.
20103  *
20104  * This package is an SSL implementation written
20105  * by Eric Young (eay@cryptsoft.com).
20106  * The implementation was written so as to conform with Netscapes SSL.
20107  *
20108  * This library is free for commercial and non-commercial use as long as
20109  * the following conditions are aheared to.  The following conditions
20110  * apply to all code found in this distribution, be it the RC4, RSA,
20111  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20112  * included with this distribution is covered by the same copyright terms
20113  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20114  *
20115  * Copyright remains Eric Young's, and as such any Copyright notices in
20116  * the code are not to be removed.
20117  * If this package is used in a product, Eric Young should be given attribution
20118  * as the author of the parts of the library used.
20119  * This can be in the form of a textual message at program startup or
20120  * in documentation (online or textual) provided with the package.
20121  *
20122  * Redistribution and use in source and binary forms, with or without
20123  * modification, are permitted provided that the following conditions
20124  * are met:
20125  * 1. Redistributions of source code must retain the copyright
20126  *    notice, this list of conditions and the following disclaimer.
20127  * 2. Redistributions in binary form must reproduce the above copyright
20128  *    notice, this list of conditions and the following disclaimer in the
20129  *    documentation and/or other materials provided with the distribution.
20130  * 3. All advertising materials mentioning features or use of this software
20131  *    must display the following acknowledgement:
20132  *    "This product includes cryptographic software written by
20133  *     Eric Young (eay@cryptsoft.com)"
20134  *    The word 'cryptographic' can be left out if the rouines from the library
20135  *    being used are not cryptographic related :-).
20136  * 4. If you include any Windows specific code (or a derivative thereof) from
20137  *    the apps directory (application code) you must include an acknowledgement:
20138  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20139  *
20140  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20141  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20142  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20143  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20144  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20145  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20146  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20147  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20148  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20149  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20150  * SUCH DAMAGE.
20151  *
20152  * The licence and distribution terms for any publically available version or
20153  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20154  * copied and put under another distribution licence
20155  * [including the GNU Public Licence.]
20156  */
20157 
20158 
20159 
20160 
20161 # 1 "/usr/include/openssl/asn1.h" 1 3 4
20162 /* crypto/asn1/asn1.h */
20163 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20164  * All rights reserved.
20165  *
20166  * This package is an SSL implementation written
20167  * by Eric Young (eay@cryptsoft.com).
20168  * The implementation was written so as to conform with Netscapes SSL.
20169  *
20170  * This library is free for commercial and non-commercial use as long as
20171  * the following conditions are aheared to.  The following conditions
20172  * apply to all code found in this distribution, be it the RC4, RSA,
20173  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20174  * included with this distribution is covered by the same copyright terms
20175  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20176  *
20177  * Copyright remains Eric Young's, and as such any Copyright notices in
20178  * the code are not to be removed.
20179  * If this package is used in a product, Eric Young should be given attribution
20180  * as the author of the parts of the library used.
20181  * This can be in the form of a textual message at program startup or
20182  * in documentation (online or textual) provided with the package.
20183  *
20184  * Redistribution and use in source and binary forms, with or without
20185  * modification, are permitted provided that the following conditions
20186  * are met:
20187  * 1. Redistributions of source code must retain the copyright
20188  *    notice, this list of conditions and the following disclaimer.
20189  * 2. Redistributions in binary form must reproduce the above copyright
20190  *    notice, this list of conditions and the following disclaimer in the
20191  *    documentation and/or other materials provided with the distribution.
20192  * 3. All advertising materials mentioning features or use of this software
20193  *    must display the following acknowledgement:
20194  *    "This product includes cryptographic software written by
20195  *     Eric Young (eay@cryptsoft.com)"
20196  *    The word 'cryptographic' can be left out if the rouines from the library
20197  *    being used are not cryptographic related :-).
20198  * 4. If you include any Windows specific code (or a derivative thereof) from
20199  *    the apps directory (application code) you must include an acknowledgement:
20200  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20201  *
20202  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20203  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20204  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20205  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20206  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20207  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20208  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20209  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20210  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20211  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20212  * SUCH DAMAGE.
20213  *
20214  * The licence and distribution terms for any publically available version or
20215  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20216  * copied and put under another distribution licence
20217  * [including the GNU Public Licence.]
20218  */
20219 # 63 "/usr/include/openssl/rsa.h" 2 3 4
20220 
20221 
20222 # 1 "/usr/include/openssl/bio.h" 1 3 4
20223 /* crypto/bio/bio.h */
20224 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20225  * All rights reserved.
20226  *
20227  * This package is an SSL implementation written
20228  * by Eric Young (eay@cryptsoft.com).
20229  * The implementation was written so as to conform with Netscapes SSL.
20230  *
20231  * This library is free for commercial and non-commercial use as long as
20232  * the following conditions are aheared to.  The following conditions
20233  * apply to all code found in this distribution, be it the RC4, RSA,
20234  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20235  * included with this distribution is covered by the same copyright terms
20236  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20237  *
20238  * Copyright remains Eric Young's, and as such any Copyright notices in
20239  * the code are not to be removed.
20240  * If this package is used in a product, Eric Young should be given attribution
20241  * as the author of the parts of the library used.
20242  * This can be in the form of a textual message at program startup or
20243  * in documentation (online or textual) provided with the package.
20244  *
20245  * Redistribution and use in source and binary forms, with or without
20246  * modification, are permitted provided that the following conditions
20247  * are met:
20248  * 1. Redistributions of source code must retain the copyright
20249  *    notice, this list of conditions and the following disclaimer.
20250  * 2. Redistributions in binary form must reproduce the above copyright
20251  *    notice, this list of conditions and the following disclaimer in the
20252  *    documentation and/or other materials provided with the distribution.
20253  * 3. All advertising materials mentioning features or use of this software
20254  *    must display the following acknowledgement:
20255  *    "This product includes cryptographic software written by
20256  *     Eric Young (eay@cryptsoft.com)"
20257  *    The word 'cryptographic' can be left out if the rouines from the library
20258  *    being used are not cryptographic related :-).
20259  * 4. If you include any Windows specific code (or a derivative thereof) from
20260  *    the apps directory (application code) you must include an acknowledgement:
20261  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20262  *
20263  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20264  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20265  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20266  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20267  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20268  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20269  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20270  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20271  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20272  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20273  * SUCH DAMAGE.
20274  *
20275  * The licence and distribution terms for any publically available version or
20276  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20277  * copied and put under another distribution licence
20278  * [including the GNU Public Licence.]
20279  */
20280 # 66 "/usr/include/openssl/rsa.h" 2 3 4
20281 
20282 # 1 "/usr/include/openssl/crypto.h" 1 3 4
20283 /* crypto/crypto.h */
20284 /* ====================================================================
20285  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
20286  *
20287  * Redistribution and use in source and binary forms, with or without
20288  * modification, are permitted provided that the following conditions
20289  * are met:
20290  *
20291  * 1. Redistributions of source code must retain the above copyright
20292  *    notice, this list of conditions and the following disclaimer.
20293  *
20294  * 2. Redistributions in binary form must reproduce the above copyright
20295  *    notice, this list of conditions and the following disclaimer in
20296  *    the documentation and/or other materials provided with the
20297  *    distribution.
20298  *
20299  * 3. All advertising materials mentioning features or use of this
20300  *    software must display the following acknowledgment:
20301  *    "This product includes software developed by the OpenSSL Project
20302  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20303  *
20304  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20305  *    endorse or promote products derived from this software without
20306  *    prior written permission. For written permission, please contact
20307  *    openssl-core@openssl.org.
20308  *
20309  * 5. Products derived from this software may not be called "OpenSSL"
20310  *    nor may "OpenSSL" appear in their names without prior written
20311  *    permission of the OpenSSL Project.
20312  *
20313  * 6. Redistributions of any form whatsoever must retain the following
20314  *    acknowledgment:
20315  *    "This product includes software developed by the OpenSSL Project
20316  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20317  *
20318  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20319  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20320  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20321  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20322  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20323  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20324  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20325  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20326  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20327  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20328  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20329  * OF THE POSSIBILITY OF SUCH DAMAGE.
20330  * ====================================================================
20331  *
20332  * This product includes cryptographic software written by Eric Young
20333  * (eay@cryptsoft.com).  This product includes software written by Tim
20334  * Hudson (tjh@cryptsoft.com).
20335  *
20336  */
20337 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20338  * All rights reserved.
20339  *
20340  * This package is an SSL implementation written
20341  * by Eric Young (eay@cryptsoft.com).
20342  * The implementation was written so as to conform with Netscapes SSL.
20343  *
20344  * This library is free for commercial and non-commercial use as long as
20345  * the following conditions are aheared to.  The following conditions
20346  * apply to all code found in this distribution, be it the RC4, RSA,
20347  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20348  * included with this distribution is covered by the same copyright terms
20349  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20350  *
20351  * Copyright remains Eric Young's, and as such any Copyright notices in
20352  * the code are not to be removed.
20353  * If this package is used in a product, Eric Young should be given attribution
20354  * as the author of the parts of the library used.
20355  * This can be in the form of a textual message at program startup or
20356  * in documentation (online or textual) provided with the package.
20357  *
20358  * Redistribution and use in source and binary forms, with or without
20359  * modification, are permitted provided that the following conditions
20360  * are met:
20361  * 1. Redistributions of source code must retain the copyright
20362  *    notice, this list of conditions and the following disclaimer.
20363  * 2. Redistributions in binary form must reproduce the above copyright
20364  *    notice, this list of conditions and the following disclaimer in the
20365  *    documentation and/or other materials provided with the distribution.
20366  * 3. All advertising materials mentioning features or use of this software
20367  *    must display the following acknowledgement:
20368  *    "This product includes cryptographic software written by
20369  *     Eric Young (eay@cryptsoft.com)"
20370  *    The word 'cryptographic' can be left out if the rouines from the library
20371  *    being used are not cryptographic related :-).
20372  * 4. If you include any Windows specific code (or a derivative thereof) from
20373  *    the apps directory (application code) you must include an acknowledgement:
20374  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20375  *
20376  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20377  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20378  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20379  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20380  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20381  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20382  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20383  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20384  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20385  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20386  * SUCH DAMAGE.
20387  *
20388  * The licence and distribution terms for any publically available version or
20389  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20390  * copied and put under another distribution licence
20391  * [including the GNU Public Licence.]
20392  */
20393 /* ====================================================================
20394  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
20395  * ECDH support in OpenSSL originally developed by
20396  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
20397  */
20398 # 68 "/usr/include/openssl/rsa.h" 2 3 4
20399 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
20400 /* ====================================================================
20401  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
20402  *
20403  * Redistribution and use in source and binary forms, with or without
20404  * modification, are permitted provided that the following conditions
20405  * are met:
20406  *
20407  * 1. Redistributions of source code must retain the above copyright
20408  *    notice, this list of conditions and the following disclaimer.
20409  *
20410  * 2. Redistributions in binary form must reproduce the above copyright
20411  *    notice, this list of conditions and the following disclaimer in
20412  *    the documentation and/or other materials provided with the
20413  *    distribution.
20414  *
20415  * 3. All advertising materials mentioning features or use of this
20416  *    software must display the following acknowledgment:
20417  *    "This product includes software developed by the OpenSSL Project
20418  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20419  *
20420  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20421  *    endorse or promote products derived from this software without
20422  *    prior written permission. For written permission, please contact
20423  *    openssl-core@openssl.org.
20424  *
20425  * 5. Products derived from this software may not be called "OpenSSL"
20426  *    nor may "OpenSSL" appear in their names without prior written
20427  *    permission of the OpenSSL Project.
20428  *
20429  * 6. Redistributions of any form whatsoever must retain the following
20430  *    acknowledgment:
20431  *    "This product includes software developed by the OpenSSL Project
20432  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20433  *
20434  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20435  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20436  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20437  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20438  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20439  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20440  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20441  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20442  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20443  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20444  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20445  * OF THE POSSIBILITY OF SUCH DAMAGE.
20446  * ====================================================================
20447  *
20448  * This product includes cryptographic software written by Eric Young
20449  * (eay@cryptsoft.com).  This product includes software written by Tim
20450  * Hudson (tjh@cryptsoft.com).
20451  *
20452  */
20453 # 69 "/usr/include/openssl/rsa.h" 2 3 4
20454 
20455 # 1 "/usr/include/openssl/bn.h" 1 3 4
20456 /* crypto/bn/bn.h */
20457 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
20458  * All rights reserved.
20459  *
20460  * This package is an SSL implementation written
20461  * by Eric Young (eay@cryptsoft.com).
20462  * The implementation was written so as to conform with Netscapes SSL.
20463  *
20464  * This library is free for commercial and non-commercial use as long as
20465  * the following conditions are aheared to.  The following conditions
20466  * apply to all code found in this distribution, be it the RC4, RSA,
20467  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20468  * included with this distribution is covered by the same copyright terms
20469  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20470  *
20471  * Copyright remains Eric Young's, and as such any Copyright notices in
20472  * the code are not to be removed.
20473  * If this package is used in a product, Eric Young should be given attribution
20474  * as the author of the parts of the library used.
20475  * This can be in the form of a textual message at program startup or
20476  * in documentation (online or textual) provided with the package.
20477  *
20478  * Redistribution and use in source and binary forms, with or without
20479  * modification, are permitted provided that the following conditions
20480  * are met:
20481  * 1. Redistributions of source code must retain the copyright
20482  *    notice, this list of conditions and the following disclaimer.
20483  * 2. Redistributions in binary form must reproduce the above copyright
20484  *    notice, this list of conditions and the following disclaimer in the
20485  *    documentation and/or other materials provided with the distribution.
20486  * 3. All advertising materials mentioning features or use of this software
20487  *    must display the following acknowledgement:
20488  *    "This product includes cryptographic software written by
20489  *     Eric Young (eay@cryptsoft.com)"
20490  *    The word 'cryptographic' can be left out if the rouines from the library
20491  *    being used are not cryptographic related :-).
20492  * 4. If you include any Windows specific code (or a derivative thereof) from
20493  *    the apps directory (application code) you must include an acknowledgement:
20494  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20495  *
20496  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20497  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20498  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20499  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20500  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20501  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20502  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20503  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20504  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20505  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20506  * SUCH DAMAGE.
20507  *
20508  * The licence and distribution terms for any publically available version or
20509  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20510  * copied and put under another distribution licence
20511  * [including the GNU Public Licence.]
20512  */
20513 /* ====================================================================
20514  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
20515  *
20516  * Redistribution and use in source and binary forms, with or without
20517  * modification, are permitted provided that the following conditions
20518  * are met:
20519  *
20520  * 1. Redistributions of source code must retain the above copyright
20521  *    notice, this list of conditions and the following disclaimer.
20522  *
20523  * 2. Redistributions in binary form must reproduce the above copyright
20524  *    notice, this list of conditions and the following disclaimer in
20525  *    the documentation and/or other materials provided with the
20526  *    distribution.
20527  *
20528  * 3. All advertising materials mentioning features or use of this
20529  *    software must display the following acknowledgment:
20530  *    "This product includes software developed by the OpenSSL Project
20531  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20532  *
20533  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20534  *    endorse or promote products derived from this software without
20535  *    prior written permission. For written permission, please contact
20536  *    openssl-core@openssl.org.
20537  *
20538  * 5. Products derived from this software may not be called "OpenSSL"
20539  *    nor may "OpenSSL" appear in their names without prior written
20540  *    permission of the OpenSSL Project.
20541  *
20542  * 6. Redistributions of any form whatsoever must retain the following
20543  *    acknowledgment:
20544  *    "This product includes software developed by the OpenSSL Project
20545  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20546  *
20547  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20548  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20549  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20550  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20551  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20552  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20553  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20554  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20555  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20556  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20557  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20558  * OF THE POSSIBILITY OF SUCH DAMAGE.
20559  * ====================================================================
20560  *
20561  * This product includes cryptographic software written by Eric Young
20562  * (eay@cryptsoft.com).  This product includes software written by Tim
20563  * Hudson (tjh@cryptsoft.com).
20564  *
20565  */
20566 /* ====================================================================
20567  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
20568  *
20569  * Portions of the attached software ("Contribution") are developed by
20570  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
20571  *
20572  * The Contribution is licensed pursuant to the Eric Young open source
20573  * license provided above.
20574  *
20575  * The binary polynomial arithmetic software is originally written by
20576  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
20577  *
20578  */
20579 # 71 "/usr/include/openssl/rsa.h" 2 3 4
20580 # 81 "/usr/include/openssl/rsa.h" 3 4
20581 /* Declared already in ossl_typ.h */
20582 /* typedef struct rsa_st RSA; */
20583 /* typedef struct rsa_meth_st RSA_METHOD; */
20584 
20585 struct rsa_meth_st {
20586     const char *name;
20587     int (*rsa_pub_enc) (int flen, const unsigned char *from,
20588                         unsigned char *to, RSA *rsa, int padding);
20589     int (*rsa_pub_dec) (int flen, const unsigned char *from,
20590                         unsigned char *to, RSA *rsa, int padding);
20591     int (*rsa_priv_enc) (int flen, const unsigned char *from,
20592                          unsigned char *to, RSA *rsa, int padding);
20593     int (*rsa_priv_dec) (int flen, const unsigned char *from,
20594                          unsigned char *to, RSA *rsa, int padding);
20595     /* Can be null */
20596     int (*rsa_mod_exp) (BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
20597     /* Can be null */
20598     int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
20599                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
20600     /* called at new */
20601     int (*init) (RSA *rsa);
20602     /* called at free */
20603     int (*finish) (RSA *rsa);
20604     /* RSA_METHOD_FLAG_* things */
20605     int flags;
20606     /* may be needed! */
20607     char *app_data;
20608     /*
20609      * New sign and verify functions: some libraries don't allow arbitrary
20610      * data to be signed/verified: this allows them to be used. Note: for
20611      * this to work the RSA_public_decrypt() and RSA_private_encrypt() should
20612      * *NOT* be used RSA_sign(), RSA_verify() should be used instead. Note:
20613      * for backwards compatibility this functionality is only enabled if the
20614      * RSA_FLAG_SIGN_VER option is set in 'flags'.
20615      */
20616     int (*rsa_sign) (int type,
20617                      const unsigned char *m, unsigned int m_length,
20618                      unsigned char *sigret, unsigned int *siglen,
20619                      const RSA *rsa);
20620     int (*rsa_verify) (int dtype, const unsigned char *m,
20621                        unsigned int m_length, const unsigned char *sigbuf,
20622                        unsigned int siglen, const RSA *rsa);
20623     /*
20624      * If this callback is NULL, the builtin software RSA key-gen will be
20625      * used. This is for behavioural compatibility whilst the code gets
20626      * rewired, but one day it would be nice to assume there are no such
20627      * things as "builtin software" implementations.
20628      */
20629     int (*rsa_keygen) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
20630 };
20631 
20632 struct rsa_st {
20633     /*
20634      * The first parameter is used to pickup errors where this is passed
20635      * instead of aEVP_PKEY, it is set to 0
20636      */
20637     int pad;
20638     long version;
20639     const RSA_METHOD *meth;
20640     /* functional reference if 'meth' is ENGINE-provided */
20641     ENGINE *engine;
20642     BIGNUM *n;
20643     BIGNUM *e;
20644     BIGNUM *d;
20645     BIGNUM *p;
20646     BIGNUM *q;
20647     BIGNUM *dmp1;
20648     BIGNUM *dmq1;
20649     BIGNUM *iqmp;
20650     /* be careful using this if the RSA structure is shared */
20651     CRYPTO_EX_DATA ex_data;
20652     int references;
20653     int flags;
20654     /* Used to cache montgomery values */
20655     BN_MONT_CTX *_method_mod_n;
20656     BN_MONT_CTX *_method_mod_p;
20657     BN_MONT_CTX *_method_mod_q;
20658     /*
20659      * all BIGNUM values are actually in the following data, if it is not
20660      * NULL
20661      */
20662     char *bignum_data;
20663     BN_BLINDING *blinding;
20664     BN_BLINDING *mt_blinding;
20665 };
20666 # 176 "/usr/include/openssl/rsa.h" 3 4
20667 /* exponent limit enforced for "large" modulus only */
20668 # 190 "/usr/include/openssl/rsa.h" 3 4
20669 /*
20670  * This flag means the private key operations will be handled by rsa_mod_exp
20671  * and that they do not depend on the private key components being present:
20672  * for example a key stored in external hardware. Without this flag
20673  * bn_mod_exp gets called when private key components are absent.
20674  */
20675 
20676 
20677 /*
20678  * This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify
20679  * functions.
20680  */
20681 
20682 
20683 /*
20684  * new with 0.9.6j and 0.9.7b; the built-in
20685  * RSA implementation now uses blinding by
20686  * default (ignoring RSA_FLAG_BLINDING),
20687  * but other engines might not need it
20688  */
20689 
20690 /*
20691  * new with 0.9.8f; the built-in RSA
20692  * implementation now uses constant time
20693  * operations by default in private key operations,
20694  * e.g., constant time modular exponentiation,
20695  * modular inverse without leaking branches,
20696  * division without leaking branches. This
20697  * flag disables these constant time
20698  * operations and results in faster RSA
20699  * private key operations.
20700  */
20701 # 312 "/usr/include/openssl/rsa.h" 3 4
20702 /* EVP_PKEY_ only */
20703 
20704 
20705 
20706 
20707 
20708 
20709 
20710 RSA *RSA_new(void);
20711 RSA *RSA_new_method(ENGINE *engine);
20712 int RSA_size(const RSA *rsa);
20713 
20714 /* Deprecated version */
20715 
20716 RSA *RSA_generate_key(int bits, unsigned long e, void
20717                        (*callback) (int, int, void *), void *cb_arg);
20718 
20719 
20720 /* New version */
20721 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
20722 
20723 int RSA_check_key(const RSA *);
20724         /* next 4 return -1 on error */
20725 int RSA_public_encrypt(int flen, const unsigned char *from,
20726                        unsigned char *to, RSA *rsa, int padding);
20727 int RSA_private_encrypt(int flen, const unsigned char *from,
20728                         unsigned char *to, RSA *rsa, int padding);
20729 int RSA_public_decrypt(int flen, const unsigned char *from,
20730                        unsigned char *to, RSA *rsa, int padding);
20731 int RSA_private_decrypt(int flen, const unsigned char *from,
20732                         unsigned char *to, RSA *rsa, int padding);
20733 void RSA_free(RSA *r);
20734 /* "up" the RSA object's reference count */
20735 int RSA_up_ref(RSA *r);
20736 
20737 int RSA_flags(const RSA *r);
20738 
20739 void RSA_set_default_method(const RSA_METHOD *meth);
20740 const RSA_METHOD *RSA_get_default_method(void);
20741 const RSA_METHOD *RSA_get_method(const RSA *rsa);
20742 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
20743 
20744 /* This function needs the memory locking malloc callbacks to be installed */
20745 int RSA_memory_lock(RSA *r);
20746 
20747 /* these are the actual SSLeay RSA functions */
20748 const RSA_METHOD *RSA_PKCS1_SSLeay(void);
20749 
20750 const RSA_METHOD *RSA_null_method(void);
20751 
20752 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;
20753 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;
20754 
20755 typedef struct rsa_pss_params_st {
20756     X509_ALGOR *hashAlgorithm;
20757     X509_ALGOR *maskGenAlgorithm;
20758     ASN1_INTEGER *saltLength;
20759     ASN1_INTEGER *trailerField;
20760 } RSA_PSS_PARAMS;
20761 
20762 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;
20763 
20764 typedef struct rsa_oaep_params_st {
20765     X509_ALGOR *hashFunc;
20766     X509_ALGOR *maskGenFunc;
20767     X509_ALGOR *pSourceFunc;
20768 } RSA_OAEP_PARAMS;
20769 
20770 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;
20771 
20772 
20773 int RSA_print_fp(FILE *fp, const RSA *r, int offset);
20774 
20775 
20776 
20777 int RSA_print(BIO *bp, const RSA *r, int offset);
20778 
20779 
20780 
20781 int i2d_RSA_NET(const RSA *a, unsigned char **pp,
20782                 int (*cb) (char *buf, int len, const char *prompt,
20783                            int verify), int sgckey);
20784 RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
20785                  int (*cb) (char *buf, int len, const char *prompt,
20786                             int verify), int sgckey);
20787 
20788 int i2d_Netscape_RSA(const RSA *a, unsigned char **pp,
20789                      int (*cb) (char *buf, int len, const char *prompt,
20790                                 int verify));
20791 RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length,
20792                       int (*cb) (char *buf, int len, const char *prompt,
20793                                  int verify));
20794 
20795 
20796 /*
20797  * The following 2 functions sign and verify a X509_SIG ASN1 object inside
20798  * PKCS#1 padded RSA encryption
20799  */
20800 int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
20801              unsigned char *sigret, unsigned int *siglen, RSA *rsa);
20802 int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
20803                const unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
20804 
20805 /*
20806  * The following 2 function sign and verify a ASN1_OCTET_STRING object inside
20807  * PKCS#1 padded RSA encryption
20808  */
20809 int RSA_sign_ASN1_OCTET_STRING(int type,
20810                                const unsigned char *m, unsigned int m_length,
20811                                unsigned char *sigret, unsigned int *siglen,
20812                                RSA *rsa);
20813 int RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m,
20814                                  unsigned int m_length, unsigned char *sigbuf,
20815                                  unsigned int siglen, RSA *rsa);
20816 
20817 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
20818 void RSA_blinding_off(RSA *rsa);
20819 BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
20820 
20821 int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
20822                                  const unsigned char *f, int fl);
20823 int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
20824                                    const unsigned char *f, int fl,
20825                                    int rsa_len);
20826 int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
20827                                  const unsigned char *f, int fl);
20828 int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
20829                                    const unsigned char *f, int fl,
20830                                    int rsa_len);
20831 int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,
20832                long seedlen, const EVP_MD *dgst);
20833 int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
20834                                const unsigned char *f, int fl,
20835                                const unsigned char *p, int pl);
20836 int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
20837                                  const unsigned char *f, int fl, int rsa_len,
20838                                  const unsigned char *p, int pl);
20839 int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
20840                                     const unsigned char *from, int flen,
20841                                     const unsigned char *param, int plen,
20842                                     const EVP_MD *md, const EVP_MD *mgf1md);
20843 int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
20844                                       const unsigned char *from, int flen,
20845                                       int num, const unsigned char *param,
20846                                       int plen, const EVP_MD *md,
20847                                       const EVP_MD *mgf1md);
20848 int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
20849                            const unsigned char *f, int fl);
20850 int RSA_padding_check_SSLv23(unsigned char *to, int tlen,
20851                              const unsigned char *f, int fl, int rsa_len);
20852 int RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f,
20853                          int fl);
20854 int RSA_padding_check_none(unsigned char *to, int tlen,
20855                            const unsigned char *f, int fl, int rsa_len);
20856 int RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f,
20857                          int fl);
20858 int RSA_padding_check_X931(unsigned char *to, int tlen,
20859                            const unsigned char *f, int fl, int rsa_len);
20860 int RSA_X931_hash_id(int nid);
20861 
20862 int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
20863                          const EVP_MD *Hash, const unsigned char *EM,
20864                          int sLen);
20865 int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
20866                               const unsigned char *mHash, const EVP_MD *Hash,
20867                               int sLen);
20868 
20869 int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
20870                               const EVP_MD *Hash, const EVP_MD *mgf1Hash,
20871                               const unsigned char *EM, int sLen);
20872 
20873 int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
20874                                    const unsigned char *mHash,
20875                                    const EVP_MD *Hash, const EVP_MD *mgf1Hash,
20876                                    int sLen);
20877 
20878 int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
20879                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
20880 int RSA_set_ex_data(RSA *r, int idx, void *arg);
20881 void *RSA_get_ex_data(const RSA *r, int idx);
20882 
20883 RSA *RSAPublicKey_dup(RSA *rsa);
20884 RSA *RSAPrivateKey_dup(RSA *rsa);
20885 
20886 /*
20887  * If this flag is set the RSA method is FIPS compliant and can be used in
20888  * FIPS mode. This is set in the validated module method. If an application
20889  * sets this flag in its own methods it is its responsibility to ensure the
20890  * result is compliant.
20891  */
20892 
20893 
20894 
20895 /*
20896  * If this flag is set the operations normally disabled in FIPS mode are
20897  * permitted it is then the applications responsibility to ensure that the
20898  * usage is compliant.
20899  */
20900 
20901 
20902 /*
20903  * Application has decided PRNG is good enough to generate a key: don't
20904  * check.
20905  */
20906 
20907 
20908 /* BEGIN ERROR CODES */
20909 /*
20910  * The following lines are auto generated by the script mkerr.pl. Any changes
20911  * made after this point may be overwritten when the script is next run.
20912  */
20913 void ERR_load_RSA_strings(void);
20914 
20915 /* Error codes for the RSA functions. */
20916 
20917 /* Function codes. */
20918 # 592 "/usr/include/openssl/rsa.h" 3 4
20919 /* Reason codes. */
20920 # 97 "/usr/include/openssl/x509.h" 2 3 4
20921 
20922 
20923 # 1 "/usr/include/openssl/dsa.h" 1 3 4
20924 /* crypto/dsa/dsa.h */
20925 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20926  * All rights reserved.
20927  *
20928  * This package is an SSL implementation written
20929  * by Eric Young (eay@cryptsoft.com).
20930  * The implementation was written so as to conform with Netscapes SSL.
20931  *
20932  * This library is free for commercial and non-commercial use as long as
20933  * the following conditions are aheared to.  The following conditions
20934  * apply to all code found in this distribution, be it the RC4, RSA,
20935  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20936  * included with this distribution is covered by the same copyright terms
20937  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20938  *
20939  * Copyright remains Eric Young's, and as such any Copyright notices in
20940  * the code are not to be removed.
20941  * If this package is used in a product, Eric Young should be given attribution
20942  * as the author of the parts of the library used.
20943  * This can be in the form of a textual message at program startup or
20944  * in documentation (online or textual) provided with the package.
20945  *
20946  * Redistribution and use in source and binary forms, with or without
20947  * modification, are permitted provided that the following conditions
20948  * are met:
20949  * 1. Redistributions of source code must retain the copyright
20950  *    notice, this list of conditions and the following disclaimer.
20951  * 2. Redistributions in binary form must reproduce the above copyright
20952  *    notice, this list of conditions and the following disclaimer in the
20953  *    documentation and/or other materials provided with the distribution.
20954  * 3. All advertising materials mentioning features or use of this software
20955  *    must display the following acknowledgement:
20956  *    "This product includes cryptographic software written by
20957  *     Eric Young (eay@cryptsoft.com)"
20958  *    The word 'cryptographic' can be left out if the rouines from the library
20959  *    being used are not cryptographic related :-).
20960  * 4. If you include any Windows specific code (or a derivative thereof) from
20961  *    the apps directory (application code) you must include an acknowledgement:
20962  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20963  *
20964  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20965  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20966  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20967  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20968  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20969  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20970  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20971  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20972  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20973  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20974  * SUCH DAMAGE.
20975  *
20976  * The licence and distribution terms for any publically available version or
20977  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20978  * copied and put under another distribution licence
20979  * [including the GNU Public Licence.]
20980  */
20981 
20982 /*
20983  * The DSS routines are based on patches supplied by
20984  * Steven Schoch <schoch@sheba.arc.nasa.gov>.  He basically did the
20985  * work and I have just tweaked them a little to fit into my
20986  * stylistic vision for SSLeay :-) */
20987 
20988 
20989 
20990 
20991 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
20992 /* e_os2.h */
20993 /* ====================================================================
20994  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
20995  *
20996  * Redistribution and use in source and binary forms, with or without
20997  * modification, are permitted provided that the following conditions
20998  * are met:
20999  *
21000  * 1. Redistributions of source code must retain the above copyright
21001  *    notice, this list of conditions and the following disclaimer.
21002  *
21003  * 2. Redistributions in binary form must reproduce the above copyright
21004  *    notice, this list of conditions and the following disclaimer in
21005  *    the documentation and/or other materials provided with the
21006  *    distribution.
21007  *
21008  * 3. All advertising materials mentioning features or use of this
21009  *    software must display the following acknowledgment:
21010  *    "This product includes software developed by the OpenSSL Project
21011  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21012  *
21013  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21014  *    endorse or promote products derived from this software without
21015  *    prior written permission. For written permission, please contact
21016  *    openssl-core@openssl.org.
21017  *
21018  * 5. Products derived from this software may not be called "OpenSSL"
21019  *    nor may "OpenSSL" appear in their names without prior written
21020  *    permission of the OpenSSL Project.
21021  *
21022  * 6. Redistributions of any form whatsoever must retain the following
21023  *    acknowledgment:
21024  *    "This product includes software developed by the OpenSSL Project
21025  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21026  *
21027  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21028  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21029  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21030  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21031  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21032  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21033  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21034  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21035  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21036  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21037  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21038  * OF THE POSSIBILITY OF SUCH DAMAGE.
21039  * ====================================================================
21040  *
21041  * This product includes cryptographic software written by Eric Young
21042  * (eay@cryptsoft.com).  This product includes software written by Tim
21043  * Hudson (tjh@cryptsoft.com).
21044  *
21045  */
21046 
21047 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
21048 /* opensslconf.h */
21049 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
21050 
21051 
21052 
21053 
21054 /* OpenSSL was configured with the following options: */
21055 # 108 "/usr/include/openssl/opensslconf.h" 3 4
21056 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
21057    asks for it.  This is a transient feature that is provided for those
21058    who haven't had the time to do the appropriate changes in their
21059    applications.  */
21060 # 204 "/usr/include/openssl/opensslconf.h" 3 4
21061 /* crypto/opensslconf.h.in */
21062 
21063 /* Generate 80386 code? */
21064 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
21065 # 69 "/usr/include/openssl/dsa.h" 2 3 4
21066 
21067 
21068 
21069 
21070 
21071 
21072 # 1 "/usr/include/openssl/bio.h" 1 3 4
21073 /* crypto/bio/bio.h */
21074 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21075  * All rights reserved.
21076  *
21077  * This package is an SSL implementation written
21078  * by Eric Young (eay@cryptsoft.com).
21079  * The implementation was written so as to conform with Netscapes SSL.
21080  *
21081  * This library is free for commercial and non-commercial use as long as
21082  * the following conditions are aheared to.  The following conditions
21083  * apply to all code found in this distribution, be it the RC4, RSA,
21084  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21085  * included with this distribution is covered by the same copyright terms
21086  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21087  *
21088  * Copyright remains Eric Young's, and as such any Copyright notices in
21089  * the code are not to be removed.
21090  * If this package is used in a product, Eric Young should be given attribution
21091  * as the author of the parts of the library used.
21092  * This can be in the form of a textual message at program startup or
21093  * in documentation (online or textual) provided with the package.
21094  *
21095  * Redistribution and use in source and binary forms, with or without
21096  * modification, are permitted provided that the following conditions
21097  * are met:
21098  * 1. Redistributions of source code must retain the copyright
21099  *    notice, this list of conditions and the following disclaimer.
21100  * 2. Redistributions in binary form must reproduce the above copyright
21101  *    notice, this list of conditions and the following disclaimer in the
21102  *    documentation and/or other materials provided with the distribution.
21103  * 3. All advertising materials mentioning features or use of this software
21104  *    must display the following acknowledgement:
21105  *    "This product includes cryptographic software written by
21106  *     Eric Young (eay@cryptsoft.com)"
21107  *    The word 'cryptographic' can be left out if the rouines from the library
21108  *    being used are not cryptographic related :-).
21109  * 4. If you include any Windows specific code (or a derivative thereof) from
21110  *    the apps directory (application code) you must include an acknowledgement:
21111  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21112  *
21113  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21114  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21115  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21116  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21117  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21118  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21119  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21120  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21121  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21122  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21123  * SUCH DAMAGE.
21124  *
21125  * The licence and distribution terms for any publically available version or
21126  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21127  * copied and put under another distribution licence
21128  * [including the GNU Public Licence.]
21129  */
21130 # 76 "/usr/include/openssl/dsa.h" 2 3 4
21131 
21132 # 1 "/usr/include/openssl/crypto.h" 1 3 4
21133 /* crypto/crypto.h */
21134 /* ====================================================================
21135  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
21136  *
21137  * Redistribution and use in source and binary forms, with or without
21138  * modification, are permitted provided that the following conditions
21139  * are met:
21140  *
21141  * 1. Redistributions of source code must retain the above copyright
21142  *    notice, this list of conditions and the following disclaimer.
21143  *
21144  * 2. Redistributions in binary form must reproduce the above copyright
21145  *    notice, this list of conditions and the following disclaimer in
21146  *    the documentation and/or other materials provided with the
21147  *    distribution.
21148  *
21149  * 3. All advertising materials mentioning features or use of this
21150  *    software must display the following acknowledgment:
21151  *    "This product includes software developed by the OpenSSL Project
21152  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21153  *
21154  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21155  *    endorse or promote products derived from this software without
21156  *    prior written permission. For written permission, please contact
21157  *    openssl-core@openssl.org.
21158  *
21159  * 5. Products derived from this software may not be called "OpenSSL"
21160  *    nor may "OpenSSL" appear in their names without prior written
21161  *    permission of the OpenSSL Project.
21162  *
21163  * 6. Redistributions of any form whatsoever must retain the following
21164  *    acknowledgment:
21165  *    "This product includes software developed by the OpenSSL Project
21166  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21167  *
21168  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21169  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21170  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21171  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21172  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21173  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21174  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21175  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21176  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21177  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21178  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21179  * OF THE POSSIBILITY OF SUCH DAMAGE.
21180  * ====================================================================
21181  *
21182  * This product includes cryptographic software written by Eric Young
21183  * (eay@cryptsoft.com).  This product includes software written by Tim
21184  * Hudson (tjh@cryptsoft.com).
21185  *
21186  */
21187 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21188  * All rights reserved.
21189  *
21190  * This package is an SSL implementation written
21191  * by Eric Young (eay@cryptsoft.com).
21192  * The implementation was written so as to conform with Netscapes SSL.
21193  *
21194  * This library is free for commercial and non-commercial use as long as
21195  * the following conditions are aheared to.  The following conditions
21196  * apply to all code found in this distribution, be it the RC4, RSA,
21197  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21198  * included with this distribution is covered by the same copyright terms
21199  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21200  *
21201  * Copyright remains Eric Young's, and as such any Copyright notices in
21202  * the code are not to be removed.
21203  * If this package is used in a product, Eric Young should be given attribution
21204  * as the author of the parts of the library used.
21205  * This can be in the form of a textual message at program startup or
21206  * in documentation (online or textual) provided with the package.
21207  *
21208  * Redistribution and use in source and binary forms, with or without
21209  * modification, are permitted provided that the following conditions
21210  * are met:
21211  * 1. Redistributions of source code must retain the copyright
21212  *    notice, this list of conditions and the following disclaimer.
21213  * 2. Redistributions in binary form must reproduce the above copyright
21214  *    notice, this list of conditions and the following disclaimer in the
21215  *    documentation and/or other materials provided with the distribution.
21216  * 3. All advertising materials mentioning features or use of this software
21217  *    must display the following acknowledgement:
21218  *    "This product includes cryptographic software written by
21219  *     Eric Young (eay@cryptsoft.com)"
21220  *    The word 'cryptographic' can be left out if the rouines from the library
21221  *    being used are not cryptographic related :-).
21222  * 4. If you include any Windows specific code (or a derivative thereof) from
21223  *    the apps directory (application code) you must include an acknowledgement:
21224  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21225  *
21226  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21227  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21228  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21229  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21230  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21231  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21232  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21233  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21234  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21235  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21236  * SUCH DAMAGE.
21237  *
21238  * The licence and distribution terms for any publically available version or
21239  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21240  * copied and put under another distribution licence
21241  * [including the GNU Public Licence.]
21242  */
21243 /* ====================================================================
21244  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
21245  * ECDH support in OpenSSL originally developed by
21246  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
21247  */
21248 # 78 "/usr/include/openssl/dsa.h" 2 3 4
21249 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
21250 /* ====================================================================
21251  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
21252  *
21253  * Redistribution and use in source and binary forms, with or without
21254  * modification, are permitted provided that the following conditions
21255  * are met:
21256  *
21257  * 1. Redistributions of source code must retain the above copyright
21258  *    notice, this list of conditions and the following disclaimer.
21259  *
21260  * 2. Redistributions in binary form must reproduce the above copyright
21261  *    notice, this list of conditions and the following disclaimer in
21262  *    the documentation and/or other materials provided with the
21263  *    distribution.
21264  *
21265  * 3. All advertising materials mentioning features or use of this
21266  *    software must display the following acknowledgment:
21267  *    "This product includes software developed by the OpenSSL Project
21268  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21269  *
21270  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21271  *    endorse or promote products derived from this software without
21272  *    prior written permission. For written permission, please contact
21273  *    openssl-core@openssl.org.
21274  *
21275  * 5. Products derived from this software may not be called "OpenSSL"
21276  *    nor may "OpenSSL" appear in their names without prior written
21277  *    permission of the OpenSSL Project.
21278  *
21279  * 6. Redistributions of any form whatsoever must retain the following
21280  *    acknowledgment:
21281  *    "This product includes software developed by the OpenSSL Project
21282  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21283  *
21284  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21285  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21286  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21287  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21288  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21289  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21290  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21291  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21292  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21293  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21294  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21295  * OF THE POSSIBILITY OF SUCH DAMAGE.
21296  * ====================================================================
21297  *
21298  * This product includes cryptographic software written by Eric Young
21299  * (eay@cryptsoft.com).  This product includes software written by Tim
21300  * Hudson (tjh@cryptsoft.com).
21301  *
21302  */
21303 # 79 "/usr/include/openssl/dsa.h" 2 3 4
21304 
21305 
21306 # 1 "/usr/include/openssl/bn.h" 1 3 4
21307 /* crypto/bn/bn.h */
21308 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
21309  * All rights reserved.
21310  *
21311  * This package is an SSL implementation written
21312  * by Eric Young (eay@cryptsoft.com).
21313  * The implementation was written so as to conform with Netscapes SSL.
21314  *
21315  * This library is free for commercial and non-commercial use as long as
21316  * the following conditions are aheared to.  The following conditions
21317  * apply to all code found in this distribution, be it the RC4, RSA,
21318  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21319  * included with this distribution is covered by the same copyright terms
21320  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21321  *
21322  * Copyright remains Eric Young's, and as such any Copyright notices in
21323  * the code are not to be removed.
21324  * If this package is used in a product, Eric Young should be given attribution
21325  * as the author of the parts of the library used.
21326  * This can be in the form of a textual message at program startup or
21327  * in documentation (online or textual) provided with the package.
21328  *
21329  * Redistribution and use in source and binary forms, with or without
21330  * modification, are permitted provided that the following conditions
21331  * are met:
21332  * 1. Redistributions of source code must retain the copyright
21333  *    notice, this list of conditions and the following disclaimer.
21334  * 2. Redistributions in binary form must reproduce the above copyright
21335  *    notice, this list of conditions and the following disclaimer in the
21336  *    documentation and/or other materials provided with the distribution.
21337  * 3. All advertising materials mentioning features or use of this software
21338  *    must display the following acknowledgement:
21339  *    "This product includes cryptographic software written by
21340  *     Eric Young (eay@cryptsoft.com)"
21341  *    The word 'cryptographic' can be left out if the rouines from the library
21342  *    being used are not cryptographic related :-).
21343  * 4. If you include any Windows specific code (or a derivative thereof) from
21344  *    the apps directory (application code) you must include an acknowledgement:
21345  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21346  *
21347  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21348  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21349  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21350  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21351  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21352  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21353  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21354  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21355  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21356  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21357  * SUCH DAMAGE.
21358  *
21359  * The licence and distribution terms for any publically available version or
21360  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21361  * copied and put under another distribution licence
21362  * [including the GNU Public Licence.]
21363  */
21364 /* ====================================================================
21365  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
21366  *
21367  * Redistribution and use in source and binary forms, with or without
21368  * modification, are permitted provided that the following conditions
21369  * are met:
21370  *
21371  * 1. Redistributions of source code must retain the above copyright
21372  *    notice, this list of conditions and the following disclaimer.
21373  *
21374  * 2. Redistributions in binary form must reproduce the above copyright
21375  *    notice, this list of conditions and the following disclaimer in
21376  *    the documentation and/or other materials provided with the
21377  *    distribution.
21378  *
21379  * 3. All advertising materials mentioning features or use of this
21380  *    software must display the following acknowledgment:
21381  *    "This product includes software developed by the OpenSSL Project
21382  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21383  *
21384  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21385  *    endorse or promote products derived from this software without
21386  *    prior written permission. For written permission, please contact
21387  *    openssl-core@openssl.org.
21388  *
21389  * 5. Products derived from this software may not be called "OpenSSL"
21390  *    nor may "OpenSSL" appear in their names without prior written
21391  *    permission of the OpenSSL Project.
21392  *
21393  * 6. Redistributions of any form whatsoever must retain the following
21394  *    acknowledgment:
21395  *    "This product includes software developed by the OpenSSL Project
21396  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21397  *
21398  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21399  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21400  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21401  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21402  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21403  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21404  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21405  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21406  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21407  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21408  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21409  * OF THE POSSIBILITY OF SUCH DAMAGE.
21410  * ====================================================================
21411  *
21412  * This product includes cryptographic software written by Eric Young
21413  * (eay@cryptsoft.com).  This product includes software written by Tim
21414  * Hudson (tjh@cryptsoft.com).
21415  *
21416  */
21417 /* ====================================================================
21418  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
21419  *
21420  * Portions of the attached software ("Contribution") are developed by
21421  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
21422  *
21423  * The Contribution is licensed pursuant to the Eric Young open source
21424  * license provided above.
21425  *
21426  * The binary polynomial arithmetic software is originally written by
21427  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
21428  *
21429  */
21430 # 82 "/usr/include/openssl/dsa.h" 2 3 4
21431 
21432 # 1 "/usr/include/openssl/dh.h" 1 3 4
21433 /* crypto/dh/dh.h */
21434 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21435  * All rights reserved.
21436  *
21437  * This package is an SSL implementation written
21438  * by Eric Young (eay@cryptsoft.com).
21439  * The implementation was written so as to conform with Netscapes SSL.
21440  *
21441  * This library is free for commercial and non-commercial use as long as
21442  * the following conditions are aheared to.  The following conditions
21443  * apply to all code found in this distribution, be it the RC4, RSA,
21444  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21445  * included with this distribution is covered by the same copyright terms
21446  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21447  *
21448  * Copyright remains Eric Young's, and as such any Copyright notices in
21449  * the code are not to be removed.
21450  * If this package is used in a product, Eric Young should be given attribution
21451  * as the author of the parts of the library used.
21452  * This can be in the form of a textual message at program startup or
21453  * in documentation (online or textual) provided with the package.
21454  *
21455  * Redistribution and use in source and binary forms, with or without
21456  * modification, are permitted provided that the following conditions
21457  * are met:
21458  * 1. Redistributions of source code must retain the copyright
21459  *    notice, this list of conditions and the following disclaimer.
21460  * 2. Redistributions in binary form must reproduce the above copyright
21461  *    notice, this list of conditions and the following disclaimer in the
21462  *    documentation and/or other materials provided with the distribution.
21463  * 3. All advertising materials mentioning features or use of this software
21464  *    must display the following acknowledgement:
21465  *    "This product includes cryptographic software written by
21466  *     Eric Young (eay@cryptsoft.com)"
21467  *    The word 'cryptographic' can be left out if the rouines from the library
21468  *    being used are not cryptographic related :-).
21469  * 4. If you include any Windows specific code (or a derivative thereof) from
21470  *    the apps directory (application code) you must include an acknowledgement:
21471  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21472  *
21473  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21474  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21475  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21476  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21477  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21478  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21479  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21480  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21481  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21482  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21483  * SUCH DAMAGE.
21484  *
21485  * The licence and distribution terms for any publically available version or
21486  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21487  * copied and put under another distribution licence
21488  * [including the GNU Public Licence.]
21489  */
21490 
21491 
21492 
21493 
21494 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
21495 /* e_os2.h */
21496 /* ====================================================================
21497  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
21498  *
21499  * Redistribution and use in source and binary forms, with or without
21500  * modification, are permitted provided that the following conditions
21501  * are met:
21502  *
21503  * 1. Redistributions of source code must retain the above copyright
21504  *    notice, this list of conditions and the following disclaimer.
21505  *
21506  * 2. Redistributions in binary form must reproduce the above copyright
21507  *    notice, this list of conditions and the following disclaimer in
21508  *    the documentation and/or other materials provided with the
21509  *    distribution.
21510  *
21511  * 3. All advertising materials mentioning features or use of this
21512  *    software must display the following acknowledgment:
21513  *    "This product includes software developed by the OpenSSL Project
21514  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21515  *
21516  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21517  *    endorse or promote products derived from this software without
21518  *    prior written permission. For written permission, please contact
21519  *    openssl-core@openssl.org.
21520  *
21521  * 5. Products derived from this software may not be called "OpenSSL"
21522  *    nor may "OpenSSL" appear in their names without prior written
21523  *    permission of the OpenSSL Project.
21524  *
21525  * 6. Redistributions of any form whatsoever must retain the following
21526  *    acknowledgment:
21527  *    "This product includes software developed by the OpenSSL Project
21528  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21529  *
21530  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21531  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21532  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21533  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21534  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21535  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21536  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21537  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21538  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21539  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21540  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21541  * OF THE POSSIBILITY OF SUCH DAMAGE.
21542  * ====================================================================
21543  *
21544  * This product includes cryptographic software written by Eric Young
21545  * (eay@cryptsoft.com).  This product includes software written by Tim
21546  * Hudson (tjh@cryptsoft.com).
21547  *
21548  */
21549 
21550 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
21551 /* opensslconf.h */
21552 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
21553 
21554 
21555 
21556 
21557 /* OpenSSL was configured with the following options: */
21558 # 108 "/usr/include/openssl/opensslconf.h" 3 4
21559 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
21560    asks for it.  This is a transient feature that is provided for those
21561    who haven't had the time to do the appropriate changes in their
21562    applications.  */
21563 # 204 "/usr/include/openssl/opensslconf.h" 3 4
21564 /* crypto/opensslconf.h.in */
21565 
21566 /* Generate 80386 code? */
21567 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
21568 # 63 "/usr/include/openssl/dh.h" 2 3 4
21569 
21570 
21571 
21572 
21573 
21574 
21575 # 1 "/usr/include/openssl/bio.h" 1 3 4
21576 /* crypto/bio/bio.h */
21577 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21578  * All rights reserved.
21579  *
21580  * This package is an SSL implementation written
21581  * by Eric Young (eay@cryptsoft.com).
21582  * The implementation was written so as to conform with Netscapes SSL.
21583  *
21584  * This library is free for commercial and non-commercial use as long as
21585  * the following conditions are aheared to.  The following conditions
21586  * apply to all code found in this distribution, be it the RC4, RSA,
21587  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21588  * included with this distribution is covered by the same copyright terms
21589  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21590  *
21591  * Copyright remains Eric Young's, and as such any Copyright notices in
21592  * the code are not to be removed.
21593  * If this package is used in a product, Eric Young should be given attribution
21594  * as the author of the parts of the library used.
21595  * This can be in the form of a textual message at program startup or
21596  * in documentation (online or textual) provided with the package.
21597  *
21598  * Redistribution and use in source and binary forms, with or without
21599  * modification, are permitted provided that the following conditions
21600  * are met:
21601  * 1. Redistributions of source code must retain the copyright
21602  *    notice, this list of conditions and the following disclaimer.
21603  * 2. Redistributions in binary form must reproduce the above copyright
21604  *    notice, this list of conditions and the following disclaimer in the
21605  *    documentation and/or other materials provided with the distribution.
21606  * 3. All advertising materials mentioning features or use of this software
21607  *    must display the following acknowledgement:
21608  *    "This product includes cryptographic software written by
21609  *     Eric Young (eay@cryptsoft.com)"
21610  *    The word 'cryptographic' can be left out if the rouines from the library
21611  *    being used are not cryptographic related :-).
21612  * 4. If you include any Windows specific code (or a derivative thereof) from
21613  *    the apps directory (application code) you must include an acknowledgement:
21614  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21615  *
21616  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21617  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21618  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21619  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21620  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21621  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21622  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21623  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21624  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21625  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21626  * SUCH DAMAGE.
21627  *
21628  * The licence and distribution terms for any publically available version or
21629  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21630  * copied and put under another distribution licence
21631  * [including the GNU Public Licence.]
21632  */
21633 # 70 "/usr/include/openssl/dh.h" 2 3 4
21634 
21635 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
21636 /* ====================================================================
21637  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
21638  *
21639  * Redistribution and use in source and binary forms, with or without
21640  * modification, are permitted provided that the following conditions
21641  * are met:
21642  *
21643  * 1. Redistributions of source code must retain the above copyright
21644  *    notice, this list of conditions and the following disclaimer.
21645  *
21646  * 2. Redistributions in binary form must reproduce the above copyright
21647  *    notice, this list of conditions and the following disclaimer in
21648  *    the documentation and/or other materials provided with the
21649  *    distribution.
21650  *
21651  * 3. All advertising materials mentioning features or use of this
21652  *    software must display the following acknowledgment:
21653  *    "This product includes software developed by the OpenSSL Project
21654  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21655  *
21656  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21657  *    endorse or promote products derived from this software without
21658  *    prior written permission. For written permission, please contact
21659  *    openssl-core@openssl.org.
21660  *
21661  * 5. Products derived from this software may not be called "OpenSSL"
21662  *    nor may "OpenSSL" appear in their names without prior written
21663  *    permission of the OpenSSL Project.
21664  *
21665  * 6. Redistributions of any form whatsoever must retain the following
21666  *    acknowledgment:
21667  *    "This product includes software developed by the OpenSSL Project
21668  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21669  *
21670  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21671  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21672  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21673  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21674  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21675  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21676  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21677  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21678  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21679  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21680  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21681  * OF THE POSSIBILITY OF SUCH DAMAGE.
21682  * ====================================================================
21683  *
21684  * This product includes cryptographic software written by Eric Young
21685  * (eay@cryptsoft.com).  This product includes software written by Tim
21686  * Hudson (tjh@cryptsoft.com).
21687  *
21688  */
21689 # 72 "/usr/include/openssl/dh.h" 2 3 4
21690 
21691 # 1 "/usr/include/openssl/bn.h" 1 3 4
21692 /* crypto/bn/bn.h */
21693 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
21694  * All rights reserved.
21695  *
21696  * This package is an SSL implementation written
21697  * by Eric Young (eay@cryptsoft.com).
21698  * The implementation was written so as to conform with Netscapes SSL.
21699  *
21700  * This library is free for commercial and non-commercial use as long as
21701  * the following conditions are aheared to.  The following conditions
21702  * apply to all code found in this distribution, be it the RC4, RSA,
21703  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21704  * included with this distribution is covered by the same copyright terms
21705  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21706  *
21707  * Copyright remains Eric Young's, and as such any Copyright notices in
21708  * the code are not to be removed.
21709  * If this package is used in a product, Eric Young should be given attribution
21710  * as the author of the parts of the library used.
21711  * This can be in the form of a textual message at program startup or
21712  * in documentation (online or textual) provided with the package.
21713  *
21714  * Redistribution and use in source and binary forms, with or without
21715  * modification, are permitted provided that the following conditions
21716  * are met:
21717  * 1. Redistributions of source code must retain the copyright
21718  *    notice, this list of conditions and the following disclaimer.
21719  * 2. Redistributions in binary form must reproduce the above copyright
21720  *    notice, this list of conditions and the following disclaimer in the
21721  *    documentation and/or other materials provided with the distribution.
21722  * 3. All advertising materials mentioning features or use of this software
21723  *    must display the following acknowledgement:
21724  *    "This product includes cryptographic software written by
21725  *     Eric Young (eay@cryptsoft.com)"
21726  *    The word 'cryptographic' can be left out if the rouines from the library
21727  *    being used are not cryptographic related :-).
21728  * 4. If you include any Windows specific code (or a derivative thereof) from
21729  *    the apps directory (application code) you must include an acknowledgement:
21730  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21731  *
21732  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21733  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21734  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21735  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21736  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21737  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21738  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21739  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21740  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21741  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21742  * SUCH DAMAGE.
21743  *
21744  * The licence and distribution terms for any publically available version or
21745  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21746  * copied and put under another distribution licence
21747  * [including the GNU Public Licence.]
21748  */
21749 /* ====================================================================
21750  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
21751  *
21752  * Redistribution and use in source and binary forms, with or without
21753  * modification, are permitted provided that the following conditions
21754  * are met:
21755  *
21756  * 1. Redistributions of source code must retain the above copyright
21757  *    notice, this list of conditions and the following disclaimer.
21758  *
21759  * 2. Redistributions in binary form must reproduce the above copyright
21760  *    notice, this list of conditions and the following disclaimer in
21761  *    the documentation and/or other materials provided with the
21762  *    distribution.
21763  *
21764  * 3. All advertising materials mentioning features or use of this
21765  *    software must display the following acknowledgment:
21766  *    "This product includes software developed by the OpenSSL Project
21767  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21768  *
21769  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21770  *    endorse or promote products derived from this software without
21771  *    prior written permission. For written permission, please contact
21772  *    openssl-core@openssl.org.
21773  *
21774  * 5. Products derived from this software may not be called "OpenSSL"
21775  *    nor may "OpenSSL" appear in their names without prior written
21776  *    permission of the OpenSSL Project.
21777  *
21778  * 6. Redistributions of any form whatsoever must retain the following
21779  *    acknowledgment:
21780  *    "This product includes software developed by the OpenSSL Project
21781  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21782  *
21783  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21784  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21785  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21786  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21787  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21788  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21789  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21790  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21791  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21792  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21793  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21794  * OF THE POSSIBILITY OF SUCH DAMAGE.
21795  * ====================================================================
21796  *
21797  * This product includes cryptographic software written by Eric Young
21798  * (eay@cryptsoft.com).  This product includes software written by Tim
21799  * Hudson (tjh@cryptsoft.com).
21800  *
21801  */
21802 /* ====================================================================
21803  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
21804  *
21805  * Portions of the attached software ("Contribution") are developed by
21806  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
21807  *
21808  * The Contribution is licensed pursuant to the Eric Young open source
21809  * license provided above.
21810  *
21811  * The binary polynomial arithmetic software is originally written by
21812  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
21813  *
21814  */
21815 # 74 "/usr/include/openssl/dh.h" 2 3 4
21816 # 82 "/usr/include/openssl/dh.h" 3 4
21817 /*
21818  * new with 0.9.7h; the built-in DH
21819  * implementation now uses constant time
21820  * modular exponentiation for secret exponents
21821  * by default. This flag causes the
21822  * faster variable sliding window method to
21823  * be used for all exponents.
21824  */
21825 
21826 
21827 /*
21828  * If this flag is set the DH method is FIPS compliant and can be used in
21829  * FIPS mode. This is set in the validated module method. If an application
21830  * sets this flag in its own methods it is its reposibility to ensure the
21831  * result is compliant.
21832  */
21833 
21834 
21835 
21836 /*
21837  * If this flag is set the operations normally disabled in FIPS mode are
21838  * permitted it is then the applications responsibility to ensure that the
21839  * usage is compliant.
21840  */
21841 
21842 
21843 
21844 
21845 
21846 
21847 
21848 /* Already defined in ossl_typ.h */
21849 /* typedef struct dh_st DH; */
21850 /* typedef struct dh_method DH_METHOD; */
21851 
21852 struct dh_method {
21853     const char *name;
21854     /* Methods here */
21855     int (*generate_key) (DH *dh);
21856     int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
21857     /* Can be null */
21858     int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
21859                        const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
21860                        BN_MONT_CTX *m_ctx);
21861     int (*init) (DH *dh);
21862     int (*finish) (DH *dh);
21863     int flags;
21864     char *app_data;
21865     /* If this is non-NULL, it will be used to generate parameters */
21866     int (*generate_params) (DH *dh, int prime_len, int generator,
21867                             BN_GENCB *cb);
21868 };
21869 
21870 struct dh_st {
21871     /*
21872      * This first argument is used to pick up errors when a DH is passed
21873      * instead of a EVP_PKEY
21874      */
21875     int pad;
21876     int version;
21877     BIGNUM *p;
21878     BIGNUM *g;
21879     long length; /* optional */
21880     BIGNUM *pub_key; /* g^x % p */
21881     BIGNUM *priv_key; /* x */
21882     int flags;
21883     BN_MONT_CTX *method_mont_p;
21884     /* Place holders if we want to do X9.42 DH */
21885     BIGNUM *q;
21886     BIGNUM *j;
21887     unsigned char *seed;
21888     int seedlen;
21889     BIGNUM *counter;
21890     int references;
21891     CRYPTO_EX_DATA ex_data;
21892     const DH_METHOD *meth;
21893     ENGINE *engine;
21894 };
21895 
21896 
21897 /* #define DH_GENERATOR_3       3 */
21898 
21899 
21900 /* DH_check error codes */
21901 # 174 "/usr/include/openssl/dh.h" 3 4
21902 /* DH_check_pub_key error codes */
21903 
21904 
21905 
21906 
21907 /*
21908  * primes p where (p-1)/2 is prime too are called "safe"; we define this for
21909  * backward compatibility:
21910  */
21911 # 209 "/usr/include/openssl/dh.h" 3 4
21912 DH *DHparams_dup(DH *);
21913 
21914 const DH_METHOD *DH_OpenSSL(void);
21915 
21916 void DH_set_default_method(const DH_METHOD *meth);
21917 const DH_METHOD *DH_get_default_method(void);
21918 int DH_set_method(DH *dh, const DH_METHOD *meth);
21919 DH *DH_new_method(ENGINE *engine);
21920 
21921 DH *DH_new(void);
21922 void DH_free(DH *dh);
21923 int DH_up_ref(DH *dh);
21924 int DH_size(const DH *dh);
21925 int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
21926                         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
21927 int DH_set_ex_data(DH *d, int idx, void *arg);
21928 void *DH_get_ex_data(DH *d, int idx);
21929 
21930 /* Deprecated version */
21931 
21932 DH *DH_generate_parameters(int prime_len, int generator,
21933                            void (*callback) (int, int, void *), void *cb_arg);
21934 
21935 
21936 /* New version */
21937 int DH_generate_parameters_ex(DH *dh, int prime_len, int generator,
21938                               BN_GENCB *cb);
21939 
21940 int DH_check(const DH *dh, int *codes);
21941 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes);
21942 int DH_generate_key(DH *dh);
21943 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
21944 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh);
21945 DH *d2i_DHparams(DH **a, const unsigned char **pp, long length);
21946 int i2d_DHparams(const DH *a, unsigned char **pp);
21947 DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length);
21948 int i2d_DHxparams(const DH *a, unsigned char **pp);
21949 
21950 int DHparams_print_fp(FILE *fp, const DH *x);
21951 
21952 
21953 int DHparams_print(BIO *bp, const DH *x);
21954 
21955 
21956 
21957 
21958 /* RFC 5114 parameters */
21959 DH *DH_get_1024_160(void);
21960 DH *DH_get_2048_224(void);
21961 DH *DH_get_2048_256(void);
21962 
21963 
21964 /* RFC2631 KDF */
21965 int DH_KDF_X9_42(unsigned char *out, size_t outlen,
21966                  const unsigned char *Z, size_t Zlen,
21967                  ASN1_OBJECT *key_oid,
21968                  const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
21969 # 357 "/usr/include/openssl/dh.h" 3 4
21970 /* KDF types */
21971 
21972 
21973 
21974 /* BEGIN ERROR CODES */
21975 /*
21976  * The following lines are auto generated by the script mkerr.pl. Any changes
21977  * made after this point may be overwritten when the script is next run.
21978  */
21979 void ERR_load_DH_strings(void);
21980 
21981 /* Error codes for the DH functions. */
21982 
21983 /* Function codes. */
21984 # 392 "/usr/include/openssl/dh.h" 3 4
21985 /* Reason codes. */
21986 # 84 "/usr/include/openssl/dsa.h" 2 3 4
21987 # 92 "/usr/include/openssl/dsa.h" 3 4
21988 /*
21989  * new with 0.9.7h; the built-in DSA implementation now uses constant time
21990  * modular exponentiation for secret exponents by default. This flag causes
21991  * the faster variable sliding window method to be used for all exponents.
21992  */
21993 
21994 
21995 /*
21996  * If this flag is set the DSA method is FIPS compliant and can be used in
21997  * FIPS mode. This is set in the validated module method. If an application
21998  * sets this flag in its own methods it is its reposibility to ensure the
21999  * result is compliant.
22000  */
22001 
22002 
22003 
22004 /*
22005  * If this flag is set the operations normally disabled in FIPS mode are
22006  * permitted it is then the applications responsibility to ensure that the
22007  * usage is compliant.
22008  */
22009 
22010 
22011 
22012 
22013 
22014 
22015 
22016 /* Already defined in ossl_typ.h */
22017 /* typedef struct dsa_st DSA; */
22018 /* typedef struct dsa_method DSA_METHOD; */
22019 
22020 typedef struct DSA_SIG_st {
22021     BIGNUM *r;
22022     BIGNUM *s;
22023 } DSA_SIG;
22024 
22025 struct dsa_method {
22026     const char *name;
22027     DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa);
22028     int (*dsa_sign_setup) (DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
22029                            BIGNUM **rp);
22030     int (*dsa_do_verify) (const unsigned char *dgst, int dgst_len,
22031                           DSA_SIG *sig, DSA *dsa);
22032     int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
22033                         BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
22034                         BN_MONT_CTX *in_mont);
22035     /* Can be null */
22036     int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
22037                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
22038     int (*init) (DSA *dsa);
22039     int (*finish) (DSA *dsa);
22040     int flags;
22041     char *app_data;
22042     /* If this is non-NULL, it is used to generate DSA parameters */
22043     int (*dsa_paramgen) (DSA *dsa, int bits,
22044                          const unsigned char *seed, int seed_len,
22045                          int *counter_ret, unsigned long *h_ret,
22046                          BN_GENCB *cb);
22047     /* If this is non-NULL, it is used to generate DSA keys */
22048     int (*dsa_keygen) (DSA *dsa);
22049 };
22050 
22051 struct dsa_st {
22052     /*
22053      * This first variable is used to pick up errors where a DSA is passed
22054      * instead of of a EVP_PKEY
22055      */
22056     int pad;
22057     long version;
22058     int write_params;
22059     BIGNUM *p;
22060     BIGNUM *q; /* == 20 */
22061     BIGNUM *g;
22062     BIGNUM *pub_key; /* y public key */
22063     BIGNUM *priv_key; /* x private key */
22064     BIGNUM *kinv; /* Signing pre-calc */
22065     BIGNUM *r; /* Signing pre-calc */
22066     int flags;
22067     /* Normally used to cache montgomery values */
22068     BN_MONT_CTX *method_mont_p;
22069     int references;
22070     CRYPTO_EX_DATA ex_data;
22071     const DSA_METHOD *meth;
22072     /* functional reference if 'meth' is ENGINE-provided */
22073     ENGINE *engine;
22074 };
22075 # 187 "/usr/include/openssl/dsa.h" 3 4
22076 DSA *DSAparams_dup(DSA *x);
22077 DSA_SIG *DSA_SIG_new(void);
22078 void DSA_SIG_free(DSA_SIG *a);
22079 int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
22080 DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length);
22081 
22082 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
22083 int DSA_do_verify(const unsigned char *dgst, int dgst_len,
22084                   DSA_SIG *sig, DSA *dsa);
22085 
22086 const DSA_METHOD *DSA_OpenSSL(void);
22087 
22088 void DSA_set_default_method(const DSA_METHOD *);
22089 const DSA_METHOD *DSA_get_default_method(void);
22090 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
22091 
22092 DSA *DSA_new(void);
22093 DSA *DSA_new_method(ENGINE *engine);
22094 void DSA_free(DSA *r);
22095 /* "up" the DSA object's reference count */
22096 int DSA_up_ref(DSA *r);
22097 int DSA_size(const DSA *);
22098         /* next 4 return -1 on error */
22099 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
22100 int DSA_sign(int type, const unsigned char *dgst, int dlen,
22101              unsigned char *sig, unsigned int *siglen, DSA *dsa);
22102 int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
22103                const unsigned char *sigbuf, int siglen, DSA *dsa);
22104 int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
22105                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
22106 int DSA_set_ex_data(DSA *d, int idx, void *arg);
22107 void *DSA_get_ex_data(DSA *d, int idx);
22108 
22109 DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
22110 DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
22111 DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
22112 
22113 /* Deprecated version */
22114 
22115 DSA *DSA_generate_parameters(int bits,
22116                              unsigned char *seed, int seed_len,
22117                              int *counter_ret, unsigned long *h_ret, void
22118                               (*callback) (int, int, void *), void *cb_arg);
22119 
22120 
22121 /* New version */
22122 int DSA_generate_parameters_ex(DSA *dsa, int bits,
22123                                const unsigned char *seed, int seed_len,
22124                                int *counter_ret, unsigned long *h_ret,
22125                                BN_GENCB *cb);
22126 
22127 int DSA_generate_key(DSA *a);
22128 int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
22129 int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
22130 int i2d_DSAparams(const DSA *a, unsigned char **pp);
22131 
22132 
22133 int DSAparams_print(BIO *bp, const DSA *x);
22134 int DSA_print(BIO *bp, const DSA *x, int off);
22135 
22136 
22137 int DSAparams_print_fp(FILE *fp, const DSA *x);
22138 int DSA_print_fp(FILE *bp, const DSA *x, int off);
22139 
22140 
22141 
22142 /*
22143  * Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only
22144  * have one value here we set the number of checks to 64 which is the 128 bit
22145  * security level that is the highest level and valid for creating a 3072 bit
22146  * DSA key.
22147  */
22148 
22149 
22150 
22151 
22152 /*
22153  * Convert DSA structure (key or just parameters) into DH structure (be
22154  * careful to avoid small subgroup attacks when using this!)
22155  */
22156 DH *DSA_dup_DH(const DSA *r);
22157 # 278 "/usr/include/openssl/dsa.h" 3 4
22158 /* BEGIN ERROR CODES */
22159 /*
22160  * The following lines are auto generated by the script mkerr.pl. Any changes
22161  * made after this point may be overwritten when the script is next run.
22162  */
22163 void ERR_load_DSA_strings(void);
22164 
22165 /* Error codes for the DSA functions. */
22166 
22167 /* Function codes. */
22168 # 316 "/usr/include/openssl/dsa.h" 3 4
22169 /* Reason codes. */
22170 # 100 "/usr/include/openssl/x509.h" 2 3 4
22171 
22172 
22173 # 1 "/usr/include/openssl/dh.h" 1 3 4
22174 /* crypto/dh/dh.h */
22175 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
22176  * All rights reserved.
22177  *
22178  * This package is an SSL implementation written
22179  * by Eric Young (eay@cryptsoft.com).
22180  * The implementation was written so as to conform with Netscapes SSL.
22181  *
22182  * This library is free for commercial and non-commercial use as long as
22183  * the following conditions are aheared to.  The following conditions
22184  * apply to all code found in this distribution, be it the RC4, RSA,
22185  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
22186  * included with this distribution is covered by the same copyright terms
22187  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
22188  *
22189  * Copyright remains Eric Young's, and as such any Copyright notices in
22190  * the code are not to be removed.
22191  * If this package is used in a product, Eric Young should be given attribution
22192  * as the author of the parts of the library used.
22193  * This can be in the form of a textual message at program startup or
22194  * in documentation (online or textual) provided with the package.
22195  *
22196  * Redistribution and use in source and binary forms, with or without
22197  * modification, are permitted provided that the following conditions
22198  * are met:
22199  * 1. Redistributions of source code must retain the copyright
22200  *    notice, this list of conditions and the following disclaimer.
22201  * 2. Redistributions in binary form must reproduce the above copyright
22202  *    notice, this list of conditions and the following disclaimer in the
22203  *    documentation and/or other materials provided with the distribution.
22204  * 3. All advertising materials mentioning features or use of this software
22205  *    must display the following acknowledgement:
22206  *    "This product includes cryptographic software written by
22207  *     Eric Young (eay@cryptsoft.com)"
22208  *    The word 'cryptographic' can be left out if the rouines from the library
22209  *    being used are not cryptographic related :-).
22210  * 4. If you include any Windows specific code (or a derivative thereof) from
22211  *    the apps directory (application code) you must include an acknowledgement:
22212  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
22213  *
22214  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
22215  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22216  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22217  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22218  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22219  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22220  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22221  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22222  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22223  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22224  * SUCH DAMAGE.
22225  *
22226  * The licence and distribution terms for any publically available version or
22227  * derivative of this code cannot be changed.  i.e. this code cannot simply be
22228  * copied and put under another distribution licence
22229  * [including the GNU Public Licence.]
22230  */
22231 # 103 "/usr/include/openssl/x509.h" 2 3 4
22232 
22233 
22234 
22235 
22236 # 1 "/usr/include/openssl/sha.h" 1 3 4
22237 /* crypto/sha/sha.h */
22238 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
22239  * All rights reserved.
22240  *
22241  * This package is an SSL implementation written
22242  * by Eric Young (eay@cryptsoft.com).
22243  * The implementation was written so as to conform with Netscapes SSL.
22244  *
22245  * This library is free for commercial and non-commercial use as long as
22246  * the following conditions are aheared to.  The following conditions
22247  * apply to all code found in this distribution, be it the RC4, RSA,
22248  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
22249  * included with this distribution is covered by the same copyright terms
22250  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
22251  *
22252  * Copyright remains Eric Young's, and as such any Copyright notices in
22253  * the code are not to be removed.
22254  * If this package is used in a product, Eric Young should be given attribution
22255  * as the author of the parts of the library used.
22256  * This can be in the form of a textual message at program startup or
22257  * in documentation (online or textual) provided with the package.
22258  *
22259  * Redistribution and use in source and binary forms, with or without
22260  * modification, are permitted provided that the following conditions
22261  * are met:
22262  * 1. Redistributions of source code must retain the copyright
22263  *    notice, this list of conditions and the following disclaimer.
22264  * 2. Redistributions in binary form must reproduce the above copyright
22265  *    notice, this list of conditions and the following disclaimer in the
22266  *    documentation and/or other materials provided with the distribution.
22267  * 3. All advertising materials mentioning features or use of this software
22268  *    must display the following acknowledgement:
22269  *    "This product includes cryptographic software written by
22270  *     Eric Young (eay@cryptsoft.com)"
22271  *    The word 'cryptographic' can be left out if the rouines from the library
22272  *    being used are not cryptographic related :-).
22273  * 4. If you include any Windows specific code (or a derivative thereof) from
22274  *    the apps directory (application code) you must include an acknowledgement:
22275  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
22276  *
22277  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
22278  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22279  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22280  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22281  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22282  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22283  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22284  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22285  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22286  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22287  * SUCH DAMAGE.
22288  *
22289  * The licence and distribution terms for any publically available version or
22290  * derivative of this code cannot be changed.  i.e. this code cannot simply be
22291  * copied and put under another distribution licence
22292  * [including the GNU Public Licence.]
22293  */
22294 
22295 
22296 
22297 
22298 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
22299 /* e_os2.h */
22300 /* ====================================================================
22301  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
22302  *
22303  * Redistribution and use in source and binary forms, with or without
22304  * modification, are permitted provided that the following conditions
22305  * are met:
22306  *
22307  * 1. Redistributions of source code must retain the above copyright
22308  *    notice, this list of conditions and the following disclaimer.
22309  *
22310  * 2. Redistributions in binary form must reproduce the above copyright
22311  *    notice, this list of conditions and the following disclaimer in
22312  *    the documentation and/or other materials provided with the
22313  *    distribution.
22314  *
22315  * 3. All advertising materials mentioning features or use of this
22316  *    software must display the following acknowledgment:
22317  *    "This product includes software developed by the OpenSSL Project
22318  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
22319  *
22320  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
22321  *    endorse or promote products derived from this software without
22322  *    prior written permission. For written permission, please contact
22323  *    openssl-core@openssl.org.
22324  *
22325  * 5. Products derived from this software may not be called "OpenSSL"
22326  *    nor may "OpenSSL" appear in their names without prior written
22327  *    permission of the OpenSSL Project.
22328  *
22329  * 6. Redistributions of any form whatsoever must retain the following
22330  *    acknowledgment:
22331  *    "This product includes software developed by the OpenSSL Project
22332  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
22333  *
22334  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
22335  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22336  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22337  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
22338  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22339  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22340  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22341  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22342  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
22343  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22344  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
22345  * OF THE POSSIBILITY OF SUCH DAMAGE.
22346  * ====================================================================
22347  *
22348  * This product includes cryptographic software written by Eric Young
22349  * (eay@cryptsoft.com).  This product includes software written by Tim
22350  * Hudson (tjh@cryptsoft.com).
22351  *
22352  */
22353 
22354 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
22355 /* opensslconf.h */
22356 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
22357 
22358 
22359 
22360 
22361 /* OpenSSL was configured with the following options: */
22362 # 108 "/usr/include/openssl/opensslconf.h" 3 4
22363 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
22364    asks for it.  This is a transient feature that is provided for those
22365    who haven't had the time to do the appropriate changes in their
22366    applications.  */
22367 # 204 "/usr/include/openssl/opensslconf.h" 3 4
22368 /* crypto/opensslconf.h.in */
22369 
22370 /* Generate 80386 code? */
22371 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
22372 # 63 "/usr/include/openssl/sha.h" 2 3 4
22373 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
22374 /*
22375  * CDDL HEADER START
22376  *
22377  * The contents of this file are subject to the terms of the
22378  * Common Development and Distribution License, Version 1.0 only
22379  * (the "License").  You may not use this file except in compliance
22380  * with the License.
22381  *
22382  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22383  * or http://www.opensolaris.org/os/licensing.
22384  * See the License for the specific language governing permissions
22385  * and limitations under the License.
22386  *
22387  * When distributing Covered Code, include this CDDL HEADER in each
22388  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22389  * If applicable, add the following below this CDDL HEADER, with the
22390  * fields enclosed by brackets "[]" replaced with your own identifying
22391  * information: Portions Copyright [yyyy] [name of copyright owner]
22392  *
22393  * CDDL HEADER END
22394  */
22395 /*	Copyright (c) 1988 AT&T	*/
22396 /*	  All Rights Reserved  	*/
22397 
22398 
22399 /*
22400  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
22401  * Use is subject to license terms.
22402  */
22403 # 64 "/usr/include/openssl/sha.h" 2 3 4
22404 # 77 "/usr/include/openssl/sha.h" 3 4
22405 /*-
22406  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
22407  * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then !
22408  * ! SHA_LONG_LOG2 has to be defined along.                        !
22409  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
22410  */
22411 # 100 "/usr/include/openssl/sha.h" 3 4
22412 typedef struct SHAstate_st {
22413     unsigned int h0, h1, h2, h3, h4;
22414     unsigned int Nl, Nh;
22415     unsigned int data[16];
22416     unsigned int num;
22417 } SHA_CTX;
22418 
22419 
22420 
22421 
22422 
22423 int SHA_Init(SHA_CTX *c);
22424 int SHA_Update(SHA_CTX *c, const void *data, size_t len);
22425 int SHA_Final(unsigned char *md, SHA_CTX *c);
22426 unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md);
22427 void SHA_Transform(SHA_CTX *c, const unsigned char *data);
22428 
22429 
22430 
22431 
22432 
22433 int SHA1_Init(SHA_CTX *c);
22434 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
22435 int SHA1_Final(unsigned char *md, SHA_CTX *c);
22436 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
22437 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
22438 # 134 "/usr/include/openssl/sha.h" 3 4
22439 typedef struct SHA256state_st {
22440     unsigned int h[8];
22441     unsigned int Nl, Nh;
22442     unsigned int data[16];
22443     unsigned int num, md_len;
22444 } SHA256_CTX;
22445 
22446 
22447 
22448 
22449 
22450 
22451 int SHA224_Init(SHA256_CTX *c);
22452 int SHA224_Update(SHA256_CTX *c, const void *data, size_t len);
22453 int SHA224_Final(unsigned char *md, SHA256_CTX *c);
22454 unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md);
22455 int SHA256_Init(SHA256_CTX *c);
22456 int SHA256_Update(SHA256_CTX *c, const void *data, size_t len);
22457 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
22458 unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);
22459 void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
22460 
22461 
22462 
22463 
22464 
22465 
22466 /*
22467  * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64
22468  * being exactly 64-bit wide. See Implementation Notes in sha512.c
22469  * for further details.
22470  */
22471 /*
22472  * SHA-512 treats input data as a
22473  * contiguous array of 64 bit
22474  * wide big-endian values.
22475  */
22476 # 183 "/usr/include/openssl/sha.h" 3 4
22477 typedef struct SHA512state_st {
22478     unsigned long long h[8];
22479     unsigned long long Nl, Nh;
22480     union {
22481         unsigned long long d[16];
22482         unsigned char p[(16*8)];
22483     } u;
22484     unsigned int num, md_len;
22485 } SHA512_CTX;
22486 
22487 
22488 
22489 
22490 
22491 
22492 
22493 int SHA384_Init(SHA512_CTX *c);
22494 int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
22495 int SHA384_Final(unsigned char *md, SHA512_CTX *c);
22496 unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);
22497 int SHA512_Init(SHA512_CTX *c);
22498 int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);
22499 int SHA512_Final(unsigned char *md, SHA512_CTX *c);
22500 unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
22501 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
22502 # 108 "/usr/include/openssl/x509.h" 2 3 4
22503 
22504 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
22505 /* ====================================================================
22506  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
22507  *
22508  * Redistribution and use in source and binary forms, with or without
22509  * modification, are permitted provided that the following conditions
22510  * are met:
22511  *
22512  * 1. Redistributions of source code must retain the above copyright
22513  *    notice, this list of conditions and the following disclaimer.
22514  *
22515  * 2. Redistributions in binary form must reproduce the above copyright
22516  *    notice, this list of conditions and the following disclaimer in
22517  *    the documentation and/or other materials provided with the
22518  *    distribution.
22519  *
22520  * 3. All advertising materials mentioning features or use of this
22521  *    software must display the following acknowledgment:
22522  *    "This product includes software developed by the OpenSSL Project
22523  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
22524  *
22525  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
22526  *    endorse or promote products derived from this software without
22527  *    prior written permission. For written permission, please contact
22528  *    openssl-core@openssl.org.
22529  *
22530  * 5. Products derived from this software may not be called "OpenSSL"
22531  *    nor may "OpenSSL" appear in their names without prior written
22532  *    permission of the OpenSSL Project.
22533  *
22534  * 6. Redistributions of any form whatsoever must retain the following
22535  *    acknowledgment:
22536  *    "This product includes software developed by the OpenSSL Project
22537  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
22538  *
22539  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
22540  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22541  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22542  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
22543  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22544  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22545  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22546  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22547  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
22548  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22549  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
22550  * OF THE POSSIBILITY OF SUCH DAMAGE.
22551  * ====================================================================
22552  *
22553  * This product includes cryptographic software written by Eric Young
22554  * (eay@cryptsoft.com).  This product includes software written by Tim
22555  * Hudson (tjh@cryptsoft.com).
22556  *
22557  */
22558 # 110 "/usr/include/openssl/x509.h" 2 3 4
22559 # 137 "/usr/include/openssl/x509.h" 3 4
22560 typedef struct X509_objects_st {
22561     int nid;
22562     int (*a2i) (void);
22563     int (*i2a) (void);
22564 } X509_OBJECTS;
22565 
22566 struct X509_algor_st {
22567     ASN1_OBJECT *algorithm;
22568     ASN1_TYPE *parameter;
22569 } /* X509_ALGOR */ ;
22570 
22571 
22572 
22573 typedef struct stack_st_X509_ALGOR X509_ALGORS;
22574 
22575 typedef struct X509_val_st {
22576     ASN1_TIME *notBefore;
22577     ASN1_TIME *notAfter;
22578 } X509_VAL;
22579 
22580 struct X509_pubkey_st {
22581     X509_ALGOR *algor;
22582     ASN1_BIT_STRING *public_key;
22583     EVP_PKEY *pkey;
22584 };
22585 
22586 typedef struct X509_sig_st {
22587     X509_ALGOR *algor;
22588     ASN1_OCTET_STRING *digest;
22589 } X509_SIG;
22590 
22591 typedef struct X509_name_entry_st {
22592     ASN1_OBJECT *object;
22593     ASN1_STRING *value;
22594     int set;
22595     int size; /* temp variable */
22596 } X509_NAME_ENTRY;
22597 
22598 struct stack_st_X509_NAME_ENTRY { _STACK stack; };
22599 
22600 
22601 /* we always keep X509_NAMEs in 2 forms. */
22602 struct X509_name_st {
22603     struct stack_st_X509_NAME_ENTRY *entries;
22604     int modified; /* true if 'bytes' needs to be built */
22605 
22606     BUF_MEM *bytes;
22607 
22608 
22609 
22610 /*      unsigned long hash; Keep the hash around for lookups */
22611     unsigned char *canon_enc;
22612     int canon_enclen;
22613 } /* X509_NAME */ ;
22614 
22615 struct stack_st_X509_NAME { _STACK stack; };
22616 
22617 
22618 
22619 typedef struct X509_extension_st {
22620     ASN1_OBJECT *object;
22621     ASN1_BOOLEAN critical;
22622     ASN1_OCTET_STRING *value;
22623 } X509_EXTENSION;
22624 
22625 typedef struct stack_st_X509_EXTENSION X509_EXTENSIONS;
22626 
22627 struct stack_st_X509_EXTENSION { _STACK stack; };
22628 
22629 
22630 /* a sequence of these are used */
22631 typedef struct x509_attributes_st {
22632     ASN1_OBJECT *object;
22633     int single; /* 0 for a set, 1 for a single item (which is
22634                                  * wrong) */
22635     union {
22636         char *ptr;
22637         /*
22638          * 0
22639          */ struct stack_st_ASN1_TYPE *set;
22640         /*
22641          * 1
22642          */ ASN1_TYPE *single;
22643     } value;
22644 } X509_ATTRIBUTE;
22645 
22646 struct stack_st_X509_ATTRIBUTE { _STACK stack; };
22647 
22648 
22649 typedef struct X509_req_info_st {
22650     ASN1_ENCODING enc;
22651     ASN1_INTEGER *version;
22652     X509_NAME *subject;
22653     X509_PUBKEY *pubkey;
22654     /*  d=2 hl=2 l=  0 cons: cont: 00 */
22655     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
22656 } X509_REQ_INFO;
22657 
22658 typedef struct X509_req_st {
22659     X509_REQ_INFO *req_info;
22660     X509_ALGOR *sig_alg;
22661     ASN1_BIT_STRING *signature;
22662     int references;
22663 } X509_REQ;
22664 
22665 typedef struct x509_cinf_st {
22666     ASN1_INTEGER *version; /* [ 0 ] default of v1 */
22667     ASN1_INTEGER *serialNumber;
22668     X509_ALGOR *signature;
22669     X509_NAME *issuer;
22670     X509_VAL *validity;
22671     X509_NAME *subject;
22672     X509_PUBKEY *key;
22673     ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */
22674     ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */
22675     struct stack_st_X509_EXTENSION *extensions; /* [ 3 ] optional in v3 */
22676     ASN1_ENCODING enc;
22677 } X509_CINF;
22678 
22679 /*
22680  * This stuff is certificate "auxiliary info" it contains details which are
22681  * useful in certificate stores and databases. When used this is tagged onto
22682  * the end of the certificate itself
22683  */
22684 
22685 typedef struct x509_cert_aux_st {
22686     struct stack_st_ASN1_OBJECT *trust; /* trusted uses */
22687     struct stack_st_ASN1_OBJECT *reject; /* rejected uses */
22688     ASN1_UTF8STRING *alias; /* "friendly name" */
22689     ASN1_OCTET_STRING *keyid; /* key id of private key */
22690     struct stack_st_X509_ALGOR *other; /* other unspecified info */
22691 } X509_CERT_AUX;
22692 
22693 struct x509_st {
22694     X509_CINF *cert_info;
22695     X509_ALGOR *sig_alg;
22696     ASN1_BIT_STRING *signature;
22697     int valid;
22698     int references;
22699     char *name;
22700     CRYPTO_EX_DATA ex_data;
22701     /* These contain copies of various extension values */
22702     long ex_pathlen;
22703     long ex_pcpathlen;
22704     unsigned long ex_flags;
22705     unsigned long ex_kusage;
22706     unsigned long ex_xkusage;
22707     unsigned long ex_nscert;
22708     ASN1_OCTET_STRING *skid;
22709     AUTHORITY_KEYID *akid;
22710     X509_POLICY_CACHE *policy_cache;
22711     struct stack_st_DIST_POINT *crldp;
22712     struct stack_st_GENERAL_NAME *altname;
22713     NAME_CONSTRAINTS *nc;
22714 
22715 
22716 
22717 
22718 
22719     unsigned char sha1_hash[20];
22720 
22721     X509_CERT_AUX *aux;
22722 } /* X509 */ ;
22723 
22724 struct stack_st_X509 { _STACK stack; };
22725 
22726 
22727 /* This is used for a table of trust checking functions */
22728 
22729 typedef struct x509_trust_st {
22730     int trust;
22731     int flags;
22732     int (*check_trust) (struct x509_trust_st *, X509 *, int);
22733     char *name;
22734     int arg1;
22735     void *arg2;
22736 } X509_TRUST;
22737 
22738 struct stack_st_X509_TRUST { _STACK stack; };
22739 
22740 typedef struct x509_cert_pair_st {
22741     X509 *forward;
22742     X509 *reverse;
22743 } X509_CERT_PAIR;
22744 
22745 /* standard trust ids */
22746 # 335 "/usr/include/openssl/x509.h" 3 4
22747 /* Keep these up to date! */
22748 
22749 
22750 
22751 /* trust_flags values */
22752 
22753 
22754 
22755 /* check_trust return codes */
22756 
22757 
22758 
22759 
22760 
22761 /* Flags for X509_print_ex() */
22762 # 366 "/usr/include/openssl/x509.h" 3 4
22763 /* Flags specific to X509_NAME_print_ex() */
22764 
22765 /* The field separator information */
22766 # 381 "/usr/include/openssl/x509.h" 3 4
22767 /* How the field name is shown */
22768 # 392 "/usr/include/openssl/x509.h" 3 4
22769 /*
22770  * This determines if we dump fields we don't recognise: RFC2253 requires
22771  * this.
22772  */
22773 
22774 
22775 
22776 
22777 
22778 
22779 /* Complete set of RFC2253 flags */
22780 
22781 
22782 
22783 
22784 
22785 
22786 
22787 /* readable oneline form */
22788 
22789 
22790 
22791 
22792 
22793 
22794 
22795 /* readable multiline form */
22796 # 427 "/usr/include/openssl/x509.h" 3 4
22797 struct x509_revoked_st {
22798     ASN1_INTEGER *serialNumber;
22799     ASN1_TIME *revocationDate;
22800     struct stack_st_X509_EXTENSION /* optional */ *extensions;
22801     /* Set up if indirect CRL */
22802     struct stack_st_GENERAL_NAME *issuer;
22803     /* Revocation reason */
22804     int reason;
22805     int sequence; /* load sequence */
22806 };
22807 
22808 struct stack_st_X509_REVOKED { _STACK stack; };
22809 
22810 
22811 typedef struct X509_crl_info_st {
22812     ASN1_INTEGER *version;
22813     X509_ALGOR *sig_alg;
22814     X509_NAME *issuer;
22815     ASN1_TIME *lastUpdate;
22816     ASN1_TIME *nextUpdate;
22817     struct stack_st_X509_REVOKED *revoked;
22818     struct stack_st_X509_EXTENSION /* [0] */ *extensions;
22819     ASN1_ENCODING enc;
22820 } X509_CRL_INFO;
22821 
22822 struct X509_crl_st {
22823     /* actual signature */
22824     X509_CRL_INFO *crl;
22825     X509_ALGOR *sig_alg;
22826     ASN1_BIT_STRING *signature;
22827     int references;
22828     int flags;
22829     /* Copies of various extensions */
22830     AUTHORITY_KEYID *akid;
22831     ISSUING_DIST_POINT *idp;
22832     /* Convenient breakdown of IDP */
22833     int idp_flags;
22834     int idp_reasons;
22835     /* CRL and base CRL numbers for delta processing */
22836     ASN1_INTEGER *crl_number;
22837     ASN1_INTEGER *base_crl_number;
22838 
22839     unsigned char sha1_hash[20];
22840 
22841     struct stack_st_GENERAL_NAMES *issuers;
22842     const X509_CRL_METHOD *meth;
22843     void *meth_data;
22844 } /* X509_CRL */ ;
22845 
22846 struct stack_st_X509_CRL { _STACK stack; };
22847 
22848 
22849 typedef struct private_key_st {
22850     int version;
22851     /* The PKCS#8 data types */
22852     X509_ALGOR *enc_algor;
22853     ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */
22854     /* When decrypted, the following will not be NULL */
22855     EVP_PKEY *dec_pkey;
22856     /* used to encrypt and decrypt */
22857     int key_length;
22858     char *key_data;
22859     int key_free; /* true if we should auto free key_data */
22860     /* expanded version of 'enc_algor' */
22861     EVP_CIPHER_INFO cipher;
22862     int references;
22863 } X509_PKEY;
22864 
22865 
22866 typedef struct X509_info_st {
22867     X509 *x509;
22868     X509_CRL *crl;
22869     X509_PKEY *x_pkey;
22870     EVP_CIPHER_INFO enc_cipher;
22871     int enc_len;
22872     char *enc_data;
22873     int references;
22874 } X509_INFO;
22875 
22876 struct stack_st_X509_INFO { _STACK stack; };
22877 
22878 
22879 /*
22880  * The next 2 structures and their 8 routines were sent to me by Pat Richard
22881  * <patr@x509.com> and are used to manipulate Netscapes spki structures -
22882  * useful if you are writing a CA web page
22883  */
22884 typedef struct Netscape_spkac_st {
22885     X509_PUBKEY *pubkey;
22886     ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */
22887 } NETSCAPE_SPKAC;
22888 
22889 typedef struct Netscape_spki_st {
22890     NETSCAPE_SPKAC *spkac; /* signed public key and challenge */
22891     X509_ALGOR *sig_algor;
22892     ASN1_BIT_STRING *signature;
22893 } NETSCAPE_SPKI;
22894 
22895 /* Netscape certificate sequence structure */
22896 typedef struct Netscape_certificate_sequence {
22897     ASN1_OBJECT *type;
22898     struct stack_st_X509 *certs;
22899 } NETSCAPE_CERT_SEQUENCE;
22900 
22901 /*- Unused (and iv length is wrong)
22902 typedef struct CBCParameter_st
22903         {
22904         unsigned char iv[8];
22905         } CBC_PARAM;
22906 */
22907 
22908 /* Password based encryption structure */
22909 
22910 typedef struct PBEPARAM_st {
22911     ASN1_OCTET_STRING *salt;
22912     ASN1_INTEGER *iter;
22913 } PBEPARAM;
22914 
22915 /* Password based encryption V2 structures */
22916 
22917 typedef struct PBE2PARAM_st {
22918     X509_ALGOR *keyfunc;
22919     X509_ALGOR *encryption;
22920 } PBE2PARAM;
22921 
22922 typedef struct PBKDF2PARAM_st {
22923 /* Usually OCTET STRING but could be anything */
22924     ASN1_TYPE *salt;
22925     ASN1_INTEGER *iter;
22926     ASN1_INTEGER *keylength;
22927     X509_ALGOR *prf;
22928 } PBKDF2PARAM;
22929 
22930 /* PKCS#8 private key info structure */
22931 
22932 struct pkcs8_priv_key_info_st {
22933     /* Flag for various broken formats */
22934     int broken;
22935 
22936 
22937 
22938 
22939 
22940     ASN1_INTEGER *version;
22941     X509_ALGOR *pkeyalg;
22942     /* Should be OCTET STRING but some are broken */
22943     ASN1_TYPE *pkey;
22944     struct stack_st_X509_ATTRIBUTE *attributes;
22945 };
22946 
22947 
22948 
22949 
22950 
22951 # 1 "/usr/include/openssl/x509_vfy.h" 1 3 4
22952 /* crypto/x509/x509_vfy.h */
22953 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
22954  * All rights reserved.
22955  *
22956  * This package is an SSL implementation written
22957  * by Eric Young (eay@cryptsoft.com).
22958  * The implementation was written so as to conform with Netscapes SSL.
22959  *
22960  * This library is free for commercial and non-commercial use as long as
22961  * the following conditions are aheared to.  The following conditions
22962  * apply to all code found in this distribution, be it the RC4, RSA,
22963  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
22964  * included with this distribution is covered by the same copyright terms
22965  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
22966  *
22967  * Copyright remains Eric Young's, and as such any Copyright notices in
22968  * the code are not to be removed.
22969  * If this package is used in a product, Eric Young should be given attribution
22970  * as the author of the parts of the library used.
22971  * This can be in the form of a textual message at program startup or
22972  * in documentation (online or textual) provided with the package.
22973  *
22974  * Redistribution and use in source and binary forms, with or without
22975  * modification, are permitted provided that the following conditions
22976  * are met:
22977  * 1. Redistributions of source code must retain the copyright
22978  *    notice, this list of conditions and the following disclaimer.
22979  * 2. Redistributions in binary form must reproduce the above copyright
22980  *    notice, this list of conditions and the following disclaimer in the
22981  *    documentation and/or other materials provided with the distribution.
22982  * 3. All advertising materials mentioning features or use of this software
22983  *    must display the following acknowledgement:
22984  *    "This product includes cryptographic software written by
22985  *     Eric Young (eay@cryptsoft.com)"
22986  *    The word 'cryptographic' can be left out if the rouines from the library
22987  *    being used are not cryptographic related :-).
22988  * 4. If you include any Windows specific code (or a derivative thereof) from
22989  *    the apps directory (application code) you must include an acknowledgement:
22990  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
22991  *
22992  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
22993  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22994  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22995  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22996  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22997  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22998  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22999  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23000  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23001  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23002  * SUCH DAMAGE.
23003  *
23004  * The licence and distribution terms for any publically available version or
23005  * derivative of this code cannot be changed.  i.e. this code cannot simply be
23006  * copied and put under another distribution licence
23007  * [including the GNU Public Licence.]
23008  */
23009 # 70 "/usr/include/openssl/x509_vfy.h" 3 4
23010 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
23011 /* opensslconf.h */
23012 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
23013 
23014 
23015 
23016 
23017 /* OpenSSL was configured with the following options: */
23018 # 108 "/usr/include/openssl/opensslconf.h" 3 4
23019 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
23020    asks for it.  This is a transient feature that is provided for those
23021    who haven't had the time to do the appropriate changes in their
23022    applications.  */
23023 # 204 "/usr/include/openssl/opensslconf.h" 3 4
23024 /* crypto/opensslconf.h.in */
23025 
23026 /* Generate 80386 code? */
23027 # 71 "/usr/include/openssl/x509_vfy.h" 2 3 4
23028 
23029 # 1 "/usr/include/openssl/lhash.h" 1 3 4
23030 /* crypto/lhash/lhash.h */
23031 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
23032  * All rights reserved.
23033  *
23034  * This package is an SSL implementation written
23035  * by Eric Young (eay@cryptsoft.com).
23036  * The implementation was written so as to conform with Netscapes SSL.
23037  *
23038  * This library is free for commercial and non-commercial use as long as
23039  * the following conditions are aheared to.  The following conditions
23040  * apply to all code found in this distribution, be it the RC4, RSA,
23041  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
23042  * included with this distribution is covered by the same copyright terms
23043  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
23044  *
23045  * Copyright remains Eric Young's, and as such any Copyright notices in
23046  * the code are not to be removed.
23047  * If this package is used in a product, Eric Young should be given attribution
23048  * as the author of the parts of the library used.
23049  * This can be in the form of a textual message at program startup or
23050  * in documentation (online or textual) provided with the package.
23051  *
23052  * Redistribution and use in source and binary forms, with or without
23053  * modification, are permitted provided that the following conditions
23054  * are met:
23055  * 1. Redistributions of source code must retain the copyright
23056  *    notice, this list of conditions and the following disclaimer.
23057  * 2. Redistributions in binary form must reproduce the above copyright
23058  *    notice, this list of conditions and the following disclaimer in the
23059  *    documentation and/or other materials provided with the distribution.
23060  * 3. All advertising materials mentioning features or use of this software
23061  *    must display the following acknowledgement:
23062  *    "This product includes cryptographic software written by
23063  *     Eric Young (eay@cryptsoft.com)"
23064  *    The word 'cryptographic' can be left out if the rouines from the library
23065  *    being used are not cryptographic related :-).
23066  * 4. If you include any Windows specific code (or a derivative thereof) from
23067  *    the apps directory (application code) you must include an acknowledgement:
23068  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
23069  *
23070  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
23071  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23072  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23073  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23074  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23075  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23076  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23077  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23078  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23079  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23080  * SUCH DAMAGE.
23081  *
23082  * The licence and distribution terms for any publically available version or
23083  * derivative of this code cannot be changed.  i.e. this code cannot simply be
23084  * copied and put under another distribution licence
23085  * [including the GNU Public Licence.]
23086  */
23087 
23088 /*
23089  * Header for dynamic hash table routines Author - Eric Young
23090  */
23091 
23092 
23093 
23094 
23095 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
23096 /* e_os2.h */
23097 /* ====================================================================
23098  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
23099  *
23100  * Redistribution and use in source and binary forms, with or without
23101  * modification, are permitted provided that the following conditions
23102  * are met:
23103  *
23104  * 1. Redistributions of source code must retain the above copyright
23105  *    notice, this list of conditions and the following disclaimer.
23106  *
23107  * 2. Redistributions in binary form must reproduce the above copyright
23108  *    notice, this list of conditions and the following disclaimer in
23109  *    the documentation and/or other materials provided with the
23110  *    distribution.
23111  *
23112  * 3. All advertising materials mentioning features or use of this
23113  *    software must display the following acknowledgment:
23114  *    "This product includes software developed by the OpenSSL Project
23115  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23116  *
23117  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23118  *    endorse or promote products derived from this software without
23119  *    prior written permission. For written permission, please contact
23120  *    openssl-core@openssl.org.
23121  *
23122  * 5. Products derived from this software may not be called "OpenSSL"
23123  *    nor may "OpenSSL" appear in their names without prior written
23124  *    permission of the OpenSSL Project.
23125  *
23126  * 6. Redistributions of any form whatsoever must retain the following
23127  *    acknowledgment:
23128  *    "This product includes software developed by the OpenSSL Project
23129  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
23130  *
23131  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
23132  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23133  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23134  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
23135  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23136  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23137  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23138  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23139  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23140  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23141  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23142  * OF THE POSSIBILITY OF SUCH DAMAGE.
23143  * ====================================================================
23144  *
23145  * This product includes cryptographic software written by Eric Young
23146  * (eay@cryptsoft.com).  This product includes software written by Tim
23147  * Hudson (tjh@cryptsoft.com).
23148  *
23149  */
23150 
23151 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
23152 /* opensslconf.h */
23153 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
23154 
23155 
23156 
23157 
23158 /* OpenSSL was configured with the following options: */
23159 # 108 "/usr/include/openssl/opensslconf.h" 3 4
23160 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
23161    asks for it.  This is a transient feature that is provided for those
23162    who haven't had the time to do the appropriate changes in their
23163    applications.  */
23164 # 204 "/usr/include/openssl/opensslconf.h" 3 4
23165 /* crypto/opensslconf.h.in */
23166 
23167 /* Generate 80386 code? */
23168 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
23169 # 67 "/usr/include/openssl/lhash.h" 2 3 4
23170 
23171 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
23172 /*
23173  * CDDL HEADER START
23174  *
23175  * The contents of this file are subject to the terms of the
23176  * Common Development and Distribution License (the "License").
23177  * You may not use this file except in compliance with the License.
23178  *
23179  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23180  * or http://www.opensolaris.org/os/licensing.
23181  * See the License for the specific language governing permissions
23182  * and limitations under the License.
23183  *
23184  * When distributing Covered Code, include this CDDL HEADER in each
23185  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23186  * If applicable, add the following below this CDDL HEADER, with the
23187  * fields enclosed by brackets "[]" replaced with your own identifying
23188  * information: Portions Copyright [yyyy] [name of copyright owner]
23189  *
23190  * CDDL HEADER END
23191  */
23192 
23193 /*
23194  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23195  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
23196  */
23197 
23198 /*	Copyright (c) 1988 AT&T	*/
23199 /*	  All Rights Reserved  	*/
23200 
23201 /*
23202  * User-visible pieces of the ANSI C standard I/O package.
23203  */
23204 # 69 "/usr/include/openssl/lhash.h" 2 3 4
23205 
23206 
23207 
23208 # 1 "/usr/include/openssl/bio.h" 1 3 4
23209 /* crypto/bio/bio.h */
23210 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
23211  * All rights reserved.
23212  *
23213  * This package is an SSL implementation written
23214  * by Eric Young (eay@cryptsoft.com).
23215  * The implementation was written so as to conform with Netscapes SSL.
23216  *
23217  * This library is free for commercial and non-commercial use as long as
23218  * the following conditions are aheared to.  The following conditions
23219  * apply to all code found in this distribution, be it the RC4, RSA,
23220  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
23221  * included with this distribution is covered by the same copyright terms
23222  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
23223  *
23224  * Copyright remains Eric Young's, and as such any Copyright notices in
23225  * the code are not to be removed.
23226  * If this package is used in a product, Eric Young should be given attribution
23227  * as the author of the parts of the library used.
23228  * This can be in the form of a textual message at program startup or
23229  * in documentation (online or textual) provided with the package.
23230  *
23231  * Redistribution and use in source and binary forms, with or without
23232  * modification, are permitted provided that the following conditions
23233  * are met:
23234  * 1. Redistributions of source code must retain the copyright
23235  *    notice, this list of conditions and the following disclaimer.
23236  * 2. Redistributions in binary form must reproduce the above copyright
23237  *    notice, this list of conditions and the following disclaimer in the
23238  *    documentation and/or other materials provided with the distribution.
23239  * 3. All advertising materials mentioning features or use of this software
23240  *    must display the following acknowledgement:
23241  *    "This product includes cryptographic software written by
23242  *     Eric Young (eay@cryptsoft.com)"
23243  *    The word 'cryptographic' can be left out if the rouines from the library
23244  *    being used are not cryptographic related :-).
23245  * 4. If you include any Windows specific code (or a derivative thereof) from
23246  *    the apps directory (application code) you must include an acknowledgement:
23247  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
23248  *
23249  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
23250  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23251  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23252  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23253  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23254  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23255  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23256  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23257  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23258  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23259  * SUCH DAMAGE.
23260  *
23261  * The licence and distribution terms for any publically available version or
23262  * derivative of this code cannot be changed.  i.e. this code cannot simply be
23263  * copied and put under another distribution licence
23264  * [including the GNU Public Licence.]
23265  */
23266 # 73 "/usr/include/openssl/lhash.h" 2 3 4
23267 
23268 
23269 
23270 
23271 
23272 
23273 typedef struct lhash_node_st {
23274     void *data;
23275     struct lhash_node_st *next;
23276 
23277     unsigned long hash;
23278 
23279 } LHASH_NODE;
23280 
23281 typedef int (*LHASH_COMP_FN_TYPE) (const void *, const void *);
23282 typedef unsigned long (*LHASH_HASH_FN_TYPE) (const void *);
23283 typedef void (*LHASH_DOALL_FN_TYPE) (void *);
23284 typedef void (*LHASH_DOALL_ARG_FN_TYPE) (void *, void *);
23285 
23286 /*
23287  * Macros for declaring and implementing type-safe wrappers for LHASH
23288  * callbacks. This way, callbacks can be provided to LHASH structures without
23289  * function pointer casting and the macro-defined callbacks provide
23290  * per-variable casting before deferring to the underlying type-specific
23291  * callbacks. NB: It is possible to place a "static" in front of both the
23292  * DECLARE and IMPLEMENT macros if the functions are strictly internal.
23293  */
23294 
23295 /* First: "hash" functions */
23296 # 110 "/usr/include/openssl/lhash.h" 3 4
23297 /* Second: "compare" functions */
23298 # 120 "/usr/include/openssl/lhash.h" 3 4
23299 /* Third: "doall" functions */
23300 # 129 "/usr/include/openssl/lhash.h" 3 4
23301 /* Fourth: "doall_arg" functions */
23302 # 139 "/usr/include/openssl/lhash.h" 3 4
23303 typedef struct lhash_st {
23304     LHASH_NODE **b;
23305     LHASH_COMP_FN_TYPE comp;
23306     LHASH_HASH_FN_TYPE hash;
23307     unsigned int num_nodes;
23308     unsigned int num_alloc_nodes;
23309     unsigned int p;
23310     unsigned int pmax;
23311     unsigned long up_load; /* load times 256 */
23312     unsigned long down_load; /* load times 256 */
23313     unsigned long num_items;
23314     unsigned long num_expands;
23315     unsigned long num_expand_reallocs;
23316     unsigned long num_contracts;
23317     unsigned long num_contract_reallocs;
23318     unsigned long num_hash_calls;
23319     unsigned long num_comp_calls;
23320     unsigned long num_insert;
23321     unsigned long num_replace;
23322     unsigned long num_delete;
23323     unsigned long num_no_delete;
23324     unsigned long num_retrieve;
23325     unsigned long num_retrieve_miss;
23326     unsigned long num_hash_comps;
23327     int error;
23328 } _LHASH; /* Do not use _LHASH directly, use LHASH_OF
23329                                  * and friends */
23330 
23331 
23332 
23333 /*
23334  * Indicates a malloc() error in the last call, this is only bad in
23335  * lh_insert().
23336  */
23337 
23338 
23339 _LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c);
23340 void lh_free(_LHASH *lh);
23341 void *lh_insert(_LHASH *lh, void *data);
23342 void *lh_delete(_LHASH *lh, const void *data);
23343 void *lh_retrieve(_LHASH *lh, const void *data);
23344 void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func);
23345 void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg);
23346 unsigned long lh_strhash(const char *c);
23347 unsigned long lh_num_items(const _LHASH *lh);
23348 
23349 
23350 void lh_stats(const _LHASH *lh, FILE *out);
23351 void lh_node_stats(const _LHASH *lh, FILE *out);
23352 void lh_node_usage_stats(const _LHASH *lh, FILE *out);
23353 
23354 
23355 
23356 void lh_stats_bio(const _LHASH *lh, BIO *out);
23357 void lh_node_stats_bio(const _LHASH *lh, BIO *out);
23358 void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
23359 
23360 
23361 /* Type checking... */
23362 # 206 "/usr/include/openssl/lhash.h" 3 4
23363 /* Define wrapper functions. */
23364 # 233 "/usr/include/openssl/lhash.h" 3 4
23365 struct lhash_st_OPENSSL_STRING { int dummy; };
23366 struct lhash_st_OPENSSL_CSTRING { int dummy; };
23367 # 73 "/usr/include/openssl/x509_vfy.h" 2 3 4
23368 
23369 # 1 "/usr/include/openssl/bio.h" 1 3 4
23370 /* crypto/bio/bio.h */
23371 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
23372  * All rights reserved.
23373  *
23374  * This package is an SSL implementation written
23375  * by Eric Young (eay@cryptsoft.com).
23376  * The implementation was written so as to conform with Netscapes SSL.
23377  *
23378  * This library is free for commercial and non-commercial use as long as
23379  * the following conditions are aheared to.  The following conditions
23380  * apply to all code found in this distribution, be it the RC4, RSA,
23381  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
23382  * included with this distribution is covered by the same copyright terms
23383  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
23384  *
23385  * Copyright remains Eric Young's, and as such any Copyright notices in
23386  * the code are not to be removed.
23387  * If this package is used in a product, Eric Young should be given attribution
23388  * as the author of the parts of the library used.
23389  * This can be in the form of a textual message at program startup or
23390  * in documentation (online or textual) provided with the package.
23391  *
23392  * Redistribution and use in source and binary forms, with or without
23393  * modification, are permitted provided that the following conditions
23394  * are met:
23395  * 1. Redistributions of source code must retain the copyright
23396  *    notice, this list of conditions and the following disclaimer.
23397  * 2. Redistributions in binary form must reproduce the above copyright
23398  *    notice, this list of conditions and the following disclaimer in the
23399  *    documentation and/or other materials provided with the distribution.
23400  * 3. All advertising materials mentioning features or use of this software
23401  *    must display the following acknowledgement:
23402  *    "This product includes cryptographic software written by
23403  *     Eric Young (eay@cryptsoft.com)"
23404  *    The word 'cryptographic' can be left out if the rouines from the library
23405  *    being used are not cryptographic related :-).
23406  * 4. If you include any Windows specific code (or a derivative thereof) from
23407  *    the apps directory (application code) you must include an acknowledgement:
23408  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
23409  *
23410  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
23411  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23412  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23413  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23414  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23415  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23416  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23417  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23418  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23419  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23420  * SUCH DAMAGE.
23421  *
23422  * The licence and distribution terms for any publically available version or
23423  * derivative of this code cannot be changed.  i.e. this code cannot simply be
23424  * copied and put under another distribution licence
23425  * [including the GNU Public Licence.]
23426  */
23427 # 75 "/usr/include/openssl/x509_vfy.h" 2 3 4
23428 # 1 "/usr/include/openssl/crypto.h" 1 3 4
23429 /* crypto/crypto.h */
23430 /* ====================================================================
23431  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
23432  *
23433  * Redistribution and use in source and binary forms, with or without
23434  * modification, are permitted provided that the following conditions
23435  * are met:
23436  *
23437  * 1. Redistributions of source code must retain the above copyright
23438  *    notice, this list of conditions and the following disclaimer.
23439  *
23440  * 2. Redistributions in binary form must reproduce the above copyright
23441  *    notice, this list of conditions and the following disclaimer in
23442  *    the documentation and/or other materials provided with the
23443  *    distribution.
23444  *
23445  * 3. All advertising materials mentioning features or use of this
23446  *    software must display the following acknowledgment:
23447  *    "This product includes software developed by the OpenSSL Project
23448  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23449  *
23450  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23451  *    endorse or promote products derived from this software without
23452  *    prior written permission. For written permission, please contact
23453  *    openssl-core@openssl.org.
23454  *
23455  * 5. Products derived from this software may not be called "OpenSSL"
23456  *    nor may "OpenSSL" appear in their names without prior written
23457  *    permission of the OpenSSL Project.
23458  *
23459  * 6. Redistributions of any form whatsoever must retain the following
23460  *    acknowledgment:
23461  *    "This product includes software developed by the OpenSSL Project
23462  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
23463  *
23464  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
23465  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23466  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23467  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
23468  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23469  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23470  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23471  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23472  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23473  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23474  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23475  * OF THE POSSIBILITY OF SUCH DAMAGE.
23476  * ====================================================================
23477  *
23478  * This product includes cryptographic software written by Eric Young
23479  * (eay@cryptsoft.com).  This product includes software written by Tim
23480  * Hudson (tjh@cryptsoft.com).
23481  *
23482  */
23483 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
23484  * All rights reserved.
23485  *
23486  * This package is an SSL implementation written
23487  * by Eric Young (eay@cryptsoft.com).
23488  * The implementation was written so as to conform with Netscapes SSL.
23489  *
23490  * This library is free for commercial and non-commercial use as long as
23491  * the following conditions are aheared to.  The following conditions
23492  * apply to all code found in this distribution, be it the RC4, RSA,
23493  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
23494  * included with this distribution is covered by the same copyright terms
23495  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
23496  *
23497  * Copyright remains Eric Young's, and as such any Copyright notices in
23498  * the code are not to be removed.
23499  * If this package is used in a product, Eric Young should be given attribution
23500  * as the author of the parts of the library used.
23501  * This can be in the form of a textual message at program startup or
23502  * in documentation (online or textual) provided with the package.
23503  *
23504  * Redistribution and use in source and binary forms, with or without
23505  * modification, are permitted provided that the following conditions
23506  * are met:
23507  * 1. Redistributions of source code must retain the copyright
23508  *    notice, this list of conditions and the following disclaimer.
23509  * 2. Redistributions in binary form must reproduce the above copyright
23510  *    notice, this list of conditions and the following disclaimer in the
23511  *    documentation and/or other materials provided with the distribution.
23512  * 3. All advertising materials mentioning features or use of this software
23513  *    must display the following acknowledgement:
23514  *    "This product includes cryptographic software written by
23515  *     Eric Young (eay@cryptsoft.com)"
23516  *    The word 'cryptographic' can be left out if the rouines from the library
23517  *    being used are not cryptographic related :-).
23518  * 4. If you include any Windows specific code (or a derivative thereof) from
23519  *    the apps directory (application code) you must include an acknowledgement:
23520  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
23521  *
23522  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
23523  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23524  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23525  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23526  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23527  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23528  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23529  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23530  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23531  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23532  * SUCH DAMAGE.
23533  *
23534  * The licence and distribution terms for any publically available version or
23535  * derivative of this code cannot be changed.  i.e. this code cannot simply be
23536  * copied and put under another distribution licence
23537  * [including the GNU Public Licence.]
23538  */
23539 /* ====================================================================
23540  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
23541  * ECDH support in OpenSSL originally developed by
23542  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
23543  */
23544 # 76 "/usr/include/openssl/x509_vfy.h" 2 3 4
23545 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
23546 /* ====================================================================
23547  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
23548  *
23549  * Redistribution and use in source and binary forms, with or without
23550  * modification, are permitted provided that the following conditions
23551  * are met:
23552  *
23553  * 1. Redistributions of source code must retain the above copyright
23554  *    notice, this list of conditions and the following disclaimer.
23555  *
23556  * 2. Redistributions in binary form must reproduce the above copyright
23557  *    notice, this list of conditions and the following disclaimer in
23558  *    the documentation and/or other materials provided with the
23559  *    distribution.
23560  *
23561  * 3. All advertising materials mentioning features or use of this
23562  *    software must display the following acknowledgment:
23563  *    "This product includes software developed by the OpenSSL Project
23564  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23565  *
23566  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23567  *    endorse or promote products derived from this software without
23568  *    prior written permission. For written permission, please contact
23569  *    openssl-core@openssl.org.
23570  *
23571  * 5. Products derived from this software may not be called "OpenSSL"
23572  *    nor may "OpenSSL" appear in their names without prior written
23573  *    permission of the OpenSSL Project.
23574  *
23575  * 6. Redistributions of any form whatsoever must retain the following
23576  *    acknowledgment:
23577  *    "This product includes software developed by the OpenSSL Project
23578  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
23579  *
23580  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
23581  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23582  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23583  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
23584  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23585  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23586  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23587  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23588  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23589  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23590  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23591  * OF THE POSSIBILITY OF SUCH DAMAGE.
23592  * ====================================================================
23593  *
23594  * This product includes cryptographic software written by Eric Young
23595  * (eay@cryptsoft.com).  This product includes software written by Tim
23596  * Hudson (tjh@cryptsoft.com).
23597  *
23598  */
23599 # 77 "/usr/include/openssl/x509_vfy.h" 2 3 4
23600 # 92 "/usr/include/openssl/x509_vfy.h" 3 4
23601 typedef struct x509_file_st {
23602     int num_paths; /* number of paths to files or directories */
23603     int num_alloced;
23604     char **paths; /* the list of paths or directories */
23605     int *path_type;
23606 } X509_CERT_FILE_CTX;
23607 
23608 /*******************************/
23609 /*-
23610 SSL_CTX -> X509_STORE
23611                 -> X509_LOOKUP
23612                         ->X509_LOOKUP_METHOD
23613                 -> X509_LOOKUP
23614                         ->X509_LOOKUP_METHOD
23615 
23616 SSL     -> X509_STORE_CTX
23617                 ->X509_STORE
23618 
23619 The X509_STORE holds the tables etc for verification stuff.
23620 A X509_STORE_CTX is used while validating a single certificate.
23621 The X509_STORE has X509_LOOKUPs for looking up certs.
23622 The X509_STORE then calls a function to actually verify the
23623 certificate chain.
23624 */
23625 
23626 
23627 
23628 
23629 
23630 
23631 
23632 typedef struct x509_object_st {
23633     /* one of the above types */
23634     int type;
23635     union {
23636         char *ptr;
23637         X509 *x509;
23638         X509_CRL *crl;
23639         EVP_PKEY *pkey;
23640     } data;
23641 } X509_OBJECT;
23642 
23643 typedef struct x509_lookup_st X509_LOOKUP;
23644 
23645 struct stack_st_X509_LOOKUP { _STACK stack; };
23646 struct stack_st_X509_OBJECT { _STACK stack; };
23647 
23648 /* This is a static that defines the function interface */
23649 typedef struct x509_lookup_method_st {
23650     const char *name;
23651     int (*new_item) (X509_LOOKUP *ctx);
23652     void (*free) (X509_LOOKUP *ctx);
23653     int (*init) (X509_LOOKUP *ctx);
23654     int (*shutdown) (X509_LOOKUP *ctx);
23655     int (*ctrl) (X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
23656                  char **ret);
23657     int (*get_by_subject) (X509_LOOKUP *ctx, int type, X509_NAME *name,
23658                            X509_OBJECT *ret);
23659     int (*get_by_issuer_serial) (X509_LOOKUP *ctx, int type, X509_NAME *name,
23660                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
23661     int (*get_by_fingerprint) (X509_LOOKUP *ctx, int type,
23662                                unsigned char *bytes, int len,
23663                                X509_OBJECT *ret);
23664     int (*get_by_alias) (X509_LOOKUP *ctx, int type, char *str, int len,
23665                          X509_OBJECT *ret);
23666 } X509_LOOKUP_METHOD;
23667 
23668 typedef struct X509_VERIFY_PARAM_ID_st X509_VERIFY_PARAM_ID;
23669 
23670 /*
23671  * This structure hold all parameters associated with a verify operation by
23672  * including an X509_VERIFY_PARAM structure in related structures the
23673  * parameters used can be customized
23674  */
23675 
23676 typedef struct X509_VERIFY_PARAM_st {
23677     char *name;
23678     time_t check_time; /* Time to use */
23679     unsigned long inh_flags; /* Inheritance flags */
23680     unsigned long flags; /* Various verify flags */
23681     int purpose; /* purpose to check untrusted certificates */
23682     int trust; /* trust setting to check */
23683     int depth; /* Verify depth */
23684     struct stack_st_ASN1_OBJECT *policies; /* Permissible policies */
23685     X509_VERIFY_PARAM_ID *id; /* opaque ID data */
23686 } X509_VERIFY_PARAM;
23687 
23688 struct stack_st_X509_VERIFY_PARAM { _STACK stack; };
23689 
23690 /*
23691  * This is used to hold everything.  It is used for all certificate
23692  * validation.  Once we have a certificate chain, the 'verify' function is
23693  * then called to actually check the cert chain.
23694  */
23695 struct x509_store_st {
23696     /* The following is a cache of trusted certs */
23697     int cache; /* if true, stash any hits */
23698     struct stack_st_X509_OBJECT *objs; /* Cache of all objects */
23699     /* These are external lookup methods */
23700     struct stack_st_X509_LOOKUP *get_cert_methods;
23701     X509_VERIFY_PARAM *param;
23702     /* Callbacks for various operations */
23703     /* called to verify a certificate */
23704     int (*verify) (X509_STORE_CTX *ctx);
23705     /* error callback */
23706     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
23707     /* get issuers cert from ctx */
23708     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
23709     /* check issued */
23710     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
23711     /* Check revocation status of chain */
23712     int (*check_revocation) (X509_STORE_CTX *ctx);
23713     /* retrieve CRL */
23714     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
23715     /* Check CRL validity */
23716     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
23717     /* Check certificate against CRL */
23718     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
23719     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
23720     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
23721     int (*cleanup) (X509_STORE_CTX *ctx);
23722     CRYPTO_EX_DATA ex_data;
23723     int references;
23724 } /* X509_STORE */ ;
23725 
23726 int X509_STORE_set_depth(X509_STORE *store, int depth);
23727 
23728 
23729 
23730 
23731 /* This is the functions plus an instance of the local variables. */
23732 struct x509_lookup_st {
23733     int init; /* have we been started */
23734     int skip; /* don't use us. */
23735     X509_LOOKUP_METHOD *method; /* the functions */
23736     char *method_data; /* method data */
23737     X509_STORE *store_ctx; /* who owns us */
23738 } /* X509_LOOKUP */ ;
23739 
23740 /*
23741  * This is a used when verifying cert chains.  Since the gathering of the
23742  * cert chain can take some time (and have to be 'retried', this needs to be
23743  * kept and passed around.
23744  */
23745 struct x509_store_ctx_st { /* X509_STORE_CTX */
23746     X509_STORE *ctx;
23747     /* used when looking up certs */
23748     int current_method;
23749     /* The following are set by the caller */
23750     /* The cert to check */
23751     X509 *cert;
23752     /* chain of X509s - untrusted - passed in */
23753     struct stack_st_X509 *untrusted;
23754     /* set of CRLs passed in */
23755     struct stack_st_X509_CRL *crls;
23756     X509_VERIFY_PARAM *param;
23757     /* Other info for use with get_issuer() */
23758     void *other_ctx;
23759     /* Callbacks for various operations */
23760     /* called to verify a certificate */
23761     int (*verify) (X509_STORE_CTX *ctx);
23762     /* error callback */
23763     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
23764     /* get issuers cert from ctx */
23765     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
23766     /* check issued */
23767     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
23768     /* Check revocation status of chain */
23769     int (*check_revocation) (X509_STORE_CTX *ctx);
23770     /* retrieve CRL */
23771     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
23772     /* Check CRL validity */
23773     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
23774     /* Check certificate against CRL */
23775     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
23776     int (*check_policy) (X509_STORE_CTX *ctx);
23777     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
23778     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
23779     int (*cleanup) (X509_STORE_CTX *ctx);
23780     /* The following is built up */
23781     /* if 0, rebuild chain */
23782     int valid;
23783     /* index of last untrusted cert */
23784     int last_untrusted;
23785     /* chain of X509s - built up and trusted */
23786     struct stack_st_X509 *chain;
23787     /* Valid policy tree */
23788     X509_POLICY_TREE *tree;
23789     /* Require explicit policy value */
23790     int explicit_policy;
23791     /* When something goes wrong, this is why */
23792     int error_depth;
23793     int error;
23794     X509 *current_cert;
23795     /* cert currently being tested as valid issuer */
23796     X509 *current_issuer;
23797     /* current CRL */
23798     X509_CRL *current_crl;
23799     /* score of current CRL */
23800     int current_crl_score;
23801     /* Reason mask */
23802     unsigned int current_reasons;
23803     /* For CRL path validation: parent context */
23804     X509_STORE_CTX *parent;
23805     CRYPTO_EX_DATA ex_data;
23806 } /* X509_STORE_CTX */ ;
23807 
23808 void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
23809 # 345 "/usr/include/openssl/x509_vfy.h" 3 4
23810 /* These are 'informational' when looking for issuer cert */
23811 # 377 "/usr/include/openssl/x509_vfy.h" 3 4
23812 /* Suite B mode algorithm violation */
23813 
23814 
23815 
23816 
23817 
23818 
23819 
23820 /* Host, email and IP check errors */
23821 
23822 
23823 
23824 
23825 /* Caller error */
23826 
23827 /* Issuer lookup error */
23828 
23829 
23830 
23831 
23832 /* Certificate verify flags */
23833 
23834 /* Send issuer+subject checks to verify_cb */
23835 
23836 /* Use check time instead of current time */
23837 
23838 /* Lookup CRLs */
23839 
23840 /* Lookup CRLs for whole chain */
23841 
23842 /* Ignore unhandled critical extensions */
23843 
23844 /* Disable workarounds for broken certificates */
23845 
23846 /* Enable proxy certificate validation */
23847 
23848 /* Enable policy checking */
23849 
23850 /* Policy variable require-explicit-policy */
23851 
23852 /* Policy variable inhibit-any-policy */
23853 
23854 /* Policy variable inhibit-policy-mapping */
23855 
23856 /* Notify callback that policy is OK */
23857 
23858 /* Extended CRL features such as indirect CRLs, alternate CRL signing keys */
23859 
23860 /* Delta CRL support */
23861 
23862 /* Check selfsigned CA signature */
23863 
23864 /* Use trusted store first */
23865 
23866 /* Suite B 128 bit only mode: not normally used */
23867 
23868 /* Suite B 192 bit only mode */
23869 
23870 /* Suite B 128 bit mode allowing 192 bit algorithms */
23871 
23872 
23873 /* Allow partial chains if at least one certificate is in trusted store */
23874 
23875 /*
23876  * If the initial chain is not trusted, do not attempt to build an alternative
23877  * chain. Alternate chain checking was introduced in 1.0.2b. Setting this flag
23878  * will force the behaviour to match that of previous versions.
23879  */
23880 # 453 "/usr/include/openssl/x509_vfy.h" 3 4
23881 /* Internal use: mask of policy related options */
23882 
23883 
23884 
23885 
23886 
23887 int X509_OBJECT_idx_by_subject(struct stack_st_X509_OBJECT *h, int type,
23888                                X509_NAME *name);
23889 X509_OBJECT *X509_OBJECT_retrieve_by_subject(struct stack_st_X509_OBJECT *h,
23890                                              int type, X509_NAME *name);
23891 X509_OBJECT *X509_OBJECT_retrieve_match(struct stack_st_X509_OBJECT *h,
23892                                         X509_OBJECT *x);
23893 void X509_OBJECT_up_ref_count(X509_OBJECT *a);
23894 void X509_OBJECT_free_contents(X509_OBJECT *a);
23895 X509_STORE *X509_STORE_new(void);
23896 void X509_STORE_free(X509_STORE *v);
23897 
23898 struct stack_st_X509 *X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm);
23899 struct stack_st_X509_CRL *X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm);
23900 int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);
23901 int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
23902 int X509_STORE_set_trust(X509_STORE *ctx, int trust);
23903 int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);
23904 
23905 void X509_STORE_set_verify_cb(X509_STORE *ctx,
23906                               int (*verify_cb) (int, X509_STORE_CTX *));
23907 
23908 void X509_STORE_set_lookup_crls_cb(X509_STORE *ctx,
23909                                    struct stack_st_X509_CRL *(*cb) (X509_STORE_CTX
23910                                                               *ctx,
23911                                                               X509_NAME *nm));
23912 
23913 X509_STORE_CTX *X509_STORE_CTX_new(void);
23914 
23915 int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
23916 
23917 void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
23918 int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
23919                         X509 *x509, struct stack_st_X509 *chain);
23920 void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, struct stack_st_X509 *sk);
23921 void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
23922 
23923 X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx);
23924 
23925 X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);
23926 
23927 X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);
23928 X509_LOOKUP_METHOD *X509_LOOKUP_file(void);
23929 
23930 int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
23931 int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
23932 
23933 int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name,
23934                               X509_OBJECT *ret);
23935 
23936 int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
23937                      long argl, char **ret);
23938 
23939 
23940 int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
23941 int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
23942 int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
23943 
23944 
23945 X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
23946 void X509_LOOKUP_free(X509_LOOKUP *ctx);
23947 int X509_LOOKUP_init(X509_LOOKUP *ctx);
23948 int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name,
23949                            X509_OBJECT *ret);
23950 int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name,
23951                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
23952 int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type,
23953                                unsigned char *bytes, int len,
23954                                X509_OBJECT *ret);
23955 int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len,
23956                          X509_OBJECT *ret);
23957 int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
23958 
23959 
23960 int X509_STORE_load_locations(X509_STORE *ctx,
23961                               const char *file, const char *dir);
23962 int X509_STORE_set_default_paths(X509_STORE *ctx);
23963 
23964 
23965 int X509_STORE_CTX_get_ex_new_index(long argl, void *argp,
23966                                     CRYPTO_EX_new *new_func,
23967                                     CRYPTO_EX_dup *dup_func,
23968                                     CRYPTO_EX_free *free_func);
23969 int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data);
23970 void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx);
23971 int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
23972 void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);
23973 int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
23974 X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
23975 X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);
23976 X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);
23977 X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);
23978 struct stack_st_X509 *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
23979 struct stack_st_X509 *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);
23980 void X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x);
23981 void X509_STORE_CTX_set_chain(X509_STORE_CTX *c, struct stack_st_X509 *sk);
23982 void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, struct stack_st_X509_CRL *sk);
23983 int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
23984 int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
23985 int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
23986                                    int purpose, int trust);
23987 void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
23988 void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
23989                              time_t t);
23990 void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
23991                                   int (*verify_cb) (int, X509_STORE_CTX *));
23992 
23993 X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);
23994 int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);
23995 
23996 X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
23997 void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
23998 int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
23999 
24000 /* X509_VERIFY_PARAM functions */
24001 
24002 X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);
24003 void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);
24004 int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,
24005                               const X509_VERIFY_PARAM *from);
24006 int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,
24007                            const X509_VERIFY_PARAM *from);
24008 int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);
24009 int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,
24010                                 unsigned long flags);
24011 int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
24012                                   unsigned long flags);
24013 unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);
24014 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
24015 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
24016 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
24017 void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);
24018 int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,
24019                                   ASN1_OBJECT *policy);
24020 int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param,
24021                                     struct stack_st_ASN1_OBJECT *policies);
24022 
24023 int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param,
24024                                 const char *name, size_t namelen);
24025 int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param,
24026                                 const char *name, size_t namelen);
24027 void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
24028                                      unsigned int flags);
24029 char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *);
24030 int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
24031                                  const char *email, size_t emaillen);
24032 int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
24033                               const unsigned char *ip, size_t iplen);
24034 int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param,
24035                                   const char *ipasc);
24036 
24037 int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
24038 const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param);
24039 
24040 int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
24041 int X509_VERIFY_PARAM_get_count(void);
24042 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id);
24043 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
24044 void X509_VERIFY_PARAM_table_cleanup(void);
24045 
24046 int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
24047                       struct stack_st_X509 *certs,
24048                       struct stack_st_ASN1_OBJECT *policy_oids, unsigned int flags);
24049 
24050 void X509_policy_tree_free(X509_POLICY_TREE *tree);
24051 
24052 int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
24053 X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree,
24054                                                int i);
24055 
24056 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_policies(const
24057                                                            X509_POLICY_TREE
24058                                                            *tree);
24059 
24060 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_user_policies(const
24061                                                                 X509_POLICY_TREE
24062                                                                 *tree);
24063 
24064 int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
24065 
24066 X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level,
24067                                               int i);
24068 
24069 const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
24070 
24071 struct stack_st_POLICYQUALINFO *X509_policy_node_get0_qualifiers(const
24072                                                            X509_POLICY_NODE
24073                                                            *node);
24074 const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE
24075                                                      *node);
24076 # 582 "/usr/include/openssl/x509.h" 2 3 4
24077 # 1 "/usr/include/openssl/pkcs7.h" 1 3 4
24078 /* crypto/pkcs7/pkcs7.h */
24079 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
24080  * All rights reserved.
24081  *
24082  * This package is an SSL implementation written
24083  * by Eric Young (eay@cryptsoft.com).
24084  * The implementation was written so as to conform with Netscapes SSL.
24085  *
24086  * This library is free for commercial and non-commercial use as long as
24087  * the following conditions are aheared to.  The following conditions
24088  * apply to all code found in this distribution, be it the RC4, RSA,
24089  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
24090  * included with this distribution is covered by the same copyright terms
24091  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
24092  *
24093  * Copyright remains Eric Young's, and as such any Copyright notices in
24094  * the code are not to be removed.
24095  * If this package is used in a product, Eric Young should be given attribution
24096  * as the author of the parts of the library used.
24097  * This can be in the form of a textual message at program startup or
24098  * in documentation (online or textual) provided with the package.
24099  *
24100  * Redistribution and use in source and binary forms, with or without
24101  * modification, are permitted provided that the following conditions
24102  * are met:
24103  * 1. Redistributions of source code must retain the copyright
24104  *    notice, this list of conditions and the following disclaimer.
24105  * 2. Redistributions in binary form must reproduce the above copyright
24106  *    notice, this list of conditions and the following disclaimer in the
24107  *    documentation and/or other materials provided with the distribution.
24108  * 3. All advertising materials mentioning features or use of this software
24109  *    must display the following acknowledgement:
24110  *    "This product includes cryptographic software written by
24111  *     Eric Young (eay@cryptsoft.com)"
24112  *    The word 'cryptographic' can be left out if the rouines from the library
24113  *    being used are not cryptographic related :-).
24114  * 4. If you include any Windows specific code (or a derivative thereof) from
24115  *    the apps directory (application code) you must include an acknowledgement:
24116  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
24117  *
24118  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
24119  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24120  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24121  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24122  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24123  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24124  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24125  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24126  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24127  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24128  * SUCH DAMAGE.
24129  *
24130  * The licence and distribution terms for any publically available version or
24131  * derivative of this code cannot be changed.  i.e. this code cannot simply be
24132  * copied and put under another distribution licence
24133  * [including the GNU Public Licence.]
24134  */
24135 
24136 
24137 
24138 
24139 # 1 "/usr/include/openssl/asn1.h" 1 3 4
24140 /* crypto/asn1/asn1.h */
24141 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
24142  * All rights reserved.
24143  *
24144  * This package is an SSL implementation written
24145  * by Eric Young (eay@cryptsoft.com).
24146  * The implementation was written so as to conform with Netscapes SSL.
24147  *
24148  * This library is free for commercial and non-commercial use as long as
24149  * the following conditions are aheared to.  The following conditions
24150  * apply to all code found in this distribution, be it the RC4, RSA,
24151  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
24152  * included with this distribution is covered by the same copyright terms
24153  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
24154  *
24155  * Copyright remains Eric Young's, and as such any Copyright notices in
24156  * the code are not to be removed.
24157  * If this package is used in a product, Eric Young should be given attribution
24158  * as the author of the parts of the library used.
24159  * This can be in the form of a textual message at program startup or
24160  * in documentation (online or textual) provided with the package.
24161  *
24162  * Redistribution and use in source and binary forms, with or without
24163  * modification, are permitted provided that the following conditions
24164  * are met:
24165  * 1. Redistributions of source code must retain the copyright
24166  *    notice, this list of conditions and the following disclaimer.
24167  * 2. Redistributions in binary form must reproduce the above copyright
24168  *    notice, this list of conditions and the following disclaimer in the
24169  *    documentation and/or other materials provided with the distribution.
24170  * 3. All advertising materials mentioning features or use of this software
24171  *    must display the following acknowledgement:
24172  *    "This product includes cryptographic software written by
24173  *     Eric Young (eay@cryptsoft.com)"
24174  *    The word 'cryptographic' can be left out if the rouines from the library
24175  *    being used are not cryptographic related :-).
24176  * 4. If you include any Windows specific code (or a derivative thereof) from
24177  *    the apps directory (application code) you must include an acknowledgement:
24178  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
24179  *
24180  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
24181  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24182  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24183  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24184  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24185  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24186  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24187  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24188  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24189  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24190  * SUCH DAMAGE.
24191  *
24192  * The licence and distribution terms for any publically available version or
24193  * derivative of this code cannot be changed.  i.e. this code cannot simply be
24194  * copied and put under another distribution licence
24195  * [including the GNU Public Licence.]
24196  */
24197 # 63 "/usr/include/openssl/pkcs7.h" 2 3 4
24198 # 1 "/usr/include/openssl/bio.h" 1 3 4
24199 /* crypto/bio/bio.h */
24200 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
24201  * All rights reserved.
24202  *
24203  * This package is an SSL implementation written
24204  * by Eric Young (eay@cryptsoft.com).
24205  * The implementation was written so as to conform with Netscapes SSL.
24206  *
24207  * This library is free for commercial and non-commercial use as long as
24208  * the following conditions are aheared to.  The following conditions
24209  * apply to all code found in this distribution, be it the RC4, RSA,
24210  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
24211  * included with this distribution is covered by the same copyright terms
24212  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
24213  *
24214  * Copyright remains Eric Young's, and as such any Copyright notices in
24215  * the code are not to be removed.
24216  * If this package is used in a product, Eric Young should be given attribution
24217  * as the author of the parts of the library used.
24218  * This can be in the form of a textual message at program startup or
24219  * in documentation (online or textual) provided with the package.
24220  *
24221  * Redistribution and use in source and binary forms, with or without
24222  * modification, are permitted provided that the following conditions
24223  * are met:
24224  * 1. Redistributions of source code must retain the copyright
24225  *    notice, this list of conditions and the following disclaimer.
24226  * 2. Redistributions in binary form must reproduce the above copyright
24227  *    notice, this list of conditions and the following disclaimer in the
24228  *    documentation and/or other materials provided with the distribution.
24229  * 3. All advertising materials mentioning features or use of this software
24230  *    must display the following acknowledgement:
24231  *    "This product includes cryptographic software written by
24232  *     Eric Young (eay@cryptsoft.com)"
24233  *    The word 'cryptographic' can be left out if the rouines from the library
24234  *    being used are not cryptographic related :-).
24235  * 4. If you include any Windows specific code (or a derivative thereof) from
24236  *    the apps directory (application code) you must include an acknowledgement:
24237  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
24238  *
24239  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
24240  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24241  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24242  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24243  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24244  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24245  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24246  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24247  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24248  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24249  * SUCH DAMAGE.
24250  *
24251  * The licence and distribution terms for any publically available version or
24252  * derivative of this code cannot be changed.  i.e. this code cannot simply be
24253  * copied and put under another distribution licence
24254  * [including the GNU Public Licence.]
24255  */
24256 # 64 "/usr/include/openssl/pkcs7.h" 2 3 4
24257 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
24258 /* e_os2.h */
24259 /* ====================================================================
24260  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
24261  *
24262  * Redistribution and use in source and binary forms, with or without
24263  * modification, are permitted provided that the following conditions
24264  * are met:
24265  *
24266  * 1. Redistributions of source code must retain the above copyright
24267  *    notice, this list of conditions and the following disclaimer.
24268  *
24269  * 2. Redistributions in binary form must reproduce the above copyright
24270  *    notice, this list of conditions and the following disclaimer in
24271  *    the documentation and/or other materials provided with the
24272  *    distribution.
24273  *
24274  * 3. All advertising materials mentioning features or use of this
24275  *    software must display the following acknowledgment:
24276  *    "This product includes software developed by the OpenSSL Project
24277  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24278  *
24279  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
24280  *    endorse or promote products derived from this software without
24281  *    prior written permission. For written permission, please contact
24282  *    openssl-core@openssl.org.
24283  *
24284  * 5. Products derived from this software may not be called "OpenSSL"
24285  *    nor may "OpenSSL" appear in their names without prior written
24286  *    permission of the OpenSSL Project.
24287  *
24288  * 6. Redistributions of any form whatsoever must retain the following
24289  *    acknowledgment:
24290  *    "This product includes software developed by the OpenSSL Project
24291  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
24292  *
24293  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
24294  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24295  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24296  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
24297  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24298  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24299  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24300  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24301  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24302  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24303  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
24304  * OF THE POSSIBILITY OF SUCH DAMAGE.
24305  * ====================================================================
24306  *
24307  * This product includes cryptographic software written by Eric Young
24308  * (eay@cryptsoft.com).  This product includes software written by Tim
24309  * Hudson (tjh@cryptsoft.com).
24310  *
24311  */
24312 
24313 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
24314 /* opensslconf.h */
24315 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
24316 
24317 
24318 
24319 
24320 /* OpenSSL was configured with the following options: */
24321 # 108 "/usr/include/openssl/opensslconf.h" 3 4
24322 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
24323    asks for it.  This is a transient feature that is provided for those
24324    who haven't had the time to do the appropriate changes in their
24325    applications.  */
24326 # 204 "/usr/include/openssl/opensslconf.h" 3 4
24327 /* crypto/opensslconf.h.in */
24328 
24329 /* Generate 80386 code? */
24330 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
24331 # 65 "/usr/include/openssl/pkcs7.h" 2 3 4
24332 
24333 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
24334 /* ====================================================================
24335  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
24336  *
24337  * Redistribution and use in source and binary forms, with or without
24338  * modification, are permitted provided that the following conditions
24339  * are met:
24340  *
24341  * 1. Redistributions of source code must retain the above copyright
24342  *    notice, this list of conditions and the following disclaimer.
24343  *
24344  * 2. Redistributions in binary form must reproduce the above copyright
24345  *    notice, this list of conditions and the following disclaimer in
24346  *    the documentation and/or other materials provided with the
24347  *    distribution.
24348  *
24349  * 3. All advertising materials mentioning features or use of this
24350  *    software must display the following acknowledgment:
24351  *    "This product includes software developed by the OpenSSL Project
24352  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24353  *
24354  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
24355  *    endorse or promote products derived from this software without
24356  *    prior written permission. For written permission, please contact
24357  *    openssl-core@openssl.org.
24358  *
24359  * 5. Products derived from this software may not be called "OpenSSL"
24360  *    nor may "OpenSSL" appear in their names without prior written
24361  *    permission of the OpenSSL Project.
24362  *
24363  * 6. Redistributions of any form whatsoever must retain the following
24364  *    acknowledgment:
24365  *    "This product includes software developed by the OpenSSL Project
24366  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
24367  *
24368  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
24369  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24370  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24371  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
24372  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24373  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24374  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24375  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24376  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24377  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24378  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
24379  * OF THE POSSIBILITY OF SUCH DAMAGE.
24380  * ====================================================================
24381  *
24382  * This product includes cryptographic software written by Eric Young
24383  * (eay@cryptsoft.com).  This product includes software written by Tim
24384  * Hudson (tjh@cryptsoft.com).
24385  *
24386  */
24387 # 67 "/usr/include/openssl/pkcs7.h" 2 3 4
24388 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
24389 /* ====================================================================
24390  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
24391  *
24392  * Redistribution and use in source and binary forms, with or without
24393  * modification, are permitted provided that the following conditions
24394  * are met:
24395  *
24396  * 1. Redistributions of source code must retain the above copyright
24397  *    notice, this list of conditions and the following disclaimer.
24398  *
24399  * 2. Redistributions in binary form must reproduce the above copyright
24400  *    notice, this list of conditions and the following disclaimer in
24401  *    the documentation and/or other materials provided with the
24402  *    distribution.
24403  *
24404  * 3. All advertising materials mentioning features or use of this
24405  *    software must display the following acknowledgment:
24406  *    "This product includes software developed by the OpenSSL Project
24407  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24408  *
24409  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
24410  *    endorse or promote products derived from this software without
24411  *    prior written permission. For written permission, please contact
24412  *    openssl-core@openssl.org.
24413  *
24414  * 5. Products derived from this software may not be called "OpenSSL"
24415  *    nor may "OpenSSL" appear in their names without prior written
24416  *    permission of the OpenSSL Project.
24417  *
24418  * 6. Redistributions of any form whatsoever must retain the following
24419  *    acknowledgment:
24420  *    "This product includes software developed by the OpenSSL Project
24421  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
24422  *
24423  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
24424  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24425  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24426  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
24427  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24428  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24429  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24430  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24431  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24432  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24433  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
24434  * OF THE POSSIBILITY OF SUCH DAMAGE.
24435  * ====================================================================
24436  *
24437  * This product includes cryptographic software written by Eric Young
24438  * (eay@cryptsoft.com).  This product includes software written by Tim
24439  * Hudson (tjh@cryptsoft.com).
24440  *
24441  */
24442 # 68 "/usr/include/openssl/pkcs7.h" 2 3 4
24443 # 79 "/usr/include/openssl/pkcs7.h" 3 4
24444 /*-
24445 Encryption_ID           DES-CBC
24446 Digest_ID               MD5
24447 Digest_Encryption_ID    rsaEncryption
24448 Key_Encryption_ID       rsaEncryption
24449 */
24450 
24451 typedef struct pkcs7_issuer_and_serial_st {
24452     X509_NAME *issuer;
24453     ASN1_INTEGER *serial;
24454 } PKCS7_ISSUER_AND_SERIAL;
24455 
24456 typedef struct pkcs7_signer_info_st {
24457     ASN1_INTEGER *version; /* version 1 */
24458     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
24459     X509_ALGOR *digest_alg;
24460     struct stack_st_X509_ATTRIBUTE *auth_attr; /* [ 0 ] */
24461     X509_ALGOR *digest_enc_alg;
24462     ASN1_OCTET_STRING *enc_digest;
24463     struct stack_st_X509_ATTRIBUTE *unauth_attr; /* [ 1 ] */
24464     /* The private key to sign with */
24465     EVP_PKEY *pkey;
24466 } PKCS7_SIGNER_INFO;
24467 
24468 struct stack_st_PKCS7_SIGNER_INFO { _STACK stack; };
24469 
24470 
24471 typedef struct pkcs7_recip_info_st {
24472     ASN1_INTEGER *version; /* version 0 */
24473     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
24474     X509_ALGOR *key_enc_algor;
24475     ASN1_OCTET_STRING *enc_key;
24476     X509 *cert; /* get the pub-key from this */
24477 } PKCS7_RECIP_INFO;
24478 
24479 struct stack_st_PKCS7_RECIP_INFO { _STACK stack; };
24480 
24481 
24482 typedef struct pkcs7_signed_st {
24483     ASN1_INTEGER *version; /* version 1 */
24484     struct stack_st_X509_ALGOR *md_algs; /* md used */
24485     struct stack_st_X509 *cert; /* [ 0 ] */
24486     struct stack_st_X509_CRL *crl; /* [ 1 ] */
24487     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
24488     struct pkcs7_st *contents;
24489 } PKCS7_SIGNED;
24490 /*
24491  * The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about
24492  * merging the two
24493  */
24494 
24495 typedef struct pkcs7_enc_content_st {
24496     ASN1_OBJECT *content_type;
24497     X509_ALGOR *algorithm;
24498     ASN1_OCTET_STRING *enc_data; /* [ 0 ] */
24499     const EVP_CIPHER *cipher;
24500 } PKCS7_ENC_CONTENT;
24501 
24502 typedef struct pkcs7_enveloped_st {
24503     ASN1_INTEGER *version; /* version 0 */
24504     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
24505     PKCS7_ENC_CONTENT *enc_data;
24506 } PKCS7_ENVELOPE;
24507 
24508 typedef struct pkcs7_signedandenveloped_st {
24509     ASN1_INTEGER *version; /* version 1 */
24510     struct stack_st_X509_ALGOR *md_algs; /* md used */
24511     struct stack_st_X509 *cert; /* [ 0 ] */
24512     struct stack_st_X509_CRL *crl; /* [ 1 ] */
24513     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
24514     PKCS7_ENC_CONTENT *enc_data;
24515     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
24516 } PKCS7_SIGN_ENVELOPE;
24517 
24518 typedef struct pkcs7_digest_st {
24519     ASN1_INTEGER *version; /* version 0 */
24520     X509_ALGOR *md; /* md used */
24521     struct pkcs7_st *contents;
24522     ASN1_OCTET_STRING *digest;
24523 } PKCS7_DIGEST;
24524 
24525 typedef struct pkcs7_encrypted_st {
24526     ASN1_INTEGER *version; /* version 0 */
24527     PKCS7_ENC_CONTENT *enc_data;
24528 } PKCS7_ENCRYPT;
24529 
24530 typedef struct pkcs7_st {
24531     /*
24532      * The following is non NULL if it contains ASN1 encoding of this
24533      * structure
24534      */
24535     unsigned char *asn1;
24536     long length;
24537 
24538 
24539 
24540     int state; /* used during processing */
24541     int detached;
24542     ASN1_OBJECT *type;
24543     /* content as defined by the type */
24544     /*
24545      * all encryption/message digests are applied to the 'contents', leaving
24546      * out the 'type' field.
24547      */
24548     union {
24549         char *ptr;
24550         /* NID_pkcs7_data */
24551         ASN1_OCTET_STRING *data;
24552         /* NID_pkcs7_signed */
24553         PKCS7_SIGNED *sign;
24554         /* NID_pkcs7_enveloped */
24555         PKCS7_ENVELOPE *enveloped;
24556         /* NID_pkcs7_signedAndEnveloped */
24557         PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
24558         /* NID_pkcs7_digest */
24559         PKCS7_DIGEST *digest;
24560         /* NID_pkcs7_encrypted */
24561         PKCS7_ENCRYPT *encrypted;
24562         /* Anything else */
24563         ASN1_TYPE *other;
24564     } d;
24565 } PKCS7;
24566 
24567 struct stack_st_PKCS7 { _STACK stack; };
24568 
24569 
24570 # 227 "/usr/include/openssl/pkcs7.h" 3 4
24571 /* S/MIME related flags */
24572 # 246 "/usr/include/openssl/pkcs7.h" 3 4
24573 /* Flags: for compatibility with older code */
24574 # 258 "/usr/include/openssl/pkcs7.h" 3 4
24575 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;
24576 
24577 int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
24578                                    const EVP_MD *type, unsigned char *md,
24579                                    unsigned int *len);
24580 
24581 PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
24582 int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7);
24583 
24584 PKCS7 *PKCS7_dup(PKCS7 *p7);
24585 PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
24586 int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7);
24587 int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
24588 int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
24589 
24590 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;
24591 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;
24592 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;
24593 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;
24594 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;
24595 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;
24596 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;
24597 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;
24598 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;
24599 
24600 extern const ASN1_ITEM PKCS7_ATTR_SIGN_it;
24601 extern const ASN1_ITEM PKCS7_ATTR_VERIFY_it;
24602 
24603 int i2d_PKCS7_NDEF(PKCS7 *a, unsigned char **out);
24604 int PKCS7_print_ctx(BIO *out, PKCS7 *x, int indent, const ASN1_PCTX *pctx);
24605 
24606 long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
24607 
24608 int PKCS7_set_type(PKCS7 *p7, int type);
24609 int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
24610 int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
24611 int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
24612                           const EVP_MD *dgst);
24613 int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
24614 int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
24615 int PKCS7_add_certificate(PKCS7 *p7, X509 *x509);
24616 int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
24617 int PKCS7_content_new(PKCS7 *p7, int nid);
24618 int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
24619                      BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
24620 int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
24621                           X509 *x509);
24622 
24623 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
24624 int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
24625 BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
24626 
24627 PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
24628                                        EVP_PKEY *pkey, const EVP_MD *dgst);
24629 X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
24630 int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
24631 struct stack_st_PKCS7_SIGNER_INFO *PKCS7_get_signer_info(PKCS7 *p7);
24632 
24633 PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
24634 void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
24635                                  X509_ALGOR **pdig, X509_ALGOR **psig);
24636 void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
24637 int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
24638 int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
24639 int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
24640 int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
24641 
24642 PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
24643 ASN1_OCTET_STRING *PKCS7_digest_from_attributes(struct stack_st_X509_ATTRIBUTE *sk);
24644 int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,
24645                                void *data);
24646 int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
24647                         void *value);
24648 ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid);
24649 ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid);
24650 int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
24651                                 struct stack_st_X509_ATTRIBUTE *sk);
24652 int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
24653                          struct stack_st_X509_ATTRIBUTE *sk);
24654 
24655 PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, struct stack_st_X509 *certs,
24656                   BIO *data, int flags);
24657 
24658 PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
24659                                          X509 *signcert, EVP_PKEY *pkey,
24660                                          const EVP_MD *md, int flags);
24661 
24662 int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
24663 int PKCS7_verify(PKCS7 *p7, struct stack_st_X509 *certs, X509_STORE *store,
24664                  BIO *indata, BIO *out, int flags);
24665 struct stack_st_X509 *PKCS7_get0_signers(PKCS7 *p7, struct stack_st_X509 *certs,
24666                                    int flags);
24667 PKCS7 *PKCS7_encrypt(struct stack_st_X509 *certs, BIO *in, const EVP_CIPHER *cipher,
24668                      int flags);
24669 int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
24670                   int flags);
24671 
24672 int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
24673                               struct stack_st_X509_ALGOR *cap);
24674 struct stack_st_X509_ALGOR *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
24675 int PKCS7_simple_smimecap(struct stack_st_X509_ALGOR *sk, int nid, int arg);
24676 
24677 int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
24678 int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
24679 int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
24680                              const unsigned char *md, int mdlen);
24681 
24682 int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
24683 PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
24684 
24685 BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
24686 
24687 /* BEGIN ERROR CODES */
24688 /*
24689  * The following lines are auto generated by the script mkerr.pl. Any changes
24690  * made after this point may be overwritten when the script is next run.
24691  */
24692 void ERR_load_PKCS7_strings(void);
24693 
24694 /* Error codes for the PKCS7 functions. */
24695 
24696 /* Function codes. */
24697 # 421 "/usr/include/openssl/pkcs7.h" 3 4
24698 /* Reason codes. */
24699 # 583 "/usr/include/openssl/x509.h" 2 3 4
24700 # 592 "/usr/include/openssl/x509.h" 3 4
24701 /* #define      X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */
24702 # 608 "/usr/include/openssl/x509.h" 3 4
24703 void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
24704 X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
24705                                      int (*crl_free) (X509_CRL *crl),
24706                                      int (*crl_lookup) (X509_CRL *crl,
24707                                                         X509_REVOKED **ret,
24708                                                         ASN1_INTEGER *ser,
24709                                                         X509_NAME *issuer),
24710                                      int (*crl_verify) (X509_CRL *crl,
24711                                                         EVP_PKEY *pk));
24712 void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
24713 
24714 void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
24715 void *X509_CRL_get_meth_data(X509_CRL *crl);
24716 
24717 /*
24718  * This one is only used so that a binary form can output, as in
24719  * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf)
24720  */
24721 
24722 
24723 const char *X509_verify_cert_error_string(long n);
24724 
24725 
24726 int X509_verify(X509 *a, EVP_PKEY *r);
24727 
24728 int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
24729 int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);
24730 int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);
24731 
24732 NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len);
24733 char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
24734 EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
24735 int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
24736 
24737 int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
24738 
24739 int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
24740 int X509_signature_print(BIO *bp, X509_ALGOR *alg, ASN1_STRING *sig);
24741 
24742 int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
24743 int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
24744 int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert);
24745 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
24746 int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
24747 int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
24748 int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
24749 int X509_CRL_http_nbio(OCSP_REQ_CTX *rctx, X509_CRL **pcrl);
24750 int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
24751 
24752 int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
24753                        unsigned char *md, unsigned int *len);
24754 int X509_digest(const X509 *data, const EVP_MD *type,
24755                 unsigned char *md, unsigned int *len);
24756 int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,
24757                     unsigned char *md, unsigned int *len);
24758 int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
24759                     unsigned char *md, unsigned int *len);
24760 int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
24761                      unsigned char *md, unsigned int *len);
24762 
24763 
24764 
24765 X509 *d2i_X509_fp(FILE *fp, X509 **x509);
24766 int i2d_X509_fp(FILE *fp, X509 *x509);
24767 X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);
24768 int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl);
24769 X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);
24770 int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req);
24771 
24772 RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);
24773 int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa);
24774 RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);
24775 int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa);
24776 RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
24777 int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa);
24778 
24779 
24780 DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
24781 int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa);
24782 DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
24783 int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa);
24784 
24785 
24786 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
24787 int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
24788 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
24789 int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
24790 
24791 X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);
24792 int i2d_PKCS8_fp(FILE *fp, X509_SIG *p8);
24793 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
24794                                                 PKCS8_PRIV_KEY_INFO **p8inf);
24795 int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf);
24796 int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key);
24797 int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey);
24798 EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
24799 int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey);
24800 EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
24801 
24802 
24803 
24804 X509 *d2i_X509_bio(BIO *bp, X509 **x509);
24805 int i2d_X509_bio(BIO *bp, X509 *x509);
24806 X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
24807 int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl);
24808 X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);
24809 int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req);
24810 
24811 RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);
24812 int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa);
24813 RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
24814 int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa);
24815 RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
24816 int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa);
24817 
24818 
24819 DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
24820 int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa);
24821 DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
24822 int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);
24823 
24824 
24825 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
24826 int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);
24827 EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
24828 int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);
24829 
24830 X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);
24831 int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8);
24832 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
24833                                                  PKCS8_PRIV_KEY_INFO **p8inf);
24834 int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf);
24835 int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key);
24836 int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey);
24837 EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
24838 int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey);
24839 EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
24840 
24841 
24842 X509 *X509_dup(X509 *x509);
24843 X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);
24844 X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex);
24845 X509_CRL *X509_CRL_dup(X509_CRL *crl);
24846 X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev);
24847 X509_REQ *X509_REQ_dup(X509_REQ *req);
24848 X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
24849 int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,
24850                     void *pval);
24851 void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
24852                      X509_ALGOR *algor);
24853 void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
24854 int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
24855 
24856 X509_NAME *X509_NAME_dup(X509_NAME *xn);
24857 X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
24858 
24859 int X509_cmp_time(const ASN1_TIME *s, time_t *t);
24860 int X509_cmp_current_time(const ASN1_TIME *s);
24861 ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
24862 ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
24863                             int offset_day, long offset_sec, time_t *t);
24864 ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj);
24865 
24866 const char *X509_get_default_cert_area(void);
24867 const char *X509_get_default_cert_dir(void);
24868 const char *X509_get_default_cert_file(void);
24869 const char *X509_get_default_cert_dir_env(void);
24870 const char *X509_get_default_cert_file_env(void);
24871 const char *X509_get_default_private_dir(void);
24872 
24873 X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
24874 X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey);
24875 
24876 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;
24877 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;
24878 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;
24879 
24880 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;
24881 
24882 int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
24883 EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key);
24884 int X509_get_pubkey_parameters(EVP_PKEY *pkey, struct stack_st_X509 *chain);
24885 int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp);
24886 EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length);
24887 
24888 int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);
24889 RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length);
24890 
24891 
24892 int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp);
24893 DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
24894 
24895 
24896 int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp);
24897 EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length);
24898 
24899 
24900 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;
24901 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;
24902 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;
24903 
24904 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;
24905 X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
24906 
24907 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;
24908 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;
24909 
24910 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;
24911 
24912 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;
24913 
24914 int X509_NAME_set(X509_NAME **xn, X509_NAME *name);
24915 
24916 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;
24917 
24918 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;
24919 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;
24920 
24921 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;
24922 
24923 int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
24924                           CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
24925 int X509_set_ex_data(X509 *r, int idx, void *arg);
24926 void *X509_get_ex_data(X509 *r, int idx);
24927 int i2d_X509_AUX(X509 *a, unsigned char **pp);
24928 X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length);
24929 
24930 int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
24931 
24932 void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
24933                          const X509 *x);
24934 int X509_get_signature_nid(const X509 *x);
24935 
24936 int X509_alias_set1(X509 *x, unsigned char *name, int len);
24937 int X509_keyid_set1(X509 *x, unsigned char *id, int len);
24938 unsigned char *X509_alias_get0(X509 *x, int *len);
24939 unsigned char *X509_keyid_get0(X509 *x, int *len);
24940 int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
24941                                                                 int);
24942 int X509_TRUST_set(int *t, int trust);
24943 int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
24944 int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj);
24945 void X509_trust_clear(X509 *x);
24946 void X509_reject_clear(X509 *x);
24947 
24948 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;
24949 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;
24950 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;
24951 
24952 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
24953 int X509_CRL_get0_by_serial(X509_CRL *crl,
24954                             X509_REVOKED **ret, ASN1_INTEGER *serial);
24955 int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
24956 
24957 X509_PKEY *X509_PKEY_new(void);
24958 void X509_PKEY_free(X509_PKEY *a);
24959 int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp);
24960 X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp,
24961                          long length);
24962 
24963 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;
24964 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;
24965 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;
24966 
24967 
24968 X509_INFO *X509_INFO_new(void);
24969 void X509_INFO_free(X509_INFO *a);
24970 char *X509_NAME_oneline(X509_NAME *a, char *buf, int size);
24971 
24972 int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,
24973                 ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey);
24974 
24975 int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
24976                 unsigned char *md, unsigned int *len);
24977 
24978 int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1,
24979               X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
24980               char *data, EVP_PKEY *pkey, const EVP_MD *type);
24981 
24982 int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data,
24983                      unsigned char *md, unsigned int *len);
24984 
24985 int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,
24986                      ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey);
24987 
24988 int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1,
24989                    X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data,
24990                    EVP_PKEY *pkey, const EVP_MD *type);
24991 int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
24992                        X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
24993                        void *asn, EVP_MD_CTX *ctx);
24994 
24995 
24996 int X509_set_version(X509 *x, long version);
24997 int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
24998 ASN1_INTEGER *X509_get_serialNumber(X509 *x);
24999 int X509_set_issuer_name(X509 *x, X509_NAME *name);
25000 X509_NAME *X509_get_issuer_name(X509 *a);
25001 int X509_set_subject_name(X509 *x, X509_NAME *name);
25002 X509_NAME *X509_get_subject_name(X509 *a);
25003 int X509_set_notBefore(X509 *x, const ASN1_TIME *tm);
25004 int X509_set_notAfter(X509 *x, const ASN1_TIME *tm);
25005 int X509_set_pubkey(X509 *x, EVP_PKEY *pkey);
25006 EVP_PKEY *X509_get_pubkey(X509 *x);
25007 ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);
25008 int X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ );
25009 
25010 int X509_REQ_set_version(X509_REQ *x, long version);
25011 int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
25012 int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
25013 EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
25014 int X509_REQ_extension_nid(int nid);
25015 int *X509_REQ_get_extension_nids(void);
25016 void X509_REQ_set_extension_nids(int *nids);
25017 struct stack_st_X509_EXTENSION *X509_REQ_get_extensions(X509_REQ *req);
25018 int X509_REQ_add_extensions_nid(X509_REQ *req, struct stack_st_X509_EXTENSION *exts,
25019                                 int nid);
25020 int X509_REQ_add_extensions(X509_REQ *req, struct stack_st_X509_EXTENSION *exts);
25021 int X509_REQ_get_attr_count(const X509_REQ *req);
25022 int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);
25023 int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj,
25024                              int lastpos);
25025 X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
25026 X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
25027 int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
25028 int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
25029                               const ASN1_OBJECT *obj, int type,
25030                               const unsigned char *bytes, int len);
25031 int X509_REQ_add1_attr_by_NID(X509_REQ *req,
25032                               int nid, int type,
25033                               const unsigned char *bytes, int len);
25034 int X509_REQ_add1_attr_by_txt(X509_REQ *req,
25035                               const char *attrname, int type,
25036                               const unsigned char *bytes, int len);
25037 
25038 int X509_CRL_set_version(X509_CRL *x, long version);
25039 int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
25040 int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
25041 int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
25042 int X509_CRL_sort(X509_CRL *crl);
25043 
25044 int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
25045 int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
25046 
25047 X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer,
25048                         EVP_PKEY *skey, const EVP_MD *md, unsigned int flags);
25049 
25050 int X509_REQ_check_private_key(X509_REQ *x509, EVP_PKEY *pkey);
25051 
25052 int X509_check_private_key(X509 *x509, EVP_PKEY *pkey);
25053 int X509_chain_check_suiteb(int *perror_depth,
25054                             X509 *x, struct stack_st_X509 *chain,
25055                             unsigned long flags);
25056 int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags);
25057 struct stack_st_X509 *X509_chain_up_ref(struct stack_st_X509 *chain);
25058 
25059 int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
25060 unsigned long X509_issuer_and_serial_hash(X509 *a);
25061 
25062 int X509_issuer_name_cmp(const X509 *a, const X509 *b);
25063 unsigned long X509_issuer_name_hash(X509 *a);
25064 
25065 int X509_subject_name_cmp(const X509 *a, const X509 *b);
25066 unsigned long X509_subject_name_hash(X509 *x);
25067 
25068 
25069 unsigned long X509_issuer_name_hash_old(X509 *a);
25070 unsigned long X509_subject_name_hash_old(X509 *x);
25071 
25072 
25073 int X509_cmp(const X509 *a, const X509 *b);
25074 int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
25075 unsigned long X509_NAME_hash(X509_NAME *x);
25076 unsigned long X509_NAME_hash_old(X509_NAME *x);
25077 
25078 int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
25079 int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
25080 
25081 int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
25082                      unsigned long cflag);
25083 int X509_print_fp(FILE *bp, X509 *x);
25084 int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
25085 int X509_REQ_print_fp(FILE *bp, X509_REQ *req);
25086 int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent,
25087                           unsigned long flags);
25088 
25089 
25090 
25091 int X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
25092 int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent,
25093                        unsigned long flags);
25094 int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
25095                   unsigned long cflag);
25096 int X509_print(BIO *bp, X509 *x);
25097 int X509_ocspid_print(BIO *bp, X509 *x);
25098 int X509_CERT_AUX_print(BIO *bp, X509_CERT_AUX *x, int indent);
25099 int X509_CRL_print(BIO *bp, X509_CRL *x);
25100 int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
25101                       unsigned long cflag);
25102 int X509_REQ_print(BIO *bp, X509_REQ *req);
25103 
25104 
25105 int X509_NAME_entry_count(X509_NAME *name);
25106 int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);
25107 int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
25108                               char *buf, int len);
25109 
25110 /*
25111  * NOTE: you should be passsing -1, not 0 as lastpos.  The functions that use
25112  * lastpos, search after that position on.
25113  */
25114 int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
25115 int X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
25116                                int lastpos);
25117 X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
25118 X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
25119 int X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne,
25120                         int loc, int set);
25121 int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type,
25122                                unsigned char *bytes, int len, int loc,
25123                                int set);
25124 int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
25125                                unsigned char *bytes, int len, int loc,
25126                                int set);
25127 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
25128                                                const char *field, int type,
25129                                                const unsigned char *bytes,
25130                                                int len);
25131 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
25132                                                int type, unsigned char *bytes,
25133                                                int len);
25134 int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
25135                                const unsigned char *bytes, int len, int loc,
25136                                int set);
25137 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
25138                                                ASN1_OBJECT *obj, int type,
25139                                                const unsigned char *bytes,
25140                                                int len);
25141 int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj);
25142 int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
25143                              const unsigned char *bytes, int len);
25144 ASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
25145 ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
25146 
25147 int X509v3_get_ext_count(const struct stack_st_X509_EXTENSION *x);
25148 int X509v3_get_ext_by_NID(const struct stack_st_X509_EXTENSION *x,
25149                           int nid, int lastpos);
25150 int X509v3_get_ext_by_OBJ(const struct stack_st_X509_EXTENSION *x,
25151                           ASN1_OBJECT *obj, int lastpos);
25152 int X509v3_get_ext_by_critical(const struct stack_st_X509_EXTENSION *x,
25153                                int crit, int lastpos);
25154 X509_EXTENSION *X509v3_get_ext(const struct stack_st_X509_EXTENSION *x, int loc);
25155 X509_EXTENSION *X509v3_delete_ext(struct stack_st_X509_EXTENSION *x, int loc);
25156 struct stack_st_X509_EXTENSION *X509v3_add_ext(struct stack_st_X509_EXTENSION **x,
25157                                          X509_EXTENSION *ex, int loc);
25158 
25159 int X509_get_ext_count(X509 *x);
25160 int X509_get_ext_by_NID(X509 *x, int nid, int lastpos);
25161 int X509_get_ext_by_OBJ(X509 *x, ASN1_OBJECT *obj, int lastpos);
25162 int X509_get_ext_by_critical(X509 *x, int crit, int lastpos);
25163 X509_EXTENSION *X509_get_ext(X509 *x, int loc);
25164 X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
25165 int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
25166 void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
25167 int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
25168                       unsigned long flags);
25169 
25170 int X509_CRL_get_ext_count(X509_CRL *x);
25171 int X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos);
25172 int X509_CRL_get_ext_by_OBJ(X509_CRL *x, ASN1_OBJECT *obj, int lastpos);
25173 int X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos);
25174 X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc);
25175 X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
25176 int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
25177 void *X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx);
25178 int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
25179                           unsigned long flags);
25180 
25181 int X509_REVOKED_get_ext_count(X509_REVOKED *x);
25182 int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos);
25183 int X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x, ASN1_OBJECT *obj,
25184                                 int lastpos);
25185 int X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos);
25186 X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc);
25187 X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
25188 int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
25189 void *X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx);
25190 int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
25191                               unsigned long flags);
25192 
25193 X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
25194                                              int nid, int crit,
25195                                              ASN1_OCTET_STRING *data);
25196 X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
25197                                              ASN1_OBJECT *obj, int crit,
25198                                              ASN1_OCTET_STRING *data);
25199 int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj);
25200 int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
25201 int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
25202 ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);
25203 ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
25204 int X509_EXTENSION_get_critical(X509_EXTENSION *ex);
25205 
25206 int X509at_get_attr_count(const struct stack_st_X509_ATTRIBUTE *x);
25207 int X509at_get_attr_by_NID(const struct stack_st_X509_ATTRIBUTE *x, int nid,
25208                            int lastpos);
25209 int X509at_get_attr_by_OBJ(const struct stack_st_X509_ATTRIBUTE *sk,
25210                            ASN1_OBJECT *obj, int lastpos);
25211 X509_ATTRIBUTE *X509at_get_attr(const struct stack_st_X509_ATTRIBUTE *x, int loc);
25212 X509_ATTRIBUTE *X509at_delete_attr(struct stack_st_X509_ATTRIBUTE *x, int loc);
25213 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr(struct stack_st_X509_ATTRIBUTE **x,
25214                                            X509_ATTRIBUTE *attr);
25215 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_OBJ(struct stack_st_X509_ATTRIBUTE
25216                                                   **x, const ASN1_OBJECT *obj,
25217                                                   int type,
25218                                                   const unsigned char *bytes,
25219                                                   int len);
25220 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_NID(struct stack_st_X509_ATTRIBUTE
25221                                                   **x, int nid, int type,
25222                                                   const unsigned char *bytes,
25223                                                   int len);
25224 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_txt(struct stack_st_X509_ATTRIBUTE
25225                                                   **x, const char *attrname,
25226                                                   int type,
25227                                                   const unsigned char *bytes,
25228                                                   int len);
25229 void *X509at_get0_data_by_OBJ(struct stack_st_X509_ATTRIBUTE *x, ASN1_OBJECT *obj,
25230                               int lastpos, int type);
25231 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
25232                                              int atrtype, const void *data,
25233                                              int len);
25234 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
25235                                              const ASN1_OBJECT *obj,
25236                                              int atrtype, const void *data,
25237                                              int len);
25238 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
25239                                              const char *atrname, int type,
25240                                              const unsigned char *bytes,
25241                                              int len);
25242 int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);
25243 int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,
25244                              const void *data, int len);
25245 void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype,
25246                                void *data);
25247 int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr);
25248 ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
25249 ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
25250 
25251 int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
25252 int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);
25253 int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj,
25254                              int lastpos);
25255 X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
25256 X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
25257 int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
25258 int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
25259                               const ASN1_OBJECT *obj, int type,
25260                               const unsigned char *bytes, int len);
25261 int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
25262                               int nid, int type,
25263                               const unsigned char *bytes, int len);
25264 int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
25265                               const char *attrname, int type,
25266                               const unsigned char *bytes, int len);
25267 
25268 int X509_verify_cert(X509_STORE_CTX *ctx);
25269 
25270 /* lookup a cert from a X509 STACK */
25271 X509 *X509_find_by_issuer_and_serial(struct stack_st_X509 *sk, X509_NAME *name,
25272                                      ASN1_INTEGER *serial);
25273 X509 *X509_find_by_subject(struct stack_st_X509 *sk, X509_NAME *name);
25274 
25275 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;
25276 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;
25277 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;
25278 
25279 int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
25280                          const unsigned char *salt, int saltlen);
25281 
25282 X509_ALGOR *PKCS5_pbe_set(int alg, int iter,
25283                           const unsigned char *salt, int saltlen);
25284 X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
25285                            unsigned char *salt, int saltlen);
25286 X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
25287                               unsigned char *salt, int saltlen,
25288                               unsigned char *aiv, int prf_nid);
25289 
25290 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
25291                              int prf_nid, int keylen);
25292 
25293 /* PKCS#8 utilities */
25294 
25295 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;
25296 
25297 EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8);
25298 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey);
25299 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken);
25300 PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);
25301 
25302 int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,
25303                     int version, int ptype, void *pval,
25304                     unsigned char *penc, int penclen);
25305 int PKCS8_pkey_get0(ASN1_OBJECT **ppkalg,
25306                     const unsigned char **pk, int *ppklen,
25307                     X509_ALGOR **pa, PKCS8_PRIV_KEY_INFO *p8);
25308 
25309 int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
25310                            int ptype, void *pval,
25311                            unsigned char *penc, int penclen);
25312 int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
25313                            const unsigned char **pk, int *ppklen,
25314                            X509_ALGOR **pa, X509_PUBKEY *pub);
25315 
25316 int X509_check_trust(X509 *x, int id, int flags);
25317 int X509_TRUST_get_count(void);
25318 X509_TRUST *X509_TRUST_get0(int idx);
25319 int X509_TRUST_get_by_id(int id);
25320 int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int),
25321                    char *name, int arg1, void *arg2);
25322 void X509_TRUST_cleanup(void);
25323 int X509_TRUST_get_flags(X509_TRUST *xp);
25324 char *X509_TRUST_get0_name(X509_TRUST *xp);
25325 int X509_TRUST_get_trust(X509_TRUST *xp);
25326 
25327 /* BEGIN ERROR CODES */
25328 /*
25329  * The following lines are auto generated by the script mkerr.pl. Any changes
25330  * made after this point may be overwritten when the script is next run.
25331  */
25332 
25333 void ERR_load_X509_strings(void);
25334 
25335 /* Error codes for the X509 functions. */
25336 
25337 /* Function codes. */
25338 # 1291 "/usr/include/openssl/x509.h" 3 4
25339 /* Reason codes. */
25340 # 45 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
25341 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 1
25342 /*
25343  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25344  *
25345  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25346  * Use is subject to license terms.
25347  */
25348 
25349 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
25350 /*	  All Rights Reserved  	*/
25351 
25352 /*
25353  * BIND 4.9.3:
25354  *
25355  * Copyright (c) 1980, 1983, 1988, 1993
25356  *	The Regents of the University of California.  All rights reserved.
25357  *
25358  * Redistribution and use in source and binary forms, with or without
25359  * modification, are permitted provided that the following conditions
25360  * are met:
25361  * 1. Redistributions of source code must retain the above copyright
25362  *    notice, this list of conditions and the following disclaimer.
25363  * 2. Redistributions in binary form must reproduce the above copyright
25364  *    notice, this list of conditions and the following disclaimer in the
25365  *    documentation and/or other materials provided with the distribution.
25366  * 3. All advertising materials mentioning features or use of this software
25367  *    must display the following acknowledgement:
25368  *	This product includes software developed by the University of
25369  *	California, Berkeley and its contributors.
25370  * 4. Neither the name of the University nor the names of its contributors
25371  *    may be used to endorse or promote products derived from this software
25372  *    without specific prior written permission.
25373  *
25374  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25375  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25376  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25377  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25378  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25379  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25380  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25381  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25382  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25383  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25384  * SUCH DAMAGE.
25385  * -
25386  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
25387  *
25388  * Permission to use, copy, modify, and distribute this software for any
25389  * purpose with or without fee is hereby granted, provided that the above
25390  * copyright notice and this permission notice appear in all copies, and that
25391  * the name of Digital Equipment Corporation not be used in advertising or
25392  * publicity pertaining to distribution of the document or software without
25393  * specific, written prior permission.
25394  *
25395  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
25396  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
25397  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
25398  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
25399  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
25400  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
25401  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
25402  * SOFTWARE.
25403  * --Copyright--
25404  *
25405  * End BIND 4.9.3
25406  */
25407 
25408 /*
25409  * Structures returned by network data base library.
25410  * All addresses are supplied in host order, and
25411  * returned in network order (suitable for use in system calls).
25412  */
25413 
25414 
25415 
25416 
25417 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
25418 /*
25419  * CDDL HEADER START
25420  *
25421  * The contents of this file are subject to the terms of the
25422  * Common Development and Distribution License (the "License").
25423  * You may not use this file except in compliance with the License.
25424  *
25425  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25426  * or http://www.opensolaris.org/os/licensing.
25427  * See the License for the specific language governing permissions
25428  * and limitations under the License.
25429  *
25430  * When distributing Covered Code, include this CDDL HEADER in each
25431  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25432  * If applicable, add the following below this CDDL HEADER, with the
25433  * fields enclosed by brackets "[]" replaced with your own identifying
25434  * information: Portions Copyright [yyyy] [name of copyright owner]
25435  *
25436  * CDDL HEADER END
25437  */
25438 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25439 /*	  All Rights Reserved  	*/
25440 
25441 
25442 /*
25443  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25444  * Use is subject to license terms.
25445  *
25446  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
25447  * Copyright 2016 Joyent, Inc.
25448  */
25449 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
25450 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
25451 /*
25452  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25453  * Use is subject to license terms.
25454  *
25455  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
25456  */
25457 /*
25458  * Copyright (c) 1982, 1986 Regents of the University of California.
25459  * All rights reserved.
25460  *
25461  * Redistribution and use in source and binary forms are permitted
25462  * provided that this notice is preserved and that due credit is given
25463  * to the University of California at Berkeley. The name of the University
25464  * may not be used to endorse or promote products derived from this
25465  * software without specific prior written permission. This software
25466  * is provided ``as is'' without express or implied warranty.
25467  */
25468 
25469 /*
25470  * Constants and structures defined by the internet system,
25471  * according to following documents
25472  *
25473  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
25474  *	http://www.iana.org/assignments/protocol-numbers
25475  *	http://www.iana.org/assignments/port-numbers
25476  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
25477  *
25478  */
25479 
25480 
25481 
25482 
25483 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
25484 /*
25485  * CDDL HEADER START
25486  *
25487  * The contents of this file are subject to the terms of the
25488  * Common Development and Distribution License (the "License").
25489  * You may not use this file except in compliance with the License.
25490  *
25491  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25492  * or http://www.opensolaris.org/os/licensing.
25493  * See the License for the specific language governing permissions
25494  * and limitations under the License.
25495  *
25496  * When distributing Covered Code, include this CDDL HEADER in each
25497  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25498  * If applicable, add the following below this CDDL HEADER, with the
25499  * fields enclosed by brackets "[]" replaced with your own identifying
25500  * information: Portions Copyright [yyyy] [name of copyright owner]
25501  *
25502  * CDDL HEADER END
25503  */
25504 
25505 /*
25506  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
25507  * Copyright 2016 Joyent, Inc.
25508  *
25509  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25510  * Use is subject to license terms.
25511  */
25512 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
25513 
25514 
25515 
25516 
25517 
25518 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
25519 /*
25520  * CDDL HEADER START
25521  *
25522  * The contents of this file are subject to the terms of the
25523  * Common Development and Distribution License (the "License").
25524  * You may not use this file except in compliance with the License.
25525  *
25526  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25527  * or http://www.opensolaris.org/os/licensing.
25528  * See the License for the specific language governing permissions
25529  * and limitations under the License.
25530  *
25531  * When distributing Covered Code, include this CDDL HEADER in each
25532  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25533  * If applicable, add the following below this CDDL HEADER, with the
25534  * fields enclosed by brackets "[]" replaced with your own identifying
25535  * information: Portions Copyright [yyyy] [name of copyright owner]
25536  *
25537  * CDDL HEADER END
25538  */
25539 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25540 /*	  All Rights Reserved  	*/
25541 
25542 
25543 /*
25544  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25545  * Use is subject to license terms.
25546  *
25547  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
25548  * Copyright 2016 Joyent, Inc.
25549  */
25550 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
25551 
25552 
25553 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
25554 /*
25555  * CDDL HEADER START
25556  *
25557  * The contents of this file are subject to the terms of the
25558  * Common Development and Distribution License (the "License").
25559  * You may not use this file except in compliance with the License.
25560  *
25561  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25562  * or http://www.opensolaris.org/os/licensing.
25563  * See the License for the specific language governing permissions
25564  * and limitations under the License.
25565  *
25566  * When distributing Covered Code, include this CDDL HEADER in each
25567  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25568  * If applicable, add the following below this CDDL HEADER, with the
25569  * fields enclosed by brackets "[]" replaced with your own identifying
25570  * information: Portions Copyright [yyyy] [name of copyright owner]
25571  *
25572  * CDDL HEADER END
25573  */
25574 /*
25575  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25576  * Use is subject to license terms.
25577  */
25578 
25579 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
25580 /*	  All Rights Reserved	*/
25581 
25582 /*
25583  * Portions of this source code were derived from Berkeley 4.3 BSD
25584  * under license from the Regents of the University of California.
25585  */
25586 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h"
25587 typedef uint16_t sa_family_t;
25588 
25589 
25590 /*
25591  * Structure used by kernel to store most
25592  * addresses.
25593  */
25594 struct sockaddr {
25595  sa_family_t sa_family; /* address family */
25596  char sa_data[14]; /* up to 14 bytes of direct address */
25597 };
25598 
25599 
25600 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h" 1
25601 /*
25602  * CDDL HEADER START
25603  *
25604  * The contents of this file are subject to the terms of the
25605  * Common Development and Distribution License (the "License").
25606  * You may not use this file except in compliance with the License.
25607  *
25608  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25609  * or http://www.opensolaris.org/os/licensing.
25610  * See the License for the specific language governing permissions
25611  * and limitations under the License.
25612  *
25613  * When distributing Covered Code, include this CDDL HEADER in each
25614  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25615  * If applicable, add the following below this CDDL HEADER, with the
25616  * fields enclosed by brackets "[]" replaced with your own identifying
25617  * information: Portions Copyright [yyyy] [name of copyright owner]
25618  *
25619  * CDDL HEADER END
25620  */
25621 /*
25622  * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
25623  */
25624 
25625 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
25626 /*	  All Rights Reserved  	*/
25627 
25628 /*
25629  * University Copyright- Copyright (c) 1982, 1986, 1988
25630  * The Regents of the University of California
25631  * All Rights Reserved
25632  *
25633  * University Acknowledgment- Portions of this document are derived from
25634  * software developed by the University of California, Berkeley, and its
25635  * contributors.
25636  */
25637 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
25638 /*
25639  * Definitions for UNIX IPC domain.
25640  */
25641 struct sockaddr_un {
25642  sa_family_t sun_family; /* AF_UNIX */
25643  char sun_path[108]; /* path name (gag) */
25644 };
25645 
25646 
25647 
25648 /*
25649  * NOTE: If we ever go to BSD-style sun_len + sun_family, this macro needs to
25650  * change.
25651  *
25652  * Also, include a strlen() prototype, and we have to protect it w.r.t.
25653  * UNIX{98,03}.  And because there's strlen, we need size_t as well.
25654  */
25655 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
25656 extern size_t strlen(const char *);
25657 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
25658 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if_dl.h" 1
25659 /*
25660  * Copyright 1993-2003 Sun Microsystems, Inc.  All rights reserved.
25661  * Use is subject to license terms.
25662  */
25663 /*
25664  * Copyright (c) 1990, 1993
25665  *	The Regents of the University of California.  All rights reserved.
25666  *
25667  * Redistribution and use in source and binary forms, with or without
25668  * modification, are permitted provided that the following conditions
25669  * are met:
25670  * 1. Redistributions of source code must retain the above copyright
25671  *    notice, this list of conditions and the following disclaimer.
25672  * 2. Redistributions in binary form must reproduce the above copyright
25673  *    notice, this list of conditions and the following disclaimer in the
25674  *    documentation and/or other materials provided with the distribution.
25675  * 3. All advertising materials mentioning features or use of this software
25676  *    must display the following acknowledgement:
25677  *	This product includes software developed by the University of
25678  *	California, Berkeley and its contributors.
25679  * 4. Neither the name of the University nor the names of its contributors
25680  *    may be used to endorse or promote products derived from this software
25681  *    without specific prior written permission.
25682  *
25683  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25684  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25685  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25686  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25687  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25688  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25689  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25690  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25691  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25692  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25693  * SUCH DAMAGE.
25694  */
25695 
25696 
25697 
25698 
25699 #pragma ident "%Z%%M%	%I%	%E% SMI"
25700 /* from UCB 8.1 (Berkeley) 6/10/93 */
25701 
25702 
25703 
25704 
25705 
25706 /*
25707  * A Link-Level Sockaddr may specify the interface in one of two
25708  * ways: either by means of a system-provided index number (computed
25709  * anew and possibly differently on every reboot), or by a human-readable
25710  * string such as "il0" (for managerial convenience).
25711  *
25712  * Census taking actions, such as something akin to SIOCGCONF would return
25713  * both the index and the human name.
25714  *
25715  * High volume transactions (such as giving a link-level ``from'' address
25716  * in a recvfrom or recvmsg call) may be likely only to provide the indexed
25717  * form, (which requires fewer copy operations and less space).
25718  *
25719  * The form and interpretation  of the link-level address is purely a matter
25720  * of convention between the device driver and its consumers; however, it is
25721  * expected that all drivers for an interface of a given if_type will agree.
25722  */
25723 
25724 /*
25725  * Structure of a Link-Level sockaddr:
25726  */
25727 struct sockaddr_dl {
25728  ushort_t sdl_family; /* AF_LINK */
25729  ushort_t sdl_index; /* if != 0, system given index for interface */
25730  uchar_t sdl_type; /* interface type */
25731  uchar_t sdl_nlen; /* interface name length, no trailing 0 reqd. */
25732  uchar_t sdl_alen; /* link level address length */
25733  uchar_t sdl_slen; /* link layer selector length */
25734  char sdl_data[244]; /* contains both if name and ll address */
25735 };
25736 
25737 
25738 
25739 
25740 extern char *_link_ntoa(const unsigned char *, char *, int, int);
25741 extern unsigned char *_link_aton(const char *, int *);
25742 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
25743 
25744 
25745 
25746 /*
25747  * sockaddr_storage:
25748  * Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
25749  * structures. Has sufficient size and alignment for those sockaddrs.
25750  */
25751 
25752 /*
25753  * Desired maximum size, alignment size and related types.
25754  */
25755 
25756 
25757 /*
25758  * To represent desired sockaddr max alignment for platform, a
25759  * type is chosen which may depend on implementation platform architecture.
25760  * Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
25761  * We desire to force up to (but no more than) 64-bit (8 byte) alignment,
25762  * on platforms where it is possible to do so. (e.g not possible on ia32).
25763  * For all currently supported platforms by our implementation
25764  * in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
25765  * type "double" is suitable for that intent.
25766  *
25767  * Note: Type "double" is chosen over the more obvious integer type int64_t.
25768  *   int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
25769  */
25770 typedef double sockaddr_maxalign_t;
25771 
25772 
25773 
25774 /*
25775  * Definitions used for sockaddr_storage structure paddings design.
25776  */
25777 
25778 
25779 
25780 
25781 struct sockaddr_storage {
25782  sa_family_t ss_family; /* Address family */
25783  /* Following fields are implementation specific */
25784  char _ss_pad1[((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t))];
25785  sockaddr_maxalign_t _ss_align;
25786  char _ss_pad2[(256 - (sizeof (sa_family_t)+ ((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t)) + (sizeof (sockaddr_maxalign_t))))];
25787 };
25788 
25789 
25790 /*
25791  * To be compatible with the Linux interfaces used, this structure is
25792  * placed in socket_impl.h so that an include for <sys/socket.h> will
25793  * pickup this structure. This structure is for use with PF_PACKET
25794  * sockets.
25795  */
25796 struct sockaddr_ll {
25797  uint16_t sll_family;
25798  uint16_t sll_protocol;
25799  int32_t sll_ifindex;
25800  uint16_t sll_hatype;
25801  uint8_t sll_pkttype;
25802  uint8_t sll_halen;
25803  uint8_t sll_addr[8];
25804 };
25805 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
25806 
25807 
25808 
25809 
25810 
25811 /*
25812  * The socklen definitions are reproduced here from sys/socket.h so as to
25813  * not introduce that namespace into existing users of netinet/in.h.
25814  */
25815 
25816 
25817 
25818 typedef uint32_t socklen_t;
25819 
25820 
25821 
25822 
25823 
25824 typedef void *Psocklen_t;
25825 
25826 
25827 
25828 
25829 
25830 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 1
25831 /*
25832  * CDDL HEADER START
25833  *
25834  * The contents of this file are subject to the terms of the
25835  * Common Development and Distribution License (the "License").
25836  * You may not use this file except in compliance with the License.
25837  *
25838  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25839  * or http://www.opensolaris.org/os/licensing.
25840  * See the License for the specific language governing permissions
25841  * and limitations under the License.
25842  *
25843  * When distributing Covered Code, include this CDDL HEADER in each
25844  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25845  * If applicable, add the following below this CDDL HEADER, with the
25846  * fields enclosed by brackets "[]" replaced with your own identifying
25847  * information: Portions Copyright [yyyy] [name of copyright owner]
25848  *
25849  * CDDL HEADER END
25850  */
25851 /*
25852  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25853  * Use is subject to license terms.
25854  */
25855 
25856 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25857 /*	  All Rights Reserved  	*/
25858 
25859 
25860 
25861 
25862 
25863 /*
25864  * For source compatibility
25865  */
25866 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
25867 /*
25868  * CDDL HEADER START
25869  *
25870  * The contents of this file are subject to the terms of the
25871  * Common Development and Distribution License (the "License").
25872  * You may not use this file except in compliance with the License.
25873  *
25874  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25875  * or http://www.opensolaris.org/os/licensing.
25876  * See the License for the specific language governing permissions
25877  * and limitations under the License.
25878  *
25879  *
25880  * When distributing Covered Code, include this CDDL HEADER in each
25881  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25882  * If applicable, add the following below this CDDL HEADER, with the
25883  * fields enclosed by brackets "[]" replaced with your own identifying
25884  * information: Portions Copyright [yyyy] [name of copyright owner]
25885  *
25886  * CDDL HEADER END
25887  */
25888 
25889 /*
25890  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
25891  * Use is subject to license terms.
25892  * Copyright 2016 Joyent, Inc.
25893  */
25894 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
25895 
25896 
25897 
25898 
25899 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h" 1
25900 /*
25901  * CDDL HEADER START
25902  *
25903  * The contents of this file are subject to the terms of the
25904  * Common Development and Distribution License, Version 1.0 only
25905  * (the "License").  You may not use this file except in compliance
25906  * with the License.
25907  *
25908  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25909  * or http://www.opensolaris.org/os/licensing.
25910  * See the License for the specific language governing permissions
25911  * and limitations under the License.
25912  *
25913  * When distributing Covered Code, include this CDDL HEADER in each
25914  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25915  * If applicable, add the following below this CDDL HEADER, with the
25916  * fields enclosed by brackets "[]" replaced with your own identifying
25917  * information: Portions Copyright [yyyy] [name of copyright owner]
25918  *
25919  * CDDL HEADER END
25920  */
25921 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25922 /*	  All Rights Reserved  	*/
25923 
25924 
25925 /*
25926  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25927  *
25928  * Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
25929  * All rights reserved.
25930  */
25931 
25932 /*
25933  * Copyright 2015, Joyent, Inc.
25934  */
25935 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
25936 /*
25937  * Structure of file descriptor/event pairs supplied in
25938  * the poll arrays.
25939  */
25940 typedef struct pollfd {
25941  int fd; /* file desc to poll */
25942  short events; /* events of interest on fd */
25943  short revents; /* events that occurred on fd */
25944 } pollfd_t;
25945 
25946 typedef unsigned long nfds_t;
25947 
25948 /*
25949  * Testable select events
25950  */
25951 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
25952 /*
25953  * Non-testable poll events (may not be specified in events field,
25954  * but may be returned in revents field).
25955  */
25956 
25957 
25958 
25959 
25960 /*
25961  * These events will never be specified in revents, but may be specified in
25962  * events to control /dev/poll behavior.
25963  */
25964 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
25965 int poll(struct pollfd *, nfds_t, int);
25966 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
25967 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/strmdep.h" 1
25968 /*
25969  * CDDL HEADER START
25970  *
25971  * The contents of this file are subject to the terms of the
25972  * Common Development and Distribution License, Version 1.0 only
25973  * (the "License").  You may not use this file except in compliance
25974  * with the License.
25975  *
25976  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25977  * or http://www.opensolaris.org/os/licensing.
25978  * See the License for the specific language governing permissions
25979  * and limitations under the License.
25980  *
25981  * When distributing Covered Code, include this CDDL HEADER in each
25982  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25983  * If applicable, add the following below this CDDL HEADER, with the
25984  * fields enclosed by brackets "[]" replaced with your own identifying
25985  * information: Portions Copyright [yyyy] [name of copyright owner]
25986  *
25987  * CDDL HEADER END
25988  */
25989 /*
25990  * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
25991  * All rights reserved.
25992  */
25993 
25994 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25995 /*	  All Rights Reserved  	*/
25996 
25997 
25998 
25999 
26000 
26001 #pragma ident "%Z%%M%	%I%	%E% SMI"
26002 
26003 
26004 
26005 
26006 
26007 /*
26008  * This file contains all machine-dependent declarations
26009  * in STREAMS.
26010  */
26011 
26012 /*
26013  * Copy data from one data buffer to another.
26014  * The addresses must be word aligned - if not, use bcopy!
26015  */
26016 
26017 
26018 /*
26019  * save the address of the calling function on the 3b2 to
26020  * enable tracking of who is allocating message blocks
26021  */
26022 
26023 
26024 /*
26025  * macro to check pointer alignment
26026  * (true if alignment is sufficient for worst case)
26027  */
26028 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
26029 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
26030 /*
26031  * CDDL HEADER START
26032  *
26033  * The contents of this file are subject to the terms of the
26034  * Common Development and Distribution License (the "License").
26035  * You may not use this file except in compliance with the License.
26036  *
26037  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26038  * or http://www.opensolaris.org/os/licensing.
26039  * See the License for the specific language governing permissions
26040  * and limitations under the License.
26041  *
26042  * When distributing Covered Code, include this CDDL HEADER in each
26043  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26044  * If applicable, add the following below this CDDL HEADER, with the
26045  * fields enclosed by brackets "[]" replaced with your own identifying
26046  * information: Portions Copyright [yyyy] [name of copyright owner]
26047  *
26048  * CDDL HEADER END
26049  */
26050 /*
26051  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26052  * Use is subject to license terms.
26053  */
26054 
26055 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
26056 /*	  All Rights Reserved  	*/
26057 
26058 /*
26059  * Portions of this source code were derived from Berkeley 4.3 BSD
26060  * under license from the Regents of the University of California.
26061  */
26062 
26063 
26064 
26065 
26066 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26067 /*
26068  * CDDL HEADER START
26069  *
26070  * The contents of this file are subject to the terms of the
26071  * Common Development and Distribution License (the "License").
26072  * You may not use this file except in compliance with the License.
26073  *
26074  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26075  * or http://www.opensolaris.org/os/licensing.
26076  * See the License for the specific language governing permissions
26077  * and limitations under the License.
26078  *
26079  * When distributing Covered Code, include this CDDL HEADER in each
26080  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26081  * If applicable, add the following below this CDDL HEADER, with the
26082  * fields enclosed by brackets "[]" replaced with your own identifying
26083  * information: Portions Copyright [yyyy] [name of copyright owner]
26084  *
26085  * CDDL HEADER END
26086  */
26087 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26088 /*	  All Rights Reserved  	*/
26089 
26090 
26091 /*
26092  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26093  * Use is subject to license terms.
26094  *
26095  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26096  * Copyright 2016 Joyent, Inc.
26097  */
26098 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 2
26099 
26100 
26101 
26102 
26103 
26104 /*
26105  * The credential is an opaque kernel private data structure defined in
26106  * <sys/cred_impl.h>.
26107  */
26108 
26109 typedef struct cred cred_t;
26110 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
26111 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 1
26112 /*
26113  * CDDL HEADER START
26114  *
26115  * The contents of this file are subject to the terms of the
26116  * Common Development and Distribution License, Version 1.0 only
26117  * (the "License").  You may not use this file except in compliance
26118  * with the License.
26119  *
26120  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26121  * or http://www.opensolaris.org/os/licensing.
26122  * See the License for the specific language governing permissions
26123  * and limitations under the License.
26124  *
26125  * When distributing Covered Code, include this CDDL HEADER in each
26126  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26127  * If applicable, add the following below this CDDL HEADER, with the
26128  * fields enclosed by brackets "[]" replaced with your own identifying
26129  * information: Portions Copyright [yyyy] [name of copyright owner]
26130  *
26131  * CDDL HEADER END
26132  */
26133 /*
26134  * Copyright (c) 1991-1998 by Sun Microsystems, Inc.
26135  * All rights reserved.
26136  */
26137 
26138 /*
26139  * t_lock.h:	Prototypes for disp_locks, plus include files
26140  *		that describe the interfaces to kernel synch.
26141  *		objects.
26142  */
26143 
26144 
26145 
26146 
26147 #pragma ident "%Z%%M%	%I%	%E% SMI"
26148 
26149 
26150 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 1
26151 /*
26152  * CDDL HEADER START
26153  *
26154  * The contents of this file are subject to the terms of the
26155  * Common Development and Distribution License (the "License").
26156  * You may not use this file except in compliance with the License.
26157  *
26158  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26159  * or http://www.opensolaris.org/os/licensing.
26160  * See the License for the specific language governing permissions
26161  * and limitations under the License.
26162  *
26163  * When distributing Covered Code, include this CDDL HEADER in each
26164  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26165  * If applicable, add the following below this CDDL HEADER, with the
26166  * fields enclosed by brackets "[]" replaced with your own identifying
26167  * information: Portions Copyright [yyyy] [name of copyright owner]
26168  *
26169  * CDDL HEADER END
26170  */
26171 /*
26172  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
26173  * Use is subject to license terms.
26174  * Copyright 2016 Joyent, Inc.
26175  */
26176 
26177 
26178 
26179 
26180 #pragma ident "%Z%%M%	%I%	%E% SMI"
26181 
26182 
26183 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26184 /*
26185  * CDDL HEADER START
26186  *
26187  * The contents of this file are subject to the terms of the
26188  * Common Development and Distribution License (the "License").
26189  * You may not use this file except in compliance with the License.
26190  *
26191  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26192  * or http://www.opensolaris.org/os/licensing.
26193  * See the License for the specific language governing permissions
26194  * and limitations under the License.
26195  *
26196  * When distributing Covered Code, include this CDDL HEADER in each
26197  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26198  * If applicable, add the following below this CDDL HEADER, with the
26199  * fields enclosed by brackets "[]" replaced with your own identifying
26200  * information: Portions Copyright [yyyy] [name of copyright owner]
26201  *
26202  * CDDL HEADER END
26203  */
26204 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26205 /*	  All Rights Reserved  	*/
26206 
26207 
26208 /*
26209  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26210  * Use is subject to license terms.
26211  *
26212  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26213  * Copyright 2016 Joyent, Inc.
26214  */
26215 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
26216 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
26217 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26218 /*	  All Rights Reserved  	*/
26219 
26220 
26221 /*
26222  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
26223  * All rights reserved.  The Berkeley software License Agreement
26224  * specifies the terms and conditions for redistribution.
26225  */
26226 
26227 /*
26228  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
26229  *
26230  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26231  * Use is subject to license terms.
26232  *
26233  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26234  */
26235 
26236 /*
26237  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
26238  */
26239 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
26240 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
26241 typedef lock_t disp_lock_t; /* dispatcher lock type */
26242 
26243 /*
26244  * SPIN_LOCK() macro indicates whether lock is implemented as a spin lock or
26245  * an adaptive mutex, depending on what interrupt levels use it.
26246  */
26247 
26248 
26249 /*
26250  * Macro to control loops which spin on a lock and then check state
26251  * periodically.  Its passed an integer, and returns a boolean value
26252  * that if true indicates its a good time to get the scheduler lock and
26253  * check the state of the current owner of the lock.
26254  */
26255 
26256 
26257 /*
26258  * Externs for CLOCK_LOCK and clock resolution
26259  */
26260 extern volatile uint32_t hres_lock;
26261 extern hrtime_t hrtime_base;
26262 extern int clock_res;
26263 
26264 
26265 
26266 /*
26267  * The definitions of the symbolic interrupt levels:
26268  *
26269  *   CLOCK_LEVEL =>  The level at which one must be to block the clock.
26270  *
26271  *   LOCK_LEVEL  =>  The highest level at which one may block (and thus the
26272  *                   highest level at which one may acquire adaptive locks)
26273  *                   Also the highest level at which one may be preempted.
26274  *
26275  *   DISP_LEVEL  =>  The level at which one must be to perform dispatcher
26276  *                   operations.
26277  *
26278  * The constraints on the platform:
26279  *
26280  *  - CLOCK_LEVEL must be less than or equal to LOCK_LEVEL
26281  *  - LOCK_LEVEL must be less than DISP_LEVEL
26282  *  - DISP_LEVEL should be as close to LOCK_LEVEL as possible
26283  *
26284  * Note that LOCK_LEVEL and CLOCK_LEVEL have historically always been equal;
26285  * changing this relationship is probably possible but not advised.
26286  *
26287  */
26288 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
26289 /*
26290  * The following mask is for the cpu_intr_actv bits corresponding to
26291  * high-level PILs. It should equal:
26292  * ((((1 << PIL_MAX + 1) - 1) >> LOCK_LEVEL + 1) << LOCK_LEVEL + 1)
26293  */
26294 
26295 
26296 /*
26297  * The semaphore code depends on being able to represent a lock plus
26298  * owner in a single 32-bit word.  (Mutexes used to have a similar
26299  * dependency, but no longer.)  Thus the owner must contain at most
26300  * 24 significant bits.  At present only threads and semaphores
26301  * must be aware of this vile constraint.  Different ISAs may handle this
26302  * differently depending on their capabilities (e.g. compare-and-swap)
26303  * and limitations (e.g. constraints on alignment and/or KERNELBASE).
26304  */
26305 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
26306 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
26307 /*
26308  * CDDL HEADER START
26309  *
26310  * The contents of this file are subject to the terms of the
26311  * Common Development and Distribution License (the "License").
26312  * You may not use this file except in compliance with the License.
26313  *
26314  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26315  * or http://www.opensolaris.org/os/licensing.
26316  * See the License for the specific language governing permissions
26317  * and limitations under the License.
26318  *
26319  * When distributing Covered Code, include this CDDL HEADER in each
26320  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26321  * If applicable, add the following below this CDDL HEADER, with the
26322  * fields enclosed by brackets "[]" replaced with your own identifying
26323  * information: Portions Copyright [yyyy] [name of copyright owner]
26324  *
26325  * CDDL HEADER END
26326  */
26327 
26328 /*
26329  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
26330  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
26331  */
26332 
26333 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
26334 /*	  All Rights Reserved  	*/
26335 
26336 /*
26337  * University Copyright- Copyright (c) 1982, 1986, 1988
26338  * The Regents of the University of California
26339  * All Rights Reserved
26340  *
26341  * University Acknowledgment- Portions of this document are derived from
26342  * software developed by the University of California, Berkeley, and its
26343  * contributors.
26344  */
26345 
26346 
26347 
26348 
26349 
26350 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26351 /*
26352  * CDDL HEADER START
26353  *
26354  * The contents of this file are subject to the terms of the
26355  * Common Development and Distribution License (the "License").
26356  * You may not use this file except in compliance with the License.
26357  *
26358  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26359  * or http://www.opensolaris.org/os/licensing.
26360  * See the License for the specific language governing permissions
26361  * and limitations under the License.
26362  *
26363  * When distributing Covered Code, include this CDDL HEADER in each
26364  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26365  * If applicable, add the following below this CDDL HEADER, with the
26366  * fields enclosed by brackets "[]" replaced with your own identifying
26367  * information: Portions Copyright [yyyy] [name of copyright owner]
26368  *
26369  * CDDL HEADER END
26370  */
26371 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26372 /*	  All Rights Reserved  	*/
26373 
26374 
26375 /*
26376  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26377  * Use is subject to license terms.
26378  *
26379  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26380  * Copyright 2016 Joyent, Inc.
26381  */
26382 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
26383 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
26384 /*
26385  * CDDL HEADER START
26386  *
26387  * The contents of this file are subject to the terms of the
26388  * Common Development and Distribution License (the "License").
26389  * You may not use this file except in compliance with the License.
26390  *
26391  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26392  * or http://www.opensolaris.org/os/licensing.
26393  * See the License for the specific language governing permissions
26394  * and limitations under the License.
26395  *
26396  *
26397  * When distributing Covered Code, include this CDDL HEADER in each
26398  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26399  * If applicable, add the following below this CDDL HEADER, with the
26400  * fields enclosed by brackets "[]" replaced with your own identifying
26401  * information: Portions Copyright [yyyy] [name of copyright owner]
26402  *
26403  * CDDL HEADER END
26404  */
26405 
26406 /*
26407  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
26408  * Use is subject to license terms.
26409  * Copyright 2016 Joyent, Inc.
26410  */
26411 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
26412 
26413 
26414 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
26415 /*
26416  * This file and its contents are supplied under the terms of the
26417  * Common Development and Distribution License ("CDDL"), version 1.0.
26418  * You may only use this file in accordance with the terms of version
26419  * 1.0 of the CDDL.
26420  *
26421  * A full copy of the text of the CDDL should have accompanied this
26422  * source.  A copy of the CDDL is also available via the Internet at
26423  * http://www.illumos.org/license/CDDL.
26424  */
26425 
26426 /*
26427  * Copyright 2014-2016 PALO, Richard.
26428  */
26429 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
26430 
26431 
26432 
26433 
26434 
26435 /*
26436  * Fundamental variables; don't change too often.
26437  */
26438 
26439 /*
26440  * _POSIX_VDISABLE has historically been defined in <sys/param.h> since
26441  * an early merge with AT&T source.  It has also historically been defined
26442  * in <sys/termios.h>. The POSIX standard, IEEE Std. 1003.1-1988 initially
26443  * required the existence of _POSIX_VDISABLE in <sys/termios.h>.
26444  * Subsequent versions of the IEEE Standard as well as the X/Open
26445  * specifications required that _POSIX_VDISABLE be defined in <unistd.h>
26446  * while still allowing for it's existence in other headers.  With the
26447  * introduction of XPG6, _POSIX_VDISABLE can only be defined in <unistd.h>.
26448  */
26449 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26450     /* compatibility purposes only	*/
26451     /* and will be removed in a	*/
26452     /* later release		*/
26453 
26454 /*
26455  * These define the maximum and minimum allowable values of the
26456  * configurable parameter NGROUPS_MAX.
26457  */
26458 
26459 
26460 
26461 
26462 /*
26463  * NGROUPS_MAX_DEFAULT: *MUST* match NGROUPS_MAX value in limits.h.
26464  */
26465 
26466 
26467 /*
26468  * Default process priority.  Keep it in sync with limits.h.
26469  */
26470 
26471 
26472 /*
26473  * Fundamental constants of the implementation--cannot be changed easily.
26474  */
26475 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26476 /* REMOTE -- whether machine is primary, secondary, or regular */
26477 
26478 
26479 
26480 /*
26481  * MAXPATHLEN defines the longest permissible path length,
26482  * including the terminating null, after expanding symbolic links.
26483  * TYPICALMAXPATHLEN is used in a few places as an optimization
26484  * with a local buffer on the stack to avoid kmem_alloc().
26485  * MAXSYMLINKS defines the maximum number of symbolic links
26486  * that may be expanded in a path name. It should be set high
26487  * enough to allow all legitimate uses, but halt infinite loops
26488  * reasonably quickly.
26489  * MAXNAMELEN is the length (including the terminating null) of
26490  * the longest permissible file (component) name.
26491  */
26492 
26493 
26494 
26495 
26496 
26497 /*
26498  * MAXLINKNAMELEN defines the longest possible permitted datalink name,
26499  * including the terminating NUL.  Note that this must not be larger
26500  * than related networking constants such as LIFNAMSIZ.
26501  */
26502 
26503 
26504 
26505 
26506 
26507 
26508 /*
26509  * The following are defined to be the same as
26510  * defined in /usr/include/limits.h.  They are
26511  * needed for pipe and FIFO compatibility.
26512  */
26513 # 220 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26514 /* macros replacing interleaving functions */
26515 
26516 
26517 
26518 /*
26519  * File system parameters and macros.
26520  *
26521  * The file system is made out of blocks of at most MAXBSIZE units,
26522  * with smaller units (fragments) only in the last direct block.
26523  * MAXBSIZE primarily determines the size of buffers in the buffer
26524  * pool. It may be made larger without any effect on existing
26525  * file systems; however making it smaller make make some file
26526  * systems unmountable.
26527  *
26528  * Note that the blocked devices are assumed to have DEV_BSIZE
26529  * "sectors" and that fragments must be some multiple of this size.
26530  */
26531 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26532 /*	64 bit versions of btodb and dbtob */
26533 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26534 /*
26535  * Size of arg list passed in by user.
26536  */
26537 # 287 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26538 /*
26539  * Scale factor for scaled integers used to count
26540  * %cpu time and load averages.
26541  */
26542 
26543 
26544 
26545 /*
26546  * Delay units are in microseconds.
26547  *
26548  * XXX	These macros are not part of the DDI!
26549  */
26550 # 317 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26551 /*
26552  * The following is to free utilities from machine dependencies within
26553  * an architecture. Must be included after definition of DEV_BSIZE.
26554  */
26555 # 471 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
26556 /*
26557  * The following are assorted machine dependent values which can be
26558  * obtained in a machine independent manner through sysconf(2) or
26559  * sysinfo(2). In order to guarantee that these provide the expected
26560  * value at all times, the System Private interface (leading underscore)
26561  * is used.
26562  */
26563 
26564 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
26565 /*
26566  * CDDL HEADER START
26567  *
26568  * The contents of this file are subject to the terms of the
26569  * Common Development and Distribution License (the "License").
26570  * You may not use this file except in compliance with the License.
26571  *
26572  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26573  * or http://www.opensolaris.org/os/licensing.
26574  * See the License for the specific language governing permissions
26575  * and limitations under the License.
26576  *
26577  * When distributing Covered Code, include this CDDL HEADER in each
26578  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26579  * If applicable, add the following below this CDDL HEADER, with the
26580  * fields enclosed by brackets "[]" replaced with your own identifying
26581  * information: Portions Copyright [yyyy] [name of copyright owner]
26582  *
26583  * CDDL HEADER END
26584  */
26585 
26586 /*
26587  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
26588  *	  All Rights Reserved
26589  *
26590  */
26591 
26592 /*
26593  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26594  * Use is subject to license terms.
26595  */
26596 
26597 /*
26598  * WARNING: This is an implementation-specific header,
26599  * its contents are not guaranteed. Applications
26600  * should include <unistd.h> and not this header.
26601  */
26602 # 480 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
26603 
26604 
26605 
26606 
26607 
26608 
26609 extern long _sysconf(int); /* System Private interface to sysconf() */
26610 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
26611 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 1
26612 /*
26613  * CDDL HEADER START
26614  *
26615  * The contents of this file are subject to the terms of the
26616  * Common Development and Distribution License (the "License").
26617  * You may not use this file except in compliance with the License.
26618  *
26619  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26620  * or http://www.opensolaris.org/os/licensing.
26621  * See the License for the specific language governing permissions
26622  * and limitations under the License.
26623  *
26624  * When distributing Covered Code, include this CDDL HEADER in each
26625  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26626  * If applicable, add the following below this CDDL HEADER, with the
26627  * fields enclosed by brackets "[]" replaced with your own identifying
26628  * information: Portions Copyright [yyyy] [name of copyright owner]
26629  *
26630  * CDDL HEADER END
26631  */
26632 /*
26633  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
26634  */
26635 
26636 
26637 
26638 
26639 
26640 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26641 /*
26642  * CDDL HEADER START
26643  *
26644  * The contents of this file are subject to the terms of the
26645  * Common Development and Distribution License (the "License").
26646  * You may not use this file except in compliance with the License.
26647  *
26648  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26649  * or http://www.opensolaris.org/os/licensing.
26650  * See the License for the specific language governing permissions
26651  * and limitations under the License.
26652  *
26653  * When distributing Covered Code, include this CDDL HEADER in each
26654  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26655  * If applicable, add the following below this CDDL HEADER, with the
26656  * fields enclosed by brackets "[]" replaced with your own identifying
26657  * information: Portions Copyright [yyyy] [name of copyright owner]
26658  *
26659  * CDDL HEADER END
26660  */
26661 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26662 /*	  All Rights Reserved  	*/
26663 
26664 
26665 /*
26666  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26667  * Use is subject to license terms.
26668  *
26669  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26670  * Copyright 2016 Joyent, Inc.
26671  */
26672 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 2
26673 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h"
26674 /*
26675  * Public interface to mutual exclusion locks.  See mutex(9F) for details.
26676  *
26677  * The basic mutex type is MUTEX_ADAPTIVE, which is expected to be used
26678  * in almost all of the kernel.  MUTEX_SPIN provides interrupt blocking
26679  * and must be used in interrupt handlers above LOCK_LEVEL.  The iblock
26680  * cookie argument to mutex_init() encodes the interrupt level to block.
26681  * The iblock cookie must be NULL for adaptive locks.
26682  *
26683  * MUTEX_DEFAULT is the type usually specified (except in drivers) to
26684  * mutex_init().  It is identical to MUTEX_ADAPTIVE.
26685  *
26686  * MUTEX_DRIVER is always used by drivers.  mutex_init() converts this to
26687  * either MUTEX_ADAPTIVE or MUTEX_SPIN depending on the iblock cookie.
26688  *
26689  * Mutex statistics can be gathered on the fly, without rebooting or
26690  * recompiling the kernel, via the lockstat driver (lockstat(7D)).
26691  */
26692 typedef enum {
26693  MUTEX_ADAPTIVE = 0, /* spin if owner is running, otherwise block */
26694  MUTEX_SPIN = 1, /* block interrupts and spin */
26695  MUTEX_DRIVER = 4, /* driver (DDI) mutex */
26696  MUTEX_DEFAULT = 6 /* kernel default mutex */
26697 } kmutex_type_t;
26698 
26699 typedef struct mutex {
26700 
26701 
26702 
26703  void *_opaque[2];
26704 
26705 } kmutex_t;
26706 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
26707 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 1
26708 /*
26709  * CDDL HEADER START
26710  *
26711  * The contents of this file are subject to the terms of the
26712  * Common Development and Distribution License (the "License").
26713  * You may not use this file except in compliance with the License.
26714  *
26715  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26716  * or http://www.opensolaris.org/os/licensing.
26717  * See the License for the specific language governing permissions
26718  * and limitations under the License.
26719  *
26720  * When distributing Covered Code, include this CDDL HEADER in each
26721  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26722  * If applicable, add the following below this CDDL HEADER, with the
26723  * fields enclosed by brackets "[]" replaced with your own identifying
26724  * information: Portions Copyright [yyyy] [name of copyright owner]
26725  *
26726  * CDDL HEADER END
26727  */
26728 /*
26729  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
26730  * Use is subject to license terms.
26731  */
26732 
26733 /*
26734  * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
26735  */
26736 
26737 
26738 
26739 
26740 /*
26741  * Public interface to readers/writer locks.  See rwlock(9F) for details.
26742  */
26743 
26744 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26745 /*
26746  * CDDL HEADER START
26747  *
26748  * The contents of this file are subject to the terms of the
26749  * Common Development and Distribution License (the "License").
26750  * You may not use this file except in compliance with the License.
26751  *
26752  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26753  * or http://www.opensolaris.org/os/licensing.
26754  * See the License for the specific language governing permissions
26755  * and limitations under the License.
26756  *
26757  * When distributing Covered Code, include this CDDL HEADER in each
26758  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26759  * If applicable, add the following below this CDDL HEADER, with the
26760  * fields enclosed by brackets "[]" replaced with your own identifying
26761  * information: Portions Copyright [yyyy] [name of copyright owner]
26762  *
26763  * CDDL HEADER END
26764  */
26765 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26766 /*	  All Rights Reserved  	*/
26767 
26768 
26769 /*
26770  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26771  * Use is subject to license terms.
26772  *
26773  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26774  * Copyright 2016 Joyent, Inc.
26775  */
26776 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 2
26777 
26778 
26779 
26780 
26781 
26782 
26783 
26784 typedef enum {
26785  RW_DRIVER = 2, /* driver (DDI) rwlock */
26786  RW_DEFAULT = 4 /* kernel default rwlock */
26787 } krw_type_t;
26788 
26789 typedef enum {
26790  RW_WRITER,
26791  RW_READER,
26792  RW_READER_STARVEWRITER
26793 } krw_t;
26794 
26795 typedef struct _krwlock {
26796  void *_opaque[1];
26797 } krwlock_t;
26798 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
26799 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h" 1
26800 /*
26801  * CDDL HEADER START
26802  *
26803  * The contents of this file are subject to the terms of the
26804  * Common Development and Distribution License, Version 1.0 only
26805  * (the "License").  You may not use this file except in compliance
26806  * with the License.
26807  *
26808  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26809  * or http://www.opensolaris.org/os/licensing.
26810  * See the License for the specific language governing permissions
26811  * and limitations under the License.
26812  *
26813  * When distributing Covered Code, include this CDDL HEADER in each
26814  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26815  * If applicable, add the following below this CDDL HEADER, with the
26816  * fields enclosed by brackets "[]" replaced with your own identifying
26817  * information: Portions Copyright [yyyy] [name of copyright owner]
26818  *
26819  * CDDL HEADER END
26820  */
26821 /*
26822  * Copyright (c) 1993-1998 by Sun Microsystems, Inc.
26823  * All rights reserved.
26824  */
26825 
26826 
26827 
26828 
26829 #pragma ident "%Z%%M%	%I%	%E% SMI"
26830 
26831 /*
26832  * Public interface to semaphores.  See semaphore(9F) for details.
26833  */
26834 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h"
26835 typedef enum {
26836  SEMA_DEFAULT,
26837  SEMA_DRIVER
26838 } ksema_type_t;
26839 
26840 typedef struct _ksema {
26841  void * _opaque[2]; /* 2 words on 4 byte alignment */
26842 } ksema_t;
26843 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
26844 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 1
26845 /*
26846  * CDDL HEADER START
26847  *
26848  * The contents of this file are subject to the terms of the
26849  * Common Development and Distribution License (the "License").
26850  * You may not use this file except in compliance with the License.
26851  *
26852  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26853  * or http://www.opensolaris.org/os/licensing.
26854  * See the License for the specific language governing permissions
26855  * and limitations under the License.
26856  *
26857  * When distributing Covered Code, include this CDDL HEADER in each
26858  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26859  * If applicable, add the following below this CDDL HEADER, with the
26860  * fields enclosed by brackets "[]" replaced with your own identifying
26861  * information: Portions Copyright [yyyy] [name of copyright owner]
26862  *
26863  * CDDL HEADER END
26864  */
26865 /*
26866  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26867  * Use is subject to license terms.
26868  */
26869 
26870 /*
26871  * Copyright (c) 2012 by Delphix. All rights reserved.
26872  */
26873 
26874 /*
26875  * condvar.h:
26876  *
26877  * definitions for thread synchronization primitives: condition variables
26878  * This is the public part of the interface to condition variables. The
26879  * private (implementation-specific) part is in <arch>/sys/condvar_impl.h.
26880  */
26881 
26882 
26883 
26884 
26885 
26886 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26887 /*
26888  * CDDL HEADER START
26889  *
26890  * The contents of this file are subject to the terms of the
26891  * Common Development and Distribution License (the "License").
26892  * You may not use this file except in compliance with the License.
26893  *
26894  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26895  * or http://www.opensolaris.org/os/licensing.
26896  * See the License for the specific language governing permissions
26897  * and limitations under the License.
26898  *
26899  * When distributing Covered Code, include this CDDL HEADER in each
26900  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26901  * If applicable, add the following below this CDDL HEADER, with the
26902  * fields enclosed by brackets "[]" replaced with your own identifying
26903  * information: Portions Copyright [yyyy] [name of copyright owner]
26904  *
26905  * CDDL HEADER END
26906  */
26907 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26908 /*	  All Rights Reserved  	*/
26909 
26910 
26911 /*
26912  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26913  * Use is subject to license terms.
26914  *
26915  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26916  * Copyright 2016 Joyent, Inc.
26917  */
26918 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
26919 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
26920 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26921 /*	  All Rights Reserved  	*/
26922 
26923 
26924 /*
26925  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
26926  * All rights reserved.  The Berkeley software License Agreement
26927  * specifies the terms and conditions for redistribution.
26928  */
26929 
26930 /*
26931  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
26932  *
26933  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26934  * Use is subject to license terms.
26935  *
26936  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26937  */
26938 
26939 /*
26940  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
26941  */
26942 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
26943 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h"
26944 /*
26945  * Condtion variables.
26946  */
26947 
26948 typedef struct _kcondvar {
26949  ushort_t _opaque;
26950 } kcondvar_t;
26951 
26952 typedef enum {
26953  CV_DEFAULT,
26954  CV_DRIVER
26955 } kcv_type_t;
26956 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
26957 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h"
26958 /*
26959  * Mutual exclusion locks described in common/sys/mutex.h.
26960  *
26961  * Semaphores described in common/sys/semaphore.h.
26962  *
26963  * Readers/Writer locks described in common/sys/rwlock.h.
26964  *
26965  * Condition variables described in common/sys/condvar.h
26966  */
26967 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
26968 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 1
26969 /*
26970  * CDDL HEADER START
26971  *
26972  * The contents of this file are subject to the terms of the
26973  * Common Development and Distribution License, Version 1.0 only
26974  * (the "License").  You may not use this file except in compliance
26975  * with the License.
26976  *
26977  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26978  * or http://www.opensolaris.org/os/licensing.
26979  * See the License for the specific language governing permissions
26980  * and limitations under the License.
26981  *
26982  * When distributing Covered Code, include this CDDL HEADER in each
26983  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26984  * If applicable, add the following below this CDDL HEADER, with the
26985  * fields enclosed by brackets "[]" replaced with your own identifying
26986  * information: Portions Copyright [yyyy] [name of copyright owner]
26987  *
26988  * CDDL HEADER END
26989  */
26990 /*
26991  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
26992  * Use is subject to license terms.
26993  */
26994 
26995 
26996 
26997 
26998 #pragma ident "%Z%%M%	%I%	%E% SMI"
26999 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
27000 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
27001 /*
27002  * CDDL HEADER START
27003  *
27004  * The contents of this file are subject to the terms of the
27005  * Common Development and Distribution License (the "License").
27006  * You may not use this file except in compliance with the License.
27007  *
27008  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27009  * or http://www.opensolaris.org/os/licensing.
27010  * See the License for the specific language governing permissions
27011  * and limitations under the License.
27012  *
27013  *
27014  * When distributing Covered Code, include this CDDL HEADER in each
27015  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27016  * If applicable, add the following below this CDDL HEADER, with the
27017  * fields enclosed by brackets "[]" replaced with your own identifying
27018  * information: Portions Copyright [yyyy] [name of copyright owner]
27019  *
27020  * CDDL HEADER END
27021  */
27022 
27023 /*
27024  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
27025  * Use is subject to license terms.
27026  * Copyright 2016 Joyent, Inc.
27027  */
27028 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 2
27029 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
27030 /*
27031  * XXX	Ick.  This type needs to be visible outside the above guard because
27032  * the proc structure is visible outside the _KERNEL | _KMEMUSER guard.
27033  * If we can make proc internals less visible, (which we obviously should)
27034  * then this can be invisible too.
27035  */
27036 typedef unsigned int model_t;
27037 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
27038 
27039 
27040 
27041 
27042 
27043 /*
27044  * Data queue.
27045  *
27046  * NOTE: The *only* public fields are documented in queue(9S).
27047  *       Everything else is implementation-private.
27048  *
27049  * The locking rules for the queue_t structure are extremely subtle and vary
27050  * widely depending on the field in question.  As such, each field is
27051  * annotated according to the following legend:
27052  *
27053  *   Q9S: The field is documented in queue(9S) and may be accessed without
27054  *        locks by a STREAMS module when inside an entry point (e.g., put(9E)).
27055  *        However, no fields can be directly modified unless q_lock is held
27056  *        (which is not possible in a DDI compliant STREAMS module), with the
27057  *        following exceptions:
27058  *
27059  *	   - q_ptr: can be modified as per the rules of the STREAMS module.
27060  *		    The STREAMS framework ignores q_ptr and thus imposes *no*
27061  *		    locking rules on it.
27062  *         - q_qinfo: can be modified before qprocson().
27063  *
27064  *	   - q_minpsz, q_maxpsz, q_hiwat, q_lowat: can be modified as per the
27065  *		    rules of the STREAMS module.  The STREAMS framework never
27066  *		    modifies these fields, and is tolerant of temporarily
27067  *		    stale field values.
27068  *
27069  *	  In general, the STREAMS framework employs one of the following
27070  *	  techniques to ensure STREAMS modules can safely access Q9S fields:
27071  *
27072  *	   - The field is only modified by the framework when the stream is
27073  *	     locked with strlock() (q_next).
27074  *
27075  *	   - The field is modified by the framework, but the modifies are
27076  *	     atomic, and temporarily stale values are harmless (q_count,
27077  *	     q_first, q_last).
27078  *
27079  *	   - The field is modified by the framework, but the field's visible
27080  *	     values are either constant or directly under the control
27081  *	     of the STREAMS module itself (q_flag).
27082  *
27083  *   QLK: The field must be accessed or modified under q_lock, except when
27084  *        the stream has been locked with strlock().  If multiple q_locks must
27085  *        be acquired, q_locks at higher addresses must be taken first.
27086  *
27087  *   STR: The field can be accessed without a lock, but must be modified under
27088  *	  strlock().
27089  *
27090  *   SQLK: The field must be accessed or modified under SQLOCK().
27091  *
27092  *   NOLK: The field can be accessed without a lock, but can only be modified
27093  *	   when the queue_t is not known to any other threads.
27094  *
27095  *   SVLK: The field must be accessed or modified under the service_queue lock.
27096  *         Note that service_lock must be taken after any needed q_locks,
27097  *	   and that no other lock should be taken while service_lock is held.
27098  *
27099  * In addition, it is always acceptable to modify a field that is not yet
27100  * known to any other threads -- and other special case exceptions exist in
27101  * the code.  Also, q_lock is used with q_wait to implement a stream head
27102  * monitor for reads and writes.
27103  */
27104 typedef struct queue {
27105  struct qinit *q_qinfo; /* Q9S: Q processing procedure  */
27106  struct msgb *q_first; /* Q9S: first message in Q	*/
27107  struct msgb *q_last; /* Q9S: last message in Q	*/
27108  struct queue *q_next; /* Q9S: next Q in stream	*/
27109  struct queue *q_link; /* SVLK: next Q for scheduling	*/
27110  void *q_ptr; /* Q9S: module-specific data	*/
27111  size_t q_count; /* Q9S: number of bytes on Q	*/
27112  uint_t q_flag; /* Q9S: Q state			*/
27113  ssize_t q_minpsz; /* Q9S: smallest packet OK on Q */
27114  ssize_t q_maxpsz; /* Q9S: largest packet OK on Q	*/
27115  size_t q_hiwat; /* Q9S: Q high water mark	*/
27116  size_t q_lowat; /* Q9S: Q low water mark	*/
27117  struct qband *q_bandp; /* QLK: band flow information	*/
27118  kmutex_t q_lock; /* NOLK: structure lock		*/
27119  struct stdata *q_stream; /* NOLK: stream backpointer	*/
27120  struct syncq *q_syncq; /* NOLK: associated syncq 	*/
27121  unsigned char q_nband; /* QLK: number of bands		*/
27122  kcondvar_t q_wait; /* NOLK: read/write sleep CV	*/
27123  struct queue *q_nfsrv; /* STR: next Q with svc routine */
27124  ushort_t q_draining; /* QLK: Q is draining		*/
27125  short q_struiot; /* QLK: sync streams Q UIO mode	*/
27126  clock_t q_qtstamp; /* QLK: when Q was enabled	*/
27127  size_t q_mblkcnt; /* QLK: mblk count		*/
27128  uint_t q_syncqmsgs; /* QLK: syncq message count	*/
27129  size_t q_rwcnt; /* QLK: # threads in rwnext()	*/
27130  pri_t q_spri; /* QLK: Q scheduling priority	*/
27131 
27132  /*
27133 	 * Syncq scheduling
27134 	 */
27135  struct msgb *q_sqhead; /* QLK: first syncq message	*/
27136  struct msgb *q_sqtail; /* QLK: last syncq message 	*/
27137  struct queue *q_sqnext; /* SQLK: next Q on syncq list	*/
27138  struct queue *q_sqprev; /* SQLK: prev Q on syncq list 	*/
27139  uint_t q_sqflags; /* SQLK: syncq flags		*/
27140  clock_t q_sqtstamp; /* SQLK: when Q was scheduled for sq */
27141 
27142  /*
27143 	 * NOLK: Reference to the queue's module's implementation
27144 	 * structure. This will be NULL for queues associated with drivers.
27145 	 */
27146  struct fmodsw_impl *q_fp;
27147 } queue_t;
27148 
27149 /*
27150  * Queue flags; unused flags not documented in queue(9S) can be recycled.
27151  */
27152 # 169 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27153 /*	UNUSED		0x00000200	   was QHLIST			*/
27154 /* 	UNUSED 		0x00000400	   was QUNSAFE			*/
27155 
27156 
27157 
27158 
27159 
27160 
27161      /* all MT type flags		*/
27162 
27163 
27164 
27165 
27166 
27167 
27168 /*	UNUSED		0x00400000	   was QHOT			*/
27169 /*	UNUSED		0x00800000	   was QNEXTHOT			*/
27170 /* 	UNUSED		0x01000000	   was _QNEXTLESS		*/
27171 
27172 
27173 
27174 
27175      /* direct interface to/from sockfs */
27176 
27177 /* queue sqflags (protected by SQLOCK). */
27178 
27179 
27180      /* This is also noted by the	*/
27181      /* q_draining field, but this one is */
27182      /* protected by SQLOCK */
27183 
27184 /*
27185  * Structure that describes the separate information
27186  * for each priority band in the queue.
27187  */
27188 typedef struct qband {
27189  struct qband *qb_next; /* next band's info */
27190  size_t qb_count; /* number of bytes in band */
27191  struct msgb *qb_first; /* beginning of band's data */
27192  struct msgb *qb_last; /* end of band's data */
27193  size_t qb_hiwat; /* high water mark for band */
27194  size_t qb_lowat; /* low water mark for band */
27195  uint_t qb_flag; /* see below */
27196  size_t qb_mblkcnt; /* mblk counter for runaway msgs */
27197 } qband_t;
27198 
27199 /*
27200  * qband flags
27201  */
27202 
27203 
27204 
27205 
27206 /*
27207  * Maximum number of bands.
27208  */
27209 
27210 
27211 /*
27212  * Fields that can be manipulated through strqset() and strqget().
27213  */
27214 typedef enum qfields {
27215  QHIWAT = 0, /* q_hiwat or qb_hiwat */
27216  QLOWAT = 1, /* q_lowat or qb_lowat */
27217  QMAXPSZ = 2, /* q_maxpsz */
27218  QMINPSZ = 3, /* q_minpsz */
27219  QCOUNT = 4, /* q_count or qb_count */
27220  QFIRST = 5, /* q_first or qb_first */
27221  QLAST = 6, /* q_last or qb_last */
27222  QFLAG = 7, /* q_flag or qb_flag */
27223  QSTRUIOT = 8, /* q_struiot */
27224  QBAD = 9
27225 } qfields_t;
27226 
27227 /*
27228  * Module information structure
27229  */
27230 struct module_info {
27231  ushort_t mi_idnum; /* module id number */
27232  char *mi_idname; /* module name */
27233  ssize_t mi_minpsz; /* min packet size accepted */
27234  ssize_t mi_maxpsz; /* max packet size accepted */
27235  size_t mi_hiwat; /* hi-water mark */
27236  size_t mi_lowat; /* lo-water mark */
27237 };
27238 
27239 /*
27240  * queue information structure (with Synchronous STREAMS extensions)
27241  */
27242 struct qinit {
27243  int (*qi_putp)(); /* put procedure */
27244  int (*qi_srvp)(); /* service procedure */
27245  int (*qi_qopen)(); /* called on startup */
27246  int (*qi_qclose)(); /* called on finish */
27247  int (*qi_qadmin)(); /* for future use */
27248  struct module_info *qi_minfo; /* module information structure */
27249  struct module_stat *qi_mstat; /* module statistics structure */
27250  int (*qi_rwp)(); /* r/w procedure */
27251  int (*qi_infop)(); /* information procedure */
27252  int qi_struiot; /* stream uio type for struio() */
27253 };
27254 
27255 /*
27256  * Values for qi_struiot and q_struiot:
27257  */
27258 
27259 
27260 
27261 
27262 /*
27263  * Streamtab (used in cdevsw and fmodsw to point to module or driver)
27264  */
27265 struct streamtab {
27266  struct qinit *st_rdinit;
27267  struct qinit *st_wrinit;
27268  struct qinit *st_muxrinit;
27269  struct qinit *st_muxwinit;
27270 };
27271 
27272 /*
27273  * Structure sent to mux drivers to indicate a link.
27274  */
27275 struct linkblk {
27276  queue_t *l_qtop; /* lowest level write queue of upper stream */
27277     /* (set to NULL for persistent links) */
27278  queue_t *l_qbot; /* highest level write queue of lower stream */
27279  int l_index; /* index for lower stream. */
27280 };
27281 
27282 /*
27283  * Esballoc data buffer freeing routine
27284  */
27285 typedef struct free_rtn {
27286  void (*free_func)();
27287  caddr_t free_arg;
27288 } frtn_t;
27289 
27290 /*
27291  * Data block descriptor
27292  *
27293  * NOTE: db_base, db_lim, db_ref and db_type are the *only* public fields,
27294  * as described in datab(9S).  Everything else is implementation-private.
27295  */
27296 
27297 
27298 
27299 typedef struct datab {
27300  frtn_t *db_frtnp;
27301  unsigned char *db_base;
27302  unsigned char *db_lim;
27303  unsigned char db_ref;
27304  unsigned char db_type;
27305  unsigned char db_flags;
27306  unsigned char db_struioflag;
27307  pid_t db_cpid; /* cached pid, needs verification */
27308  void *db_cache; /* kmem cache descriptor */
27309  struct msgb *db_mblk;
27310  void (*db_free)(struct msgb *, struct datab *);
27311  void (*db_lastfree)(struct msgb *, struct datab *);
27312  intptr_t db_cksumstart;
27313  intptr_t db_cksumend;
27314  intptr_t db_cksumstuff;
27315  union {
27316   double enforce_alignment;
27317   unsigned char data[8];
27318   struct {
27319    union {
27320     uint32_t u32;
27321     uint16_t u16;
27322    } cksum_val; /* used to store calculated cksum */
27323    uint16_t flags;
27324    uint16_t pad;
27325   } cksum;
27326   /*
27327 		 * Union used for future extensions (pointer to data ?).
27328 		 */
27329  } db_struioun;
27330  struct fthdr *db_fthdr;
27331  cred_t *db_credp; /* credential */
27332 } dblk_t;
27333 
27334 
27335 
27336 
27337 /*
27338  * Accessor macros for private dblk_t fields (the rest are in <sys/strsun.h>).
27339  */
27340 
27341 
27342 
27343 /*
27344  * Used by GLDv2 to store the TCI information.
27345  */
27346 
27347 
27348 /*
27349  * Message block descriptor
27350  */
27351 typedef struct msgb {
27352  struct msgb *b_next;
27353  struct msgb *b_prev;
27354  struct msgb *b_cont;
27355  unsigned char *b_rptr;
27356  unsigned char *b_wptr;
27357  struct datab *b_datap;
27358  unsigned char b_band;
27359  unsigned char b_tag;
27360  unsigned short b_flag;
27361  queue_t *b_queue; /* for sync queues */
27362 } mblk_t;
27363 
27364 /*
27365  * bcache descriptor
27366  */
27367 typedef struct bcache {
27368  kmutex_t mutex;
27369  struct kmem_cache *buffer_cache;
27370  struct kmem_cache *dblk_cache;
27371  int alloc;
27372  int destroy;
27373  size_t size;
27374  uint_t align;
27375 } bcache_t;
27376 
27377 /*
27378  * db_flags values (all implementation private!)
27379  */
27380 
27381 
27382 
27383 
27384 /*
27385  * db_struioflag values:
27386  */
27387 
27388 
27389 
27390 
27391 
27392 
27393 /*
27394  * Message flags.  These are interpreted by the stream head.
27395  */
27396 
27397 
27398     /* write side of stream */
27399 
27400 /*	UNUSED		0x08	   was MSGNOGET (can be recycled) */
27401 
27402 
27403 
27404 
27405 /*
27406  * Streams message types.
27407  */
27408 
27409 /*
27410  * Data and protocol messages (regular and priority)
27411  */
27412 
27413 
27414 
27415 
27416 /*
27417  * Control messages (regular and priority)
27418  */
27419 # 445 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27420 /*
27421  * Control messages (high priority; go to head of queue)
27422  */
27423 # 468 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27424 /*
27425  * Queue message class definitions.
27426  */
27427 
27428 
27429 
27430 /*
27431  *  IOCTL structure - this structure is the format of the M_IOCTL message type.
27432  */
27433 # 488 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27434 struct iocblk {
27435  int ioc_cmd; /* ioctl command type */
27436  cred_t *ioc_cr; /* full credentials */
27437  uint_t ioc_id; /* ioctl id */
27438  size_t ioc_count; /* count of bytes in data field */
27439  int ioc_error; /* error code */
27440  int ioc_rval; /* return value  */
27441  int ioc_fill1;
27442  uint_t ioc_flag; /* see below */
27443  int ioc_filler[2]; /* reserved for future use */
27444 };
27445 
27446 
27447 typedef struct iocblk *IOCP;
27448 
27449 /* {ioc,cp}_flags values */
27450 
27451 
27452 
27453 
27454 
27455 
27456 
27457 /*
27458  *	Is the ioctl data formatted for our native model?
27459  */
27460 
27461 
27462 
27463 /*
27464  * structure for the M_COPYIN and M_COPYOUT message types.
27465  */
27466 # 531 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27467 struct copyreq {
27468  int cq_cmd; /* ioctl command (from ioc_cmd) */
27469  cred_t *cq_cr; /* full credentials */
27470  uint_t cq_id; /* ioctl id (from ioc_id) */
27471  caddr_t cq_addr; /* address to copy data to/from */
27472  size_t cq_size; /* number of bytes to copy */
27473  uint_t cq_flag; /* must be zero */
27474  mblk_t *cq_private; /* private state information */
27475  int cq_filler[4]; /* reserved for future use */
27476 };
27477 
27478 
27479 /*
27480  * structure for the M_IOCDATA message type.
27481  */
27482 # 557 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27483 struct copyresp {
27484  int cp_cmd; /* ioctl command (from ioc_cmd) */
27485  cred_t *cp_cr; /* full credentials */
27486  uint_t cp_id; /* ioctl id (from ioc_id) */
27487  caddr_t cp_rval; /* status of request: 0 -> success */
27488      /* 		non-zero -> failure */
27489  size_t cp_pad1;
27490  uint_t cp_pad2;
27491  mblk_t *cp_private; /* private state information */
27492  uint_t cp_flag; /* datamodel IOC_ flags; see above */
27493  int cp_filler[3];
27494 };
27495 
27496 
27497 /*
27498  * Since these structures are all intended to travel in the same message
27499  * at different stages of a STREAMS ioctl, this union is used to determine
27500  * the message size in strdoioctl().
27501  */
27502 union ioctypes {
27503  struct iocblk iocblk;
27504  struct copyreq copyreq;
27505  struct copyresp copyresp;
27506 };
27507 
27508 /*
27509  * Options structure for M_SETOPTS message.  This is sent upstream
27510  * by a module or driver to set stream head options.
27511  */
27512 struct stroptions {
27513  uint_t so_flags; /* options to set */
27514  short so_readopt; /* read option */
27515  ushort_t so_wroff; /* write offset */
27516  ssize_t so_minpsz; /* minimum read packet size */
27517  ssize_t so_maxpsz; /* maximum read packet size */
27518  size_t so_hiwat; /* read queue high water mark */
27519  size_t so_lowat; /* read queue low water mark */
27520  unsigned char so_band; /* band for water marks */
27521  ushort_t so_erropt; /* error option */
27522  ssize_t so_maxblk; /* maximum message block size */
27523  ushort_t so_copyopt; /* copy options (see stropts.h) */
27524  ushort_t so_tail; /* space available at the end */
27525 };
27526 
27527 /* flags for stream options set message */
27528 # 673 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
27529 /*
27530  * Miscellaneous parameters and flags.
27531  */
27532 
27533 /*
27534  * Values for stream flag in open to indicate module open, clone open,
27535  * and the return value for failure.
27536  */
27537 
27538 
27539 
27540 
27541 /*
27542  * Priority definitions for block allocation.
27543  */
27544 
27545 
27546 
27547 
27548 /*
27549  * Value for packet size that denotes infinity
27550  */
27551 
27552 
27553 /*
27554  * Flags for flushq()
27555  */
27556 
27557 
27558 
27559 /*
27560  * Flag for transparent ioctls
27561  */
27562 
27563 
27564 /*
27565  * Stream head default high/low water marks
27566  */
27567 
27568 
27569 
27570 /*
27571  * qwriter perimeter types
27572  */
27573 
27574 
27575 
27576 /*
27577  * Definitions of Streams macros and function interfaces.
27578  */
27579 
27580 /*
27581  * canenable - check if queue can be enabled by putq().
27582  */
27583 
27584 
27585 /*
27586  * Test if data block type is one of the data messages (i.e. not a control
27587  * message).
27588  */
27589 
27590 
27591 
27592 
27593 
27594 
27595 
27596 /*
27597  * Extract queue class of message block.
27598  */
27599 
27600 
27601 /*
27602  * Align address on next lower word boundary.
27603  */
27604 
27605 
27606 /*
27607  * Find the max size of data block.
27608  */
27609 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
27610 
27611 /*
27612  * Symbols such as htonl() are required to be exposed through this file,
27613  * per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
27614  */
27615 
27616 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 1
27617 /*
27618  * CDDL HEADER START
27619  *
27620  * The contents of this file are subject to the terms of the
27621  * Common Development and Distribution License (the "License").
27622  * You may not use this file except in compliance with the License.
27623  *
27624  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27625  * or http://www.opensolaris.org/os/licensing.
27626  * See the License for the specific language governing permissions
27627  * and limitations under the License.
27628  *
27629  * When distributing Covered Code, include this CDDL HEADER in each
27630  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27631  * If applicable, add the following below this CDDL HEADER, with the
27632  * fields enclosed by brackets "[]" replaced with your own identifying
27633  * information: Portions Copyright [yyyy] [name of copyright owner]
27634  *
27635  * CDDL HEADER END
27636  */
27637 
27638 /*
27639  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
27640  * Use is subject to license terms.
27641  */
27642 
27643 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
27644 /*	  All Rights Reserved  	*/
27645 
27646 /*
27647  * University Copyright- Copyright (c) 1982, 1986, 1988
27648  * The Regents of the University of California
27649  * All Rights Reserved
27650  *
27651  * University Acknowledgment- Portions of this document are derived from
27652  * software developed by the University of California, Berkeley, and its
27653  * contributors.
27654  */
27655 
27656 
27657 
27658 
27659 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
27660 /*
27661  * CDDL HEADER START
27662  *
27663  * The contents of this file are subject to the terms of the
27664  * Common Development and Distribution License (the "License").
27665  * You may not use this file except in compliance with the License.
27666  *
27667  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27668  * or http://www.opensolaris.org/os/licensing.
27669  * See the License for the specific language governing permissions
27670  * and limitations under the License.
27671  *
27672  *
27673  * When distributing Covered Code, include this CDDL HEADER in each
27674  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27675  * If applicable, add the following below this CDDL HEADER, with the
27676  * fields enclosed by brackets "[]" replaced with your own identifying
27677  * information: Portions Copyright [yyyy] [name of copyright owner]
27678  *
27679  * CDDL HEADER END
27680  */
27681 
27682 /*
27683  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
27684  * Use is subject to license terms.
27685  * Copyright 2016 Joyent, Inc.
27686  */
27687 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
27688 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
27689 /*
27690  * CDDL HEADER START
27691  *
27692  * The contents of this file are subject to the terms of the
27693  * Common Development and Distribution License, Version 1.0 only
27694  * (the "License").  You may not use this file except in compliance
27695  * with the License.
27696  *
27697  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27698  * or http://www.opensolaris.org/os/licensing.
27699  * See the License for the specific language governing permissions
27700  * and limitations under the License.
27701  *
27702  * When distributing Covered Code, include this CDDL HEADER in each
27703  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27704  * If applicable, add the following below this CDDL HEADER, with the
27705  * fields enclosed by brackets "[]" replaced with your own identifying
27706  * information: Portions Copyright [yyyy] [name of copyright owner]
27707  *
27708  * CDDL HEADER END
27709  */
27710 /*
27711  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27712  *
27713  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
27714  * Use is subject to license terms.
27715  */
27716 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
27717 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
27718 /*
27719  * macros for conversion between host and (internet) network byte order
27720  */
27721 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
27722 typedef uint16_t in_port_t;
27723 
27724 
27725 
27726 
27727 typedef uint32_t in_addr_t;
27728 
27729 
27730 
27731 extern uint32_t htonl(uint32_t);
27732 extern uint16_t htons(uint16_t);
27733 extern uint32_t ntohl(uint32_t);
27734 extern uint16_t ntohs(uint16_t);
27735 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
27736 extern uint64_t htonll(uint64_t);
27737 extern uint64_t ntohll(uint64_t);
27738 
27739 
27740 
27741 
27742 
27743 
27744 /*
27745  * Macros to reverse byte order
27746  */
27747 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
27748 /*
27749  * Macros to convert from a specific byte order to/from native byte order
27750  */
27751 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
27752 /*
27753  * Macros to read unaligned values from a specific byte order to
27754  * native byte order
27755  */
27756 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
27757 /*
27758  * Macros to write unaligned values from native byte order to a specific byte
27759  * order.
27760  */
27761 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
27762 
27763 
27764 
27765 
27766 
27767 
27768 
27769 /*
27770  * Note: IPv4 address data structures usage conventions.
27771  * The "in_addr_t" type below (required by Unix standards)
27772  * is NOT a typedef of "struct in_addr" and violates the usual
27773  * conventions where "struct <name>" and <name>_t are corresponding
27774  * typedefs.
27775  * To minimize confusion, kernel data structures/usage prefers use
27776  * of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
27777  * The user level APIs continue to follow the historic popular
27778  * practice of using "struct in_addr".
27779  */
27780 
27781 
27782 
27783 
27784 
27785 
27786 
27787 typedef uint32_t ipaddr_t;
27788 
27789 
27790 
27791 
27792 struct in6_addr {
27793  union {
27794   /*
27795 		 * Note: Static initalizers of "union" type assume
27796 		 * the constant on the RHS is the type of the first member
27797 		 * of union.
27798 		 * To make static initializers (and efficient usage) work,
27799 		 * the order of members exposed to user and kernel view of
27800 		 * this data structure is different.
27801 		 * User environment sees specified uint8_t type as first
27802 		 * member whereas kernel sees most efficient type as
27803 		 * first member.
27804 		 */
27805 
27806 
27807 
27808 
27809   uint8_t _S6_u8[16]; /* IPv6 address */
27810   uint32_t _S6_u32[4]; /* IPv6 address */
27811 
27812   uint32_t __S6_align; /* Align on 32 bit boundary */
27813  } _S6_un;
27814 };
27815 
27816 
27817 
27818 
27819 
27820 
27821 
27822 typedef struct in6_addr in6_addr_t;
27823 # 144 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27824 /*
27825  * Protocols
27826  *
27827  * Some of these constant names are copied for the DTrace IP provider in
27828  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
27829  * in sync.
27830  */
27831 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27832       /* Transmission Protocol */
27833 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27834 /*
27835  * Port/socket numbers: network standard functions
27836  *
27837  * Entries should exist here for each port number compiled into an ON
27838  * component, such as snoop.
27839  */
27840 # 208 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27841 /*
27842  * Port/socket numbers: host specific functions
27843  */
27844 # 229 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27845 /*
27846  * Internet Key Exchange (IKE) ports
27847  */
27848 
27849 
27850 
27851 /*
27852  * UNIX TCP sockets
27853  */
27854 
27855 
27856 
27857 
27858 
27859 
27860 /*
27861  * UNIX UDP sockets
27862  */
27863 
27864 
27865 
27866 
27867 
27868 
27869 
27870 /*
27871  * DHCPv6 UDP ports
27872  */
27873 
27874 
27875 
27876 
27877 
27878 /*
27879  * Ports < IPPORT_RESERVED are reserved for
27880  * privileged processes (e.g. root).
27881  * Ports > IPPORT_USERRESERVED are reserved
27882  * for servers, not necessarily privileged.
27883  */
27884 
27885 
27886 
27887 /*
27888  * Link numbers
27889  */
27890 
27891 
27892 
27893 
27894 /*
27895  * IPv4 Internet address
27896  *	This definition contains obsolete fields for compatibility
27897  *	with SunOS 3.x and 4.2bsd.  The presence of subnets renders
27898  *	divisions into fixed fields misleading at best.  New code
27899  *	should use only the s_addr field.
27900  */
27901 # 293 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27902 struct in_addr {
27903  union {
27904   struct { uint8_t s_b1, s_b2, s_b3, s_b4; } S_un_b;
27905   struct { uint16_t s_w1, s_w2; } S_un_w;
27906 
27907   uint32_t S_addr;
27908 
27909 
27910 
27911  } S_un;
27912 
27913 
27914 
27915 
27916 
27917 
27918 };
27919 
27920 /*
27921  * Definitions of bits in internet address integers.
27922  * On subnets, the decomposition of addresses to host and net parts
27923  * is done according to subnet mask, not the masks here.
27924  *
27925  * Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
27926  * IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
27927  * obsolete". IN_MULTICAST macro should be used to test if a address
27928  * is a multicast address.
27929  */
27930 # 348 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27931 /*
27932  * We have removed CLASS E checks from the kernel
27933  * But we preserve these defines for userland in order
27934  * to avoid compile  breakage of some 3rd party piece of software
27935  */
27936 # 369 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27937 /* Scoped IPv4 prefixes (in host byte-order) */
27938 # 379 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27939 /* RFC 3927 IPv4 link local address (i in host byte-order) */
27940 
27941 
27942 /* Well known 6to4 Relay Router Anycast address defined in RFC 3068 */
27943 
27944 
27945 
27946 
27947 
27948 
27949 /*
27950  * Define a macro to stuff the loopback address into an Internet address
27951  */
27952 
27953 
27954 
27955 
27956 
27957 
27958 /*
27959  * IPv4 Socket address.
27960  */
27961 struct sockaddr_in {
27962  sa_family_t sin_family;
27963  in_port_t sin_port;
27964  struct in_addr sin_addr;
27965 
27966  char sin_zero[8];
27967 
27968 
27969 
27970 };
27971 
27972 
27973 /*
27974  * IPv6 socket address.
27975  */
27976 struct sockaddr_in6 {
27977  sa_family_t sin6_family;
27978  in_port_t sin6_port;
27979  uint32_t sin6_flowinfo;
27980  struct in6_addr sin6_addr;
27981  uint32_t sin6_scope_id; /* Depends on scope of sin6_addr */
27982  uint32_t __sin6_src_id; /* Impl. specific - UDP replies */
27983 };
27984 
27985 /*
27986  * Macros for accessing the traffic class and flow label fields from
27987  * sin6_flowinfo.
27988  * These are designed to be applied to a 32-bit value.
27989  */
27990 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
27991 /* masks */
27992 
27993 
27994 
27995 
27996 
27997 /*
27998  * Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
27999  * use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
28000  * only. They need to be different for User/Kernel versions because union
28001  * component data structure is defined differently (it is identical at
28002  * binary representation level).
28003  *
28004  * const struct in6_addr IN6ADDR_ANY_INIT;
28005  * const struct in6_addr IN6ADDR_LOOPBACK_INIT;
28006  */
28007 # 478 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28008 /*
28009  * RFC 2553 specifies the following macros. Their type is defined
28010  * as "int" in the RFC but they only have boolean significance
28011  * (zero or non-zero). For the purposes of our comment notation,
28012  * we assume a hypothetical type "bool" defined as follows to
28013  * write the prototypes assumed for macros in our comments better.
28014  *
28015  * typedef int bool;
28016  */
28017 
28018 /*
28019  * IN6 macros used to test for special IPv6 addresses
28020  * (Mostly from spec)
28021  *
28022  * bool  IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
28023  * bool  IN6_IS_ADDR_LOOPBACK    (const struct in6_addr *);
28024  * bool  IN6_IS_ADDR_MULTICAST   (const struct in6_addr *);
28025  * bool  IN6_IS_ADDR_LINKLOCAL   (const struct in6_addr *);
28026  * bool  IN6_IS_ADDR_SITELOCAL   (const struct in6_addr *);
28027  * bool  IN6_IS_ADDR_V4MAPPED    (const struct in6_addr *);
28028  * bool  IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
28029  * bool  IN6_IS_ADDR_V4COMPAT    (const struct in6_addr *);
28030  * bool  IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
28031  * bool  IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
28032  * bool  IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
28033  * bool  IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
28034  * bool  IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
28035  * bool  IN6_IS_ADDR_MC_GLOBAL   (const struct in6_addr *);
28036  * bool  IN6_IS_ADDR_6TO4	 (const struct in6_addr *); -- Not from RFC2553
28037  * bool  IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
28038  *	     const struct in6_addr *);			    -- Not from RFC2553
28039  * bool  IN6_IS_ADDR_LINKSCOPE	 (const struct in6addr  *); -- Not from RFC2553
28040  */
28041 # 568 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28042 /*
28043  * IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
28044  * Note: This macro is currently NOT defined in RFC2553 specification
28045  * and not a standard macro that portable applications should use.
28046  */
28047 # 587 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28048 /* Exclude loopback and unspecified address */
28049 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28050 /*
28051  * Note:
28052  * IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
28053  * specification and not a standard macro that portable applications
28054  * should use.
28055  */
28056 # 660 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28057 /*
28058  * The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
28059  * RFC, and shouldn't be used by portable applications.  It is used to see
28060  * if an address is a solicited-node multicast address, which is prefixed
28061  * with ff02:0:0:0:0:1:ff00::/104.
28062  */
28063 # 680 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28064 /*
28065  * Macros to a) test for 6to4 IPv6 address, and b) to test if two
28066  * 6to4 addresses have the same /48 prefix, and, hence, are from the
28067  * same 6to4 site.
28068  */
28069 # 699 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28070 /*
28071  * IN6_IS_ADDR_LINKSCOPE
28072  * Identifies an address as being either link-local, link-local multicast or
28073  * node-local multicast.  All types of addresses are considered to be unique
28074  * within the scope of a given link.
28075  */
28076 
28077 
28078 
28079 
28080 /*
28081  * Useful utility macros for operations with IPv6 addresses
28082  * Note: These macros are NOT defined in the RFC2553 or any other
28083  * standard specification and are not standard macros that portable
28084  * applications should use.
28085  */
28086 
28087 /*
28088  * IN6_V4MAPPED_TO_INADDR
28089  * IN6_V4MAPPED_TO_IPADDR
28090  *	Assign a IPv4-Mapped IPv6 address to an IPv4 address.
28091  *	Note: These macros are NOT defined in RFC2553 or any other standard
28092  *	specification and are not macros that portable applications should
28093  *	use.
28094  *
28095  * void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
28096  * void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
28097  *
28098  */
28099 
28100 
28101 
28102 
28103 
28104 /*
28105  * IN6_INADDR_TO_V4MAPPED
28106  * IN6_IPADDR_TO_V4MAPPED
28107  *	Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
28108  *	address.
28109  *	Note: These macros are NOT defined in RFC2553 or any other standard
28110  *	specification and are not macros that portable applications should
28111  *	use.
28112  *
28113  * void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
28114  * void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
28115  *
28116  */
28117 # 770 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28118 /*
28119  * IN6_6TO4_TO_V4ADDR
28120  *	Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
28121  *      address.
28122  *	Note: This macro is NOT defined in RFC2553 or any other standard
28123  *	specification and is not a macro that portable applications should
28124  *	use.
28125  *	Note: we don't use the IPADDR form of the macro because we need
28126  *	to do a bytewise copy; the V4ADDR in the 6to4 address is not
28127  *	32-bit aligned.
28128  *
28129  * void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
28130  *
28131  */
28132 
28133 
28134 
28135 
28136 
28137 
28138 /*
28139  * IN6_V4ADDR_TO_6TO4
28140  *	Given an IPv4 address and an IPv6 address for output, a 6to4 address
28141  *	will be created from the IPv4 Address.
28142  *	Note:  This method for creating 6to4 addresses is not standardized
28143  *	outside of Solaris.  The newly created 6to4 address will be of the form
28144  *	2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
28145  *	HOSTID will equal 1.
28146  *
28147  * void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
28148  *
28149  */
28150 # 828 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28151 /*
28152  * IN6_ARE_ADDR_EQUAL (defined in RFC2292)
28153  *	 Compares if IPv6 addresses are equal.
28154  * Note: Compares in order of high likelyhood of a miss so we minimize
28155  * compares. (Current heuristic order, compare in reverse order of
28156  * uint32_t units)
28157  *
28158  * bool  IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
28159  *			    const struct in6_addr *);
28160  */
28161 
28162 
28163 
28164 
28165 
28166 
28167 /*
28168  * IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
28169  *	Compares if prefixed parts of IPv6 addresses are equal.
28170  *
28171  * uint32_t IN6_MASK_FROM_PREFIX(int, int);
28172  * bool     IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
28173  *				       const struct in6_addr *,
28174  *				       int);
28175  */
28176 # 879 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28177 /*
28178  * Options for use with [gs]etsockopt at the IP level.
28179  *
28180  * Note: Some of the IP_ namespace has conflict with and
28181  * and is exposed through <xti.h>. (It also requires exposing
28182  * options not implemented). The options with potential
28183  * for conflicts use #ifndef guards.
28184  */
28185 # 919 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28186 /*
28187  * IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
28188  * is used to differentiate b/w the two.
28189  */
28190 
28191 
28192 
28193 
28194 
28195 /*
28196  * Different preferences that can be requested from IPSEC protocols.
28197  */
28198 
28199 
28200 
28201 
28202 /*
28203  * This can be used with the setsockopt() call to set per socket security
28204  * options. When the application uses per-socket API, we will reflect
28205  * the request on both outbound and inbound packets.
28206  */
28207 
28208 typedef struct ipsec_req {
28209  uint_t ipsr_ah_req; /* AH request */
28210  uint_t ipsr_esp_req; /* ESP request */
28211  uint_t ipsr_self_encap_req; /* Self-Encap request */
28212  uint8_t ipsr_auth_alg; /* Auth algs for AH */
28213  uint8_t ipsr_esp_alg; /* Encr algs for ESP */
28214  uint8_t ipsr_esp_auth_alg; /* Auth algs for ESP */
28215 } ipsec_req_t;
28216 
28217 /*
28218  * MCAST_* options are protocol-independent.  The actual definitions
28219  * are with the v6 options below; this comment is here to note the
28220  * namespace usage.
28221  *
28222  * #define	MCAST_JOIN_GROUP	0x29
28223  * #define	MCAST_LEAVE_GROUP	0x2a
28224  * #define	MCAST_BLOCK_SOURCE	0x2b
28225  * #define	MCAST_UNBLOCK_SOURCE	0x2c
28226  * #define	MCAST_JOIN_SOURCE_GROUP	0x2d
28227  * #define	MCAST_LEAVE_SOURCE_GROUP 0x2e
28228  */
28229 
28230 
28231 /*
28232  * SunOS private (potentially not portable) IP_ option names
28233  */
28234 
28235 
28236 
28237 /* can be reused		0x44 */
28238 
28239 
28240 /*
28241  * Option values and names (when !_XPG5) shared with <xti_inet.h>
28242  */
28243 # 988 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28244 /*
28245  * The following option values are reserved by <xti_inet.h>
28246  *
28247  * T_IP_OPTIONS	0x107	 -  IP per-packet options
28248  * T_IP_TOS	0x108	 -  IP per packet type of service
28249  */
28250 
28251 /*
28252  * Default value constants for multicast attributes controlled by
28253  * IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
28254  */
28255 
28256 
28257 
28258 
28259 /*
28260  * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
28261  */
28262 struct ip_mreq {
28263  struct in_addr imr_multiaddr; /* IP multicast address of group */
28264  struct in_addr imr_interface; /* local IP address of interface */
28265 };
28266 
28267 /*
28268  * Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
28269  * IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
28270  */
28271 struct ip_mreq_source {
28272  struct in_addr imr_multiaddr; /* IP address of group */
28273  struct in_addr imr_sourceaddr; /* IP address of source */
28274  struct in_addr imr_interface; /* IP address of interface */
28275 };
28276 
28277 /*
28278  * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
28279  * IPv6 addresses.
28280  */
28281 struct ipv6_mreq {
28282  struct in6_addr ipv6mr_multiaddr; /* IPv6 multicast addr */
28283  unsigned int ipv6mr_interface; /* interface index */
28284 };
28285 
28286 /*
28287  * Use #pragma pack() construct to force 32-bit alignment on amd64.
28288  * This is needed to keep the structure size and offsets consistent
28289  * between a 32-bit app and the 64-bit amd64 kernel in structures
28290  * where 64-bit alignment would create gaps (in this case, structures
28291  * which have a uint32_t followed by a struct sockaddr_storage).
28292  */
28293 
28294 
28295 
28296 
28297 /*
28298  * Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
28299  */
28300 struct group_req {
28301  uint32_t gr_interface; /* interface index */
28302  struct sockaddr_storage gr_group; /* group address */
28303 };
28304 
28305 /*
28306  * Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
28307  * MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
28308  */
28309 struct group_source_req {
28310  uint32_t gsr_interface; /* interface index */
28311  struct sockaddr_storage gsr_group; /* group address */
28312  struct sockaddr_storage gsr_source; /* source address */
28313 };
28314 
28315 /*
28316  * Argument for SIOC[GS]MSFILTER ioctls
28317  */
28318 struct group_filter {
28319  uint32_t gf_interface; /* interface index */
28320  struct sockaddr_storage gf_group; /* multicast address */
28321  uint32_t gf_fmode; /* filter mode */
28322  uint32_t gf_numsrc; /* number of sources */
28323  struct sockaddr_storage gf_slist[1]; /* source address */
28324 };
28325 # 1078 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28326 /*
28327  * Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
28328  */
28329 struct ip_msfilter {
28330  struct in_addr imsf_multiaddr; /* IP multicast address of group */
28331  struct in_addr imsf_interface; /* local IP address of interface */
28332  uint32_t imsf_fmode; /* filter mode */
28333  uint32_t imsf_numsrc; /* number of sources in src_list */
28334  struct in_addr imsf_slist[1]; /* start of source list */
28335 };
28336 
28337 
28338 
28339 
28340 
28341 /*
28342  * Multicast source filter manipulation functions in libsocket;
28343  * defined in RFC 3678.
28344  */
28345 int setsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t,
28346    uint_t, struct sockaddr_storage *);
28347 
28348 int getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t *,
28349    uint_t *, struct sockaddr_storage *);
28350 
28351 int setipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t,
28352    uint32_t, struct in_addr *);
28353 
28354 int getipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t *,
28355    uint32_t *, struct in_addr *);
28356 
28357 /*
28358  * Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
28359  */
28360 
28361 
28362 
28363 /*
28364  * Argument struct for IP_PKTINFO option
28365  */
28366 typedef struct in_pktinfo {
28367  unsigned int ipi_ifindex; /* send/recv interface index */
28368  struct in_addr ipi_spec_dst; /* matched source address */
28369  struct in_addr ipi_addr; /* src/dst address in IP hdr */
28370 } in_pktinfo_t;
28371 
28372 /*
28373  * Argument struct for IPV6_PKTINFO option
28374  */
28375 struct in6_pktinfo {
28376  struct in6_addr ipi6_addr; /* src/dst IPv6 address */
28377  unsigned int ipi6_ifindex; /* send/recv interface index */
28378 };
28379 
28380 /*
28381  * Argument struct for IPV6_MTUINFO option
28382  */
28383 struct ip6_mtuinfo {
28384  struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
28385  uint32_t ip6m_mtu; /* path MTU in host byte order */
28386 };
28387 
28388 /*
28389  * IPv6 routing header types
28390  */
28391 
28392 
28393 extern socklen_t inet6_rth_space(int type, int segments);
28394 extern void *inet6_rth_init(void *bp, socklen_t bp_len, int type, int segments);
28395 extern int inet6_rth_add(void *bp, const struct in6_addr *addr);
28396 extern int inet6_rth_reverse(const void *in, void *out);
28397 extern int inet6_rth_segments(const void *bp);
28398 extern struct in6_addr *inet6_rth_getaddr(const void *bp, int index);
28399 
28400 extern int inet6_opt_init(void *extbuf, socklen_t extlen);
28401 extern int inet6_opt_append(void *extbuf, socklen_t extlen, int offset,
28402  uint8_t type, socklen_t len, uint_t align, void **databufp);
28403 extern int inet6_opt_finish(void *extbuf, socklen_t extlen, int offset);
28404 extern int inet6_opt_set_val(void *databuf, int offset, void *val,
28405  socklen_t vallen);
28406 extern int inet6_opt_next(void *extbuf, socklen_t extlen, int offset,
28407  uint8_t *typep, socklen_t *lenp, void **databufp);
28408 extern int inet6_opt_find(void *extbufp, socklen_t extlen, int offset,
28409  uint8_t type, socklen_t *lenp, void **databufp);
28410 extern int inet6_opt_get_val(void *databuf, int offset, void *val,
28411  socklen_t vallen);
28412 
28413 
28414 /*
28415  * Argument structure for IP_ADD_PROXY_ADDR.
28416  * Note that this is an unstable, experimental interface. It may change
28417  * later. Don't use it unless you know what it is.
28418  */
28419 typedef struct {
28420  struct in_addr in_prefix_addr;
28421  unsigned int in_prefix_len;
28422 } in_prefix_t;
28423 
28424 
28425 
28426 /*
28427  * IPv6 options
28428  */
28429 
28430      /* packets. */
28431      /* argument type: uint_t */
28432 
28433      /* multicast packets. */
28434      /* argument type: struct in6_addr */
28435 
28436      /* multicast packets. */
28437      /* argument type: uint_t */
28438 
28439      /* multicast packets on same socket. */
28440      /* argument type: uint_t */
28441 
28442      /* argument type: struct ipv6_mreq */
28443 
28444      /* argument type: struct ipv6_mreq */
28445 
28446 /*
28447  * Other XPG6 constants.
28448  */
28449 
28450      /* decimal notation. */
28451 
28452      /* standard colon-hex notation. */
28453 
28454 
28455 
28456 
28457 
28458 /*
28459  * IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP are being kept
28460  * for backward compatibility. They have the same meaning as IPV6_JOIN_GROUP
28461  * and IPV6_LEAVE_GROUP respectively.
28462  */
28463 
28464      /* argument type: struct ipv6_mreq */
28465 
28466      /* argument type: struct ipv6_mreq */
28467 
28468 
28469      /* arg type: "struct in6_pktingo" - */
28470 
28471 
28472 
28473 
28474      /* the routing header */
28475 
28476 
28477      /* the routing header */
28478 
28479 
28480 
28481 
28482 /*
28483  * This options exists for backwards compatability and should no longer be
28484  * used.  Use IPV6_RECVDSTOPTS instead.
28485  */
28486 
28487 
28488 
28489 
28490 /*
28491  * enable/disable IPV6_RTHDRDSTOPTS.  Now obsolete.  IPV6_RECVDSTOPTS enables
28492  * the receipt of both headers.
28493  */
28494 # 1259 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28495 /*
28496  * enable/disable receipt of both both IPV6_DSTOPTS headers.
28497  */
28498 
28499 
28500 /*
28501  * protocol-independent multicast membership options.
28502  */
28503 
28504 
28505 
28506 
28507 
28508 
28509 
28510 /* 32Bit field for IPV6_SRC_PREFERENCES */
28511 # 1295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
28512 /*
28513  * SunOS private (potentially not portable) IPV6_ option names
28514  */
28515 
28516 
28517      /* unspecified (all zeros) */
28518 
28519 /*
28520  * Miscellaneous IPv6 constants.
28521  */
28522 
28523 
28524 
28525 
28526 /*
28527  * Extern declarations for pre-defined global const variables
28528  */
28529 
28530 
28531 
28532 extern const struct in6_addr in6addr_any;
28533 extern const struct in6_addr in6addr_loopback;
28534 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
28535 
28536 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 1
28537 /*
28538  * CDDL HEADER START
28539  *
28540  * The contents of this file are subject to the terms of the
28541  * Common Development and Distribution License (the "License").
28542  * You may not use this file except in compliance with the License.
28543  *
28544  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28545  * or http://www.opensolaris.org/os/licensing.
28546  * See the License for the specific language governing permissions
28547  * and limitations under the License.
28548  *
28549  * When distributing Covered Code, include this CDDL HEADER in each
28550  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28551  * If applicable, add the following below this CDDL HEADER, with the
28552  * fields enclosed by brackets "[]" replaced with your own identifying
28553  * information: Portions Copyright [yyyy] [name of copyright owner]
28554  *
28555  * CDDL HEADER END
28556  */
28557 /*
28558  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28559  *
28560  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
28561  */
28562 
28563 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
28564 /*	  All Rights Reserved	*/
28565 
28566 /*
28567  * University Copyright- Copyright (c) 1982, 1986, 1988
28568  * The Regents of the University of California
28569  * All Rights Reserved
28570  *
28571  * University Acknowledgment- Portions of this document are derived from
28572  * software developed by the University of California, Berkeley, and its
28573  * contributors.
28574  */
28575 
28576 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
28577 
28578 
28579 
28580 
28581 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
28582 /*
28583  * CDDL HEADER START
28584  *
28585  * The contents of this file are subject to the terms of the
28586  * Common Development and Distribution License (the "License").
28587  * You may not use this file except in compliance with the License.
28588  *
28589  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28590  * or http://www.opensolaris.org/os/licensing.
28591  * See the License for the specific language governing permissions
28592  * and limitations under the License.
28593  *
28594  * When distributing Covered Code, include this CDDL HEADER in each
28595  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28596  * If applicable, add the following below this CDDL HEADER, with the
28597  * fields enclosed by brackets "[]" replaced with your own identifying
28598  * information: Portions Copyright [yyyy] [name of copyright owner]
28599  *
28600  * CDDL HEADER END
28601  */
28602 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28603 /*	  All Rights Reserved  	*/
28604 
28605 
28606 /*
28607  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
28608  * Use is subject to license terms.
28609  *
28610  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
28611  * Copyright 2016 Joyent, Inc.
28612  */
28613 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
28614 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 1
28615 /*
28616  * CDDL HEADER START
28617  *
28618  * The contents of this file are subject to the terms of the
28619  * Common Development and Distribution License (the "License").
28620  * You may not use this file except in compliance with the License.
28621  *
28622  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28623  * or http://www.opensolaris.org/os/licensing.
28624  * See the License for the specific language governing permissions
28625  * and limitations under the License.
28626  *
28627  * When distributing Covered Code, include this CDDL HEADER in each
28628  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28629  * If applicable, add the following below this CDDL HEADER, with the
28630  * fields enclosed by brackets "[]" replaced with your own identifying
28631  * information: Portions Copyright [yyyy] [name of copyright owner]
28632  *
28633  * CDDL HEADER END
28634  */
28635 /*
28636  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28637  *
28638  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
28639  * Use is subject to license terms.
28640  *
28641  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
28642  * Copyright (c) 2015, Joyent, Inc.  All rights reserved.
28643  */
28644 
28645 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28646 /*	  All Rights Reserved  	*/
28647 
28648 /*
28649  * University Copyright- Copyright (c) 1982, 1986, 1988
28650  * The Regents of the University of California
28651  * All Rights Reserved
28652  *
28653  * University Acknowledgment- Portions of this document are derived from
28654  * software developed by the University of California, Berkeley, and its
28655  * contributors.
28656  */
28657 
28658 
28659 
28660 
28661 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
28662 /*
28663  * CDDL HEADER START
28664  *
28665  * The contents of this file are subject to the terms of the
28666  * Common Development and Distribution License (the "License").
28667  * You may not use this file except in compliance with the License.
28668  *
28669  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28670  * or http://www.opensolaris.org/os/licensing.
28671  * See the License for the specific language governing permissions
28672  * and limitations under the License.
28673  *
28674  * When distributing Covered Code, include this CDDL HEADER in each
28675  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28676  * If applicable, add the following below this CDDL HEADER, with the
28677  * fields enclosed by brackets "[]" replaced with your own identifying
28678  * information: Portions Copyright [yyyy] [name of copyright owner]
28679  *
28680  * CDDL HEADER END
28681  */
28682 
28683 /*
28684  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
28685  * Copyright 2016 Joyent, Inc.
28686  *
28687  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
28688  * Use is subject to license terms.
28689  */
28690 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
28691 
28692 
28693 
28694 
28695 
28696 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
28697 /*
28698  * CDDL HEADER START
28699  *
28700  * The contents of this file are subject to the terms of the
28701  * Common Development and Distribution License (the "License").
28702  * You may not use this file except in compliance with the License.
28703  *
28704  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28705  * or http://www.opensolaris.org/os/licensing.
28706  * See the License for the specific language governing permissions
28707  * and limitations under the License.
28708  *
28709  * When distributing Covered Code, include this CDDL HEADER in each
28710  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28711  * If applicable, add the following below this CDDL HEADER, with the
28712  * fields enclosed by brackets "[]" replaced with your own identifying
28713  * information: Portions Copyright [yyyy] [name of copyright owner]
28714  *
28715  * CDDL HEADER END
28716  */
28717 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28718 /*	  All Rights Reserved  	*/
28719 
28720 
28721 /*
28722  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
28723  * Use is subject to license terms.
28724  *
28725  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
28726  * Copyright 2016 Joyent, Inc.
28727  */
28728 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
28729 
28730 /*
28731  * I/O parameter information.  A uio structure describes the I/O which
28732  * is to be performed by an operation.  Typically the data movement will
28733  * be performed by a routine such as uiomove(), which updates the uio
28734  * structure to reflect what was done.
28735  */
28736 
28737 
28738 
28739 
28740 
28741 
28742 
28743 typedef struct iovec {
28744  caddr_t iov_base;
28745 
28746 
28747 
28748  long iov_len;
28749 
28750 } iovec_t;
28751 # 90 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28752 /*
28753  * Segment flag values.
28754  */
28755 typedef enum uio_seg { UIO_USERSPACE, UIO_SYSSPACE, UIO_USERISPACE } uio_seg_t;
28756 
28757 typedef struct uio {
28758  iovec_t *uio_iov; /* pointer to array of iovecs */
28759  int uio_iovcnt; /* number of iovecs */
28760  lloff_t _uio_offset; /* file offset */
28761  uio_seg_t uio_segflg; /* address space (kernel or user) */
28762  uint16_t uio_fmode; /* file mode flags */
28763  uint16_t uio_extflg; /* extended flags */
28764  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
28765  ssize_t uio_resid; /* residual count */
28766 } uio_t;
28767 
28768 /*
28769  * Extended uio_t uioa_t used for asynchronous uio.
28770  *
28771  * Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
28772  *	 as there isn't a formal definition of IOV_MAX for the kernel.
28773  */
28774 
28775 
28776 typedef struct uioa_page_s { /* locked uio_iov state */
28777  int uioa_pfncnt; /* count of pfn_t(s) in *uioa_ppp */
28778  void **uioa_ppp; /* page_t or pfn_t arrary */
28779  caddr_t uioa_base; /* address base */
28780  size_t uioa_len; /* span length */
28781 } uioa_page_t;
28782 
28783 typedef struct uioa_s {
28784  iovec_t *uio_iov; /* pointer to array of iovecs */
28785  int uio_iovcnt; /* number of iovecs */
28786  lloff_t _uio_offset; /* file offset */
28787  uio_seg_t uio_segflg; /* address space (kernel or user) */
28788  uint16_t uio_fmode; /* file mode flags */
28789  uint16_t uio_extflg; /* extended flags */
28790  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
28791  ssize_t uio_resid; /* residual count */
28792  /*
28793 	 * uioa extended members.
28794 	 */
28795  uint32_t uioa_state; /* state of asynch i/o */
28796  ssize_t uioa_mbytes; /* bytes that have been uioamove()ed */
28797  uioa_page_t *uioa_lcur; /* pointer into uioa_locked[] */
28798  void **uioa_lppp; /* pointer into lcur->uioa_ppp[] */
28799  void *uioa_hwst[4]; /* opaque hardware state */
28800  uioa_page_t uioa_locked[16]; /* Per iov locked pages */
28801 } uioa_t;
28802 
28803 /*
28804  * uio extensions
28805  *
28806  * PSARC 2009/478: Copy Reduction Interfaces
28807  */
28808 typedef enum xuio_type {
28809  UIOTYPE_ASYNCIO,
28810  UIOTYPE_ZEROCOPY
28811 } xuio_type_t;
28812 
28813 typedef struct xuio {
28814  uio_t xu_uio; /* Embedded UIO structure */
28815 
28816  /* Extended uio fields */
28817  enum xuio_type xu_type; /* What kind of uio structure? */
28818  union {
28819   /* Async I/O Support, intend to replace uioa_t. */
28820   struct {
28821    uint32_t xu_a_state; /* state of async i/o */
28822    /* bytes that have been uioamove()ed */
28823    ssize_t xu_a_mbytes;
28824    uioa_page_t *xu_a_lcur; /* pointer into uioa_locked[] */
28825    /* pointer into lcur->uioa_ppp[] */
28826    void **xu_a_lppp;
28827    void *xu_a_hwst[4]; /* opaque hardware state */
28828    /* Per iov locked pages */
28829    uioa_page_t xu_a_locked[16];
28830   } xu_aio;
28831 
28832   /*
28833 		 * Copy Reduction Support -- facilate loaning / returning of
28834 		 * filesystem cache buffers.
28835 		 */
28836   struct {
28837    int xu_zc_rw; /* read or write buffer */
28838    void *xu_zc_priv; /* fs specific */
28839   } xu_zc;
28840  } xu_ext;
28841 } xuio_t;
28842 # 207 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28843 /*
28844  * I/O direction.
28845  */
28846 typedef enum uio_rw { UIO_READ, UIO_WRITE } uio_rw_t;
28847 
28848 /*
28849  * uio_extflg: extended flags
28850  *
28851  * NOTE: This flag will be used in uiomove to determine if non-temporal
28852  * access, ie, access bypassing caches, should be used.  Filesystems that
28853  * don't initialize this field could experience suboptimal performance due to
28854  * the random data the field contains.
28855  *
28856  * NOTE: This flag is also used by uioasync callers to pass an extended
28857  * uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
28858  * consumers of a uioa_t require the uio_extflg to be initialized.
28859  */
28860 
28861 
28862 
28863 
28864 
28865 
28866 /*
28867  * Global uioasync capability shadow state.
28868  */
28869 typedef struct uioasync_s {
28870  boolean_t enabled; /* Is uioasync enabled? */
28871  size_t mincnt; /* Minimum byte count for use of */
28872 } uioasync_t;
28873 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28874 extern ssize_t readv(int, const struct iovec *, int);
28875 extern ssize_t writev(int, const struct iovec *, int);
28876 
28877 /*
28878  * When in the large file compilation environment,
28879  * map preadv/pwritev to their 64 bit offset versions
28880  */
28881 
28882 
28883 
28884 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28885 #pragma redefine_extname preadv preadv64
28886 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28887 
28888 
28889 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28890 #pragma redefine_extname pwritev pwritev64
28891 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28892 
28893 
28894 
28895 
28896 
28897 
28898 
28899 /* In the LP64 compilation environment, the APIs are already large file */
28900 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
28901 extern ssize_t preadv(int, const struct iovec *, int, off_t);
28902 extern ssize_t pwritev(int, const struct iovec *, int, off_t);
28903 
28904 /*
28905  * preadv64 and pwritev64 should be defined when:
28906  * - Using the transitional compilation environment, and not
28907  *     the large file compilation environment.
28908  */
28909 
28910 
28911 extern ssize_t preadv64(int, const struct iovec *, int, off64_t);
28912 extern ssize_t pwritev64(int, const struct iovec *, int, off64_t);
28913 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
28914 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
28915 /*
28916  * CDDL HEADER START
28917  *
28918  * The contents of this file are subject to the terms of the
28919  * Common Development and Distribution License (the "License").
28920  * You may not use this file except in compliance with the License.
28921  *
28922  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28923  * or http://www.opensolaris.org/os/licensing.
28924  * See the License for the specific language governing permissions
28925  * and limitations under the License.
28926  *
28927  * When distributing Covered Code, include this CDDL HEADER in each
28928  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28929  * If applicable, add the following below this CDDL HEADER, with the
28930  * fields enclosed by brackets "[]" replaced with your own identifying
28931  * information: Portions Copyright [yyyy] [name of copyright owner]
28932  *
28933  * CDDL HEADER END
28934  */
28935 
28936 /*
28937  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
28938  * Copyright 2016 Joyent, Inc.
28939  *
28940  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
28941  * Use is subject to license terms.
28942  */
28943 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
28944 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
28945 /*
28946  * CDDL HEADER START
28947  *
28948  * The contents of this file are subject to the terms of the
28949  * Common Development and Distribution License (the "License").
28950  * You may not use this file except in compliance with the License.
28951  *
28952  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28953  * or http://www.opensolaris.org/os/licensing.
28954  * See the License for the specific language governing permissions
28955  * and limitations under the License.
28956  *
28957  * When distributing Covered Code, include this CDDL HEADER in each
28958  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28959  * If applicable, add the following below this CDDL HEADER, with the
28960  * fields enclosed by brackets "[]" replaced with your own identifying
28961  * information: Portions Copyright [yyyy] [name of copyright owner]
28962  *
28963  * CDDL HEADER END
28964  */
28965 /*
28966  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
28967  * Use is subject to license terms.
28968  */
28969 
28970 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
28971 /*	  All Rights Reserved	*/
28972 
28973 /*
28974  * Portions of this source code were derived from Berkeley 4.3 BSD
28975  * under license from the Regents of the University of California.
28976  */
28977 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
28978 
28979 
28980 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h" 1
28981 /*
28982  * CDDL HEADER START
28983  *
28984  * The contents of this file are subject to the terms of the
28985  * Common Development and Distribution License, Version 1.0 only
28986  * (the "License").  You may not use this file except in compliance
28987  * with the License.
28988  *
28989  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28990  * or http://www.opensolaris.org/os/licensing.
28991  * See the License for the specific language governing permissions
28992  * and limitations under the License.
28993  *
28994  * When distributing Covered Code, include this CDDL HEADER in each
28995  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28996  * If applicable, add the following below this CDDL HEADER, with the
28997  * fields enclosed by brackets "[]" replaced with your own identifying
28998  * information: Portions Copyright [yyyy] [name of copyright owner]
28999  *
29000  * CDDL HEADER END
29001  */
29002 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
29003 /*	  All Rights Reserved  	*/
29004 
29005 
29006 /*
29007  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
29008  *
29009  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
29010  * Use is subject to license terms.
29011  */
29012 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
29013 struct netconfig {
29014  char *nc_netid; /* network identifier		*/
29015  unsigned int nc_semantics; /* defined below		*/
29016  unsigned int nc_flag; /* defined below		*/
29017  char *nc_protofmly; /* protocol family name		*/
29018  char *nc_proto; /* protocol name		*/
29019  char *nc_device; /* device name for network id	*/
29020  unsigned int nc_nlookups; /* # of entries in nc_lookups	*/
29021  char **nc_lookups; /* list of lookup directories	*/
29022  unsigned int nc_unused[8]; /* borrowed for lockd etc.	*/
29023 };
29024 
29025 typedef struct {
29026  struct netconfig **nc_head;
29027  struct netconfig **nc_curr;
29028 } NCONF_HANDLE;
29029 
29030 /*
29031  *	Values of nc_semantics
29032  */
29033 
29034 
29035 
29036 
29037 
29038 /*
29039  * NOT FOR PUBLIC USE, Solaris internal only.
29040  * This value of nc_semantics is strictly for use of Remote Direct
29041  * Memory Access provider interfaces in Solaris only and not for
29042  * general use. Do not use this value for general purpose user or
29043  * kernel programming. If used the behavior is undefined.
29044  * This is a PRIVATE interface to be used by Solaris kRPC only.
29045  */
29046 
29047 
29048 /*
29049  *	Values of nc_flag
29050  */
29051 
29052 
29053 
29054 
29055 
29056 /*
29057  *	Values of nc_protofmly
29058  */
29059 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
29060 /*
29061  * NOT FOR PUBLIC USE, Solaris internal only.
29062  * This value of nc_semantics is strictly for use of Remote Direct
29063  * Memory Access provider interfaces in Solaris only and not for
29064  * general use. Do not use this value for general purpose user or
29065  * kernel programming. If used the behavior is undefined.
29066  * This is a PRIVATE interface to be used by Solaris kRPC only.
29067  */
29068 
29069 
29070 /*
29071  *	Values for nc_proto
29072  */
29073 
29074 
29075 
29076 
29077 
29078 
29079 /*
29080  * 	Values for nc_proto for "rdma" protofmly
29081  */
29082 
29083 
29084 
29085 
29086 extern void *setnetconfig(void);
29087 extern int endnetconfig(void *);
29088 extern struct netconfig *getnetconfig(void *);
29089 extern struct netconfig *getnetconfigent(const char *);
29090 extern void freenetconfigent(struct netconfig *);
29091 extern void *setnetpath(void);
29092 extern int endnetpath(void *);
29093 extern struct netconfig *getnetpath(void *);
29094 extern void nc_perror(const char *);
29095 extern char *nc_sperror(void);
29096 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
29097 
29098 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
29099 /*
29100  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
29101  * Use is subject to license terms.
29102  *
29103  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
29104  */
29105 /*
29106  * Copyright (c) 1982, 1986 Regents of the University of California.
29107  * All rights reserved.
29108  *
29109  * Redistribution and use in source and binary forms are permitted
29110  * provided that this notice is preserved and that due credit is given
29111  * to the University of California at Berkeley. The name of the University
29112  * may not be used to endorse or promote products derived from this
29113  * software without specific prior written permission. This software
29114  * is provided ``as is'' without express or implied warranty.
29115  */
29116 
29117 /*
29118  * Constants and structures defined by the internet system,
29119  * according to following documents
29120  *
29121  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
29122  *	http://www.iana.org/assignments/protocol-numbers
29123  *	http://www.iana.org/assignments/port-numbers
29124  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
29125  *
29126  */
29127 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
29128 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29129 /*
29130  * Definitions related to sockets: types, address families, options.
29131  */
29132 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29133 /*
29134  * Types
29135  */
29136 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29137 /*
29138  * Flags for socket() and accept4()
29139  */
29140 
29141 
29142 
29143 
29144 /*
29145  * Option flags per-socket.
29146  */
29147 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29148 /*
29149  * Socket options are passed using a signed integer, but it is also rare
29150  * for more than one to ever be passed at the same time with setsockopt
29151  * and only one at a time can be retrieved with getsockopt.
29152  *
29153  * Since the lower numbers cannot be renumbered for compatibility reasons,
29154  * it would seem that we need to start a new number space (0x40000000 -
29155  * 0x7fffffff) for those that don't need to be stored as a bit flag
29156  * somewhere. This limits the flag options to 30 but that seems to be
29157  * plenty, anyway. 0x40000000 is reserved for future use.
29158  */
29159 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29160 /*
29161  * N.B.: The following definition is present only for compatibility
29162  * with release 3.0.  It will disappear in later releases.
29163  */
29164 
29165 
29166 /*
29167  * Additional options, not kept in so_options.
29168  */
29169 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29170 /* "Socket"-level control message types: */
29171 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29172 /*
29173  * Socket filter options
29174  */
29175 
29176 
29177 
29178 
29179 
29180 /*
29181  * Structure returned by FIL_LIST
29182  */
29183 struct fil_info {
29184  int fi_flags; /* see below (FILF_*) */
29185  int fi_pos; /* position (0 is bottom) */
29186  char fi_name[32]; /* filter name */
29187 };
29188 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29189 /*
29190  * Structure used for manipulating linger option.
29191  */
29192 struct linger {
29193  int l_onoff; /* option on/off */
29194  int l_linger; /* linger time */
29195 };
29196 
29197 /*
29198  * Levels for (get/set)sockopt() that don't apply to a specific protocol.
29199  */
29200 
29201 
29202 
29203 
29204 
29205 
29206 
29207 /*
29208  * Address families.
29209  *
29210  * Some of these constant names are copied for the DTrace IP provider in
29211  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
29212  * in sync.
29213  */
29214 # 300 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29215 /*
29216  * Protocol families, same as address families for now.
29217  */
29218 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29219 /*
29220  * Maximum queue length specifiable by listen.
29221  */
29222 
29223 
29224 /*
29225  * Message header for recvmsg and sendmsg calls.
29226  */
29227 struct msghdr {
29228  void *msg_name; /* optional address */
29229  socklen_t msg_namelen; /* size of address */
29230  struct iovec *msg_iov; /* scatter/gather array */
29231  int msg_iovlen; /* # elements in msg_iov */
29232 
29233 
29234 
29235 
29236 
29237 
29238  caddr_t msg_accrights; /* access rights sent/received */
29239  int msg_accrightslen;
29240 
29241 };
29242 # 412 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29243 /* Added for XPGv2 compliance */
29244 
29245 
29246 
29247 
29248 
29249      /* with left over data */
29250 /* End of XPGv2 compliance */
29251 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29252 /* Added for XPGv2 compliance */
29253 
29254 
29255 
29256 
29257 struct cmsghdr {
29258  socklen_t cmsg_len; /* data byte count, including hdr */
29259  int cmsg_level; /* originating protocol */
29260  int cmsg_type; /* protocol-specific type */
29261 };
29262 # 528 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
29263 extern int accept(int, struct sockaddr *, Psocklen_t);
29264 extern int accept4(int, struct sockaddr *, Psocklen_t, int);
29265 extern int bind(int, const struct sockaddr *, socklen_t);
29266 extern int connect(int, const struct sockaddr *, socklen_t);
29267 extern int getpeername(int, struct sockaddr *, Psocklen_t);
29268 extern int getsockname(int, struct sockaddr *, Psocklen_t);
29269 extern int getsockopt(int, int, int, void *, Psocklen_t);
29270 extern int listen(int, int); /* XXX - fixme???  where do I go */
29271 extern int socketpair(int, int, int, int *);
29272 extern ssize_t recv(int, void *, size_t, int);
29273 extern ssize_t recvfrom(int, void *, size_t, int,
29274  struct sockaddr *, Psocklen_t);
29275 extern ssize_t recvmsg(int, struct msghdr *, int);
29276 extern ssize_t send(int, const void *, size_t, int);
29277 extern ssize_t sendmsg(int, const struct msghdr *, int);
29278 extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
29279  socklen_t);
29280 extern int setsockopt(int, int, int, const void *, socklen_t);
29281 extern int shutdown(int, int);
29282 extern int socket(int, int, int);
29283 
29284 
29285 extern int sockatmark(int);
29286 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
29287 
29288 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
29289 /*
29290  * CDDL HEADER START
29291  *
29292  * The contents of this file are subject to the terms of the
29293  * Common Development and Distribution License (the "License").
29294  * You may not use this file except in compliance with the License.
29295  *
29296  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29297  * or http://www.opensolaris.org/os/licensing.
29298  * See the License for the specific language governing permissions
29299  * and limitations under the License.
29300  *
29301  * When distributing Covered Code, include this CDDL HEADER in each
29302  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29303  * If applicable, add the following below this CDDL HEADER, with the
29304  * fields enclosed by brackets "[]" replaced with your own identifying
29305  * information: Portions Copyright [yyyy] [name of copyright owner]
29306  *
29307  * CDDL HEADER END
29308  */
29309 
29310 /*
29311  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
29312  * Copyright 2016 Joyent, Inc.
29313  *
29314  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
29315  * Use is subject to license terms.
29316  */
29317 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
29318 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
29319 struct hostent {
29320  char *h_name; /* official name of host */
29321  char **h_aliases; /* alias list */
29322  int h_addrtype; /* host address type */
29323  int h_length; /* length of address */
29324  char **h_addr_list; /* list of addresses from name server */
29325 
29326 };
29327 
29328 
29329 /*
29330  * addrinfo introduced with IPv6 for Protocol-Independent Hostname
29331  * and Service Name Translation.
29332  */
29333 
29334 
29335 struct addrinfo {
29336  int ai_flags; /* AI_PASSIVE, AI_CANONNAME, ... */
29337  int ai_family; /* PF_xxx */
29338  int ai_socktype; /* SOCK_xxx */
29339  int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
29340 
29341 
29342 
29343  socklen_t ai_addrlen;
29344  char *ai_canonname; /* canonical name for hostname */
29345  struct sockaddr *ai_addr; /* binary address */
29346  struct addrinfo *ai_next; /* next structure in linked list */
29347 };
29348 
29349 /*
29350  * The flag 0x8000 is currently reserved for private use between libnsl and
29351  * libsocket. See lib/libsocket/inet/getaddrinfo.c for more information.
29352  */
29353 /* addrinfo flags */
29354 
29355 
29356 
29357 
29358 
29359 /* getipnodebyname() flags */
29360 
29361 
29362 
29363 
29364 
29365 /*
29366  * These were defined in RFC 2553 but not SUSv3
29367  * or RFC 3493 which obsoleted 2553.
29368  */
29369 
29370 
29371 
29372 /* addrinfo errors */
29373 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
29374 /* getnameinfo flags */
29375 
29376 
29377 
29378 
29379 
29380 
29381 
29382 /* Not listed in any standards document */
29383 
29384 
29385 
29386 /* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */
29387 
29388 
29389 
29390 
29391 
29392 /*
29393  * Scope delimit character
29394  */
29395 
29396 
29397 
29398 /*
29399  * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
29400  * and algorithms.
29401  */
29402 
29403 typedef struct ipsecalgent {
29404  char **a_names; /* algorithm names */
29405  int a_proto_num; /* protocol number */
29406  int a_alg_num; /* algorithm number */
29407  char *a_mech_name; /* encryption framework mechanism name */
29408  int *a_block_sizes; /* supported block sizes */
29409  int *a_key_sizes; /* supported key sizes */
29410  int a_key_increment; /* key size increment */
29411  int *a_mech_params; /* mechanism specific parameters */
29412  int a_alg_flags; /* algorithm flags */
29413 } ipsecalgent_t;
29414 
29415 /* well-known IPsec protocol numbers */
29416 
29417 
29418 
29419 
29420 
29421 /*
29422  * Assumption here is that a network number
29423  * fits in 32 bits -- probably a poor one.
29424  */
29425 struct netent {
29426  char *n_name; /* official name of net */
29427  char **n_aliases; /* alias list */
29428  int n_addrtype; /* net address type */
29429  in_addr_t n_net; /* network # */
29430 };
29431 
29432 struct protoent {
29433  char *p_name; /* official protocol name */
29434  char **p_aliases; /* alias list */
29435  int p_proto; /* protocol # */
29436 };
29437 
29438 struct servent {
29439  char *s_name; /* official service name */
29440  char **s_aliases; /* alias list */
29441  int s_port; /* port # */
29442  char *s_proto; /* protocol to use */
29443 };
29444 
29445 
29446 struct hostent *gethostbyname_r
29447  (const char *, struct hostent *, char *, int, int *h_errnop);
29448 struct hostent *gethostbyaddr_r
29449  (const char *, int, int, struct hostent *, char *, int, int *h_errnop);
29450 struct hostent *getipnodebyname(const char *, int, int, int *);
29451 struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
29452 void freehostent(struct hostent *);
29453 struct hostent *gethostent_r(struct hostent *, char *, int, int *h_errnop);
29454 
29455 struct servent *getservbyname_r
29456  (const char *name, const char *, struct servent *, char *, int);
29457 struct servent *getservbyport_r
29458  (int port, const char *, struct servent *, char *, int);
29459 struct servent *getservent_r(struct servent *, char *, int);
29460 
29461 struct netent *getnetbyname_r
29462  (const char *, struct netent *, char *, int);
29463 struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int);
29464 struct netent *getnetent_r(struct netent *, char *, int);
29465 
29466 struct protoent *getprotobyname_r
29467  (const char *, struct protoent *, char *, int);
29468 struct protoent *getprotobynumber_r
29469  (int, struct protoent *, char *, int);
29470 struct protoent *getprotoent_r(struct protoent *, char *, int);
29471 
29472 int getnetgrent_r(char **, char **, char **, char *, int);
29473 int innetgr(const char *, const char *, const char *, const char *);
29474 
29475 
29476 /* Old interfaces that return a pointer to a static area;  MT-unsafe */
29477 struct hostent *gethostbyname(const char *);
29478 struct hostent *gethostent(void);
29479 struct netent *getnetbyaddr(in_addr_t, int);
29480 struct netent *getnetbyname(const char *);
29481 struct netent *getnetent(void);
29482 struct protoent *getprotobyname(const char *);
29483 struct protoent *getprotobynumber(int);
29484 struct protoent *getprotoent(void);
29485 struct servent *getservbyname(const char *, const char *);
29486 struct servent *getservbyport(int, const char *);
29487 struct servent *getservent(void);
29488 
29489 /* gethostbyaddr() second argument is a size_t only in unix95/unix98 */
29490 
29491 struct hostent *gethostbyaddr(const void *, socklen_t, int);
29492 
29493 
29494 
29495 
29496 
29497 int endhostent(void);
29498 int endnetent(void);
29499 int endprotoent(void);
29500 int endservent(void);
29501 int sethostent(int);
29502 int setnetent(int);
29503 int setprotoent(int);
29504 int setservent(int);
29505 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
29506 int getaddrinfo(const char *,
29507    const char *,
29508    const struct addrinfo *,
29509    struct addrinfo **);
29510 void freeaddrinfo(struct addrinfo *);
29511 const char *gai_strerror(int);
29512 int getnameinfo(const struct sockaddr *,
29513    socklen_t, char *, socklen_t,
29514    char *, socklen_t, int);
29515 
29516 
29517 
29518 int getnetgrent(char **, char **, char **);
29519 int setnetgrent(const char *);
29520 int endnetgrent(void);
29521 int rcmd(char **, unsigned short,
29522  const char *, const char *, const char *, int *);
29523 int rcmd_af(char **, unsigned short,
29524  const char *, const char *, const char *, int *, int);
29525 int rresvport_af(int *, int);
29526 int rresvport_addr(int *, struct sockaddr_storage *);
29527 int rexec(char **, unsigned short,
29528  const char *, const char *, const char *, int *);
29529 int rexec_af(char **, unsigned short,
29530  const char *, const char *, const char *, int *, int);
29531 int rresvport(int *);
29532 int ruserok(const char *, int, const char *, const char *);
29533 /* BIND */
29534 struct hostent *gethostbyname2(const char *, int);
29535 void herror(const char *);
29536 const char *hstrerror(int);
29537 /* End BIND */
29538 
29539 /* IPsec algorithm prototype definitions */
29540 struct ipsecalgent *getipsecalgbyname(const char *, int, int *);
29541 struct ipsecalgent *getipsecalgbynum(int, int, int *);
29542 int getipsecprotobyname(const char *doi_name);
29543 char *getipsecprotobynum(int doi_domain);
29544 void freeipsecalgent(struct ipsecalgent *ptr);
29545 /* END IPsec algorithm prototype definitions */
29546 
29547 
29548 
29549 /*
29550  * Error return codes from gethostbyname() and gethostbyaddr()
29551  * (when using the resolver)
29552  */
29553 
29554 extern int h_errno;
29555 # 377 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
29556 /*
29557  * Error return codes from gethostbyname() and gethostbyaddr()
29558  * (left in extern int h_errno).
29559  */
29560 # 389 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
29561 /* BIND */
29562 
29563 
29564 /* End BIND */
29565 # 46 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
29566 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 1
29567 /*
29568  * CDDL HEADER START
29569  *
29570  * The contents of this file are subject to the terms of the
29571  * Common Development and Distribution License, Version 1.0 only
29572  * (the "License").  You may not use this file except in compliance
29573  * with the License.
29574  *
29575  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29576  * or http://www.opensolaris.org/os/licensing.
29577  * See the License for the specific language governing permissions
29578  * and limitations under the License.
29579  *
29580  * When distributing Covered Code, include this CDDL HEADER in each
29581  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29582  * If applicable, add the following below this CDDL HEADER, with the
29583  * fields enclosed by brackets "[]" replaced with your own identifying
29584  * information: Portions Copyright [yyyy] [name of copyright owner]
29585  *
29586  * CDDL HEADER END
29587  */
29588 /*
29589  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
29590  * Use is subject to license terms.
29591  */
29592 
29593 
29594 
29595 
29596 #pragma ident "%Z%%M%	%I%	%E% SMI"
29597 
29598 
29599 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
29600 /*
29601  * CDDL HEADER START
29602  *
29603  * The contents of this file are subject to the terms of the
29604  * Common Development and Distribution License (the "License").
29605  * You may not use this file except in compliance with the License.
29606  *
29607  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29608  * or http://www.opensolaris.org/os/licensing.
29609  * See the License for the specific language governing permissions
29610  * and limitations under the License.
29611  *
29612  * When distributing Covered Code, include this CDDL HEADER in each
29613  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29614  * If applicable, add the following below this CDDL HEADER, with the
29615  * fields enclosed by brackets "[]" replaced with your own identifying
29616  * information: Portions Copyright [yyyy] [name of copyright owner]
29617  *
29618  * CDDL HEADER END
29619  */
29620 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
29621 /*	  All Rights Reserved  	*/
29622 
29623 
29624 /*
29625  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
29626  * Use is subject to license terms.
29627  *
29628  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
29629  * Copyright 2016 Joyent, Inc.
29630  */
29631 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
29632 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
29633 /*
29634  * CDDL HEADER START
29635  *
29636  * The contents of this file are subject to the terms of the
29637  * Common Development and Distribution License, Version 1.0 only
29638  * (the "License").  You may not use this file except in compliance
29639  * with the License.
29640  *
29641  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29642  * or http://www.opensolaris.org/os/licensing.
29643  * See the License for the specific language governing permissions
29644  * and limitations under the License.
29645  *
29646  * When distributing Covered Code, include this CDDL HEADER in each
29647  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29648  * If applicable, add the following below this CDDL HEADER, with the
29649  * fields enclosed by brackets "[]" replaced with your own identifying
29650  * information: Portions Copyright [yyyy] [name of copyright owner]
29651  *
29652  * CDDL HEADER END
29653  */
29654 /*
29655  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
29656  * Use is subject to license terms.
29657  */
29658 
29659 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
29660 /*	  All Rights Reserved  	*/
29661 
29662 /*
29663  * University Copyright- Copyright (c) 1982, 1986, 1988
29664  * The Regents of the University of California
29665  * All Rights Reserved
29666  *
29667  * University Acknowledgment- Portions of this document are derived from
29668  * software developed by the University of California, Berkeley, and its
29669  * contributors.
29670  */
29671 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
29672 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 1
29673 /*
29674  * CDDL HEADER START
29675  *
29676  * The contents of this file are subject to the terms of the
29677  * Common Development and Distribution License, Version 1.0 only
29678  * (the "License").  You may not use this file except in compliance
29679  * with the License.
29680  *
29681  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29682  * or http://www.opensolaris.org/os/licensing.
29683  * See the License for the specific language governing permissions
29684  * and limitations under the License.
29685  *
29686  * When distributing Covered Code, include this CDDL HEADER in each
29687  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29688  * If applicable, add the following below this CDDL HEADER, with the
29689  * fields enclosed by brackets "[]" replaced with your own identifying
29690  * information: Portions Copyright [yyyy] [name of copyright owner]
29691  *
29692  * CDDL HEADER END
29693  */
29694 /*
29695  * Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
29696  * Use is subject to license terms.
29697  */
29698 
29699 
29700 
29701 
29702 #pragma ident "%Z%%M%	%I%	%E% SMI"
29703 
29704 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
29705 /*
29706  * CDDL HEADER START
29707  *
29708  * The contents of this file are subject to the terms of the
29709  * Common Development and Distribution License (the "License").
29710  * You may not use this file except in compliance with the License.
29711  *
29712  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29713  * or http://www.opensolaris.org/os/licensing.
29714  * See the License for the specific language governing permissions
29715  * and limitations under the License.
29716  *
29717  * When distributing Covered Code, include this CDDL HEADER in each
29718  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29719  * If applicable, add the following below this CDDL HEADER, with the
29720  * fields enclosed by brackets "[]" replaced with your own identifying
29721  * information: Portions Copyright [yyyy] [name of copyright owner]
29722  *
29723  * CDDL HEADER END
29724  */
29725 
29726 /*
29727  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
29728  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
29729  */
29730 
29731 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
29732 /*	  All Rights Reserved  	*/
29733 
29734 /*
29735  * University Copyright- Copyright (c) 1982, 1986, 1988
29736  * The Regents of the University of California
29737  * All Rights Reserved
29738  *
29739  * University Acknowledgment- Portions of this document are derived from
29740  * software developed by the University of California, Berkeley, and its
29741  * contributors.
29742  */
29743 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 2
29744 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h"
29745 typedef struct {
29746  char hostname[256];
29747  ushort_t port;
29748 } url_hport_t;
29749 
29750 typedef struct {
29751  boolean_t https;
29752  url_hport_t hport;
29753  char abspath[1024];
29754 } url_t;
29755 
29756 extern int url_parse_hostport(const char *, url_hport_t *, ushort_t);
29757 extern int url_parse(const char *, url_t *);
29758 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
29759 
29760 
29761 
29762 
29763 
29764 /* State information returned by http_conn_info() */
29765 typedef struct {
29766  url_t uri; /* URI last loaded */
29767  url_hport_t proxy; /* proxy, if any being used */
29768  boolean_t keepalive; /* Keepalive setting being used */
29769  uint_t read_timeout; /* Timeout to use for socket reads */
29770 } http_conninfo_t;
29771 
29772 
29773 /* Structure for version of the http file */
29774 typedef struct {
29775  uint_t maj_ver; /* Major version */
29776  uint_t min_ver; /* Minor version */
29777  uint_t micro_ver; /* Micro version */
29778 } boot_http_ver_t;
29779 
29780 /* Internal Libhttp errors */
29781 
29782 
29783 
29784     /* necessarily the underlying transport */
29785     /* connection). */
29786 
29787     /* error. */
29788 
29789 
29790 
29791     /* No matching entry */
29792 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h"
29793 /* Sources of errors */
29794 
29795 
29796 
29797 
29798 
29799 
29800 
29801 typedef struct {
29802  uint_t code; /* status code */
29803  char *statusmsg; /* status message */
29804  uint_t nresphdrs; /* number of response headers */
29805 } http_respinfo_t;
29806 
29807 
29808 typedef void *http_handle_t;
29809 
29810 boot_http_ver_t const *http_get_version(void);
29811 void http_set_p12_format(int);
29812 void http_set_verbose(boolean_t);
29813 int http_set_cipher_list(const char *);
29814 http_handle_t http_srv_init(const url_t *);
29815 int http_set_proxy(http_handle_t, const url_hport_t *);
29816 int http_set_keepalive(http_handle_t, boolean_t);
29817 int http_set_socket_read_timeout(http_handle_t, uint_t);
29818 int http_set_basic_auth(http_handle_t, const char *, const char *);
29819 int http_set_random_file(http_handle_t, const char *);
29820 int http_set_certificate_authority_file(const char *);
29821 int http_set_client_certificate_file(http_handle_t, const char *);
29822 int http_set_password(http_handle_t, const char *);
29823 int http_set_key_file_password(http_handle_t, const char *);
29824 int http_set_private_key_file(http_handle_t, const char *);
29825 
29826 int http_srv_connect(http_handle_t);
29827 int http_head_request(http_handle_t, const char *);
29828 int http_get_request(http_handle_t, const char *);
29829 int http_get_range_request(http_handle_t, const char *, offset_t, offset_t);
29830 void http_free_respinfo(http_respinfo_t *);
29831 int http_process_headers(http_handle_t, http_respinfo_t **);
29832 int http_process_part_headers(http_handle_t, http_respinfo_t **);
29833 char *http_get_header_value(http_handle_t, const char *);
29834 char *http_get_response_header(http_handle_t, uint_t);
29835 int http_read_body(http_handle_t, char *, size_t);
29836 int http_srv_disconnect(http_handle_t);
29837 int http_srv_close(http_handle_t);
29838 http_conninfo_t *http_get_conn_info(http_handle_t);
29839 int http_conn_is_https(http_handle_t, boolean_t *);
29840 ulong_t http_get_lasterr(http_handle_t, uint_t *);
29841 void http_decode_err(ulong_t, int *, int *, int *);
29842 char const *http_errorstr(uint_t, ulong_t);
29843 # 47 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
29844 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
29845 /*
29846  * CDDL HEADER START
29847  *
29848  * The contents of this file are subject to the terms of the
29849  * Common Development and Distribution License (the "License").
29850  * You may not use this file except in compliance with the License.
29851  *
29852  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29853  * or http://www.opensolaris.org/os/licensing.
29854  * See the License for the specific language governing permissions
29855  * and limitations under the License.
29856  *
29857  * When distributing Covered Code, include this CDDL HEADER in each
29858  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29859  * If applicable, add the following below this CDDL HEADER, with the
29860  * fields enclosed by brackets "[]" replaced with your own identifying
29861  * information: Portions Copyright [yyyy] [name of copyright owner]
29862  *
29863  * CDDL HEADER END
29864  */
29865 
29866 /*
29867  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
29868  * Use is subject to license terms.
29869  */
29870 
29871 
29872 
29873 
29874 
29875 /*
29876  * Module:	pkgerr.h
29877  * Description:
29878  *
29879  *   Implements error routines to handle the creation,
29880  *   management, and destruction of error objects, which
29881  *   hold error messages and codes returned from libpkg
29882  *   routines that support the objects defined herein.
29883  */
29884 
29885 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
29886 /*
29887  * CDDL HEADER START
29888  *
29889  * The contents of this file are subject to the terms of the
29890  * Common Development and Distribution License (the "License").
29891  * You may not use this file except in compliance with the License.
29892  *
29893  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29894  * or http://www.opensolaris.org/os/licensing.
29895  * See the License for the specific language governing permissions
29896  * and limitations under the License.
29897  *
29898  * When distributing Covered Code, include this CDDL HEADER in each
29899  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29900  * If applicable, add the following below this CDDL HEADER, with the
29901  * fields enclosed by brackets "[]" replaced with your own identifying
29902  * information: Portions Copyright [yyyy] [name of copyright owner]
29903  *
29904  * CDDL HEADER END
29905  */
29906 
29907 /*
29908  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
29909  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
29910  */
29911 
29912 /*	Copyright (c) 1988 AT&T	*/
29913 /*	  All Rights Reserved  	*/
29914 
29915 /*
29916  * User-visible pieces of the ANSI C standard I/O package.
29917  */
29918 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 2
29919 
29920 
29921 
29922 
29923 
29924 /*
29925  * Public Definitions
29926  */
29927 
29928 typedef enum {
29929  PKGERR_OK = 0,
29930  PKGERR_EXIST,
29931  PKGERR_READ,
29932  PKGERR_CORRUPT,
29933  PKGERR_PARSE,
29934  PKGERR_BADPASS,
29935  PKGERR_BADALIAS,
29936  PKGERR_INTERNAL,
29937  PKGERR_UNSUP,
29938  PKGERR_NOALIAS,
29939  PKGERR_NOALIASMATCH,
29940  PKGERR_MULTIPLE,
29941  PKGERR_INCOMPLETE,
29942  PKGERR_NOPRIVKEY,
29943  PKGERR_NOPUBKEY,
29944  PKGERR_NOCACERT,
29945  PKGERR_NOMEM,
29946  PKGERR_CHAIN,
29947  PKGERR_LOCKED,
29948  PKGERR_WRITE,
29949  PKGERR_UNLOCK,
29950  PKGERR_TIME,
29951  PKGERR_DUPLICATE,
29952  PKGERR_WEB,
29953  PKGERR_VERIFY
29954 } PKG_ERR_CODE;
29955 
29956 /*
29957  * Public Structures
29958  */
29959 
29960 /* external reference to PKG_ERR object (contents private) */
29961 typedef PKG_ERR_CODE pkg_err_t;
29962 
29963 typedef struct _pkg_err_struct PKG_ERR;
29964 
29965 /*
29966  * Public Methods
29967  */
29968 
29969 PKG_ERR *pkgerr_new();
29970 void pkgerr_add(PKG_ERR *, PKG_ERR_CODE, char *, ...);
29971 void pkgerr_clear(PKG_ERR *);
29972 int pkgerr_dump(PKG_ERR *, FILE *);
29973 int pkgerr_num(PKG_ERR *);
29974 char *pkgerr_get(PKG_ERR *, int);
29975 void pkgerr_free(PKG_ERR *);
29976 # 48 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
29977 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 1
29978 /*
29979  * CDDL HEADER START
29980  *
29981  * The contents of this file are subject to the terms of the
29982  * Common Development and Distribution License (the "License").
29983  * You may not use this file except in compliance with the License.
29984  *
29985  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29986  * or http://www.opensolaris.org/os/licensing.
29987  * See the License for the specific language governing permissions
29988  * and limitations under the License.
29989  *
29990  * When distributing Covered Code, include this CDDL HEADER in each
29991  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29992  * If applicable, add the following below this CDDL HEADER, with the
29993  * fields enclosed by brackets "[]" replaced with your own identifying
29994  * information: Portions Copyright [yyyy] [name of copyright owner]
29995  *
29996  * CDDL HEADER END
29997  */
29998 
29999 /*
30000  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
30001  * Use is subject to license terms.
30002  */
30003 
30004 
30005 
30006 
30007 
30008 /*
30009  * Module:	keystore.h
30010  * Description:	This module contains the structure definitions for processing
30011  *		package keystore files.
30012  */
30013 
30014 
30015 
30016 
30017 
30018 # 1 "/usr/include/openssl/evp.h" 1 3 4
30019 /* crypto/evp/evp.h */
30020 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
30021  * All rights reserved.
30022  *
30023  * This package is an SSL implementation written
30024  * by Eric Young (eay@cryptsoft.com).
30025  * The implementation was written so as to conform with Netscapes SSL.
30026  *
30027  * This library is free for commercial and non-commercial use as long as
30028  * the following conditions are aheared to.  The following conditions
30029  * apply to all code found in this distribution, be it the RC4, RSA,
30030  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
30031  * included with this distribution is covered by the same copyright terms
30032  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
30033  *
30034  * Copyright remains Eric Young's, and as such any Copyright notices in
30035  * the code are not to be removed.
30036  * If this package is used in a product, Eric Young should be given attribution
30037  * as the author of the parts of the library used.
30038  * This can be in the form of a textual message at program startup or
30039  * in documentation (online or textual) provided with the package.
30040  *
30041  * Redistribution and use in source and binary forms, with or without
30042  * modification, are permitted provided that the following conditions
30043  * are met:
30044  * 1. Redistributions of source code must retain the copyright
30045  *    notice, this list of conditions and the following disclaimer.
30046  * 2. Redistributions in binary form must reproduce the above copyright
30047  *    notice, this list of conditions and the following disclaimer in the
30048  *    documentation and/or other materials provided with the distribution.
30049  * 3. All advertising materials mentioning features or use of this software
30050  *    must display the following acknowledgement:
30051  *    "This product includes cryptographic software written by
30052  *     Eric Young (eay@cryptsoft.com)"
30053  *    The word 'cryptographic' can be left out if the rouines from the library
30054  *    being used are not cryptographic related :-).
30055  * 4. If you include any Windows specific code (or a derivative thereof) from
30056  *    the apps directory (application code) you must include an acknowledgement:
30057  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
30058  *
30059  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
30060  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30061  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30062  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
30063  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30064  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30065  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30066  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30067  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30068  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30069  * SUCH DAMAGE.
30070  *
30071  * The licence and distribution terms for any publically available version or
30072  * derivative of this code cannot be changed.  i.e. this code cannot simply be
30073  * copied and put under another distribution licence
30074  * [including the GNU Public Licence.]
30075  */
30076 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
30077 # 1 "/usr/include/openssl/x509.h" 1 3 4
30078 /* crypto/x509/x509.h */
30079 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
30080  * All rights reserved.
30081  *
30082  * This package is an SSL implementation written
30083  * by Eric Young (eay@cryptsoft.com).
30084  * The implementation was written so as to conform with Netscapes SSL.
30085  *
30086  * This library is free for commercial and non-commercial use as long as
30087  * the following conditions are aheared to.  The following conditions
30088  * apply to all code found in this distribution, be it the RC4, RSA,
30089  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
30090  * included with this distribution is covered by the same copyright terms
30091  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
30092  *
30093  * Copyright remains Eric Young's, and as such any Copyright notices in
30094  * the code are not to be removed.
30095  * If this package is used in a product, Eric Young should be given attribution
30096  * as the author of the parts of the library used.
30097  * This can be in the form of a textual message at program startup or
30098  * in documentation (online or textual) provided with the package.
30099  *
30100  * Redistribution and use in source and binary forms, with or without
30101  * modification, are permitted provided that the following conditions
30102  * are met:
30103  * 1. Redistributions of source code must retain the copyright
30104  *    notice, this list of conditions and the following disclaimer.
30105  * 2. Redistributions in binary form must reproduce the above copyright
30106  *    notice, this list of conditions and the following disclaimer in the
30107  *    documentation and/or other materials provided with the distribution.
30108  * 3. All advertising materials mentioning features or use of this software
30109  *    must display the following acknowledgement:
30110  *    "This product includes cryptographic software written by
30111  *     Eric Young (eay@cryptsoft.com)"
30112  *    The word 'cryptographic' can be left out if the rouines from the library
30113  *    being used are not cryptographic related :-).
30114  * 4. If you include any Windows specific code (or a derivative thereof) from
30115  *    the apps directory (application code) you must include an acknowledgement:
30116  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
30117  *
30118  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
30119  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30120  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30121  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
30122  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30123  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30124  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30125  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30126  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30127  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30128  * SUCH DAMAGE.
30129  *
30130  * The licence and distribution terms for any publically available version or
30131  * derivative of this code cannot be changed.  i.e. this code cannot simply be
30132  * copied and put under another distribution licence
30133  * [including the GNU Public Licence.]
30134  */
30135 /* ====================================================================
30136  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
30137  * ECDH support in OpenSSL originally developed by
30138  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
30139  */
30140 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
30141 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
30142 /*
30143  * CDDL HEADER START
30144  *
30145  * The contents of this file are subject to the terms of the
30146  * Common Development and Distribution License (the "License").
30147  * You may not use this file except in compliance with the License.
30148  *
30149  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30150  * or http://www.opensolaris.org/os/licensing.
30151  * See the License for the specific language governing permissions
30152  * and limitations under the License.
30153  *
30154  * When distributing Covered Code, include this CDDL HEADER in each
30155  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30156  * If applicable, add the following below this CDDL HEADER, with the
30157  * fields enclosed by brackets "[]" replaced with your own identifying
30158  * information: Portions Copyright [yyyy] [name of copyright owner]
30159  *
30160  * CDDL HEADER END
30161  */
30162 
30163 /*
30164  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
30165  * Use is subject to license terms.
30166  */
30167 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
30168 
30169 /* keystore structures */
30170 
30171 /* this opaque type represents a keystore */
30172 typedef void *keystore_handle_t;
30173 
30174 /* flags passed to open_keystore */
30175 
30176 /* opens keystore read-only.  Attempts to modify results in an error */
30177 
30178 
30179 /* opens keystore read-write */
30180 
30181 
30182 /*
30183  * tells open_keystore to fall back to app-generic paths in the case that
30184  * the app-specific paths do not exist.
30185  */
30186 
30187 
30188 /*
30189  * tells open_keystore to use the app-specific paths no matter what,
30190  * failing if they cannot be used for any reason.
30191  */
30192 
30193 
30194 /* masks off various types of flags */
30195 
30196 
30197 
30198 /* default is read-only, soft */
30199 
30200 
30201 
30202 /*
30203  * possible encoding formats used by the library, used
30204  * by print_cert
30205  */
30206 typedef enum {
30207  KEYSTORE_FORMAT_PEM,
30208  KEYSTORE_FORMAT_DER,
30209  KEYSTORE_FORMAT_TEXT
30210 } keystore_encoding_format_t;
30211 
30212 /*
30213  * structure passed back to password callback for determining how
30214  * to prompt for passphrase, and where to record errors
30215  */
30216 typedef struct {
30217  PKG_ERR *err;
30218 } keystore_passphrase_data;
30219 
30220 
30221 /* max length of a passphrase.  One could use a short story! */
30222 
30223 
30224 /* callback for collecting passphrase when open_keystore() is called */
30225 typedef int keystore_passphrase_cb(char *, int, int, void *);
30226 
30227 /* names of the individual files within the keystore path */
30228 
30229 
30230 
30231 
30232 /* keystore.c */
30233 extern int open_keystore(PKG_ERR *, char *, char *,
30234     keystore_passphrase_cb, long flags, keystore_handle_t *);
30235 
30236 extern int print_certs(PKG_ERR *, keystore_handle_t, char *,
30237     keystore_encoding_format_t, FILE *);
30238 
30239 extern int check_cert(PKG_ERR *, X509 *);
30240 
30241 extern int check_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *);
30242 
30243 extern int print_cert(PKG_ERR *, X509 *,
30244     keystore_encoding_format_t, char *, boolean_t, FILE *);
30245 
30246 extern int close_keystore(PKG_ERR *, keystore_handle_t,
30247     keystore_passphrase_cb);
30248 
30249 extern int merge_ca_cert(PKG_ERR *, X509 *, keystore_handle_t);
30250 extern int merge_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *,
30251     char *, keystore_handle_t);
30252 
30253 extern int delete_cert_and_keys(PKG_ERR *, keystore_handle_t,
30254     char *);
30255 
30256 extern int find_key_cert_pair(PKG_ERR *, keystore_handle_t,
30257     char *, EVP_PKEY **, X509 **);
30258 
30259 extern int find_ca_certs(PKG_ERR *, keystore_handle_t,
30260     struct stack_st_X509 **);
30261 
30262 extern int find_cl_certs(PKG_ERR *, keystore_handle_t,
30263     struct stack_st_X509 **);
30264 # 49 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
30265 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
30266 /*
30267  * CDDL HEADER START
30268  *
30269  * The contents of this file are subject to the terms of the
30270  * Common Development and Distribution License (the "License").
30271  * You may not use this file except in compliance with the License.
30272  *
30273  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30274  * or http://www.opensolaris.org/os/licensing.
30275  * See the License for the specific language governing permissions
30276  * and limitations under the License.
30277  *
30278  * When distributing Covered Code, include this CDDL HEADER in each
30279  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30280  * If applicable, add the following below this CDDL HEADER, with the
30281  * fields enclosed by brackets "[]" replaced with your own identifying
30282  * information: Portions Copyright [yyyy] [name of copyright owner]
30283  *
30284  * CDDL HEADER END
30285  */
30286 
30287 /*
30288  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
30289  * Use is subject to license terms.
30290  */
30291 # 35 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h"
30292 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
30293 /*
30294  * CDDL HEADER START
30295  *
30296  * The contents of this file are subject to the terms of the
30297  * Common Development and Distribution License (the "License").
30298  * You may not use this file except in compliance with the License.
30299  *
30300  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30301  * or http://www.opensolaris.org/os/licensing.
30302  * See the License for the specific language governing permissions
30303  * and limitations under the License.
30304  *
30305  * When distributing Covered Code, include this CDDL HEADER in each
30306  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30307  * If applicable, add the following below this CDDL HEADER, with the
30308  * fields enclosed by brackets "[]" replaced with your own identifying
30309  * information: Portions Copyright [yyyy] [name of copyright owner]
30310  *
30311  * CDDL HEADER END
30312  */
30313 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30314 /*	  All Rights Reserved  	*/
30315 
30316 /*
30317  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
30318  * Use is subject to license terms.
30319  */
30320 # 36 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 2
30321 
30322 struct mergstat {
30323  unsigned setuid:1; /* pkgmap entry has setuid */
30324  unsigned setgid:1; /* ... and/or setgid bit set */
30325  unsigned contchg:1; /* contents of the files different */
30326  unsigned attrchg:1; /* attributes are different */
30327  unsigned shared:1; /* > 1 pkg associated with this */
30328  unsigned osetuid:1; /* installed set[ug]id process ... */
30329  unsigned osetgid:1; /* ... being overwritten by pkg. */
30330  unsigned rogue:1; /* conflicting file not owned by a package */
30331  unsigned dir2nondir:1; /* was a directory & now a non-directory */
30332  unsigned replace:1; /* merge makes no sense for this object pair */
30333  unsigned denied:1; /* for some reason this was not allowed in */
30334  unsigned preloaded:1; /* already checked in a prior pkg op */
30335  unsigned processed:1; /* already installed or removed */
30336  unsigned parentsyml2dir:1;
30337  /* parent directory changed from symlink to a directory */
30338 };
30339 
30340 /*
30341  * This is information required by pkgadd for fast operation. A
30342  * cfextra struct is tagged to each cfent structure requiring
30343  * processing. This is how we avoid some unneeded repetition. The
30344  * entries incorporating the word 'local' refer to the path that
30345  * gets us to the delivered package file. In other words, to install
30346  * a file we usually copy from 'local' to 'path' below. In the case
30347  * of a link, where no actual copying takes place, local is the source
30348  * of the link. Note that environment variables are not evaluated in
30349  * the locals unless they are links since the literal path is how
30350  * pkgadd finds the entry under the reloc directory.
30351  */
30352 struct cfextra {
30353  struct cfent cf_ent; /* basic contents file entry */
30354  struct mergstat mstat; /* merge status for installs */
30355  uint32_t fsys_value; /* fstab[] entry index */
30356  uint32_t fsys_base; /* actual base filesystem in fs_tab[] */
30357  char *client_path; /* the client-relative path */
30358  char *server_path; /* the server-relative path */
30359  char *map_path; /* as read from the pkgmap */
30360  char *client_local; /* client_relative local */
30361  char *server_local; /* server relative local */
30362 };
30363 # 50 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
30364 
30365 /*
30366  * The contents database file interface.
30367  */
30368 
30369 typedef struct pkg_server *PKGserver;
30370 
30371 /* Some commands modify the internal database: add them here */
30372 # 82 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30373 typedef enum {
30374  INVALID, /* Not initialized */
30375  NEVER, /* Don't start, does check if it is running. */
30376  FLUSH_LOG, /* Run it once to incorporate the log. */
30377  RUN_ONCE, /* Run until the current client stops. */
30378  TIMEOUT, /* Run until a timeout occurs. */
30379  PERMANENT, /* Run until it is externally terminated. */
30380  DEFAULTMODE = TIMEOUT /* The default mode, must come last */
30381 } start_mode_t;
30382 
30383 typedef struct pkgcmd {
30384  int cmd;
30385  char buf[1];
30386 } pkgcmd_t;
30387 
30388 typedef struct pkgfilter {
30389  int cmd;
30390  int len;
30391  char buf[1];
30392 } pkgfilter_t;
30393 
30394 /*
30395  * Virtual File Protocol definitions
30396  */
30397 
30398 /*
30399  * flags associated with virtual file protocol operations; note that these flags
30400  * may only occupy the low order 16 bits of the 32-bit unsigned flag.
30401  */
30402 
30403 typedef unsigned long VFPFLAGS_T;
30404 # 121 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30405 /* virtual file protocol object */
30406 
30407 typedef struct _vfp VFP_T;
30408 
30409 /* structure behind the virtual file protocol object */
30410 
30411 struct _vfp {
30412  FILE *_vfpFile; /* -> opened FILE */
30413  char *_vfpCurr; /* -> current byte to read/write */
30414  char *_vfpHighWater; /* -> last byte modified */
30415  char *_vfpEnd; /* -> last data byte */
30416  char *_vfpPath; /* -> path associated with FILE */
30417  char *_vfpStart; /* -> first data byte */
30418  void *_vfpExtra; /* undefined */
30419  size_t _vfpSize; /* size of mapped/allocated area */
30420  size_t _vfpMapSize; /* # mapped bytes */
30421  VFPFLAGS_T _vfpFlags; /* flags associated with vfp/data */
30422  int _vfpOverflow; /* non-zero if buffer write overflow */
30423  blkcnt_t _vfpCkStBlocks; /* checkpoint # blocks */
30424  dev_t _vfpCkDev; /* checkpoint device i.d. */
30425  ino_t _vfpCkIno; /* checkpoint inode # */
30426  off_t _vfpCkSize; /* checkpoint size */
30427  time_t _vfpCkMtime; /* checkpoint modification time */
30428 };
30429 
30430 /*
30431  * get highest modified byte (length) contained in vfp
30432  *
30433  * determine number of bytes to write - it will be the highest of:
30434  *  -- the current pointer into the file - this is updated whenever
30435  *	the location of the file is changed by a single byte
30436  *  -- the last "high water mark" - the last known location that
30437  *	was written to the file - updated only when the location
30438  *	of the file is directly changed - e.g. vfpSetCurrCharPtr,
30439  *	vfpTruncate, vfpRewind.
30440  * this reduces the "bookkeeping" that needs to be done to know
30441  * how many bytes to write out to the file - typically a file is
30442  * written sequentially so the current file pointer is sufficient
30443  * to determine how many bytes to write out.
30444  */
30445 # 169 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30446 /*
30447  * increment current pointer by specified delta
30448  * if the delta exceeds the buffer size, set pointer to buffer end
30449  */
30450 # 185 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30451 /* get the path associated with the vfp */
30452 
30453 
30454 /* get a string from the vfp into a fixed size buffer */
30455 # 207 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30456 /* get number of bytes remaining to read */
30457 
30458 
30459 
30460 
30461 /* get number of bytes remaining to write */
30462 
30463 
30464 
30465 
30466 /* put current character and increment to next */
30467 
30468 
30469 
30470 
30471 
30472 
30473 /* put integer to current character and increment */
30474 
30475 
30476 /* put long to current character and increment */
30477 
30478 
30479 /* get current character and increment to next */
30480 
30481 
30482 /* get current character - do not increment */
30483 
30484 
30485 /* get pointer to current character */
30486 
30487 
30488 /* increment current character pointer */
30489 
30490 
30491 /* decrement current character pointer */
30492 
30493 
30494 /* get pointer to first data byte in buffer */
30495 
30496 
30497 /* get pointer to last data byte in buffer */
30498 
30499 
30500 /* set pointer to current character */
30501 
30502 
30503 
30504 
30505 
30506 
30507 /* set pointer to last data byte in buffer */
30508 # 267 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30509 /* seek to end of file - one past last data byte in file */
30510 
30511 
30512 /* get number of bytes between current char and specified char */
30513 
30514 
30515 
30516 /* put string to current character and increment */
30517 # 284 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30518 /* put fixed number of bytes to current character and increment */
30519 # 298 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30520 /* put format one arg to current character and increment */
30521 
30522 
30523 
30524 
30525 
30526 
30527 
30528 struct dm_buf {
30529  char *text_buffer; /* start of allocated buffer */
30530  int offset; /* number of bytes into the text_buffer */
30531  int allocation; /* size of buffer in bytes */
30532 };
30533 
30534 /* This structure is used to hold a dynamically growing string */
30535 
30536 struct dstr {
30537  char *pc;
30538  int len;
30539  int max;
30540 };
30541 
30542 /* setmapmode() defines */
30543 # 330 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30544 /* max length for printed attributes */
30545 
30546 
30547 /*
30548  * These three defines indicate that the prototype file contains a '?'
30549  * meaning do not specify this data in the pkgmap entry.
30550  */
30551 # 366 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30552 /* Settings for network admin defaults */
30553 # 377 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
30554 /* package header magic tokens */
30555 
30556 
30557 
30558 /* name of security files */
30559 
30560 
30561 
30562 
30563 
30564 
30565 /*
30566  * The next three mean that no mode, owner or group was specified or that the
30567  * one specified is invalid for some reason. Sometimes this is an error in
30568  * which case it is generally converted to CUR* with a warning. Other times
30569  * it means "look it up" by stating the existing file system object pointred
30570  * to in the prototype file.
30571  */
30572 
30573 
30574 
30575 
30576 /* string comparitor abbreviators */
30577 
30578 
30579 
30580 
30581 
30582 
30583 extern FILE *epopen(char *cmd, char *mode);
30584 extern char **gpkglist(char *dir, char **pkg, char **catg);
30585 extern int is_not_valid_length(char **category);
30586 extern int is_not_valid_category(char **category, char *progname);
30587 extern int is_same_CATEGORY(char **category, char *installed_category);
30588 extern char **get_categories(char *catg_arg);
30589 
30590 extern void pkglist_cont(char *keyword);
30591 extern char **pkgalias(char *pkg);
30592 extern char *get_prog_name(void);
30593 extern char *set_prog_name(char *name);
30594 extern int averify(int fix, char *ftype, char *path, struct ainfo *ainfo);
30595 extern int ckparam(char *param, char *value);
30596 extern int ckvolseq(char *dir, int part, int nparts);
30597 extern int cverify(int fix, char *ftype, char *path, struct cinfo *cinfo,
30598    int allow_checksum);
30599 extern unsigned long compute_checksum(int *r_cksumerr, char *a_path);
30600 extern int fverify(int fix, char *ftype, char *path, struct ainfo *ainfo,
30601       struct cinfo *cinfo);
30602 extern char *getErrbufAddr(void);
30603 extern int getErrbufSize(void);
30604 extern char *getErrstr(void);
30605 extern void setErrstr(char *errstr);
30606 extern int devtype(char *alias, struct pkgdev *devp);
30607 extern int ds_totread; /* total number of parts read */
30608 extern int ds_close(int pkgendflg);
30609 extern int ds_findpkg(char *device, char *pkg);
30610 extern int ds_getinfo(char *string);
30611 extern int ds_getpkg(char *device, int n, char *dstdir);
30612 extern int ds_ginit(char *device);
30613 extern boolean_t ds_fd_open(void);
30614 extern int ds_init(char *device, char **pkg, char *norewind);
30615 extern int BIO_ds_dump_header(PKG_ERR *, BIO *);
30616 extern int BIO_ds_dump(PKG_ERR *, char *, BIO *);
30617 extern int BIO_dump_cmd(char *cmd, BIO *bio);
30618 extern int ds_next(char *, char *);
30619 extern int ds_readbuf(char *device);
30620 extern int epclose(FILE *pp);
30621 extern int esystem(char *cmd, int ifd, int ofd);
30622 extern int e_ExecCmdArray(int *r_status, char **r_results,
30623    char *a_inputFile, char *a_cmd, char **a_args);
30624 extern int e_ExecCmdList(int *r_status, char **r_results,
30625    char *a_inputFile, char *a_cmd, ...);
30626 extern int gpkgmap(struct cfent *ept, FILE *fp);
30627 extern int gpkgmapvfp(struct cfent *ept, VFP_T *fpv);
30628 extern void setmapmode(int mode_no);
30629 extern int isFdRemote(int a_fd);
30630 extern int isFstypeRemote(char *a_fstype);
30631 extern int isPathRemote(char *a_path);
30632 extern int iscpio(char *path, int *iscomp);
30633 extern int isdir(char *path);
30634 extern int isfile(char *dir, char *file);
30635 extern int fmkdir(char *a_path, int a_mode);
30636 extern int pkgexecl(char *filein, char *fileout, char *uname, char *gname,
30637    ...);
30638 extern int pkgexecv(char *filein, char *fileout, char *uname, char *gname,
30639    char *arg[]);
30640 extern int pkghead(char *device);
30641 extern int pkgmount(struct pkgdev *devp, char *pkg, int part, int nparts,
30642    int getvolflg);
30643 extern int pkgtrans(char *device1, char *device2, char **pkg,
30644    int options, keystore_handle_t, char *);
30645 extern int pkgumount(struct pkgdev *devp);
30646 extern int ppkgmap(struct cfent *ept, FILE *fp);
30647 extern int putcfile(struct cfent *ept, FILE *fp);
30648 extern int putcvfpfile(struct cfent *ept, VFP_T *vfp);
30649 extern int rrmdir(char *path);
30650 extern void set_memalloc_failure_func(void (*)(int));
30651 extern void *xmalloc(size_t size);
30652 extern void *xrealloc(void *ptr, size_t size);
30653 extern char *xstrdup(char *str);
30654 extern void set_passphrase_prompt(char *);
30655 extern void set_passphrase_passarg(char *);
30656 extern int pkg_passphrase_cb(char *, int, int, void *);
30657 
30658 extern int srchcfile(struct cfent *ept, char *path, PKGserver server);
30659 extern struct group *cgrgid(gid_t gid);
30660 extern struct group *cgrnam(char *nam);
30661 extern struct passwd *cpwnam(char *nam);
30662 extern struct passwd *cpwuid(uid_t uid);
30663 extern struct group *clgrgid(gid_t gid);
30664 extern struct group *clgrnam(char *nam);
30665 extern struct passwd *clpwnam(char *nam);
30666 extern struct passwd *clpwuid(uid_t uid);
30667 extern void basepath(char *path, char *basedir, char *ir);
30668 extern void canonize(char *file);
30669 extern void canonize_slashes(char *file);
30670 extern void checksum_off(void);
30671 extern void checksum_on(void);
30672 extern void cvtpath(char *path, char *copy);
30673 extern void ds_order(char *list[]);
30674 extern void ds_putinfo(char *buf, size_t);
30675 extern void ds_skiptoend(char *device);
30676 extern void ecleanup(void);
30677 /*PRINTFLIKE1*/
30678 extern void logerr(char *fmt, ...);
30679 extern int mappath(int flag, char *path);
30680 extern int mapvar(int flag, char *varname);
30681 /*PRINTFLIKE1*/
30682 extern void progerr(char *fmt, ...);
30683 extern void pkgerr(PKG_ERR *);
30684 extern void rpterr(void);
30685 extern void tputcfent(struct cfent *ept, FILE *fp);
30686 extern void set_nonABI_symlinks(void);
30687 extern int nonABI_symlinks(void);
30688 extern void disable_attribute_check(void);
30689 extern int get_disable_attribute_check(void);
30690 
30691 /* security.c */
30692 extern void sec_init(void);
30693 extern char *get_subject_display_name(X509 *);
30694 extern char *get_issuer_display_name(X509 *);
30695 extern char *get_serial_num(X509 *);
30696 extern char *get_fingerprint(X509 *, const EVP_MD *);
30697 extern int get_cert_chain(PKG_ERR *, X509 *, struct stack_st_X509 *,
30698     struct stack_st_X509 *, struct stack_st_X509 **);
30699 
30700 /* pkgstr.c */
30701 void pkgstrConvertUllToTimeString_r(unsigned long long a_time,
30702    char *a_buf, int a_bufLen);
30703 char *pkgstrConvertPathToBasename(char *a_path);
30704 char *pkgstrConvertPathToDirname(char *a_path);
30705 char *pkgstrDup(char *a_str);
30706 char *pkgstrLocatePathBasename(char *a_path);
30707 void pkgstrScaleNumericString(char *a_buf, unsigned long long scale);
30708 void pkgstrAddToken(char **a_old, char *a_new, char a_separator);
30709 boolean_t pkgstrContainsToken(char *a_string, char *a_token,
30710    char *a_separators);
30711 void pkgstrExpandTokens(char **a_old, char *a_string,
30712    char a_separator, char *a_separators);
30713 char *pkgstrGetToken(char *r_sep, char *a_string, int a_index,
30714    char *a_separators);
30715 void pkgstrGetToken_r(char *r_sep, char *a_string, int a_index,
30716    char *a_separators, char *a_buf, int a_bufLen);
30717 unsigned long pkgstrNumTokens(char *a_string, char *a_separators);
30718 char *pkgstrPrintf(char *a_format, ...);
30719 void pkgstrPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
30720 void pkgstrRemoveToken(char **r_string, char *a_token,
30721    char *a_separators, int a_index);
30722 void pkgstrRemoveLeadingWhitespace(char **a_str);
30723 /* vfpops.c */
30724 extern int vfpCheckpointFile(VFP_T **r_destVfp, VFP_T **a_vfp,
30725    char *a_path);
30726 extern int vfpCheckpointOpen(VFP_T **a_cvfp, VFP_T **r_vfp, char *a_path,
30727    char *a_mode, VFPFLAGS_T a_flags);
30728 extern int vfpClearModified(VFP_T *a_vfp);
30729 extern int vfpClose(VFP_T **r_vfp);
30730 extern int vfpGetModified(VFP_T *a_vfp);
30731 extern int vfpOpen(VFP_T **r_vfp, char *a_path, char *a_mode,
30732    VFPFLAGS_T a_flags);
30733 extern void vfpRewind(VFP_T *a_vfp);
30734 extern ssize_t vfpSafePwrite(int a_fildes, void *a_buf,
30735    size_t a_nbyte, off_t a_offset);
30736 extern ssize_t vfpSafeWrite(int a_fildes, void *a_buf, size_t a_nbyte);
30737 extern int vfpSetFlags(VFP_T *a_vfp, VFPFLAGS_T a_flags);
30738 extern int vfpSetModified(VFP_T *a_vfp);
30739 extern int vfpSetSize(VFP_T *a_vfp, size_t a_size);
30740 extern void vfpTruncate(VFP_T *a_vfp);
30741 extern int vfpWriteToFile(VFP_T *a_vfp, char *a_path);
30742 
30743 /* handlelocalfs.c */
30744 boolean_t enable_local_fs(void);
30745 boolean_t restore_local_fs(void);
30746 
30747 /* pkgserv.c */
30748 extern PKGserver pkgopenserver(const char *, const char *, boolean_t);
30749 extern void pkgcloseserver(PKGserver);
30750 extern int pkgcmd(PKGserver, void *, size_t, char **, size_t *,
30751     int *);
30752 extern boolean_t pkgsync_needed(const char *, const char *, boolean_t);
30753 extern int pkgsync(const char *, const char *, boolean_t);
30754 extern int pkgservercommitfile(VFP_T *, PKGserver);
30755 extern int pkgopenfilter(PKGserver server, const char *pkginst);
30756 extern void pkgclosefilter(PKGserver);
30757 extern char *pkggetentry(PKGserver, int *, int *);
30758 extern char *pkggetentry_named(PKGserver, const char *, int *,
30759     int *);
30760 extern void pkgserversetmode(start_mode_t);
30761 extern start_mode_t pkgservergetmode(void);
30762 extern start_mode_t pkgparsemode(const char *);
30763 extern char *pkgmodeargument(start_mode_t);
30764 # 51 "open_package_datastream.c" 2
30765 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 1
30766 /*
30767  * CDDL HEADER START
30768  *
30769  * The contents of this file are subject to the terms of the
30770  * Common Development and Distribution License (the "License").
30771  * You may not use this file except in compliance with the License.
30772  *
30773  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30774  * or http://www.opensolaris.org/os/licensing.
30775  * See the License for the specific language governing permissions
30776  * and limitations under the License.
30777  *
30778  * When distributing Covered Code, include this CDDL HEADER in each
30779  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30780  * If applicable, add the following below this CDDL HEADER, with the
30781  * fields enclosed by brackets "[]" replaced with your own identifying
30782  * information: Portions Copyright [yyyy] [name of copyright owner]
30783  *
30784  * CDDL HEADER END
30785  */
30786 
30787 /*
30788  * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
30789  */
30790 # 34 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
30791 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
30792 /*
30793  * CDDL HEADER START
30794  *
30795  * The contents of this file are subject to the terms of the
30796  * Common Development and Distribution License (the "License").
30797  * You may not use this file except in compliance with the License.
30798  *
30799  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30800  * or http://www.opensolaris.org/os/licensing.
30801  * See the License for the specific language governing permissions
30802  * and limitations under the License.
30803  *
30804  * When distributing Covered Code, include this CDDL HEADER in each
30805  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30806  * If applicable, add the following below this CDDL HEADER, with the
30807  * fields enclosed by brackets "[]" replaced with your own identifying
30808  * information: Portions Copyright [yyyy] [name of copyright owner]
30809  *
30810  * CDDL HEADER END
30811  */
30812 
30813 /*
30814  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30815  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
30816  */
30817 
30818 /*	Copyright (c) 1988 AT&T	*/
30819 /*	  All Rights Reserved  	*/
30820 
30821 /*
30822  * User-visible pieces of the ANSI C standard I/O package.
30823  */
30824 # 35 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
30825 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 1
30826 /*
30827  * CDDL HEADER START
30828  *
30829  * The contents of this file are subject to the terms of the
30830  * Common Development and Distribution License (the "License").
30831  * You may not use this file except in compliance with the License.
30832  *
30833  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30834  * or http://www.opensolaris.org/os/licensing.
30835  * See the License for the specific language governing permissions
30836  * and limitations under the License.
30837  *
30838  * When distributing Covered Code, include this CDDL HEADER in each
30839  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30840  * If applicable, add the following below this CDDL HEADER, with the
30841  * fields enclosed by brackets "[]" replaced with your own identifying
30842  * information: Portions Copyright [yyyy] [name of copyright owner]
30843  *
30844  * CDDL HEADER END
30845  */
30846 
30847 /*
30848  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30849  *
30850  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
30851  * Use is subject to license terms.
30852  */
30853 
30854 /*	Copyright (c) 1988 AT&T	*/
30855 /*	  All Rights Reserved  	*/
30856 # 36 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
30857 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
30858 /*
30859  * CDDL HEADER START
30860  *
30861  * The contents of this file are subject to the terms of the
30862  * Common Development and Distribution License (the "License").
30863  * You may not use this file except in compliance with the License.
30864  *
30865  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30866  * or http://www.opensolaris.org/os/licensing.
30867  * See the License for the specific language governing permissions
30868  * and limitations under the License.
30869  *
30870  * When distributing Covered Code, include this CDDL HEADER in each
30871  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30872  * If applicable, add the following below this CDDL HEADER, with the
30873  * fields enclosed by brackets "[]" replaced with your own identifying
30874  * information: Portions Copyright [yyyy] [name of copyright owner]
30875  *
30876  * CDDL HEADER END
30877  */
30878 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30879 /*	  All Rights Reserved  	*/
30880 
30881 
30882 /*
30883  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
30884  * Use is subject to license terms.
30885  *
30886  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
30887  * Copyright 2016 Joyent, Inc.
30888  */
30889 # 37 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
30890 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
30891 /*
30892  * CDDL HEADER START
30893  *
30894  * The contents of this file are subject to the terms of the
30895  * Common Development and Distribution License (the "License").
30896  * You may not use this file except in compliance with the License.
30897  *
30898  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30899  * or http://www.opensolaris.org/os/licensing.
30900  * See the License for the specific language governing permissions
30901  * and limitations under the License.
30902  *
30903  * When distributing Covered Code, include this CDDL HEADER in each
30904  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30905  * If applicable, add the following below this CDDL HEADER, with the
30906  * fields enclosed by brackets "[]" replaced with your own identifying
30907  * information: Portions Copyright [yyyy] [name of copyright owner]
30908  *
30909  * CDDL HEADER END
30910  */
30911 
30912 /*
30913  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30914  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
30915  */
30916 
30917 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
30918 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
30919 /*	All Rights Reserved	*/
30920 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
30921 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
30922 /*
30923  * CDDL HEADER START
30924  *
30925  * The contents of this file are subject to the terms of the
30926  * Common Development and Distribution License (the "License").
30927  * You may not use this file except in compliance with the License.
30928  *
30929  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30930  * or http://www.opensolaris.org/os/licensing.
30931  * See the License for the specific language governing permissions
30932  * and limitations under the License.
30933  *
30934  * When distributing Covered Code, include this CDDL HEADER in each
30935  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30936  * If applicable, add the following below this CDDL HEADER, with the
30937  * fields enclosed by brackets "[]" replaced with your own identifying
30938  * information: Portions Copyright [yyyy] [name of copyright owner]
30939  *
30940  * CDDL HEADER END
30941  */
30942 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30943 /*	  All Rights Reserved  	*/
30944 
30945 /*
30946  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
30947  * Use is subject to license terms.
30948  */
30949 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
30950 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
30951 /*
30952  * CDDL HEADER START
30953  *
30954  * The contents of this file are subject to the terms of the
30955  * Common Development and Distribution License, Version 1.0 only
30956  * (the "License").  You may not use this file except in compliance
30957  * with the License.
30958  *
30959  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30960  * or http://www.opensolaris.org/os/licensing.
30961  * See the License for the specific language governing permissions
30962  * and limitations under the License.
30963  *
30964  * When distributing Covered Code, include this CDDL HEADER in each
30965  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30966  * If applicable, add the following below this CDDL HEADER, with the
30967  * fields enclosed by brackets "[]" replaced with your own identifying
30968  * information: Portions Copyright [yyyy] [name of copyright owner]
30969  *
30970  * CDDL HEADER END
30971  */
30972 /*
30973  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
30974  */
30975 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
30976 /*	  All Rights Reserved  	*/
30977 # 40 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
30978 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
30979 /*
30980  * CDDL HEADER START
30981  *
30982  * The contents of this file are subject to the terms of the
30983  * Common Development and Distribution License (the "License").
30984  * You may not use this file except in compliance with the License.
30985  *
30986  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30987  * or http://www.opensolaris.org/os/licensing.
30988  * See the License for the specific language governing permissions
30989  * and limitations under the License.
30990  *
30991  * When distributing Covered Code, include this CDDL HEADER in each
30992  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30993  * If applicable, add the following below this CDDL HEADER, with the
30994  * fields enclosed by brackets "[]" replaced with your own identifying
30995  * information: Portions Copyright [yyyy] [name of copyright owner]
30996  *
30997  * CDDL HEADER END
30998  */
30999 
31000 /*
31001  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31002  * Use is subject to license terms.
31003  */
31004 
31005 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
31006 /* All Rights Reserved */
31007 # 41 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
31008 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
31009 /*
31010  * CDDL HEADER START
31011  *
31012  * The contents of this file are subject to the terms of the
31013  * Common Development and Distribution License (the "License").
31014  * You may not use this file except in compliance with the License.
31015  *
31016  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31017  * or http://www.opensolaris.org/os/licensing.
31018  * See the License for the specific language governing permissions
31019  * and limitations under the License.
31020  *
31021  * When distributing Covered Code, include this CDDL HEADER in each
31022  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31023  * If applicable, add the following below this CDDL HEADER, with the
31024  * fields enclosed by brackets "[]" replaced with your own identifying
31025  * information: Portions Copyright [yyyy] [name of copyright owner]
31026  *
31027  * CDDL HEADER END
31028  */
31029 
31030 /*
31031  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
31032  * Use is subject to license terms.
31033  */
31034 # 42 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
31035 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
31036 /*
31037  * CDDL HEADER START
31038  *
31039  * The contents of this file are subject to the terms of the
31040  * Common Development and Distribution License (the "License").
31041  * You may not use this file except in compliance with the License.
31042  *
31043  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31044  * or http://www.opensolaris.org/os/licensing.
31045  * See the License for the specific language governing permissions
31046  * and limitations under the License.
31047  *
31048  * When distributing Covered Code, include this CDDL HEADER in each
31049  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31050  * If applicable, add the following below this CDDL HEADER, with the
31051  * fields enclosed by brackets "[]" replaced with your own identifying
31052  * information: Portions Copyright [yyyy] [name of copyright owner]
31053  *
31054  * CDDL HEADER END
31055  */
31056 
31057 /*
31058  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
31059  * Use is subject to license terms.
31060  */
31061 
31062 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
31063 /* All Rights Reserved */
31064 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
31065 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
31066 /*
31067  * CDDL HEADER START
31068  *
31069  * The contents of this file are subject to the terms of the
31070  * Common Development and Distribution License (the "License").
31071  * You may not use this file except in compliance with the License.
31072  *
31073  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31074  * or http://www.opensolaris.org/os/licensing.
31075  * See the License for the specific language governing permissions
31076  * and limitations under the License.
31077  *
31078  * When distributing Covered Code, include this CDDL HEADER in each
31079  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31080  * If applicable, add the following below this CDDL HEADER, with the
31081  * fields enclosed by brackets "[]" replaced with your own identifying
31082  * information: Portions Copyright [yyyy] [name of copyright owner]
31083  *
31084  * CDDL HEADER END
31085  */
31086 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31087 /*	  All Rights Reserved  	*/
31088 
31089 
31090 /*
31091  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31092  * Use is subject to license terms.
31093  *
31094  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
31095  * Copyright 2016 Joyent, Inc.
31096  */
31097 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
31098 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
31099 /*
31100  * CDDL HEADER START
31101  *
31102  * The contents of this file are subject to the terms of the
31103  * Common Development and Distribution License (the "License").
31104  * You may not use this file except in compliance with the License.
31105  *
31106  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31107  * or http://www.opensolaris.org/os/licensing.
31108  * See the License for the specific language governing permissions
31109  * and limitations under the License.
31110  *
31111  * When distributing Covered Code, include this CDDL HEADER in each
31112  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31113  * If applicable, add the following below this CDDL HEADER, with the
31114  * fields enclosed by brackets "[]" replaced with your own identifying
31115  * information: Portions Copyright [yyyy] [name of copyright owner]
31116  *
31117  * CDDL HEADER END
31118  */
31119 
31120 /*
31121  * Copyright (c) 2013 Gary Mills
31122  *
31123  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
31124  * Use is subject to license terms.
31125  */
31126 
31127 /*	Copyright (c) 1988 AT&T	*/
31128 /*	  All Rights Reserved  	*/
31129 # 40 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
31130 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
31131 /*
31132  * CDDL HEADER START
31133  *
31134  * The contents of this file are subject to the terms of the
31135  * Common Development and Distribution License (the "License").
31136  * You may not use this file except in compliance with the License.
31137  *
31138  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31139  * or http://www.opensolaris.org/os/licensing.
31140  * See the License for the specific language governing permissions
31141  * and limitations under the License.
31142  *
31143  * When distributing Covered Code, include this CDDL HEADER in each
31144  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31145  * If applicable, add the following below this CDDL HEADER, with the
31146  * fields enclosed by brackets "[]" replaced with your own identifying
31147  * information: Portions Copyright [yyyy] [name of copyright owner]
31148  *
31149  * CDDL HEADER END
31150  */
31151 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31152 /*	  All Rights Reserved  	*/
31153 
31154 /*
31155  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
31156  * Use is subject to license terms.
31157  */
31158 # 41 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
31159 
31160 /* Settings for procedure scripts */
31161 
31162 
31163 
31164 
31165 
31166 
31167 /* Settings for class action scripts */
31168 
31169 
31170 
31171 
31172 
31173 /* Settings for non-privileged scripts */
31174 # 64 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
31175 /* Settings for admin "rscriptalt" option */
31176 # 80 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
31177 /* Additional cfent/cfextra codes. */
31178 
31179 
31180 
31181 /* This holds admin file data. */
31182 struct admin {
31183  char *mail;
31184  char *instance;
31185  char *partial;
31186  char *runlevel;
31187  char *idepend;
31188  char *rdepend;
31189  char *space;
31190  char *setuid;
31191  char *conflict;
31192  char *action;
31193  char *networktimeout;
31194  char *networkretries;
31195  char *authentication;
31196  char *keystore;
31197  char *proxy;
31198  char *basedir;
31199  char *rscriptalt;
31200 };
31201 
31202 /*
31203  * This table details the status of all filesystems available to the target
31204  * host.
31205  */
31206 struct fstable {
31207  char *name; /* name of filesystem, (mount point) */
31208  int namlen; /* The length of the name (mountpoint) */
31209  fsblkcnt_t bsize; /* fundamental file system block size */
31210  fsblkcnt_t frsize; /* file system fragment size */
31211  fsblkcnt_t bfree; /* total # of free blocks */
31212  fsblkcnt_t bused; /* total # of used blocks */
31213  fsblkcnt_t ffree; /* total # of free file nodes */
31214  fsblkcnt_t fused; /* total # of used file nodes */
31215  char *fstype; /* type of filesystem - nfs, lo, ... */
31216  char *remote_name; /* client's mounted filesystem */
31217  unsigned writeable:1; /* access permission */
31218  unsigned write_tested:1; /* access permission fully tested */
31219  unsigned remote:1; /* on a remote filesystem */
31220  unsigned mounted:1; /* actually mounted right now */
31221  unsigned srvr_map:1; /* use server_map() */
31222  unsigned cl_mounted:1; /* mounted in client space */
31223  unsigned mnt_failed:1; /* attempt to loopback mount failed */
31224  unsigned served:1; /* filesystem comes from a server */
31225 };
31226 # 43 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
31227 
31228 
31229 
31230 
31231 
31232 /* signal handler function definition */
31233 
31234 typedef void (sighdlrFunc_t)(int);
31235 
31236 /* maximum parameter length */
31237 
31238 
31239 
31240 /* flag for check_applicability */
31241 
31242 typedef unsigned long CAF_T;
31243 
31244 /* flags for check_applicability */
31245 
31246 
31247 
31248 
31249 
31250 /* path to the request file in the package directory */
31251 
31252 
31253 
31254 /* path to the copyright file in the package directory */
31255 
31256 
31257 
31258 /* path to the depend file in the package directory */
31259 
31260 
31261 
31262 /*
31263  * name of environment variable set to non-global zone name being installed:
31264  * pkgadd/pkginstall expects this name and passes it on to any scripts that
31265  * are run if it is set.
31266  */
31267 
31268 
31269 
31270 /*
31271  * name of environment variable set to indicate this package should be installed
31272  * in the current zone only - see PSARC/2004/789 - New Pkginfo(4) attributes
31273  * for zones
31274  */
31275 
31276 
31277 
31278 /*
31279  * name of environment variable set to indicate this package should be installed
31280  * in all zones, and only from the global zone - see PSARC/2003/460
31281  */
31282 
31283 
31284 
31285 /*
31286  * name of environment variable set to indicate this package should be installed
31287  * hollow (db update only) when installed in nonglobal zone - see PSARC/2003/460
31288  */
31289 
31290 
31291 
31292 /*
31293  * General purpose return codes used for functions which don't return a basic
31294  * success or failure. For those functions wherein a yes/no result is
31295  * possible, then 1 means OK and 0 means FAIL.
31296  */
31297 
31298 
31299 
31300 
31301 /* These are the file status indicators for the contents file */
31302 # 128 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
31303 /* control bits for pkgdbmerg() */
31304 
31305 
31306 
31307 /* control bits for file verification by class */
31308 
31309 
31310 
31311 
31312 /* control bit for path type to pass to CAS */
31313 
31314 
31315 
31316 /* findscripts() argument */
31317 
31318 
31319 
31320 struct cl_attr {
31321  char name[64 +1]; /* name of class */
31322  char *inst_script; /* install class action script */
31323  char *rem_script; /* remove class action script */
31324  unsigned src_verify:3; /* source verification level */
31325  unsigned dst_verify:4; /* destination verification level */
31326  unsigned relpath_2_CAS:1; /* CAS gets relative paths */
31327 };
31328 
31329 
31330 
31331 
31332 
31333 
31334 
31335 /* Common quit declaration used across many package commands */
31336 extern void quit(int) __attribute__((__noreturn__));
31337 
31338 
31339 /* listmgr.c */
31340 extern int bl_create (int count_per_block, int struct_size, char *desc);
31341 
31342 extern char *bl_next_avail (int list_handle);
31343 extern char *bl_get_record (int list_handle, int recno);
31344 extern void bl_free (int list_handle);
31345 extern int ar_create (int count_per_block, int struct_size, char *desc);
31346 
31347 extern char **ar_next_avail (int list_handle);
31348 extern char **ar_get_head (int list_handle);
31349 extern int ar_delete (int list_handle, int index);
31350 extern void ar_free (int list_handle);
31351 
31352 /* doulimit.c */
31353 extern int set_ulimit (char *script, char *err_msg);
31354 extern int clr_ulimit (void);
31355 extern int assign_ulimit (char *fslimit);
31356 
31357 /* dryrun.c */
31358 extern void set_continue_not_ok (void);
31359 extern int continue_is_ok (void);
31360 extern int in_dryrun_mode (void);
31361 extern int in_continue_mode (void);
31362 extern void init_dryrunfile (char *dr_dir);
31363 extern void init_contfile (char *cn_dir);
31364 extern void set_dr_exitmsg (char *value);
31365 extern void set_dr_info (int type, int value);
31366 extern void write_dryrun_file (struct cfextra **extlist);
31367 
31368 /* instvol.c */
31369 extern void regfiles_free (void);
31370 
31371 /* lockinst.c */
31372 extern int lockinst (char *util_name, char *pkg_name, char *place);
31373 extern void lockupd (char *place);
31374 extern void unlockinst (void);
31375 
31376 extern char *pathdup (char *s);
31377 extern char *pathalloc (int n);
31378 extern char *fixpath (char *path);
31379 extern char *get_info_basedir (void);
31380 extern char *get_basedir (void);
31381 extern char *get_client_basedir (void);
31382 extern int set_basedirs (int reloc, char *adm_basedir, char *pkginst, int nointeract);
31383 
31384 extern int eval_path (char **server_ptr, char **client_ptr, char **map_ptr, char *path);
31385 
31386 extern int get_orig_offset (void);
31387 extern char *get_inst_root (void);
31388 extern char *get_mount_point (uint32_t n);
31389 extern char *get_remote_path (uint32_t n);
31390 extern void set_env_cbdir (void);
31391 extern int set_inst_root (char *path);
31392 extern void put_path_params (void);
31393 extern int mkpath (char *p);
31394 extern void mkbasedir (int flag, char *path);
31395 extern int is_an_inst_root (void);
31396 extern int is_a_basedir (void);
31397 extern int is_a_cl_basedir (void);
31398 extern int is_relocatable (void);
31399 extern char *orig_path (char *path);
31400 extern char *orig_path_ptr (char *path);
31401 extern char *qreason (int caller, int retcode, int started, int includeZonename);
31402 
31403 extern char *qstrdup (char *s);
31404 extern char *srcpath (char *d, char *p, int part, int nparts);
31405 extern char *trans_srcp_pi (char *local_path);
31406 extern int copyf (char *from, char *to, time_t mytime);
31407 extern int copyFile (int, int, char *, char *, struct stat *, long);
31408 extern int openLocal (char *a_path, int a_oflag, char *a_tmpdir);
31409 extern int dockdeps (char *depfile, int removeFlag, boolean_t a_preinstallCheck);
31410 
31411 extern int finalck (struct cfent *ept, int attrchg, int contchg, boolean_t a_warning);
31412 
31413 
31414 /* dockdeps.c */
31415 extern void setUpdate (void);
31416 extern int isUpdate (void);
31417 
31418 /* mntinfo.c */
31419 extern int get_mntinfo (int map_client, char *vfstab_file);
31420 extern uint32_t fsys (char *path);
31421 extern struct fstable *get_fs_entry (uint32_t n);
31422 extern int mount_client (void);
31423 extern int unmount_client (void);
31424 extern uint32_t resolved_fsys (char *path);
31425 extern char *get_server_host (uint32_t n);
31426 extern char *server_map (char *path, uint32_t fsys_value);
31427 extern int use_srvr_map (char *path, uint32_t *fsys_value);
31428 extern int use_srvr_map_n (uint32_t n);
31429 extern int is_fs_writeable (char *path, uint32_t *fsys_value);
31430 extern int is_remote_fs (char *path, uint32_t *fsys_value);
31431 extern int is_served (char *path, uint32_t *fsys_value);
31432 extern int is_mounted (char *path, uint32_t *fsys_value);
31433 extern int is_fs_writeable_n (uint32_t n);
31434 extern int is_remote_fs_n (uint32_t n);
31435 extern int is_served_n (uint32_t n);
31436 extern int is_mounted_n (uint32_t n);
31437 extern fsblkcnt_t get_blk_size_n (uint32_t n);
31438 extern fsblkcnt_t get_frag_size_n (uint32_t n);
31439 extern fsblkcnt_t get_blk_used_n (uint32_t n);
31440 extern fsblkcnt_t get_blk_free_n (uint32_t n);
31441 extern fsblkcnt_t get_inode_used_n (uint32_t n);
31442 extern fsblkcnt_t get_inode_free_n (uint32_t n);
31443 extern void set_blk_used_n (uint32_t n, fsblkcnt_t value);
31444 extern char *get_source_name_n (uint32_t n);
31445 extern char *get_fs_name_n (uint32_t n);
31446 extern int load_fsentry (struct fstable *fs_entry, char *name, char *fstype, char *remote_name);
31447 
31448 extern int isreloc (char *pkginstdir);
31449 extern int is_local_host (char *hostname);
31450 extern void fs_tab_free (void);
31451 
31452 /* pkgdbmerg.c */
31453 extern int pkgdbmerg (PKGserver server, VFP_T *tmpvfp, struct cfextra **extlist);
31454 
31455 extern int files_installed (void);
31456 
31457 /* ocfile.c */
31458 extern int trunc_tcfile (int fd);
31459 extern int ocfile (PKGserver *serverp, VFP_T **tmpvfp, fsblkcnt_t map_blks);
31460 
31461 extern int swapcfile (PKGserver server, VFP_T **a_tmpvfp, char *pkginst, int dbchg);
31462 
31463 extern int set_cfdir (char *cfdir);
31464 extern int socfile (PKGserver *server, boolean_t quiet);
31465 extern int relslock (void);
31466 extern int pkgWlock (int verbose);
31467 extern int iscfile (void);
31468 extern int vcfile (void);
31469 
31470 extern fsblkcnt_t nblk (fsblkcnt_t size, ulong_t bsize, ulong_t frsize);
31471 
31472 extern struct cfent **procmap (VFP_T *vfp, int mapflag, char *ir);
31473 extern void repl_cfent (struct cfent *new, struct cfent *old);
31474 extern struct cfextra **pkgobjmap (VFP_T *vfp, int mapflag, char *ir);
31475 extern void pkgobjinit (void);
31476 extern int seed_pkgobjmap (struct cfextra *ext_entry, char *path, char *local);
31477 
31478 extern int init_pkgobjspace (void);
31479 
31480 /* eptstat.c */
31481 extern void pinfo_free (void);
31482 extern struct pinfo *eptstat (struct cfent *entry, char *pkg, char c);
31483 
31484 /* echo.c */
31485 /*PRINTFLIKE1*/
31486 extern void echo (char *a_fmt, ...);
31487 /*PRINTFLIKE1*/
31488 extern void echoDebug (char *a_fmt, ...);
31489 extern boolean_t echoGetFlag (void);
31490 extern boolean_t echoDebugGetFlag (void);
31491 extern boolean_t echoSetFlag (boolean_t a_debugFlag);
31492 extern boolean_t echoDebugSetFlag (boolean_t a_debugFlag);
31493 
31494 /* ptext.c */
31495 /*PRINTFLIKE2*/
31496 extern void ptext (FILE *fp, char *fmt, ...);
31497 
31498 /* putparam.c */
31499 extern void putparam (char *param, char *value);
31500 extern void getuserlocale (void);
31501 extern void putuserlocale (void);
31502 extern void putConditionInfo (char *, char *);
31503 
31504 /* setadmin.c */
31505 extern void setadminFile (char *file);
31506 extern char *setadminSetting (char *a_paramName, char *a_paramValue);
31507 
31508 extern char *set_keystore_admin (void);
31509 extern boolean_t get_proxy_port_admin (char **, ushort_t *);
31510 extern boolean_t check_keystore_admin (char **);
31511 extern int web_ck_retries (void);
31512 extern int web_ck_timeout (void);
31513 extern int web_ck_authentication (void);
31514 
31515 /* setlist.c */
31516 extern char *cl_iscript (int idx);
31517 extern char *cl_rscript (int idx);
31518 extern void find_CAS (int CAS_type, char *bin_ptr, char *inst_ptr);
31519 extern int setlist (struct cl_attr ***plist, char *slist);
31520 extern void addlist (struct cl_attr ***plist, char *item);
31521 extern char *cl_nam (int cl_idx);
31522 extern char *flex_device(char *device_name, int dev_ok);
31523 extern int cl_getn (void);
31524 extern int cl_idx (char *cl_nam);
31525 extern void cl_sets (char *slist);
31526 extern void cl_setl (struct cl_attr **cl_lst);
31527 extern void cl_putl (char *parm_name, struct cl_attr **list);
31528 extern int cl_deliscript (int i);
31529 extern unsigned cl_svfy (int i);
31530 extern unsigned cl_dvfy (int i);
31531 extern unsigned cl_pthrel (int i);
31532 
31533 /* passwd.c */
31534 extern int pkg_passphrase_cb (char *, int, int, void *);
31535 extern void set_passarg (char *);
31536 extern void set_prompt (char *);
31537 
31538 /* fixpath.c */
31539 extern void export_client_env(char *);
31540 extern void set_partial_inst(void);
31541 extern int is_partial_inst(void);
31542 extern void set_depend_pkginfo_DB(boolean_t a_setting);
31543 extern boolean_t is_depend_pkginfo_DB(void);
31544 extern void disable_spool_create(void);
31545 extern int is_spool_create(void);
31546 
31547 /* open_package_datastream.c */
31548 extern boolean_t open_package_datastream(int a_argc, char **a_argv,
31549     char *a_spoolto, char *a_device,
31550     int *r_repeat, char **r_idsName,
31551     char *a_tmpdir, struct pkgdev *a_pkgdev,
31552     int a_optind);
31553 
31554 /* setup_temporary_directory.c */
31555 extern boolean_t setup_temporary_directory(char **r_dirname,
31556     char *a_tmpdir, char *a_suffix);
31557 
31558 /* unpack_package_from_stream.c */
31559 extern boolean_t unpack_package_from_stream(char *a_idsName,
31560     char *a_pkginst, char *a_tempDir);
31561 
31562 /* pkgops.c */
31563 
31564 extern boolean_t pkgAddPackageToGzonlyList(char *a_pkgInst,
31565     char *a_rootPath);
31566 extern void pkgAddThisZonePackage(char *a_pkgInst);
31567 extern boolean_t pkgRemovePackageFromGzonlyList(char *a_rootPath,
31568     char *a_pkgInst);
31569 extern FILE *pkgOpenInGzOnlyFile(char *a_rootPath);
31570 extern void pkginfoFree(struct pkginfo **r_info);
31571 extern boolean_t pkginfoIsPkgInstalled(struct pkginfo **r_pinfo,
31572     char *a_pkgInst);
31573 extern boolean_t pkgIsPkgInGzOnly(char *a_rootPath, char *a_pkgInst);
31574 extern boolean_t pkgIsPkgInGzOnlyFP(FILE *a_fp, char *a_pkgInst);
31575 extern boolean_t pkginfoParamTruth(FILE *a_fp, char *a_param,
31576     char *a_value, boolean_t a_default);
31577 extern int pkgGetPackageList(char ***r_pkgList, char **a_argv,
31578     int a_optind, char *a_categories,
31579     char **a_categoryList, struct pkgdev *a_pkgdev);
31580 extern void pkgLocateHighestInst(char *r_path, int r_pathLen,
31581     char *r_pkgInst, int r_pkgInstLen,
31582     char *a_rootPath, char *a_pkgInst);
31583 extern boolean_t pkgPackageIsThisZone(char *a_pkgInst);
31584 extern char *pkgGetGzOnlyPath(void);
31585 extern boolean_t pkgTestInstalled(char *a_packageName, char *a_rootPath);
31586 
31587 /* depchk.c */
31588 
31589 struct depckErrorRecord {
31590  int ier_numZones;
31591  char *ier_packageName;
31592  char **ier_zones;
31593  char **ier_values;
31594 };
31595 
31596 typedef struct depckErrorRecord depckErrorRecord_t;
31597 
31598 struct depckError {
31599  int er_numEntries;
31600  depckErrorRecord_t *er_theEntries;
31601 };
31602 
31603 typedef struct depckError depckError_t;
31604 
31605 typedef int (depcklFunc_t)(char *a_msg, char *a_pkg);
31606 
31607 /*
31608  * ignore_values:
31609  *	== NULL - record one message for each instance of "name" found
31610  *	== "" - record multiple instances
31611  *	!= "" - record multiple instances if value not in ignore_values
31612  */
31613 
31614 struct depckl_struct {
31615  char *name;
31616  char *ignore_values;
31617  char **err_msg;
31618  depcklFunc_t *depcklFunc;
31619  depckError_t *record;
31620 };
31621 
31622 typedef struct depckl_struct depckl_t;
31623 
31624 extern int depchkReportErrors(depckl_t *depckl);
31625 extern void depchkRecordError(depckError_t *a_erc,
31626     char *a_pkginst, char *a_zoneName,
31627     char *a_value);
31628 
31629 /* log.c */
31630 
31631 /* types of log messages we recognize */
31632 typedef enum {
31633  LOG_MSG_ERR,
31634  LOG_MSG_WRN,
31635  LOG_MSG_INFO,
31636  LOG_MSG_DEBUG
31637 } LogMsgType;
31638 
31639 /*PRINTFLIKE2*/
31640 extern void log_msg(LogMsgType, const char *, ...);
31641 extern void log_set_verbose(boolean_t);
31642 extern boolean_t log_get_verbose(void);
31643 
31644 /*
31645  * typedef for the 'ckreturn' function
31646  */
31647 typedef void (ckreturnFunc_t)(int a_retcode);
31648 
31649 /* sml.c */
31650 
31651 /* null reference to SML_TAG object */
31652 
31653 
31654 
31655 /* null reference to SML_TAG * object */
31656 
31657 
31658 
31659 /* is reference to SML_TAG object valid? */
31660 
31661 
31662 
31663 /* is indirect reference to SML_TAG object valid? */
31664 
31665 
31666 
31667 
31668 /* definitions for sml passed from pkginstall to pkgcond */
31669 # 505 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
31670 typedef struct _sml_tag_struct SML_TAG;
31671 typedef struct _sml_parameter_struct SML_PARAM;
31672 
31673 struct _sml_tag_struct {
31674  char *name; /* tag name */
31675  int params_num; /* # params in *params */
31676  SML_PARAM *params; /* tag parameters */
31677  int tags_num; /* # subtags in *tags */
31678  SML_TAG *tags; /* tag subtags */
31679 };
31680 
31681 struct _sml_parameter_struct {
31682  char *name; /* tag name */
31683  char *value; /* parameters */
31684 };
31685 
31686 SML_TAG *smlAddTag(SML_TAG **r_tag, int a_index,
31687    SML_TAG *a_subTag);
31688 boolean_t smlFstatCompareEq(struct stat *statbuf,
31689     SML_TAG *tag, char *path);
31690 char *smlConvertTagToString(SML_TAG *tag);
31691 /*PRINTFLIKE2*/
31692 void smlDbgPrintTag(SML_TAG *a_tag, char *a_format, ...);
31693 void smlDelTag(SML_TAG *tag, SML_TAG *sub_tag);
31694 void smlDelParam(SML_TAG *tag, char *name);
31695 SML_TAG *smlDup(SML_TAG *tag);
31696 boolean_t smlFindAndDelTag(SML_TAG *tag, char *findTag);
31697 void smlFreeTag(SML_TAG *tag);
31698 char *smlGetElementName(SML_TAG *a_tag);
31699 int smlGetNumParams(SML_TAG *a_tag);
31700 char *smlGetParam(SML_TAG *tag, char *name);
31701 /*PRINTFLIKE2*/
31702 char *smlGetParamF(SML_TAG *tag, char *format, ...);
31703 void smlGetParam_r(SML_TAG *tag, char *name, char *buf,
31704    int bufLen);
31705 char *smlGetParamByTag(SML_TAG *tag, int index,
31706    char *tagName, char *parmName);
31707 char *smlGetParamByTagParam(SML_TAG *tag, int index,
31708    char *tagName, char *parmName, char *parmValue,
31709    char *parmReturn);
31710 char *smlGetParamName(SML_TAG *tag, int index);
31711 SML_TAG *smlGetTag(SML_TAG *tag, int index);
31712 SML_TAG *smlGetTagByName(SML_TAG *tag, int index, char *name);
31713 SML_TAG *smlGetTagByTagParam(SML_TAG *tag, int index,
31714    char *tagName, char *paramName, char *paramValue);
31715 boolean_t smlGetVerbose(void);
31716 int smlLoadTagFromFile(SML_TAG **r_tag, char *a_fileName);
31717 SML_TAG *smlNewTag(char *name);
31718 boolean_t smlParamEq(SML_TAG *tag, char *findTag,
31719    char *findParam, char *str);
31720 /*PRINTFLIKE4*/
31721 boolean_t smlParamEqF(SML_TAG *tag, char *findTag, char *findParam,
31722    char *format, ...);
31723 void smlPrintTag(SML_TAG *tag);
31724 int smlReadOneTag(SML_TAG **r_tag, char *a_str);
31725 int smlConvertStringToTag(SML_TAG **r_tag, char *str);
31726 void smlSetFileStatInfo(SML_TAG **tag,
31727     struct stat *statbuf, char *path);
31728 void smlSetParam(SML_TAG *tag, char *name, char *value);
31729 /*PRINTFLIKE3*/
31730 void smlSetParamF(SML_TAG *tag, char *name, char *format, ...);
31731 void smlSetVerbose(boolean_t a_setting);
31732 int smlWriteTagToFd(SML_TAG *tag, int fd);
31733 int smlWriteTagToFile(SML_TAG *tag, char *filename);
31734 /*PRINTFLIKE3*/
31735 void sml_strPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
31736 /*PRINTFLIKE1*/
31737 char *sml_strPrintf(char *a_format, ...);
31738 char *sml_XmlEncodeString(char *a_plainTextString);
31739 char *sml_XmlDecodeString(char *a_xmlEncodedString);
31740 # 52 "open_package_datastream.c" 2
31741 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 1
31742 /*
31743  * CDDL HEADER START
31744  *
31745  * The contents of this file are subject to the terms of the
31746  * Common Development and Distribution License (the "License").
31747  * You may not use this file except in compliance with the License.
31748  *
31749  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31750  * or http://www.opensolaris.org/os/licensing.
31751  * See the License for the specific language governing permissions
31752  * and limitations under the License.
31753  *
31754  * When distributing Covered Code, include this CDDL HEADER in each
31755  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31756  * If applicable, add the following below this CDDL HEADER, with the
31757  * fields enclosed by brackets "[]" replaced with your own identifying
31758  * information: Portions Copyright [yyyy] [name of copyright owner]
31759  *
31760  * CDDL HEADER END
31761  */
31762 
31763 /*
31764  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
31765  * Use is subject to license terms.
31766  */
31767 
31768 
31769 
31770 
31771 
31772 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
31773 /*
31774  * CDDL HEADER START
31775  *
31776  * The contents of this file are subject to the terms of the
31777  * Common Development and Distribution License (the "License").
31778  * You may not use this file except in compliance with the License.
31779  *
31780  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31781  * or http://www.opensolaris.org/os/licensing.
31782  * See the License for the specific language governing permissions
31783  * and limitations under the License.
31784  *
31785  * When distributing Covered Code, include this CDDL HEADER in each
31786  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31787  * If applicable, add the following below this CDDL HEADER, with the
31788  * fields enclosed by brackets "[]" replaced with your own identifying
31789  * information: Portions Copyright [yyyy] [name of copyright owner]
31790  *
31791  * CDDL HEADER END
31792  */
31793 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31794 /*	  All Rights Reserved  	*/
31795 
31796 
31797 /*
31798  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31799  * Use is subject to license terms.
31800  *
31801  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
31802  * Copyright 2016 Joyent, Inc.
31803  */
31804 # 32 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
31805 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h" 1
31806 /*
31807  * CDDL HEADER START
31808  *
31809  * The contents of this file are subject to the terms of the
31810  * Common Development and Distribution License (the "License").
31811  * You may not use this file except in compliance with the License.
31812  *
31813  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31814  * or http://www.opensolaris.org/os/licensing.
31815  * See the License for the specific language governing permissions
31816  * and limitations under the License.
31817  *
31818  * When distributing Covered Code, include this CDDL HEADER in each
31819  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31820  * If applicable, add the following below this CDDL HEADER, with the
31821  * fields enclosed by brackets "[]" replaced with your own identifying
31822  * information: Portions Copyright [yyyy] [name of copyright owner]
31823  *
31824  * CDDL HEADER END
31825  */
31826 
31827 /*
31828  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
31829  *
31830  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31831  * Use is subject to license terms.
31832  * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
31833  * Copyright 2016 Toomas Soome <tsoome@me.com>
31834  */
31835 
31836 
31837 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
31838 /*	  All Rights Reserved  	*/
31839 
31840 
31841 
31842 
31843 
31844 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 1
31845 /*
31846  * CDDL HEADER START
31847  *
31848  * The contents of this file are subject to the terms of the
31849  * Common Development and Distribution License (the "License").
31850  * You may not use this file except in compliance with the License.
31851  *
31852  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31853  * or http://www.opensolaris.org/os/licensing.
31854  * See the License for the specific language governing permissions
31855  * and limitations under the License.
31856  *
31857  * When distributing Covered Code, include this CDDL HEADER in each
31858  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31859  * If applicable, add the following below this CDDL HEADER, with the
31860  * fields enclosed by brackets "[]" replaced with your own identifying
31861  * information: Portions Copyright [yyyy] [name of copyright owner]
31862  *
31863  * CDDL HEADER END
31864  */
31865 
31866 /*
31867  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
31868  * Use is subject to license terms.
31869  */
31870 
31871 
31872 
31873 
31874 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
31875 /*
31876  * CDDL HEADER START
31877  *
31878  * The contents of this file are subject to the terms of the
31879  * Common Development and Distribution License (the "License").
31880  * You may not use this file except in compliance with the License.
31881  *
31882  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31883  * or http://www.opensolaris.org/os/licensing.
31884  * See the License for the specific language governing permissions
31885  * and limitations under the License.
31886  *
31887  *
31888  * When distributing Covered Code, include this CDDL HEADER in each
31889  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31890  * If applicable, add the following below this CDDL HEADER, with the
31891  * fields enclosed by brackets "[]" replaced with your own identifying
31892  * information: Portions Copyright [yyyy] [name of copyright owner]
31893  *
31894  * CDDL HEADER END
31895  */
31896 
31897 /*
31898  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
31899  * Use is subject to license terms.
31900  * Copyright 2016 Joyent, Inc.
31901  */
31902 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
31903 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 1
31904 /*
31905  * CDDL HEADER START
31906  *
31907  * The contents of this file are subject to the terms of the
31908  * Common Development and Distribution License (the "License").
31909  * You may not use this file except in compliance with the License.
31910  *
31911  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31912  * or http://www.opensolaris.org/os/licensing.
31913  * See the License for the specific language governing permissions
31914  * and limitations under the License.
31915  *
31916  * When distributing Covered Code, include this CDDL HEADER in each
31917  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31918  * If applicable, add the following below this CDDL HEADER, with the
31919  * fields enclosed by brackets "[]" replaced with your own identifying
31920  * information: Portions Copyright [yyyy] [name of copyright owner]
31921  *
31922  * CDDL HEADER END
31923  */
31924 /*
31925  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
31926  * Use is subject to license terms.
31927  * Copyright 2015 Nexenta Systems, Inc.
31928  */
31929 
31930 
31931 
31932 
31933 #pragma ident "%Z%%M%	%I%	%E% SMI"
31934 
31935 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
31936 /*
31937  * CDDL HEADER START
31938  *
31939  * The contents of this file are subject to the terms of the
31940  * Common Development and Distribution License, Version 1.0 only
31941  * (the "License").  You may not use this file except in compliance
31942  * with the License.
31943  *
31944  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
31945  * or http://www.opensolaris.org/os/licensing.
31946  * See the License for the specific language governing permissions
31947  * and limitations under the License.
31948  *
31949  * When distributing Covered Code, include this CDDL HEADER in each
31950  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31951  * If applicable, add the following below this CDDL HEADER, with the
31952  * fields enclosed by brackets "[]" replaced with your own identifying
31953  * information: Portions Copyright [yyyy] [name of copyright owner]
31954  *
31955  * CDDL HEADER END
31956  */
31957 /*
31958  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
31959  *
31960  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
31961  * Use is subject to license terms.
31962  */
31963 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 2
31964 
31965 
31966 
31967 
31968 
31969 /*
31970  * Interoperability types for programs. Used for:
31971  *
31972  * Crossing between 32-bit and 64-bit domains.
31973  *
31974  * On disk data formats such as filesystem meta data
31975  * and disk label.
31976  *
31977  * Note: Applications should never include this
31978  *       header file.
31979  */
31980 typedef uint32_t caddr32_t;
31981 typedef int32_t daddr32_t;
31982 typedef int32_t off32_t;
31983 typedef uint32_t ino32_t;
31984 typedef int32_t blkcnt32_t;
31985 typedef uint32_t fsblkcnt32_t;
31986 typedef uint32_t fsfilcnt32_t;
31987 typedef int32_t id32_t;
31988 typedef uint32_t major32_t;
31989 typedef uint32_t minor32_t;
31990 typedef int32_t key32_t;
31991 typedef uint32_t mode32_t;
31992 typedef uint32_t uid32_t;
31993 typedef uint32_t gid32_t;
31994 typedef uint32_t nlink32_t;
31995 typedef uint32_t dev32_t;
31996 typedef int32_t pid32_t;
31997 typedef uint32_t size32_t;
31998 typedef int32_t ssize32_t;
31999 typedef int32_t time32_t;
32000 typedef int32_t clock32_t;
32001 typedef uint32_t uintptr32_t;
32002 typedef int32_t intptr32_t;
32003 
32004 struct timeval32 {
32005  time32_t tv_sec; /* seconds */
32006  int32_t tv_usec; /* and microseconds */
32007 };
32008 
32009 typedef struct timespec32 {
32010  time32_t tv_sec; /* seconds */
32011  int32_t tv_nsec; /* and nanoseconds */
32012 } timespec32_t;
32013 
32014 typedef struct timespec32 timestruc32_t;
32015 
32016 typedef struct itimerspec32 {
32017  struct timespec32 it_interval;
32018  struct timespec32 it_value;
32019 } itimerspec32_t;
32020 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
32021 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
32022 /*
32023  * CDDL HEADER START
32024  *
32025  * The contents of this file are subject to the terms of the
32026  * Common Development and Distribution License (the "License").
32027  * You may not use this file except in compliance with the License.
32028  *
32029  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32030  * or http://www.opensolaris.org/os/licensing.
32031  * See the License for the specific language governing permissions
32032  * and limitations under the License.
32033  *
32034  *
32035  * When distributing Covered Code, include this CDDL HEADER in each
32036  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32037  * If applicable, add the following below this CDDL HEADER, with the
32038  * fields enclosed by brackets "[]" replaced with your own identifying
32039  * information: Portions Copyright [yyyy] [name of copyright owner]
32040  *
32041  * CDDL HEADER END
32042  */
32043 
32044 /*
32045  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
32046  * Use is subject to license terms.
32047  * Copyright 2016 Joyent, Inc.
32048  */
32049 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
32050 
32051 
32052 
32053 
32054 
32055 /*
32056  * Miscellaneous defines
32057  */
32058 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
32059 /*
32060  * Reserve two cylinders on SCSI disks.
32061  * One is for the backup disk label and the other is for the deviceid.
32062  *
32063  * IPI disks only reserve one cylinder, but they will go away soon.
32064  * CDROMs do not reserve any cylinders.
32065  */
32066 
32067 
32068 /*
32069  * Format of a Sun disk label.
32070  * Resides in cylinder 0, head 0, sector 0.
32071  *
32072  * sizeof (struct dk_label) should be 512 (the current sector size),
32073  * but should the sector size increase, this structure should remain
32074  * at the beginning of the sector.
32075  */
32076 
32077 
32078 
32079 
32080 
32081 
32082 
32083 typedef daddr_t blkaddr_t;
32084 typedef daddr32_t blkaddr32_t;
32085 
32086 
32087 
32088 /*
32089  * partition headers:  section 1
32090  * Returned in struct dk_allmap by ioctl DKIOC[SG]APART (dkio(7I))
32091  */
32092 struct dk_map {
32093  blkaddr_t dkl_cylno; /* starting cylinder */
32094  blkaddr_t dkl_nblk; /* number of blocks;  if == 0, */
32095      /* partition is undefined */
32096 };
32097 
32098 /*
32099  * partition headers:  section 1
32100  * Fixed size for on-disk dk_label
32101  */
32102 struct dk_map32 {
32103  blkaddr32_t dkl_cylno; /* starting cylinder */
32104  blkaddr32_t dkl_nblk; /* number of blocks;  if == 0, */
32105      /* partition is undefined */
32106 };
32107 
32108 /*
32109  * partition headers:  section 2,
32110  * brought over from AT&T SVr4 vtoc structure.
32111  */
32112 struct dk_map2 {
32113  uint16_t p_tag; /* ID tag of partition */
32114  uint16_t p_flag; /* permission flag */
32115 };
32116 
32117 struct dkl_partition {
32118  uint16_t p_tag; /* ID tag of partition */
32119  uint16_t p_flag; /* permision flags */
32120  blkaddr32_t p_start; /* start sector no of partition */
32121  blkaddr32_t p_size; /* # of blocks in partition */
32122 };
32123 
32124 
32125 /*
32126  * VTOC inclusions from AT&T SVr4
32127  * Fixed sized types for on-disk VTOC
32128  */
32129 
32130 struct dk_vtoc {
32131 
32132  uint32_t v_bootinfo[3]; /* info for mboot (unsupported) */
32133  uint32_t v_sanity; /* to verify vtoc sanity */
32134  uint32_t v_version; /* layout version */
32135  char v_volume[8]; /* volume name */
32136  uint16_t v_sectorsz; /* sector size in bytes */
32137  uint16_t v_nparts; /* number of partitions */
32138  uint32_t v_reserved[10]; /* free space */
32139  struct dkl_partition v_part[16]; /* partition headers */
32140  time32_t timestamp[16]; /* partition timestamp (unsupported) */
32141  char v_asciilabel[128]; /* for compatibility    */
32142 # 154 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
32143 };
32144 
32145 /*
32146  * define the amount of disk label padding needed to make
32147  * the entire structure occupy 512 bytes.
32148  */
32149 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
32150 struct dk_label {
32151 
32152  struct dk_vtoc dkl_vtoc; /* vtoc inclusions from AT&T SVr4 */
32153  uint32_t dkl_pcyl; /* # of physical cylinders */
32154  uint32_t dkl_ncyl; /* # of data cylinders */
32155  uint16_t dkl_acyl; /* # of alternate cylinders */
32156  uint16_t dkl_bcyl; /* cyl offset (for fixed head area) */
32157  uint32_t dkl_nhead; /* # of heads */
32158  uint32_t dkl_nsect; /* # of data sectors per track */
32159  uint16_t dkl_intrlv; /* interleave factor */
32160  uint16_t dkl_skew; /* skew factor */
32161  uint16_t dkl_apc; /* alternates per cyl (SCSI only)   */
32162  uint16_t dkl_rpm; /* revolutions per minute */
32163  uint16_t dkl_write_reinstruct; /* # sectors to skip, writes */
32164  uint16_t dkl_read_reinstruct; /* # sectors to skip, reads  */
32165  uint16_t dkl_extra[4]; /* for compatible expansion */
32166  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 */
32167 # 217 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
32168  uint16_t dkl_magic; /* identifies this label format */
32169  uint16_t dkl_cksum; /* xor checksum of sector */
32170 };
32171 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
32172 struct fk_label { /* DOS floppy label */
32173  uchar_t fkl_type;
32174  uchar_t fkl_magich;
32175  uchar_t fkl_magicl;
32176  uchar_t filler;
32177 };
32178 
32179 /*
32180  * Layout of stored fabricated device id  (on-disk)
32181  */
32182 
32183 
32184 
32185 
32186 
32187 struct dk_devid {
32188  uchar_t dkd_rev_hi; /* revision (MSB) */
32189  uchar_t dkd_rev_lo; /* revision (LSB) */
32190  uchar_t dkd_flags; /* flags (not used yet) */
32191  uchar_t dkd_devid[((512) - ((sizeof (uchar_t) * 7)))]; /* devid stored here */
32192  uchar_t dkd_checksum3; /* checksum (MSB) */
32193  uchar_t dkd_checksum2;
32194  uchar_t dkd_checksum1;
32195  uchar_t dkd_checksum0; /* checksum (LSB) */
32196 };
32197 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h" 2
32198 
32199 
32200 
32201 
32202 
32203 /*
32204  *	Note:  the VTOC is not implemented fully, nor in the manner
32205  *	that AT&T implements it.  AT&T puts the vtoc structure
32206  *	into a sector, usually the second sector (pdsector is first).
32207  *
32208  *	Sun incorporates the tag, flag, version, and volume vtoc fields into
32209  *	its Disk Label, which already has some vtoc-equivalent fields.
32210  *	Upon reading the vtoc with read_vtoc(), the following exceptions
32211  *	occur:
32212  *		v_bootinfo [all]	returned as zero
32213  *		v_sanity		returned as VTOC_SANE
32214  *						if Disk Label was sane
32215  *		v_sectorsz		returned as 512
32216  *		v_reserved [all]	retunred as zero
32217  *		timestamp [all]		returned as zero
32218  *
32219  *	See  dklabel.h, read_vtoc(), and write_vtoc().
32220  */
32221 
32222 
32223      /* (from dkio.h) */
32224 
32225 
32226 
32227 
32228 
32229 /*
32230  * Partition identification tags
32231  */
32232 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h"
32233 /* Tags for EFI/GPT labels */
32234 
32235 
32236 
32237 
32238 
32239 
32240 /*
32241  * Partition permission flags
32242  */
32243 
32244 
32245 
32246 /*
32247  * error codes for reading & writing vtoc
32248  */
32249 
32250 
32251 
32252 
32253 
32254 
32255 
32256 struct partition {
32257  ushort_t p_tag; /* ID tag of partition */
32258  ushort_t p_flag; /* permission flags */
32259  daddr_t p_start; /* start sector no of partition */
32260  long p_size; /* # of blocks in partition */
32261 };
32262 
32263 struct vtoc {
32264  unsigned long v_bootinfo[3]; /* info needed by mboot (unsupported) */
32265  unsigned long v_sanity; /* to verify vtoc sanity */
32266  unsigned long v_version; /* layout version */
32267  char v_volume[8]; /* volume name */
32268  ushort_t v_sectorsz; /* sector size in bytes */
32269  ushort_t v_nparts; /* number of partitions */
32270  unsigned long v_reserved[10]; /* free space */
32271  struct partition v_part[16]; /* partition headers */
32272  time_t timestamp[16]; /* partition timestamp (unsupported) */
32273  char v_asciilabel[128]; /* for compatibility */
32274 };
32275 
32276 struct extpartition {
32277  ushort_t p_tag; /* ID tag of partition */
32278  ushort_t p_flag; /* permission flags */
32279  ushort_t p_pad[2];
32280  diskaddr_t p_start; /* start sector no of partition */
32281  diskaddr_t p_size; /* # of blocks in partition */
32282 };
32283 
32284 
32285 struct extvtoc {
32286  uint64_t v_bootinfo[3]; /* info needed by mboot (unsupported) */
32287  uint64_t v_sanity; /* to verify vtoc sanity */
32288  uint64_t v_version; /* layout version */
32289  char v_volume[8]; /* volume name */
32290  ushort_t v_sectorsz; /* sector size in bytes */
32291  ushort_t v_nparts; /* number of partitions */
32292  ushort_t pad[2];
32293  uint64_t v_reserved[10];
32294  struct extpartition v_part[16]; /* partition headers */
32295  uint64_t timestamp[16]; /* partition timestamp (unsupported) */
32296  char v_asciilabel[128]; /* for compatibility */
32297 };
32298 # 334 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h"
32299 /*
32300  * These defines are the mode parameter for the checksum routines.
32301  */
32302 
32303 
32304 
32305 extern int read_vtoc(int, struct vtoc *);
32306 extern int write_vtoc(int, struct vtoc *);
32307 extern int read_extvtoc(int, struct extvtoc *);
32308 extern int write_extvtoc(int, struct extvtoc *);
32309 # 33 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32310 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
32311 /*
32312  * CDDL HEADER START
32313  *
32314  * The contents of this file are subject to the terms of the
32315  * Common Development and Distribution License (the "License").
32316  * You may not use this file except in compliance with the License.
32317  *
32318  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32319  * or http://www.opensolaris.org/os/licensing.
32320  * See the License for the specific language governing permissions
32321  * and limitations under the License.
32322  *
32323  * When distributing Covered Code, include this CDDL HEADER in each
32324  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32325  * If applicable, add the following below this CDDL HEADER, with the
32326  * fields enclosed by brackets "[]" replaced with your own identifying
32327  * information: Portions Copyright [yyyy] [name of copyright owner]
32328  *
32329  * CDDL HEADER END
32330  */
32331 
32332 /*
32333  * Copyright (c) 2013 Gary Mills
32334  *
32335  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
32336  * Use is subject to license terms.
32337  */
32338 
32339 /*	Copyright (c) 1988 AT&T	*/
32340 /*	  All Rights Reserved  	*/
32341 # 34 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32342 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
32343 /*
32344  * CDDL HEADER START
32345  *
32346  * The contents of this file are subject to the terms of the
32347  * Common Development and Distribution License (the "License").
32348  * You may not use this file except in compliance with the License.
32349  *
32350  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32351  * or http://www.opensolaris.org/os/licensing.
32352  * See the License for the specific language governing permissions
32353  * and limitations under the License.
32354  *
32355  * When distributing Covered Code, include this CDDL HEADER in each
32356  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32357  * If applicable, add the following below this CDDL HEADER, with the
32358  * fields enclosed by brackets "[]" replaced with your own identifying
32359  * information: Portions Copyright [yyyy] [name of copyright owner]
32360  *
32361  * CDDL HEADER END
32362  */
32363 
32364 /*
32365  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
32366  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
32367  */
32368 
32369 /*	Copyright (c) 1988 AT&T	*/
32370 /*	  All Rights Reserved  	*/
32371 
32372 /*
32373  * User-visible pieces of the ANSI C standard I/O package.
32374  */
32375 # 35 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32376 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
32377 /*
32378  * CDDL HEADER START
32379  *
32380  * The contents of this file are subject to the terms of the
32381  * Common Development and Distribution License (the "License").
32382  * You may not use this file except in compliance with the License.
32383  *
32384  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32385  * or http://www.opensolaris.org/os/licensing.
32386  * See the License for the specific language governing permissions
32387  * and limitations under the License.
32388  *
32389  * When distributing Covered Code, include this CDDL HEADER in each
32390  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32391  * If applicable, add the following below this CDDL HEADER, with the
32392  * fields enclosed by brackets "[]" replaced with your own identifying
32393  * information: Portions Copyright [yyyy] [name of copyright owner]
32394  *
32395  * CDDL HEADER END
32396  */
32397 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
32398 /*	  All Rights Reserved  	*/
32399 
32400 /*
32401  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
32402  * Use is subject to license terms.
32403  */
32404 # 36 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32405 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
32406 /*
32407  * CDDL HEADER START
32408  *
32409  * The contents of this file are subject to the terms of the
32410  * Common Development and Distribution License, Version 1.0 only
32411  * (the "License").  You may not use this file except in compliance
32412  * with the License.
32413  *
32414  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32415  * or http://www.opensolaris.org/os/licensing.
32416  * See the License for the specific language governing permissions
32417  * and limitations under the License.
32418  *
32419  * When distributing Covered Code, include this CDDL HEADER in each
32420  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32421  * If applicable, add the following below this CDDL HEADER, with the
32422  * fields enclosed by brackets "[]" replaced with your own identifying
32423  * information: Portions Copyright [yyyy] [name of copyright owner]
32424  *
32425  * CDDL HEADER END
32426  */
32427 /*
32428  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
32429  */
32430 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
32431 /*	  All Rights Reserved  	*/
32432 # 37 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32433 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/valtools.h" 1
32434 /*
32435  * CDDL HEADER START
32436  *
32437  * The contents of this file are subject to the terms of the
32438  * Common Development and Distribution License, Version 1.0 only
32439  * (the "License").  You may not use this file except in compliance
32440  * with the License.
32441  *
32442  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32443  * or http://www.opensolaris.org/os/licensing.
32444  * See the License for the specific language governing permissions
32445  * and limitations under the License.
32446  *
32447  * When distributing Covered Code, include this CDDL HEADER in each
32448  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32449  * If applicable, add the following below this CDDL HEADER, with the
32450  * fields enclosed by brackets "[]" replaced with your own identifying
32451  * information: Portions Copyright [yyyy] [name of copyright owner]
32452  *
32453  * CDDL HEADER END
32454  */
32455 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
32456 /*	  All Rights Reserved  	*/
32457 
32458 
32459 
32460 
32461 
32462 #pragma ident "%Z%%M%	%I%	%E% SMI"
32463 
32464 
32465 
32466 
32467 
32468 struct _choice_ {
32469  char *token;
32470  char *text;
32471  struct _choice_ *next;
32472 };
32473 
32474 struct _menu_ {
32475  char *label;
32476  int attr;
32477  short longest;
32478  short nchoices;
32479  struct _choice_
32480   *choice;
32481  char **invis;
32482 };
32483 
32484 typedef struct _menu_ CKMENU;
32485 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32486 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
32487 /*
32488  * CDDL HEADER START
32489  *
32490  * The contents of this file are subject to the terms of the
32491  * Common Development and Distribution License (the "License").
32492  * You may not use this file except in compliance with the License.
32493  *
32494  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32495  * or http://www.opensolaris.org/os/licensing.
32496  * See the License for the specific language governing permissions
32497  * and limitations under the License.
32498  *
32499  * When distributing Covered Code, include this CDDL HEADER in each
32500  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32501  * If applicable, add the following below this CDDL HEADER, with the
32502  * fields enclosed by brackets "[]" replaced with your own identifying
32503  * information: Portions Copyright [yyyy] [name of copyright owner]
32504  *
32505  * CDDL HEADER END
32506  */
32507 
32508 /*
32509  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
32510  * Use is subject to license terms.
32511  */
32512 
32513 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
32514 /* All Rights Reserved */
32515 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
32516 # 47 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h"
32517 /*
32518  * ckdate.c
32519  */
32520 extern int ckdate_err (char *fmt, char *error);
32521 extern int ckdate_hlp (char *fmt, char *help);
32522 extern int ckdate_val (char *fmt, char *input);
32523 extern int ckdate (char *date, char *fmt, char *defstr, char *error, char *help, char *prompt);
32524 
32525 
32526 /*
32527  * ckgid.c
32528  */
32529 extern int ckgid_dsp (void);
32530 extern int ckgid_val (char *grpnm);
32531 extern int ckgrpfile (void);
32532 extern void ckgid_err (int disp, char *error);
32533 extern void ckgid_hlp (int disp, char *help);
32534 extern int ckgid (char *gid, short disp, char *defstr, char *error, char *help, char *prompt);
32535 
32536 
32537 /*
32538  * ckint.c
32539  */
32540 extern int ckint_val (char *value, short base);
32541 extern void ckint_err (short base, char *error);
32542 extern void ckint_hlp (short base, char *help);
32543 extern int ckint (long *intval, short base, char *defstr, char *error, char *help, char *prompt);
32544 
32545 
32546 /*
32547  * ckitem.c
32548  */
32549 extern CKMENU *allocmenu (char *label, int attr);
32550 extern void ckitem_err (CKMENU *menup, char *error);
32551 extern void ckitem_hlp (CKMENU *menup, char *help);
32552 extern int ckitem (CKMENU *menup, char *item[], short max, char *defstr, char *error, char *help, char *prompt);
32553 
32554 
32555 extern int setitem (CKMENU *menup, char *choice);
32556 extern int setinvis (CKMENU *menup, char *choice);
32557 extern void printmenu (CKMENU *menup);
32558 
32559 /*
32560  * ckkeywd.c
32561  */
32562 extern int ckkeywd (char *strval, char *keyword[], char *defstr, char *error, char *help, char *prompt);
32563 
32564 
32565 /*
32566  * ckpath.c
32567  */
32568 extern int ckpath_stx (int pflags);
32569 extern int ckpath_val (char *path, int pflags);
32570 extern void ckpath_err (int pflags, char *error, char *input);
32571 extern void ckpath_hlp (int pflags, char *help);
32572 extern int ckpath (char *pathval, int pflags, char *defstr, char *error, char *help, char *prompt);
32573 
32574 
32575 /*
32576  * ckrange.c
32577  */
32578 extern void ckrange_err (long lower, long upper, int base, char *error);
32579 
32580 extern void ckrange_hlp (long lower, long upper, int base, char *help);
32581 extern int ckrange_val (long lower, long upper, int base, char *input);
32582 
32583 extern int ckrange (long *rngval, long lower, long upper, short base, char *defstr, char *error, char *help, char *prompt);
32584 
32585 
32586 
32587 /*
32588  * ckstr.c
32589  */
32590 extern int ckstr_val (char *regexp[], int length, char *input);
32591 extern void ckstr_err (char *regexp[], int length, char *error, char *input);
32592 
32593 extern void ckstr_hlp (char *regexp[], int length, char *help);
32594 extern int ckstr (char *strval, char *regexp[], int length, char *defstr, char *error, char *help, char *prompt);
32595 
32596 
32597 
32598 /*
32599  * cktime.c
32600  */
32601 extern int cktime_val (char *fmt, char *input);
32602 extern int cktime_err (char *fmt, char *error);
32603 extern int cktime_hlp (char *fmt, char *help);
32604 extern int fmtcheck (char *fmt);
32605 extern int cktime (char *tod, char *fmt, char *defstr, char *error, char *help, char *prompt);
32606 
32607 
32608 /*
32609  * ckuid.c
32610  */
32611 extern int ckuid_dsp (void);
32612 extern int ckuid_val (char *usrnm);
32613 extern int ckpwdfile (void);
32614 extern void ckuid_err (short disp, char *error);
32615 extern void ckuid_hlp (int disp, char *help);
32616 extern int ckuid (char *uid, short disp, char *defstr, char *error, char *help, char *prompt);
32617 
32618 
32619 /*
32620  * ckyorn.c
32621  */
32622 extern int ckyorn_val (char *str);
32623 extern void ckyorn_err (char *error);
32624 extern void ckyorn_hlp (char *help);
32625 extern int ckyorn (char *yorn, char *defstr, char *error, char *help, char *prompt);
32626 
32627 
32628 /*
32629  * devattr.c
32630  */
32631 extern char *devattr (char *device, char *attribute);
32632 
32633 /*
32634  * devreserv.c
32635  */
32636 extern char *_rsvtabpath (void);
32637 extern int _openlkfile (void);
32638 extern int _closelkfile (void);
32639 extern int unreserv (long key, char *device);
32640 extern char **devreserv (long key, char **rsvlst[]);
32641 extern int devfree (long key, char *device);
32642 extern struct reservdev **reservdev (void);
32643 
32644 /*
32645  * devtab.c
32646  */
32647 extern void _setdevtab (void);
32648 extern void _enddevtab (void);
32649 extern char *_devtabpath (void);
32650 extern int _opendevtab (char *mode);
32651 extern int _validalias (char *alias);
32652 extern struct devtabent *_getdevtabent (void);
32653 extern void _freedevtabent (struct devtabent *ent);
32654 extern struct devtabent *_getdevrec (char *device);
32655 
32656 /*
32657  * dgrpent.c
32658  */
32659 extern void _setdgrptab (void);
32660 extern void _enddgrptab (void);
32661 extern char *_dgrptabpath (void);
32662 extern int _opendgrptab (char *mode);
32663 extern struct dgrptabent *_getdgrptabent (void);
32664 extern void _freedgrptabent (struct dgrptabent *ent);
32665 extern struct dgrptabent *_getdgrprec (char *dgroup);
32666 
32667 /*
32668  * fulldevnm.c
32669  */
32670 extern char *getfullblkname (char *cp);
32671 extern char *getfullrawname (char *cp);
32672 
32673 /*
32674  * getdev.c
32675  */
32676 extern char **getdev (char **devices, char **criteria, int options);
32677 
32678 /*
32679  * getdgrp.c
32680  */
32681 extern char **getdgrp (char **dgroups, char **criteria, int options);
32682 
32683 /*
32684  * getinput.c
32685  */
32686 extern int getinput (char *s);
32687 
32688 /*
32689  * getvol.c
32690  */
32691 extern int getvol (char *device, char *label, int options, char *prompt);
32692 
32693 extern int _getvol (char *device, char *label, int options, char *prompt, char *norewind);
32694 
32695 extern void doremovecmd (char *device, int echo);
32696 
32697 /*
32698  * listdev.c
32699  */
32700 extern char **listdev (char *device);
32701 
32702 /*
32703  * listdgrp.c
32704  */
32705 extern char **listdgrp (char *dgroup);
32706 
32707 /*
32708  * memory.c
32709  */
32710 extern long sysmem (void);
32711 extern long asysmem (void);
32712 
32713 /*
32714  * pkginfo.c
32715  */
32716 extern int pkginfo (struct pkginfo *info, char *pkginst, ...);
32717 extern int fpkginfo (struct pkginfo *info, char *pkginst);
32718 extern char *fpkginst (char *pkg, ...);
32719 
32720 /*
32721  * pkgnmchk.c
32722  */
32723 extern int pkgnmchk (register char *pkg, register char *spec, int presvr4flg);
32724 
32725 extern void set_ABI_namelngth (void);
32726 extern int get_ABI_namelngth (void);
32727 
32728 /*
32729  * pkgparam.c
32730  */
32731 extern char *fpkgparam (FILE *fp, char *param);
32732 extern char *pkgparam (char *pkg, char *param);
32733 extern void set_PKGpaths (char *path);
32734 extern char *get_PKGLOC (void);
32735 extern char *get_PKGADM (void);
32736 extern void set_PKGADM(char *newpath);
32737 extern void set_PKGLOC(char *newpath);
32738 
32739 /*
32740  * putdev.c
32741  */
32742 extern int _putdevtabrec (FILE *stream, struct devtabent *rec);
32743 extern int _adddevtabrec (char *alias, char **attrval);
32744 extern int _moddevtabrec (char *device, char **attrval);
32745 extern int _rmdevtabrec (char *device);
32746 extern int _rmdevtabattrs (char *device, char **attributes, char ***notfounds);
32747 
32748 
32749 /*
32750  * putdgrp.c
32751  */
32752 extern int _putdgrptabrec (FILE *stream, struct dgrptabent *rec);
32753 extern int _adddgrptabrec (char *dgrp, char **members);
32754 extern int _rmdgrptabrec (char *dgrp);
32755 extern int _rmdgrpmems (char *dgrp, char **mems, char ***notfounds);
32756 
32757 /*
32758  * puterror.c
32759  */
32760 extern void puterror (FILE *fp, char *defmesg, char *error);
32761 
32762 /*
32763  * puthelp.c
32764  */
32765 extern void puthelp (FILE *fp, char *defmesg, char *help);
32766 
32767 /*
32768  * putprmpt.c
32769  */
32770 extern void putprmpt (FILE *fp, char *prompt, char *choices[], char *defstr);
32771 
32772 
32773 /*
32774  * puttext.c
32775  */
32776 extern int puttext (FILE *fp, char *str, int lmarg, int rmarg);
32777 
32778 /*
32779  * rdwr_vtoc.c
32780  */
32781 extern int read_vtoc (int fd, struct vtoc *vtoc);
32782 extern int write_vtoc (int fd, struct vtoc *vtoc);
32783 # 53 "open_package_datastream.c" 2
32784 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h" 1
32785 /*
32786  * CDDL HEADER START
32787  *
32788  * The contents of this file are subject to the terms of the
32789  * Common Development and Distribution License (the "License").
32790  * You may not use this file except in compliance with the License.
32791  *
32792  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32793  * or http://www.opensolaris.org/os/licensing.
32794  * See the License for the specific language governing permissions
32795  * and limitations under the License.
32796  *
32797  * When distributing Covered Code, include this CDDL HEADER in each
32798  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32799  * If applicable, add the following below this CDDL HEADER, with the
32800  * fields enclosed by brackets "[]" replaced with your own identifying
32801  * information: Portions Copyright [yyyy] [name of copyright owner]
32802  *
32803  * CDDL HEADER END
32804  */
32805 
32806 /*
32807  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
32808  */
32809 
32810 
32811 
32812 
32813 
32814 /*
32815  * Module:	messages
32816  * Group:	pkg commands
32817  * Description: l10n strings for all pkg commands
32818  */
32819 # 44 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32820 /* BEGIN CSTYLED */
32821 
32822 /*
32823  * I18N: these messages are questions asked of the user
32824  */
32825 # 57 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32826 /*
32827  * I18N: these messages are debugging message and are only displayed
32828  * when special debugging output has been enabled - these messages
32829  * will never be displayed during normal product usage
32830  */
32831 # 401 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32832 /*
32833  * I18N: these messages are error messages that can be displayed
32834  * during the normal usage of the products
32835  */
32836 # 675 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32837 /*
32838  * I18N: these messages are help messages that are displayed when the
32839  * user answers a question with "?" - asking for help to be displayed
32840  */
32841 # 852 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32842 /*
32843  * These messages are output by qreason() - they are the "reason"
32844  * for the success/fail of the operation
32845  */
32846 # 980 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32847 /* WITH ZONE NAME */
32848 # 1175 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32849 /*
32850  * I18N: MSG_GZONLY_FILE_HEADER must NOT be translated!
32851  * ----- This message is placed at the beginning of an internal (private)
32852  * ----- database file. The contents of the message is a warning telling
32853  * ----- anyone who examines the contents of the database to not modify the
32854  * ----- database manually (by hand).
32855  * ----- Do NOT change or translate this text!
32856  */
32857 # 1191 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/messages.h"
32858 /* END CSTYLED */
32859 # 54 "open_package_datastream.c" 2
32860 
32861 /*
32862  * *****************************************************************************
32863  * global external (public) functions
32864  * *****************************************************************************
32865  */
32866 
32867 /*
32868  * open package datastream
32869  * Arguments:	a_argc - (int) - [RO, *RO]
32870  *			- number of arguments available in a_argv
32871  *		a_argv - (char **) - [RO, *RO]
32872  *			- arguments representing package names to add
32873  *		a_spoolDir - (char *) - [RO, *RO]
32874  *			- directory to write the package (spool) into
32875  *			- if == (char *)NULL then install the packages
32876  *			- if != (char *)NULL then write packages into directory
32877  *		a_device - (char *) - [RO, *RO]
32878  *			- device to read packages from when spooling
32879  *			- ignored if a_spoolDir == (char *)NULL
32880  *		r_repeat - (int *) - [RO, *RW]
32881  *			- set == 0 if no further package names in argc/argv
32882  *			- set != 0 IF there are package names in argc/argv
32883  *			- if == (int *)NULL - not set
32884  *		r_idsName - (char **) - [RW, *RW]
32885  *			- set to the name of package input data stream device
32886  *			- if == (char *)NULL - no input data stream; that is,
32887  *			-- the packages are in a directory and not in a stream
32888  *			- if != (char *)NULL - this is the device/file that
32889  *			-- is the datastream that contains the packages to add
32890  *		a_pkgdev - (struct pkgdev *) - [RO, *RW]
32891  *			- pkgdev structure containing package device to open
32892  * Returns:	B_TRUE - datastream opened successfully
32893  *		B_FALSE - datastream failed to open
32894  */
32895 
32896 boolean_t
32897 open_package_datastream(int a_argc, char **a_argv, char *a_spoolDir,
32898  char *a_device, int *r_repeat, char **r_idsName, char *a_tmpdir,
32899  struct pkgdev *a_pkgdev, int a_optind)
32900 {
32901  int n;
32902 
32903  /* entry assertions */
32904 
32905  (void)((a_argv != (char **)0) || (__assert("a_argv != (char **)NULL", "open_package_datastream.c", 99), 0));
32906  (void)((r_idsName != (char **)0) || (__assert("r_idsName != (char **)NULL", "open_package_datastream.c", 100), 0));
32907  (void)((a_tmpdir != (char *)0) || (__assert("a_tmpdir != (char *)NULL", "open_package_datastream.c", 101), 0));
32908  (void)((a_pkgdev != (struct pkgdev *)0) || (__assert("a_pkgdev != (struct pkgdev *)NULL", "open_package_datastream.c", 102), 0));
32909 
32910  /* entry debug information */
32911 
32912  echoDebug(gettext("open_package_datastream:"));
32913  echoDebug(gettext("bdevice <%s> cdevice <%s> pathname <%s> argc <%d> spool-device <%s>"),
32914    a_pkgdev->bdevice ? a_pkgdev->bdevice : "?",
32915    a_pkgdev->cdevice ? a_pkgdev->cdevice : "?",
32916    a_pkgdev->pathname ? a_pkgdev->pathname : "?",
32917    a_argc, a_device ? a_device : "?");
32918 
32919  /* reset possible return values to defaults */
32920 
32921  *r_idsName = (char *)0;
32922  if (r_repeat != (int *)0) {
32923   *r_repeat = 0;
32924  }
32925 
32926  /*
32927 	 * Determine how to access the package source "device":
32928 	 * - if a block device is associated with the source:
32929 	 * -- make sure the next "volume" is mounted and ready.
32930 	 * -- input data stream is associated character device
32931 	 * - if char device but no block device associated with device:
32932 	 * -- input data stream is associated character device
32933 	 * - else if a path is associated with device:
32934 	 * -- input data stream is associated path
32935 	 */
32936 
32937  if (a_pkgdev->bdevice != (char *)0) {
32938   /* package source is block device */
32939 
32940   /*
32941 		 * _getvol verifies that the specified device is accessible and
32942 		 * that a volume of the appropriate medium has been inserted.
32943 		 * _getvol is in libadm.h - delivered by ON as part of SUNWcsl
32944 		 * is somewhat analagous to getvol(1M) - args are:
32945 		 *  - char *device
32946 		 *  - char *label
32947 		 *  - int options
32948 		 *  - char *prompt
32949 		 *  - char *norewind - no rewind device (NULL to use device)
32950 		 * Returns:
32951 		 *	0 - okay, label matches
32952 		 *	1 - device not accessable
32953 		 *	2 - unknown device (devattr failed)
32954 		 *	3 - user selected quit
32955 		 *	4 - label does not match
32956 		 */
32957 
32958   echoDebug(gettext("package source is block device <%s>"), a_pkgdev->bdevice);
32959 
32960   n = _getvol(a_pkgdev->bdevice, 0, 0L,
32961     gettext("Insert %v into %p."), a_pkgdev->norewind);
32962 
32963   switch (n) {
32964   case 0: /* volume open, label matches */
32965    if (ds_readbuf(a_pkgdev->cdevice)) {
32966     (*r_idsName) = a_pkgdev->cdevice;
32967    }
32968    break;
32969   case 3: /* user selected quit */
32970    quit(3);
32971    /* NOTREACHED */
32972   case 2: /* unknown device (devattr failed) */
32973    progerr(gettext("unknown device <%s>"), a_pkgdev->name);
32974    quit(99);
32975    /* NOTREACHED */
32976   default: /* device not accessable */
32977    progerr(gettext("unable to obtain package volume"));
32978    logerr(gettext("getvol() returned <%d>"), n);
32979    quit(99);
32980    /* NOTREACHED */
32981   }
32982  } else if (a_pkgdev->cdevice != (char *)0) {
32983   /* package source is character device */
32984 
32985   echoDebug(gettext("package source is character device <%s>"), a_pkgdev->cdevice);
32986 
32987   (*r_idsName) = a_pkgdev->cdevice;
32988  } else if (a_pkgdev->pathname != (char *)0) {
32989   /* package source is path name to file */
32990 
32991   echoDebug(gettext("package source is ordinary file <%s>"), a_pkgdev->pathname);
32992 
32993   (*r_idsName) = a_pkgdev->pathname;
32994  } else {
32995   echoDebug(gettext("package source not contained in a recognized datastream"));
32996  }
32997 
32998  /*
32999 	 * If writing the packages into a spool directory instead of
33000 	 * installing the packages, invoke pkgtrans to perform the
33001 	 * conversion and exit.
33002 	 */
33003 
33004  if (a_spoolDir) {
33005   return (B_TRUE);
33006  }
33007 
33008  /* create temp dir for op if input data stream specified */
33009 
33010  if (*r_idsName) {
33011   /*
33012 		 * initialize datastream,
33013 		 * dirname is set to directory where package is unstreamed
33014 		 */
33015   if (setup_temporary_directory(&a_pkgdev->dirname, a_tmpdir,
33016    "dstream") == B_FALSE) {
33017    progerr(gettext("unable to make temporary directory to unpack datastream: %s"), strerror((*(___errno()))));
33018    quit(99);
33019    /* NOTREACHED */
33020   }
33021  }
33022 
33023  if (r_repeat != (int *)0) {
33024   *r_repeat = (a_optind >= a_argc);
33025  }
33026 
33027  /*
33028 	 * mount source device (e.g. floppy) if no input data stream
33029 	 * specified, and the package source device is mountable. If
33030 	 * the pkgmount fails, go back and try to mount the package
33031 	 * source again. When a package is split up into multiple
33032 	 * volumes (such as floppies), it might be possible to go back
33033 	 * and insert a different copy of the required volume/floppy
33034 	 * if the current one cannot be mounted. Otherwise this could
33035 	 * have just called quit() if the mount failed...
33036 	 */
33037 
33038  if (((*r_idsName) == (char *)0) && a_pkgdev->mount) {
33039   echoDebug(gettext("mounting package datastream device <%s> on <%s>"), *r_idsName,
33040        a_pkgdev->mount);
33041   a_pkgdev->rdonly++;
33042   n = pkgmount(a_pkgdev, 0, 0, 0, 0);
33043   if (n != 0) {
33044    /* pkgmount failed */
33045    return (B_FALSE);
33046   }
33047  }
33048 
33049  /*
33050 	 * open and initialize input data stream if specified
33051 	 */
33052 
33053  if ((*r_idsName) != (char *)0) {
33054   echoDebug(gettext("initializing package datastream <%s>"), *r_idsName);
33055 
33056   /* use character device to force rewind of datastream */
33057   if ((a_pkgdev->cdevice != (char *)0) &&
33058    (a_pkgdev->bdevice == (char *)0)) {
33059    n = _getvol(a_pkgdev->name, 0, 0L, 0,
33060      a_pkgdev->norewind);
33061 
33062    switch (n) {
33063    case 0: /* volume open, label matches */
33064     break;
33065    case 3: /* user selected quit */
33066     quit(3);
33067     /* NOTREACHED */
33068    case 2: /* unknown device (devattr failed) */
33069     progerr(gettext("unknown device <%s>"), a_pkgdev->name);
33070     quit(99);
33071     /* NOTREACHED */
33072    default:
33073     progerr(gettext("unable to obtain package volume"));
33074     logerr(gettext("getvol() returned <%d>"), n);
33075     quit(99);
33076     /* NOTREACHED */
33077    }
33078   }
33079 
33080   if (chdir(a_pkgdev->dirname)) {
33081    progerr(gettext("unable to change current working directory to <%s>"), a_pkgdev->dirname);
33082    quit(99);
33083    /* NOTREACHED */
33084   }
33085 
33086   /*
33087 		 * initialize datastream for subsequent installation;
33088 		 * read the source device;
33089 		 * aquire the header data and check it for validity;
33090 		 * creates subdirectories in package stream directory
33091 		 * (a_pkgdev->dirname) for each package and retrieves each
33092 		 * packages pkginfo and pkgmap files
33093 		 */
33094 
33095   if (ds_init(*r_idsName, &a_argv[a_optind],
33096       a_pkgdev->norewind)) {
33097    progerr(gettext("could not process datastream from <%s>"), *r_idsName);
33098    quit(99);
33099    /* NOTREACHED */
33100   }
33101  }
33102 
33103  return (B_TRUE);
33104 }
33105