1 # 1 "quit.c"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "quit.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 1993 Sun Microsystems, Inc.  All rights reserved.
28  * Use is subject to license terms.
29  */
30 
31 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
32 /* All Rights Reserved */
33 
34 
35 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
36 /*
37  * CDDL HEADER START
38  *
39  * The contents of this file are subject to the terms of the
40  * Common Development and Distribution License (the "License").
41  * You may not use this file except in compliance with the License.
42  *
43  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
44  * or http://www.opensolaris.org/os/licensing.
45  * See the License for the specific language governing permissions
46  * and limitations under the License.
47  *
48  * When distributing Covered Code, include this CDDL HEADER in each
49  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
50  * If applicable, add the following below this CDDL HEADER, with the
51  * fields enclosed by brackets "[]" replaced with your own identifying
52  * information: Portions Copyright [yyyy] [name of copyright owner]
53  *
54  * CDDL HEADER END
55  */
56 
57 /*
58  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
59  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
60  */
61 
62 /*	Copyright (c) 1988 AT&T	*/
63 /*	  All Rights Reserved  	*/
64 
65 /*
66  * User-visible pieces of the ANSI C standard I/O package.
67  */
68 
69 
70 
71 
72 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
73 /*
74  * CDDL HEADER START
75  *
76  * The contents of this file are subject to the terms of the
77  * Common Development and Distribution License (the "License").
78  * You may not use this file except in compliance with the License.
79  *
80  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
81  * or http://www.opensolaris.org/os/licensing.
82  * See the License for the specific language governing permissions
83  * and limitations under the License.
84  *
85  * When distributing Covered Code, include this CDDL HEADER in each
86  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
87  * If applicable, add the following below this CDDL HEADER, with the
88  * fields enclosed by brackets "[]" replaced with your own identifying
89  * information: Portions Copyright [yyyy] [name of copyright owner]
90  *
91  * CDDL HEADER END
92  */
93 
94 /*
95  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
96  * Copyright 2016 Joyent, Inc.
97  *
98  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
99  * Use is subject to license terms.
100  */
101 
102 
103 
104 
105 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h" 1
106 /*
107  * CDDL HEADER START
108  *
109  * The contents of this file are subject to the terms of the
110  * Common Development and Distribution License, Version 1.0 only
111  * (the "License").  You may not use this file except in compliance
112  * with the License.
113  *
114  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
115  * or http://www.opensolaris.org/os/licensing.
116  * See the License for the specific language governing permissions
117  * and limitations under the License.
118  *
119  * When distributing Covered Code, include this CDDL HEADER in each
120  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
121  * If applicable, add the following below this CDDL HEADER, with the
122  * fields enclosed by brackets "[]" replaced with your own identifying
123  * information: Portions Copyright [yyyy] [name of copyright owner]
124  *
125  * CDDL HEADER END
126  */
127 /*
128  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
129  * Use is subject to license terms.
130  */
131 /*
132  * Copyright 2015 EveryCity Ltd. All rights reserved.
133  */
134 
135 
136 
137 
138 /*
139  * This file contains definitions designed to enable different compilers
140  * to be used harmoniously on Solaris systems.
141  */
142 
143 
144 
145 
146 
147 /*
148  * Allow for version tests for compiler bugs and features.
149  */
150 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
151 /*
152  * analogous to lint's PRINTFLIKEn
153  */
154 
155 
156 
157 
158 
159 /*
160  * Handle the kernel printf routines that can take '%b' too
161  */
162 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
163 /*
164  * This one's pretty obvious -- the function never returns
165  */
166 
167 
168 /*
169  * The function is 'extern inline' and expects GNU C89 behaviour, not C99
170  * behaviour.
171  *
172  * Should only be used on 'extern inline' definitions for GCC.
173  */
174 
175 
176 
177 
178 
179 
180 /*
181  * The function has control flow such that it may return multiple times (in
182  * the manner of setjmp or vfork)
183  */
184 
185 
186 
187 
188 
189 
190 /*
191  * This is an appropriate label for functions that do not
192  * modify their arguments, e.g. strlen()
193  */
194 
195 
196 /*
197  * This is a stronger form of __pure__. Can be used for functions
198  * that do not modify their arguments and don't depend on global
199  * memory.
200  */
201 
202 
203 
204 
205 /*
206  * This attribute, attached to a variable, means that the variable is meant to
207  * be possibly unused. GCC will not produce a warning for this variable.
208  */
209 # 138 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
210 /*
211  * Shorthand versions for readability
212  */
213 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
214 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
215 /*
216  * CDDL HEADER START
217  *
218  * The contents of this file are subject to the terms of the
219  * Common Development and Distribution License (the "License").
220  * You may not use this file except in compliance with the License.
221  *
222  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
223  * or http://www.opensolaris.org/os/licensing.
224  * See the License for the specific language governing permissions
225  * and limitations under the License.
226  *
227  *
228  * When distributing Covered Code, include this CDDL HEADER in each
229  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
230  * If applicable, add the following below this CDDL HEADER, with the
231  * fields enclosed by brackets "[]" replaced with your own identifying
232  * information: Portions Copyright [yyyy] [name of copyright owner]
233  *
234  * CDDL HEADER END
235  */
236 
237 /*
238  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
239  * Use is subject to license terms.
240  * Copyright 2016 Joyent, Inc.
241  */
242 
243 
244 
245 
246 /*
247  * This header file serves to group a set of well known defines and to
248  * set these for each instruction set architecture.  These defines may
249  * be divided into two groups;  characteristics of the processor and
250  * implementation choices for Solaris on a processor.
251  *
252  * Processor Characteristics:
253  *
254  * _LITTLE_ENDIAN / _BIG_ENDIAN:
255  *	The natural byte order of the processor.  A pointer to an int points
256  *	to the least/most significant byte of that int.
257  *
258  * _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
259  *	The processor specific direction of stack growth.  A push onto the
260  *	stack increases/decreases the stack pointer, so it stores data at
261  *	successively higher/lower addresses.  (Stackless machines ignored
262  *	without regrets).
263  *
264  * _LONG_LONG_HTOL / _LONG_LONG_LTOH:
265  *	A pointer to a long long points to the most/least significant long
266  *	within that long long.
267  *
268  * _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
269  *	The C compiler assigns bit fields from the high/low to the low/high end
270  *	of an int (most to least significant vs. least to most significant).
271  *
272  * _IEEE_754:
273  *	The processor (or supported implementations of the processor)
274  *	supports the ieee-754 floating point standard.  No other floating
275  *	point standards are supported (or significant).  Any other supported
276  *	floating point formats are expected to be cased on the ISA processor
277  *	symbol.
278  *
279  * _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
280  *	The C Compiler implements objects of type `char' as `unsigned' or
281  *	`signed' respectively.  This is really an implementation choice of
282  *	the compiler writer, but it is specified in the ABI and tends to
283  *	be uniform across compilers for an instruction set architecture.
284  *	Hence, it has the properties of a processor characteristic.
285  *
286  * _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
287  * _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
288  * _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
289  *	The ABI defines alignment requirements of each of the primitive
290  *	object types.  Some, if not all, may be hardware requirements as
291  * 	well.  The values are expressed in "byte-alignment" units.
292  *
293  * _MAX_ALIGNMENT:
294  *	The most stringent alignment requirement as specified by the ABI.
295  *	Equal to the maximum of all the above _XXX_ALIGNMENT values.
296  *
297  * _MAX_ALIGNMENT_TYPE:
298  * 	The name of the C type that has the value descried in _MAX_ALIGNMENT.
299  *
300  * _ALIGNMENT_REQUIRED:
301  *	True or false (1 or 0) whether or not the hardware requires the ABI
302  *	alignment.
303  *
304  * _LONG_LONG_ALIGNMENT_32
305  *	The 32-bit ABI supported by a 64-bit kernel may have different
306  *	alignment requirements for primitive object types.  The value of this
307  *	identifier is expressed in "byte-alignment" units.
308  *
309  * _HAVE_CPUID_INSN
310  *	This indicates that the architecture supports the 'cpuid'
311  *	instruction as defined by Intel.  (Intel allows other vendors
312  *	to extend the instruction for their own purposes.)
313  *
314  *
315  * Implementation Choices:
316  *
317  * _ILP32 / _LP64:
318  *	This specifies the compiler data type implementation as specified in
319  *	the relevant ABI.  The choice between these is strongly influenced
320  *	by the underlying hardware, but is not absolutely tied to it.
321  *	Currently only two data type models are supported:
322  *
323  *	_ILP32:
324  *		Int/Long/Pointer are 32 bits.  This is the historical UNIX
325  *		and Solaris implementation.  Due to its historical standing,
326  *		this is the default case.
327  *
328  *	_LP64:
329  *		Long/Pointer are 64 bits, Int is 32 bits.  This is the chosen
330  *		implementation for 64-bit ABIs such as SPARC V9.
331  *
332  *	_I32LPx:
333  *		A compilation environment where 'int' is 32-bit, and
334  *		longs and pointers are simply the same size.
335  *
336  *	In all cases, Char is 8 bits and Short is 16 bits.
337  *
338  * _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
339  *	This specifies the form of the disk VTOC (or label):
340  *
341  *	_SUNOS_VTOC_8:
342  *		This is a VTOC form which is upwardly compatible with the
343  *		SunOS 4.x disk label and allows 8 partitions per disk.
344  *
345  *	_SUNOS_VTOC_16:
346  *		In this format the incore vtoc image matches the ondisk
347  *		version.  It allows 16 slices per disk, and is not
348  *		compatible with the SunOS 4.x disk label.
349  *
350  *	Note that these are not the only two VTOC forms possible and
351  *	additional forms may be added.  One possible form would be the
352  *	SVr4 VTOC form.  The symbol for that is reserved now, although
353  *	it is not implemented.
354  *
355  *	_SVR4_VTOC_16:
356  *		This VTOC form is compatible with the System V Release 4
357  *		VTOC (as implemented on the SVr4 Intel and 3b ports) with
358  *		16 partitions per disk.
359  *
360  *
361  * _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
362  *	This describes the type of addresses used by system DMA:
363  *
364  *	_DMA_USES_PHYSADDR:
365  *		This type of DMA, used in the x86 implementation,
366  *		requires physical addresses for DMA buffers.  The 24-bit
367  *		addresses used by some legacy boards is the source of the
368  *		"low-memory" (<16MB) requirement for some devices using DMA.
369  *
370  *	_DMA_USES_VIRTADDR:
371  *		This method of DMA allows the use of virtual addresses for
372  *		DMA transfers.
373  *
374  * _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
375  *      This indicates the presence/absence of an fdisk table.
376  *
377  *      _FIRMWARE_NEEDS_FDISK
378  *              The fdisk table is required by system firmware.  If present,
379  *              it allows a disk to be subdivided into multiple fdisk
380  *              partitions, each of which is equivalent to a separate,
381  *              virtual disk.  This enables the co-existence of multiple
382  *              operating systems on a shared hard disk.
383  *
384  *      _NO_FDISK_PRESENT
385  *              If the fdisk table is absent, it is assumed that the entire
386  *              media is allocated for a single operating system.
387  *
388  * _HAVE_TEM_FIRMWARE
389  *	Defined if this architecture has the (fallback) option of
390  *	using prom_* calls for doing I/O if a suitable kernel driver
391  *	is not available to do it.
392  *
393  * _DONT_USE_1275_GENERIC_NAMES
394  *		Controls whether or not device tree node names should
395  *		comply with the IEEE 1275 "Generic Names" Recommended
396  *		Practice. With _DONT_USE_GENERIC_NAMES, device-specific
397  *		names identifying the particular device will be used.
398  *
399  * __i386_COMPAT
400  *	This indicates whether the i386 ABI is supported as a *non-native*
401  *	mode for the platform.  When this symbol is defined:
402  *	-	32-bit xstat-style system calls are enabled
403  *	-	32-bit xmknod-style system calls are enabled
404  *	-	32-bit system calls use i386 sizes -and- alignments
405  *
406  *	Note that this is NOT defined for the i386 native environment!
407  *
408  * __x86
409  *	This is ONLY a synonym for defined(__i386) || defined(__amd64)
410  *	which is useful only insofar as these two architectures share
411  *	common attributes.  Analogous to __sparc.
412  *
413  * _PSM_MODULES
414  *	This indicates whether or not the implementation uses PSM
415  *	modules for processor support, reading /etc/mach from inside
416  *	the kernel to extract a list.
417  *
418  * _RTC_CONFIG
419  *	This indicates whether or not the implementation uses /etc/rtc_config
420  *	to configure the real-time clock in the kernel.
421  *
422  * _UNIX_KRTLD
423  *	This indicates that the implementation uses a dynamically
424  *	linked unix + krtld to form the core kernel image at boot
425  *	time, or (in the absence of this symbol) a prelinked kernel image.
426  *
427  * _OBP
428  *	This indicates the firmware interface is OBP.
429  *
430  * _SOFT_HOSTID
431  *	This indicates that the implementation obtains the hostid
432  *	from the file /etc/hostid, rather than from hardware.
433  */
434 
435 
436 
437 
438 
439 /*
440  * The following set of definitions characterize Solaris on AMD's
441  * 64-bit systems.
442  */
443 # 305 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
444 /*
445  * Define the appropriate "processor characteristics"
446  */
447 # 333 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
448 /*
449  * Define the appropriate "implementation choices".
450  */
451 # 351 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
452 /*
453  * The following set of definitions characterize the Solaris on SPARC systems.
454  *
455  * The symbol __sparc indicates any of the SPARC family of processor
456  * architectures.  This includes SPARC V7, SPARC V8 and SPARC V9.
457  *
458  * The symbol __sparcv8 indicates the 32-bit SPARC V8 architecture as defined
459  * by Version 8 of the SPARC Architecture Manual.  (SPARC V7 is close enough
460  * to SPARC V8 for the former to be subsumed into the latter definition.)
461  *
462  * The symbol __sparcv9 indicates the 64-bit SPARC V9 architecture as defined
463  * by Version 9 of the SPARC Architecture Manual.
464  *
465  * The symbols __sparcv8 and __sparcv9 are mutually exclusive, and are only
466  * relevant when the symbol __sparc is defined.
467  */
468 /*
469  * XXX Due to the existence of 5110166, "defined(__sparcv9)" needs to be added
470  * to support backwards builds.  This workaround should be removed in s10_71.
471  */
472 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
473 
474 
475 
476 
477 
478 /*
479  * Values of _POSIX_C_SOURCE
480  *
481  *		undefined   not a POSIX compilation
482  *		1	    POSIX.1-1990 compilation
483  *		2	    POSIX.2-1992 compilation
484  *		199309L	    POSIX.1b-1993 compilation (Real Time)
485  *		199506L	    POSIX.1c-1995 compilation (POSIX Threads)
486  *		200112L	    POSIX.1-2001 compilation (Austin Group Revision)
487  *		200809L     POSIX.1-2008 compilation
488  */
489 
490 
491 
492 
493 /*
494  * The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
495  * and _STDC_C99 are Sun implementation specific macros created in order to
496  * compress common standards specified feature test macros for easier reading.
497  * These macros should not be used by the application developer as
498  * unexpected results may occur. Instead, the user should reference
499  * standards(5) for correct usage of the standards feature test macros.
500  *
501  * __XOPEN_OR_POSIX     Used in cases where a symbol is defined by both
502  *                      X/Open or POSIX or in the negative, when neither
503  *                      X/Open or POSIX defines a symbol.
504  *
505  * _STRICT_STDC         __STDC__ is specified by the C Standards and defined
506  *                      by the compiler. For Sun compilers the value of
507  *                      __STDC__ is either 1, 0, or not defined based on the
508  *                      compilation mode (see cc(1)). When the value of
509  *                      __STDC__ is 1 and in the absence of any other feature
510  *                      test macros, the namespace available to the application
511  *                      is limited to only those symbols defined by the C
512  *                      Standard. _STRICT_STDC provides a more readable means
513  *                      of identifying symbols defined by the standard, or in
514  *                      the negative, symbols that are extensions to the C
515  *                      Standard. See additional comments for GNU C differences.
516  *
517  * _STDC_C99            __STDC_VERSION__ is specified by the C standards and
518  *                      defined by the compiler and indicates the version of
519  *                      the C standard. A value of 199901L indicates a
520  *                      compiler that complies with ISO/IEC 9899:1999, other-
521  *                      wise known as the C99 standard.
522  *
523  * _STDC_C11		Like _STDC_C99 except that the value of __STDC_VERSION__
524  *                      is 201112L indicating a compiler that compiles with
525  *                      ISO/IEXC 9899:2011, otherwise known as the C11 standard.
526  *
527  * _STRICT_SYMBOLS	Used in cases where symbol visibility is restricted
528  *                      by the standards, and the user has not explicitly
529  *                      relaxed the strictness via __EXTENSIONS__.
530  */
531 
532 
533 
534 
535 
536 /*
537  * ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
538  * 99899:2011 specify the following predefined macro name:
539  *
540  * __STDC__	The integer constant 1, intended to indicate a conforming
541  *		implementation.
542  *
543  * Furthermore, a strictly conforming program shall use only those features
544  * of the language and library specified in these standards. A conforming
545  * implementation shall accept any strictly conforming program.
546  *
547  * Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
548  * strictly conforming environments and __STDC__ to 0 for environments that
549  * use ANSI C semantics but allow extensions to the C standard. For non-ANSI
550  * C semantics, Sun's C compiler does not define __STDC__.
551  *
552  * The GNU C project interpretation is that __STDC__ should always be defined
553  * to 1 for compilation modes that accept ANSI C syntax regardless of whether
554  * or not extensions to the C standard are used. Violations of conforming
555  * behavior are conditionally flagged as warnings via the use of the
556  * -pedantic option. In addition to defining __STDC__ to 1, the GNU C
557  * compiler also defines __STRICT_ANSI__ as a means of specifying strictly
558  * conforming environments using the -ansi or -std=<standard> options.
559  *
560  * In the absence of any other compiler options, Sun and GNU set the value
561  * of __STDC__ as follows when using the following options:
562  *
563  *				Value of __STDC__  __STRICT_ANSI__
564  *
565  * cc -Xa (default)			0	      undefined
566  * cc -Xt (transitional)		0             undefined
567  * cc -Xc (strictly conforming)		1	      undefined
568  * cc -Xs (K&R C)		    undefined	      undefined
569  *
570  * gcc (default)			1	      undefined
571  * gcc -ansi, -std={c89, c99,...)  	1              defined
572  * gcc -traditional (K&R)	    undefined	      undefined
573  *
574  * The default compilation modes for Sun C compilers versus GNU C compilers
575  * results in a differing value for __STDC__ which results in a more
576  * restricted namespace when using Sun compilers. To allow both GNU and Sun
577  * interpretations to peacefully co-exist, we use the following Sun
578  * implementation _STRICT_STDC_ macro:
579  */
580 # 150 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
581 /*
582  * Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
583  */
584 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
585 /*
586  * Use strict symbol visibility.
587  */
588 
589 
590 
591 
592 
593 /*
594  * Large file interfaces:
595  *
596  *	_LARGEFILE_SOURCE
597  *		1		large file-related additions to POSIX
598  *				interfaces requested (fseeko, etc.)
599  *	_LARGEFILE64_SOURCE
600  *		1		transitional large-file-related interfaces
601  *				requested (seek64, stat64, etc.)
602  *
603  * The corresponding announcement macros are respectively:
604  *	_LFS_LARGEFILE
605  *	_LFS64_LARGEFILE
606  * (These are set in <unistd.h>.)
607  *
608  * Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
609  * well.
610  *
611  * The large file interfaces are made visible regardless of the initial values
612  * of the feature test macros under certain circumstances:
613  *    -	If no explicit standards-conforming environment is requested (neither
614  *	of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
615  *	__STDC__ does not imply standards conformance).
616  *    -	Extended system interfaces are explicitly requested (__EXTENSIONS__
617  * 	is defined).
618  *    -	Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
619  *	defined).  (Note that this dependency is an artifact of the current
620  *	kernel implementation and may change in future releases.)
621  */
622 # 210 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
623 /*
624  * Large file compilation environment control:
625  *
626  * The setting of _FILE_OFFSET_BITS controls the size of various file-related
627  * types and governs the mapping between file-related source function symbol
628  * names and the corresponding binary entry points.
629  *
630  * In the 32-bit environment, the default value is 32; if not set, set it to
631  * the default here, to simplify tests in other headers.
632  *
633  * In the 64-bit compilation environment, the only value allowed is 64.
634  */
635 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
636 /*
637  * Use of _XOPEN_SOURCE
638  *
639  * The following X/Open specifications are supported:
640  *
641  * X/Open Portability Guide, Issue 3 (XPG3)
642  * X/Open CAE Specification, Issue 4 (XPG4)
643  * X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
644  * X/Open CAE Specification, Issue 5 (XPG5)
645  * Open Group Technical Standard, Issue 6 (XPG6), also referred to as
646  *    IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
647  * Open Group Technical Standard, Issue 7 (XPG7), also referred to as
648  *    IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
649  *
650  * XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
651  * XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
652  *     Version 2 (SUSv2)
653  * XPG6 is the result of a merge of the X/Open and POSIX specifications
654  *     and as such is also referred to as IEEE Std. 1003.1-2001 in
655  *     addition to UNIX 03 and SUSv3.
656  * XPG7 is also referred to as UNIX 08 and SUSv4.
657  *
658  * When writing a conforming X/Open application, as per the specification
659  * requirements, the appropriate feature test macros must be defined at
660  * compile time. These are as follows. For more info, see standards(5).
661  *
662  * Feature Test Macro				     Specification
663  * ------------------------------------------------  -------------
664  * _XOPEN_SOURCE                                         XPG3
665  * _XOPEN_SOURCE && _XOPEN_VERSION = 4                   XPG4
666  * _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1           XPG4v2
667  * _XOPEN_SOURCE = 500                                   XPG5
668  * _XOPEN_SOURCE = 600  (or POSIX_C_SOURCE=200112L)      XPG6
669  * _XOPEN_SOURCE = 700  (or POSIX_C_SOURCE=200809L)      XPG7
670  *
671  * In order to simplify the guards within the headers, the following
672  * implementation private test macros have been created. Applications
673  * must NOT use these private test macros as unexpected results will
674  * occur.
675  *
676  * Note that in general, the use of these private macros is cumulative.
677  * For example, the use of _XPG3 with no other restrictions on the X/Open
678  * namespace will make the symbols visible for XPG3 through XPG6
679  * compilation environments. The use of _XPG4_2 with no other X/Open
680  * namespace restrictions indicates that the symbols were introduced in
681  * XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
682  * environments, but not for XPG3 or XPG4 compilation environments.
683  *
684  * _XPG3    X/Open Portability Guide, Issue 3 (XPG3)
685  * _XPG4    X/Open CAE Specification, Issue 4 (XPG4)
686  * _XPG4_2  X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
687  * _XPG5    X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
688  * _XPG6    Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
689  * _XPG7    Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
690  */
691 
692 /* X/Open Portability Guide, Issue 3 */
693 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
694 /*
695  * _XOPEN_VERSION is defined by the X/Open specifications and is not
696  * normally defined by the application, except in the case of an XPG4
697  * application.  On the implementation side, _XOPEN_VERSION defined with
698  * the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
699  * with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
700  * _XOPEN_VERSION  defined with a value of 500 indicates an XPG5 (UNIX 98)
701  * application and with a value of 600 indicates an XPG6 (UNIX 03)
702  * application and with a value of 700 indicates an XPG7 (UNIX 08).
703  * The appropriate version is determined by the use of the
704  * feature test macros described earlier.  The value of _XOPEN_VERSION
705  * defaults to 3 otherwise indicating support for XPG3 applications.
706  */
707 # 368 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
708 /*
709  * ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
710  * conforming environments.  ISO 9899:1999 says it does.
711  *
712  * The presence of _LONGLONG_TYPE says "long long exists" which is therefore
713  * defined in all but strictly conforming environments that disallow it.
714  */
715 # 388 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
716 /*
717  * The following macro defines a value for the ISO C99 restrict
718  * keyword so that _RESTRICT_KYWD resolves to "restrict" if
719  * an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
720  * if any other compiler is used. This allows for the use of single
721  * prototype declarations regardless of compiler version.
722  */
723 # 410 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
724 /*
725  * The following macro defines a value for the ISO C11 _Noreturn
726  * keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
727  * an ISO C11 compiler is used and "" (null string) if any other
728  * compiler is used. This allows for the use of single prototype
729  * declarations regardless of compiler version.
730  */
731 
732 
733 
734 
735 
736 
737 
738 /*
739  * The following macro indicates header support for the ANSI C++
740  * standard.  The ISO/IEC designation for this is ISO/IEC FDIS 14882.
741  */
742 
743 
744 /*
745  * The following macro indicates header support for the C99 standard,
746  * ISO/IEC 9899:1999, Programming Languages - C.
747  */
748 
749 
750 /*
751  * The following macro indicates header support for the C99 standard,
752  * ISO/IEC 9899:2011, Programming Languages - C.
753  */
754 
755 
756 /*
757  * The following macro indicates header support for DTrace. The value is an
758  * integer that corresponds to the major version number for DTrace.
759  */
760 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
761 
762 
763 
764 
765 
766 /*
767  * Do all of our 'redefine_extname' processing before
768  * declarations of the associated functions are seen.
769  * This is necessary to keep gcc happy.
770  */
771 
772 
773 /* large file compilation environment setup */
774 
775 
776 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
777 #pragma redefine_extname fopen fopen64
778 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
779 
780 
781 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
782 #pragma redefine_extname freopen freopen64
783 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
784 
785 
786 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
787 #pragma redefine_extname tmpfile tmpfile64
788 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
789 
790 
791 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
792 #pragma redefine_extname fgetpos fgetpos64
793 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
794 
795 
796 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
797 #pragma redefine_extname fsetpos fsetpos64
798 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
799 
800 
801 
802 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
803 #pragma redefine_extname fseeko fseeko64
804 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
805 
806 
807 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
808 #pragma redefine_extname ftello ftello64
809 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
810 
811 
812 
813 
814 /* In the LP64 compilation environment, all APIs are already large file */
815 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
816 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 1
817 /*
818  * CDDL HEADER START
819  *
820  * The contents of this file are subject to the terms of the
821  * Common Development and Distribution License, Version 1.0 only
822  * (the "License").  You may not use this file except in compliance
823  * with the License.
824  *
825  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
826  * or http://www.opensolaris.org/os/licensing.
827  * See the License for the specific language governing permissions
828  * and limitations under the License.
829  *
830  * When distributing Covered Code, include this CDDL HEADER in each
831  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
832  * If applicable, add the following below this CDDL HEADER, with the
833  * fields enclosed by brackets "[]" replaced with your own identifying
834  * information: Portions Copyright [yyyy] [name of copyright owner]
835  *
836  * CDDL HEADER END
837  */
838 /*
839  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
840  * Copyright 2014 PALO, Richard.
841  *
842  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
843  * Use is subject to license terms.
844  */
845 
846 /*	Copyright (c) 1988 AT&T	*/
847 /*	  All Rights Reserved  	*/
848 
849 /*
850  * An application should not include this header directly.  Instead it
851  * should be included only through the inclusion of other Sun headers.
852  *
853  * The contents of this header is limited to identifiers specified in the
854  * C Standard.  Any new identifiers specified in future amendments to the
855  * C Standard must be placed in this header.  If these new identifiers
856  * are required to also be in the C++ Standard "std" namespace, then for
857  * anything other than macro definitions, corresponding "using" directives
858  * must also be added to <stdio.h>.
859  */
860 
861 /*
862  * User-visible pieces of the ANSI C standard I/O package.
863  */
864 
865 
866 
867 
868 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
869 /*
870  * CDDL HEADER START
871  *
872  * The contents of this file are subject to the terms of the
873  * Common Development and Distribution License (the "License").
874  * You may not use this file except in compliance with the License.
875  *
876  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
877  * or http://www.opensolaris.org/os/licensing.
878  * See the License for the specific language governing permissions
879  * and limitations under the License.
880  *
881  * When distributing Covered Code, include this CDDL HEADER in each
882  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
883  * If applicable, add the following below this CDDL HEADER, with the
884  * fields enclosed by brackets "[]" replaced with your own identifying
885  * information: Portions Copyright [yyyy] [name of copyright owner]
886  *
887  * CDDL HEADER END
888  */
889 
890 /*
891  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
892  * Copyright 2016 Joyent, Inc.
893  *
894  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
895  * Use is subject to license terms.
896  */
897 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
898 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
899 /*
900  * This file and its contents are supplied under the terms of the
901  * Common Development and Distribution License ("CDDL"), version 1.0.
902  * You may only use this file in accordance with the terms of version
903  * 1.0 of the CDDL.
904  *
905  * A full copy of the text of the CDDL should have accompanied this
906  * source.  A copy of the CDDL is also available via the Internet at
907  * http://www.illumos.org/license/CDDL.
908  */
909 
910 /*
911  * Copyright 2014-2016 PALO, Richard.
912  */
913 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
914 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1
915 /*
916  * CDDL HEADER START
917  *
918  * The contents of this file are subject to the terms of the
919  * Common Development and Distribution License, Version 1.0 only
920  * (the "License").  You may not use this file except in compliance
921  * with the License.
922  *
923  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
924  * or http://www.opensolaris.org/os/licensing.
925  * See the License for the specific language governing permissions
926  * and limitations under the License.
927  *
928  * When distributing Covered Code, include this CDDL HEADER in each
929  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
930  * If applicable, add the following below this CDDL HEADER, with the
931  * fields enclosed by brackets "[]" replaced with your own identifying
932  * information: Portions Copyright [yyyy] [name of copyright owner]
933  *
934  * CDDL HEADER END
935  */
936 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
937 /*	  All Rights Reserved	*/
938 
939 
940 /*
941  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
942  *
943  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
944  * Use is subject to license terms.
945  */
946 
947 
948 
949 
950 /*
951  * An application should not include this header directly.  Instead it
952  * should be included only through the inclusion of other Sun headers.
953  *
954  * The purpose of this header is to provide the type definitions for
955  * the va_list argument used by a number of printf and printf like
956  * functions. The headers that define these various function prototypes
957  * #include this header directly. These include but are not necessarily
958  * limited to <stdio.h>, <stdio_iso.h>, <wchar_iso.h>, <strlog.h> and
959  * <syslog.h>. The type definitions included in this header are for
960  * the benefit of consumers of va_list.
961  *
962  * Any application that accepts variable argument lists must as documented,
963  * include either <varargs.h> or the preferred <stdarg.h>. Doing so will
964  * pull in the appropriate compiler protocols defined in <sys/va_impl.h>
965  * which is in turn is included by <varargs.h> and <stdarg.h>. See comments
966  * in <sys/va_impl.h> for more detailed information regarding implementation
967  * and compiler specific protocols.
968  */
969 
970 /*
971  * The common definitions exported by this header or compilers using
972  * this header are:
973  *
974  * the identifier __builtin_va_alist for the variable list pseudo parameter
975  * the type __va_alist_type for the variable list pseudo parameter
976  * the type __va_list defining the type of the variable list iterator
977  *
978  * The feature macros (e.g. __BUILTIN_VA_STRUCT) and compiler macros
979  * (__GNUC__) and processor macros (e.g. __amd64) are intended to be
980  * defined by the compilation system, not the user of the system.
981  */
982 
983 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
984 /*
985  * CDDL HEADER START
986  *
987  * The contents of this file are subject to the terms of the
988  * Common Development and Distribution License (the "License").
989  * You may not use this file except in compliance with the License.
990  *
991  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
992  * or http://www.opensolaris.org/os/licensing.
993  * See the License for the specific language governing permissions
994  * and limitations under the License.
995  *
996  *
997  * When distributing Covered Code, include this CDDL HEADER in each
998  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
999  * If applicable, add the following below this CDDL HEADER, with the
1000  * fields enclosed by brackets "[]" replaced with your own identifying
1001  * information: Portions Copyright [yyyy] [name of copyright owner]
1002  *
1003  * CDDL HEADER END
1004  */
1005 
1006 /*
1007  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1008  * Use is subject to license terms.
1009  * Copyright 2016 Joyent, Inc.
1010  */
1011 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 2
1012 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h"
1013 typedef __builtin_va_list __gnuc_va_list;
1014 /*
1015  * XX64 This seems unnecessary .. but is needed because vcmn_err is
1016  *	defined with __va_list instead of plain old va_list.
1017  *	Perhaps that should be fixed!
1018  */
1019 typedef __builtin_va_list __va_list;
1020 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1021 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h" 1
1022 /*
1023  * CDDL HEADER START
1024  *
1025  * The contents of this file are subject to the terms of the
1026  * Common Development and Distribution License, Version 1.0 only
1027  * (the "License").  You may not use this file except in compliance
1028  * with the License.
1029  *
1030  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1031  * or http://www.opensolaris.org/os/licensing.
1032  * See the License for the specific language governing permissions
1033  * and limitations under the License.
1034  *
1035  * When distributing Covered Code, include this CDDL HEADER in each
1036  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1037  * If applicable, add the following below this CDDL HEADER, with the
1038  * fields enclosed by brackets "[]" replaced with your own identifying
1039  * information: Portions Copyright [yyyy] [name of copyright owner]
1040  *
1041  * CDDL HEADER END
1042  */
1043 /*
1044  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1045  * Use is subject to license terms.
1046  */
1047 
1048 
1049 
1050 
1051 #pragma ident "%Z%%M%	%I%	%E% SMI"
1052 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h"
1053 typedef struct __FILE __FILE;
1054 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1055 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 1
1056 /*
1057  * CDDL HEADER START
1058  *
1059  * The contents of this file are subject to the terms of the
1060  * Common Development and Distribution License (the "License").
1061  * You may not use this file except in compliance with the License.
1062  *
1063  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1064  * or http://www.opensolaris.org/os/licensing.
1065  * See the License for the specific language governing permissions
1066  * and limitations under the License.
1067  *
1068  * When distributing Covered Code, include this CDDL HEADER in each
1069  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1070  * If applicable, add the following below this CDDL HEADER, with the
1071  * fields enclosed by brackets "[]" replaced with your own identifying
1072  * information: Portions Copyright [yyyy] [name of copyright owner]
1073  *
1074  * CDDL HEADER END
1075  */
1076 
1077 /*
1078  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1079  * Use is subject to license terms.
1080  */
1081 
1082 
1083 
1084 
1085 #pragma ident "%Z%%M%	%I%	%E% SMI"
1086 
1087 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1088 /*
1089  * CDDL HEADER START
1090  *
1091  * The contents of this file are subject to the terms of the
1092  * Common Development and Distribution License (the "License").
1093  * You may not use this file except in compliance with the License.
1094  *
1095  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1096  * or http://www.opensolaris.org/os/licensing.
1097  * See the License for the specific language governing permissions
1098  * and limitations under the License.
1099  *
1100  *
1101  * When distributing Covered Code, include this CDDL HEADER in each
1102  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1103  * If applicable, add the following below this CDDL HEADER, with the
1104  * fields enclosed by brackets "[]" replaced with your own identifying
1105  * information: Portions Copyright [yyyy] [name of copyright owner]
1106  *
1107  * CDDL HEADER END
1108  */
1109 
1110 /*
1111  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1112  * Use is subject to license terms.
1113  * Copyright 2016 Joyent, Inc.
1114  */
1115 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 2
1116 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h"
1117 struct __FILE /* needs to be binary-compatible with old versions */
1118 {
1119 
1120 
1121 
1122 
1123  int _cnt; /* number of available characters in buffer */
1124  unsigned char *_ptr; /* next character from/to here in buffer */
1125 
1126  unsigned char *_base; /* the buffer */
1127  unsigned char _flag; /* the state of the stream */
1128  unsigned char _magic; /* Old home of the file descriptor */
1129     /* Only fileno(3C) can retrieve the value now */
1130  unsigned __orientation:2; /* the orientation of the stream */
1131  unsigned __ionolock:1; /* turn off implicit locking */
1132  unsigned __seekable:1; /* is file seekable? */
1133  unsigned __extendedfd:1; /* enable extended FILE */
1134  unsigned __xf_nocheck:1; /* no extended FILE runtime check */
1135  unsigned __filler:10;
1136 };
1137 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1138 
1139 /*
1140  * If feature test macros are set that enable interfaces that use types
1141  * defined in <sys/types.h>, get those types by doing the include.
1142  *
1143  * Note that in asking for the interfaces associated with this feature test
1144  * macro one also asks for definitions of the POSIX types.
1145  */
1146 
1147 
1148 
1149 
1150 
1151 
1152 /*
1153  * The following typedefs are adopted from ones in <sys/types.h> (with leading
1154  * underscores added to avoid polluting the ANSI C name space).  See the
1155  * commentary there for further explanation.
1156  */
1157 
1158 typedef long long __longlong_t;
1159 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1160 typedef __FILE FILE;
1161 
1162 
1163 
1164 
1165 
1166 
1167 
1168 typedef unsigned int size_t; /* (historical version) */
1169 
1170 
1171 
1172 
1173 
1174 
1175 typedef __longlong_t fpos_t;
1176 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1177 /*
1178  * The value of _NFILE is defined in the Processor Specific ABI.  The value
1179  * is chosen for historical reasons rather than for truly processor related
1180  * attribute.  Note that the SPARC Processor Specific ABI uses the common
1181  * UNIX historical value of 20 so it is allowed to fall through.
1182  */
1183 # 156 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1184 extern __FILE __iob[60];
1185 # 191 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1186 extern int remove(const char *);
1187 extern int rename(const char *, const char *);
1188 extern FILE *tmpfile(void);
1189 extern char *tmpnam(char *);
1190 extern int fclose(FILE *);
1191 extern int fflush(FILE *);
1192 extern FILE *fopen(const char *, const char *);
1193 extern FILE *freopen(const char *,
1194    const char *, FILE *);
1195 extern void setbuf(FILE *, char *);
1196 extern int setvbuf(FILE *, char *, int,
1197    size_t);
1198 /* PRINTFLIKE2 */
1199 extern int fprintf(FILE *, const char *, ...);
1200 /* SCANFLIKE2 */
1201 extern int fscanf(FILE *, const char *, ...);
1202 /* PRINTFLIKE1 */
1203 extern int printf(const char *, ...);
1204 /* SCANFLIKE1 */
1205 extern int scanf(const char *, ...);
1206 /* PRINTFLIKE2 */
1207 extern int sprintf(char *, const char *, ...);
1208 /* SCANFLIKE2 */
1209 extern int sscanf(const char *,
1210    const char *, ...);
1211 extern int vfprintf(FILE *, const char *,
1212    __va_list);
1213 extern int vprintf(const char *, __va_list);
1214 extern int vsprintf(char *, const char *,
1215    __va_list);
1216 extern int fgetc(FILE *);
1217 extern char *fgets(char *, int, FILE *);
1218 extern int fputc(int, FILE *);
1219 extern int fputs(const char *, FILE *);
1220 
1221 
1222 extern int getc(FILE *);
1223 extern int putc(int, FILE *);
1224 
1225 
1226 
1227 extern int getchar(void);
1228 extern int putchar(int);
1229 
1230 
1231 /*
1232  * ISO/IEC C11 removed gets from the standard library. Therefore if a strict C11
1233  * environment has been requested, we remove it.
1234  */
1235 
1236 extern char *gets(char *);
1237 
1238 extern int puts(const char *);
1239 extern int ungetc(int, FILE *);
1240 extern size_t fread(void *, size_t, size_t,
1241  FILE *);
1242 extern size_t fwrite(const void *, size_t, size_t,
1243  FILE *);
1244 
1245 extern int fgetpos(FILE *, fpos_t *);
1246 extern int fsetpos(FILE *, const fpos_t *);
1247 
1248 extern int fseek(FILE *, long, int);
1249 extern long ftell(FILE *);
1250 extern void rewind(FILE *);
1251 
1252 
1253 extern void clearerr(FILE *);
1254 extern int feof(FILE *);
1255 extern int ferror(FILE *);
1256 
1257 extern void perror(const char *);
1258 
1259 
1260 extern int __filbuf(FILE *);
1261 extern int __flsbuf(int, FILE *);
1262 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1263 
1264 /*
1265  * If feature test macros are set that enable interfaces that use types
1266  * defined in <sys/types.h>, get those types by doing the include.
1267  *
1268  * Note that in asking for the interfaces associated with this feature test
1269  * macro one also asks for definitions of the POSIX types.
1270  */
1271 
1272 /*
1273  * Allow global visibility for symbols defined in
1274  * C++ "std" namespace in <iso/stdio_iso.h>.
1275  */
1276 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1277 /*
1278  * This header needs to be included here because it relies on the global
1279  * visibility of FILE and size_t in the C++ environment.
1280  */
1281 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h" 1
1282 /*
1283  * CDDL HEADER START
1284  *
1285  * The contents of this file are subject to the terms of the
1286  * Common Development and Distribution License, Version 1.0 only
1287  * (the "License").  You may not use this file except in compliance
1288  * with the License.
1289  *
1290  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1291  * or http://www.opensolaris.org/os/licensing.
1292  * See the License for the specific language governing permissions
1293  * and limitations under the License.
1294  *
1295  * When distributing Covered Code, include this CDDL HEADER in each
1296  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1297  * If applicable, add the following below this CDDL HEADER, with the
1298  * fields enclosed by brackets "[]" replaced with your own identifying
1299  * information: Portions Copyright [yyyy] [name of copyright owner]
1300  *
1301  * CDDL HEADER END
1302  */
1303 /*
1304  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1305  *
1306  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1307  * Use is subject to license terms.
1308  */
1309 
1310 /*
1311  * An application should not include this header directly.  Instead it
1312  * should be included only through the inclusion of other Sun headers.
1313  *
1314  * The contents of this header is limited to identifiers specified in
1315  * the C99 standard and in conflict with the C++ implementation of the
1316  * standard header.  The C++ standard may adopt the C99 standard at
1317  * which point it is expected that the symbols included here will
1318  * become part of the C++ std namespace.
1319  */
1320 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1321 /*
1322  * The following have been added as a result of the ISO/IEC 9899:1999
1323  * standard. For a strictly conforming C application, visibility is
1324  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
1325  * For non-strictly conforming C applications, there are no restrictions
1326  * on the C namespace.
1327  */
1328 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1329 extern int vfscanf(FILE *, const char *, __va_list);
1330 extern int vscanf(const char *, __va_list);
1331 extern int vsscanf(const char *, const char *,
1332   __va_list);
1333 
1334 
1335 
1336 
1337 extern int snprintf(char *, size_t, const char *,
1338  ...);
1339 extern int vsnprintf(char *, size_t, const char *,
1340  __va_list);
1341 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1342 # 163 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1343 typedef __longlong_t off_t;
1344 
1345 
1346 
1347 
1348 
1349 typedef __longlong_t off64_t;
1350 # 179 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1351 typedef __longlong_t fpos64_t;
1352 
1353 
1354 
1355 /*
1356  * XPG4 requires that va_list be defined in <stdio.h> "as described in
1357  * <stdarg.h>".  ANSI-C and POSIX require that the namespace of <stdio.h>
1358  * not be polluted with this name.
1359  */
1360 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1361 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1362 # 213 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1363 extern unsigned char _sibuf[], _sobuf[];
1364 
1365 
1366 /* large file compilation environment setup */
1367 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1368 extern unsigned char *_bufendtab[];
1369 extern FILE *_lastbuf;
1370 
1371 
1372 /* In the LP64 compilation environment, all APIs are already large file */
1373 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1374 typedef int ssize_t; /* (historical version) */
1375 
1376 
1377 
1378 
1379 
1380 
1381 extern char *tmpnam_r(char *);
1382 
1383 
1384 
1385 
1386 extern int fcloseall(void);
1387 extern void setbuffer(FILE *, char *, size_t);
1388 extern int setlinebuf(FILE *);
1389 /* PRINTFLIKE2 */
1390 extern int asprintf(char **, const char *, ...);
1391 /* PRINTFLIKE2 */
1392 extern int vasprintf(char **, const char *, __va_list);
1393 
1394 
1395 
1396 
1397  /* || defined(_XPG7) */
1398 extern ssize_t getdelim(char **, size_t *,
1399  int, FILE *);
1400 extern ssize_t getline(char **, size_t *,
1401  FILE *);
1402 
1403 
1404 /*
1405  * The following are known to POSIX and XOPEN, but not to ANSI-C.
1406  */
1407 
1408 
1409 
1410 extern FILE *fdopen(int, const char *);
1411 extern char *ctermid(char *);
1412 extern int fileno(FILE *);
1413 
1414 
1415 
1416 /*
1417  * The following are known to POSIX.1c, but not to ANSI-C or XOPEN.
1418  */
1419 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1420 /*
1421  * The following are known to XOPEN, but not to ANSI-C or POSIX.
1422  */
1423 
1424 
1425 extern FILE *popen(const char *, const char *);
1426 extern char *tempnam(const char *, const char *);
1427 extern int pclose(FILE *);
1428 
1429 extern int getsubopt(char **, char *const *, char **);
1430 
1431 
1432 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1433 
1434 extern char *cuserid(char *);
1435 extern int getopt(int, char *const *, const char *);
1436 extern char *optarg;
1437 extern int optind, opterr, optopt;
1438 extern int getw(FILE *);
1439 extern int putw(int, FILE *);
1440 
1441 
1442 
1443 
1444 /*
1445  * The following are defined as part of the Large File Summit interfaces.
1446  */
1447 
1448 extern int fseeko(FILE *, off_t, int);
1449 extern off_t ftello(FILE *);
1450 
1451 
1452 /*
1453  * The following are defined as part of the transitional Large File Summit
1454  * interfaces.
1455  */
1456 
1457 
1458 extern FILE *fopen64(const char *, const char *);
1459 extern FILE *freopen64(const char *, const char *, FILE *);
1460 extern FILE *tmpfile64(void);
1461 extern int fgetpos64(FILE *, fpos64_t *);
1462 extern int fsetpos64(FILE *, const fpos64_t *);
1463 extern int fseeko64(FILE *, off64_t, int);
1464 extern off64_t ftello64(FILE *);
1465 
1466 
1467 /*
1468  * XPG7 symbols
1469  */
1470 
1471 extern FILE *fmemopen(void *, size_t,
1472       const char *);
1473 extern FILE *open_memstream(char **, size_t *);
1474 # 32 "quit.c" 2
1475 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 1
1476 /*
1477  * CDDL HEADER START
1478  *
1479  * The contents of this file are subject to the terms of the
1480  * Common Development and Distribution License, Version 1.0 only
1481  * (the "License").  You may not use this file except in compliance
1482  * with the License.
1483  *
1484  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1485  * or http://www.opensolaris.org/os/licensing.
1486  * See the License for the specific language governing permissions
1487  * and limitations under the License.
1488  *
1489  * When distributing Covered Code, include this CDDL HEADER in each
1490  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1491  * If applicable, add the following below this CDDL HEADER, with the
1492  * fields enclosed by brackets "[]" replaced with your own identifying
1493  * information: Portions Copyright [yyyy] [name of copyright owner]
1494  *
1495  * CDDL HEADER END
1496  */
1497 /*	Copyright (c) 1988 AT&T	*/
1498 /*	  All Rights Reserved  	*/
1499 
1500 /*
1501  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1502  *
1503  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1504  * Use is subject to license terms.
1505  */
1506 
1507 
1508 
1509 
1510 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1511 /*
1512  * CDDL HEADER START
1513  *
1514  * The contents of this file are subject to the terms of the
1515  * Common Development and Distribution License (the "License").
1516  * You may not use this file except in compliance with the License.
1517  *
1518  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1519  * or http://www.opensolaris.org/os/licensing.
1520  * See the License for the specific language governing permissions
1521  * and limitations under the License.
1522  *
1523  * When distributing Covered Code, include this CDDL HEADER in each
1524  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1525  * If applicable, add the following below this CDDL HEADER, with the
1526  * fields enclosed by brackets "[]" replaced with your own identifying
1527  * information: Portions Copyright [yyyy] [name of copyright owner]
1528  *
1529  * CDDL HEADER END
1530  */
1531 
1532 /*
1533  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1534  * Copyright 2016 Joyent, Inc.
1535  *
1536  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1537  * Use is subject to license terms.
1538  */
1539 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
1540 
1541 
1542 
1543 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
1544 /*
1545  * CDDL HEADER START
1546  *
1547  * The contents of this file are subject to the terms of the
1548  * Common Development and Distribution License (the "License").
1549  * You may not use this file except in compliance with the License.
1550  *
1551  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1552  * or http://www.opensolaris.org/os/licensing.
1553  * See the License for the specific language governing permissions
1554  * and limitations under the License.
1555  *
1556  * When distributing Covered Code, include this CDDL HEADER in each
1557  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1558  * If applicable, add the following below this CDDL HEADER, with the
1559  * fields enclosed by brackets "[]" replaced with your own identifying
1560  * information: Portions Copyright [yyyy] [name of copyright owner]
1561  *
1562  * CDDL HEADER END
1563  */
1564 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
1565 /*	  All Rights Reserved  	*/
1566 
1567 
1568 /*
1569  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
1570  * Use is subject to license terms.
1571  *
1572  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
1573  * Copyright 2016 Joyent, Inc.
1574  */
1575 
1576 
1577 
1578 
1579 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1580 /*
1581  * CDDL HEADER START
1582  *
1583  * The contents of this file are subject to the terms of the
1584  * Common Development and Distribution License (the "License").
1585  * You may not use this file except in compliance with the License.
1586  *
1587  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1588  * or http://www.opensolaris.org/os/licensing.
1589  * See the License for the specific language governing permissions
1590  * and limitations under the License.
1591  *
1592  * When distributing Covered Code, include this CDDL HEADER in each
1593  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1594  * If applicable, add the following below this CDDL HEADER, with the
1595  * fields enclosed by brackets "[]" replaced with your own identifying
1596  * information: Portions Copyright [yyyy] [name of copyright owner]
1597  *
1598  * CDDL HEADER END
1599  */
1600 
1601 /*
1602  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1603  * Copyright 2016 Joyent, Inc.
1604  *
1605  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1606  * Use is subject to license terms.
1607  */
1608 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1609 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1610 /*
1611  * CDDL HEADER START
1612  *
1613  * The contents of this file are subject to the terms of the
1614  * Common Development and Distribution License (the "License").
1615  * You may not use this file except in compliance with the License.
1616  *
1617  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1618  * or http://www.opensolaris.org/os/licensing.
1619  * See the License for the specific language governing permissions
1620  * and limitations under the License.
1621  *
1622  *
1623  * When distributing Covered Code, include this CDDL HEADER in each
1624  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1625  * If applicable, add the following below this CDDL HEADER, with the
1626  * fields enclosed by brackets "[]" replaced with your own identifying
1627  * information: Portions Copyright [yyyy] [name of copyright owner]
1628  *
1629  * CDDL HEADER END
1630  */
1631 
1632 /*
1633  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1634  * Use is subject to license terms.
1635  * Copyright 2016 Joyent, Inc.
1636  */
1637 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1638 
1639 /*
1640  * Machine dependent definitions moved to <sys/machtypes.h>.
1641  */
1642 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 1
1643 /*
1644  * CDDL HEADER START
1645  *
1646  * The contents of this file are subject to the terms of the
1647  * Common Development and Distribution License, Version 1.0 only
1648  * (the "License").  You may not use this file except in compliance
1649  * with the License.
1650  *
1651  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1652  * or http://www.opensolaris.org/os/licensing.
1653  * See the License for the specific language governing permissions
1654  * and limitations under the License.
1655  *
1656  * When distributing Covered Code, include this CDDL HEADER in each
1657  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1658  * If applicable, add the following below this CDDL HEADER, with the
1659  * fields enclosed by brackets "[]" replaced with your own identifying
1660  * information: Portions Copyright [yyyy] [name of copyright owner]
1661  *
1662  * CDDL HEADER END
1663  */
1664 /*
1665  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1666  * Use is subject to license terms.
1667  */
1668 
1669 
1670 
1671 
1672 #pragma ident "%Z%%M%	%I%	%E% SMI"
1673 
1674 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1675 /*
1676  * CDDL HEADER START
1677  *
1678  * The contents of this file are subject to the terms of the
1679  * Common Development and Distribution License (the "License").
1680  * You may not use this file except in compliance with the License.
1681  *
1682  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1683  * or http://www.opensolaris.org/os/licensing.
1684  * See the License for the specific language governing permissions
1685  * and limitations under the License.
1686  *
1687  * When distributing Covered Code, include this CDDL HEADER in each
1688  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1689  * If applicable, add the following below this CDDL HEADER, with the
1690  * fields enclosed by brackets "[]" replaced with your own identifying
1691  * information: Portions Copyright [yyyy] [name of copyright owner]
1692  *
1693  * CDDL HEADER END
1694  */
1695 
1696 /*
1697  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1698  * Copyright 2016 Joyent, Inc.
1699  *
1700  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1701  * Use is subject to license terms.
1702  */
1703 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
1704 
1705 
1706 
1707 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h" 1
1708 /*
1709  * CDDL HEADER START
1710  *
1711  * The contents of this file are subject to the terms of the
1712  * Common Development and Distribution License (the "License").
1713  * You may not use this file except in compliance with the License.
1714  *
1715  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1716  * or http://www.opensolaris.org/os/licensing.
1717  * See the License for the specific language governing permissions
1718  * and limitations under the License.
1719  *
1720  * When distributing Covered Code, include this CDDL HEADER in each
1721  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1722  * If applicable, add the following below this CDDL HEADER, with the
1723  * fields enclosed by brackets "[]" replaced with your own identifying
1724  * information: Portions Copyright [yyyy] [name of copyright owner]
1725  *
1726  * CDDL HEADER END
1727  */
1728 /*
1729  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
1730  * Use is subject to license terms.
1731  */
1732 
1733 
1734 
1735 
1736 #pragma ident "%Z%%M%	%I%	%E% SMI"
1737 
1738 
1739 
1740 
1741 
1742 /*
1743  * Machine dependent types:
1744  *
1745  *	intel ia32 Version
1746  */
1747 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h"
1748 typedef struct _label_t { long val[6]; } label_t;
1749 
1750 
1751 
1752 typedef unsigned char lock_t; /* lock work for busy wait */
1753 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
1754 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1755 
1756 /*
1757  * Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
1758  * committee's working draft for the revision of the current ISO C standard,
1759  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
1760  * required by any standard but constitute a useful, general purpose set
1761  * of type definitions which is namespace clean with respect to all standards.
1762  */
1763 
1764 
1765 
1766 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
1767 /*
1768  * CDDL HEADER START
1769  *
1770  * The contents of this file are subject to the terms of the
1771  * Common Development and Distribution License, Version 1.0 only
1772  * (the "License").  You may not use this file except in compliance
1773  * with the License.
1774  *
1775  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1776  * or http://www.opensolaris.org/os/licensing.
1777  * See the License for the specific language governing permissions
1778  * and limitations under the License.
1779  *
1780  * When distributing Covered Code, include this CDDL HEADER in each
1781  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1782  * If applicable, add the following below this CDDL HEADER, with the
1783  * fields enclosed by brackets "[]" replaced with your own identifying
1784  * information: Portions Copyright [yyyy] [name of copyright owner]
1785  *
1786  * CDDL HEADER END
1787  */
1788 /*
1789  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1790  *
1791  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1792  * Use is subject to license terms.
1793  */
1794 
1795 
1796 
1797 
1798 /*
1799  * This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
1800  * of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
1801  * Programming language - C.
1802  *
1803  * Programs/Modules should not directly include this file.  Access to the
1804  * types defined in this file should be through the inclusion of one of the
1805  * following files:
1806  *
1807  *	<sys/types.h>		Provides only the "_t" types defined in this
1808  *				file which is a subset of the contents of
1809  *				<inttypes.h>.  (This can be appropriate for
1810  *				all programs/modules except those claiming
1811  *				ANSI-C conformance.)
1812  *
1813  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
1814  *				components of <inttypes.h>.
1815  *
1816  *	<inttypes.h>		For use by applications.
1817  *
1818  * See these files for more details.
1819  */
1820 
1821 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1822 /*
1823  * CDDL HEADER START
1824  *
1825  * The contents of this file are subject to the terms of the
1826  * Common Development and Distribution License (the "License").
1827  * You may not use this file except in compliance with the License.
1828  *
1829  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1830  * or http://www.opensolaris.org/os/licensing.
1831  * See the License for the specific language governing permissions
1832  * and limitations under the License.
1833  *
1834  * When distributing Covered Code, include this CDDL HEADER in each
1835  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1836  * If applicable, add the following below this CDDL HEADER, with the
1837  * fields enclosed by brackets "[]" replaced with your own identifying
1838  * information: Portions Copyright [yyyy] [name of copyright owner]
1839  *
1840  * CDDL HEADER END
1841  */
1842 
1843 /*
1844  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1845  * Copyright 2016 Joyent, Inc.
1846  *
1847  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1848  * Use is subject to license terms.
1849  */
1850 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 2
1851 
1852 
1853 
1854 
1855 
1856 /*
1857  * Basic / Extended integer types
1858  *
1859  * The following defines the basic fixed-size integer types.
1860  *
1861  * Implementations are free to typedef them to Standard C integer types or
1862  * extensions that they support. If an implementation does not support one
1863  * of the particular integer data types below, then it should not define the
1864  * typedefs and macros corresponding to that data type.  Note that int8_t
1865  * is not defined in -Xs mode on ISAs for which the ABI specifies "char"
1866  * as an unsigned entity because there is no way to define an eight bit
1867  * signed integral.
1868  */
1869 
1870 typedef char int8_t;
1871 
1872 
1873 
1874 typedef short int16_t;
1875 typedef int int32_t;
1876 
1877 
1878 
1879 
1880 
1881 
1882 typedef long long int64_t;
1883 
1884 
1885 
1886 typedef unsigned char uint8_t;
1887 typedef unsigned short uint16_t;
1888 typedef unsigned int uint32_t;
1889 
1890 
1891 
1892 
1893 typedef unsigned long long uint64_t;
1894 
1895 
1896 
1897 /*
1898  * intmax_t and uintmax_t are to be the longest (in number of bits) signed
1899  * and unsigned integer types supported by the implementation.
1900  */
1901 
1902 typedef int64_t intmax_t;
1903 typedef uint64_t uintmax_t;
1904 
1905 
1906 
1907 
1908 
1909 /*
1910  * intptr_t and uintptr_t are signed and unsigned integer types large enough
1911  * to hold any data pointer; that is, data pointers can be assigned into or
1912  * from these integer types without losing precision.
1913  */
1914 
1915 
1916 
1917 
1918 typedef int intptr_t;
1919 typedef unsigned int uintptr_t;
1920 
1921 
1922 /*
1923  * The following define the fastest integer types that can hold the
1924  * specified number of bits.
1925  */
1926 
1927 typedef char int_fast8_t;
1928 
1929 
1930 
1931 typedef int int_fast16_t;
1932 typedef int int_fast32_t;
1933 
1934 
1935 
1936 
1937 typedef long long int_fast64_t;
1938 
1939 
1940 
1941 typedef unsigned char uint_fast8_t;
1942 typedef unsigned int uint_fast16_t;
1943 typedef unsigned int uint_fast32_t;
1944 
1945 
1946 
1947 
1948 typedef unsigned long long uint_fast64_t;
1949 
1950 
1951 
1952 /*
1953  * The following define the smallest integer types that can hold the
1954  * specified number of bits.
1955  */
1956 
1957 typedef char int_least8_t;
1958 
1959 
1960 
1961 typedef short int_least16_t;
1962 typedef int int_least32_t;
1963 
1964 
1965 
1966 
1967 typedef long long int_least64_t;
1968 
1969 
1970 
1971 /*
1972  * If these are changed, please update char16_t and char32_t in head/uchar.h.
1973  */
1974 typedef unsigned char uint_least8_t;
1975 typedef unsigned short uint_least16_t;
1976 typedef unsigned int uint_least32_t;
1977 
1978 
1979 
1980 
1981 typedef unsigned long long uint_least64_t;
1982 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1983 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
1984 /*
1985  * Strictly conforming ANSI C environments prior to the 1999
1986  * revision of the C Standard (ISO/IEC 9899:1999) do not have
1987  * the long long data type.
1988  */
1989 
1990 typedef long long longlong_t;
1991 typedef unsigned long long u_longlong_t;
1992 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
1993 /*
1994  * These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
1995  * to use them instead of int32_t and uint32_t because DEC had
1996  * shipped 64-bit wide.
1997  */
1998 
1999 
2000 
2001 
2002 typedef long t_scalar_t; /* historical versions */
2003 typedef unsigned long t_uscalar_t;
2004 
2005 
2006 /*
2007  * POSIX Extensions
2008  */
2009 typedef unsigned char uchar_t;
2010 typedef unsigned short ushort_t;
2011 typedef unsigned int uint_t;
2012 typedef unsigned long ulong_t;
2013 
2014 typedef char *caddr_t; /* ?<core address> type */
2015 typedef long daddr_t; /* <disk address> type */
2016 typedef short cnt_t; /* ?<count> type */
2017 
2018 
2019 
2020 
2021 
2022 
2023 typedef int ptrdiff_t; /* (historical version) */
2024 
2025 
2026 
2027 /*
2028  * VM-related types
2029  */
2030 typedef ulong_t pfn_t; /* page frame number */
2031 typedef ulong_t pgcnt_t; /* number of pages */
2032 typedef long spgcnt_t; /* signed number of pages */
2033 
2034 typedef uchar_t use_t; /* use count for swap.  */
2035 typedef short sysid_t;
2036 typedef short index_t;
2037 typedef void *timeout_id_t; /* opaque handle from timeout(9F) */
2038 typedef void *bufcall_id_t; /* opaque handle from bufcall(9F) */
2039 
2040 /*
2041  * The size of off_t and related types depends on the setting of
2042  * _FILE_OFFSET_BITS.  (Note that other system headers define other types
2043  * related to those defined here.)
2044  *
2045  * If _LARGEFILE64_SOURCE is defined, variants of these types that are
2046  * explicitly 64 bits wide become available.
2047  */
2048 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2049 typedef u_longlong_t ino_t; /* expanded inode type	*/
2050 typedef longlong_t blkcnt_t; /* count of file blocks */
2051 typedef u_longlong_t fsblkcnt_t; /* count of file system blocks */
2052 typedef u_longlong_t fsfilcnt_t; /* count of files */
2053 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2054 typedef u_longlong_t ino64_t; /* expanded inode type	*/
2055 typedef longlong_t blkcnt64_t; /* count of file blocks */
2056 typedef u_longlong_t fsblkcnt64_t; /* count of file system blocks */
2057 typedef u_longlong_t fsfilcnt64_t; /* count of files */
2058 
2059 
2060 
2061 
2062 
2063 
2064 typedef long blksize_t; /* used for block sizes */
2065 
2066 
2067 
2068 
2069 
2070 typedef enum { B_FALSE, B_TRUE } boolean_t;
2071 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2072 /*
2073  * The {u,}pad64_t types can be used in structures such that those structures
2074  * may be accessed by code produced by compilation environments which don't
2075  * support a 64 bit integral datatype.  The intention is not to allow
2076  * use of these fields in such environments, but to maintain the alignment
2077  * and offsets of the structure.
2078  *
2079  * Similar comments for {u,}pad128_t.
2080  *
2081  * Note that these types do NOT generate any stronger alignment constraints
2082  * than those available in the underlying ABI.  See <sys/isa_defs.h>
2083  */
2084 
2085 typedef int64_t pad64_t;
2086 typedef uint64_t upad64_t;
2087 # 232 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2088 typedef union {
2089  long double _q;
2090  int32_t _l[4];
2091 } pad128_t;
2092 
2093 typedef union {
2094  long double _q;
2095  uint32_t _l[4];
2096 } upad128_t;
2097 
2098 typedef longlong_t offset_t;
2099 typedef u_longlong_t u_offset_t;
2100 typedef u_longlong_t len_t;
2101 typedef u_longlong_t diskaddr_t;
2102 
2103 
2104 
2105 
2106 /*
2107  * Definitions remaining from previous partial support for 64-bit file
2108  * offsets.  This partial support for devices greater than 2gb requires
2109  * compiler support for long long.
2110  */
2111 
2112 typedef union {
2113  offset_t _f; /* Full 64 bit offset value */
2114  struct {
2115   int32_t _l; /* lower 32 bits of offset value */
2116   int32_t _u; /* upper 32 bits of offset value */
2117  } _p;
2118 } lloff_t;
2119 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2120 typedef union {
2121  longlong_t _f; /* Full 64 bit disk address value */
2122  struct {
2123   int32_t _l; /* lower 32 bits of disk address value */
2124   int32_t _u; /* upper 32 bits of disk address value */
2125  } _p;
2126 } lldaddr_t;
2127 # 295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2128 typedef uint_t k_fltset_t; /* kernel fault set type */
2129 
2130 /*
2131  * The following type is for various kinds of identifiers.  The
2132  * actual type must be the same for all since some system calls
2133  * (such as sigsend) take arguments that may be any of these
2134  * types.  The enumeration type idtype_t defined in sys/procset.h
2135  * is used to indicate what type of id is being specified --
2136  * a process id, process group id, session id, scheduling class id,
2137  * user id, group id, project id, task id or zone id.
2138  */
2139 
2140 
2141 
2142 typedef long id_t; /* (historical version) */
2143 
2144 
2145 typedef id_t lgrp_id_t; /* lgroup ID */
2146 
2147 /*
2148  * Type useconds_t is an unsigned integral type capable of storing
2149  * values at least in the range of zero to 1,000,000.
2150  */
2151 typedef uint_t useconds_t; /* Time, in microseconds */
2152 
2153 
2154 
2155 typedef long suseconds_t; /* signed # of microseconds */
2156 
2157 
2158 /*
2159  * Typedefs for dev_t components.
2160  */
2161 
2162 
2163 
2164 
2165 typedef ulong_t major_t; /* (historical version) */
2166 typedef ulong_t minor_t; /* (historical version) */
2167 
2168 
2169 /*
2170  * The data type of a thread priority.
2171  */
2172 typedef short pri_t;
2173 
2174 /*
2175  * The data type for a CPU flags field.  (Can be extended to larger unsigned
2176  * types, if needed, limited by ability to update atomically.)
2177  */
2178 typedef ushort_t cpu_flag_t;
2179 
2180 /*
2181  * For compatibility reasons the following typedefs (prefixed o_)
2182  * can't grow regardless of the EFT definition. Although,
2183  * applications should not explicitly use these typedefs
2184  * they may be included via a system header definition.
2185  * WARNING: These typedefs may be removed in a future
2186  * release.
2187  *		ex. the definitions in s5inode.h (now obsoleted)
2188  *			remained small to preserve compatibility
2189  *			in the S5 file system type.
2190  */
2191 typedef ushort_t o_mode_t; /* old file attribute type */
2192 typedef short o_dev_t; /* old device type	*/
2193 typedef ushort_t o_uid_t; /* old UID type		*/
2194 typedef o_uid_t o_gid_t; /* old GID type		*/
2195 typedef short o_nlink_t; /* old file link type	*/
2196 typedef short o_pid_t; /* old process id type	*/
2197 typedef ushort_t o_ino_t; /* old inode type	*/
2198 
2199 
2200 /*
2201  * POSIX and XOPEN Declarations
2202  */
2203 typedef int key_t; /* IPC key type		*/
2204 
2205 
2206 
2207 typedef ulong_t mode_t; /* (historical version) */
2208 
2209 
2210 
2211 
2212 typedef unsigned int uid_t; /* UID type		*/
2213 
2214 
2215 typedef uid_t gid_t; /* GID type		*/
2216 
2217 typedef uint32_t datalink_id_t;
2218 typedef uint32_t vrid_t;
2219 
2220 typedef id_t taskid_t;
2221 typedef id_t projid_t;
2222 typedef id_t poolid_t;
2223 typedef id_t zoneid_t;
2224 typedef id_t ctid_t;
2225 
2226 /*
2227  * POSIX definitions are same as defined in thread.h and synch.h.
2228  * Any changes made to here should be reflected in corresponding
2229  * files as described in comments.
2230  */
2231 typedef uint_t pthread_t; /* = thread_t in thread.h */
2232 typedef uint_t pthread_key_t; /* = thread_key_t in thread.h */
2233 
2234 /* "Magic numbers" tagging synchronization object types */
2235 
2236 
2237 
2238 
2239 
2240 typedef struct _pthread_mutex { /* = mutex_t in synch.h */
2241  struct {
2242   uint16_t __pthread_mutex_flag1;
2243   uint8_t __pthread_mutex_flag2;
2244   uint8_t __pthread_mutex_ceiling;
2245   uint16_t __pthread_mutex_type;
2246   uint16_t __pthread_mutex_magic;
2247  } __pthread_mutex_flags;
2248  union {
2249   struct {
2250    uint8_t __pthread_mutex_pad[8];
2251   } __pthread_mutex_lock64;
2252   struct {
2253    uint32_t __pthread_ownerpid;
2254    uint32_t __pthread_lockword;
2255   } __pthread_mutex_lock32;
2256   upad64_t __pthread_mutex_owner64;
2257  } __pthread_mutex_lock;
2258  upad64_t __pthread_mutex_data;
2259 } pthread_mutex_t;
2260 
2261 typedef struct _pthread_cond { /* = cond_t in synch.h */
2262  struct {
2263   uint8_t __pthread_cond_flag[4];
2264   uint16_t __pthread_cond_type;
2265   uint16_t __pthread_cond_magic;
2266  } __pthread_cond_flags;
2267  upad64_t __pthread_cond_data;
2268 } pthread_cond_t;
2269 
2270 /*
2271  * UNIX 98 Extension
2272  */
2273 typedef struct _pthread_rwlock { /* = rwlock_t in synch.h */
2274  int32_t __pthread_rwlock_readers;
2275  uint16_t __pthread_rwlock_type;
2276  uint16_t __pthread_rwlock_magic;
2277  pthread_mutex_t __pthread_rwlock_mutex;
2278  pthread_cond_t __pthread_rwlock_readercv;
2279  pthread_cond_t __pthread_rwlock_writercv;
2280 } pthread_rwlock_t;
2281 
2282 /*
2283  * SUSV3
2284  */
2285 typedef struct {
2286  uint32_t __pthread_barrier_count;
2287  uint32_t __pthread_barrier_current;
2288  upad64_t __pthread_barrier_cycle;
2289  upad64_t __pthread_barrier_reserved;
2290  pthread_mutex_t __pthread_barrier_lock;
2291  pthread_cond_t __pthread_barrier_cond;
2292 } pthread_barrier_t;
2293 
2294 typedef pthread_mutex_t pthread_spinlock_t;
2295 
2296 /*
2297  * attributes for threads, dynamically allocated by library
2298  */
2299 typedef struct _pthread_attr {
2300  void *__pthread_attrp;
2301 } pthread_attr_t;
2302 
2303 /*
2304  * attributes for mutex, dynamically allocated by library
2305  */
2306 typedef struct _pthread_mutexattr {
2307  void *__pthread_mutexattrp;
2308 } pthread_mutexattr_t;
2309 
2310 /*
2311  * attributes for cond, dynamically allocated by library
2312  */
2313 typedef struct _pthread_condattr {
2314  void *__pthread_condattrp;
2315 } pthread_condattr_t;
2316 
2317 /*
2318  * pthread_once
2319  */
2320 typedef struct _once {
2321  upad64_t __pthread_once_pad[4];
2322 } pthread_once_t;
2323 
2324 /*
2325  * UNIX 98 Extensions
2326  * attributes for rwlock, dynamically allocated by library
2327  */
2328 typedef struct _pthread_rwlockattr {
2329  void *__pthread_rwlockattrp;
2330 } pthread_rwlockattr_t;
2331 
2332 /*
2333  * SUSV3
2334  * attributes for pthread_barrier_t, dynamically allocated by library
2335  */
2336 typedef struct {
2337  void *__pthread_barrierattrp;
2338 } pthread_barrierattr_t;
2339 
2340 typedef ulong_t dev_t; /* expanded device type */
2341 
2342 
2343 
2344 
2345 
2346 typedef ulong_t nlink_t; /* (historical version) */
2347 typedef long pid_t; /* (historical version) */
2348 # 537 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2349 typedef long time_t; /* time of day in seconds */
2350 
2351 
2352 
2353 
2354 typedef long clock_t; /* relative time in a specified resolution */
2355 
2356 
2357 
2358 
2359 typedef int clockid_t; /* clock identifier type */
2360 
2361 
2362 
2363 
2364 typedef int timer_t; /* timer identifier type */
2365 
2366 
2367 
2368 
2369 /* BEGIN CSTYLED */
2370 typedef unsigned char unchar;
2371 typedef unsigned short ushort;
2372 typedef unsigned int uint;
2373 typedef unsigned long ulong;
2374 /* END CSTYLED */
2375 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2376 /*
2377  * The following is the value of type id_t to use to indicate the
2378  * caller's current id.  See procset.h for the type idtype_t
2379  * which defines which kind of id is being specified.
2380  */
2381 # 620 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2382 /*
2383  * The following value of type pfn_t is used to indicate
2384  * invalid page frame number.
2385  */
2386 
2387 
2388 
2389 /* BEGIN CSTYLED */
2390 typedef unsigned char u_char;
2391 typedef unsigned short u_short;
2392 typedef unsigned int u_int;
2393 typedef unsigned long u_long;
2394 typedef struct _quad { int val[2]; } quad_t; /* used by UFS */
2395 typedef quad_t quad; /* used by UFS */
2396 /* END CSTYLED */
2397 
2398 /*
2399  * Nested include for BSD/sockets source compatibility.
2400  * (The select macros used to be defined here).
2401  */
2402 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
2403 /*
2404  * CDDL HEADER START
2405  *
2406  * The contents of this file are subject to the terms of the
2407  * Common Development and Distribution License (the "License").
2408  * You may not use this file except in compliance with the License.
2409  *
2410  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2411  * or http://www.opensolaris.org/os/licensing.
2412  * See the License for the specific language governing permissions
2413  * and limitations under the License.
2414  *
2415  * When distributing Covered Code, include this CDDL HEADER in each
2416  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2417  * If applicable, add the following below this CDDL HEADER, with the
2418  * fields enclosed by brackets "[]" replaced with your own identifying
2419  * information: Portions Copyright [yyyy] [name of copyright owner]
2420  *
2421  * CDDL HEADER END
2422  */
2423 
2424 /*
2425  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2426  *
2427  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2428  *
2429  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
2430  * Use is subject to license terms.
2431  */
2432 
2433 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2434 /*	  All Rights Reserved	*/
2435 
2436 /*
2437  * University Copyright- Copyright (c) 1982, 1986, 1988
2438  * The Regents of the University of California
2439  * All Rights Reserved
2440  *
2441  * University Acknowledgment- Portions of this document are derived from
2442  * software developed by the University of California, Berkeley, and its
2443  * contributors.
2444  */
2445 
2446 
2447 
2448 
2449 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2450 /*
2451  * CDDL HEADER START
2452  *
2453  * The contents of this file are subject to the terms of the
2454  * Common Development and Distribution License (the "License").
2455  * You may not use this file except in compliance with the License.
2456  *
2457  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2458  * or http://www.opensolaris.org/os/licensing.
2459  * See the License for the specific language governing permissions
2460  * and limitations under the License.
2461  *
2462  * When distributing Covered Code, include this CDDL HEADER in each
2463  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2464  * If applicable, add the following below this CDDL HEADER, with the
2465  * fields enclosed by brackets "[]" replaced with your own identifying
2466  * information: Portions Copyright [yyyy] [name of copyright owner]
2467  *
2468  * CDDL HEADER END
2469  */
2470 
2471 /*
2472  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2473  * Copyright 2016 Joyent, Inc.
2474  *
2475  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2476  * Use is subject to license terms.
2477  */
2478 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
2479 
2480 
2481 
2482 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
2483 /*
2484  * CDDL HEADER START
2485  *
2486  * The contents of this file are subject to the terms of the
2487  * Common Development and Distribution License, Version 1.0 only
2488  * (the "License").  You may not use this file except in compliance
2489  * with the License.
2490  *
2491  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2492  * or http://www.opensolaris.org/os/licensing.
2493  * See the License for the specific language governing permissions
2494  * and limitations under the License.
2495  *
2496  * When distributing Covered Code, include this CDDL HEADER in each
2497  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2498  * If applicable, add the following below this CDDL HEADER, with the
2499  * fields enclosed by brackets "[]" replaced with your own identifying
2500  * information: Portions Copyright [yyyy] [name of copyright owner]
2501  *
2502  * CDDL HEADER END
2503  */
2504 /*
2505  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
2506  * Use is subject to license terms.
2507  */
2508 
2509 /*
2510  * Implementation-private.  This header should not be included
2511  * directly by an application.  The application should instead
2512  * include <time.h> which includes this header conditionally
2513  * depending on which feature test macros are defined. By default,
2514  * this header is included by <time.h>.  X/Open and POSIX
2515  * standards requirements result in this header being included
2516  * by <time.h> only under a restricted set of conditions.
2517  */
2518 
2519 
2520 
2521 
2522 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2523 /*
2524  * CDDL HEADER START
2525  *
2526  * The contents of this file are subject to the terms of the
2527  * Common Development and Distribution License (the "License").
2528  * You may not use this file except in compliance with the License.
2529  *
2530  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2531  * or http://www.opensolaris.org/os/licensing.
2532  * See the License for the specific language governing permissions
2533  * and limitations under the License.
2534  *
2535  * When distributing Covered Code, include this CDDL HEADER in each
2536  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2537  * If applicable, add the following below this CDDL HEADER, with the
2538  * fields enclosed by brackets "[]" replaced with your own identifying
2539  * information: Portions Copyright [yyyy] [name of copyright owner]
2540  *
2541  * CDDL HEADER END
2542  */
2543 
2544 /*
2545  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2546  * Copyright 2016 Joyent, Inc.
2547  *
2548  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2549  * Use is subject to license terms.
2550  */
2551 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 2
2552 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
2553 /*
2554  * Time expressed in seconds and nanoseconds
2555  */
2556 
2557 typedef struct timespec { /* definition per POSIX.4 */
2558  time_t tv_sec; /* seconds */
2559  long tv_nsec; /* and nanoseconds */
2560 } timespec_t;
2561 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
2562 typedef struct timespec timestruc_t; /* definition per SVr4 */
2563 
2564 /*
2565  * The following has been left in for backward compatibility. Portable
2566  * applications should not use the structure name timestruc.
2567  */
2568 
2569 
2570 
2571 
2572 
2573 /*
2574  * Timer specification
2575  */
2576 typedef struct itimerspec { /* definition per POSIX.4 */
2577  struct timespec it_interval; /* timer period */
2578  struct timespec it_value; /* timer expiration */
2579 } itimerspec_t;
2580 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
2581 
2582 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
2583 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2584 /*	  All Rights Reserved  	*/
2585 
2586 
2587 /*
2588  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
2589  * All rights reserved.  The Berkeley software License Agreement
2590  * specifies the terms and conditions for redistribution.
2591  */
2592 
2593 /*
2594  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2595  *
2596  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2597  * Use is subject to license terms.
2598  *
2599  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2600  */
2601 
2602 /*
2603  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
2604  */
2605 
2606 
2607 
2608 
2609 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2610 /*
2611  * CDDL HEADER START
2612  *
2613  * The contents of this file are subject to the terms of the
2614  * Common Development and Distribution License (the "License").
2615  * You may not use this file except in compliance with the License.
2616  *
2617  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2618  * or http://www.opensolaris.org/os/licensing.
2619  * See the License for the specific language governing permissions
2620  * and limitations under the License.
2621  *
2622  * When distributing Covered Code, include this CDDL HEADER in each
2623  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2624  * If applicable, add the following below this CDDL HEADER, with the
2625  * fields enclosed by brackets "[]" replaced with your own identifying
2626  * information: Portions Copyright [yyyy] [name of copyright owner]
2627  *
2628  * CDDL HEADER END
2629  */
2630 
2631 /*
2632  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2633  * Copyright 2016 Joyent, Inc.
2634  *
2635  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2636  * Use is subject to license terms.
2637  */
2638 # 28 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2639 
2640 /*
2641  * Structure returned by gettimeofday(2) system call,
2642  * and used in other calls.
2643  */
2644 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2645 struct timeval {
2646  time_t tv_sec; /* seconds */
2647  suseconds_t tv_usec; /* and microseconds */
2648 };
2649 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2650 struct timezone {
2651  int tz_minuteswest; /* minutes west of Greenwich */
2652  int tz_dsttime; /* type of dst correction */
2653 };
2654 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2655 /*
2656  * Needed for longlong_t type.  Placement of this due to <sys/types.h>
2657  * including <sys/select.h> which relies on the presense of the itimerval
2658  * structure.
2659  */
2660 
2661 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
2662 /*
2663  * CDDL HEADER START
2664  *
2665  * The contents of this file are subject to the terms of the
2666  * Common Development and Distribution License (the "License").
2667  * You may not use this file except in compliance with the License.
2668  *
2669  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2670  * or http://www.opensolaris.org/os/licensing.
2671  * See the License for the specific language governing permissions
2672  * and limitations under the License.
2673  *
2674  * When distributing Covered Code, include this CDDL HEADER in each
2675  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2676  * If applicable, add the following below this CDDL HEADER, with the
2677  * fields enclosed by brackets "[]" replaced with your own identifying
2678  * information: Portions Copyright [yyyy] [name of copyright owner]
2679  *
2680  * CDDL HEADER END
2681  */
2682 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2683 /*	  All Rights Reserved  	*/
2684 
2685 
2686 /*
2687  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2688  * Use is subject to license terms.
2689  *
2690  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2691  * Copyright 2016 Joyent, Inc.
2692  */
2693 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2694 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2695 /*
2696  * Operations on timevals.
2697  */
2698 # 193 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2699 /*
2700  * Names of the interval timers, and structure
2701  * defining a timer setting.
2702  */
2703 
2704 
2705 
2706     /* time and when system is running on */
2707     /* behalf of the process. */
2708 
2709     /* time profiling of multithreaded */
2710     /* programs. */
2711 
2712 
2713 struct itimerval {
2714  struct timeval it_interval; /* timer interval */
2715  struct timeval it_value; /* current value */
2716 };
2717 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2718 /*
2719  *	Definitions for commonly used resolutions.
2720  */
2721 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2722 /*
2723  * Time expressed as a 64-bit nanosecond counter.
2724  */
2725 typedef longlong_t hrtime_t;
2726 # 386 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2727 int adjtime(struct timeval *, struct timeval *);
2728 
2729 
2730 
2731 
2732 int futimesat(int, const char *, const struct timeval *);
2733 
2734 
2735 
2736 
2737 
2738 int getitimer(int, struct itimerval *);
2739 int utimes(const char *, const struct timeval *);
2740 
2741 
2742 
2743 
2744 int setitimer(int, struct itimerval *,
2745  struct itimerval *);
2746 
2747 
2748 
2749 
2750 /*
2751  * gettimeofday() and settimeofday() were included in SVr4 due to their
2752  * common use in BSD based applications.  They were to be included exactly
2753  * as in BSD, with two parameters.  However, AT&T/USL noted that the second
2754  * parameter was unused and deleted it, thereby making a routine included
2755  * for compatibility, incompatible.
2756  *
2757  * XSH4.2 (spec 1170) defines gettimeofday and settimeofday to have two
2758  * parameters.
2759  *
2760  * This has caused general disagreement in the application community as to
2761  * the syntax of these routines.  Solaris defaults to the XSH4.2 definition.
2762  * The flag _SVID_GETTOD may be used to force the SVID version.
2763  */
2764 
2765 
2766 
2767 
2768 
2769 int settimeofday(struct timeval *, void *);
2770 
2771 hrtime_t gethrtime(void);
2772 hrtime_t gethrvtime(void);
2773 # 441 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2774 int gettimeofday(struct timeval *, void *);
2775 
2776 
2777 
2778 
2779 /*
2780  * The inclusion of <time.h> is historical and was added for
2781  * backward compatibility in delta 1.2 when a number of definitions
2782  * were moved out of <sys/time.h>.  More recently, the timespec and
2783  * itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
2784  * _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
2785  * which is now included by <time.h>.  This change was due to POSIX
2786  * 1003.1b-1993 and X/Open UNIX 98 requirements.  For non-POSIX and
2787  * non-X/Open applications, including this header will still make
2788  * visible these definitions.
2789  */
2790 
2791 
2792 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
2793 /*
2794  * CDDL HEADER START
2795  *
2796  * The contents of this file are subject to the terms of the
2797  * Common Development and Distribution License (the "License").
2798  * You may not use this file except in compliance with the License.
2799  *
2800  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2801  * or http://www.opensolaris.org/os/licensing.
2802  * See the License for the specific language governing permissions
2803  * and limitations under the License.
2804  *
2805  * When distributing Covered Code, include this CDDL HEADER in each
2806  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2807  * If applicable, add the following below this CDDL HEADER, with the
2808  * fields enclosed by brackets "[]" replaced with your own identifying
2809  * information: Portions Copyright [yyyy] [name of copyright owner]
2810  *
2811  * CDDL HEADER END
2812  */
2813 /*	Copyright (c) 1988 AT&T	*/
2814 /*	  All Rights Reserved  	*/
2815 
2816 
2817 /*
2818  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2819  *
2820  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
2821  * Use is subject to license terms.
2822  */
2823 /*
2824  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
2825  * Copyright 2016 Joyent, Inc.
2826  */
2827 
2828 
2829 
2830 
2831 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2832 /*
2833  * CDDL HEADER START
2834  *
2835  * The contents of this file are subject to the terms of the
2836  * Common Development and Distribution License (the "License").
2837  * You may not use this file except in compliance with the License.
2838  *
2839  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2840  * or http://www.opensolaris.org/os/licensing.
2841  * See the License for the specific language governing permissions
2842  * and limitations under the License.
2843  *
2844  * When distributing Covered Code, include this CDDL HEADER in each
2845  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2846  * If applicable, add the following below this CDDL HEADER, with the
2847  * fields enclosed by brackets "[]" replaced with your own identifying
2848  * information: Portions Copyright [yyyy] [name of copyright owner]
2849  *
2850  * CDDL HEADER END
2851  */
2852 
2853 /*
2854  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2855  * Copyright 2016 Joyent, Inc.
2856  *
2857  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2858  * Use is subject to license terms.
2859  */
2860 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
2861 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 1
2862 /*
2863  * CDDL HEADER START
2864  *
2865  * The contents of this file are subject to the terms of the
2866  * Common Development and Distribution License, Version 1.0 only
2867  * (the "License").  You may not use this file except in compliance
2868  * with the License.
2869  *
2870  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2871  * or http://www.opensolaris.org/os/licensing.
2872  * See the License for the specific language governing permissions
2873  * and limitations under the License.
2874  *
2875  * When distributing Covered Code, include this CDDL HEADER in each
2876  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2877  * If applicable, add the following below this CDDL HEADER, with the
2878  * fields enclosed by brackets "[]" replaced with your own identifying
2879  * information: Portions Copyright [yyyy] [name of copyright owner]
2880  *
2881  * CDDL HEADER END
2882  */
2883 /*	Copyright (c) 1988 AT&T	*/
2884 /*	  All Rights Reserved  	*/
2885 
2886 /*
2887  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2888  * Copyright 2014 PALO, Richard.
2889  *
2890  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2891  * Use is subject to license terms.
2892  */
2893 
2894 /*
2895  * An application should not include this header directly.  Instead it
2896  * should be included only through the inclusion of other Sun headers.
2897  *
2898  * The contents of this header is limited to identifiers specified in the
2899  * C Standard.  Any new identifiers specified in future amendments to the
2900  * C Standard must be placed in this header.  If these new identifiers
2901  * are required to also be in the C++ Standard "std" namespace, then for
2902  * anything other than macro definitions, corresponding "using" directives
2903  * must also be added to <time.h.h>.
2904  */
2905 
2906 
2907 
2908 
2909 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2910 /*
2911  * CDDL HEADER START
2912  *
2913  * The contents of this file are subject to the terms of the
2914  * Common Development and Distribution License (the "License").
2915  * You may not use this file except in compliance with the License.
2916  *
2917  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2918  * or http://www.opensolaris.org/os/licensing.
2919  * See the License for the specific language governing permissions
2920  * and limitations under the License.
2921  *
2922  * When distributing Covered Code, include this CDDL HEADER in each
2923  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2924  * If applicable, add the following below this CDDL HEADER, with the
2925  * fields enclosed by brackets "[]" replaced with your own identifying
2926  * information: Portions Copyright [yyyy] [name of copyright owner]
2927  *
2928  * CDDL HEADER END
2929  */
2930 
2931 /*
2932  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2933  * Copyright 2016 Joyent, Inc.
2934  *
2935  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2936  * Use is subject to license terms.
2937  */
2938 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
2939 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
2940 /*
2941  * This file and its contents are supplied under the terms of the
2942  * Common Development and Distribution License ("CDDL"), version 1.0.
2943  * You may only use this file in accordance with the terms of version
2944  * 1.0 of the CDDL.
2945  *
2946  * A full copy of the text of the CDDL should have accompanied this
2947  * source.  A copy of the CDDL is also available via the Internet at
2948  * http://www.illumos.org/license/CDDL.
2949  */
2950 
2951 /*
2952  * Copyright 2014-2016 PALO, Richard.
2953  */
2954 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
2955 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h"
2956 struct tm { /* see ctime(3) */
2957  int tm_sec;
2958  int tm_min;
2959  int tm_hour;
2960  int tm_mday;
2961  int tm_mon;
2962  int tm_year;
2963  int tm_wday;
2964  int tm_yday;
2965  int tm_isdst;
2966 };
2967 
2968 
2969 extern char *asctime(const struct tm *);
2970 extern clock_t clock(void);
2971 extern char *ctime(const time_t *);
2972 extern double difftime(time_t, time_t);
2973 extern struct tm *gmtime(const time_t *);
2974 extern struct tm *localtime(const time_t *);
2975 extern time_t mktime(struct tm *);
2976 extern time_t time(time_t *);
2977 extern size_t strftime(char *, size_t, const char *,
2978  const struct tm *);
2979 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
2980 /*
2981  * C11 requires sys/time_impl.h for the definition of the struct timespec.
2982  */
2983 
2984 
2985 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
2986 /*
2987  * CDDL HEADER START
2988  *
2989  * The contents of this file are subject to the terms of the
2990  * Common Development and Distribution License (the "License").
2991  * You may not use this file except in compliance with the License.
2992  *
2993  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2994  * or http://www.opensolaris.org/os/licensing.
2995  * See the License for the specific language governing permissions
2996  * and limitations under the License.
2997  *
2998  * When distributing Covered Code, include this CDDL HEADER in each
2999  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3000  * If applicable, add the following below this CDDL HEADER, with the
3001  * fields enclosed by brackets "[]" replaced with your own identifying
3002  * information: Portions Copyright [yyyy] [name of copyright owner]
3003  *
3004  * CDDL HEADER END
3005  */
3006 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3007 /*	  All Rights Reserved  	*/
3008 
3009 
3010 /*
3011  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3012  * Use is subject to license terms.
3013  *
3014  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3015  * Copyright 2016 Joyent, Inc.
3016  */
3017 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3018 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
3019 /*
3020  * CDDL HEADER START
3021  *
3022  * The contents of this file are subject to the terms of the
3023  * Common Development and Distribution License, Version 1.0 only
3024  * (the "License").  You may not use this file except in compliance
3025  * with the License.
3026  *
3027  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3028  * or http://www.opensolaris.org/os/licensing.
3029  * See the License for the specific language governing permissions
3030  * and limitations under the License.
3031  *
3032  * When distributing Covered Code, include this CDDL HEADER in each
3033  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3034  * If applicable, add the following below this CDDL HEADER, with the
3035  * fields enclosed by brackets "[]" replaced with your own identifying
3036  * information: Portions Copyright [yyyy] [name of copyright owner]
3037  *
3038  * CDDL HEADER END
3039  */
3040 /*
3041  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3042  * Use is subject to license terms.
3043  */
3044 
3045 /*
3046  * Implementation-private.  This header should not be included
3047  * directly by an application.  The application should instead
3048  * include <time.h> which includes this header conditionally
3049  * depending on which feature test macros are defined. By default,
3050  * this header is included by <time.h>.  X/Open and POSIX
3051  * standards requirements result in this header being included
3052  * by <time.h> only under a restricted set of conditions.
3053  */
3054 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3055 
3056 
3057 /*
3058  * Allow global visibility for symbols defined in
3059  * C++ "std" namespace in <iso/time_iso.h>.
3060  */
3061 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3062 extern struct tm *gmtime_r(const time_t *,
3063    struct tm *);
3064 extern struct tm *localtime_r(const time_t *,
3065    struct tm *);
3066 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3067 extern char *strptime(const char *, const char *,
3068   struct tm *);
3069 
3070 
3071 
3072 
3073 
3074 /*
3075  * Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
3076  * definition of the sigevent structure.  Both require the inclusion
3077  * of <signal.h> and <time.h> when using the timer_create() function.
3078  * However, X/Open also specifies that the sigevent structure be defined
3079  * in <time.h> as described in the header <signal.h>.  This prevents
3080  * compiler warnings for applications that only include <time.h> and not
3081  * also <signal.h>.  The sigval union and the sigevent structure is
3082  * therefore defined both here and in <sys/siginfo.h> which gets included
3083  * via inclusion of <signal.h>.
3084  */
3085 
3086 
3087 union sigval {
3088  int sival_int; /* integer value */
3089  void *sival_ptr; /* pointer value */
3090 };
3091 
3092 
3093 
3094 
3095 struct sigevent {
3096  int sigev_notify; /* notification mode */
3097  int sigev_signo; /* signal number */
3098  union sigval sigev_value; /* signal value */
3099  void (*sigev_notify_function)(union sigval);
3100  pthread_attr_t *sigev_notify_attributes;
3101  int __sigev_pad2;
3102 };
3103 
3104 
3105 extern int clock_getres(clockid_t, struct timespec *);
3106 extern int clock_gettime(clockid_t, struct timespec *);
3107 extern int clock_settime(clockid_t, const struct timespec *);
3108 extern int timer_create(clockid_t, struct sigevent *,
3109   timer_t *);
3110 extern int timer_delete(timer_t);
3111 extern int timer_getoverrun(timer_t);
3112 extern int timer_gettime(timer_t, struct itimerspec *);
3113 extern int timer_settime(timer_t, int, const struct itimerspec *,
3114   struct itimerspec *);
3115 
3116 extern int nanosleep(const struct timespec *, struct timespec *);
3117 extern int clock_nanosleep(clockid_t, int,
3118  const struct timespec *, struct timespec *);
3119 
3120 
3121 
3122 
3123 
3124 
3125 extern void tzset(void);
3126 extern char *tzname[2];
3127 
3128 /* CLK_TCK marked as LEGACY in SUSv2 and removed in SUSv3 */
3129 
3130 
3131 extern long _sysconf(int); /* System Private interface to sysconf() */
3132 
3133     /* 3 is _SC_CLK_TCK */
3134 
3135 
3136 
3137 
3138 
3139 extern long timezone;
3140 extern int daylight;
3141 
3142 
3143 
3144 
3145 
3146 
3147 extern time_t timegm(struct tm *);
3148 extern int cftime(char *, char *, const time_t *);
3149 extern int ascftime(char *, const char *, const struct tm *);
3150 extern long altzone;
3151 
3152 
3153 
3154 
3155 extern struct tm *getdate(const char *);
3156 
3157 
3158 
3159 
3160 
3161 extern int getdate_err;
3162 
3163 
3164 
3165 /*
3166  * ctime_r() & asctime_r() prototypes are defined here.
3167  */
3168 
3169 /*
3170  * Previous releases of Solaris, starting at 2.3, provided definitions of
3171  * various functions as specified in POSIX.1c, Draft 6.  For some of these
3172  * functions, the final POSIX 1003.1c standard had a different number of
3173  * arguments and return values.
3174  *
3175  * The following segment of this header provides support for the standard
3176  * interfaces while supporting applications written under earlier
3177  * releases.  The application defines appropriate values of the feature
3178  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
3179  * whether it was written to expect the Draft 6 or standard versions of
3180  * these interfaces, before including this header.  This header then
3181  * provides a mapping from the source version of the interface to an
3182  * appropriate binary interface.  Such mappings permit an application
3183  * to be built from libraries and objects which have mixed expectations
3184  * of the definitions of these functions.
3185  *
3186  * For applications using the Draft 6 definitions, the binary symbol is the
3187  * same as the source symbol, and no explicit mapping is needed.  For the
3188  * standard interface, the function func() is mapped to the binary symbol
3189  * _posix_func().  The preferred mechanism for the remapping is a compiler
3190  * #pragma.  If the compiler does not provide such a #pragma, the header file
3191  * defines a static function func() which calls the _posix_func() version;
3192  * this has to be done instead of #define since POSIX specifies that an
3193  * application can #undef the symbol and still be bound to the correct
3194  * implementation.  Unfortunately, the statics confuse lint so we fallback to
3195  * #define in that case.
3196  *
3197  * NOTE: Support for the Draft 6 definitions is provided for compatibility
3198  * only.  New applications/libraries should use the standard definitions.
3199  */
3200 # 280 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3201 extern char *asctime_r(const struct tm *, char *, int);
3202 extern char *ctime_r(const time_t *, char *, int);
3203 # 292 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3204 typedef struct _locale *locale_t;
3205 
3206 
3207 extern size_t strftime_l(char *, size_t,
3208  const char *, const struct tm *, locale_t);
3209 
3210 
3211 
3212 
3213 
3214 /*
3215  * Note, the C11 standard requires that all the various base values that are
3216  * passed into timespec_get() be non-zero. Hence why TIME_UTC starts at one.
3217  */
3218 
3219 
3220 extern int timespec_get(struct timespec *, int);
3221 # 460 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
3222 
3223 
3224 /*
3225  * The inclusion of <sys/select.h> is needed for the FD_CLR,
3226  * FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
3227  * select() prototype defined in the XOpen specifications
3228  * beginning with XSH4v2.  Placement required after definition
3229  * for itimerval.
3230  */
3231 
3232 
3233 
3234 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
3235 /*
3236  * CDDL HEADER START
3237  *
3238  * The contents of this file are subject to the terms of the
3239  * Common Development and Distribution License (the "License").
3240  * You may not use this file except in compliance with the License.
3241  *
3242  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3243  * or http://www.opensolaris.org/os/licensing.
3244  * See the License for the specific language governing permissions
3245  * and limitations under the License.
3246  *
3247  * When distributing Covered Code, include this CDDL HEADER in each
3248  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3249  * If applicable, add the following below this CDDL HEADER, with the
3250  * fields enclosed by brackets "[]" replaced with your own identifying
3251  * information: Portions Copyright [yyyy] [name of copyright owner]
3252  *
3253  * CDDL HEADER END
3254  */
3255 
3256 /*
3257  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3258  *
3259  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3260  *
3261  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3262  * Use is subject to license terms.
3263  */
3264 
3265 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3266 /*	  All Rights Reserved	*/
3267 
3268 /*
3269  * University Copyright- Copyright (c) 1982, 1986, 1988
3270  * The Regents of the University of California
3271  * All Rights Reserved
3272  *
3273  * University Acknowledgment- Portions of this document are derived from
3274  * software developed by the University of California, Berkeley, and its
3275  * contributors.
3276  */
3277 # 473 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
3278 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
3279 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3280 /*
3281  * The sigset_t type is defined in <sys/signal.h> and duplicated
3282  * in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
3283  * now allows the visibility of signal.h in this header, however
3284  * an order of inclusion problem occurs as a result of inclusion
3285  * of <sys/select.h> in <signal.h> under certain conditions.
3286  * Rather than include <sys/signal.h> here, we've duplicated
3287  * the sigset_t type instead. This type is required for the XPG6
3288  * introduced pselect() function also declared in this header.
3289  */
3290 
3291 
3292 typedef struct { /* signal set type */
3293  unsigned int __sigbits[4];
3294 } sigset_t;
3295 
3296 
3297 
3298 
3299 /*
3300  * Select uses bit masks of file descriptors in longs.
3301  * These macros manipulate such bit fields.
3302  * FD_SETSIZE may be defined by the user, but the default here
3303  * should be >= NOFILE (param.h).
3304  */
3305 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3306 typedef long fd_mask;
3307 
3308 typedef long fds_mask;
3309 
3310 /*
3311  *  The value of _NBBY needs to be consistant with the value
3312  *  of NBBY in <sys/param.h>.
3313  */
3314 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3315 typedef struct fd_set {
3316 
3317 
3318 
3319  long fds_bits[(((1024)+(((sizeof (fds_mask) * 8))-1))/((sizeof (fds_mask) * 8)))];
3320 } fd_set;
3321 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3322 extern int select(int, fd_set *, fd_set *,
3323  fd_set *, struct timeval *);
3324 
3325 
3326 extern int pselect(int, fd_set *, fd_set *,
3327  fd_set *, const struct timespec *,
3328  const sigset_t *);
3329 # 641 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3330 
3331 
3332 
3333 /*
3334  * _VOID was defined to be either void or char but this is not
3335  * required because previous SunOS compilers have accepted the void
3336  * type. However, because many system header and source files use the
3337  * void keyword, the volatile keyword, and ANSI C function prototypes,
3338  * non-ANSI compilers cannot compile the system anyway. The _VOID macro
3339  * should therefore not be used and remains for source compatibility
3340  * only.
3341  */
3342 /* CSTYLED */
3343 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
3344 
3345 
3346 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h" 1
3347 /*
3348  * CDDL HEADER START
3349  *
3350  * The contents of this file are subject to the terms of the
3351  * Common Development and Distribution License, Version 1.0 only
3352  * (the "License").  You may not use this file except in compliance
3353  * with the License.
3354  *
3355  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3356  * or http://www.opensolaris.org/os/licensing.
3357  * See the License for the specific language governing permissions
3358  * and limitations under the License.
3359  *
3360  * When distributing Covered Code, include this CDDL HEADER in each
3361  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3362  * If applicable, add the following below this CDDL HEADER, with the
3363  * fields enclosed by brackets "[]" replaced with your own identifying
3364  * information: Portions Copyright [yyyy] [name of copyright owner]
3365  *
3366  * CDDL HEADER END
3367  */
3368 /*	Copyright (c) 1988 AT&T	*/
3369 /*	  All Rights Reserved  	*/
3370 
3371 
3372 /*
3373  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3374  *
3375  * Copyright (c) 1998-1999, by Sun Microsystems, Inc.
3376  * All rights reserved.
3377  */
3378 
3379 /*
3380  * An application should not include this header directly.  Instead it
3381  * should be included only through the inclusion of other Sun headers.
3382  *
3383  * The contents of this header is limited to identifiers specified in the
3384  * C Standard.  Any new identifiers specified in future amendments to the
3385  * C Standard must be placed in this header.  If these new identifiers
3386  * are required to also be in the C++ Standard "std" namespace, then for
3387  * anything other than macro definitions, corresponding "using" directives
3388  * must also be added to <signal.h>.
3389  */
3390 
3391 
3392 
3393 
3394 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 1
3395 /*
3396  * CDDL HEADER START
3397  *
3398  * The contents of this file are subject to the terms of the
3399  * Common Development and Distribution License (the "License").
3400  * You may not use this file except in compliance with the License.
3401  *
3402  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3403  * or http://www.opensolaris.org/os/licensing.
3404  * See the License for the specific language governing permissions
3405  * and limitations under the License.
3406  *
3407  * When distributing Covered Code, include this CDDL HEADER in each
3408  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3409  * If applicable, add the following below this CDDL HEADER, with the
3410  * fields enclosed by brackets "[]" replaced with your own identifying
3411  * information: Portions Copyright [yyyy] [name of copyright owner]
3412  *
3413  * CDDL HEADER END
3414  */
3415 
3416 /*
3417  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3418  * Use is subject to license terms.
3419  */
3420 
3421 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3422 /*	  All Rights Reserved  	*/
3423 
3424 /*
3425  * An application should not include this header directly.  Instead it
3426  * should be included only through the inclusion of other Sun headers.
3427  *
3428  * The contents of this header is limited to identifiers specified in the
3429  * C Standard.  Any new identifiers specified in future amendments to the
3430  * C Standard must be placed in this header.  If these new identifiers
3431  * are required to also be in the C++ Standard "std" namespace, then for
3432  * anything other than macro definitions, corresponding "using" directives
3433  * must also be added to <sys/signal.h.h>.
3434  */
3435 
3436 
3437 
3438 
3439 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
3440 /*
3441  * CDDL HEADER START
3442  *
3443  * The contents of this file are subject to the terms of the
3444  * Common Development and Distribution License (the "License").
3445  * You may not use this file except in compliance with the License.
3446  *
3447  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3448  * or http://www.opensolaris.org/os/licensing.
3449  * See the License for the specific language governing permissions
3450  * and limitations under the License.
3451  *
3452  * When distributing Covered Code, include this CDDL HEADER in each
3453  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3454  * If applicable, add the following below this CDDL HEADER, with the
3455  * fields enclosed by brackets "[]" replaced with your own identifying
3456  * information: Portions Copyright [yyyy] [name of copyright owner]
3457  *
3458  * CDDL HEADER END
3459  */
3460 
3461 /*
3462  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
3463  *	  All Rights Reserved
3464  *
3465  */
3466 
3467 /*
3468  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3469  * Use is subject to license terms.
3470  */
3471 
3472 /*
3473  * WARNING: This is an implementation-specific header,
3474  * its contents are not guaranteed. Applications
3475  * should include <unistd.h> and not this header.
3476  */
3477 
3478 
3479 
3480 
3481 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3482 /*
3483  * CDDL HEADER START
3484  *
3485  * The contents of this file are subject to the terms of the
3486  * Common Development and Distribution License (the "License").
3487  * You may not use this file except in compliance with the License.
3488  *
3489  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3490  * or http://www.opensolaris.org/os/licensing.
3491  * See the License for the specific language governing permissions
3492  * and limitations under the License.
3493  *
3494  * When distributing Covered Code, include this CDDL HEADER in each
3495  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3496  * If applicable, add the following below this CDDL HEADER, with the
3497  * fields enclosed by brackets "[]" replaced with your own identifying
3498  * information: Portions Copyright [yyyy] [name of copyright owner]
3499  *
3500  * CDDL HEADER END
3501  */
3502 
3503 /*
3504  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3505  * Copyright 2016 Joyent, Inc.
3506  *
3507  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3508  * Use is subject to license terms.
3509  */
3510 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 2
3511 
3512 
3513 
3514 
3515 
3516 /* command names for confstr */
3517 
3518 
3519 
3520 /*
3521  * command names for large file configuration information
3522  */
3523 /* large file compilation environment configuration */
3524 
3525 
3526 
3527 
3528 /* transitional large file interface configuration */
3529 
3530 
3531 
3532 
3533 
3534 /* UNIX 98 */
3535 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3536 /* UNIX 03 */
3537 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3538 /* command names for POSIX sysconf */
3539 
3540 /* POSIX.1 names */
3541 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3542 /* SVR4 names */
3543 
3544 
3545 
3546 
3547 /* 13 reserved for SVr4-ES/MP _SC_NACLS_MAX */
3548 
3549 
3550 
3551 
3552 /* POSIX.4 names */
3553 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3554 /* XPG4 names */
3555 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3556 /* additional XSH4/XCU4 command names for sysconf */
3557 
3558 
3559 
3560 /* additional XPG4v2 (UNIX 95) command names */
3561 
3562 
3563 
3564 
3565 
3566 /* defined for XTI (XNS Issue 5) */
3567 
3568 
3569 
3570 
3571 
3572 
3573 
3574 /*
3575  * Hardware specific items
3576  * Note that not all items are supported on all architectures
3577  */
3578 # 214 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3579 /*
3580  * POSIX.1c (pthreads) names. These values are defined above
3581  * the sub-500 range. See psarc case 1995/257.
3582  */
3583 # 235 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3584 /* UNIX 98 */
3585 # 244 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3586 /* UNIX 03 */
3587 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3588 /* command names for POSIX pathconf */
3589 
3590 /* POSIX.1 names */
3591 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3592 /* POSIX.4 names */
3593 
3594 
3595 
3596 /* UNIX 03 names */
3597 # 315 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3598 /* UNIX 08 names */
3599 
3600 
3601 /*
3602  * Large File Summit names
3603  *
3604  * This value matches the MIPS ABI choice, but leaves a large gap in the
3605  * value space.
3606  */
3607 
3608 
3609 /*
3610  * Extended attributes
3611  */
3612 
3613 
3614 
3615 /*
3616  * If you add a _PC define above 101, you must change _PC_LAST (and truss).
3617  */
3618 
3619 
3620 /*
3621  * Case sensitivity values (related to _PC_CASE_BEHAVIOR)
3622  */
3623 
3624 
3625 
3626 /*
3627  * The value of 0 is returned when
3628  * ACL's are not supported
3629  */
3630 # 366 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3631 /*
3632  * Marked LEGACY in SUSv2 and removed in SUSv3. Though SUSv3 applications
3633  * should not rely on this value, it has been aligned with the current
3634  * standard to avoid confusion if used.
3635  */
3636 # 408 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
3637 /* UNIX 03 names */
3638 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 2
3639 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h"
3640 /* insert new signals here, and move _SIGRTM* appropriately */
3641 
3642 
3643 extern long _sysconf(int); /* System Private interface to sysconf() */
3644 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h" 2
3645 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/signal_iso.h"
3646 typedef int sig_atomic_t;
3647 
3648 
3649 
3650 
3651 extern void (*signal(int, void (*)(int)))(int);
3652 
3653 extern int raise(int);
3654 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
3655 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 1
3656 /*
3657  * CDDL HEADER START
3658  *
3659  * The contents of this file are subject to the terms of the
3660  * Common Development and Distribution License (the "License").
3661  * You may not use this file except in compliance with the License.
3662  *
3663  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3664  * or http://www.opensolaris.org/os/licensing.
3665  * See the License for the specific language governing permissions
3666  * and limitations under the License.
3667  *
3668  * When distributing Covered Code, include this CDDL HEADER in each
3669  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3670  * If applicable, add the following below this CDDL HEADER, with the
3671  * fields enclosed by brackets "[]" replaced with your own identifying
3672  * information: Portions Copyright [yyyy] [name of copyright owner]
3673  *
3674  * CDDL HEADER END
3675  */
3676 
3677 /*
3678  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3679  * Use is subject to license terms.
3680  */
3681 
3682 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3683 /*	  All Rights Reserved  	*/
3684 
3685 /*
3686  * University Copyright- Copyright (c) 1982, 1986, 1988
3687  * The Regents of the University of California
3688  * All Rights Reserved
3689  *
3690  * University Acknowledgment- Portions of this document are derived from
3691  * software developed by the University of California, Berkeley, and its
3692  * contributors.
3693  */
3694 
3695 
3696 
3697 
3698 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3699 /*
3700  * CDDL HEADER START
3701  *
3702  * The contents of this file are subject to the terms of the
3703  * Common Development and Distribution License (the "License").
3704  * You may not use this file except in compliance with the License.
3705  *
3706  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3707  * or http://www.opensolaris.org/os/licensing.
3708  * See the License for the specific language governing permissions
3709  * and limitations under the License.
3710  *
3711  * When distributing Covered Code, include this CDDL HEADER in each
3712  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3713  * If applicable, add the following below this CDDL HEADER, with the
3714  * fields enclosed by brackets "[]" replaced with your own identifying
3715  * information: Portions Copyright [yyyy] [name of copyright owner]
3716  *
3717  * CDDL HEADER END
3718  */
3719 
3720 /*
3721  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3722  * Copyright 2016 Joyent, Inc.
3723  *
3724  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3725  * Use is subject to license terms.
3726  */
3727 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
3728 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/iso/signal_iso.h" 1
3729 /*
3730  * CDDL HEADER START
3731  *
3732  * The contents of this file are subject to the terms of the
3733  * Common Development and Distribution License (the "License").
3734  * You may not use this file except in compliance with the License.
3735  *
3736  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3737  * or http://www.opensolaris.org/os/licensing.
3738  * See the License for the specific language governing permissions
3739  * and limitations under the License.
3740  *
3741  * When distributing Covered Code, include this CDDL HEADER in each
3742  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3743  * If applicable, add the following below this CDDL HEADER, with the
3744  * fields enclosed by brackets "[]" replaced with your own identifying
3745  * information: Portions Copyright [yyyy] [name of copyright owner]
3746  *
3747  * CDDL HEADER END
3748  */
3749 
3750 /*
3751  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3752  * Use is subject to license terms.
3753  */
3754 
3755 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3756 /*	  All Rights Reserved  	*/
3757 
3758 /*
3759  * An application should not include this header directly.  Instead it
3760  * should be included only through the inclusion of other Sun headers.
3761  *
3762  * The contents of this header is limited to identifiers specified in the
3763  * C Standard.  Any new identifiers specified in future amendments to the
3764  * C Standard must be placed in this header.  If these new identifiers
3765  * are required to also be in the C++ Standard "std" namespace, then for
3766  * anything other than macro definitions, corresponding "using" directives
3767  * must also be added to <sys/signal.h.h>.
3768  */
3769 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
3770 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
3771 /*
3772  * We need <sys/siginfo.h> for the declaration of siginfo_t.
3773  */
3774 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
3775 /*
3776  * CDDL HEADER START
3777  *
3778  * The contents of this file are subject to the terms of the
3779  * Common Development and Distribution License, Version 1.0 only
3780  * (the "License").  You may not use this file except in compliance
3781  * with the License.
3782  *
3783  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3784  * or http://www.opensolaris.org/os/licensing.
3785  * See the License for the specific language governing permissions
3786  * and limitations under the License.
3787  *
3788  * When distributing Covered Code, include this CDDL HEADER in each
3789  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3790  * If applicable, add the following below this CDDL HEADER, with the
3791  * fields enclosed by brackets "[]" replaced with your own identifying
3792  * information: Portions Copyright [yyyy] [name of copyright owner]
3793  *
3794  * CDDL HEADER END
3795  */
3796 /*
3797  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3798  * Use is subject to license terms.
3799  */
3800 
3801 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3802 /*	  All Rights Reserved  	*/
3803 
3804 
3805 
3806 
3807 #pragma ident "%Z%%M%	%I%	%E% SMI"
3808 
3809 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3810 /*
3811  * CDDL HEADER START
3812  *
3813  * The contents of this file are subject to the terms of the
3814  * Common Development and Distribution License (the "License").
3815  * You may not use this file except in compliance with the License.
3816  *
3817  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3818  * or http://www.opensolaris.org/os/licensing.
3819  * See the License for the specific language governing permissions
3820  * and limitations under the License.
3821  *
3822  * When distributing Covered Code, include this CDDL HEADER in each
3823  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3824  * If applicable, add the following below this CDDL HEADER, with the
3825  * fields enclosed by brackets "[]" replaced with your own identifying
3826  * information: Portions Copyright [yyyy] [name of copyright owner]
3827  *
3828  * CDDL HEADER END
3829  */
3830 
3831 /*
3832  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3833  * Copyright 2016 Joyent, Inc.
3834  *
3835  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3836  * Use is subject to license terms.
3837  */
3838 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
3839 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
3840 /*
3841  * CDDL HEADER START
3842  *
3843  * The contents of this file are subject to the terms of the
3844  * Common Development and Distribution License (the "License").
3845  * You may not use this file except in compliance with the License.
3846  *
3847  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3848  * or http://www.opensolaris.org/os/licensing.
3849  * See the License for the specific language governing permissions
3850  * and limitations under the License.
3851  *
3852  * When distributing Covered Code, include this CDDL HEADER in each
3853  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3854  * If applicable, add the following below this CDDL HEADER, with the
3855  * fields enclosed by brackets "[]" replaced with your own identifying
3856  * information: Portions Copyright [yyyy] [name of copyright owner]
3857  *
3858  * CDDL HEADER END
3859  */
3860 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3861 /*	  All Rights Reserved  	*/
3862 
3863 
3864 /*
3865  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3866  * Use is subject to license terms.
3867  *
3868  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3869  * Copyright 2016 Joyent, Inc.
3870  */
3871 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
3872 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3873 /*
3874  * The union sigval is also defined in <time.h> as per X/Open and
3875  * POSIX requirements.
3876  */
3877 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3878 /*
3879  * The sigevent structure is also defined in <time.h> as per X/Open and
3880  * POSIX requirements.
3881  */
3882 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3883 /* values of sigev_notify */
3884 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3885 /*
3886  * negative signal codes are reserved for future use for user generated
3887  * signals
3888  */
3889 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
3890 /*
3891  * Get the machine dependent signal codes (SIGILL, SIGFPE, SIGSEGV, and
3892  * SIGBUS) from <sys/machsig.h>
3893  */
3894 
3895 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 1
3896 /*
3897  * CDDL HEADER START
3898  *
3899  * The contents of this file are subject to the terms of the
3900  * Common Development and Distribution License, Version 1.0 only
3901  * (the "License").  You may not use this file except in compliance
3902  * with the License.
3903  *
3904  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3905  * or http://www.opensolaris.org/os/licensing.
3906  * See the License for the specific language governing permissions
3907  * and limitations under the License.
3908  *
3909  * When distributing Covered Code, include this CDDL HEADER in each
3910  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3911  * If applicable, add the following below this CDDL HEADER, with the
3912  * fields enclosed by brackets "[]" replaced with your own identifying
3913  * information: Portions Copyright [yyyy] [name of copyright owner]
3914  *
3915  * CDDL HEADER END
3916  */
3917 /*
3918  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
3919  * Use is subject to license terms.
3920  */
3921 
3922 /*	Copyright (c) 1988 AT&T	*/
3923 /*	  All Rights Reserved  	*/
3924 
3925 
3926 
3927 
3928 
3929 #pragma ident "%Z%%M%	%I%	%E% SMI"
3930 
3931 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3932 /*
3933  * CDDL HEADER START
3934  *
3935  * The contents of this file are subject to the terms of the
3936  * Common Development and Distribution License (the "License").
3937  * You may not use this file except in compliance with the License.
3938  *
3939  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3940  * or http://www.opensolaris.org/os/licensing.
3941  * See the License for the specific language governing permissions
3942  * and limitations under the License.
3943  *
3944  * When distributing Covered Code, include this CDDL HEADER in each
3945  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3946  * If applicable, add the following below this CDDL HEADER, with the
3947  * fields enclosed by brackets "[]" replaced with your own identifying
3948  * information: Portions Copyright [yyyy] [name of copyright owner]
3949  *
3950  * CDDL HEADER END
3951  */
3952 
3953 /*
3954  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3955  * Copyright 2016 Joyent, Inc.
3956  *
3957  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3958  * Use is subject to license terms.
3959  */
3960 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 2
3961 
3962 
3963 
3964 
3965 
3966 /*
3967  * machsig.h is the machine dependent portion of siginfo.h (and is
3968  * included by siginfo.h). A version of machsig.h should exist for
3969  * each architecture. The codes for SIGILL, SIGFPU, SIGSEGV and SIGBUS
3970  * are in this file. The codes for SIGTRAP, SIGCLD(SIGCHLD), and
3971  * SIGPOLL are architecture independent and may be found in siginfo.h.
3972  */
3973 
3974 
3975 
3976 
3977 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/vm/faultcode.h" 1
3978 /*
3979  * CDDL HEADER START
3980  *
3981  * The contents of this file are subject to the terms of the
3982  * Common Development and Distribution License (the "License").
3983  * You may not use this file except in compliance with the License.
3984  *
3985  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3986  * or http://www.opensolaris.org/os/licensing.
3987  * See the License for the specific language governing permissions
3988  * and limitations under the License.
3989  *
3990  * When distributing Covered Code, include this CDDL HEADER in each
3991  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3992  * If applicable, add the following below this CDDL HEADER, with the
3993  * fields enclosed by brackets "[]" replaced with your own identifying
3994  * information: Portions Copyright [yyyy] [name of copyright owner]
3995  *
3996  * CDDL HEADER END
3997  */
3998 /*
3999  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
4000  * Use is subject to license terms.
4001  */
4002 
4003 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4004 /*	  All Rights Reserved  	*/
4005 
4006 /*
4007  * University Copyright- Copyright (c) 1982, 1986, 1988
4008  * The Regents of the University of California
4009  * All Rights Reserved
4010  *
4011  * University Acknowledgment- Portions of this document are derived from
4012  * software developed by the University of California, Berkeley, and its
4013  * contributors.
4014  */
4015 
4016 
4017 
4018 
4019 #pragma ident "%Z%%M%	%I%	%E% SMI"
4020 
4021 
4022 
4023 
4024 
4025 /*
4026  * This file describes the data type returned by vm routines
4027  * which handle faults.
4028  *
4029  * If FC_CODE(fc) == FC_OBJERR, then FC_ERRNO(fc) contains the errno value
4030  * returned by the underlying object mapped at the fault address.
4031  */
4032 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/vm/faultcode.h"
4033 typedef int faultcode_t; /* type returned by vm fault routines */
4034 
4035 extern int fc_decode(faultcode_t);
4036 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h" 2
4037 
4038 
4039 /*
4040  * SIGILL signal codes
4041  */
4042 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h"
4043 /*
4044  * SIGEMT signal codes
4045  */
4046 
4047 
4048 
4049 
4050 
4051 
4052 /*
4053  * SIGFPE signal codes
4054  */
4055 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machsig.h"
4056 /*
4057  * SIGSEGV signal codes
4058  */
4059 
4060 
4061 
4062 
4063 
4064 
4065 
4066 /*
4067  * SIGBUS signal codes
4068  */
4069 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
4070 
4071 /*
4072  * SIGTRAP signal codes
4073  */
4074 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4075 /*
4076  * SIGCLD signal codes
4077  */
4078 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4079 /*
4080  * SIGPOLL signal codes
4081  */
4082 # 195 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4083 /*
4084  * SIGPROF signal codes
4085  */
4086 # 215 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4087 /*
4088  * Inclusion of <sys/time_impl.h> is needed for the declaration of
4089  * timestruc_t.  However, since inclusion of <sys/time_impl.h> results
4090  * in X/Open and POSIX namespace pollution, the definition for
4091  * timestruct_t has been duplicated in a standards namespace safe header
4092  * <sys/time_std_impl.h>.  In <sys/time_std_impl.h>, the structure
4093  * name, tag, and member names, as well as the type itself, all have
4094  * leading underscores to protect namespace.
4095  */
4096 
4097 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
4098 /*
4099  * CDDL HEADER START
4100  *
4101  * The contents of this file are subject to the terms of the
4102  * Common Development and Distribution License, Version 1.0 only
4103  * (the "License").  You may not use this file except in compliance
4104  * with the License.
4105  *
4106  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4107  * or http://www.opensolaris.org/os/licensing.
4108  * See the License for the specific language governing permissions
4109  * and limitations under the License.
4110  *
4111  * When distributing Covered Code, include this CDDL HEADER in each
4112  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4113  * If applicable, add the following below this CDDL HEADER, with the
4114  * fields enclosed by brackets "[]" replaced with your own identifying
4115  * information: Portions Copyright [yyyy] [name of copyright owner]
4116  *
4117  * CDDL HEADER END
4118  */
4119 /*
4120  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4121  * Use is subject to license terms.
4122  */
4123 
4124 /*
4125  * Implementation-private.  This header should not be included
4126  * directly by an application.  The application should instead
4127  * include <time.h> which includes this header conditionally
4128  * depending on which feature test macros are defined. By default,
4129  * this header is included by <time.h>.  X/Open and POSIX
4130  * standards requirements result in this header being included
4131  * by <time.h> only under a restricted set of conditions.
4132  */
4133 # 226 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
4134 
4135 
4136 
4137 
4138 /*
4139  * The inclusion of <sys/types.h> is needed for definitions of pid_t, etc.
4140  * Placement here is due to a dependency in <sys/select.h> which is included
4141  * by <sys/types.h> for the sigevent structure.  Hence this inclusion must
4142  * follow that definition.
4143  */
4144 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4145 /*
4146  * CDDL HEADER START
4147  *
4148  * The contents of this file are subject to the terms of the
4149  * Common Development and Distribution License (the "License").
4150  * You may not use this file except in compliance with the License.
4151  *
4152  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4153  * or http://www.opensolaris.org/os/licensing.
4154  * See the License for the specific language governing permissions
4155  * and limitations under the License.
4156  *
4157  * When distributing Covered Code, include this CDDL HEADER in each
4158  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4159  * If applicable, add the following below this CDDL HEADER, with the
4160  * fields enclosed by brackets "[]" replaced with your own identifying
4161  * information: Portions Copyright [yyyy] [name of copyright owner]
4162  *
4163  * CDDL HEADER END
4164  */
4165 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4166 /*	  All Rights Reserved  	*/
4167 
4168 
4169 /*
4170  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4171  * Use is subject to license terms.
4172  *
4173  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4174  * Copyright 2016 Joyent, Inc.
4175  */
4176 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 2
4177 
4178 
4179 typedef struct siginfo { /* pollutes POSIX/XOPEN namespace */
4180 
4181 
4182 
4183  int si_signo; /* signal from signal.h	*/
4184  int si_code; /* code from above	*/
4185  int si_errno; /* error from errno.h	*/
4186 
4187 
4188 
4189  union {
4190 
4191   int __pad[((128 / sizeof (int)) - 3)]; /* for future growth	*/
4192 
4193   struct { /* kill(), SIGCLD, siqqueue() */
4194    pid_t __pid; /* process ID		*/
4195    union {
4196     struct {
4197      uid_t __uid;
4198 
4199 
4200      union sigval __value;
4201 
4202 
4203 
4204     } __kill;
4205     struct {
4206      clock_t __utime;
4207      int __status;
4208      clock_t __stime;
4209     } __cld;
4210    } __pdata;
4211    ctid_t __ctid; /* contract ID		*/
4212    zoneid_t __zoneid; /* zone ID		*/
4213   } __proc;
4214 
4215   struct { /* SIGSEGV, SIGBUS, SIGILL, SIGTRAP, SIGFPE */
4216    void *__addr; /* faulting address	*/
4217    int __trapno; /* illegal trap number	*/
4218    caddr_t __pc; /* instruction address	*/
4219   } __fault;
4220 
4221   struct { /* SIGPOLL, SIGXFSZ	*/
4222   /* fd not currently available for SIGPOLL */
4223    int __fd; /* file descriptor	*/
4224    long __band;
4225   } __file;
4226 
4227   struct { /* SIGPROF */
4228    caddr_t __faddr; /* last fault address	*/
4229 
4230    timestruc_t __tstamp; /* real time stamp	*/
4231 
4232 
4233 
4234    short __syscall; /* current syscall	*/
4235    char __nsysarg; /* number of arguments	*/
4236    char __fault; /* last fault type	*/
4237    long __sysarg[8]; /* syscall arguments	*/
4238    int __mstate[10]; /* see <sys/msacct.h>	*/
4239   } __prof;
4240 
4241   struct { /* SI_RCTL */
4242    int32_t __entity; /* type of entity exceeding */
4243   } __rctl;
4244  } __data;
4245 
4246 } siginfo_t;
4247 # 374 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h"
4248 /*
4249  * XXX -- internal version is identical to siginfo_t but without the padding.
4250  * This must be maintained in sync with it.
4251  */
4252 
4253 
4254 
4255 typedef struct k_siginfo {
4256  int si_signo; /* signal from signal.h	*/
4257  int si_code; /* code from above	*/
4258  int si_errno; /* error from errno.h	*/
4259 
4260 
4261 
4262  union {
4263   struct { /* kill(), SIGCLD, siqqueue() */
4264    pid_t __pid; /* process ID		*/
4265    union {
4266     struct {
4267      uid_t __uid;
4268      union sigval __value;
4269     } __kill;
4270     struct {
4271      clock_t __utime;
4272      int __status;
4273      clock_t __stime;
4274     } __cld;
4275    } __pdata;
4276    ctid_t __ctid; /* contract ID		*/
4277    zoneid_t __zoneid; /* zone ID		*/
4278   } __proc;
4279 
4280   struct { /* SIGSEGV, SIGBUS, SIGILL, SIGTRAP, SIGFPE */
4281    void *__addr; /* faulting address	*/
4282    int __trapno; /* illegal trap number	*/
4283    caddr_t __pc; /* instruction address	*/
4284   } __fault;
4285 
4286   struct { /* SIGPOLL, SIGXFSZ	*/
4287   /* fd not currently available for SIGPOLL */
4288    int __fd; /* file descriptor	*/
4289    long __band;
4290   } __file;
4291 
4292   struct { /* SIGPROF */
4293    caddr_t __faddr; /* last fault address	*/
4294 
4295 
4296    timestruc_t __tstamp; /* real time stamp	*/
4297 
4298 
4299 
4300    short __syscall; /* current syscall	*/
4301    char __nsysarg; /* number of arguments	*/
4302    char __fault; /* last fault type	*/
4303    /* these are omitted to keep k_siginfo_t small	*/
4304    /* long	__sysarg[8]; */
4305    /* int	__mstate[10]; */
4306   } __prof;
4307 
4308   struct { /* SI_RCTL */
4309    int32_t __entity; /* type of entity exceeding */
4310   } __rctl;
4311 
4312  } __data;
4313 
4314 } k_siginfo_t;
4315 
4316 typedef struct sigqueue {
4317  struct sigqueue *sq_next;
4318  k_siginfo_t sq_info;
4319  void (*sq_func)(struct sigqueue *); /* destructor function */
4320  void *sq_backptr; /* pointer to the data structure */
4321      /* associated by sq_func()	*/
4322  int sq_external; /* comes from outside the contract */
4323 } sigqueue_t;
4324 
4325 /*  indication whether to queue the signal or not */
4326 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 2
4327 
4328 
4329 /* Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements */
4330 
4331 
4332 
4333 
4334 
4335 
4336 
4337 typedef struct {
4338  unsigned int __sigbits[3];
4339 } k_sigset_t;
4340 
4341 /*
4342  * The signal handler routine can have either one or three arguments.
4343  * Existing C code has used either form so not specifing the arguments
4344  * neatly finesses the problem.  C++ doesn't accept this.  To C++
4345  * "(*sa_handler)()" indicates a routine with no arguments (ANSI C would
4346  * specify this as "(*sa_handler)(void)").  One or the other form must be
4347  * used for C++ and the only logical choice is "(*sa_handler)(int)" to allow
4348  * the SIG_* defines to work.  "(*sa_sigaction)(int, siginfo_t *, void *)"
4349  * can be used for the three argument form.
4350  */
4351 
4352 /*
4353  * Note: storage overlap by sa_handler and sa_sigaction
4354  */
4355 struct sigaction {
4356  int sa_flags;
4357  union {
4358 
4359 
4360 
4361   void (*_handler)();
4362 
4363 
4364 
4365 
4366   void (*_sigaction)(int, siginfo_t *, void *);
4367 
4368  } _funcptr;
4369  sigset_t sa_mask;
4370 
4371  int sa_resv[2];
4372 
4373 };
4374 # 126 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4375 /* this is only valid for SIGCLD */
4376 
4377 
4378 
4379 
4380 
4381 
4382 
4383    /* non-conformant ANSI compilation	*/
4384 
4385 /* definitions for the sa_flags field */
4386 # 153 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4387 /* this is only valid for SIGCLD */
4388 
4389 
4390 
4391 /*
4392  * use of these symbols by applications is injurious
4393  *	to binary compatibility
4394  */
4395 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4396 /* Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements. */
4397 
4398 
4399 
4400 typedef struct sigaltstack {
4401 
4402 
4403 
4404  void *ss_sp;
4405  size_t ss_size;
4406  int ss_flags;
4407 } stack_t;
4408 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4409 /* signotify id used only by libc for mq_notify()/aio_notify() */
4410 typedef struct signotify_id { /* signotify id struct		*/
4411  pid_t sn_pid; /* pid of proc to be notified	*/
4412  int sn_index; /* index in preallocated pool	*/
4413  int sn_pad; /* reserved			*/
4414 } signotify_id_t;
4415 # 222 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h"
4416 /* Command codes for sig_notify call */
4417 
4418 
4419 
4420 
4421 
4422 
4423 
4424 /* Added as per XPG4v2 */
4425 
4426 
4427 
4428 struct sigstack {
4429  void *ss_sp;
4430  int ss_onstack;
4431 };
4432 
4433 
4434 /*
4435  * For definition of ucontext_t; must follow struct definition
4436  * for  sigset_t
4437  */
4438 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
4439 
4440 /*
4441  * Allow global visibility for symbols defined in
4442  * C++ "std" namespace in <iso/signal_iso.h>.
4443  */
4444 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
4445 extern const char **_sys_siglistp; /* signal descriptions */
4446 extern const int _sys_siglistn; /* # of signal descriptions */
4447 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
4448 extern int kill(pid_t, int);
4449 extern int sigaction(int, const struct sigaction *,
4450  struct sigaction *);
4451 
4452 extern int sigaddset(sigset_t *, int);
4453 extern int sigdelset(sigset_t *, int);
4454 extern int sigemptyset(sigset_t *);
4455 extern int sigfillset(sigset_t *);
4456 extern int sigismember(const sigset_t *, int);
4457 
4458 extern int sigpending(sigset_t *);
4459 extern int sigprocmask(int, const sigset_t *,
4460  sigset_t *);
4461 extern int sigsuspend(const sigset_t *);
4462 
4463 
4464 
4465 
4466 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 1
4467 /*
4468  * CDDL HEADER START
4469  *
4470  * The contents of this file are subject to the terms of the
4471  * Common Development and Distribution License, Version 1.0 only
4472  * (the "License").  You may not use this file except in compliance
4473  * with the License.
4474  *
4475  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4476  * or http://www.opensolaris.org/os/licensing.
4477  * See the License for the specific language governing permissions
4478  * and limitations under the License.
4479  *
4480  * When distributing Covered Code, include this CDDL HEADER in each
4481  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4482  * If applicable, add the following below this CDDL HEADER, with the
4483  * fields enclosed by brackets "[]" replaced with your own identifying
4484  * information: Portions Copyright [yyyy] [name of copyright owner]
4485  *
4486  * CDDL HEADER END
4487  */
4488 /*
4489  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4490  * Use is subject to license terms.
4491  */
4492 
4493 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4494 /*	  All Rights Reserved  	*/
4495 
4496 
4497 
4498 
4499 
4500 #pragma ident "%Z%%M%	%I%	%E% SMI"
4501 
4502 
4503 
4504 
4505 
4506 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4507 /*
4508  * CDDL HEADER START
4509  *
4510  * The contents of this file are subject to the terms of the
4511  * Common Development and Distribution License (the "License").
4512  * You may not use this file except in compliance with the License.
4513  *
4514  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4515  * or http://www.opensolaris.org/os/licensing.
4516  * See the License for the specific language governing permissions
4517  * and limitations under the License.
4518  *
4519  * When distributing Covered Code, include this CDDL HEADER in each
4520  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4521  * If applicable, add the following below this CDDL HEADER, with the
4522  * fields enclosed by brackets "[]" replaced with your own identifying
4523  * information: Portions Copyright [yyyy] [name of copyright owner]
4524  *
4525  * CDDL HEADER END
4526  */
4527 
4528 /*
4529  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4530  * Copyright 2016 Joyent, Inc.
4531  *
4532  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4533  * Use is subject to license terms.
4534  */
4535 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
4536 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4537 /*
4538  * CDDL HEADER START
4539  *
4540  * The contents of this file are subject to the terms of the
4541  * Common Development and Distribution License (the "License").
4542  * You may not use this file except in compliance with the License.
4543  *
4544  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4545  * or http://www.opensolaris.org/os/licensing.
4546  * See the License for the specific language governing permissions
4547  * and limitations under the License.
4548  *
4549  * When distributing Covered Code, include this CDDL HEADER in each
4550  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4551  * If applicable, add the following below this CDDL HEADER, with the
4552  * fields enclosed by brackets "[]" replaced with your own identifying
4553  * information: Portions Copyright [yyyy] [name of copyright owner]
4554  *
4555  * CDDL HEADER END
4556  */
4557 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4558 /*	  All Rights Reserved  	*/
4559 
4560 
4561 /*
4562  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4563  * Use is subject to license terms.
4564  *
4565  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4566  * Copyright 2016 Joyent, Inc.
4567  */
4568 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
4569 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/signal.h" 1
4570 /*
4571  * CDDL HEADER START
4572  *
4573  * The contents of this file are subject to the terms of the
4574  * Common Development and Distribution License (the "License").
4575  * You may not use this file except in compliance with the License.
4576  *
4577  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4578  * or http://www.opensolaris.org/os/licensing.
4579  * See the License for the specific language governing permissions
4580  * and limitations under the License.
4581  *
4582  * When distributing Covered Code, include this CDDL HEADER in each
4583  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4584  * If applicable, add the following below this CDDL HEADER, with the
4585  * fields enclosed by brackets "[]" replaced with your own identifying
4586  * information: Portions Copyright [yyyy] [name of copyright owner]
4587  *
4588  * CDDL HEADER END
4589  */
4590 
4591 /*
4592  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
4593  * Use is subject to license terms.
4594  */
4595 
4596 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4597 /*	  All Rights Reserved  	*/
4598 
4599 /*
4600  * University Copyright- Copyright (c) 1982, 1986, 1988
4601  * The Regents of the University of California
4602  * All Rights Reserved
4603  *
4604  * University Acknowledgment- Portions of this document are derived from
4605  * software developed by the University of California, Berkeley, and its
4606  * contributors.
4607  */
4608 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/procset.h" 2
4609 
4610 /*
4611  *	This file defines the data needed to specify a set of
4612  *	processes.  These types are used by the sigsend, sigsendset,
4613  *	priocntl, priocntlset, waitid, evexit, and evexitset system
4614  *	calls.
4615  */
4616 
4617 
4618 
4619 
4620 
4621 /*
4622  *	The following defines the values for an identifier type.  It
4623  *	specifies the interpretation of an id value.  An idtype and
4624  *	id together define a simple set of processes.
4625  */
4626 typedef enum
4627 
4628  idtype /* pollutes XPG4.2 namespace */
4629 
4630   {
4631  P_PID, /* A process identifier.		*/
4632  P_PPID, /* A parent process identifier.		*/
4633  P_PGID, /* A process group (job control group)	*/
4634    /* identifier.				*/
4635  P_SID, /* A session identifier.		*/
4636  P_CID, /* A scheduling class identifier.	*/
4637  P_UID, /* A user identifier.			*/
4638  P_GID, /* A group identifier.			*/
4639  P_ALL, /* All processes.			*/
4640  P_LWPID, /* An LWP identifier.			*/
4641  P_TASKID, /* A task identifier.			*/
4642  P_PROJID, /* A project identifier.		*/
4643  P_POOLID, /* A pool identifier.			*/
4644  P_ZONEID, /* A zone identifier.			*/
4645  P_CTID, /* A (process) contract identifier.	*/
4646  P_CPUID, /* CPU identifier.			*/
4647  P_PSETID /* Processor set identifier		*/
4648 } idtype_t;
4649 
4650 
4651 /*
4652  *	The following defines the operations which can be performed to
4653  *	combine two simple sets of processes to form another set of
4654  *	processes.
4655  */
4656 
4657 typedef enum idop {
4658  POP_DIFF, /* Set difference.  The processes which	*/
4659    /* are in the left operand set and not	*/
4660    /* in the right operand set.		*/
4661  POP_AND, /* Set disjunction.  The processes	*/
4662    /* which are in both the left and right	*/
4663    /* operand sets.			*/
4664  POP_OR, /* Set conjunction.  The processes	*/
4665    /* which are in either the left or the	*/
4666    /* right operand sets (or both).	*/
4667  POP_XOR /* Set exclusive or.  The processes 	*/
4668    /* which are in either the left or	*/
4669    /* right operand sets but not in both.	*/
4670 } idop_t;
4671 
4672 
4673 /*
4674  *	The following structure is used to define a set of processes.
4675  *	The set is defined in terms of two simple sets of processes
4676  *	and an operator which operates on these two operand sets.
4677  */
4678 typedef struct procset {
4679  idop_t p_op; /* The operator connection the	*/
4680     /* following two operands each	*/
4681     /* of which is a simple set of	*/
4682     /* processes.			*/
4683 
4684  idtype_t p_lidtype;
4685     /* The type of the left operand	*/
4686     /* simple set.			*/
4687  id_t p_lid; /* The id of the left operand.	*/
4688 
4689  idtype_t p_ridtype;
4690     /* The type of the right	*/
4691     /* operand simple set.		*/
4692  id_t p_rid; /* The id of the right operand.	*/
4693 } procset_t;
4694 
4695 /*
4696  *	The following macro can be used to initialize a procset_t
4697  *	structure.
4698  */
4699 # 89 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
4700 extern int gsignal(int);
4701 extern int (*ssignal(int, int (*)(int)))(int);
4702 extern int sigsend(idtype_t, id_t, int);
4703 extern int sigsendset(const procset_t *, int);
4704 extern int sig2str(int, char *);
4705 extern int str2sig(const char *, int *);
4706 
4707 
4708 
4709 
4710 
4711 extern void (*bsd_signal(int, void (*)(int)))(int);
4712 extern int killpg(pid_t, int);
4713 extern int siginterrupt(int, int);
4714 extern int sigaltstack(const stack_t *, stack_t *);
4715 extern int sighold(int);
4716 extern int sigignore(int);
4717 extern int sigpause(int);
4718 extern int sigrelse(int);
4719 extern void (*sigset(int, void (*)(int)))(int);
4720 
4721 
4722 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
4723 
4724 
4725 
4726 extern int sigstack(struct sigstack *, struct sigstack *);
4727 
4728 
4729 
4730 
4731 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/siginfo.h" 1
4732 /*
4733  * CDDL HEADER START
4734  *
4735  * The contents of this file are subject to the terms of the
4736  * Common Development and Distribution License, Version 1.0 only
4737  * (the "License").  You may not use this file except in compliance
4738  * with the License.
4739  *
4740  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4741  * or http://www.opensolaris.org/os/licensing.
4742  * See the License for the specific language governing permissions
4743  * and limitations under the License.
4744  *
4745  * When distributing Covered Code, include this CDDL HEADER in each
4746  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4747  * If applicable, add the following below this CDDL HEADER, with the
4748  * fields enclosed by brackets "[]" replaced with your own identifying
4749  * information: Portions Copyright [yyyy] [name of copyright owner]
4750  *
4751  * CDDL HEADER END
4752  */
4753 /*
4754  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4755  * Use is subject to license terms.
4756  */
4757 
4758 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4759 /*	  All Rights Reserved  	*/
4760 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
4761 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
4762 /*
4763  * CDDL HEADER START
4764  *
4765  * The contents of this file are subject to the terms of the
4766  * Common Development and Distribution License (the "License").
4767  * You may not use this file except in compliance with the License.
4768  *
4769  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4770  * or http://www.opensolaris.org/os/licensing.
4771  * See the License for the specific language governing permissions
4772  * and limitations under the License.
4773  *
4774  * When distributing Covered Code, include this CDDL HEADER in each
4775  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4776  * If applicable, add the following below this CDDL HEADER, with the
4777  * fields enclosed by brackets "[]" replaced with your own identifying
4778  * information: Portions Copyright [yyyy] [name of copyright owner]
4779  *
4780  * CDDL HEADER END
4781  */
4782 /*	Copyright (c) 1988 AT&T	*/
4783 /*	  All Rights Reserved  	*/
4784 
4785 
4786 /*
4787  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4788  *
4789  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
4790  * Use is subject to license terms.
4791  */
4792 /*
4793  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
4794  * Copyright 2016 Joyent, Inc.
4795  */
4796 # 122 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h" 2
4797 extern int pthread_kill(pthread_t, int);
4798 extern int pthread_sigmask(int, const sigset_t *,
4799  sigset_t *);
4800 extern int sigwaitinfo(const sigset_t *,
4801  siginfo_t *);
4802 extern int sigtimedwait(const sigset_t *,
4803  siginfo_t *, const struct timespec *);
4804 extern int sigqueue(pid_t, int, const union sigval);
4805 
4806 
4807 /*
4808  * sigwait() prototype is defined here.
4809  */
4810 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/signal.h"
4811 extern int sigwait(sigset_t *);
4812 # 33 "quit.c" 2
4813 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1
4814 /*
4815  * CDDL HEADER START
4816  *
4817  * The contents of this file are subject to the terms of the
4818  * Common Development and Distribution License (the "License").
4819  * You may not use this file except in compliance with the License.
4820  *
4821  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4822  * or http://www.opensolaris.org/os/licensing.
4823  * See the License for the specific language governing permissions
4824  * and limitations under the License.
4825  *
4826  * When distributing Covered Code, include this CDDL HEADER in each
4827  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4828  * If applicable, add the following below this CDDL HEADER, with the
4829  * fields enclosed by brackets "[]" replaced with your own identifying
4830  * information: Portions Copyright [yyyy] [name of copyright owner]
4831  *
4832  * CDDL HEADER END
4833  */
4834 
4835 /*
4836  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4837  * Copyright (c) 2013 Gary Mills
4838  *
4839  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
4840  */
4841 
4842 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
4843 
4844 /*	Copyright (c) 1988 AT&T	*/
4845 /*	  All Rights Reserved  	*/
4846 
4847 
4848 
4849 
4850 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 1
4851 /*
4852  * CDDL HEADER START
4853  *
4854  * The contents of this file are subject to the terms of the
4855  * Common Development and Distribution License, Version 1.0 only
4856  * (the "License").  You may not use this file except in compliance
4857  * with the License.
4858  *
4859  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4860  * or http://www.opensolaris.org/os/licensing.
4861  * See the License for the specific language governing permissions
4862  * and limitations under the License.
4863  *
4864  * When distributing Covered Code, include this CDDL HEADER in each
4865  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4866  * If applicable, add the following below this CDDL HEADER, with the
4867  * fields enclosed by brackets "[]" replaced with your own identifying
4868  * information: Portions Copyright [yyyy] [name of copyright owner]
4869  *
4870  * CDDL HEADER END
4871  */
4872 /*
4873  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4874  * Copyright 2014 PALO, Richard.
4875  *
4876  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4877  * Use is subject to license terms.
4878  */
4879 
4880 /*	Copyright (c) 1988 AT&T	*/
4881 /*	  All Rights Reserved  	*/
4882 
4883 
4884 /*
4885  * An application should not include this header directly.  Instead it
4886  * should be included only through the inclusion of other Sun headers.
4887  *
4888  * The contents of this header is limited to identifiers specified in the
4889  * C Standard.  Any new identifiers specified in future amendments to the
4890  * C Standard must be placed in this header.  If these new identifiers
4891  * are required to also be in the C++ Standard "std" namespace, then for
4892  * anything other than macro definitions, corresponding "using" directives
4893  * must also be added to <locale.h>.
4894  */
4895 
4896 
4897 
4898 
4899 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4900 /*
4901  * CDDL HEADER START
4902  *
4903  * The contents of this file are subject to the terms of the
4904  * Common Development and Distribution License (the "License").
4905  * You may not use this file except in compliance with the License.
4906  *
4907  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4908  * or http://www.opensolaris.org/os/licensing.
4909  * See the License for the specific language governing permissions
4910  * and limitations under the License.
4911  *
4912  * When distributing Covered Code, include this CDDL HEADER in each
4913  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4914  * If applicable, add the following below this CDDL HEADER, with the
4915  * fields enclosed by brackets "[]" replaced with your own identifying
4916  * information: Portions Copyright [yyyy] [name of copyright owner]
4917  *
4918  * CDDL HEADER END
4919  */
4920 
4921 /*
4922  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4923  * Copyright 2016 Joyent, Inc.
4924  *
4925  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4926  * Use is subject to license terms.
4927  */
4928 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
4929 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
4930 /*
4931  * This file and its contents are supplied under the terms of the
4932  * Common Development and Distribution License ("CDDL"), version 1.0.
4933  * You may only use this file in accordance with the terms of version
4934  * 1.0 of the CDDL.
4935  *
4936  * A full copy of the text of the CDDL should have accompanied this
4937  * source.  A copy of the CDDL is also available via the Internet at
4938  * http://www.illumos.org/license/CDDL.
4939  */
4940 
4941 /*
4942  * Copyright 2014-2016 PALO, Richard.
4943  */
4944 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
4945 
4946 
4947 
4948 
4949 
4950 unsigned char __mb_cur_max(void);
4951 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
4952 typedef struct {
4953  int quot;
4954  int rem;
4955 } div_t;
4956 
4957 typedef struct {
4958  long quot;
4959  long rem;
4960 } ldiv_t;
4961 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
4962 /*
4963  * wchar_t is a built-in type in standard C++ and as such is not
4964  * defined here when using standard C++. However, the GNU compiler
4965  * fixincludes utility nonetheless creates its own version of this
4966  * header for use by gcc and g++. In that version it adds a redundant
4967  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
4968  * header we need to include the following magic comment:
4969  *
4970  * we must use the C++ compiler's type
4971  *
4972  * The above comment should not be removed or changed until GNU
4973  * gcc/fixinc/inclhack.def is updated to bypass this header.
4974  */
4975 
4976 
4977 
4978 
4979 
4980 
4981 typedef long wchar_t;
4982 # 120 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
4983 extern void abort(void) __attribute__((__noreturn__));
4984 extern int abs(int);
4985 extern int atexit(void (*)(void));
4986 extern double atof(const char *);
4987 extern int atoi(const char *);
4988 extern long int atol(const char *);
4989 extern void *bsearch(const void *, const void *, size_t, size_t,
4990  int (*)(const void *, const void *));
4991 
4992 
4993 
4994 
4995 
4996 
4997 extern void *calloc(size_t, size_t);
4998 extern div_t div(int, int);
4999 extern void exit(int)
5000  __attribute__((__noreturn__));
5001 extern void free(void *);
5002 extern char *getenv(const char *);
5003 extern long int labs(long);
5004 extern ldiv_t ldiv(long, long);
5005 extern void *malloc(size_t);
5006 extern int mblen(const char *, size_t);
5007 extern size_t mbstowcs(wchar_t *, const char *,
5008  size_t);
5009 extern int mbtowc(wchar_t *, const char *, size_t);
5010 extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
5011 
5012 
5013 
5014 
5015 
5016 extern int rand(void);
5017 extern void *realloc(void *, size_t);
5018 extern void srand(unsigned int);
5019 extern double strtod(const char *, char **);
5020 extern long int strtol(const char *, char **, int);
5021 extern unsigned long int strtoul(const char *,
5022  char **, int);
5023 extern int system(const char *);
5024 extern int wctomb(char *, wchar_t);
5025 extern size_t wcstombs(char *, const wchar_t *,
5026  size_t);
5027 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
5028 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 1
5029 /*
5030  * CDDL HEADER START
5031  *
5032  * The contents of this file are subject to the terms of the
5033  * Common Development and Distribution License, Version 1.0 only
5034  * (the "License").  You may not use this file except in compliance
5035  * with the License.
5036  *
5037  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5038  * or http://www.opensolaris.org/os/licensing.
5039  * See the License for the specific language governing permissions
5040  * and limitations under the License.
5041  *
5042  * When distributing Covered Code, include this CDDL HEADER in each
5043  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5044  * If applicable, add the following below this CDDL HEADER, with the
5045  * fields enclosed by brackets "[]" replaced with your own identifying
5046  * information: Portions Copyright [yyyy] [name of copyright owner]
5047  *
5048  * CDDL HEADER END
5049  */
5050 /*
5051  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5052  *
5053  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5054  * Use is subject to license terms.
5055  */
5056 
5057 /*
5058  * An application should not include this header directly.  Instead it
5059  * should be included only through the inclusion of other Sun headers.
5060  *
5061  * The contents of this header is limited to identifiers specified in
5062  * the C99 standard and in conflict with the C++ implementation of the
5063  * standard header.  The C++ standard may adopt the C99 standard at
5064  * which point it is expected that the symbols included here will
5065  * become part of the C++ std namespace.
5066  */
5067 
5068 
5069 
5070 
5071 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5072 /*
5073  * CDDL HEADER START
5074  *
5075  * The contents of this file are subject to the terms of the
5076  * Common Development and Distribution License (the "License").
5077  * You may not use this file except in compliance with the License.
5078  *
5079  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5080  * or http://www.opensolaris.org/os/licensing.
5081  * See the License for the specific language governing permissions
5082  * and limitations under the License.
5083  *
5084  * When distributing Covered Code, include this CDDL HEADER in each
5085  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5086  * If applicable, add the following below this CDDL HEADER, with the
5087  * fields enclosed by brackets "[]" replaced with your own identifying
5088  * information: Portions Copyright [yyyy] [name of copyright owner]
5089  *
5090  * CDDL HEADER END
5091  */
5092 
5093 /*
5094  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5095  * Copyright 2016 Joyent, Inc.
5096  *
5097  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5098  * Use is subject to license terms.
5099  */
5100 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 2
5101 
5102 
5103 
5104 
5105 
5106 /*
5107  * The following have been added as a result of the ISO/IEC 9899:1999
5108  * standard. For a strictly conforming C application, visibility is
5109  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
5110  * For non-strictly conforming C applications, there are no restrictions
5111  * on the C namespace.
5112  */
5113 
5114 
5115 typedef struct {
5116  long long quot;
5117  long long rem;
5118 } lldiv_t;
5119 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h"
5120 extern void _Exit(int);
5121 extern float strtof(const char *, char **);
5122 extern long double strtold(const char *, char **);
5123 
5124 
5125 extern long long atoll(const char *);
5126 extern long long llabs(long long);
5127 extern lldiv_t lldiv(long long, long long);
5128 extern long long strtoll(const char *, char **,
5129  int);
5130 extern unsigned long long strtoull(const char *,
5131  char **, int);
5132 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
5133 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 1
5134 /*
5135  * This file and its contents are supplied under the terms of the
5136  * Common Development and Distribution License ("CDDL"), version 1.0.
5137  * You may only use this file in accordance with the terms of version
5138  * 1.0 of the CDDL.
5139  *
5140  * A full copy of the text of the CDDL should have accompanied this
5141  * source.  A copy of the CDDL is also available via the Internet at
5142  * http://www.illumos.org/license/CDDL.
5143  */
5144 
5145 /*
5146  * Copyright 2016 Joyent, Inc.
5147  */
5148 
5149 /*
5150  * An application should not include this header directly.  Instead it
5151  * should be included only through the inclusion of other illumos headers.
5152  *
5153  * The contents of this header is limited to identifiers specified in
5154  * the C11 standard and in conflict with the C++ implementation of the
5155  * standard header.  The C++ standard may adopt the C11 standard at
5156  * which point it is expected that the symbols included here will
5157  * become part of the C++ std namespace.
5158  */
5159 
5160 
5161 
5162 
5163 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5164 /*
5165  * CDDL HEADER START
5166  *
5167  * The contents of this file are subject to the terms of the
5168  * Common Development and Distribution License (the "License").
5169  * You may not use this file except in compliance with the License.
5170  *
5171  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5172  * or http://www.opensolaris.org/os/licensing.
5173  * See the License for the specific language governing permissions
5174  * and limitations under the License.
5175  *
5176  * When distributing Covered Code, include this CDDL HEADER in each
5177  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5178  * If applicable, add the following below this CDDL HEADER, with the
5179  * fields enclosed by brackets "[]" replaced with your own identifying
5180  * information: Portions Copyright [yyyy] [name of copyright owner]
5181  *
5182  * CDDL HEADER END
5183  */
5184 
5185 /*
5186  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5187  * Copyright 2016 Joyent, Inc.
5188  *
5189  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5190  * Use is subject to license terms.
5191  */
5192 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 2
5193 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
5194 /*
5195  * The following have been added as a result of the ISO/IEC 9899:2011
5196  * standard. For a strictly conforming C application, visibility is
5197  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
5198  * For non-strictly conforming C applications, there are no restrictions
5199  * on the C namespace.
5200  */
5201 
5202 /*
5203  * Work around fix-includes and other bad actors with using multiple headers.
5204  */
5205 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
5206 extern void *aligned_alloc(size_t, size_t);
5207 extern int at_quick_exit(void (*)(void));
5208 extern void quick_exit(int);
5209 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
5210 
5211 
5212 
5213 
5214 
5215 /*
5216  * Allow global visibility for symbols defined in
5217  * C++ "std" namespace in <iso/stdlib_iso.h>.
5218  */
5219 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5220 /*
5221  * Allow global visibility for symbols defined in
5222  * C++ "std" namespace in <iso/stdlib_c11.h>.
5223  */
5224 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5225 /* large file compilation environment setup */
5226 
5227 
5228 
5229 
5230 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5231 #pragma redefine_extname mkstemp mkstemp64
5232 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5233 
5234 
5235 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5236 #pragma redefine_extname mkstemps mkstemps64
5237 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5238 
5239 
5240 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5241 #pragma redefine_extname mkostemp mkostemp64
5242 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5243 
5244 
5245 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5246 #pragma redefine_extname mkostemps mkostemps64
5247 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5248 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5249 /* In the LP64 compilation environment, all APIs are already large file */
5250 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5251 extern int rand_r(unsigned int *);
5252 
5253 
5254 extern void _exithandle(void);
5255 
5256 
5257 
5258 
5259 extern double drand48(void);
5260 extern double erand48(unsigned short *);
5261 extern long jrand48(unsigned short *);
5262 extern void lcong48(unsigned short *);
5263 extern long lrand48(void);
5264 extern long mrand48(void);
5265 extern long nrand48(unsigned short *);
5266 extern unsigned short *seed48(unsigned short *);
5267 extern void srand48(long);
5268 extern int putenv(char *);
5269 extern void setkey(const char *);
5270 
5271 
5272 /*
5273  * swab() has historically been in <stdlib.h> as delivered from AT&T
5274  * and continues to be visible in the default compilation environment.
5275  * As of Issue 4 of the X/Open Portability Guides, swab() was declared
5276  * in <unistd.h>. As a result, with respect to X/Open namespace the
5277  * swab() declaration in this header is only visible for the XPG3
5278  * environment.
5279  */
5280 # 182 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5281 extern void swab(const char *, char *, ssize_t);
5282 
5283 
5284 
5285 
5286 
5287 extern int mkstemp(char *);
5288 
5289 extern int mkstemps(char *, int);
5290 
5291 
5292 
5293 
5294 
5295 extern int mkstemp64(char *);
5296 
5297 extern int mkstemps64(char *, int);
5298 
5299 
5300 
5301 
5302 extern char *mkdtemp(char *);
5303 
5304 
5305 
5306 extern int mkostemp(char *, int);
5307 extern int mkostemps(char *, int, int);
5308 
5309 
5310 extern int mkostemp64(char *, int);
5311 extern int mkostemps64(char *, int, int);
5312 
5313 
5314 
5315 
5316 
5317 
5318 extern long a64l(const char *);
5319 extern char *ecvt(double, int, int *, int *);
5320 extern char *fcvt(double, int, int *, int *);
5321 extern char *gcvt(double, int, char *);
5322 extern int getsubopt(char **, char *const *, char **);
5323 extern int grantpt(int);
5324 extern char *initstate(unsigned, char *, size_t);
5325 extern char *l64a(long);
5326 extern char *mktemp(char *);
5327 extern char *ptsname(int);
5328 extern long random(void);
5329 extern char *realpath(const char *, char *);
5330 extern char *setstate(const char *);
5331 extern void srandom(unsigned);
5332 extern int unlockpt(int);
5333 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
5334 
5335 extern int ttyslot(void);
5336 extern void *valloc(size_t);
5337 
5338 
5339 
5340 
5341 
5342 
5343 extern int posix_memalign(void **, size_t, size_t);
5344 extern int posix_openpt(int);
5345 extern int setenv(const char *, const char *, int);
5346 extern int unsetenv(const char *);
5347 
5348 
5349 
5350 
5351 extern char *canonicalize_file_name(const char *);
5352 extern int clearenv(void);
5353 extern void closefrom(int);
5354 extern int daemon(int, int);
5355 extern int dup2(int, int);
5356 extern int dup3(int, int, int);
5357 extern int fdwalk(int (*)(void *, int), void *);
5358 extern char *qecvt(long double, int, int *, int *);
5359 extern char *qfcvt(long double, int, int *, int *);
5360 extern char *qgcvt(long double, int, char *);
5361 extern char *getcwd(char *, size_t);
5362 extern const char *getexecname(void);
5363 
5364 
5365 
5366 
5367 
5368 
5369 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5370 #pragma redefine_extname getlogin getloginx
5371 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
5372 
5373 
5374 
5375 
5376 
5377 
5378 extern char *getlogin(void);
5379 
5380 
5381 extern int getopt(int, char *const *, const char *);
5382 extern char *optarg;
5383 extern int optind, opterr, optopt;
5384 extern char *getpass(const char *);
5385 extern char *getpassphrase(const char *);
5386 extern int getpw(uid_t, char *);
5387 extern int isatty(int);
5388 extern void *memalign(size_t, size_t);
5389 extern char *ttyname(int);
5390 extern char *mkdtemp(char *);
5391 extern const char *getprogname(void);
5392 extern void setprogname(const char *);
5393 
5394 
5395 extern char *lltostr(long long, char *);
5396 extern char *ulltostr(unsigned long long, char *);
5397 
5398 
5399 
5400 
5401 /* OpenBSD compatibility functions */
5402 
5403 
5404 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 1
5405 /*
5406  * CDDL HEADER START
5407  *
5408  * The contents of this file are subject to the terms of the
5409  * Common Development and Distribution License, Version 1.0 only
5410  * (the "License").  You may not use this file except in compliance
5411  * with the License.
5412  *
5413  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5414  * or http://www.opensolaris.org/os/licensing.
5415  * See the License for the specific language governing permissions
5416  * and limitations under the License.
5417  *
5418  * When distributing Covered Code, include this CDDL HEADER in each
5419  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5420  * If applicable, add the following below this CDDL HEADER, with the
5421  * fields enclosed by brackets "[]" replaced with your own identifying
5422  * information: Portions Copyright [yyyy] [name of copyright owner]
5423  *
5424  * CDDL HEADER END
5425  */
5426 /*
5427  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5428  *
5429  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5430  * Use is subject to license terms.
5431  */
5432 
5433 
5434 
5435 
5436 /*
5437  * This file, <inttypes.h>, is specified by the ISO C standard,
5438  * standard, ISO/IEC 9899:1999 Programming language - C and is
5439  * also defined by SUSv3.
5440  *
5441  * ISO	  International Organization for Standardization.
5442  * SUSv3  Single Unix Specification, Version 3
5443  */
5444 
5445 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5446 /*
5447  * CDDL HEADER START
5448  *
5449  * The contents of this file are subject to the terms of the
5450  * Common Development and Distribution License (the "License").
5451  * You may not use this file except in compliance with the License.
5452  *
5453  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5454  * or http://www.opensolaris.org/os/licensing.
5455  * See the License for the specific language governing permissions
5456  * and limitations under the License.
5457  *
5458  * When distributing Covered Code, include this CDDL HEADER in each
5459  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5460  * If applicable, add the following below this CDDL HEADER, with the
5461  * fields enclosed by brackets "[]" replaced with your own identifying
5462  * information: Portions Copyright [yyyy] [name of copyright owner]
5463  *
5464  * CDDL HEADER END
5465  */
5466 
5467 /*
5468  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5469  * Copyright 2016 Joyent, Inc.
5470  *
5471  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5472  * Use is subject to license terms.
5473  */
5474 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
5475 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 1
5476 /*
5477  * CDDL HEADER START
5478  *
5479  * The contents of this file are subject to the terms of the
5480  * Common Development and Distribution License, Version 1.0 only
5481  * (the "License").  You may not use this file except in compliance
5482  * with the License.
5483  *
5484  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5485  * or http://www.opensolaris.org/os/licensing.
5486  * See the License for the specific language governing permissions
5487  * and limitations under the License.
5488  *
5489  * When distributing Covered Code, include this CDDL HEADER in each
5490  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5491  * If applicable, add the following below this CDDL HEADER, with the
5492  * fields enclosed by brackets "[]" replaced with your own identifying
5493  * information: Portions Copyright [yyyy] [name of copyright owner]
5494  *
5495  * CDDL HEADER END
5496  */
5497 /*
5498  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
5499  * Use is subject to license terms.
5500  */
5501 
5502 
5503 
5504 
5505 #pragma ident "%Z%%M%	%I%	%E% SMI"
5506 
5507 /*
5508  * This header, <sys/inttypes.h>, contains (through nested inclusion) the
5509  * vast majority of the facilities specified for <inttypes.h> as defined
5510  * by the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
5511  *
5512  * Kernel/Driver developers are encouraged to include this file to access
5513  * the fixed size types, limits and utility macros. Application developers
5514  * should use the standard defined header <inttypes.h>.
5515  */
5516 
5517 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5518 /*
5519  * CDDL HEADER START
5520  *
5521  * The contents of this file are subject to the terms of the
5522  * Common Development and Distribution License (the "License").
5523  * You may not use this file except in compliance with the License.
5524  *
5525  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5526  * or http://www.opensolaris.org/os/licensing.
5527  * See the License for the specific language governing permissions
5528  * and limitations under the License.
5529  *
5530  * When distributing Covered Code, include this CDDL HEADER in each
5531  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5532  * If applicable, add the following below this CDDL HEADER, with the
5533  * fields enclosed by brackets "[]" replaced with your own identifying
5534  * information: Portions Copyright [yyyy] [name of copyright owner]
5535  *
5536  * CDDL HEADER END
5537  */
5538 
5539 /*
5540  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5541  * Copyright 2016 Joyent, Inc.
5542  *
5543  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5544  * Use is subject to license terms.
5545  */
5546 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
5547 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
5548 /*
5549  * CDDL HEADER START
5550  *
5551  * The contents of this file are subject to the terms of the
5552  * Common Development and Distribution License, Version 1.0 only
5553  * (the "License").  You may not use this file except in compliance
5554  * with the License.
5555  *
5556  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5557  * or http://www.opensolaris.org/os/licensing.
5558  * See the License for the specific language governing permissions
5559  * and limitations under the License.
5560  *
5561  * When distributing Covered Code, include this CDDL HEADER in each
5562  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5563  * If applicable, add the following below this CDDL HEADER, with the
5564  * fields enclosed by brackets "[]" replaced with your own identifying
5565  * information: Portions Copyright [yyyy] [name of copyright owner]
5566  *
5567  * CDDL HEADER END
5568  */
5569 /*
5570  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5571  *
5572  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5573  * Use is subject to license terms.
5574  */
5575 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
5576 
5577 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
5578 /*
5579  * CDDL HEADER START
5580  *
5581  * The contents of this file are subject to the terms of the
5582  * Common Development and Distribution License, Version 1.0 only
5583  * (the "License").  You may not use this file except in compliance
5584  * with the License.
5585  *
5586  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5587  * or http://www.opensolaris.org/os/licensing.
5588  * See the License for the specific language governing permissions
5589  * and limitations under the License.
5590  *
5591  * When distributing Covered Code, include this CDDL HEADER in each
5592  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5593  * If applicable, add the following below this CDDL HEADER, with the
5594  * fields enclosed by brackets "[]" replaced with your own identifying
5595  * information: Portions Copyright [yyyy] [name of copyright owner]
5596  *
5597  * CDDL HEADER END
5598  */
5599 /*
5600  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5601  *
5602  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5603  * Use is subject to license terms.
5604  */
5605 
5606 
5607 
5608 
5609 /*
5610  * This file, <sys/int_limits.h>, is part of the Sun Microsystems implementation
5611  * of <inttypes.h> as defined in the ISO C standard, ISO/IEC 9899:1999
5612  * Programming language - C.
5613  *
5614  * Programs/Modules should not directly include this file.  Access to the
5615  * types defined in this file should be through the inclusion of one of the
5616  * following files:
5617  *
5618  *	<limits.h>		This nested inclusion is disabled for strictly
5619  *				ANSI-C conforming compilations.  The *_MIN
5620  *				definitions are not visible to POSIX or XPG
5621  *				conforming applications (due to what may be
5622  *				a bug in the specification - this is under
5623  *				investigation)
5624  *
5625  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
5626  *				components of <inttypes.h>.
5627  *
5628  *	<inttypes.h>		For use by applications.
5629  *
5630  * See these files for more details.
5631  */
5632 
5633 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5634 /*
5635  * CDDL HEADER START
5636  *
5637  * The contents of this file are subject to the terms of the
5638  * Common Development and Distribution License (the "License").
5639  * You may not use this file except in compliance with the License.
5640  *
5641  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5642  * or http://www.opensolaris.org/os/licensing.
5643  * See the License for the specific language governing permissions
5644  * and limitations under the License.
5645  *
5646  * When distributing Covered Code, include this CDDL HEADER in each
5647  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5648  * If applicable, add the following below this CDDL HEADER, with the
5649  * fields enclosed by brackets "[]" replaced with your own identifying
5650  * information: Portions Copyright [yyyy] [name of copyright owner]
5651  *
5652  * CDDL HEADER END
5653  */
5654 
5655 /*
5656  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5657  * Copyright 2016 Joyent, Inc.
5658  *
5659  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5660  * Use is subject to license terms.
5661  */
5662 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 2
5663 
5664 
5665 
5666 
5667 
5668 /*
5669  * Limits
5670  *
5671  * The following define the limits for the types defined in <sys/int_types.h>.
5672  *
5673  * INTMAX_MIN (minimum value of the largest supported signed integer type),
5674  * INTMAX_MAX (maximum value of the largest supported signed integer type),
5675  * and UINTMAX_MAX (maximum value of the largest supported unsigned integer
5676  * type) can be set to implementation defined limits.
5677  *
5678  * NOTE : A programmer can test to see whether an implementation supports
5679  * a particular size of integer by testing if the macro that gives the
5680  * maximum for that datatype is defined. For example, if #ifdef UINT64_MAX
5681  * tests false, the implementation does not support unsigned 64 bit integers.
5682  *
5683  * The type of these macros is intentionally unspecified.
5684  *
5685  * The types int8_t, int_least8_t, and int_fast8_t are not defined for ISAs
5686  * where the ABI specifies "char" as unsigned when the translation mode is
5687  * not ANSI-C.
5688  */
5689 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
5690 /*
5691  * The following 2 macros are provided for testing whether the types
5692  * intptr_t and uintptr_t (integers large enough to hold a void *) are
5693  * defined in this header. They are needed in case the architecture can't
5694  * represent a pointer in any standard integral type.
5695  */
5696 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
5697 /* Maximum limits of ptrdiff_t defined in <sys/types.h> */
5698 
5699 
5700 
5701 
5702 
5703 
5704 /*
5705  * Maximum value of a "size_t".  SIZE_MAX was previously defined
5706  * in <limits.h>, however, the standards specify it be defined
5707  * in <stdint.h>. The <stdint.h> headers includes this header as
5708  * does <limits.h>. The value of SIZE_MAX should not deviate
5709  * from the value of ULONG_MAX defined <sys/types.h>.
5710  */
5711 
5712 
5713 
5714 
5715 
5716 
5717 /* Maximum limit of sig_atomic_t defined in <sys/types.h> */
5718 
5719 
5720 
5721 
5722 /*
5723  * Maximum limit of wchar_t. The WCHAR_* macros are also
5724  * defined in <iso/wchar_iso.h>, but inclusion of that header
5725  * will break ISO/IEC C namespace.
5726  */
5727 
5728 
5729 
5730 
5731 /* Maximum limit of wint_t */
5732 
5733 
5734 
5735 
5736 /*
5737  * It is probably a bug in the POSIX specification (IEEE-1003.1-1990) that
5738  * when including <limits.h> that the suffix _MAX is reserved but not the
5739  * suffix _MIN.  However, until that issue is resolved....
5740  */
5741 # 230 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
5742 /* Minimum value of a pointer-holding signed integer type */
5743 
5744 
5745 
5746 
5747 
5748 
5749 /* Minimum limits of ptrdiff_t defined in <sys/types.h> */
5750 
5751 
5752 
5753 
5754 
5755 
5756 /* Minimum limit of sig_atomic_t defined in <sys/types.h> */
5757 
5758 
5759 
5760 
5761 /*
5762  * Minimum limit of wchar_t. The WCHAR_* macros are also
5763  * defined in <iso/wchar_iso.h>, but inclusion of that header
5764  * will break ISO/IEC C namespace.
5765  */
5766 
5767 
5768 
5769 
5770 /* Minimum limit of wint_t */
5771 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
5772 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
5773 /*
5774  * CDDL HEADER START
5775  *
5776  * The contents of this file are subject to the terms of the
5777  * Common Development and Distribution License, Version 1.0 only
5778  * (the "License").  You may not use this file except in compliance
5779  * with the License.
5780  *
5781  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5782  * or http://www.opensolaris.org/os/licensing.
5783  * See the License for the specific language governing permissions
5784  * and limitations under the License.
5785  *
5786  * When distributing Covered Code, include this CDDL HEADER in each
5787  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5788  * If applicable, add the following below this CDDL HEADER, with the
5789  * fields enclosed by brackets "[]" replaced with your own identifying
5790  * information: Portions Copyright [yyyy] [name of copyright owner]
5791  *
5792  * CDDL HEADER END
5793  */
5794 /*
5795  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5796  *
5797  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5798  * Use is subject to license terms.
5799  */
5800 
5801 
5802 
5803 
5804 /*
5805  * This file, <sys/int_const.h>, is part of the Sun Microsystems implementation
5806  * of <inttypes.h> as proposed in the ISO/JTC1/SC22/WG14 C committee's working
5807  * draft for the revision of the current ISO C standard, ISO/IEC 9899:1990
5808  * Programming language - C.
5809  *
5810  * Programs/Modules should not directly include this file.  Access to the
5811  * types defined in this file should be through the inclusion of one of the
5812  * following files:
5813  *
5814  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
5815  *				components of <inttypes.h>.
5816  *
5817  *	<inttypes.h>		For use by applications.
5818  *
5819  * See these files for more details.
5820  *
5821  * Use at your own risk.  This file will track the evolution of the revision
5822  * of the current ISO C standard.  As of February 1996, the committee is
5823  * squarely behind the fixed sized types.
5824  */
5825 
5826 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5827 /*
5828  * CDDL HEADER START
5829  *
5830  * The contents of this file are subject to the terms of the
5831  * Common Development and Distribution License (the "License").
5832  * You may not use this file except in compliance with the License.
5833  *
5834  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5835  * or http://www.opensolaris.org/os/licensing.
5836  * See the License for the specific language governing permissions
5837  * and limitations under the License.
5838  *
5839  * When distributing Covered Code, include this CDDL HEADER in each
5840  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5841  * If applicable, add the following below this CDDL HEADER, with the
5842  * fields enclosed by brackets "[]" replaced with your own identifying
5843  * information: Portions Copyright [yyyy] [name of copyright owner]
5844  *
5845  * CDDL HEADER END
5846  */
5847 
5848 /*
5849  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5850  * Copyright 2016 Joyent, Inc.
5851  *
5852  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5853  * Use is subject to license terms.
5854  */
5855 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 2
5856 
5857 
5858 
5859 
5860 
5861 /*
5862  * Constants
5863  *
5864  * The following macros create constants of the types defined in
5865  * <sys/int_types.h>. The intent is that:
5866  *	Constants defined using these macros have a specific size and
5867  *	signedness. The suffix used for int64_t and uint64_t (ll and ull)
5868  *	are for examples only. Implementations are permitted to use other
5869  *	suffixes.
5870  *
5871  * The "CSTYLED" comments are flags to an internal code style analysis tool
5872  * telling it to silently accept the line which follows.  This internal
5873  * standard requires a space between arguments, but the historical,
5874  * non-ANSI-C ``method'' of concatenation can't tolerate those spaces.
5875  */
5876 /* CSTYLED */
5877 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
5878 /* CSTYLED */
5879 
5880 
5881 
5882 
5883 /* CSTYLED */
5884 
5885 /* CSTYLED */
5886 
5887 /* CSTYLED */
5888 
5889 
5890 
5891 
5892 
5893 
5894 /* CSTYLED */
5895 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
5896 /* CSTYLED */
5897 
5898 /* CSTYLED */
5899 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
5900 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 1
5901 /*
5902  * CDDL HEADER START
5903  *
5904  * The contents of this file are subject to the terms of the
5905  * Common Development and Distribution License, Version 1.0 only
5906  * (the "License").  You may not use this file except in compliance
5907  * with the License.
5908  *
5909  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5910  * or http://www.opensolaris.org/os/licensing.
5911  * See the License for the specific language governing permissions
5912  * and limitations under the License.
5913  *
5914  * When distributing Covered Code, include this CDDL HEADER in each
5915  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5916  * If applicable, add the following below this CDDL HEADER, with the
5917  * fields enclosed by brackets "[]" replaced with your own identifying
5918  * information: Portions Copyright [yyyy] [name of copyright owner]
5919  *
5920  * CDDL HEADER END
5921  */
5922 /*
5923  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5924  *
5925  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5926  * Use is subject to license terms.
5927  */
5928 
5929 
5930 
5931 
5932 /*
5933  * This file, <sys/int_fmtio.h>, is part of the Sun Microsystems implementation
5934  * of <inttypes.h> as defined by the ISO C Standard, ISO/IEC 9899:1999
5935  * Programming language - C.
5936  *
5937  * ISO  International Organization for Standardization.
5938  *
5939  * Programs/Modules should not directly include this file.  Access to the
5940  * types defined in this file should be through the inclusion of one of the
5941  * following files:
5942  *
5943  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
5944  *				components of <inttypes.h>.
5945  *
5946  *	<inttypes.h>		For use by applications.
5947  *
5948  * See these files for more details.
5949  */
5950 
5951 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5952 /*
5953  * CDDL HEADER START
5954  *
5955  * The contents of this file are subject to the terms of the
5956  * Common Development and Distribution License (the "License").
5957  * You may not use this file except in compliance with the License.
5958  *
5959  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5960  * or http://www.opensolaris.org/os/licensing.
5961  * See the License for the specific language governing permissions
5962  * and limitations under the License.
5963  *
5964  * When distributing Covered Code, include this CDDL HEADER in each
5965  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5966  * If applicable, add the following below this CDDL HEADER, with the
5967  * fields enclosed by brackets "[]" replaced with your own identifying
5968  * information: Portions Copyright [yyyy] [name of copyright owner]
5969  *
5970  * CDDL HEADER END
5971  */
5972 
5973 /*
5974  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5975  * Copyright 2016 Joyent, Inc.
5976  *
5977  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5978  * Use is subject to license terms.
5979  */
5980 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 2
5981 
5982 
5983 
5984 
5985 
5986 /*
5987  * Formatted I/O
5988  *
5989  * The following macros can be used even when an implementation has not
5990  * extended the printf/scanf family of functions.
5991  *
5992  * The form of the names of the macros is either "PRI" for printf specifiers
5993  * or "SCN" for scanf specifiers, followed by the conversion specifier letter
5994  * followed by the datatype size. For example, PRId32 is the macro for
5995  * the printf d conversion specifier with the flags for 32 bit datatype.
5996  *
5997  * An example using one of these macros:
5998  *
5999  *	uint64_t u;
6000  *	printf("u = %016" PRIx64 "\n", u);
6001  *
6002  * For the purpose of example, the definitions of the printf/scanf macros
6003  * below have the values appropriate for a machine with 8 bit shorts, 16
6004  * bit shorts, 32 bit ints, 32 or 64 bit longs depending on compilation
6005  * mode, and 64 bit long longs.
6006  */
6007 
6008 /*
6009  * fprintf macros for signed integers
6010  */
6011 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6012 /*
6013  * fprintf macros for unsigned integers
6014  */
6015 # 227 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6016 /*
6017  * fprintf macros for pointers
6018  */
6019 # 247 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6020 /*
6021  * fscanf macros for signed integers
6022  */
6023 # 282 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6024 /*
6025  * fscanf macros for unsigned integers
6026  */
6027 # 349 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
6028 /*
6029  * The following macros define I/O formats for intmax_t and uintmax_t.
6030  */
6031 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6032 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
6033 
6034 
6035 
6036 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 1
6037 /*
6038  * CDDL HEADER START
6039  *
6040  * The contents of this file are subject to the terms of the
6041  * Common Development and Distribution License, Version 1.0 only
6042  * (the "License").  You may not use this file except in compliance
6043  * with the License.
6044  *
6045  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6046  * or http://www.opensolaris.org/os/licensing.
6047  * See the License for the specific language governing permissions
6048  * and limitations under the License.
6049  *
6050  * When distributing Covered Code, include this CDDL HEADER in each
6051  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6052  * If applicable, add the following below this CDDL HEADER, with the
6053  * fields enclosed by brackets "[]" replaced with your own identifying
6054  * information: Portions Copyright [yyyy] [name of copyright owner]
6055  *
6056  * CDDL HEADER END
6057  */
6058 /*
6059  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
6060  * Use is subject to license terms.
6061  */
6062 
6063 
6064 
6065 
6066 #pragma ident "%Z%%M%	%I%	%E% SMI"
6067 
6068 /*
6069  * This header is included by <stdint.h> which was introduced by
6070  * the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
6071  * The header is a subset of the <inttypes.h> header.
6072  */
6073 
6074 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
6075 /*
6076  * CDDL HEADER START
6077  *
6078  * The contents of this file are subject to the terms of the
6079  * Common Development and Distribution License, Version 1.0 only
6080  * (the "License").  You may not use this file except in compliance
6081  * with the License.
6082  *
6083  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6084  * or http://www.opensolaris.org/os/licensing.
6085  * See the License for the specific language governing permissions
6086  * and limitations under the License.
6087  *
6088  * When distributing Covered Code, include this CDDL HEADER in each
6089  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6090  * If applicable, add the following below this CDDL HEADER, with the
6091  * fields enclosed by brackets "[]" replaced with your own identifying
6092  * information: Portions Copyright [yyyy] [name of copyright owner]
6093  *
6094  * CDDL HEADER END
6095  */
6096 /*
6097  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6098  *
6099  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6100  * Use is subject to license terms.
6101  */
6102 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6103 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
6104 /*
6105  * CDDL HEADER START
6106  *
6107  * The contents of this file are subject to the terms of the
6108  * Common Development and Distribution License, Version 1.0 only
6109  * (the "License").  You may not use this file except in compliance
6110  * with the License.
6111  *
6112  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6113  * or http://www.opensolaris.org/os/licensing.
6114  * See the License for the specific language governing permissions
6115  * and limitations under the License.
6116  *
6117  * When distributing Covered Code, include this CDDL HEADER in each
6118  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6119  * If applicable, add the following below this CDDL HEADER, with the
6120  * fields enclosed by brackets "[]" replaced with your own identifying
6121  * information: Portions Copyright [yyyy] [name of copyright owner]
6122  *
6123  * CDDL HEADER END
6124  */
6125 /*
6126  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6127  *
6128  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6129  * Use is subject to license terms.
6130  */
6131 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6132 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
6133 /*
6134  * CDDL HEADER START
6135  *
6136  * The contents of this file are subject to the terms of the
6137  * Common Development and Distribution License, Version 1.0 only
6138  * (the "License").  You may not use this file except in compliance
6139  * with the License.
6140  *
6141  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6142  * or http://www.opensolaris.org/os/licensing.
6143  * See the License for the specific language governing permissions
6144  * and limitations under the License.
6145  *
6146  * When distributing Covered Code, include this CDDL HEADER in each
6147  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6148  * If applicable, add the following below this CDDL HEADER, with the
6149  * fields enclosed by brackets "[]" replaced with your own identifying
6150  * information: Portions Copyright [yyyy] [name of copyright owner]
6151  *
6152  * CDDL HEADER END
6153  */
6154 /*
6155  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6156  *
6157  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6158  * Use is subject to license terms.
6159  */
6160 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
6161 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
6162 
6163 
6164 
6165 
6166 
6167 
6168 /* Inclusion of <stddef.h> breaks namespace, therefore define wchar_t */
6169 
6170 /*
6171  * wchar_t is a built-in type in standard C++ and as such is not
6172  * defined here when using standard C++. However, the GNU compiler
6173  * fixincludes utility nonetheless creates its own version of this
6174  * header for use by gcc and g++. In that version it adds a redundant
6175  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
6176  * header we need to include the following magic comment:
6177  *
6178  * we must use the C++ compiler's type
6179  *
6180  * The above comment should not be removed or changed until GNU
6181  * gcc/fixinc/inclhack.def is updated to bypass this header.
6182  */
6183 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
6184 typedef struct {
6185  intmax_t quot;
6186  intmax_t rem;
6187 } imaxdiv_t;
6188 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
6189 extern intmax_t imaxabs(intmax_t);
6190 extern imaxdiv_t imaxdiv(intmax_t, intmax_t);
6191 extern intmax_t strtoimax(const char *, char **,
6192  int);
6193 extern uintmax_t strtoumax(const char *, char **,
6194  int);
6195 extern intmax_t wcstoimax(const wchar_t *,
6196  wchar_t **, int);
6197 extern uintmax_t wcstoumax(const wchar_t *,
6198  wchar_t **, int);
6199 # 302 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
6200 extern uint32_t arc4random(void);
6201 extern void arc4random_buf(void *, size_t);
6202 extern uint32_t arc4random_uniform(uint32_t);
6203 extern void freezero(void *, size_t);
6204 extern void *recallocarray(void *, size_t, size_t, size_t);
6205 # 34 "quit.c" 2
6206 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 1
6207 /*
6208  * CDDL HEADER START
6209  *
6210  * The contents of this file are subject to the terms of the
6211  * Common Development and Distribution License (the "License").
6212  * You may not use this file except in compliance 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 /*
6229  * Copyright 2014 PALO, Richard.
6230  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6231  * Copyright (c) 2013 Gary Mills
6232  *
6233  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
6234  */
6235 
6236 /*	Copyright (c) 1988 AT&T	*/
6237 /*	  All Rights Reserved  	*/
6238 
6239 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
6240 
6241 
6242 
6243 
6244 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6245 /*
6246  * CDDL HEADER START
6247  *
6248  * The contents of this file are subject to the terms of the
6249  * Common Development and Distribution License (the "License").
6250  * You may not use this file except in compliance 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 /*
6267  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6268  * Copyright 2016 Joyent, Inc.
6269  *
6270  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6271  * Use is subject to license terms.
6272  */
6273 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6274 
6275 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
6276 /*
6277  * This file and its contents are supplied under the terms of the
6278  * Common Development and Distribution License ("CDDL"), version 1.0.
6279  * You may only use this file in accordance with the terms of version
6280  * 1.0 of the CDDL.
6281  *
6282  * A full copy of the text of the CDDL should have accompanied this
6283  * source.  A copy of the CDDL is also available via the Internet at
6284  * http://www.illumos.org/license/CDDL.
6285  */
6286 
6287 /*
6288  * Copyright 2014-2016 PALO, Richard.
6289  */
6290 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6291 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6292 /*
6293  * CDDL HEADER START
6294  *
6295  * The contents of this file are subject to the terms of the
6296  * Common Development and Distribution License (the "License").
6297  * You may not use this file except in compliance with the License.
6298  *
6299  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6300  * or http://www.opensolaris.org/os/licensing.
6301  * See the License for the specific language governing permissions
6302  * and limitations under the License.
6303  *
6304  * When distributing Covered Code, include this CDDL HEADER in each
6305  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6306  * If applicable, add the following below this CDDL HEADER, with the
6307  * fields enclosed by brackets "[]" replaced with your own identifying
6308  * information: Portions Copyright [yyyy] [name of copyright owner]
6309  *
6310  * CDDL HEADER END
6311  */
6312 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6313 /*	  All Rights Reserved  	*/
6314 
6315 
6316 /*
6317  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6318  * Use is subject to license terms.
6319  *
6320  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6321  * Copyright 2016 Joyent, Inc.
6322  */
6323 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6324 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
6325 /*
6326  * CDDL HEADER START
6327  *
6328  * The contents of this file are subject to the terms of the
6329  * Common Development and Distribution License (the "License").
6330  * You may not use this file except in compliance with the License.
6331  *
6332  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6333  * or http://www.opensolaris.org/os/licensing.
6334  * See the License for the specific language governing permissions
6335  * and limitations under the License.
6336  *
6337  * When distributing Covered Code, include this CDDL HEADER in each
6338  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6339  * If applicable, add the following below this CDDL HEADER, with the
6340  * fields enclosed by brackets "[]" replaced with your own identifying
6341  * information: Portions Copyright [yyyy] [name of copyright owner]
6342  *
6343  * CDDL HEADER END
6344  */
6345 
6346 /*
6347  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
6348  *	  All Rights Reserved
6349  *
6350  */
6351 
6352 /*
6353  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6354  * Use is subject to license terms.
6355  */
6356 
6357 /*
6358  * WARNING: This is an implementation-specific header,
6359  * its contents are not guaranteed. Applications
6360  * should include <unistd.h> and not this header.
6361  */
6362 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
6363 
6364 
6365 
6366 
6367 
6368 /* Symbolic constants for the "access" routine: */
6369 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6370 /* Symbolic constants for the "lseek" routine: */
6371 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6372 /* Path names: */
6373 
6374 
6375 
6376 
6377 /*
6378  * compile-time symbolic constants,
6379  * Support does not mean the feature is enabled.
6380  * Use pathconf/sysconf to obtain actual configuration value.
6381  */
6382 
6383 /* Values unchanged in UNIX 03 */
6384 
6385 
6386 
6387 
6388 
6389 /*
6390  * POSIX.1b compile-time symbolic constants.
6391  */
6392 # 134 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6393 /*
6394  * POSIX.1c compile-time symbolic constants.
6395  */
6396 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6397 /* New in UNIX 03 */
6398 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6399 /*
6400  * Support for the POSIX.1 mutex protocol attribute. For realtime applications
6401  * which need mutexes to support priority inheritance/ceiling.
6402  */
6403 # 187 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6404 /*
6405  * Large File Summit-related announcement macros.  The system supports both
6406  * the additional and transitional Large File Summit interfaces.  (The final
6407  * two macros provide a finer granularity breakdown of _LFS64_LARGEFILE.)
6408  */
6409 
6410 
6411 
6412 
6413 
6414 /* large file compilation environment setup */
6415 
6416 
6417 
6418 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6419 #pragma redefine_extname ftruncate ftruncate64
6420 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6421 
6422 
6423 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6424 #pragma redefine_extname lseek lseek64
6425 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6426 
6427 
6428 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6429 #pragma redefine_extname pread pread64
6430 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6431 
6432 
6433 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6434 #pragma redefine_extname pwrite pwrite64
6435 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6436 
6437 
6438 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6439 #pragma redefine_extname truncate truncate64
6440 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6441 
6442 
6443 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6444 #pragma redefine_extname lockf lockf64
6445 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6446 
6447 
6448 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6449 #pragma redefine_extname tell tell64
6450 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6451 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6452 /* In the LP64 compilation environment, the APIs are already large file */
6453 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6454 extern int access(const char *, int);
6455 
6456 extern int acct(const char *);
6457 
6458 extern unsigned alarm(unsigned);
6459 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6460 
6461 
6462 extern int brk(void *);
6463 
6464 extern int chdir(const char *);
6465 extern int chown(const char *, uid_t, gid_t);
6466 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6467 
6468 
6469 extern int chroot(const char *);
6470 
6471 extern int close(int);
6472 
6473 
6474 
6475 
6476 
6477 
6478 extern char *ctermid(char *);
6479 
6480 
6481 extern char *ctermid_r(char *);
6482 
6483 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6484 
6485 extern char *cuserid(char *);
6486 
6487 extern int dup(int);
6488 extern int dup2(int, int);
6489 extern int dup3(int, int, int);
6490 
6491 
6492 
6493 
6494 extern void endusershell(void);
6495 
6496 extern int execl(const char *, const char *, ...);
6497 extern int execle(const char *, const char *, ...);
6498 extern int execlp(const char *, const char *, ...);
6499 extern int execv(const char *, char *const *);
6500 extern int execve(const char *, char *const *, char *const *);
6501 extern int execvp(const char *, char *const *);
6502 extern void _exit(int)
6503  __attribute__((__noreturn__));
6504 /*
6505  * The following fattach prototype is duplicated in <stropts.h>. The
6506  * duplication is necessitated by XPG4.2 which requires the prototype
6507  * be defined in <stropts.h>.
6508  */
6509 
6510 extern int fattach(int, const char *);
6511 
6512 
6513 extern int fchdir(int);
6514 extern int fchown(int, uid_t, gid_t);
6515 
6516 
6517 extern int fchroot(int);
6518 
6519 
6520 
6521 extern int fdatasync(int);
6522 
6523 /*
6524  * The following fdetach prototype is duplicated in <stropts.h>. The
6525  * duplication is necessitated by XPG4.2 which requires the prototype
6526  * be defined in <stropts.h>.
6527  */
6528 
6529 extern int fdetach(const char *);
6530 
6531 extern pid_t fork(void);
6532 
6533 extern pid_t fork1(void);
6534 extern pid_t forkall(void);
6535 
6536 extern long fpathconf(int, int);
6537 
6538 
6539 extern int fsync(int);
6540 
6541 
6542 
6543 
6544 extern int ftruncate(int, off_t);
6545 
6546 extern char *getcwd(char *, size_t);
6547 
6548 
6549 extern int getdtablesize(void);
6550 
6551 extern gid_t getegid(void);
6552 extern uid_t geteuid(void);
6553 extern gid_t getgid(void);
6554 extern int getgroups(int, gid_t *);
6555 
6556 extern long gethostid(void);
6557 
6558 
6559 
6560 
6561 extern int gethostname(char *, int);
6562 # 372 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6563 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
6564 
6565 extern int getpagesize(void);
6566 
6567 extern pid_t getpgid(pid_t);
6568 
6569 extern pid_t getpid(void);
6570 extern pid_t getppid(void);
6571 extern pid_t getpgrp(void);
6572 
6573 
6574 char *gettxt(const char *, const char *);
6575 
6576 
6577 extern pid_t getsid(pid_t);
6578 
6579 extern uid_t getuid(void);
6580 
6581 extern char *getusershell(void);
6582 
6583 /*
6584  * The following ioctl prototype is duplicated in <stropts.h>. The
6585  * duplication is necessitated by XPG4.2 which requires the prototype
6586  * be defined in <stropts.h>.
6587  */
6588 
6589 extern int ioctl(int, int, ...);
6590 extern int isaexec(const char *, char *const *, char *const *);
6591 extern int issetugid(void);
6592 
6593 extern int isatty(int);
6594 
6595 extern int lchown(const char *, uid_t, gid_t);
6596 
6597 extern int link(const char *, const char *);
6598 
6599 extern offset_t llseek(int, offset_t, int);
6600 
6601 
6602 
6603 
6604 extern int lockf(int, int, off_t);
6605 
6606 extern off_t lseek(int, off_t, int);
6607 
6608 
6609 extern int nice(int);
6610 
6611 
6612 extern int mincore(caddr_t, size_t, char *);
6613 
6614 extern long pathconf(const char *, int);
6615 extern int pause(void);
6616 extern int pipe(int *);
6617 extern int pipe2(int *, int);
6618 
6619 
6620 
6621 extern ssize_t pread(int, void *, size_t, off_t);
6622 
6623 
6624 extern void profil(unsigned short *, size_t, unsigned long, unsigned int);
6625 
6626 /*
6627  * pthread_atfork() is also declared in <pthread.h> as per SUSv3. The
6628  * declarations are identical. A change to either one may also require
6629  * appropriate namespace updates in order to avoid redeclaration
6630  * warnings in the case where both prototypes are exposed via inclusion
6631  * of both <pthread.h> and <unistd.h>.
6632  */
6633 
6634 
6635 
6636 extern int pthread_atfork(void (*) (void), void (*) (void), void (*) (void));
6637 
6638 
6639 
6640 extern int ptrace(int, pid_t, int, int);
6641 
6642 
6643 
6644 
6645 extern ssize_t pwrite(int, const void *, size_t, off_t);
6646 
6647 
6648 /* per RFC 3542; This is also defined in netdb.h */
6649 extern int rcmd_af(char **, unsigned short, const char *, const char *,
6650  const char *, int *, int);
6651 
6652 extern ssize_t read(int, void *, size_t);
6653 
6654 
6655 extern ssize_t readlink(const char *, char *,
6656  size_t);
6657 
6658 
6659 
6660 
6661 
6662 
6663 extern int rename(const char *, const char *);
6664 
6665 
6666 
6667 
6668 
6669 
6670 
6671 extern int resolvepath(const char *, char *, size_t);
6672 /* per RFC 3542; This is also defined in netdb.h */
6673 extern int rexec_af(char **, unsigned short, const char *, const char *,
6674  const char *, int *, int);
6675 
6676 extern int rmdir(const char *);
6677 
6678 /* per RFC 3542; This is also defined in netdb.h */
6679 extern int rresvport_af(int *, int);
6680 
6681 
6682 
6683 
6684 extern void *sbrk(intptr_t);
6685 
6686 
6687 extern int setegid(gid_t);
6688 extern int seteuid(uid_t);
6689 
6690 extern int setgid(gid_t);
6691 
6692 extern int setgroups(int, const gid_t *);
6693 extern int sethostname(char *, int);
6694 
6695 extern int setpgid(pid_t, pid_t);
6696 
6697 extern pid_t setpgrp(void);
6698 extern int setregid(gid_t, gid_t);
6699 extern int setreuid(uid_t, uid_t);
6700 
6701 extern pid_t setsid(void);
6702 extern int setuid(uid_t);
6703 
6704 extern void setusershell(void);
6705 
6706 extern unsigned sleep(unsigned);
6707 
6708 extern int stime(const time_t *);
6709 
6710 
6711 
6712 
6713 
6714 
6715 extern int symlink(const char *, const char *);
6716 extern void sync(void);
6717 # 534 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6718 extern long sysconf(int);
6719 extern pid_t tcgetpgrp(int);
6720 extern int tcsetpgrp(int, pid_t);
6721 
6722 
6723 
6724 extern off_t tell(int);
6725 
6726 
6727 
6728 
6729 extern int truncate(const char *, off_t);
6730 
6731 extern char *ttyname(int);
6732 
6733 extern useconds_t ualarm(useconds_t, useconds_t);
6734 
6735 extern int unlink(const char *);
6736 
6737 extern char *getwd(char *);
6738 extern int usleep(useconds_t);
6739 extern pid_t vfork(void) __attribute__((__returns_twice__));
6740 #pragma unknown_control_flow(vfork)
6741 
6742 
6743 extern void vhangup(void);
6744 
6745 extern ssize_t write(int, const void *, size_t);
6746 
6747 extern void yield(void);
6748 
6749 
6750 
6751 
6752  /* || defined(_XPG7) */
6753 extern int faccessat(int, const char *, int, int);
6754 extern int fchownat(int, const char *, uid_t, gid_t, int);
6755 extern int linkat(int, const char *, int, const char *, int);
6756 extern ssize_t readlinkat(int, const char *,
6757  char *, size_t);
6758 extern int renameat(int, const char *, int, const char *);
6759 extern int symlinkat(const char *, int, const char *);
6760 extern int unlinkat(int, const char *, int);
6761 
6762 
6763 extern int get_nprocs(void);
6764 extern int get_nprocs_conf(void);
6765 
6766 
6767 /* transitional large file interface versions */
6768 
6769 
6770 extern int ftruncate64(int, off64_t);
6771 extern off64_t lseek64(int, off64_t, int);
6772 extern ssize_t pread64(int, void *, size_t, off64_t);
6773 extern ssize_t pwrite64(int, const void *, size_t, off64_t);
6774 extern off64_t tell64(int);
6775 extern int truncate64(const char *, off64_t);
6776 extern int lockf64(int, int, off64_t);
6777 
6778 
6779 /*
6780  * getlogin_r() & ttyname_r() prototypes are defined here.
6781  */
6782 
6783 /*
6784  * Previous releases of Solaris, starting at 2.3, provided definitions of
6785  * various functions as specified in POSIX.1c, Draft 6.  For some of these
6786  * functions, the final POSIX 1003.1c standard had a different number of
6787  * arguments and return values.
6788  *
6789  * The following segment of this header provides support for the standard
6790  * interfaces while supporting applications written under earlier
6791  * releases.  The application defines appropriate values of the feature
6792  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
6793  * whether it was written to expect the Draft 6 or standard versions of
6794  * these interfaces, before including this header.  This header then
6795  * provides a mapping from the source version of the interface to an
6796  * appropriate binary interface.  Such mappings permit an application
6797  * to be built from libraries and objects which have mixed expectations
6798  * of the definitions of these functions.
6799  *
6800  * For applications using the Draft 6 definitions, the binary symbol is the
6801  * same as the source symbol, and no explicit mapping is needed.  For the
6802  * standard interface, the function func() is mapped to the binary symbol
6803  * _posix_func().  The preferred mechanism for the remapping is a compiler
6804  * #pragma.  If the compiler does not provide such a #pragma, the header file
6805  * defines a static function func() which calls the _posix_func() version;
6806  * this has to be done instead of #define since POSIX specifies that an
6807  * application can #undef the symbol and still be bound to the correct
6808  * implementation.  Unfortunately, the statics confuse lint so we fallback to
6809  * #define in that case.
6810  *
6811  * NOTE: Support for the Draft 6 definitions is provided for compatibility
6812  * only.  New applications/libraries should use the standard definitions.
6813  */
6814 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6815 
6816 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6817 #pragma redefine_extname getlogin_r getloginx_r
6818 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6819 
6820 
6821 
6822 
6823 
6824 
6825 extern char *getlogin_r(char *, int);
6826 
6827 extern char *ttyname_r(int, char *, int);
6828 
6829 
6830 
6831 
6832 
6833 
6834 extern int getentropy(void *, size_t);
6835 # 35 "quit.c" 2
6836 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 1
6837 /*
6838  * CDDL HEADER START
6839  *
6840  * The contents of this file are subject to the terms of the
6841  * Common Development and Distribution License, Version 1.0 only
6842  * (the "License").  You may not use this file except in compliance
6843  * with the License.
6844  *
6845  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6846  * or http://www.opensolaris.org/os/licensing.
6847  * See the License for the specific language governing permissions
6848  * and limitations under the License.
6849  *
6850  * When distributing Covered Code, include this CDDL HEADER in each
6851  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6852  * If applicable, add the following below this CDDL HEADER, with the
6853  * fields enclosed by brackets "[]" replaced with your own identifying
6854  * information: Portions Copyright [yyyy] [name of copyright owner]
6855  *
6856  * CDDL HEADER END
6857  */
6858 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6859 /*	  All Rights Reserved  	*/
6860 
6861 
6862 
6863 
6864 
6865 #pragma ident "%Z%%M%	%I%	%E% SMI"
6866 
6867 
6868 
6869 
6870 
6871 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6872 /*
6873  * CDDL HEADER START
6874  *
6875  * The contents of this file are subject to the terms of the
6876  * Common Development and Distribution License (the "License").
6877  * You may not use this file except in compliance with the License.
6878  *
6879  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6880  * or http://www.opensolaris.org/os/licensing.
6881  * See the License for the specific language governing permissions
6882  * and limitations under the License.
6883  *
6884  * When distributing Covered Code, include this CDDL HEADER in each
6885  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6886  * If applicable, add the following below this CDDL HEADER, with the
6887  * fields enclosed by brackets "[]" replaced with your own identifying
6888  * information: Portions Copyright [yyyy] [name of copyright owner]
6889  *
6890  * CDDL HEADER END
6891  */
6892 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6893 /*	  All Rights Reserved  	*/
6894 
6895 
6896 /*
6897  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6898  * Use is subject to license terms.
6899  *
6900  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6901  * Copyright 2016 Joyent, Inc.
6902  */
6903 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 2
6904 
6905 struct pkgdev {
6906  int rdonly;
6907  int mntflg;
6908  longlong_t capacity; /* number of 512-blocks on device */
6909  char *name;
6910  char *dirname;
6911  char *pathname;
6912  char *mount;
6913  char *fstyp;
6914  char *cdevice;
6915  char *bdevice;
6916  char *norewind;
6917 };
6918 # 36 "quit.c" 2
6919 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 1
6920 /*
6921  * CDDL HEADER START
6922  *
6923  * The contents of this file are subject to the terms of the
6924  * Common Development and Distribution License, Version 1.0 only
6925  * (the "License").  You may not use this file except in compliance
6926  * with the License.
6927  *
6928  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6929  * or http://www.opensolaris.org/os/licensing.
6930  * See the License for the specific language governing permissions
6931  * and limitations under the License.
6932  *
6933  * When distributing Covered Code, include this CDDL HEADER in each
6934  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6935  * If applicable, add the following below this CDDL HEADER, with the
6936  * fields enclosed by brackets "[]" replaced with your own identifying
6937  * information: Portions Copyright [yyyy] [name of copyright owner]
6938  *
6939  * CDDL HEADER END
6940  */
6941 /*
6942  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
6943  * Use is subject to license terms.
6944  */
6945 
6946 /*
6947  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6948  *
6949  * Portions of this file developed by Garrett D'Amore are licensed
6950  * under the terms of the Common Development and Distribution License (CDDL)
6951  * version 1.0 only.  The use of subsequent versions of the License are
6952  * is specifically prohibited unless those terms are not in conflict with
6953  * version 1.0 of the License.  You can find this license on-line at
6954  * http://www.illumos.org/license/CDDL
6955  */
6956 
6957 
6958 
6959 
6960 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 1
6961 /*
6962  * CDDL HEADER START
6963  *
6964  * The contents of this file are subject to the terms of the
6965  * Common Development and Distribution License, Version 1.0 only
6966  * (the "License").  You may not use this file except in compliance
6967  * with the License.
6968  *
6969  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6970  * or http://www.opensolaris.org/os/licensing.
6971  * See the License for the specific language governing permissions
6972  * and limitations under the License.
6973  *
6974  * When distributing Covered Code, include this CDDL HEADER in each
6975  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6976  * If applicable, add the following below this CDDL HEADER, with the
6977  * fields enclosed by brackets "[]" replaced with your own identifying
6978  * information: Portions Copyright [yyyy] [name of copyright owner]
6979  *
6980  * CDDL HEADER END
6981  */
6982 /*
6983  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6984  * Copyright 2014 PALO, Richard.
6985  *
6986  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
6987  * Use is subject to license terms.
6988  */
6989 
6990 /*	Copyright (c) 1988 AT&T	*/
6991 /*	  All Rights Reserved  	*/
6992 
6993 
6994 /*
6995  * An application should not include this header directly.  Instead it
6996  * should be included only through the inclusion of other Sun headers.
6997  *
6998  * The contents of this header is limited to identifiers specified in the
6999  * C Standard.  Any new identifiers specified in future amendments to the
7000  * C Standard must be placed in this header.  If these new identifiers
7001  * are required to also be in the C++ Standard "std" namespace, then for
7002  * anything other than macro definitions, corresponding "using" directives
7003  * must also be added to <locale.h>.
7004  */
7005 
7006 
7007 
7008 
7009 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7010 /*
7011  * CDDL HEADER START
7012  *
7013  * The contents of this file are subject to the terms of the
7014  * Common Development and Distribution License (the "License").
7015  * You may not use this file except in compliance with the License.
7016  *
7017  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7018  * or http://www.opensolaris.org/os/licensing.
7019  * See the License for the specific language governing permissions
7020  * and limitations under the License.
7021  *
7022  * When distributing Covered Code, include this CDDL HEADER in each
7023  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7024  * If applicable, add the following below this CDDL HEADER, with the
7025  * fields enclosed by brackets "[]" replaced with your own identifying
7026  * information: Portions Copyright [yyyy] [name of copyright owner]
7027  *
7028  * CDDL HEADER END
7029  */
7030 
7031 /*
7032  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7033  * Copyright 2016 Joyent, Inc.
7034  *
7035  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7036  * Use is subject to license terms.
7037  */
7038 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
7039 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
7040 /*
7041  * This file and its contents are supplied under the terms of the
7042  * Common Development and Distribution License ("CDDL"), version 1.0.
7043  * You may only use this file in accordance with the terms of version
7044  * 1.0 of the CDDL.
7045  *
7046  * A full copy of the text of the CDDL should have accompanied this
7047  * source.  A copy of the CDDL is also available via the Internet at
7048  * http://www.illumos.org/license/CDDL.
7049  */
7050 
7051 /*
7052  * Copyright 2014-2016 PALO, Richard.
7053  */
7054 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
7055 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
7056 struct lconv {
7057  char *decimal_point;
7058  char *thousands_sep;
7059  char *grouping;
7060  char *int_curr_symbol;
7061  char *currency_symbol;
7062  char *mon_decimal_point;
7063  char *mon_thousands_sep;
7064  char *mon_grouping;
7065  char *positive_sign;
7066  char *negative_sign;
7067  char int_frac_digits;
7068  char frac_digits;
7069  char p_cs_precedes;
7070  char p_sep_by_space;
7071  char n_cs_precedes;
7072  char n_sep_by_space;
7073  char p_sign_posn;
7074  char n_sign_posn;
7075 
7076 /*
7077  * New in IEEE Std 1003.1-2001 for alignment with the ISO/IEC 9899:1999
7078  * standard.  Namespace and binary compatibility dictate that visibility
7079  * of these new members be limited.  Visibility is limited to a strictly
7080  * conforming ANSI C environment (-Xc) or if _LCONV_C99 is defined.
7081  */
7082 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
7083 };
7084 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
7085 extern char *setlocale(int, const char *);
7086 extern struct lconv *localeconv(void);
7087 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
7088 
7089 
7090 
7091 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
7092 /*
7093  * CDDL HEADER START
7094  *
7095  * The contents of this file are subject to the terms of the
7096  * Common Development and Distribution License (the "License").
7097  * You may not use this file except in compliance with the License.
7098  *
7099  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7100  * or http://www.opensolaris.org/os/licensing.
7101  * See the License for the specific language governing permissions
7102  * and limitations under the License.
7103  *
7104  * When distributing Covered Code, include this CDDL HEADER in each
7105  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7106  * If applicable, add the following below this CDDL HEADER, with the
7107  * fields enclosed by brackets "[]" replaced with your own identifying
7108  * information: Portions Copyright [yyyy] [name of copyright owner]
7109  *
7110  * CDDL HEADER END
7111  */
7112 /*
7113  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7114  *
7115  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
7116  * Use is subject to license terms.
7117  */
7118 
7119 
7120 
7121 
7122 
7123 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
7124 /*
7125  * CDDL HEADER START
7126  *
7127  * The contents of this file are subject to the terms of the
7128  * Common Development and Distribution License (the "License").
7129  * You may not use this file except in compliance with the License.
7130  *
7131  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7132  * or http://www.opensolaris.org/os/licensing.
7133  * See the License for the specific language governing permissions
7134  * and limitations under the License.
7135  *
7136  *
7137  * When distributing Covered Code, include this CDDL HEADER in each
7138  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7139  * If applicable, add the following below this CDDL HEADER, with the
7140  * fields enclosed by brackets "[]" replaced with your own identifying
7141  * information: Portions Copyright [yyyy] [name of copyright owner]
7142  *
7143  * CDDL HEADER END
7144  */
7145 
7146 /*
7147  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
7148  * Use is subject to license terms.
7149  * Copyright 2016 Joyent, Inc.
7150  */
7151 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 2
7152 
7153 
7154 
7155 
7156 
7157 /*
7158  * wchar_t is a built-in type in standard C++ and as such is not
7159  * defined here when using standard C++. However, the GNU compiler
7160  * fixincludes utility nonetheless creates its own version of this
7161  * header for use by gcc and g++. In that version it adds a redundant
7162  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
7163  * header we need to include the following magic comment:
7164  *
7165  * we must use the C++ compiler's type
7166  *
7167  * The above comment should not be removed or changed until GNU
7168  * gcc/fixinc/inclhack.def is updated to bypass this header.
7169  */
7170 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h"
7171 extern char *dcgettext(const char *, const char *, const int);
7172 extern char *dgettext(const char *, const char *);
7173 extern char *gettext(const char *);
7174 extern char *textdomain(const char *);
7175 extern char *bindtextdomain(const char *, const char *);
7176 
7177 /*
7178  * LI18NUX 2000 Globalization Specification Version 1.0
7179  * with Amendment 2
7180  */
7181 extern char *dcngettext(const char *, const char *,
7182  const char *, unsigned long int, int);
7183 extern char *dngettext(const char *, const char *,
7184  const char *, unsigned long int);
7185 extern char *ngettext(const char *, const char *, unsigned long int);
7186 extern char *bind_textdomain_codeset(const char *, const char *);
7187 
7188 /* Word handling functions --- requires dynamic linking */
7189 /* Warning: these are experimental and subject to change. */
7190 extern int wdinit(void);
7191 extern int wdchkind(wchar_t);
7192 extern int wdbindf(wchar_t, wchar_t, int);
7193 extern wchar_t *wddelim(wchar_t, wchar_t, int);
7194 extern wchar_t mcfiller(void);
7195 extern int mcwrap(void);
7196 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
7197 
7198 
7199 /*
7200  * Allow global visibility for symbols defined in
7201  * C++ "std" namespace in <iso/locale_iso.h>.
7202  */
7203 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
7204 /*
7205  * These were added in POSIX 2008 as part of the newlocale() specification.
7206  */
7207 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
7208 extern locale_t duplocale(locale_t);
7209 extern void freelocale(locale_t);
7210 extern locale_t newlocale(int, const char *, locale_t);
7211 extern locale_t uselocale(locale_t);
7212 
7213 
7214 extern locale_t __global_locale(void);
7215 # 37 "quit.c" 2
7216 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
7217 /*
7218  * CDDL HEADER START
7219  *
7220  * The contents of this file are subject to the terms of the
7221  * Common Development and Distribution License (the "License").
7222  * You may not use this file except in compliance with the License.
7223  *
7224  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7225  * or http://www.opensolaris.org/os/licensing.
7226  * See the License for the specific language governing permissions
7227  * and limitations under the License.
7228  *
7229  * When distributing Covered Code, include this CDDL HEADER in each
7230  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7231  * If applicable, add the following below this CDDL HEADER, with the
7232  * fields enclosed by brackets "[]" replaced with your own identifying
7233  * information: Portions Copyright [yyyy] [name of copyright owner]
7234  *
7235  * CDDL HEADER END
7236  */
7237 /*
7238  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7239  *
7240  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
7241  * Use is subject to license terms.
7242  */
7243 # 38 "quit.c" 2
7244 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
7245 /*
7246  * CDDL HEADER START
7247  *
7248  * The contents of this file are subject to the terms of the
7249  * Common Development and Distribution License (the "License").
7250  * You may not use this file except in compliance with the License.
7251  *
7252  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7253  * or http://www.opensolaris.org/os/licensing.
7254  * See the License for the specific language governing permissions
7255  * and limitations under the License.
7256  *
7257  * When distributing Covered Code, include this CDDL HEADER in each
7258  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7259  * If applicable, add the following below this CDDL HEADER, with the
7260  * fields enclosed by brackets "[]" replaced with your own identifying
7261  * information: Portions Copyright [yyyy] [name of copyright owner]
7262  *
7263  * CDDL HEADER END
7264  */
7265 
7266 /*
7267  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7268  * Use is subject to license terms.
7269  */
7270 
7271 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
7272 /* All Rights Reserved */
7273 # 38 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
7274 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7275 /*
7276  * CDDL HEADER START
7277  *
7278  * The contents of this file are subject to the terms of the
7279  * Common Development and Distribution License (the "License").
7280  * You may not use this file except in compliance with the License.
7281  *
7282  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7283  * or http://www.opensolaris.org/os/licensing.
7284  * See the License for the specific language governing permissions
7285  * and limitations under the License.
7286  *
7287  * When distributing Covered Code, include this CDDL HEADER in each
7288  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7289  * If applicable, add the following below this CDDL HEADER, with the
7290  * fields enclosed by brackets "[]" replaced with your own identifying
7291  * information: Portions Copyright [yyyy] [name of copyright owner]
7292  *
7293  * CDDL HEADER END
7294  */
7295 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7296 /*	  All Rights Reserved  	*/
7297 
7298 
7299 /*
7300  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7301  * Use is subject to license terms.
7302  *
7303  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7304  * Copyright 2016 Joyent, Inc.
7305  */
7306 # 39 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7307 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
7308 /*
7309  * CDDL HEADER START
7310  *
7311  * The contents of this file are subject to the terms of the
7312  * Common Development and Distribution License (the "License").
7313  * You may not use this file except in compliance with the License.
7314  *
7315  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7316  * or http://www.opensolaris.org/os/licensing.
7317  * See the License for the specific language governing permissions
7318  * and limitations under the License.
7319  *
7320  * When distributing Covered Code, include this CDDL HEADER in each
7321  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7322  * If applicable, add the following below this CDDL HEADER, with the
7323  * fields enclosed by brackets "[]" replaced with your own identifying
7324  * information: Portions Copyright [yyyy] [name of copyright owner]
7325  *
7326  * CDDL HEADER END
7327  */
7328 
7329 /*
7330  * Copyright (c) 2013 Gary Mills
7331  *
7332  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
7333  * Use is subject to license terms.
7334  */
7335 
7336 /*	Copyright (c) 1988 AT&T	*/
7337 /*	  All Rights Reserved  	*/
7338 
7339 
7340 
7341 
7342 
7343 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
7344 /*
7345  * CDDL HEADER START
7346  *
7347  * The contents of this file are subject to the terms of the
7348  * Common Development and Distribution License (the "License").
7349  * You may not use this file except in compliance with the License.
7350  *
7351  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7352  * or http://www.opensolaris.org/os/licensing.
7353  * See the License for the specific language governing permissions
7354  * and limitations under the License.
7355  *
7356  * When distributing Covered Code, include this CDDL HEADER in each
7357  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7358  * If applicable, add the following below this CDDL HEADER, with the
7359  * fields enclosed by brackets "[]" replaced with your own identifying
7360  * information: Portions Copyright [yyyy] [name of copyright owner]
7361  *
7362  * CDDL HEADER END
7363  */
7364 
7365 /*
7366  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7367  * Copyright 2016 Joyent, Inc.
7368  *
7369  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7370  * Use is subject to license terms.
7371  */
7372 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
7373 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
7374 /*
7375  * CDDL HEADER START
7376  *
7377  * The contents of this file are subject to the terms of the
7378  * Common Development and Distribution License (the "License").
7379  * You may not use this file except in compliance with the License.
7380  *
7381  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7382  * or http://www.opensolaris.org/os/licensing.
7383  * See the License for the specific language governing permissions
7384  * and limitations under the License.
7385  *
7386  *
7387  * When distributing Covered Code, include this CDDL HEADER in each
7388  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7389  * If applicable, add the following below this CDDL HEADER, with the
7390  * fields enclosed by brackets "[]" replaced with your own identifying
7391  * information: Portions Copyright [yyyy] [name of copyright owner]
7392  *
7393  * CDDL HEADER END
7394  */
7395 
7396 /*
7397  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
7398  * Use is subject to license terms.
7399  * Copyright 2016 Joyent, Inc.
7400  */
7401 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
7402 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h" 1
7403 /*
7404  * CDDL HEADER START
7405  *
7406  * The contents of this file are subject to the terms of the
7407  * Common Development and Distribution License, Version 1.0 only
7408  * (the "License").  You may not use this file except in compliance
7409  * with the License.
7410  *
7411  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7412  * or http://www.opensolaris.org/os/licensing.
7413  * See the License for the specific language governing permissions
7414  * and limitations under the License.
7415  *
7416  * When distributing Covered Code, include this CDDL HEADER in each
7417  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7418  * If applicable, add the following below this CDDL HEADER, with the
7419  * fields enclosed by brackets "[]" replaced with your own identifying
7420  * information: Portions Copyright [yyyy] [name of copyright owner]
7421  *
7422  * CDDL HEADER END
7423  */
7424 /*
7425  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
7426  * Use is subject to license terms.
7427  */
7428 
7429 /*	Copyright (c) 1988 AT&T	*/
7430 /*	  All Rights Reserved  	*/
7431 
7432 
7433 /*
7434  * An application should not include this header directly.  Instead it
7435  * should be included only through the inclusion of other Sun headers.
7436  *
7437  * The contents of this header is limited to identifiers specified in the
7438  * C Standard.  Any new identifiers specified in future amendments to the
7439  * C Standard must be placed in this header.  If these new identifiers
7440  * are required to also be in the C++ Standard "std" namespace, then for
7441  * anything other than macro definitions, corresponding "using" directives
7442  * must also be added to <limits.h>.
7443  */
7444 
7445 
7446 
7447 
7448 #pragma ident "%Z%%M%	%I%	%E% SMI"
7449 
7450 
7451 
7452 
7453 
7454 /*
7455  * Sizes of integral types
7456  */
7457 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h"
7458      /* min value of a "long int" */
7459 
7460 
7461 
7462 
7463 
7464      /* min value of a long long */
7465 
7466      /* max value of a long long */
7467 
7468      /* max value of "unsigned long long */
7469 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
7470 
7471 /*
7472  * Include fixed width type limits as proposed by the ISO/JTC1/SC22/WG14 C
7473  * committee's working draft for the revision of the current ISO C standard,
7474  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
7475  * required by any standard but constitute a useful, general purpose set
7476  * of type definitions and limits which is namespace clean with respect to
7477  * all standards.
7478  */
7479 
7480 
7481 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
7482 /*
7483  * CDDL HEADER START
7484  *
7485  * The contents of this file are subject to the terms of the
7486  * Common Development and Distribution License, Version 1.0 only
7487  * (the "License").  You may not use this file except in compliance
7488  * with the License.
7489  *
7490  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7491  * or http://www.opensolaris.org/os/licensing.
7492  * See the License for the specific language governing permissions
7493  * and limitations under the License.
7494  *
7495  * When distributing Covered Code, include this CDDL HEADER in each
7496  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7497  * If applicable, add the following below this CDDL HEADER, with the
7498  * fields enclosed by brackets "[]" replaced with your own identifying
7499  * information: Portions Copyright [yyyy] [name of copyright owner]
7500  *
7501  * CDDL HEADER END
7502  */
7503 /*
7504  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7505  *
7506  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7507  * Use is subject to license terms.
7508  */
7509 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
7510 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
7511 /*
7512  * ARG_MAX is calculated as follows:
7513  * NCARGS - space for other stuff on initial stack
7514  * like aux vectors, saved registers, etc..
7515  */
7516 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
7517 /*
7518  * POSIX conformant definitions - An implementation may define
7519  * other symbols which reflect the actual implementation. Alternate
7520  * definitions may not be as restrictive as the POSIX definitions.
7521  */
7522 # 140 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
7523 /* POSIX.1c conformant */
7524 
7525 
7526 
7527 
7528 
7529 /* UNIX 03 conformant */
7530 
7531 
7532 
7533 
7534 
7535 /*
7536  * POSIX.2 and XPG4-XSH4 conformant definitions
7537  */
7538 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
7539 /* UNIX 03 conformant */
7540 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
7541 /*
7542  * For dual definitions for PASS_MAX and sysconf.c
7543  */
7544 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
7545     /* NLS printf() and scanf() */
7546 # 216 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
7547 /* Marked as LEGACY in SUSv2 and removed in UNIX 03 */
7548 
7549 
7550 
7551        /* of a double */
7552 
7553 
7554        /* of a "float" */
7555 
7556 
7557 /* Marked as LEGACY in SUSv1 and removed in SUSv2 */
7558 
7559 
7560        /* of a double */
7561 
7562        /* of a float */
7563 # 248 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
7564 /*
7565  * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
7566  * related text states:
7567  *
7568  * A definition of one of the values from Table 2-5 shall be omitted from the
7569  * <limits.h> on specific implementations where the corresponding value is
7570  * equal to or greater than the stated minimum, but where the value can vary
7571  * depending on the file to which it is applied. The actual value supported for
7572  * a specific pathname shall be provided by the pathconf() (5.7.1) function.
7573  *
7574  * This is clear that any machine supporting multiple file system types
7575  * and/or a network can not include this define, regardless of protection
7576  * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags.
7577  *
7578  * #define	NAME_MAX	14
7579  */
7580 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
7581     /* Increased for illumos */
7582 # 40 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7583 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
7584 /*
7585  * CDDL HEADER START
7586  *
7587  * The contents of this file are subject to the terms of the
7588  * Common Development and Distribution License (the "License").
7589  * You may not use this file except in compliance with the License.
7590  *
7591  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7592  * or http://www.opensolaris.org/os/licensing.
7593  * See the License for the specific language governing permissions
7594  * and limitations under the License.
7595  *
7596  * When distributing Covered Code, include this CDDL HEADER in each
7597  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7598  * If applicable, add the following below this CDDL HEADER, with the
7599  * fields enclosed by brackets "[]" replaced with your own identifying
7600  * information: Portions Copyright [yyyy] [name of copyright owner]
7601  *
7602  * CDDL HEADER END
7603  */
7604 
7605 /*
7606  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7607  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
7608  */
7609 
7610 /*	Copyright (c) 1988 AT&T	*/
7611 /*	  All Rights Reserved  	*/
7612 
7613 /*
7614  * User-visible pieces of the ANSI C standard I/O package.
7615  */
7616 # 41 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7617 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 1
7618 /*
7619  * CDDL HEADER START
7620  *
7621  * The contents of this file are subject to the terms of the
7622  * Common Development and Distribution License, Version 1.0 only
7623  * (the "License").  You may not use this file except in compliance
7624  * with the License.
7625  *
7626  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7627  * or http://www.opensolaris.org/os/licensing.
7628  * See the License for the specific language governing permissions
7629  * and limitations under the License.
7630  *
7631  * When distributing Covered Code, include this CDDL HEADER in each
7632  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7633  * If applicable, add the following below this CDDL HEADER, with the
7634  * fields enclosed by brackets "[]" replaced with your own identifying
7635  * information: Portions Copyright [yyyy] [name of copyright owner]
7636  *
7637  * CDDL HEADER END
7638  */
7639 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7640 /*	  All Rights Reserved  	*/
7641 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7642 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
7643 /*
7644  * CDDL HEADER START
7645  *
7646  * The contents of this file are subject to the terms of the
7647  * Common Development and Distribution License (the "License").
7648  * You may not use this file except in compliance with the License.
7649  *
7650  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7651  * or http://www.opensolaris.org/os/licensing.
7652  * See the License for the specific language governing permissions
7653  * and limitations under the License.
7654  *
7655  * When distributing Covered Code, include this CDDL HEADER in each
7656  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7657  * If applicable, add the following below this CDDL HEADER, with the
7658  * fields enclosed by brackets "[]" replaced with your own identifying
7659  * information: Portions Copyright [yyyy] [name of copyright owner]
7660  *
7661  * CDDL HEADER END
7662  */
7663 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7664 /*	  All Rights Reserved  	*/
7665 
7666 /*
7667  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
7668  * Use is subject to license terms.
7669  */
7670 
7671 
7672 
7673 
7674 #pragma ident "%Z%%M%	%I%	%E% SMI"
7675 
7676 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
7677 /*
7678  * CDDL HEADER START
7679  *
7680  * The contents of this file are subject to the terms of the
7681  * Common Development and Distribution License (the "License").
7682  * You may not use this file except in compliance with the License.
7683  *
7684  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7685  * or http://www.opensolaris.org/os/licensing.
7686  * See the License for the specific language governing permissions
7687  * and limitations under the License.
7688  *
7689  * When distributing Covered Code, include this CDDL HEADER in each
7690  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7691  * If applicable, add the following below this CDDL HEADER, with the
7692  * fields enclosed by brackets "[]" replaced with your own identifying
7693  * information: Portions Copyright [yyyy] [name of copyright owner]
7694  *
7695  * CDDL HEADER END
7696  */
7697 /*	Copyright (c) 1988 AT&T	*/
7698 /*	  All Rights Reserved  	*/
7699 
7700 
7701 /*
7702  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7703  *
7704  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
7705  * Use is subject to license terms.
7706  */
7707 /*
7708  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
7709  * Copyright 2016 Joyent, Inc.
7710  */
7711 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 2
7712 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h"
7713 extern char *errstr;
7714 
7715 struct ainfo {
7716  char *local;
7717  mode_t mode;
7718  char owner[64 +1];
7719  char group[64 +1];
7720  major_t major;
7721  minor_t minor;
7722 };
7723 
7724 struct cinfo {
7725  long cksum;
7726  fsblkcnt_t size;
7727  time_t modtime;
7728 };
7729 
7730 struct pinfo {
7731  char status;
7732  char pkg[64 +1];
7733  char editflag;
7734  char aclass[64 +1];
7735  struct pinfo
7736   *next;
7737 };
7738 
7739 struct cfent {
7740  short volno;
7741  char ftype;
7742  char pkg_class[64 +1];
7743  int pkg_class_idx;
7744  char *path;
7745  struct ainfo ainfo;
7746  struct cinfo cinfo;
7747  short npkgs;
7748  struct pinfo
7749   *pinfo;
7750 };
7751 
7752 /* averify() & cverify() error codes */
7753 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7754 # 1 "/usr/include/openssl/bio.h" 1 3 4
7755 /* crypto/bio/bio.h */
7756 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
7757  * All rights reserved.
7758  *
7759  * This package is an SSL implementation written
7760  * by Eric Young (eay@cryptsoft.com).
7761  * The implementation was written so as to conform with Netscapes SSL.
7762  *
7763  * This library is free for commercial and non-commercial use as long as
7764  * the following conditions are aheared to.  The following conditions
7765  * apply to all code found in this distribution, be it the RC4, RSA,
7766  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
7767  * included with this distribution is covered by the same copyright terms
7768  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
7769  *
7770  * Copyright remains Eric Young's, and as such any Copyright notices in
7771  * the code are not to be removed.
7772  * If this package is used in a product, Eric Young should be given attribution
7773  * as the author of the parts of the library used.
7774  * This can be in the form of a textual message at program startup or
7775  * in documentation (online or textual) provided with the package.
7776  *
7777  * Redistribution and use in source and binary forms, with or without
7778  * modification, are permitted provided that the following conditions
7779  * are met:
7780  * 1. Redistributions of source code must retain the copyright
7781  *    notice, this list of conditions and the following disclaimer.
7782  * 2. Redistributions in binary form must reproduce the above copyright
7783  *    notice, this list of conditions and the following disclaimer in the
7784  *    documentation and/or other materials provided with the distribution.
7785  * 3. All advertising materials mentioning features or use of this software
7786  *    must display the following acknowledgement:
7787  *    "This product includes cryptographic software written by
7788  *     Eric Young (eay@cryptsoft.com)"
7789  *    The word 'cryptographic' can be left out if the rouines from the library
7790  *    being used are not cryptographic related :-).
7791  * 4. If you include any Windows specific code (or a derivative thereof) from
7792  *    the apps directory (application code) you must include an acknowledgement:
7793  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
7794  *
7795  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
7796  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7797  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7798  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
7799  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7800  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7801  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7802  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7803  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7804  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7805  * SUCH DAMAGE.
7806  *
7807  * The licence and distribution terms for any publically available version or
7808  * derivative of this code cannot be changed.  i.e. this code cannot simply be
7809  * copied and put under another distribution licence
7810  * [including the GNU Public Licence.]
7811  */
7812 
7813 
7814 
7815 
7816 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
7817 /* e_os2.h */
7818 /* ====================================================================
7819  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
7820  *
7821  * Redistribution and use in source and binary forms, with or without
7822  * modification, are permitted provided that the following conditions
7823  * are met:
7824  *
7825  * 1. Redistributions of source code must retain the above copyright
7826  *    notice, this list of conditions and the following disclaimer.
7827  *
7828  * 2. Redistributions in binary form must reproduce the above copyright
7829  *    notice, this list of conditions and the following disclaimer in
7830  *    the documentation and/or other materials provided with the
7831  *    distribution.
7832  *
7833  * 3. All advertising materials mentioning features or use of this
7834  *    software must display the following acknowledgment:
7835  *    "This product includes software developed by the OpenSSL Project
7836  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
7837  *
7838  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
7839  *    endorse or promote products derived from this software without
7840  *    prior written permission. For written permission, please contact
7841  *    openssl-core@openssl.org.
7842  *
7843  * 5. Products derived from this software may not be called "OpenSSL"
7844  *    nor may "OpenSSL" appear in their names without prior written
7845  *    permission of the OpenSSL Project.
7846  *
7847  * 6. Redistributions of any form whatsoever must retain the following
7848  *    acknowledgment:
7849  *    "This product includes software developed by the OpenSSL Project
7850  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
7851  *
7852  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
7853  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7854  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
7855  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
7856  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7857  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
7858  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
7859  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7860  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
7861  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
7862  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
7863  * OF THE POSSIBILITY OF SUCH DAMAGE.
7864  * ====================================================================
7865  *
7866  * This product includes cryptographic software written by Eric Young
7867  * (eay@cryptsoft.com).  This product includes software written by Tim
7868  * Hudson (tjh@cryptsoft.com).
7869  *
7870  */
7871 
7872 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
7873 /* opensslconf.h */
7874 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
7875 
7876 
7877 
7878 
7879 /* OpenSSL was configured with the following options: */
7880 # 108 "/usr/include/openssl/opensslconf.h" 3 4
7881 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
7882    asks for it.  This is a transient feature that is provided for those
7883    who haven't had the time to do the appropriate changes in their
7884    applications.  */
7885 # 204 "/usr/include/openssl/opensslconf.h" 3 4
7886 /* crypto/opensslconf.h.in */
7887 
7888 /* Generate 80386 code? */
7889 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
7890 # 65 "/usr/include/openssl/e_os2.h" 3 4
7891 /******************************************************************************
7892  * Detect operating systems.  This probably needs completing.
7893  * The result is that at least one OPENSSL_SYS_os macro should be defined.
7894  * However, if none is defined, Unix is assumed.
7895  **/
7896 
7897 
7898 
7899 /* ---------------------- Macintosh, before MacOS X ----------------------- */
7900 
7901 
7902 
7903 
7904 
7905 /* ---------------------- NetWare ----------------------------------------- */
7906 
7907 
7908 
7909 
7910 
7911 /* --------------------- Microsoft operating systems ---------------------- */
7912 
7913 /*
7914  * Note that MSDOS actually denotes 32-bit environments running on top of
7915  * MS-DOS, such as DJGPP one.
7916  */
7917 
7918 
7919 
7920 
7921 
7922 /*
7923  * For 32 bit environment, there seems to be the CygWin environment and then
7924  * all the others that try to do the same thing Microsoft does...
7925  */
7926 # 129 "/usr/include/openssl/e_os2.h" 3 4
7927 /* Anything that tries to look like Microsoft is "Windows" */
7928 # 138 "/usr/include/openssl/e_os2.h" 3 4
7929 /*
7930  * DLL settings.  This part is a bit tough, because it's up to the
7931  * application implementor how he or she will link the application, so it
7932  * requires some macro to be used.
7933  */
7934 # 152 "/usr/include/openssl/e_os2.h" 3 4
7935 /* ------------------------------- OpenVMS -------------------------------- */
7936 # 166 "/usr/include/openssl/e_os2.h" 3 4
7937 /* -------------------------------- OS/2 ---------------------------------- */
7938 
7939 
7940 
7941 
7942 
7943 /* -------------------------------- Unix ---------------------------------- */
7944 # 207 "/usr/include/openssl/e_os2.h" 3 4
7945 /* -------------------------------- VOS ----------------------------------- */
7946 # 218 "/usr/include/openssl/e_os2.h" 3 4
7947 /* ------------------------------ VxWorks --------------------------------- */
7948 
7949 
7950 
7951 
7952 /* -------------------------------- BeOS ---------------------------------- */
7953 # 234 "/usr/include/openssl/e_os2.h" 3 4
7954 /**
7955  * That's it for OS-specific stuff
7956  *****************************************************************************/
7957 
7958 /* Specials for I/O an exit */
7959 # 247 "/usr/include/openssl/e_os2.h" 3 4
7960 /*-
7961  * Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare
7962  * certain global symbols that, with some compilers under VMS, have to be
7963  * defined and declared explicitely with globaldef and globalref.
7964  * Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare
7965  * DLL exports and imports for compilers under Win32.  These are a little
7966  * more complicated to use.  Basically, for any library that exports some
7967  * global variables, the following code must be present in the header file
7968  * that declares them, before OPENSSL_EXTERN is used:
7969  *
7970  * #ifdef SOME_BUILD_FLAG_MACRO
7971  * # undef OPENSSL_EXTERN
7972  * # define OPENSSL_EXTERN OPENSSL_EXPORT
7973  * #endif
7974  *
7975  * The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL
7976  * have some generally sensible values, and for OPENSSL_EXTERN to have the
7977  * value OPENSSL_IMPORT.
7978  */
7979 # 282 "/usr/include/openssl/e_os2.h" 3 4
7980 /*-
7981  * Macros to allow global variables to be reached through function calls when
7982  * required (if a shared library version requires it, for example.
7983  * The way it's done allows definitions like this:
7984  *
7985  *      // in foobar.c
7986  *      OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
7987  *      // in foobar.h
7988  *      OPENSSL_DECLARE_GLOBAL(int,foobar);
7989  *      #define foobar OPENSSL_GLOBAL_REF(foobar)
7990  */
7991 # 63 "/usr/include/openssl/bio.h" 2 3 4
7992 
7993 
7994 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
7995 /*
7996  * CDDL HEADER START
7997  *
7998  * The contents of this file are subject to the terms of the
7999  * Common Development and Distribution License (the "License").
8000  * You may not use this file except in compliance with the License.
8001  *
8002  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8003  * or http://www.opensolaris.org/os/licensing.
8004  * See the License for the specific language governing permissions
8005  * and limitations under the License.
8006  *
8007  * When distributing Covered Code, include this CDDL HEADER in each
8008  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8009  * If applicable, add the following below this CDDL HEADER, with the
8010  * fields enclosed by brackets "[]" replaced with your own identifying
8011  * information: Portions Copyright [yyyy] [name of copyright owner]
8012  *
8013  * CDDL HEADER END
8014  */
8015 
8016 /*
8017  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8018  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
8019  */
8020 
8021 /*	Copyright (c) 1988 AT&T	*/
8022 /*	  All Rights Reserved  	*/
8023 
8024 /*
8025  * User-visible pieces of the ANSI C standard I/O package.
8026  */
8027 # 66 "/usr/include/openssl/bio.h" 2 3 4
8028 
8029 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1 3 4
8030 /*
8031  * CDDL HEADER START
8032  *
8033  * The contents of this file are subject to the terms of the
8034  * Common Development and Distribution License, Version 1.0 only
8035  * (the "License").  You may not use this file except in compliance
8036  * with the License.
8037  *
8038  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8039  * or http://www.opensolaris.org/os/licensing.
8040  * See the License for the specific language governing permissions
8041  * and limitations under the License.
8042  *
8043  * When distributing Covered Code, include this CDDL HEADER in each
8044  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8045  * If applicable, add the following below this CDDL HEADER, with the
8046  * fields enclosed by brackets "[]" replaced with your own identifying
8047  * information: Portions Copyright [yyyy] [name of copyright owner]
8048  *
8049  * CDDL HEADER END
8050  */
8051 /*	Copyright (c) 1988 AT&T	*/
8052 /*	  All Rights Reserved	*/
8053 
8054 /*
8055  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8056  *
8057  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8058  * Use is subject to license terms.
8059  */
8060 
8061 
8062 
8063 
8064 /*
8065  * This header defines the ISO C 1989, ISO C++ 1998, and ISO C 1999
8066  * variable argument definitions.  For legacy support, it also defines
8067  * the pre-standard variable argument definitions.
8068  *
8069  * The varargs definitions within this header are defined in terms of
8070  * implementation definitions.  These implementation definitions reside
8071  * in <sys/va_list.h>.  This organization enables protected use of
8072  * the implementation by other standard headers without introducing
8073  * names into the users' namespace.
8074  */
8075 
8076 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 1 3 4
8077 /*
8078  * CDDL HEADER START
8079  *
8080  * The contents of this file are subject to the terms of the
8081  * Common Development and Distribution License, Version 1.0 only
8082  * (the "License").  You may not use this file except in compliance
8083  * with the License.
8084  *
8085  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8086  * or http://www.opensolaris.org/os/licensing.
8087  * See the License for the specific language governing permissions
8088  * and limitations under the License.
8089  *
8090  * When distributing Covered Code, include this CDDL HEADER in each
8091  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8092  * If applicable, add the following below this CDDL HEADER, with the
8093  * fields enclosed by brackets "[]" replaced with your own identifying
8094  * information: Portions Copyright [yyyy] [name of copyright owner]
8095  *
8096  * CDDL HEADER END
8097  */
8098 /*	Copyright (c) 1988 AT&T	*/
8099 /*	  All Rights Reserved  	*/
8100 
8101 
8102 /*
8103  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8104  * Use is subject to license terms.
8105  */
8106 
8107 /*
8108  * An application should not include this header directly.  Instead it
8109  * should be included only through the inclusion of other Sun headers.
8110  *
8111  * The contents of this header is limited to identifiers specified in the
8112  * C Standard.  Any new identifiers specified in future amendments to the
8113  * C Standard must be placed in this header.  If these new identifiers
8114  * are required to also be in the C++ Standard "std" namespace, then for
8115  * anything other than macro definitions, corresponding "using" directives
8116  * must also be added to <stdarg.h>.
8117  */
8118 
8119 
8120 
8121 
8122 #pragma ident "%Z%%M%	%I%	%E% SMI"
8123 
8124 /*
8125  * This header defines the ISO C 1989 and ISO C++ 1998 variable
8126  * argument definitions.
8127  *
8128  * The varargs definitions within this header are defined in terms of
8129  * implementation definitions.  These implementation definitions reside
8130  * in <sys/va_impl.h>.  This organization enables protected use of
8131  * the implementation by other standard headers without introducing
8132  * names into the users' namespace.
8133  */
8134 
8135 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 1 3 4
8136 /*
8137  * CDDL HEADER START
8138  *
8139  * The contents of this file are subject to the terms of the
8140  * Common Development and Distribution License, Version 1.0 only
8141  * (the "License").  You may not use this file except in compliance
8142  * with the License.
8143  *
8144  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8145  * or http://www.opensolaris.org/os/licensing.
8146  * See the License for the specific language governing permissions
8147  * and limitations under the License.
8148  *
8149  * When distributing Covered Code, include this CDDL HEADER in each
8150  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8151  * If applicable, add the following below this CDDL HEADER, with the
8152  * fields enclosed by brackets "[]" replaced with your own identifying
8153  * information: Portions Copyright [yyyy] [name of copyright owner]
8154  *
8155  * CDDL HEADER END
8156  */
8157 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8158 /*	  All Rights Reserved	*/
8159 
8160 
8161 /*
8162  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8163  *
8164  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8165  * Use is subject to license terms.
8166  */
8167 
8168 
8169 
8170 
8171 /*
8172  * An application should not include this header directly.  Instead it
8173  * should be included only through the inclusion of other Sun headers,
8174  * specifically <stdarg.h> and <varargs.h>.
8175  *
8176  * This header serves two purposes.
8177  *
8178  * First, it provides a common set of definitions that implementations
8179  * of the various standards for variable argument lists may use.  These
8180  * various standards are implemented in <varargs.h>, <stdarg.h>,
8181  * <iso/stdarg_iso.h>, <iso/stdarg_c99.h>, and <sys/varargs.h>.
8182  *
8183  * Second, it provides varying implementations of the common definitions,
8184  * depending upon the compiler.
8185  */
8186 
8187 /*
8188  * The common definitions exported by this header or compilers using
8189  * this header are:
8190  *
8191  * the macro __va_start(list, name) starting the list iteration
8192  * the macro __va_arg(list, type) getting the current arg and iterating
8193  * the macro __va_copy(to, from) to bookmark the list iteration
8194  * the macro __va_end(list) to end the iteration
8195  *
8196  * In addition, the following are exported via inclusion of <sys/va_list.h>:
8197  *
8198  * the identifier __builtin_va_alist for the variable list pseudo parameter
8199  * the type __va_alist_type for the variable list pseudo parameter
8200  * the type __va_list defining the type of the variable list iterator
8201  */
8202 
8203 /*
8204  * This header uses feature macros (e.g. __BUILTIN_VA_ARG_INCR and
8205  * __BUILTIN_VA_STRUCT), compiler macros (e.g. __GNUC__), and processor
8206  * macros (e.g. __sparc) to determine the protocol appropriate to the
8207  * current compilation.  It is intended that the compilation system
8208  * define the feature, processor, and compiler macros, not the user of
8209  * the system.
8210  */
8211 
8212 /*
8213  * Many compilation systems depend upon the use of special functions
8214  * built into the the compilation system to handle variable argument
8215  * lists.  These built-in symbols may include one or more of the
8216  * following:
8217  *
8218  *      __builtin_va_alist
8219  *      __builtin_va_start
8220  *      __builtin_va_arg_incr
8221  *      __builtin_stdarg_start
8222  *      __builtin_va_end
8223  *      __builtin_va_arg
8224  *      __builtin_va_copy
8225  */
8226 
8227 /*
8228  * The following are defined in <sys/va_list.h>:
8229  *
8230  *      __va_alist_type
8231  *      __va_void()
8232  *      __va_ptr_base
8233  *      ISA definitions via inclusion of <sys/isa_defs.h>
8234  *
8235  * Inclusion of this header also makes visible the symbols in <sys/va_list.h>.
8236  * This header is included in <varargs.h>, <sys/varargs.h> and in <stdarg.h>
8237  * via inclusion of <iso/stdarg_iso.h>.
8238  */
8239 
8240 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1 3 4
8241 /*
8242  * CDDL HEADER START
8243  *
8244  * The contents of this file are subject to the terms of the
8245  * Common Development and Distribution License, Version 1.0 only
8246  * (the "License").  You may not use this file except in compliance
8247  * with the License.
8248  *
8249  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8250  * or http://www.opensolaris.org/os/licensing.
8251  * See the License for the specific language governing permissions
8252  * and limitations under the License.
8253  *
8254  * When distributing Covered Code, include this CDDL HEADER in each
8255  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8256  * If applicable, add the following below this CDDL HEADER, with the
8257  * fields enclosed by brackets "[]" replaced with your own identifying
8258  * information: Portions Copyright [yyyy] [name of copyright owner]
8259  *
8260  * CDDL HEADER END
8261  */
8262 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8263 /*	  All Rights Reserved	*/
8264 
8265 
8266 /*
8267  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8268  *
8269  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8270  * Use is subject to license terms.
8271  */
8272 # 106 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 2 3 4
8273 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 2 3 4
8274 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 3 4
8275 typedef __va_list va_list;
8276 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
8277 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 1 3 4
8278 /*
8279  * CDDL HEADER START
8280  *
8281  * The contents of this file are subject to the terms of the
8282  * Common Development and Distribution License, Version 1.0 only
8283  * (the "License").  You may not use this file except in compliance
8284  * with the License.
8285  *
8286  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8287  * or http://www.opensolaris.org/os/licensing.
8288  * See the License for the specific language governing permissions
8289  * and limitations under the License.
8290  *
8291  * When distributing Covered Code, include this CDDL HEADER in each
8292  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8293  * If applicable, add the following below this CDDL HEADER, with the
8294  * fields enclosed by brackets "[]" replaced with your own identifying
8295  * information: Portions Copyright [yyyy] [name of copyright owner]
8296  *
8297  * CDDL HEADER END
8298  */
8299 /*	Copyright (c) 1988 AT&T	*/
8300 /*	  All Rights Reserved	*/
8301 
8302 
8303 /*
8304  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8305  * Use is subject to license terms.
8306  */
8307 
8308 
8309 
8310 
8311 #pragma ident "%Z%%M%	%I%	%E% SMI"
8312 
8313 /*
8314  * An application should not include this header directly.  Instead it
8315  * should be included only through the inclusion of other Sun headers.
8316  *
8317  * This header defines the va_copy variable argument macro, which is
8318  * new in ISO C 1999, and thus not present in ISO C 1989 and ISO C++
8319  * 1998.  Because this macro is a long-standing Solaris extension, it
8320  * is also permitted in other contexts.
8321  *
8322  * The varargs definitions within this header are defined in terms of
8323  * implementation definitions.  These implementation definitions reside
8324  * in <sys/va_list.h>.  This organization enables protected use of
8325  * the implementation by other standard headers without introducing
8326  * names into the users' namespace.
8327  */
8328 
8329 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
8330 /*
8331  * CDDL HEADER START
8332  *
8333  * The contents of this file are subject to the terms of the
8334  * Common Development and Distribution License (the "License").
8335  * You may not use this file except in compliance with the License.
8336  *
8337  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8338  * or http://www.opensolaris.org/os/licensing.
8339  * See the License for the specific language governing permissions
8340  * and limitations under the License.
8341  *
8342  * When distributing Covered Code, include this CDDL HEADER in each
8343  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8344  * If applicable, add the following below this CDDL HEADER, with the
8345  * fields enclosed by brackets "[]" replaced with your own identifying
8346  * information: Portions Copyright [yyyy] [name of copyright owner]
8347  *
8348  * CDDL HEADER END
8349  */
8350 
8351 /*
8352  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8353  * Copyright 2016 Joyent, Inc.
8354  *
8355  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8356  * Use is subject to license terms.
8357  */
8358 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 2 3 4
8359 
8360 
8361 
8362 
8363 
8364 /*
8365  * va_copy was initially a Solaris extension to provide a portable
8366  * way to perform a variable argument list ``bookmarking'' function.
8367  * It is now specified in the ISO/IEC 9899:1999 standard.
8368  */
8369 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
8370 
8371 /*
8372  * Allow global visibility for symbols defined in
8373  * C++ "std" namespace in <iso/stdarg_iso.h>.
8374  */
8375 # 68 "/usr/include/openssl/bio.h" 2 3 4
8376 
8377 # 1 "/usr/include/openssl/crypto.h" 1 3 4
8378 /* crypto/crypto.h */
8379 /* ====================================================================
8380  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
8381  *
8382  * Redistribution and use in source and binary forms, with or without
8383  * modification, are permitted provided that the following conditions
8384  * are met:
8385  *
8386  * 1. Redistributions of source code must retain the above copyright
8387  *    notice, this list of conditions and the following disclaimer.
8388  *
8389  * 2. Redistributions in binary form must reproduce the above copyright
8390  *    notice, this list of conditions and the following disclaimer in
8391  *    the documentation and/or other materials provided with the
8392  *    distribution.
8393  *
8394  * 3. All advertising materials mentioning features or use of this
8395  *    software must display the following acknowledgment:
8396  *    "This product includes software developed by the OpenSSL Project
8397  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8398  *
8399  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8400  *    endorse or promote products derived from this software without
8401  *    prior written permission. For written permission, please contact
8402  *    openssl-core@openssl.org.
8403  *
8404  * 5. Products derived from this software may not be called "OpenSSL"
8405  *    nor may "OpenSSL" appear in their names without prior written
8406  *    permission of the OpenSSL Project.
8407  *
8408  * 6. Redistributions of any form whatsoever must retain the following
8409  *    acknowledgment:
8410  *    "This product includes software developed by the OpenSSL Project
8411  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8412  *
8413  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8414  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8415  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8416  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8417  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8418  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8419  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8420  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8421  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8422  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8423  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8424  * OF THE POSSIBILITY OF SUCH DAMAGE.
8425  * ====================================================================
8426  *
8427  * This product includes cryptographic software written by Eric Young
8428  * (eay@cryptsoft.com).  This product includes software written by Tim
8429  * Hudson (tjh@cryptsoft.com).
8430  *
8431  */
8432 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8433  * All rights reserved.
8434  *
8435  * This package is an SSL implementation written
8436  * by Eric Young (eay@cryptsoft.com).
8437  * The implementation was written so as to conform with Netscapes SSL.
8438  *
8439  * This library is free for commercial and non-commercial use as long as
8440  * the following conditions are aheared to.  The following conditions
8441  * apply to all code found in this distribution, be it the RC4, RSA,
8442  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8443  * included with this distribution is covered by the same copyright terms
8444  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8445  *
8446  * Copyright remains Eric Young's, and as such any Copyright notices in
8447  * the code are not to be removed.
8448  * If this package is used in a product, Eric Young should be given attribution
8449  * as the author of the parts of the library used.
8450  * This can be in the form of a textual message at program startup or
8451  * in documentation (online or textual) provided with the package.
8452  *
8453  * Redistribution and use in source and binary forms, with or without
8454  * modification, are permitted provided that the following conditions
8455  * are met:
8456  * 1. Redistributions of source code must retain the copyright
8457  *    notice, this list of conditions and the following disclaimer.
8458  * 2. Redistributions in binary form must reproduce the above copyright
8459  *    notice, this list of conditions and the following disclaimer in the
8460  *    documentation and/or other materials provided with the distribution.
8461  * 3. All advertising materials mentioning features or use of this software
8462  *    must display the following acknowledgement:
8463  *    "This product includes cryptographic software written by
8464  *     Eric Young (eay@cryptsoft.com)"
8465  *    The word 'cryptographic' can be left out if the rouines from the library
8466  *    being used are not cryptographic related :-).
8467  * 4. If you include any Windows specific code (or a derivative thereof) from
8468  *    the apps directory (application code) you must include an acknowledgement:
8469  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8470  *
8471  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8472  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8473  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8474  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8475  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8476  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8477  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8478  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8479  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8480  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8481  * SUCH DAMAGE.
8482  *
8483  * The licence and distribution terms for any publically available version or
8484  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8485  * copied and put under another distribution licence
8486  * [including the GNU Public Licence.]
8487  */
8488 /* ====================================================================
8489  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
8490  * ECDH support in OpenSSL originally developed by
8491  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
8492  */
8493 
8494 
8495 
8496 
8497 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1 3 4
8498 /*
8499  * CDDL HEADER START
8500  *
8501  * The contents of this file are subject to the terms of the
8502  * Common Development and Distribution License (the "License").
8503  * You may not use this file except in compliance with the License.
8504  *
8505  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8506  * or http://www.opensolaris.org/os/licensing.
8507  * See the License for the specific language governing permissions
8508  * and limitations under the License.
8509  *
8510  * When distributing Covered Code, include this CDDL HEADER in each
8511  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8512  * If applicable, add the following below this CDDL HEADER, with the
8513  * fields enclosed by brackets "[]" replaced with your own identifying
8514  * information: Portions Copyright [yyyy] [name of copyright owner]
8515  *
8516  * CDDL HEADER END
8517  */
8518 
8519 /*
8520  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8521  * Copyright (c) 2013 Gary Mills
8522  *
8523  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
8524  */
8525 
8526 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
8527 
8528 /*	Copyright (c) 1988 AT&T	*/
8529 /*	  All Rights Reserved  	*/
8530 # 121 "/usr/include/openssl/crypto.h" 2 3 4
8531 
8532 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
8533 /* e_os2.h */
8534 /* ====================================================================
8535  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
8536  *
8537  * Redistribution and use in source and binary forms, with or without
8538  * modification, are permitted provided that the following conditions
8539  * are met:
8540  *
8541  * 1. Redistributions of source code must retain the above copyright
8542  *    notice, this list of conditions and the following disclaimer.
8543  *
8544  * 2. Redistributions in binary form must reproduce the above copyright
8545  *    notice, this list of conditions and the following disclaimer in
8546  *    the documentation and/or other materials provided with the
8547  *    distribution.
8548  *
8549  * 3. All advertising materials mentioning features or use of this
8550  *    software must display the following acknowledgment:
8551  *    "This product includes software developed by the OpenSSL Project
8552  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8553  *
8554  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8555  *    endorse or promote products derived from this software without
8556  *    prior written permission. For written permission, please contact
8557  *    openssl-core@openssl.org.
8558  *
8559  * 5. Products derived from this software may not be called "OpenSSL"
8560  *    nor may "OpenSSL" appear in their names without prior written
8561  *    permission of the OpenSSL Project.
8562  *
8563  * 6. Redistributions of any form whatsoever must retain the following
8564  *    acknowledgment:
8565  *    "This product includes software developed by the OpenSSL Project
8566  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8567  *
8568  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8569  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8570  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8571  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8572  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8573  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8574  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8575  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8576  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8577  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8578  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8579  * OF THE POSSIBILITY OF SUCH DAMAGE.
8580  * ====================================================================
8581  *
8582  * This product includes cryptographic software written by Eric Young
8583  * (eay@cryptsoft.com).  This product includes software written by Tim
8584  * Hudson (tjh@cryptsoft.com).
8585  *
8586  */
8587 
8588 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
8589 /* opensslconf.h */
8590 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
8591 
8592 
8593 
8594 
8595 /* OpenSSL was configured with the following options: */
8596 # 108 "/usr/include/openssl/opensslconf.h" 3 4
8597 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
8598    asks for it.  This is a transient feature that is provided for those
8599    who haven't had the time to do the appropriate changes in their
8600    applications.  */
8601 # 204 "/usr/include/openssl/opensslconf.h" 3 4
8602 /* crypto/opensslconf.h.in */
8603 
8604 /* Generate 80386 code? */
8605 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
8606 # 123 "/usr/include/openssl/crypto.h" 2 3 4
8607 
8608 
8609 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
8610 /*
8611  * CDDL HEADER START
8612  *
8613  * The contents of this file are subject to the terms of the
8614  * Common Development and Distribution License (the "License").
8615  * You may not use this file except in compliance with the License.
8616  *
8617  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8618  * or http://www.opensolaris.org/os/licensing.
8619  * See the License for the specific language governing permissions
8620  * and limitations under the License.
8621  *
8622  * When distributing Covered Code, include this CDDL HEADER in each
8623  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8624  * If applicable, add the following below this CDDL HEADER, with the
8625  * fields enclosed by brackets "[]" replaced with your own identifying
8626  * information: Portions Copyright [yyyy] [name of copyright owner]
8627  *
8628  * CDDL HEADER END
8629  */
8630 
8631 /*
8632  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8633  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
8634  */
8635 
8636 /*	Copyright (c) 1988 AT&T	*/
8637 /*	  All Rights Reserved  	*/
8638 
8639 /*
8640  * User-visible pieces of the ANSI C standard I/O package.
8641  */
8642 # 126 "/usr/include/openssl/crypto.h" 2 3 4
8643 
8644 
8645 # 1 "/usr/include/openssl/stack.h" 1 3 4
8646 /* crypto/stack/stack.h */
8647 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8648  * All rights reserved.
8649  *
8650  * This package is an SSL implementation written
8651  * by Eric Young (eay@cryptsoft.com).
8652  * The implementation was written so as to conform with Netscapes SSL.
8653  *
8654  * This library is free for commercial and non-commercial use as long as
8655  * the following conditions are aheared to.  The following conditions
8656  * apply to all code found in this distribution, be it the RC4, RSA,
8657  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8658  * included with this distribution is covered by the same copyright terms
8659  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8660  *
8661  * Copyright remains Eric Young's, and as such any Copyright notices in
8662  * the code are not to be removed.
8663  * If this package is used in a product, Eric Young should be given attribution
8664  * as the author of the parts of the library used.
8665  * This can be in the form of a textual message at program startup or
8666  * in documentation (online or textual) provided with the package.
8667  *
8668  * Redistribution and use in source and binary forms, with or without
8669  * modification, are permitted provided that the following conditions
8670  * are met:
8671  * 1. Redistributions of source code must retain the copyright
8672  *    notice, this list of conditions and the following disclaimer.
8673  * 2. Redistributions in binary form must reproduce the above copyright
8674  *    notice, this list of conditions and the following disclaimer in the
8675  *    documentation and/or other materials provided with the distribution.
8676  * 3. All advertising materials mentioning features or use of this software
8677  *    must display the following acknowledgement:
8678  *    "This product includes cryptographic software written by
8679  *     Eric Young (eay@cryptsoft.com)"
8680  *    The word 'cryptographic' can be left out if the rouines from the library
8681  *    being used are not cryptographic related :-).
8682  * 4. If you include any Windows specific code (or a derivative thereof) from
8683  *    the apps directory (application code) you must include an acknowledgement:
8684  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8685  *
8686  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8687  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8688  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8689  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8690  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8691  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8692  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8693  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8694  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8695  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8696  * SUCH DAMAGE.
8697  *
8698  * The licence and distribution terms for any publically available version or
8699  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8700  * copied and put under another distribution licence
8701  * [including the GNU Public Licence.]
8702  */
8703 # 66 "/usr/include/openssl/stack.h" 3 4
8704 typedef struct stack_st {
8705     int num;
8706     char **data;
8707     int sorted;
8708     int num_alloc;
8709     int (*comp) (const void *, const void *);
8710 } _STACK; /* Use STACK_OF(...) instead */
8711 
8712 
8713 
8714 
8715 int sk_num(const _STACK *);
8716 void *sk_value(const _STACK *, int);
8717 
8718 void *sk_set(_STACK *, int, void *);
8719 
8720 _STACK *sk_new(int (*cmp) (const void *, const void *));
8721 _STACK *sk_new_null(void);
8722 void sk_free(_STACK *);
8723 void sk_pop_free(_STACK *st, void (*func) (void *));
8724 _STACK *sk_deep_copy(_STACK *, void *(*)(void *), void (*)(void *));
8725 int sk_insert(_STACK *sk, void *data, int where);
8726 void *sk_delete(_STACK *st, int loc);
8727 void *sk_delete_ptr(_STACK *st, void *p);
8728 int sk_find(_STACK *st, void *data);
8729 int sk_find_ex(_STACK *st, void *data);
8730 int sk_push(_STACK *st, void *data);
8731 int sk_unshift(_STACK *st, void *data);
8732 void *sk_shift(_STACK *st);
8733 void *sk_pop(_STACK *st);
8734 void sk_zero(_STACK *st);
8735 int (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *)))
8736  (const void *, const void *);
8737 _STACK *sk_dup(_STACK *st);
8738 void sk_sort(_STACK *st);
8739 int sk_is_sorted(const _STACK *st);
8740 # 129 "/usr/include/openssl/crypto.h" 2 3 4
8741 # 1 "/usr/include/openssl/safestack.h" 1 3 4
8742 /* ====================================================================
8743  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
8744  *
8745  * Redistribution and use in source and binary forms, with or without
8746  * modification, are permitted provided that the following conditions
8747  * are met:
8748  *
8749  * 1. Redistributions of source code must retain the above copyright
8750  *    notice, this list of conditions and the following disclaimer.
8751  *
8752  * 2. Redistributions in binary form must reproduce the above copyright
8753  *    notice, this list of conditions and the following disclaimer in
8754  *    the documentation and/or other materials provided with the
8755  *    distribution.
8756  *
8757  * 3. All advertising materials mentioning features or use of this
8758  *    software must display the following acknowledgment:
8759  *    "This product includes software developed by the OpenSSL Project
8760  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8761  *
8762  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8763  *    endorse or promote products derived from this software without
8764  *    prior written permission. For written permission, please contact
8765  *    openssl-core@openssl.org.
8766  *
8767  * 5. Products derived from this software may not be called "OpenSSL"
8768  *    nor may "OpenSSL" appear in their names without prior written
8769  *    permission of the OpenSSL Project.
8770  *
8771  * 6. Redistributions of any form whatsoever must retain the following
8772  *    acknowledgment:
8773  *    "This product includes software developed by the OpenSSL Project
8774  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8775  *
8776  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8777  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8778  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8779  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8780  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8781  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8782  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8783  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8784  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8785  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8786  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8787  * OF THE POSSIBILITY OF SUCH DAMAGE.
8788  * ====================================================================
8789  *
8790  * This product includes cryptographic software written by Eric Young
8791  * (eay@cryptsoft.com).  This product includes software written by Tim
8792  * Hudson (tjh@cryptsoft.com).
8793  *
8794  */
8795 
8796 
8797 
8798 
8799 # 1 "/usr/include/openssl/stack.h" 1 3 4
8800 /* crypto/stack/stack.h */
8801 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8802  * All rights reserved.
8803  *
8804  * This package is an SSL implementation written
8805  * by Eric Young (eay@cryptsoft.com).
8806  * The implementation was written so as to conform with Netscapes SSL.
8807  *
8808  * This library is free for commercial and non-commercial use as long as
8809  * the following conditions are aheared to.  The following conditions
8810  * apply to all code found in this distribution, be it the RC4, RSA,
8811  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8812  * included with this distribution is covered by the same copyright terms
8813  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8814  *
8815  * Copyright remains Eric Young's, and as such any Copyright notices in
8816  * the code are not to be removed.
8817  * If this package is used in a product, Eric Young should be given attribution
8818  * as the author of the parts of the library used.
8819  * This can be in the form of a textual message at program startup or
8820  * in documentation (online or textual) provided with the package.
8821  *
8822  * Redistribution and use in source and binary forms, with or without
8823  * modification, are permitted provided that the following conditions
8824  * are met:
8825  * 1. Redistributions of source code must retain the copyright
8826  *    notice, this list of conditions and the following disclaimer.
8827  * 2. Redistributions in binary form must reproduce the above copyright
8828  *    notice, this list of conditions and the following disclaimer in the
8829  *    documentation and/or other materials provided with the distribution.
8830  * 3. All advertising materials mentioning features or use of this software
8831  *    must display the following acknowledgement:
8832  *    "This product includes cryptographic software written by
8833  *     Eric Young (eay@cryptsoft.com)"
8834  *    The word 'cryptographic' can be left out if the rouines from the library
8835  *    being used are not cryptographic related :-).
8836  * 4. If you include any Windows specific code (or a derivative thereof) from
8837  *    the apps directory (application code) you must include an acknowledgement:
8838  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8839  *
8840  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8841  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8842  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8843  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8844  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8845  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8846  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8847  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8848  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8849  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8850  * SUCH DAMAGE.
8851  *
8852  * The licence and distribution terms for any publically available version or
8853  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8854  * copied and put under another distribution licence
8855  * [including the GNU Public Licence.]
8856  */
8857 # 59 "/usr/include/openssl/safestack.h" 2 3 4
8858 # 69 "/usr/include/openssl/safestack.h" 3 4
8859 /*
8860  * In C++ we get problems because an explicit cast is needed from (void *) we
8861  * use CHECKED_STACK_OF to ensure the correct type is passed in the macros
8862  * below.
8863  */
8864 # 102 "/usr/include/openssl/safestack.h" 3 4
8865 /* nada (obsolete in new safestack approach)*/
8866 
8867 
8868 /*-
8869  * Strings are special: normally an lhash entry will point to a single
8870  * (somewhat) mutable object. In the case of strings:
8871  *
8872  * a) Instead of a single char, there is an array of chars, NUL-terminated.
8873  * b) The string may have be immutable.
8874  *
8875  * So, they need their own declarations. Especially important for
8876  * type-checking tools, such as Deputy.
8877  *
8878  * In practice, however, it appears to be hard to have a const
8879  * string. For now, I'm settling for dealing with the fact it is a
8880  * string at all.
8881  */
8882 typedef char *OPENSSL_STRING;
8883 
8884 typedef const char *OPENSSL_CSTRING;
8885 
8886 /*
8887  * Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
8888  * STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned
8889  * above, instead of a single char each entry is a NUL-terminated array of
8890  * chars. So, we have to implement STRING specially for STACK_OF. This is
8891  * dealt with in the autogenerated macros below.
8892  */
8893 
8894 struct stack_st_OPENSSL_STRING { _STACK stack; };
8895 
8896 /*
8897  * Similarly, we sometimes use a block of characters, NOT nul-terminated.
8898  * These should also be distinguished from "normal" stacks.
8899  */
8900 typedef void *OPENSSL_BLOCK;
8901 struct stack_st_OPENSSL_BLOCK { _STACK stack; };
8902 
8903 /*
8904  * SKM_sk_... stack macros are internal to safestack.h: never use them
8905  * directly, use sk_<type>_... instead
8906  */
8907 # 211 "/usr/include/openssl/safestack.h" 3 4
8908 /*
8909  * This block of defines is updated by util/mkstack.pl, please do not touch!
8910  */
8911 # 130 "/usr/include/openssl/crypto.h" 2 3 4
8912 # 1 "/usr/include/openssl/opensslv.h" 1 3 4
8913 
8914 
8915 
8916 
8917 
8918 
8919 
8920 /*-
8921  * Numeric release version identifier:
8922  * MNNFFPPS: major minor fix patch status
8923  * The status nibble has one of the values 0 for development, 1 to e for betas
8924  * 1 to 14, and f for release.  The patch level is exactly that.
8925  * For example:
8926  * 0.9.3-dev      0x00903000
8927  * 0.9.3-beta1    0x00903001
8928  * 0.9.3-beta2-dev 0x00903002
8929  * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)
8930  * 0.9.3          0x0090300f
8931  * 0.9.3a         0x0090301f
8932  * 0.9.4          0x0090400f
8933  * 1.2.3z         0x102031af
8934  *
8935  * For continuity reasons (because 0.9.5 is already out, and is coded
8936  * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
8937  * part is slightly different, by setting the highest bit.  This means
8938  * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start
8939  * with 0x0090600S...
8940  *
8941  * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
8942  * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
8943  *  major minor fix final patch/beta)
8944  */
8945 # 41 "/usr/include/openssl/opensslv.h" 3 4
8946 /*-
8947  * The macros below are to be used for shared library (.so, .dll, ...)
8948  * versioning.  That kind of versioning works a bit differently between
8949  * operating systems.  The most usual scheme is to set a major and a minor
8950  * number, and have the runtime loader check that the major number is equal
8951  * to what it was at application link time, while the minor number has to
8952  * be greater or equal to what it was at application link time.  With this
8953  * scheme, the version number is usually part of the file name, like this:
8954  *
8955  *      libcrypto.so.0.9
8956  *
8957  * Some unixen also make a softlink with the major verson number only:
8958  *
8959  *      libcrypto.so.0
8960  *
8961  * On Tru64 and IRIX 6.x it works a little bit differently.  There, the
8962  * shared library version is stored in the file, and is actually a series
8963  * of versions, separated by colons.  The rightmost version present in the
8964  * library when linking an application is stored in the application to be
8965  * matched at run time.  When the application is run, a check is done to
8966  * see if the library version stored in the application matches any of the
8967  * versions in the version string of the library itself.
8968  * This version string can be constructed in any way, depending on what
8969  * kind of matching is desired.  However, to implement the same scheme as
8970  * the one used in the other unixen, all compatible versions, from lowest
8971  * to highest, should be part of the string.  Consecutive builds would
8972  * give the following versions strings:
8973  *
8974  *      3.0
8975  *      3.0:3.1
8976  *      3.0:3.1:3.2
8977  *      4.0
8978  *      4.0:4.1
8979  *
8980  * Notice how version 4 is completely incompatible with version, and
8981  * therefore give the breach you can see.
8982  *
8983  * There may be other schemes as well that I haven't yet discovered.
8984  *
8985  * So, here's the way it works here: first of all, the library version
8986  * number doesn't need at all to match the overall OpenSSL version.
8987  * However, it's nice and more understandable if it actually does.
8988  * The current library version is stored in the macro SHLIB_VERSION_NUMBER,
8989  * which is just a piece of text in the format "M.m.e" (Major, minor, edit).
8990  * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
8991  * we need to keep a history of version numbers, which is done in the
8992  * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and
8993  * should only keep the versions that are binary compatible with the current.
8994  */
8995 # 131 "/usr/include/openssl/crypto.h" 2 3 4
8996 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
8997 /* ====================================================================
8998  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
8999  *
9000  * Redistribution and use in source and binary forms, with or without
9001  * modification, are permitted provided that the following conditions
9002  * are met:
9003  *
9004  * 1. Redistributions of source code must retain the above copyright
9005  *    notice, this list of conditions and the following disclaimer.
9006  *
9007  * 2. Redistributions in binary form must reproduce the above copyright
9008  *    notice, this list of conditions and the following disclaimer in
9009  *    the documentation and/or other materials provided with the
9010  *    distribution.
9011  *
9012  * 3. All advertising materials mentioning features or use of this
9013  *    software must display the following acknowledgment:
9014  *    "This product includes software developed by the OpenSSL Project
9015  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9016  *
9017  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9018  *    endorse or promote products derived from this software without
9019  *    prior written permission. For written permission, please contact
9020  *    openssl-core@openssl.org.
9021  *
9022  * 5. Products derived from this software may not be called "OpenSSL"
9023  *    nor may "OpenSSL" appear in their names without prior written
9024  *    permission of the OpenSSL Project.
9025  *
9026  * 6. Redistributions of any form whatsoever must retain the following
9027  *    acknowledgment:
9028  *    "This product includes software developed by the OpenSSL Project
9029  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9030  *
9031  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9032  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9033  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9034  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9035  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9036  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9037  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9038  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9039  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9040  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9041  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9042  * OF THE POSSIBILITY OF SUCH DAMAGE.
9043  * ====================================================================
9044  *
9045  * This product includes cryptographic software written by Eric Young
9046  * (eay@cryptsoft.com).  This product includes software written by Tim
9047  * Hudson (tjh@cryptsoft.com).
9048  *
9049  */
9050 # 62 "/usr/include/openssl/ossl_typ.h" 3 4
9051 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
9052 /* e_os2.h */
9053 /* ====================================================================
9054  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
9055  *
9056  * Redistribution and use in source and binary forms, with or without
9057  * modification, are permitted provided that the following conditions
9058  * are met:
9059  *
9060  * 1. Redistributions of source code must retain the above copyright
9061  *    notice, this list of conditions and the following disclaimer.
9062  *
9063  * 2. Redistributions in binary form must reproduce the above copyright
9064  *    notice, this list of conditions and the following disclaimer in
9065  *    the documentation and/or other materials provided with the
9066  *    distribution.
9067  *
9068  * 3. All advertising materials mentioning features or use of this
9069  *    software must display the following acknowledgment:
9070  *    "This product includes software developed by the OpenSSL Project
9071  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9072  *
9073  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9074  *    endorse or promote products derived from this software without
9075  *    prior written permission. For written permission, please contact
9076  *    openssl-core@openssl.org.
9077  *
9078  * 5. Products derived from this software may not be called "OpenSSL"
9079  *    nor may "OpenSSL" appear in their names without prior written
9080  *    permission of the OpenSSL Project.
9081  *
9082  * 6. Redistributions of any form whatsoever must retain the following
9083  *    acknowledgment:
9084  *    "This product includes software developed by the OpenSSL Project
9085  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9086  *
9087  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9088  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9089  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9090  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9091  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9092  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9093  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9094  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9095  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9096  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9097  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9098  * OF THE POSSIBILITY OF SUCH DAMAGE.
9099  * ====================================================================
9100  *
9101  * This product includes cryptographic software written by Eric Young
9102  * (eay@cryptsoft.com).  This product includes software written by Tim
9103  * Hudson (tjh@cryptsoft.com).
9104  *
9105  */
9106 
9107 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
9108 /* opensslconf.h */
9109 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
9110 
9111 
9112 
9113 
9114 /* OpenSSL was configured with the following options: */
9115 # 108 "/usr/include/openssl/opensslconf.h" 3 4
9116 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
9117    asks for it.  This is a transient feature that is provided for those
9118    who haven't had the time to do the appropriate changes in their
9119    applications.  */
9120 # 204 "/usr/include/openssl/opensslconf.h" 3 4
9121 /* crypto/opensslconf.h.in */
9122 
9123 /* Generate 80386 code? */
9124 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
9125 # 63 "/usr/include/openssl/ossl_typ.h" 2 3 4
9126 # 83 "/usr/include/openssl/ossl_typ.h" 3 4
9127 typedef struct asn1_string_st ASN1_INTEGER;
9128 typedef struct asn1_string_st ASN1_ENUMERATED;
9129 typedef struct asn1_string_st ASN1_BIT_STRING;
9130 typedef struct asn1_string_st ASN1_OCTET_STRING;
9131 typedef struct asn1_string_st ASN1_PRINTABLESTRING;
9132 typedef struct asn1_string_st ASN1_T61STRING;
9133 typedef struct asn1_string_st ASN1_IA5STRING;
9134 typedef struct asn1_string_st ASN1_GENERALSTRING;
9135 typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
9136 typedef struct asn1_string_st ASN1_BMPSTRING;
9137 typedef struct asn1_string_st ASN1_UTCTIME;
9138 typedef struct asn1_string_st ASN1_TIME;
9139 typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
9140 typedef struct asn1_string_st ASN1_VISIBLESTRING;
9141 typedef struct asn1_string_st ASN1_UTF8STRING;
9142 typedef struct asn1_string_st ASN1_STRING;
9143 typedef int ASN1_BOOLEAN;
9144 typedef int ASN1_NULL;
9145 
9146 
9147 typedef struct asn1_object_st ASN1_OBJECT;
9148 
9149 typedef struct ASN1_ITEM_st ASN1_ITEM;
9150 typedef struct asn1_pctx_st ASN1_PCTX;
9151 # 120 "/usr/include/openssl/ossl_typ.h" 3 4
9152 typedef struct bignum_st BIGNUM;
9153 typedef struct bignum_ctx BN_CTX;
9154 typedef struct bn_blinding_st BN_BLINDING;
9155 typedef struct bn_mont_ctx_st BN_MONT_CTX;
9156 typedef struct bn_recp_ctx_st BN_RECP_CTX;
9157 typedef struct bn_gencb_st BN_GENCB;
9158 
9159 typedef struct buf_mem_st BUF_MEM;
9160 
9161 typedef struct evp_cipher_st EVP_CIPHER;
9162 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
9163 typedef struct env_md_st EVP_MD;
9164 typedef struct env_md_ctx_st EVP_MD_CTX;
9165 typedef struct evp_pkey_st EVP_PKEY;
9166 
9167 typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
9168 
9169 typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
9170 typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
9171 
9172 typedef struct dh_st DH;
9173 typedef struct dh_method DH_METHOD;
9174 
9175 typedef struct dsa_st DSA;
9176 typedef struct dsa_method DSA_METHOD;
9177 
9178 typedef struct rsa_st RSA;
9179 typedef struct rsa_meth_st RSA_METHOD;
9180 
9181 typedef struct rand_meth_st RAND_METHOD;
9182 
9183 typedef struct ecdh_method ECDH_METHOD;
9184 typedef struct ecdsa_method ECDSA_METHOD;
9185 
9186 typedef struct x509_st X509;
9187 typedef struct X509_algor_st X509_ALGOR;
9188 typedef struct X509_crl_st X509_CRL;
9189 typedef struct x509_crl_method_st X509_CRL_METHOD;
9190 typedef struct x509_revoked_st X509_REVOKED;
9191 typedef struct X509_name_st X509_NAME;
9192 typedef struct X509_pubkey_st X509_PUBKEY;
9193 typedef struct x509_store_st X509_STORE;
9194 typedef struct x509_store_ctx_st X509_STORE_CTX;
9195 
9196 typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
9197 
9198 typedef struct v3_ext_ctx X509V3_CTX;
9199 typedef struct conf_st CONF;
9200 
9201 typedef struct store_st STORE;
9202 typedef struct store_method_st STORE_METHOD;
9203 
9204 typedef struct ui_st UI;
9205 typedef struct ui_method_st UI_METHOD;
9206 
9207 typedef struct st_ERR_FNS ERR_FNS;
9208 
9209 typedef struct engine_st ENGINE;
9210 typedef struct ssl_st SSL;
9211 typedef struct ssl_ctx_st SSL_CTX;
9212 
9213 typedef struct comp_method_st COMP_METHOD;
9214 
9215 typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
9216 typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
9217 typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
9218 typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
9219 
9220 typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
9221 typedef struct DIST_POINT_st DIST_POINT;
9222 typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
9223 typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
9224 
9225   /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */
9226 
9227 
9228 
9229 typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
9230 /* Callback types for crypto.h */
9231 typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
9232                            int idx, long argl, void *argp);
9233 typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
9234                              int idx, long argl, void *argp);
9235 typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
9236                            void *from_d, int idx, long argl, void *argp);
9237 
9238 typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
9239 typedef struct ocsp_response_st OCSP_RESPONSE;
9240 typedef struct ocsp_responder_id_st OCSP_RESPID;
9241 # 132 "/usr/include/openssl/crypto.h" 2 3 4
9242 
9243 
9244 
9245 
9246 
9247 /*
9248  * Resolve problems on some operating systems with symbol names that clash
9249  * one way or another
9250  */
9251 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
9252 /* ====================================================================
9253  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
9254  *
9255  * Redistribution and use in source and binary forms, with or without
9256  * modification, are permitted provided that the following conditions
9257  * are met:
9258  *
9259  * 1. Redistributions of source code must retain the above copyright
9260  *    notice, this list of conditions and the following disclaimer.
9261  *
9262  * 2. Redistributions in binary form must reproduce the above copyright
9263  *    notice, this list of conditions and the following disclaimer in
9264  *    the documentation and/or other materials provided with the
9265  *    distribution.
9266  *
9267  * 3. All advertising materials mentioning features or use of this
9268  *    software must display the following acknowledgment:
9269  *    "This product includes software developed by the OpenSSL Project
9270  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9271  *
9272  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9273  *    endorse or promote products derived from this software without
9274  *    prior written permission. For written permission, please contact
9275  *    openssl-core@openssl.org.
9276  *
9277  * 5. Products derived from this software may not be called "OpenSSL"
9278  *    nor may "OpenSSL" appear in their names without prior written
9279  *    permission of the OpenSSL Project.
9280  *
9281  * 6. Redistributions of any form whatsoever must retain the following
9282  *    acknowledgment:
9283  *    "This product includes software developed by the OpenSSL Project
9284  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9285  *
9286  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9287  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9288  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9289  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9290  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9291  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9292  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9293  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9294  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9295  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9296  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9297  * OF THE POSSIBILITY OF SUCH DAMAGE.
9298  * ====================================================================
9299  *
9300  * This product includes cryptographic software written by Eric Young
9301  * (eay@cryptsoft.com).  This product includes software written by Tim
9302  * Hudson (tjh@cryptsoft.com).
9303  *
9304  */
9305 
9306 
9307 
9308 
9309 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
9310 /* e_os2.h */
9311 /* ====================================================================
9312  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
9313  *
9314  * Redistribution and use in source and binary forms, with or without
9315  * modification, are permitted provided that the following conditions
9316  * are met:
9317  *
9318  * 1. Redistributions of source code must retain the above copyright
9319  *    notice, this list of conditions and the following disclaimer.
9320  *
9321  * 2. Redistributions in binary form must reproduce the above copyright
9322  *    notice, this list of conditions and the following disclaimer in
9323  *    the documentation and/or other materials provided with the
9324  *    distribution.
9325  *
9326  * 3. All advertising materials mentioning features or use of this
9327  *    software must display the following acknowledgment:
9328  *    "This product includes software developed by the OpenSSL Project
9329  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9330  *
9331  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9332  *    endorse or promote products derived from this software without
9333  *    prior written permission. For written permission, please contact
9334  *    openssl-core@openssl.org.
9335  *
9336  * 5. Products derived from this software may not be called "OpenSSL"
9337  *    nor may "OpenSSL" appear in their names without prior written
9338  *    permission of the OpenSSL Project.
9339  *
9340  * 6. Redistributions of any form whatsoever must retain the following
9341  *    acknowledgment:
9342  *    "This product includes software developed by the OpenSSL Project
9343  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9344  *
9345  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9346  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9347  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9348  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9349  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9350  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9351  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9352  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9353  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9354  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9355  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9356  * OF THE POSSIBILITY OF SUCH DAMAGE.
9357  * ====================================================================
9358  *
9359  * This product includes cryptographic software written by Eric Young
9360  * (eay@cryptsoft.com).  This product includes software written by Tim
9361  * Hudson (tjh@cryptsoft.com).
9362  *
9363  */
9364 
9365 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
9366 /* opensslconf.h */
9367 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
9368 
9369 
9370 
9371 
9372 /* OpenSSL was configured with the following options: */
9373 # 108 "/usr/include/openssl/opensslconf.h" 3 4
9374 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
9375    asks for it.  This is a transient feature that is provided for those
9376    who haven't had the time to do the appropriate changes in their
9377    applications.  */
9378 # 204 "/usr/include/openssl/opensslconf.h" 3 4
9379 /* crypto/opensslconf.h.in */
9380 
9381 /* Generate 80386 code? */
9382 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
9383 # 59 "/usr/include/openssl/symhacks.h" 2 3 4
9384 
9385 /*
9386  * Hacks to solve the problem with linkers incapable of handling very long
9387  * symbol names.  In the case of VMS, the limit is 31 characters on VMS for
9388  * VAX.
9389  */
9390 /*
9391  * Note that this affects util/libeay.num and util/ssleay.num...  you may
9392  * change those manually, but that's not recommended, as those files are
9393  * controlled centrally and updated on Unix, and the central definition may
9394  * disagree with yours, which in turn may come with shareable library
9395  * incompatibilities.
9396  */
9397 # 481 "/usr/include/openssl/symhacks.h" 3 4
9398 /* Case insensitive linking causes problems.... */
9399 # 142 "/usr/include/openssl/crypto.h" 2 3 4
9400 
9401 
9402 
9403 
9404 
9405 /* Backward compatibility to SSLeay */
9406 /*
9407  * This is more to be used to check the correct DLL is being used in the MS
9408  * world.
9409  */
9410 
9411 
9412 /* #define SSLEAY_OPTIONS       1 no longer supported */
9413 
9414 
9415 
9416 
9417 
9418 /* Already declared in ossl_typ.h */
9419 # 174 "/usr/include/openssl/crypto.h" 3 4
9420 /* A generic structure to pass assorted data in a expandable way */
9421 typedef struct openssl_item_st {
9422     int code;
9423     void *value; /* Not used for flag attributes */
9424     size_t value_size; /* Max size of value for output, length for
9425                                  * input */
9426     size_t *value_length; /* Returned length of value for output */
9427 } OPENSSL_ITEM;
9428 
9429 /*
9430  * When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
9431  * names in cryptlib.c
9432  */
9433 # 256 "/usr/include/openssl/crypto.h" 3 4
9434 /*
9435  * Some applications as well as some parts of OpenSSL need to allocate and
9436  * deallocate locks in a dynamic fashion.  The following typedef makes this
9437  * possible in a type-safe manner.
9438  */
9439 /* struct CRYPTO_dynlock_value has to be defined by the application. */
9440 typedef struct {
9441     int references;
9442     struct CRYPTO_dynlock_value *data;
9443 } CRYPTO_dynlock;
9444 
9445 /*
9446  * The following can be used to detect memory leaks in the SSLeay library. It
9447  * used, it turns on malloc checking
9448  */
9449 
9450 
9451 
9452 
9453 
9454 
9455 /*
9456  * The following are bit values to turn on or off options connected to the
9457  * malloc checking functionality
9458  */
9459 
9460 /* Adds time to the memory checking information */
9461 
9462 /* Adds thread number to the memory checking information */
9463 
9464 
9465 
9466 
9467 /* predec of the BIO type */
9468 typedef struct bio_st BIO_dummy;
9469 
9470 struct crypto_ex_data_st {
9471     struct stack_st_void *sk;
9472     /* gcc is screwing up this data structure :-( */
9473     int dummy;
9474 };
9475 struct stack_st_void { _STACK stack; };
9476 
9477 /*
9478  * This stuff is basically class callback functions The current classes are
9479  * SSL_CTX, SSL, SSL_SESSION, and a few more
9480  */
9481 
9482 typedef struct crypto_ex_data_func_st {
9483     long argl; /* Arbitary long */
9484     void *argp; /* Arbitary void * */
9485     CRYPTO_EX_new *new_func;
9486     CRYPTO_EX_free *free_func;
9487     CRYPTO_EX_dup *dup_func;
9488 } CRYPTO_EX_DATA_FUNCS;
9489 
9490 struct stack_st_CRYPTO_EX_DATA_FUNCS { _STACK stack; };
9491 
9492 /*
9493  * Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA
9494  * entry.
9495  */
9496 # 336 "/usr/include/openssl/crypto.h" 3 4
9497 /*
9498  * Dynamically assigned indexes start from this value (don't use directly,
9499  * use via CRYPTO_ex_data_new_class).
9500  */
9501 
9502 
9503 /*
9504  * This is the default callbacks, but we can have others as well: this is
9505  * needed in Win32 where the application malloc and the library malloc may
9506  * not be the same.
9507  */
9508 # 356 "/usr/include/openssl/crypto.h" 3 4
9509 /*
9510  * Set standard debugging functions (not done by default unless CRYPTO_MDEBUG
9511  * is defined)
9512  */
9513 # 369 "/usr/include/openssl/crypto.h" 3 4
9514 int CRYPTO_mem_ctrl(int mode);
9515 int CRYPTO_is_mem_check_on(void);
9516 
9517 /* for applications */
9518 
9519 
9520 
9521 /* for library-internal use */
9522 # 396 "/usr/include/openssl/crypto.h" 3 4
9523 const char *SSLeay_version(int type);
9524 unsigned long SSLeay(void);
9525 
9526 int OPENSSL_issetugid(void);
9527 
9528 /* An opaque type representing an implementation of "ex_data" support */
9529 typedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL;
9530 /* Return an opaque pointer to the current "ex_data" implementation */
9531 const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void);
9532 /* Sets the "ex_data" implementation to be used (if it's not too late) */
9533 int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i);
9534 /* Get a new "ex_data" class, and return the corresponding "class_index" */
9535 int CRYPTO_ex_data_new_class(void);
9536 /* Within a given class, get/register a new index */
9537 int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
9538                             CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
9539                             CRYPTO_EX_free *free_func);
9540 /*
9541  * Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a
9542  * given class (invokes whatever per-class callbacks are applicable)
9543  */
9544 int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
9545 int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
9546                        CRYPTO_EX_DATA *from);
9547 void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
9548 /*
9549  * Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular
9550  * index (relative to the class type involved)
9551  */
9552 int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
9553 void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
9554 /*
9555  * This function cleans up all "ex_data" state. It mustn't be called under
9556  * potential race-conditions.
9557  */
9558 void CRYPTO_cleanup_all_ex_data(void);
9559 
9560 int CRYPTO_get_new_lockid(char *name);
9561 
9562 int CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */
9563 void CRYPTO_lock(int mode, int type, const char *file, int line);
9564 void CRYPTO_set_locking_callback(void (*func) (int mode, int type,
9565                                                const char *file, int line));
9566 void (*CRYPTO_get_locking_callback(void)) (int mode, int type,
9567                                            const char *file, int line);
9568 void CRYPTO_set_add_lock_callback(int (*func)
9569                                    (int *num, int mount, int type,
9570                                     const char *file, int line));
9571 int (*CRYPTO_get_add_lock_callback(void)) (int *num, int mount, int type,
9572                                            const char *file, int line);
9573 
9574 /* Don't use this structure directly. */
9575 typedef struct crypto_threadid_st {
9576     void *ptr;
9577     unsigned long val;
9578 } CRYPTO_THREADID;
9579 /* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
9580 void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val);
9581 void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr);
9582 int CRYPTO_THREADID_set_callback(void (*threadid_func) (CRYPTO_THREADID *));
9583 void (*CRYPTO_THREADID_get_callback(void)) (CRYPTO_THREADID *);
9584 void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
9585 int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
9586 void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
9587 unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
9588 
9589 void CRYPTO_set_id_callback(unsigned long (*func) (void));
9590 unsigned long (*CRYPTO_get_id_callback(void)) (void);
9591 unsigned long CRYPTO_thread_id(void);
9592 
9593 
9594 const char *CRYPTO_get_lock_name(int type);
9595 int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
9596                     int line);
9597 
9598 int CRYPTO_get_new_dynlockid(void);
9599 void CRYPTO_destroy_dynlockid(int i);
9600 struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
9601 void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value
9602                                         *(*dyn_create_function) (const char
9603                                                                  *file,
9604                                                                  int line));
9605 void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)
9606                                        (int mode,
9607                                         struct CRYPTO_dynlock_value *l,
9608                                         const char *file, int line));
9609 void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)
9610                                           (struct CRYPTO_dynlock_value *l,
9611                                            const char *file, int line));
9612 struct CRYPTO_dynlock_value
9613 *(*CRYPTO_get_dynlock_create_callback(void)) (const char *file, int line);
9614 void (*CRYPTO_get_dynlock_lock_callback(void)) (int mode,
9615                                                 struct CRYPTO_dynlock_value
9616                                                 *l, const char *file,
9617                                                 int line);
9618 void (*CRYPTO_get_dynlock_destroy_callback(void)) (struct CRYPTO_dynlock_value
9619                                                    *l, const char *file,
9620                                                    int line);
9621 
9622 /*
9623  * CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- call
9624  * the latter last if you need different functions
9625  */
9626 int CRYPTO_set_mem_functions(void *(*m) (size_t), void *(*r) (void *, size_t),
9627                              void (*f) (void *));
9628 int CRYPTO_set_locked_mem_functions(void *(*m) (size_t),
9629                                     void (*free_func) (void *));
9630 int CRYPTO_set_mem_ex_functions(void *(*m) (size_t, const char *, int),
9631                                 void *(*r) (void *, size_t, const char *,
9632                                             int), void (*f) (void *));
9633 int CRYPTO_set_locked_mem_ex_functions(void *(*m) (size_t, const char *, int),
9634                                        void (*free_func) (void *));
9635 int CRYPTO_set_mem_debug_functions(void (*m)
9636                                     (void *, int, const char *, int, int),
9637                                    void (*r) (void *, void *, int,
9638                                               const char *, int, int),
9639                                    void (*f) (void *, int), void (*so) (long),
9640                                    long (*go) (void));
9641 void CRYPTO_get_mem_functions(void *(**m) (size_t),
9642                               void *(**r) (void *, size_t),
9643                               void (**f) (void *));
9644 void CRYPTO_get_locked_mem_functions(void *(**m) (size_t),
9645                                      void (**f) (void *));
9646 void CRYPTO_get_mem_ex_functions(void *(**m) (size_t, const char *, int),
9647                                  void *(**r) (void *, size_t, const char *,
9648                                               int), void (**f) (void *));
9649 void CRYPTO_get_locked_mem_ex_functions(void
9650                                         *(**m) (size_t, const char *, int),
9651                                         void (**f) (void *));
9652 void CRYPTO_get_mem_debug_functions(void (**m)
9653                                      (void *, int, const char *, int, int),
9654                                     void (**r) (void *, void *, int,
9655                                                 const char *, int, int),
9656                                     void (**f) (void *, int),
9657                                     void (**so) (long), long (**go) (void));
9658 
9659 void *CRYPTO_malloc_locked(int num, const char *file, int line);
9660 void CRYPTO_free_locked(void *ptr);
9661 void *CRYPTO_malloc(int num, const char *file, int line);
9662 char *CRYPTO_strdup(const char *str, const char *file, int line);
9663 void CRYPTO_free(void *ptr);
9664 void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
9665 void *CRYPTO_realloc_clean(void *addr, int old_num, int num, const char *file,
9666                            int line);
9667 void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
9668 
9669 void OPENSSL_cleanse(void *ptr, size_t len);
9670 
9671 void CRYPTO_set_mem_debug_options(long bits);
9672 long CRYPTO_get_mem_debug_options(void);
9673 
9674 
9675 
9676 int CRYPTO_push_info_(const char *info, const char *file, int line);
9677 int CRYPTO_pop_info(void);
9678 int CRYPTO_remove_all_info(void);
9679 
9680 /*
9681  * Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro;
9682  * used as default in CRYPTO_MDEBUG compilations):
9683  */
9684 /*-
9685  * The last argument has the following significance:
9686  *
9687  * 0:   called before the actual memory allocation has taken place
9688  * 1:   called after the actual memory allocation has taken place
9689  */
9690 void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,
9691                        int before_p);
9692 void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, const char *file,
9693                         int line, int before_p);
9694 void CRYPTO_dbg_free(void *addr, int before_p);
9695 /*-
9696  * Tell the debugging code about options.  By default, the following values
9697  * apply:
9698  *
9699  * 0:                           Clear all options.
9700  * V_CRYPTO_MDEBUG_TIME (1):    Set the "Show Time" option.
9701  * V_CRYPTO_MDEBUG_THREAD (2):  Set the "Show Thread Number" option.
9702  * V_CRYPTO_MDEBUG_ALL (3):     1 + 2
9703  */
9704 void CRYPTO_dbg_set_options(long bits);
9705 long CRYPTO_dbg_get_options(void);
9706 
9707 
9708 void CRYPTO_mem_leaks_fp(FILE *);
9709 
9710 void CRYPTO_mem_leaks(struct bio_st *bio);
9711 /* unsigned long order, char *file, int line, int num_bytes, char *addr */
9712 typedef void *CRYPTO_MEM_LEAK_CB (unsigned long, const char *, int, int,
9713                                   void *);
9714 void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
9715 
9716 /* die if we have to */
9717 void OpenSSLDie(const char *file, int line, const char *assertion);
9718 
9719 
9720 unsigned long *OPENSSL_ia32cap_loc(void);
9721 
9722 int OPENSSL_isservice(void);
9723 
9724 int FIPS_mode(void);
9725 int FIPS_mode_set(int r);
9726 
9727 void OPENSSL_init(void);
9728 # 624 "/usr/include/openssl/crypto.h" 3 4
9729 /*
9730  * CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.
9731  * It takes an amount of time dependent on |len|, but independent of the
9732  * contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements
9733  * into a defined order as the return value when a != b is undefined, other
9734  * than to be non-zero.
9735  */
9736 int CRYPTO_memcmp(const volatile void *a, const volatile void *b, size_t len);
9737 
9738 /* BEGIN ERROR CODES */
9739 /*
9740  * The following lines are auto generated by the script mkerr.pl. Any changes
9741  * made after this point may be overwritten when the script is next run.
9742  */
9743 void ERR_load_CRYPTO_strings(void);
9744 
9745 /* Error codes for the CRYPTO functions. */
9746 
9747 /* Function codes. */
9748 # 654 "/usr/include/openssl/crypto.h" 3 4
9749 /* Reason codes. */
9750 # 70 "/usr/include/openssl/bio.h" 2 3 4
9751 # 83 "/usr/include/openssl/bio.h" 3 4
9752 /* These are the 'types' of BIOs */
9753 # 116 "/usr/include/openssl/bio.h" 3 4
9754 /*
9755  * BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
9756  * BIO_set_fp(in,stdin,BIO_NOCLOSE);
9757  */
9758 
9759 
9760 
9761 /*
9762  * These are used in the following macros and are passed to BIO_ctrl()
9763  */
9764 # 139 "/usr/include/openssl/bio.h" 3 4
9765 /* callback is int cb(BIO *bio,state,ret); */
9766 
9767 
9768 
9769 
9770 
9771 /* dgram BIO stuff */
9772 # 157 "/usr/include/openssl/bio.h" 3 4
9773 /* #ifdef IP_MTU_DISCOVER */
9774 
9775 /* #endif */
9776 # 196 "/usr/include/openssl/bio.h" 3 4
9777 /* modifiers */
9778 # 208 "/usr/include/openssl/bio.h" 3 4
9779 /*
9780  * "UPLINK" flag denotes file descriptors provided by application. It
9781  * defaults to 0, as most platforms don't require UPLINK interface.
9782  */
9783 
9784 
9785 
9786 /* Used in BIO_gethostbyname() */
9787 
9788 
9789 
9790 
9791 
9792 
9793 /* Mostly used in the SSL BIO */
9794 /*-
9795  * Not used anymore
9796  * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10
9797  * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20
9798  * #define BIO_FLAGS_PROTOCOL_STARTUP   0x40
9799  */
9800 
9801 
9802 
9803 /*
9804  * This is used with memory BIOs: it means we shouldn't free up or change the
9805  * data in any way.
9806  */
9807 
9808 
9809 typedef struct bio_st BIO;
9810 
9811 void BIO_set_flags(BIO *b, int flags);
9812 int BIO_test_flags(const BIO *b, int flags);
9813 void BIO_clear_flags(BIO *b, int flags);
9814 # 252 "/usr/include/openssl/bio.h" 3 4
9815 /* These are normally used internally in BIOs */
9816 
9817 
9818 
9819 
9820 
9821 /* These should be used by the application to tell why we should retry */
9822 
9823 
9824 
9825 
9826 
9827 
9828 /*
9829  * The next three are used in conjunction with the BIO_should_io_special()
9830  * condition.  After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
9831  * *reason); will walk the BIO stack and return the 'reason' for the special
9832  * and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
9833  * the code.
9834  */
9835 /*
9836  * Returned from the SSL bio when the certificate retrieval code had an error
9837  */
9838 
9839 /* Returned from the connect BIO when a connect would have blocked */
9840 
9841 /* Returned from the accept BIO when an accept would have blocked */
9842 
9843 
9844 /* These are passed by the BIO callback */
9845 
9846 
9847 
9848 
9849 
9850 
9851 
9852 /*
9853  * The callback is called before and after the underling operation, The
9854  * BIO_CB_RETURN flag indicates if it is after the call
9855  */
9856 
9857 
9858 
9859 
9860 
9861 long (*BIO_get_callback(const BIO *b)) (struct bio_st *, int, const char *,
9862                                         int, long, long);
9863 void BIO_set_callback(BIO *b,
9864                       long (*callback) (struct bio_st *, int, const char *,
9865                                         int, long, long));
9866 char *BIO_get_callback_arg(const BIO *b);
9867 void BIO_set_callback_arg(BIO *b, char *arg);
9868 
9869 const char *BIO_method_name(const BIO *b);
9870 int BIO_method_type(const BIO *b);
9871 
9872 typedef void bio_info_cb (struct bio_st *, int, const char *, int, long,
9873                           long);
9874 
9875 typedef struct bio_method_st {
9876     int type;
9877     const char *name;
9878     int (*bwrite) (BIO *, const char *, int);
9879     int (*bread) (BIO *, char *, int);
9880     int (*bputs) (BIO *, const char *);
9881     int (*bgets) (BIO *, char *, int);
9882     long (*ctrl) (BIO *, int, long, void *);
9883     int (*create) (BIO *);
9884     int (*destroy) (BIO *);
9885     long (*callback_ctrl) (BIO *, int, bio_info_cb *);
9886 } BIO_METHOD;
9887 
9888 struct bio_st {
9889     BIO_METHOD *method;
9890     /* bio, mode, argp, argi, argl, ret */
9891     long (*callback) (struct bio_st *, int, const char *, int, long, long);
9892     char *cb_arg; /* first argument for the callback */
9893     int init;
9894     int shutdown;
9895     int flags; /* extra storage */
9896     int retry_reason;
9897     int num;
9898     void *ptr;
9899     struct bio_st *next_bio; /* used by filter BIOs */
9900     struct bio_st *prev_bio; /* used by filter BIOs */
9901     int references;
9902     unsigned long num_read;
9903     unsigned long num_write;
9904     CRYPTO_EX_DATA ex_data;
9905 };
9906 
9907 struct stack_st_BIO { _STACK stack; };
9908 
9909 typedef struct bio_f_buffer_ctx_struct {
9910     /*-
9911      * Buffers are setup like this:
9912      *
9913      * <---------------------- size ----------------------->
9914      * +---------------------------------------------------+
9915      * | consumed | remaining          | free space        |
9916      * +---------------------------------------------------+
9917      * <-- off --><------- len ------->
9918      */
9919     /*- BIO *bio; *//*
9920      * this is now in the BIO struct
9921      */
9922     int ibuf_size; /* how big is the input buffer */
9923     int obuf_size; /* how big is the output buffer */
9924     char *ibuf; /* the char array */
9925     int ibuf_len; /* how many bytes are in it */
9926     int ibuf_off; /* write/read offset */
9927     char *obuf; /* the char array */
9928     int obuf_len; /* how many bytes are in it */
9929     int obuf_off; /* write/read offset */
9930 } BIO_F_BUFFER_CTX;
9931 
9932 /* Prefix and suffix callback in ASN1 BIO */
9933 typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
9934                           void *parg);
9935 # 398 "/usr/include/openssl/bio.h" 3 4
9936 /* connect BIO stuff */
9937 # 407 "/usr/include/openssl/bio.h" 3 4
9938 /*
9939  * #define BIO_CONN_get_param_hostname BIO_ctrl
9940  */
9941 # 474 "/usr/include/openssl/bio.h" 3 4
9942 /* BIO_s_connect() and BIO_s_socks4a_connect() */
9943 # 486 "/usr/include/openssl/bio.h" 3 4
9944 /* BIO_s_accept() */
9945 
9946 
9947 /* #define BIO_set_nbio(b,n)    BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
9948 # 499 "/usr/include/openssl/bio.h" 3 4
9949 /* BIO_s_accept() and BIO_s_connect() */
9950 
9951 
9952 
9953 
9954 /* BIO_s_proxy_client() */
9955 
9956 
9957 /* BIO_set_nbio(b,n) */
9958 
9959 /* BIO *BIO_get_filter_bio(BIO *bio); */
9960 # 519 "/usr/include/openssl/bio.h" 3 4
9961 /* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
9962 
9963 
9964 
9965 /* BIO_s_file() */
9966 
9967 
9968 
9969 /* BIO_s_fd() and BIO_s_file() */
9970 
9971 
9972 
9973 /*
9974  * name is cast to lose const, but might be better to route through a
9975  * function so we can do it safely
9976  */
9977 # 552 "/usr/include/openssl/bio.h" 3 4
9978 /*
9979  * WARNING WARNING, this ups the reference count on the read bio of the SSL
9980  * structure.  This is because the ssl read BIO is now pointed to by the
9981  * next_bio field in the bio.  So when you free the BIO, make sure you are
9982  * doing a BIO_free_all() to catch the underlying BIO.
9983  */
9984 # 568 "/usr/include/openssl/bio.h" 3 4
9985 /* defined in evp.h */
9986 /* #define BIO_set_md(b,md)     BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */
9987 
9988 
9989 
9990 
9991 
9992 
9993 
9994 /* For the BIO_f_buffer() type */
9995 
9996 
9997 
9998 
9999 
10000 
10001 /* Don't use the next one unless you know what you are doing :-) */
10002 # 593 "/usr/include/openssl/bio.h" 3 4
10003 /* ...pending macros have inappropriate return type */
10004 size_t BIO_ctrl_pending(BIO *b);
10005 size_t BIO_ctrl_wpending(BIO *b);
10006 
10007 
10008 
10009 
10010 
10011 /* For the BIO_f_buffer() type */
10012 
10013 
10014 /* For BIO_s_bio() */
10015 
10016 
10017 
10018 
10019 
10020 /* macros with inappropriate type -- but ...pending macros use int too: */
10021 
10022 
10023 size_t BIO_ctrl_get_write_guarantee(BIO *b);
10024 size_t BIO_ctrl_get_read_request(BIO *b);
10025 int BIO_ctrl_reset_read_request(BIO *b);
10026 
10027 /* ctrl macros for dgram */
10028 # 633 "/usr/include/openssl/bio.h" 3 4
10029 /* These two aren't currently implemented */
10030 /* int BIO_get_ex_num(BIO *bio); */
10031 /* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */
10032 int BIO_set_ex_data(BIO *bio, int idx, void *data);
10033 void *BIO_get_ex_data(BIO *bio, int idx);
10034 int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
10035                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
10036 unsigned long BIO_number_read(BIO *bio);
10037 unsigned long BIO_number_written(BIO *bio);
10038 
10039 /* For BIO_f_asn1() */
10040 int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
10041                         asn1_ps_func *prefix_free);
10042 int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
10043                         asn1_ps_func **pprefix_free);
10044 int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
10045                         asn1_ps_func *suffix_free);
10046 int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
10047                         asn1_ps_func **psuffix_free);
10048 
10049 
10050 BIO_METHOD *BIO_s_file(void);
10051 BIO *BIO_new_file(const char *filename, const char *mode);
10052 BIO *BIO_new_fp(FILE *stream, int close_flag);
10053 
10054 
10055 BIO *BIO_new(BIO_METHOD *type);
10056 int BIO_set(BIO *a, BIO_METHOD *type);
10057 int BIO_free(BIO *a);
10058 void BIO_vfree(BIO *a);
10059 int BIO_read(BIO *b, void *data, int len);
10060 int BIO_gets(BIO *bp, char *buf, int size);
10061 int BIO_write(BIO *b, const void *data, int len);
10062 int BIO_puts(BIO *bp, const char *buf);
10063 int BIO_indent(BIO *b, int indent, int max);
10064 long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
10065 long BIO_callback_ctrl(BIO *b, int cmd,
10066                        void (*fp) (struct bio_st *, int, const char *, int,
10067                                    long, long));
10068 char *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
10069 long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
10070 BIO *BIO_push(BIO *b, BIO *append);
10071 BIO *BIO_pop(BIO *b);
10072 void BIO_free_all(BIO *a);
10073 BIO *BIO_find_type(BIO *b, int bio_type);
10074 BIO *BIO_next(BIO *b);
10075 BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
10076 int BIO_get_retry_reason(BIO *bio);
10077 BIO *BIO_dup_chain(BIO *in);
10078 
10079 int BIO_nread0(BIO *bio, char **buf);
10080 int BIO_nread(BIO *bio, char **buf, int num);
10081 int BIO_nwrite0(BIO *bio, char **buf);
10082 int BIO_nwrite(BIO *bio, char **buf, int num);
10083 
10084 long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
10085                         long argl, long ret);
10086 
10087 BIO_METHOD *BIO_s_mem(void);
10088 BIO *BIO_new_mem_buf(const void *buf, int len);
10089 BIO_METHOD *BIO_s_socket(void);
10090 BIO_METHOD *BIO_s_connect(void);
10091 BIO_METHOD *BIO_s_accept(void);
10092 BIO_METHOD *BIO_s_fd(void);
10093 
10094 BIO_METHOD *BIO_s_log(void);
10095 
10096 BIO_METHOD *BIO_s_bio(void);
10097 BIO_METHOD *BIO_s_null(void);
10098 BIO_METHOD *BIO_f_null(void);
10099 BIO_METHOD *BIO_f_buffer(void);
10100 
10101 
10102 
10103 BIO_METHOD *BIO_f_nbio_test(void);
10104 
10105 BIO_METHOD *BIO_s_datagram(void);
10106 
10107 
10108 
10109 
10110 
10111 /* BIO_METHOD *BIO_f_ber(void); */
10112 
10113 int BIO_sock_should_retry(int i);
10114 int BIO_sock_non_fatal_error(int error);
10115 int BIO_dgram_non_fatal_error(int error);
10116 
10117 int BIO_fd_should_retry(int i);
10118 int BIO_fd_non_fatal_error(int error);
10119 int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
10120                 void *u, const char *s, int len);
10121 int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
10122                        void *u, const char *s, int len, int indent);
10123 int BIO_dump(BIO *b, const char *bytes, int len);
10124 int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent);
10125 
10126 int BIO_dump_fp(FILE *fp, const char *s, int len);
10127 int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
10128 
10129 int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data,
10130                    int datalen);
10131 
10132 struct hostent *BIO_gethostbyname(const char *name);
10133 /*-
10134  * We might want a thread-safe interface too:
10135  * struct hostent *BIO_gethostbyname_r(const char *name,
10136  *     struct hostent *result, void *buffer, size_t buflen);
10137  * or something similar (caller allocates a struct hostent,
10138  * pointed to by "result", and additional buffer space for the various
10139  * substructures; if the buffer does not suffice, NULL is returned
10140  * and an appropriate error code is set).
10141  */
10142 int BIO_sock_error(int sock);
10143 int BIO_socket_ioctl(int fd, long type, void *arg);
10144 int BIO_socket_nbio(int fd, int mode);
10145 int BIO_get_port(const char *str, unsigned short *port_ptr);
10146 int BIO_get_host_ip(const char *str, unsigned char *ip);
10147 int BIO_get_accept_socket(char *host_port, int mode);
10148 int BIO_accept(int sock, char **ip_port);
10149 int BIO_sock_init(void);
10150 void BIO_sock_cleanup(void);
10151 int BIO_set_tcp_ndelay(int sock, int turn_on);
10152 
10153 BIO *BIO_new_socket(int sock, int close_flag);
10154 BIO *BIO_new_dgram(int fd, int close_flag);
10155 # 771 "/usr/include/openssl/bio.h" 3 4
10156 BIO *BIO_new_fd(int fd, int close_flag);
10157 BIO *BIO_new_connect(const char *host_port);
10158 BIO *BIO_new_accept(const char *host_port);
10159 
10160 int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
10161                      BIO **bio2, size_t writebuf2);
10162 /*
10163  * If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
10164  * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
10165  * value.
10166  */
10167 
10168 void BIO_copy_next_retry(BIO *b);
10169 
10170 /*
10171  * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
10172  */
10173 
10174 
10175 
10176 
10177 
10178 
10179 int BIO_printf(BIO *bio, const char *format, ...)
10180 __attribute__((__format__(__printf__, 2, 3)));
10181 int BIO_vprintf(BIO *bio, const char *format, va_list args)
10182 __attribute__((__format__(__printf__, 2, 0)));
10183 int BIO_snprintf(char *buf, size_t n, const char *format, ...)
10184 __attribute__((__format__(__printf__, 3, 4)));
10185 int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
10186 __attribute__((__format__(__printf__, 3, 0)));
10187 
10188 
10189 /* BEGIN ERROR CODES */
10190 /*
10191  * The following lines are auto generated by the script mkerr.pl. Any changes
10192  * made after this point may be overwritten when the script is next run.
10193  */
10194 void ERR_load_BIO_strings(void);
10195 
10196 /* Error codes for the BIO functions. */
10197 
10198 /* Function codes. */
10199 # 849 "/usr/include/openssl/bio.h" 3 4
10200 /* Reason codes. */
10201 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
10202 # 1 "/usr/include/openssl/x509.h" 1 3 4
10203 /* crypto/x509/x509.h */
10204 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10205  * All rights reserved.
10206  *
10207  * This package is an SSL implementation written
10208  * by Eric Young (eay@cryptsoft.com).
10209  * The implementation was written so as to conform with Netscapes SSL.
10210  *
10211  * This library is free for commercial and non-commercial use as long as
10212  * the following conditions are aheared to.  The following conditions
10213  * apply to all code found in this distribution, be it the RC4, RSA,
10214  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10215  * included with this distribution is covered by the same copyright terms
10216  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10217  *
10218  * Copyright remains Eric Young's, and as such any Copyright notices in
10219  * the code are not to be removed.
10220  * If this package is used in a product, Eric Young should be given attribution
10221  * as the author of the parts of the library used.
10222  * This can be in the form of a textual message at program startup or
10223  * in documentation (online or textual) provided with the package.
10224  *
10225  * Redistribution and use in source and binary forms, with or without
10226  * modification, are permitted provided that the following conditions
10227  * are met:
10228  * 1. Redistributions of source code must retain the copyright
10229  *    notice, this list of conditions and the following disclaimer.
10230  * 2. Redistributions in binary form must reproduce the above copyright
10231  *    notice, this list of conditions and the following disclaimer in the
10232  *    documentation and/or other materials provided with the distribution.
10233  * 3. All advertising materials mentioning features or use of this software
10234  *    must display the following acknowledgement:
10235  *    "This product includes cryptographic software written by
10236  *     Eric Young (eay@cryptsoft.com)"
10237  *    The word 'cryptographic' can be left out if the rouines from the library
10238  *    being used are not cryptographic related :-).
10239  * 4. If you include any Windows specific code (or a derivative thereof) from
10240  *    the apps directory (application code) you must include an acknowledgement:
10241  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10242  *
10243  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10244  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10245  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10246  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10247  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10248  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10249  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10250  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10251  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10252  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10253  * SUCH DAMAGE.
10254  *
10255  * The licence and distribution terms for any publically available version or
10256  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10257  * copied and put under another distribution licence
10258  * [including the GNU Public Licence.]
10259  */
10260 /* ====================================================================
10261  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
10262  * ECDH support in OpenSSL originally developed by
10263  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
10264  */
10265 
10266 
10267 
10268 
10269 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
10270 /* e_os2.h */
10271 /* ====================================================================
10272  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
10273  *
10274  * Redistribution and use in source and binary forms, with or without
10275  * modification, are permitted provided that the following conditions
10276  * are met:
10277  *
10278  * 1. Redistributions of source code must retain the above copyright
10279  *    notice, this list of conditions and the following disclaimer.
10280  *
10281  * 2. Redistributions in binary form must reproduce the above copyright
10282  *    notice, this list of conditions and the following disclaimer in
10283  *    the documentation and/or other materials provided with the
10284  *    distribution.
10285  *
10286  * 3. All advertising materials mentioning features or use of this
10287  *    software must display the following acknowledgment:
10288  *    "This product includes software developed by the OpenSSL Project
10289  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10290  *
10291  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10292  *    endorse or promote products derived from this software without
10293  *    prior written permission. For written permission, please contact
10294  *    openssl-core@openssl.org.
10295  *
10296  * 5. Products derived from this software may not be called "OpenSSL"
10297  *    nor may "OpenSSL" appear in their names without prior written
10298  *    permission of the OpenSSL Project.
10299  *
10300  * 6. Redistributions of any form whatsoever must retain the following
10301  *    acknowledgment:
10302  *    "This product includes software developed by the OpenSSL Project
10303  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10304  *
10305  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10306  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10307  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10308  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10309  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10310  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10311  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10312  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10313  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10314  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10315  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10316  * OF THE POSSIBILITY OF SUCH DAMAGE.
10317  * ====================================================================
10318  *
10319  * This product includes cryptographic software written by Eric Young
10320  * (eay@cryptsoft.com).  This product includes software written by Tim
10321  * Hudson (tjh@cryptsoft.com).
10322  *
10323  */
10324 
10325 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
10326 /* opensslconf.h */
10327 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
10328 
10329 
10330 
10331 
10332 /* OpenSSL was configured with the following options: */
10333 # 108 "/usr/include/openssl/opensslconf.h" 3 4
10334 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
10335    asks for it.  This is a transient feature that is provided for those
10336    who haven't had the time to do the appropriate changes in their
10337    applications.  */
10338 # 204 "/usr/include/openssl/opensslconf.h" 3 4
10339 /* crypto/opensslconf.h.in */
10340 
10341 /* Generate 80386 code? */
10342 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
10343 # 68 "/usr/include/openssl/x509.h" 2 3 4
10344 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
10345 /* ====================================================================
10346  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
10347  *
10348  * Redistribution and use in source and binary forms, with or without
10349  * modification, are permitted provided that the following conditions
10350  * are met:
10351  *
10352  * 1. Redistributions of source code must retain the above copyright
10353  *    notice, this list of conditions and the following disclaimer.
10354  *
10355  * 2. Redistributions in binary form must reproduce the above copyright
10356  *    notice, this list of conditions and the following disclaimer in
10357  *    the documentation and/or other materials provided with the
10358  *    distribution.
10359  *
10360  * 3. All advertising materials mentioning features or use of this
10361  *    software must display the following acknowledgment:
10362  *    "This product includes software developed by the OpenSSL Project
10363  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10364  *
10365  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10366  *    endorse or promote products derived from this software without
10367  *    prior written permission. For written permission, please contact
10368  *    openssl-core@openssl.org.
10369  *
10370  * 5. Products derived from this software may not be called "OpenSSL"
10371  *    nor may "OpenSSL" appear in their names without prior written
10372  *    permission of the OpenSSL Project.
10373  *
10374  * 6. Redistributions of any form whatsoever must retain the following
10375  *    acknowledgment:
10376  *    "This product includes software developed by the OpenSSL Project
10377  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10378  *
10379  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10380  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10381  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10382  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10383  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10384  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10385  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10386  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10387  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10388  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10389  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10390  * OF THE POSSIBILITY OF SUCH DAMAGE.
10391  * ====================================================================
10392  *
10393  * This product includes cryptographic software written by Eric Young
10394  * (eay@cryptsoft.com).  This product includes software written by Tim
10395  * Hudson (tjh@cryptsoft.com).
10396  *
10397  */
10398 # 69 "/usr/include/openssl/x509.h" 2 3 4
10399 
10400 # 1 "/usr/include/openssl/buffer.h" 1 3 4
10401 /* crypto/buffer/buffer.h */
10402 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10403  * All rights reserved.
10404  *
10405  * This package is an SSL implementation written
10406  * by Eric Young (eay@cryptsoft.com).
10407  * The implementation was written so as to conform with Netscapes SSL.
10408  *
10409  * This library is free for commercial and non-commercial use as long as
10410  * the following conditions are aheared to.  The following conditions
10411  * apply to all code found in this distribution, be it the RC4, RSA,
10412  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10413  * included with this distribution is covered by the same copyright terms
10414  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10415  *
10416  * Copyright remains Eric Young's, and as such any Copyright notices in
10417  * the code are not to be removed.
10418  * If this package is used in a product, Eric Young should be given attribution
10419  * as the author of the parts of the library used.
10420  * This can be in the form of a textual message at program startup or
10421  * in documentation (online or textual) provided with the package.
10422  *
10423  * Redistribution and use in source and binary forms, with or without
10424  * modification, are permitted provided that the following conditions
10425  * are met:
10426  * 1. Redistributions of source code must retain the copyright
10427  *    notice, this list of conditions and the following disclaimer.
10428  * 2. Redistributions in binary form must reproduce the above copyright
10429  *    notice, this list of conditions and the following disclaimer in the
10430  *    documentation and/or other materials provided with the distribution.
10431  * 3. All advertising materials mentioning features or use of this software
10432  *    must display the following acknowledgement:
10433  *    "This product includes cryptographic software written by
10434  *     Eric Young (eay@cryptsoft.com)"
10435  *    The word 'cryptographic' can be left out if the rouines from the library
10436  *    being used are not cryptographic related :-).
10437  * 4. If you include any Windows specific code (or a derivative thereof) from
10438  *    the apps directory (application code) you must include an acknowledgement:
10439  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10440  *
10441  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10442  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10443  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10444  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10445  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10446  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10447  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10448  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10449  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10450  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10451  * SUCH DAMAGE.
10452  *
10453  * The licence and distribution terms for any publically available version or
10454  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10455  * copied and put under another distribution licence
10456  * [including the GNU Public Licence.]
10457  */
10458 
10459 
10460 
10461 
10462 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
10463 /* ====================================================================
10464  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
10465  *
10466  * Redistribution and use in source and binary forms, with or without
10467  * modification, are permitted provided that the following conditions
10468  * are met:
10469  *
10470  * 1. Redistributions of source code must retain the above copyright
10471  *    notice, this list of conditions and the following disclaimer.
10472  *
10473  * 2. Redistributions in binary form must reproduce the above copyright
10474  *    notice, this list of conditions and the following disclaimer in
10475  *    the documentation and/or other materials provided with the
10476  *    distribution.
10477  *
10478  * 3. All advertising materials mentioning features or use of this
10479  *    software must display the following acknowledgment:
10480  *    "This product includes software developed by the OpenSSL Project
10481  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10482  *
10483  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10484  *    endorse or promote products derived from this software without
10485  *    prior written permission. For written permission, please contact
10486  *    openssl-core@openssl.org.
10487  *
10488  * 5. Products derived from this software may not be called "OpenSSL"
10489  *    nor may "OpenSSL" appear in their names without prior written
10490  *    permission of the OpenSSL Project.
10491  *
10492  * 6. Redistributions of any form whatsoever must retain the following
10493  *    acknowledgment:
10494  *    "This product includes software developed by the OpenSSL Project
10495  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10496  *
10497  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10498  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10499  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10500  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10501  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10502  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10503  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10504  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10505  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10506  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10507  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10508  * OF THE POSSIBILITY OF SUCH DAMAGE.
10509  * ====================================================================
10510  *
10511  * This product includes cryptographic software written by Eric Young
10512  * (eay@cryptsoft.com).  This product includes software written by Tim
10513  * Hudson (tjh@cryptsoft.com).
10514  *
10515  */
10516 # 63 "/usr/include/openssl/buffer.h" 2 3 4
10517 
10518 
10519 
10520 
10521 
10522 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
10523 /*
10524  * CDDL HEADER START
10525  *
10526  * The contents of this file are subject to the terms of the
10527  * Common Development and Distribution License, Version 1.0 only
10528  * (the "License").  You may not use this file except in compliance
10529  * with the License.
10530  *
10531  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10532  * or http://www.opensolaris.org/os/licensing.
10533  * See the License for the specific language governing permissions
10534  * and limitations under the License.
10535  *
10536  * When distributing Covered Code, include this CDDL HEADER in each
10537  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10538  * If applicable, add the following below this CDDL HEADER, with the
10539  * fields enclosed by brackets "[]" replaced with your own identifying
10540  * information: Portions Copyright [yyyy] [name of copyright owner]
10541  *
10542  * CDDL HEADER END
10543  */
10544 /*	Copyright (c) 1988 AT&T	*/
10545 /*	  All Rights Reserved  	*/
10546 
10547 
10548 /*
10549  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
10550  * Use is subject to license terms.
10551  */
10552 
10553 
10554 
10555 
10556 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
10557 /*
10558  * CDDL HEADER START
10559  *
10560  * The contents of this file are subject to the terms of the
10561  * Common Development and Distribution License (the "License").
10562  * You may not use this file except in compliance with the License.
10563  *
10564  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10565  * or http://www.opensolaris.org/os/licensing.
10566  * See the License for the specific language governing permissions
10567  * and limitations under the License.
10568  *
10569  *
10570  * When distributing Covered Code, include this CDDL HEADER in each
10571  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10572  * If applicable, add the following below this CDDL HEADER, with the
10573  * fields enclosed by brackets "[]" replaced with your own identifying
10574  * information: Portions Copyright [yyyy] [name of copyright owner]
10575  *
10576  * CDDL HEADER END
10577  */
10578 
10579 /*
10580  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
10581  * Use is subject to license terms.
10582  * Copyright 2016 Joyent, Inc.
10583  */
10584 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
10585 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 1 3 4
10586 /*
10587  * CDDL HEADER START
10588  *
10589  * The contents of this file are subject to the terms of the
10590  * Common Development and Distribution License, Version 1.0 only
10591  * (the "License").  You may not use this file except in compliance
10592  * with the License.
10593  *
10594  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10595  * or http://www.opensolaris.org/os/licensing.
10596  * See the License for the specific language governing permissions
10597  * and limitations under the License.
10598  *
10599  * When distributing Covered Code, include this CDDL HEADER in each
10600  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10601  * If applicable, add the following below this CDDL HEADER, with the
10602  * fields enclosed by brackets "[]" replaced with your own identifying
10603  * information: Portions Copyright [yyyy] [name of copyright owner]
10604  *
10605  * CDDL HEADER END
10606  */
10607 /*	Copyright (c) 1988 AT&T	*/
10608 /*	  All Rights Reserved  	*/
10609 
10610 
10611 /*
10612  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
10613  * Use is subject to license terms.
10614  */
10615 
10616 /*
10617  * Copyright 2014 PALO, Richard.
10618  * Copyright 2016 Joyent, Inc.
10619  */
10620 
10621 /*
10622  * An application should not include this header directly.  Instead it
10623  * should be included only through the inclusion of other Sun headers.
10624  *
10625  * The contents of this header is limited to identifiers specified in the
10626  * C Standard.  Any new identifiers specified in future amendments to the
10627  * C Standard must be placed in this header.  If these new identifiers
10628  * are required to also be in the C++ Standard "std" namespace, then for
10629  * anything other than macro definitions, corresponding "using" directives
10630  * must also be added to <stddef.h.h>.
10631  */
10632 
10633 
10634 
10635 
10636 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
10637 /*
10638  * CDDL HEADER START
10639  *
10640  * The contents of this file are subject to the terms of the
10641  * Common Development and Distribution License (the "License").
10642  * You may not use this file except in compliance with the License.
10643  *
10644  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10645  * or http://www.opensolaris.org/os/licensing.
10646  * See the License for the specific language governing permissions
10647  * and limitations under the License.
10648  *
10649  *
10650  * When distributing Covered Code, include this CDDL HEADER in each
10651  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10652  * If applicable, add the following below this CDDL HEADER, with the
10653  * fields enclosed by brackets "[]" replaced with your own identifying
10654  * information: Portions Copyright [yyyy] [name of copyright owner]
10655  *
10656  * CDDL HEADER END
10657  */
10658 
10659 /*
10660  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
10661  * Use is subject to license terms.
10662  * Copyright 2016 Joyent, Inc.
10663  */
10664 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
10665 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
10666 /*
10667  * CDDL HEADER START
10668  *
10669  * The contents of this file are subject to the terms of the
10670  * Common Development and Distribution License (the "License").
10671  * You may not use this file except in compliance with the License.
10672  *
10673  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10674  * or http://www.opensolaris.org/os/licensing.
10675  * See the License for the specific language governing permissions
10676  * and limitations under the License.
10677  *
10678  * When distributing Covered Code, include this CDDL HEADER in each
10679  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10680  * If applicable, add the following below this CDDL HEADER, with the
10681  * fields enclosed by brackets "[]" replaced with your own identifying
10682  * information: Portions Copyright [yyyy] [name of copyright owner]
10683  *
10684  * CDDL HEADER END
10685  */
10686 
10687 /*
10688  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
10689  * Copyright 2016 Joyent, Inc.
10690  *
10691  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
10692  * Use is subject to license terms.
10693  */
10694 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
10695 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1 3 4
10696 /*
10697  * This file and its contents are supplied under the terms of the
10698  * Common Development and Distribution License ("CDDL"), version 1.0.
10699  * You may only use this file in accordance with the terms of version
10700  * 1.0 of the CDDL.
10701  *
10702  * A full copy of the text of the CDDL should have accompanied this
10703  * source.  A copy of the CDDL is also available via the Internet at
10704  * http://www.illumos.org/license/CDDL.
10705  */
10706 
10707 /*
10708  * Copyright 2014-2016 PALO, Richard.
10709  */
10710 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
10711 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 3 4
10712 typedef long max_align_t;
10713 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
10714 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 1 3 4
10715 /*
10716  * This file and its contents are supplied under the terms of the
10717  * Common Development and Distribution License ("CDDL"), version 1.0.
10718  * You may only use this file in accordance with the terms of version
10719  * 1.0 of the CDDL.
10720  *
10721  * A full copy of the text of the CDDL should have accompanied this
10722  * source.  A copy of the CDDL is also available via the Internet at
10723  * http://www.illumos.org/license/CDDL.
10724  */
10725 
10726 /*
10727  * Copyright 2017 Toomas Soome <tsoome@me.com>
10728  */
10729 
10730 
10731 
10732 
10733 /*
10734  * Commonly used macros and definitions.
10735  */
10736 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 3 4
10737 /*
10738  * We must not expose container_of() to userland, but we want it
10739  * to be available for early boot and for the kernel.
10740  */
10741 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
10742 
10743 /*
10744  * Allow global visibility for symbols defined in
10745  * C++ "std" namespace in <iso/stddef_iso.h>.
10746  */
10747 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 3 4
10748 /*
10749  * wchar_t is a built-in type in standard C++ and as such is not
10750  * defined here when using standard C++. However, the GNU compiler
10751  * fixincludes utility nonetheless creates its own version of this
10752  * header for use by gcc and g++. In that version it adds a redundant
10753  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
10754  * header we need to include the following magic comment:
10755  *
10756  * we must use the C++ compiler's type
10757  *
10758  * The above comment should not be removed or changed until GNU
10759  * gcc/fixinc/inclhack.def is updated to bypass this header.
10760  */
10761 # 69 "/usr/include/openssl/buffer.h" 2 3 4
10762 
10763 
10764 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1 3 4
10765 /*
10766  * CDDL HEADER START
10767  *
10768  * The contents of this file are subject to the terms of the
10769  * Common Development and Distribution License (the "License").
10770  * You may not use this file except in compliance with the License.
10771  *
10772  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10773  * or http://www.opensolaris.org/os/licensing.
10774  * See the License for the specific language governing permissions
10775  * and limitations under the License.
10776  *
10777  * When distributing Covered Code, include this CDDL HEADER in each
10778  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10779  * If applicable, add the following below this CDDL HEADER, with the
10780  * fields enclosed by brackets "[]" replaced with your own identifying
10781  * information: Portions Copyright [yyyy] [name of copyright owner]
10782  *
10783  * CDDL HEADER END
10784  */
10785 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10786 /*	  All Rights Reserved  	*/
10787 
10788 
10789 /*
10790  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
10791  * Use is subject to license terms.
10792  *
10793  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
10794  * Copyright 2016 Joyent, Inc.
10795  */
10796 # 72 "/usr/include/openssl/buffer.h" 2 3 4
10797 
10798 
10799 /* Already declared in ossl_typ.h */
10800 /* typedef struct buf_mem_st BUF_MEM; */
10801 
10802 struct buf_mem_st {
10803     size_t length; /* current number of bytes */
10804     char *data;
10805     size_t max; /* size of buffer */
10806 };
10807 
10808 BUF_MEM *BUF_MEM_new(void);
10809 void BUF_MEM_free(BUF_MEM *a);
10810 int BUF_MEM_grow(BUF_MEM *str, size_t len);
10811 int BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
10812 size_t BUF_strnlen(const char *str, size_t maxlen);
10813 char *BUF_strdup(const char *str);
10814 
10815 /*
10816  * Like strndup, but in addition, explicitly guarantees to never read past the
10817  * first |siz| bytes of |str|.
10818  */
10819 char *BUF_strndup(const char *str, size_t siz);
10820 
10821 void *BUF_memdup(const void *data, size_t siz);
10822 void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
10823 
10824 /* safe string functions */
10825 size_t BUF_strlcpy(char *dst, const char *src, size_t siz);
10826 size_t BUF_strlcat(char *dst, const char *src, size_t siz);
10827 
10828 /* BEGIN ERROR CODES */
10829 /*
10830  * The following lines are auto generated by the script mkerr.pl. Any changes
10831  * made after this point may be overwritten when the script is next run.
10832  */
10833 void ERR_load_BUF_strings(void);
10834 
10835 /* Error codes for the BUF functions. */
10836 
10837 /* Function codes. */
10838 
10839 
10840 
10841 
10842 
10843 
10844 
10845 /* Reason codes. */
10846 # 71 "/usr/include/openssl/x509.h" 2 3 4
10847 
10848 
10849 # 1 "/usr/include/openssl/evp.h" 1 3 4
10850 /* crypto/evp/evp.h */
10851 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10852  * All rights reserved.
10853  *
10854  * This package is an SSL implementation written
10855  * by Eric Young (eay@cryptsoft.com).
10856  * The implementation was written so as to conform with Netscapes SSL.
10857  *
10858  * This library is free for commercial and non-commercial use as long as
10859  * the following conditions are aheared to.  The following conditions
10860  * apply to all code found in this distribution, be it the RC4, RSA,
10861  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10862  * included with this distribution is covered by the same copyright terms
10863  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10864  *
10865  * Copyright remains Eric Young's, and as such any Copyright notices in
10866  * the code are not to be removed.
10867  * If this package is used in a product, Eric Young should be given attribution
10868  * as the author of the parts of the library used.
10869  * This can be in the form of a textual message at program startup or
10870  * in documentation (online or textual) provided with the package.
10871  *
10872  * Redistribution and use in source and binary forms, with or without
10873  * modification, are permitted provided that the following conditions
10874  * are met:
10875  * 1. Redistributions of source code must retain the copyright
10876  *    notice, this list of conditions and the following disclaimer.
10877  * 2. Redistributions in binary form must reproduce the above copyright
10878  *    notice, this list of conditions and the following disclaimer in the
10879  *    documentation and/or other materials provided with the distribution.
10880  * 3. All advertising materials mentioning features or use of this software
10881  *    must display the following acknowledgement:
10882  *    "This product includes cryptographic software written by
10883  *     Eric Young (eay@cryptsoft.com)"
10884  *    The word 'cryptographic' can be left out if the rouines from the library
10885  *    being used are not cryptographic related :-).
10886  * 4. If you include any Windows specific code (or a derivative thereof) from
10887  *    the apps directory (application code) you must include an acknowledgement:
10888  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10889  *
10890  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10891  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10892  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10893  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10894  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10895  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10896  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10897  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10898  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10899  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10900  * SUCH DAMAGE.
10901  *
10902  * The licence and distribution terms for any publically available version or
10903  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10904  * copied and put under another distribution licence
10905  * [including the GNU Public Licence.]
10906  */
10907 # 66 "/usr/include/openssl/evp.h" 3 4
10908 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
10909 /* opensslconf.h */
10910 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
10911 
10912 
10913 
10914 
10915 /* OpenSSL was configured with the following options: */
10916 # 108 "/usr/include/openssl/opensslconf.h" 3 4
10917 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
10918    asks for it.  This is a transient feature that is provided for those
10919    who haven't had the time to do the appropriate changes in their
10920    applications.  */
10921 # 204 "/usr/include/openssl/opensslconf.h" 3 4
10922 /* crypto/opensslconf.h.in */
10923 
10924 /* Generate 80386 code? */
10925 # 67 "/usr/include/openssl/evp.h" 2 3 4
10926 
10927 
10928 
10929 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
10930 /* ====================================================================
10931  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
10932  *
10933  * Redistribution and use in source and binary forms, with or without
10934  * modification, are permitted provided that the following conditions
10935  * are met:
10936  *
10937  * 1. Redistributions of source code must retain the above copyright
10938  *    notice, this list of conditions and the following disclaimer.
10939  *
10940  * 2. Redistributions in binary form must reproduce the above copyright
10941  *    notice, this list of conditions and the following disclaimer in
10942  *    the documentation and/or other materials provided with the
10943  *    distribution.
10944  *
10945  * 3. All advertising materials mentioning features or use of this
10946  *    software must display the following acknowledgment:
10947  *    "This product includes software developed by the OpenSSL Project
10948  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10949  *
10950  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10951  *    endorse or promote products derived from this software without
10952  *    prior written permission. For written permission, please contact
10953  *    openssl-core@openssl.org.
10954  *
10955  * 5. Products derived from this software may not be called "OpenSSL"
10956  *    nor may "OpenSSL" appear in their names without prior written
10957  *    permission of the OpenSSL Project.
10958  *
10959  * 6. Redistributions of any form whatsoever must retain the following
10960  *    acknowledgment:
10961  *    "This product includes software developed by the OpenSSL Project
10962  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10963  *
10964  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10965  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10966  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10967  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10968  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10969  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10970  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10971  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10972  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10973  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10974  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10975  * OF THE POSSIBILITY OF SUCH DAMAGE.
10976  * ====================================================================
10977  *
10978  * This product includes cryptographic software written by Eric Young
10979  * (eay@cryptsoft.com).  This product includes software written by Tim
10980  * Hudson (tjh@cryptsoft.com).
10981  *
10982  */
10983 # 71 "/usr/include/openssl/evp.h" 2 3 4
10984 
10985 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
10986 /* ====================================================================
10987  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
10988  *
10989  * Redistribution and use in source and binary forms, with or without
10990  * modification, are permitted provided that the following conditions
10991  * are met:
10992  *
10993  * 1. Redistributions of source code must retain the above copyright
10994  *    notice, this list of conditions and the following disclaimer.
10995  *
10996  * 2. Redistributions in binary form must reproduce the above copyright
10997  *    notice, this list of conditions and the following disclaimer in
10998  *    the documentation and/or other materials provided with the
10999  *    distribution.
11000  *
11001  * 3. All advertising materials mentioning features or use of this
11002  *    software must display the following acknowledgment:
11003  *    "This product includes software developed by the OpenSSL Project
11004  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11005  *
11006  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11007  *    endorse or promote products derived from this software without
11008  *    prior written permission. For written permission, please contact
11009  *    openssl-core@openssl.org.
11010  *
11011  * 5. Products derived from this software may not be called "OpenSSL"
11012  *    nor may "OpenSSL" appear in their names without prior written
11013  *    permission of the OpenSSL Project.
11014  *
11015  * 6. Redistributions of any form whatsoever must retain the following
11016  *    acknowledgment:
11017  *    "This product includes software developed by the OpenSSL Project
11018  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11019  *
11020  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11021  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11022  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11023  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11024  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11025  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11026  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11027  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11028  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11029  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11030  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11031  * OF THE POSSIBILITY OF SUCH DAMAGE.
11032  * ====================================================================
11033  *
11034  * This product includes cryptographic software written by Eric Young
11035  * (eay@cryptsoft.com).  This product includes software written by Tim
11036  * Hudson (tjh@cryptsoft.com).
11037  *
11038  */
11039 # 73 "/usr/include/openssl/evp.h" 2 3 4
11040 
11041 
11042 # 1 "/usr/include/openssl/bio.h" 1 3 4
11043 /* crypto/bio/bio.h */
11044 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11045  * All rights reserved.
11046  *
11047  * This package is an SSL implementation written
11048  * by Eric Young (eay@cryptsoft.com).
11049  * The implementation was written so as to conform with Netscapes SSL.
11050  *
11051  * This library is free for commercial and non-commercial use as long as
11052  * the following conditions are aheared to.  The following conditions
11053  * apply to all code found in this distribution, be it the RC4, RSA,
11054  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11055  * included with this distribution is covered by the same copyright terms
11056  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11057  *
11058  * Copyright remains Eric Young's, and as such any Copyright notices in
11059  * the code are not to be removed.
11060  * If this package is used in a product, Eric Young should be given attribution
11061  * as the author of the parts of the library used.
11062  * This can be in the form of a textual message at program startup or
11063  * in documentation (online or textual) provided with the package.
11064  *
11065  * Redistribution and use in source and binary forms, with or without
11066  * modification, are permitted provided that the following conditions
11067  * are met:
11068  * 1. Redistributions of source code must retain the copyright
11069  *    notice, this list of conditions and the following disclaimer.
11070  * 2. Redistributions in binary form must reproduce the above copyright
11071  *    notice, this list of conditions and the following disclaimer in the
11072  *    documentation and/or other materials provided with the distribution.
11073  * 3. All advertising materials mentioning features or use of this software
11074  *    must display the following acknowledgement:
11075  *    "This product includes cryptographic software written by
11076  *     Eric Young (eay@cryptsoft.com)"
11077  *    The word 'cryptographic' can be left out if the rouines from the library
11078  *    being used are not cryptographic related :-).
11079  * 4. If you include any Windows specific code (or a derivative thereof) from
11080  *    the apps directory (application code) you must include an acknowledgement:
11081  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11082  *
11083  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11084  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11085  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11086  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11087  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11088  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11089  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11090  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11091  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11092  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11093  * SUCH DAMAGE.
11094  *
11095  * The licence and distribution terms for any publically available version or
11096  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11097  * copied and put under another distribution licence
11098  * [including the GNU Public Licence.]
11099  */
11100 # 76 "/usr/include/openssl/evp.h" 2 3 4
11101 
11102 
11103 /*-
11104 #define EVP_RC2_KEY_SIZE                16
11105 #define EVP_RC4_KEY_SIZE                16
11106 #define EVP_BLOWFISH_KEY_SIZE           16
11107 #define EVP_CAST5_KEY_SIZE              16
11108 #define EVP_RC5_32_12_16_KEY_SIZE       16
11109 */
11110 
11111 
11112 
11113 
11114 
11115 
11116 /* Default PKCS#5 iteration count */
11117 
11118 
11119 # 1 "/usr/include/openssl/objects.h" 1 3 4
11120 /* crypto/objects/objects.h */
11121 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11122  * All rights reserved.
11123  *
11124  * This package is an SSL implementation written
11125  * by Eric Young (eay@cryptsoft.com).
11126  * The implementation was written so as to conform with Netscapes SSL.
11127  *
11128  * This library is free for commercial and non-commercial use as long as
11129  * the following conditions are aheared to.  The following conditions
11130  * apply to all code found in this distribution, be it the RC4, RSA,
11131  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11132  * included with this distribution is covered by the same copyright terms
11133  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11134  *
11135  * Copyright remains Eric Young's, and as such any Copyright notices in
11136  * the code are not to be removed.
11137  * If this package is used in a product, Eric Young should be given attribution
11138  * as the author of the parts of the library used.
11139  * This can be in the form of a textual message at program startup or
11140  * in documentation (online or textual) provided with the package.
11141  *
11142  * Redistribution and use in source and binary forms, with or without
11143  * modification, are permitted provided that the following conditions
11144  * are met:
11145  * 1. Redistributions of source code must retain the copyright
11146  *    notice, this list of conditions and the following disclaimer.
11147  * 2. Redistributions in binary form must reproduce the above copyright
11148  *    notice, this list of conditions and the following disclaimer in the
11149  *    documentation and/or other materials provided with the distribution.
11150  * 3. All advertising materials mentioning features or use of this software
11151  *    must display the following acknowledgement:
11152  *    "This product includes cryptographic software written by
11153  *     Eric Young (eay@cryptsoft.com)"
11154  *    The word 'cryptographic' can be left out if the rouines from the library
11155  *    being used are not cryptographic related :-).
11156  * 4. If you include any Windows specific code (or a derivative thereof) from
11157  *    the apps directory (application code) you must include an acknowledgement:
11158  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11159  *
11160  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11161  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11162  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11163  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11164  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11165  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11166  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11167  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11168  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11169  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11170  * SUCH DAMAGE.
11171  *
11172  * The licence and distribution terms for any publically available version or
11173  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11174  * copied and put under another distribution licence
11175  * [including the GNU Public Licence.]
11176  */
11177 
11178 
11179 
11180 
11181 
11182 
11183 
11184 # 1 "/usr/include/openssl/obj_mac.h" 1 3 4
11185 /* crypto/objects/obj_mac.h */
11186 
11187 /*
11188  * THIS FILE IS GENERATED FROM objects.txt by objects.pl via the following
11189  * command: perl objects.pl objects.txt obj_mac.num obj_mac.h
11190  */
11191 
11192 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
11193  * All rights reserved.
11194  *
11195  * This package is an SSL implementation written
11196  * by Eric Young (eay@cryptsoft.com).
11197  * The implementation was written so as to conform with Netscapes SSL.
11198  *
11199  * This library is free for commercial and non-commercial use as long as
11200  * the following conditions are aheared to.  The following conditions
11201  * apply to all code found in this distribution, be it the RC4, RSA,
11202  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11203  * included with this distribution is covered by the same copyright terms
11204  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11205  *
11206  * Copyright remains Eric Young's, and as such any Copyright notices in
11207  * the code are not to be removed.
11208  * If this package is used in a product, Eric Young should be given attribution
11209  * as the author of the parts of the library used.
11210  * This can be in the form of a textual message at program startup or
11211  * in documentation (online or textual) provided with the package.
11212  *
11213  * Redistribution and use in source and binary forms, with or without
11214  * modification, are permitted provided that the following conditions
11215  * are met:
11216  * 1. Redistributions of source code must retain the copyright
11217  *    notice, this list of conditions and the following disclaimer.
11218  * 2. Redistributions in binary form must reproduce the above copyright
11219  *    notice, this list of conditions and the following disclaimer in the
11220  *    documentation and/or other materials provided with the distribution.
11221  * 3. All advertising materials mentioning features or use of this software
11222  *    must display the following acknowledgement:
11223  *    "This product includes cryptographic software written by
11224  *     Eric Young (eay@cryptsoft.com)"
11225  *    The word 'cryptographic' can be left out if the rouines from the library
11226  *    being used are not cryptographic related :-).
11227  * 4. If you include any Windows specific code (or a derivative thereof) from
11228  *    the apps directory (application code) you must include an acknowledgement:
11229  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11230  *
11231  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11232  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11233  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11234  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11235  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11236  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11237  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11238  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11239  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11240  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11241  * SUCH DAMAGE.
11242  *
11243  * The licence and distribution terms for any publically available version or
11244  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11245  * copied and put under another distribution licence
11246  * [including the GNU Public Licence.]
11247  */
11248 # 66 "/usr/include/openssl/objects.h" 2 3 4
11249 # 964 "/usr/include/openssl/objects.h" 3 4
11250 # 1 "/usr/include/openssl/bio.h" 1 3 4
11251 /* crypto/bio/bio.h */
11252 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11253  * All rights reserved.
11254  *
11255  * This package is an SSL implementation written
11256  * by Eric Young (eay@cryptsoft.com).
11257  * The implementation was written so as to conform with Netscapes SSL.
11258  *
11259  * This library is free for commercial and non-commercial use as long as
11260  * the following conditions are aheared to.  The following conditions
11261  * apply to all code found in this distribution, be it the RC4, RSA,
11262  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11263  * included with this distribution is covered by the same copyright terms
11264  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11265  *
11266  * Copyright remains Eric Young's, and as such any Copyright notices in
11267  * the code are not to be removed.
11268  * If this package is used in a product, Eric Young should be given attribution
11269  * as the author of the parts of the library used.
11270  * This can be in the form of a textual message at program startup or
11271  * in documentation (online or textual) provided with the package.
11272  *
11273  * Redistribution and use in source and binary forms, with or without
11274  * modification, are permitted provided that the following conditions
11275  * are met:
11276  * 1. Redistributions of source code must retain the copyright
11277  *    notice, this list of conditions and the following disclaimer.
11278  * 2. Redistributions in binary form must reproduce the above copyright
11279  *    notice, this list of conditions and the following disclaimer in the
11280  *    documentation and/or other materials provided with the distribution.
11281  * 3. All advertising materials mentioning features or use of this software
11282  *    must display the following acknowledgement:
11283  *    "This product includes cryptographic software written by
11284  *     Eric Young (eay@cryptsoft.com)"
11285  *    The word 'cryptographic' can be left out if the rouines from the library
11286  *    being used are not cryptographic related :-).
11287  * 4. If you include any Windows specific code (or a derivative thereof) from
11288  *    the apps directory (application code) you must include an acknowledgement:
11289  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11290  *
11291  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11292  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11293  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11294  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11295  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11296  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11297  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11298  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11299  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11300  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11301  * SUCH DAMAGE.
11302  *
11303  * The licence and distribution terms for any publically available version or
11304  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11305  * copied and put under another distribution licence
11306  * [including the GNU Public Licence.]
11307  */
11308 # 965 "/usr/include/openssl/objects.h" 2 3 4
11309 # 1 "/usr/include/openssl/asn1.h" 1 3 4
11310 /* crypto/asn1/asn1.h */
11311 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11312  * All rights reserved.
11313  *
11314  * This package is an SSL implementation written
11315  * by Eric Young (eay@cryptsoft.com).
11316  * The implementation was written so as to conform with Netscapes SSL.
11317  *
11318  * This library is free for commercial and non-commercial use as long as
11319  * the following conditions are aheared to.  The following conditions
11320  * apply to all code found in this distribution, be it the RC4, RSA,
11321  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11322  * included with this distribution is covered by the same copyright terms
11323  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11324  *
11325  * Copyright remains Eric Young's, and as such any Copyright notices in
11326  * the code are not to be removed.
11327  * If this package is used in a product, Eric Young should be given attribution
11328  * as the author of the parts of the library used.
11329  * This can be in the form of a textual message at program startup or
11330  * in documentation (online or textual) provided with the package.
11331  *
11332  * Redistribution and use in source and binary forms, with or without
11333  * modification, are permitted provided that the following conditions
11334  * are met:
11335  * 1. Redistributions of source code must retain the copyright
11336  *    notice, this list of conditions and the following disclaimer.
11337  * 2. Redistributions in binary form must reproduce the above copyright
11338  *    notice, this list of conditions and the following disclaimer in the
11339  *    documentation and/or other materials provided with the distribution.
11340  * 3. All advertising materials mentioning features or use of this software
11341  *    must display the following acknowledgement:
11342  *    "This product includes cryptographic software written by
11343  *     Eric Young (eay@cryptsoft.com)"
11344  *    The word 'cryptographic' can be left out if the rouines from the library
11345  *    being used are not cryptographic related :-).
11346  * 4. If you include any Windows specific code (or a derivative thereof) from
11347  *    the apps directory (application code) you must include an acknowledgement:
11348  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11349  *
11350  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11351  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11352  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11353  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11354  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11355  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11356  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11357  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11358  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11359  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11360  * SUCH DAMAGE.
11361  *
11362  * The licence and distribution terms for any publically available version or
11363  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11364  * copied and put under another distribution licence
11365  * [including the GNU Public Licence.]
11366  */
11367 
11368 
11369 
11370 
11371 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1 3 4
11372 /*
11373  * CDDL HEADER START
11374  *
11375  * The contents of this file are subject to the terms of the
11376  * Common Development and Distribution License (the "License").
11377  * You may not use this file except in compliance with the License.
11378  *
11379  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11380  * or http://www.opensolaris.org/os/licensing.
11381  * See the License for the specific language governing permissions
11382  * and limitations under the License.
11383  *
11384  * When distributing Covered Code, include this CDDL HEADER in each
11385  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11386  * If applicable, add the following below this CDDL HEADER, with the
11387  * fields enclosed by brackets "[]" replaced with your own identifying
11388  * information: Portions Copyright [yyyy] [name of copyright owner]
11389  *
11390  * CDDL HEADER END
11391  */
11392 /*	Copyright (c) 1988 AT&T	*/
11393 /*	  All Rights Reserved  	*/
11394 
11395 
11396 /*
11397  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11398  *
11399  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
11400  * Use is subject to license terms.
11401  */
11402 /*
11403  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
11404  * Copyright 2016 Joyent, Inc.
11405  */
11406 # 63 "/usr/include/openssl/asn1.h" 2 3 4
11407 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
11408 /* e_os2.h */
11409 /* ====================================================================
11410  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
11411  *
11412  * Redistribution and use in source and binary forms, with or without
11413  * modification, are permitted provided that the following conditions
11414  * are met:
11415  *
11416  * 1. Redistributions of source code must retain the above copyright
11417  *    notice, this list of conditions and the following disclaimer.
11418  *
11419  * 2. Redistributions in binary form must reproduce the above copyright
11420  *    notice, this list of conditions and the following disclaimer in
11421  *    the documentation and/or other materials provided with the
11422  *    distribution.
11423  *
11424  * 3. All advertising materials mentioning features or use of this
11425  *    software must display the following acknowledgment:
11426  *    "This product includes software developed by the OpenSSL Project
11427  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11428  *
11429  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11430  *    endorse or promote products derived from this software without
11431  *    prior written permission. For written permission, please contact
11432  *    openssl-core@openssl.org.
11433  *
11434  * 5. Products derived from this software may not be called "OpenSSL"
11435  *    nor may "OpenSSL" appear in their names without prior written
11436  *    permission of the OpenSSL Project.
11437  *
11438  * 6. Redistributions of any form whatsoever must retain the following
11439  *    acknowledgment:
11440  *    "This product includes software developed by the OpenSSL Project
11441  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11442  *
11443  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11444  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11445  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11446  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11447  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11448  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11449  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11450  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11451  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11452  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11453  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11454  * OF THE POSSIBILITY OF SUCH DAMAGE.
11455  * ====================================================================
11456  *
11457  * This product includes cryptographic software written by Eric Young
11458  * (eay@cryptsoft.com).  This product includes software written by Tim
11459  * Hudson (tjh@cryptsoft.com).
11460  *
11461  */
11462 
11463 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
11464 /* opensslconf.h */
11465 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
11466 
11467 
11468 
11469 
11470 /* OpenSSL was configured with the following options: */
11471 # 108 "/usr/include/openssl/opensslconf.h" 3 4
11472 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
11473    asks for it.  This is a transient feature that is provided for those
11474    who haven't had the time to do the appropriate changes in their
11475    applications.  */
11476 # 204 "/usr/include/openssl/opensslconf.h" 3 4
11477 /* crypto/opensslconf.h.in */
11478 
11479 /* Generate 80386 code? */
11480 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
11481 # 64 "/usr/include/openssl/asn1.h" 2 3 4
11482 
11483 # 1 "/usr/include/openssl/bio.h" 1 3 4
11484 /* crypto/bio/bio.h */
11485 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11486  * All rights reserved.
11487  *
11488  * This package is an SSL implementation written
11489  * by Eric Young (eay@cryptsoft.com).
11490  * The implementation was written so as to conform with Netscapes SSL.
11491  *
11492  * This library is free for commercial and non-commercial use as long as
11493  * the following conditions are aheared to.  The following conditions
11494  * apply to all code found in this distribution, be it the RC4, RSA,
11495  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11496  * included with this distribution is covered by the same copyright terms
11497  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11498  *
11499  * Copyright remains Eric Young's, and as such any Copyright notices in
11500  * the code are not to be removed.
11501  * If this package is used in a product, Eric Young should be given attribution
11502  * as the author of the parts of the library used.
11503  * This can be in the form of a textual message at program startup or
11504  * in documentation (online or textual) provided with the package.
11505  *
11506  * Redistribution and use in source and binary forms, with or without
11507  * modification, are permitted provided that the following conditions
11508  * are met:
11509  * 1. Redistributions of source code must retain the copyright
11510  *    notice, this list of conditions and the following disclaimer.
11511  * 2. Redistributions in binary form must reproduce the above copyright
11512  *    notice, this list of conditions and the following disclaimer in the
11513  *    documentation and/or other materials provided with the distribution.
11514  * 3. All advertising materials mentioning features or use of this software
11515  *    must display the following acknowledgement:
11516  *    "This product includes cryptographic software written by
11517  *     Eric Young (eay@cryptsoft.com)"
11518  *    The word 'cryptographic' can be left out if the rouines from the library
11519  *    being used are not cryptographic related :-).
11520  * 4. If you include any Windows specific code (or a derivative thereof) from
11521  *    the apps directory (application code) you must include an acknowledgement:
11522  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11523  *
11524  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11525  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11526  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11527  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11528  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11529  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11530  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11531  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11532  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11533  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11534  * SUCH DAMAGE.
11535  *
11536  * The licence and distribution terms for any publically available version or
11537  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11538  * copied and put under another distribution licence
11539  * [including the GNU Public Licence.]
11540  */
11541 # 66 "/usr/include/openssl/asn1.h" 2 3 4
11542 
11543 # 1 "/usr/include/openssl/stack.h" 1 3 4
11544 /* crypto/stack/stack.h */
11545 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11546  * All rights reserved.
11547  *
11548  * This package is an SSL implementation written
11549  * by Eric Young (eay@cryptsoft.com).
11550  * The implementation was written so as to conform with Netscapes SSL.
11551  *
11552  * This library is free for commercial and non-commercial use as long as
11553  * the following conditions are aheared to.  The following conditions
11554  * apply to all code found in this distribution, be it the RC4, RSA,
11555  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11556  * included with this distribution is covered by the same copyright terms
11557  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11558  *
11559  * Copyright remains Eric Young's, and as such any Copyright notices in
11560  * the code are not to be removed.
11561  * If this package is used in a product, Eric Young should be given attribution
11562  * as the author of the parts of the library used.
11563  * This can be in the form of a textual message at program startup or
11564  * in documentation (online or textual) provided with the package.
11565  *
11566  * Redistribution and use in source and binary forms, with or without
11567  * modification, are permitted provided that the following conditions
11568  * are met:
11569  * 1. Redistributions of source code must retain the copyright
11570  *    notice, this list of conditions and the following disclaimer.
11571  * 2. Redistributions in binary form must reproduce the above copyright
11572  *    notice, this list of conditions and the following disclaimer in the
11573  *    documentation and/or other materials provided with the distribution.
11574  * 3. All advertising materials mentioning features or use of this software
11575  *    must display the following acknowledgement:
11576  *    "This product includes cryptographic software written by
11577  *     Eric Young (eay@cryptsoft.com)"
11578  *    The word 'cryptographic' can be left out if the rouines from the library
11579  *    being used are not cryptographic related :-).
11580  * 4. If you include any Windows specific code (or a derivative thereof) from
11581  *    the apps directory (application code) you must include an acknowledgement:
11582  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11583  *
11584  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11585  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11586  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11587  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11588  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11589  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11590  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11591  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11592  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11593  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11594  * SUCH DAMAGE.
11595  *
11596  * The licence and distribution terms for any publically available version or
11597  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11598  * copied and put under another distribution licence
11599  * [including the GNU Public Licence.]
11600  */
11601 # 68 "/usr/include/openssl/asn1.h" 2 3 4
11602 # 1 "/usr/include/openssl/safestack.h" 1 3 4
11603 /* ====================================================================
11604  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
11605  *
11606  * Redistribution and use in source and binary forms, with or without
11607  * modification, are permitted provided that the following conditions
11608  * are met:
11609  *
11610  * 1. Redistributions of source code must retain the above copyright
11611  *    notice, this list of conditions and the following disclaimer.
11612  *
11613  * 2. Redistributions in binary form must reproduce the above copyright
11614  *    notice, this list of conditions and the following disclaimer in
11615  *    the documentation and/or other materials provided with the
11616  *    distribution.
11617  *
11618  * 3. All advertising materials mentioning features or use of this
11619  *    software must display the following acknowledgment:
11620  *    "This product includes software developed by the OpenSSL Project
11621  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11622  *
11623  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11624  *    endorse or promote products derived from this software without
11625  *    prior written permission. For written permission, please contact
11626  *    openssl-core@openssl.org.
11627  *
11628  * 5. Products derived from this software may not be called "OpenSSL"
11629  *    nor may "OpenSSL" appear in their names without prior written
11630  *    permission of the OpenSSL Project.
11631  *
11632  * 6. Redistributions of any form whatsoever must retain the following
11633  *    acknowledgment:
11634  *    "This product includes software developed by the OpenSSL Project
11635  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11636  *
11637  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11638  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11639  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11640  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11641  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11642  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11643  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11644  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11645  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11646  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11647  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11648  * OF THE POSSIBILITY OF SUCH DAMAGE.
11649  * ====================================================================
11650  *
11651  * This product includes cryptographic software written by Eric Young
11652  * (eay@cryptsoft.com).  This product includes software written by Tim
11653  * Hudson (tjh@cryptsoft.com).
11654  *
11655  */
11656 # 69 "/usr/include/openssl/asn1.h" 2 3 4
11657 
11658 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
11659 /* ====================================================================
11660  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
11661  *
11662  * Redistribution and use in source and binary forms, with or without
11663  * modification, are permitted provided that the following conditions
11664  * are met:
11665  *
11666  * 1. Redistributions of source code must retain the above copyright
11667  *    notice, this list of conditions and the following disclaimer.
11668  *
11669  * 2. Redistributions in binary form must reproduce the above copyright
11670  *    notice, this list of conditions and the following disclaimer in
11671  *    the documentation and/or other materials provided with the
11672  *    distribution.
11673  *
11674  * 3. All advertising materials mentioning features or use of this
11675  *    software must display the following acknowledgment:
11676  *    "This product includes software developed by the OpenSSL Project
11677  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11678  *
11679  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11680  *    endorse or promote products derived from this software without
11681  *    prior written permission. For written permission, please contact
11682  *    openssl-core@openssl.org.
11683  *
11684  * 5. Products derived from this software may not be called "OpenSSL"
11685  *    nor may "OpenSSL" appear in their names without prior written
11686  *    permission of the OpenSSL Project.
11687  *
11688  * 6. Redistributions of any form whatsoever must retain the following
11689  *    acknowledgment:
11690  *    "This product includes software developed by the OpenSSL Project
11691  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11692  *
11693  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11694  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11695  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11696  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11697  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11698  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11699  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11700  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11701  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11702  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11703  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11704  * OF THE POSSIBILITY OF SUCH DAMAGE.
11705  * ====================================================================
11706  *
11707  * This product includes cryptographic software written by Eric Young
11708  * (eay@cryptsoft.com).  This product includes software written by Tim
11709  * Hudson (tjh@cryptsoft.com).
11710  *
11711  */
11712 # 71 "/usr/include/openssl/asn1.h" 2 3 4
11713 
11714 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
11715 /* ====================================================================
11716  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
11717  *
11718  * Redistribution and use in source and binary forms, with or without
11719  * modification, are permitted provided that the following conditions
11720  * are met:
11721  *
11722  * 1. Redistributions of source code must retain the above copyright
11723  *    notice, this list of conditions and the following disclaimer.
11724  *
11725  * 2. Redistributions in binary form must reproduce the above copyright
11726  *    notice, this list of conditions and the following disclaimer in
11727  *    the documentation and/or other materials provided with the
11728  *    distribution.
11729  *
11730  * 3. All advertising materials mentioning features or use of this
11731  *    software must display the following acknowledgment:
11732  *    "This product includes software developed by the OpenSSL Project
11733  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11734  *
11735  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11736  *    endorse or promote products derived from this software without
11737  *    prior written permission. For written permission, please contact
11738  *    openssl-core@openssl.org.
11739  *
11740  * 5. Products derived from this software may not be called "OpenSSL"
11741  *    nor may "OpenSSL" appear in their names without prior written
11742  *    permission of the OpenSSL Project.
11743  *
11744  * 6. Redistributions of any form whatsoever must retain the following
11745  *    acknowledgment:
11746  *    "This product includes software developed by the OpenSSL Project
11747  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11748  *
11749  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11750  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11751  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11752  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11753  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11754  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11755  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11756  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11757  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11758  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11759  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11760  * OF THE POSSIBILITY OF SUCH DAMAGE.
11761  * ====================================================================
11762  *
11763  * This product includes cryptographic software written by Eric Young
11764  * (eay@cryptsoft.com).  This product includes software written by Tim
11765  * Hudson (tjh@cryptsoft.com).
11766  *
11767  */
11768 # 73 "/usr/include/openssl/asn1.h" 2 3 4
11769 
11770 # 1 "/usr/include/openssl/bn.h" 1 3 4
11771 /* crypto/bn/bn.h */
11772 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
11773  * All rights reserved.
11774  *
11775  * This package is an SSL implementation written
11776  * by Eric Young (eay@cryptsoft.com).
11777  * The implementation was written so as to conform with Netscapes SSL.
11778  *
11779  * This library is free for commercial and non-commercial use as long as
11780  * the following conditions are aheared to.  The following conditions
11781  * apply to all code found in this distribution, be it the RC4, RSA,
11782  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11783  * included with this distribution is covered by the same copyright terms
11784  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11785  *
11786  * Copyright remains Eric Young's, and as such any Copyright notices in
11787  * the code are not to be removed.
11788  * If this package is used in a product, Eric Young should be given attribution
11789  * as the author of the parts of the library used.
11790  * This can be in the form of a textual message at program startup or
11791  * in documentation (online or textual) provided with the package.
11792  *
11793  * Redistribution and use in source and binary forms, with or without
11794  * modification, are permitted provided that the following conditions
11795  * are met:
11796  * 1. Redistributions of source code must retain the copyright
11797  *    notice, this list of conditions and the following disclaimer.
11798  * 2. Redistributions in binary form must reproduce the above copyright
11799  *    notice, this list of conditions and the following disclaimer in the
11800  *    documentation and/or other materials provided with the distribution.
11801  * 3. All advertising materials mentioning features or use of this software
11802  *    must display the following acknowledgement:
11803  *    "This product includes cryptographic software written by
11804  *     Eric Young (eay@cryptsoft.com)"
11805  *    The word 'cryptographic' can be left out if the rouines from the library
11806  *    being used are not cryptographic related :-).
11807  * 4. If you include any Windows specific code (or a derivative thereof) from
11808  *    the apps directory (application code) you must include an acknowledgement:
11809  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11810  *
11811  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11812  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11813  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11814  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11815  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11816  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11817  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11818  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11819  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11820  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11821  * SUCH DAMAGE.
11822  *
11823  * The licence and distribution terms for any publically available version or
11824  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11825  * copied and put under another distribution licence
11826  * [including the GNU Public Licence.]
11827  */
11828 /* ====================================================================
11829  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
11830  *
11831  * Redistribution and use in source and binary forms, with or without
11832  * modification, are permitted provided that the following conditions
11833  * are met:
11834  *
11835  * 1. Redistributions of source code must retain the above copyright
11836  *    notice, this list of conditions and the following disclaimer.
11837  *
11838  * 2. Redistributions in binary form must reproduce the above copyright
11839  *    notice, this list of conditions and the following disclaimer in
11840  *    the documentation and/or other materials provided with the
11841  *    distribution.
11842  *
11843  * 3. All advertising materials mentioning features or use of this
11844  *    software must display the following acknowledgment:
11845  *    "This product includes software developed by the OpenSSL Project
11846  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11847  *
11848  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11849  *    endorse or promote products derived from this software without
11850  *    prior written permission. For written permission, please contact
11851  *    openssl-core@openssl.org.
11852  *
11853  * 5. Products derived from this software may not be called "OpenSSL"
11854  *    nor may "OpenSSL" appear in their names without prior written
11855  *    permission of the OpenSSL Project.
11856  *
11857  * 6. Redistributions of any form whatsoever must retain the following
11858  *    acknowledgment:
11859  *    "This product includes software developed by the OpenSSL Project
11860  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11861  *
11862  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11863  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11864  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11865  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11866  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11867  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11868  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11869  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11870  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11871  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11872  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11873  * OF THE POSSIBILITY OF SUCH DAMAGE.
11874  * ====================================================================
11875  *
11876  * This product includes cryptographic software written by Eric Young
11877  * (eay@cryptsoft.com).  This product includes software written by Tim
11878  * Hudson (tjh@cryptsoft.com).
11879  *
11880  */
11881 /* ====================================================================
11882  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
11883  *
11884  * Portions of the attached software ("Contribution") are developed by
11885  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
11886  *
11887  * The Contribution is licensed pursuant to the Eric Young open source
11888  * license provided above.
11889  *
11890  * The binary polynomial arithmetic software is originally written by
11891  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
11892  *
11893  */
11894 
11895 
11896 
11897 
11898 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1 3 4
11899 /*
11900  * CDDL HEADER START
11901  *
11902  * The contents of this file are subject to the terms of the
11903  * Common Development and Distribution License (the "License").
11904  * You may not use this file except in compliance with the License.
11905  *
11906  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11907  * or http://www.opensolaris.org/os/licensing.
11908  * See the License for the specific language governing permissions
11909  * and limitations under the License.
11910  *
11911  * When distributing Covered Code, include this CDDL HEADER in each
11912  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11913  * If applicable, add the following below this CDDL HEADER, with the
11914  * fields enclosed by brackets "[]" replaced with your own identifying
11915  * information: Portions Copyright [yyyy] [name of copyright owner]
11916  *
11917  * CDDL HEADER END
11918  */
11919 
11920 /*
11921  * Copyright (c) 2013 Gary Mills
11922  *
11923  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
11924  * Use is subject to license terms.
11925  */
11926 
11927 /*	Copyright (c) 1988 AT&T	*/
11928 /*	  All Rights Reserved  	*/
11929 # 129 "/usr/include/openssl/bn.h" 2 3 4
11930 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
11931 /* e_os2.h */
11932 /* ====================================================================
11933  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
11934  *
11935  * Redistribution and use in source and binary forms, with or without
11936  * modification, are permitted provided that the following conditions
11937  * are met:
11938  *
11939  * 1. Redistributions of source code must retain the above copyright
11940  *    notice, this list of conditions and the following disclaimer.
11941  *
11942  * 2. Redistributions in binary form must reproduce the above copyright
11943  *    notice, this list of conditions and the following disclaimer in
11944  *    the documentation and/or other materials provided with the
11945  *    distribution.
11946  *
11947  * 3. All advertising materials mentioning features or use of this
11948  *    software must display the following acknowledgment:
11949  *    "This product includes software developed by the OpenSSL Project
11950  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11951  *
11952  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11953  *    endorse or promote products derived from this software without
11954  *    prior written permission. For written permission, please contact
11955  *    openssl-core@openssl.org.
11956  *
11957  * 5. Products derived from this software may not be called "OpenSSL"
11958  *    nor may "OpenSSL" appear in their names without prior written
11959  *    permission of the OpenSSL Project.
11960  *
11961  * 6. Redistributions of any form whatsoever must retain the following
11962  *    acknowledgment:
11963  *    "This product includes software developed by the OpenSSL Project
11964  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11965  *
11966  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11967  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11968  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11969  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11970  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11971  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11972  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11973  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11974  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11975  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11976  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11977  * OF THE POSSIBILITY OF SUCH DAMAGE.
11978  * ====================================================================
11979  *
11980  * This product includes cryptographic software written by Eric Young
11981  * (eay@cryptsoft.com).  This product includes software written by Tim
11982  * Hudson (tjh@cryptsoft.com).
11983  *
11984  */
11985 
11986 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
11987 /* opensslconf.h */
11988 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
11989 
11990 
11991 
11992 
11993 /* OpenSSL was configured with the following options: */
11994 # 108 "/usr/include/openssl/opensslconf.h" 3 4
11995 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
11996    asks for it.  This is a transient feature that is provided for those
11997    who haven't had the time to do the appropriate changes in their
11998    applications.  */
11999 # 204 "/usr/include/openssl/opensslconf.h" 3 4
12000 /* crypto/opensslconf.h.in */
12001 
12002 /* Generate 80386 code? */
12003 # 272 "/usr/include/openssl/opensslconf.h" 3 4
12004 /*
12005  * OpenSSL revision 1.521 from 2005-12-15 in OpenSSL_1_0_0-stable branch changed
12006  * 64 bit sparcv9 configuration from SIXTY_FOUR_BIT_LONG to BN_LLONG.
12007  */
12008 
12009 
12010 
12011 
12012 
12013 
12014 /* Should we define BN_DIV2W here? */
12015 
12016 /* Only one for the following should be defined */
12017 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
12018 # 130 "/usr/include/openssl/bn.h" 2 3 4
12019 
12020 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
12021 /*
12022  * CDDL HEADER START
12023  *
12024  * The contents of this file are subject to the terms of the
12025  * Common Development and Distribution License (the "License").
12026  * You may not use this file except in compliance with the License.
12027  *
12028  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12029  * or http://www.opensolaris.org/os/licensing.
12030  * See the License for the specific language governing permissions
12031  * and limitations under the License.
12032  *
12033  * When distributing Covered Code, include this CDDL HEADER in each
12034  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12035  * If applicable, add the following below this CDDL HEADER, with the
12036  * fields enclosed by brackets "[]" replaced with your own identifying
12037  * information: Portions Copyright [yyyy] [name of copyright owner]
12038  *
12039  * CDDL HEADER END
12040  */
12041 
12042 /*
12043  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
12044  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
12045  */
12046 
12047 /*	Copyright (c) 1988 AT&T	*/
12048 /*	  All Rights Reserved  	*/
12049 
12050 /*
12051  * User-visible pieces of the ANSI C standard I/O package.
12052  */
12053 # 132 "/usr/include/openssl/bn.h" 2 3 4
12054 
12055 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
12056 /* ====================================================================
12057  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
12058  *
12059  * Redistribution and use in source and binary forms, with or without
12060  * modification, are permitted provided that the following conditions
12061  * are met:
12062  *
12063  * 1. Redistributions of source code must retain the above copyright
12064  *    notice, this list of conditions and the following disclaimer.
12065  *
12066  * 2. Redistributions in binary form must reproduce the above copyright
12067  *    notice, this list of conditions and the following disclaimer in
12068  *    the documentation and/or other materials provided with the
12069  *    distribution.
12070  *
12071  * 3. All advertising materials mentioning features or use of this
12072  *    software must display the following acknowledgment:
12073  *    "This product includes software developed by the OpenSSL Project
12074  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12075  *
12076  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12077  *    endorse or promote products derived from this software without
12078  *    prior written permission. For written permission, please contact
12079  *    openssl-core@openssl.org.
12080  *
12081  * 5. Products derived from this software may not be called "OpenSSL"
12082  *    nor may "OpenSSL" appear in their names without prior written
12083  *    permission of the OpenSSL Project.
12084  *
12085  * 6. Redistributions of any form whatsoever must retain the following
12086  *    acknowledgment:
12087  *    "This product includes software developed by the OpenSSL Project
12088  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12089  *
12090  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12091  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12092  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12093  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12094  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12095  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12096  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12097  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12098  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12099  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12100  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12101  * OF THE POSSIBILITY OF SUCH DAMAGE.
12102  * ====================================================================
12103  *
12104  * This product includes cryptographic software written by Eric Young
12105  * (eay@cryptsoft.com).  This product includes software written by Tim
12106  * Hudson (tjh@cryptsoft.com).
12107  *
12108  */
12109 # 134 "/usr/include/openssl/bn.h" 2 3 4
12110 # 1 "/usr/include/openssl/crypto.h" 1 3 4
12111 /* crypto/crypto.h */
12112 /* ====================================================================
12113  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
12114  *
12115  * Redistribution and use in source and binary forms, with or without
12116  * modification, are permitted provided that the following conditions
12117  * are met:
12118  *
12119  * 1. Redistributions of source code must retain the above copyright
12120  *    notice, this list of conditions and the following disclaimer.
12121  *
12122  * 2. Redistributions in binary form must reproduce the above copyright
12123  *    notice, this list of conditions and the following disclaimer in
12124  *    the documentation and/or other materials provided with the
12125  *    distribution.
12126  *
12127  * 3. All advertising materials mentioning features or use of this
12128  *    software must display the following acknowledgment:
12129  *    "This product includes software developed by the OpenSSL Project
12130  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12131  *
12132  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12133  *    endorse or promote products derived from this software without
12134  *    prior written permission. For written permission, please contact
12135  *    openssl-core@openssl.org.
12136  *
12137  * 5. Products derived from this software may not be called "OpenSSL"
12138  *    nor may "OpenSSL" appear in their names without prior written
12139  *    permission of the OpenSSL Project.
12140  *
12141  * 6. Redistributions of any form whatsoever must retain the following
12142  *    acknowledgment:
12143  *    "This product includes software developed by the OpenSSL Project
12144  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12145  *
12146  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12147  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12148  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12149  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12150  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12151  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12152  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12153  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12154  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12155  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12156  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12157  * OF THE POSSIBILITY OF SUCH DAMAGE.
12158  * ====================================================================
12159  *
12160  * This product includes cryptographic software written by Eric Young
12161  * (eay@cryptsoft.com).  This product includes software written by Tim
12162  * Hudson (tjh@cryptsoft.com).
12163  *
12164  */
12165 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
12166  * All rights reserved.
12167  *
12168  * This package is an SSL implementation written
12169  * by Eric Young (eay@cryptsoft.com).
12170  * The implementation was written so as to conform with Netscapes SSL.
12171  *
12172  * This library is free for commercial and non-commercial use as long as
12173  * the following conditions are aheared to.  The following conditions
12174  * apply to all code found in this distribution, be it the RC4, RSA,
12175  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
12176  * included with this distribution is covered by the same copyright terms
12177  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
12178  *
12179  * Copyright remains Eric Young's, and as such any Copyright notices in
12180  * the code are not to be removed.
12181  * If this package is used in a product, Eric Young should be given attribution
12182  * as the author of the parts of the library used.
12183  * This can be in the form of a textual message at program startup or
12184  * in documentation (online or textual) provided with the package.
12185  *
12186  * Redistribution and use in source and binary forms, with or without
12187  * modification, are permitted provided that the following conditions
12188  * are met:
12189  * 1. Redistributions of source code must retain the copyright
12190  *    notice, this list of conditions and the following disclaimer.
12191  * 2. Redistributions in binary form must reproduce the above copyright
12192  *    notice, this list of conditions and the following disclaimer in the
12193  *    documentation and/or other materials provided with the distribution.
12194  * 3. All advertising materials mentioning features or use of this software
12195  *    must display the following acknowledgement:
12196  *    "This product includes cryptographic software written by
12197  *     Eric Young (eay@cryptsoft.com)"
12198  *    The word 'cryptographic' can be left out if the rouines from the library
12199  *    being used are not cryptographic related :-).
12200  * 4. If you include any Windows specific code (or a derivative thereof) from
12201  *    the apps directory (application code) you must include an acknowledgement:
12202  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
12203  *
12204  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
12205  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12206  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
12207  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
12208  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
12209  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
12210  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12211  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
12212  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12213  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
12214  * SUCH DAMAGE.
12215  *
12216  * The licence and distribution terms for any publically available version or
12217  * derivative of this code cannot be changed.  i.e. this code cannot simply be
12218  * copied and put under another distribution licence
12219  * [including the GNU Public Licence.]
12220  */
12221 /* ====================================================================
12222  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
12223  * ECDH support in OpenSSL originally developed by
12224  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
12225  */
12226 # 135 "/usr/include/openssl/bn.h" 2 3 4
12227 
12228 
12229 
12230 
12231 
12232 /*
12233  * These preprocessor symbols control various aspects of the bignum headers
12234  * and library code. They're not defined by any "normal" configuration, as
12235  * they are intended for development and testing purposes. NB: defining all
12236  * three can be useful for debugging application code as well as openssl
12237  * itself. BN_DEBUG - turn on various debugging alterations to the bignum
12238  * code BN_DEBUG_RAND - uses random poisoning of unused words to trip up
12239  * mismanagement of bignum internals. You must also define BN_DEBUG.
12240  */
12241 /* #define BN_DEBUG */
12242 /* #define BN_DEBUG_RAND */
12243 
12244 
12245 
12246 
12247 
12248 
12249 
12250 /*
12251  * This next option uses the C libraries (2 word)/(1 word) function. If it is
12252  * not defined, I use my C version (which is slower). The reason for this
12253  * flag is that when the particular C compiler library routine is used, and
12254  * the library is linked with a different compiler, the library is missing.
12255  * This mostly happens when the library is built with gcc and then linked
12256  * using normal cc.  This would be a common occurrence because gcc normally
12257  * produces code that is 2 times faster than system compilers for the big
12258  * number stuff. For machines with only one compiler (or shared libraries),
12259  * this should be on.  Again this in only really a problem on machines using
12260  * "long long's", are 32bit, and are not using my assembler code.
12261  */
12262 
12263 
12264 
12265 
12266 
12267 
12268 
12269 /*
12270  * assuming long is 64bit - this is the DEC Alpha unsigned long long is only
12271  * 64 bits :-(, don't define BN_LLONG for the DEC Alpha
12272  */
12273 # 203 "/usr/include/openssl/bn.h" 3 4
12274 /*
12275  * This is where the long long data type is 64 bits, but long is 32. For
12276  * machines where there are 64bit registers, this is the mode to use. IRIX,
12277  * on R4000 and above should use this mode, along with the relevant assembler
12278  * code :-).  Do NOT define BN_LLONG.
12279  */
12280 # 265 "/usr/include/openssl/bn.h" 3 4
12281 /*
12282  * avoid leaking exponent information through timing,
12283  * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
12284  * BN_div() will call BN_div_no_branch,
12285  * BN_mod_inverse() will call BN_mod_inverse_no_branch.
12286  */
12287 # 284 "/usr/include/openssl/bn.h" 3 4
12288                                        /* used for debuging */
12289 
12290 
12291 
12292 
12293 /*
12294  * get a clone of a BIGNUM with changed flags, for *temporary* use only (the
12295  * two BIGNUMs cannot not be used in parallel!)
12296  */
12297 # 302 "/usr/include/openssl/bn.h" 3 4
12298 /* Already declared in ossl_typ.h */
12299 # 313 "/usr/include/openssl/bn.h" 3 4
12300 struct bignum_st {
12301     unsigned int *d; /* Pointer to an array of 'BN_BITS2' bit
12302                                  * chunks. */
12303     int top; /* Index of last used d +1. */
12304     /* The next are internal book keeping for bn_expand. */
12305     int dmax; /* Size of the d array. */
12306     int neg; /* one if the number is negative */
12307     int flags;
12308 };
12309 
12310 /* Used for montgomery multiplication */
12311 struct bn_mont_ctx_st {
12312     int ri; /* number of bits in R */
12313     BIGNUM RR; /* used to convert to montgomery form */
12314     BIGNUM N; /* The modulus */
12315     BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 (Ni is only
12316                                  * stored for bignum algorithm) */
12317     unsigned int n0[2]; /* least significant word(s) of Ni; (type
12318                                  * changed with 0.9.9, was "BN_ULONG n0;"
12319                                  * before) */
12320     int flags;
12321 };
12322 
12323 /*
12324  * Used for reciprocal division/mod functions It cannot be shared between
12325  * threads
12326  */
12327 struct bn_recp_ctx_st {
12328     BIGNUM N; /* the divisor */
12329     BIGNUM Nr; /* the reciprocal */
12330     int num_bits;
12331     int shift;
12332     int flags;
12333 };
12334 
12335 /* Used for slow "generation" functions. */
12336 struct bn_gencb_st {
12337     unsigned int ver; /* To handle binary (in)compatibility */
12338     void *arg; /* callback-specific data */
12339     union {
12340         /* if(ver==1) - handles old style callbacks */
12341         void (*cb_1) (int, int, void *);
12342         /* if(ver==2) - new callback style */
12343         int (*cb_2) (int, int, BN_GENCB *);
12344     } cb;
12345 };
12346 /* Wrapper function to make using BN_GENCB easier,  */
12347 int BN_GENCB_call(BN_GENCB *cb, int a, int b);
12348 /* Macro to populate a BN_GENCB structure with an "old"-style callback */
12349 
12350 
12351 
12352 
12353 
12354 /* Macro to populate a BN_GENCB structure with a "new"-style callback */
12355 # 377 "/usr/include/openssl/bn.h" 3 4
12356 /*
12357  * BN_prime_checks_for_size() returns the number of Miller-Rabin iterations
12358  * that will be done for checking that a random number is probably prime. The
12359  * error rate for accepting a composite number as prime depends on the size of
12360  * the prime |b|. The error rates used are for calculating an RSA key with 2 primes,
12361  * and so the level is what you would expect for a key of double the size of the
12362  * prime.
12363  *
12364  * This table is generated using the algorithm of FIPS PUB 186-4
12365  * Digital Signature Standard (DSS), section F.1, page 117.
12366  * (https://dx.doi.org/10.6028/NIST.FIPS.186-4)
12367  *
12368  * The following magma script was used to generate the output:
12369  * securitybits:=125;
12370  * k:=1024;
12371  * for t:=1 to 65 do
12372  *   for M:=3 to Floor(2*Sqrt(k-1)-1) do
12373  *     S:=0;
12374  *     // Sum over m
12375  *     for m:=3 to M do
12376  *       s:=0;
12377  *       // Sum over j
12378  *       for j:=2 to m do
12379  *         s+:=(RealField(32)!2)^-(j+(k-1)/j);
12380  *       end for;
12381  *       S+:=2^(m-(m-1)*t)*s;
12382  *     end for;
12383  *     A:=2^(k-2-M*t);
12384  *     B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S;
12385  *     pkt:=2.00743*Log(2)*k*2^-k*(A+B);
12386  *     seclevel:=Floor(-Log(2,pkt));
12387  *     if seclevel ge securitybits then
12388  *       printf "k: %5o, security: %o bits  (t: %o, M: %o)\n",k,seclevel,t,M;
12389  *       break;
12390  *     end if;
12391  *   end for;
12392  *   if seclevel ge securitybits then break; end if;
12393  * end for;
12394  *
12395  * It can be run online at:
12396  * http://magma.maths.usyd.edu.au/calc
12397  *
12398  * And will output:
12399  * k:  1024, security: 129 bits  (t: 6, M: 23)
12400  *
12401  * k is the number of bits of the prime, securitybits is the level we want to
12402  * reach.
12403  *
12404  * prime length | RSA key size | # MR tests | security level
12405  * -------------+--------------|------------+---------------
12406  *  (b) >= 6394 |     >= 12788 |          3 |        256 bit
12407  *  (b) >= 3747 |     >=  7494 |          3 |        192 bit
12408  *  (b) >= 1345 |     >=  2690 |          4 |        128 bit
12409  *  (b) >= 1080 |     >=  2160 |          5 |        128 bit
12410  *  (b) >=  852 |     >=  1704 |          5 |        112 bit
12411  *  (b) >=  476 |     >=   952 |          5 |         80 bit
12412  *  (b) >=  400 |     >=   800 |          6 |         80 bit
12413  *  (b) >=  347 |     >=   694 |          7 |         80 bit
12414  *  (b) >=  308 |     >=   616 |          8 |         80 bit
12415  *  (b) >=   55 |     >=   110 |         27 |         64 bit
12416  *  (b) >=    6 |     >=    12 |         34 |         64 bit
12417  */
12418 # 451 "/usr/include/openssl/bn.h" 3 4
12419 /* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
12420 # 472 "/usr/include/openssl/bn.h" 3 4
12421 const BIGNUM *BN_value_one(void);
12422 char *BN_options(void);
12423 BN_CTX *BN_CTX_new(void);
12424 
12425 void BN_CTX_init(BN_CTX *c);
12426 
12427 void BN_CTX_free(BN_CTX *c);
12428 void BN_CTX_start(BN_CTX *ctx);
12429 BIGNUM *BN_CTX_get(BN_CTX *ctx);
12430 void BN_CTX_end(BN_CTX *ctx);
12431 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
12432 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
12433 int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
12434 int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
12435 int BN_num_bits(const BIGNUM *a);
12436 int BN_num_bits_word(unsigned int);
12437 BIGNUM *BN_new(void);
12438 void BN_init(BIGNUM *);
12439 void BN_clear_free(BIGNUM *a);
12440 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
12441 void BN_swap(BIGNUM *a, BIGNUM *b);
12442 BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
12443 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
12444 BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
12445 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
12446 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12447 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12448 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12449 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12450 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
12451 int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
12452 /** BN_set_negative sets sign of a BIGNUM
12453  * \param  b  pointer to the BIGNUM object
12454  * \param  n  0 if the BIGNUM b should be positive and a value != 0 otherwise
12455  */
12456 void BN_set_negative(BIGNUM *b, int n);
12457 /** BN_is_negative returns 1 if the BIGNUM is negative
12458  * \param  a  pointer to the BIGNUM object
12459  * \return 1 if a < 0 and 0 otherwise
12460  */
12461 
12462 
12463 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
12464            BN_CTX *ctx);
12465 
12466 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
12467 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
12468                BN_CTX *ctx);
12469 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12470                      const BIGNUM *m);
12471 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
12472                BN_CTX *ctx);
12473 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12474                      const BIGNUM *m);
12475 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
12476                BN_CTX *ctx);
12477 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
12478 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
12479 int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
12480 int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
12481                   BN_CTX *ctx);
12482 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
12483 
12484 unsigned int BN_mod_word(const BIGNUM *a, unsigned int w);
12485 unsigned int BN_div_word(BIGNUM *a, unsigned int w);
12486 int BN_mul_word(BIGNUM *a, unsigned int w);
12487 int BN_add_word(BIGNUM *a, unsigned int w);
12488 int BN_sub_word(BIGNUM *a, unsigned int w);
12489 int BN_set_word(BIGNUM *a, unsigned int w);
12490 unsigned int BN_get_word(const BIGNUM *a);
12491 
12492 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
12493 void BN_free(BIGNUM *a);
12494 int BN_is_bit_set(const BIGNUM *a, int n);
12495 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
12496 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
12497 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12498 
12499 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12500                const BIGNUM *m, BN_CTX *ctx);
12501 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12502                     const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
12503 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
12504                               const BIGNUM *m, BN_CTX *ctx,
12505                               BN_MONT_CTX *in_mont);
12506 int BN_mod_exp_mont_word(BIGNUM *r, unsigned int a, const BIGNUM *p,
12507                          const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
12508 int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
12509                      const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
12510                      BN_CTX *ctx, BN_MONT_CTX *m_ctx);
12511 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12512                       const BIGNUM *m, BN_CTX *ctx);
12513 
12514 int BN_mask_bits(BIGNUM *a, int n);
12515 
12516 int BN_print_fp(FILE *fp, const BIGNUM *a);
12517 
12518 
12519 int BN_print(BIO *fp, const BIGNUM *a);
12520 
12521 
12522 
12523 int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
12524 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
12525 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
12526 void BN_clear(BIGNUM *a);
12527 BIGNUM *BN_dup(const BIGNUM *a);
12528 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
12529 int BN_set_bit(BIGNUM *a, int n);
12530 int BN_clear_bit(BIGNUM *a, int n);
12531 char *BN_bn2hex(const BIGNUM *a);
12532 char *BN_bn2dec(const BIGNUM *a);
12533 int BN_hex2bn(BIGNUM **a, const char *str);
12534 int BN_dec2bn(BIGNUM **a, const char *str);
12535 int BN_asc2bn(BIGNUM **a, const char *str);
12536 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
12537 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
12538                                                                   * -2 for
12539                                                                   * error */
12540 BIGNUM *BN_mod_inverse(BIGNUM *ret,
12541                        const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
12542 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
12543                     const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
12544 
12545 void BN_consttime_swap(unsigned int swap, BIGNUM *a, BIGNUM *b, int nwords);
12546 
12547 /* Deprecated versions */
12548 
12549 BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
12550                           const BIGNUM *add, const BIGNUM *rem,
12551                           void (*callback) (int, int, void *), void *cb_arg);
12552 int BN_is_prime(const BIGNUM *p, int nchecks,
12553                 void (*callback) (int, int, void *),
12554                 BN_CTX *ctx, void *cb_arg);
12555 int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
12556                          void (*callback) (int, int, void *), BN_CTX *ctx,
12557                          void *cb_arg, int do_trial_division);
12558 
12559 
12560 /* Newer versions */
12561 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
12562                          const BIGNUM *rem, BN_GENCB *cb);
12563 int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
12564 int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
12565                             int do_trial_division, BN_GENCB *cb);
12566 
12567 int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
12568 
12569 int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
12570                             const BIGNUM *Xp, const BIGNUM *Xp1,
12571                             const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
12572                             BN_GENCB *cb);
12573 int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
12574                               BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
12575                               BN_CTX *ctx, BN_GENCB *cb);
12576 
12577 BN_MONT_CTX *BN_MONT_CTX_new(void);
12578 void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
12579 int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12580                           BN_MONT_CTX *mont, BN_CTX *ctx);
12581 
12582 
12583 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a,
12584                        BN_MONT_CTX *mont, BN_CTX *ctx);
12585 void BN_MONT_CTX_free(BN_MONT_CTX *mont);
12586 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
12587 BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
12588 BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
12589                                     const BIGNUM *mod, BN_CTX *ctx);
12590 
12591 /* BN_BLINDING flags */
12592 
12593 
12594 
12595 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
12596 void BN_BLINDING_free(BN_BLINDING *b);
12597 int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
12598 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
12599 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
12600 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
12601 int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
12602                           BN_CTX *);
12603 
12604 unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);
12605 void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);
12606 
12607 CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);
12608 unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
12609 void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
12610 BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
12611                                       const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
12612                                       int (*bn_mod_exp) (BIGNUM *r,
12613                                                          const BIGNUM *a,
12614                                                          const BIGNUM *p,
12615                                                          const BIGNUM *m,
12616                                                          BN_CTX *ctx,
12617                                                          BN_MONT_CTX *m_ctx),
12618                                       BN_MONT_CTX *m_ctx);
12619 
12620 
12621 void BN_set_params(int mul, int high, int low, int mont);
12622 int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
12623 
12624 
12625 void BN_RECP_CTX_init(BN_RECP_CTX *recp);
12626 BN_RECP_CTX *BN_RECP_CTX_new(void);
12627 void BN_RECP_CTX_free(BN_RECP_CTX *recp);
12628 int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
12629 int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
12630                           BN_RECP_CTX *recp, BN_CTX *ctx);
12631 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12632                     const BIGNUM *m, BN_CTX *ctx);
12633 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
12634                 BN_RECP_CTX *recp, BN_CTX *ctx);
12635 
12636 
12637 
12638 /*
12639  * Functions for arithmetic over binary polynomials represented by BIGNUMs.
12640  * The BIGNUM::neg property of BIGNUMs representing binary polynomials is
12641  * ignored. Note that input arguments are not const so that their bit arrays
12642  * can be expanded to the appropriate size if needed.
12643  */
12644 
12645 /*
12646  * r = a + b
12647  */
12648 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12649 
12650 /*
12651  * r=a mod p
12652  */
12653 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
12654 /* r = (a * b) mod p */
12655 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12656                     const BIGNUM *p, BN_CTX *ctx);
12657 /* r = (a * a) mod p */
12658 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12659 /* r = (1 / b) mod p */
12660 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
12661 /* r = (a / b) mod p */
12662 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12663                     const BIGNUM *p, BN_CTX *ctx);
12664 /* r = (a ^ b) mod p */
12665 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12666                     const BIGNUM *p, BN_CTX *ctx);
12667 /* r = sqrt(a) mod p */
12668 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12669                      BN_CTX *ctx);
12670 /* r^2 + r = a mod p */
12671 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12672                            BN_CTX *ctx);
12673 
12674 /*-
12675  * Some functions allow for representation of the irreducible polynomials
12676  * as an unsigned int[], say p.  The irreducible f(t) is then of the form:
12677  *     t^p[0] + t^p[1] + ... + t^p[k]
12678  * where m = p[0] > p[1] > ... > p[k] = 0.
12679  */
12680 /* r = a mod p */
12681 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
12682 /* r = (a * b) mod p */
12683 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12684                         const int p[], BN_CTX *ctx);
12685 /* r = (a * a) mod p */
12686 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
12687                         BN_CTX *ctx);
12688 /* r = (1 / b) mod p */
12689 int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
12690                         BN_CTX *ctx);
12691 /* r = (a / b) mod p */
12692 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12693                         const int p[], BN_CTX *ctx);
12694 /* r = (a ^ b) mod p */
12695 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12696                         const int p[], BN_CTX *ctx);
12697 /* r = sqrt(a) mod p */
12698 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
12699                          const int p[], BN_CTX *ctx);
12700 /* r^2 + r = a mod p */
12701 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
12702                                const int p[], BN_CTX *ctx);
12703 int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
12704 int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
12705 
12706 
12707 
12708 /*
12709  * faster mod functions for the 'NIST primes' 0 <= a < p^2
12710  */
12711 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12712 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12713 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12714 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12715 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12716 
12717 const BIGNUM *BN_get0_nist_prime_192(void);
12718 const BIGNUM *BN_get0_nist_prime_224(void);
12719 const BIGNUM *BN_get0_nist_prime_256(void);
12720 const BIGNUM *BN_get0_nist_prime_384(void);
12721 const BIGNUM *BN_get0_nist_prime_521(void);
12722 
12723 /* library internal functions */
12724 # 788 "/usr/include/openssl/bn.h" 3 4
12725 BIGNUM *bn_expand2(BIGNUM *a, int words);
12726 
12727 BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
12728 
12729 
12730 /*-
12731  * Bignum consistency macros
12732  * There is one "API" macro, bn_fix_top(), for stripping leading zeroes from
12733  * bignum data after direct manipulations on the data. There is also an
12734  * "internal" macro, bn_check_top(), for verifying that there are no leading
12735  * zeroes. Unfortunately, some auditing is required due to the fact that
12736  * bn_fix_top() has become an overabused duct-tape because bignum data is
12737  * occasionally passed around in an inconsistent state. So the following
12738  * changes have been made to sort this out;
12739  * - bn_fix_top()s implementation has been moved to bn_correct_top()
12740  * - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and
12741  *   bn_check_top() is as before.
12742  * - if BN_DEBUG *is* defined;
12743  *   - bn_check_top() tries to pollute unused words even if the bignum 'top' is
12744  *     consistent. (ed: only if BN_DEBUG_RAND is defined)
12745  *   - bn_fix_top() maps to bn_check_top() rather than "fixing" anything.
12746  * The idea is to have debug builds flag up inconsistent bignums when they
12747  * occur. If that occurs in a bn_fix_top(), we examine the code in question; if
12748  * the use of bn_fix_top() was appropriate (ie. it follows directly after code
12749  * that manipulates the bignum) it is converted to bn_correct_top(), and if it
12750  * was not appropriate, we convert it permanently to bn_check_top() and track
12751  * down the cause of the bug. Eventually, no internal code should be using the
12752  * bn_fix_top() macro. External applications and libraries should try this with
12753  * their own code too, both in terms of building against the openssl headers
12754  * with BN_DEBUG defined *and* linking with a version of OpenSSL built with it
12755  * defined. This not only improves external code, it provides more test
12756  * coverage for openssl's own code.
12757  */
12758 # 914 "/usr/include/openssl/bn.h" 3 4
12759 unsigned int bn_mul_add_words(unsigned int *rp, const unsigned int *ap, int num,
12760                           unsigned int w);
12761 unsigned int bn_mul_words(unsigned int *rp, const unsigned int *ap, int num, unsigned int w);
12762 void bn_sqr_words(unsigned int *rp, const unsigned int *ap, int num);
12763 unsigned int bn_div_words(unsigned int h, unsigned int l, unsigned int d);
12764 unsigned int bn_add_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
12765                       int num);
12766 unsigned int bn_sub_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
12767                       int num);
12768 
12769 /* Primes from RFC 2409 */
12770 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
12771 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
12772 
12773 /* Primes from RFC 3526 */
12774 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
12775 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
12776 BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
12777 BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
12778 BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
12779 BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
12780 
12781 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
12782 
12783 /* BEGIN ERROR CODES */
12784 /*
12785  * The following lines are auto generated by the script mkerr.pl. Any changes
12786  * made after this point may be overwritten when the script is next run.
12787  */
12788 void ERR_load_BN_strings(void);
12789 
12790 /* Error codes for the BN functions. */
12791 
12792 /* Function codes. */
12793 # 991 "/usr/include/openssl/bn.h" 3 4
12794 /* Reason codes. */
12795 # 75 "/usr/include/openssl/asn1.h" 2 3 4
12796 # 132 "/usr/include/openssl/asn1.h" 3 4
12797 /* For use with d2i_ASN1_type_bytes() */
12798 # 152 "/usr/include/openssl/asn1.h" 3 4
12799 /* For use with ASN1_mbstring_copy() */
12800 # 161 "/usr/include/openssl/asn1.h" 3 4
12801     struct X509_algor_st;
12802 struct stack_st_X509_ALGOR { _STACK stack; };
12803 
12804 
12805 
12806 
12807 /*
12808  * We MUST make sure that, except for constness, asn1_ctx_st and
12809  * asn1_const_ctx are exactly the same.  Fortunately, as soon as the old ASN1
12810  * parsing macros are gone, we can throw this away as well...
12811  */
12812 typedef struct asn1_ctx_st {
12813     unsigned char *p; /* work char pointer */
12814     int eos; /* end of sequence read for indefinite
12815                                  * encoding */
12816     int error; /* error code to use when returning an error */
12817     int inf; /* constructed if 0x20, indefinite is 0x21 */
12818     int tag; /* tag from last 'get object' */
12819     int xclass; /* class from last 'get object' */
12820     long slen; /* length of last 'get object' */
12821     unsigned char *max; /* largest value of p allowed */
12822     unsigned char *q; /* temporary variable */
12823     unsigned char **pp; /* variable */
12824     int line; /* used in error processing */
12825 } ASN1_CTX;
12826 
12827 typedef struct asn1_const_ctx_st {
12828     const unsigned char *p; /* work char pointer */
12829     int eos; /* end of sequence read for indefinite
12830                                  * encoding */
12831     int error; /* error code to use when returning an error */
12832     int inf; /* constructed if 0x20, indefinite is 0x21 */
12833     int tag; /* tag from last 'get object' */
12834     int xclass; /* class from last 'get object' */
12835     long slen; /* length of last 'get object' */
12836     const unsigned char *max; /* largest value of p allowed */
12837     const unsigned char *q; /* temporary variable */
12838     const unsigned char **pp; /* variable */
12839     int line; /* used in error processing */
12840 } ASN1_const_CTX;
12841 
12842 /*
12843  * These are used internally in the ASN1_OBJECT to keep track of whether the
12844  * names and data need to be free()ed
12845  */
12846 
12847 
12848 
12849 
12850 struct asn1_object_st {
12851     const char *sn, *ln;
12852     int nid;
12853     int length;
12854     const unsigned char *data; /* data remains const after init */
12855     int flags; /* Should we free this one */
12856 };
12857 
12858 
12859 /*
12860  * This indicates that the ASN1_STRING is not a real value but just a place
12861  * holder for the location where indefinite length constructed data should be
12862  * inserted in the memory buffer
12863  */
12864 
12865 
12866 /*
12867  * This flag is used by the CMS code to indicate that a string is not
12868  * complete and is a place holder for content when it had all been accessed.
12869  * The flag will be reset when content has been written to it.
12870  */
12871 
12872 
12873 /*
12874  * This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
12875  * type.
12876  */
12877 
12878 /* This is the base type that holds just about everything :-) */
12879 struct asn1_string_st {
12880     int length;
12881     int type;
12882     unsigned char *data;
12883     /*
12884      * The value of the following field depends on the type being held.  It
12885      * is mostly being used for BIT_STRING so if the input data has a
12886      * non-zero 'unused bits' value, it will be handled correctly
12887      */
12888     long flags;
12889 };
12890 
12891 /*
12892  * ASN1_ENCODING structure: this is used to save the received encoding of an
12893  * ASN1 type. This is useful to get round problems with invalid encodings
12894  * which can break signatures.
12895  */
12896 
12897 typedef struct ASN1_ENCODING_st {
12898     unsigned char *enc; /* DER encoding */
12899     long len; /* Length of encoding */
12900     int modified; /* set to 1 if 'enc' is invalid */
12901 } ASN1_ENCODING;
12902 
12903 /* Used with ASN1 LONG type: if a long is set to this it is omitted */
12904 # 272 "/usr/include/openssl/asn1.h" 3 4
12905 typedef struct asn1_string_table_st {
12906     int nid;
12907     long minsize;
12908     long maxsize;
12909     unsigned long mask;
12910     unsigned long flags;
12911 } ASN1_STRING_TABLE;
12912 
12913 struct stack_st_ASN1_STRING_TABLE { _STACK stack; };
12914 
12915 /* size limits: this stuff is taken straight from RFC2459 */
12916 # 293 "/usr/include/openssl/asn1.h" 3 4
12917 /*
12918  * Declarations for template structures: for full definitions see asn1t.h
12919  */
12920 typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
12921 typedef struct ASN1_TLC_st ASN1_TLC;
12922 /* This is just an opaque pointer */
12923 typedef struct ASN1_VALUE_st ASN1_VALUE;
12924 
12925 /* Declare ASN1 functions: the implement macro in in asn1t.h */
12926 # 363 "/usr/include/openssl/asn1.h" 3 4
12927 typedef void *d2i_of_void(void **,const unsigned char **,long); typedef int i2d_of_void(void *,unsigned char **);
12928 
12929 /*-
12930  * The following macros and typedefs allow an ASN1_ITEM
12931  * to be embedded in a structure and referenced. Since
12932  * the ASN1_ITEM pointers need to be globally accessible
12933  * (possibly from shared libraries) they may exist in
12934  * different forms. On platforms that support it the
12935  * ASN1_ITEM structure itself will be globally exported.
12936  * Other platforms will export a function that returns
12937  * an ASN1_ITEM pointer.
12938  *
12939  * To handle both cases transparently the macros below
12940  * should be used instead of hard coding an ASN1_ITEM
12941  * pointer in a structure.
12942  *
12943  * The structure will look like this:
12944  *
12945  * typedef struct SOMETHING_st {
12946  *      ...
12947  *      ASN1_ITEM_EXP *iptr;
12948  *      ...
12949  * } SOMETHING;
12950  *
12951  * It would be initialised as e.g.:
12952  *
12953  * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
12954  *
12955  * and the actual pointer extracted with:
12956  *
12957  * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
12958  *
12959  * Finally an ASN1_ITEM pointer can be extracted from an
12960  * appropriate reference with: ASN1_ITEM_rptr(X509). This
12961  * would be used when a function takes an ASN1_ITEM * argument.
12962  *
12963  */
12964 
12965 
12966 
12967 /* ASN1_ITEM pointer exported type */
12968 typedef const ASN1_ITEM ASN1_ITEM_EXP;
12969 
12970 /* Macro to obtain ASN1_ITEM pointer from exported type */
12971 
12972 
12973 /* Macro to include ASN1_ITEM pointer from base type */
12974 # 440 "/usr/include/openssl/asn1.h" 3 4
12975 /* Parameters used by ASN1_STRING_print_ex() */
12976 
12977 /*
12978  * These determine which characters to escape: RFC2253 special characters,
12979  * control characters and MSB set characters
12980  */
12981 
12982 
12983 
12984 
12985 
12986 /*
12987  * This flag determines how we do escaping: normally RC2253 backslash only,
12988  * set this to use backslash and quote.
12989  */
12990 
12991 
12992 
12993 /* These three flags are internal use only. */
12994 
12995 /* Character is a valid PrintableString character */
12996 
12997 /* Character needs escaping if it is the first character */
12998 
12999 /* Character needs escaping if it is the last character */
13000 
13001 
13002 /*
13003  * NB the internal flags are safely reused below by flags handled at the top
13004  * level.
13005  */
13006 
13007 /*
13008  * If this is set we convert all character strings to UTF8 first
13009  */
13010 
13011 
13012 
13013 /*
13014  * If this is set we don't attempt to interpret content: just assume all
13015  * strings are 1 byte per character. This will produce some pretty odd
13016  * looking output!
13017  */
13018 
13019 
13020 
13021 /* If this is set we include the string type in the output */
13022 
13023 
13024 /*
13025  * This determines which strings to display and which to 'dump' (hex dump of
13026  * content octets or DER encoding). We can only dump non character strings or
13027  * everything. If we don't dump 'unknown' they are interpreted as character
13028  * strings with 1 octet per character and are subject to the usual escaping
13029  * options.
13030  */
13031 
13032 
13033 
13034 
13035 /*
13036  * These determine what 'dumping' does, we can dump the content octets or the
13037  * DER encoding: both use the RFC2253 #XXXXX notation.
13038  */
13039 
13040 
13041 
13042 /*
13043  * All the string flags consistent with RFC2253, escaping control characters
13044  * isn't essential in RFC2253 but it is advisable anyway.
13045  */
13046 # 519 "/usr/include/openssl/asn1.h" 3 4
13047 struct stack_st_ASN1_INTEGER { _STACK stack; };
13048 
13049 
13050 struct stack_st_ASN1_GENERALSTRING { _STACK stack; };
13051 
13052 typedef struct asn1_type_st {
13053     int type;
13054     union {
13055         char *ptr;
13056         ASN1_BOOLEAN boolean;
13057         ASN1_STRING *asn1_string;
13058         ASN1_OBJECT *object;
13059         ASN1_INTEGER *integer;
13060         ASN1_ENUMERATED *enumerated;
13061         ASN1_BIT_STRING *bit_string;
13062         ASN1_OCTET_STRING *octet_string;
13063         ASN1_PRINTABLESTRING *printablestring;
13064         ASN1_T61STRING *t61string;
13065         ASN1_IA5STRING *ia5string;
13066         ASN1_GENERALSTRING *generalstring;
13067         ASN1_BMPSTRING *bmpstring;
13068         ASN1_UNIVERSALSTRING *universalstring;
13069         ASN1_UTCTIME *utctime;
13070         ASN1_GENERALIZEDTIME *generalizedtime;
13071         ASN1_VISIBLESTRING *visiblestring;
13072         ASN1_UTF8STRING *utf8string;
13073         /*
13074          * set and sequence are left complete and still contain the set or
13075          * sequence bytes
13076          */
13077         ASN1_STRING *set;
13078         ASN1_STRING *sequence;
13079         ASN1_VALUE *asn1_value;
13080     } value;
13081 } ASN1_TYPE;
13082 
13083 struct stack_st_ASN1_TYPE { _STACK stack; };
13084 
13085 
13086 typedef struct stack_st_ASN1_TYPE ASN1_SEQUENCE_ANY;
13087 
13088 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;
13089 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;
13090 
13091 typedef struct NETSCAPE_X509_st {
13092     ASN1_OCTET_STRING *header;
13093     X509 *cert;
13094 } NETSCAPE_X509;
13095 
13096 /* This is used to contain a list of bit names */
13097 typedef struct BIT_STRING_BITNAME_st {
13098     int bitnum;
13099     const char *lname;
13100     const char *sname;
13101 } BIT_STRING_BITNAME;
13102 
13103 
13104 
13105 
13106 
13107 
13108 /* Macros for string operations */
13109 # 772 "/usr/include/openssl/asn1.h" 3 4
13110   /* for the is_set parameter to i2d_ASN1_SET */
13111 
13112 
13113 
13114 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;
13115 
13116 int ASN1_TYPE_get(ASN1_TYPE *a);
13117 void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
13118 int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
13119 int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
13120 
13121 ASN1_OBJECT *ASN1_OBJECT_new(void);
13122 void ASN1_OBJECT_free(ASN1_OBJECT *a);
13123 int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp);
13124 ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
13125                              long length);
13126 ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
13127                              long length);
13128 
13129 extern const ASN1_ITEM ASN1_OBJECT_it;
13130 
13131 struct stack_st_ASN1_OBJECT { _STACK stack; };
13132 
13133 
13134 ASN1_STRING *ASN1_STRING_new(void);
13135 void ASN1_STRING_free(ASN1_STRING *a);
13136 void ASN1_STRING_clear_free(ASN1_STRING *a);
13137 int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
13138 ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a);
13139 ASN1_STRING *ASN1_STRING_type_new(int type);
13140 int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
13141   /*
13142    * Since this is used to store all sorts of things, via macros, for now,
13143    * make its data void *
13144    */
13145 int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
13146 void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
13147 int ASN1_STRING_length(const ASN1_STRING *x);
13148 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
13149 int ASN1_STRING_type(ASN1_STRING *x);
13150 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
13151 
13152 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;
13153 int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp);
13154 ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
13155                                      const unsigned char **pp, long length);
13156 int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
13157 int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
13158 int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);
13159 int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a,
13160                           unsigned char *flags, int flags_len);
13161 
13162 
13163 int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
13164                                BIT_STRING_BITNAME *tbl, int indent);
13165 
13166 int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl);
13167 int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
13168                             BIT_STRING_BITNAME *tbl);
13169 
13170 int i2d_ASN1_BOOLEAN(int a, unsigned char **pp);
13171 int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length);
13172 
13173 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;
13174 int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp);
13175 ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp,
13176                                long length);
13177 ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
13178                                 long length);
13179 ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x);
13180 int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
13181 
13182 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;
13183 
13184 int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
13185 ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
13186 ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
13187                                int offset_day, long offset_sec);
13188 int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
13189 int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
13190 
13191 
13192 
13193 
13194 int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
13195 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
13196                                                time_t t);
13197 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
13198                                                time_t t, int offset_day,
13199                                                long offset_sec);
13200 int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
13201 int ASN1_TIME_diff(int *pday, int *psec,
13202                    const ASN1_TIME *from, const ASN1_TIME *to);
13203 
13204 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;
13205 ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a);
13206 int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
13207                           const ASN1_OCTET_STRING *b);
13208 int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
13209                           int len);
13210 
13211 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;
13212 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;
13213 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;
13214 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;
13215 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;
13216 
13217 int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
13218 int UTF8_putc(unsigned char *str, int len, unsigned long value);
13219 
13220 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;
13221 
13222 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;
13223 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;
13224 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;
13225 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;
13226 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;
13227 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;
13228 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;
13229 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;
13230 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;
13231 
13232 extern const ASN1_ITEM ASN1_OCTET_STRING_NDEF_it;
13233 
13234 ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
13235 ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
13236                          int offset_day, long offset_sec);
13237 int ASN1_TIME_check(ASN1_TIME *t);
13238 ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME
13239                                                    **out);
13240 int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
13241 
13242 int i2d_ASN1_SET(struct stack_st_OPENSSL_BLOCK *a, unsigned char **pp,
13243                  i2d_of_void *i2d, int ex_tag, int ex_class, int is_set);
13244 struct stack_st_OPENSSL_BLOCK *d2i_ASN1_SET(struct stack_st_OPENSSL_BLOCK **a,
13245                                       const unsigned char **pp,
13246                                       long length, d2i_of_void *d2i,
13247                                       void (*free_func) (OPENSSL_BLOCK),
13248                                       int ex_tag, int ex_class);
13249 
13250 
13251 int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);
13252 int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
13253 int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
13254 int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
13255 int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a);
13256 int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
13257 int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type);
13258 
13259 int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a);
13260 
13261 int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
13262 ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
13263                                 const char *sn, const char *ln);
13264 
13265 int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
13266 long ASN1_INTEGER_get(const ASN1_INTEGER *a);
13267 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
13268 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
13269 
13270 int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
13271 long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a);
13272 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai);
13273 BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn);
13274 
13275 /* General */
13276 /* given a string, return the correct type, max is the maximum length */
13277 int ASN1_PRINTABLE_type(const unsigned char *s, int max);
13278 
13279 int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass);
13280 ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
13281                             long length, int Ptag, int Pclass);
13282 unsigned long ASN1_tag2bit(int tag);
13283 /* type is one or more of the B_ASN1_ values. */
13284 ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp,
13285                                  long length, int type);
13286 
13287 /* PARSING */
13288 int asn1_Finish(ASN1_CTX *c);
13289 int asn1_const_Finish(ASN1_const_CTX *c);
13290 
13291 /* SPECIALS */
13292 int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
13293                     int *pclass, long omax);
13294 int ASN1_check_infinite_end(unsigned char **p, long len);
13295 int ASN1_const_check_infinite_end(const unsigned char **p, long len);
13296 void ASN1_put_object(unsigned char **pp, int constructed, int length,
13297                      int tag, int xclass);
13298 int ASN1_put_eoc(unsigned char **pp);
13299 int ASN1_object_size(int constructed, int length, int tag);
13300 
13301 /* Used to implement other functions */
13302 void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);
13303 # 976 "/usr/include/openssl/asn1.h" 3 4
13304 void *ASN1_item_dup(const ASN1_ITEM *it, void *x);
13305 
13306 /* ASN1 alloc/free macros for when a type is only used internally */
13307 
13308 
13309 
13310 
13311 
13312 
13313 void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
13314 
13315 
13316 
13317 
13318 
13319 
13320 
13321 void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
13322 int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x);
13323 # 1006 "/usr/include/openssl/asn1.h" 3 4
13324 int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x);
13325 int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);
13326 
13327 
13328 int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in);
13329 
13330 
13331 void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
13332 
13333 
13334 
13335 
13336 
13337 
13338 
13339 void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x);
13340 int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x);
13341 # 1034 "/usr/include/openssl/asn1.h" 3 4
13342 int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x);
13343 int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
13344 int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
13345 int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);
13346 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
13347 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);
13348 int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
13349                   unsigned char *buf, int off);
13350 int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
13351 int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
13352                     int dump);
13353 
13354 const char *ASN1_tag2str(int tag);
13355 
13356 /* Used to load and write netscape format cert */
13357 
13358 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;
13359 
13360 int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
13361 
13362 int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
13363 int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, int max_len);
13364 int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
13365                                   unsigned char *data, int len);
13366 int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num,
13367                                   unsigned char *data, int max_len);
13368 
13369 struct stack_st_OPENSSL_BLOCK *ASN1_seq_unpack(const unsigned char *buf, int len,
13370                                          d2i_of_void *d2i,
13371                                          void (*free_func) (OPENSSL_BLOCK));
13372 unsigned char *ASN1_seq_pack(struct stack_st_OPENSSL_BLOCK *safes, i2d_of_void *i2d,
13373                              unsigned char **buf, int *len);
13374 void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);
13375 void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
13376 ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d,
13377                               ASN1_OCTET_STRING **oct);
13378 
13379 
13380 
13381 
13382 
13383 
13384 ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
13385                             ASN1_OCTET_STRING **oct);
13386 
13387 void ASN1_STRING_set_default_mask(unsigned long mask);
13388 int ASN1_STRING_set_default_mask_asc(const char *p);
13389 unsigned long ASN1_STRING_get_default_mask(void);
13390 int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
13391                        int inform, unsigned long mask);
13392 int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
13393                         int inform, unsigned long mask,
13394                         long minsize, long maxsize);
13395 
13396 ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
13397                                     const unsigned char *in, int inlen,
13398                                     int inform, int nid);
13399 ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
13400 int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
13401 void ASN1_STRING_TABLE_cleanup(void);
13402 
13403 /* ASN1 template functions */
13404 
13405 /* Old API compatible functions */
13406 ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
13407 void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
13408 ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
13409                           long len, const ASN1_ITEM *it);
13410 int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
13411 int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out,
13412                        const ASN1_ITEM *it);
13413 
13414 void ASN1_add_oid_module(void);
13415 
13416 ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf);
13417 ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
13418 
13419 /* ASN1 Print flags */
13420 
13421 /* Indicate missing OPTIONAL fields */
13422 
13423 /* Mark start and end of SEQUENCE */
13424 
13425 /* Mark start and end of SEQUENCE/SET OF */
13426 
13427 /* Show the ASN1 type of primitives */
13428 
13429 /* Don't show ASN1 type of ANY */
13430 
13431 /* Don't show ASN1 type of MSTRINGs */
13432 
13433 /* Don't show field names in SEQUENCE */
13434 
13435 /* Show structure names of each SEQUENCE field */
13436 
13437 /* Don't show structure name even at top level */
13438 
13439 
13440 int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent,
13441                     const ASN1_ITEM *it, const ASN1_PCTX *pctx);
13442 ASN1_PCTX *ASN1_PCTX_new(void);
13443 void ASN1_PCTX_free(ASN1_PCTX *p);
13444 unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p);
13445 void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
13446 unsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p);
13447 void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
13448 unsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p);
13449 void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
13450 unsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p);
13451 void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
13452 unsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p);
13453 void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
13454 
13455 BIO_METHOD *BIO_f_asn1(void);
13456 
13457 BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
13458 
13459 int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
13460                         const ASN1_ITEM *it);
13461 int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
13462                               const char *hdr, const ASN1_ITEM *it);
13463 int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
13464                      int ctype_nid, int econt_nid,
13465                      struct stack_st_X509_ALGOR *mdalgs, const ASN1_ITEM *it);
13466 ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
13467 int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
13468 int SMIME_text(BIO *in, BIO *out);
13469 
13470 /* BEGIN ERROR CODES */
13471 /*
13472  * The following lines are auto generated by the script mkerr.pl. Any changes
13473  * made after this point may be overwritten when the script is next run.
13474  */
13475 
13476 void ERR_load_ASN1_strings(void);
13477 
13478 /* Error codes for the ASN1 functions. */
13479 
13480 /* Function codes. */
13481 # 1298 "/usr/include/openssl/asn1.h" 3 4
13482 /* Reason codes. */
13483 # 966 "/usr/include/openssl/objects.h" 2 3 4
13484 # 984 "/usr/include/openssl/objects.h" 3 4
13485 typedef struct obj_name_st {
13486     int type;
13487     int alias;
13488     const char *name;
13489     const char *data;
13490 } OBJ_NAME;
13491 
13492 
13493 
13494 int OBJ_NAME_init(void);
13495 int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
13496                        int (*cmp_func) (const char *, const char *),
13497                        void (*free_func) (const char *, int, const char *));
13498 const char *OBJ_NAME_get(const char *name, int type);
13499 int OBJ_NAME_add(const char *name, int type, const char *data);
13500 int OBJ_NAME_remove(const char *name, int type);
13501 void OBJ_NAME_cleanup(int type); /* -1 for everything */
13502 void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg),
13503                      void *arg);
13504 void OBJ_NAME_do_all_sorted(int type,
13505                             void (*fn) (const OBJ_NAME *, void *arg),
13506                             void *arg);
13507 
13508 ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o);
13509 ASN1_OBJECT *OBJ_nid2obj(int n);
13510 const char *OBJ_nid2ln(int n);
13511 const char *OBJ_nid2sn(int n);
13512 int OBJ_obj2nid(const ASN1_OBJECT *o);
13513 ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name);
13514 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
13515 int OBJ_txt2nid(const char *s);
13516 int OBJ_ln2nid(const char *s);
13517 int OBJ_sn2nid(const char *s);
13518 int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
13519 const void *OBJ_bsearch_(const void *key, const void *base, int num, int size,
13520                          int (*cmp) (const void *, const void *));
13521 const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
13522                             int size,
13523                             int (*cmp) (const void *, const void *),
13524                             int flags);
13525 # 1035 "/usr/include/openssl/objects.h" 3 4
13526 /*-
13527  * Unsolved problem: if a type is actually a pointer type, like
13528  * nid_triple is, then its impossible to get a const where you need
13529  * it. Consider:
13530  *
13531  * typedef int nid_triple[3];
13532  * const void *a_;
13533  * const nid_triple const *a = a_;
13534  *
13535  * The assignement discards a const because what you really want is:
13536  *
13537  * const int const * const *a = a_;
13538  *
13539  * But if you do that, you lose the fact that a is an array of 3 ints,
13540  * which breaks comparison functions.
13541  *
13542  * Thus we end up having to cast, sadly, or unpack the
13543  * declarations. Or, as I finally did in this case, delcare nid_triple
13544  * to be a struct, which it should have been in the first place.
13545  *
13546  * Ben, August 2008.
13547  *
13548  * Also, strictly speaking not all types need be const, but handling
13549  * the non-constness means a lot of complication, and in practice
13550  * comparison routines do always not touch their arguments.
13551  */
13552 # 1104 "/usr/include/openssl/objects.h" 3 4
13553 int OBJ_new_nid(int num);
13554 int OBJ_add_object(const ASN1_OBJECT *obj);
13555 int OBJ_create(const char *oid, const char *sn, const char *ln);
13556 void OBJ_cleanup(void);
13557 int OBJ_create_objects(BIO *in);
13558 
13559 int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);
13560 int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
13561 int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
13562 void OBJ_sigid_free(void);
13563 
13564 extern int obj_cleanup_defer;
13565 void check_defer(int nid);
13566 
13567 /* BEGIN ERROR CODES */
13568 /*
13569  * The following lines are auto generated by the script mkerr.pl. Any changes
13570  * made after this point may be overwritten when the script is next run.
13571  */
13572 void ERR_load_OBJ_strings(void);
13573 
13574 /* Error codes for the OBJ functions. */
13575 
13576 /* Function codes. */
13577 # 1136 "/usr/include/openssl/objects.h" 3 4
13578 /* Reason codes. */
13579 # 95 "/usr/include/openssl/evp.h" 2 3 4
13580 # 125 "/usr/include/openssl/evp.h" 3 4
13581 /*
13582  * Type needs to be a bit field Sub-type needs to be for variations on the
13583  * method, as in, can it do arbitrary encryption....
13584  */
13585 struct evp_pkey_st {
13586     int type;
13587     int save_type;
13588     int references;
13589     const EVP_PKEY_ASN1_METHOD *ameth;
13590     ENGINE *engine;
13591     union {
13592         char *ptr;
13593 
13594         struct rsa_st *rsa; /* RSA */
13595 
13596 
13597         struct dsa_st *dsa; /* DSA */
13598 
13599 
13600         struct dh_st *dh; /* DH */
13601 
13602 
13603         struct ec_key_st *ec; /* ECC */
13604 
13605     } pkey;
13606     int save_parameters;
13607     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
13608 } /* EVP_PKEY */ ;
13609 
13610 
13611 
13612 
13613 
13614 
13615 
13616 struct env_md_st {
13617     int type;
13618     int pkey_type;
13619     int md_size;
13620     unsigned long flags;
13621     int (*init) (EVP_MD_CTX *ctx);
13622     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
13623     int (*final) (EVP_MD_CTX *ctx, unsigned char *md);
13624     int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from);
13625     int (*cleanup) (EVP_MD_CTX *ctx);
13626     /* FIXME: prototype these some day */
13627     int (*sign) (int type, const unsigned char *m, unsigned int m_length,
13628                  unsigned char *sigret, unsigned int *siglen, void *key);
13629     int (*verify) (int type, const unsigned char *m, unsigned int m_length,
13630                    const unsigned char *sigbuf, unsigned int siglen,
13631                    void *key);
13632     int required_pkey_type[5]; /* EVP_PKEY_xxx */
13633     int block_size;
13634     int ctx_size; /* how big does the ctx->md_data need to be */
13635     /* control function */
13636     int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
13637 } /* EVP_MD */ ;
13638 
13639 typedef int evp_sign_method(int type, const unsigned char *m,
13640                             unsigned int m_length, unsigned char *sigret,
13641                             unsigned int *siglen, void *key);
13642 typedef int evp_verify_method(int type, const unsigned char *m,
13643                               unsigned int m_length,
13644                               const unsigned char *sigbuf,
13645                               unsigned int siglen, void *key);
13646 
13647 /* digest can only handle a single block */
13648 
13649 
13650 /*
13651  * digest is a "clone" digest used
13652  * which is a copy of an existing
13653  * one for a specific public key type.
13654  * EVP_dss1() etc
13655  */
13656 
13657 
13658 /* Digest uses EVP_PKEY_METHOD for signing instead of MD specific signing */
13659 
13660 
13661 
13662 /* DigestAlgorithmIdentifier flags... */
13663 
13664 
13665 
13666 /* NULL or absent parameter accepted. Use NULL */
13667 
13668 
13669 
13670 /* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */
13671 
13672 
13673 
13674 /* Custom handling via ctrl */
13675 
13676 
13677 
13678 /* Note if suitable for use in FIPS mode */
13679 
13680 
13681 /* Digest ctrls */
13682 
13683 
13684 
13685 
13686 /* Minimum Algorithm specific ctrl value */
13687 # 268 "/usr/include/openssl/evp.h" 3 4
13688 struct env_md_ctx_st {
13689     const EVP_MD *digest;
13690     ENGINE *engine; /* functional reference if 'digest' is
13691                                  * ENGINE-provided */
13692     unsigned long flags;
13693     void *md_data;
13694     /* Public key context for sign/verify */
13695     EVP_PKEY_CTX *pctx;
13696     /* Update function: usually copied from EVP_MD */
13697     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
13698 } /* EVP_MD_CTX */ ;
13699 
13700 /* values for EVP_MD_CTX flags */
13701 
13702 
13703 
13704 
13705 
13706 
13707 
13708 /*
13709  * FIPS and pad options are ignored in 1.0.0, definitions are here so we
13710  * don't accidentally reuse the values for other purposes.
13711  */
13712 
13713 
13714 
13715 
13716 /*
13717  * The following PAD options are also currently ignored in 1.0.0, digest
13718  * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*()
13719  * instead.
13720  */
13721 
13722 
13723 
13724 
13725 
13726 
13727 
13728 struct evp_cipher_st {
13729     int nid;
13730     int block_size;
13731     /* Default value for variable length ciphers */
13732     int key_len;
13733     int iv_len;
13734     /* Various flags */
13735     unsigned long flags;
13736     /* init key */
13737     int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key,
13738                  const unsigned char *iv, int enc);
13739     /* encrypt/decrypt data */
13740     int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out,
13741                       const unsigned char *in, size_t inl);
13742     /* cleanup ctx */
13743     int (*cleanup) (EVP_CIPHER_CTX *);
13744     /* how big ctx->cipher_data needs to be */
13745     int ctx_size;
13746     /* Populate a ASN1_TYPE with parameters */
13747     int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
13748     /* Get parameters from a ASN1_TYPE */
13749     int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
13750     /* Miscellaneous operations */
13751     int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr);
13752     /* Application data */
13753     void *app_data;
13754 } /* EVP_CIPHER */ ;
13755 
13756 /* Values for cipher flags */
13757 
13758 /* Modes for ciphers */
13759 # 351 "/usr/include/openssl/evp.h" 3 4
13760 /* Set if variable length cipher */
13761 
13762 /* Set if the iv handling should be done by the cipher itself */
13763 
13764 /* Set if the cipher's init() function should be called if key is NULL */
13765 
13766 /* Call ctrl() to init cipher parameters */
13767 
13768 /* Don't use standard key length function */
13769 
13770 /* Don't use standard block padding */
13771 
13772 /* cipher handles random key generation */
13773 
13774 /* cipher has its own additional copying logic */
13775 
13776 /* Allow use default ASN1 get/set iv */
13777 
13778 /* Buffer length in bits not bytes: CFB1 mode only */
13779 
13780 /* Note if suitable for use in FIPS mode */
13781 
13782 /* Allow non FIPS cipher in FIPS mode */
13783 
13784 /*
13785  * Cipher handles any and all padding logic as well as finalisation.
13786  */
13787 
13788 
13789 
13790 
13791 /*
13792  * Cipher context flag to indicate we can handle wrap mode: if allowed in
13793  * older applications it could overflow buffers.
13794  */
13795 
13796 
13797 
13798 /* ctrl() values */
13799 # 410 "/usr/include/openssl/evp.h" 3 4
13800 /*
13801  * AEAD cipher deduces payload length and returns number of bytes required to
13802  * store MAC and eventual padding. Subsequent call to EVP_Cipher even
13803  * appends/verifies MAC.
13804  */
13805 
13806 /* Used by composite AEAD ciphers, no-op in GCM, CCM... */
13807 
13808 /* Set the GCM invocation field, decrypt only */
13809 
13810 
13811 
13812 
13813 
13814 
13815 
13816 /* RFC 5246 defines additional data to be 13 bytes in length */
13817 
13818 
13819 typedef struct {
13820     unsigned char *out;
13821     const unsigned char *inp;
13822     size_t len;
13823     unsigned int interleave;
13824 } EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM;
13825 
13826 /* GCM TLS constants */
13827 /* Length of fixed part of IV derived from PRF */
13828 
13829 /* Length of explicit part of IV part of TLS records */
13830 
13831 /* Length of tag for TLS */
13832 
13833 
13834 typedef struct evp_cipher_info_st {
13835     const EVP_CIPHER *cipher;
13836     unsigned char iv[16];
13837 } EVP_CIPHER_INFO;
13838 
13839 struct evp_cipher_ctx_st {
13840     const EVP_CIPHER *cipher;
13841     ENGINE *engine; /* functional reference if 'cipher' is
13842                                  * ENGINE-provided */
13843     int encrypt; /* encrypt or decrypt */
13844     int buf_len; /* number we have left */
13845     unsigned char oiv[16]; /* original iv */
13846     unsigned char iv[16]; /* working iv */
13847     unsigned char buf[32]; /* saved partial block */
13848     int num; /* used by cfb/ofb/ctr mode */
13849     void *app_data; /* application stuff */
13850     int key_len; /* May change for variable length cipher */
13851     unsigned long flags; /* Various flags */
13852     void *cipher_data; /* per EVP data */
13853     int final_used;
13854     int block_mask;
13855     unsigned char final[32]; /* possible final block */
13856 } /* EVP_CIPHER_CTX */ ;
13857 
13858 typedef struct evp_Encode_Ctx_st {
13859     /* number saved in a partial encode/decode */
13860     int num;
13861     /*
13862      * The length is either the output line length (in input bytes) or the
13863      * shortest input line length that is ok.  Once decoding begins, the
13864      * length is adjusted up each time a longer line is decoded
13865      */
13866     int length;
13867     /* data to encode */
13868     unsigned char enc_data[80];
13869     /* number read on current line */
13870     int line_num;
13871     int expect_nl;
13872 } EVP_ENCODE_CTX;
13873 
13874 /* Password based encryption function */
13875 typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass,
13876                               int passlen, ASN1_TYPE *param,
13877                               const EVP_CIPHER *cipher, const EVP_MD *md,
13878                               int en_de);
13879 # 510 "/usr/include/openssl/evp.h" 3 4
13880 /* Add some extra combinations */
13881 
13882 
13883 
13884 
13885 
13886 int EVP_MD_type(const EVP_MD *md);
13887 
13888 
13889 int EVP_MD_pkey_type(const EVP_MD *md);
13890 int EVP_MD_size(const EVP_MD *md);
13891 int EVP_MD_block_size(const EVP_MD *md);
13892 unsigned long EVP_MD_flags(const EVP_MD *md);
13893 
13894 const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
13895 
13896 
13897 
13898 
13899 int EVP_CIPHER_nid(const EVP_CIPHER *cipher);
13900 
13901 int EVP_CIPHER_block_size(const EVP_CIPHER *cipher);
13902 int EVP_CIPHER_key_length(const EVP_CIPHER *cipher);
13903 int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher);
13904 unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher);
13905 
13906 
13907 const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);
13908 int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx);
13909 int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx);
13910 int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx);
13911 int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx);
13912 int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
13913 void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
13914 void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);
13915 
13916 unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx);
13917 # 574 "/usr/include/openssl/evp.h" 3 4
13918 int EVP_Cipher(EVP_CIPHER_CTX *c,
13919                unsigned char *out, const unsigned char *in, unsigned int inl);
13920 # 586 "/usr/include/openssl/evp.h" 3 4
13921 void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
13922 int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
13923 EVP_MD_CTX *EVP_MD_CTX_create(void);
13924 void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
13925 int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
13926 void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
13927 void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
13928 int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
13929 int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
13930 int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
13931 int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
13932 int EVP_Digest(const void *data, size_t count,
13933                unsigned char *md, unsigned int *size, const EVP_MD *type,
13934                ENGINE *impl);
13935 
13936 int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in);
13937 int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
13938 int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
13939 
13940 int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);
13941 int EVP_read_pw_string_min(char *buf, int minlen, int maxlen,
13942                            const char *prompt, int verify);
13943 void EVP_set_pw_prompt(const char *prompt);
13944 char *EVP_get_pw_prompt(void);
13945 
13946 int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
13947                    const unsigned char *salt, const unsigned char *data,
13948                    int datal, int count, unsigned char *key,
13949                    unsigned char *iv);
13950 
13951 void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
13952 void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
13953 int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);
13954 
13955 int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13956                     const unsigned char *key, const unsigned char *iv);
13957 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13958                        ENGINE *impl, const unsigned char *key,
13959                        const unsigned char *iv);
13960 int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
13961                       const unsigned char *in, int inl);
13962 int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
13963 int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
13964 
13965 int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13966                     const unsigned char *key, const unsigned char *iv);
13967 int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13968                        ENGINE *impl, const unsigned char *key,
13969                        const unsigned char *iv);
13970 int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
13971                       const unsigned char *in, int inl);
13972 int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
13973 int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
13974 
13975 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13976                    const unsigned char *key, const unsigned char *iv,
13977                    int enc);
13978 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13979                       ENGINE *impl, const unsigned char *key,
13980                       const unsigned char *iv, int enc);
13981 int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
13982                      const unsigned char *in, int inl);
13983 int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
13984 int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
13985 
13986 int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
13987                   EVP_PKEY *pkey);
13988 
13989 int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
13990                     unsigned int siglen, EVP_PKEY *pkey);
13991 
13992 int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
13993                        const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
13994 int EVP_DigestSignFinal(EVP_MD_CTX *ctx,
13995                         unsigned char *sigret, size_t *siglen);
13996 
13997 int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
13998                          const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
13999 int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx,
14000                           const unsigned char *sig, size_t siglen);
14001 
14002 int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
14003                  const unsigned char *ek, int ekl, const unsigned char *iv,
14004                  EVP_PKEY *priv);
14005 int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
14006 
14007 int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
14008                  unsigned char **ek, int *ekl, unsigned char *iv,
14009                  EVP_PKEY **pubk, int npubk);
14010 int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
14011 
14012 void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
14013 void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
14014                       const unsigned char *in, int inl);
14015 void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
14016 int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
14017 
14018 void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
14019 int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
14020                      const unsigned char *in, int inl);
14021 int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
14022                     char *out, int *outl);
14023 int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
14024 
14025 void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
14026 int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
14027 EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
14028 void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a);
14029 int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
14030 int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
14031 int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
14032 int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
14033 
14034 
14035 BIO_METHOD *BIO_f_md(void);
14036 BIO_METHOD *BIO_f_base64(void);
14037 BIO_METHOD *BIO_f_cipher(void);
14038 BIO_METHOD *BIO_f_reliable(void);
14039 void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
14040                     const unsigned char *i, int enc);
14041 
14042 
14043 const EVP_MD *EVP_md_null(void);
14044 
14045 const EVP_MD *EVP_md2(void);
14046 
14047 
14048 const EVP_MD *EVP_md4(void);
14049 
14050 
14051 const EVP_MD *EVP_md5(void);
14052 
14053 
14054 const EVP_MD *EVP_sha(void);
14055 const EVP_MD *EVP_sha1(void);
14056 const EVP_MD *EVP_dss(void);
14057 const EVP_MD *EVP_dss1(void);
14058 const EVP_MD *EVP_ecdsa(void);
14059 
14060 
14061 const EVP_MD *EVP_sha224(void);
14062 const EVP_MD *EVP_sha256(void);
14063 
14064 
14065 const EVP_MD *EVP_sha384(void);
14066 const EVP_MD *EVP_sha512(void);
14067 
14068 
14069 
14070 
14071 
14072 const EVP_MD *EVP_ripemd160(void);
14073 
14074 
14075 
14076 
14077 const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */
14078 
14079 const EVP_CIPHER *EVP_des_ecb(void);
14080 const EVP_CIPHER *EVP_des_ede(void);
14081 const EVP_CIPHER *EVP_des_ede3(void);
14082 const EVP_CIPHER *EVP_des_ede_ecb(void);
14083 const EVP_CIPHER *EVP_des_ede3_ecb(void);
14084 const EVP_CIPHER *EVP_des_cfb64(void);
14085 
14086 const EVP_CIPHER *EVP_des_cfb1(void);
14087 const EVP_CIPHER *EVP_des_cfb8(void);
14088 const EVP_CIPHER *EVP_des_ede_cfb64(void);
14089 
14090 
14091 
14092 
14093 
14094 const EVP_CIPHER *EVP_des_ede3_cfb64(void);
14095 
14096 const EVP_CIPHER *EVP_des_ede3_cfb1(void);
14097 const EVP_CIPHER *EVP_des_ede3_cfb8(void);
14098 const EVP_CIPHER *EVP_des_ofb(void);
14099 const EVP_CIPHER *EVP_des_ede_ofb(void);
14100 const EVP_CIPHER *EVP_des_ede3_ofb(void);
14101 const EVP_CIPHER *EVP_des_cbc(void);
14102 const EVP_CIPHER *EVP_des_ede_cbc(void);
14103 const EVP_CIPHER *EVP_des_ede3_cbc(void);
14104 const EVP_CIPHER *EVP_desx_cbc(void);
14105 const EVP_CIPHER *EVP_des_ede3_wrap(void);
14106 /*
14107  * This should now be supported through the dev_crypto ENGINE. But also, why
14108  * are rc4 and md5 declarations made here inside a "NO_DES" precompiler
14109  * branch?
14110  */
14111 # 785 "/usr/include/openssl/evp.h" 3 4
14112 const EVP_CIPHER *EVP_rc4(void);
14113 const EVP_CIPHER *EVP_rc4_40(void);
14114 
14115 const EVP_CIPHER *EVP_rc4_hmac_md5(void);
14116 # 799 "/usr/include/openssl/evp.h" 3 4
14117 const EVP_CIPHER *EVP_rc2_ecb(void);
14118 const EVP_CIPHER *EVP_rc2_cbc(void);
14119 const EVP_CIPHER *EVP_rc2_40_cbc(void);
14120 const EVP_CIPHER *EVP_rc2_64_cbc(void);
14121 const EVP_CIPHER *EVP_rc2_cfb64(void);
14122 
14123 const EVP_CIPHER *EVP_rc2_ofb(void);
14124 
14125 
14126 const EVP_CIPHER *EVP_bf_ecb(void);
14127 const EVP_CIPHER *EVP_bf_cbc(void);
14128 const EVP_CIPHER *EVP_bf_cfb64(void);
14129 
14130 const EVP_CIPHER *EVP_bf_ofb(void);
14131 
14132 
14133 const EVP_CIPHER *EVP_cast5_ecb(void);
14134 const EVP_CIPHER *EVP_cast5_cbc(void);
14135 const EVP_CIPHER *EVP_cast5_cfb64(void);
14136 
14137 const EVP_CIPHER *EVP_cast5_ofb(void);
14138 # 829 "/usr/include/openssl/evp.h" 3 4
14139 const EVP_CIPHER *EVP_aes_128_ecb(void);
14140 const EVP_CIPHER *EVP_aes_128_cbc(void);
14141 const EVP_CIPHER *EVP_aes_128_cfb1(void);
14142 const EVP_CIPHER *EVP_aes_128_cfb8(void);
14143 const EVP_CIPHER *EVP_aes_128_cfb128(void);
14144 
14145 const EVP_CIPHER *EVP_aes_128_ofb(void);
14146 const EVP_CIPHER *EVP_aes_128_ctr(void);
14147 const EVP_CIPHER *EVP_aes_128_ccm(void);
14148 const EVP_CIPHER *EVP_aes_128_gcm(void);
14149 const EVP_CIPHER *EVP_aes_128_xts(void);
14150 const EVP_CIPHER *EVP_aes_128_wrap(void);
14151 const EVP_CIPHER *EVP_aes_192_ecb(void);
14152 const EVP_CIPHER *EVP_aes_192_cbc(void);
14153 const EVP_CIPHER *EVP_aes_192_cfb1(void);
14154 const EVP_CIPHER *EVP_aes_192_cfb8(void);
14155 const EVP_CIPHER *EVP_aes_192_cfb128(void);
14156 
14157 const EVP_CIPHER *EVP_aes_192_ofb(void);
14158 const EVP_CIPHER *EVP_aes_192_ctr(void);
14159 const EVP_CIPHER *EVP_aes_192_ccm(void);
14160 const EVP_CIPHER *EVP_aes_192_gcm(void);
14161 const EVP_CIPHER *EVP_aes_192_wrap(void);
14162 const EVP_CIPHER *EVP_aes_256_ecb(void);
14163 const EVP_CIPHER *EVP_aes_256_cbc(void);
14164 const EVP_CIPHER *EVP_aes_256_cfb1(void);
14165 const EVP_CIPHER *EVP_aes_256_cfb8(void);
14166 const EVP_CIPHER *EVP_aes_256_cfb128(void);
14167 
14168 const EVP_CIPHER *EVP_aes_256_ofb(void);
14169 const EVP_CIPHER *EVP_aes_256_ctr(void);
14170 const EVP_CIPHER *EVP_aes_256_ccm(void);
14171 const EVP_CIPHER *EVP_aes_256_gcm(void);
14172 const EVP_CIPHER *EVP_aes_256_xts(void);
14173 const EVP_CIPHER *EVP_aes_256_wrap(void);
14174 
14175 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void);
14176 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void);
14177 
14178 
14179 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void);
14180 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void);
14181 
14182 
14183 
14184 const EVP_CIPHER *EVP_camellia_128_ecb(void);
14185 const EVP_CIPHER *EVP_camellia_128_cbc(void);
14186 const EVP_CIPHER *EVP_camellia_128_cfb1(void);
14187 const EVP_CIPHER *EVP_camellia_128_cfb8(void);
14188 const EVP_CIPHER *EVP_camellia_128_cfb128(void);
14189 
14190 const EVP_CIPHER *EVP_camellia_128_ofb(void);
14191 const EVP_CIPHER *EVP_camellia_192_ecb(void);
14192 const EVP_CIPHER *EVP_camellia_192_cbc(void);
14193 const EVP_CIPHER *EVP_camellia_192_cfb1(void);
14194 const EVP_CIPHER *EVP_camellia_192_cfb8(void);
14195 const EVP_CIPHER *EVP_camellia_192_cfb128(void);
14196 
14197 const EVP_CIPHER *EVP_camellia_192_ofb(void);
14198 const EVP_CIPHER *EVP_camellia_256_ecb(void);
14199 const EVP_CIPHER *EVP_camellia_256_cbc(void);
14200 const EVP_CIPHER *EVP_camellia_256_cfb1(void);
14201 const EVP_CIPHER *EVP_camellia_256_cfb8(void);
14202 const EVP_CIPHER *EVP_camellia_256_cfb128(void);
14203 
14204 const EVP_CIPHER *EVP_camellia_256_ofb(void);
14205 # 905 "/usr/include/openssl/evp.h" 3 4
14206 void OPENSSL_add_all_algorithms_noconf(void);
14207 void OPENSSL_add_all_algorithms_conf(void);
14208 # 916 "/usr/include/openssl/evp.h" 3 4
14209 void OpenSSL_add_all_ciphers(void);
14210 void OpenSSL_add_all_digests(void);
14211 
14212 
14213 
14214 
14215 int EVP_add_cipher(const EVP_CIPHER *cipher);
14216 int EVP_add_digest(const EVP_MD *digest);
14217 
14218 const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
14219 const EVP_MD *EVP_get_digestbyname(const char *name);
14220 void EVP_cleanup(void);
14221 
14222 void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph,
14223                                    const char *from, const char *to, void *x),
14224                        void *arg);
14225 void EVP_CIPHER_do_all_sorted(void (*fn)
14226                                (const EVP_CIPHER *ciph, const char *from,
14227                                 const char *to, void *x), void *arg);
14228 
14229 void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph,
14230                                const char *from, const char *to, void *x),
14231                    void *arg);
14232 void EVP_MD_do_all_sorted(void (*fn)
14233                            (const EVP_MD *ciph, const char *from,
14234                             const char *to, void *x), void *arg);
14235 
14236 int EVP_PKEY_decrypt_old(unsigned char *dec_key,
14237                          const unsigned char *enc_key, int enc_key_len,
14238                          EVP_PKEY *private_key);
14239 int EVP_PKEY_encrypt_old(unsigned char *enc_key,
14240                          const unsigned char *key, int key_len,
14241                          EVP_PKEY *pub_key);
14242 int EVP_PKEY_type(int type);
14243 int EVP_PKEY_id(const EVP_PKEY *pkey);
14244 int EVP_PKEY_base_id(const EVP_PKEY *pkey);
14245 int EVP_PKEY_bits(EVP_PKEY *pkey);
14246 int EVP_PKEY_size(EVP_PKEY *pkey);
14247 int EVP_PKEY_set_type(EVP_PKEY *pkey, int type);
14248 int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
14249 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
14250 void *EVP_PKEY_get0(EVP_PKEY *pkey);
14251 
14252 
14253 struct rsa_st;
14254 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key);
14255 struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
14256 
14257 
14258 struct dsa_st;
14259 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key);
14260 struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
14261 
14262 
14263 struct dh_st;
14264 int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key);
14265 struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
14266 
14267 
14268 struct ec_key_st;
14269 int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);
14270 struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
14271 
14272 
14273 EVP_PKEY *EVP_PKEY_new(void);
14274 void EVP_PKEY_free(EVP_PKEY *pkey);
14275 
14276 EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
14277                         long length);
14278 int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);
14279 
14280 EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
14281                          long length);
14282 EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,
14283                              long length);
14284 int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp);
14285 
14286 int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
14287 int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
14288 int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);
14289 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
14290 
14291 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
14292 
14293 int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
14294                           int indent, ASN1_PCTX *pctx);
14295 int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
14296                            int indent, ASN1_PCTX *pctx);
14297 int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
14298                           int indent, ASN1_PCTX *pctx);
14299 
14300 int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
14301 
14302 int EVP_CIPHER_type(const EVP_CIPHER *ctx);
14303 
14304 /* calls methods */
14305 int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
14306 int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
14307 
14308 /* These are used by EVP_CIPHER methods */
14309 int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
14310 int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
14311 
14312 /* PKCS5 password based encryption */
14313 int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
14314                        ASN1_TYPE *param, const EVP_CIPHER *cipher,
14315                        const EVP_MD *md, int en_de);
14316 int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
14317                            const unsigned char *salt, int saltlen, int iter,
14318                            int keylen, unsigned char *out);
14319 int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
14320                       const unsigned char *salt, int saltlen, int iter,
14321                       const EVP_MD *digest, int keylen, unsigned char *out);
14322 int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
14323                           ASN1_TYPE *param, const EVP_CIPHER *cipher,
14324                           const EVP_MD *md, int en_de);
14325 
14326 void PKCS5_PBE_add(void);
14327 
14328 int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
14329                        ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
14330 
14331 /* PBE type */
14332 
14333 /* Can appear as the outermost AlgorithmIdentifier */
14334 
14335 /* Is an PRF type OID */
14336 
14337 
14338 int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
14339                          int md_nid, EVP_PBE_KEYGEN *keygen);
14340 int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
14341                     EVP_PBE_KEYGEN *keygen);
14342 int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid,
14343                  EVP_PBE_KEYGEN **pkeygen);
14344 void EVP_PBE_cleanup(void);
14345 # 1064 "/usr/include/openssl/evp.h" 3 4
14346 int EVP_PKEY_asn1_get_count(void);
14347 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
14348 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
14349 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
14350                                                    const char *str, int len);
14351 int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
14352 int EVP_PKEY_asn1_add_alias(int to, int from);
14353 int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
14354                             int *ppkey_flags, const char **pinfo,
14355                             const char **ppem_str,
14356                             const EVP_PKEY_ASN1_METHOD *ameth);
14357 
14358 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(EVP_PKEY *pkey);
14359 EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,
14360                                         const char *pem_str,
14361                                         const char *info);
14362 void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
14363                         const EVP_PKEY_ASN1_METHOD *src);
14364 void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
14365 void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
14366                               int (*pub_decode) (EVP_PKEY *pk,
14367                                                  X509_PUBKEY *pub),
14368                               int (*pub_encode) (X509_PUBKEY *pub,
14369                                                  const EVP_PKEY *pk),
14370                               int (*pub_cmp) (const EVP_PKEY *a,
14371                                               const EVP_PKEY *b),
14372                               int (*pub_print) (BIO *out,
14373                                                 const EVP_PKEY *pkey,
14374                                                 int indent, ASN1_PCTX *pctx),
14375                               int (*pkey_size) (const EVP_PKEY *pk),
14376                               int (*pkey_bits) (const EVP_PKEY *pk));
14377 void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
14378                                int (*priv_decode) (EVP_PKEY *pk,
14379                                                    PKCS8_PRIV_KEY_INFO
14380                                                    *p8inf),
14381                                int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8,
14382                                                    const EVP_PKEY *pk),
14383                                int (*priv_print) (BIO *out,
14384                                                   const EVP_PKEY *pkey,
14385                                                   int indent,
14386                                                   ASN1_PCTX *pctx));
14387 void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
14388                              int (*param_decode) (EVP_PKEY *pkey,
14389                                                   const unsigned char **pder,
14390                                                   int derlen),
14391                              int (*param_encode) (const EVP_PKEY *pkey,
14392                                                   unsigned char **pder),
14393                              int (*param_missing) (const EVP_PKEY *pk),
14394                              int (*param_copy) (EVP_PKEY *to,
14395                                                 const EVP_PKEY *from),
14396                              int (*param_cmp) (const EVP_PKEY *a,
14397                                                const EVP_PKEY *b),
14398                              int (*param_print) (BIO *out,
14399                                                  const EVP_PKEY *pkey,
14400                                                  int indent,
14401                                                  ASN1_PCTX *pctx));
14402 
14403 void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
14404                             void (*pkey_free) (EVP_PKEY *pkey));
14405 void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
14406                             int (*pkey_ctrl) (EVP_PKEY *pkey, int op,
14407                                               long arg1, void *arg2));
14408 void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
14409                             int (*item_verify) (EVP_MD_CTX *ctx,
14410                                                 const ASN1_ITEM *it,
14411                                                 void *asn,
14412                                                 X509_ALGOR *a,
14413                                                 ASN1_BIT_STRING *sig,
14414                                                 EVP_PKEY *pkey),
14415                             int (*item_sign) (EVP_MD_CTX *ctx,
14416                                               const ASN1_ITEM *it,
14417                                               void *asn,
14418                                               X509_ALGOR *alg1,
14419                                               X509_ALGOR *alg2,
14420                                               ASN1_BIT_STRING *sig));
14421 # 1185 "/usr/include/openssl/evp.h" 3 4
14422 /* Used by GOST key encryption in TLS */
14423 # 1199 "/usr/include/openssl/evp.h" 3 4
14424 /*
14425  * Method handles all operations: don't assume any digest related defaults.
14426  */
14427 
14428 
14429 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
14430 EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);
14431 void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
14432                              const EVP_PKEY_METHOD *meth);
14433 void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src);
14434 void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
14435 int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
14436 
14437 EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
14438 EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
14439 EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
14440 void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
14441 
14442 int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
14443                       int cmd, int p1, void *p2);
14444 int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
14445                           const char *value);
14446 
14447 int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);
14448 void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);
14449 
14450 EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
14451                                const unsigned char *key, int keylen);
14452 
14453 void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
14454 void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx);
14455 EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
14456 
14457 EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
14458 
14459 void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
14460 void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
14461 
14462 int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
14463 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
14464                   unsigned char *sig, size_t *siglen,
14465                   const unsigned char *tbs, size_t tbslen);
14466 int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
14467 int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
14468                     const unsigned char *sig, size_t siglen,
14469                     const unsigned char *tbs, size_t tbslen);
14470 int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
14471 int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
14472                             unsigned char *rout, size_t *routlen,
14473                             const unsigned char *sig, size_t siglen);
14474 int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
14475 int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
14476                      unsigned char *out, size_t *outlen,
14477                      const unsigned char *in, size_t inlen);
14478 int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
14479 int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
14480                      unsigned char *out, size_t *outlen,
14481                      const unsigned char *in, size_t inlen);
14482 
14483 int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
14484 int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
14485 int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
14486 
14487 typedef int EVP_PKEY_gen_cb (EVP_PKEY_CTX *ctx);
14488 
14489 int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
14490 int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
14491 int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
14492 int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
14493 
14494 void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
14495 EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
14496 
14497 int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
14498 
14499 void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
14500                             int (*init) (EVP_PKEY_CTX *ctx));
14501 
14502 void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth,
14503                             int (*copy) (EVP_PKEY_CTX *dst,
14504                                          EVP_PKEY_CTX *src));
14505 
14506 void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth,
14507                                void (*cleanup) (EVP_PKEY_CTX *ctx));
14508 
14509 void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth,
14510                                 int (*paramgen_init) (EVP_PKEY_CTX *ctx),
14511                                 int (*paramgen) (EVP_PKEY_CTX *ctx,
14512                                                  EVP_PKEY *pkey));
14513 
14514 void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth,
14515                               int (*keygen_init) (EVP_PKEY_CTX *ctx),
14516                               int (*keygen) (EVP_PKEY_CTX *ctx,
14517                                              EVP_PKEY *pkey));
14518 
14519 void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth,
14520                             int (*sign_init) (EVP_PKEY_CTX *ctx),
14521                             int (*sign) (EVP_PKEY_CTX *ctx,
14522                                          unsigned char *sig, size_t *siglen,
14523                                          const unsigned char *tbs,
14524                                          size_t tbslen));
14525 
14526 void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth,
14527                               int (*verify_init) (EVP_PKEY_CTX *ctx),
14528                               int (*verify) (EVP_PKEY_CTX *ctx,
14529                                              const unsigned char *sig,
14530                                              size_t siglen,
14531                                              const unsigned char *tbs,
14532                                              size_t tbslen));
14533 
14534 void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth,
14535                                       int (*verify_recover_init) (EVP_PKEY_CTX
14536                                                                   *ctx),
14537                                       int (*verify_recover) (EVP_PKEY_CTX
14538                                                              *ctx,
14539                                                              unsigned char
14540                                                              *sig,
14541                                                              size_t *siglen,
14542                                                              const unsigned
14543                                                              char *tbs,
14544                                                              size_t tbslen));
14545 
14546 void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth,
14547                                int (*signctx_init) (EVP_PKEY_CTX *ctx,
14548                                                     EVP_MD_CTX *mctx),
14549                                int (*signctx) (EVP_PKEY_CTX *ctx,
14550                                                unsigned char *sig,
14551                                                size_t *siglen,
14552                                                EVP_MD_CTX *mctx));
14553 
14554 void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth,
14555                                  int (*verifyctx_init) (EVP_PKEY_CTX *ctx,
14556                                                         EVP_MD_CTX *mctx),
14557                                  int (*verifyctx) (EVP_PKEY_CTX *ctx,
14558                                                    const unsigned char *sig,
14559                                                    int siglen,
14560                                                    EVP_MD_CTX *mctx));
14561 
14562 void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth,
14563                                int (*encrypt_init) (EVP_PKEY_CTX *ctx),
14564                                int (*encryptfn) (EVP_PKEY_CTX *ctx,
14565                                                  unsigned char *out,
14566                                                  size_t *outlen,
14567                                                  const unsigned char *in,
14568                                                  size_t inlen));
14569 
14570 void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth,
14571                                int (*decrypt_init) (EVP_PKEY_CTX *ctx),
14572                                int (*decrypt) (EVP_PKEY_CTX *ctx,
14573                                                unsigned char *out,
14574                                                size_t *outlen,
14575                                                const unsigned char *in,
14576                                                size_t inlen));
14577 
14578 void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth,
14579                               int (*derive_init) (EVP_PKEY_CTX *ctx),
14580                               int (*derive) (EVP_PKEY_CTX *ctx,
14581                                              unsigned char *key,
14582                                              size_t *keylen));
14583 
14584 void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
14585                             int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
14586                                          void *p2),
14587                             int (*ctrl_str) (EVP_PKEY_CTX *ctx,
14588                                              const char *type,
14589                                              const char *value));
14590 
14591 void EVP_PKEY_meth_get_init(EVP_PKEY_METHOD *pmeth,
14592                             int (**pinit) (EVP_PKEY_CTX *ctx));
14593 
14594 void EVP_PKEY_meth_get_copy(EVP_PKEY_METHOD *pmeth,
14595                             int (**pcopy) (EVP_PKEY_CTX *dst,
14596                                            EVP_PKEY_CTX *src));
14597 
14598 void EVP_PKEY_meth_get_cleanup(EVP_PKEY_METHOD *pmeth,
14599                                void (**pcleanup) (EVP_PKEY_CTX *ctx));
14600 
14601 void EVP_PKEY_meth_get_paramgen(EVP_PKEY_METHOD *pmeth,
14602                                 int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
14603                                 int (**pparamgen) (EVP_PKEY_CTX *ctx,
14604                                                    EVP_PKEY *pkey));
14605 
14606 void EVP_PKEY_meth_get_keygen(EVP_PKEY_METHOD *pmeth,
14607                               int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
14608                               int (**pkeygen) (EVP_PKEY_CTX *ctx,
14609                                                EVP_PKEY *pkey));
14610 
14611 void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
14612                             int (**psign_init) (EVP_PKEY_CTX *ctx),
14613                             int (**psign) (EVP_PKEY_CTX *ctx,
14614                                            unsigned char *sig, size_t *siglen,
14615                                            const unsigned char *tbs,
14616                                            size_t tbslen));
14617 
14618 void EVP_PKEY_meth_get_verify(EVP_PKEY_METHOD *pmeth,
14619                               int (**pverify_init) (EVP_PKEY_CTX *ctx),
14620                               int (**pverify) (EVP_PKEY_CTX *ctx,
14621                                                const unsigned char *sig,
14622                                                size_t siglen,
14623                                                const unsigned char *tbs,
14624                                                size_t tbslen));
14625 
14626 void EVP_PKEY_meth_get_verify_recover(EVP_PKEY_METHOD *pmeth,
14627                                       int (**pverify_recover_init) (EVP_PKEY_CTX
14628                                                                     *ctx),
14629                                       int (**pverify_recover) (EVP_PKEY_CTX
14630                                                                *ctx,
14631                                                                unsigned char
14632                                                                *sig,
14633                                                                size_t *siglen,
14634                                                                const unsigned
14635                                                                char *tbs,
14636                                                                size_t tbslen));
14637 
14638 void EVP_PKEY_meth_get_signctx(EVP_PKEY_METHOD *pmeth,
14639                                int (**psignctx_init) (EVP_PKEY_CTX *ctx,
14640                                                       EVP_MD_CTX *mctx),
14641                                int (**psignctx) (EVP_PKEY_CTX *ctx,
14642                                                  unsigned char *sig,
14643                                                  size_t *siglen,
14644                                                  EVP_MD_CTX *mctx));
14645 
14646 void EVP_PKEY_meth_get_verifyctx(EVP_PKEY_METHOD *pmeth,
14647                                  int (**pverifyctx_init) (EVP_PKEY_CTX *ctx,
14648                                                           EVP_MD_CTX *mctx),
14649                                  int (**pverifyctx) (EVP_PKEY_CTX *ctx,
14650                                                      const unsigned char *sig,
14651                                                      int siglen,
14652                                                      EVP_MD_CTX *mctx));
14653 
14654 void EVP_PKEY_meth_get_encrypt(EVP_PKEY_METHOD *pmeth,
14655                                int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
14656                                int (**pencryptfn) (EVP_PKEY_CTX *ctx,
14657                                                    unsigned char *out,
14658                                                    size_t *outlen,
14659                                                    const unsigned char *in,
14660                                                    size_t inlen));
14661 
14662 void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
14663                                int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
14664                                int (**pdecrypt) (EVP_PKEY_CTX *ctx,
14665                                                  unsigned char *out,
14666                                                  size_t *outlen,
14667                                                  const unsigned char *in,
14668                                                  size_t inlen));
14669 
14670 void EVP_PKEY_meth_get_derive(EVP_PKEY_METHOD *pmeth,
14671                               int (**pderive_init) (EVP_PKEY_CTX *ctx),
14672                               int (**pderive) (EVP_PKEY_CTX *ctx,
14673                                                unsigned char *key,
14674                                                size_t *keylen));
14675 
14676 void EVP_PKEY_meth_get_ctrl(EVP_PKEY_METHOD *pmeth,
14677                             int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
14678                                            void *p2),
14679                             int (**pctrl_str) (EVP_PKEY_CTX *ctx,
14680                                                const char *type,
14681                                                const char *value));
14682 
14683 void EVP_add_alg_module(void);
14684 
14685 /* BEGIN ERROR CODES */
14686 /*
14687  * The following lines are auto generated by the script mkerr.pl. Any changes
14688  * made after this point may be overwritten when the script is next run.
14689  */
14690 
14691 void ERR_load_EVP_strings(void);
14692 
14693 /* Error codes for the EVP functions. */
14694 
14695 /* Function codes. */
14696 # 1554 "/usr/include/openssl/evp.h" 3 4
14697 /* Reason codes. */
14698 # 74 "/usr/include/openssl/x509.h" 2 3 4
14699 
14700 
14701 # 1 "/usr/include/openssl/bio.h" 1 3 4
14702 /* crypto/bio/bio.h */
14703 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14704  * All rights reserved.
14705  *
14706  * This package is an SSL implementation written
14707  * by Eric Young (eay@cryptsoft.com).
14708  * The implementation was written so as to conform with Netscapes SSL.
14709  *
14710  * This library is free for commercial and non-commercial use as long as
14711  * the following conditions are aheared to.  The following conditions
14712  * apply to all code found in this distribution, be it the RC4, RSA,
14713  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14714  * included with this distribution is covered by the same copyright terms
14715  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14716  *
14717  * Copyright remains Eric Young's, and as such any Copyright notices in
14718  * the code are not to be removed.
14719  * If this package is used in a product, Eric Young should be given attribution
14720  * as the author of the parts of the library used.
14721  * This can be in the form of a textual message at program startup or
14722  * in documentation (online or textual) provided with the package.
14723  *
14724  * Redistribution and use in source and binary forms, with or without
14725  * modification, are permitted provided that the following conditions
14726  * are met:
14727  * 1. Redistributions of source code must retain the copyright
14728  *    notice, this list of conditions and the following disclaimer.
14729  * 2. Redistributions in binary form must reproduce the above copyright
14730  *    notice, this list of conditions and the following disclaimer in the
14731  *    documentation and/or other materials provided with the distribution.
14732  * 3. All advertising materials mentioning features or use of this software
14733  *    must display the following acknowledgement:
14734  *    "This product includes cryptographic software written by
14735  *     Eric Young (eay@cryptsoft.com)"
14736  *    The word 'cryptographic' can be left out if the rouines from the library
14737  *    being used are not cryptographic related :-).
14738  * 4. If you include any Windows specific code (or a derivative thereof) from
14739  *    the apps directory (application code) you must include an acknowledgement:
14740  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14741  *
14742  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14743  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14744  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14745  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14746  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14747  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14748  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14749  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14750  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14751  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14752  * SUCH DAMAGE.
14753  *
14754  * The licence and distribution terms for any publically available version or
14755  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14756  * copied and put under another distribution licence
14757  * [including the GNU Public Licence.]
14758  */
14759 # 77 "/usr/include/openssl/x509.h" 2 3 4
14760 
14761 # 1 "/usr/include/openssl/stack.h" 1 3 4
14762 /* crypto/stack/stack.h */
14763 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14764  * All rights reserved.
14765  *
14766  * This package is an SSL implementation written
14767  * by Eric Young (eay@cryptsoft.com).
14768  * The implementation was written so as to conform with Netscapes SSL.
14769  *
14770  * This library is free for commercial and non-commercial use as long as
14771  * the following conditions are aheared to.  The following conditions
14772  * apply to all code found in this distribution, be it the RC4, RSA,
14773  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14774  * included with this distribution is covered by the same copyright terms
14775  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14776  *
14777  * Copyright remains Eric Young's, and as such any Copyright notices in
14778  * the code are not to be removed.
14779  * If this package is used in a product, Eric Young should be given attribution
14780  * as the author of the parts of the library used.
14781  * This can be in the form of a textual message at program startup or
14782  * in documentation (online or textual) provided with the package.
14783  *
14784  * Redistribution and use in source and binary forms, with or without
14785  * modification, are permitted provided that the following conditions
14786  * are met:
14787  * 1. Redistributions of source code must retain the copyright
14788  *    notice, this list of conditions and the following disclaimer.
14789  * 2. Redistributions in binary form must reproduce the above copyright
14790  *    notice, this list of conditions and the following disclaimer in the
14791  *    documentation and/or other materials provided with the distribution.
14792  * 3. All advertising materials mentioning features or use of this software
14793  *    must display the following acknowledgement:
14794  *    "This product includes cryptographic software written by
14795  *     Eric Young (eay@cryptsoft.com)"
14796  *    The word 'cryptographic' can be left out if the rouines from the library
14797  *    being used are not cryptographic related :-).
14798  * 4. If you include any Windows specific code (or a derivative thereof) from
14799  *    the apps directory (application code) you must include an acknowledgement:
14800  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14801  *
14802  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14803  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14804  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14805  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14806  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14807  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14808  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14809  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14810  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14811  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14812  * SUCH DAMAGE.
14813  *
14814  * The licence and distribution terms for any publically available version or
14815  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14816  * copied and put under another distribution licence
14817  * [including the GNU Public Licence.]
14818  */
14819 # 79 "/usr/include/openssl/x509.h" 2 3 4
14820 # 1 "/usr/include/openssl/asn1.h" 1 3 4
14821 /* crypto/asn1/asn1.h */
14822 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14823  * All rights reserved.
14824  *
14825  * This package is an SSL implementation written
14826  * by Eric Young (eay@cryptsoft.com).
14827  * The implementation was written so as to conform with Netscapes SSL.
14828  *
14829  * This library is free for commercial and non-commercial use as long as
14830  * the following conditions are aheared to.  The following conditions
14831  * apply to all code found in this distribution, be it the RC4, RSA,
14832  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14833  * included with this distribution is covered by the same copyright terms
14834  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14835  *
14836  * Copyright remains Eric Young's, and as such any Copyright notices in
14837  * the code are not to be removed.
14838  * If this package is used in a product, Eric Young should be given attribution
14839  * as the author of the parts of the library used.
14840  * This can be in the form of a textual message at program startup or
14841  * in documentation (online or textual) provided with the package.
14842  *
14843  * Redistribution and use in source and binary forms, with or without
14844  * modification, are permitted provided that the following conditions
14845  * are met:
14846  * 1. Redistributions of source code must retain the copyright
14847  *    notice, this list of conditions and the following disclaimer.
14848  * 2. Redistributions in binary form must reproduce the above copyright
14849  *    notice, this list of conditions and the following disclaimer in the
14850  *    documentation and/or other materials provided with the distribution.
14851  * 3. All advertising materials mentioning features or use of this software
14852  *    must display the following acknowledgement:
14853  *    "This product includes cryptographic software written by
14854  *     Eric Young (eay@cryptsoft.com)"
14855  *    The word 'cryptographic' can be left out if the rouines from the library
14856  *    being used are not cryptographic related :-).
14857  * 4. If you include any Windows specific code (or a derivative thereof) from
14858  *    the apps directory (application code) you must include an acknowledgement:
14859  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14860  *
14861  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14862  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14863  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14864  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14865  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14866  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14867  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14868  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14869  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14870  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14871  * SUCH DAMAGE.
14872  *
14873  * The licence and distribution terms for any publically available version or
14874  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14875  * copied and put under another distribution licence
14876  * [including the GNU Public Licence.]
14877  */
14878 # 80 "/usr/include/openssl/x509.h" 2 3 4
14879 # 1 "/usr/include/openssl/safestack.h" 1 3 4
14880 /* ====================================================================
14881  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
14882  *
14883  * Redistribution and use in source and binary forms, with or without
14884  * modification, are permitted provided that the following conditions
14885  * are met:
14886  *
14887  * 1. Redistributions of source code must retain the above copyright
14888  *    notice, this list of conditions and the following disclaimer.
14889  *
14890  * 2. Redistributions in binary form must reproduce the above copyright
14891  *    notice, this list of conditions and the following disclaimer in
14892  *    the documentation and/or other materials provided with the
14893  *    distribution.
14894  *
14895  * 3. All advertising materials mentioning features or use of this
14896  *    software must display the following acknowledgment:
14897  *    "This product includes software developed by the OpenSSL Project
14898  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14899  *
14900  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14901  *    endorse or promote products derived from this software without
14902  *    prior written permission. For written permission, please contact
14903  *    openssl-core@openssl.org.
14904  *
14905  * 5. Products derived from this software may not be called "OpenSSL"
14906  *    nor may "OpenSSL" appear in their names without prior written
14907  *    permission of the OpenSSL Project.
14908  *
14909  * 6. Redistributions of any form whatsoever must retain the following
14910  *    acknowledgment:
14911  *    "This product includes software developed by the OpenSSL Project
14912  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14913  *
14914  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14915  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14916  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14917  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14918  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14919  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14920  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14921  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14922  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14923  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14924  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14925  * OF THE POSSIBILITY OF SUCH DAMAGE.
14926  * ====================================================================
14927  *
14928  * This product includes cryptographic software written by Eric Young
14929  * (eay@cryptsoft.com).  This product includes software written by Tim
14930  * Hudson (tjh@cryptsoft.com).
14931  *
14932  */
14933 # 81 "/usr/include/openssl/x509.h" 2 3 4
14934 
14935 
14936 # 1 "/usr/include/openssl/ec.h" 1 3 4
14937 /* crypto/ec/ec.h */
14938 /*
14939  * Originally written by Bodo Moeller for the OpenSSL project.
14940  */
14941 /**
14942  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
14943  * \author Originally written by Bodo Moeller for the OpenSSL project
14944  */
14945 /* ====================================================================
14946  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
14947  *
14948  * Redistribution and use in source and binary forms, with or without
14949  * modification, are permitted provided that the following conditions
14950  * are met:
14951  *
14952  * 1. Redistributions of source code must retain the above copyright
14953  *    notice, this list of conditions and the following disclaimer.
14954  *
14955  * 2. Redistributions in binary form must reproduce the above copyright
14956  *    notice, this list of conditions and the following disclaimer in
14957  *    the documentation and/or other materials provided with the
14958  *    distribution.
14959  *
14960  * 3. All advertising materials mentioning features or use of this
14961  *    software must display the following acknowledgment:
14962  *    "This product includes software developed by the OpenSSL Project
14963  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14964  *
14965  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14966  *    endorse or promote products derived from this software without
14967  *    prior written permission. For written permission, please contact
14968  *    openssl-core@openssl.org.
14969  *
14970  * 5. Products derived from this software may not be called "OpenSSL"
14971  *    nor may "OpenSSL" appear in their names without prior written
14972  *    permission of the OpenSSL Project.
14973  *
14974  * 6. Redistributions of any form whatsoever must retain the following
14975  *    acknowledgment:
14976  *    "This product includes software developed by the OpenSSL Project
14977  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14978  *
14979  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14980  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14981  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14982  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14983  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14984  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14985  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14986  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14987  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14988  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14989  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14990  * OF THE POSSIBILITY OF SUCH DAMAGE.
14991  * ====================================================================
14992  *
14993  * This product includes cryptographic software written by Eric Young
14994  * (eay@cryptsoft.com).  This product includes software written by Tim
14995  * Hudson (tjh@cryptsoft.com).
14996  *
14997  */
14998 /* ====================================================================
14999  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
15000  *
15001  * Portions of the attached software ("Contribution") are developed by
15002  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
15003  *
15004  * The Contribution is licensed pursuant to the OpenSSL open source
15005  * license provided above.
15006  *
15007  * The elliptic curve binary polynomial software is originally written by
15008  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
15009  *
15010  */
15011 
15012 
15013 
15014 
15015 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
15016 /* opensslconf.h */
15017 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
15018 
15019 
15020 
15021 
15022 /* OpenSSL was configured with the following options: */
15023 # 108 "/usr/include/openssl/opensslconf.h" 3 4
15024 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
15025    asks for it.  This is a transient feature that is provided for those
15026    who haven't had the time to do the appropriate changes in their
15027    applications.  */
15028 # 204 "/usr/include/openssl/opensslconf.h" 3 4
15029 /* crypto/opensslconf.h.in */
15030 
15031 /* Generate 80386 code? */
15032 # 80 "/usr/include/openssl/ec.h" 2 3 4
15033 
15034 
15035 
15036 
15037 
15038 # 1 "/usr/include/openssl/asn1.h" 1 3 4
15039 /* crypto/asn1/asn1.h */
15040 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
15041  * All rights reserved.
15042  *
15043  * This package is an SSL implementation written
15044  * by Eric Young (eay@cryptsoft.com).
15045  * The implementation was written so as to conform with Netscapes SSL.
15046  *
15047  * This library is free for commercial and non-commercial use as long as
15048  * the following conditions are aheared to.  The following conditions
15049  * apply to all code found in this distribution, be it the RC4, RSA,
15050  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15051  * included with this distribution is covered by the same copyright terms
15052  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15053  *
15054  * Copyright remains Eric Young's, and as such any Copyright notices in
15055  * the code are not to be removed.
15056  * If this package is used in a product, Eric Young should be given attribution
15057  * as the author of the parts of the library used.
15058  * This can be in the form of a textual message at program startup or
15059  * in documentation (online or textual) provided with the package.
15060  *
15061  * Redistribution and use in source and binary forms, with or without
15062  * modification, are permitted provided that the following conditions
15063  * are met:
15064  * 1. Redistributions of source code must retain the copyright
15065  *    notice, this list of conditions and the following disclaimer.
15066  * 2. Redistributions in binary form must reproduce the above copyright
15067  *    notice, this list of conditions and the following disclaimer in the
15068  *    documentation and/or other materials provided with the distribution.
15069  * 3. All advertising materials mentioning features or use of this software
15070  *    must display the following acknowledgement:
15071  *    "This product includes cryptographic software written by
15072  *     Eric Young (eay@cryptsoft.com)"
15073  *    The word 'cryptographic' can be left out if the rouines from the library
15074  *    being used are not cryptographic related :-).
15075  * 4. If you include any Windows specific code (or a derivative thereof) from
15076  *    the apps directory (application code) you must include an acknowledgement:
15077  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15078  *
15079  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15080  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15081  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15082  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15083  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15084  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15085  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15086  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15087  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15088  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15089  * SUCH DAMAGE.
15090  *
15091  * The licence and distribution terms for any publically available version or
15092  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15093  * copied and put under another distribution licence
15094  * [including the GNU Public Licence.]
15095  */
15096 # 86 "/usr/include/openssl/ec.h" 2 3 4
15097 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
15098 /* ====================================================================
15099  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
15100  *
15101  * Redistribution and use in source and binary forms, with or without
15102  * modification, are permitted provided that the following conditions
15103  * are met:
15104  *
15105  * 1. Redistributions of source code must retain the above copyright
15106  *    notice, this list of conditions and the following disclaimer.
15107  *
15108  * 2. Redistributions in binary form must reproduce the above copyright
15109  *    notice, this list of conditions and the following disclaimer in
15110  *    the documentation and/or other materials provided with the
15111  *    distribution.
15112  *
15113  * 3. All advertising materials mentioning features or use of this
15114  *    software must display the following acknowledgment:
15115  *    "This product includes software developed by the OpenSSL Project
15116  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15117  *
15118  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15119  *    endorse or promote products derived from this software without
15120  *    prior written permission. For written permission, please contact
15121  *    openssl-core@openssl.org.
15122  *
15123  * 5. Products derived from this software may not be called "OpenSSL"
15124  *    nor may "OpenSSL" appear in their names without prior written
15125  *    permission of the OpenSSL Project.
15126  *
15127  * 6. Redistributions of any form whatsoever must retain the following
15128  *    acknowledgment:
15129  *    "This product includes software developed by the OpenSSL Project
15130  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15131  *
15132  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15133  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15134  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15135  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15136  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15137  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15138  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15139  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15140  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15141  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15142  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15143  * OF THE POSSIBILITY OF SUCH DAMAGE.
15144  * ====================================================================
15145  *
15146  * This product includes cryptographic software written by Eric Young
15147  * (eay@cryptsoft.com).  This product includes software written by Tim
15148  * Hudson (tjh@cryptsoft.com).
15149  *
15150  */
15151 # 87 "/usr/include/openssl/ec.h" 2 3 4
15152 
15153 # 1 "/usr/include/openssl/bn.h" 1 3 4
15154 /* crypto/bn/bn.h */
15155 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
15156  * All rights reserved.
15157  *
15158  * This package is an SSL implementation written
15159  * by Eric Young (eay@cryptsoft.com).
15160  * The implementation was written so as to conform with Netscapes SSL.
15161  *
15162  * This library is free for commercial and non-commercial use as long as
15163  * the following conditions are aheared to.  The following conditions
15164  * apply to all code found in this distribution, be it the RC4, RSA,
15165  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15166  * included with this distribution is covered by the same copyright terms
15167  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15168  *
15169  * Copyright remains Eric Young's, and as such any Copyright notices in
15170  * the code are not to be removed.
15171  * If this package is used in a product, Eric Young should be given attribution
15172  * as the author of the parts of the library used.
15173  * This can be in the form of a textual message at program startup or
15174  * in documentation (online or textual) provided with the package.
15175  *
15176  * Redistribution and use in source and binary forms, with or without
15177  * modification, are permitted provided that the following conditions
15178  * are met:
15179  * 1. Redistributions of source code must retain the copyright
15180  *    notice, this list of conditions and the following disclaimer.
15181  * 2. Redistributions in binary form must reproduce the above copyright
15182  *    notice, this list of conditions and the following disclaimer in the
15183  *    documentation and/or other materials provided with the distribution.
15184  * 3. All advertising materials mentioning features or use of this software
15185  *    must display the following acknowledgement:
15186  *    "This product includes cryptographic software written by
15187  *     Eric Young (eay@cryptsoft.com)"
15188  *    The word 'cryptographic' can be left out if the rouines from the library
15189  *    being used are not cryptographic related :-).
15190  * 4. If you include any Windows specific code (or a derivative thereof) from
15191  *    the apps directory (application code) you must include an acknowledgement:
15192  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15193  *
15194  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15195  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15196  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15197  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15198  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15199  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15200  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15201  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15202  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15203  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15204  * SUCH DAMAGE.
15205  *
15206  * The licence and distribution terms for any publically available version or
15207  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15208  * copied and put under another distribution licence
15209  * [including the GNU Public Licence.]
15210  */
15211 /* ====================================================================
15212  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
15213  *
15214  * Redistribution and use in source and binary forms, with or without
15215  * modification, are permitted provided that the following conditions
15216  * are met:
15217  *
15218  * 1. Redistributions of source code must retain the above copyright
15219  *    notice, this list of conditions and the following disclaimer.
15220  *
15221  * 2. Redistributions in binary form must reproduce the above copyright
15222  *    notice, this list of conditions and the following disclaimer in
15223  *    the documentation and/or other materials provided with the
15224  *    distribution.
15225  *
15226  * 3. All advertising materials mentioning features or use of this
15227  *    software must display the following acknowledgment:
15228  *    "This product includes software developed by the OpenSSL Project
15229  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15230  *
15231  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15232  *    endorse or promote products derived from this software without
15233  *    prior written permission. For written permission, please contact
15234  *    openssl-core@openssl.org.
15235  *
15236  * 5. Products derived from this software may not be called "OpenSSL"
15237  *    nor may "OpenSSL" appear in their names without prior written
15238  *    permission of the OpenSSL Project.
15239  *
15240  * 6. Redistributions of any form whatsoever must retain the following
15241  *    acknowledgment:
15242  *    "This product includes software developed by the OpenSSL Project
15243  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15244  *
15245  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15246  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15247  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15248  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15249  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15250  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15251  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15252  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15253  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15254  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15255  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15256  * OF THE POSSIBILITY OF SUCH DAMAGE.
15257  * ====================================================================
15258  *
15259  * This product includes cryptographic software written by Eric Young
15260  * (eay@cryptsoft.com).  This product includes software written by Tim
15261  * Hudson (tjh@cryptsoft.com).
15262  *
15263  */
15264 /* ====================================================================
15265  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
15266  *
15267  * Portions of the attached software ("Contribution") are developed by
15268  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
15269  *
15270  * The Contribution is licensed pursuant to the Eric Young open source
15271  * license provided above.
15272  *
15273  * The binary polynomial arithmetic software is originally written by
15274  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
15275  *
15276  */
15277 # 89 "/usr/include/openssl/ec.h" 2 3 4
15278 # 103 "/usr/include/openssl/ec.h" 3 4
15279 /** Enum for the point conversion form as defined in X9.62 (ECDSA)
15280  *  for the encoding of a elliptic curve point (x,y) */
15281 typedef enum {
15282         /** the point is encoded as z||x, where the octet z specifies
15283          *  which solution of the quadratic equation y is  */
15284     POINT_CONVERSION_COMPRESSED = 2,
15285         /** the point is encoded as z||x||y, where z is the octet 0x04  */
15286     POINT_CONVERSION_UNCOMPRESSED = 4,
15287         /** the point is encoded as z||x||y, where the octet z specifies
15288          *  which solution of the quadratic equation y is  */
15289     POINT_CONVERSION_HYBRID = 6
15290 } point_conversion_form_t;
15291 
15292 typedef struct ec_method_st EC_METHOD;
15293 
15294 typedef struct ec_group_st
15295     /*-
15296      EC_METHOD *meth;
15297      -- field definition
15298      -- curve coefficients
15299      -- optional generator with associated information (order, cofactor)
15300      -- optional extra data (precomputed table for fast computation of multiples of generator)
15301      -- ASN1 stuff
15302     */
15303     EC_GROUP;
15304 
15305 typedef struct ec_point_st EC_POINT;
15306 
15307 /********************************************************************/
15308 /*               EC_METHODs for curves over GF(p)                   */
15309 /********************************************************************/
15310 
15311 /** Returns the basic GFp ec methods which provides the basis for the
15312  *  optimized methods.
15313  *  \return  EC_METHOD object
15314  */
15315 const EC_METHOD *EC_GFp_simple_method(void);
15316 
15317 /** Returns GFp methods using montgomery multiplication.
15318  *  \return  EC_METHOD object
15319  */
15320 const EC_METHOD *EC_GFp_mont_method(void);
15321 
15322 /** Returns GFp methods using optimized methods for NIST recommended curves
15323  *  \return  EC_METHOD object
15324  */
15325 const EC_METHOD *EC_GFp_nist_method(void);
15326 # 169 "/usr/include/openssl/ec.h" 3 4
15327 /********************************************************************/
15328 /*           EC_METHOD for curves over GF(2^m)                      */
15329 /********************************************************************/
15330 
15331 /** Returns the basic GF2m ec method
15332  *  \return  EC_METHOD object
15333  */
15334 const EC_METHOD *EC_GF2m_simple_method(void);
15335 
15336 
15337 
15338 /********************************************************************/
15339 /*                   EC_GROUP functions                             */
15340 /********************************************************************/
15341 
15342 /** Creates a new EC_GROUP object
15343  *  \param   meth  EC_METHOD to use
15344  *  \return  newly created EC_GROUP object or NULL in case of an error.
15345  */
15346 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
15347 
15348 /** Frees a EC_GROUP object
15349  *  \param  group  EC_GROUP object to be freed.
15350  */
15351 void EC_GROUP_free(EC_GROUP *group);
15352 
15353 /** Clears and frees a EC_GROUP object
15354  *  \param  group  EC_GROUP object to be cleared and freed.
15355  */
15356 void EC_GROUP_clear_free(EC_GROUP *group);
15357 
15358 /** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.
15359  *  \param  dst  destination EC_GROUP object
15360  *  \param  src  source EC_GROUP object
15361  *  \return 1 on success and 0 if an error occurred.
15362  */
15363 int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
15364 
15365 /** Creates a new EC_GROUP object and copies the copies the content
15366  *  form src to the newly created EC_KEY object
15367  *  \param  src  source EC_GROUP object
15368  *  \return newly created EC_GROUP object or NULL in case of an error.
15369  */
15370 EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
15371 
15372 /** Returns the EC_METHOD of the EC_GROUP object.
15373  *  \param  group  EC_GROUP object
15374  *  \return EC_METHOD used in this EC_GROUP object.
15375  */
15376 const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);
15377 
15378 /** Returns the field type of the EC_METHOD.
15379  *  \param  meth  EC_METHOD object
15380  *  \return NID of the underlying field type OID.
15381  */
15382 int EC_METHOD_get_field_type(const EC_METHOD *meth);
15383 
15384 /** Sets the generator and it's order/cofactor of a EC_GROUP object.
15385  *  \param  group      EC_GROUP object
15386  *  \param  generator  EC_POINT object with the generator.
15387  *  \param  order      the order of the group generated by the generator.
15388  *  \param  cofactor   the index of the sub-group generated by the generator
15389  *                     in the group of all points on the elliptic curve.
15390  *  \return 1 on success and 0 if an error occured
15391  */
15392 int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
15393                            const BIGNUM *order, const BIGNUM *cofactor);
15394 
15395 /** Returns the generator of a EC_GROUP object.
15396  *  \param  group  EC_GROUP object
15397  *  \return the currently used generator (possibly NULL).
15398  */
15399 const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
15400 
15401 /** Returns the montgomery data for order(Generator)
15402  *  \param  group  EC_GROUP object
15403  *  \return the currently used generator (possibly NULL).
15404 */
15405 BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group);
15406 
15407 /** Gets the order of a EC_GROUP
15408  *  \param  group  EC_GROUP object
15409  *  \param  order  BIGNUM to which the order is copied
15410  *  \param  ctx    BN_CTX object (optional)
15411  *  \return 1 on success and 0 if an error occured
15412  */
15413 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
15414 
15415 /** Gets the cofactor of a EC_GROUP
15416  *  \param  group     EC_GROUP object
15417  *  \param  cofactor  BIGNUM to which the cofactor is copied
15418  *  \param  ctx       BN_CTX object (optional)
15419  *  \return 1 on success and 0 if an error occured
15420  */
15421 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
15422                           BN_CTX *ctx);
15423 
15424 /** Sets the name of a EC_GROUP object
15425  *  \param  group  EC_GROUP object
15426  *  \param  nid    NID of the curve name OID
15427  */
15428 void EC_GROUP_set_curve_name(EC_GROUP *group, int nid);
15429 
15430 /** Returns the curve name of a EC_GROUP object
15431  *  \param  group  EC_GROUP object
15432  *  \return NID of the curve name OID or 0 if not set.
15433  */
15434 int EC_GROUP_get_curve_name(const EC_GROUP *group);
15435 
15436 void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
15437 int EC_GROUP_get_asn1_flag(const EC_GROUP *group);
15438 
15439 void EC_GROUP_set_point_conversion_form(EC_GROUP *group,
15440                                         point_conversion_form_t form);
15441 point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
15442 
15443 unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x);
15444 size_t EC_GROUP_get_seed_len(const EC_GROUP *);
15445 size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
15446 
15447 /** Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b
15448  *  \param  group  EC_GROUP object
15449  *  \param  p      BIGNUM with the prime number
15450  *  \param  a      BIGNUM with parameter a of the equation
15451  *  \param  b      BIGNUM with parameter b of the equation
15452  *  \param  ctx    BN_CTX object (optional)
15453  *  \return 1 on success and 0 if an error occured
15454  */
15455 int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
15456                            const BIGNUM *b, BN_CTX *ctx);
15457 
15458 /** Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b
15459  *  \param  group  EC_GROUP object
15460  *  \param  p      BIGNUM for the prime number
15461  *  \param  a      BIGNUM for parameter a of the equation
15462  *  \param  b      BIGNUM for parameter b of the equation
15463  *  \param  ctx    BN_CTX object (optional)
15464  *  \return 1 on success and 0 if an error occured
15465  */
15466 int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
15467                            BIGNUM *b, BN_CTX *ctx);
15468 
15469 
15470 /** Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
15471  *  \param  group  EC_GROUP object
15472  *  \param  p      BIGNUM with the polynomial defining the underlying field
15473  *  \param  a      BIGNUM with parameter a of the equation
15474  *  \param  b      BIGNUM with parameter b of the equation
15475  *  \param  ctx    BN_CTX object (optional)
15476  *  \return 1 on success and 0 if an error occured
15477  */
15478 int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
15479                             const BIGNUM *b, BN_CTX *ctx);
15480 
15481 /** Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
15482  *  \param  group  EC_GROUP object
15483  *  \param  p      BIGNUM for the polynomial defining the underlying field
15484  *  \param  a      BIGNUM for parameter a of the equation
15485  *  \param  b      BIGNUM for parameter b of the equation
15486  *  \param  ctx    BN_CTX object (optional)
15487  *  \return 1 on success and 0 if an error occured
15488  */
15489 int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
15490                             BIGNUM *b, BN_CTX *ctx);
15491 
15492 /** Returns the number of bits needed to represent a field element
15493  *  \param  group  EC_GROUP object
15494  *  \return number of bits needed to represent a field element
15495  */
15496 int EC_GROUP_get_degree(const EC_GROUP *group);
15497 
15498 /** Checks whether the parameter in the EC_GROUP define a valid ec group
15499  *  \param  group  EC_GROUP object
15500  *  \param  ctx    BN_CTX object (optional)
15501  *  \return 1 if group is a valid ec group and 0 otherwise
15502  */
15503 int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
15504 
15505 /** Checks whether the discriminant of the elliptic curve is zero or not
15506  *  \param  group  EC_GROUP object
15507  *  \param  ctx    BN_CTX object (optional)
15508  *  \return 1 if the discriminant is not zero and 0 otherwise
15509  */
15510 int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);
15511 
15512 /** Compares two EC_GROUP objects
15513  *  \param  a    first EC_GROUP object
15514  *  \param  b    second EC_GROUP object
15515  *  \param  ctx  BN_CTX object (optional)
15516  *  \return 0 if both groups are equal and 1 otherwise
15517  */
15518 int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);
15519 
15520 /*
15521  * EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() after
15522  * choosing an appropriate EC_METHOD
15523  */
15524 
15525 /** Creates a new EC_GROUP object with the specified parameters defined
15526  *  over GFp (defined by the equation y^2 = x^3 + a*x + b)
15527  *  \param  p    BIGNUM with the prime number
15528  *  \param  a    BIGNUM with the parameter a of the equation
15529  *  \param  b    BIGNUM with the parameter b of the equation
15530  *  \param  ctx  BN_CTX object (optional)
15531  *  \return newly created EC_GROUP object with the specified parameters
15532  */
15533 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
15534                                  const BIGNUM *b, BN_CTX *ctx);
15535 
15536 /** Creates a new EC_GROUP object with the specified parameters defined
15537  *  over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b)
15538  *  \param  p    BIGNUM with the polynomial defining the underlying field
15539  *  \param  a    BIGNUM with the parameter a of the equation
15540  *  \param  b    BIGNUM with the parameter b of the equation
15541  *  \param  ctx  BN_CTX object (optional)
15542  *  \return newly created EC_GROUP object with the specified parameters
15543  */
15544 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
15545                                   const BIGNUM *b, BN_CTX *ctx);
15546 
15547 /** Creates a EC_GROUP object with a curve specified by a NID
15548  *  \param  nid  NID of the OID of the curve name
15549  *  \return newly created EC_GROUP object with specified curve or NULL
15550  *          if an error occurred
15551  */
15552 EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
15553 
15554 /********************************************************************/
15555 /*               handling of internal curves                        */
15556 /********************************************************************/
15557 
15558 typedef struct {
15559     int nid;
15560     const char *comment;
15561 } EC_builtin_curve;
15562 
15563 /*
15564  * EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all
15565  * available curves or zero if a error occurred. In case r ist not zero
15566  * nitems EC_builtin_curve structures are filled with the data of the first
15567  * nitems internal groups
15568  */
15569 size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
15570 
15571 const char *EC_curve_nid2nist(int nid);
15572 int EC_curve_nist2nid(const char *name);
15573 
15574 /********************************************************************/
15575 /*                    EC_POINT functions                            */
15576 /********************************************************************/
15577 
15578 /** Creates a new EC_POINT object for the specified EC_GROUP
15579  *  \param  group  EC_GROUP the underlying EC_GROUP object
15580  *  \return newly created EC_POINT object or NULL if an error occurred
15581  */
15582 EC_POINT *EC_POINT_new(const EC_GROUP *group);
15583 
15584 /** Frees a EC_POINT object
15585  *  \param  point  EC_POINT object to be freed
15586  */
15587 void EC_POINT_free(EC_POINT *point);
15588 
15589 /** Clears and frees a EC_POINT object
15590  *  \param  point  EC_POINT object to be cleared and freed
15591  */
15592 void EC_POINT_clear_free(EC_POINT *point);
15593 
15594 /** Copies EC_POINT object
15595  *  \param  dst  destination EC_POINT object
15596  *  \param  src  source EC_POINT object
15597  *  \return 1 on success and 0 if an error occured
15598  */
15599 int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
15600 
15601 /** Creates a new EC_POINT object and copies the content of the supplied
15602  *  EC_POINT
15603  *  \param  src    source EC_POINT object
15604  *  \param  group  underlying the EC_GROUP object
15605  *  \return newly created EC_POINT object or NULL if an error occurred
15606  */
15607 EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
15608 
15609 /** Returns the EC_METHOD used in EC_POINT object
15610  *  \param  point  EC_POINT object
15611  *  \return the EC_METHOD used
15612  */
15613 const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
15614 
15615 /** Sets a point to infinity (neutral element)
15616  *  \param  group  underlying EC_GROUP object
15617  *  \param  point  EC_POINT to set to infinity
15618  *  \return 1 on success and 0 if an error occured
15619  */
15620 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
15621 
15622 /** Sets the jacobian projective coordinates of a EC_POINT over GFp
15623  *  \param  group  underlying EC_GROUP object
15624  *  \param  p      EC_POINT object
15625  *  \param  x      BIGNUM with the x-coordinate
15626  *  \param  y      BIGNUM with the y-coordinate
15627  *  \param  z      BIGNUM with the z-coordinate
15628  *  \param  ctx    BN_CTX object (optional)
15629  *  \return 1 on success and 0 if an error occured
15630  */
15631 int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group,
15632                                              EC_POINT *p, const BIGNUM *x,
15633                                              const BIGNUM *y, const BIGNUM *z,
15634                                              BN_CTX *ctx);
15635 
15636 /** Gets the jacobian projective coordinates of a EC_POINT over GFp
15637  *  \param  group  underlying EC_GROUP object
15638  *  \param  p      EC_POINT object
15639  *  \param  x      BIGNUM for the x-coordinate
15640  *  \param  y      BIGNUM for the y-coordinate
15641  *  \param  z      BIGNUM for the z-coordinate
15642  *  \param  ctx    BN_CTX object (optional)
15643  *  \return 1 on success and 0 if an error occured
15644  */
15645 int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
15646                                              const EC_POINT *p, BIGNUM *x,
15647                                              BIGNUM *y, BIGNUM *z,
15648                                              BN_CTX *ctx);
15649 
15650 /** Sets the affine coordinates of a EC_POINT over GFp
15651  *  \param  group  underlying EC_GROUP object
15652  *  \param  p      EC_POINT object
15653  *  \param  x      BIGNUM with the x-coordinate
15654  *  \param  y      BIGNUM with the y-coordinate
15655  *  \param  ctx    BN_CTX object (optional)
15656  *  \return 1 on success and 0 if an error occured
15657  */
15658 int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
15659                                         const BIGNUM *x, const BIGNUM *y,
15660                                         BN_CTX *ctx);
15661 
15662 /** Gets the affine coordinates of a EC_POINT over GFp
15663  *  \param  group  underlying EC_GROUP object
15664  *  \param  p      EC_POINT object
15665  *  \param  x      BIGNUM for the x-coordinate
15666  *  \param  y      BIGNUM for the y-coordinate
15667  *  \param  ctx    BN_CTX object (optional)
15668  *  \return 1 on success and 0 if an error occured
15669  */
15670 int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
15671                                         const EC_POINT *p, BIGNUM *x,
15672                                         BIGNUM *y, BN_CTX *ctx);
15673 
15674 /** Sets the x9.62 compressed coordinates of a EC_POINT over GFp
15675  *  \param  group  underlying EC_GROUP object
15676  *  \param  p      EC_POINT object
15677  *  \param  x      BIGNUM with x-coordinate
15678  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
15679  *  \param  ctx    BN_CTX object (optional)
15680  *  \return 1 on success and 0 if an error occured
15681  */
15682 int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,
15683                                             EC_POINT *p, const BIGNUM *x,
15684                                             int y_bit, BN_CTX *ctx);
15685 
15686 /** Sets the affine coordinates of a EC_POINT over GF2m
15687  *  \param  group  underlying EC_GROUP object
15688  *  \param  p      EC_POINT object
15689  *  \param  x      BIGNUM with the x-coordinate
15690  *  \param  y      BIGNUM with the y-coordinate
15691  *  \param  ctx    BN_CTX object (optional)
15692  *  \return 1 on success and 0 if an error occured
15693  */
15694 int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,
15695                                          const BIGNUM *x, const BIGNUM *y,
15696                                          BN_CTX *ctx);
15697 
15698 /** Gets the affine coordinates of a EC_POINT over GF2m
15699  *  \param  group  underlying EC_GROUP object
15700  *  \param  p      EC_POINT object
15701  *  \param  x      BIGNUM for the x-coordinate
15702  *  \param  y      BIGNUM for the y-coordinate
15703  *  \param  ctx    BN_CTX object (optional)
15704  *  \return 1 on success and 0 if an error occured
15705  */
15706 int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
15707                                          const EC_POINT *p, BIGNUM *x,
15708                                          BIGNUM *y, BN_CTX *ctx);
15709 
15710 /** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m
15711  *  \param  group  underlying EC_GROUP object
15712  *  \param  p      EC_POINT object
15713  *  \param  x      BIGNUM with x-coordinate
15714  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
15715  *  \param  ctx    BN_CTX object (optional)
15716  *  \return 1 on success and 0 if an error occured
15717  */
15718 int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
15719                                              EC_POINT *p, const BIGNUM *x,
15720                                              int y_bit, BN_CTX *ctx);
15721 
15722 /** Encodes a EC_POINT object to a octet string
15723  *  \param  group  underlying EC_GROUP object
15724  *  \param  p      EC_POINT object
15725  *  \param  form   point conversion form
15726  *  \param  buf    memory buffer for the result. If NULL the function returns
15727  *                 required buffer size.
15728  *  \param  len    length of the memory buffer
15729  *  \param  ctx    BN_CTX object (optional)
15730  *  \return the length of the encoded octet string or 0 if an error occurred
15731  */
15732 size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
15733                           point_conversion_form_t form,
15734                           unsigned char *buf, size_t len, BN_CTX *ctx);
15735 
15736 /** Decodes a EC_POINT from a octet string
15737  *  \param  group  underlying EC_GROUP object
15738  *  \param  p      EC_POINT object
15739  *  \param  buf    memory buffer with the encoded ec point
15740  *  \param  len    length of the encoded ec point
15741  *  \param  ctx    BN_CTX object (optional)
15742  *  \return 1 on success and 0 if an error occured
15743  */
15744 int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
15745                        const unsigned char *buf, size_t len, BN_CTX *ctx);
15746 
15747 /* other interfaces to point2oct/oct2point: */
15748 BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
15749                           point_conversion_form_t form, BIGNUM *, BN_CTX *);
15750 EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
15751                             EC_POINT *, BN_CTX *);
15752 char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
15753                          point_conversion_form_t form, BN_CTX *);
15754 EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
15755                              EC_POINT *, BN_CTX *);
15756 
15757 /********************************************************************/
15758 /*         functions for doing EC_POINT arithmetic                  */
15759 /********************************************************************/
15760 
15761 /** Computes the sum of two EC_POINT
15762  *  \param  group  underlying EC_GROUP object
15763  *  \param  r      EC_POINT object for the result (r = a + b)
15764  *  \param  a      EC_POINT object with the first summand
15765  *  \param  b      EC_POINT object with the second summand
15766  *  \param  ctx    BN_CTX object (optional)
15767  *  \return 1 on success and 0 if an error occured
15768  */
15769 int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
15770                  const EC_POINT *b, BN_CTX *ctx);
15771 
15772 /** Computes the double of a EC_POINT
15773  *  \param  group  underlying EC_GROUP object
15774  *  \param  r      EC_POINT object for the result (r = 2 * a)
15775  *  \param  a      EC_POINT object
15776  *  \param  ctx    BN_CTX object (optional)
15777  *  \return 1 on success and 0 if an error occured
15778  */
15779 int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
15780                  BN_CTX *ctx);
15781 
15782 /** Computes the inverse of a EC_POINT
15783  *  \param  group  underlying EC_GROUP object
15784  *  \param  a      EC_POINT object to be inverted (it's used for the result as well)
15785  *  \param  ctx    BN_CTX object (optional)
15786  *  \return 1 on success and 0 if an error occured
15787  */
15788 int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
15789 
15790 /** Checks whether the point is the neutral element of the group
15791  *  \param  group  the underlying EC_GROUP object
15792  *  \param  p      EC_POINT object
15793  *  \return 1 if the point is the neutral element and 0 otherwise
15794  */
15795 int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);
15796 
15797 /** Checks whether the point is on the curve
15798  *  \param  group  underlying EC_GROUP object
15799  *  \param  point  EC_POINT object to check
15800  *  \param  ctx    BN_CTX object (optional)
15801  *  \return 1 if point if on the curve and 0 otherwise
15802  */
15803 int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
15804                          BN_CTX *ctx);
15805 
15806 /** Compares two EC_POINTs
15807  *  \param  group  underlying EC_GROUP object
15808  *  \param  a      first EC_POINT object
15809  *  \param  b      second EC_POINT object
15810  *  \param  ctx    BN_CTX object (optional)
15811  *  \return 0 if both points are equal and a value != 0 otherwise
15812  */
15813 int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,
15814                  BN_CTX *ctx);
15815 
15816 int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx);
15817 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
15818                           EC_POINT *points[], BN_CTX *ctx);
15819 
15820 /** Computes r = generator * n sum_{i=0}^{num-1} p[i] * m[i]
15821  *  \param  group  underlying EC_GROUP object
15822  *  \param  r      EC_POINT object for the result
15823  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
15824  *  \param  num    number futher summands
15825  *  \param  p      array of size num of EC_POINT objects
15826  *  \param  m      array of size num of BIGNUM objects
15827  *  \param  ctx    BN_CTX object (optional)
15828  *  \return 1 on success and 0 if an error occured
15829  */
15830 int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
15831                   size_t num, const EC_POINT *p[], const BIGNUM *m[],
15832                   BN_CTX *ctx);
15833 
15834 /** Computes r = generator * n + q * m
15835  *  \param  group  underlying EC_GROUP object
15836  *  \param  r      EC_POINT object for the result
15837  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
15838  *  \param  q      EC_POINT object with the first factor of the second summand
15839  *  \param  m      BIGNUM with the second factor of the second summand
15840  *  \param  ctx    BN_CTX object (optional)
15841  *  \return 1 on success and 0 if an error occured
15842  */
15843 int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
15844                  const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
15845 
15846 /** Stores multiples of generator for faster point multiplication
15847  *  \param  group  EC_GROUP object
15848  *  \param  ctx    BN_CTX object (optional)
15849  *  \return 1 on success and 0 if an error occured
15850  */
15851 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
15852 
15853 /** Reports whether a precomputation has been done
15854  *  \param  group  EC_GROUP object
15855  *  \return 1 if a pre-computation has been done and 0 otherwise
15856  */
15857 int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
15858 
15859 /********************************************************************/
15860 /*                       ASN1 stuff                                 */
15861 /********************************************************************/
15862 
15863 /*
15864  * EC_GROUP_get_basis_type() returns the NID of the basis type used to
15865  * represent the field elements
15866  */
15867 int EC_GROUP_get_basis_type(const EC_GROUP *);
15868 
15869 int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
15870 int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
15871                                    unsigned int *k2, unsigned int *k3);
15872 
15873 
15874 
15875 
15876 typedef struct ecpk_parameters_st ECPKPARAMETERS;
15877 
15878 EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
15879 int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
15880 # 731 "/usr/include/openssl/ec.h" 3 4
15881 int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
15882 
15883 
15884 int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
15885 
15886 
15887 /********************************************************************/
15888 /*                      EC_KEY functions                            */
15889 /********************************************************************/
15890 
15891 typedef struct ec_key_st EC_KEY;
15892 
15893 /* some values for the encoding_flag */
15894 
15895 
15896 
15897 /* some values for the flags field */
15898 
15899 
15900 
15901 /** Creates a new EC_KEY object.
15902  *  \return EC_KEY object or NULL if an error occurred.
15903  */
15904 EC_KEY *EC_KEY_new(void);
15905 
15906 int EC_KEY_get_flags(const EC_KEY *key);
15907 
15908 void EC_KEY_set_flags(EC_KEY *key, int flags);
15909 
15910 void EC_KEY_clear_flags(EC_KEY *key, int flags);
15911 
15912 /** Creates a new EC_KEY object using a named curve as underlying
15913  *  EC_GROUP object.
15914  *  \param  nid  NID of the named curve.
15915  *  \return EC_KEY object or NULL if an error occurred.
15916  */
15917 EC_KEY *EC_KEY_new_by_curve_name(int nid);
15918 
15919 /** Frees a EC_KEY object.
15920  *  \param  key  EC_KEY object to be freed.
15921  */
15922 void EC_KEY_free(EC_KEY *key);
15923 
15924 /** Copies a EC_KEY object.
15925  *  \param  dst  destination EC_KEY object
15926  *  \param  src  src EC_KEY object
15927  *  \return dst or NULL if an error occurred.
15928  */
15929 EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
15930 
15931 /** Creates a new EC_KEY object and copies the content from src to it.
15932  *  \param  src  the source EC_KEY object
15933  *  \return newly created EC_KEY object or NULL if an error occurred.
15934  */
15935 EC_KEY *EC_KEY_dup(const EC_KEY *src);
15936 
15937 /** Increases the internal reference count of a EC_KEY object.
15938  *  \param  key  EC_KEY object
15939  *  \return 1 on success and 0 if an error occurred.
15940  */
15941 int EC_KEY_up_ref(EC_KEY *key);
15942 
15943 /** Returns the EC_GROUP object of a EC_KEY object
15944  *  \param  key  EC_KEY object
15945  *  \return the EC_GROUP object (possibly NULL).
15946  */
15947 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
15948 
15949 /** Sets the EC_GROUP of a EC_KEY object.
15950  *  \param  key    EC_KEY object
15951  *  \param  group  EC_GROUP to use in the EC_KEY object (note: the EC_KEY
15952  *                 object will use an own copy of the EC_GROUP).
15953  *  \return 1 on success and 0 if an error occurred.
15954  */
15955 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
15956 
15957 /** Returns the private key of a EC_KEY object.
15958  *  \param  key  EC_KEY object
15959  *  \return a BIGNUM with the private key (possibly NULL).
15960  */
15961 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
15962 
15963 /** Sets the private key of a EC_KEY object.
15964  *  \param  key  EC_KEY object
15965  *  \param  prv  BIGNUM with the private key (note: the EC_KEY object
15966  *               will use an own copy of the BIGNUM).
15967  *  \return 1 on success and 0 if an error occurred.
15968  */
15969 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
15970 
15971 /** Returns the public key of a EC_KEY object.
15972  *  \param  key  the EC_KEY object
15973  *  \return a EC_POINT object with the public key (possibly NULL)
15974  */
15975 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
15976 
15977 /** Sets the public key of a EC_KEY object.
15978  *  \param  key  EC_KEY object
15979  *  \param  pub  EC_POINT object with the public key (note: the EC_KEY object
15980  *               will use an own copy of the EC_POINT object).
15981  *  \return 1 on success and 0 if an error occurred.
15982  */
15983 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
15984 
15985 unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
15986 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
15987 point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);
15988 void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform);
15989 /* functions to set/get method specific data  */
15990 void *EC_KEY_get_key_method_data(EC_KEY *key,
15991                                  void *(*dup_func) (void *),
15992                                  void (*free_func) (void *),
15993                                  void (*clear_free_func) (void *));
15994 /** Sets the key method data of an EC_KEY object, if none has yet been set.
15995  *  \param  key              EC_KEY object
15996  *  \param  data             opaque data to install.
15997  *  \param  dup_func         a function that duplicates |data|.
15998  *  \param  free_func        a function that frees |data|.
15999  *  \param  clear_free_func  a function that wipes and frees |data|.
16000  *  \return the previously set data pointer, or NULL if |data| was inserted.
16001  */
16002 void *EC_KEY_insert_key_method_data(EC_KEY *key, void *data,
16003                                     void *(*dup_func) (void *),
16004                                     void (*free_func) (void *),
16005                                     void (*clear_free_func) (void *));
16006 /* wrapper functions for the underlying EC_GROUP object */
16007 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
16008 
16009 /** Creates a table of pre-computed multiples of the generator to
16010  *  accelerate further EC_KEY operations.
16011  *  \param  key  EC_KEY object
16012  *  \param  ctx  BN_CTX object (optional)
16013  *  \return 1 on success and 0 if an error occurred.
16014  */
16015 int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
16016 
16017 /** Creates a new ec private (and optional a new public) key.
16018  *  \param  key  EC_KEY object
16019  *  \return 1 on success and 0 if an error occurred.
16020  */
16021 int EC_KEY_generate_key(EC_KEY *key);
16022 
16023 /** Verifies that a private and/or public key is valid.
16024  *  \param  key  the EC_KEY object
16025  *  \return 1 on success and 0 otherwise.
16026  */
16027 int EC_KEY_check_key(const EC_KEY *key);
16028 
16029 /** Sets a public key from affine coordindates performing
16030  *  neccessary NIST PKV tests.
16031  *  \param  key  the EC_KEY object
16032  *  \param  x    public key x coordinate
16033  *  \param  y    public key y coordinate
16034  *  \return 1 on success and 0 otherwise.
16035  */
16036 int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
16037                                              BIGNUM *y);
16038 
16039 /********************************************************************/
16040 /*        de- and encoding functions for SEC1 ECPrivateKey          */
16041 /********************************************************************/
16042 
16043 /** Decodes a private key from a memory buffer.
16044  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
16045  *  \param  in   pointer to memory with the DER encoded private key
16046  *  \param  len  length of the DER encoded private key
16047  *  \return the decoded private key or NULL if an error occurred.
16048  */
16049 EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len);
16050 
16051 /** Encodes a private key object and stores the result in a buffer.
16052  *  \param  key  the EC_KEY object to encode
16053  *  \param  out  the buffer for the result (if NULL the function returns number
16054  *               of bytes needed).
16055  *  \return 1 on success and 0 if an error occurred.
16056  */
16057 int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out);
16058 
16059 /********************************************************************/
16060 /*        de- and encoding functions for EC parameters              */
16061 /********************************************************************/
16062 
16063 /** Decodes ec parameter from a memory buffer.
16064  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
16065  *  \param  in   pointer to memory with the DER encoded ec parameters
16066  *  \param  len  length of the DER encoded ec parameters
16067  *  \return a EC_KEY object with the decoded parameters or NULL if an error
16068  *          occurred.
16069  */
16070 EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len);
16071 
16072 /** Encodes ec parameter and stores the result in a buffer.
16073  *  \param  key  the EC_KEY object with ec paramters to encode
16074  *  \param  out  the buffer for the result (if NULL the function returns number
16075  *               of bytes needed).
16076  *  \return 1 on success and 0 if an error occurred.
16077  */
16078 int i2d_ECParameters(EC_KEY *key, unsigned char **out);
16079 
16080 /********************************************************************/
16081 /*         de- and encoding functions for EC public key             */
16082 /*         (octet string, not DER -- hence 'o2i' and 'i2o')         */
16083 /********************************************************************/
16084 
16085 /** Decodes a ec public key from a octet string.
16086  *  \param  key  a pointer to a EC_KEY object which should be used
16087  *  \param  in   memory buffer with the encoded public key
16088  *  \param  len  length of the encoded public key
16089  *  \return EC_KEY object with decoded public key or NULL if an error
16090  *          occurred.
16091  */
16092 EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len);
16093 
16094 /** Encodes a ec public key in an octet string.
16095  *  \param  key  the EC_KEY object with the public key
16096  *  \param  out  the buffer for the result (if NULL the function returns number
16097  *               of bytes needed).
16098  *  \return 1 on success and 0 if an error occurred
16099  */
16100 int i2o_ECPublicKey(EC_KEY *key, unsigned char **out);
16101 
16102 
16103 /** Prints out the ec parameters on human readable form.
16104  *  \param  bp   BIO object to which the information is printed
16105  *  \param  key  EC_KEY object
16106  *  \return 1 on success and 0 if an error occurred
16107  */
16108 int ECParameters_print(BIO *bp, const EC_KEY *key);
16109 
16110 /** Prints out the contents of a EC_KEY object
16111  *  \param  bp   BIO object to which the information is printed
16112  *  \param  key  EC_KEY object
16113  *  \param  off  line offset
16114  *  \return 1 on success and 0 if an error occurred
16115  */
16116 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
16117 
16118 
16119 
16120 /** Prints out the ec parameters on human readable form.
16121  *  \param  fp   file descriptor to which the information is printed
16122  *  \param  key  EC_KEY object
16123  *  \return 1 on success and 0 if an error occurred
16124  */
16125 int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
16126 
16127 /** Prints out the contents of a EC_KEY object
16128  *  \param  fp   file descriptor to which the information is printed
16129  *  \param  key  EC_KEY object
16130  *  \param  off  line offset
16131  *  \return 1 on success and 0 if an error occurred
16132  */
16133 int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
16134 # 1067 "/usr/include/openssl/ec.h" 3 4
16135 /* KDF types */
16136 
16137 
16138 
16139 /* BEGIN ERROR CODES */
16140 /*
16141  * The following lines are auto generated by the script mkerr.pl. Any changes
16142  * made after this point may be overwritten when the script is next run.
16143  */
16144 
16145 void ERR_load_EC_strings(void);
16146 
16147 /* Error codes for the EC functions. */
16148 
16149 /* Function codes. */
16150 # 1227 "/usr/include/openssl/ec.h" 3 4
16151 /* Reason codes. */
16152 # 84 "/usr/include/openssl/x509.h" 2 3 4
16153 
16154 
16155 
16156 # 1 "/usr/include/openssl/ecdsa.h" 1 3 4
16157 /* crypto/ecdsa/ecdsa.h */
16158 /**
16159  * \file   crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
16160  * \author Written by Nils Larsch for the OpenSSL project
16161  */
16162 /* ====================================================================
16163  * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
16164  *
16165  * Redistribution and use in source and binary forms, with or without
16166  * modification, are permitted provided that the following conditions
16167  * are met:
16168  *
16169  * 1. Redistributions of source code must retain the above copyright
16170  *    notice, this list of conditions and the following disclaimer.
16171  *
16172  * 2. Redistributions in binary form must reproduce the above copyright
16173  *    notice, this list of conditions and the following disclaimer in
16174  *    the documentation and/or other materials provided with the
16175  *    distribution.
16176  *
16177  * 3. All advertising materials mentioning features or use of this
16178  *    software must display the following acknowledgment:
16179  *    "This product includes software developed by the OpenSSL Project
16180  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
16181  *
16182  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16183  *    endorse or promote products derived from this software without
16184  *    prior written permission. For written permission, please contact
16185  *    licensing@OpenSSL.org.
16186  *
16187  * 5. Products derived from this software may not be called "OpenSSL"
16188  *    nor may "OpenSSL" appear in their names without prior written
16189  *    permission of the OpenSSL Project.
16190  *
16191  * 6. Redistributions of any form whatsoever must retain the following
16192  *    acknowledgment:
16193  *    "This product includes software developed by the OpenSSL Project
16194  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
16195  *
16196  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16197  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16198  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16199  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16200  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16201  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16202  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16203  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16204  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16205  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16206  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16207  * OF THE POSSIBILITY OF SUCH DAMAGE.
16208  * ====================================================================
16209  *
16210  * This product includes cryptographic software written by Eric Young
16211  * (eay@cryptsoft.com).  This product includes software written by Tim
16212  * Hudson (tjh@cryptsoft.com).
16213  *
16214  */
16215 
16216 
16217 
16218 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
16219 /* opensslconf.h */
16220 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
16221 
16222 
16223 
16224 
16225 /* OpenSSL was configured with the following options: */
16226 # 108 "/usr/include/openssl/opensslconf.h" 3 4
16227 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
16228    asks for it.  This is a transient feature that is provided for those
16229    who haven't had the time to do the appropriate changes in their
16230    applications.  */
16231 # 204 "/usr/include/openssl/opensslconf.h" 3 4
16232 /* crypto/opensslconf.h.in */
16233 
16234 /* Generate 80386 code? */
16235 # 63 "/usr/include/openssl/ecdsa.h" 2 3 4
16236 
16237 
16238 
16239 
16240 
16241 # 1 "/usr/include/openssl/ec.h" 1 3 4
16242 /* crypto/ec/ec.h */
16243 /*
16244  * Originally written by Bodo Moeller for the OpenSSL project.
16245  */
16246 /**
16247  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
16248  * \author Originally written by Bodo Moeller for the OpenSSL project
16249  */
16250 /* ====================================================================
16251  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
16252  *
16253  * Redistribution and use in source and binary forms, with or without
16254  * modification, are permitted provided that the following conditions
16255  * are met:
16256  *
16257  * 1. Redistributions of source code must retain the above copyright
16258  *    notice, this list of conditions and the following disclaimer.
16259  *
16260  * 2. Redistributions in binary form must reproduce the above copyright
16261  *    notice, this list of conditions and the following disclaimer in
16262  *    the documentation and/or other materials provided with the
16263  *    distribution.
16264  *
16265  * 3. All advertising materials mentioning features or use of this
16266  *    software must display the following acknowledgment:
16267  *    "This product includes software developed by the OpenSSL Project
16268  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16269  *
16270  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16271  *    endorse or promote products derived from this software without
16272  *    prior written permission. For written permission, please contact
16273  *    openssl-core@openssl.org.
16274  *
16275  * 5. Products derived from this software may not be called "OpenSSL"
16276  *    nor may "OpenSSL" appear in their names without prior written
16277  *    permission of the OpenSSL Project.
16278  *
16279  * 6. Redistributions of any form whatsoever must retain the following
16280  *    acknowledgment:
16281  *    "This product includes software developed by the OpenSSL Project
16282  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16283  *
16284  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16285  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16286  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16287  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16288  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16289  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16290  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16291  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16292  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16293  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16294  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16295  * OF THE POSSIBILITY OF SUCH DAMAGE.
16296  * ====================================================================
16297  *
16298  * This product includes cryptographic software written by Eric Young
16299  * (eay@cryptsoft.com).  This product includes software written by Tim
16300  * Hudson (tjh@cryptsoft.com).
16301  *
16302  */
16303 /* ====================================================================
16304  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16305  *
16306  * Portions of the attached software ("Contribution") are developed by
16307  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16308  *
16309  * The Contribution is licensed pursuant to the OpenSSL open source
16310  * license provided above.
16311  *
16312  * The elliptic curve binary polynomial software is originally written by
16313  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16314  *
16315  */
16316 # 69 "/usr/include/openssl/ecdsa.h" 2 3 4
16317 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
16318 /* ====================================================================
16319  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
16320  *
16321  * Redistribution and use in source and binary forms, with or without
16322  * modification, are permitted provided that the following conditions
16323  * are met:
16324  *
16325  * 1. Redistributions of source code must retain the above copyright
16326  *    notice, this list of conditions and the following disclaimer.
16327  *
16328  * 2. Redistributions in binary form must reproduce the above copyright
16329  *    notice, this list of conditions and the following disclaimer in
16330  *    the documentation and/or other materials provided with the
16331  *    distribution.
16332  *
16333  * 3. All advertising materials mentioning features or use of this
16334  *    software must display the following acknowledgment:
16335  *    "This product includes software developed by the OpenSSL Project
16336  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16337  *
16338  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16339  *    endorse or promote products derived from this software without
16340  *    prior written permission. For written permission, please contact
16341  *    openssl-core@openssl.org.
16342  *
16343  * 5. Products derived from this software may not be called "OpenSSL"
16344  *    nor may "OpenSSL" appear in their names without prior written
16345  *    permission of the OpenSSL Project.
16346  *
16347  * 6. Redistributions of any form whatsoever must retain the following
16348  *    acknowledgment:
16349  *    "This product includes software developed by the OpenSSL Project
16350  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16351  *
16352  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16353  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16354  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16355  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16356  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16357  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16358  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16359  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16360  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16361  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16362  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16363  * OF THE POSSIBILITY OF SUCH DAMAGE.
16364  * ====================================================================
16365  *
16366  * This product includes cryptographic software written by Eric Young
16367  * (eay@cryptsoft.com).  This product includes software written by Tim
16368  * Hudson (tjh@cryptsoft.com).
16369  *
16370  */
16371 # 70 "/usr/include/openssl/ecdsa.h" 2 3 4
16372 
16373 # 1 "/usr/include/openssl/bn.h" 1 3 4
16374 /* crypto/bn/bn.h */
16375 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
16376  * All rights reserved.
16377  *
16378  * This package is an SSL implementation written
16379  * by Eric Young (eay@cryptsoft.com).
16380  * The implementation was written so as to conform with Netscapes SSL.
16381  *
16382  * This library is free for commercial and non-commercial use as long as
16383  * the following conditions are aheared to.  The following conditions
16384  * apply to all code found in this distribution, be it the RC4, RSA,
16385  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16386  * included with this distribution is covered by the same copyright terms
16387  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16388  *
16389  * Copyright remains Eric Young's, and as such any Copyright notices in
16390  * the code are not to be removed.
16391  * If this package is used in a product, Eric Young should be given attribution
16392  * as the author of the parts of the library used.
16393  * This can be in the form of a textual message at program startup or
16394  * in documentation (online or textual) provided with the package.
16395  *
16396  * Redistribution and use in source and binary forms, with or without
16397  * modification, are permitted provided that the following conditions
16398  * are met:
16399  * 1. Redistributions of source code must retain the copyright
16400  *    notice, this list of conditions and the following disclaimer.
16401  * 2. Redistributions in binary form must reproduce the above copyright
16402  *    notice, this list of conditions and the following disclaimer in the
16403  *    documentation and/or other materials provided with the distribution.
16404  * 3. All advertising materials mentioning features or use of this software
16405  *    must display the following acknowledgement:
16406  *    "This product includes cryptographic software written by
16407  *     Eric Young (eay@cryptsoft.com)"
16408  *    The word 'cryptographic' can be left out if the rouines from the library
16409  *    being used are not cryptographic related :-).
16410  * 4. If you include any Windows specific code (or a derivative thereof) from
16411  *    the apps directory (application code) you must include an acknowledgement:
16412  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16413  *
16414  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16415  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16416  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16417  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16418  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16419  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16420  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16421  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16422  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16423  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16424  * SUCH DAMAGE.
16425  *
16426  * The licence and distribution terms for any publically available version or
16427  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16428  * copied and put under another distribution licence
16429  * [including the GNU Public Licence.]
16430  */
16431 /* ====================================================================
16432  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
16433  *
16434  * Redistribution and use in source and binary forms, with or without
16435  * modification, are permitted provided that the following conditions
16436  * are met:
16437  *
16438  * 1. Redistributions of source code must retain the above copyright
16439  *    notice, this list of conditions and the following disclaimer.
16440  *
16441  * 2. Redistributions in binary form must reproduce the above copyright
16442  *    notice, this list of conditions and the following disclaimer in
16443  *    the documentation and/or other materials provided with the
16444  *    distribution.
16445  *
16446  * 3. All advertising materials mentioning features or use of this
16447  *    software must display the following acknowledgment:
16448  *    "This product includes software developed by the OpenSSL Project
16449  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16450  *
16451  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16452  *    endorse or promote products derived from this software without
16453  *    prior written permission. For written permission, please contact
16454  *    openssl-core@openssl.org.
16455  *
16456  * 5. Products derived from this software may not be called "OpenSSL"
16457  *    nor may "OpenSSL" appear in their names without prior written
16458  *    permission of the OpenSSL Project.
16459  *
16460  * 6. Redistributions of any form whatsoever must retain the following
16461  *    acknowledgment:
16462  *    "This product includes software developed by the OpenSSL Project
16463  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16464  *
16465  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16466  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16467  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16468  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16469  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16470  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16471  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16472  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16473  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16474  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16475  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16476  * OF THE POSSIBILITY OF SUCH DAMAGE.
16477  * ====================================================================
16478  *
16479  * This product includes cryptographic software written by Eric Young
16480  * (eay@cryptsoft.com).  This product includes software written by Tim
16481  * Hudson (tjh@cryptsoft.com).
16482  *
16483  */
16484 /* ====================================================================
16485  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16486  *
16487  * Portions of the attached software ("Contribution") are developed by
16488  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16489  *
16490  * The Contribution is licensed pursuant to the Eric Young open source
16491  * license provided above.
16492  *
16493  * The binary polynomial arithmetic software is originally written by
16494  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16495  *
16496  */
16497 # 72 "/usr/include/openssl/ecdsa.h" 2 3 4
16498 
16499 
16500 
16501 
16502 
16503 
16504 typedef struct ECDSA_SIG_st {
16505     BIGNUM *r;
16506     BIGNUM *s;
16507 } ECDSA_SIG;
16508 
16509 /** Allocates and initialize a ECDSA_SIG structure
16510  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
16511  */
16512 ECDSA_SIG *ECDSA_SIG_new(void);
16513 
16514 /** frees a ECDSA_SIG structure
16515  *  \param  sig  pointer to the ECDSA_SIG structure
16516  */
16517 void ECDSA_SIG_free(ECDSA_SIG *sig);
16518 
16519 /** DER encode content of ECDSA_SIG object (note: this function modifies *pp
16520  *  (*pp += length of the DER encoded signature)).
16521  *  \param  sig  pointer to the ECDSA_SIG object
16522  *  \param  pp   pointer to a unsigned char pointer for the output or NULL
16523  *  \return the length of the DER encoded ECDSA_SIG object or 0
16524  */
16525 int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
16526 
16527 /** Decodes a DER encoded ECDSA signature (note: this function changes *pp
16528  *  (*pp += len)).
16529  *  \param  sig  pointer to ECDSA_SIG pointer (may be NULL)
16530  *  \param  pp   memory buffer with the DER encoded signature
16531  *  \param  len  length of the buffer
16532  *  \return pointer to the decoded ECDSA_SIG structure (or NULL)
16533  */
16534 ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);
16535 
16536 /** Computes the ECDSA signature of the given hash value using
16537  *  the supplied private key and returns the created signature.
16538  *  \param  dgst      pointer to the hash value
16539  *  \param  dgst_len  length of the hash value
16540  *  \param  eckey     EC_KEY object containing a private EC key
16541  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
16542  */
16543 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len,
16544                          EC_KEY *eckey);
16545 
16546 /** Computes ECDSA signature of a given hash value using the supplied
16547  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
16548  *  \param  dgst     pointer to the hash value to sign
16549  *  \param  dgstlen  length of the hash value
16550  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
16551  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
16552  *                   see ECDSA_sign_setup
16553  *  \param  eckey    EC_KEY object containing a private EC key
16554  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
16555  */
16556 ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen,
16557                             const BIGNUM *kinv, const BIGNUM *rp,
16558                             EC_KEY *eckey);
16559 
16560 /** Verifies that the supplied signature is a valid ECDSA
16561  *  signature of the supplied hash value using the supplied public key.
16562  *  \param  dgst      pointer to the hash value
16563  *  \param  dgst_len  length of the hash value
16564  *  \param  sig       ECDSA_SIG structure
16565  *  \param  eckey     EC_KEY object containing a public EC key
16566  *  \return 1 if the signature is valid, 0 if the signature is invalid
16567  *          and -1 on error
16568  */
16569 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
16570                     const ECDSA_SIG *sig, EC_KEY *eckey);
16571 
16572 const ECDSA_METHOD *ECDSA_OpenSSL(void);
16573 
16574 /** Sets the default ECDSA method
16575  *  \param  meth  new default ECDSA_METHOD
16576  */
16577 void ECDSA_set_default_method(const ECDSA_METHOD *meth);
16578 
16579 /** Returns the default ECDSA method
16580  *  \return pointer to ECDSA_METHOD structure containing the default method
16581  */
16582 const ECDSA_METHOD *ECDSA_get_default_method(void);
16583 
16584 /** Sets method to be used for the ECDSA operations
16585  *  \param  eckey  EC_KEY object
16586  *  \param  meth   new method
16587  *  \return 1 on success and 0 otherwise
16588  */
16589 int ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth);
16590 
16591 /** Returns the maximum length of the DER encoded signature
16592  *  \param  eckey  EC_KEY object
16593  *  \return numbers of bytes required for the DER encoded signature
16594  */
16595 int ECDSA_size(const EC_KEY *eckey);
16596 
16597 /** Precompute parts of the signing operation
16598  *  \param  eckey  EC_KEY object containing a private EC key
16599  *  \param  ctx    BN_CTX object (optional)
16600  *  \param  kinv   BIGNUM pointer for the inverse of k
16601  *  \param  rp     BIGNUM pointer for x coordinate of k * generator
16602  *  \return 1 on success and 0 otherwise
16603  */
16604 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp);
16605 
16606 /** Computes ECDSA signature of a given hash value using the supplied
16607  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
16608  *  \param  type     this parameter is ignored
16609  *  \param  dgst     pointer to the hash value to sign
16610  *  \param  dgstlen  length of the hash value
16611  *  \param  sig      memory for the DER encoded created signature
16612  *  \param  siglen   pointer to the length of the returned signature
16613  *  \param  eckey    EC_KEY object containing a private EC key
16614  *  \return 1 on success and 0 otherwise
16615  */
16616 int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,
16617                unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
16618 
16619 /** Computes ECDSA signature of a given hash value using the supplied
16620  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
16621  *  \param  type     this parameter is ignored
16622  *  \param  dgst     pointer to the hash value to sign
16623  *  \param  dgstlen  length of the hash value
16624  *  \param  sig      buffer to hold the DER encoded signature
16625  *  \param  siglen   pointer to the length of the returned signature
16626  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
16627  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
16628  *                   see ECDSA_sign_setup
16629  *  \param  eckey    EC_KEY object containing a private EC key
16630  *  \return 1 on success and 0 otherwise
16631  */
16632 int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen,
16633                   unsigned char *sig, unsigned int *siglen,
16634                   const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey);
16635 
16636 /** Verifies that the given signature is valid ECDSA signature
16637  *  of the supplied hash value using the specified public key.
16638  *  \param  type     this parameter is ignored
16639  *  \param  dgst     pointer to the hash value
16640  *  \param  dgstlen  length of the hash value
16641  *  \param  sig      pointer to the DER encoded signature
16642  *  \param  siglen   length of the DER encoded signature
16643  *  \param  eckey    EC_KEY object containing a public EC key
16644  *  \return 1 if the signature is valid, 0 if the signature is invalid
16645  *          and -1 on error
16646  */
16647 int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen,
16648                  const unsigned char *sig, int siglen, EC_KEY *eckey);
16649 
16650 /* the standard ex_data functions */
16651 int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
16652                            *new_func, CRYPTO_EX_dup *dup_func,
16653                            CRYPTO_EX_free *free_func);
16654 int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg);
16655 void *ECDSA_get_ex_data(EC_KEY *d, int idx);
16656 
16657 /** Allocates and initialize a ECDSA_METHOD structure
16658  *  \param ecdsa_method pointer to ECDSA_METHOD to copy.  (May be NULL)
16659  *  \return pointer to a ECDSA_METHOD structure or NULL if an error occurred
16660  */
16661 
16662 ECDSA_METHOD *ECDSA_METHOD_new(const ECDSA_METHOD *ecdsa_method);
16663 
16664 /** frees a ECDSA_METHOD structure
16665  *  \param  ecdsa_method  pointer to the ECDSA_METHOD structure
16666  */
16667 void ECDSA_METHOD_free(ECDSA_METHOD *ecdsa_method);
16668 
16669 /**  Sets application specific data in the ECDSA_METHOD
16670  *   \param  ecdsa_method pointer to existing ECDSA_METHOD
16671  *   \param  app application specific data to set
16672  */
16673 
16674 void ECDSA_METHOD_set_app_data(ECDSA_METHOD *ecdsa_method, void *app);
16675 
16676 /** Returns application specific data from a ECDSA_METHOD structure
16677  *  \param ecdsa_method pointer to ECDSA_METHOD structure
16678  *  \return pointer to application specific data.
16679  */
16680 
16681 void *ECDSA_METHOD_get_app_data(ECDSA_METHOD *ecdsa_method);
16682 
16683 /**  Set the ECDSA_do_sign function in the ECDSA_METHOD
16684  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
16685  *   \param  ecdsa_do_sign a funtion of type ECDSA_do_sign
16686  */
16687 
16688 void ECDSA_METHOD_set_sign(ECDSA_METHOD *ecdsa_method,
16689                            ECDSA_SIG *(*ecdsa_do_sign) (const unsigned char
16690                                                         *dgst, int dgst_len,
16691                                                         const BIGNUM *inv,
16692                                                         const BIGNUM *rp,
16693                                                         EC_KEY *eckey));
16694 
16695 /**  Set the  ECDSA_sign_setup function in the ECDSA_METHOD
16696  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
16697  *   \param  ecdsa_sign_setup a funtion of type ECDSA_sign_setup
16698  */
16699 
16700 void ECDSA_METHOD_set_sign_setup(ECDSA_METHOD *ecdsa_method,
16701                                  int (*ecdsa_sign_setup) (EC_KEY *eckey,
16702                                                           BN_CTX *ctx,
16703                                                           BIGNUM **kinv,
16704                                                           BIGNUM **r));
16705 
16706 /**  Set the ECDSA_do_verify function in the ECDSA_METHOD
16707  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
16708  *   \param  ecdsa_do_verify a funtion of type ECDSA_do_verify
16709  */
16710 
16711 void ECDSA_METHOD_set_verify(ECDSA_METHOD *ecdsa_method,
16712                              int (*ecdsa_do_verify) (const unsigned char
16713                                                      *dgst, int dgst_len,
16714                                                      const ECDSA_SIG *sig,
16715                                                      EC_KEY *eckey));
16716 
16717 void ECDSA_METHOD_set_flags(ECDSA_METHOD *ecdsa_method, int flags);
16718 
16719 /**  Set the flags field in the ECDSA_METHOD
16720  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
16721  *   \param  flags flags value to set
16722  */
16723 
16724 void ECDSA_METHOD_set_name(ECDSA_METHOD *ecdsa_method, char *name);
16725 
16726 /**  Set the name field in the ECDSA_METHOD
16727  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
16728  *   \param  name name to set
16729  */
16730 
16731 /* BEGIN ERROR CODES */
16732 /*
16733  * The following lines are auto generated by the script mkerr.pl. Any changes
16734  * made after this point may be overwritten when the script is next run.
16735  */
16736 void ERR_load_ECDSA_strings(void);
16737 
16738 /* Error codes for the ECDSA functions. */
16739 
16740 /* Function codes. */
16741 
16742 
16743 
16744 
16745 
16746 
16747 
16748 /* Reason codes. */
16749 # 88 "/usr/include/openssl/x509.h" 2 3 4
16750 
16751 
16752 
16753 # 1 "/usr/include/openssl/ecdh.h" 1 3 4
16754 /* crypto/ecdh/ecdh.h */
16755 /* ====================================================================
16756  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16757  *
16758  * The Elliptic Curve Public-Key Crypto Library (ECC Code) included
16759  * herein is developed by SUN MICROSYSTEMS, INC., and is contributed
16760  * to the OpenSSL project.
16761  *
16762  * The ECC Code is licensed pursuant to the OpenSSL open source
16763  * license provided below.
16764  *
16765  * The ECDH software is originally written by Douglas Stebila of
16766  * Sun Microsystems Laboratories.
16767  *
16768  */
16769 /* ====================================================================
16770  * Copyright (c) 2000-2002 The OpenSSL Project.  All rights reserved.
16771  *
16772  * Redistribution and use in source and binary forms, with or without
16773  * modification, are permitted provided that the following conditions
16774  * are met:
16775  *
16776  * 1. Redistributions of source code must retain the above copyright
16777  *    notice, this list of conditions and the following disclaimer.
16778  *
16779  * 2. Redistributions in binary form must reproduce the above copyright
16780  *    notice, this list of conditions and the following disclaimer in
16781  *    the documentation and/or other materials provided with the
16782  *    distribution.
16783  *
16784  * 3. All advertising materials mentioning features or use of this
16785  *    software must display the following acknowledgment:
16786  *    "This product includes software developed by the OpenSSL Project
16787  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
16788  *
16789  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16790  *    endorse or promote products derived from this software without
16791  *    prior written permission. For written permission, please contact
16792  *    licensing@OpenSSL.org.
16793  *
16794  * 5. Products derived from this software may not be called "OpenSSL"
16795  *    nor may "OpenSSL" appear in their names without prior written
16796  *    permission of the OpenSSL Project.
16797  *
16798  * 6. Redistributions of any form whatsoever must retain the following
16799  *    acknowledgment:
16800  *    "This product includes software developed by the OpenSSL Project
16801  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
16802  *
16803  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16804  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16805  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16806  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16807  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16808  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16809  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16810  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16811  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16812  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16813  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16814  * OF THE POSSIBILITY OF SUCH DAMAGE.
16815  * ====================================================================
16816  *
16817  * This product includes cryptographic software written by Eric Young
16818  * (eay@cryptsoft.com).  This product includes software written by Tim
16819  * Hudson (tjh@cryptsoft.com).
16820  *
16821  */
16822 
16823 
16824 
16825 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
16826 /* opensslconf.h */
16827 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
16828 
16829 
16830 
16831 
16832 /* OpenSSL was configured with the following options: */
16833 # 108 "/usr/include/openssl/opensslconf.h" 3 4
16834 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
16835    asks for it.  This is a transient feature that is provided for those
16836    who haven't had the time to do the appropriate changes in their
16837    applications.  */
16838 # 204 "/usr/include/openssl/opensslconf.h" 3 4
16839 /* crypto/opensslconf.h.in */
16840 
16841 /* Generate 80386 code? */
16842 # 73 "/usr/include/openssl/ecdh.h" 2 3 4
16843 
16844 
16845 
16846 
16847 
16848 # 1 "/usr/include/openssl/ec.h" 1 3 4
16849 /* crypto/ec/ec.h */
16850 /*
16851  * Originally written by Bodo Moeller for the OpenSSL project.
16852  */
16853 /**
16854  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
16855  * \author Originally written by Bodo Moeller for the OpenSSL project
16856  */
16857 /* ====================================================================
16858  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
16859  *
16860  * Redistribution and use in source and binary forms, with or without
16861  * modification, are permitted provided that the following conditions
16862  * are met:
16863  *
16864  * 1. Redistributions of source code must retain the above copyright
16865  *    notice, this list of conditions and the following disclaimer.
16866  *
16867  * 2. Redistributions in binary form must reproduce the above copyright
16868  *    notice, this list of conditions and the following disclaimer in
16869  *    the documentation and/or other materials provided with the
16870  *    distribution.
16871  *
16872  * 3. All advertising materials mentioning features or use of this
16873  *    software must display the following acknowledgment:
16874  *    "This product includes software developed by the OpenSSL Project
16875  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16876  *
16877  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16878  *    endorse or promote products derived from this software without
16879  *    prior written permission. For written permission, please contact
16880  *    openssl-core@openssl.org.
16881  *
16882  * 5. Products derived from this software may not be called "OpenSSL"
16883  *    nor may "OpenSSL" appear in their names without prior written
16884  *    permission of the OpenSSL Project.
16885  *
16886  * 6. Redistributions of any form whatsoever must retain the following
16887  *    acknowledgment:
16888  *    "This product includes software developed by the OpenSSL Project
16889  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16890  *
16891  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16892  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16893  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16894  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16895  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16896  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16897  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16898  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16899  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16900  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16901  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16902  * OF THE POSSIBILITY OF SUCH DAMAGE.
16903  * ====================================================================
16904  *
16905  * This product includes cryptographic software written by Eric Young
16906  * (eay@cryptsoft.com).  This product includes software written by Tim
16907  * Hudson (tjh@cryptsoft.com).
16908  *
16909  */
16910 /* ====================================================================
16911  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16912  *
16913  * Portions of the attached software ("Contribution") are developed by
16914  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16915  *
16916  * The Contribution is licensed pursuant to the OpenSSL open source
16917  * license provided above.
16918  *
16919  * The elliptic curve binary polynomial software is originally written by
16920  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16921  *
16922  */
16923 # 79 "/usr/include/openssl/ecdh.h" 2 3 4
16924 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
16925 /* ====================================================================
16926  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
16927  *
16928  * Redistribution and use in source and binary forms, with or without
16929  * modification, are permitted provided that the following conditions
16930  * are met:
16931  *
16932  * 1. Redistributions of source code must retain the above copyright
16933  *    notice, this list of conditions and the following disclaimer.
16934  *
16935  * 2. Redistributions in binary form must reproduce the above copyright
16936  *    notice, this list of conditions and the following disclaimer in
16937  *    the documentation and/or other materials provided with the
16938  *    distribution.
16939  *
16940  * 3. All advertising materials mentioning features or use of this
16941  *    software must display the following acknowledgment:
16942  *    "This product includes software developed by the OpenSSL Project
16943  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16944  *
16945  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16946  *    endorse or promote products derived from this software without
16947  *    prior written permission. For written permission, please contact
16948  *    openssl-core@openssl.org.
16949  *
16950  * 5. Products derived from this software may not be called "OpenSSL"
16951  *    nor may "OpenSSL" appear in their names without prior written
16952  *    permission of the OpenSSL Project.
16953  *
16954  * 6. Redistributions of any form whatsoever must retain the following
16955  *    acknowledgment:
16956  *    "This product includes software developed by the OpenSSL Project
16957  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16958  *
16959  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16960  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16961  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16962  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16963  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16964  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16965  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16966  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16967  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16968  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16969  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16970  * OF THE POSSIBILITY OF SUCH DAMAGE.
16971  * ====================================================================
16972  *
16973  * This product includes cryptographic software written by Eric Young
16974  * (eay@cryptsoft.com).  This product includes software written by Tim
16975  * Hudson (tjh@cryptsoft.com).
16976  *
16977  */
16978 # 80 "/usr/include/openssl/ecdh.h" 2 3 4
16979 
16980 # 1 "/usr/include/openssl/bn.h" 1 3 4
16981 /* crypto/bn/bn.h */
16982 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
16983  * All rights reserved.
16984  *
16985  * This package is an SSL implementation written
16986  * by Eric Young (eay@cryptsoft.com).
16987  * The implementation was written so as to conform with Netscapes SSL.
16988  *
16989  * This library is free for commercial and non-commercial use as long as
16990  * the following conditions are aheared to.  The following conditions
16991  * apply to all code found in this distribution, be it the RC4, RSA,
16992  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16993  * included with this distribution is covered by the same copyright terms
16994  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16995  *
16996  * Copyright remains Eric Young's, and as such any Copyright notices in
16997  * the code are not to be removed.
16998  * If this package is used in a product, Eric Young should be given attribution
16999  * as the author of the parts of the library used.
17000  * This can be in the form of a textual message at program startup or
17001  * in documentation (online or textual) provided with the package.
17002  *
17003  * Redistribution and use in source and binary forms, with or without
17004  * modification, are permitted provided that the following conditions
17005  * are met:
17006  * 1. Redistributions of source code must retain the copyright
17007  *    notice, this list of conditions and the following disclaimer.
17008  * 2. Redistributions in binary form must reproduce the above copyright
17009  *    notice, this list of conditions and the following disclaimer in the
17010  *    documentation and/or other materials provided with the distribution.
17011  * 3. All advertising materials mentioning features or use of this software
17012  *    must display the following acknowledgement:
17013  *    "This product includes cryptographic software written by
17014  *     Eric Young (eay@cryptsoft.com)"
17015  *    The word 'cryptographic' can be left out if the rouines from the library
17016  *    being used are not cryptographic related :-).
17017  * 4. If you include any Windows specific code (or a derivative thereof) from
17018  *    the apps directory (application code) you must include an acknowledgement:
17019  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17020  *
17021  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17022  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17023  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17024  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17025  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17026  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17027  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17028  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17029  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17030  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17031  * SUCH DAMAGE.
17032  *
17033  * The licence and distribution terms for any publically available version or
17034  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17035  * copied and put under another distribution licence
17036  * [including the GNU Public Licence.]
17037  */
17038 /* ====================================================================
17039  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
17040  *
17041  * Redistribution and use in source and binary forms, with or without
17042  * modification, are permitted provided that the following conditions
17043  * are met:
17044  *
17045  * 1. Redistributions of source code must retain the above copyright
17046  *    notice, this list of conditions and the following disclaimer.
17047  *
17048  * 2. Redistributions in binary form must reproduce the above copyright
17049  *    notice, this list of conditions and the following disclaimer in
17050  *    the documentation and/or other materials provided with the
17051  *    distribution.
17052  *
17053  * 3. All advertising materials mentioning features or use of this
17054  *    software must display the following acknowledgment:
17055  *    "This product includes software developed by the OpenSSL Project
17056  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17057  *
17058  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17059  *    endorse or promote products derived from this software without
17060  *    prior written permission. For written permission, please contact
17061  *    openssl-core@openssl.org.
17062  *
17063  * 5. Products derived from this software may not be called "OpenSSL"
17064  *    nor may "OpenSSL" appear in their names without prior written
17065  *    permission of the OpenSSL Project.
17066  *
17067  * 6. Redistributions of any form whatsoever must retain the following
17068  *    acknowledgment:
17069  *    "This product includes software developed by the OpenSSL Project
17070  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17071  *
17072  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17073  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17074  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17075  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17076  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17077  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17078  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17079  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17080  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17081  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17082  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17083  * OF THE POSSIBILITY OF SUCH DAMAGE.
17084  * ====================================================================
17085  *
17086  * This product includes cryptographic software written by Eric Young
17087  * (eay@cryptsoft.com).  This product includes software written by Tim
17088  * Hudson (tjh@cryptsoft.com).
17089  *
17090  */
17091 /* ====================================================================
17092  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
17093  *
17094  * Portions of the attached software ("Contribution") are developed by
17095  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
17096  *
17097  * The Contribution is licensed pursuant to the Eric Young open source
17098  * license provided above.
17099  *
17100  * The binary polynomial arithmetic software is originally written by
17101  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
17102  *
17103  */
17104 # 82 "/usr/include/openssl/ecdh.h" 2 3 4
17105 # 90 "/usr/include/openssl/ecdh.h" 3 4
17106 const ECDH_METHOD *ECDH_OpenSSL(void);
17107 
17108 void ECDH_set_default_method(const ECDH_METHOD *);
17109 const ECDH_METHOD *ECDH_get_default_method(void);
17110 int ECDH_set_method(EC_KEY *, const ECDH_METHOD *);
17111 
17112 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
17113                      EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen,
17114                                                  void *out, size_t *outlen));
17115 
17116 int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
17117                           *new_func, CRYPTO_EX_dup *dup_func,
17118                           CRYPTO_EX_free *free_func);
17119 int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg);
17120 void *ECDH_get_ex_data(EC_KEY *d, int idx);
17121 
17122 int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
17123                    const unsigned char *Z, size_t Zlen,
17124                    const unsigned char *sinfo, size_t sinfolen,
17125                    const EVP_MD *md);
17126 
17127 /* BEGIN ERROR CODES */
17128 /*
17129  * The following lines are auto generated by the script mkerr.pl. Any changes
17130  * made after this point may be overwritten when the script is next run.
17131  */
17132 void ERR_load_ECDH_strings(void);
17133 
17134 /* Error codes for the ECDH functions. */
17135 
17136 /* Function codes. */
17137 
17138 
17139 
17140 
17141 /* Reason codes. */
17142 # 92 "/usr/include/openssl/x509.h" 2 3 4
17143 
17144 
17145 
17146 
17147 # 1 "/usr/include/openssl/rsa.h" 1 3 4
17148 /* crypto/rsa/rsa.h */
17149 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17150  * All rights reserved.
17151  *
17152  * This package is an SSL implementation written
17153  * by Eric Young (eay@cryptsoft.com).
17154  * The implementation was written so as to conform with Netscapes SSL.
17155  *
17156  * This library is free for commercial and non-commercial use as long as
17157  * the following conditions are aheared to.  The following conditions
17158  * apply to all code found in this distribution, be it the RC4, RSA,
17159  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17160  * included with this distribution is covered by the same copyright terms
17161  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17162  *
17163  * Copyright remains Eric Young's, and as such any Copyright notices in
17164  * the code are not to be removed.
17165  * If this package is used in a product, Eric Young should be given attribution
17166  * as the author of the parts of the library used.
17167  * This can be in the form of a textual message at program startup or
17168  * in documentation (online or textual) provided with the package.
17169  *
17170  * Redistribution and use in source and binary forms, with or without
17171  * modification, are permitted provided that the following conditions
17172  * are met:
17173  * 1. Redistributions of source code must retain the copyright
17174  *    notice, this list of conditions and the following disclaimer.
17175  * 2. Redistributions in binary form must reproduce the above copyright
17176  *    notice, this list of conditions and the following disclaimer in the
17177  *    documentation and/or other materials provided with the distribution.
17178  * 3. All advertising materials mentioning features or use of this software
17179  *    must display the following acknowledgement:
17180  *    "This product includes cryptographic software written by
17181  *     Eric Young (eay@cryptsoft.com)"
17182  *    The word 'cryptographic' can be left out if the rouines from the library
17183  *    being used are not cryptographic related :-).
17184  * 4. If you include any Windows specific code (or a derivative thereof) from
17185  *    the apps directory (application code) you must include an acknowledgement:
17186  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17187  *
17188  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17189  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17190  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17191  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17192  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17193  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17194  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17195  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17196  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17197  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17198  * SUCH DAMAGE.
17199  *
17200  * The licence and distribution terms for any publically available version or
17201  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17202  * copied and put under another distribution licence
17203  * [including the GNU Public Licence.]
17204  */
17205 
17206 
17207 
17208 
17209 # 1 "/usr/include/openssl/asn1.h" 1 3 4
17210 /* crypto/asn1/asn1.h */
17211 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17212  * All rights reserved.
17213  *
17214  * This package is an SSL implementation written
17215  * by Eric Young (eay@cryptsoft.com).
17216  * The implementation was written so as to conform with Netscapes SSL.
17217  *
17218  * This library is free for commercial and non-commercial use as long as
17219  * the following conditions are aheared to.  The following conditions
17220  * apply to all code found in this distribution, be it the RC4, RSA,
17221  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17222  * included with this distribution is covered by the same copyright terms
17223  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17224  *
17225  * Copyright remains Eric Young's, and as such any Copyright notices in
17226  * the code are not to be removed.
17227  * If this package is used in a product, Eric Young should be given attribution
17228  * as the author of the parts of the library used.
17229  * This can be in the form of a textual message at program startup or
17230  * in documentation (online or textual) provided with the package.
17231  *
17232  * Redistribution and use in source and binary forms, with or without
17233  * modification, are permitted provided that the following conditions
17234  * are met:
17235  * 1. Redistributions of source code must retain the copyright
17236  *    notice, this list of conditions and the following disclaimer.
17237  * 2. Redistributions in binary form must reproduce the above copyright
17238  *    notice, this list of conditions and the following disclaimer in the
17239  *    documentation and/or other materials provided with the distribution.
17240  * 3. All advertising materials mentioning features or use of this software
17241  *    must display the following acknowledgement:
17242  *    "This product includes cryptographic software written by
17243  *     Eric Young (eay@cryptsoft.com)"
17244  *    The word 'cryptographic' can be left out if the rouines from the library
17245  *    being used are not cryptographic related :-).
17246  * 4. If you include any Windows specific code (or a derivative thereof) from
17247  *    the apps directory (application code) you must include an acknowledgement:
17248  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17249  *
17250  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17251  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17252  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17253  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17254  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17255  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17256  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17257  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17258  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17259  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17260  * SUCH DAMAGE.
17261  *
17262  * The licence and distribution terms for any publically available version or
17263  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17264  * copied and put under another distribution licence
17265  * [including the GNU Public Licence.]
17266  */
17267 # 63 "/usr/include/openssl/rsa.h" 2 3 4
17268 
17269 
17270 # 1 "/usr/include/openssl/bio.h" 1 3 4
17271 /* crypto/bio/bio.h */
17272 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17273  * All rights reserved.
17274  *
17275  * This package is an SSL implementation written
17276  * by Eric Young (eay@cryptsoft.com).
17277  * The implementation was written so as to conform with Netscapes SSL.
17278  *
17279  * This library is free for commercial and non-commercial use as long as
17280  * the following conditions are aheared to.  The following conditions
17281  * apply to all code found in this distribution, be it the RC4, RSA,
17282  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17283  * included with this distribution is covered by the same copyright terms
17284  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17285  *
17286  * Copyright remains Eric Young's, and as such any Copyright notices in
17287  * the code are not to be removed.
17288  * If this package is used in a product, Eric Young should be given attribution
17289  * as the author of the parts of the library used.
17290  * This can be in the form of a textual message at program startup or
17291  * in documentation (online or textual) provided with the package.
17292  *
17293  * Redistribution and use in source and binary forms, with or without
17294  * modification, are permitted provided that the following conditions
17295  * are met:
17296  * 1. Redistributions of source code must retain the copyright
17297  *    notice, this list of conditions and the following disclaimer.
17298  * 2. Redistributions in binary form must reproduce the above copyright
17299  *    notice, this list of conditions and the following disclaimer in the
17300  *    documentation and/or other materials provided with the distribution.
17301  * 3. All advertising materials mentioning features or use of this software
17302  *    must display the following acknowledgement:
17303  *    "This product includes cryptographic software written by
17304  *     Eric Young (eay@cryptsoft.com)"
17305  *    The word 'cryptographic' can be left out if the rouines from the library
17306  *    being used are not cryptographic related :-).
17307  * 4. If you include any Windows specific code (or a derivative thereof) from
17308  *    the apps directory (application code) you must include an acknowledgement:
17309  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17310  *
17311  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17312  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17313  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17314  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17315  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17316  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17317  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17318  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17319  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17320  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17321  * SUCH DAMAGE.
17322  *
17323  * The licence and distribution terms for any publically available version or
17324  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17325  * copied and put under another distribution licence
17326  * [including the GNU Public Licence.]
17327  */
17328 # 66 "/usr/include/openssl/rsa.h" 2 3 4
17329 
17330 # 1 "/usr/include/openssl/crypto.h" 1 3 4
17331 /* crypto/crypto.h */
17332 /* ====================================================================
17333  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
17334  *
17335  * Redistribution and use in source and binary forms, with or without
17336  * modification, are permitted provided that the following conditions
17337  * are met:
17338  *
17339  * 1. Redistributions of source code must retain the above copyright
17340  *    notice, this list of conditions and the following disclaimer.
17341  *
17342  * 2. Redistributions in binary form must reproduce the above copyright
17343  *    notice, this list of conditions and the following disclaimer in
17344  *    the documentation and/or other materials provided with the
17345  *    distribution.
17346  *
17347  * 3. All advertising materials mentioning features or use of this
17348  *    software must display the following acknowledgment:
17349  *    "This product includes software developed by the OpenSSL Project
17350  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17351  *
17352  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17353  *    endorse or promote products derived from this software without
17354  *    prior written permission. For written permission, please contact
17355  *    openssl-core@openssl.org.
17356  *
17357  * 5. Products derived from this software may not be called "OpenSSL"
17358  *    nor may "OpenSSL" appear in their names without prior written
17359  *    permission of the OpenSSL Project.
17360  *
17361  * 6. Redistributions of any form whatsoever must retain the following
17362  *    acknowledgment:
17363  *    "This product includes software developed by the OpenSSL Project
17364  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17365  *
17366  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17367  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17368  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17369  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17370  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17371  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17372  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17373  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17374  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17375  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17376  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17377  * OF THE POSSIBILITY OF SUCH DAMAGE.
17378  * ====================================================================
17379  *
17380  * This product includes cryptographic software written by Eric Young
17381  * (eay@cryptsoft.com).  This product includes software written by Tim
17382  * Hudson (tjh@cryptsoft.com).
17383  *
17384  */
17385 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17386  * All rights reserved.
17387  *
17388  * This package is an SSL implementation written
17389  * by Eric Young (eay@cryptsoft.com).
17390  * The implementation was written so as to conform with Netscapes SSL.
17391  *
17392  * This library is free for commercial and non-commercial use as long as
17393  * the following conditions are aheared to.  The following conditions
17394  * apply to all code found in this distribution, be it the RC4, RSA,
17395  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17396  * included with this distribution is covered by the same copyright terms
17397  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17398  *
17399  * Copyright remains Eric Young's, and as such any Copyright notices in
17400  * the code are not to be removed.
17401  * If this package is used in a product, Eric Young should be given attribution
17402  * as the author of the parts of the library used.
17403  * This can be in the form of a textual message at program startup or
17404  * in documentation (online or textual) provided with the package.
17405  *
17406  * Redistribution and use in source and binary forms, with or without
17407  * modification, are permitted provided that the following conditions
17408  * are met:
17409  * 1. Redistributions of source code must retain the copyright
17410  *    notice, this list of conditions and the following disclaimer.
17411  * 2. Redistributions in binary form must reproduce the above copyright
17412  *    notice, this list of conditions and the following disclaimer in the
17413  *    documentation and/or other materials provided with the distribution.
17414  * 3. All advertising materials mentioning features or use of this software
17415  *    must display the following acknowledgement:
17416  *    "This product includes cryptographic software written by
17417  *     Eric Young (eay@cryptsoft.com)"
17418  *    The word 'cryptographic' can be left out if the rouines from the library
17419  *    being used are not cryptographic related :-).
17420  * 4. If you include any Windows specific code (or a derivative thereof) from
17421  *    the apps directory (application code) you must include an acknowledgement:
17422  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17423  *
17424  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17425  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17426  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17427  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17428  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17429  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17430  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17431  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17432  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17433  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17434  * SUCH DAMAGE.
17435  *
17436  * The licence and distribution terms for any publically available version or
17437  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17438  * copied and put under another distribution licence
17439  * [including the GNU Public Licence.]
17440  */
17441 /* ====================================================================
17442  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
17443  * ECDH support in OpenSSL originally developed by
17444  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
17445  */
17446 # 68 "/usr/include/openssl/rsa.h" 2 3 4
17447 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
17448 /* ====================================================================
17449  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
17450  *
17451  * Redistribution and use in source and binary forms, with or without
17452  * modification, are permitted provided that the following conditions
17453  * are met:
17454  *
17455  * 1. Redistributions of source code must retain the above copyright
17456  *    notice, this list of conditions and the following disclaimer.
17457  *
17458  * 2. Redistributions in binary form must reproduce the above copyright
17459  *    notice, this list of conditions and the following disclaimer in
17460  *    the documentation and/or other materials provided with the
17461  *    distribution.
17462  *
17463  * 3. All advertising materials mentioning features or use of this
17464  *    software must display the following acknowledgment:
17465  *    "This product includes software developed by the OpenSSL Project
17466  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17467  *
17468  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17469  *    endorse or promote products derived from this software without
17470  *    prior written permission. For written permission, please contact
17471  *    openssl-core@openssl.org.
17472  *
17473  * 5. Products derived from this software may not be called "OpenSSL"
17474  *    nor may "OpenSSL" appear in their names without prior written
17475  *    permission of the OpenSSL Project.
17476  *
17477  * 6. Redistributions of any form whatsoever must retain the following
17478  *    acknowledgment:
17479  *    "This product includes software developed by the OpenSSL Project
17480  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17481  *
17482  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17483  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17484  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17485  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17486  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17487  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17488  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17489  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17490  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17491  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17492  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17493  * OF THE POSSIBILITY OF SUCH DAMAGE.
17494  * ====================================================================
17495  *
17496  * This product includes cryptographic software written by Eric Young
17497  * (eay@cryptsoft.com).  This product includes software written by Tim
17498  * Hudson (tjh@cryptsoft.com).
17499  *
17500  */
17501 # 69 "/usr/include/openssl/rsa.h" 2 3 4
17502 
17503 # 1 "/usr/include/openssl/bn.h" 1 3 4
17504 /* crypto/bn/bn.h */
17505 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
17506  * All rights reserved.
17507  *
17508  * This package is an SSL implementation written
17509  * by Eric Young (eay@cryptsoft.com).
17510  * The implementation was written so as to conform with Netscapes SSL.
17511  *
17512  * This library is free for commercial and non-commercial use as long as
17513  * the following conditions are aheared to.  The following conditions
17514  * apply to all code found in this distribution, be it the RC4, RSA,
17515  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17516  * included with this distribution is covered by the same copyright terms
17517  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17518  *
17519  * Copyright remains Eric Young's, and as such any Copyright notices in
17520  * the code are not to be removed.
17521  * If this package is used in a product, Eric Young should be given attribution
17522  * as the author of the parts of the library used.
17523  * This can be in the form of a textual message at program startup or
17524  * in documentation (online or textual) provided with the package.
17525  *
17526  * Redistribution and use in source and binary forms, with or without
17527  * modification, are permitted provided that the following conditions
17528  * are met:
17529  * 1. Redistributions of source code must retain the copyright
17530  *    notice, this list of conditions and the following disclaimer.
17531  * 2. Redistributions in binary form must reproduce the above copyright
17532  *    notice, this list of conditions and the following disclaimer in the
17533  *    documentation and/or other materials provided with the distribution.
17534  * 3. All advertising materials mentioning features or use of this software
17535  *    must display the following acknowledgement:
17536  *    "This product includes cryptographic software written by
17537  *     Eric Young (eay@cryptsoft.com)"
17538  *    The word 'cryptographic' can be left out if the rouines from the library
17539  *    being used are not cryptographic related :-).
17540  * 4. If you include any Windows specific code (or a derivative thereof) from
17541  *    the apps directory (application code) you must include an acknowledgement:
17542  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17543  *
17544  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17545  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17546  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17547  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17548  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17549  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17550  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17551  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17552  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17553  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17554  * SUCH DAMAGE.
17555  *
17556  * The licence and distribution terms for any publically available version or
17557  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17558  * copied and put under another distribution licence
17559  * [including the GNU Public Licence.]
17560  */
17561 /* ====================================================================
17562  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
17563  *
17564  * Redistribution and use in source and binary forms, with or without
17565  * modification, are permitted provided that the following conditions
17566  * are met:
17567  *
17568  * 1. Redistributions of source code must retain the above copyright
17569  *    notice, this list of conditions and the following disclaimer.
17570  *
17571  * 2. Redistributions in binary form must reproduce the above copyright
17572  *    notice, this list of conditions and the following disclaimer in
17573  *    the documentation and/or other materials provided with the
17574  *    distribution.
17575  *
17576  * 3. All advertising materials mentioning features or use of this
17577  *    software must display the following acknowledgment:
17578  *    "This product includes software developed by the OpenSSL Project
17579  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17580  *
17581  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17582  *    endorse or promote products derived from this software without
17583  *    prior written permission. For written permission, please contact
17584  *    openssl-core@openssl.org.
17585  *
17586  * 5. Products derived from this software may not be called "OpenSSL"
17587  *    nor may "OpenSSL" appear in their names without prior written
17588  *    permission of the OpenSSL Project.
17589  *
17590  * 6. Redistributions of any form whatsoever must retain the following
17591  *    acknowledgment:
17592  *    "This product includes software developed by the OpenSSL Project
17593  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17594  *
17595  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17596  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17597  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17598  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17599  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17600  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17601  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17602  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17603  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17604  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17605  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17606  * OF THE POSSIBILITY OF SUCH DAMAGE.
17607  * ====================================================================
17608  *
17609  * This product includes cryptographic software written by Eric Young
17610  * (eay@cryptsoft.com).  This product includes software written by Tim
17611  * Hudson (tjh@cryptsoft.com).
17612  *
17613  */
17614 /* ====================================================================
17615  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
17616  *
17617  * Portions of the attached software ("Contribution") are developed by
17618  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
17619  *
17620  * The Contribution is licensed pursuant to the Eric Young open source
17621  * license provided above.
17622  *
17623  * The binary polynomial arithmetic software is originally written by
17624  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
17625  *
17626  */
17627 # 71 "/usr/include/openssl/rsa.h" 2 3 4
17628 # 81 "/usr/include/openssl/rsa.h" 3 4
17629 /* Declared already in ossl_typ.h */
17630 /* typedef struct rsa_st RSA; */
17631 /* typedef struct rsa_meth_st RSA_METHOD; */
17632 
17633 struct rsa_meth_st {
17634     const char *name;
17635     int (*rsa_pub_enc) (int flen, const unsigned char *from,
17636                         unsigned char *to, RSA *rsa, int padding);
17637     int (*rsa_pub_dec) (int flen, const unsigned char *from,
17638                         unsigned char *to, RSA *rsa, int padding);
17639     int (*rsa_priv_enc) (int flen, const unsigned char *from,
17640                          unsigned char *to, RSA *rsa, int padding);
17641     int (*rsa_priv_dec) (int flen, const unsigned char *from,
17642                          unsigned char *to, RSA *rsa, int padding);
17643     /* Can be null */
17644     int (*rsa_mod_exp) (BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
17645     /* Can be null */
17646     int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
17647                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
17648     /* called at new */
17649     int (*init) (RSA *rsa);
17650     /* called at free */
17651     int (*finish) (RSA *rsa);
17652     /* RSA_METHOD_FLAG_* things */
17653     int flags;
17654     /* may be needed! */
17655     char *app_data;
17656     /*
17657      * New sign and verify functions: some libraries don't allow arbitrary
17658      * data to be signed/verified: this allows them to be used. Note: for
17659      * this to work the RSA_public_decrypt() and RSA_private_encrypt() should
17660      * *NOT* be used RSA_sign(), RSA_verify() should be used instead. Note:
17661      * for backwards compatibility this functionality is only enabled if the
17662      * RSA_FLAG_SIGN_VER option is set in 'flags'.
17663      */
17664     int (*rsa_sign) (int type,
17665                      const unsigned char *m, unsigned int m_length,
17666                      unsigned char *sigret, unsigned int *siglen,
17667                      const RSA *rsa);
17668     int (*rsa_verify) (int dtype, const unsigned char *m,
17669                        unsigned int m_length, const unsigned char *sigbuf,
17670                        unsigned int siglen, const RSA *rsa);
17671     /*
17672      * If this callback is NULL, the builtin software RSA key-gen will be
17673      * used. This is for behavioural compatibility whilst the code gets
17674      * rewired, but one day it would be nice to assume there are no such
17675      * things as "builtin software" implementations.
17676      */
17677     int (*rsa_keygen) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
17678 };
17679 
17680 struct rsa_st {
17681     /*
17682      * The first parameter is used to pickup errors where this is passed
17683      * instead of aEVP_PKEY, it is set to 0
17684      */
17685     int pad;
17686     long version;
17687     const RSA_METHOD *meth;
17688     /* functional reference if 'meth' is ENGINE-provided */
17689     ENGINE *engine;
17690     BIGNUM *n;
17691     BIGNUM *e;
17692     BIGNUM *d;
17693     BIGNUM *p;
17694     BIGNUM *q;
17695     BIGNUM *dmp1;
17696     BIGNUM *dmq1;
17697     BIGNUM *iqmp;
17698     /* be careful using this if the RSA structure is shared */
17699     CRYPTO_EX_DATA ex_data;
17700     int references;
17701     int flags;
17702     /* Used to cache montgomery values */
17703     BN_MONT_CTX *_method_mod_n;
17704     BN_MONT_CTX *_method_mod_p;
17705     BN_MONT_CTX *_method_mod_q;
17706     /*
17707      * all BIGNUM values are actually in the following data, if it is not
17708      * NULL
17709      */
17710     char *bignum_data;
17711     BN_BLINDING *blinding;
17712     BN_BLINDING *mt_blinding;
17713 };
17714 # 176 "/usr/include/openssl/rsa.h" 3 4
17715 /* exponent limit enforced for "large" modulus only */
17716 # 190 "/usr/include/openssl/rsa.h" 3 4
17717 /*
17718  * This flag means the private key operations will be handled by rsa_mod_exp
17719  * and that they do not depend on the private key components being present:
17720  * for example a key stored in external hardware. Without this flag
17721  * bn_mod_exp gets called when private key components are absent.
17722  */
17723 
17724 
17725 /*
17726  * This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify
17727  * functions.
17728  */
17729 
17730 
17731 /*
17732  * new with 0.9.6j and 0.9.7b; the built-in
17733  * RSA implementation now uses blinding by
17734  * default (ignoring RSA_FLAG_BLINDING),
17735  * but other engines might not need it
17736  */
17737 
17738 /*
17739  * new with 0.9.8f; the built-in RSA
17740  * implementation now uses constant time
17741  * operations by default in private key operations,
17742  * e.g., constant time modular exponentiation,
17743  * modular inverse without leaking branches,
17744  * division without leaking branches. This
17745  * flag disables these constant time
17746  * operations and results in faster RSA
17747  * private key operations.
17748  */
17749 # 312 "/usr/include/openssl/rsa.h" 3 4
17750 /* EVP_PKEY_ only */
17751 
17752 
17753 
17754 
17755 
17756 
17757 
17758 RSA *RSA_new(void);
17759 RSA *RSA_new_method(ENGINE *engine);
17760 int RSA_size(const RSA *rsa);
17761 
17762 /* Deprecated version */
17763 
17764 RSA *RSA_generate_key(int bits, unsigned long e, void
17765                        (*callback) (int, int, void *), void *cb_arg);
17766 
17767 
17768 /* New version */
17769 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
17770 
17771 int RSA_check_key(const RSA *);
17772         /* next 4 return -1 on error */
17773 int RSA_public_encrypt(int flen, const unsigned char *from,
17774                        unsigned char *to, RSA *rsa, int padding);
17775 int RSA_private_encrypt(int flen, const unsigned char *from,
17776                         unsigned char *to, RSA *rsa, int padding);
17777 int RSA_public_decrypt(int flen, const unsigned char *from,
17778                        unsigned char *to, RSA *rsa, int padding);
17779 int RSA_private_decrypt(int flen, const unsigned char *from,
17780                         unsigned char *to, RSA *rsa, int padding);
17781 void RSA_free(RSA *r);
17782 /* "up" the RSA object's reference count */
17783 int RSA_up_ref(RSA *r);
17784 
17785 int RSA_flags(const RSA *r);
17786 
17787 void RSA_set_default_method(const RSA_METHOD *meth);
17788 const RSA_METHOD *RSA_get_default_method(void);
17789 const RSA_METHOD *RSA_get_method(const RSA *rsa);
17790 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
17791 
17792 /* This function needs the memory locking malloc callbacks to be installed */
17793 int RSA_memory_lock(RSA *r);
17794 
17795 /* these are the actual SSLeay RSA functions */
17796 const RSA_METHOD *RSA_PKCS1_SSLeay(void);
17797 
17798 const RSA_METHOD *RSA_null_method(void);
17799 
17800 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;
17801 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;
17802 
17803 typedef struct rsa_pss_params_st {
17804     X509_ALGOR *hashAlgorithm;
17805     X509_ALGOR *maskGenAlgorithm;
17806     ASN1_INTEGER *saltLength;
17807     ASN1_INTEGER *trailerField;
17808 } RSA_PSS_PARAMS;
17809 
17810 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;
17811 
17812 typedef struct rsa_oaep_params_st {
17813     X509_ALGOR *hashFunc;
17814     X509_ALGOR *maskGenFunc;
17815     X509_ALGOR *pSourceFunc;
17816 } RSA_OAEP_PARAMS;
17817 
17818 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;
17819 
17820 
17821 int RSA_print_fp(FILE *fp, const RSA *r, int offset);
17822 
17823 
17824 
17825 int RSA_print(BIO *bp, const RSA *r, int offset);
17826 
17827 
17828 
17829 int i2d_RSA_NET(const RSA *a, unsigned char **pp,
17830                 int (*cb) (char *buf, int len, const char *prompt,
17831                            int verify), int sgckey);
17832 RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
17833                  int (*cb) (char *buf, int len, const char *prompt,
17834                             int verify), int sgckey);
17835 
17836 int i2d_Netscape_RSA(const RSA *a, unsigned char **pp,
17837                      int (*cb) (char *buf, int len, const char *prompt,
17838                                 int verify));
17839 RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length,
17840                       int (*cb) (char *buf, int len, const char *prompt,
17841                                  int verify));
17842 
17843 
17844 /*
17845  * The following 2 functions sign and verify a X509_SIG ASN1 object inside
17846  * PKCS#1 padded RSA encryption
17847  */
17848 int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
17849              unsigned char *sigret, unsigned int *siglen, RSA *rsa);
17850 int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
17851                const unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
17852 
17853 /*
17854  * The following 2 function sign and verify a ASN1_OCTET_STRING object inside
17855  * PKCS#1 padded RSA encryption
17856  */
17857 int RSA_sign_ASN1_OCTET_STRING(int type,
17858                                const unsigned char *m, unsigned int m_length,
17859                                unsigned char *sigret, unsigned int *siglen,
17860                                RSA *rsa);
17861 int RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m,
17862                                  unsigned int m_length, unsigned char *sigbuf,
17863                                  unsigned int siglen, RSA *rsa);
17864 
17865 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
17866 void RSA_blinding_off(RSA *rsa);
17867 BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
17868 
17869 int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
17870                                  const unsigned char *f, int fl);
17871 int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
17872                                    const unsigned char *f, int fl,
17873                                    int rsa_len);
17874 int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
17875                                  const unsigned char *f, int fl);
17876 int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
17877                                    const unsigned char *f, int fl,
17878                                    int rsa_len);
17879 int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,
17880                long seedlen, const EVP_MD *dgst);
17881 int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
17882                                const unsigned char *f, int fl,
17883                                const unsigned char *p, int pl);
17884 int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
17885                                  const unsigned char *f, int fl, int rsa_len,
17886                                  const unsigned char *p, int pl);
17887 int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
17888                                     const unsigned char *from, int flen,
17889                                     const unsigned char *param, int plen,
17890                                     const EVP_MD *md, const EVP_MD *mgf1md);
17891 int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
17892                                       const unsigned char *from, int flen,
17893                                       int num, const unsigned char *param,
17894                                       int plen, const EVP_MD *md,
17895                                       const EVP_MD *mgf1md);
17896 int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
17897                            const unsigned char *f, int fl);
17898 int RSA_padding_check_SSLv23(unsigned char *to, int tlen,
17899                              const unsigned char *f, int fl, int rsa_len);
17900 int RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f,
17901                          int fl);
17902 int RSA_padding_check_none(unsigned char *to, int tlen,
17903                            const unsigned char *f, int fl, int rsa_len);
17904 int RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f,
17905                          int fl);
17906 int RSA_padding_check_X931(unsigned char *to, int tlen,
17907                            const unsigned char *f, int fl, int rsa_len);
17908 int RSA_X931_hash_id(int nid);
17909 
17910 int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
17911                          const EVP_MD *Hash, const unsigned char *EM,
17912                          int sLen);
17913 int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
17914                               const unsigned char *mHash, const EVP_MD *Hash,
17915                               int sLen);
17916 
17917 int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
17918                               const EVP_MD *Hash, const EVP_MD *mgf1Hash,
17919                               const unsigned char *EM, int sLen);
17920 
17921 int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
17922                                    const unsigned char *mHash,
17923                                    const EVP_MD *Hash, const EVP_MD *mgf1Hash,
17924                                    int sLen);
17925 
17926 int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
17927                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
17928 int RSA_set_ex_data(RSA *r, int idx, void *arg);
17929 void *RSA_get_ex_data(const RSA *r, int idx);
17930 
17931 RSA *RSAPublicKey_dup(RSA *rsa);
17932 RSA *RSAPrivateKey_dup(RSA *rsa);
17933 
17934 /*
17935  * If this flag is set the RSA method is FIPS compliant and can be used in
17936  * FIPS mode. This is set in the validated module method. If an application
17937  * sets this flag in its own methods it is its responsibility to ensure the
17938  * result is compliant.
17939  */
17940 
17941 
17942 
17943 /*
17944  * If this flag is set the operations normally disabled in FIPS mode are
17945  * permitted it is then the applications responsibility to ensure that the
17946  * usage is compliant.
17947  */
17948 
17949 
17950 /*
17951  * Application has decided PRNG is good enough to generate a key: don't
17952  * check.
17953  */
17954 
17955 
17956 /* BEGIN ERROR CODES */
17957 /*
17958  * The following lines are auto generated by the script mkerr.pl. Any changes
17959  * made after this point may be overwritten when the script is next run.
17960  */
17961 void ERR_load_RSA_strings(void);
17962 
17963 /* Error codes for the RSA functions. */
17964 
17965 /* Function codes. */
17966 # 592 "/usr/include/openssl/rsa.h" 3 4
17967 /* Reason codes. */
17968 # 97 "/usr/include/openssl/x509.h" 2 3 4
17969 
17970 
17971 # 1 "/usr/include/openssl/dsa.h" 1 3 4
17972 /* crypto/dsa/dsa.h */
17973 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17974  * All rights reserved.
17975  *
17976  * This package is an SSL implementation written
17977  * by Eric Young (eay@cryptsoft.com).
17978  * The implementation was written so as to conform with Netscapes SSL.
17979  *
17980  * This library is free for commercial and non-commercial use as long as
17981  * the following conditions are aheared to.  The following conditions
17982  * apply to all code found in this distribution, be it the RC4, RSA,
17983  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17984  * included with this distribution is covered by the same copyright terms
17985  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17986  *
17987  * Copyright remains Eric Young's, and as such any Copyright notices in
17988  * the code are not to be removed.
17989  * If this package is used in a product, Eric Young should be given attribution
17990  * as the author of the parts of the library used.
17991  * This can be in the form of a textual message at program startup or
17992  * in documentation (online or textual) provided with the package.
17993  *
17994  * Redistribution and use in source and binary forms, with or without
17995  * modification, are permitted provided that the following conditions
17996  * are met:
17997  * 1. Redistributions of source code must retain the copyright
17998  *    notice, this list of conditions and the following disclaimer.
17999  * 2. Redistributions in binary form must reproduce the above copyright
18000  *    notice, this list of conditions and the following disclaimer in the
18001  *    documentation and/or other materials provided with the distribution.
18002  * 3. All advertising materials mentioning features or use of this software
18003  *    must display the following acknowledgement:
18004  *    "This product includes cryptographic software written by
18005  *     Eric Young (eay@cryptsoft.com)"
18006  *    The word 'cryptographic' can be left out if the rouines from the library
18007  *    being used are not cryptographic related :-).
18008  * 4. If you include any Windows specific code (or a derivative thereof) from
18009  *    the apps directory (application code) you must include an acknowledgement:
18010  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18011  *
18012  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18013  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18014  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18015  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18016  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18017  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18018  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18019  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18020  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18021  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18022  * SUCH DAMAGE.
18023  *
18024  * The licence and distribution terms for any publically available version or
18025  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18026  * copied and put under another distribution licence
18027  * [including the GNU Public Licence.]
18028  */
18029 
18030 /*
18031  * The DSS routines are based on patches supplied by
18032  * Steven Schoch <schoch@sheba.arc.nasa.gov>.  He basically did the
18033  * work and I have just tweaked them a little to fit into my
18034  * stylistic vision for SSLeay :-) */
18035 
18036 
18037 
18038 
18039 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
18040 /* e_os2.h */
18041 /* ====================================================================
18042  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
18043  *
18044  * Redistribution and use in source and binary forms, with or without
18045  * modification, are permitted provided that the following conditions
18046  * are met:
18047  *
18048  * 1. Redistributions of source code must retain the above copyright
18049  *    notice, this list of conditions and the following disclaimer.
18050  *
18051  * 2. Redistributions in binary form must reproduce the above copyright
18052  *    notice, this list of conditions and the following disclaimer in
18053  *    the documentation and/or other materials provided with the
18054  *    distribution.
18055  *
18056  * 3. All advertising materials mentioning features or use of this
18057  *    software must display the following acknowledgment:
18058  *    "This product includes software developed by the OpenSSL Project
18059  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18060  *
18061  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18062  *    endorse or promote products derived from this software without
18063  *    prior written permission. For written permission, please contact
18064  *    openssl-core@openssl.org.
18065  *
18066  * 5. Products derived from this software may not be called "OpenSSL"
18067  *    nor may "OpenSSL" appear in their names without prior written
18068  *    permission of the OpenSSL Project.
18069  *
18070  * 6. Redistributions of any form whatsoever must retain the following
18071  *    acknowledgment:
18072  *    "This product includes software developed by the OpenSSL Project
18073  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18074  *
18075  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18076  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18077  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18078  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18079  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18080  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18081  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18082  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18083  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18084  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18085  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18086  * OF THE POSSIBILITY OF SUCH DAMAGE.
18087  * ====================================================================
18088  *
18089  * This product includes cryptographic software written by Eric Young
18090  * (eay@cryptsoft.com).  This product includes software written by Tim
18091  * Hudson (tjh@cryptsoft.com).
18092  *
18093  */
18094 
18095 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
18096 /* opensslconf.h */
18097 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
18098 
18099 
18100 
18101 
18102 /* OpenSSL was configured with the following options: */
18103 # 108 "/usr/include/openssl/opensslconf.h" 3 4
18104 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
18105    asks for it.  This is a transient feature that is provided for those
18106    who haven't had the time to do the appropriate changes in their
18107    applications.  */
18108 # 204 "/usr/include/openssl/opensslconf.h" 3 4
18109 /* crypto/opensslconf.h.in */
18110 
18111 /* Generate 80386 code? */
18112 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
18113 # 69 "/usr/include/openssl/dsa.h" 2 3 4
18114 
18115 
18116 
18117 
18118 
18119 
18120 # 1 "/usr/include/openssl/bio.h" 1 3 4
18121 /* crypto/bio/bio.h */
18122 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18123  * All rights reserved.
18124  *
18125  * This package is an SSL implementation written
18126  * by Eric Young (eay@cryptsoft.com).
18127  * The implementation was written so as to conform with Netscapes SSL.
18128  *
18129  * This library is free for commercial and non-commercial use as long as
18130  * the following conditions are aheared to.  The following conditions
18131  * apply to all code found in this distribution, be it the RC4, RSA,
18132  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18133  * included with this distribution is covered by the same copyright terms
18134  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18135  *
18136  * Copyright remains Eric Young's, and as such any Copyright notices in
18137  * the code are not to be removed.
18138  * If this package is used in a product, Eric Young should be given attribution
18139  * as the author of the parts of the library used.
18140  * This can be in the form of a textual message at program startup or
18141  * in documentation (online or textual) provided with the package.
18142  *
18143  * Redistribution and use in source and binary forms, with or without
18144  * modification, are permitted provided that the following conditions
18145  * are met:
18146  * 1. Redistributions of source code must retain the copyright
18147  *    notice, this list of conditions and the following disclaimer.
18148  * 2. Redistributions in binary form must reproduce the above copyright
18149  *    notice, this list of conditions and the following disclaimer in the
18150  *    documentation and/or other materials provided with the distribution.
18151  * 3. All advertising materials mentioning features or use of this software
18152  *    must display the following acknowledgement:
18153  *    "This product includes cryptographic software written by
18154  *     Eric Young (eay@cryptsoft.com)"
18155  *    The word 'cryptographic' can be left out if the rouines from the library
18156  *    being used are not cryptographic related :-).
18157  * 4. If you include any Windows specific code (or a derivative thereof) from
18158  *    the apps directory (application code) you must include an acknowledgement:
18159  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18160  *
18161  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18162  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18163  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18164  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18165  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18166  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18167  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18168  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18169  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18170  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18171  * SUCH DAMAGE.
18172  *
18173  * The licence and distribution terms for any publically available version or
18174  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18175  * copied and put under another distribution licence
18176  * [including the GNU Public Licence.]
18177  */
18178 # 76 "/usr/include/openssl/dsa.h" 2 3 4
18179 
18180 # 1 "/usr/include/openssl/crypto.h" 1 3 4
18181 /* crypto/crypto.h */
18182 /* ====================================================================
18183  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
18184  *
18185  * Redistribution and use in source and binary forms, with or without
18186  * modification, are permitted provided that the following conditions
18187  * are met:
18188  *
18189  * 1. Redistributions of source code must retain the above copyright
18190  *    notice, this list of conditions and the following disclaimer.
18191  *
18192  * 2. Redistributions in binary form must reproduce the above copyright
18193  *    notice, this list of conditions and the following disclaimer in
18194  *    the documentation and/or other materials provided with the
18195  *    distribution.
18196  *
18197  * 3. All advertising materials mentioning features or use of this
18198  *    software must display the following acknowledgment:
18199  *    "This product includes software developed by the OpenSSL Project
18200  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18201  *
18202  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18203  *    endorse or promote products derived from this software without
18204  *    prior written permission. For written permission, please contact
18205  *    openssl-core@openssl.org.
18206  *
18207  * 5. Products derived from this software may not be called "OpenSSL"
18208  *    nor may "OpenSSL" appear in their names without prior written
18209  *    permission of the OpenSSL Project.
18210  *
18211  * 6. Redistributions of any form whatsoever must retain the following
18212  *    acknowledgment:
18213  *    "This product includes software developed by the OpenSSL Project
18214  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18215  *
18216  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18217  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18218  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18219  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18220  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18221  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18222  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18223  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18224  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18225  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18226  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18227  * OF THE POSSIBILITY OF SUCH DAMAGE.
18228  * ====================================================================
18229  *
18230  * This product includes cryptographic software written by Eric Young
18231  * (eay@cryptsoft.com).  This product includes software written by Tim
18232  * Hudson (tjh@cryptsoft.com).
18233  *
18234  */
18235 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18236  * All rights reserved.
18237  *
18238  * This package is an SSL implementation written
18239  * by Eric Young (eay@cryptsoft.com).
18240  * The implementation was written so as to conform with Netscapes SSL.
18241  *
18242  * This library is free for commercial and non-commercial use as long as
18243  * the following conditions are aheared to.  The following conditions
18244  * apply to all code found in this distribution, be it the RC4, RSA,
18245  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18246  * included with this distribution is covered by the same copyright terms
18247  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18248  *
18249  * Copyright remains Eric Young's, and as such any Copyright notices in
18250  * the code are not to be removed.
18251  * If this package is used in a product, Eric Young should be given attribution
18252  * as the author of the parts of the library used.
18253  * This can be in the form of a textual message at program startup or
18254  * in documentation (online or textual) provided with the package.
18255  *
18256  * Redistribution and use in source and binary forms, with or without
18257  * modification, are permitted provided that the following conditions
18258  * are met:
18259  * 1. Redistributions of source code must retain the copyright
18260  *    notice, this list of conditions and the following disclaimer.
18261  * 2. Redistributions in binary form must reproduce the above copyright
18262  *    notice, this list of conditions and the following disclaimer in the
18263  *    documentation and/or other materials provided with the distribution.
18264  * 3. All advertising materials mentioning features or use of this software
18265  *    must display the following acknowledgement:
18266  *    "This product includes cryptographic software written by
18267  *     Eric Young (eay@cryptsoft.com)"
18268  *    The word 'cryptographic' can be left out if the rouines from the library
18269  *    being used are not cryptographic related :-).
18270  * 4. If you include any Windows specific code (or a derivative thereof) from
18271  *    the apps directory (application code) you must include an acknowledgement:
18272  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18273  *
18274  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18275  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18276  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18277  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18278  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18279  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18280  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18281  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18282  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18283  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18284  * SUCH DAMAGE.
18285  *
18286  * The licence and distribution terms for any publically available version or
18287  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18288  * copied and put under another distribution licence
18289  * [including the GNU Public Licence.]
18290  */
18291 /* ====================================================================
18292  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
18293  * ECDH support in OpenSSL originally developed by
18294  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
18295  */
18296 # 78 "/usr/include/openssl/dsa.h" 2 3 4
18297 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
18298 /* ====================================================================
18299  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
18300  *
18301  * Redistribution and use in source and binary forms, with or without
18302  * modification, are permitted provided that the following conditions
18303  * are met:
18304  *
18305  * 1. Redistributions of source code must retain the above copyright
18306  *    notice, this list of conditions and the following disclaimer.
18307  *
18308  * 2. Redistributions in binary form must reproduce the above copyright
18309  *    notice, this list of conditions and the following disclaimer in
18310  *    the documentation and/or other materials provided with the
18311  *    distribution.
18312  *
18313  * 3. All advertising materials mentioning features or use of this
18314  *    software must display the following acknowledgment:
18315  *    "This product includes software developed by the OpenSSL Project
18316  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18317  *
18318  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18319  *    endorse or promote products derived from this software without
18320  *    prior written permission. For written permission, please contact
18321  *    openssl-core@openssl.org.
18322  *
18323  * 5. Products derived from this software may not be called "OpenSSL"
18324  *    nor may "OpenSSL" appear in their names without prior written
18325  *    permission of the OpenSSL Project.
18326  *
18327  * 6. Redistributions of any form whatsoever must retain the following
18328  *    acknowledgment:
18329  *    "This product includes software developed by the OpenSSL Project
18330  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18331  *
18332  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18333  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18334  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18335  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18336  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18337  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18338  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18339  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18340  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18341  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18342  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18343  * OF THE POSSIBILITY OF SUCH DAMAGE.
18344  * ====================================================================
18345  *
18346  * This product includes cryptographic software written by Eric Young
18347  * (eay@cryptsoft.com).  This product includes software written by Tim
18348  * Hudson (tjh@cryptsoft.com).
18349  *
18350  */
18351 # 79 "/usr/include/openssl/dsa.h" 2 3 4
18352 
18353 
18354 # 1 "/usr/include/openssl/bn.h" 1 3 4
18355 /* crypto/bn/bn.h */
18356 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
18357  * All rights reserved.
18358  *
18359  * This package is an SSL implementation written
18360  * by Eric Young (eay@cryptsoft.com).
18361  * The implementation was written so as to conform with Netscapes SSL.
18362  *
18363  * This library is free for commercial and non-commercial use as long as
18364  * the following conditions are aheared to.  The following conditions
18365  * apply to all code found in this distribution, be it the RC4, RSA,
18366  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18367  * included with this distribution is covered by the same copyright terms
18368  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18369  *
18370  * Copyright remains Eric Young's, and as such any Copyright notices in
18371  * the code are not to be removed.
18372  * If this package is used in a product, Eric Young should be given attribution
18373  * as the author of the parts of the library used.
18374  * This can be in the form of a textual message at program startup or
18375  * in documentation (online or textual) provided with the package.
18376  *
18377  * Redistribution and use in source and binary forms, with or without
18378  * modification, are permitted provided that the following conditions
18379  * are met:
18380  * 1. Redistributions of source code must retain the copyright
18381  *    notice, this list of conditions and the following disclaimer.
18382  * 2. Redistributions in binary form must reproduce the above copyright
18383  *    notice, this list of conditions and the following disclaimer in the
18384  *    documentation and/or other materials provided with the distribution.
18385  * 3. All advertising materials mentioning features or use of this software
18386  *    must display the following acknowledgement:
18387  *    "This product includes cryptographic software written by
18388  *     Eric Young (eay@cryptsoft.com)"
18389  *    The word 'cryptographic' can be left out if the rouines from the library
18390  *    being used are not cryptographic related :-).
18391  * 4. If you include any Windows specific code (or a derivative thereof) from
18392  *    the apps directory (application code) you must include an acknowledgement:
18393  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18394  *
18395  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18396  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18397  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18398  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18399  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18400  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18401  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18402  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18403  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18404  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18405  * SUCH DAMAGE.
18406  *
18407  * The licence and distribution terms for any publically available version or
18408  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18409  * copied and put under another distribution licence
18410  * [including the GNU Public Licence.]
18411  */
18412 /* ====================================================================
18413  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
18414  *
18415  * Redistribution and use in source and binary forms, with or without
18416  * modification, are permitted provided that the following conditions
18417  * are met:
18418  *
18419  * 1. Redistributions of source code must retain the above copyright
18420  *    notice, this list of conditions and the following disclaimer.
18421  *
18422  * 2. Redistributions in binary form must reproduce the above copyright
18423  *    notice, this list of conditions and the following disclaimer in
18424  *    the documentation and/or other materials provided with the
18425  *    distribution.
18426  *
18427  * 3. All advertising materials mentioning features or use of this
18428  *    software must display the following acknowledgment:
18429  *    "This product includes software developed by the OpenSSL Project
18430  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18431  *
18432  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18433  *    endorse or promote products derived from this software without
18434  *    prior written permission. For written permission, please contact
18435  *    openssl-core@openssl.org.
18436  *
18437  * 5. Products derived from this software may not be called "OpenSSL"
18438  *    nor may "OpenSSL" appear in their names without prior written
18439  *    permission of the OpenSSL Project.
18440  *
18441  * 6. Redistributions of any form whatsoever must retain the following
18442  *    acknowledgment:
18443  *    "This product includes software developed by the OpenSSL Project
18444  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18445  *
18446  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18447  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18448  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18449  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18450  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18451  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18452  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18453  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18454  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18455  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18456  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18457  * OF THE POSSIBILITY OF SUCH DAMAGE.
18458  * ====================================================================
18459  *
18460  * This product includes cryptographic software written by Eric Young
18461  * (eay@cryptsoft.com).  This product includes software written by Tim
18462  * Hudson (tjh@cryptsoft.com).
18463  *
18464  */
18465 /* ====================================================================
18466  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
18467  *
18468  * Portions of the attached software ("Contribution") are developed by
18469  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
18470  *
18471  * The Contribution is licensed pursuant to the Eric Young open source
18472  * license provided above.
18473  *
18474  * The binary polynomial arithmetic software is originally written by
18475  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
18476  *
18477  */
18478 # 82 "/usr/include/openssl/dsa.h" 2 3 4
18479 
18480 # 1 "/usr/include/openssl/dh.h" 1 3 4
18481 /* crypto/dh/dh.h */
18482 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18483  * All rights reserved.
18484  *
18485  * This package is an SSL implementation written
18486  * by Eric Young (eay@cryptsoft.com).
18487  * The implementation was written so as to conform with Netscapes SSL.
18488  *
18489  * This library is free for commercial and non-commercial use as long as
18490  * the following conditions are aheared to.  The following conditions
18491  * apply to all code found in this distribution, be it the RC4, RSA,
18492  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18493  * included with this distribution is covered by the same copyright terms
18494  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18495  *
18496  * Copyright remains Eric Young's, and as such any Copyright notices in
18497  * the code are not to be removed.
18498  * If this package is used in a product, Eric Young should be given attribution
18499  * as the author of the parts of the library used.
18500  * This can be in the form of a textual message at program startup or
18501  * in documentation (online or textual) provided with the package.
18502  *
18503  * Redistribution and use in source and binary forms, with or without
18504  * modification, are permitted provided that the following conditions
18505  * are met:
18506  * 1. Redistributions of source code must retain the copyright
18507  *    notice, this list of conditions and the following disclaimer.
18508  * 2. Redistributions in binary form must reproduce the above copyright
18509  *    notice, this list of conditions and the following disclaimer in the
18510  *    documentation and/or other materials provided with the distribution.
18511  * 3. All advertising materials mentioning features or use of this software
18512  *    must display the following acknowledgement:
18513  *    "This product includes cryptographic software written by
18514  *     Eric Young (eay@cryptsoft.com)"
18515  *    The word 'cryptographic' can be left out if the rouines from the library
18516  *    being used are not cryptographic related :-).
18517  * 4. If you include any Windows specific code (or a derivative thereof) from
18518  *    the apps directory (application code) you must include an acknowledgement:
18519  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18520  *
18521  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18522  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18523  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18524  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18525  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18526  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18527  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18528  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18529  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18530  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18531  * SUCH DAMAGE.
18532  *
18533  * The licence and distribution terms for any publically available version or
18534  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18535  * copied and put under another distribution licence
18536  * [including the GNU Public Licence.]
18537  */
18538 
18539 
18540 
18541 
18542 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
18543 /* e_os2.h */
18544 /* ====================================================================
18545  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
18546  *
18547  * Redistribution and use in source and binary forms, with or without
18548  * modification, are permitted provided that the following conditions
18549  * are met:
18550  *
18551  * 1. Redistributions of source code must retain the above copyright
18552  *    notice, this list of conditions and the following disclaimer.
18553  *
18554  * 2. Redistributions in binary form must reproduce the above copyright
18555  *    notice, this list of conditions and the following disclaimer in
18556  *    the documentation and/or other materials provided with the
18557  *    distribution.
18558  *
18559  * 3. All advertising materials mentioning features or use of this
18560  *    software must display the following acknowledgment:
18561  *    "This product includes software developed by the OpenSSL Project
18562  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18563  *
18564  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18565  *    endorse or promote products derived from this software without
18566  *    prior written permission. For written permission, please contact
18567  *    openssl-core@openssl.org.
18568  *
18569  * 5. Products derived from this software may not be called "OpenSSL"
18570  *    nor may "OpenSSL" appear in their names without prior written
18571  *    permission of the OpenSSL Project.
18572  *
18573  * 6. Redistributions of any form whatsoever must retain the following
18574  *    acknowledgment:
18575  *    "This product includes software developed by the OpenSSL Project
18576  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18577  *
18578  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18579  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18580  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18581  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18582  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18583  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18584  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18585  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18586  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18587  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18588  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18589  * OF THE POSSIBILITY OF SUCH DAMAGE.
18590  * ====================================================================
18591  *
18592  * This product includes cryptographic software written by Eric Young
18593  * (eay@cryptsoft.com).  This product includes software written by Tim
18594  * Hudson (tjh@cryptsoft.com).
18595  *
18596  */
18597 
18598 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
18599 /* opensslconf.h */
18600 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
18601 
18602 
18603 
18604 
18605 /* OpenSSL was configured with the following options: */
18606 # 108 "/usr/include/openssl/opensslconf.h" 3 4
18607 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
18608    asks for it.  This is a transient feature that is provided for those
18609    who haven't had the time to do the appropriate changes in their
18610    applications.  */
18611 # 204 "/usr/include/openssl/opensslconf.h" 3 4
18612 /* crypto/opensslconf.h.in */
18613 
18614 /* Generate 80386 code? */
18615 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
18616 # 63 "/usr/include/openssl/dh.h" 2 3 4
18617 
18618 
18619 
18620 
18621 
18622 
18623 # 1 "/usr/include/openssl/bio.h" 1 3 4
18624 /* crypto/bio/bio.h */
18625 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18626  * All rights reserved.
18627  *
18628  * This package is an SSL implementation written
18629  * by Eric Young (eay@cryptsoft.com).
18630  * The implementation was written so as to conform with Netscapes SSL.
18631  *
18632  * This library is free for commercial and non-commercial use as long as
18633  * the following conditions are aheared to.  The following conditions
18634  * apply to all code found in this distribution, be it the RC4, RSA,
18635  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18636  * included with this distribution is covered by the same copyright terms
18637  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18638  *
18639  * Copyright remains Eric Young's, and as such any Copyright notices in
18640  * the code are not to be removed.
18641  * If this package is used in a product, Eric Young should be given attribution
18642  * as the author of the parts of the library used.
18643  * This can be in the form of a textual message at program startup or
18644  * in documentation (online or textual) provided with the package.
18645  *
18646  * Redistribution and use in source and binary forms, with or without
18647  * modification, are permitted provided that the following conditions
18648  * are met:
18649  * 1. Redistributions of source code must retain the copyright
18650  *    notice, this list of conditions and the following disclaimer.
18651  * 2. Redistributions in binary form must reproduce the above copyright
18652  *    notice, this list of conditions and the following disclaimer in the
18653  *    documentation and/or other materials provided with the distribution.
18654  * 3. All advertising materials mentioning features or use of this software
18655  *    must display the following acknowledgement:
18656  *    "This product includes cryptographic software written by
18657  *     Eric Young (eay@cryptsoft.com)"
18658  *    The word 'cryptographic' can be left out if the rouines from the library
18659  *    being used are not cryptographic related :-).
18660  * 4. If you include any Windows specific code (or a derivative thereof) from
18661  *    the apps directory (application code) you must include an acknowledgement:
18662  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18663  *
18664  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18665  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18666  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18667  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18668  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18669  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18670  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18671  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18672  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18673  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18674  * SUCH DAMAGE.
18675  *
18676  * The licence and distribution terms for any publically available version or
18677  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18678  * copied and put under another distribution licence
18679  * [including the GNU Public Licence.]
18680  */
18681 # 70 "/usr/include/openssl/dh.h" 2 3 4
18682 
18683 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
18684 /* ====================================================================
18685  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
18686  *
18687  * Redistribution and use in source and binary forms, with or without
18688  * modification, are permitted provided that the following conditions
18689  * are met:
18690  *
18691  * 1. Redistributions of source code must retain the above copyright
18692  *    notice, this list of conditions and the following disclaimer.
18693  *
18694  * 2. Redistributions in binary form must reproduce the above copyright
18695  *    notice, this list of conditions and the following disclaimer in
18696  *    the documentation and/or other materials provided with the
18697  *    distribution.
18698  *
18699  * 3. All advertising materials mentioning features or use of this
18700  *    software must display the following acknowledgment:
18701  *    "This product includes software developed by the OpenSSL Project
18702  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18703  *
18704  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18705  *    endorse or promote products derived from this software without
18706  *    prior written permission. For written permission, please contact
18707  *    openssl-core@openssl.org.
18708  *
18709  * 5. Products derived from this software may not be called "OpenSSL"
18710  *    nor may "OpenSSL" appear in their names without prior written
18711  *    permission of the OpenSSL Project.
18712  *
18713  * 6. Redistributions of any form whatsoever must retain the following
18714  *    acknowledgment:
18715  *    "This product includes software developed by the OpenSSL Project
18716  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18717  *
18718  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18719  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18720  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18721  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18722  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18723  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18724  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18725  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18726  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18727  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18728  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18729  * OF THE POSSIBILITY OF SUCH DAMAGE.
18730  * ====================================================================
18731  *
18732  * This product includes cryptographic software written by Eric Young
18733  * (eay@cryptsoft.com).  This product includes software written by Tim
18734  * Hudson (tjh@cryptsoft.com).
18735  *
18736  */
18737 # 72 "/usr/include/openssl/dh.h" 2 3 4
18738 
18739 # 1 "/usr/include/openssl/bn.h" 1 3 4
18740 /* crypto/bn/bn.h */
18741 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
18742  * All rights reserved.
18743  *
18744  * This package is an SSL implementation written
18745  * by Eric Young (eay@cryptsoft.com).
18746  * The implementation was written so as to conform with Netscapes SSL.
18747  *
18748  * This library is free for commercial and non-commercial use as long as
18749  * the following conditions are aheared to.  The following conditions
18750  * apply to all code found in this distribution, be it the RC4, RSA,
18751  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18752  * included with this distribution is covered by the same copyright terms
18753  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18754  *
18755  * Copyright remains Eric Young's, and as such any Copyright notices in
18756  * the code are not to be removed.
18757  * If this package is used in a product, Eric Young should be given attribution
18758  * as the author of the parts of the library used.
18759  * This can be in the form of a textual message at program startup or
18760  * in documentation (online or textual) provided with the package.
18761  *
18762  * Redistribution and use in source and binary forms, with or without
18763  * modification, are permitted provided that the following conditions
18764  * are met:
18765  * 1. Redistributions of source code must retain the copyright
18766  *    notice, this list of conditions and the following disclaimer.
18767  * 2. Redistributions in binary form must reproduce the above copyright
18768  *    notice, this list of conditions and the following disclaimer in the
18769  *    documentation and/or other materials provided with the distribution.
18770  * 3. All advertising materials mentioning features or use of this software
18771  *    must display the following acknowledgement:
18772  *    "This product includes cryptographic software written by
18773  *     Eric Young (eay@cryptsoft.com)"
18774  *    The word 'cryptographic' can be left out if the rouines from the library
18775  *    being used are not cryptographic related :-).
18776  * 4. If you include any Windows specific code (or a derivative thereof) from
18777  *    the apps directory (application code) you must include an acknowledgement:
18778  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18779  *
18780  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18781  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18782  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18783  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18784  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18785  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18786  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18787  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18788  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18789  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18790  * SUCH DAMAGE.
18791  *
18792  * The licence and distribution terms for any publically available version or
18793  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18794  * copied and put under another distribution licence
18795  * [including the GNU Public Licence.]
18796  */
18797 /* ====================================================================
18798  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
18799  *
18800  * Redistribution and use in source and binary forms, with or without
18801  * modification, are permitted provided that the following conditions
18802  * are met:
18803  *
18804  * 1. Redistributions of source code must retain the above copyright
18805  *    notice, this list of conditions and the following disclaimer.
18806  *
18807  * 2. Redistributions in binary form must reproduce the above copyright
18808  *    notice, this list of conditions and the following disclaimer in
18809  *    the documentation and/or other materials provided with the
18810  *    distribution.
18811  *
18812  * 3. All advertising materials mentioning features or use of this
18813  *    software must display the following acknowledgment:
18814  *    "This product includes software developed by the OpenSSL Project
18815  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18816  *
18817  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18818  *    endorse or promote products derived from this software without
18819  *    prior written permission. For written permission, please contact
18820  *    openssl-core@openssl.org.
18821  *
18822  * 5. Products derived from this software may not be called "OpenSSL"
18823  *    nor may "OpenSSL" appear in their names without prior written
18824  *    permission of the OpenSSL Project.
18825  *
18826  * 6. Redistributions of any form whatsoever must retain the following
18827  *    acknowledgment:
18828  *    "This product includes software developed by the OpenSSL Project
18829  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18830  *
18831  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18832  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18833  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18834  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18835  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18836  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18837  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18838  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18839  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18840  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18841  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18842  * OF THE POSSIBILITY OF SUCH DAMAGE.
18843  * ====================================================================
18844  *
18845  * This product includes cryptographic software written by Eric Young
18846  * (eay@cryptsoft.com).  This product includes software written by Tim
18847  * Hudson (tjh@cryptsoft.com).
18848  *
18849  */
18850 /* ====================================================================
18851  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
18852  *
18853  * Portions of the attached software ("Contribution") are developed by
18854  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
18855  *
18856  * The Contribution is licensed pursuant to the Eric Young open source
18857  * license provided above.
18858  *
18859  * The binary polynomial arithmetic software is originally written by
18860  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
18861  *
18862  */
18863 # 74 "/usr/include/openssl/dh.h" 2 3 4
18864 # 82 "/usr/include/openssl/dh.h" 3 4
18865 /*
18866  * new with 0.9.7h; the built-in DH
18867  * implementation now uses constant time
18868  * modular exponentiation for secret exponents
18869  * by default. This flag causes the
18870  * faster variable sliding window method to
18871  * be used for all exponents.
18872  */
18873 
18874 
18875 /*
18876  * If this flag is set the DH method is FIPS compliant and can be used in
18877  * FIPS mode. This is set in the validated module method. If an application
18878  * sets this flag in its own methods it is its reposibility to ensure the
18879  * result is compliant.
18880  */
18881 
18882 
18883 
18884 /*
18885  * If this flag is set the operations normally disabled in FIPS mode are
18886  * permitted it is then the applications responsibility to ensure that the
18887  * usage is compliant.
18888  */
18889 
18890 
18891 
18892 
18893 
18894 
18895 
18896 /* Already defined in ossl_typ.h */
18897 /* typedef struct dh_st DH; */
18898 /* typedef struct dh_method DH_METHOD; */
18899 
18900 struct dh_method {
18901     const char *name;
18902     /* Methods here */
18903     int (*generate_key) (DH *dh);
18904     int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
18905     /* Can be null */
18906     int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
18907                        const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
18908                        BN_MONT_CTX *m_ctx);
18909     int (*init) (DH *dh);
18910     int (*finish) (DH *dh);
18911     int flags;
18912     char *app_data;
18913     /* If this is non-NULL, it will be used to generate parameters */
18914     int (*generate_params) (DH *dh, int prime_len, int generator,
18915                             BN_GENCB *cb);
18916 };
18917 
18918 struct dh_st {
18919     /*
18920      * This first argument is used to pick up errors when a DH is passed
18921      * instead of a EVP_PKEY
18922      */
18923     int pad;
18924     int version;
18925     BIGNUM *p;
18926     BIGNUM *g;
18927     long length; /* optional */
18928     BIGNUM *pub_key; /* g^x % p */
18929     BIGNUM *priv_key; /* x */
18930     int flags;
18931     BN_MONT_CTX *method_mont_p;
18932     /* Place holders if we want to do X9.42 DH */
18933     BIGNUM *q;
18934     BIGNUM *j;
18935     unsigned char *seed;
18936     int seedlen;
18937     BIGNUM *counter;
18938     int references;
18939     CRYPTO_EX_DATA ex_data;
18940     const DH_METHOD *meth;
18941     ENGINE *engine;
18942 };
18943 
18944 
18945 /* #define DH_GENERATOR_3       3 */
18946 
18947 
18948 /* DH_check error codes */
18949 # 174 "/usr/include/openssl/dh.h" 3 4
18950 /* DH_check_pub_key error codes */
18951 
18952 
18953 
18954 
18955 /*
18956  * primes p where (p-1)/2 is prime too are called "safe"; we define this for
18957  * backward compatibility:
18958  */
18959 # 209 "/usr/include/openssl/dh.h" 3 4
18960 DH *DHparams_dup(DH *);
18961 
18962 const DH_METHOD *DH_OpenSSL(void);
18963 
18964 void DH_set_default_method(const DH_METHOD *meth);
18965 const DH_METHOD *DH_get_default_method(void);
18966 int DH_set_method(DH *dh, const DH_METHOD *meth);
18967 DH *DH_new_method(ENGINE *engine);
18968 
18969 DH *DH_new(void);
18970 void DH_free(DH *dh);
18971 int DH_up_ref(DH *dh);
18972 int DH_size(const DH *dh);
18973 int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
18974                         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
18975 int DH_set_ex_data(DH *d, int idx, void *arg);
18976 void *DH_get_ex_data(DH *d, int idx);
18977 
18978 /* Deprecated version */
18979 
18980 DH *DH_generate_parameters(int prime_len, int generator,
18981                            void (*callback) (int, int, void *), void *cb_arg);
18982 
18983 
18984 /* New version */
18985 int DH_generate_parameters_ex(DH *dh, int prime_len, int generator,
18986                               BN_GENCB *cb);
18987 
18988 int DH_check(const DH *dh, int *codes);
18989 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes);
18990 int DH_generate_key(DH *dh);
18991 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
18992 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh);
18993 DH *d2i_DHparams(DH **a, const unsigned char **pp, long length);
18994 int i2d_DHparams(const DH *a, unsigned char **pp);
18995 DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length);
18996 int i2d_DHxparams(const DH *a, unsigned char **pp);
18997 
18998 int DHparams_print_fp(FILE *fp, const DH *x);
18999 
19000 
19001 int DHparams_print(BIO *bp, const DH *x);
19002 
19003 
19004 
19005 
19006 /* RFC 5114 parameters */
19007 DH *DH_get_1024_160(void);
19008 DH *DH_get_2048_224(void);
19009 DH *DH_get_2048_256(void);
19010 
19011 
19012 /* RFC2631 KDF */
19013 int DH_KDF_X9_42(unsigned char *out, size_t outlen,
19014                  const unsigned char *Z, size_t Zlen,
19015                  ASN1_OBJECT *key_oid,
19016                  const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
19017 # 357 "/usr/include/openssl/dh.h" 3 4
19018 /* KDF types */
19019 
19020 
19021 
19022 /* BEGIN ERROR CODES */
19023 /*
19024  * The following lines are auto generated by the script mkerr.pl. Any changes
19025  * made after this point may be overwritten when the script is next run.
19026  */
19027 void ERR_load_DH_strings(void);
19028 
19029 /* Error codes for the DH functions. */
19030 
19031 /* Function codes. */
19032 # 392 "/usr/include/openssl/dh.h" 3 4
19033 /* Reason codes. */
19034 # 84 "/usr/include/openssl/dsa.h" 2 3 4
19035 # 92 "/usr/include/openssl/dsa.h" 3 4
19036 /*
19037  * new with 0.9.7h; the built-in DSA implementation now uses constant time
19038  * modular exponentiation for secret exponents by default. This flag causes
19039  * the faster variable sliding window method to be used for all exponents.
19040  */
19041 
19042 
19043 /*
19044  * If this flag is set the DSA method is FIPS compliant and can be used in
19045  * FIPS mode. This is set in the validated module method. If an application
19046  * sets this flag in its own methods it is its reposibility to ensure the
19047  * result is compliant.
19048  */
19049 
19050 
19051 
19052 /*
19053  * If this flag is set the operations normally disabled in FIPS mode are
19054  * permitted it is then the applications responsibility to ensure that the
19055  * usage is compliant.
19056  */
19057 
19058 
19059 
19060 
19061 
19062 
19063 
19064 /* Already defined in ossl_typ.h */
19065 /* typedef struct dsa_st DSA; */
19066 /* typedef struct dsa_method DSA_METHOD; */
19067 
19068 typedef struct DSA_SIG_st {
19069     BIGNUM *r;
19070     BIGNUM *s;
19071 } DSA_SIG;
19072 
19073 struct dsa_method {
19074     const char *name;
19075     DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa);
19076     int (*dsa_sign_setup) (DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
19077                            BIGNUM **rp);
19078     int (*dsa_do_verify) (const unsigned char *dgst, int dgst_len,
19079                           DSA_SIG *sig, DSA *dsa);
19080     int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
19081                         BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
19082                         BN_MONT_CTX *in_mont);
19083     /* Can be null */
19084     int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
19085                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
19086     int (*init) (DSA *dsa);
19087     int (*finish) (DSA *dsa);
19088     int flags;
19089     char *app_data;
19090     /* If this is non-NULL, it is used to generate DSA parameters */
19091     int (*dsa_paramgen) (DSA *dsa, int bits,
19092                          const unsigned char *seed, int seed_len,
19093                          int *counter_ret, unsigned long *h_ret,
19094                          BN_GENCB *cb);
19095     /* If this is non-NULL, it is used to generate DSA keys */
19096     int (*dsa_keygen) (DSA *dsa);
19097 };
19098 
19099 struct dsa_st {
19100     /*
19101      * This first variable is used to pick up errors where a DSA is passed
19102      * instead of of a EVP_PKEY
19103      */
19104     int pad;
19105     long version;
19106     int write_params;
19107     BIGNUM *p;
19108     BIGNUM *q; /* == 20 */
19109     BIGNUM *g;
19110     BIGNUM *pub_key; /* y public key */
19111     BIGNUM *priv_key; /* x private key */
19112     BIGNUM *kinv; /* Signing pre-calc */
19113     BIGNUM *r; /* Signing pre-calc */
19114     int flags;
19115     /* Normally used to cache montgomery values */
19116     BN_MONT_CTX *method_mont_p;
19117     int references;
19118     CRYPTO_EX_DATA ex_data;
19119     const DSA_METHOD *meth;
19120     /* functional reference if 'meth' is ENGINE-provided */
19121     ENGINE *engine;
19122 };
19123 # 187 "/usr/include/openssl/dsa.h" 3 4
19124 DSA *DSAparams_dup(DSA *x);
19125 DSA_SIG *DSA_SIG_new(void);
19126 void DSA_SIG_free(DSA_SIG *a);
19127 int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
19128 DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length);
19129 
19130 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
19131 int DSA_do_verify(const unsigned char *dgst, int dgst_len,
19132                   DSA_SIG *sig, DSA *dsa);
19133 
19134 const DSA_METHOD *DSA_OpenSSL(void);
19135 
19136 void DSA_set_default_method(const DSA_METHOD *);
19137 const DSA_METHOD *DSA_get_default_method(void);
19138 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
19139 
19140 DSA *DSA_new(void);
19141 DSA *DSA_new_method(ENGINE *engine);
19142 void DSA_free(DSA *r);
19143 /* "up" the DSA object's reference count */
19144 int DSA_up_ref(DSA *r);
19145 int DSA_size(const DSA *);
19146         /* next 4 return -1 on error */
19147 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
19148 int DSA_sign(int type, const unsigned char *dgst, int dlen,
19149              unsigned char *sig, unsigned int *siglen, DSA *dsa);
19150 int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
19151                const unsigned char *sigbuf, int siglen, DSA *dsa);
19152 int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
19153                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
19154 int DSA_set_ex_data(DSA *d, int idx, void *arg);
19155 void *DSA_get_ex_data(DSA *d, int idx);
19156 
19157 DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
19158 DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
19159 DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
19160 
19161 /* Deprecated version */
19162 
19163 DSA *DSA_generate_parameters(int bits,
19164                              unsigned char *seed, int seed_len,
19165                              int *counter_ret, unsigned long *h_ret, void
19166                               (*callback) (int, int, void *), void *cb_arg);
19167 
19168 
19169 /* New version */
19170 int DSA_generate_parameters_ex(DSA *dsa, int bits,
19171                                const unsigned char *seed, int seed_len,
19172                                int *counter_ret, unsigned long *h_ret,
19173                                BN_GENCB *cb);
19174 
19175 int DSA_generate_key(DSA *a);
19176 int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
19177 int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
19178 int i2d_DSAparams(const DSA *a, unsigned char **pp);
19179 
19180 
19181 int DSAparams_print(BIO *bp, const DSA *x);
19182 int DSA_print(BIO *bp, const DSA *x, int off);
19183 
19184 
19185 int DSAparams_print_fp(FILE *fp, const DSA *x);
19186 int DSA_print_fp(FILE *bp, const DSA *x, int off);
19187 
19188 
19189 
19190 /*
19191  * Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only
19192  * have one value here we set the number of checks to 64 which is the 128 bit
19193  * security level that is the highest level and valid for creating a 3072 bit
19194  * DSA key.
19195  */
19196 
19197 
19198 
19199 
19200 /*
19201  * Convert DSA structure (key or just parameters) into DH structure (be
19202  * careful to avoid small subgroup attacks when using this!)
19203  */
19204 DH *DSA_dup_DH(const DSA *r);
19205 # 278 "/usr/include/openssl/dsa.h" 3 4
19206 /* BEGIN ERROR CODES */
19207 /*
19208  * The following lines are auto generated by the script mkerr.pl. Any changes
19209  * made after this point may be overwritten when the script is next run.
19210  */
19211 void ERR_load_DSA_strings(void);
19212 
19213 /* Error codes for the DSA functions. */
19214 
19215 /* Function codes. */
19216 # 316 "/usr/include/openssl/dsa.h" 3 4
19217 /* Reason codes. */
19218 # 100 "/usr/include/openssl/x509.h" 2 3 4
19219 
19220 
19221 # 1 "/usr/include/openssl/dh.h" 1 3 4
19222 /* crypto/dh/dh.h */
19223 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19224  * All rights reserved.
19225  *
19226  * This package is an SSL implementation written
19227  * by Eric Young (eay@cryptsoft.com).
19228  * The implementation was written so as to conform with Netscapes SSL.
19229  *
19230  * This library is free for commercial and non-commercial use as long as
19231  * the following conditions are aheared to.  The following conditions
19232  * apply to all code found in this distribution, be it the RC4, RSA,
19233  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19234  * included with this distribution is covered by the same copyright terms
19235  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19236  *
19237  * Copyright remains Eric Young's, and as such any Copyright notices in
19238  * the code are not to be removed.
19239  * If this package is used in a product, Eric Young should be given attribution
19240  * as the author of the parts of the library used.
19241  * This can be in the form of a textual message at program startup or
19242  * in documentation (online or textual) provided with the package.
19243  *
19244  * Redistribution and use in source and binary forms, with or without
19245  * modification, are permitted provided that the following conditions
19246  * are met:
19247  * 1. Redistributions of source code must retain the copyright
19248  *    notice, this list of conditions and the following disclaimer.
19249  * 2. Redistributions in binary form must reproduce the above copyright
19250  *    notice, this list of conditions and the following disclaimer in the
19251  *    documentation and/or other materials provided with the distribution.
19252  * 3. All advertising materials mentioning features or use of this software
19253  *    must display the following acknowledgement:
19254  *    "This product includes cryptographic software written by
19255  *     Eric Young (eay@cryptsoft.com)"
19256  *    The word 'cryptographic' can be left out if the rouines from the library
19257  *    being used are not cryptographic related :-).
19258  * 4. If you include any Windows specific code (or a derivative thereof) from
19259  *    the apps directory (application code) you must include an acknowledgement:
19260  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19261  *
19262  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19263  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19264  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19265  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19266  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19267  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19268  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19269  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19270  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19271  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19272  * SUCH DAMAGE.
19273  *
19274  * The licence and distribution terms for any publically available version or
19275  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19276  * copied and put under another distribution licence
19277  * [including the GNU Public Licence.]
19278  */
19279 # 103 "/usr/include/openssl/x509.h" 2 3 4
19280 
19281 
19282 
19283 
19284 # 1 "/usr/include/openssl/sha.h" 1 3 4
19285 /* crypto/sha/sha.h */
19286 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19287  * All rights reserved.
19288  *
19289  * This package is an SSL implementation written
19290  * by Eric Young (eay@cryptsoft.com).
19291  * The implementation was written so as to conform with Netscapes SSL.
19292  *
19293  * This library is free for commercial and non-commercial use as long as
19294  * the following conditions are aheared to.  The following conditions
19295  * apply to all code found in this distribution, be it the RC4, RSA,
19296  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19297  * included with this distribution is covered by the same copyright terms
19298  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19299  *
19300  * Copyright remains Eric Young's, and as such any Copyright notices in
19301  * the code are not to be removed.
19302  * If this package is used in a product, Eric Young should be given attribution
19303  * as the author of the parts of the library used.
19304  * This can be in the form of a textual message at program startup or
19305  * in documentation (online or textual) provided with the package.
19306  *
19307  * Redistribution and use in source and binary forms, with or without
19308  * modification, are permitted provided that the following conditions
19309  * are met:
19310  * 1. Redistributions of source code must retain the copyright
19311  *    notice, this list of conditions and the following disclaimer.
19312  * 2. Redistributions in binary form must reproduce the above copyright
19313  *    notice, this list of conditions and the following disclaimer in the
19314  *    documentation and/or other materials provided with the distribution.
19315  * 3. All advertising materials mentioning features or use of this software
19316  *    must display the following acknowledgement:
19317  *    "This product includes cryptographic software written by
19318  *     Eric Young (eay@cryptsoft.com)"
19319  *    The word 'cryptographic' can be left out if the rouines from the library
19320  *    being used are not cryptographic related :-).
19321  * 4. If you include any Windows specific code (or a derivative thereof) from
19322  *    the apps directory (application code) you must include an acknowledgement:
19323  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19324  *
19325  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19326  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19327  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19328  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19329  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19330  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19331  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19332  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19333  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19334  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19335  * SUCH DAMAGE.
19336  *
19337  * The licence and distribution terms for any publically available version or
19338  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19339  * copied and put under another distribution licence
19340  * [including the GNU Public Licence.]
19341  */
19342 
19343 
19344 
19345 
19346 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
19347 /* e_os2.h */
19348 /* ====================================================================
19349  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
19350  *
19351  * Redistribution and use in source and binary forms, with or without
19352  * modification, are permitted provided that the following conditions
19353  * are met:
19354  *
19355  * 1. Redistributions of source code must retain the above copyright
19356  *    notice, this list of conditions and the following disclaimer.
19357  *
19358  * 2. Redistributions in binary form must reproduce the above copyright
19359  *    notice, this list of conditions and the following disclaimer in
19360  *    the documentation and/or other materials provided with the
19361  *    distribution.
19362  *
19363  * 3. All advertising materials mentioning features or use of this
19364  *    software must display the following acknowledgment:
19365  *    "This product includes software developed by the OpenSSL Project
19366  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19367  *
19368  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19369  *    endorse or promote products derived from this software without
19370  *    prior written permission. For written permission, please contact
19371  *    openssl-core@openssl.org.
19372  *
19373  * 5. Products derived from this software may not be called "OpenSSL"
19374  *    nor may "OpenSSL" appear in their names without prior written
19375  *    permission of the OpenSSL Project.
19376  *
19377  * 6. Redistributions of any form whatsoever must retain the following
19378  *    acknowledgment:
19379  *    "This product includes software developed by the OpenSSL Project
19380  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19381  *
19382  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19383  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19384  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19385  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19386  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19387  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19388  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19389  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19390  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19391  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19392  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19393  * OF THE POSSIBILITY OF SUCH DAMAGE.
19394  * ====================================================================
19395  *
19396  * This product includes cryptographic software written by Eric Young
19397  * (eay@cryptsoft.com).  This product includes software written by Tim
19398  * Hudson (tjh@cryptsoft.com).
19399  *
19400  */
19401 
19402 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
19403 /* opensslconf.h */
19404 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
19405 
19406 
19407 
19408 
19409 /* OpenSSL was configured with the following options: */
19410 # 108 "/usr/include/openssl/opensslconf.h" 3 4
19411 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
19412    asks for it.  This is a transient feature that is provided for those
19413    who haven't had the time to do the appropriate changes in their
19414    applications.  */
19415 # 204 "/usr/include/openssl/opensslconf.h" 3 4
19416 /* crypto/opensslconf.h.in */
19417 
19418 /* Generate 80386 code? */
19419 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
19420 # 63 "/usr/include/openssl/sha.h" 2 3 4
19421 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
19422 /*
19423  * CDDL HEADER START
19424  *
19425  * The contents of this file are subject to the terms of the
19426  * Common Development and Distribution License, Version 1.0 only
19427  * (the "License").  You may not use this file except in compliance
19428  * with the License.
19429  *
19430  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19431  * or http://www.opensolaris.org/os/licensing.
19432  * See the License for the specific language governing permissions
19433  * and limitations under the License.
19434  *
19435  * When distributing Covered Code, include this CDDL HEADER in each
19436  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19437  * If applicable, add the following below this CDDL HEADER, with the
19438  * fields enclosed by brackets "[]" replaced with your own identifying
19439  * information: Portions Copyright [yyyy] [name of copyright owner]
19440  *
19441  * CDDL HEADER END
19442  */
19443 /*	Copyright (c) 1988 AT&T	*/
19444 /*	  All Rights Reserved  	*/
19445 
19446 
19447 /*
19448  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
19449  * Use is subject to license terms.
19450  */
19451 # 64 "/usr/include/openssl/sha.h" 2 3 4
19452 # 77 "/usr/include/openssl/sha.h" 3 4
19453 /*-
19454  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
19455  * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then !
19456  * ! SHA_LONG_LOG2 has to be defined along.                        !
19457  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
19458  */
19459 # 100 "/usr/include/openssl/sha.h" 3 4
19460 typedef struct SHAstate_st {
19461     unsigned int h0, h1, h2, h3, h4;
19462     unsigned int Nl, Nh;
19463     unsigned int data[16];
19464     unsigned int num;
19465 } SHA_CTX;
19466 
19467 
19468 
19469 
19470 
19471 int SHA_Init(SHA_CTX *c);
19472 int SHA_Update(SHA_CTX *c, const void *data, size_t len);
19473 int SHA_Final(unsigned char *md, SHA_CTX *c);
19474 unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md);
19475 void SHA_Transform(SHA_CTX *c, const unsigned char *data);
19476 
19477 
19478 
19479 
19480 
19481 int SHA1_Init(SHA_CTX *c);
19482 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
19483 int SHA1_Final(unsigned char *md, SHA_CTX *c);
19484 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
19485 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
19486 # 134 "/usr/include/openssl/sha.h" 3 4
19487 typedef struct SHA256state_st {
19488     unsigned int h[8];
19489     unsigned int Nl, Nh;
19490     unsigned int data[16];
19491     unsigned int num, md_len;
19492 } SHA256_CTX;
19493 
19494 
19495 
19496 
19497 
19498 
19499 int SHA224_Init(SHA256_CTX *c);
19500 int SHA224_Update(SHA256_CTX *c, const void *data, size_t len);
19501 int SHA224_Final(unsigned char *md, SHA256_CTX *c);
19502 unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md);
19503 int SHA256_Init(SHA256_CTX *c);
19504 int SHA256_Update(SHA256_CTX *c, const void *data, size_t len);
19505 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
19506 unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);
19507 void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
19508 
19509 
19510 
19511 
19512 
19513 
19514 /*
19515  * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64
19516  * being exactly 64-bit wide. See Implementation Notes in sha512.c
19517  * for further details.
19518  */
19519 /*
19520  * SHA-512 treats input data as a
19521  * contiguous array of 64 bit
19522  * wide big-endian values.
19523  */
19524 # 183 "/usr/include/openssl/sha.h" 3 4
19525 typedef struct SHA512state_st {
19526     unsigned long long h[8];
19527     unsigned long long Nl, Nh;
19528     union {
19529         unsigned long long d[16];
19530         unsigned char p[(16*8)];
19531     } u;
19532     unsigned int num, md_len;
19533 } SHA512_CTX;
19534 
19535 
19536 
19537 
19538 
19539 
19540 
19541 int SHA384_Init(SHA512_CTX *c);
19542 int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
19543 int SHA384_Final(unsigned char *md, SHA512_CTX *c);
19544 unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);
19545 int SHA512_Init(SHA512_CTX *c);
19546 int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);
19547 int SHA512_Final(unsigned char *md, SHA512_CTX *c);
19548 unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
19549 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
19550 # 108 "/usr/include/openssl/x509.h" 2 3 4
19551 
19552 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
19553 /* ====================================================================
19554  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
19555  *
19556  * Redistribution and use in source and binary forms, with or without
19557  * modification, are permitted provided that the following conditions
19558  * are met:
19559  *
19560  * 1. Redistributions of source code must retain the above copyright
19561  *    notice, this list of conditions and the following disclaimer.
19562  *
19563  * 2. Redistributions in binary form must reproduce the above copyright
19564  *    notice, this list of conditions and the following disclaimer in
19565  *    the documentation and/or other materials provided with the
19566  *    distribution.
19567  *
19568  * 3. All advertising materials mentioning features or use of this
19569  *    software must display the following acknowledgment:
19570  *    "This product includes software developed by the OpenSSL Project
19571  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19572  *
19573  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19574  *    endorse or promote products derived from this software without
19575  *    prior written permission. For written permission, please contact
19576  *    openssl-core@openssl.org.
19577  *
19578  * 5. Products derived from this software may not be called "OpenSSL"
19579  *    nor may "OpenSSL" appear in their names without prior written
19580  *    permission of the OpenSSL Project.
19581  *
19582  * 6. Redistributions of any form whatsoever must retain the following
19583  *    acknowledgment:
19584  *    "This product includes software developed by the OpenSSL Project
19585  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19586  *
19587  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19588  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19589  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19590  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19591  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19592  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19593  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19594  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19595  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19596  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19597  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19598  * OF THE POSSIBILITY OF SUCH DAMAGE.
19599  * ====================================================================
19600  *
19601  * This product includes cryptographic software written by Eric Young
19602  * (eay@cryptsoft.com).  This product includes software written by Tim
19603  * Hudson (tjh@cryptsoft.com).
19604  *
19605  */
19606 # 110 "/usr/include/openssl/x509.h" 2 3 4
19607 # 137 "/usr/include/openssl/x509.h" 3 4
19608 typedef struct X509_objects_st {
19609     int nid;
19610     int (*a2i) (void);
19611     int (*i2a) (void);
19612 } X509_OBJECTS;
19613 
19614 struct X509_algor_st {
19615     ASN1_OBJECT *algorithm;
19616     ASN1_TYPE *parameter;
19617 } /* X509_ALGOR */ ;
19618 
19619 
19620 
19621 typedef struct stack_st_X509_ALGOR X509_ALGORS;
19622 
19623 typedef struct X509_val_st {
19624     ASN1_TIME *notBefore;
19625     ASN1_TIME *notAfter;
19626 } X509_VAL;
19627 
19628 struct X509_pubkey_st {
19629     X509_ALGOR *algor;
19630     ASN1_BIT_STRING *public_key;
19631     EVP_PKEY *pkey;
19632 };
19633 
19634 typedef struct X509_sig_st {
19635     X509_ALGOR *algor;
19636     ASN1_OCTET_STRING *digest;
19637 } X509_SIG;
19638 
19639 typedef struct X509_name_entry_st {
19640     ASN1_OBJECT *object;
19641     ASN1_STRING *value;
19642     int set;
19643     int size; /* temp variable */
19644 } X509_NAME_ENTRY;
19645 
19646 struct stack_st_X509_NAME_ENTRY { _STACK stack; };
19647 
19648 
19649 /* we always keep X509_NAMEs in 2 forms. */
19650 struct X509_name_st {
19651     struct stack_st_X509_NAME_ENTRY *entries;
19652     int modified; /* true if 'bytes' needs to be built */
19653 
19654     BUF_MEM *bytes;
19655 
19656 
19657 
19658 /*      unsigned long hash; Keep the hash around for lookups */
19659     unsigned char *canon_enc;
19660     int canon_enclen;
19661 } /* X509_NAME */ ;
19662 
19663 struct stack_st_X509_NAME { _STACK stack; };
19664 
19665 
19666 
19667 typedef struct X509_extension_st {
19668     ASN1_OBJECT *object;
19669     ASN1_BOOLEAN critical;
19670     ASN1_OCTET_STRING *value;
19671 } X509_EXTENSION;
19672 
19673 typedef struct stack_st_X509_EXTENSION X509_EXTENSIONS;
19674 
19675 struct stack_st_X509_EXTENSION { _STACK stack; };
19676 
19677 
19678 /* a sequence of these are used */
19679 typedef struct x509_attributes_st {
19680     ASN1_OBJECT *object;
19681     int single; /* 0 for a set, 1 for a single item (which is
19682                                  * wrong) */
19683     union {
19684         char *ptr;
19685         /*
19686          * 0
19687          */ struct stack_st_ASN1_TYPE *set;
19688         /*
19689          * 1
19690          */ ASN1_TYPE *single;
19691     } value;
19692 } X509_ATTRIBUTE;
19693 
19694 struct stack_st_X509_ATTRIBUTE { _STACK stack; };
19695 
19696 
19697 typedef struct X509_req_info_st {
19698     ASN1_ENCODING enc;
19699     ASN1_INTEGER *version;
19700     X509_NAME *subject;
19701     X509_PUBKEY *pubkey;
19702     /*  d=2 hl=2 l=  0 cons: cont: 00 */
19703     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
19704 } X509_REQ_INFO;
19705 
19706 typedef struct X509_req_st {
19707     X509_REQ_INFO *req_info;
19708     X509_ALGOR *sig_alg;
19709     ASN1_BIT_STRING *signature;
19710     int references;
19711 } X509_REQ;
19712 
19713 typedef struct x509_cinf_st {
19714     ASN1_INTEGER *version; /* [ 0 ] default of v1 */
19715     ASN1_INTEGER *serialNumber;
19716     X509_ALGOR *signature;
19717     X509_NAME *issuer;
19718     X509_VAL *validity;
19719     X509_NAME *subject;
19720     X509_PUBKEY *key;
19721     ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */
19722     ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */
19723     struct stack_st_X509_EXTENSION *extensions; /* [ 3 ] optional in v3 */
19724     ASN1_ENCODING enc;
19725 } X509_CINF;
19726 
19727 /*
19728  * This stuff is certificate "auxiliary info" it contains details which are
19729  * useful in certificate stores and databases. When used this is tagged onto
19730  * the end of the certificate itself
19731  */
19732 
19733 typedef struct x509_cert_aux_st {
19734     struct stack_st_ASN1_OBJECT *trust; /* trusted uses */
19735     struct stack_st_ASN1_OBJECT *reject; /* rejected uses */
19736     ASN1_UTF8STRING *alias; /* "friendly name" */
19737     ASN1_OCTET_STRING *keyid; /* key id of private key */
19738     struct stack_st_X509_ALGOR *other; /* other unspecified info */
19739 } X509_CERT_AUX;
19740 
19741 struct x509_st {
19742     X509_CINF *cert_info;
19743     X509_ALGOR *sig_alg;
19744     ASN1_BIT_STRING *signature;
19745     int valid;
19746     int references;
19747     char *name;
19748     CRYPTO_EX_DATA ex_data;
19749     /* These contain copies of various extension values */
19750     long ex_pathlen;
19751     long ex_pcpathlen;
19752     unsigned long ex_flags;
19753     unsigned long ex_kusage;
19754     unsigned long ex_xkusage;
19755     unsigned long ex_nscert;
19756     ASN1_OCTET_STRING *skid;
19757     AUTHORITY_KEYID *akid;
19758     X509_POLICY_CACHE *policy_cache;
19759     struct stack_st_DIST_POINT *crldp;
19760     struct stack_st_GENERAL_NAME *altname;
19761     NAME_CONSTRAINTS *nc;
19762 
19763 
19764 
19765 
19766 
19767     unsigned char sha1_hash[20];
19768 
19769     X509_CERT_AUX *aux;
19770 } /* X509 */ ;
19771 
19772 struct stack_st_X509 { _STACK stack; };
19773 
19774 
19775 /* This is used for a table of trust checking functions */
19776 
19777 typedef struct x509_trust_st {
19778     int trust;
19779     int flags;
19780     int (*check_trust) (struct x509_trust_st *, X509 *, int);
19781     char *name;
19782     int arg1;
19783     void *arg2;
19784 } X509_TRUST;
19785 
19786 struct stack_st_X509_TRUST { _STACK stack; };
19787 
19788 typedef struct x509_cert_pair_st {
19789     X509 *forward;
19790     X509 *reverse;
19791 } X509_CERT_PAIR;
19792 
19793 /* standard trust ids */
19794 # 335 "/usr/include/openssl/x509.h" 3 4
19795 /* Keep these up to date! */
19796 
19797 
19798 
19799 /* trust_flags values */
19800 
19801 
19802 
19803 /* check_trust return codes */
19804 
19805 
19806 
19807 
19808 
19809 /* Flags for X509_print_ex() */
19810 # 366 "/usr/include/openssl/x509.h" 3 4
19811 /* Flags specific to X509_NAME_print_ex() */
19812 
19813 /* The field separator information */
19814 # 381 "/usr/include/openssl/x509.h" 3 4
19815 /* How the field name is shown */
19816 # 392 "/usr/include/openssl/x509.h" 3 4
19817 /*
19818  * This determines if we dump fields we don't recognise: RFC2253 requires
19819  * this.
19820  */
19821 
19822 
19823 
19824 
19825 
19826 
19827 /* Complete set of RFC2253 flags */
19828 
19829 
19830 
19831 
19832 
19833 
19834 
19835 /* readable oneline form */
19836 
19837 
19838 
19839 
19840 
19841 
19842 
19843 /* readable multiline form */
19844 # 427 "/usr/include/openssl/x509.h" 3 4
19845 struct x509_revoked_st {
19846     ASN1_INTEGER *serialNumber;
19847     ASN1_TIME *revocationDate;
19848     struct stack_st_X509_EXTENSION /* optional */ *extensions;
19849     /* Set up if indirect CRL */
19850     struct stack_st_GENERAL_NAME *issuer;
19851     /* Revocation reason */
19852     int reason;
19853     int sequence; /* load sequence */
19854 };
19855 
19856 struct stack_st_X509_REVOKED { _STACK stack; };
19857 
19858 
19859 typedef struct X509_crl_info_st {
19860     ASN1_INTEGER *version;
19861     X509_ALGOR *sig_alg;
19862     X509_NAME *issuer;
19863     ASN1_TIME *lastUpdate;
19864     ASN1_TIME *nextUpdate;
19865     struct stack_st_X509_REVOKED *revoked;
19866     struct stack_st_X509_EXTENSION /* [0] */ *extensions;
19867     ASN1_ENCODING enc;
19868 } X509_CRL_INFO;
19869 
19870 struct X509_crl_st {
19871     /* actual signature */
19872     X509_CRL_INFO *crl;
19873     X509_ALGOR *sig_alg;
19874     ASN1_BIT_STRING *signature;
19875     int references;
19876     int flags;
19877     /* Copies of various extensions */
19878     AUTHORITY_KEYID *akid;
19879     ISSUING_DIST_POINT *idp;
19880     /* Convenient breakdown of IDP */
19881     int idp_flags;
19882     int idp_reasons;
19883     /* CRL and base CRL numbers for delta processing */
19884     ASN1_INTEGER *crl_number;
19885     ASN1_INTEGER *base_crl_number;
19886 
19887     unsigned char sha1_hash[20];
19888 
19889     struct stack_st_GENERAL_NAMES *issuers;
19890     const X509_CRL_METHOD *meth;
19891     void *meth_data;
19892 } /* X509_CRL */ ;
19893 
19894 struct stack_st_X509_CRL { _STACK stack; };
19895 
19896 
19897 typedef struct private_key_st {
19898     int version;
19899     /* The PKCS#8 data types */
19900     X509_ALGOR *enc_algor;
19901     ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */
19902     /* When decrypted, the following will not be NULL */
19903     EVP_PKEY *dec_pkey;
19904     /* used to encrypt and decrypt */
19905     int key_length;
19906     char *key_data;
19907     int key_free; /* true if we should auto free key_data */
19908     /* expanded version of 'enc_algor' */
19909     EVP_CIPHER_INFO cipher;
19910     int references;
19911 } X509_PKEY;
19912 
19913 
19914 typedef struct X509_info_st {
19915     X509 *x509;
19916     X509_CRL *crl;
19917     X509_PKEY *x_pkey;
19918     EVP_CIPHER_INFO enc_cipher;
19919     int enc_len;
19920     char *enc_data;
19921     int references;
19922 } X509_INFO;
19923 
19924 struct stack_st_X509_INFO { _STACK stack; };
19925 
19926 
19927 /*
19928  * The next 2 structures and their 8 routines were sent to me by Pat Richard
19929  * <patr@x509.com> and are used to manipulate Netscapes spki structures -
19930  * useful if you are writing a CA web page
19931  */
19932 typedef struct Netscape_spkac_st {
19933     X509_PUBKEY *pubkey;
19934     ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */
19935 } NETSCAPE_SPKAC;
19936 
19937 typedef struct Netscape_spki_st {
19938     NETSCAPE_SPKAC *spkac; /* signed public key and challenge */
19939     X509_ALGOR *sig_algor;
19940     ASN1_BIT_STRING *signature;
19941 } NETSCAPE_SPKI;
19942 
19943 /* Netscape certificate sequence structure */
19944 typedef struct Netscape_certificate_sequence {
19945     ASN1_OBJECT *type;
19946     struct stack_st_X509 *certs;
19947 } NETSCAPE_CERT_SEQUENCE;
19948 
19949 /*- Unused (and iv length is wrong)
19950 typedef struct CBCParameter_st
19951         {
19952         unsigned char iv[8];
19953         } CBC_PARAM;
19954 */
19955 
19956 /* Password based encryption structure */
19957 
19958 typedef struct PBEPARAM_st {
19959     ASN1_OCTET_STRING *salt;
19960     ASN1_INTEGER *iter;
19961 } PBEPARAM;
19962 
19963 /* Password based encryption V2 structures */
19964 
19965 typedef struct PBE2PARAM_st {
19966     X509_ALGOR *keyfunc;
19967     X509_ALGOR *encryption;
19968 } PBE2PARAM;
19969 
19970 typedef struct PBKDF2PARAM_st {
19971 /* Usually OCTET STRING but could be anything */
19972     ASN1_TYPE *salt;
19973     ASN1_INTEGER *iter;
19974     ASN1_INTEGER *keylength;
19975     X509_ALGOR *prf;
19976 } PBKDF2PARAM;
19977 
19978 /* PKCS#8 private key info structure */
19979 
19980 struct pkcs8_priv_key_info_st {
19981     /* Flag for various broken formats */
19982     int broken;
19983 
19984 
19985 
19986 
19987 
19988     ASN1_INTEGER *version;
19989     X509_ALGOR *pkeyalg;
19990     /* Should be OCTET STRING but some are broken */
19991     ASN1_TYPE *pkey;
19992     struct stack_st_X509_ATTRIBUTE *attributes;
19993 };
19994 
19995 
19996 
19997 
19998 
19999 # 1 "/usr/include/openssl/x509_vfy.h" 1 3 4
20000 /* crypto/x509/x509_vfy.h */
20001 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20002  * All rights reserved.
20003  *
20004  * This package is an SSL implementation written
20005  * by Eric Young (eay@cryptsoft.com).
20006  * The implementation was written so as to conform with Netscapes SSL.
20007  *
20008  * This library is free for commercial and non-commercial use as long as
20009  * the following conditions are aheared to.  The following conditions
20010  * apply to all code found in this distribution, be it the RC4, RSA,
20011  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20012  * included with this distribution is covered by the same copyright terms
20013  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20014  *
20015  * Copyright remains Eric Young's, and as such any Copyright notices in
20016  * the code are not to be removed.
20017  * If this package is used in a product, Eric Young should be given attribution
20018  * as the author of the parts of the library used.
20019  * This can be in the form of a textual message at program startup or
20020  * in documentation (online or textual) provided with the package.
20021  *
20022  * Redistribution and use in source and binary forms, with or without
20023  * modification, are permitted provided that the following conditions
20024  * are met:
20025  * 1. Redistributions of source code must retain the copyright
20026  *    notice, this list of conditions and the following disclaimer.
20027  * 2. Redistributions in binary form must reproduce the above copyright
20028  *    notice, this list of conditions and the following disclaimer in the
20029  *    documentation and/or other materials provided with the distribution.
20030  * 3. All advertising materials mentioning features or use of this software
20031  *    must display the following acknowledgement:
20032  *    "This product includes cryptographic software written by
20033  *     Eric Young (eay@cryptsoft.com)"
20034  *    The word 'cryptographic' can be left out if the rouines from the library
20035  *    being used are not cryptographic related :-).
20036  * 4. If you include any Windows specific code (or a derivative thereof) from
20037  *    the apps directory (application code) you must include an acknowledgement:
20038  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20039  *
20040  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20041  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20042  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20043  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20044  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20045  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20046  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20047  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20048  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20049  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20050  * SUCH DAMAGE.
20051  *
20052  * The licence and distribution terms for any publically available version or
20053  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20054  * copied and put under another distribution licence
20055  * [including the GNU Public Licence.]
20056  */
20057 # 70 "/usr/include/openssl/x509_vfy.h" 3 4
20058 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
20059 /* opensslconf.h */
20060 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
20061 
20062 
20063 
20064 
20065 /* OpenSSL was configured with the following options: */
20066 # 108 "/usr/include/openssl/opensslconf.h" 3 4
20067 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
20068    asks for it.  This is a transient feature that is provided for those
20069    who haven't had the time to do the appropriate changes in their
20070    applications.  */
20071 # 204 "/usr/include/openssl/opensslconf.h" 3 4
20072 /* crypto/opensslconf.h.in */
20073 
20074 /* Generate 80386 code? */
20075 # 71 "/usr/include/openssl/x509_vfy.h" 2 3 4
20076 
20077 # 1 "/usr/include/openssl/lhash.h" 1 3 4
20078 /* crypto/lhash/lhash.h */
20079 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20080  * All rights reserved.
20081  *
20082  * This package is an SSL implementation written
20083  * by Eric Young (eay@cryptsoft.com).
20084  * The implementation was written so as to conform with Netscapes SSL.
20085  *
20086  * This library is free for commercial and non-commercial use as long as
20087  * the following conditions are aheared to.  The following conditions
20088  * apply to all code found in this distribution, be it the RC4, RSA,
20089  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20090  * included with this distribution is covered by the same copyright terms
20091  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20092  *
20093  * Copyright remains Eric Young's, and as such any Copyright notices in
20094  * the code are not to be removed.
20095  * If this package is used in a product, Eric Young should be given attribution
20096  * as the author of the parts of the library used.
20097  * This can be in the form of a textual message at program startup or
20098  * in documentation (online or textual) provided with the package.
20099  *
20100  * Redistribution and use in source and binary forms, with or without
20101  * modification, are permitted provided that the following conditions
20102  * are met:
20103  * 1. Redistributions of source code must retain the copyright
20104  *    notice, this list of conditions and the following disclaimer.
20105  * 2. Redistributions in binary form must reproduce the above copyright
20106  *    notice, this list of conditions and the following disclaimer in the
20107  *    documentation and/or other materials provided with the distribution.
20108  * 3. All advertising materials mentioning features or use of this software
20109  *    must display the following acknowledgement:
20110  *    "This product includes cryptographic software written by
20111  *     Eric Young (eay@cryptsoft.com)"
20112  *    The word 'cryptographic' can be left out if the rouines from the library
20113  *    being used are not cryptographic related :-).
20114  * 4. If you include any Windows specific code (or a derivative thereof) from
20115  *    the apps directory (application code) you must include an acknowledgement:
20116  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20117  *
20118  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20119  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20120  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20121  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20122  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20123  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20124  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20125  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20126  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20127  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20128  * SUCH DAMAGE.
20129  *
20130  * The licence and distribution terms for any publically available version or
20131  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20132  * copied and put under another distribution licence
20133  * [including the GNU Public Licence.]
20134  */
20135 
20136 /*
20137  * Header for dynamic hash table routines Author - Eric Young
20138  */
20139 
20140 
20141 
20142 
20143 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
20144 /* e_os2.h */
20145 /* ====================================================================
20146  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
20147  *
20148  * Redistribution and use in source and binary forms, with or without
20149  * modification, are permitted provided that the following conditions
20150  * are met:
20151  *
20152  * 1. Redistributions of source code must retain the above copyright
20153  *    notice, this list of conditions and the following disclaimer.
20154  *
20155  * 2. Redistributions in binary form must reproduce the above copyright
20156  *    notice, this list of conditions and the following disclaimer in
20157  *    the documentation and/or other materials provided with the
20158  *    distribution.
20159  *
20160  * 3. All advertising materials mentioning features or use of this
20161  *    software must display the following acknowledgment:
20162  *    "This product includes software developed by the OpenSSL Project
20163  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20164  *
20165  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20166  *    endorse or promote products derived from this software without
20167  *    prior written permission. For written permission, please contact
20168  *    openssl-core@openssl.org.
20169  *
20170  * 5. Products derived from this software may not be called "OpenSSL"
20171  *    nor may "OpenSSL" appear in their names without prior written
20172  *    permission of the OpenSSL Project.
20173  *
20174  * 6. Redistributions of any form whatsoever must retain the following
20175  *    acknowledgment:
20176  *    "This product includes software developed by the OpenSSL Project
20177  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20178  *
20179  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20180  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20181  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20182  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20183  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20184  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20185  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20186  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20187  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20188  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20189  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20190  * OF THE POSSIBILITY OF SUCH DAMAGE.
20191  * ====================================================================
20192  *
20193  * This product includes cryptographic software written by Eric Young
20194  * (eay@cryptsoft.com).  This product includes software written by Tim
20195  * Hudson (tjh@cryptsoft.com).
20196  *
20197  */
20198 
20199 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
20200 /* opensslconf.h */
20201 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
20202 
20203 
20204 
20205 
20206 /* OpenSSL was configured with the following options: */
20207 # 108 "/usr/include/openssl/opensslconf.h" 3 4
20208 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
20209    asks for it.  This is a transient feature that is provided for those
20210    who haven't had the time to do the appropriate changes in their
20211    applications.  */
20212 # 204 "/usr/include/openssl/opensslconf.h" 3 4
20213 /* crypto/opensslconf.h.in */
20214 
20215 /* Generate 80386 code? */
20216 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
20217 # 67 "/usr/include/openssl/lhash.h" 2 3 4
20218 
20219 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
20220 /*
20221  * CDDL HEADER START
20222  *
20223  * The contents of this file are subject to the terms of the
20224  * Common Development and Distribution License (the "License").
20225  * You may not use this file except in compliance with the License.
20226  *
20227  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20228  * or http://www.opensolaris.org/os/licensing.
20229  * See the License for the specific language governing permissions
20230  * and limitations under the License.
20231  *
20232  * When distributing Covered Code, include this CDDL HEADER in each
20233  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20234  * If applicable, add the following below this CDDL HEADER, with the
20235  * fields enclosed by brackets "[]" replaced with your own identifying
20236  * information: Portions Copyright [yyyy] [name of copyright owner]
20237  *
20238  * CDDL HEADER END
20239  */
20240 
20241 /*
20242  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
20243  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
20244  */
20245 
20246 /*	Copyright (c) 1988 AT&T	*/
20247 /*	  All Rights Reserved  	*/
20248 
20249 /*
20250  * User-visible pieces of the ANSI C standard I/O package.
20251  */
20252 # 69 "/usr/include/openssl/lhash.h" 2 3 4
20253 
20254 
20255 
20256 # 1 "/usr/include/openssl/bio.h" 1 3 4
20257 /* crypto/bio/bio.h */
20258 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20259  * All rights reserved.
20260  *
20261  * This package is an SSL implementation written
20262  * by Eric Young (eay@cryptsoft.com).
20263  * The implementation was written so as to conform with Netscapes SSL.
20264  *
20265  * This library is free for commercial and non-commercial use as long as
20266  * the following conditions are aheared to.  The following conditions
20267  * apply to all code found in this distribution, be it the RC4, RSA,
20268  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20269  * included with this distribution is covered by the same copyright terms
20270  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20271  *
20272  * Copyright remains Eric Young's, and as such any Copyright notices in
20273  * the code are not to be removed.
20274  * If this package is used in a product, Eric Young should be given attribution
20275  * as the author of the parts of the library used.
20276  * This can be in the form of a textual message at program startup or
20277  * in documentation (online or textual) provided with the package.
20278  *
20279  * Redistribution and use in source and binary forms, with or without
20280  * modification, are permitted provided that the following conditions
20281  * are met:
20282  * 1. Redistributions of source code must retain the copyright
20283  *    notice, this list of conditions and the following disclaimer.
20284  * 2. Redistributions in binary form must reproduce the above copyright
20285  *    notice, this list of conditions and the following disclaimer in the
20286  *    documentation and/or other materials provided with the distribution.
20287  * 3. All advertising materials mentioning features or use of this software
20288  *    must display the following acknowledgement:
20289  *    "This product includes cryptographic software written by
20290  *     Eric Young (eay@cryptsoft.com)"
20291  *    The word 'cryptographic' can be left out if the rouines from the library
20292  *    being used are not cryptographic related :-).
20293  * 4. If you include any Windows specific code (or a derivative thereof) from
20294  *    the apps directory (application code) you must include an acknowledgement:
20295  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20296  *
20297  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20298  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20299  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20300  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20301  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20302  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20303  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20304  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20305  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20306  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20307  * SUCH DAMAGE.
20308  *
20309  * The licence and distribution terms for any publically available version or
20310  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20311  * copied and put under another distribution licence
20312  * [including the GNU Public Licence.]
20313  */
20314 # 73 "/usr/include/openssl/lhash.h" 2 3 4
20315 
20316 
20317 
20318 
20319 
20320 
20321 typedef struct lhash_node_st {
20322     void *data;
20323     struct lhash_node_st *next;
20324 
20325     unsigned long hash;
20326 
20327 } LHASH_NODE;
20328 
20329 typedef int (*LHASH_COMP_FN_TYPE) (const void *, const void *);
20330 typedef unsigned long (*LHASH_HASH_FN_TYPE) (const void *);
20331 typedef void (*LHASH_DOALL_FN_TYPE) (void *);
20332 typedef void (*LHASH_DOALL_ARG_FN_TYPE) (void *, void *);
20333 
20334 /*
20335  * Macros for declaring and implementing type-safe wrappers for LHASH
20336  * callbacks. This way, callbacks can be provided to LHASH structures without
20337  * function pointer casting and the macro-defined callbacks provide
20338  * per-variable casting before deferring to the underlying type-specific
20339  * callbacks. NB: It is possible to place a "static" in front of both the
20340  * DECLARE and IMPLEMENT macros if the functions are strictly internal.
20341  */
20342 
20343 /* First: "hash" functions */
20344 # 110 "/usr/include/openssl/lhash.h" 3 4
20345 /* Second: "compare" functions */
20346 # 120 "/usr/include/openssl/lhash.h" 3 4
20347 /* Third: "doall" functions */
20348 # 129 "/usr/include/openssl/lhash.h" 3 4
20349 /* Fourth: "doall_arg" functions */
20350 # 139 "/usr/include/openssl/lhash.h" 3 4
20351 typedef struct lhash_st {
20352     LHASH_NODE **b;
20353     LHASH_COMP_FN_TYPE comp;
20354     LHASH_HASH_FN_TYPE hash;
20355     unsigned int num_nodes;
20356     unsigned int num_alloc_nodes;
20357     unsigned int p;
20358     unsigned int pmax;
20359     unsigned long up_load; /* load times 256 */
20360     unsigned long down_load; /* load times 256 */
20361     unsigned long num_items;
20362     unsigned long num_expands;
20363     unsigned long num_expand_reallocs;
20364     unsigned long num_contracts;
20365     unsigned long num_contract_reallocs;
20366     unsigned long num_hash_calls;
20367     unsigned long num_comp_calls;
20368     unsigned long num_insert;
20369     unsigned long num_replace;
20370     unsigned long num_delete;
20371     unsigned long num_no_delete;
20372     unsigned long num_retrieve;
20373     unsigned long num_retrieve_miss;
20374     unsigned long num_hash_comps;
20375     int error;
20376 } _LHASH; /* Do not use _LHASH directly, use LHASH_OF
20377                                  * and friends */
20378 
20379 
20380 
20381 /*
20382  * Indicates a malloc() error in the last call, this is only bad in
20383  * lh_insert().
20384  */
20385 
20386 
20387 _LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c);
20388 void lh_free(_LHASH *lh);
20389 void *lh_insert(_LHASH *lh, void *data);
20390 void *lh_delete(_LHASH *lh, const void *data);
20391 void *lh_retrieve(_LHASH *lh, const void *data);
20392 void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func);
20393 void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg);
20394 unsigned long lh_strhash(const char *c);
20395 unsigned long lh_num_items(const _LHASH *lh);
20396 
20397 
20398 void lh_stats(const _LHASH *lh, FILE *out);
20399 void lh_node_stats(const _LHASH *lh, FILE *out);
20400 void lh_node_usage_stats(const _LHASH *lh, FILE *out);
20401 
20402 
20403 
20404 void lh_stats_bio(const _LHASH *lh, BIO *out);
20405 void lh_node_stats_bio(const _LHASH *lh, BIO *out);
20406 void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
20407 
20408 
20409 /* Type checking... */
20410 # 206 "/usr/include/openssl/lhash.h" 3 4
20411 /* Define wrapper functions. */
20412 # 233 "/usr/include/openssl/lhash.h" 3 4
20413 struct lhash_st_OPENSSL_STRING { int dummy; };
20414 struct lhash_st_OPENSSL_CSTRING { int dummy; };
20415 # 73 "/usr/include/openssl/x509_vfy.h" 2 3 4
20416 
20417 # 1 "/usr/include/openssl/bio.h" 1 3 4
20418 /* crypto/bio/bio.h */
20419 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20420  * All rights reserved.
20421  *
20422  * This package is an SSL implementation written
20423  * by Eric Young (eay@cryptsoft.com).
20424  * The implementation was written so as to conform with Netscapes SSL.
20425  *
20426  * This library is free for commercial and non-commercial use as long as
20427  * the following conditions are aheared to.  The following conditions
20428  * apply to all code found in this distribution, be it the RC4, RSA,
20429  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20430  * included with this distribution is covered by the same copyright terms
20431  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20432  *
20433  * Copyright remains Eric Young's, and as such any Copyright notices in
20434  * the code are not to be removed.
20435  * If this package is used in a product, Eric Young should be given attribution
20436  * as the author of the parts of the library used.
20437  * This can be in the form of a textual message at program startup or
20438  * in documentation (online or textual) provided with the package.
20439  *
20440  * Redistribution and use in source and binary forms, with or without
20441  * modification, are permitted provided that the following conditions
20442  * are met:
20443  * 1. Redistributions of source code must retain the copyright
20444  *    notice, this list of conditions and the following disclaimer.
20445  * 2. Redistributions in binary form must reproduce the above copyright
20446  *    notice, this list of conditions and the following disclaimer in the
20447  *    documentation and/or other materials provided with the distribution.
20448  * 3. All advertising materials mentioning features or use of this software
20449  *    must display the following acknowledgement:
20450  *    "This product includes cryptographic software written by
20451  *     Eric Young (eay@cryptsoft.com)"
20452  *    The word 'cryptographic' can be left out if the rouines from the library
20453  *    being used are not cryptographic related :-).
20454  * 4. If you include any Windows specific code (or a derivative thereof) from
20455  *    the apps directory (application code) you must include an acknowledgement:
20456  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20457  *
20458  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20459  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20460  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20461  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20462  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20463  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20464  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20465  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20466  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20467  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20468  * SUCH DAMAGE.
20469  *
20470  * The licence and distribution terms for any publically available version or
20471  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20472  * copied and put under another distribution licence
20473  * [including the GNU Public Licence.]
20474  */
20475 # 75 "/usr/include/openssl/x509_vfy.h" 2 3 4
20476 # 1 "/usr/include/openssl/crypto.h" 1 3 4
20477 /* crypto/crypto.h */
20478 /* ====================================================================
20479  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
20480  *
20481  * Redistribution and use in source and binary forms, with or without
20482  * modification, are permitted provided that the following conditions
20483  * are met:
20484  *
20485  * 1. Redistributions of source code must retain the above copyright
20486  *    notice, this list of conditions and the following disclaimer.
20487  *
20488  * 2. Redistributions in binary form must reproduce the above copyright
20489  *    notice, this list of conditions and the following disclaimer in
20490  *    the documentation and/or other materials provided with the
20491  *    distribution.
20492  *
20493  * 3. All advertising materials mentioning features or use of this
20494  *    software must display the following acknowledgment:
20495  *    "This product includes software developed by the OpenSSL Project
20496  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20497  *
20498  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20499  *    endorse or promote products derived from this software without
20500  *    prior written permission. For written permission, please contact
20501  *    openssl-core@openssl.org.
20502  *
20503  * 5. Products derived from this software may not be called "OpenSSL"
20504  *    nor may "OpenSSL" appear in their names without prior written
20505  *    permission of the OpenSSL Project.
20506  *
20507  * 6. Redistributions of any form whatsoever must retain the following
20508  *    acknowledgment:
20509  *    "This product includes software developed by the OpenSSL Project
20510  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20511  *
20512  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20513  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20514  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20515  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20516  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20517  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20518  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20519  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20520  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20521  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20522  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20523  * OF THE POSSIBILITY OF SUCH DAMAGE.
20524  * ====================================================================
20525  *
20526  * This product includes cryptographic software written by Eric Young
20527  * (eay@cryptsoft.com).  This product includes software written by Tim
20528  * Hudson (tjh@cryptsoft.com).
20529  *
20530  */
20531 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20532  * All rights reserved.
20533  *
20534  * This package is an SSL implementation written
20535  * by Eric Young (eay@cryptsoft.com).
20536  * The implementation was written so as to conform with Netscapes SSL.
20537  *
20538  * This library is free for commercial and non-commercial use as long as
20539  * the following conditions are aheared to.  The following conditions
20540  * apply to all code found in this distribution, be it the RC4, RSA,
20541  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20542  * included with this distribution is covered by the same copyright terms
20543  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20544  *
20545  * Copyright remains Eric Young's, and as such any Copyright notices in
20546  * the code are not to be removed.
20547  * If this package is used in a product, Eric Young should be given attribution
20548  * as the author of the parts of the library used.
20549  * This can be in the form of a textual message at program startup or
20550  * in documentation (online or textual) provided with the package.
20551  *
20552  * Redistribution and use in source and binary forms, with or without
20553  * modification, are permitted provided that the following conditions
20554  * are met:
20555  * 1. Redistributions of source code must retain the copyright
20556  *    notice, this list of conditions and the following disclaimer.
20557  * 2. Redistributions in binary form must reproduce the above copyright
20558  *    notice, this list of conditions and the following disclaimer in the
20559  *    documentation and/or other materials provided with the distribution.
20560  * 3. All advertising materials mentioning features or use of this software
20561  *    must display the following acknowledgement:
20562  *    "This product includes cryptographic software written by
20563  *     Eric Young (eay@cryptsoft.com)"
20564  *    The word 'cryptographic' can be left out if the rouines from the library
20565  *    being used are not cryptographic related :-).
20566  * 4. If you include any Windows specific code (or a derivative thereof) from
20567  *    the apps directory (application code) you must include an acknowledgement:
20568  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20569  *
20570  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20571  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20572  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20573  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20574  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20575  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20576  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20577  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20578  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20579  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20580  * SUCH DAMAGE.
20581  *
20582  * The licence and distribution terms for any publically available version or
20583  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20584  * copied and put under another distribution licence
20585  * [including the GNU Public Licence.]
20586  */
20587 /* ====================================================================
20588  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
20589  * ECDH support in OpenSSL originally developed by
20590  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
20591  */
20592 # 76 "/usr/include/openssl/x509_vfy.h" 2 3 4
20593 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
20594 /* ====================================================================
20595  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
20596  *
20597  * Redistribution and use in source and binary forms, with or without
20598  * modification, are permitted provided that the following conditions
20599  * are met:
20600  *
20601  * 1. Redistributions of source code must retain the above copyright
20602  *    notice, this list of conditions and the following disclaimer.
20603  *
20604  * 2. Redistributions in binary form must reproduce the above copyright
20605  *    notice, this list of conditions and the following disclaimer in
20606  *    the documentation and/or other materials provided with the
20607  *    distribution.
20608  *
20609  * 3. All advertising materials mentioning features or use of this
20610  *    software must display the following acknowledgment:
20611  *    "This product includes software developed by the OpenSSL Project
20612  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20613  *
20614  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20615  *    endorse or promote products derived from this software without
20616  *    prior written permission. For written permission, please contact
20617  *    openssl-core@openssl.org.
20618  *
20619  * 5. Products derived from this software may not be called "OpenSSL"
20620  *    nor may "OpenSSL" appear in their names without prior written
20621  *    permission of the OpenSSL Project.
20622  *
20623  * 6. Redistributions of any form whatsoever must retain the following
20624  *    acknowledgment:
20625  *    "This product includes software developed by the OpenSSL Project
20626  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20627  *
20628  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20629  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20630  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20631  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20632  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20633  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20634  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20635  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20636  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20637  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20638  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20639  * OF THE POSSIBILITY OF SUCH DAMAGE.
20640  * ====================================================================
20641  *
20642  * This product includes cryptographic software written by Eric Young
20643  * (eay@cryptsoft.com).  This product includes software written by Tim
20644  * Hudson (tjh@cryptsoft.com).
20645  *
20646  */
20647 # 77 "/usr/include/openssl/x509_vfy.h" 2 3 4
20648 # 92 "/usr/include/openssl/x509_vfy.h" 3 4
20649 typedef struct x509_file_st {
20650     int num_paths; /* number of paths to files or directories */
20651     int num_alloced;
20652     char **paths; /* the list of paths or directories */
20653     int *path_type;
20654 } X509_CERT_FILE_CTX;
20655 
20656 /*******************************/
20657 /*-
20658 SSL_CTX -> X509_STORE
20659                 -> X509_LOOKUP
20660                         ->X509_LOOKUP_METHOD
20661                 -> X509_LOOKUP
20662                         ->X509_LOOKUP_METHOD
20663 
20664 SSL     -> X509_STORE_CTX
20665                 ->X509_STORE
20666 
20667 The X509_STORE holds the tables etc for verification stuff.
20668 A X509_STORE_CTX is used while validating a single certificate.
20669 The X509_STORE has X509_LOOKUPs for looking up certs.
20670 The X509_STORE then calls a function to actually verify the
20671 certificate chain.
20672 */
20673 
20674 
20675 
20676 
20677 
20678 
20679 
20680 typedef struct x509_object_st {
20681     /* one of the above types */
20682     int type;
20683     union {
20684         char *ptr;
20685         X509 *x509;
20686         X509_CRL *crl;
20687         EVP_PKEY *pkey;
20688     } data;
20689 } X509_OBJECT;
20690 
20691 typedef struct x509_lookup_st X509_LOOKUP;
20692 
20693 struct stack_st_X509_LOOKUP { _STACK stack; };
20694 struct stack_st_X509_OBJECT { _STACK stack; };
20695 
20696 /* This is a static that defines the function interface */
20697 typedef struct x509_lookup_method_st {
20698     const char *name;
20699     int (*new_item) (X509_LOOKUP *ctx);
20700     void (*free) (X509_LOOKUP *ctx);
20701     int (*init) (X509_LOOKUP *ctx);
20702     int (*shutdown) (X509_LOOKUP *ctx);
20703     int (*ctrl) (X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
20704                  char **ret);
20705     int (*get_by_subject) (X509_LOOKUP *ctx, int type, X509_NAME *name,
20706                            X509_OBJECT *ret);
20707     int (*get_by_issuer_serial) (X509_LOOKUP *ctx, int type, X509_NAME *name,
20708                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
20709     int (*get_by_fingerprint) (X509_LOOKUP *ctx, int type,
20710                                unsigned char *bytes, int len,
20711                                X509_OBJECT *ret);
20712     int (*get_by_alias) (X509_LOOKUP *ctx, int type, char *str, int len,
20713                          X509_OBJECT *ret);
20714 } X509_LOOKUP_METHOD;
20715 
20716 typedef struct X509_VERIFY_PARAM_ID_st X509_VERIFY_PARAM_ID;
20717 
20718 /*
20719  * This structure hold all parameters associated with a verify operation by
20720  * including an X509_VERIFY_PARAM structure in related structures the
20721  * parameters used can be customized
20722  */
20723 
20724 typedef struct X509_VERIFY_PARAM_st {
20725     char *name;
20726     time_t check_time; /* Time to use */
20727     unsigned long inh_flags; /* Inheritance flags */
20728     unsigned long flags; /* Various verify flags */
20729     int purpose; /* purpose to check untrusted certificates */
20730     int trust; /* trust setting to check */
20731     int depth; /* Verify depth */
20732     struct stack_st_ASN1_OBJECT *policies; /* Permissible policies */
20733     X509_VERIFY_PARAM_ID *id; /* opaque ID data */
20734 } X509_VERIFY_PARAM;
20735 
20736 struct stack_st_X509_VERIFY_PARAM { _STACK stack; };
20737 
20738 /*
20739  * This is used to hold everything.  It is used for all certificate
20740  * validation.  Once we have a certificate chain, the 'verify' function is
20741  * then called to actually check the cert chain.
20742  */
20743 struct x509_store_st {
20744     /* The following is a cache of trusted certs */
20745     int cache; /* if true, stash any hits */
20746     struct stack_st_X509_OBJECT *objs; /* Cache of all objects */
20747     /* These are external lookup methods */
20748     struct stack_st_X509_LOOKUP *get_cert_methods;
20749     X509_VERIFY_PARAM *param;
20750     /* Callbacks for various operations */
20751     /* called to verify a certificate */
20752     int (*verify) (X509_STORE_CTX *ctx);
20753     /* error callback */
20754     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
20755     /* get issuers cert from ctx */
20756     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
20757     /* check issued */
20758     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
20759     /* Check revocation status of chain */
20760     int (*check_revocation) (X509_STORE_CTX *ctx);
20761     /* retrieve CRL */
20762     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
20763     /* Check CRL validity */
20764     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
20765     /* Check certificate against CRL */
20766     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
20767     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
20768     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
20769     int (*cleanup) (X509_STORE_CTX *ctx);
20770     CRYPTO_EX_DATA ex_data;
20771     int references;
20772 } /* X509_STORE */ ;
20773 
20774 int X509_STORE_set_depth(X509_STORE *store, int depth);
20775 
20776 
20777 
20778 
20779 /* This is the functions plus an instance of the local variables. */
20780 struct x509_lookup_st {
20781     int init; /* have we been started */
20782     int skip; /* don't use us. */
20783     X509_LOOKUP_METHOD *method; /* the functions */
20784     char *method_data; /* method data */
20785     X509_STORE *store_ctx; /* who owns us */
20786 } /* X509_LOOKUP */ ;
20787 
20788 /*
20789  * This is a used when verifying cert chains.  Since the gathering of the
20790  * cert chain can take some time (and have to be 'retried', this needs to be
20791  * kept and passed around.
20792  */
20793 struct x509_store_ctx_st { /* X509_STORE_CTX */
20794     X509_STORE *ctx;
20795     /* used when looking up certs */
20796     int current_method;
20797     /* The following are set by the caller */
20798     /* The cert to check */
20799     X509 *cert;
20800     /* chain of X509s - untrusted - passed in */
20801     struct stack_st_X509 *untrusted;
20802     /* set of CRLs passed in */
20803     struct stack_st_X509_CRL *crls;
20804     X509_VERIFY_PARAM *param;
20805     /* Other info for use with get_issuer() */
20806     void *other_ctx;
20807     /* Callbacks for various operations */
20808     /* called to verify a certificate */
20809     int (*verify) (X509_STORE_CTX *ctx);
20810     /* error callback */
20811     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
20812     /* get issuers cert from ctx */
20813     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
20814     /* check issued */
20815     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
20816     /* Check revocation status of chain */
20817     int (*check_revocation) (X509_STORE_CTX *ctx);
20818     /* retrieve CRL */
20819     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
20820     /* Check CRL validity */
20821     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
20822     /* Check certificate against CRL */
20823     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
20824     int (*check_policy) (X509_STORE_CTX *ctx);
20825     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
20826     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
20827     int (*cleanup) (X509_STORE_CTX *ctx);
20828     /* The following is built up */
20829     /* if 0, rebuild chain */
20830     int valid;
20831     /* index of last untrusted cert */
20832     int last_untrusted;
20833     /* chain of X509s - built up and trusted */
20834     struct stack_st_X509 *chain;
20835     /* Valid policy tree */
20836     X509_POLICY_TREE *tree;
20837     /* Require explicit policy value */
20838     int explicit_policy;
20839     /* When something goes wrong, this is why */
20840     int error_depth;
20841     int error;
20842     X509 *current_cert;
20843     /* cert currently being tested as valid issuer */
20844     X509 *current_issuer;
20845     /* current CRL */
20846     X509_CRL *current_crl;
20847     /* score of current CRL */
20848     int current_crl_score;
20849     /* Reason mask */
20850     unsigned int current_reasons;
20851     /* For CRL path validation: parent context */
20852     X509_STORE_CTX *parent;
20853     CRYPTO_EX_DATA ex_data;
20854 } /* X509_STORE_CTX */ ;
20855 
20856 void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
20857 # 345 "/usr/include/openssl/x509_vfy.h" 3 4
20858 /* These are 'informational' when looking for issuer cert */
20859 # 377 "/usr/include/openssl/x509_vfy.h" 3 4
20860 /* Suite B mode algorithm violation */
20861 
20862 
20863 
20864 
20865 
20866 
20867 
20868 /* Host, email and IP check errors */
20869 
20870 
20871 
20872 
20873 /* Caller error */
20874 
20875 /* Issuer lookup error */
20876 
20877 
20878 
20879 
20880 /* Certificate verify flags */
20881 
20882 /* Send issuer+subject checks to verify_cb */
20883 
20884 /* Use check time instead of current time */
20885 
20886 /* Lookup CRLs */
20887 
20888 /* Lookup CRLs for whole chain */
20889 
20890 /* Ignore unhandled critical extensions */
20891 
20892 /* Disable workarounds for broken certificates */
20893 
20894 /* Enable proxy certificate validation */
20895 
20896 /* Enable policy checking */
20897 
20898 /* Policy variable require-explicit-policy */
20899 
20900 /* Policy variable inhibit-any-policy */
20901 
20902 /* Policy variable inhibit-policy-mapping */
20903 
20904 /* Notify callback that policy is OK */
20905 
20906 /* Extended CRL features such as indirect CRLs, alternate CRL signing keys */
20907 
20908 /* Delta CRL support */
20909 
20910 /* Check selfsigned CA signature */
20911 
20912 /* Use trusted store first */
20913 
20914 /* Suite B 128 bit only mode: not normally used */
20915 
20916 /* Suite B 192 bit only mode */
20917 
20918 /* Suite B 128 bit mode allowing 192 bit algorithms */
20919 
20920 
20921 /* Allow partial chains if at least one certificate is in trusted store */
20922 
20923 /*
20924  * If the initial chain is not trusted, do not attempt to build an alternative
20925  * chain. Alternate chain checking was introduced in 1.0.2b. Setting this flag
20926  * will force the behaviour to match that of previous versions.
20927  */
20928 # 453 "/usr/include/openssl/x509_vfy.h" 3 4
20929 /* Internal use: mask of policy related options */
20930 
20931 
20932 
20933 
20934 
20935 int X509_OBJECT_idx_by_subject(struct stack_st_X509_OBJECT *h, int type,
20936                                X509_NAME *name);
20937 X509_OBJECT *X509_OBJECT_retrieve_by_subject(struct stack_st_X509_OBJECT *h,
20938                                              int type, X509_NAME *name);
20939 X509_OBJECT *X509_OBJECT_retrieve_match(struct stack_st_X509_OBJECT *h,
20940                                         X509_OBJECT *x);
20941 void X509_OBJECT_up_ref_count(X509_OBJECT *a);
20942 void X509_OBJECT_free_contents(X509_OBJECT *a);
20943 X509_STORE *X509_STORE_new(void);
20944 void X509_STORE_free(X509_STORE *v);
20945 
20946 struct stack_st_X509 *X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm);
20947 struct stack_st_X509_CRL *X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm);
20948 int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);
20949 int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
20950 int X509_STORE_set_trust(X509_STORE *ctx, int trust);
20951 int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);
20952 
20953 void X509_STORE_set_verify_cb(X509_STORE *ctx,
20954                               int (*verify_cb) (int, X509_STORE_CTX *));
20955 
20956 void X509_STORE_set_lookup_crls_cb(X509_STORE *ctx,
20957                                    struct stack_st_X509_CRL *(*cb) (X509_STORE_CTX
20958                                                               *ctx,
20959                                                               X509_NAME *nm));
20960 
20961 X509_STORE_CTX *X509_STORE_CTX_new(void);
20962 
20963 int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
20964 
20965 void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
20966 int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
20967                         X509 *x509, struct stack_st_X509 *chain);
20968 void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, struct stack_st_X509 *sk);
20969 void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
20970 
20971 X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx);
20972 
20973 X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);
20974 
20975 X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);
20976 X509_LOOKUP_METHOD *X509_LOOKUP_file(void);
20977 
20978 int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
20979 int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
20980 
20981 int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name,
20982                               X509_OBJECT *ret);
20983 
20984 int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
20985                      long argl, char **ret);
20986 
20987 
20988 int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
20989 int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
20990 int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
20991 
20992 
20993 X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
20994 void X509_LOOKUP_free(X509_LOOKUP *ctx);
20995 int X509_LOOKUP_init(X509_LOOKUP *ctx);
20996 int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name,
20997                            X509_OBJECT *ret);
20998 int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name,
20999                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
21000 int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type,
21001                                unsigned char *bytes, int len,
21002                                X509_OBJECT *ret);
21003 int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len,
21004                          X509_OBJECT *ret);
21005 int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
21006 
21007 
21008 int X509_STORE_load_locations(X509_STORE *ctx,
21009                               const char *file, const char *dir);
21010 int X509_STORE_set_default_paths(X509_STORE *ctx);
21011 
21012 
21013 int X509_STORE_CTX_get_ex_new_index(long argl, void *argp,
21014                                     CRYPTO_EX_new *new_func,
21015                                     CRYPTO_EX_dup *dup_func,
21016                                     CRYPTO_EX_free *free_func);
21017 int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data);
21018 void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx);
21019 int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
21020 void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);
21021 int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
21022 X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
21023 X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);
21024 X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);
21025 X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);
21026 struct stack_st_X509 *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
21027 struct stack_st_X509 *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);
21028 void X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x);
21029 void X509_STORE_CTX_set_chain(X509_STORE_CTX *c, struct stack_st_X509 *sk);
21030 void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, struct stack_st_X509_CRL *sk);
21031 int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
21032 int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
21033 int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
21034                                    int purpose, int trust);
21035 void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
21036 void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
21037                              time_t t);
21038 void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
21039                                   int (*verify_cb) (int, X509_STORE_CTX *));
21040 
21041 X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);
21042 int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);
21043 
21044 X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
21045 void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
21046 int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
21047 
21048 /* X509_VERIFY_PARAM functions */
21049 
21050 X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);
21051 void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);
21052 int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,
21053                               const X509_VERIFY_PARAM *from);
21054 int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,
21055                            const X509_VERIFY_PARAM *from);
21056 int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);
21057 int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,
21058                                 unsigned long flags);
21059 int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
21060                                   unsigned long flags);
21061 unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);
21062 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
21063 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
21064 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
21065 void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);
21066 int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,
21067                                   ASN1_OBJECT *policy);
21068 int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param,
21069                                     struct stack_st_ASN1_OBJECT *policies);
21070 
21071 int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param,
21072                                 const char *name, size_t namelen);
21073 int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param,
21074                                 const char *name, size_t namelen);
21075 void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
21076                                      unsigned int flags);
21077 char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *);
21078 int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
21079                                  const char *email, size_t emaillen);
21080 int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
21081                               const unsigned char *ip, size_t iplen);
21082 int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param,
21083                                   const char *ipasc);
21084 
21085 int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
21086 const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param);
21087 
21088 int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
21089 int X509_VERIFY_PARAM_get_count(void);
21090 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id);
21091 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
21092 void X509_VERIFY_PARAM_table_cleanup(void);
21093 
21094 int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
21095                       struct stack_st_X509 *certs,
21096                       struct stack_st_ASN1_OBJECT *policy_oids, unsigned int flags);
21097 
21098 void X509_policy_tree_free(X509_POLICY_TREE *tree);
21099 
21100 int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
21101 X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree,
21102                                                int i);
21103 
21104 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_policies(const
21105                                                            X509_POLICY_TREE
21106                                                            *tree);
21107 
21108 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_user_policies(const
21109                                                                 X509_POLICY_TREE
21110                                                                 *tree);
21111 
21112 int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
21113 
21114 X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level,
21115                                               int i);
21116 
21117 const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
21118 
21119 struct stack_st_POLICYQUALINFO *X509_policy_node_get0_qualifiers(const
21120                                                            X509_POLICY_NODE
21121                                                            *node);
21122 const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE
21123                                                      *node);
21124 # 582 "/usr/include/openssl/x509.h" 2 3 4
21125 # 1 "/usr/include/openssl/pkcs7.h" 1 3 4
21126 /* crypto/pkcs7/pkcs7.h */
21127 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21128  * All rights reserved.
21129  *
21130  * This package is an SSL implementation written
21131  * by Eric Young (eay@cryptsoft.com).
21132  * The implementation was written so as to conform with Netscapes SSL.
21133  *
21134  * This library is free for commercial and non-commercial use as long as
21135  * the following conditions are aheared to.  The following conditions
21136  * apply to all code found in this distribution, be it the RC4, RSA,
21137  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21138  * included with this distribution is covered by the same copyright terms
21139  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21140  *
21141  * Copyright remains Eric Young's, and as such any Copyright notices in
21142  * the code are not to be removed.
21143  * If this package is used in a product, Eric Young should be given attribution
21144  * as the author of the parts of the library used.
21145  * This can be in the form of a textual message at program startup or
21146  * in documentation (online or textual) provided with the package.
21147  *
21148  * Redistribution and use in source and binary forms, with or without
21149  * modification, are permitted provided that the following conditions
21150  * are met:
21151  * 1. Redistributions of source code must retain the copyright
21152  *    notice, this list of conditions and the following disclaimer.
21153  * 2. Redistributions in binary form must reproduce the above copyright
21154  *    notice, this list of conditions and the following disclaimer in the
21155  *    documentation and/or other materials provided with the distribution.
21156  * 3. All advertising materials mentioning features or use of this software
21157  *    must display the following acknowledgement:
21158  *    "This product includes cryptographic software written by
21159  *     Eric Young (eay@cryptsoft.com)"
21160  *    The word 'cryptographic' can be left out if the rouines from the library
21161  *    being used are not cryptographic related :-).
21162  * 4. If you include any Windows specific code (or a derivative thereof) from
21163  *    the apps directory (application code) you must include an acknowledgement:
21164  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21165  *
21166  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21167  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21168  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21169  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21170  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21171  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21172  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21173  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21174  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21175  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21176  * SUCH DAMAGE.
21177  *
21178  * The licence and distribution terms for any publically available version or
21179  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21180  * copied and put under another distribution licence
21181  * [including the GNU Public Licence.]
21182  */
21183 
21184 
21185 
21186 
21187 # 1 "/usr/include/openssl/asn1.h" 1 3 4
21188 /* crypto/asn1/asn1.h */
21189 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21190  * All rights reserved.
21191  *
21192  * This package is an SSL implementation written
21193  * by Eric Young (eay@cryptsoft.com).
21194  * The implementation was written so as to conform with Netscapes SSL.
21195  *
21196  * This library is free for commercial and non-commercial use as long as
21197  * the following conditions are aheared to.  The following conditions
21198  * apply to all code found in this distribution, be it the RC4, RSA,
21199  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21200  * included with this distribution is covered by the same copyright terms
21201  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21202  *
21203  * Copyright remains Eric Young's, and as such any Copyright notices in
21204  * the code are not to be removed.
21205  * If this package is used in a product, Eric Young should be given attribution
21206  * as the author of the parts of the library used.
21207  * This can be in the form of a textual message at program startup or
21208  * in documentation (online or textual) provided with the package.
21209  *
21210  * Redistribution and use in source and binary forms, with or without
21211  * modification, are permitted provided that the following conditions
21212  * are met:
21213  * 1. Redistributions of source code must retain the copyright
21214  *    notice, this list of conditions and the following disclaimer.
21215  * 2. Redistributions in binary form must reproduce the above copyright
21216  *    notice, this list of conditions and the following disclaimer in the
21217  *    documentation and/or other materials provided with the distribution.
21218  * 3. All advertising materials mentioning features or use of this software
21219  *    must display the following acknowledgement:
21220  *    "This product includes cryptographic software written by
21221  *     Eric Young (eay@cryptsoft.com)"
21222  *    The word 'cryptographic' can be left out if the rouines from the library
21223  *    being used are not cryptographic related :-).
21224  * 4. If you include any Windows specific code (or a derivative thereof) from
21225  *    the apps directory (application code) you must include an acknowledgement:
21226  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21227  *
21228  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21229  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21230  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21231  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21232  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21233  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21234  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21235  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21236  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21237  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21238  * SUCH DAMAGE.
21239  *
21240  * The licence and distribution terms for any publically available version or
21241  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21242  * copied and put under another distribution licence
21243  * [including the GNU Public Licence.]
21244  */
21245 # 63 "/usr/include/openssl/pkcs7.h" 2 3 4
21246 # 1 "/usr/include/openssl/bio.h" 1 3 4
21247 /* crypto/bio/bio.h */
21248 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
21249  * All rights reserved.
21250  *
21251  * This package is an SSL implementation written
21252  * by Eric Young (eay@cryptsoft.com).
21253  * The implementation was written so as to conform with Netscapes SSL.
21254  *
21255  * This library is free for commercial and non-commercial use as long as
21256  * the following conditions are aheared to.  The following conditions
21257  * apply to all code found in this distribution, be it the RC4, RSA,
21258  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
21259  * included with this distribution is covered by the same copyright terms
21260  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
21261  *
21262  * Copyright remains Eric Young's, and as such any Copyright notices in
21263  * the code are not to be removed.
21264  * If this package is used in a product, Eric Young should be given attribution
21265  * as the author of the parts of the library used.
21266  * This can be in the form of a textual message at program startup or
21267  * in documentation (online or textual) provided with the package.
21268  *
21269  * Redistribution and use in source and binary forms, with or without
21270  * modification, are permitted provided that the following conditions
21271  * are met:
21272  * 1. Redistributions of source code must retain the copyright
21273  *    notice, this list of conditions and the following disclaimer.
21274  * 2. Redistributions in binary form must reproduce the above copyright
21275  *    notice, this list of conditions and the following disclaimer in the
21276  *    documentation and/or other materials provided with the distribution.
21277  * 3. All advertising materials mentioning features or use of this software
21278  *    must display the following acknowledgement:
21279  *    "This product includes cryptographic software written by
21280  *     Eric Young (eay@cryptsoft.com)"
21281  *    The word 'cryptographic' can be left out if the rouines from the library
21282  *    being used are not cryptographic related :-).
21283  * 4. If you include any Windows specific code (or a derivative thereof) from
21284  *    the apps directory (application code) you must include an acknowledgement:
21285  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21286  *
21287  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21288  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21289  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21290  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21291  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21292  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21293  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21294  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21295  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21296  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21297  * SUCH DAMAGE.
21298  *
21299  * The licence and distribution terms for any publically available version or
21300  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21301  * copied and put under another distribution licence
21302  * [including the GNU Public Licence.]
21303  */
21304 # 64 "/usr/include/openssl/pkcs7.h" 2 3 4
21305 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
21306 /* e_os2.h */
21307 /* ====================================================================
21308  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
21309  *
21310  * Redistribution and use in source and binary forms, with or without
21311  * modification, are permitted provided that the following conditions
21312  * are met:
21313  *
21314  * 1. Redistributions of source code must retain the above copyright
21315  *    notice, this list of conditions and the following disclaimer.
21316  *
21317  * 2. Redistributions in binary form must reproduce the above copyright
21318  *    notice, this list of conditions and the following disclaimer in
21319  *    the documentation and/or other materials provided with the
21320  *    distribution.
21321  *
21322  * 3. All advertising materials mentioning features or use of this
21323  *    software must display the following acknowledgment:
21324  *    "This product includes software developed by the OpenSSL Project
21325  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21326  *
21327  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21328  *    endorse or promote products derived from this software without
21329  *    prior written permission. For written permission, please contact
21330  *    openssl-core@openssl.org.
21331  *
21332  * 5. Products derived from this software may not be called "OpenSSL"
21333  *    nor may "OpenSSL" appear in their names without prior written
21334  *    permission of the OpenSSL Project.
21335  *
21336  * 6. Redistributions of any form whatsoever must retain the following
21337  *    acknowledgment:
21338  *    "This product includes software developed by the OpenSSL Project
21339  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21340  *
21341  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21342  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21343  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21344  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21345  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21346  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21347  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21348  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21349  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21350  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21351  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21352  * OF THE POSSIBILITY OF SUCH DAMAGE.
21353  * ====================================================================
21354  *
21355  * This product includes cryptographic software written by Eric Young
21356  * (eay@cryptsoft.com).  This product includes software written by Tim
21357  * Hudson (tjh@cryptsoft.com).
21358  *
21359  */
21360 
21361 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
21362 /* opensslconf.h */
21363 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
21364 
21365 
21366 
21367 
21368 /* OpenSSL was configured with the following options: */
21369 # 108 "/usr/include/openssl/opensslconf.h" 3 4
21370 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
21371    asks for it.  This is a transient feature that is provided for those
21372    who haven't had the time to do the appropriate changes in their
21373    applications.  */
21374 # 204 "/usr/include/openssl/opensslconf.h" 3 4
21375 /* crypto/opensslconf.h.in */
21376 
21377 /* Generate 80386 code? */
21378 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
21379 # 65 "/usr/include/openssl/pkcs7.h" 2 3 4
21380 
21381 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
21382 /* ====================================================================
21383  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
21384  *
21385  * Redistribution and use in source and binary forms, with or without
21386  * modification, are permitted provided that the following conditions
21387  * are met:
21388  *
21389  * 1. Redistributions of source code must retain the above copyright
21390  *    notice, this list of conditions and the following disclaimer.
21391  *
21392  * 2. Redistributions in binary form must reproduce the above copyright
21393  *    notice, this list of conditions and the following disclaimer in
21394  *    the documentation and/or other materials provided with the
21395  *    distribution.
21396  *
21397  * 3. All advertising materials mentioning features or use of this
21398  *    software must display the following acknowledgment:
21399  *    "This product includes software developed by the OpenSSL Project
21400  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21401  *
21402  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21403  *    endorse or promote products derived from this software without
21404  *    prior written permission. For written permission, please contact
21405  *    openssl-core@openssl.org.
21406  *
21407  * 5. Products derived from this software may not be called "OpenSSL"
21408  *    nor may "OpenSSL" appear in their names without prior written
21409  *    permission of the OpenSSL Project.
21410  *
21411  * 6. Redistributions of any form whatsoever must retain the following
21412  *    acknowledgment:
21413  *    "This product includes software developed by the OpenSSL Project
21414  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21415  *
21416  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21417  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21418  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21419  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21420  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21421  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21422  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21423  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21424  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21425  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21426  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21427  * OF THE POSSIBILITY OF SUCH DAMAGE.
21428  * ====================================================================
21429  *
21430  * This product includes cryptographic software written by Eric Young
21431  * (eay@cryptsoft.com).  This product includes software written by Tim
21432  * Hudson (tjh@cryptsoft.com).
21433  *
21434  */
21435 # 67 "/usr/include/openssl/pkcs7.h" 2 3 4
21436 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
21437 /* ====================================================================
21438  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
21439  *
21440  * Redistribution and use in source and binary forms, with or without
21441  * modification, are permitted provided that the following conditions
21442  * are met:
21443  *
21444  * 1. Redistributions of source code must retain the above copyright
21445  *    notice, this list of conditions and the following disclaimer.
21446  *
21447  * 2. Redistributions in binary form must reproduce the above copyright
21448  *    notice, this list of conditions and the following disclaimer in
21449  *    the documentation and/or other materials provided with the
21450  *    distribution.
21451  *
21452  * 3. All advertising materials mentioning features or use of this
21453  *    software must display the following acknowledgment:
21454  *    "This product includes software developed by the OpenSSL Project
21455  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21456  *
21457  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21458  *    endorse or promote products derived from this software without
21459  *    prior written permission. For written permission, please contact
21460  *    openssl-core@openssl.org.
21461  *
21462  * 5. Products derived from this software may not be called "OpenSSL"
21463  *    nor may "OpenSSL" appear in their names without prior written
21464  *    permission of the OpenSSL Project.
21465  *
21466  * 6. Redistributions of any form whatsoever must retain the following
21467  *    acknowledgment:
21468  *    "This product includes software developed by the OpenSSL Project
21469  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21470  *
21471  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21472  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21473  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21474  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21475  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21476  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21477  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21478  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21479  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21480  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21481  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21482  * OF THE POSSIBILITY OF SUCH DAMAGE.
21483  * ====================================================================
21484  *
21485  * This product includes cryptographic software written by Eric Young
21486  * (eay@cryptsoft.com).  This product includes software written by Tim
21487  * Hudson (tjh@cryptsoft.com).
21488  *
21489  */
21490 # 68 "/usr/include/openssl/pkcs7.h" 2 3 4
21491 # 79 "/usr/include/openssl/pkcs7.h" 3 4
21492 /*-
21493 Encryption_ID           DES-CBC
21494 Digest_ID               MD5
21495 Digest_Encryption_ID    rsaEncryption
21496 Key_Encryption_ID       rsaEncryption
21497 */
21498 
21499 typedef struct pkcs7_issuer_and_serial_st {
21500     X509_NAME *issuer;
21501     ASN1_INTEGER *serial;
21502 } PKCS7_ISSUER_AND_SERIAL;
21503 
21504 typedef struct pkcs7_signer_info_st {
21505     ASN1_INTEGER *version; /* version 1 */
21506     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
21507     X509_ALGOR *digest_alg;
21508     struct stack_st_X509_ATTRIBUTE *auth_attr; /* [ 0 ] */
21509     X509_ALGOR *digest_enc_alg;
21510     ASN1_OCTET_STRING *enc_digest;
21511     struct stack_st_X509_ATTRIBUTE *unauth_attr; /* [ 1 ] */
21512     /* The private key to sign with */
21513     EVP_PKEY *pkey;
21514 } PKCS7_SIGNER_INFO;
21515 
21516 struct stack_st_PKCS7_SIGNER_INFO { _STACK stack; };
21517 
21518 
21519 typedef struct pkcs7_recip_info_st {
21520     ASN1_INTEGER *version; /* version 0 */
21521     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
21522     X509_ALGOR *key_enc_algor;
21523     ASN1_OCTET_STRING *enc_key;
21524     X509 *cert; /* get the pub-key from this */
21525 } PKCS7_RECIP_INFO;
21526 
21527 struct stack_st_PKCS7_RECIP_INFO { _STACK stack; };
21528 
21529 
21530 typedef struct pkcs7_signed_st {
21531     ASN1_INTEGER *version; /* version 1 */
21532     struct stack_st_X509_ALGOR *md_algs; /* md used */
21533     struct stack_st_X509 *cert; /* [ 0 ] */
21534     struct stack_st_X509_CRL *crl; /* [ 1 ] */
21535     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
21536     struct pkcs7_st *contents;
21537 } PKCS7_SIGNED;
21538 /*
21539  * The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about
21540  * merging the two
21541  */
21542 
21543 typedef struct pkcs7_enc_content_st {
21544     ASN1_OBJECT *content_type;
21545     X509_ALGOR *algorithm;
21546     ASN1_OCTET_STRING *enc_data; /* [ 0 ] */
21547     const EVP_CIPHER *cipher;
21548 } PKCS7_ENC_CONTENT;
21549 
21550 typedef struct pkcs7_enveloped_st {
21551     ASN1_INTEGER *version; /* version 0 */
21552     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
21553     PKCS7_ENC_CONTENT *enc_data;
21554 } PKCS7_ENVELOPE;
21555 
21556 typedef struct pkcs7_signedandenveloped_st {
21557     ASN1_INTEGER *version; /* version 1 */
21558     struct stack_st_X509_ALGOR *md_algs; /* md used */
21559     struct stack_st_X509 *cert; /* [ 0 ] */
21560     struct stack_st_X509_CRL *crl; /* [ 1 ] */
21561     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
21562     PKCS7_ENC_CONTENT *enc_data;
21563     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
21564 } PKCS7_SIGN_ENVELOPE;
21565 
21566 typedef struct pkcs7_digest_st {
21567     ASN1_INTEGER *version; /* version 0 */
21568     X509_ALGOR *md; /* md used */
21569     struct pkcs7_st *contents;
21570     ASN1_OCTET_STRING *digest;
21571 } PKCS7_DIGEST;
21572 
21573 typedef struct pkcs7_encrypted_st {
21574     ASN1_INTEGER *version; /* version 0 */
21575     PKCS7_ENC_CONTENT *enc_data;
21576 } PKCS7_ENCRYPT;
21577 
21578 typedef struct pkcs7_st {
21579     /*
21580      * The following is non NULL if it contains ASN1 encoding of this
21581      * structure
21582      */
21583     unsigned char *asn1;
21584     long length;
21585 
21586 
21587 
21588     int state; /* used during processing */
21589     int detached;
21590     ASN1_OBJECT *type;
21591     /* content as defined by the type */
21592     /*
21593      * all encryption/message digests are applied to the 'contents', leaving
21594      * out the 'type' field.
21595      */
21596     union {
21597         char *ptr;
21598         /* NID_pkcs7_data */
21599         ASN1_OCTET_STRING *data;
21600         /* NID_pkcs7_signed */
21601         PKCS7_SIGNED *sign;
21602         /* NID_pkcs7_enveloped */
21603         PKCS7_ENVELOPE *enveloped;
21604         /* NID_pkcs7_signedAndEnveloped */
21605         PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
21606         /* NID_pkcs7_digest */
21607         PKCS7_DIGEST *digest;
21608         /* NID_pkcs7_encrypted */
21609         PKCS7_ENCRYPT *encrypted;
21610         /* Anything else */
21611         ASN1_TYPE *other;
21612     } d;
21613 } PKCS7;
21614 
21615 struct stack_st_PKCS7 { _STACK stack; };
21616 
21617 
21618 # 227 "/usr/include/openssl/pkcs7.h" 3 4
21619 /* S/MIME related flags */
21620 # 246 "/usr/include/openssl/pkcs7.h" 3 4
21621 /* Flags: for compatibility with older code */
21622 # 258 "/usr/include/openssl/pkcs7.h" 3 4
21623 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;
21624 
21625 int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
21626                                    const EVP_MD *type, unsigned char *md,
21627                                    unsigned int *len);
21628 
21629 PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
21630 int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7);
21631 
21632 PKCS7 *PKCS7_dup(PKCS7 *p7);
21633 PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
21634 int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7);
21635 int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
21636 int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
21637 
21638 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;
21639 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;
21640 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;
21641 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;
21642 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;
21643 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;
21644 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;
21645 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;
21646 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;
21647 
21648 extern const ASN1_ITEM PKCS7_ATTR_SIGN_it;
21649 extern const ASN1_ITEM PKCS7_ATTR_VERIFY_it;
21650 
21651 int i2d_PKCS7_NDEF(PKCS7 *a, unsigned char **out);
21652 int PKCS7_print_ctx(BIO *out, PKCS7 *x, int indent, const ASN1_PCTX *pctx);
21653 
21654 long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
21655 
21656 int PKCS7_set_type(PKCS7 *p7, int type);
21657 int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
21658 int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
21659 int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
21660                           const EVP_MD *dgst);
21661 int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
21662 int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
21663 int PKCS7_add_certificate(PKCS7 *p7, X509 *x509);
21664 int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
21665 int PKCS7_content_new(PKCS7 *p7, int nid);
21666 int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
21667                      BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
21668 int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
21669                           X509 *x509);
21670 
21671 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
21672 int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
21673 BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
21674 
21675 PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
21676                                        EVP_PKEY *pkey, const EVP_MD *dgst);
21677 X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
21678 int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
21679 struct stack_st_PKCS7_SIGNER_INFO *PKCS7_get_signer_info(PKCS7 *p7);
21680 
21681 PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
21682 void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
21683                                  X509_ALGOR **pdig, X509_ALGOR **psig);
21684 void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
21685 int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
21686 int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
21687 int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
21688 int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
21689 
21690 PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
21691 ASN1_OCTET_STRING *PKCS7_digest_from_attributes(struct stack_st_X509_ATTRIBUTE *sk);
21692 int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,
21693                                void *data);
21694 int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
21695                         void *value);
21696 ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid);
21697 ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid);
21698 int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
21699                                 struct stack_st_X509_ATTRIBUTE *sk);
21700 int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
21701                          struct stack_st_X509_ATTRIBUTE *sk);
21702 
21703 PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, struct stack_st_X509 *certs,
21704                   BIO *data, int flags);
21705 
21706 PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
21707                                          X509 *signcert, EVP_PKEY *pkey,
21708                                          const EVP_MD *md, int flags);
21709 
21710 int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
21711 int PKCS7_verify(PKCS7 *p7, struct stack_st_X509 *certs, X509_STORE *store,
21712                  BIO *indata, BIO *out, int flags);
21713 struct stack_st_X509 *PKCS7_get0_signers(PKCS7 *p7, struct stack_st_X509 *certs,
21714                                    int flags);
21715 PKCS7 *PKCS7_encrypt(struct stack_st_X509 *certs, BIO *in, const EVP_CIPHER *cipher,
21716                      int flags);
21717 int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
21718                   int flags);
21719 
21720 int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
21721                               struct stack_st_X509_ALGOR *cap);
21722 struct stack_st_X509_ALGOR *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
21723 int PKCS7_simple_smimecap(struct stack_st_X509_ALGOR *sk, int nid, int arg);
21724 
21725 int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
21726 int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
21727 int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
21728                              const unsigned char *md, int mdlen);
21729 
21730 int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
21731 PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
21732 
21733 BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
21734 
21735 /* BEGIN ERROR CODES */
21736 /*
21737  * The following lines are auto generated by the script mkerr.pl. Any changes
21738  * made after this point may be overwritten when the script is next run.
21739  */
21740 void ERR_load_PKCS7_strings(void);
21741 
21742 /* Error codes for the PKCS7 functions. */
21743 
21744 /* Function codes. */
21745 # 421 "/usr/include/openssl/pkcs7.h" 3 4
21746 /* Reason codes. */
21747 # 583 "/usr/include/openssl/x509.h" 2 3 4
21748 # 592 "/usr/include/openssl/x509.h" 3 4
21749 /* #define      X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */
21750 # 608 "/usr/include/openssl/x509.h" 3 4
21751 void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
21752 X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
21753                                      int (*crl_free) (X509_CRL *crl),
21754                                      int (*crl_lookup) (X509_CRL *crl,
21755                                                         X509_REVOKED **ret,
21756                                                         ASN1_INTEGER *ser,
21757                                                         X509_NAME *issuer),
21758                                      int (*crl_verify) (X509_CRL *crl,
21759                                                         EVP_PKEY *pk));
21760 void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
21761 
21762 void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
21763 void *X509_CRL_get_meth_data(X509_CRL *crl);
21764 
21765 /*
21766  * This one is only used so that a binary form can output, as in
21767  * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf)
21768  */
21769 
21770 
21771 const char *X509_verify_cert_error_string(long n);
21772 
21773 
21774 int X509_verify(X509 *a, EVP_PKEY *r);
21775 
21776 int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
21777 int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);
21778 int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);
21779 
21780 NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len);
21781 char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
21782 EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
21783 int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
21784 
21785 int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
21786 
21787 int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
21788 int X509_signature_print(BIO *bp, X509_ALGOR *alg, ASN1_STRING *sig);
21789 
21790 int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
21791 int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
21792 int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert);
21793 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
21794 int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
21795 int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
21796 int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
21797 int X509_CRL_http_nbio(OCSP_REQ_CTX *rctx, X509_CRL **pcrl);
21798 int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
21799 
21800 int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
21801                        unsigned char *md, unsigned int *len);
21802 int X509_digest(const X509 *data, const EVP_MD *type,
21803                 unsigned char *md, unsigned int *len);
21804 int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,
21805                     unsigned char *md, unsigned int *len);
21806 int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
21807                     unsigned char *md, unsigned int *len);
21808 int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
21809                      unsigned char *md, unsigned int *len);
21810 
21811 
21812 
21813 X509 *d2i_X509_fp(FILE *fp, X509 **x509);
21814 int i2d_X509_fp(FILE *fp, X509 *x509);
21815 X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);
21816 int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl);
21817 X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);
21818 int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req);
21819 
21820 RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);
21821 int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa);
21822 RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);
21823 int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa);
21824 RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
21825 int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa);
21826 
21827 
21828 DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
21829 int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa);
21830 DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
21831 int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa);
21832 
21833 
21834 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
21835 int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
21836 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
21837 int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
21838 
21839 X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);
21840 int i2d_PKCS8_fp(FILE *fp, X509_SIG *p8);
21841 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
21842                                                 PKCS8_PRIV_KEY_INFO **p8inf);
21843 int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf);
21844 int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key);
21845 int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey);
21846 EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
21847 int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey);
21848 EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
21849 
21850 
21851 
21852 X509 *d2i_X509_bio(BIO *bp, X509 **x509);
21853 int i2d_X509_bio(BIO *bp, X509 *x509);
21854 X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
21855 int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl);
21856 X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);
21857 int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req);
21858 
21859 RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);
21860 int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa);
21861 RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
21862 int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa);
21863 RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
21864 int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa);
21865 
21866 
21867 DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
21868 int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa);
21869 DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
21870 int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);
21871 
21872 
21873 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
21874 int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);
21875 EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
21876 int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);
21877 
21878 X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);
21879 int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8);
21880 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
21881                                                  PKCS8_PRIV_KEY_INFO **p8inf);
21882 int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf);
21883 int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key);
21884 int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey);
21885 EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
21886 int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey);
21887 EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
21888 
21889 
21890 X509 *X509_dup(X509 *x509);
21891 X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);
21892 X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex);
21893 X509_CRL *X509_CRL_dup(X509_CRL *crl);
21894 X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev);
21895 X509_REQ *X509_REQ_dup(X509_REQ *req);
21896 X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
21897 int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,
21898                     void *pval);
21899 void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
21900                      X509_ALGOR *algor);
21901 void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
21902 int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
21903 
21904 X509_NAME *X509_NAME_dup(X509_NAME *xn);
21905 X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
21906 
21907 int X509_cmp_time(const ASN1_TIME *s, time_t *t);
21908 int X509_cmp_current_time(const ASN1_TIME *s);
21909 ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
21910 ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
21911                             int offset_day, long offset_sec, time_t *t);
21912 ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj);
21913 
21914 const char *X509_get_default_cert_area(void);
21915 const char *X509_get_default_cert_dir(void);
21916 const char *X509_get_default_cert_file(void);
21917 const char *X509_get_default_cert_dir_env(void);
21918 const char *X509_get_default_cert_file_env(void);
21919 const char *X509_get_default_private_dir(void);
21920 
21921 X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
21922 X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey);
21923 
21924 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;
21925 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;
21926 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;
21927 
21928 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;
21929 
21930 int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
21931 EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key);
21932 int X509_get_pubkey_parameters(EVP_PKEY *pkey, struct stack_st_X509 *chain);
21933 int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp);
21934 EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length);
21935 
21936 int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);
21937 RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length);
21938 
21939 
21940 int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp);
21941 DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
21942 
21943 
21944 int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp);
21945 EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length);
21946 
21947 
21948 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;
21949 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;
21950 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;
21951 
21952 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;
21953 X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
21954 
21955 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;
21956 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;
21957 
21958 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;
21959 
21960 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;
21961 
21962 int X509_NAME_set(X509_NAME **xn, X509_NAME *name);
21963 
21964 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;
21965 
21966 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;
21967 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;
21968 
21969 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;
21970 
21971 int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
21972                           CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
21973 int X509_set_ex_data(X509 *r, int idx, void *arg);
21974 void *X509_get_ex_data(X509 *r, int idx);
21975 int i2d_X509_AUX(X509 *a, unsigned char **pp);
21976 X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length);
21977 
21978 int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
21979 
21980 void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
21981                          const X509 *x);
21982 int X509_get_signature_nid(const X509 *x);
21983 
21984 int X509_alias_set1(X509 *x, unsigned char *name, int len);
21985 int X509_keyid_set1(X509 *x, unsigned char *id, int len);
21986 unsigned char *X509_alias_get0(X509 *x, int *len);
21987 unsigned char *X509_keyid_get0(X509 *x, int *len);
21988 int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
21989                                                                 int);
21990 int X509_TRUST_set(int *t, int trust);
21991 int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
21992 int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj);
21993 void X509_trust_clear(X509 *x);
21994 void X509_reject_clear(X509 *x);
21995 
21996 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;
21997 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;
21998 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;
21999 
22000 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
22001 int X509_CRL_get0_by_serial(X509_CRL *crl,
22002                             X509_REVOKED **ret, ASN1_INTEGER *serial);
22003 int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
22004 
22005 X509_PKEY *X509_PKEY_new(void);
22006 void X509_PKEY_free(X509_PKEY *a);
22007 int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp);
22008 X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp,
22009                          long length);
22010 
22011 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;
22012 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;
22013 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;
22014 
22015 
22016 X509_INFO *X509_INFO_new(void);
22017 void X509_INFO_free(X509_INFO *a);
22018 char *X509_NAME_oneline(X509_NAME *a, char *buf, int size);
22019 
22020 int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,
22021                 ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey);
22022 
22023 int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
22024                 unsigned char *md, unsigned int *len);
22025 
22026 int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1,
22027               X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
22028               char *data, EVP_PKEY *pkey, const EVP_MD *type);
22029 
22030 int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data,
22031                      unsigned char *md, unsigned int *len);
22032 
22033 int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,
22034                      ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey);
22035 
22036 int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1,
22037                    X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data,
22038                    EVP_PKEY *pkey, const EVP_MD *type);
22039 int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
22040                        X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
22041                        void *asn, EVP_MD_CTX *ctx);
22042 
22043 
22044 int X509_set_version(X509 *x, long version);
22045 int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
22046 ASN1_INTEGER *X509_get_serialNumber(X509 *x);
22047 int X509_set_issuer_name(X509 *x, X509_NAME *name);
22048 X509_NAME *X509_get_issuer_name(X509 *a);
22049 int X509_set_subject_name(X509 *x, X509_NAME *name);
22050 X509_NAME *X509_get_subject_name(X509 *a);
22051 int X509_set_notBefore(X509 *x, const ASN1_TIME *tm);
22052 int X509_set_notAfter(X509 *x, const ASN1_TIME *tm);
22053 int X509_set_pubkey(X509 *x, EVP_PKEY *pkey);
22054 EVP_PKEY *X509_get_pubkey(X509 *x);
22055 ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);
22056 int X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ );
22057 
22058 int X509_REQ_set_version(X509_REQ *x, long version);
22059 int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
22060 int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
22061 EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
22062 int X509_REQ_extension_nid(int nid);
22063 int *X509_REQ_get_extension_nids(void);
22064 void X509_REQ_set_extension_nids(int *nids);
22065 struct stack_st_X509_EXTENSION *X509_REQ_get_extensions(X509_REQ *req);
22066 int X509_REQ_add_extensions_nid(X509_REQ *req, struct stack_st_X509_EXTENSION *exts,
22067                                 int nid);
22068 int X509_REQ_add_extensions(X509_REQ *req, struct stack_st_X509_EXTENSION *exts);
22069 int X509_REQ_get_attr_count(const X509_REQ *req);
22070 int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);
22071 int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj,
22072                              int lastpos);
22073 X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
22074 X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
22075 int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
22076 int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
22077                               const ASN1_OBJECT *obj, int type,
22078                               const unsigned char *bytes, int len);
22079 int X509_REQ_add1_attr_by_NID(X509_REQ *req,
22080                               int nid, int type,
22081                               const unsigned char *bytes, int len);
22082 int X509_REQ_add1_attr_by_txt(X509_REQ *req,
22083                               const char *attrname, int type,
22084                               const unsigned char *bytes, int len);
22085 
22086 int X509_CRL_set_version(X509_CRL *x, long version);
22087 int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
22088 int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
22089 int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
22090 int X509_CRL_sort(X509_CRL *crl);
22091 
22092 int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
22093 int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
22094 
22095 X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer,
22096                         EVP_PKEY *skey, const EVP_MD *md, unsigned int flags);
22097 
22098 int X509_REQ_check_private_key(X509_REQ *x509, EVP_PKEY *pkey);
22099 
22100 int X509_check_private_key(X509 *x509, EVP_PKEY *pkey);
22101 int X509_chain_check_suiteb(int *perror_depth,
22102                             X509 *x, struct stack_st_X509 *chain,
22103                             unsigned long flags);
22104 int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags);
22105 struct stack_st_X509 *X509_chain_up_ref(struct stack_st_X509 *chain);
22106 
22107 int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
22108 unsigned long X509_issuer_and_serial_hash(X509 *a);
22109 
22110 int X509_issuer_name_cmp(const X509 *a, const X509 *b);
22111 unsigned long X509_issuer_name_hash(X509 *a);
22112 
22113 int X509_subject_name_cmp(const X509 *a, const X509 *b);
22114 unsigned long X509_subject_name_hash(X509 *x);
22115 
22116 
22117 unsigned long X509_issuer_name_hash_old(X509 *a);
22118 unsigned long X509_subject_name_hash_old(X509 *x);
22119 
22120 
22121 int X509_cmp(const X509 *a, const X509 *b);
22122 int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
22123 unsigned long X509_NAME_hash(X509_NAME *x);
22124 unsigned long X509_NAME_hash_old(X509_NAME *x);
22125 
22126 int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
22127 int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
22128 
22129 int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
22130                      unsigned long cflag);
22131 int X509_print_fp(FILE *bp, X509 *x);
22132 int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
22133 int X509_REQ_print_fp(FILE *bp, X509_REQ *req);
22134 int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent,
22135                           unsigned long flags);
22136 
22137 
22138 
22139 int X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
22140 int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent,
22141                        unsigned long flags);
22142 int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
22143                   unsigned long cflag);
22144 int X509_print(BIO *bp, X509 *x);
22145 int X509_ocspid_print(BIO *bp, X509 *x);
22146 int X509_CERT_AUX_print(BIO *bp, X509_CERT_AUX *x, int indent);
22147 int X509_CRL_print(BIO *bp, X509_CRL *x);
22148 int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
22149                       unsigned long cflag);
22150 int X509_REQ_print(BIO *bp, X509_REQ *req);
22151 
22152 
22153 int X509_NAME_entry_count(X509_NAME *name);
22154 int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);
22155 int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
22156                               char *buf, int len);
22157 
22158 /*
22159  * NOTE: you should be passsing -1, not 0 as lastpos.  The functions that use
22160  * lastpos, search after that position on.
22161  */
22162 int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
22163 int X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
22164                                int lastpos);
22165 X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
22166 X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
22167 int X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne,
22168                         int loc, int set);
22169 int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type,
22170                                unsigned char *bytes, int len, int loc,
22171                                int set);
22172 int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
22173                                unsigned char *bytes, int len, int loc,
22174                                int set);
22175 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
22176                                                const char *field, int type,
22177                                                const unsigned char *bytes,
22178                                                int len);
22179 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
22180                                                int type, unsigned char *bytes,
22181                                                int len);
22182 int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
22183                                const unsigned char *bytes, int len, int loc,
22184                                int set);
22185 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
22186                                                ASN1_OBJECT *obj, int type,
22187                                                const unsigned char *bytes,
22188                                                int len);
22189 int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj);
22190 int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
22191                              const unsigned char *bytes, int len);
22192 ASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
22193 ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
22194 
22195 int X509v3_get_ext_count(const struct stack_st_X509_EXTENSION *x);
22196 int X509v3_get_ext_by_NID(const struct stack_st_X509_EXTENSION *x,
22197                           int nid, int lastpos);
22198 int X509v3_get_ext_by_OBJ(const struct stack_st_X509_EXTENSION *x,
22199                           ASN1_OBJECT *obj, int lastpos);
22200 int X509v3_get_ext_by_critical(const struct stack_st_X509_EXTENSION *x,
22201                                int crit, int lastpos);
22202 X509_EXTENSION *X509v3_get_ext(const struct stack_st_X509_EXTENSION *x, int loc);
22203 X509_EXTENSION *X509v3_delete_ext(struct stack_st_X509_EXTENSION *x, int loc);
22204 struct stack_st_X509_EXTENSION *X509v3_add_ext(struct stack_st_X509_EXTENSION **x,
22205                                          X509_EXTENSION *ex, int loc);
22206 
22207 int X509_get_ext_count(X509 *x);
22208 int X509_get_ext_by_NID(X509 *x, int nid, int lastpos);
22209 int X509_get_ext_by_OBJ(X509 *x, ASN1_OBJECT *obj, int lastpos);
22210 int X509_get_ext_by_critical(X509 *x, int crit, int lastpos);
22211 X509_EXTENSION *X509_get_ext(X509 *x, int loc);
22212 X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
22213 int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
22214 void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
22215 int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
22216                       unsigned long flags);
22217 
22218 int X509_CRL_get_ext_count(X509_CRL *x);
22219 int X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos);
22220 int X509_CRL_get_ext_by_OBJ(X509_CRL *x, ASN1_OBJECT *obj, int lastpos);
22221 int X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos);
22222 X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc);
22223 X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
22224 int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
22225 void *X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx);
22226 int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
22227                           unsigned long flags);
22228 
22229 int X509_REVOKED_get_ext_count(X509_REVOKED *x);
22230 int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos);
22231 int X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x, ASN1_OBJECT *obj,
22232                                 int lastpos);
22233 int X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos);
22234 X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc);
22235 X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
22236 int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
22237 void *X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx);
22238 int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
22239                               unsigned long flags);
22240 
22241 X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
22242                                              int nid, int crit,
22243                                              ASN1_OCTET_STRING *data);
22244 X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
22245                                              ASN1_OBJECT *obj, int crit,
22246                                              ASN1_OCTET_STRING *data);
22247 int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj);
22248 int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
22249 int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
22250 ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);
22251 ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
22252 int X509_EXTENSION_get_critical(X509_EXTENSION *ex);
22253 
22254 int X509at_get_attr_count(const struct stack_st_X509_ATTRIBUTE *x);
22255 int X509at_get_attr_by_NID(const struct stack_st_X509_ATTRIBUTE *x, int nid,
22256                            int lastpos);
22257 int X509at_get_attr_by_OBJ(const struct stack_st_X509_ATTRIBUTE *sk,
22258                            ASN1_OBJECT *obj, int lastpos);
22259 X509_ATTRIBUTE *X509at_get_attr(const struct stack_st_X509_ATTRIBUTE *x, int loc);
22260 X509_ATTRIBUTE *X509at_delete_attr(struct stack_st_X509_ATTRIBUTE *x, int loc);
22261 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr(struct stack_st_X509_ATTRIBUTE **x,
22262                                            X509_ATTRIBUTE *attr);
22263 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_OBJ(struct stack_st_X509_ATTRIBUTE
22264                                                   **x, const ASN1_OBJECT *obj,
22265                                                   int type,
22266                                                   const unsigned char *bytes,
22267                                                   int len);
22268 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_NID(struct stack_st_X509_ATTRIBUTE
22269                                                   **x, int nid, int type,
22270                                                   const unsigned char *bytes,
22271                                                   int len);
22272 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_txt(struct stack_st_X509_ATTRIBUTE
22273                                                   **x, const char *attrname,
22274                                                   int type,
22275                                                   const unsigned char *bytes,
22276                                                   int len);
22277 void *X509at_get0_data_by_OBJ(struct stack_st_X509_ATTRIBUTE *x, ASN1_OBJECT *obj,
22278                               int lastpos, int type);
22279 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
22280                                              int atrtype, const void *data,
22281                                              int len);
22282 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
22283                                              const ASN1_OBJECT *obj,
22284                                              int atrtype, const void *data,
22285                                              int len);
22286 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
22287                                              const char *atrname, int type,
22288                                              const unsigned char *bytes,
22289                                              int len);
22290 int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);
22291 int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,
22292                              const void *data, int len);
22293 void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype,
22294                                void *data);
22295 int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr);
22296 ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
22297 ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
22298 
22299 int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
22300 int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);
22301 int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj,
22302                              int lastpos);
22303 X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
22304 X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
22305 int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
22306 int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
22307                               const ASN1_OBJECT *obj, int type,
22308                               const unsigned char *bytes, int len);
22309 int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
22310                               int nid, int type,
22311                               const unsigned char *bytes, int len);
22312 int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
22313                               const char *attrname, int type,
22314                               const unsigned char *bytes, int len);
22315 
22316 int X509_verify_cert(X509_STORE_CTX *ctx);
22317 
22318 /* lookup a cert from a X509 STACK */
22319 X509 *X509_find_by_issuer_and_serial(struct stack_st_X509 *sk, X509_NAME *name,
22320                                      ASN1_INTEGER *serial);
22321 X509 *X509_find_by_subject(struct stack_st_X509 *sk, X509_NAME *name);
22322 
22323 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;
22324 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;
22325 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;
22326 
22327 int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
22328                          const unsigned char *salt, int saltlen);
22329 
22330 X509_ALGOR *PKCS5_pbe_set(int alg, int iter,
22331                           const unsigned char *salt, int saltlen);
22332 X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
22333                            unsigned char *salt, int saltlen);
22334 X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
22335                               unsigned char *salt, int saltlen,
22336                               unsigned char *aiv, int prf_nid);
22337 
22338 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
22339                              int prf_nid, int keylen);
22340 
22341 /* PKCS#8 utilities */
22342 
22343 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;
22344 
22345 EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8);
22346 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey);
22347 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken);
22348 PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);
22349 
22350 int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,
22351                     int version, int ptype, void *pval,
22352                     unsigned char *penc, int penclen);
22353 int PKCS8_pkey_get0(ASN1_OBJECT **ppkalg,
22354                     const unsigned char **pk, int *ppklen,
22355                     X509_ALGOR **pa, PKCS8_PRIV_KEY_INFO *p8);
22356 
22357 int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
22358                            int ptype, void *pval,
22359                            unsigned char *penc, int penclen);
22360 int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
22361                            const unsigned char **pk, int *ppklen,
22362                            X509_ALGOR **pa, X509_PUBKEY *pub);
22363 
22364 int X509_check_trust(X509 *x, int id, int flags);
22365 int X509_TRUST_get_count(void);
22366 X509_TRUST *X509_TRUST_get0(int idx);
22367 int X509_TRUST_get_by_id(int id);
22368 int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int),
22369                    char *name, int arg1, void *arg2);
22370 void X509_TRUST_cleanup(void);
22371 int X509_TRUST_get_flags(X509_TRUST *xp);
22372 char *X509_TRUST_get0_name(X509_TRUST *xp);
22373 int X509_TRUST_get_trust(X509_TRUST *xp);
22374 
22375 /* BEGIN ERROR CODES */
22376 /*
22377  * The following lines are auto generated by the script mkerr.pl. Any changes
22378  * made after this point may be overwritten when the script is next run.
22379  */
22380 
22381 void ERR_load_X509_strings(void);
22382 
22383 /* Error codes for the X509 functions. */
22384 
22385 /* Function codes. */
22386 # 1291 "/usr/include/openssl/x509.h" 3 4
22387 /* Reason codes. */
22388 # 45 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
22389 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 1
22390 /*
22391  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
22392  *
22393  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22394  * Use is subject to license terms.
22395  */
22396 
22397 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
22398 /*	  All Rights Reserved  	*/
22399 
22400 /*
22401  * BIND 4.9.3:
22402  *
22403  * Copyright (c) 1980, 1983, 1988, 1993
22404  *	The Regents of the University of California.  All rights reserved.
22405  *
22406  * Redistribution and use in source and binary forms, with or without
22407  * modification, are permitted provided that the following conditions
22408  * are met:
22409  * 1. Redistributions of source code must retain the above copyright
22410  *    notice, this list of conditions and the following disclaimer.
22411  * 2. Redistributions in binary form must reproduce the above copyright
22412  *    notice, this list of conditions and the following disclaimer in the
22413  *    documentation and/or other materials provided with the distribution.
22414  * 3. All advertising materials mentioning features or use of this software
22415  *    must display the following acknowledgement:
22416  *	This product includes software developed by the University of
22417  *	California, Berkeley and its contributors.
22418  * 4. Neither the name of the University nor the names of its contributors
22419  *    may be used to endorse or promote products derived from this software
22420  *    without specific prior written permission.
22421  *
22422  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22423  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22424  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22425  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22426  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22427  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22428  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22429  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22430  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22431  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22432  * SUCH DAMAGE.
22433  * -
22434  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
22435  *
22436  * Permission to use, copy, modify, and distribute this software for any
22437  * purpose with or without fee is hereby granted, provided that the above
22438  * copyright notice and this permission notice appear in all copies, and that
22439  * the name of Digital Equipment Corporation not be used in advertising or
22440  * publicity pertaining to distribution of the document or software without
22441  * specific, written prior permission.
22442  *
22443  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
22444  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
22445  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
22446  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
22447  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
22448  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
22449  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22450  * SOFTWARE.
22451  * --Copyright--
22452  *
22453  * End BIND 4.9.3
22454  */
22455 
22456 /*
22457  * Structures returned by network data base library.
22458  * All addresses are supplied in host order, and
22459  * returned in network order (suitable for use in system calls).
22460  */
22461 
22462 
22463 
22464 
22465 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
22466 /*
22467  * CDDL HEADER START
22468  *
22469  * The contents of this file are subject to the terms of the
22470  * Common Development and Distribution License (the "License").
22471  * You may not use this file except in compliance with the License.
22472  *
22473  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22474  * or http://www.opensolaris.org/os/licensing.
22475  * See the License for the specific language governing permissions
22476  * and limitations under the License.
22477  *
22478  * When distributing Covered Code, include this CDDL HEADER in each
22479  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22480  * If applicable, add the following below this CDDL HEADER, with the
22481  * fields enclosed by brackets "[]" replaced with your own identifying
22482  * information: Portions Copyright [yyyy] [name of copyright owner]
22483  *
22484  * CDDL HEADER END
22485  */
22486 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22487 /*	  All Rights Reserved  	*/
22488 
22489 
22490 /*
22491  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22492  * Use is subject to license terms.
22493  *
22494  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
22495  * Copyright 2016 Joyent, Inc.
22496  */
22497 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
22498 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
22499 /*
22500  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22501  * Use is subject to license terms.
22502  *
22503  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
22504  */
22505 /*
22506  * Copyright (c) 1982, 1986 Regents of the University of California.
22507  * All rights reserved.
22508  *
22509  * Redistribution and use in source and binary forms are permitted
22510  * provided that this notice is preserved and that due credit is given
22511  * to the University of California at Berkeley. The name of the University
22512  * may not be used to endorse or promote products derived from this
22513  * software without specific prior written permission. This software
22514  * is provided ``as is'' without express or implied warranty.
22515  */
22516 
22517 /*
22518  * Constants and structures defined by the internet system,
22519  * according to following documents
22520  *
22521  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
22522  *	http://www.iana.org/assignments/protocol-numbers
22523  *	http://www.iana.org/assignments/port-numbers
22524  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
22525  *
22526  */
22527 
22528 
22529 
22530 
22531 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
22532 /*
22533  * CDDL HEADER START
22534  *
22535  * The contents of this file are subject to the terms of the
22536  * Common Development and Distribution License (the "License").
22537  * You may not use this file except in compliance with the License.
22538  *
22539  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22540  * or http://www.opensolaris.org/os/licensing.
22541  * See the License for the specific language governing permissions
22542  * and limitations under the License.
22543  *
22544  * When distributing Covered Code, include this CDDL HEADER in each
22545  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22546  * If applicable, add the following below this CDDL HEADER, with the
22547  * fields enclosed by brackets "[]" replaced with your own identifying
22548  * information: Portions Copyright [yyyy] [name of copyright owner]
22549  *
22550  * CDDL HEADER END
22551  */
22552 
22553 /*
22554  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
22555  * Copyright 2016 Joyent, Inc.
22556  *
22557  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
22558  * Use is subject to license terms.
22559  */
22560 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
22561 
22562 
22563 
22564 
22565 
22566 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
22567 /*
22568  * CDDL HEADER START
22569  *
22570  * The contents of this file are subject to the terms of the
22571  * Common Development and Distribution License (the "License").
22572  * You may not use this file except in compliance with the License.
22573  *
22574  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22575  * or http://www.opensolaris.org/os/licensing.
22576  * See the License for the specific language governing permissions
22577  * and limitations under the License.
22578  *
22579  * When distributing Covered Code, include this CDDL HEADER in each
22580  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22581  * If applicable, add the following below this CDDL HEADER, with the
22582  * fields enclosed by brackets "[]" replaced with your own identifying
22583  * information: Portions Copyright [yyyy] [name of copyright owner]
22584  *
22585  * CDDL HEADER END
22586  */
22587 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22588 /*	  All Rights Reserved  	*/
22589 
22590 
22591 /*
22592  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22593  * Use is subject to license terms.
22594  *
22595  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
22596  * Copyright 2016 Joyent, Inc.
22597  */
22598 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
22599 
22600 
22601 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
22602 /*
22603  * CDDL HEADER START
22604  *
22605  * The contents of this file are subject to the terms of the
22606  * Common Development and Distribution License (the "License").
22607  * You may not use this file except in compliance with the License.
22608  *
22609  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22610  * or http://www.opensolaris.org/os/licensing.
22611  * See the License for the specific language governing permissions
22612  * and limitations under the License.
22613  *
22614  * When distributing Covered Code, include this CDDL HEADER in each
22615  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22616  * If applicable, add the following below this CDDL HEADER, with the
22617  * fields enclosed by brackets "[]" replaced with your own identifying
22618  * information: Portions Copyright [yyyy] [name of copyright owner]
22619  *
22620  * CDDL HEADER END
22621  */
22622 /*
22623  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22624  * Use is subject to license terms.
22625  */
22626 
22627 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
22628 /*	  All Rights Reserved	*/
22629 
22630 /*
22631  * Portions of this source code were derived from Berkeley 4.3 BSD
22632  * under license from the Regents of the University of California.
22633  */
22634 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h"
22635 typedef uint16_t sa_family_t;
22636 
22637 
22638 /*
22639  * Structure used by kernel to store most
22640  * addresses.
22641  */
22642 struct sockaddr {
22643  sa_family_t sa_family; /* address family */
22644  char sa_data[14]; /* up to 14 bytes of direct address */
22645 };
22646 
22647 
22648 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h" 1
22649 /*
22650  * CDDL HEADER START
22651  *
22652  * The contents of this file are subject to the terms of the
22653  * Common Development and Distribution License (the "License").
22654  * You may not use this file except in compliance with the License.
22655  *
22656  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22657  * or http://www.opensolaris.org/os/licensing.
22658  * See the License for the specific language governing permissions
22659  * and limitations under the License.
22660  *
22661  * When distributing Covered Code, include this CDDL HEADER in each
22662  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22663  * If applicable, add the following below this CDDL HEADER, with the
22664  * fields enclosed by brackets "[]" replaced with your own identifying
22665  * information: Portions Copyright [yyyy] [name of copyright owner]
22666  *
22667  * CDDL HEADER END
22668  */
22669 /*
22670  * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
22671  */
22672 
22673 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
22674 /*	  All Rights Reserved  	*/
22675 
22676 /*
22677  * University Copyright- Copyright (c) 1982, 1986, 1988
22678  * The Regents of the University of California
22679  * All Rights Reserved
22680  *
22681  * University Acknowledgment- Portions of this document are derived from
22682  * software developed by the University of California, Berkeley, and its
22683  * contributors.
22684  */
22685 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
22686 /*
22687  * Definitions for UNIX IPC domain.
22688  */
22689 struct sockaddr_un {
22690  sa_family_t sun_family; /* AF_UNIX */
22691  char sun_path[108]; /* path name (gag) */
22692 };
22693 
22694 
22695 
22696 /*
22697  * NOTE: If we ever go to BSD-style sun_len + sun_family, this macro needs to
22698  * change.
22699  *
22700  * Also, include a strlen() prototype, and we have to protect it w.r.t.
22701  * UNIX{98,03}.  And because there's strlen, we need size_t as well.
22702  */
22703 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
22704 extern size_t strlen(const char *);
22705 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
22706 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if_dl.h" 1
22707 /*
22708  * Copyright 1993-2003 Sun Microsystems, Inc.  All rights reserved.
22709  * Use is subject to license terms.
22710  */
22711 /*
22712  * Copyright (c) 1990, 1993
22713  *	The Regents of the University of California.  All rights reserved.
22714  *
22715  * Redistribution and use in source and binary forms, with or without
22716  * modification, are permitted provided that the following conditions
22717  * are met:
22718  * 1. Redistributions of source code must retain the above copyright
22719  *    notice, this list of conditions and the following disclaimer.
22720  * 2. Redistributions in binary form must reproduce the above copyright
22721  *    notice, this list of conditions and the following disclaimer in the
22722  *    documentation and/or other materials provided with the distribution.
22723  * 3. All advertising materials mentioning features or use of this software
22724  *    must display the following acknowledgement:
22725  *	This product includes software developed by the University of
22726  *	California, Berkeley and its contributors.
22727  * 4. Neither the name of the University nor the names of its contributors
22728  *    may be used to endorse or promote products derived from this software
22729  *    without specific prior written permission.
22730  *
22731  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22732  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22733  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22734  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22735  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22736  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22737  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22738  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22739  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22740  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22741  * SUCH DAMAGE.
22742  */
22743 
22744 
22745 
22746 
22747 #pragma ident "%Z%%M%	%I%	%E% SMI"
22748 /* from UCB 8.1 (Berkeley) 6/10/93 */
22749 
22750 
22751 
22752 
22753 
22754 /*
22755  * A Link-Level Sockaddr may specify the interface in one of two
22756  * ways: either by means of a system-provided index number (computed
22757  * anew and possibly differently on every reboot), or by a human-readable
22758  * string such as "il0" (for managerial convenience).
22759  *
22760  * Census taking actions, such as something akin to SIOCGCONF would return
22761  * both the index and the human name.
22762  *
22763  * High volume transactions (such as giving a link-level ``from'' address
22764  * in a recvfrom or recvmsg call) may be likely only to provide the indexed
22765  * form, (which requires fewer copy operations and less space).
22766  *
22767  * The form and interpretation  of the link-level address is purely a matter
22768  * of convention between the device driver and its consumers; however, it is
22769  * expected that all drivers for an interface of a given if_type will agree.
22770  */
22771 
22772 /*
22773  * Structure of a Link-Level sockaddr:
22774  */
22775 struct sockaddr_dl {
22776  ushort_t sdl_family; /* AF_LINK */
22777  ushort_t sdl_index; /* if != 0, system given index for interface */
22778  uchar_t sdl_type; /* interface type */
22779  uchar_t sdl_nlen; /* interface name length, no trailing 0 reqd. */
22780  uchar_t sdl_alen; /* link level address length */
22781  uchar_t sdl_slen; /* link layer selector length */
22782  char sdl_data[244]; /* contains both if name and ll address */
22783 };
22784 
22785 
22786 
22787 
22788 extern char *_link_ntoa(const unsigned char *, char *, int, int);
22789 extern unsigned char *_link_aton(const char *, int *);
22790 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
22791 
22792 
22793 
22794 /*
22795  * sockaddr_storage:
22796  * Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
22797  * structures. Has sufficient size and alignment for those sockaddrs.
22798  */
22799 
22800 /*
22801  * Desired maximum size, alignment size and related types.
22802  */
22803 
22804 
22805 /*
22806  * To represent desired sockaddr max alignment for platform, a
22807  * type is chosen which may depend on implementation platform architecture.
22808  * Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
22809  * We desire to force up to (but no more than) 64-bit (8 byte) alignment,
22810  * on platforms where it is possible to do so. (e.g not possible on ia32).
22811  * For all currently supported platforms by our implementation
22812  * in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
22813  * type "double" is suitable for that intent.
22814  *
22815  * Note: Type "double" is chosen over the more obvious integer type int64_t.
22816  *   int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
22817  */
22818 typedef double sockaddr_maxalign_t;
22819 
22820 
22821 
22822 /*
22823  * Definitions used for sockaddr_storage structure paddings design.
22824  */
22825 
22826 
22827 
22828 
22829 struct sockaddr_storage {
22830  sa_family_t ss_family; /* Address family */
22831  /* Following fields are implementation specific */
22832  char _ss_pad1[((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t))];
22833  sockaddr_maxalign_t _ss_align;
22834  char _ss_pad2[(256 - (sizeof (sa_family_t)+ ((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t)) + (sizeof (sockaddr_maxalign_t))))];
22835 };
22836 
22837 
22838 /*
22839  * To be compatible with the Linux interfaces used, this structure is
22840  * placed in socket_impl.h so that an include for <sys/socket.h> will
22841  * pickup this structure. This structure is for use with PF_PACKET
22842  * sockets.
22843  */
22844 struct sockaddr_ll {
22845  uint16_t sll_family;
22846  uint16_t sll_protocol;
22847  int32_t sll_ifindex;
22848  uint16_t sll_hatype;
22849  uint8_t sll_pkttype;
22850  uint8_t sll_halen;
22851  uint8_t sll_addr[8];
22852 };
22853 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
22854 
22855 
22856 
22857 
22858 
22859 /*
22860  * The socklen definitions are reproduced here from sys/socket.h so as to
22861  * not introduce that namespace into existing users of netinet/in.h.
22862  */
22863 
22864 
22865 
22866 typedef uint32_t socklen_t;
22867 
22868 
22869 
22870 
22871 
22872 typedef void *Psocklen_t;
22873 
22874 
22875 
22876 
22877 
22878 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 1
22879 /*
22880  * CDDL HEADER START
22881  *
22882  * The contents of this file are subject to the terms of the
22883  * Common Development and Distribution License (the "License").
22884  * You may not use this file except in compliance with the License.
22885  *
22886  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22887  * or http://www.opensolaris.org/os/licensing.
22888  * See the License for the specific language governing permissions
22889  * and limitations under the License.
22890  *
22891  * When distributing Covered Code, include this CDDL HEADER in each
22892  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22893  * If applicable, add the following below this CDDL HEADER, with the
22894  * fields enclosed by brackets "[]" replaced with your own identifying
22895  * information: Portions Copyright [yyyy] [name of copyright owner]
22896  *
22897  * CDDL HEADER END
22898  */
22899 /*
22900  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22901  * Use is subject to license terms.
22902  */
22903 
22904 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22905 /*	  All Rights Reserved  	*/
22906 
22907 
22908 
22909 
22910 
22911 /*
22912  * For source compatibility
22913  */
22914 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
22915 /*
22916  * CDDL HEADER START
22917  *
22918  * The contents of this file are subject to the terms of the
22919  * Common Development and Distribution License (the "License").
22920  * You may not use this file except in compliance with the License.
22921  *
22922  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22923  * or http://www.opensolaris.org/os/licensing.
22924  * See the License for the specific language governing permissions
22925  * and limitations under the License.
22926  *
22927  *
22928  * When distributing Covered Code, include this CDDL HEADER in each
22929  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22930  * If applicable, add the following below this CDDL HEADER, with the
22931  * fields enclosed by brackets "[]" replaced with your own identifying
22932  * information: Portions Copyright [yyyy] [name of copyright owner]
22933  *
22934  * CDDL HEADER END
22935  */
22936 
22937 /*
22938  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
22939  * Use is subject to license terms.
22940  * Copyright 2016 Joyent, Inc.
22941  */
22942 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
22943 
22944 
22945 
22946 
22947 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h" 1
22948 /*
22949  * CDDL HEADER START
22950  *
22951  * The contents of this file are subject to the terms of the
22952  * Common Development and Distribution License, Version 1.0 only
22953  * (the "License").  You may not use this file except in compliance
22954  * with the License.
22955  *
22956  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22957  * or http://www.opensolaris.org/os/licensing.
22958  * See the License for the specific language governing permissions
22959  * and limitations under the License.
22960  *
22961  * When distributing Covered Code, include this CDDL HEADER in each
22962  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22963  * If applicable, add the following below this CDDL HEADER, with the
22964  * fields enclosed by brackets "[]" replaced with your own identifying
22965  * information: Portions Copyright [yyyy] [name of copyright owner]
22966  *
22967  * CDDL HEADER END
22968  */
22969 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22970 /*	  All Rights Reserved  	*/
22971 
22972 
22973 /*
22974  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
22975  *
22976  * Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
22977  * All rights reserved.
22978  */
22979 
22980 /*
22981  * Copyright 2015, Joyent, Inc.
22982  */
22983 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
22984 /*
22985  * Structure of file descriptor/event pairs supplied in
22986  * the poll arrays.
22987  */
22988 typedef struct pollfd {
22989  int fd; /* file desc to poll */
22990  short events; /* events of interest on fd */
22991  short revents; /* events that occurred on fd */
22992 } pollfd_t;
22993 
22994 typedef unsigned long nfds_t;
22995 
22996 /*
22997  * Testable select events
22998  */
22999 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
23000 /*
23001  * Non-testable poll events (may not be specified in events field,
23002  * but may be returned in revents field).
23003  */
23004 
23005 
23006 
23007 
23008 /*
23009  * These events will never be specified in revents, but may be specified in
23010  * events to control /dev/poll behavior.
23011  */
23012 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
23013 int poll(struct pollfd *, nfds_t, int);
23014 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
23015 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/strmdep.h" 1
23016 /*
23017  * CDDL HEADER START
23018  *
23019  * The contents of this file are subject to the terms of the
23020  * Common Development and Distribution License, Version 1.0 only
23021  * (the "License").  You may not use this file except in compliance
23022  * with the License.
23023  *
23024  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23025  * or http://www.opensolaris.org/os/licensing.
23026  * See the License for the specific language governing permissions
23027  * and limitations under the License.
23028  *
23029  * When distributing Covered Code, include this CDDL HEADER in each
23030  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23031  * If applicable, add the following below this CDDL HEADER, with the
23032  * fields enclosed by brackets "[]" replaced with your own identifying
23033  * information: Portions Copyright [yyyy] [name of copyright owner]
23034  *
23035  * CDDL HEADER END
23036  */
23037 /*
23038  * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
23039  * All rights reserved.
23040  */
23041 
23042 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23043 /*	  All Rights Reserved  	*/
23044 
23045 
23046 
23047 
23048 
23049 #pragma ident "%Z%%M%	%I%	%E% SMI"
23050 
23051 
23052 
23053 
23054 
23055 /*
23056  * This file contains all machine-dependent declarations
23057  * in STREAMS.
23058  */
23059 
23060 /*
23061  * Copy data from one data buffer to another.
23062  * The addresses must be word aligned - if not, use bcopy!
23063  */
23064 
23065 
23066 /*
23067  * save the address of the calling function on the 3b2 to
23068  * enable tracking of who is allocating message blocks
23069  */
23070 
23071 
23072 /*
23073  * macro to check pointer alignment
23074  * (true if alignment is sufficient for worst case)
23075  */
23076 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
23077 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
23078 /*
23079  * CDDL HEADER START
23080  *
23081  * The contents of this file are subject to the terms of the
23082  * Common Development and Distribution License (the "License").
23083  * You may not use this file except in compliance with the License.
23084  *
23085  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23086  * or http://www.opensolaris.org/os/licensing.
23087  * See the License for the specific language governing permissions
23088  * and limitations under the License.
23089  *
23090  * When distributing Covered Code, include this CDDL HEADER in each
23091  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23092  * If applicable, add the following below this CDDL HEADER, with the
23093  * fields enclosed by brackets "[]" replaced with your own identifying
23094  * information: Portions Copyright [yyyy] [name of copyright owner]
23095  *
23096  * CDDL HEADER END
23097  */
23098 /*
23099  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23100  * Use is subject to license terms.
23101  */
23102 
23103 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
23104 /*	  All Rights Reserved  	*/
23105 
23106 /*
23107  * Portions of this source code were derived from Berkeley 4.3 BSD
23108  * under license from the Regents of the University of California.
23109  */
23110 
23111 
23112 
23113 
23114 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23115 /*
23116  * CDDL HEADER START
23117  *
23118  * The contents of this file are subject to the terms of the
23119  * Common Development and Distribution License (the "License").
23120  * You may not use this file except in compliance with the License.
23121  *
23122  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23123  * or http://www.opensolaris.org/os/licensing.
23124  * See the License for the specific language governing permissions
23125  * and limitations under the License.
23126  *
23127  * When distributing Covered Code, include this CDDL HEADER in each
23128  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23129  * If applicable, add the following below this CDDL HEADER, with the
23130  * fields enclosed by brackets "[]" replaced with your own identifying
23131  * information: Portions Copyright [yyyy] [name of copyright owner]
23132  *
23133  * CDDL HEADER END
23134  */
23135 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23136 /*	  All Rights Reserved  	*/
23137 
23138 
23139 /*
23140  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23141  * Use is subject to license terms.
23142  *
23143  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23144  * Copyright 2016 Joyent, Inc.
23145  */
23146 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 2
23147 
23148 
23149 
23150 
23151 
23152 /*
23153  * The credential is an opaque kernel private data structure defined in
23154  * <sys/cred_impl.h>.
23155  */
23156 
23157 typedef struct cred cred_t;
23158 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
23159 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 1
23160 /*
23161  * CDDL HEADER START
23162  *
23163  * The contents of this file are subject to the terms of the
23164  * Common Development and Distribution License, Version 1.0 only
23165  * (the "License").  You may not use this file except in compliance
23166  * with the License.
23167  *
23168  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23169  * or http://www.opensolaris.org/os/licensing.
23170  * See the License for the specific language governing permissions
23171  * and limitations under the License.
23172  *
23173  * When distributing Covered Code, include this CDDL HEADER in each
23174  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23175  * If applicable, add the following below this CDDL HEADER, with the
23176  * fields enclosed by brackets "[]" replaced with your own identifying
23177  * information: Portions Copyright [yyyy] [name of copyright owner]
23178  *
23179  * CDDL HEADER END
23180  */
23181 /*
23182  * Copyright (c) 1991-1998 by Sun Microsystems, Inc.
23183  * All rights reserved.
23184  */
23185 
23186 /*
23187  * t_lock.h:	Prototypes for disp_locks, plus include files
23188  *		that describe the interfaces to kernel synch.
23189  *		objects.
23190  */
23191 
23192 
23193 
23194 
23195 #pragma ident "%Z%%M%	%I%	%E% SMI"
23196 
23197 
23198 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 1
23199 /*
23200  * CDDL HEADER START
23201  *
23202  * The contents of this file are subject to the terms of the
23203  * Common Development and Distribution License (the "License").
23204  * You may not use this file except in compliance with the License.
23205  *
23206  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23207  * or http://www.opensolaris.org/os/licensing.
23208  * See the License for the specific language governing permissions
23209  * and limitations under the License.
23210  *
23211  * When distributing Covered Code, include this CDDL HEADER in each
23212  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23213  * If applicable, add the following below this CDDL HEADER, with the
23214  * fields enclosed by brackets "[]" replaced with your own identifying
23215  * information: Portions Copyright [yyyy] [name of copyright owner]
23216  *
23217  * CDDL HEADER END
23218  */
23219 /*
23220  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23221  * Use is subject to license terms.
23222  * Copyright 2016 Joyent, Inc.
23223  */
23224 
23225 
23226 
23227 
23228 #pragma ident "%Z%%M%	%I%	%E% SMI"
23229 
23230 
23231 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23232 /*
23233  * CDDL HEADER START
23234  *
23235  * The contents of this file are subject to the terms of the
23236  * Common Development and Distribution License (the "License").
23237  * You may not use this file except in compliance with the License.
23238  *
23239  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23240  * or http://www.opensolaris.org/os/licensing.
23241  * See the License for the specific language governing permissions
23242  * and limitations under the License.
23243  *
23244  * When distributing Covered Code, include this CDDL HEADER in each
23245  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23246  * If applicable, add the following below this CDDL HEADER, with the
23247  * fields enclosed by brackets "[]" replaced with your own identifying
23248  * information: Portions Copyright [yyyy] [name of copyright owner]
23249  *
23250  * CDDL HEADER END
23251  */
23252 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23253 /*	  All Rights Reserved  	*/
23254 
23255 
23256 /*
23257  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23258  * Use is subject to license terms.
23259  *
23260  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23261  * Copyright 2016 Joyent, Inc.
23262  */
23263 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
23264 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
23265 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23266 /*	  All Rights Reserved  	*/
23267 
23268 
23269 /*
23270  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
23271  * All rights reserved.  The Berkeley software License Agreement
23272  * specifies the terms and conditions for redistribution.
23273  */
23274 
23275 /*
23276  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23277  *
23278  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23279  * Use is subject to license terms.
23280  *
23281  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23282  */
23283 
23284 /*
23285  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
23286  */
23287 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
23288 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
23289 typedef lock_t disp_lock_t; /* dispatcher lock type */
23290 
23291 /*
23292  * SPIN_LOCK() macro indicates whether lock is implemented as a spin lock or
23293  * an adaptive mutex, depending on what interrupt levels use it.
23294  */
23295 
23296 
23297 /*
23298  * Macro to control loops which spin on a lock and then check state
23299  * periodically.  Its passed an integer, and returns a boolean value
23300  * that if true indicates its a good time to get the scheduler lock and
23301  * check the state of the current owner of the lock.
23302  */
23303 
23304 
23305 /*
23306  * Externs for CLOCK_LOCK and clock resolution
23307  */
23308 extern volatile uint32_t hres_lock;
23309 extern hrtime_t hrtime_base;
23310 extern int clock_res;
23311 
23312 
23313 
23314 /*
23315  * The definitions of the symbolic interrupt levels:
23316  *
23317  *   CLOCK_LEVEL =>  The level at which one must be to block the clock.
23318  *
23319  *   LOCK_LEVEL  =>  The highest level at which one may block (and thus the
23320  *                   highest level at which one may acquire adaptive locks)
23321  *                   Also the highest level at which one may be preempted.
23322  *
23323  *   DISP_LEVEL  =>  The level at which one must be to perform dispatcher
23324  *                   operations.
23325  *
23326  * The constraints on the platform:
23327  *
23328  *  - CLOCK_LEVEL must be less than or equal to LOCK_LEVEL
23329  *  - LOCK_LEVEL must be less than DISP_LEVEL
23330  *  - DISP_LEVEL should be as close to LOCK_LEVEL as possible
23331  *
23332  * Note that LOCK_LEVEL and CLOCK_LEVEL have historically always been equal;
23333  * changing this relationship is probably possible but not advised.
23334  *
23335  */
23336 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
23337 /*
23338  * The following mask is for the cpu_intr_actv bits corresponding to
23339  * high-level PILs. It should equal:
23340  * ((((1 << PIL_MAX + 1) - 1) >> LOCK_LEVEL + 1) << LOCK_LEVEL + 1)
23341  */
23342 
23343 
23344 /*
23345  * The semaphore code depends on being able to represent a lock plus
23346  * owner in a single 32-bit word.  (Mutexes used to have a similar
23347  * dependency, but no longer.)  Thus the owner must contain at most
23348  * 24 significant bits.  At present only threads and semaphores
23349  * must be aware of this vile constraint.  Different ISAs may handle this
23350  * differently depending on their capabilities (e.g. compare-and-swap)
23351  * and limitations (e.g. constraints on alignment and/or KERNELBASE).
23352  */
23353 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23354 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
23355 /*
23356  * CDDL HEADER START
23357  *
23358  * The contents of this file are subject to the terms of the
23359  * Common Development and Distribution License (the "License").
23360  * You may not use this file except in compliance with the License.
23361  *
23362  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23363  * or http://www.opensolaris.org/os/licensing.
23364  * See the License for the specific language governing permissions
23365  * and limitations under the License.
23366  *
23367  * When distributing Covered Code, include this CDDL HEADER in each
23368  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23369  * If applicable, add the following below this CDDL HEADER, with the
23370  * fields enclosed by brackets "[]" replaced with your own identifying
23371  * information: Portions Copyright [yyyy] [name of copyright owner]
23372  *
23373  * CDDL HEADER END
23374  */
23375 
23376 /*
23377  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
23378  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
23379  */
23380 
23381 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
23382 /*	  All Rights Reserved  	*/
23383 
23384 /*
23385  * University Copyright- Copyright (c) 1982, 1986, 1988
23386  * The Regents of the University of California
23387  * All Rights Reserved
23388  *
23389  * University Acknowledgment- Portions of this document are derived from
23390  * software developed by the University of California, Berkeley, and its
23391  * contributors.
23392  */
23393 
23394 
23395 
23396 
23397 
23398 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23399 /*
23400  * CDDL HEADER START
23401  *
23402  * The contents of this file are subject to the terms of the
23403  * Common Development and Distribution License (the "License").
23404  * You may not use this file except in compliance with the License.
23405  *
23406  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23407  * or http://www.opensolaris.org/os/licensing.
23408  * See the License for the specific language governing permissions
23409  * and limitations under the License.
23410  *
23411  * When distributing Covered Code, include this CDDL HEADER in each
23412  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23413  * If applicable, add the following below this CDDL HEADER, with the
23414  * fields enclosed by brackets "[]" replaced with your own identifying
23415  * information: Portions Copyright [yyyy] [name of copyright owner]
23416  *
23417  * CDDL HEADER END
23418  */
23419 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23420 /*	  All Rights Reserved  	*/
23421 
23422 
23423 /*
23424  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23425  * Use is subject to license terms.
23426  *
23427  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23428  * Copyright 2016 Joyent, Inc.
23429  */
23430 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
23431 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
23432 /*
23433  * CDDL HEADER START
23434  *
23435  * The contents of this file are subject to the terms of the
23436  * Common Development and Distribution License (the "License").
23437  * You may not use this file except in compliance with the License.
23438  *
23439  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23440  * or http://www.opensolaris.org/os/licensing.
23441  * See the License for the specific language governing permissions
23442  * and limitations under the License.
23443  *
23444  *
23445  * When distributing Covered Code, include this CDDL HEADER in each
23446  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23447  * If applicable, add the following below this CDDL HEADER, with the
23448  * fields enclosed by brackets "[]" replaced with your own identifying
23449  * information: Portions Copyright [yyyy] [name of copyright owner]
23450  *
23451  * CDDL HEADER END
23452  */
23453 
23454 /*
23455  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23456  * Use is subject to license terms.
23457  * Copyright 2016 Joyent, Inc.
23458  */
23459 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
23460 
23461 
23462 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
23463 /*
23464  * This file and its contents are supplied under the terms of the
23465  * Common Development and Distribution License ("CDDL"), version 1.0.
23466  * You may only use this file in accordance with the terms of version
23467  * 1.0 of the CDDL.
23468  *
23469  * A full copy of the text of the CDDL should have accompanied this
23470  * source.  A copy of the CDDL is also available via the Internet at
23471  * http://www.illumos.org/license/CDDL.
23472  */
23473 
23474 /*
23475  * Copyright 2014-2016 PALO, Richard.
23476  */
23477 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
23478 
23479 
23480 
23481 
23482 
23483 /*
23484  * Fundamental variables; don't change too often.
23485  */
23486 
23487 /*
23488  * _POSIX_VDISABLE has historically been defined in <sys/param.h> since
23489  * an early merge with AT&T source.  It has also historically been defined
23490  * in <sys/termios.h>. The POSIX standard, IEEE Std. 1003.1-1988 initially
23491  * required the existence of _POSIX_VDISABLE in <sys/termios.h>.
23492  * Subsequent versions of the IEEE Standard as well as the X/Open
23493  * specifications required that _POSIX_VDISABLE be defined in <unistd.h>
23494  * while still allowing for it's existence in other headers.  With the
23495  * introduction of XPG6, _POSIX_VDISABLE can only be defined in <unistd.h>.
23496  */
23497 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23498     /* compatibility purposes only	*/
23499     /* and will be removed in a	*/
23500     /* later release		*/
23501 
23502 /*
23503  * These define the maximum and minimum allowable values of the
23504  * configurable parameter NGROUPS_MAX.
23505  */
23506 
23507 
23508 
23509 
23510 /*
23511  * NGROUPS_MAX_DEFAULT: *MUST* match NGROUPS_MAX value in limits.h.
23512  */
23513 
23514 
23515 /*
23516  * Default process priority.  Keep it in sync with limits.h.
23517  */
23518 
23519 
23520 /*
23521  * Fundamental constants of the implementation--cannot be changed easily.
23522  */
23523 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23524 /* REMOTE -- whether machine is primary, secondary, or regular */
23525 
23526 
23527 
23528 /*
23529  * MAXPATHLEN defines the longest permissible path length,
23530  * including the terminating null, after expanding symbolic links.
23531  * TYPICALMAXPATHLEN is used in a few places as an optimization
23532  * with a local buffer on the stack to avoid kmem_alloc().
23533  * MAXSYMLINKS defines the maximum number of symbolic links
23534  * that may be expanded in a path name. It should be set high
23535  * enough to allow all legitimate uses, but halt infinite loops
23536  * reasonably quickly.
23537  * MAXNAMELEN is the length (including the terminating null) of
23538  * the longest permissible file (component) name.
23539  */
23540 
23541 
23542 
23543 
23544 
23545 /*
23546  * MAXLINKNAMELEN defines the longest possible permitted datalink name,
23547  * including the terminating NUL.  Note that this must not be larger
23548  * than related networking constants such as LIFNAMSIZ.
23549  */
23550 
23551 
23552 
23553 
23554 
23555 
23556 /*
23557  * The following are defined to be the same as
23558  * defined in /usr/include/limits.h.  They are
23559  * needed for pipe and FIFO compatibility.
23560  */
23561 # 220 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23562 /* macros replacing interleaving functions */
23563 
23564 
23565 
23566 /*
23567  * File system parameters and macros.
23568  *
23569  * The file system is made out of blocks of at most MAXBSIZE units,
23570  * with smaller units (fragments) only in the last direct block.
23571  * MAXBSIZE primarily determines the size of buffers in the buffer
23572  * pool. It may be made larger without any effect on existing
23573  * file systems; however making it smaller make make some file
23574  * systems unmountable.
23575  *
23576  * Note that the blocked devices are assumed to have DEV_BSIZE
23577  * "sectors" and that fragments must be some multiple of this size.
23578  */
23579 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23580 /*	64 bit versions of btodb and dbtob */
23581 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23582 /*
23583  * Size of arg list passed in by user.
23584  */
23585 # 287 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23586 /*
23587  * Scale factor for scaled integers used to count
23588  * %cpu time and load averages.
23589  */
23590 
23591 
23592 
23593 /*
23594  * Delay units are in microseconds.
23595  *
23596  * XXX	These macros are not part of the DDI!
23597  */
23598 # 317 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23599 /*
23600  * The following is to free utilities from machine dependencies within
23601  * an architecture. Must be included after definition of DEV_BSIZE.
23602  */
23603 # 471 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23604 /*
23605  * The following are assorted machine dependent values which can be
23606  * obtained in a machine independent manner through sysconf(2) or
23607  * sysinfo(2). In order to guarantee that these provide the expected
23608  * value at all times, the System Private interface (leading underscore)
23609  * is used.
23610  */
23611 
23612 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
23613 /*
23614  * CDDL HEADER START
23615  *
23616  * The contents of this file are subject to the terms of the
23617  * Common Development and Distribution License (the "License").
23618  * You may not use this file except in compliance with the License.
23619  *
23620  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23621  * or http://www.opensolaris.org/os/licensing.
23622  * See the License for the specific language governing permissions
23623  * and limitations under the License.
23624  *
23625  * When distributing Covered Code, include this CDDL HEADER in each
23626  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23627  * If applicable, add the following below this CDDL HEADER, with the
23628  * fields enclosed by brackets "[]" replaced with your own identifying
23629  * information: Portions Copyright [yyyy] [name of copyright owner]
23630  *
23631  * CDDL HEADER END
23632  */
23633 
23634 /*
23635  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
23636  *	  All Rights Reserved
23637  *
23638  */
23639 
23640 /*
23641  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23642  * Use is subject to license terms.
23643  */
23644 
23645 /*
23646  * WARNING: This is an implementation-specific header,
23647  * its contents are not guaranteed. Applications
23648  * should include <unistd.h> and not this header.
23649  */
23650 # 480 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
23651 
23652 
23653 
23654 
23655 
23656 
23657 extern long _sysconf(int); /* System Private interface to sysconf() */
23658 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23659 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 1
23660 /*
23661  * CDDL HEADER START
23662  *
23663  * The contents of this file are subject to the terms of the
23664  * Common Development and Distribution License (the "License").
23665  * You may not use this file except in compliance with the License.
23666  *
23667  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23668  * or http://www.opensolaris.org/os/licensing.
23669  * See the License for the specific language governing permissions
23670  * and limitations under the License.
23671  *
23672  * When distributing Covered Code, include this CDDL HEADER in each
23673  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23674  * If applicable, add the following below this CDDL HEADER, with the
23675  * fields enclosed by brackets "[]" replaced with your own identifying
23676  * information: Portions Copyright [yyyy] [name of copyright owner]
23677  *
23678  * CDDL HEADER END
23679  */
23680 /*
23681  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
23682  */
23683 
23684 
23685 
23686 
23687 
23688 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23689 /*
23690  * CDDL HEADER START
23691  *
23692  * The contents of this file are subject to the terms of the
23693  * Common Development and Distribution License (the "License").
23694  * You may not use this file except in compliance with the License.
23695  *
23696  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23697  * or http://www.opensolaris.org/os/licensing.
23698  * See the License for the specific language governing permissions
23699  * and limitations under the License.
23700  *
23701  * When distributing Covered Code, include this CDDL HEADER in each
23702  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23703  * If applicable, add the following below this CDDL HEADER, with the
23704  * fields enclosed by brackets "[]" replaced with your own identifying
23705  * information: Portions Copyright [yyyy] [name of copyright owner]
23706  *
23707  * CDDL HEADER END
23708  */
23709 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23710 /*	  All Rights Reserved  	*/
23711 
23712 
23713 /*
23714  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23715  * Use is subject to license terms.
23716  *
23717  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23718  * Copyright 2016 Joyent, Inc.
23719  */
23720 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 2
23721 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h"
23722 /*
23723  * Public interface to mutual exclusion locks.  See mutex(9F) for details.
23724  *
23725  * The basic mutex type is MUTEX_ADAPTIVE, which is expected to be used
23726  * in almost all of the kernel.  MUTEX_SPIN provides interrupt blocking
23727  * and must be used in interrupt handlers above LOCK_LEVEL.  The iblock
23728  * cookie argument to mutex_init() encodes the interrupt level to block.
23729  * The iblock cookie must be NULL for adaptive locks.
23730  *
23731  * MUTEX_DEFAULT is the type usually specified (except in drivers) to
23732  * mutex_init().  It is identical to MUTEX_ADAPTIVE.
23733  *
23734  * MUTEX_DRIVER is always used by drivers.  mutex_init() converts this to
23735  * either MUTEX_ADAPTIVE or MUTEX_SPIN depending on the iblock cookie.
23736  *
23737  * Mutex statistics can be gathered on the fly, without rebooting or
23738  * recompiling the kernel, via the lockstat driver (lockstat(7D)).
23739  */
23740 typedef enum {
23741  MUTEX_ADAPTIVE = 0, /* spin if owner is running, otherwise block */
23742  MUTEX_SPIN = 1, /* block interrupts and spin */
23743  MUTEX_DRIVER = 4, /* driver (DDI) mutex */
23744  MUTEX_DEFAULT = 6 /* kernel default mutex */
23745 } kmutex_type_t;
23746 
23747 typedef struct mutex {
23748 
23749 
23750 
23751  void *_opaque[2];
23752 
23753 } kmutex_t;
23754 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23755 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 1
23756 /*
23757  * CDDL HEADER START
23758  *
23759  * The contents of this file are subject to the terms of the
23760  * Common Development and Distribution License (the "License").
23761  * You may not use this file except in compliance with the License.
23762  *
23763  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23764  * or http://www.opensolaris.org/os/licensing.
23765  * See the License for the specific language governing permissions
23766  * and limitations under the License.
23767  *
23768  * When distributing Covered Code, include this CDDL HEADER in each
23769  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23770  * If applicable, add the following below this CDDL HEADER, with the
23771  * fields enclosed by brackets "[]" replaced with your own identifying
23772  * information: Portions Copyright [yyyy] [name of copyright owner]
23773  *
23774  * CDDL HEADER END
23775  */
23776 /*
23777  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23778  * Use is subject to license terms.
23779  */
23780 
23781 /*
23782  * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
23783  */
23784 
23785 
23786 
23787 
23788 /*
23789  * Public interface to readers/writer locks.  See rwlock(9F) for details.
23790  */
23791 
23792 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23793 /*
23794  * CDDL HEADER START
23795  *
23796  * The contents of this file are subject to the terms of the
23797  * Common Development and Distribution License (the "License").
23798  * You may not use this file except in compliance with the License.
23799  *
23800  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23801  * or http://www.opensolaris.org/os/licensing.
23802  * See the License for the specific language governing permissions
23803  * and limitations under the License.
23804  *
23805  * When distributing Covered Code, include this CDDL HEADER in each
23806  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23807  * If applicable, add the following below this CDDL HEADER, with the
23808  * fields enclosed by brackets "[]" replaced with your own identifying
23809  * information: Portions Copyright [yyyy] [name of copyright owner]
23810  *
23811  * CDDL HEADER END
23812  */
23813 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23814 /*	  All Rights Reserved  	*/
23815 
23816 
23817 /*
23818  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23819  * Use is subject to license terms.
23820  *
23821  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23822  * Copyright 2016 Joyent, Inc.
23823  */
23824 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 2
23825 
23826 
23827 
23828 
23829 
23830 
23831 
23832 typedef enum {
23833  RW_DRIVER = 2, /* driver (DDI) rwlock */
23834  RW_DEFAULT = 4 /* kernel default rwlock */
23835 } krw_type_t;
23836 
23837 typedef enum {
23838  RW_WRITER,
23839  RW_READER,
23840  RW_READER_STARVEWRITER
23841 } krw_t;
23842 
23843 typedef struct _krwlock {
23844  void *_opaque[1];
23845 } krwlock_t;
23846 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23847 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h" 1
23848 /*
23849  * CDDL HEADER START
23850  *
23851  * The contents of this file are subject to the terms of the
23852  * Common Development and Distribution License, Version 1.0 only
23853  * (the "License").  You may not use this file except in compliance
23854  * with the License.
23855  *
23856  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23857  * or http://www.opensolaris.org/os/licensing.
23858  * See the License for the specific language governing permissions
23859  * and limitations under the License.
23860  *
23861  * When distributing Covered Code, include this CDDL HEADER in each
23862  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23863  * If applicable, add the following below this CDDL HEADER, with the
23864  * fields enclosed by brackets "[]" replaced with your own identifying
23865  * information: Portions Copyright [yyyy] [name of copyright owner]
23866  *
23867  * CDDL HEADER END
23868  */
23869 /*
23870  * Copyright (c) 1993-1998 by Sun Microsystems, Inc.
23871  * All rights reserved.
23872  */
23873 
23874 
23875 
23876 
23877 #pragma ident "%Z%%M%	%I%	%E% SMI"
23878 
23879 /*
23880  * Public interface to semaphores.  See semaphore(9F) for details.
23881  */
23882 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h"
23883 typedef enum {
23884  SEMA_DEFAULT,
23885  SEMA_DRIVER
23886 } ksema_type_t;
23887 
23888 typedef struct _ksema {
23889  void * _opaque[2]; /* 2 words on 4 byte alignment */
23890 } ksema_t;
23891 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23892 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 1
23893 /*
23894  * CDDL HEADER START
23895  *
23896  * The contents of this file are subject to the terms of the
23897  * Common Development and Distribution License (the "License").
23898  * You may not use this file except in compliance with the License.
23899  *
23900  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23901  * or http://www.opensolaris.org/os/licensing.
23902  * See the License for the specific language governing permissions
23903  * and limitations under the License.
23904  *
23905  * When distributing Covered Code, include this CDDL HEADER in each
23906  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23907  * If applicable, add the following below this CDDL HEADER, with the
23908  * fields enclosed by brackets "[]" replaced with your own identifying
23909  * information: Portions Copyright [yyyy] [name of copyright owner]
23910  *
23911  * CDDL HEADER END
23912  */
23913 /*
23914  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23915  * Use is subject to license terms.
23916  */
23917 
23918 /*
23919  * Copyright (c) 2012 by Delphix. All rights reserved.
23920  */
23921 
23922 /*
23923  * condvar.h:
23924  *
23925  * definitions for thread synchronization primitives: condition variables
23926  * This is the public part of the interface to condition variables. The
23927  * private (implementation-specific) part is in <arch>/sys/condvar_impl.h.
23928  */
23929 
23930 
23931 
23932 
23933 
23934 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23935 /*
23936  * CDDL HEADER START
23937  *
23938  * The contents of this file are subject to the terms of the
23939  * Common Development and Distribution License (the "License").
23940  * You may not use this file except in compliance with the License.
23941  *
23942  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23943  * or http://www.opensolaris.org/os/licensing.
23944  * See the License for the specific language governing permissions
23945  * and limitations under the License.
23946  *
23947  * When distributing Covered Code, include this CDDL HEADER in each
23948  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23949  * If applicable, add the following below this CDDL HEADER, with the
23950  * fields enclosed by brackets "[]" replaced with your own identifying
23951  * information: Portions Copyright [yyyy] [name of copyright owner]
23952  *
23953  * CDDL HEADER END
23954  */
23955 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23956 /*	  All Rights Reserved  	*/
23957 
23958 
23959 /*
23960  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23961  * Use is subject to license terms.
23962  *
23963  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23964  * Copyright 2016 Joyent, Inc.
23965  */
23966 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
23967 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
23968 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23969 /*	  All Rights Reserved  	*/
23970 
23971 
23972 /*
23973  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
23974  * All rights reserved.  The Berkeley software License Agreement
23975  * specifies the terms and conditions for redistribution.
23976  */
23977 
23978 /*
23979  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23980  *
23981  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23982  * Use is subject to license terms.
23983  *
23984  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23985  */
23986 
23987 /*
23988  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
23989  */
23990 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
23991 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h"
23992 /*
23993  * Condtion variables.
23994  */
23995 
23996 typedef struct _kcondvar {
23997  ushort_t _opaque;
23998 } kcondvar_t;
23999 
24000 typedef enum {
24001  CV_DEFAULT,
24002  CV_DRIVER
24003 } kcv_type_t;
24004 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
24005 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h"
24006 /*
24007  * Mutual exclusion locks described in common/sys/mutex.h.
24008  *
24009  * Semaphores described in common/sys/semaphore.h.
24010  *
24011  * Readers/Writer locks described in common/sys/rwlock.h.
24012  *
24013  * Condition variables described in common/sys/condvar.h
24014  */
24015 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
24016 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 1
24017 /*
24018  * CDDL HEADER START
24019  *
24020  * The contents of this file are subject to the terms of the
24021  * Common Development and Distribution License, Version 1.0 only
24022  * (the "License").  You may not use this file except in compliance
24023  * with the License.
24024  *
24025  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24026  * or http://www.opensolaris.org/os/licensing.
24027  * See the License for the specific language governing permissions
24028  * and limitations under the License.
24029  *
24030  * When distributing Covered Code, include this CDDL HEADER in each
24031  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24032  * If applicable, add the following below this CDDL HEADER, with the
24033  * fields enclosed by brackets "[]" replaced with your own identifying
24034  * information: Portions Copyright [yyyy] [name of copyright owner]
24035  *
24036  * CDDL HEADER END
24037  */
24038 /*
24039  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24040  * Use is subject to license terms.
24041  */
24042 
24043 
24044 
24045 
24046 #pragma ident "%Z%%M%	%I%	%E% SMI"
24047 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
24048 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
24049 /*
24050  * CDDL HEADER START
24051  *
24052  * The contents of this file are subject to the terms of the
24053  * Common Development and Distribution License (the "License").
24054  * You may not use this file except in compliance with the License.
24055  *
24056  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24057  * or http://www.opensolaris.org/os/licensing.
24058  * See the License for the specific language governing permissions
24059  * and limitations under the License.
24060  *
24061  *
24062  * When distributing Covered Code, include this CDDL HEADER in each
24063  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24064  * If applicable, add the following below this CDDL HEADER, with the
24065  * fields enclosed by brackets "[]" replaced with your own identifying
24066  * information: Portions Copyright [yyyy] [name of copyright owner]
24067  *
24068  * CDDL HEADER END
24069  */
24070 
24071 /*
24072  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24073  * Use is subject to license terms.
24074  * Copyright 2016 Joyent, Inc.
24075  */
24076 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 2
24077 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
24078 /*
24079  * XXX	Ick.  This type needs to be visible outside the above guard because
24080  * the proc structure is visible outside the _KERNEL | _KMEMUSER guard.
24081  * If we can make proc internals less visible, (which we obviously should)
24082  * then this can be invisible too.
24083  */
24084 typedef unsigned int model_t;
24085 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
24086 
24087 
24088 
24089 
24090 
24091 /*
24092  * Data queue.
24093  *
24094  * NOTE: The *only* public fields are documented in queue(9S).
24095  *       Everything else is implementation-private.
24096  *
24097  * The locking rules for the queue_t structure are extremely subtle and vary
24098  * widely depending on the field in question.  As such, each field is
24099  * annotated according to the following legend:
24100  *
24101  *   Q9S: The field is documented in queue(9S) and may be accessed without
24102  *        locks by a STREAMS module when inside an entry point (e.g., put(9E)).
24103  *        However, no fields can be directly modified unless q_lock is held
24104  *        (which is not possible in a DDI compliant STREAMS module), with the
24105  *        following exceptions:
24106  *
24107  *	   - q_ptr: can be modified as per the rules of the STREAMS module.
24108  *		    The STREAMS framework ignores q_ptr and thus imposes *no*
24109  *		    locking rules on it.
24110  *         - q_qinfo: can be modified before qprocson().
24111  *
24112  *	   - q_minpsz, q_maxpsz, q_hiwat, q_lowat: can be modified as per the
24113  *		    rules of the STREAMS module.  The STREAMS framework never
24114  *		    modifies these fields, and is tolerant of temporarily
24115  *		    stale field values.
24116  *
24117  *	  In general, the STREAMS framework employs one of the following
24118  *	  techniques to ensure STREAMS modules can safely access Q9S fields:
24119  *
24120  *	   - The field is only modified by the framework when the stream is
24121  *	     locked with strlock() (q_next).
24122  *
24123  *	   - The field is modified by the framework, but the modifies are
24124  *	     atomic, and temporarily stale values are harmless (q_count,
24125  *	     q_first, q_last).
24126  *
24127  *	   - The field is modified by the framework, but the field's visible
24128  *	     values are either constant or directly under the control
24129  *	     of the STREAMS module itself (q_flag).
24130  *
24131  *   QLK: The field must be accessed or modified under q_lock, except when
24132  *        the stream has been locked with strlock().  If multiple q_locks must
24133  *        be acquired, q_locks at higher addresses must be taken first.
24134  *
24135  *   STR: The field can be accessed without a lock, but must be modified under
24136  *	  strlock().
24137  *
24138  *   SQLK: The field must be accessed or modified under SQLOCK().
24139  *
24140  *   NOLK: The field can be accessed without a lock, but can only be modified
24141  *	   when the queue_t is not known to any other threads.
24142  *
24143  *   SVLK: The field must be accessed or modified under the service_queue lock.
24144  *         Note that service_lock must be taken after any needed q_locks,
24145  *	   and that no other lock should be taken while service_lock is held.
24146  *
24147  * In addition, it is always acceptable to modify a field that is not yet
24148  * known to any other threads -- and other special case exceptions exist in
24149  * the code.  Also, q_lock is used with q_wait to implement a stream head
24150  * monitor for reads and writes.
24151  */
24152 typedef struct queue {
24153  struct qinit *q_qinfo; /* Q9S: Q processing procedure  */
24154  struct msgb *q_first; /* Q9S: first message in Q	*/
24155  struct msgb *q_last; /* Q9S: last message in Q	*/
24156  struct queue *q_next; /* Q9S: next Q in stream	*/
24157  struct queue *q_link; /* SVLK: next Q for scheduling	*/
24158  void *q_ptr; /* Q9S: module-specific data	*/
24159  size_t q_count; /* Q9S: number of bytes on Q	*/
24160  uint_t q_flag; /* Q9S: Q state			*/
24161  ssize_t q_minpsz; /* Q9S: smallest packet OK on Q */
24162  ssize_t q_maxpsz; /* Q9S: largest packet OK on Q	*/
24163  size_t q_hiwat; /* Q9S: Q high water mark	*/
24164  size_t q_lowat; /* Q9S: Q low water mark	*/
24165  struct qband *q_bandp; /* QLK: band flow information	*/
24166  kmutex_t q_lock; /* NOLK: structure lock		*/
24167  struct stdata *q_stream; /* NOLK: stream backpointer	*/
24168  struct syncq *q_syncq; /* NOLK: associated syncq 	*/
24169  unsigned char q_nband; /* QLK: number of bands		*/
24170  kcondvar_t q_wait; /* NOLK: read/write sleep CV	*/
24171  struct queue *q_nfsrv; /* STR: next Q with svc routine */
24172  ushort_t q_draining; /* QLK: Q is draining		*/
24173  short q_struiot; /* QLK: sync streams Q UIO mode	*/
24174  clock_t q_qtstamp; /* QLK: when Q was enabled	*/
24175  size_t q_mblkcnt; /* QLK: mblk count		*/
24176  uint_t q_syncqmsgs; /* QLK: syncq message count	*/
24177  size_t q_rwcnt; /* QLK: # threads in rwnext()	*/
24178  pri_t q_spri; /* QLK: Q scheduling priority	*/
24179 
24180  /*
24181 	 * Syncq scheduling
24182 	 */
24183  struct msgb *q_sqhead; /* QLK: first syncq message	*/
24184  struct msgb *q_sqtail; /* QLK: last syncq message 	*/
24185  struct queue *q_sqnext; /* SQLK: next Q on syncq list	*/
24186  struct queue *q_sqprev; /* SQLK: prev Q on syncq list 	*/
24187  uint_t q_sqflags; /* SQLK: syncq flags		*/
24188  clock_t q_sqtstamp; /* SQLK: when Q was scheduled for sq */
24189 
24190  /*
24191 	 * NOLK: Reference to the queue's module's implementation
24192 	 * structure. This will be NULL for queues associated with drivers.
24193 	 */
24194  struct fmodsw_impl *q_fp;
24195 } queue_t;
24196 
24197 /*
24198  * Queue flags; unused flags not documented in queue(9S) can be recycled.
24199  */
24200 # 169 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24201 /*	UNUSED		0x00000200	   was QHLIST			*/
24202 /* 	UNUSED 		0x00000400	   was QUNSAFE			*/
24203 
24204 
24205 
24206 
24207 
24208 
24209      /* all MT type flags		*/
24210 
24211 
24212 
24213 
24214 
24215 
24216 /*	UNUSED		0x00400000	   was QHOT			*/
24217 /*	UNUSED		0x00800000	   was QNEXTHOT			*/
24218 /* 	UNUSED		0x01000000	   was _QNEXTLESS		*/
24219 
24220 
24221 
24222 
24223      /* direct interface to/from sockfs */
24224 
24225 /* queue sqflags (protected by SQLOCK). */
24226 
24227 
24228      /* This is also noted by the	*/
24229      /* q_draining field, but this one is */
24230      /* protected by SQLOCK */
24231 
24232 /*
24233  * Structure that describes the separate information
24234  * for each priority band in the queue.
24235  */
24236 typedef struct qband {
24237  struct qband *qb_next; /* next band's info */
24238  size_t qb_count; /* number of bytes in band */
24239  struct msgb *qb_first; /* beginning of band's data */
24240  struct msgb *qb_last; /* end of band's data */
24241  size_t qb_hiwat; /* high water mark for band */
24242  size_t qb_lowat; /* low water mark for band */
24243  uint_t qb_flag; /* see below */
24244  size_t qb_mblkcnt; /* mblk counter for runaway msgs */
24245 } qband_t;
24246 
24247 /*
24248  * qband flags
24249  */
24250 
24251 
24252 
24253 
24254 /*
24255  * Maximum number of bands.
24256  */
24257 
24258 
24259 /*
24260  * Fields that can be manipulated through strqset() and strqget().
24261  */
24262 typedef enum qfields {
24263  QHIWAT = 0, /* q_hiwat or qb_hiwat */
24264  QLOWAT = 1, /* q_lowat or qb_lowat */
24265  QMAXPSZ = 2, /* q_maxpsz */
24266  QMINPSZ = 3, /* q_minpsz */
24267  QCOUNT = 4, /* q_count or qb_count */
24268  QFIRST = 5, /* q_first or qb_first */
24269  QLAST = 6, /* q_last or qb_last */
24270  QFLAG = 7, /* q_flag or qb_flag */
24271  QSTRUIOT = 8, /* q_struiot */
24272  QBAD = 9
24273 } qfields_t;
24274 
24275 /*
24276  * Module information structure
24277  */
24278 struct module_info {
24279  ushort_t mi_idnum; /* module id number */
24280  char *mi_idname; /* module name */
24281  ssize_t mi_minpsz; /* min packet size accepted */
24282  ssize_t mi_maxpsz; /* max packet size accepted */
24283  size_t mi_hiwat; /* hi-water mark */
24284  size_t mi_lowat; /* lo-water mark */
24285 };
24286 
24287 /*
24288  * queue information structure (with Synchronous STREAMS extensions)
24289  */
24290 struct qinit {
24291  int (*qi_putp)(); /* put procedure */
24292  int (*qi_srvp)(); /* service procedure */
24293  int (*qi_qopen)(); /* called on startup */
24294  int (*qi_qclose)(); /* called on finish */
24295  int (*qi_qadmin)(); /* for future use */
24296  struct module_info *qi_minfo; /* module information structure */
24297  struct module_stat *qi_mstat; /* module statistics structure */
24298  int (*qi_rwp)(); /* r/w procedure */
24299  int (*qi_infop)(); /* information procedure */
24300  int qi_struiot; /* stream uio type for struio() */
24301 };
24302 
24303 /*
24304  * Values for qi_struiot and q_struiot:
24305  */
24306 
24307 
24308 
24309 
24310 /*
24311  * Streamtab (used in cdevsw and fmodsw to point to module or driver)
24312  */
24313 struct streamtab {
24314  struct qinit *st_rdinit;
24315  struct qinit *st_wrinit;
24316  struct qinit *st_muxrinit;
24317  struct qinit *st_muxwinit;
24318 };
24319 
24320 /*
24321  * Structure sent to mux drivers to indicate a link.
24322  */
24323 struct linkblk {
24324  queue_t *l_qtop; /* lowest level write queue of upper stream */
24325     /* (set to NULL for persistent links) */
24326  queue_t *l_qbot; /* highest level write queue of lower stream */
24327  int l_index; /* index for lower stream. */
24328 };
24329 
24330 /*
24331  * Esballoc data buffer freeing routine
24332  */
24333 typedef struct free_rtn {
24334  void (*free_func)();
24335  caddr_t free_arg;
24336 } frtn_t;
24337 
24338 /*
24339  * Data block descriptor
24340  *
24341  * NOTE: db_base, db_lim, db_ref and db_type are the *only* public fields,
24342  * as described in datab(9S).  Everything else is implementation-private.
24343  */
24344 
24345 
24346 
24347 typedef struct datab {
24348  frtn_t *db_frtnp;
24349  unsigned char *db_base;
24350  unsigned char *db_lim;
24351  unsigned char db_ref;
24352  unsigned char db_type;
24353  unsigned char db_flags;
24354  unsigned char db_struioflag;
24355  pid_t db_cpid; /* cached pid, needs verification */
24356  void *db_cache; /* kmem cache descriptor */
24357  struct msgb *db_mblk;
24358  void (*db_free)(struct msgb *, struct datab *);
24359  void (*db_lastfree)(struct msgb *, struct datab *);
24360  intptr_t db_cksumstart;
24361  intptr_t db_cksumend;
24362  intptr_t db_cksumstuff;
24363  union {
24364   double enforce_alignment;
24365   unsigned char data[8];
24366   struct {
24367    union {
24368     uint32_t u32;
24369     uint16_t u16;
24370    } cksum_val; /* used to store calculated cksum */
24371    uint16_t flags;
24372    uint16_t pad;
24373   } cksum;
24374   /*
24375 		 * Union used for future extensions (pointer to data ?).
24376 		 */
24377  } db_struioun;
24378  struct fthdr *db_fthdr;
24379  cred_t *db_credp; /* credential */
24380 } dblk_t;
24381 
24382 
24383 
24384 
24385 /*
24386  * Accessor macros for private dblk_t fields (the rest are in <sys/strsun.h>).
24387  */
24388 
24389 
24390 
24391 /*
24392  * Used by GLDv2 to store the TCI information.
24393  */
24394 
24395 
24396 /*
24397  * Message block descriptor
24398  */
24399 typedef struct msgb {
24400  struct msgb *b_next;
24401  struct msgb *b_prev;
24402  struct msgb *b_cont;
24403  unsigned char *b_rptr;
24404  unsigned char *b_wptr;
24405  struct datab *b_datap;
24406  unsigned char b_band;
24407  unsigned char b_tag;
24408  unsigned short b_flag;
24409  queue_t *b_queue; /* for sync queues */
24410 } mblk_t;
24411 
24412 /*
24413  * bcache descriptor
24414  */
24415 typedef struct bcache {
24416  kmutex_t mutex;
24417  struct kmem_cache *buffer_cache;
24418  struct kmem_cache *dblk_cache;
24419  int alloc;
24420  int destroy;
24421  size_t size;
24422  uint_t align;
24423 } bcache_t;
24424 
24425 /*
24426  * db_flags values (all implementation private!)
24427  */
24428 
24429 
24430 
24431 
24432 /*
24433  * db_struioflag values:
24434  */
24435 
24436 
24437 
24438 
24439 
24440 
24441 /*
24442  * Message flags.  These are interpreted by the stream head.
24443  */
24444 
24445 
24446     /* write side of stream */
24447 
24448 /*	UNUSED		0x08	   was MSGNOGET (can be recycled) */
24449 
24450 
24451 
24452 
24453 /*
24454  * Streams message types.
24455  */
24456 
24457 /*
24458  * Data and protocol messages (regular and priority)
24459  */
24460 
24461 
24462 
24463 
24464 /*
24465  * Control messages (regular and priority)
24466  */
24467 # 445 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24468 /*
24469  * Control messages (high priority; go to head of queue)
24470  */
24471 # 468 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24472 /*
24473  * Queue message class definitions.
24474  */
24475 
24476 
24477 
24478 /*
24479  *  IOCTL structure - this structure is the format of the M_IOCTL message type.
24480  */
24481 # 488 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24482 struct iocblk {
24483  int ioc_cmd; /* ioctl command type */
24484  cred_t *ioc_cr; /* full credentials */
24485  uint_t ioc_id; /* ioctl id */
24486  size_t ioc_count; /* count of bytes in data field */
24487  int ioc_error; /* error code */
24488  int ioc_rval; /* return value  */
24489  int ioc_fill1;
24490  uint_t ioc_flag; /* see below */
24491  int ioc_filler[2]; /* reserved for future use */
24492 };
24493 
24494 
24495 typedef struct iocblk *IOCP;
24496 
24497 /* {ioc,cp}_flags values */
24498 
24499 
24500 
24501 
24502 
24503 
24504 
24505 /*
24506  *	Is the ioctl data formatted for our native model?
24507  */
24508 
24509 
24510 
24511 /*
24512  * structure for the M_COPYIN and M_COPYOUT message types.
24513  */
24514 # 531 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24515 struct copyreq {
24516  int cq_cmd; /* ioctl command (from ioc_cmd) */
24517  cred_t *cq_cr; /* full credentials */
24518  uint_t cq_id; /* ioctl id (from ioc_id) */
24519  caddr_t cq_addr; /* address to copy data to/from */
24520  size_t cq_size; /* number of bytes to copy */
24521  uint_t cq_flag; /* must be zero */
24522  mblk_t *cq_private; /* private state information */
24523  int cq_filler[4]; /* reserved for future use */
24524 };
24525 
24526 
24527 /*
24528  * structure for the M_IOCDATA message type.
24529  */
24530 # 557 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24531 struct copyresp {
24532  int cp_cmd; /* ioctl command (from ioc_cmd) */
24533  cred_t *cp_cr; /* full credentials */
24534  uint_t cp_id; /* ioctl id (from ioc_id) */
24535  caddr_t cp_rval; /* status of request: 0 -> success */
24536      /* 		non-zero -> failure */
24537  size_t cp_pad1;
24538  uint_t cp_pad2;
24539  mblk_t *cp_private; /* private state information */
24540  uint_t cp_flag; /* datamodel IOC_ flags; see above */
24541  int cp_filler[3];
24542 };
24543 
24544 
24545 /*
24546  * Since these structures are all intended to travel in the same message
24547  * at different stages of a STREAMS ioctl, this union is used to determine
24548  * the message size in strdoioctl().
24549  */
24550 union ioctypes {
24551  struct iocblk iocblk;
24552  struct copyreq copyreq;
24553  struct copyresp copyresp;
24554 };
24555 
24556 /*
24557  * Options structure for M_SETOPTS message.  This is sent upstream
24558  * by a module or driver to set stream head options.
24559  */
24560 struct stroptions {
24561  uint_t so_flags; /* options to set */
24562  short so_readopt; /* read option */
24563  ushort_t so_wroff; /* write offset */
24564  ssize_t so_minpsz; /* minimum read packet size */
24565  ssize_t so_maxpsz; /* maximum read packet size */
24566  size_t so_hiwat; /* read queue high water mark */
24567  size_t so_lowat; /* read queue low water mark */
24568  unsigned char so_band; /* band for water marks */
24569  ushort_t so_erropt; /* error option */
24570  ssize_t so_maxblk; /* maximum message block size */
24571  ushort_t so_copyopt; /* copy options (see stropts.h) */
24572  ushort_t so_tail; /* space available at the end */
24573 };
24574 
24575 /* flags for stream options set message */
24576 # 673 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24577 /*
24578  * Miscellaneous parameters and flags.
24579  */
24580 
24581 /*
24582  * Values for stream flag in open to indicate module open, clone open,
24583  * and the return value for failure.
24584  */
24585 
24586 
24587 
24588 
24589 /*
24590  * Priority definitions for block allocation.
24591  */
24592 
24593 
24594 
24595 
24596 /*
24597  * Value for packet size that denotes infinity
24598  */
24599 
24600 
24601 /*
24602  * Flags for flushq()
24603  */
24604 
24605 
24606 
24607 /*
24608  * Flag for transparent ioctls
24609  */
24610 
24611 
24612 /*
24613  * Stream head default high/low water marks
24614  */
24615 
24616 
24617 
24618 /*
24619  * qwriter perimeter types
24620  */
24621 
24622 
24623 
24624 /*
24625  * Definitions of Streams macros and function interfaces.
24626  */
24627 
24628 /*
24629  * canenable - check if queue can be enabled by putq().
24630  */
24631 
24632 
24633 /*
24634  * Test if data block type is one of the data messages (i.e. not a control
24635  * message).
24636  */
24637 
24638 
24639 
24640 
24641 
24642 
24643 
24644 /*
24645  * Extract queue class of message block.
24646  */
24647 
24648 
24649 /*
24650  * Align address on next lower word boundary.
24651  */
24652 
24653 
24654 /*
24655  * Find the max size of data block.
24656  */
24657 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
24658 
24659 /*
24660  * Symbols such as htonl() are required to be exposed through this file,
24661  * per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
24662  */
24663 
24664 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 1
24665 /*
24666  * CDDL HEADER START
24667  *
24668  * The contents of this file are subject to the terms of the
24669  * Common Development and Distribution License (the "License").
24670  * You may not use this file except in compliance with the License.
24671  *
24672  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24673  * or http://www.opensolaris.org/os/licensing.
24674  * See the License for the specific language governing permissions
24675  * and limitations under the License.
24676  *
24677  * When distributing Covered Code, include this CDDL HEADER in each
24678  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24679  * If applicable, add the following below this CDDL HEADER, with the
24680  * fields enclosed by brackets "[]" replaced with your own identifying
24681  * information: Portions Copyright [yyyy] [name of copyright owner]
24682  *
24683  * CDDL HEADER END
24684  */
24685 
24686 /*
24687  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24688  * Use is subject to license terms.
24689  */
24690 
24691 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
24692 /*	  All Rights Reserved  	*/
24693 
24694 /*
24695  * University Copyright- Copyright (c) 1982, 1986, 1988
24696  * The Regents of the University of California
24697  * All Rights Reserved
24698  *
24699  * University Acknowledgment- Portions of this document are derived from
24700  * software developed by the University of California, Berkeley, and its
24701  * contributors.
24702  */
24703 
24704 
24705 
24706 
24707 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
24708 /*
24709  * CDDL HEADER START
24710  *
24711  * The contents of this file are subject to the terms of the
24712  * Common Development and Distribution License (the "License").
24713  * You may not use this file except in compliance with the License.
24714  *
24715  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24716  * or http://www.opensolaris.org/os/licensing.
24717  * See the License for the specific language governing permissions
24718  * and limitations under the License.
24719  *
24720  *
24721  * When distributing Covered Code, include this CDDL HEADER in each
24722  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24723  * If applicable, add the following below this CDDL HEADER, with the
24724  * fields enclosed by brackets "[]" replaced with your own identifying
24725  * information: Portions Copyright [yyyy] [name of copyright owner]
24726  *
24727  * CDDL HEADER END
24728  */
24729 
24730 /*
24731  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24732  * Use is subject to license terms.
24733  * Copyright 2016 Joyent, Inc.
24734  */
24735 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
24736 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
24737 /*
24738  * CDDL HEADER START
24739  *
24740  * The contents of this file are subject to the terms of the
24741  * Common Development and Distribution License, Version 1.0 only
24742  * (the "License").  You may not use this file except in compliance
24743  * with the License.
24744  *
24745  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24746  * or http://www.opensolaris.org/os/licensing.
24747  * See the License for the specific language governing permissions
24748  * and limitations under the License.
24749  *
24750  * When distributing Covered Code, include this CDDL HEADER in each
24751  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24752  * If applicable, add the following below this CDDL HEADER, with the
24753  * fields enclosed by brackets "[]" replaced with your own identifying
24754  * information: Portions Copyright [yyyy] [name of copyright owner]
24755  *
24756  * CDDL HEADER END
24757  */
24758 /*
24759  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24760  *
24761  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24762  * Use is subject to license terms.
24763  */
24764 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
24765 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24766 /*
24767  * macros for conversion between host and (internet) network byte order
24768  */
24769 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24770 typedef uint16_t in_port_t;
24771 
24772 
24773 
24774 
24775 typedef uint32_t in_addr_t;
24776 
24777 
24778 
24779 extern uint32_t htonl(uint32_t);
24780 extern uint16_t htons(uint16_t);
24781 extern uint32_t ntohl(uint32_t);
24782 extern uint16_t ntohs(uint16_t);
24783 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24784 extern uint64_t htonll(uint64_t);
24785 extern uint64_t ntohll(uint64_t);
24786 
24787 
24788 
24789 
24790 
24791 
24792 /*
24793  * Macros to reverse byte order
24794  */
24795 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24796 /*
24797  * Macros to convert from a specific byte order to/from native byte order
24798  */
24799 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24800 /*
24801  * Macros to read unaligned values from a specific byte order to
24802  * native byte order
24803  */
24804 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24805 /*
24806  * Macros to write unaligned values from native byte order to a specific byte
24807  * order.
24808  */
24809 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
24810 
24811 
24812 
24813 
24814 
24815 
24816 
24817 /*
24818  * Note: IPv4 address data structures usage conventions.
24819  * The "in_addr_t" type below (required by Unix standards)
24820  * is NOT a typedef of "struct in_addr" and violates the usual
24821  * conventions where "struct <name>" and <name>_t are corresponding
24822  * typedefs.
24823  * To minimize confusion, kernel data structures/usage prefers use
24824  * of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
24825  * The user level APIs continue to follow the historic popular
24826  * practice of using "struct in_addr".
24827  */
24828 
24829 
24830 
24831 
24832 
24833 
24834 
24835 typedef uint32_t ipaddr_t;
24836 
24837 
24838 
24839 
24840 struct in6_addr {
24841  union {
24842   /*
24843 		 * Note: Static initalizers of "union" type assume
24844 		 * the constant on the RHS is the type of the first member
24845 		 * of union.
24846 		 * To make static initializers (and efficient usage) work,
24847 		 * the order of members exposed to user and kernel view of
24848 		 * this data structure is different.
24849 		 * User environment sees specified uint8_t type as first
24850 		 * member whereas kernel sees most efficient type as
24851 		 * first member.
24852 		 */
24853 
24854 
24855 
24856 
24857   uint8_t _S6_u8[16]; /* IPv6 address */
24858   uint32_t _S6_u32[4]; /* IPv6 address */
24859 
24860   uint32_t __S6_align; /* Align on 32 bit boundary */
24861  } _S6_un;
24862 };
24863 
24864 
24865 
24866 
24867 
24868 
24869 
24870 typedef struct in6_addr in6_addr_t;
24871 # 144 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24872 /*
24873  * Protocols
24874  *
24875  * Some of these constant names are copied for the DTrace IP provider in
24876  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
24877  * in sync.
24878  */
24879 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24880       /* Transmission Protocol */
24881 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24882 /*
24883  * Port/socket numbers: network standard functions
24884  *
24885  * Entries should exist here for each port number compiled into an ON
24886  * component, such as snoop.
24887  */
24888 # 208 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24889 /*
24890  * Port/socket numbers: host specific functions
24891  */
24892 # 229 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24893 /*
24894  * Internet Key Exchange (IKE) ports
24895  */
24896 
24897 
24898 
24899 /*
24900  * UNIX TCP sockets
24901  */
24902 
24903 
24904 
24905 
24906 
24907 
24908 /*
24909  * UNIX UDP sockets
24910  */
24911 
24912 
24913 
24914 
24915 
24916 
24917 
24918 /*
24919  * DHCPv6 UDP ports
24920  */
24921 
24922 
24923 
24924 
24925 
24926 /*
24927  * Ports < IPPORT_RESERVED are reserved for
24928  * privileged processes (e.g. root).
24929  * Ports > IPPORT_USERRESERVED are reserved
24930  * for servers, not necessarily privileged.
24931  */
24932 
24933 
24934 
24935 /*
24936  * Link numbers
24937  */
24938 
24939 
24940 
24941 
24942 /*
24943  * IPv4 Internet address
24944  *	This definition contains obsolete fields for compatibility
24945  *	with SunOS 3.x and 4.2bsd.  The presence of subnets renders
24946  *	divisions into fixed fields misleading at best.  New code
24947  *	should use only the s_addr field.
24948  */
24949 # 293 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24950 struct in_addr {
24951  union {
24952   struct { uint8_t s_b1, s_b2, s_b3, s_b4; } S_un_b;
24953   struct { uint16_t s_w1, s_w2; } S_un_w;
24954 
24955   uint32_t S_addr;
24956 
24957 
24958 
24959  } S_un;
24960 
24961 
24962 
24963 
24964 
24965 
24966 };
24967 
24968 /*
24969  * Definitions of bits in internet address integers.
24970  * On subnets, the decomposition of addresses to host and net parts
24971  * is done according to subnet mask, not the masks here.
24972  *
24973  * Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
24974  * IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
24975  * obsolete". IN_MULTICAST macro should be used to test if a address
24976  * is a multicast address.
24977  */
24978 # 348 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24979 /*
24980  * We have removed CLASS E checks from the kernel
24981  * But we preserve these defines for userland in order
24982  * to avoid compile  breakage of some 3rd party piece of software
24983  */
24984 # 369 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24985 /* Scoped IPv4 prefixes (in host byte-order) */
24986 # 379 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24987 /* RFC 3927 IPv4 link local address (i in host byte-order) */
24988 
24989 
24990 /* Well known 6to4 Relay Router Anycast address defined in RFC 3068 */
24991 
24992 
24993 
24994 
24995 
24996 
24997 /*
24998  * Define a macro to stuff the loopback address into an Internet address
24999  */
25000 
25001 
25002 
25003 
25004 
25005 
25006 /*
25007  * IPv4 Socket address.
25008  */
25009 struct sockaddr_in {
25010  sa_family_t sin_family;
25011  in_port_t sin_port;
25012  struct in_addr sin_addr;
25013 
25014  char sin_zero[8];
25015 
25016 
25017 
25018 };
25019 
25020 
25021 /*
25022  * IPv6 socket address.
25023  */
25024 struct sockaddr_in6 {
25025  sa_family_t sin6_family;
25026  in_port_t sin6_port;
25027  uint32_t sin6_flowinfo;
25028  struct in6_addr sin6_addr;
25029  uint32_t sin6_scope_id; /* Depends on scope of sin6_addr */
25030  uint32_t __sin6_src_id; /* Impl. specific - UDP replies */
25031 };
25032 
25033 /*
25034  * Macros for accessing the traffic class and flow label fields from
25035  * sin6_flowinfo.
25036  * These are designed to be applied to a 32-bit value.
25037  */
25038 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25039 /* masks */
25040 
25041 
25042 
25043 
25044 
25045 /*
25046  * Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
25047  * use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
25048  * only. They need to be different for User/Kernel versions because union
25049  * component data structure is defined differently (it is identical at
25050  * binary representation level).
25051  *
25052  * const struct in6_addr IN6ADDR_ANY_INIT;
25053  * const struct in6_addr IN6ADDR_LOOPBACK_INIT;
25054  */
25055 # 478 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25056 /*
25057  * RFC 2553 specifies the following macros. Their type is defined
25058  * as "int" in the RFC but they only have boolean significance
25059  * (zero or non-zero). For the purposes of our comment notation,
25060  * we assume a hypothetical type "bool" defined as follows to
25061  * write the prototypes assumed for macros in our comments better.
25062  *
25063  * typedef int bool;
25064  */
25065 
25066 /*
25067  * IN6 macros used to test for special IPv6 addresses
25068  * (Mostly from spec)
25069  *
25070  * bool  IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
25071  * bool  IN6_IS_ADDR_LOOPBACK    (const struct in6_addr *);
25072  * bool  IN6_IS_ADDR_MULTICAST   (const struct in6_addr *);
25073  * bool  IN6_IS_ADDR_LINKLOCAL   (const struct in6_addr *);
25074  * bool  IN6_IS_ADDR_SITELOCAL   (const struct in6_addr *);
25075  * bool  IN6_IS_ADDR_V4MAPPED    (const struct in6_addr *);
25076  * bool  IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
25077  * bool  IN6_IS_ADDR_V4COMPAT    (const struct in6_addr *);
25078  * bool  IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
25079  * bool  IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
25080  * bool  IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
25081  * bool  IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
25082  * bool  IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
25083  * bool  IN6_IS_ADDR_MC_GLOBAL   (const struct in6_addr *);
25084  * bool  IN6_IS_ADDR_6TO4	 (const struct in6_addr *); -- Not from RFC2553
25085  * bool  IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
25086  *	     const struct in6_addr *);			    -- Not from RFC2553
25087  * bool  IN6_IS_ADDR_LINKSCOPE	 (const struct in6addr  *); -- Not from RFC2553
25088  */
25089 # 568 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25090 /*
25091  * IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
25092  * Note: This macro is currently NOT defined in RFC2553 specification
25093  * and not a standard macro that portable applications should use.
25094  */
25095 # 587 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25096 /* Exclude loopback and unspecified address */
25097 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25098 /*
25099  * Note:
25100  * IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
25101  * specification and not a standard macro that portable applications
25102  * should use.
25103  */
25104 # 660 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25105 /*
25106  * The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
25107  * RFC, and shouldn't be used by portable applications.  It is used to see
25108  * if an address is a solicited-node multicast address, which is prefixed
25109  * with ff02:0:0:0:0:1:ff00::/104.
25110  */
25111 # 680 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25112 /*
25113  * Macros to a) test for 6to4 IPv6 address, and b) to test if two
25114  * 6to4 addresses have the same /48 prefix, and, hence, are from the
25115  * same 6to4 site.
25116  */
25117 # 699 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25118 /*
25119  * IN6_IS_ADDR_LINKSCOPE
25120  * Identifies an address as being either link-local, link-local multicast or
25121  * node-local multicast.  All types of addresses are considered to be unique
25122  * within the scope of a given link.
25123  */
25124 
25125 
25126 
25127 
25128 /*
25129  * Useful utility macros for operations with IPv6 addresses
25130  * Note: These macros are NOT defined in the RFC2553 or any other
25131  * standard specification and are not standard macros that portable
25132  * applications should use.
25133  */
25134 
25135 /*
25136  * IN6_V4MAPPED_TO_INADDR
25137  * IN6_V4MAPPED_TO_IPADDR
25138  *	Assign a IPv4-Mapped IPv6 address to an IPv4 address.
25139  *	Note: These macros are NOT defined in RFC2553 or any other standard
25140  *	specification and are not macros that portable applications should
25141  *	use.
25142  *
25143  * void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
25144  * void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
25145  *
25146  */
25147 
25148 
25149 
25150 
25151 
25152 /*
25153  * IN6_INADDR_TO_V4MAPPED
25154  * IN6_IPADDR_TO_V4MAPPED
25155  *	Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
25156  *	address.
25157  *	Note: These macros are NOT defined in RFC2553 or any other standard
25158  *	specification and are not macros that portable applications should
25159  *	use.
25160  *
25161  * void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
25162  * void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
25163  *
25164  */
25165 # 770 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25166 /*
25167  * IN6_6TO4_TO_V4ADDR
25168  *	Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
25169  *      address.
25170  *	Note: This macro is NOT defined in RFC2553 or any other standard
25171  *	specification and is not a macro that portable applications should
25172  *	use.
25173  *	Note: we don't use the IPADDR form of the macro because we need
25174  *	to do a bytewise copy; the V4ADDR in the 6to4 address is not
25175  *	32-bit aligned.
25176  *
25177  * void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
25178  *
25179  */
25180 
25181 
25182 
25183 
25184 
25185 
25186 /*
25187  * IN6_V4ADDR_TO_6TO4
25188  *	Given an IPv4 address and an IPv6 address for output, a 6to4 address
25189  *	will be created from the IPv4 Address.
25190  *	Note:  This method for creating 6to4 addresses is not standardized
25191  *	outside of Solaris.  The newly created 6to4 address will be of the form
25192  *	2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
25193  *	HOSTID will equal 1.
25194  *
25195  * void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
25196  *
25197  */
25198 # 828 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25199 /*
25200  * IN6_ARE_ADDR_EQUAL (defined in RFC2292)
25201  *	 Compares if IPv6 addresses are equal.
25202  * Note: Compares in order of high likelyhood of a miss so we minimize
25203  * compares. (Current heuristic order, compare in reverse order of
25204  * uint32_t units)
25205  *
25206  * bool  IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
25207  *			    const struct in6_addr *);
25208  */
25209 
25210 
25211 
25212 
25213 
25214 
25215 /*
25216  * IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
25217  *	Compares if prefixed parts of IPv6 addresses are equal.
25218  *
25219  * uint32_t IN6_MASK_FROM_PREFIX(int, int);
25220  * bool     IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
25221  *				       const struct in6_addr *,
25222  *				       int);
25223  */
25224 # 879 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25225 /*
25226  * Options for use with [gs]etsockopt at the IP level.
25227  *
25228  * Note: Some of the IP_ namespace has conflict with and
25229  * and is exposed through <xti.h>. (It also requires exposing
25230  * options not implemented). The options with potential
25231  * for conflicts use #ifndef guards.
25232  */
25233 # 919 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25234 /*
25235  * IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
25236  * is used to differentiate b/w the two.
25237  */
25238 
25239 
25240 
25241 
25242 
25243 /*
25244  * Different preferences that can be requested from IPSEC protocols.
25245  */
25246 
25247 
25248 
25249 
25250 /*
25251  * This can be used with the setsockopt() call to set per socket security
25252  * options. When the application uses per-socket API, we will reflect
25253  * the request on both outbound and inbound packets.
25254  */
25255 
25256 typedef struct ipsec_req {
25257  uint_t ipsr_ah_req; /* AH request */
25258  uint_t ipsr_esp_req; /* ESP request */
25259  uint_t ipsr_self_encap_req; /* Self-Encap request */
25260  uint8_t ipsr_auth_alg; /* Auth algs for AH */
25261  uint8_t ipsr_esp_alg; /* Encr algs for ESP */
25262  uint8_t ipsr_esp_auth_alg; /* Auth algs for ESP */
25263 } ipsec_req_t;
25264 
25265 /*
25266  * MCAST_* options are protocol-independent.  The actual definitions
25267  * are with the v6 options below; this comment is here to note the
25268  * namespace usage.
25269  *
25270  * #define	MCAST_JOIN_GROUP	0x29
25271  * #define	MCAST_LEAVE_GROUP	0x2a
25272  * #define	MCAST_BLOCK_SOURCE	0x2b
25273  * #define	MCAST_UNBLOCK_SOURCE	0x2c
25274  * #define	MCAST_JOIN_SOURCE_GROUP	0x2d
25275  * #define	MCAST_LEAVE_SOURCE_GROUP 0x2e
25276  */
25277 
25278 
25279 /*
25280  * SunOS private (potentially not portable) IP_ option names
25281  */
25282 
25283 
25284 
25285 /* can be reused		0x44 */
25286 
25287 
25288 /*
25289  * Option values and names (when !_XPG5) shared with <xti_inet.h>
25290  */
25291 # 988 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25292 /*
25293  * The following option values are reserved by <xti_inet.h>
25294  *
25295  * T_IP_OPTIONS	0x107	 -  IP per-packet options
25296  * T_IP_TOS	0x108	 -  IP per packet type of service
25297  */
25298 
25299 /*
25300  * Default value constants for multicast attributes controlled by
25301  * IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
25302  */
25303 
25304 
25305 
25306 
25307 /*
25308  * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
25309  */
25310 struct ip_mreq {
25311  struct in_addr imr_multiaddr; /* IP multicast address of group */
25312  struct in_addr imr_interface; /* local IP address of interface */
25313 };
25314 
25315 /*
25316  * Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
25317  * IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
25318  */
25319 struct ip_mreq_source {
25320  struct in_addr imr_multiaddr; /* IP address of group */
25321  struct in_addr imr_sourceaddr; /* IP address of source */
25322  struct in_addr imr_interface; /* IP address of interface */
25323 };
25324 
25325 /*
25326  * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
25327  * IPv6 addresses.
25328  */
25329 struct ipv6_mreq {
25330  struct in6_addr ipv6mr_multiaddr; /* IPv6 multicast addr */
25331  unsigned int ipv6mr_interface; /* interface index */
25332 };
25333 
25334 /*
25335  * Use #pragma pack() construct to force 32-bit alignment on amd64.
25336  * This is needed to keep the structure size and offsets consistent
25337  * between a 32-bit app and the 64-bit amd64 kernel in structures
25338  * where 64-bit alignment would create gaps (in this case, structures
25339  * which have a uint32_t followed by a struct sockaddr_storage).
25340  */
25341 
25342 
25343 
25344 
25345 /*
25346  * Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
25347  */
25348 struct group_req {
25349  uint32_t gr_interface; /* interface index */
25350  struct sockaddr_storage gr_group; /* group address */
25351 };
25352 
25353 /*
25354  * Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
25355  * MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
25356  */
25357 struct group_source_req {
25358  uint32_t gsr_interface; /* interface index */
25359  struct sockaddr_storage gsr_group; /* group address */
25360  struct sockaddr_storage gsr_source; /* source address */
25361 };
25362 
25363 /*
25364  * Argument for SIOC[GS]MSFILTER ioctls
25365  */
25366 struct group_filter {
25367  uint32_t gf_interface; /* interface index */
25368  struct sockaddr_storage gf_group; /* multicast address */
25369  uint32_t gf_fmode; /* filter mode */
25370  uint32_t gf_numsrc; /* number of sources */
25371  struct sockaddr_storage gf_slist[1]; /* source address */
25372 };
25373 # 1078 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25374 /*
25375  * Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
25376  */
25377 struct ip_msfilter {
25378  struct in_addr imsf_multiaddr; /* IP multicast address of group */
25379  struct in_addr imsf_interface; /* local IP address of interface */
25380  uint32_t imsf_fmode; /* filter mode */
25381  uint32_t imsf_numsrc; /* number of sources in src_list */
25382  struct in_addr imsf_slist[1]; /* start of source list */
25383 };
25384 
25385 
25386 
25387 
25388 
25389 /*
25390  * Multicast source filter manipulation functions in libsocket;
25391  * defined in RFC 3678.
25392  */
25393 int setsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t,
25394    uint_t, struct sockaddr_storage *);
25395 
25396 int getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t *,
25397    uint_t *, struct sockaddr_storage *);
25398 
25399 int setipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t,
25400    uint32_t, struct in_addr *);
25401 
25402 int getipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t *,
25403    uint32_t *, struct in_addr *);
25404 
25405 /*
25406  * Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
25407  */
25408 
25409 
25410 
25411 /*
25412  * Argument struct for IP_PKTINFO option
25413  */
25414 typedef struct in_pktinfo {
25415  unsigned int ipi_ifindex; /* send/recv interface index */
25416  struct in_addr ipi_spec_dst; /* matched source address */
25417  struct in_addr ipi_addr; /* src/dst address in IP hdr */
25418 } in_pktinfo_t;
25419 
25420 /*
25421  * Argument struct for IPV6_PKTINFO option
25422  */
25423 struct in6_pktinfo {
25424  struct in6_addr ipi6_addr; /* src/dst IPv6 address */
25425  unsigned int ipi6_ifindex; /* send/recv interface index */
25426 };
25427 
25428 /*
25429  * Argument struct for IPV6_MTUINFO option
25430  */
25431 struct ip6_mtuinfo {
25432  struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
25433  uint32_t ip6m_mtu; /* path MTU in host byte order */
25434 };
25435 
25436 /*
25437  * IPv6 routing header types
25438  */
25439 
25440 
25441 extern socklen_t inet6_rth_space(int type, int segments);
25442 extern void *inet6_rth_init(void *bp, socklen_t bp_len, int type, int segments);
25443 extern int inet6_rth_add(void *bp, const struct in6_addr *addr);
25444 extern int inet6_rth_reverse(const void *in, void *out);
25445 extern int inet6_rth_segments(const void *bp);
25446 extern struct in6_addr *inet6_rth_getaddr(const void *bp, int index);
25447 
25448 extern int inet6_opt_init(void *extbuf, socklen_t extlen);
25449 extern int inet6_opt_append(void *extbuf, socklen_t extlen, int offset,
25450  uint8_t type, socklen_t len, uint_t align, void **databufp);
25451 extern int inet6_opt_finish(void *extbuf, socklen_t extlen, int offset);
25452 extern int inet6_opt_set_val(void *databuf, int offset, void *val,
25453  socklen_t vallen);
25454 extern int inet6_opt_next(void *extbuf, socklen_t extlen, int offset,
25455  uint8_t *typep, socklen_t *lenp, void **databufp);
25456 extern int inet6_opt_find(void *extbufp, socklen_t extlen, int offset,
25457  uint8_t type, socklen_t *lenp, void **databufp);
25458 extern int inet6_opt_get_val(void *databuf, int offset, void *val,
25459  socklen_t vallen);
25460 
25461 
25462 /*
25463  * Argument structure for IP_ADD_PROXY_ADDR.
25464  * Note that this is an unstable, experimental interface. It may change
25465  * later. Don't use it unless you know what it is.
25466  */
25467 typedef struct {
25468  struct in_addr in_prefix_addr;
25469  unsigned int in_prefix_len;
25470 } in_prefix_t;
25471 
25472 
25473 
25474 /*
25475  * IPv6 options
25476  */
25477 
25478      /* packets. */
25479      /* argument type: uint_t */
25480 
25481      /* multicast packets. */
25482      /* argument type: struct in6_addr */
25483 
25484      /* multicast packets. */
25485      /* argument type: uint_t */
25486 
25487      /* multicast packets on same socket. */
25488      /* argument type: uint_t */
25489 
25490      /* argument type: struct ipv6_mreq */
25491 
25492      /* argument type: struct ipv6_mreq */
25493 
25494 /*
25495  * Other XPG6 constants.
25496  */
25497 
25498      /* decimal notation. */
25499 
25500      /* standard colon-hex notation. */
25501 
25502 
25503 
25504 
25505 
25506 /*
25507  * IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP are being kept
25508  * for backward compatibility. They have the same meaning as IPV6_JOIN_GROUP
25509  * and IPV6_LEAVE_GROUP respectively.
25510  */
25511 
25512      /* argument type: struct ipv6_mreq */
25513 
25514      /* argument type: struct ipv6_mreq */
25515 
25516 
25517      /* arg type: "struct in6_pktingo" - */
25518 
25519 
25520 
25521 
25522      /* the routing header */
25523 
25524 
25525      /* the routing header */
25526 
25527 
25528 
25529 
25530 /*
25531  * This options exists for backwards compatability and should no longer be
25532  * used.  Use IPV6_RECVDSTOPTS instead.
25533  */
25534 
25535 
25536 
25537 
25538 /*
25539  * enable/disable IPV6_RTHDRDSTOPTS.  Now obsolete.  IPV6_RECVDSTOPTS enables
25540  * the receipt of both headers.
25541  */
25542 # 1259 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25543 /*
25544  * enable/disable receipt of both both IPV6_DSTOPTS headers.
25545  */
25546 
25547 
25548 /*
25549  * protocol-independent multicast membership options.
25550  */
25551 
25552 
25553 
25554 
25555 
25556 
25557 
25558 /* 32Bit field for IPV6_SRC_PREFERENCES */
25559 # 1295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25560 /*
25561  * SunOS private (potentially not portable) IPV6_ option names
25562  */
25563 
25564 
25565      /* unspecified (all zeros) */
25566 
25567 /*
25568  * Miscellaneous IPv6 constants.
25569  */
25570 
25571 
25572 
25573 
25574 /*
25575  * Extern declarations for pre-defined global const variables
25576  */
25577 
25578 
25579 
25580 extern const struct in6_addr in6addr_any;
25581 extern const struct in6_addr in6addr_loopback;
25582 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
25583 
25584 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 1
25585 /*
25586  * CDDL HEADER START
25587  *
25588  * The contents of this file are subject to the terms of the
25589  * Common Development and Distribution License (the "License").
25590  * You may not use this file except in compliance with the License.
25591  *
25592  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25593  * or http://www.opensolaris.org/os/licensing.
25594  * See the License for the specific language governing permissions
25595  * and limitations under the License.
25596  *
25597  * When distributing Covered Code, include this CDDL HEADER in each
25598  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25599  * If applicable, add the following below this CDDL HEADER, with the
25600  * fields enclosed by brackets "[]" replaced with your own identifying
25601  * information: Portions Copyright [yyyy] [name of copyright owner]
25602  *
25603  * CDDL HEADER END
25604  */
25605 /*
25606  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25607  *
25608  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
25609  */
25610 
25611 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
25612 /*	  All Rights Reserved	*/
25613 
25614 /*
25615  * University Copyright- Copyright (c) 1982, 1986, 1988
25616  * The Regents of the University of California
25617  * All Rights Reserved
25618  *
25619  * University Acknowledgment- Portions of this document are derived from
25620  * software developed by the University of California, Berkeley, and its
25621  * contributors.
25622  */
25623 
25624 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
25625 
25626 
25627 
25628 
25629 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
25630 /*
25631  * CDDL HEADER START
25632  *
25633  * The contents of this file are subject to the terms of the
25634  * Common Development and Distribution License (the "License").
25635  * You may not use this file except in compliance with the License.
25636  *
25637  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25638  * or http://www.opensolaris.org/os/licensing.
25639  * See the License for the specific language governing permissions
25640  * and limitations under the License.
25641  *
25642  * When distributing Covered Code, include this CDDL HEADER in each
25643  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25644  * If applicable, add the following below this CDDL HEADER, with the
25645  * fields enclosed by brackets "[]" replaced with your own identifying
25646  * information: Portions Copyright [yyyy] [name of copyright owner]
25647  *
25648  * CDDL HEADER END
25649  */
25650 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25651 /*	  All Rights Reserved  	*/
25652 
25653 
25654 /*
25655  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25656  * Use is subject to license terms.
25657  *
25658  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
25659  * Copyright 2016 Joyent, Inc.
25660  */
25661 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25662 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 1
25663 /*
25664  * CDDL HEADER START
25665  *
25666  * The contents of this file are subject to the terms of the
25667  * Common Development and Distribution License (the "License").
25668  * You may not use this file except in compliance with the License.
25669  *
25670  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25671  * or http://www.opensolaris.org/os/licensing.
25672  * See the License for the specific language governing permissions
25673  * and limitations under the License.
25674  *
25675  * When distributing Covered Code, include this CDDL HEADER in each
25676  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25677  * If applicable, add the following below this CDDL HEADER, with the
25678  * fields enclosed by brackets "[]" replaced with your own identifying
25679  * information: Portions Copyright [yyyy] [name of copyright owner]
25680  *
25681  * CDDL HEADER END
25682  */
25683 /*
25684  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25685  *
25686  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
25687  * Use is subject to license terms.
25688  *
25689  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
25690  * Copyright (c) 2015, Joyent, Inc.  All rights reserved.
25691  */
25692 
25693 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25694 /*	  All Rights Reserved  	*/
25695 
25696 /*
25697  * University Copyright- Copyright (c) 1982, 1986, 1988
25698  * The Regents of the University of California
25699  * All Rights Reserved
25700  *
25701  * University Acknowledgment- Portions of this document are derived from
25702  * software developed by the University of California, Berkeley, and its
25703  * contributors.
25704  */
25705 
25706 
25707 
25708 
25709 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
25710 /*
25711  * CDDL HEADER START
25712  *
25713  * The contents of this file are subject to the terms of the
25714  * Common Development and Distribution License (the "License").
25715  * You may not use this file except in compliance with the License.
25716  *
25717  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25718  * or http://www.opensolaris.org/os/licensing.
25719  * See the License for the specific language governing permissions
25720  * and limitations under the License.
25721  *
25722  * When distributing Covered Code, include this CDDL HEADER in each
25723  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25724  * If applicable, add the following below this CDDL HEADER, with the
25725  * fields enclosed by brackets "[]" replaced with your own identifying
25726  * information: Portions Copyright [yyyy] [name of copyright owner]
25727  *
25728  * CDDL HEADER END
25729  */
25730 
25731 /*
25732  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
25733  * Copyright 2016 Joyent, Inc.
25734  *
25735  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25736  * Use is subject to license terms.
25737  */
25738 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
25739 
25740 
25741 
25742 
25743 
25744 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
25745 /*
25746  * CDDL HEADER START
25747  *
25748  * The contents of this file are subject to the terms of the
25749  * Common Development and Distribution License (the "License").
25750  * You may not use this file except in compliance with the License.
25751  *
25752  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25753  * or http://www.opensolaris.org/os/licensing.
25754  * See the License for the specific language governing permissions
25755  * and limitations under the License.
25756  *
25757  * When distributing Covered Code, include this CDDL HEADER in each
25758  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25759  * If applicable, add the following below this CDDL HEADER, with the
25760  * fields enclosed by brackets "[]" replaced with your own identifying
25761  * information: Portions Copyright [yyyy] [name of copyright owner]
25762  *
25763  * CDDL HEADER END
25764  */
25765 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25766 /*	  All Rights Reserved  	*/
25767 
25768 
25769 /*
25770  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25771  * Use is subject to license terms.
25772  *
25773  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
25774  * Copyright 2016 Joyent, Inc.
25775  */
25776 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
25777 
25778 /*
25779  * I/O parameter information.  A uio structure describes the I/O which
25780  * is to be performed by an operation.  Typically the data movement will
25781  * be performed by a routine such as uiomove(), which updates the uio
25782  * structure to reflect what was done.
25783  */
25784 
25785 
25786 
25787 
25788 
25789 
25790 
25791 typedef struct iovec {
25792  caddr_t iov_base;
25793 
25794 
25795 
25796  long iov_len;
25797 
25798 } iovec_t;
25799 # 90 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25800 /*
25801  * Segment flag values.
25802  */
25803 typedef enum uio_seg { UIO_USERSPACE, UIO_SYSSPACE, UIO_USERISPACE } uio_seg_t;
25804 
25805 typedef struct uio {
25806  iovec_t *uio_iov; /* pointer to array of iovecs */
25807  int uio_iovcnt; /* number of iovecs */
25808  lloff_t _uio_offset; /* file offset */
25809  uio_seg_t uio_segflg; /* address space (kernel or user) */
25810  uint16_t uio_fmode; /* file mode flags */
25811  uint16_t uio_extflg; /* extended flags */
25812  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
25813  ssize_t uio_resid; /* residual count */
25814 } uio_t;
25815 
25816 /*
25817  * Extended uio_t uioa_t used for asynchronous uio.
25818  *
25819  * Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
25820  *	 as there isn't a formal definition of IOV_MAX for the kernel.
25821  */
25822 
25823 
25824 typedef struct uioa_page_s { /* locked uio_iov state */
25825  int uioa_pfncnt; /* count of pfn_t(s) in *uioa_ppp */
25826  void **uioa_ppp; /* page_t or pfn_t arrary */
25827  caddr_t uioa_base; /* address base */
25828  size_t uioa_len; /* span length */
25829 } uioa_page_t;
25830 
25831 typedef struct uioa_s {
25832  iovec_t *uio_iov; /* pointer to array of iovecs */
25833  int uio_iovcnt; /* number of iovecs */
25834  lloff_t _uio_offset; /* file offset */
25835  uio_seg_t uio_segflg; /* address space (kernel or user) */
25836  uint16_t uio_fmode; /* file mode flags */
25837  uint16_t uio_extflg; /* extended flags */
25838  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
25839  ssize_t uio_resid; /* residual count */
25840  /*
25841 	 * uioa extended members.
25842 	 */
25843  uint32_t uioa_state; /* state of asynch i/o */
25844  ssize_t uioa_mbytes; /* bytes that have been uioamove()ed */
25845  uioa_page_t *uioa_lcur; /* pointer into uioa_locked[] */
25846  void **uioa_lppp; /* pointer into lcur->uioa_ppp[] */
25847  void *uioa_hwst[4]; /* opaque hardware state */
25848  uioa_page_t uioa_locked[16]; /* Per iov locked pages */
25849 } uioa_t;
25850 
25851 /*
25852  * uio extensions
25853  *
25854  * PSARC 2009/478: Copy Reduction Interfaces
25855  */
25856 typedef enum xuio_type {
25857  UIOTYPE_ASYNCIO,
25858  UIOTYPE_ZEROCOPY
25859 } xuio_type_t;
25860 
25861 typedef struct xuio {
25862  uio_t xu_uio; /* Embedded UIO structure */
25863 
25864  /* Extended uio fields */
25865  enum xuio_type xu_type; /* What kind of uio structure? */
25866  union {
25867   /* Async I/O Support, intend to replace uioa_t. */
25868   struct {
25869    uint32_t xu_a_state; /* state of async i/o */
25870    /* bytes that have been uioamove()ed */
25871    ssize_t xu_a_mbytes;
25872    uioa_page_t *xu_a_lcur; /* pointer into uioa_locked[] */
25873    /* pointer into lcur->uioa_ppp[] */
25874    void **xu_a_lppp;
25875    void *xu_a_hwst[4]; /* opaque hardware state */
25876    /* Per iov locked pages */
25877    uioa_page_t xu_a_locked[16];
25878   } xu_aio;
25879 
25880   /*
25881 		 * Copy Reduction Support -- facilate loaning / returning of
25882 		 * filesystem cache buffers.
25883 		 */
25884   struct {
25885    int xu_zc_rw; /* read or write buffer */
25886    void *xu_zc_priv; /* fs specific */
25887   } xu_zc;
25888  } xu_ext;
25889 } xuio_t;
25890 # 207 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25891 /*
25892  * I/O direction.
25893  */
25894 typedef enum uio_rw { UIO_READ, UIO_WRITE } uio_rw_t;
25895 
25896 /*
25897  * uio_extflg: extended flags
25898  *
25899  * NOTE: This flag will be used in uiomove to determine if non-temporal
25900  * access, ie, access bypassing caches, should be used.  Filesystems that
25901  * don't initialize this field could experience suboptimal performance due to
25902  * the random data the field contains.
25903  *
25904  * NOTE: This flag is also used by uioasync callers to pass an extended
25905  * uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
25906  * consumers of a uioa_t require the uio_extflg to be initialized.
25907  */
25908 
25909 
25910 
25911 
25912 
25913 
25914 /*
25915  * Global uioasync capability shadow state.
25916  */
25917 typedef struct uioasync_s {
25918  boolean_t enabled; /* Is uioasync enabled? */
25919  size_t mincnt; /* Minimum byte count for use of */
25920 } uioasync_t;
25921 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25922 extern ssize_t readv(int, const struct iovec *, int);
25923 extern ssize_t writev(int, const struct iovec *, int);
25924 
25925 /*
25926  * When in the large file compilation environment,
25927  * map preadv/pwritev to their 64 bit offset versions
25928  */
25929 
25930 
25931 
25932 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25933 #pragma redefine_extname preadv preadv64
25934 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25935 
25936 
25937 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25938 #pragma redefine_extname pwritev pwritev64
25939 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25940 
25941 
25942 
25943 
25944 
25945 
25946 
25947 /* In the LP64 compilation environment, the APIs are already large file */
25948 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25949 extern ssize_t preadv(int, const struct iovec *, int, off_t);
25950 extern ssize_t pwritev(int, const struct iovec *, int, off_t);
25951 
25952 /*
25953  * preadv64 and pwritev64 should be defined when:
25954  * - Using the transitional compilation environment, and not
25955  *     the large file compilation environment.
25956  */
25957 
25958 
25959 extern ssize_t preadv64(int, const struct iovec *, int, off64_t);
25960 extern ssize_t pwritev64(int, const struct iovec *, int, off64_t);
25961 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25962 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
25963 /*
25964  * CDDL HEADER START
25965  *
25966  * The contents of this file are subject to the terms of the
25967  * Common Development and Distribution License (the "License").
25968  * You may not use this file except in compliance with the License.
25969  *
25970  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25971  * or http://www.opensolaris.org/os/licensing.
25972  * See the License for the specific language governing permissions
25973  * and limitations under the License.
25974  *
25975  * When distributing Covered Code, include this CDDL HEADER in each
25976  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25977  * If applicable, add the following below this CDDL HEADER, with the
25978  * fields enclosed by brackets "[]" replaced with your own identifying
25979  * information: Portions Copyright [yyyy] [name of copyright owner]
25980  *
25981  * CDDL HEADER END
25982  */
25983 
25984 /*
25985  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
25986  * Copyright 2016 Joyent, Inc.
25987  *
25988  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25989  * Use is subject to license terms.
25990  */
25991 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25992 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
25993 /*
25994  * CDDL HEADER START
25995  *
25996  * The contents of this file are subject to the terms of the
25997  * Common Development and Distribution License (the "License").
25998  * You may not use this file except in compliance with the License.
25999  *
26000  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26001  * or http://www.opensolaris.org/os/licensing.
26002  * See the License for the specific language governing permissions
26003  * and limitations under the License.
26004  *
26005  * When distributing Covered Code, include this CDDL HEADER in each
26006  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26007  * If applicable, add the following below this CDDL HEADER, with the
26008  * fields enclosed by brackets "[]" replaced with your own identifying
26009  * information: Portions Copyright [yyyy] [name of copyright owner]
26010  *
26011  * CDDL HEADER END
26012  */
26013 /*
26014  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26015  * Use is subject to license terms.
26016  */
26017 
26018 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
26019 /*	  All Rights Reserved	*/
26020 
26021 /*
26022  * Portions of this source code were derived from Berkeley 4.3 BSD
26023  * under license from the Regents of the University of California.
26024  */
26025 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
26026 
26027 
26028 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h" 1
26029 /*
26030  * CDDL HEADER START
26031  *
26032  * The contents of this file are subject to the terms of the
26033  * Common Development and Distribution License, Version 1.0 only
26034  * (the "License").  You may not use this file except in compliance
26035  * 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 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26051 /*	  All Rights Reserved  	*/
26052 
26053 
26054 /*
26055  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
26056  *
26057  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
26058  * Use is subject to license terms.
26059  */
26060 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
26061 struct netconfig {
26062  char *nc_netid; /* network identifier		*/
26063  unsigned int nc_semantics; /* defined below		*/
26064  unsigned int nc_flag; /* defined below		*/
26065  char *nc_protofmly; /* protocol family name		*/
26066  char *nc_proto; /* protocol name		*/
26067  char *nc_device; /* device name for network id	*/
26068  unsigned int nc_nlookups; /* # of entries in nc_lookups	*/
26069  char **nc_lookups; /* list of lookup directories	*/
26070  unsigned int nc_unused[8]; /* borrowed for lockd etc.	*/
26071 };
26072 
26073 typedef struct {
26074  struct netconfig **nc_head;
26075  struct netconfig **nc_curr;
26076 } NCONF_HANDLE;
26077 
26078 /*
26079  *	Values of nc_semantics
26080  */
26081 
26082 
26083 
26084 
26085 
26086 /*
26087  * NOT FOR PUBLIC USE, Solaris internal only.
26088  * This value of nc_semantics is strictly for use of Remote Direct
26089  * Memory Access provider interfaces in Solaris only and not for
26090  * general use. Do not use this value for general purpose user or
26091  * kernel programming. If used the behavior is undefined.
26092  * This is a PRIVATE interface to be used by Solaris kRPC only.
26093  */
26094 
26095 
26096 /*
26097  *	Values of nc_flag
26098  */
26099 
26100 
26101 
26102 
26103 
26104 /*
26105  *	Values of nc_protofmly
26106  */
26107 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
26108 /*
26109  * NOT FOR PUBLIC USE, Solaris internal only.
26110  * This value of nc_semantics is strictly for use of Remote Direct
26111  * Memory Access provider interfaces in Solaris only and not for
26112  * general use. Do not use this value for general purpose user or
26113  * kernel programming. If used the behavior is undefined.
26114  * This is a PRIVATE interface to be used by Solaris kRPC only.
26115  */
26116 
26117 
26118 /*
26119  *	Values for nc_proto
26120  */
26121 
26122 
26123 
26124 
26125 
26126 
26127 /*
26128  * 	Values for nc_proto for "rdma" protofmly
26129  */
26130 
26131 
26132 
26133 
26134 extern void *setnetconfig(void);
26135 extern int endnetconfig(void *);
26136 extern struct netconfig *getnetconfig(void *);
26137 extern struct netconfig *getnetconfigent(const char *);
26138 extern void freenetconfigent(struct netconfig *);
26139 extern void *setnetpath(void);
26140 extern int endnetpath(void *);
26141 extern struct netconfig *getnetpath(void *);
26142 extern void nc_perror(const char *);
26143 extern char *nc_sperror(void);
26144 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
26145 
26146 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
26147 /*
26148  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26149  * Use is subject to license terms.
26150  *
26151  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26152  */
26153 /*
26154  * Copyright (c) 1982, 1986 Regents of the University of California.
26155  * All rights reserved.
26156  *
26157  * Redistribution and use in source and binary forms are permitted
26158  * provided that this notice is preserved and that due credit is given
26159  * to the University of California at Berkeley. The name of the University
26160  * may not be used to endorse or promote products derived from this
26161  * software without specific prior written permission. This software
26162  * is provided ``as is'' without express or implied warranty.
26163  */
26164 
26165 /*
26166  * Constants and structures defined by the internet system,
26167  * according to following documents
26168  *
26169  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
26170  *	http://www.iana.org/assignments/protocol-numbers
26171  *	http://www.iana.org/assignments/port-numbers
26172  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
26173  *
26174  */
26175 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
26176 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26177 /*
26178  * Definitions related to sockets: types, address families, options.
26179  */
26180 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26181 /*
26182  * Types
26183  */
26184 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26185 /*
26186  * Flags for socket() and accept4()
26187  */
26188 
26189 
26190 
26191 
26192 /*
26193  * Option flags per-socket.
26194  */
26195 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26196 /*
26197  * Socket options are passed using a signed integer, but it is also rare
26198  * for more than one to ever be passed at the same time with setsockopt
26199  * and only one at a time can be retrieved with getsockopt.
26200  *
26201  * Since the lower numbers cannot be renumbered for compatibility reasons,
26202  * it would seem that we need to start a new number space (0x40000000 -
26203  * 0x7fffffff) for those that don't need to be stored as a bit flag
26204  * somewhere. This limits the flag options to 30 but that seems to be
26205  * plenty, anyway. 0x40000000 is reserved for future use.
26206  */
26207 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26208 /*
26209  * N.B.: The following definition is present only for compatibility
26210  * with release 3.0.  It will disappear in later releases.
26211  */
26212 
26213 
26214 /*
26215  * Additional options, not kept in so_options.
26216  */
26217 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26218 /* "Socket"-level control message types: */
26219 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26220 /*
26221  * Socket filter options
26222  */
26223 
26224 
26225 
26226 
26227 
26228 /*
26229  * Structure returned by FIL_LIST
26230  */
26231 struct fil_info {
26232  int fi_flags; /* see below (FILF_*) */
26233  int fi_pos; /* position (0 is bottom) */
26234  char fi_name[32]; /* filter name */
26235 };
26236 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26237 /*
26238  * Structure used for manipulating linger option.
26239  */
26240 struct linger {
26241  int l_onoff; /* option on/off */
26242  int l_linger; /* linger time */
26243 };
26244 
26245 /*
26246  * Levels for (get/set)sockopt() that don't apply to a specific protocol.
26247  */
26248 
26249 
26250 
26251 
26252 
26253 
26254 
26255 /*
26256  * Address families.
26257  *
26258  * Some of these constant names are copied for the DTrace IP provider in
26259  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
26260  * in sync.
26261  */
26262 # 300 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26263 /*
26264  * Protocol families, same as address families for now.
26265  */
26266 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26267 /*
26268  * Maximum queue length specifiable by listen.
26269  */
26270 
26271 
26272 /*
26273  * Message header for recvmsg and sendmsg calls.
26274  */
26275 struct msghdr {
26276  void *msg_name; /* optional address */
26277  socklen_t msg_namelen; /* size of address */
26278  struct iovec *msg_iov; /* scatter/gather array */
26279  int msg_iovlen; /* # elements in msg_iov */
26280 
26281 
26282 
26283 
26284 
26285 
26286  caddr_t msg_accrights; /* access rights sent/received */
26287  int msg_accrightslen;
26288 
26289 };
26290 # 412 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26291 /* Added for XPGv2 compliance */
26292 
26293 
26294 
26295 
26296 
26297      /* with left over data */
26298 /* End of XPGv2 compliance */
26299 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26300 /* Added for XPGv2 compliance */
26301 
26302 
26303 
26304 
26305 struct cmsghdr {
26306  socklen_t cmsg_len; /* data byte count, including hdr */
26307  int cmsg_level; /* originating protocol */
26308  int cmsg_type; /* protocol-specific type */
26309 };
26310 # 528 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26311 extern int accept(int, struct sockaddr *, Psocklen_t);
26312 extern int accept4(int, struct sockaddr *, Psocklen_t, int);
26313 extern int bind(int, const struct sockaddr *, socklen_t);
26314 extern int connect(int, const struct sockaddr *, socklen_t);
26315 extern int getpeername(int, struct sockaddr *, Psocklen_t);
26316 extern int getsockname(int, struct sockaddr *, Psocklen_t);
26317 extern int getsockopt(int, int, int, void *, Psocklen_t);
26318 extern int listen(int, int); /* XXX - fixme???  where do I go */
26319 extern int socketpair(int, int, int, int *);
26320 extern ssize_t recv(int, void *, size_t, int);
26321 extern ssize_t recvfrom(int, void *, size_t, int,
26322  struct sockaddr *, Psocklen_t);
26323 extern ssize_t recvmsg(int, struct msghdr *, int);
26324 extern ssize_t send(int, const void *, size_t, int);
26325 extern ssize_t sendmsg(int, const struct msghdr *, int);
26326 extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
26327  socklen_t);
26328 extern int setsockopt(int, int, int, const void *, socklen_t);
26329 extern int shutdown(int, int);
26330 extern int socket(int, int, int);
26331 
26332 
26333 extern int sockatmark(int);
26334 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
26335 
26336 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
26337 /*
26338  * CDDL HEADER START
26339  *
26340  * The contents of this file are subject to the terms of the
26341  * Common Development and Distribution License (the "License").
26342  * You may not use this file except in compliance with the License.
26343  *
26344  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26345  * or http://www.opensolaris.org/os/licensing.
26346  * See the License for the specific language governing permissions
26347  * and limitations under the License.
26348  *
26349  * When distributing Covered Code, include this CDDL HEADER in each
26350  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26351  * If applicable, add the following below this CDDL HEADER, with the
26352  * fields enclosed by brackets "[]" replaced with your own identifying
26353  * information: Portions Copyright [yyyy] [name of copyright owner]
26354  *
26355  * CDDL HEADER END
26356  */
26357 
26358 /*
26359  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
26360  * Copyright 2016 Joyent, Inc.
26361  *
26362  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
26363  * Use is subject to license terms.
26364  */
26365 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
26366 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
26367 struct hostent {
26368  char *h_name; /* official name of host */
26369  char **h_aliases; /* alias list */
26370  int h_addrtype; /* host address type */
26371  int h_length; /* length of address */
26372  char **h_addr_list; /* list of addresses from name server */
26373 
26374 };
26375 
26376 
26377 /*
26378  * addrinfo introduced with IPv6 for Protocol-Independent Hostname
26379  * and Service Name Translation.
26380  */
26381 
26382 
26383 struct addrinfo {
26384  int ai_flags; /* AI_PASSIVE, AI_CANONNAME, ... */
26385  int ai_family; /* PF_xxx */
26386  int ai_socktype; /* SOCK_xxx */
26387  int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
26388 
26389 
26390 
26391  socklen_t ai_addrlen;
26392  char *ai_canonname; /* canonical name for hostname */
26393  struct sockaddr *ai_addr; /* binary address */
26394  struct addrinfo *ai_next; /* next structure in linked list */
26395 };
26396 
26397 /*
26398  * The flag 0x8000 is currently reserved for private use between libnsl and
26399  * libsocket. See lib/libsocket/inet/getaddrinfo.c for more information.
26400  */
26401 /* addrinfo flags */
26402 
26403 
26404 
26405 
26406 
26407 /* getipnodebyname() flags */
26408 
26409 
26410 
26411 
26412 
26413 /*
26414  * These were defined in RFC 2553 but not SUSv3
26415  * or RFC 3493 which obsoleted 2553.
26416  */
26417 
26418 
26419 
26420 /* addrinfo errors */
26421 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
26422 /* getnameinfo flags */
26423 
26424 
26425 
26426 
26427 
26428 
26429 
26430 /* Not listed in any standards document */
26431 
26432 
26433 
26434 /* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */
26435 
26436 
26437 
26438 
26439 
26440 /*
26441  * Scope delimit character
26442  */
26443 
26444 
26445 
26446 /*
26447  * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
26448  * and algorithms.
26449  */
26450 
26451 typedef struct ipsecalgent {
26452  char **a_names; /* algorithm names */
26453  int a_proto_num; /* protocol number */
26454  int a_alg_num; /* algorithm number */
26455  char *a_mech_name; /* encryption framework mechanism name */
26456  int *a_block_sizes; /* supported block sizes */
26457  int *a_key_sizes; /* supported key sizes */
26458  int a_key_increment; /* key size increment */
26459  int *a_mech_params; /* mechanism specific parameters */
26460  int a_alg_flags; /* algorithm flags */
26461 } ipsecalgent_t;
26462 
26463 /* well-known IPsec protocol numbers */
26464 
26465 
26466 
26467 
26468 
26469 /*
26470  * Assumption here is that a network number
26471  * fits in 32 bits -- probably a poor one.
26472  */
26473 struct netent {
26474  char *n_name; /* official name of net */
26475  char **n_aliases; /* alias list */
26476  int n_addrtype; /* net address type */
26477  in_addr_t n_net; /* network # */
26478 };
26479 
26480 struct protoent {
26481  char *p_name; /* official protocol name */
26482  char **p_aliases; /* alias list */
26483  int p_proto; /* protocol # */
26484 };
26485 
26486 struct servent {
26487  char *s_name; /* official service name */
26488  char **s_aliases; /* alias list */
26489  int s_port; /* port # */
26490  char *s_proto; /* protocol to use */
26491 };
26492 
26493 
26494 struct hostent *gethostbyname_r
26495  (const char *, struct hostent *, char *, int, int *h_errnop);
26496 struct hostent *gethostbyaddr_r
26497  (const char *, int, int, struct hostent *, char *, int, int *h_errnop);
26498 struct hostent *getipnodebyname(const char *, int, int, int *);
26499 struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
26500 void freehostent(struct hostent *);
26501 struct hostent *gethostent_r(struct hostent *, char *, int, int *h_errnop);
26502 
26503 struct servent *getservbyname_r
26504  (const char *name, const char *, struct servent *, char *, int);
26505 struct servent *getservbyport_r
26506  (int port, const char *, struct servent *, char *, int);
26507 struct servent *getservent_r(struct servent *, char *, int);
26508 
26509 struct netent *getnetbyname_r
26510  (const char *, struct netent *, char *, int);
26511 struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int);
26512 struct netent *getnetent_r(struct netent *, char *, int);
26513 
26514 struct protoent *getprotobyname_r
26515  (const char *, struct protoent *, char *, int);
26516 struct protoent *getprotobynumber_r
26517  (int, struct protoent *, char *, int);
26518 struct protoent *getprotoent_r(struct protoent *, char *, int);
26519 
26520 int getnetgrent_r(char **, char **, char **, char *, int);
26521 int innetgr(const char *, const char *, const char *, const char *);
26522 
26523 
26524 /* Old interfaces that return a pointer to a static area;  MT-unsafe */
26525 struct hostent *gethostbyname(const char *);
26526 struct hostent *gethostent(void);
26527 struct netent *getnetbyaddr(in_addr_t, int);
26528 struct netent *getnetbyname(const char *);
26529 struct netent *getnetent(void);
26530 struct protoent *getprotobyname(const char *);
26531 struct protoent *getprotobynumber(int);
26532 struct protoent *getprotoent(void);
26533 struct servent *getservbyname(const char *, const char *);
26534 struct servent *getservbyport(int, const char *);
26535 struct servent *getservent(void);
26536 
26537 /* gethostbyaddr() second argument is a size_t only in unix95/unix98 */
26538 
26539 struct hostent *gethostbyaddr(const void *, socklen_t, int);
26540 
26541 
26542 
26543 
26544 
26545 int endhostent(void);
26546 int endnetent(void);
26547 int endprotoent(void);
26548 int endservent(void);
26549 int sethostent(int);
26550 int setnetent(int);
26551 int setprotoent(int);
26552 int setservent(int);
26553 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
26554 int getaddrinfo(const char *,
26555    const char *,
26556    const struct addrinfo *,
26557    struct addrinfo **);
26558 void freeaddrinfo(struct addrinfo *);
26559 const char *gai_strerror(int);
26560 int getnameinfo(const struct sockaddr *,
26561    socklen_t, char *, socklen_t,
26562    char *, socklen_t, int);
26563 
26564 
26565 
26566 int getnetgrent(char **, char **, char **);
26567 int setnetgrent(const char *);
26568 int endnetgrent(void);
26569 int rcmd(char **, unsigned short,
26570  const char *, const char *, const char *, int *);
26571 int rcmd_af(char **, unsigned short,
26572  const char *, const char *, const char *, int *, int);
26573 int rresvport_af(int *, int);
26574 int rresvport_addr(int *, struct sockaddr_storage *);
26575 int rexec(char **, unsigned short,
26576  const char *, const char *, const char *, int *);
26577 int rexec_af(char **, unsigned short,
26578  const char *, const char *, const char *, int *, int);
26579 int rresvport(int *);
26580 int ruserok(const char *, int, const char *, const char *);
26581 /* BIND */
26582 struct hostent *gethostbyname2(const char *, int);
26583 void herror(const char *);
26584 const char *hstrerror(int);
26585 /* End BIND */
26586 
26587 /* IPsec algorithm prototype definitions */
26588 struct ipsecalgent *getipsecalgbyname(const char *, int, int *);
26589 struct ipsecalgent *getipsecalgbynum(int, int, int *);
26590 int getipsecprotobyname(const char *doi_name);
26591 char *getipsecprotobynum(int doi_domain);
26592 void freeipsecalgent(struct ipsecalgent *ptr);
26593 /* END IPsec algorithm prototype definitions */
26594 
26595 
26596 
26597 /*
26598  * Error return codes from gethostbyname() and gethostbyaddr()
26599  * (when using the resolver)
26600  */
26601 
26602 extern int h_errno;
26603 # 377 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
26604 /*
26605  * Error return codes from gethostbyname() and gethostbyaddr()
26606  * (left in extern int h_errno).
26607  */
26608 # 389 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
26609 /* BIND */
26610 
26611 
26612 /* End BIND */
26613 # 46 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
26614 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 1
26615 /*
26616  * CDDL HEADER START
26617  *
26618  * The contents of this file are subject to the terms of the
26619  * Common Development and Distribution License, Version 1.0 only
26620  * (the "License").  You may not use this file except in compliance
26621  * with the License.
26622  *
26623  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26624  * or http://www.opensolaris.org/os/licensing.
26625  * See the License for the specific language governing permissions
26626  * and limitations under the License.
26627  *
26628  * When distributing Covered Code, include this CDDL HEADER in each
26629  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26630  * If applicable, add the following below this CDDL HEADER, with the
26631  * fields enclosed by brackets "[]" replaced with your own identifying
26632  * information: Portions Copyright [yyyy] [name of copyright owner]
26633  *
26634  * CDDL HEADER END
26635  */
26636 /*
26637  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
26638  * Use is subject to license terms.
26639  */
26640 
26641 
26642 
26643 
26644 #pragma ident "%Z%%M%	%I%	%E% SMI"
26645 
26646 
26647 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26648 /*
26649  * CDDL HEADER START
26650  *
26651  * The contents of this file are subject to the terms of the
26652  * Common Development and Distribution License (the "License").
26653  * You may not use this file except in compliance with the License.
26654  *
26655  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26656  * or http://www.opensolaris.org/os/licensing.
26657  * See the License for the specific language governing permissions
26658  * and limitations under the License.
26659  *
26660  * When distributing Covered Code, include this CDDL HEADER in each
26661  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26662  * If applicable, add the following below this CDDL HEADER, with the
26663  * fields enclosed by brackets "[]" replaced with your own identifying
26664  * information: Portions Copyright [yyyy] [name of copyright owner]
26665  *
26666  * CDDL HEADER END
26667  */
26668 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26669 /*	  All Rights Reserved  	*/
26670 
26671 
26672 /*
26673  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26674  * Use is subject to license terms.
26675  *
26676  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26677  * Copyright 2016 Joyent, Inc.
26678  */
26679 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
26680 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
26681 /*
26682  * CDDL HEADER START
26683  *
26684  * The contents of this file are subject to the terms of the
26685  * Common Development and Distribution License, Version 1.0 only
26686  * (the "License").  You may not use this file except in compliance
26687  * with the License.
26688  *
26689  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26690  * or http://www.opensolaris.org/os/licensing.
26691  * See the License for the specific language governing permissions
26692  * and limitations under the License.
26693  *
26694  * When distributing Covered Code, include this CDDL HEADER in each
26695  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26696  * If applicable, add the following below this CDDL HEADER, with the
26697  * fields enclosed by brackets "[]" replaced with your own identifying
26698  * information: Portions Copyright [yyyy] [name of copyright owner]
26699  *
26700  * CDDL HEADER END
26701  */
26702 /*
26703  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
26704  * Use is subject to license terms.
26705  */
26706 
26707 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
26708 /*	  All Rights Reserved  	*/
26709 
26710 /*
26711  * University Copyright- Copyright (c) 1982, 1986, 1988
26712  * The Regents of the University of California
26713  * All Rights Reserved
26714  *
26715  * University Acknowledgment- Portions of this document are derived from
26716  * software developed by the University of California, Berkeley, and its
26717  * contributors.
26718  */
26719 
26720 
26721 
26722 
26723 #pragma ident "%Z%%M%	%I%	%E% SMI"
26724 
26725 
26726 
26727 
26728 
26729 /*
26730  * Error codes
26731  */
26732 # 102 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26733 /* Filesystem Quotas */
26734 
26735 
26736 /* Convergent Error Returns */
26737 # 116 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26738 /* Interprocess Robust Locks */
26739 
26740 
26741 
26742 /* stream problems */
26743 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26744 /* Interprocess Robust Locks */
26745 # 148 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26746 /* shared library problems */
26747 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26748 /* BSD Networking Software */
26749  /* argument errors */
26750 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26751     /* protocol family */
26752 
26753 
26754  /* operational errors */
26755 
26756 
26757 
26758     /* of reset */
26759 
26760 
26761 
26762 
26763 
26764 /* XENIX has 135 - 142 */
26765 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26766 /* SUN Network File System */
26767 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
26768 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 1
26769 /*
26770  * CDDL HEADER START
26771  *
26772  * The contents of this file are subject to the terms of the
26773  * Common Development and Distribution License, Version 1.0 only
26774  * (the "License").  You may not use this file except in compliance
26775  * with the License.
26776  *
26777  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26778  * or http://www.opensolaris.org/os/licensing.
26779  * See the License for the specific language governing permissions
26780  * and limitations under the License.
26781  *
26782  * When distributing Covered Code, include this CDDL HEADER in each
26783  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26784  * If applicable, add the following below this CDDL HEADER, with the
26785  * fields enclosed by brackets "[]" replaced with your own identifying
26786  * information: Portions Copyright [yyyy] [name of copyright owner]
26787  *
26788  * CDDL HEADER END
26789  */
26790 /*
26791  * Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
26792  * Use is subject to license terms.
26793  */
26794 
26795 
26796 
26797 
26798 #pragma ident "%Z%%M%	%I%	%E% SMI"
26799 
26800 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
26801 /*
26802  * CDDL HEADER START
26803  *
26804  * The contents of this file are subject to the terms of the
26805  * Common Development and Distribution License (the "License").
26806  * You may not use this file except in compliance 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 /*
26823  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
26824  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
26825  */
26826 
26827 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
26828 /*	  All Rights Reserved  	*/
26829 
26830 /*
26831  * University Copyright- Copyright (c) 1982, 1986, 1988
26832  * The Regents of the University of California
26833  * All Rights Reserved
26834  *
26835  * University Acknowledgment- Portions of this document are derived from
26836  * software developed by the University of California, Berkeley, and its
26837  * contributors.
26838  */
26839 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 2
26840 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h"
26841 typedef struct {
26842  char hostname[256];
26843  ushort_t port;
26844 } url_hport_t;
26845 
26846 typedef struct {
26847  boolean_t https;
26848  url_hport_t hport;
26849  char abspath[1024];
26850 } url_t;
26851 
26852 extern int url_parse_hostport(const char *, url_hport_t *, ushort_t);
26853 extern int url_parse(const char *, url_t *);
26854 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
26855 
26856 
26857 
26858 
26859 
26860 /* State information returned by http_conn_info() */
26861 typedef struct {
26862  url_t uri; /* URI last loaded */
26863  url_hport_t proxy; /* proxy, if any being used */
26864  boolean_t keepalive; /* Keepalive setting being used */
26865  uint_t read_timeout; /* Timeout to use for socket reads */
26866 } http_conninfo_t;
26867 
26868 
26869 /* Structure for version of the http file */
26870 typedef struct {
26871  uint_t maj_ver; /* Major version */
26872  uint_t min_ver; /* Minor version */
26873  uint_t micro_ver; /* Micro version */
26874 } boot_http_ver_t;
26875 
26876 /* Internal Libhttp errors */
26877 
26878 
26879 
26880     /* necessarily the underlying transport */
26881     /* connection). */
26882 
26883     /* error. */
26884 
26885 
26886 
26887     /* No matching entry */
26888 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h"
26889 /* Sources of errors */
26890 
26891 
26892 
26893 
26894 
26895 
26896 
26897 typedef struct {
26898  uint_t code; /* status code */
26899  char *statusmsg; /* status message */
26900  uint_t nresphdrs; /* number of response headers */
26901 } http_respinfo_t;
26902 
26903 
26904 typedef void *http_handle_t;
26905 
26906 boot_http_ver_t const *http_get_version(void);
26907 void http_set_p12_format(int);
26908 void http_set_verbose(boolean_t);
26909 int http_set_cipher_list(const char *);
26910 http_handle_t http_srv_init(const url_t *);
26911 int http_set_proxy(http_handle_t, const url_hport_t *);
26912 int http_set_keepalive(http_handle_t, boolean_t);
26913 int http_set_socket_read_timeout(http_handle_t, uint_t);
26914 int http_set_basic_auth(http_handle_t, const char *, const char *);
26915 int http_set_random_file(http_handle_t, const char *);
26916 int http_set_certificate_authority_file(const char *);
26917 int http_set_client_certificate_file(http_handle_t, const char *);
26918 int http_set_password(http_handle_t, const char *);
26919 int http_set_key_file_password(http_handle_t, const char *);
26920 int http_set_private_key_file(http_handle_t, const char *);
26921 
26922 int http_srv_connect(http_handle_t);
26923 int http_head_request(http_handle_t, const char *);
26924 int http_get_request(http_handle_t, const char *);
26925 int http_get_range_request(http_handle_t, const char *, offset_t, offset_t);
26926 void http_free_respinfo(http_respinfo_t *);
26927 int http_process_headers(http_handle_t, http_respinfo_t **);
26928 int http_process_part_headers(http_handle_t, http_respinfo_t **);
26929 char *http_get_header_value(http_handle_t, const char *);
26930 char *http_get_response_header(http_handle_t, uint_t);
26931 int http_read_body(http_handle_t, char *, size_t);
26932 int http_srv_disconnect(http_handle_t);
26933 int http_srv_close(http_handle_t);
26934 http_conninfo_t *http_get_conn_info(http_handle_t);
26935 int http_conn_is_https(http_handle_t, boolean_t *);
26936 ulong_t http_get_lasterr(http_handle_t, uint_t *);
26937 void http_decode_err(ulong_t, int *, int *, int *);
26938 char const *http_errorstr(uint_t, ulong_t);
26939 # 47 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
26940 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
26941 /*
26942  * CDDL HEADER START
26943  *
26944  * The contents of this file are subject to the terms of the
26945  * Common Development and Distribution License (the "License").
26946  * You may not use this file except in compliance with the License.
26947  *
26948  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26949  * or http://www.opensolaris.org/os/licensing.
26950  * See the License for the specific language governing permissions
26951  * and limitations under the License.
26952  *
26953  * When distributing Covered Code, include this CDDL HEADER in each
26954  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26955  * If applicable, add the following below this CDDL HEADER, with the
26956  * fields enclosed by brackets "[]" replaced with your own identifying
26957  * information: Portions Copyright [yyyy] [name of copyright owner]
26958  *
26959  * CDDL HEADER END
26960  */
26961 
26962 /*
26963  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
26964  * Use is subject to license terms.
26965  */
26966 
26967 
26968 
26969 
26970 
26971 /*
26972  * Module:	pkgerr.h
26973  * Description:
26974  *
26975  *   Implements error routines to handle the creation,
26976  *   management, and destruction of error objects, which
26977  *   hold error messages and codes returned from libpkg
26978  *   routines that support the objects defined herein.
26979  */
26980 
26981 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
26982 /*
26983  * CDDL HEADER START
26984  *
26985  * The contents of this file are subject to the terms of the
26986  * Common Development and Distribution License (the "License").
26987  * You may not use this file except in compliance with the License.
26988  *
26989  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26990  * or http://www.opensolaris.org/os/licensing.
26991  * See the License for the specific language governing permissions
26992  * and limitations under the License.
26993  *
26994  * When distributing Covered Code, include this CDDL HEADER in each
26995  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26996  * If applicable, add the following below this CDDL HEADER, with the
26997  * fields enclosed by brackets "[]" replaced with your own identifying
26998  * information: Portions Copyright [yyyy] [name of copyright owner]
26999  *
27000  * CDDL HEADER END
27001  */
27002 
27003 /*
27004  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27005  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
27006  */
27007 
27008 /*	Copyright (c) 1988 AT&T	*/
27009 /*	  All Rights Reserved  	*/
27010 
27011 /*
27012  * User-visible pieces of the ANSI C standard I/O package.
27013  */
27014 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 2
27015 
27016 
27017 
27018 
27019 
27020 /*
27021  * Public Definitions
27022  */
27023 
27024 typedef enum {
27025  PKGERR_OK = 0,
27026  PKGERR_EXIST,
27027  PKGERR_READ,
27028  PKGERR_CORRUPT,
27029  PKGERR_PARSE,
27030  PKGERR_BADPASS,
27031  PKGERR_BADALIAS,
27032  PKGERR_INTERNAL,
27033  PKGERR_UNSUP,
27034  PKGERR_NOALIAS,
27035  PKGERR_NOALIASMATCH,
27036  PKGERR_MULTIPLE,
27037  PKGERR_INCOMPLETE,
27038  PKGERR_NOPRIVKEY,
27039  PKGERR_NOPUBKEY,
27040  PKGERR_NOCACERT,
27041  PKGERR_NOMEM,
27042  PKGERR_CHAIN,
27043  PKGERR_LOCKED,
27044  PKGERR_WRITE,
27045  PKGERR_UNLOCK,
27046  PKGERR_TIME,
27047  PKGERR_DUPLICATE,
27048  PKGERR_WEB,
27049  PKGERR_VERIFY
27050 } PKG_ERR_CODE;
27051 
27052 /*
27053  * Public Structures
27054  */
27055 
27056 /* external reference to PKG_ERR object (contents private) */
27057 typedef PKG_ERR_CODE pkg_err_t;
27058 
27059 typedef struct _pkg_err_struct PKG_ERR;
27060 
27061 /*
27062  * Public Methods
27063  */
27064 
27065 PKG_ERR *pkgerr_new();
27066 void pkgerr_add(PKG_ERR *, PKG_ERR_CODE, char *, ...);
27067 void pkgerr_clear(PKG_ERR *);
27068 int pkgerr_dump(PKG_ERR *, FILE *);
27069 int pkgerr_num(PKG_ERR *);
27070 char *pkgerr_get(PKG_ERR *, int);
27071 void pkgerr_free(PKG_ERR *);
27072 # 48 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
27073 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 1
27074 /*
27075  * CDDL HEADER START
27076  *
27077  * The contents of this file are subject to the terms of the
27078  * Common Development and Distribution License (the "License").
27079  * You may not use this file except in compliance with the License.
27080  *
27081  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27082  * or http://www.opensolaris.org/os/licensing.
27083  * See the License for the specific language governing permissions
27084  * and limitations under the License.
27085  *
27086  * When distributing Covered Code, include this CDDL HEADER in each
27087  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27088  * If applicable, add the following below this CDDL HEADER, with the
27089  * fields enclosed by brackets "[]" replaced with your own identifying
27090  * information: Portions Copyright [yyyy] [name of copyright owner]
27091  *
27092  * CDDL HEADER END
27093  */
27094 
27095 /*
27096  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
27097  * Use is subject to license terms.
27098  */
27099 
27100 
27101 
27102 
27103 
27104 /*
27105  * Module:	keystore.h
27106  * Description:	This module contains the structure definitions for processing
27107  *		package keystore files.
27108  */
27109 
27110 
27111 
27112 
27113 
27114 # 1 "/usr/include/openssl/evp.h" 1 3 4
27115 /* crypto/evp/evp.h */
27116 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
27117  * All rights reserved.
27118  *
27119  * This package is an SSL implementation written
27120  * by Eric Young (eay@cryptsoft.com).
27121  * The implementation was written so as to conform with Netscapes SSL.
27122  *
27123  * This library is free for commercial and non-commercial use as long as
27124  * the following conditions are aheared to.  The following conditions
27125  * apply to all code found in this distribution, be it the RC4, RSA,
27126  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
27127  * included with this distribution is covered by the same copyright terms
27128  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
27129  *
27130  * Copyright remains Eric Young's, and as such any Copyright notices in
27131  * the code are not to be removed.
27132  * If this package is used in a product, Eric Young should be given attribution
27133  * as the author of the parts of the library used.
27134  * This can be in the form of a textual message at program startup or
27135  * in documentation (online or textual) provided with the package.
27136  *
27137  * Redistribution and use in source and binary forms, with or without
27138  * modification, are permitted provided that the following conditions
27139  * are met:
27140  * 1. Redistributions of source code must retain the copyright
27141  *    notice, this list of conditions and the following disclaimer.
27142  * 2. Redistributions in binary form must reproduce the above copyright
27143  *    notice, this list of conditions and the following disclaimer in the
27144  *    documentation and/or other materials provided with the distribution.
27145  * 3. All advertising materials mentioning features or use of this software
27146  *    must display the following acknowledgement:
27147  *    "This product includes cryptographic software written by
27148  *     Eric Young (eay@cryptsoft.com)"
27149  *    The word 'cryptographic' can be left out if the rouines from the library
27150  *    being used are not cryptographic related :-).
27151  * 4. If you include any Windows specific code (or a derivative thereof) from
27152  *    the apps directory (application code) you must include an acknowledgement:
27153  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
27154  *
27155  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
27156  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27157  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27158  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
27159  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27160  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27161  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27162  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27163  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27164  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27165  * SUCH DAMAGE.
27166  *
27167  * The licence and distribution terms for any publically available version or
27168  * derivative of this code cannot be changed.  i.e. this code cannot simply be
27169  * copied and put under another distribution licence
27170  * [including the GNU Public Licence.]
27171  */
27172 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
27173 # 1 "/usr/include/openssl/x509.h" 1 3 4
27174 /* crypto/x509/x509.h */
27175 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
27176  * All rights reserved.
27177  *
27178  * This package is an SSL implementation written
27179  * by Eric Young (eay@cryptsoft.com).
27180  * The implementation was written so as to conform with Netscapes SSL.
27181  *
27182  * This library is free for commercial and non-commercial use as long as
27183  * the following conditions are aheared to.  The following conditions
27184  * apply to all code found in this distribution, be it the RC4, RSA,
27185  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
27186  * included with this distribution is covered by the same copyright terms
27187  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
27188  *
27189  * Copyright remains Eric Young's, and as such any Copyright notices in
27190  * the code are not to be removed.
27191  * If this package is used in a product, Eric Young should be given attribution
27192  * as the author of the parts of the library used.
27193  * This can be in the form of a textual message at program startup or
27194  * in documentation (online or textual) provided with the package.
27195  *
27196  * Redistribution and use in source and binary forms, with or without
27197  * modification, are permitted provided that the following conditions
27198  * are met:
27199  * 1. Redistributions of source code must retain the copyright
27200  *    notice, this list of conditions and the following disclaimer.
27201  * 2. Redistributions in binary form must reproduce the above copyright
27202  *    notice, this list of conditions and the following disclaimer in the
27203  *    documentation and/or other materials provided with the distribution.
27204  * 3. All advertising materials mentioning features or use of this software
27205  *    must display the following acknowledgement:
27206  *    "This product includes cryptographic software written by
27207  *     Eric Young (eay@cryptsoft.com)"
27208  *    The word 'cryptographic' can be left out if the rouines from the library
27209  *    being used are not cryptographic related :-).
27210  * 4. If you include any Windows specific code (or a derivative thereof) from
27211  *    the apps directory (application code) you must include an acknowledgement:
27212  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
27213  *
27214  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
27215  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27216  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27217  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
27218  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27219  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27220  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27221  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27222  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27223  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27224  * SUCH DAMAGE.
27225  *
27226  * The licence and distribution terms for any publically available version or
27227  * derivative of this code cannot be changed.  i.e. this code cannot simply be
27228  * copied and put under another distribution licence
27229  * [including the GNU Public Licence.]
27230  */
27231 /* ====================================================================
27232  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
27233  * ECDH support in OpenSSL originally developed by
27234  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
27235  */
27236 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
27237 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
27238 /*
27239  * CDDL HEADER START
27240  *
27241  * The contents of this file are subject to the terms of the
27242  * Common Development and Distribution License (the "License").
27243  * You may not use this file except in compliance with the License.
27244  *
27245  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27246  * or http://www.opensolaris.org/os/licensing.
27247  * See the License for the specific language governing permissions
27248  * and limitations under the License.
27249  *
27250  * When distributing Covered Code, include this CDDL HEADER in each
27251  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27252  * If applicable, add the following below this CDDL HEADER, with the
27253  * fields enclosed by brackets "[]" replaced with your own identifying
27254  * information: Portions Copyright [yyyy] [name of copyright owner]
27255  *
27256  * CDDL HEADER END
27257  */
27258 
27259 /*
27260  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
27261  * Use is subject to license terms.
27262  */
27263 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
27264 
27265 /* keystore structures */
27266 
27267 /* this opaque type represents a keystore */
27268 typedef void *keystore_handle_t;
27269 
27270 /* flags passed to open_keystore */
27271 
27272 /* opens keystore read-only.  Attempts to modify results in an error */
27273 
27274 
27275 /* opens keystore read-write */
27276 
27277 
27278 /*
27279  * tells open_keystore to fall back to app-generic paths in the case that
27280  * the app-specific paths do not exist.
27281  */
27282 
27283 
27284 /*
27285  * tells open_keystore to use the app-specific paths no matter what,
27286  * failing if they cannot be used for any reason.
27287  */
27288 
27289 
27290 /* masks off various types of flags */
27291 
27292 
27293 
27294 /* default is read-only, soft */
27295 
27296 
27297 
27298 /*
27299  * possible encoding formats used by the library, used
27300  * by print_cert
27301  */
27302 typedef enum {
27303  KEYSTORE_FORMAT_PEM,
27304  KEYSTORE_FORMAT_DER,
27305  KEYSTORE_FORMAT_TEXT
27306 } keystore_encoding_format_t;
27307 
27308 /*
27309  * structure passed back to password callback for determining how
27310  * to prompt for passphrase, and where to record errors
27311  */
27312 typedef struct {
27313  PKG_ERR *err;
27314 } keystore_passphrase_data;
27315 
27316 
27317 /* max length of a passphrase.  One could use a short story! */
27318 
27319 
27320 /* callback for collecting passphrase when open_keystore() is called */
27321 typedef int keystore_passphrase_cb(char *, int, int, void *);
27322 
27323 /* names of the individual files within the keystore path */
27324 
27325 
27326 
27327 
27328 /* keystore.c */
27329 extern int open_keystore(PKG_ERR *, char *, char *,
27330     keystore_passphrase_cb, long flags, keystore_handle_t *);
27331 
27332 extern int print_certs(PKG_ERR *, keystore_handle_t, char *,
27333     keystore_encoding_format_t, FILE *);
27334 
27335 extern int check_cert(PKG_ERR *, X509 *);
27336 
27337 extern int check_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *);
27338 
27339 extern int print_cert(PKG_ERR *, X509 *,
27340     keystore_encoding_format_t, char *, boolean_t, FILE *);
27341 
27342 extern int close_keystore(PKG_ERR *, keystore_handle_t,
27343     keystore_passphrase_cb);
27344 
27345 extern int merge_ca_cert(PKG_ERR *, X509 *, keystore_handle_t);
27346 extern int merge_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *,
27347     char *, keystore_handle_t);
27348 
27349 extern int delete_cert_and_keys(PKG_ERR *, keystore_handle_t,
27350     char *);
27351 
27352 extern int find_key_cert_pair(PKG_ERR *, keystore_handle_t,
27353     char *, EVP_PKEY **, X509 **);
27354 
27355 extern int find_ca_certs(PKG_ERR *, keystore_handle_t,
27356     struct stack_st_X509 **);
27357 
27358 extern int find_cl_certs(PKG_ERR *, keystore_handle_t,
27359     struct stack_st_X509 **);
27360 # 49 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
27361 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
27362 /*
27363  * CDDL HEADER START
27364  *
27365  * The contents of this file are subject to the terms of the
27366  * Common Development and Distribution License (the "License").
27367  * You may not use this file except in compliance with the License.
27368  *
27369  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27370  * or http://www.opensolaris.org/os/licensing.
27371  * See the License for the specific language governing permissions
27372  * and limitations under the License.
27373  *
27374  * When distributing Covered Code, include this CDDL HEADER in each
27375  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27376  * If applicable, add the following below this CDDL HEADER, with the
27377  * fields enclosed by brackets "[]" replaced with your own identifying
27378  * information: Portions Copyright [yyyy] [name of copyright owner]
27379  *
27380  * CDDL HEADER END
27381  */
27382 
27383 /*
27384  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
27385  * Use is subject to license terms.
27386  */
27387 # 35 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h"
27388 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
27389 /*
27390  * CDDL HEADER START
27391  *
27392  * The contents of this file are subject to the terms of the
27393  * Common Development and Distribution License (the "License").
27394  * You may not use this file except in compliance with the License.
27395  *
27396  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27397  * or http://www.opensolaris.org/os/licensing.
27398  * See the License for the specific language governing permissions
27399  * and limitations under the License.
27400  *
27401  * When distributing Covered Code, include this CDDL HEADER in each
27402  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27403  * If applicable, add the following below this CDDL HEADER, with the
27404  * fields enclosed by brackets "[]" replaced with your own identifying
27405  * information: Portions Copyright [yyyy] [name of copyright owner]
27406  *
27407  * CDDL HEADER END
27408  */
27409 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
27410 /*	  All Rights Reserved  	*/
27411 
27412 /*
27413  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
27414  * Use is subject to license terms.
27415  */
27416 # 36 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 2
27417 
27418 struct mergstat {
27419  unsigned setuid:1; /* pkgmap entry has setuid */
27420  unsigned setgid:1; /* ... and/or setgid bit set */
27421  unsigned contchg:1; /* contents of the files different */
27422  unsigned attrchg:1; /* attributes are different */
27423  unsigned shared:1; /* > 1 pkg associated with this */
27424  unsigned osetuid:1; /* installed set[ug]id process ... */
27425  unsigned osetgid:1; /* ... being overwritten by pkg. */
27426  unsigned rogue:1; /* conflicting file not owned by a package */
27427  unsigned dir2nondir:1; /* was a directory & now a non-directory */
27428  unsigned replace:1; /* merge makes no sense for this object pair */
27429  unsigned denied:1; /* for some reason this was not allowed in */
27430  unsigned preloaded:1; /* already checked in a prior pkg op */
27431  unsigned processed:1; /* already installed or removed */
27432  unsigned parentsyml2dir:1;
27433  /* parent directory changed from symlink to a directory */
27434 };
27435 
27436 /*
27437  * This is information required by pkgadd for fast operation. A
27438  * cfextra struct is tagged to each cfent structure requiring
27439  * processing. This is how we avoid some unneeded repetition. The
27440  * entries incorporating the word 'local' refer to the path that
27441  * gets us to the delivered package file. In other words, to install
27442  * a file we usually copy from 'local' to 'path' below. In the case
27443  * of a link, where no actual copying takes place, local is the source
27444  * of the link. Note that environment variables are not evaluated in
27445  * the locals unless they are links since the literal path is how
27446  * pkgadd finds the entry under the reloc directory.
27447  */
27448 struct cfextra {
27449  struct cfent cf_ent; /* basic contents file entry */
27450  struct mergstat mstat; /* merge status for installs */
27451  uint32_t fsys_value; /* fstab[] entry index */
27452  uint32_t fsys_base; /* actual base filesystem in fs_tab[] */
27453  char *client_path; /* the client-relative path */
27454  char *server_path; /* the server-relative path */
27455  char *map_path; /* as read from the pkgmap */
27456  char *client_local; /* client_relative local */
27457  char *server_local; /* server relative local */
27458 };
27459 # 50 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
27460 
27461 /*
27462  * The contents database file interface.
27463  */
27464 
27465 typedef struct pkg_server *PKGserver;
27466 
27467 /* Some commands modify the internal database: add them here */
27468 # 82 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27469 typedef enum {
27470  INVALID, /* Not initialized */
27471  NEVER, /* Don't start, does check if it is running. */
27472  FLUSH_LOG, /* Run it once to incorporate the log. */
27473  RUN_ONCE, /* Run until the current client stops. */
27474  TIMEOUT, /* Run until a timeout occurs. */
27475  PERMANENT, /* Run until it is externally terminated. */
27476  DEFAULTMODE = TIMEOUT /* The default mode, must come last */
27477 } start_mode_t;
27478 
27479 typedef struct pkgcmd {
27480  int cmd;
27481  char buf[1];
27482 } pkgcmd_t;
27483 
27484 typedef struct pkgfilter {
27485  int cmd;
27486  int len;
27487  char buf[1];
27488 } pkgfilter_t;
27489 
27490 /*
27491  * Virtual File Protocol definitions
27492  */
27493 
27494 /*
27495  * flags associated with virtual file protocol operations; note that these flags
27496  * may only occupy the low order 16 bits of the 32-bit unsigned flag.
27497  */
27498 
27499 typedef unsigned long VFPFLAGS_T;
27500 # 121 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27501 /* virtual file protocol object */
27502 
27503 typedef struct _vfp VFP_T;
27504 
27505 /* structure behind the virtual file protocol object */
27506 
27507 struct _vfp {
27508  FILE *_vfpFile; /* -> opened FILE */
27509  char *_vfpCurr; /* -> current byte to read/write */
27510  char *_vfpHighWater; /* -> last byte modified */
27511  char *_vfpEnd; /* -> last data byte */
27512  char *_vfpPath; /* -> path associated with FILE */
27513  char *_vfpStart; /* -> first data byte */
27514  void *_vfpExtra; /* undefined */
27515  size_t _vfpSize; /* size of mapped/allocated area */
27516  size_t _vfpMapSize; /* # mapped bytes */
27517  VFPFLAGS_T _vfpFlags; /* flags associated with vfp/data */
27518  int _vfpOverflow; /* non-zero if buffer write overflow */
27519  blkcnt_t _vfpCkStBlocks; /* checkpoint # blocks */
27520  dev_t _vfpCkDev; /* checkpoint device i.d. */
27521  ino_t _vfpCkIno; /* checkpoint inode # */
27522  off_t _vfpCkSize; /* checkpoint size */
27523  time_t _vfpCkMtime; /* checkpoint modification time */
27524 };
27525 
27526 /*
27527  * get highest modified byte (length) contained in vfp
27528  *
27529  * determine number of bytes to write - it will be the highest of:
27530  *  -- the current pointer into the file - this is updated whenever
27531  *	the location of the file is changed by a single byte
27532  *  -- the last "high water mark" - the last known location that
27533  *	was written to the file - updated only when the location
27534  *	of the file is directly changed - e.g. vfpSetCurrCharPtr,
27535  *	vfpTruncate, vfpRewind.
27536  * this reduces the "bookkeeping" that needs to be done to know
27537  * how many bytes to write out to the file - typically a file is
27538  * written sequentially so the current file pointer is sufficient
27539  * to determine how many bytes to write out.
27540  */
27541 # 169 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27542 /*
27543  * increment current pointer by specified delta
27544  * if the delta exceeds the buffer size, set pointer to buffer end
27545  */
27546 # 185 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27547 /* get the path associated with the vfp */
27548 
27549 
27550 /* get a string from the vfp into a fixed size buffer */
27551 # 207 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27552 /* get number of bytes remaining to read */
27553 
27554 
27555 
27556 
27557 /* get number of bytes remaining to write */
27558 
27559 
27560 
27561 
27562 /* put current character and increment to next */
27563 
27564 
27565 
27566 
27567 
27568 
27569 /* put integer to current character and increment */
27570 
27571 
27572 /* put long to current character and increment */
27573 
27574 
27575 /* get current character and increment to next */
27576 
27577 
27578 /* get current character - do not increment */
27579 
27580 
27581 /* get pointer to current character */
27582 
27583 
27584 /* increment current character pointer */
27585 
27586 
27587 /* decrement current character pointer */
27588 
27589 
27590 /* get pointer to first data byte in buffer */
27591 
27592 
27593 /* get pointer to last data byte in buffer */
27594 
27595 
27596 /* set pointer to current character */
27597 
27598 
27599 
27600 
27601 
27602 
27603 /* set pointer to last data byte in buffer */
27604 # 267 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27605 /* seek to end of file - one past last data byte in file */
27606 
27607 
27608 /* get number of bytes between current char and specified char */
27609 
27610 
27611 
27612 /* put string to current character and increment */
27613 # 284 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27614 /* put fixed number of bytes to current character and increment */
27615 # 298 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27616 /* put format one arg to current character and increment */
27617 
27618 
27619 
27620 
27621 
27622 
27623 
27624 struct dm_buf {
27625  char *text_buffer; /* start of allocated buffer */
27626  int offset; /* number of bytes into the text_buffer */
27627  int allocation; /* size of buffer in bytes */
27628 };
27629 
27630 /* This structure is used to hold a dynamically growing string */
27631 
27632 struct dstr {
27633  char *pc;
27634  int len;
27635  int max;
27636 };
27637 
27638 /* setmapmode() defines */
27639 # 330 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27640 /* max length for printed attributes */
27641 
27642 
27643 /*
27644  * These three defines indicate that the prototype file contains a '?'
27645  * meaning do not specify this data in the pkgmap entry.
27646  */
27647 # 366 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27648 /* Settings for network admin defaults */
27649 # 377 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27650 /* package header magic tokens */
27651 
27652 
27653 
27654 /* name of security files */
27655 
27656 
27657 
27658 
27659 
27660 
27661 /*
27662  * The next three mean that no mode, owner or group was specified or that the
27663  * one specified is invalid for some reason. Sometimes this is an error in
27664  * which case it is generally converted to CUR* with a warning. Other times
27665  * it means "look it up" by stating the existing file system object pointred
27666  * to in the prototype file.
27667  */
27668 
27669 
27670 
27671 
27672 /* string comparitor abbreviators */
27673 
27674 
27675 
27676 
27677 
27678 
27679 extern FILE *epopen(char *cmd, char *mode);
27680 extern char **gpkglist(char *dir, char **pkg, char **catg);
27681 extern int is_not_valid_length(char **category);
27682 extern int is_not_valid_category(char **category, char *progname);
27683 extern int is_same_CATEGORY(char **category, char *installed_category);
27684 extern char **get_categories(char *catg_arg);
27685 
27686 extern void pkglist_cont(char *keyword);
27687 extern char **pkgalias(char *pkg);
27688 extern char *get_prog_name(void);
27689 extern char *set_prog_name(char *name);
27690 extern int averify(int fix, char *ftype, char *path, struct ainfo *ainfo);
27691 extern int ckparam(char *param, char *value);
27692 extern int ckvolseq(char *dir, int part, int nparts);
27693 extern int cverify(int fix, char *ftype, char *path, struct cinfo *cinfo,
27694    int allow_checksum);
27695 extern unsigned long compute_checksum(int *r_cksumerr, char *a_path);
27696 extern int fverify(int fix, char *ftype, char *path, struct ainfo *ainfo,
27697       struct cinfo *cinfo);
27698 extern char *getErrbufAddr(void);
27699 extern int getErrbufSize(void);
27700 extern char *getErrstr(void);
27701 extern void setErrstr(char *errstr);
27702 extern int devtype(char *alias, struct pkgdev *devp);
27703 extern int ds_totread; /* total number of parts read */
27704 extern int ds_close(int pkgendflg);
27705 extern int ds_findpkg(char *device, char *pkg);
27706 extern int ds_getinfo(char *string);
27707 extern int ds_getpkg(char *device, int n, char *dstdir);
27708 extern int ds_ginit(char *device);
27709 extern boolean_t ds_fd_open(void);
27710 extern int ds_init(char *device, char **pkg, char *norewind);
27711 extern int BIO_ds_dump_header(PKG_ERR *, BIO *);
27712 extern int BIO_ds_dump(PKG_ERR *, char *, BIO *);
27713 extern int BIO_dump_cmd(char *cmd, BIO *bio);
27714 extern int ds_next(char *, char *);
27715 extern int ds_readbuf(char *device);
27716 extern int epclose(FILE *pp);
27717 extern int esystem(char *cmd, int ifd, int ofd);
27718 extern int e_ExecCmdArray(int *r_status, char **r_results,
27719    char *a_inputFile, char *a_cmd, char **a_args);
27720 extern int e_ExecCmdList(int *r_status, char **r_results,
27721    char *a_inputFile, char *a_cmd, ...);
27722 extern int gpkgmap(struct cfent *ept, FILE *fp);
27723 extern int gpkgmapvfp(struct cfent *ept, VFP_T *fpv);
27724 extern void setmapmode(int mode_no);
27725 extern int isFdRemote(int a_fd);
27726 extern int isFstypeRemote(char *a_fstype);
27727 extern int isPathRemote(char *a_path);
27728 extern int iscpio(char *path, int *iscomp);
27729 extern int isdir(char *path);
27730 extern int isfile(char *dir, char *file);
27731 extern int fmkdir(char *a_path, int a_mode);
27732 extern int pkgexecl(char *filein, char *fileout, char *uname, char *gname,
27733    ...);
27734 extern int pkgexecv(char *filein, char *fileout, char *uname, char *gname,
27735    char *arg[]);
27736 extern int pkghead(char *device);
27737 extern int pkgmount(struct pkgdev *devp, char *pkg, int part, int nparts,
27738    int getvolflg);
27739 extern int pkgtrans(char *device1, char *device2, char **pkg,
27740    int options, keystore_handle_t, char *);
27741 extern int pkgumount(struct pkgdev *devp);
27742 extern int ppkgmap(struct cfent *ept, FILE *fp);
27743 extern int putcfile(struct cfent *ept, FILE *fp);
27744 extern int putcvfpfile(struct cfent *ept, VFP_T *vfp);
27745 extern int rrmdir(char *path);
27746 extern void set_memalloc_failure_func(void (*)(int));
27747 extern void *xmalloc(size_t size);
27748 extern void *xrealloc(void *ptr, size_t size);
27749 extern char *xstrdup(char *str);
27750 extern void set_passphrase_prompt(char *);
27751 extern void set_passphrase_passarg(char *);
27752 extern int pkg_passphrase_cb(char *, int, int, void *);
27753 
27754 extern int srchcfile(struct cfent *ept, char *path, PKGserver server);
27755 extern struct group *cgrgid(gid_t gid);
27756 extern struct group *cgrnam(char *nam);
27757 extern struct passwd *cpwnam(char *nam);
27758 extern struct passwd *cpwuid(uid_t uid);
27759 extern struct group *clgrgid(gid_t gid);
27760 extern struct group *clgrnam(char *nam);
27761 extern struct passwd *clpwnam(char *nam);
27762 extern struct passwd *clpwuid(uid_t uid);
27763 extern void basepath(char *path, char *basedir, char *ir);
27764 extern void canonize(char *file);
27765 extern void canonize_slashes(char *file);
27766 extern void checksum_off(void);
27767 extern void checksum_on(void);
27768 extern void cvtpath(char *path, char *copy);
27769 extern void ds_order(char *list[]);
27770 extern void ds_putinfo(char *buf, size_t);
27771 extern void ds_skiptoend(char *device);
27772 extern void ecleanup(void);
27773 /*PRINTFLIKE1*/
27774 extern void logerr(char *fmt, ...);
27775 extern int mappath(int flag, char *path);
27776 extern int mapvar(int flag, char *varname);
27777 /*PRINTFLIKE1*/
27778 extern void progerr(char *fmt, ...);
27779 extern void pkgerr(PKG_ERR *);
27780 extern void rpterr(void);
27781 extern void tputcfent(struct cfent *ept, FILE *fp);
27782 extern void set_nonABI_symlinks(void);
27783 extern int nonABI_symlinks(void);
27784 extern void disable_attribute_check(void);
27785 extern int get_disable_attribute_check(void);
27786 
27787 /* security.c */
27788 extern void sec_init(void);
27789 extern char *get_subject_display_name(X509 *);
27790 extern char *get_issuer_display_name(X509 *);
27791 extern char *get_serial_num(X509 *);
27792 extern char *get_fingerprint(X509 *, const EVP_MD *);
27793 extern int get_cert_chain(PKG_ERR *, X509 *, struct stack_st_X509 *,
27794     struct stack_st_X509 *, struct stack_st_X509 **);
27795 
27796 /* pkgstr.c */
27797 void pkgstrConvertUllToTimeString_r(unsigned long long a_time,
27798    char *a_buf, int a_bufLen);
27799 char *pkgstrConvertPathToBasename(char *a_path);
27800 char *pkgstrConvertPathToDirname(char *a_path);
27801 char *pkgstrDup(char *a_str);
27802 char *pkgstrLocatePathBasename(char *a_path);
27803 void pkgstrScaleNumericString(char *a_buf, unsigned long long scale);
27804 void pkgstrAddToken(char **a_old, char *a_new, char a_separator);
27805 boolean_t pkgstrContainsToken(char *a_string, char *a_token,
27806    char *a_separators);
27807 void pkgstrExpandTokens(char **a_old, char *a_string,
27808    char a_separator, char *a_separators);
27809 char *pkgstrGetToken(char *r_sep, char *a_string, int a_index,
27810    char *a_separators);
27811 void pkgstrGetToken_r(char *r_sep, char *a_string, int a_index,
27812    char *a_separators, char *a_buf, int a_bufLen);
27813 unsigned long pkgstrNumTokens(char *a_string, char *a_separators);
27814 char *pkgstrPrintf(char *a_format, ...);
27815 void pkgstrPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
27816 void pkgstrRemoveToken(char **r_string, char *a_token,
27817    char *a_separators, int a_index);
27818 void pkgstrRemoveLeadingWhitespace(char **a_str);
27819 /* vfpops.c */
27820 extern int vfpCheckpointFile(VFP_T **r_destVfp, VFP_T **a_vfp,
27821    char *a_path);
27822 extern int vfpCheckpointOpen(VFP_T **a_cvfp, VFP_T **r_vfp, char *a_path,
27823    char *a_mode, VFPFLAGS_T a_flags);
27824 extern int vfpClearModified(VFP_T *a_vfp);
27825 extern int vfpClose(VFP_T **r_vfp);
27826 extern int vfpGetModified(VFP_T *a_vfp);
27827 extern int vfpOpen(VFP_T **r_vfp, char *a_path, char *a_mode,
27828    VFPFLAGS_T a_flags);
27829 extern void vfpRewind(VFP_T *a_vfp);
27830 extern ssize_t vfpSafePwrite(int a_fildes, void *a_buf,
27831    size_t a_nbyte, off_t a_offset);
27832 extern ssize_t vfpSafeWrite(int a_fildes, void *a_buf, size_t a_nbyte);
27833 extern int vfpSetFlags(VFP_T *a_vfp, VFPFLAGS_T a_flags);
27834 extern int vfpSetModified(VFP_T *a_vfp);
27835 extern int vfpSetSize(VFP_T *a_vfp, size_t a_size);
27836 extern void vfpTruncate(VFP_T *a_vfp);
27837 extern int vfpWriteToFile(VFP_T *a_vfp, char *a_path);
27838 
27839 /* handlelocalfs.c */
27840 boolean_t enable_local_fs(void);
27841 boolean_t restore_local_fs(void);
27842 
27843 /* pkgserv.c */
27844 extern PKGserver pkgopenserver(const char *, const char *, boolean_t);
27845 extern void pkgcloseserver(PKGserver);
27846 extern int pkgcmd(PKGserver, void *, size_t, char **, size_t *,
27847     int *);
27848 extern boolean_t pkgsync_needed(const char *, const char *, boolean_t);
27849 extern int pkgsync(const char *, const char *, boolean_t);
27850 extern int pkgservercommitfile(VFP_T *, PKGserver);
27851 extern int pkgopenfilter(PKGserver server, const char *pkginst);
27852 extern void pkgclosefilter(PKGserver);
27853 extern char *pkggetentry(PKGserver, int *, int *);
27854 extern char *pkggetentry_named(PKGserver, const char *, int *,
27855     int *);
27856 extern void pkgserversetmode(start_mode_t);
27857 extern start_mode_t pkgservergetmode(void);
27858 extern start_mode_t pkgparsemode(const char *);
27859 extern char *pkgmodeargument(start_mode_t);
27860 # 39 "quit.c" 2
27861 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 1
27862 /*
27863  * CDDL HEADER START
27864  *
27865  * The contents of this file are subject to the terms of the
27866  * Common Development and Distribution License (the "License").
27867  * You may not use this file except in compliance with the License.
27868  *
27869  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27870  * or http://www.opensolaris.org/os/licensing.
27871  * See the License for the specific language governing permissions
27872  * and limitations under the License.
27873  *
27874  * When distributing Covered Code, include this CDDL HEADER in each
27875  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27876  * If applicable, add the following below this CDDL HEADER, with the
27877  * fields enclosed by brackets "[]" replaced with your own identifying
27878  * information: Portions Copyright [yyyy] [name of copyright owner]
27879  *
27880  * CDDL HEADER END
27881  */
27882 
27883 /*
27884  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
27885  * Use is subject to license terms.
27886  */
27887 
27888 
27889 
27890 
27891 
27892 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
27893 /*
27894  * CDDL HEADER START
27895  *
27896  * The contents of this file are subject to the terms of the
27897  * Common Development and Distribution License (the "License").
27898  * You may not use this file except in compliance with the License.
27899  *
27900  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27901  * or http://www.opensolaris.org/os/licensing.
27902  * See the License for the specific language governing permissions
27903  * and limitations under the License.
27904  *
27905  * When distributing Covered Code, include this CDDL HEADER in each
27906  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27907  * If applicable, add the following below this CDDL HEADER, with the
27908  * fields enclosed by brackets "[]" replaced with your own identifying
27909  * information: Portions Copyright [yyyy] [name of copyright owner]
27910  *
27911  * CDDL HEADER END
27912  */
27913 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
27914 /*	  All Rights Reserved  	*/
27915 
27916 
27917 /*
27918  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
27919  * Use is subject to license terms.
27920  *
27921  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
27922  * Copyright 2016 Joyent, Inc.
27923  */
27924 # 32 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
27925 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h" 1
27926 /*
27927  * CDDL HEADER START
27928  *
27929  * The contents of this file are subject to the terms of the
27930  * Common Development and Distribution License (the "License").
27931  * You may not use this file except in compliance with the License.
27932  *
27933  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27934  * or http://www.opensolaris.org/os/licensing.
27935  * See the License for the specific language governing permissions
27936  * and limitations under the License.
27937  *
27938  * When distributing Covered Code, include this CDDL HEADER in each
27939  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27940  * If applicable, add the following below this CDDL HEADER, with the
27941  * fields enclosed by brackets "[]" replaced with your own identifying
27942  * information: Portions Copyright [yyyy] [name of copyright owner]
27943  *
27944  * CDDL HEADER END
27945  */
27946 
27947 /*
27948  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27949  *
27950  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
27951  * Use is subject to license terms.
27952  * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
27953  * Copyright 2016 Toomas Soome <tsoome@me.com>
27954  */
27955 
27956 
27957 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
27958 /*	  All Rights Reserved  	*/
27959 
27960 
27961 
27962 
27963 
27964 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 1
27965 /*
27966  * CDDL HEADER START
27967  *
27968  * The contents of this file are subject to the terms of the
27969  * Common Development and Distribution License (the "License").
27970  * You may not use this file except in compliance with the License.
27971  *
27972  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27973  * or http://www.opensolaris.org/os/licensing.
27974  * See the License for the specific language governing permissions
27975  * and limitations under the License.
27976  *
27977  * When distributing Covered Code, include this CDDL HEADER in each
27978  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27979  * If applicable, add the following below this CDDL HEADER, with the
27980  * fields enclosed by brackets "[]" replaced with your own identifying
27981  * information: Portions Copyright [yyyy] [name of copyright owner]
27982  *
27983  * CDDL HEADER END
27984  */
27985 
27986 /*
27987  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
27988  * Use is subject to license terms.
27989  */
27990 
27991 
27992 
27993 
27994 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
27995 /*
27996  * CDDL HEADER START
27997  *
27998  * The contents of this file are subject to the terms of the
27999  * Common Development and Distribution License (the "License").
28000  * You may not use this file except in compliance with the License.
28001  *
28002  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28003  * or http://www.opensolaris.org/os/licensing.
28004  * See the License for the specific language governing permissions
28005  * and limitations under the License.
28006  *
28007  *
28008  * When distributing Covered Code, include this CDDL HEADER in each
28009  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28010  * If applicable, add the following below this CDDL HEADER, with the
28011  * fields enclosed by brackets "[]" replaced with your own identifying
28012  * information: Portions Copyright [yyyy] [name of copyright owner]
28013  *
28014  * CDDL HEADER END
28015  */
28016 
28017 /*
28018  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
28019  * Use is subject to license terms.
28020  * Copyright 2016 Joyent, Inc.
28021  */
28022 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
28023 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 1
28024 /*
28025  * CDDL HEADER START
28026  *
28027  * The contents of this file are subject to the terms of the
28028  * Common Development and Distribution License (the "License").
28029  * You may not use this file except in compliance with the License.
28030  *
28031  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28032  * or http://www.opensolaris.org/os/licensing.
28033  * See the License for the specific language governing permissions
28034  * and limitations under the License.
28035  *
28036  * When distributing Covered Code, include this CDDL HEADER in each
28037  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28038  * If applicable, add the following below this CDDL HEADER, with the
28039  * fields enclosed by brackets "[]" replaced with your own identifying
28040  * information: Portions Copyright [yyyy] [name of copyright owner]
28041  *
28042  * CDDL HEADER END
28043  */
28044 /*
28045  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
28046  * Use is subject to license terms.
28047  * Copyright 2015 Nexenta Systems, Inc.
28048  */
28049 
28050 
28051 
28052 
28053 #pragma ident "%Z%%M%	%I%	%E% SMI"
28054 
28055 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
28056 /*
28057  * CDDL HEADER START
28058  *
28059  * The contents of this file are subject to the terms of the
28060  * Common Development and Distribution License, Version 1.0 only
28061  * (the "License").  You may not use this file except in compliance
28062  * with the License.
28063  *
28064  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28065  * or http://www.opensolaris.org/os/licensing.
28066  * See the License for the specific language governing permissions
28067  * and limitations under the License.
28068  *
28069  * When distributing Covered Code, include this CDDL HEADER in each
28070  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28071  * If applicable, add the following below this CDDL HEADER, with the
28072  * fields enclosed by brackets "[]" replaced with your own identifying
28073  * information: Portions Copyright [yyyy] [name of copyright owner]
28074  *
28075  * CDDL HEADER END
28076  */
28077 /*
28078  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28079  *
28080  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
28081  * Use is subject to license terms.
28082  */
28083 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 2
28084 
28085 
28086 
28087 
28088 
28089 /*
28090  * Interoperability types for programs. Used for:
28091  *
28092  * Crossing between 32-bit and 64-bit domains.
28093  *
28094  * On disk data formats such as filesystem meta data
28095  * and disk label.
28096  *
28097  * Note: Applications should never include this
28098  *       header file.
28099  */
28100 typedef uint32_t caddr32_t;
28101 typedef int32_t daddr32_t;
28102 typedef int32_t off32_t;
28103 typedef uint32_t ino32_t;
28104 typedef int32_t blkcnt32_t;
28105 typedef uint32_t fsblkcnt32_t;
28106 typedef uint32_t fsfilcnt32_t;
28107 typedef int32_t id32_t;
28108 typedef uint32_t major32_t;
28109 typedef uint32_t minor32_t;
28110 typedef int32_t key32_t;
28111 typedef uint32_t mode32_t;
28112 typedef uint32_t uid32_t;
28113 typedef uint32_t gid32_t;
28114 typedef uint32_t nlink32_t;
28115 typedef uint32_t dev32_t;
28116 typedef int32_t pid32_t;
28117 typedef uint32_t size32_t;
28118 typedef int32_t ssize32_t;
28119 typedef int32_t time32_t;
28120 typedef int32_t clock32_t;
28121 typedef uint32_t uintptr32_t;
28122 typedef int32_t intptr32_t;
28123 
28124 struct timeval32 {
28125  time32_t tv_sec; /* seconds */
28126  int32_t tv_usec; /* and microseconds */
28127 };
28128 
28129 typedef struct timespec32 {
28130  time32_t tv_sec; /* seconds */
28131  int32_t tv_nsec; /* and nanoseconds */
28132 } timespec32_t;
28133 
28134 typedef struct timespec32 timestruc32_t;
28135 
28136 typedef struct itimerspec32 {
28137  struct timespec32 it_interval;
28138  struct timespec32 it_value;
28139 } itimerspec32_t;
28140 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
28141 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
28142 /*
28143  * CDDL HEADER START
28144  *
28145  * The contents of this file are subject to the terms of the
28146  * Common Development and Distribution License (the "License").
28147  * You may not use this file except in compliance with the License.
28148  *
28149  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28150  * or http://www.opensolaris.org/os/licensing.
28151  * See the License for the specific language governing permissions
28152  * and limitations under the License.
28153  *
28154  *
28155  * When distributing Covered Code, include this CDDL HEADER in each
28156  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28157  * If applicable, add the following below this CDDL HEADER, with the
28158  * fields enclosed by brackets "[]" replaced with your own identifying
28159  * information: Portions Copyright [yyyy] [name of copyright owner]
28160  *
28161  * CDDL HEADER END
28162  */
28163 
28164 /*
28165  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
28166  * Use is subject to license terms.
28167  * Copyright 2016 Joyent, Inc.
28168  */
28169 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
28170 
28171 
28172 
28173 
28174 
28175 /*
28176  * Miscellaneous defines
28177  */
28178 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
28179 /*
28180  * Reserve two cylinders on SCSI disks.
28181  * One is for the backup disk label and the other is for the deviceid.
28182  *
28183  * IPI disks only reserve one cylinder, but they will go away soon.
28184  * CDROMs do not reserve any cylinders.
28185  */
28186 
28187 
28188 /*
28189  * Format of a Sun disk label.
28190  * Resides in cylinder 0, head 0, sector 0.
28191  *
28192  * sizeof (struct dk_label) should be 512 (the current sector size),
28193  * but should the sector size increase, this structure should remain
28194  * at the beginning of the sector.
28195  */
28196 
28197 
28198 
28199 
28200 
28201 
28202 
28203 typedef daddr_t blkaddr_t;
28204 typedef daddr32_t blkaddr32_t;
28205 
28206 
28207 
28208 /*
28209  * partition headers:  section 1
28210  * Returned in struct dk_allmap by ioctl DKIOC[SG]APART (dkio(7I))
28211  */
28212 struct dk_map {
28213  blkaddr_t dkl_cylno; /* starting cylinder */
28214  blkaddr_t dkl_nblk; /* number of blocks;  if == 0, */
28215      /* partition is undefined */
28216 };
28217 
28218 /*
28219  * partition headers:  section 1
28220  * Fixed size for on-disk dk_label
28221  */
28222 struct dk_map32 {
28223  blkaddr32_t dkl_cylno; /* starting cylinder */
28224  blkaddr32_t dkl_nblk; /* number of blocks;  if == 0, */
28225      /* partition is undefined */
28226 };
28227 
28228 /*
28229  * partition headers:  section 2,
28230  * brought over from AT&T SVr4 vtoc structure.
28231  */
28232 struct dk_map2 {
28233  uint16_t p_tag; /* ID tag of partition */
28234  uint16_t p_flag; /* permission flag */
28235 };
28236 
28237 struct dkl_partition {
28238  uint16_t p_tag; /* ID tag of partition */
28239  uint16_t p_flag; /* permision flags */
28240  blkaddr32_t p_start; /* start sector no of partition */
28241  blkaddr32_t p_size; /* # of blocks in partition */
28242 };
28243 
28244 
28245 /*
28246  * VTOC inclusions from AT&T SVr4
28247  * Fixed sized types for on-disk VTOC
28248  */
28249 
28250 struct dk_vtoc {
28251 
28252  uint32_t v_bootinfo[3]; /* info for mboot (unsupported) */
28253  uint32_t v_sanity; /* to verify vtoc sanity */
28254  uint32_t v_version; /* layout version */
28255  char v_volume[8]; /* volume name */
28256  uint16_t v_sectorsz; /* sector size in bytes */
28257  uint16_t v_nparts; /* number of partitions */
28258  uint32_t v_reserved[10]; /* free space */
28259  struct dkl_partition v_part[16]; /* partition headers */
28260  time32_t timestamp[16]; /* partition timestamp (unsupported) */
28261  char v_asciilabel[128]; /* for compatibility    */
28262 # 154 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
28263 };
28264 
28265 /*
28266  * define the amount of disk label padding needed to make
28267  * the entire structure occupy 512 bytes.
28268  */
28269 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
28270 struct dk_label {
28271 
28272  struct dk_vtoc dkl_vtoc; /* vtoc inclusions from AT&T SVr4 */
28273  uint32_t dkl_pcyl; /* # of physical cylinders */
28274  uint32_t dkl_ncyl; /* # of data cylinders */
28275  uint16_t dkl_acyl; /* # of alternate cylinders */
28276  uint16_t dkl_bcyl; /* cyl offset (for fixed head area) */
28277  uint32_t dkl_nhead; /* # of heads */
28278  uint32_t dkl_nsect; /* # of data sectors per track */
28279  uint16_t dkl_intrlv; /* interleave factor */
28280  uint16_t dkl_skew; /* skew factor */
28281  uint16_t dkl_apc; /* alternates per cyl (SCSI only)   */
28282  uint16_t dkl_rpm; /* revolutions per minute */
28283  uint16_t dkl_write_reinstruct; /* # sectors to skip, writes */
28284  uint16_t dkl_read_reinstruct; /* # sectors to skip, reads  */
28285  uint16_t dkl_extra[4]; /* for compatible expansion */
28286  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 */
28287 # 217 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
28288  uint16_t dkl_magic; /* identifies this label format */
28289  uint16_t dkl_cksum; /* xor checksum of sector */
28290 };
28291 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
28292 struct fk_label { /* DOS floppy label */
28293  uchar_t fkl_type;
28294  uchar_t fkl_magich;
28295  uchar_t fkl_magicl;
28296  uchar_t filler;
28297 };
28298 
28299 /*
28300  * Layout of stored fabricated device id  (on-disk)
28301  */
28302 
28303 
28304 
28305 
28306 
28307 struct dk_devid {
28308  uchar_t dkd_rev_hi; /* revision (MSB) */
28309  uchar_t dkd_rev_lo; /* revision (LSB) */
28310  uchar_t dkd_flags; /* flags (not used yet) */
28311  uchar_t dkd_devid[((512) - ((sizeof (uchar_t) * 7)))]; /* devid stored here */
28312  uchar_t dkd_checksum3; /* checksum (MSB) */
28313  uchar_t dkd_checksum2;
28314  uchar_t dkd_checksum1;
28315  uchar_t dkd_checksum0; /* checksum (LSB) */
28316 };
28317 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h" 2
28318 
28319 
28320 
28321 
28322 
28323 /*
28324  *	Note:  the VTOC is not implemented fully, nor in the manner
28325  *	that AT&T implements it.  AT&T puts the vtoc structure
28326  *	into a sector, usually the second sector (pdsector is first).
28327  *
28328  *	Sun incorporates the tag, flag, version, and volume vtoc fields into
28329  *	its Disk Label, which already has some vtoc-equivalent fields.
28330  *	Upon reading the vtoc with read_vtoc(), the following exceptions
28331  *	occur:
28332  *		v_bootinfo [all]	returned as zero
28333  *		v_sanity		returned as VTOC_SANE
28334  *						if Disk Label was sane
28335  *		v_sectorsz		returned as 512
28336  *		v_reserved [all]	retunred as zero
28337  *		timestamp [all]		returned as zero
28338  *
28339  *	See  dklabel.h, read_vtoc(), and write_vtoc().
28340  */
28341 
28342 
28343      /* (from dkio.h) */
28344 
28345 
28346 
28347 
28348 
28349 /*
28350  * Partition identification tags
28351  */
28352 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h"
28353 /* Tags for EFI/GPT labels */
28354 
28355 
28356 
28357 
28358 
28359 
28360 /*
28361  * Partition permission flags
28362  */
28363 
28364 
28365 
28366 /*
28367  * error codes for reading & writing vtoc
28368  */
28369 
28370 
28371 
28372 
28373 
28374 
28375 
28376 struct partition {
28377  ushort_t p_tag; /* ID tag of partition */
28378  ushort_t p_flag; /* permission flags */
28379  daddr_t p_start; /* start sector no of partition */
28380  long p_size; /* # of blocks in partition */
28381 };
28382 
28383 struct vtoc {
28384  unsigned long v_bootinfo[3]; /* info needed by mboot (unsupported) */
28385  unsigned long v_sanity; /* to verify vtoc sanity */
28386  unsigned long v_version; /* layout version */
28387  char v_volume[8]; /* volume name */
28388  ushort_t v_sectorsz; /* sector size in bytes */
28389  ushort_t v_nparts; /* number of partitions */
28390  unsigned long v_reserved[10]; /* free space */
28391  struct partition v_part[16]; /* partition headers */
28392  time_t timestamp[16]; /* partition timestamp (unsupported) */
28393  char v_asciilabel[128]; /* for compatibility */
28394 };
28395 
28396 struct extpartition {
28397  ushort_t p_tag; /* ID tag of partition */
28398  ushort_t p_flag; /* permission flags */
28399  ushort_t p_pad[2];
28400  diskaddr_t p_start; /* start sector no of partition */
28401  diskaddr_t p_size; /* # of blocks in partition */
28402 };
28403 
28404 
28405 struct extvtoc {
28406  uint64_t v_bootinfo[3]; /* info needed by mboot (unsupported) */
28407  uint64_t v_sanity; /* to verify vtoc sanity */
28408  uint64_t v_version; /* layout version */
28409  char v_volume[8]; /* volume name */
28410  ushort_t v_sectorsz; /* sector size in bytes */
28411  ushort_t v_nparts; /* number of partitions */
28412  ushort_t pad[2];
28413  uint64_t v_reserved[10];
28414  struct extpartition v_part[16]; /* partition headers */
28415  uint64_t timestamp[16]; /* partition timestamp (unsupported) */
28416  char v_asciilabel[128]; /* for compatibility */
28417 };
28418 # 334 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h"
28419 /*
28420  * These defines are the mode parameter for the checksum routines.
28421  */
28422 
28423 
28424 
28425 extern int read_vtoc(int, struct vtoc *);
28426 extern int write_vtoc(int, struct vtoc *);
28427 extern int read_extvtoc(int, struct extvtoc *);
28428 extern int write_extvtoc(int, struct extvtoc *);
28429 # 33 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28430 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
28431 /*
28432  * CDDL HEADER START
28433  *
28434  * The contents of this file are subject to the terms of the
28435  * Common Development and Distribution License (the "License").
28436  * You may not use this file except in compliance with the License.
28437  *
28438  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28439  * or http://www.opensolaris.org/os/licensing.
28440  * See the License for the specific language governing permissions
28441  * and limitations under the License.
28442  *
28443  * When distributing Covered Code, include this CDDL HEADER in each
28444  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28445  * If applicable, add the following below this CDDL HEADER, with the
28446  * fields enclosed by brackets "[]" replaced with your own identifying
28447  * information: Portions Copyright [yyyy] [name of copyright owner]
28448  *
28449  * CDDL HEADER END
28450  */
28451 
28452 /*
28453  * Copyright (c) 2013 Gary Mills
28454  *
28455  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
28456  * Use is subject to license terms.
28457  */
28458 
28459 /*	Copyright (c) 1988 AT&T	*/
28460 /*	  All Rights Reserved  	*/
28461 # 34 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28462 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
28463 /*
28464  * CDDL HEADER START
28465  *
28466  * The contents of this file are subject to the terms of the
28467  * Common Development and Distribution License (the "License").
28468  * You may not use this file except in compliance with the License.
28469  *
28470  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28471  * or http://www.opensolaris.org/os/licensing.
28472  * See the License for the specific language governing permissions
28473  * and limitations under the License.
28474  *
28475  * When distributing Covered Code, include this CDDL HEADER in each
28476  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28477  * If applicable, add the following below this CDDL HEADER, with the
28478  * fields enclosed by brackets "[]" replaced with your own identifying
28479  * information: Portions Copyright [yyyy] [name of copyright owner]
28480  *
28481  * CDDL HEADER END
28482  */
28483 
28484 /*
28485  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28486  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
28487  */
28488 
28489 /*	Copyright (c) 1988 AT&T	*/
28490 /*	  All Rights Reserved  	*/
28491 
28492 /*
28493  * User-visible pieces of the ANSI C standard I/O package.
28494  */
28495 # 35 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28496 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
28497 /*
28498  * CDDL HEADER START
28499  *
28500  * The contents of this file are subject to the terms of the
28501  * Common Development and Distribution License (the "License").
28502  * You may not use this file except in compliance with the License.
28503  *
28504  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28505  * or http://www.opensolaris.org/os/licensing.
28506  * See the License for the specific language governing permissions
28507  * and limitations under the License.
28508  *
28509  * When distributing Covered Code, include this CDDL HEADER in each
28510  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28511  * If applicable, add the following below this CDDL HEADER, with the
28512  * fields enclosed by brackets "[]" replaced with your own identifying
28513  * information: Portions Copyright [yyyy] [name of copyright owner]
28514  *
28515  * CDDL HEADER END
28516  */
28517 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28518 /*	  All Rights Reserved  	*/
28519 
28520 /*
28521  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
28522  * Use is subject to license terms.
28523  */
28524 # 36 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28525 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
28526 /*
28527  * CDDL HEADER START
28528  *
28529  * The contents of this file are subject to the terms of the
28530  * Common Development and Distribution License, Version 1.0 only
28531  * (the "License").  You may not use this file except in compliance
28532  * with the License.
28533  *
28534  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28535  * or http://www.opensolaris.org/os/licensing.
28536  * See the License for the specific language governing permissions
28537  * and limitations under the License.
28538  *
28539  * When distributing Covered Code, include this CDDL HEADER in each
28540  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28541  * If applicable, add the following below this CDDL HEADER, with the
28542  * fields enclosed by brackets "[]" replaced with your own identifying
28543  * information: Portions Copyright [yyyy] [name of copyright owner]
28544  *
28545  * CDDL HEADER END
28546  */
28547 /*
28548  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28549  */
28550 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28551 /*	  All Rights Reserved  	*/
28552 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h"
28553 struct pkginfo {
28554  char *pkginst;
28555  char *name;
28556  char *arch;
28557  char *version;
28558  char *vendor;
28559  char *basedir;
28560  char *catg;
28561  char status;
28562 };
28563 
28564 extern char *pkgdir;
28565 
28566 extern char *pkgparam(char *, char *);
28567 extern int pkginfo(struct pkginfo *, char *, ...),
28568   pkgnmchk(char *, char *, int);
28569 # 37 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28570 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/valtools.h" 1
28571 /*
28572  * CDDL HEADER START
28573  *
28574  * The contents of this file are subject to the terms of the
28575  * Common Development and Distribution License, Version 1.0 only
28576  * (the "License").  You may not use this file except in compliance
28577  * with the License.
28578  *
28579  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28580  * or http://www.opensolaris.org/os/licensing.
28581  * See the License for the specific language governing permissions
28582  * and limitations under the License.
28583  *
28584  * When distributing Covered Code, include this CDDL HEADER in each
28585  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28586  * If applicable, add the following below this CDDL HEADER, with the
28587  * fields enclosed by brackets "[]" replaced with your own identifying
28588  * information: Portions Copyright [yyyy] [name of copyright owner]
28589  *
28590  * CDDL HEADER END
28591  */
28592 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28593 /*	  All Rights Reserved  	*/
28594 
28595 
28596 
28597 
28598 
28599 #pragma ident "%Z%%M%	%I%	%E% SMI"
28600 
28601 
28602 
28603 
28604 
28605 struct _choice_ {
28606  char *token;
28607  char *text;
28608  struct _choice_ *next;
28609 };
28610 
28611 struct _menu_ {
28612  char *label;
28613  int attr;
28614  short longest;
28615  short nchoices;
28616  struct _choice_
28617   *choice;
28618  char **invis;
28619 };
28620 
28621 typedef struct _menu_ CKMENU;
28622 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28623 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
28624 /*
28625  * CDDL HEADER START
28626  *
28627  * The contents of this file are subject to the terms of the
28628  * Common Development and Distribution License (the "License").
28629  * You may not use this file except in compliance with the License.
28630  *
28631  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28632  * or http://www.opensolaris.org/os/licensing.
28633  * See the License for the specific language governing permissions
28634  * and limitations under the License.
28635  *
28636  * When distributing Covered Code, include this CDDL HEADER in each
28637  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28638  * If applicable, add the following below this CDDL HEADER, with the
28639  * fields enclosed by brackets "[]" replaced with your own identifying
28640  * information: Portions Copyright [yyyy] [name of copyright owner]
28641  *
28642  * CDDL HEADER END
28643  */
28644 
28645 /*
28646  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
28647  * Use is subject to license terms.
28648  */
28649 
28650 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28651 /* All Rights Reserved */
28652 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
28653 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
28654 /*
28655  * CDDL HEADER START
28656  *
28657  * The contents of this file are subject to the terms of the
28658  * Common Development and Distribution License (the "License").
28659  * You may not use this file except in compliance with the License.
28660  *
28661  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28662  * or http://www.opensolaris.org/os/licensing.
28663  * See the License for the specific language governing permissions
28664  * and limitations under the License.
28665  *
28666  * When distributing Covered Code, include this CDDL HEADER in each
28667  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28668  * If applicable, add the following below this CDDL HEADER, with the
28669  * fields enclosed by brackets "[]" replaced with your own identifying
28670  * information: Portions Copyright [yyyy] [name of copyright owner]
28671  *
28672  * CDDL HEADER END
28673  */
28674 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28675 /*	  All Rights Reserved  	*/
28676 
28677 
28678 /*
28679  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
28680  * Use is subject to license terms.
28681  *
28682  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
28683  * Copyright 2016 Joyent, Inc.
28684  */
28685 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
28686 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
28687 /*
28688  * CDDL HEADER START
28689  *
28690  * The contents of this file are subject to the terms of the
28691  * Common Development and Distribution License (the "License").
28692  * You may not use this file except in compliance with the License.
28693  *
28694  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28695  * or http://www.opensolaris.org/os/licensing.
28696  * See the License for the specific language governing permissions
28697  * and limitations under the License.
28698  *
28699  * When distributing Covered Code, include this CDDL HEADER in each
28700  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28701  * If applicable, add the following below this CDDL HEADER, with the
28702  * fields enclosed by brackets "[]" replaced with your own identifying
28703  * information: Portions Copyright [yyyy] [name of copyright owner]
28704  *
28705  * CDDL HEADER END
28706  */
28707 
28708 /*
28709  * Copyright (c) 2013 Gary Mills
28710  *
28711  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
28712  * Use is subject to license terms.
28713  */
28714 
28715 /*	Copyright (c) 1988 AT&T	*/
28716 /*	  All Rights Reserved  	*/
28717 # 40 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
28718 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
28719 /*
28720  * CDDL HEADER START
28721  *
28722  * The contents of this file are subject to the terms of the
28723  * Common Development and Distribution License (the "License").
28724  * You may not use this file except in compliance with the License.
28725  *
28726  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28727  * or http://www.opensolaris.org/os/licensing.
28728  * See the License for the specific language governing permissions
28729  * and limitations under the License.
28730  *
28731  * When distributing Covered Code, include this CDDL HEADER in each
28732  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28733  * If applicable, add the following below this CDDL HEADER, with the
28734  * fields enclosed by brackets "[]" replaced with your own identifying
28735  * information: Portions Copyright [yyyy] [name of copyright owner]
28736  *
28737  * CDDL HEADER END
28738  */
28739 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28740 /*	  All Rights Reserved  	*/
28741 
28742 /*
28743  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
28744  * Use is subject to license terms.
28745  */
28746 # 41 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
28747 
28748 /* Settings for procedure scripts */
28749 
28750 
28751 
28752 
28753 
28754 
28755 /* Settings for class action scripts */
28756 
28757 
28758 
28759 
28760 
28761 /* Settings for non-privileged scripts */
28762 # 64 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
28763 /* Settings for admin "rscriptalt" option */
28764 # 80 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
28765 /* Additional cfent/cfextra codes. */
28766 
28767 
28768 
28769 /* This holds admin file data. */
28770 struct admin {
28771  char *mail;
28772  char *instance;
28773  char *partial;
28774  char *runlevel;
28775  char *idepend;
28776  char *rdepend;
28777  char *space;
28778  char *setuid;
28779  char *conflict;
28780  char *action;
28781  char *networktimeout;
28782  char *networkretries;
28783  char *authentication;
28784  char *keystore;
28785  char *proxy;
28786  char *basedir;
28787  char *rscriptalt;
28788 };
28789 
28790 /*
28791  * This table details the status of all filesystems available to the target
28792  * host.
28793  */
28794 struct fstable {
28795  char *name; /* name of filesystem, (mount point) */
28796  int namlen; /* The length of the name (mountpoint) */
28797  fsblkcnt_t bsize; /* fundamental file system block size */
28798  fsblkcnt_t frsize; /* file system fragment size */
28799  fsblkcnt_t bfree; /* total # of free blocks */
28800  fsblkcnt_t bused; /* total # of used blocks */
28801  fsblkcnt_t ffree; /* total # of free file nodes */
28802  fsblkcnt_t fused; /* total # of used file nodes */
28803  char *fstype; /* type of filesystem - nfs, lo, ... */
28804  char *remote_name; /* client's mounted filesystem */
28805  unsigned writeable:1; /* access permission */
28806  unsigned write_tested:1; /* access permission fully tested */
28807  unsigned remote:1; /* on a remote filesystem */
28808  unsigned mounted:1; /* actually mounted right now */
28809  unsigned srvr_map:1; /* use server_map() */
28810  unsigned cl_mounted:1; /* mounted in client space */
28811  unsigned mnt_failed:1; /* attempt to loopback mount failed */
28812  unsigned served:1; /* filesystem comes from a server */
28813 };
28814 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28815 # 47 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h"
28816 /*
28817  * ckdate.c
28818  */
28819 extern int ckdate_err (char *fmt, char *error);
28820 extern int ckdate_hlp (char *fmt, char *help);
28821 extern int ckdate_val (char *fmt, char *input);
28822 extern int ckdate (char *date, char *fmt, char *defstr, char *error, char *help, char *prompt);
28823 
28824 
28825 /*
28826  * ckgid.c
28827  */
28828 extern int ckgid_dsp (void);
28829 extern int ckgid_val (char *grpnm);
28830 extern int ckgrpfile (void);
28831 extern void ckgid_err (int disp, char *error);
28832 extern void ckgid_hlp (int disp, char *help);
28833 extern int ckgid (char *gid, short disp, char *defstr, char *error, char *help, char *prompt);
28834 
28835 
28836 /*
28837  * ckint.c
28838  */
28839 extern int ckint_val (char *value, short base);
28840 extern void ckint_err (short base, char *error);
28841 extern void ckint_hlp (short base, char *help);
28842 extern int ckint (long *intval, short base, char *defstr, char *error, char *help, char *prompt);
28843 
28844 
28845 /*
28846  * ckitem.c
28847  */
28848 extern CKMENU *allocmenu (char *label, int attr);
28849 extern void ckitem_err (CKMENU *menup, char *error);
28850 extern void ckitem_hlp (CKMENU *menup, char *help);
28851 extern int ckitem (CKMENU *menup, char *item[], short max, char *defstr, char *error, char *help, char *prompt);
28852 
28853 
28854 extern int setitem (CKMENU *menup, char *choice);
28855 extern int setinvis (CKMENU *menup, char *choice);
28856 extern void printmenu (CKMENU *menup);
28857 
28858 /*
28859  * ckkeywd.c
28860  */
28861 extern int ckkeywd (char *strval, char *keyword[], char *defstr, char *error, char *help, char *prompt);
28862 
28863 
28864 /*
28865  * ckpath.c
28866  */
28867 extern int ckpath_stx (int pflags);
28868 extern int ckpath_val (char *path, int pflags);
28869 extern void ckpath_err (int pflags, char *error, char *input);
28870 extern void ckpath_hlp (int pflags, char *help);
28871 extern int ckpath (char *pathval, int pflags, char *defstr, char *error, char *help, char *prompt);
28872 
28873 
28874 /*
28875  * ckrange.c
28876  */
28877 extern void ckrange_err (long lower, long upper, int base, char *error);
28878 
28879 extern void ckrange_hlp (long lower, long upper, int base, char *help);
28880 extern int ckrange_val (long lower, long upper, int base, char *input);
28881 
28882 extern int ckrange (long *rngval, long lower, long upper, short base, char *defstr, char *error, char *help, char *prompt);
28883 
28884 
28885 
28886 /*
28887  * ckstr.c
28888  */
28889 extern int ckstr_val (char *regexp[], int length, char *input);
28890 extern void ckstr_err (char *regexp[], int length, char *error, char *input);
28891 
28892 extern void ckstr_hlp (char *regexp[], int length, char *help);
28893 extern int ckstr (char *strval, char *regexp[], int length, char *defstr, char *error, char *help, char *prompt);
28894 
28895 
28896 
28897 /*
28898  * cktime.c
28899  */
28900 extern int cktime_val (char *fmt, char *input);
28901 extern int cktime_err (char *fmt, char *error);
28902 extern int cktime_hlp (char *fmt, char *help);
28903 extern int fmtcheck (char *fmt);
28904 extern int cktime (char *tod, char *fmt, char *defstr, char *error, char *help, char *prompt);
28905 
28906 
28907 /*
28908  * ckuid.c
28909  */
28910 extern int ckuid_dsp (void);
28911 extern int ckuid_val (char *usrnm);
28912 extern int ckpwdfile (void);
28913 extern void ckuid_err (short disp, char *error);
28914 extern void ckuid_hlp (int disp, char *help);
28915 extern int ckuid (char *uid, short disp, char *defstr, char *error, char *help, char *prompt);
28916 
28917 
28918 /*
28919  * ckyorn.c
28920  */
28921 extern int ckyorn_val (char *str);
28922 extern void ckyorn_err (char *error);
28923 extern void ckyorn_hlp (char *help);
28924 extern int ckyorn (char *yorn, char *defstr, char *error, char *help, char *prompt);
28925 
28926 
28927 /*
28928  * devattr.c
28929  */
28930 extern char *devattr (char *device, char *attribute);
28931 
28932 /*
28933  * devreserv.c
28934  */
28935 extern char *_rsvtabpath (void);
28936 extern int _openlkfile (void);
28937 extern int _closelkfile (void);
28938 extern int unreserv (long key, char *device);
28939 extern char **devreserv (long key, char **rsvlst[]);
28940 extern int devfree (long key, char *device);
28941 extern struct reservdev **reservdev (void);
28942 
28943 /*
28944  * devtab.c
28945  */
28946 extern void _setdevtab (void);
28947 extern void _enddevtab (void);
28948 extern char *_devtabpath (void);
28949 extern int _opendevtab (char *mode);
28950 extern int _validalias (char *alias);
28951 extern struct devtabent *_getdevtabent (void);
28952 extern void _freedevtabent (struct devtabent *ent);
28953 extern struct devtabent *_getdevrec (char *device);
28954 
28955 /*
28956  * dgrpent.c
28957  */
28958 extern void _setdgrptab (void);
28959 extern void _enddgrptab (void);
28960 extern char *_dgrptabpath (void);
28961 extern int _opendgrptab (char *mode);
28962 extern struct dgrptabent *_getdgrptabent (void);
28963 extern void _freedgrptabent (struct dgrptabent *ent);
28964 extern struct dgrptabent *_getdgrprec (char *dgroup);
28965 
28966 /*
28967  * fulldevnm.c
28968  */
28969 extern char *getfullblkname (char *cp);
28970 extern char *getfullrawname (char *cp);
28971 
28972 /*
28973  * getdev.c
28974  */
28975 extern char **getdev (char **devices, char **criteria, int options);
28976 
28977 /*
28978  * getdgrp.c
28979  */
28980 extern char **getdgrp (char **dgroups, char **criteria, int options);
28981 
28982 /*
28983  * getinput.c
28984  */
28985 extern int getinput (char *s);
28986 
28987 /*
28988  * getvol.c
28989  */
28990 extern int getvol (char *device, char *label, int options, char *prompt);
28991 
28992 extern int _getvol (char *device, char *label, int options, char *prompt, char *norewind);
28993 
28994 extern void doremovecmd (char *device, int echo);
28995 
28996 /*
28997  * listdev.c
28998  */
28999 extern char **listdev (char *device);
29000 
29001 /*
29002  * listdgrp.c
29003  */
29004 extern char **listdgrp (char *dgroup);
29005 
29006 /*
29007  * memory.c
29008  */
29009 extern long sysmem (void);
29010 extern long asysmem (void);
29011 
29012 /*
29013  * pkginfo.c
29014  */
29015 extern int pkginfo (struct pkginfo *info, char *pkginst, ...);
29016 extern int fpkginfo (struct pkginfo *info, char *pkginst);
29017 extern char *fpkginst (char *pkg, ...);
29018 
29019 /*
29020  * pkgnmchk.c
29021  */
29022 extern int pkgnmchk (register char *pkg, register char *spec, int presvr4flg);
29023 
29024 extern void set_ABI_namelngth (void);
29025 extern int get_ABI_namelngth (void);
29026 
29027 /*
29028  * pkgparam.c
29029  */
29030 extern char *fpkgparam (FILE *fp, char *param);
29031 extern char *pkgparam (char *pkg, char *param);
29032 extern void set_PKGpaths (char *path);
29033 extern char *get_PKGLOC (void);
29034 extern char *get_PKGADM (void);
29035 extern void set_PKGADM(char *newpath);
29036 extern void set_PKGLOC(char *newpath);
29037 
29038 /*
29039  * putdev.c
29040  */
29041 extern int _putdevtabrec (FILE *stream, struct devtabent *rec);
29042 extern int _adddevtabrec (char *alias, char **attrval);
29043 extern int _moddevtabrec (char *device, char **attrval);
29044 extern int _rmdevtabrec (char *device);
29045 extern int _rmdevtabattrs (char *device, char **attributes, char ***notfounds);
29046 
29047 
29048 /*
29049  * putdgrp.c
29050  */
29051 extern int _putdgrptabrec (FILE *stream, struct dgrptabent *rec);
29052 extern int _adddgrptabrec (char *dgrp, char **members);
29053 extern int _rmdgrptabrec (char *dgrp);
29054 extern int _rmdgrpmems (char *dgrp, char **mems, char ***notfounds);
29055 
29056 /*
29057  * puterror.c
29058  */
29059 extern void puterror (FILE *fp, char *defmesg, char *error);
29060 
29061 /*
29062  * puthelp.c
29063  */
29064 extern void puthelp (FILE *fp, char *defmesg, char *help);
29065 
29066 /*
29067  * putprmpt.c
29068  */
29069 extern void putprmpt (FILE *fp, char *prompt, char *choices[], char *defstr);
29070 
29071 
29072 /*
29073  * puttext.c
29074  */
29075 extern int puttext (FILE *fp, char *str, int lmarg, int rmarg);
29076 
29077 /*
29078  * rdwr_vtoc.c
29079  */
29080 extern int read_vtoc (int fd, struct vtoc *vtoc);
29081 extern int write_vtoc (int fd, struct vtoc *vtoc);
29082 # 40 "quit.c" 2
29083 
29084 extern struct pkgdev pkgdev;
29085 extern char pkgloc[], *t_pkgmap, *t_pkginfo;
29086 
29087 extern int started;
29088 
29089 
29090 
29091 
29092 
29093 void
29094 quit(int retcode)
29095 {
29096  (void) signal(2, (void (*)())1);
29097  (void) signal(1, (void (*)())1);
29098 
29099  if (retcode == 3)
29100   (void) fprintf((&__iob[2]), gettext("## Packaging terminated at user request.\n"));
29101  else if (retcode)
29102   (void) fprintf((&__iob[2]), gettext("## Packaging was not successful.\n"));
29103  else
29104   (void) fprintf((&__iob[2]), gettext("## Packaging complete.\n"));
29105 
29106  if (retcode && started)
29107   (void) rrmdir(pkgloc); /* clean up output directory */
29108 
29109  if (pkgdev.mount)
29110   (void) pkgumount(&pkgdev);
29111 
29112  if (t_pkgmap)
29113   (void) unlink(t_pkgmap);
29114  if (t_pkginfo)
29115   (void) unlink(t_pkginfo);
29116  exit(retcode);
29117 }
29118