1 # 1 "ckentry.c"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "ckentry.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 2009 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 "ckentry.c" 2
1475 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/memory.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 /*
1498  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1499  */
1500 /*	Copyright (c) 1988 AT&T	*/
1501 /*	  All Rights Reserved  	*/
1502 
1503 
1504 
1505 
1506 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
1507 /*
1508  * CDDL HEADER START
1509  *
1510  * The contents of this file are subject to the terms of the
1511  * Common Development and Distribution License (the "License").
1512  * You may not use this file except in compliance with the License.
1513  *
1514  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1515  * or http://www.opensolaris.org/os/licensing.
1516  * See the License for the specific language governing permissions
1517  * and limitations under the License.
1518  *
1519  * When distributing Covered Code, include this CDDL HEADER in each
1520  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1521  * If applicable, add the following below this CDDL HEADER, with the
1522  * fields enclosed by brackets "[]" replaced with your own identifying
1523  * information: Portions Copyright [yyyy] [name of copyright owner]
1524  *
1525  * CDDL HEADER END
1526  */
1527 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
1528 /*	  All Rights Reserved  	*/
1529 
1530 
1531 /*
1532  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
1533  * Use is subject to license terms.
1534  *
1535  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
1536  * Copyright 2016 Joyent, Inc.
1537  */
1538 
1539 
1540 
1541 
1542 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1543 /*
1544  * CDDL HEADER START
1545  *
1546  * The contents of this file are subject to the terms of the
1547  * Common Development and Distribution License (the "License").
1548  * You may not use this file except in compliance with the License.
1549  *
1550  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1551  * or http://www.opensolaris.org/os/licensing.
1552  * See the License for the specific language governing permissions
1553  * and limitations under the License.
1554  *
1555  * When distributing Covered Code, include this CDDL HEADER in each
1556  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1557  * If applicable, add the following below this CDDL HEADER, with the
1558  * fields enclosed by brackets "[]" replaced with your own identifying
1559  * information: Portions Copyright [yyyy] [name of copyright owner]
1560  *
1561  * CDDL HEADER END
1562  */
1563 
1564 /*
1565  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1566  * Copyright 2016 Joyent, Inc.
1567  *
1568  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1569  * Use is subject to license terms.
1570  */
1571 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1572 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1573 /*
1574  * CDDL HEADER START
1575  *
1576  * The contents of this file are subject to the terms of the
1577  * Common Development and Distribution License (the "License").
1578  * You may not use this file except in compliance with the License.
1579  *
1580  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1581  * or http://www.opensolaris.org/os/licensing.
1582  * See the License for the specific language governing permissions
1583  * and limitations under the License.
1584  *
1585  *
1586  * When distributing Covered Code, include this CDDL HEADER in each
1587  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1588  * If applicable, add the following below this CDDL HEADER, with the
1589  * fields enclosed by brackets "[]" replaced with your own identifying
1590  * information: Portions Copyright [yyyy] [name of copyright owner]
1591  *
1592  * CDDL HEADER END
1593  */
1594 
1595 /*
1596  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1597  * Use is subject to license terms.
1598  * Copyright 2016 Joyent, Inc.
1599  */
1600 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1601 
1602 /*
1603  * Machine dependent definitions moved to <sys/machtypes.h>.
1604  */
1605 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 1
1606 /*
1607  * CDDL HEADER START
1608  *
1609  * The contents of this file are subject to the terms of the
1610  * Common Development and Distribution License, Version 1.0 only
1611  * (the "License").  You may not use this file except in compliance
1612  * with the License.
1613  *
1614  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1615  * or http://www.opensolaris.org/os/licensing.
1616  * See the License for the specific language governing permissions
1617  * and limitations under the License.
1618  *
1619  * When distributing Covered Code, include this CDDL HEADER in each
1620  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1621  * If applicable, add the following below this CDDL HEADER, with the
1622  * fields enclosed by brackets "[]" replaced with your own identifying
1623  * information: Portions Copyright [yyyy] [name of copyright owner]
1624  *
1625  * CDDL HEADER END
1626  */
1627 /*
1628  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1629  * Use is subject to license terms.
1630  */
1631 
1632 
1633 
1634 
1635 #pragma ident "%Z%%M%	%I%	%E% SMI"
1636 
1637 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1638 /*
1639  * CDDL HEADER START
1640  *
1641  * The contents of this file are subject to the terms of the
1642  * Common Development and Distribution License (the "License").
1643  * You may not use this file except in compliance with the License.
1644  *
1645  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1646  * or http://www.opensolaris.org/os/licensing.
1647  * See the License for the specific language governing permissions
1648  * and limitations under the License.
1649  *
1650  * When distributing Covered Code, include this CDDL HEADER in each
1651  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1652  * If applicable, add the following below this CDDL HEADER, with the
1653  * fields enclosed by brackets "[]" replaced with your own identifying
1654  * information: Portions Copyright [yyyy] [name of copyright owner]
1655  *
1656  * CDDL HEADER END
1657  */
1658 
1659 /*
1660  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1661  * Copyright 2016 Joyent, Inc.
1662  *
1663  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1664  * Use is subject to license terms.
1665  */
1666 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
1667 
1668 
1669 
1670 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h" 1
1671 /*
1672  * CDDL HEADER START
1673  *
1674  * The contents of this file are subject to the terms of the
1675  * Common Development and Distribution License (the "License").
1676  * You may not use this file except in compliance with the License.
1677  *
1678  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1679  * or http://www.opensolaris.org/os/licensing.
1680  * See the License for the specific language governing permissions
1681  * and limitations under the License.
1682  *
1683  * When distributing Covered Code, include this CDDL HEADER in each
1684  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1685  * If applicable, add the following below this CDDL HEADER, with the
1686  * fields enclosed by brackets "[]" replaced with your own identifying
1687  * information: Portions Copyright [yyyy] [name of copyright owner]
1688  *
1689  * CDDL HEADER END
1690  */
1691 /*
1692  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
1693  * Use is subject to license terms.
1694  */
1695 
1696 
1697 
1698 
1699 #pragma ident "%Z%%M%	%I%	%E% SMI"
1700 
1701 
1702 
1703 
1704 
1705 /*
1706  * Machine dependent types:
1707  *
1708  *	intel ia32 Version
1709  */
1710 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h"
1711 typedef struct _label_t { long val[6]; } label_t;
1712 
1713 
1714 
1715 typedef unsigned char lock_t; /* lock work for busy wait */
1716 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
1717 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1718 
1719 /*
1720  * Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
1721  * committee's working draft for the revision of the current ISO C standard,
1722  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
1723  * required by any standard but constitute a useful, general purpose set
1724  * of type definitions which is namespace clean with respect to all standards.
1725  */
1726 
1727 
1728 
1729 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
1730 /*
1731  * CDDL HEADER START
1732  *
1733  * The contents of this file are subject to the terms of the
1734  * Common Development and Distribution License, Version 1.0 only
1735  * (the "License").  You may not use this file except in compliance
1736  * with the License.
1737  *
1738  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1739  * or http://www.opensolaris.org/os/licensing.
1740  * See the License for the specific language governing permissions
1741  * and limitations under the License.
1742  *
1743  * When distributing Covered Code, include this CDDL HEADER in each
1744  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1745  * If applicable, add the following below this CDDL HEADER, with the
1746  * fields enclosed by brackets "[]" replaced with your own identifying
1747  * information: Portions Copyright [yyyy] [name of copyright owner]
1748  *
1749  * CDDL HEADER END
1750  */
1751 /*
1752  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1753  *
1754  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1755  * Use is subject to license terms.
1756  */
1757 
1758 
1759 
1760 
1761 /*
1762  * This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
1763  * of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
1764  * Programming language - C.
1765  *
1766  * Programs/Modules should not directly include this file.  Access to the
1767  * types defined in this file should be through the inclusion of one of the
1768  * following files:
1769  *
1770  *	<sys/types.h>		Provides only the "_t" types defined in this
1771  *				file which is a subset of the contents of
1772  *				<inttypes.h>.  (This can be appropriate for
1773  *				all programs/modules except those claiming
1774  *				ANSI-C conformance.)
1775  *
1776  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
1777  *				components of <inttypes.h>.
1778  *
1779  *	<inttypes.h>		For use by applications.
1780  *
1781  * See these files for more details.
1782  */
1783 
1784 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1785 /*
1786  * CDDL HEADER START
1787  *
1788  * The contents of this file are subject to the terms of the
1789  * Common Development and Distribution License (the "License").
1790  * You may not use this file except in compliance with the License.
1791  *
1792  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1793  * or http://www.opensolaris.org/os/licensing.
1794  * See the License for the specific language governing permissions
1795  * and limitations under the License.
1796  *
1797  * When distributing Covered Code, include this CDDL HEADER in each
1798  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1799  * If applicable, add the following below this CDDL HEADER, with the
1800  * fields enclosed by brackets "[]" replaced with your own identifying
1801  * information: Portions Copyright [yyyy] [name of copyright owner]
1802  *
1803  * CDDL HEADER END
1804  */
1805 
1806 /*
1807  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1808  * Copyright 2016 Joyent, Inc.
1809  *
1810  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1811  * Use is subject to license terms.
1812  */
1813 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 2
1814 
1815 
1816 
1817 
1818 
1819 /*
1820  * Basic / Extended integer types
1821  *
1822  * The following defines the basic fixed-size integer types.
1823  *
1824  * Implementations are free to typedef them to Standard C integer types or
1825  * extensions that they support. If an implementation does not support one
1826  * of the particular integer data types below, then it should not define the
1827  * typedefs and macros corresponding to that data type.  Note that int8_t
1828  * is not defined in -Xs mode on ISAs for which the ABI specifies "char"
1829  * as an unsigned entity because there is no way to define an eight bit
1830  * signed integral.
1831  */
1832 
1833 typedef char int8_t;
1834 
1835 
1836 
1837 typedef short int16_t;
1838 typedef int int32_t;
1839 
1840 
1841 
1842 
1843 
1844 
1845 typedef long long int64_t;
1846 
1847 
1848 
1849 typedef unsigned char uint8_t;
1850 typedef unsigned short uint16_t;
1851 typedef unsigned int uint32_t;
1852 
1853 
1854 
1855 
1856 typedef unsigned long long uint64_t;
1857 
1858 
1859 
1860 /*
1861  * intmax_t and uintmax_t are to be the longest (in number of bits) signed
1862  * and unsigned integer types supported by the implementation.
1863  */
1864 
1865 typedef int64_t intmax_t;
1866 typedef uint64_t uintmax_t;
1867 
1868 
1869 
1870 
1871 
1872 /*
1873  * intptr_t and uintptr_t are signed and unsigned integer types large enough
1874  * to hold any data pointer; that is, data pointers can be assigned into or
1875  * from these integer types without losing precision.
1876  */
1877 
1878 
1879 
1880 
1881 typedef int intptr_t;
1882 typedef unsigned int uintptr_t;
1883 
1884 
1885 /*
1886  * The following define the fastest integer types that can hold the
1887  * specified number of bits.
1888  */
1889 
1890 typedef char int_fast8_t;
1891 
1892 
1893 
1894 typedef int int_fast16_t;
1895 typedef int int_fast32_t;
1896 
1897 
1898 
1899 
1900 typedef long long int_fast64_t;
1901 
1902 
1903 
1904 typedef unsigned char uint_fast8_t;
1905 typedef unsigned int uint_fast16_t;
1906 typedef unsigned int uint_fast32_t;
1907 
1908 
1909 
1910 
1911 typedef unsigned long long uint_fast64_t;
1912 
1913 
1914 
1915 /*
1916  * The following define the smallest integer types that can hold the
1917  * specified number of bits.
1918  */
1919 
1920 typedef char int_least8_t;
1921 
1922 
1923 
1924 typedef short int_least16_t;
1925 typedef int int_least32_t;
1926 
1927 
1928 
1929 
1930 typedef long long int_least64_t;
1931 
1932 
1933 
1934 /*
1935  * If these are changed, please update char16_t and char32_t in head/uchar.h.
1936  */
1937 typedef unsigned char uint_least8_t;
1938 typedef unsigned short uint_least16_t;
1939 typedef unsigned int uint_least32_t;
1940 
1941 
1942 
1943 
1944 typedef unsigned long long uint_least64_t;
1945 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1946 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
1947 /*
1948  * Strictly conforming ANSI C environments prior to the 1999
1949  * revision of the C Standard (ISO/IEC 9899:1999) do not have
1950  * the long long data type.
1951  */
1952 
1953 typedef long long longlong_t;
1954 typedef unsigned long long u_longlong_t;
1955 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
1956 /*
1957  * These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
1958  * to use them instead of int32_t and uint32_t because DEC had
1959  * shipped 64-bit wide.
1960  */
1961 
1962 
1963 
1964 
1965 typedef long t_scalar_t; /* historical versions */
1966 typedef unsigned long t_uscalar_t;
1967 
1968 
1969 /*
1970  * POSIX Extensions
1971  */
1972 typedef unsigned char uchar_t;
1973 typedef unsigned short ushort_t;
1974 typedef unsigned int uint_t;
1975 typedef unsigned long ulong_t;
1976 
1977 typedef char *caddr_t; /* ?<core address> type */
1978 typedef long daddr_t; /* <disk address> type */
1979 typedef short cnt_t; /* ?<count> type */
1980 
1981 
1982 
1983 
1984 
1985 
1986 typedef int ptrdiff_t; /* (historical version) */
1987 
1988 
1989 
1990 /*
1991  * VM-related types
1992  */
1993 typedef ulong_t pfn_t; /* page frame number */
1994 typedef ulong_t pgcnt_t; /* number of pages */
1995 typedef long spgcnt_t; /* signed number of pages */
1996 
1997 typedef uchar_t use_t; /* use count for swap.  */
1998 typedef short sysid_t;
1999 typedef short index_t;
2000 typedef void *timeout_id_t; /* opaque handle from timeout(9F) */
2001 typedef void *bufcall_id_t; /* opaque handle from bufcall(9F) */
2002 
2003 /*
2004  * The size of off_t and related types depends on the setting of
2005  * _FILE_OFFSET_BITS.  (Note that other system headers define other types
2006  * related to those defined here.)
2007  *
2008  * If _LARGEFILE64_SOURCE is defined, variants of these types that are
2009  * explicitly 64 bits wide become available.
2010  */
2011 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2012 typedef u_longlong_t ino_t; /* expanded inode type	*/
2013 typedef longlong_t blkcnt_t; /* count of file blocks */
2014 typedef u_longlong_t fsblkcnt_t; /* count of file system blocks */
2015 typedef u_longlong_t fsfilcnt_t; /* count of files */
2016 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2017 typedef u_longlong_t ino64_t; /* expanded inode type	*/
2018 typedef longlong_t blkcnt64_t; /* count of file blocks */
2019 typedef u_longlong_t fsblkcnt64_t; /* count of file system blocks */
2020 typedef u_longlong_t fsfilcnt64_t; /* count of files */
2021 
2022 
2023 
2024 
2025 
2026 
2027 typedef long blksize_t; /* used for block sizes */
2028 
2029 
2030 
2031 
2032 
2033 typedef enum { B_FALSE, B_TRUE } boolean_t;
2034 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2035 /*
2036  * The {u,}pad64_t types can be used in structures such that those structures
2037  * may be accessed by code produced by compilation environments which don't
2038  * support a 64 bit integral datatype.  The intention is not to allow
2039  * use of these fields in such environments, but to maintain the alignment
2040  * and offsets of the structure.
2041  *
2042  * Similar comments for {u,}pad128_t.
2043  *
2044  * Note that these types do NOT generate any stronger alignment constraints
2045  * than those available in the underlying ABI.  See <sys/isa_defs.h>
2046  */
2047 
2048 typedef int64_t pad64_t;
2049 typedef uint64_t upad64_t;
2050 # 232 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2051 typedef union {
2052  long double _q;
2053  int32_t _l[4];
2054 } pad128_t;
2055 
2056 typedef union {
2057  long double _q;
2058  uint32_t _l[4];
2059 } upad128_t;
2060 
2061 typedef longlong_t offset_t;
2062 typedef u_longlong_t u_offset_t;
2063 typedef u_longlong_t len_t;
2064 typedef u_longlong_t diskaddr_t;
2065 
2066 
2067 
2068 
2069 /*
2070  * Definitions remaining from previous partial support for 64-bit file
2071  * offsets.  This partial support for devices greater than 2gb requires
2072  * compiler support for long long.
2073  */
2074 
2075 typedef union {
2076  offset_t _f; /* Full 64 bit offset value */
2077  struct {
2078   int32_t _l; /* lower 32 bits of offset value */
2079   int32_t _u; /* upper 32 bits of offset value */
2080  } _p;
2081 } lloff_t;
2082 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2083 typedef union {
2084  longlong_t _f; /* Full 64 bit disk address value */
2085  struct {
2086   int32_t _l; /* lower 32 bits of disk address value */
2087   int32_t _u; /* upper 32 bits of disk address value */
2088  } _p;
2089 } lldaddr_t;
2090 # 295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2091 typedef uint_t k_fltset_t; /* kernel fault set type */
2092 
2093 /*
2094  * The following type is for various kinds of identifiers.  The
2095  * actual type must be the same for all since some system calls
2096  * (such as sigsend) take arguments that may be any of these
2097  * types.  The enumeration type idtype_t defined in sys/procset.h
2098  * is used to indicate what type of id is being specified --
2099  * a process id, process group id, session id, scheduling class id,
2100  * user id, group id, project id, task id or zone id.
2101  */
2102 
2103 
2104 
2105 typedef long id_t; /* (historical version) */
2106 
2107 
2108 typedef id_t lgrp_id_t; /* lgroup ID */
2109 
2110 /*
2111  * Type useconds_t is an unsigned integral type capable of storing
2112  * values at least in the range of zero to 1,000,000.
2113  */
2114 typedef uint_t useconds_t; /* Time, in microseconds */
2115 
2116 
2117 
2118 typedef long suseconds_t; /* signed # of microseconds */
2119 
2120 
2121 /*
2122  * Typedefs for dev_t components.
2123  */
2124 
2125 
2126 
2127 
2128 typedef ulong_t major_t; /* (historical version) */
2129 typedef ulong_t minor_t; /* (historical version) */
2130 
2131 
2132 /*
2133  * The data type of a thread priority.
2134  */
2135 typedef short pri_t;
2136 
2137 /*
2138  * The data type for a CPU flags field.  (Can be extended to larger unsigned
2139  * types, if needed, limited by ability to update atomically.)
2140  */
2141 typedef ushort_t cpu_flag_t;
2142 
2143 /*
2144  * For compatibility reasons the following typedefs (prefixed o_)
2145  * can't grow regardless of the EFT definition. Although,
2146  * applications should not explicitly use these typedefs
2147  * they may be included via a system header definition.
2148  * WARNING: These typedefs may be removed in a future
2149  * release.
2150  *		ex. the definitions in s5inode.h (now obsoleted)
2151  *			remained small to preserve compatibility
2152  *			in the S5 file system type.
2153  */
2154 typedef ushort_t o_mode_t; /* old file attribute type */
2155 typedef short o_dev_t; /* old device type	*/
2156 typedef ushort_t o_uid_t; /* old UID type		*/
2157 typedef o_uid_t o_gid_t; /* old GID type		*/
2158 typedef short o_nlink_t; /* old file link type	*/
2159 typedef short o_pid_t; /* old process id type	*/
2160 typedef ushort_t o_ino_t; /* old inode type	*/
2161 
2162 
2163 /*
2164  * POSIX and XOPEN Declarations
2165  */
2166 typedef int key_t; /* IPC key type		*/
2167 
2168 
2169 
2170 typedef ulong_t mode_t; /* (historical version) */
2171 
2172 
2173 
2174 
2175 typedef unsigned int uid_t; /* UID type		*/
2176 
2177 
2178 typedef uid_t gid_t; /* GID type		*/
2179 
2180 typedef uint32_t datalink_id_t;
2181 typedef uint32_t vrid_t;
2182 
2183 typedef id_t taskid_t;
2184 typedef id_t projid_t;
2185 typedef id_t poolid_t;
2186 typedef id_t zoneid_t;
2187 typedef id_t ctid_t;
2188 
2189 /*
2190  * POSIX definitions are same as defined in thread.h and synch.h.
2191  * Any changes made to here should be reflected in corresponding
2192  * files as described in comments.
2193  */
2194 typedef uint_t pthread_t; /* = thread_t in thread.h */
2195 typedef uint_t pthread_key_t; /* = thread_key_t in thread.h */
2196 
2197 /* "Magic numbers" tagging synchronization object types */
2198 
2199 
2200 
2201 
2202 
2203 typedef struct _pthread_mutex { /* = mutex_t in synch.h */
2204  struct {
2205   uint16_t __pthread_mutex_flag1;
2206   uint8_t __pthread_mutex_flag2;
2207   uint8_t __pthread_mutex_ceiling;
2208   uint16_t __pthread_mutex_type;
2209   uint16_t __pthread_mutex_magic;
2210  } __pthread_mutex_flags;
2211  union {
2212   struct {
2213    uint8_t __pthread_mutex_pad[8];
2214   } __pthread_mutex_lock64;
2215   struct {
2216    uint32_t __pthread_ownerpid;
2217    uint32_t __pthread_lockword;
2218   } __pthread_mutex_lock32;
2219   upad64_t __pthread_mutex_owner64;
2220  } __pthread_mutex_lock;
2221  upad64_t __pthread_mutex_data;
2222 } pthread_mutex_t;
2223 
2224 typedef struct _pthread_cond { /* = cond_t in synch.h */
2225  struct {
2226   uint8_t __pthread_cond_flag[4];
2227   uint16_t __pthread_cond_type;
2228   uint16_t __pthread_cond_magic;
2229  } __pthread_cond_flags;
2230  upad64_t __pthread_cond_data;
2231 } pthread_cond_t;
2232 
2233 /*
2234  * UNIX 98 Extension
2235  */
2236 typedef struct _pthread_rwlock { /* = rwlock_t in synch.h */
2237  int32_t __pthread_rwlock_readers;
2238  uint16_t __pthread_rwlock_type;
2239  uint16_t __pthread_rwlock_magic;
2240  pthread_mutex_t __pthread_rwlock_mutex;
2241  pthread_cond_t __pthread_rwlock_readercv;
2242  pthread_cond_t __pthread_rwlock_writercv;
2243 } pthread_rwlock_t;
2244 
2245 /*
2246  * SUSV3
2247  */
2248 typedef struct {
2249  uint32_t __pthread_barrier_count;
2250  uint32_t __pthread_barrier_current;
2251  upad64_t __pthread_barrier_cycle;
2252  upad64_t __pthread_barrier_reserved;
2253  pthread_mutex_t __pthread_barrier_lock;
2254  pthread_cond_t __pthread_barrier_cond;
2255 } pthread_barrier_t;
2256 
2257 typedef pthread_mutex_t pthread_spinlock_t;
2258 
2259 /*
2260  * attributes for threads, dynamically allocated by library
2261  */
2262 typedef struct _pthread_attr {
2263  void *__pthread_attrp;
2264 } pthread_attr_t;
2265 
2266 /*
2267  * attributes for mutex, dynamically allocated by library
2268  */
2269 typedef struct _pthread_mutexattr {
2270  void *__pthread_mutexattrp;
2271 } pthread_mutexattr_t;
2272 
2273 /*
2274  * attributes for cond, dynamically allocated by library
2275  */
2276 typedef struct _pthread_condattr {
2277  void *__pthread_condattrp;
2278 } pthread_condattr_t;
2279 
2280 /*
2281  * pthread_once
2282  */
2283 typedef struct _once {
2284  upad64_t __pthread_once_pad[4];
2285 } pthread_once_t;
2286 
2287 /*
2288  * UNIX 98 Extensions
2289  * attributes for rwlock, dynamically allocated by library
2290  */
2291 typedef struct _pthread_rwlockattr {
2292  void *__pthread_rwlockattrp;
2293 } pthread_rwlockattr_t;
2294 
2295 /*
2296  * SUSV3
2297  * attributes for pthread_barrier_t, dynamically allocated by library
2298  */
2299 typedef struct {
2300  void *__pthread_barrierattrp;
2301 } pthread_barrierattr_t;
2302 
2303 typedef ulong_t dev_t; /* expanded device type */
2304 
2305 
2306 
2307 
2308 
2309 typedef ulong_t nlink_t; /* (historical version) */
2310 typedef long pid_t; /* (historical version) */
2311 # 537 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2312 typedef long time_t; /* time of day in seconds */
2313 
2314 
2315 
2316 
2317 typedef long clock_t; /* relative time in a specified resolution */
2318 
2319 
2320 
2321 
2322 typedef int clockid_t; /* clock identifier type */
2323 
2324 
2325 
2326 
2327 typedef int timer_t; /* timer identifier type */
2328 
2329 
2330 
2331 
2332 /* BEGIN CSTYLED */
2333 typedef unsigned char unchar;
2334 typedef unsigned short ushort;
2335 typedef unsigned int uint;
2336 typedef unsigned long ulong;
2337 /* END CSTYLED */
2338 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2339 /*
2340  * The following is the value of type id_t to use to indicate the
2341  * caller's current id.  See procset.h for the type idtype_t
2342  * which defines which kind of id is being specified.
2343  */
2344 # 620 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2345 /*
2346  * The following value of type pfn_t is used to indicate
2347  * invalid page frame number.
2348  */
2349 
2350 
2351 
2352 /* BEGIN CSTYLED */
2353 typedef unsigned char u_char;
2354 typedef unsigned short u_short;
2355 typedef unsigned int u_int;
2356 typedef unsigned long u_long;
2357 typedef struct _quad { int val[2]; } quad_t; /* used by UFS */
2358 typedef quad_t quad; /* used by UFS */
2359 /* END CSTYLED */
2360 
2361 /*
2362  * Nested include for BSD/sockets source compatibility.
2363  * (The select macros used to be defined here).
2364  */
2365 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
2366 /*
2367  * CDDL HEADER START
2368  *
2369  * The contents of this file are subject to the terms of the
2370  * Common Development and Distribution License (the "License").
2371  * You may not use this file except in compliance with the License.
2372  *
2373  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2374  * or http://www.opensolaris.org/os/licensing.
2375  * See the License for the specific language governing permissions
2376  * and limitations under the License.
2377  *
2378  * When distributing Covered Code, include this CDDL HEADER in each
2379  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2380  * If applicable, add the following below this CDDL HEADER, with the
2381  * fields enclosed by brackets "[]" replaced with your own identifying
2382  * information: Portions Copyright [yyyy] [name of copyright owner]
2383  *
2384  * CDDL HEADER END
2385  */
2386 
2387 /*
2388  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2389  *
2390  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2391  *
2392  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
2393  * Use is subject to license terms.
2394  */
2395 
2396 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2397 /*	  All Rights Reserved	*/
2398 
2399 /*
2400  * University Copyright- Copyright (c) 1982, 1986, 1988
2401  * The Regents of the University of California
2402  * All Rights Reserved
2403  *
2404  * University Acknowledgment- Portions of this document are derived from
2405  * software developed by the University of California, Berkeley, and its
2406  * contributors.
2407  */
2408 
2409 
2410 
2411 
2412 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2413 /*
2414  * CDDL HEADER START
2415  *
2416  * The contents of this file are subject to the terms of the
2417  * Common Development and Distribution License (the "License").
2418  * You may not use this file except in compliance with the License.
2419  *
2420  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2421  * or http://www.opensolaris.org/os/licensing.
2422  * See the License for the specific language governing permissions
2423  * and limitations under the License.
2424  *
2425  * When distributing Covered Code, include this CDDL HEADER in each
2426  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2427  * If applicable, add the following below this CDDL HEADER, with the
2428  * fields enclosed by brackets "[]" replaced with your own identifying
2429  * information: Portions Copyright [yyyy] [name of copyright owner]
2430  *
2431  * CDDL HEADER END
2432  */
2433 
2434 /*
2435  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2436  * Copyright 2016 Joyent, Inc.
2437  *
2438  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2439  * Use is subject to license terms.
2440  */
2441 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
2442 
2443 
2444 
2445 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
2446 /*
2447  * CDDL HEADER START
2448  *
2449  * The contents of this file are subject to the terms of the
2450  * Common Development and Distribution License, Version 1.0 only
2451  * (the "License").  You may not use this file except in compliance
2452  * with the License.
2453  *
2454  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2455  * or http://www.opensolaris.org/os/licensing.
2456  * See the License for the specific language governing permissions
2457  * and limitations under the License.
2458  *
2459  * When distributing Covered Code, include this CDDL HEADER in each
2460  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2461  * If applicable, add the following below this CDDL HEADER, with the
2462  * fields enclosed by brackets "[]" replaced with your own identifying
2463  * information: Portions Copyright [yyyy] [name of copyright owner]
2464  *
2465  * CDDL HEADER END
2466  */
2467 /*
2468  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
2469  * Use is subject to license terms.
2470  */
2471 
2472 /*
2473  * Implementation-private.  This header should not be included
2474  * directly by an application.  The application should instead
2475  * include <time.h> which includes this header conditionally
2476  * depending on which feature test macros are defined. By default,
2477  * this header is included by <time.h>.  X/Open and POSIX
2478  * standards requirements result in this header being included
2479  * by <time.h> only under a restricted set of conditions.
2480  */
2481 
2482 
2483 
2484 
2485 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2486 /*
2487  * CDDL HEADER START
2488  *
2489  * The contents of this file are subject to the terms of the
2490  * Common Development and Distribution License (the "License").
2491  * You may not use this file except in compliance with the License.
2492  *
2493  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2494  * or http://www.opensolaris.org/os/licensing.
2495  * See the License for the specific language governing permissions
2496  * and limitations under the License.
2497  *
2498  * When distributing Covered Code, include this CDDL HEADER in each
2499  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2500  * If applicable, add the following below this CDDL HEADER, with the
2501  * fields enclosed by brackets "[]" replaced with your own identifying
2502  * information: Portions Copyright [yyyy] [name of copyright owner]
2503  *
2504  * CDDL HEADER END
2505  */
2506 
2507 /*
2508  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2509  * Copyright 2016 Joyent, Inc.
2510  *
2511  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2512  * Use is subject to license terms.
2513  */
2514 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 2
2515 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
2516 /*
2517  * Time expressed in seconds and nanoseconds
2518  */
2519 
2520 typedef struct timespec { /* definition per POSIX.4 */
2521  time_t tv_sec; /* seconds */
2522  long tv_nsec; /* and nanoseconds */
2523 } timespec_t;
2524 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
2525 typedef struct timespec timestruc_t; /* definition per SVr4 */
2526 
2527 /*
2528  * The following has been left in for backward compatibility. Portable
2529  * applications should not use the structure name timestruc.
2530  */
2531 
2532 
2533 
2534 
2535 
2536 /*
2537  * Timer specification
2538  */
2539 typedef struct itimerspec { /* definition per POSIX.4 */
2540  struct timespec it_interval; /* timer period */
2541  struct timespec it_value; /* timer expiration */
2542 } itimerspec_t;
2543 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
2544 
2545 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
2546 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2547 /*	  All Rights Reserved  	*/
2548 
2549 
2550 /*
2551  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
2552  * All rights reserved.  The Berkeley software License Agreement
2553  * specifies the terms and conditions for redistribution.
2554  */
2555 
2556 /*
2557  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2558  *
2559  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2560  * Use is subject to license terms.
2561  *
2562  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2563  */
2564 
2565 /*
2566  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
2567  */
2568 
2569 
2570 
2571 
2572 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2573 /*
2574  * CDDL HEADER START
2575  *
2576  * The contents of this file are subject to the terms of the
2577  * Common Development and Distribution License (the "License").
2578  * You may not use this file except in compliance with the License.
2579  *
2580  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2581  * or http://www.opensolaris.org/os/licensing.
2582  * See the License for the specific language governing permissions
2583  * and limitations under the License.
2584  *
2585  * When distributing Covered Code, include this CDDL HEADER in each
2586  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2587  * If applicable, add the following below this CDDL HEADER, with the
2588  * fields enclosed by brackets "[]" replaced with your own identifying
2589  * information: Portions Copyright [yyyy] [name of copyright owner]
2590  *
2591  * CDDL HEADER END
2592  */
2593 
2594 /*
2595  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2596  * Copyright 2016 Joyent, Inc.
2597  *
2598  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2599  * Use is subject to license terms.
2600  */
2601 # 28 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2602 
2603 /*
2604  * Structure returned by gettimeofday(2) system call,
2605  * and used in other calls.
2606  */
2607 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2608 struct timeval {
2609  time_t tv_sec; /* seconds */
2610  suseconds_t tv_usec; /* and microseconds */
2611 };
2612 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2613 struct timezone {
2614  int tz_minuteswest; /* minutes west of Greenwich */
2615  int tz_dsttime; /* type of dst correction */
2616 };
2617 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2618 /*
2619  * Needed for longlong_t type.  Placement of this due to <sys/types.h>
2620  * including <sys/select.h> which relies on the presense of the itimerval
2621  * structure.
2622  */
2623 
2624 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
2625 /*
2626  * CDDL HEADER START
2627  *
2628  * The contents of this file are subject to the terms of the
2629  * Common Development and Distribution License (the "License").
2630  * You may not use this file except in compliance with the License.
2631  *
2632  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2633  * or http://www.opensolaris.org/os/licensing.
2634  * See the License for the specific language governing permissions
2635  * and limitations under the License.
2636  *
2637  * When distributing Covered Code, include this CDDL HEADER in each
2638  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2639  * If applicable, add the following below this CDDL HEADER, with the
2640  * fields enclosed by brackets "[]" replaced with your own identifying
2641  * information: Portions Copyright [yyyy] [name of copyright owner]
2642  *
2643  * CDDL HEADER END
2644  */
2645 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2646 /*	  All Rights Reserved  	*/
2647 
2648 
2649 /*
2650  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2651  * Use is subject to license terms.
2652  *
2653  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2654  * Copyright 2016 Joyent, Inc.
2655  */
2656 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2657 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2658 /*
2659  * Operations on timevals.
2660  */
2661 # 193 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2662 /*
2663  * Names of the interval timers, and structure
2664  * defining a timer setting.
2665  */
2666 
2667 
2668 
2669     /* time and when system is running on */
2670     /* behalf of the process. */
2671 
2672     /* time profiling of multithreaded */
2673     /* programs. */
2674 
2675 
2676 struct itimerval {
2677  struct timeval it_interval; /* timer interval */
2678  struct timeval it_value; /* current value */
2679 };
2680 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2681 /*
2682  *	Definitions for commonly used resolutions.
2683  */
2684 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2685 /*
2686  * Time expressed as a 64-bit nanosecond counter.
2687  */
2688 typedef longlong_t hrtime_t;
2689 # 386 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2690 int adjtime(struct timeval *, struct timeval *);
2691 
2692 
2693 
2694 
2695 int futimesat(int, const char *, const struct timeval *);
2696 
2697 
2698 
2699 
2700 
2701 int getitimer(int, struct itimerval *);
2702 int utimes(const char *, const struct timeval *);
2703 
2704 
2705 
2706 
2707 int setitimer(int, struct itimerval *,
2708  struct itimerval *);
2709 
2710 
2711 
2712 
2713 /*
2714  * gettimeofday() and settimeofday() were included in SVr4 due to their
2715  * common use in BSD based applications.  They were to be included exactly
2716  * as in BSD, with two parameters.  However, AT&T/USL noted that the second
2717  * parameter was unused and deleted it, thereby making a routine included
2718  * for compatibility, incompatible.
2719  *
2720  * XSH4.2 (spec 1170) defines gettimeofday and settimeofday to have two
2721  * parameters.
2722  *
2723  * This has caused general disagreement in the application community as to
2724  * the syntax of these routines.  Solaris defaults to the XSH4.2 definition.
2725  * The flag _SVID_GETTOD may be used to force the SVID version.
2726  */
2727 
2728 
2729 
2730 
2731 
2732 int settimeofday(struct timeval *, void *);
2733 
2734 hrtime_t gethrtime(void);
2735 hrtime_t gethrvtime(void);
2736 # 441 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2737 int gettimeofday(struct timeval *, void *);
2738 
2739 
2740 
2741 
2742 /*
2743  * The inclusion of <time.h> is historical and was added for
2744  * backward compatibility in delta 1.2 when a number of definitions
2745  * were moved out of <sys/time.h>.  More recently, the timespec and
2746  * itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
2747  * _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
2748  * which is now included by <time.h>.  This change was due to POSIX
2749  * 1003.1b-1993 and X/Open UNIX 98 requirements.  For non-POSIX and
2750  * non-X/Open applications, including this header will still make
2751  * visible these definitions.
2752  */
2753 
2754 
2755 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
2756 /*
2757  * CDDL HEADER START
2758  *
2759  * The contents of this file are subject to the terms of the
2760  * Common Development and Distribution License (the "License").
2761  * You may not use this file except in compliance with the License.
2762  *
2763  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2764  * or http://www.opensolaris.org/os/licensing.
2765  * See the License for the specific language governing permissions
2766  * and limitations under the License.
2767  *
2768  * When distributing Covered Code, include this CDDL HEADER in each
2769  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2770  * If applicable, add the following below this CDDL HEADER, with the
2771  * fields enclosed by brackets "[]" replaced with your own identifying
2772  * information: Portions Copyright [yyyy] [name of copyright owner]
2773  *
2774  * CDDL HEADER END
2775  */
2776 /*	Copyright (c) 1988 AT&T	*/
2777 /*	  All Rights Reserved  	*/
2778 
2779 
2780 /*
2781  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2782  *
2783  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
2784  * Use is subject to license terms.
2785  */
2786 /*
2787  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
2788  * Copyright 2016 Joyent, Inc.
2789  */
2790 
2791 
2792 
2793 
2794 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2795 /*
2796  * CDDL HEADER START
2797  *
2798  * The contents of this file are subject to the terms of the
2799  * Common Development and Distribution License (the "License").
2800  * You may not use this file except in compliance with the License.
2801  *
2802  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2803  * or http://www.opensolaris.org/os/licensing.
2804  * See the License for the specific language governing permissions
2805  * and limitations under the License.
2806  *
2807  * When distributing Covered Code, include this CDDL HEADER in each
2808  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2809  * If applicable, add the following below this CDDL HEADER, with the
2810  * fields enclosed by brackets "[]" replaced with your own identifying
2811  * information: Portions Copyright [yyyy] [name of copyright owner]
2812  *
2813  * CDDL HEADER END
2814  */
2815 
2816 /*
2817  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2818  * Copyright 2016 Joyent, Inc.
2819  *
2820  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2821  * Use is subject to license terms.
2822  */
2823 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
2824 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 1
2825 /*
2826  * CDDL HEADER START
2827  *
2828  * The contents of this file are subject to the terms of the
2829  * Common Development and Distribution License, Version 1.0 only
2830  * (the "License").  You may not use this file except in compliance
2831  * with the License.
2832  *
2833  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2834  * or http://www.opensolaris.org/os/licensing.
2835  * See the License for the specific language governing permissions
2836  * and limitations under the License.
2837  *
2838  * When distributing Covered Code, include this CDDL HEADER in each
2839  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2840  * If applicable, add the following below this CDDL HEADER, with the
2841  * fields enclosed by brackets "[]" replaced with your own identifying
2842  * information: Portions Copyright [yyyy] [name of copyright owner]
2843  *
2844  * CDDL HEADER END
2845  */
2846 /*	Copyright (c) 1988 AT&T	*/
2847 /*	  All Rights Reserved  	*/
2848 
2849 /*
2850  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2851  * Copyright 2014 PALO, Richard.
2852  *
2853  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2854  * Use is subject to license terms.
2855  */
2856 
2857 /*
2858  * An application should not include this header directly.  Instead it
2859  * should be included only through the inclusion of other Sun headers.
2860  *
2861  * The contents of this header is limited to identifiers specified in the
2862  * C Standard.  Any new identifiers specified in future amendments to the
2863  * C Standard must be placed in this header.  If these new identifiers
2864  * are required to also be in the C++ Standard "std" namespace, then for
2865  * anything other than macro definitions, corresponding "using" directives
2866  * must also be added to <time.h.h>.
2867  */
2868 
2869 
2870 
2871 
2872 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2873 /*
2874  * CDDL HEADER START
2875  *
2876  * The contents of this file are subject to the terms of the
2877  * Common Development and Distribution License (the "License").
2878  * You may not use this file except in compliance with the License.
2879  *
2880  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2881  * or http://www.opensolaris.org/os/licensing.
2882  * See the License for the specific language governing permissions
2883  * and limitations under the License.
2884  *
2885  * When distributing Covered Code, include this CDDL HEADER in each
2886  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2887  * If applicable, add the following below this CDDL HEADER, with the
2888  * fields enclosed by brackets "[]" replaced with your own identifying
2889  * information: Portions Copyright [yyyy] [name of copyright owner]
2890  *
2891  * CDDL HEADER END
2892  */
2893 
2894 /*
2895  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2896  * Copyright 2016 Joyent, Inc.
2897  *
2898  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2899  * Use is subject to license terms.
2900  */
2901 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
2902 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
2903 /*
2904  * This file and its contents are supplied under the terms of the
2905  * Common Development and Distribution License ("CDDL"), version 1.0.
2906  * You may only use this file in accordance with the terms of version
2907  * 1.0 of the CDDL.
2908  *
2909  * A full copy of the text of the CDDL should have accompanied this
2910  * source.  A copy of the CDDL is also available via the Internet at
2911  * http://www.illumos.org/license/CDDL.
2912  */
2913 
2914 /*
2915  * Copyright 2014-2016 PALO, Richard.
2916  */
2917 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
2918 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h"
2919 struct tm { /* see ctime(3) */
2920  int tm_sec;
2921  int tm_min;
2922  int tm_hour;
2923  int tm_mday;
2924  int tm_mon;
2925  int tm_year;
2926  int tm_wday;
2927  int tm_yday;
2928  int tm_isdst;
2929 };
2930 
2931 
2932 extern char *asctime(const struct tm *);
2933 extern clock_t clock(void);
2934 extern char *ctime(const time_t *);
2935 extern double difftime(time_t, time_t);
2936 extern struct tm *gmtime(const time_t *);
2937 extern struct tm *localtime(const time_t *);
2938 extern time_t mktime(struct tm *);
2939 extern time_t time(time_t *);
2940 extern size_t strftime(char *, size_t, const char *,
2941  const struct tm *);
2942 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
2943 /*
2944  * C11 requires sys/time_impl.h for the definition of the struct timespec.
2945  */
2946 
2947 
2948 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
2949 /*
2950  * CDDL HEADER START
2951  *
2952  * The contents of this file are subject to the terms of the
2953  * Common Development and Distribution License (the "License").
2954  * You may not use this file except in compliance with the License.
2955  *
2956  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2957  * or http://www.opensolaris.org/os/licensing.
2958  * See the License for the specific language governing permissions
2959  * and limitations under the License.
2960  *
2961  * When distributing Covered Code, include this CDDL HEADER in each
2962  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2963  * If applicable, add the following below this CDDL HEADER, with the
2964  * fields enclosed by brackets "[]" replaced with your own identifying
2965  * information: Portions Copyright [yyyy] [name of copyright owner]
2966  *
2967  * CDDL HEADER END
2968  */
2969 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2970 /*	  All Rights Reserved  	*/
2971 
2972 
2973 /*
2974  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2975  * Use is subject to license terms.
2976  *
2977  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2978  * Copyright 2016 Joyent, Inc.
2979  */
2980 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
2981 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
2982 /*
2983  * CDDL HEADER START
2984  *
2985  * The contents of this file are subject to the terms of the
2986  * Common Development and Distribution License, Version 1.0 only
2987  * (the "License").  You may not use this file except in compliance
2988  * with the License.
2989  *
2990  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2991  * or http://www.opensolaris.org/os/licensing.
2992  * See the License for the specific language governing permissions
2993  * and limitations under the License.
2994  *
2995  * When distributing Covered Code, include this CDDL HEADER in each
2996  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2997  * If applicable, add the following below this CDDL HEADER, with the
2998  * fields enclosed by brackets "[]" replaced with your own identifying
2999  * information: Portions Copyright [yyyy] [name of copyright owner]
3000  *
3001  * CDDL HEADER END
3002  */
3003 /*
3004  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3005  * Use is subject to license terms.
3006  */
3007 
3008 /*
3009  * Implementation-private.  This header should not be included
3010  * directly by an application.  The application should instead
3011  * include <time.h> which includes this header conditionally
3012  * depending on which feature test macros are defined. By default,
3013  * this header is included by <time.h>.  X/Open and POSIX
3014  * standards requirements result in this header being included
3015  * by <time.h> only under a restricted set of conditions.
3016  */
3017 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3018 
3019 
3020 /*
3021  * Allow global visibility for symbols defined in
3022  * C++ "std" namespace in <iso/time_iso.h>.
3023  */
3024 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3025 extern struct tm *gmtime_r(const time_t *,
3026    struct tm *);
3027 extern struct tm *localtime_r(const time_t *,
3028    struct tm *);
3029 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3030 extern char *strptime(const char *, const char *,
3031   struct tm *);
3032 
3033 
3034 
3035 
3036 
3037 /*
3038  * Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
3039  * definition of the sigevent structure.  Both require the inclusion
3040  * of <signal.h> and <time.h> when using the timer_create() function.
3041  * However, X/Open also specifies that the sigevent structure be defined
3042  * in <time.h> as described in the header <signal.h>.  This prevents
3043  * compiler warnings for applications that only include <time.h> and not
3044  * also <signal.h>.  The sigval union and the sigevent structure is
3045  * therefore defined both here and in <sys/siginfo.h> which gets included
3046  * via inclusion of <signal.h>.
3047  */
3048 
3049 
3050 union sigval {
3051  int sival_int; /* integer value */
3052  void *sival_ptr; /* pointer value */
3053 };
3054 
3055 
3056 
3057 
3058 struct sigevent {
3059  int sigev_notify; /* notification mode */
3060  int sigev_signo; /* signal number */
3061  union sigval sigev_value; /* signal value */
3062  void (*sigev_notify_function)(union sigval);
3063  pthread_attr_t *sigev_notify_attributes;
3064  int __sigev_pad2;
3065 };
3066 
3067 
3068 extern int clock_getres(clockid_t, struct timespec *);
3069 extern int clock_gettime(clockid_t, struct timespec *);
3070 extern int clock_settime(clockid_t, const struct timespec *);
3071 extern int timer_create(clockid_t, struct sigevent *,
3072   timer_t *);
3073 extern int timer_delete(timer_t);
3074 extern int timer_getoverrun(timer_t);
3075 extern int timer_gettime(timer_t, struct itimerspec *);
3076 extern int timer_settime(timer_t, int, const struct itimerspec *,
3077   struct itimerspec *);
3078 
3079 extern int nanosleep(const struct timespec *, struct timespec *);
3080 extern int clock_nanosleep(clockid_t, int,
3081  const struct timespec *, struct timespec *);
3082 
3083 
3084 
3085 
3086 
3087 
3088 extern void tzset(void);
3089 extern char *tzname[2];
3090 
3091 /* CLK_TCK marked as LEGACY in SUSv2 and removed in SUSv3 */
3092 
3093 
3094 extern long _sysconf(int); /* System Private interface to sysconf() */
3095 
3096     /* 3 is _SC_CLK_TCK */
3097 
3098 
3099 
3100 
3101 
3102 extern long timezone;
3103 extern int daylight;
3104 
3105 
3106 
3107 
3108 
3109 
3110 extern time_t timegm(struct tm *);
3111 extern int cftime(char *, char *, const time_t *);
3112 extern int ascftime(char *, const char *, const struct tm *);
3113 extern long altzone;
3114 
3115 
3116 
3117 
3118 extern struct tm *getdate(const char *);
3119 
3120 
3121 
3122 
3123 
3124 extern int getdate_err;
3125 
3126 
3127 
3128 /*
3129  * ctime_r() & asctime_r() prototypes are defined here.
3130  */
3131 
3132 /*
3133  * Previous releases of Solaris, starting at 2.3, provided definitions of
3134  * various functions as specified in POSIX.1c, Draft 6.  For some of these
3135  * functions, the final POSIX 1003.1c standard had a different number of
3136  * arguments and return values.
3137  *
3138  * The following segment of this header provides support for the standard
3139  * interfaces while supporting applications written under earlier
3140  * releases.  The application defines appropriate values of the feature
3141  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
3142  * whether it was written to expect the Draft 6 or standard versions of
3143  * these interfaces, before including this header.  This header then
3144  * provides a mapping from the source version of the interface to an
3145  * appropriate binary interface.  Such mappings permit an application
3146  * to be built from libraries and objects which have mixed expectations
3147  * of the definitions of these functions.
3148  *
3149  * For applications using the Draft 6 definitions, the binary symbol is the
3150  * same as the source symbol, and no explicit mapping is needed.  For the
3151  * standard interface, the function func() is mapped to the binary symbol
3152  * _posix_func().  The preferred mechanism for the remapping is a compiler
3153  * #pragma.  If the compiler does not provide such a #pragma, the header file
3154  * defines a static function func() which calls the _posix_func() version;
3155  * this has to be done instead of #define since POSIX specifies that an
3156  * application can #undef the symbol and still be bound to the correct
3157  * implementation.  Unfortunately, the statics confuse lint so we fallback to
3158  * #define in that case.
3159  *
3160  * NOTE: Support for the Draft 6 definitions is provided for compatibility
3161  * only.  New applications/libraries should use the standard definitions.
3162  */
3163 # 280 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3164 extern char *asctime_r(const struct tm *, char *, int);
3165 extern char *ctime_r(const time_t *, char *, int);
3166 # 292 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3167 typedef struct _locale *locale_t;
3168 
3169 
3170 extern size_t strftime_l(char *, size_t,
3171  const char *, const struct tm *, locale_t);
3172 
3173 
3174 
3175 
3176 
3177 /*
3178  * Note, the C11 standard requires that all the various base values that are
3179  * passed into timespec_get() be non-zero. Hence why TIME_UTC starts at one.
3180  */
3181 
3182 
3183 extern int timespec_get(struct timespec *, int);
3184 # 460 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
3185 
3186 
3187 /*
3188  * The inclusion of <sys/select.h> is needed for the FD_CLR,
3189  * FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
3190  * select() prototype defined in the XOpen specifications
3191  * beginning with XSH4v2.  Placement required after definition
3192  * for itimerval.
3193  */
3194 
3195 
3196 
3197 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
3198 /*
3199  * CDDL HEADER START
3200  *
3201  * The contents of this file are subject to the terms of the
3202  * Common Development and Distribution License (the "License").
3203  * You may not use this file except in compliance with the License.
3204  *
3205  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3206  * or http://www.opensolaris.org/os/licensing.
3207  * See the License for the specific language governing permissions
3208  * and limitations under the License.
3209  *
3210  * When distributing Covered Code, include this CDDL HEADER in each
3211  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3212  * If applicable, add the following below this CDDL HEADER, with the
3213  * fields enclosed by brackets "[]" replaced with your own identifying
3214  * information: Portions Copyright [yyyy] [name of copyright owner]
3215  *
3216  * CDDL HEADER END
3217  */
3218 
3219 /*
3220  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3221  *
3222  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3223  *
3224  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3225  * Use is subject to license terms.
3226  */
3227 
3228 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3229 /*	  All Rights Reserved	*/
3230 
3231 /*
3232  * University Copyright- Copyright (c) 1982, 1986, 1988
3233  * The Regents of the University of California
3234  * All Rights Reserved
3235  *
3236  * University Acknowledgment- Portions of this document are derived from
3237  * software developed by the University of California, Berkeley, and its
3238  * contributors.
3239  */
3240 # 473 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
3241 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
3242 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3243 /*
3244  * The sigset_t type is defined in <sys/signal.h> and duplicated
3245  * in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
3246  * now allows the visibility of signal.h in this header, however
3247  * an order of inclusion problem occurs as a result of inclusion
3248  * of <sys/select.h> in <signal.h> under certain conditions.
3249  * Rather than include <sys/signal.h> here, we've duplicated
3250  * the sigset_t type instead. This type is required for the XPG6
3251  * introduced pselect() function also declared in this header.
3252  */
3253 
3254 
3255 typedef struct { /* signal set type */
3256  unsigned int __sigbits[4];
3257 } sigset_t;
3258 
3259 
3260 
3261 
3262 /*
3263  * Select uses bit masks of file descriptors in longs.
3264  * These macros manipulate such bit fields.
3265  * FD_SETSIZE may be defined by the user, but the default here
3266  * should be >= NOFILE (param.h).
3267  */
3268 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3269 typedef long fd_mask;
3270 
3271 typedef long fds_mask;
3272 
3273 /*
3274  *  The value of _NBBY needs to be consistant with the value
3275  *  of NBBY in <sys/param.h>.
3276  */
3277 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3278 typedef struct fd_set {
3279 
3280 
3281 
3282  long fds_bits[(((1024)+(((sizeof (fds_mask) * 8))-1))/((sizeof (fds_mask) * 8)))];
3283 } fd_set;
3284 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3285 extern int select(int, fd_set *, fd_set *,
3286  fd_set *, struct timeval *);
3287 
3288 
3289 extern int pselect(int, fd_set *, fd_set *,
3290  fd_set *, const struct timespec *,
3291  const sigset_t *);
3292 # 641 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3293 
3294 
3295 
3296 /*
3297  * _VOID was defined to be either void or char but this is not
3298  * required because previous SunOS compilers have accepted the void
3299  * type. However, because many system header and source files use the
3300  * void keyword, the volatile keyword, and ANSI C function prototypes,
3301  * non-ANSI compilers cannot compile the system anyway. The _VOID macro
3302  * should therefore not be used and remains for source compatibility
3303  * only.
3304  */
3305 /* CSTYLED */
3306 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/memory.h" 2
3307 
3308 
3309 
3310 
3311 
3312 extern void *memccpy(void *, const void *, int, size_t);
3313 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/memory.h"
3314 extern void *memchr(const void *, int, size_t);
3315 
3316 extern void *memcpy(void *, const void *, size_t);
3317 extern void *memset(void *, int, size_t);
3318 extern int memcmp(const void *, const void *, size_t);
3319 # 33 "ckentry.c" 2
3320 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 1
3321 /*
3322  * CDDL HEADER START
3323  *
3324  * The contents of this file are subject to the terms of the
3325  * Common Development and Distribution License (the "License").
3326  * You may not use this file except in compliance with the License.
3327  *
3328  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3329  * or http://www.opensolaris.org/os/licensing.
3330  * See the License for the specific language governing permissions
3331  * and limitations under the License.
3332  *
3333  * When distributing Covered Code, include this CDDL HEADER in each
3334  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3335  * If applicable, add the following below this CDDL HEADER, with the
3336  * fields enclosed by brackets "[]" replaced with your own identifying
3337  * information: Portions Copyright [yyyy] [name of copyright owner]
3338  *
3339  * CDDL HEADER END
3340  */
3341 
3342 /*
3343  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3344  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
3345  */
3346 
3347 /*	Copyright (c) 1988 AT&T	*/
3348 /*	  All Rights Reserved  	*/
3349 
3350 
3351 
3352 
3353 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 1
3354 /*
3355  * CDDL HEADER START
3356  *
3357  * The contents of this file are subject to the terms of the
3358  * Common Development and Distribution License, Version 1.0 only
3359  * (the "License").  You may not use this file except in compliance
3360  * with the License.
3361  *
3362  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3363  * or http://www.opensolaris.org/os/licensing.
3364  * See the License for the specific language governing permissions
3365  * and limitations under the License.
3366  *
3367  * When distributing Covered Code, include this CDDL HEADER in each
3368  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3369  * If applicable, add the following below this CDDL HEADER, with the
3370  * fields enclosed by brackets "[]" replaced with your own identifying
3371  * information: Portions Copyright [yyyy] [name of copyright owner]
3372  *
3373  * CDDL HEADER END
3374  */
3375 /*	Copyright (c) 1988 AT&T	*/
3376 /*	  All Rights Reserved  	*/
3377 
3378 
3379 /*
3380  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3381  * Copyright 2014 PALO, Richard.
3382  *
3383  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3384  * Use is subject to license terms.
3385  */
3386 
3387 /*
3388  * An application should not include this header directly.  Instead it
3389  * should be included only through the inclusion of other Sun headers.
3390  *
3391  * The contents of this header is limited to identifiers specified in the
3392  * C Standard.  Any new identifiers specified in future amendments to the
3393  * C Standard must be placed in this header.  If these new identifiers
3394  * are required to also be in the C++ Standard "std" namespace, then for
3395  * anything other than macro definitions, corresponding "using" directives
3396  * must also be added to <string.h>.
3397  */
3398 
3399 
3400 
3401 
3402 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3403 /*
3404  * CDDL HEADER START
3405  *
3406  * The contents of this file are subject to the terms of the
3407  * Common Development and Distribution License (the "License").
3408  * You may not use this file except in compliance with the License.
3409  *
3410  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3411  * or http://www.opensolaris.org/os/licensing.
3412  * See the License for the specific language governing permissions
3413  * and limitations under the License.
3414  *
3415  * When distributing Covered Code, include this CDDL HEADER in each
3416  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3417  * If applicable, add the following below this CDDL HEADER, with the
3418  * fields enclosed by brackets "[]" replaced with your own identifying
3419  * information: Portions Copyright [yyyy] [name of copyright owner]
3420  *
3421  * CDDL HEADER END
3422  */
3423 
3424 /*
3425  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3426  * Copyright 2016 Joyent, Inc.
3427  *
3428  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3429  * Use is subject to license terms.
3430  */
3431 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
3432 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
3433 /*
3434  * This file and its contents are supplied under the terms of the
3435  * Common Development and Distribution License ("CDDL"), version 1.0.
3436  * You may only use this file in accordance with the terms of version
3437  * 1.0 of the CDDL.
3438  *
3439  * A full copy of the text of the CDDL should have accompanied this
3440  * source.  A copy of the CDDL is also available via the Internet at
3441  * http://www.illumos.org/license/CDDL.
3442  */
3443 
3444 /*
3445  * Copyright 2014-2016 PALO, Richard.
3446  */
3447 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
3448 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
3449 extern int memcmp(const void *, const void *, size_t);
3450 extern void *memcpy(void *, const void *, size_t);
3451 extern void *memmove(void *, const void *, size_t);
3452 extern void *memset(void *, int, size_t);
3453 extern char *strcat(char *, const char *);
3454 extern int strcmp(const char *, const char *);
3455 extern char *strcpy(char *, const char *);
3456 extern int strcoll(const char *, const char *);
3457 extern size_t strcspn(const char *, const char *);
3458 extern char *strerror(int);
3459 extern size_t strlen(const char *);
3460 extern char *strncat(char *, const char *, size_t);
3461 extern int strncmp(const char *, const char *, size_t);
3462 extern char *strncpy(char *, const char *, size_t);
3463 extern size_t strspn(const char *, const char *);
3464 extern char *strtok(char *, const char *);
3465 extern size_t strxfrm(char *, const char *, size_t);
3466 
3467 /*
3468  * The C++ Standard (ISO/IEC 14882:1998) specifies that each of the
3469  * function signatures for the following functions be replaced by
3470  * two declarations, both of which have the same behavior.
3471  */
3472 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
3473 extern void *memchr(const void *, int, size_t);
3474 extern char *strchr(const char *, int);
3475 extern char *strpbrk(const char *, const char *);
3476 extern char *strrchr(const char *, int);
3477 extern char *strstr(const char *, const char *);
3478 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 2
3479 
3480 /*
3481  * Allow global visibility for symbols defined in
3482  * C++ "std" namespace in <iso/string_iso.h>.
3483  */
3484 # 72 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h"
3485 extern int strerror_r(int, char *, size_t);
3486 
3487 
3488 
3489 
3490 
3491 extern char *strtok_r(char *, const char *,
3492  char **);
3493 
3494 
3495 
3496 
3497 extern void *memccpy(void *, const void *,
3498   int, size_t);
3499 
3500 
3501 
3502 
3503 extern char *stpcpy(char *, const char *);
3504 extern char *stpncpy(char *, const char *, size_t);
3505 extern char *strndup(const char *, size_t);
3506 extern size_t strnlen(const char *, size_t);
3507 extern char *strsignal(int);
3508 
3509 
3510 
3511 
3512 
3513 
3514 extern int strcoll_l(const char *, const char *, locale_t);
3515 extern size_t strxfrm_l(char *, const char *,
3516     size_t, locale_t);
3517 extern int strcasecmp_l(const char *, const char *, locale_t);
3518 extern int strncasecmp_l(const char *, const char *, size_t, locale_t);
3519 extern char *strerror_l(int, locale_t);
3520 
3521 
3522 
3523 
3524 
3525 /* Note that some of these are also declared in strings.h for XPG4_2+ */
3526 extern void explicit_bzero(void *, size_t);
3527 extern int uucopy(const void *, void *, size_t);
3528 extern int uucopystr(const void *, void *, size_t);
3529 extern int ffs(int);
3530 extern int ffsl(long);
3531 extern int ffsll(long long);
3532 extern int fls(int);
3533 extern int flsl(long);
3534 extern int flsll(long long);
3535 extern void *memmem(const void *, size_t, const void *, size_t);
3536 extern char *strcasestr(const char *, const char *);
3537 extern char *strnstr(const char *, const char *, size_t);
3538 extern size_t strlcpy(char *, const char *, size_t);
3539 extern size_t strlcat(char *, const char *, size_t);
3540 extern char *strsep(char **stringp, const char *delim);
3541 extern char *strchrnul(const char *, int);
3542 extern char *strcasestr_l(const char *, const char *, locale_t);
3543 extern int strcasecmp(const char *, const char *);
3544 extern int strncasecmp(const char *, const char *, size_t);
3545 
3546 
3547 
3548 
3549 
3550 extern char *strdup(const char *);
3551 
3552 
3553 
3554 
3555 
3556 
3557 /*
3558  * gcc provides this inlining facility but Studio C does not.
3559  * We should use it exclusively once Studio C also provides it.
3560  */
3561 extern void *__builtin_alloca(size_t);
3562 # 34 "ckentry.c" 2
3563 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
3564 /*
3565  * CDDL HEADER START
3566  *
3567  * The contents of this file are subject to the terms of the
3568  * Common Development and Distribution License (the "License").
3569  * You may not use this file except in compliance with the License.
3570  *
3571  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3572  * or http://www.opensolaris.org/os/licensing.
3573  * See the License for the specific language governing permissions
3574  * and limitations under the License.
3575  *
3576  * When distributing Covered Code, include this CDDL HEADER in each
3577  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3578  * If applicable, add the following below this CDDL HEADER, with the
3579  * fields enclosed by brackets "[]" replaced with your own identifying
3580  * information: Portions Copyright [yyyy] [name of copyright owner]
3581  *
3582  * CDDL HEADER END
3583  */
3584 
3585 /*
3586  * Copyright (c) 2013 Gary Mills
3587  *
3588  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3589  * Use is subject to license terms.
3590  */
3591 
3592 /*	Copyright (c) 1988 AT&T	*/
3593 /*	  All Rights Reserved  	*/
3594 
3595 
3596 
3597 
3598 
3599 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3600 /*
3601  * CDDL HEADER START
3602  *
3603  * The contents of this file are subject to the terms of the
3604  * Common Development and Distribution License (the "License").
3605  * You may not use this file except in compliance with the License.
3606  *
3607  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3608  * or http://www.opensolaris.org/os/licensing.
3609  * See the License for the specific language governing permissions
3610  * and limitations under the License.
3611  *
3612  * When distributing Covered Code, include this CDDL HEADER in each
3613  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3614  * If applicable, add the following below this CDDL HEADER, with the
3615  * fields enclosed by brackets "[]" replaced with your own identifying
3616  * information: Portions Copyright [yyyy] [name of copyright owner]
3617  *
3618  * CDDL HEADER END
3619  */
3620 
3621 /*
3622  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3623  * Copyright 2016 Joyent, Inc.
3624  *
3625  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3626  * Use is subject to license terms.
3627  */
3628 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
3629 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
3630 /*
3631  * CDDL HEADER START
3632  *
3633  * The contents of this file are subject to the terms of the
3634  * Common Development and Distribution License (the "License").
3635  * You may not use this file except in compliance with the License.
3636  *
3637  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3638  * or http://www.opensolaris.org/os/licensing.
3639  * See the License for the specific language governing permissions
3640  * and limitations under the License.
3641  *
3642  *
3643  * When distributing Covered Code, include this CDDL HEADER in each
3644  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3645  * If applicable, add the following below this CDDL HEADER, with the
3646  * fields enclosed by brackets "[]" replaced with your own identifying
3647  * information: Portions Copyright [yyyy] [name of copyright owner]
3648  *
3649  * CDDL HEADER END
3650  */
3651 
3652 /*
3653  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3654  * Use is subject to license terms.
3655  * Copyright 2016 Joyent, Inc.
3656  */
3657 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
3658 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h" 1
3659 /*
3660  * CDDL HEADER START
3661  *
3662  * The contents of this file are subject to the terms of the
3663  * Common Development and Distribution License, Version 1.0 only
3664  * (the "License").  You may not use this file except in compliance
3665  * with the License.
3666  *
3667  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3668  * or http://www.opensolaris.org/os/licensing.
3669  * See the License for the specific language governing permissions
3670  * and limitations under the License.
3671  *
3672  * When distributing Covered Code, include this CDDL HEADER in each
3673  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3674  * If applicable, add the following below this CDDL HEADER, with the
3675  * fields enclosed by brackets "[]" replaced with your own identifying
3676  * information: Portions Copyright [yyyy] [name of copyright owner]
3677  *
3678  * CDDL HEADER END
3679  */
3680 /*
3681  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
3682  * Use is subject to license terms.
3683  */
3684 
3685 /*	Copyright (c) 1988 AT&T	*/
3686 /*	  All Rights Reserved  	*/
3687 
3688 
3689 /*
3690  * An application should not include this header directly.  Instead it
3691  * should be included only through the inclusion of other Sun headers.
3692  *
3693  * The contents of this header is limited to identifiers specified in the
3694  * C Standard.  Any new identifiers specified in future amendments to the
3695  * C Standard must be placed in this header.  If these new identifiers
3696  * are required to also be in the C++ Standard "std" namespace, then for
3697  * anything other than macro definitions, corresponding "using" directives
3698  * must also be added to <limits.h>.
3699  */
3700 
3701 
3702 
3703 
3704 #pragma ident "%Z%%M%	%I%	%E% SMI"
3705 
3706 
3707 
3708 
3709 
3710 /*
3711  * Sizes of integral types
3712  */
3713 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h"
3714      /* min value of a "long int" */
3715 
3716 
3717 
3718 
3719 
3720      /* min value of a long long */
3721 
3722      /* max value of a long long */
3723 
3724      /* max value of "unsigned long long */
3725 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
3726 
3727 /*
3728  * Include fixed width type limits as proposed by the ISO/JTC1/SC22/WG14 C
3729  * committee's working draft for the revision of the current ISO C standard,
3730  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
3731  * required by any standard but constitute a useful, general purpose set
3732  * of type definitions and limits which is namespace clean with respect to
3733  * all standards.
3734  */
3735 
3736 
3737 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
3738 /*
3739  * CDDL HEADER START
3740  *
3741  * The contents of this file are subject to the terms of the
3742  * Common Development and Distribution License, Version 1.0 only
3743  * (the "License").  You may not use this file except in compliance
3744  * with the License.
3745  *
3746  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3747  * or http://www.opensolaris.org/os/licensing.
3748  * See the License for the specific language governing permissions
3749  * and limitations under the License.
3750  *
3751  * When distributing Covered Code, include this CDDL HEADER in each
3752  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3753  * If applicable, add the following below this CDDL HEADER, with the
3754  * fields enclosed by brackets "[]" replaced with your own identifying
3755  * information: Portions Copyright [yyyy] [name of copyright owner]
3756  *
3757  * CDDL HEADER END
3758  */
3759 /*
3760  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3761  *
3762  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3763  * Use is subject to license terms.
3764  */
3765 
3766 
3767 
3768 
3769 /*
3770  * This file, <sys/int_limits.h>, is part of the Sun Microsystems implementation
3771  * of <inttypes.h> as defined in the ISO C standard, ISO/IEC 9899:1999
3772  * Programming language - C.
3773  *
3774  * Programs/Modules should not directly include this file.  Access to the
3775  * types defined in this file should be through the inclusion of one of the
3776  * following files:
3777  *
3778  *	<limits.h>		This nested inclusion is disabled for strictly
3779  *				ANSI-C conforming compilations.  The *_MIN
3780  *				definitions are not visible to POSIX or XPG
3781  *				conforming applications (due to what may be
3782  *				a bug in the specification - this is under
3783  *				investigation)
3784  *
3785  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
3786  *				components of <inttypes.h>.
3787  *
3788  *	<inttypes.h>		For use by applications.
3789  *
3790  * See these files for more details.
3791  */
3792 
3793 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3794 /*
3795  * CDDL HEADER START
3796  *
3797  * The contents of this file are subject to the terms of the
3798  * Common Development and Distribution License (the "License").
3799  * You may not use this file except in compliance with the License.
3800  *
3801  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3802  * or http://www.opensolaris.org/os/licensing.
3803  * See the License for the specific language governing permissions
3804  * and limitations under the License.
3805  *
3806  * When distributing Covered Code, include this CDDL HEADER in each
3807  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3808  * If applicable, add the following below this CDDL HEADER, with the
3809  * fields enclosed by brackets "[]" replaced with your own identifying
3810  * information: Portions Copyright [yyyy] [name of copyright owner]
3811  *
3812  * CDDL HEADER END
3813  */
3814 
3815 /*
3816  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3817  * Copyright 2016 Joyent, Inc.
3818  *
3819  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3820  * Use is subject to license terms.
3821  */
3822 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 2
3823 
3824 
3825 
3826 
3827 
3828 /*
3829  * Limits
3830  *
3831  * The following define the limits for the types defined in <sys/int_types.h>.
3832  *
3833  * INTMAX_MIN (minimum value of the largest supported signed integer type),
3834  * INTMAX_MAX (maximum value of the largest supported signed integer type),
3835  * and UINTMAX_MAX (maximum value of the largest supported unsigned integer
3836  * type) can be set to implementation defined limits.
3837  *
3838  * NOTE : A programmer can test to see whether an implementation supports
3839  * a particular size of integer by testing if the macro that gives the
3840  * maximum for that datatype is defined. For example, if #ifdef UINT64_MAX
3841  * tests false, the implementation does not support unsigned 64 bit integers.
3842  *
3843  * The type of these macros is intentionally unspecified.
3844  *
3845  * The types int8_t, int_least8_t, and int_fast8_t are not defined for ISAs
3846  * where the ABI specifies "char" as unsigned when the translation mode is
3847  * not ANSI-C.
3848  */
3849 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
3850 /*
3851  * The following 2 macros are provided for testing whether the types
3852  * intptr_t and uintptr_t (integers large enough to hold a void *) are
3853  * defined in this header. They are needed in case the architecture can't
3854  * represent a pointer in any standard integral type.
3855  */
3856 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
3857 /* Maximum limits of ptrdiff_t defined in <sys/types.h> */
3858 
3859 
3860 
3861 
3862 
3863 
3864 /*
3865  * Maximum value of a "size_t".  SIZE_MAX was previously defined
3866  * in <limits.h>, however, the standards specify it be defined
3867  * in <stdint.h>. The <stdint.h> headers includes this header as
3868  * does <limits.h>. The value of SIZE_MAX should not deviate
3869  * from the value of ULONG_MAX defined <sys/types.h>.
3870  */
3871 
3872 
3873 
3874 
3875 
3876 
3877 /* Maximum limit of sig_atomic_t defined in <sys/types.h> */
3878 
3879 
3880 
3881 
3882 /*
3883  * Maximum limit of wchar_t. The WCHAR_* macros are also
3884  * defined in <iso/wchar_iso.h>, but inclusion of that header
3885  * will break ISO/IEC C namespace.
3886  */
3887 
3888 
3889 
3890 
3891 /* Maximum limit of wint_t */
3892 
3893 
3894 
3895 
3896 /*
3897  * It is probably a bug in the POSIX specification (IEEE-1003.1-1990) that
3898  * when including <limits.h> that the suffix _MAX is reserved but not the
3899  * suffix _MIN.  However, until that issue is resolved....
3900  */
3901 # 230 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
3902 /* Minimum value of a pointer-holding signed integer type */
3903 
3904 
3905 
3906 
3907 
3908 
3909 /* Minimum limits of ptrdiff_t defined in <sys/types.h> */
3910 
3911 
3912 
3913 
3914 
3915 
3916 /* Minimum limit of sig_atomic_t defined in <sys/types.h> */
3917 
3918 
3919 
3920 
3921 /*
3922  * Minimum limit of wchar_t. The WCHAR_* macros are also
3923  * defined in <iso/wchar_iso.h>, but inclusion of that header
3924  * will break ISO/IEC C namespace.
3925  */
3926 
3927 
3928 
3929 
3930 /* Minimum limit of wint_t */
3931 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
3932 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
3933 /*
3934  * ARG_MAX is calculated as follows:
3935  * NCARGS - space for other stuff on initial stack
3936  * like aux vectors, saved registers, etc..
3937  */
3938 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
3939 /*
3940  * POSIX conformant definitions - An implementation may define
3941  * other symbols which reflect the actual implementation. Alternate
3942  * definitions may not be as restrictive as the POSIX definitions.
3943  */
3944 # 140 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
3945 /* POSIX.1c conformant */
3946 
3947 
3948 
3949 
3950 
3951 /* UNIX 03 conformant */
3952 
3953 
3954 
3955 
3956 
3957 /*
3958  * POSIX.2 and XPG4-XSH4 conformant definitions
3959  */
3960 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
3961 /* UNIX 03 conformant */
3962 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
3963 /*
3964  * For dual definitions for PASS_MAX and sysconf.c
3965  */
3966 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
3967     /* NLS printf() and scanf() */
3968 # 216 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
3969 /* Marked as LEGACY in SUSv2 and removed in UNIX 03 */
3970 
3971 
3972 
3973        /* of a double */
3974 
3975 
3976        /* of a "float" */
3977 
3978 
3979 /* Marked as LEGACY in SUSv1 and removed in SUSv2 */
3980 
3981 
3982        /* of a double */
3983 
3984        /* of a float */
3985 # 248 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
3986 /*
3987  * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
3988  * related text states:
3989  *
3990  * A definition of one of the values from Table 2-5 shall be omitted from the
3991  * <limits.h> on specific implementations where the corresponding value is
3992  * equal to or greater than the stated minimum, but where the value can vary
3993  * depending on the file to which it is applied. The actual value supported for
3994  * a specific pathname shall be provided by the pathconf() (5.7.1) function.
3995  *
3996  * This is clear that any machine supporting multiple file system types
3997  * and/or a network can not include this define, regardless of protection
3998  * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags.
3999  *
4000  * #define	NAME_MAX	14
4001  */
4002 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
4003     /* Increased for illumos */
4004 # 35 "ckentry.c" 2
4005 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 1
4006 /*
4007  * CDDL HEADER START
4008  *
4009  * The contents of this file are subject to the terms of the
4010  * Common Development and Distribution License (the "License").
4011  * You may not use this file except in compliance with the License.
4012  *
4013  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4014  * or http://www.opensolaris.org/os/licensing.
4015  * See the License for the specific language governing permissions
4016  * and limitations under the License.
4017  *
4018  * When distributing Covered Code, include this CDDL HEADER in each
4019  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4020  * If applicable, add the following below this CDDL HEADER, with the
4021  * fields enclosed by brackets "[]" replaced with your own identifying
4022  * information: Portions Copyright [yyyy] [name of copyright owner]
4023  *
4024  * CDDL HEADER END
4025  */
4026 
4027 /*
4028  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4029  *
4030  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
4031  * Use is subject to license terms.
4032  */
4033 
4034 /*	Copyright (c) 1988 AT&T	*/
4035 /*	  All Rights Reserved  	*/
4036 
4037 
4038 
4039 
4040 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4041 /*
4042  * CDDL HEADER START
4043  *
4044  * The contents of this file are subject to the terms of the
4045  * Common Development and Distribution License (the "License").
4046  * You may not use this file except in compliance with the License.
4047  *
4048  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4049  * or http://www.opensolaris.org/os/licensing.
4050  * See the License for the specific language governing permissions
4051  * and limitations under the License.
4052  *
4053  * When distributing Covered Code, include this CDDL HEADER in each
4054  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4055  * If applicable, add the following below this CDDL HEADER, with the
4056  * fields enclosed by brackets "[]" replaced with your own identifying
4057  * information: Portions Copyright [yyyy] [name of copyright owner]
4058  *
4059  * CDDL HEADER END
4060  */
4061 
4062 /*
4063  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4064  * Copyright 2016 Joyent, Inc.
4065  *
4066  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4067  * Use is subject to license terms.
4068  */
4069 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 2
4070 
4071 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4072 /*
4073  * CDDL HEADER START
4074  *
4075  * The contents of this file are subject to the terms of the
4076  * Common Development and Distribution License (the "License").
4077  * You may not use this file except in compliance with the License.
4078  *
4079  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4080  * or http://www.opensolaris.org/os/licensing.
4081  * See the License for the specific language governing permissions
4082  * and limitations under the License.
4083  *
4084  * When distributing Covered Code, include this CDDL HEADER in each
4085  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4086  * If applicable, add the following below this CDDL HEADER, with the
4087  * fields enclosed by brackets "[]" replaced with your own identifying
4088  * information: Portions Copyright [yyyy] [name of copyright owner]
4089  *
4090  * CDDL HEADER END
4091  */
4092 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4093 /*	  All Rights Reserved  	*/
4094 
4095 
4096 /*
4097  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4098  * Use is subject to license terms.
4099  *
4100  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4101  * Copyright 2016 Joyent, Inc.
4102  */
4103 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 2
4104 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h" 1
4105 /*
4106  * CDDL HEADER START
4107  *
4108  * The contents of this file are subject to the terms of the
4109  * Common Development and Distribution License (the "License").
4110  * You may not use this file except in compliance with the License.
4111  *
4112  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4113  * or http://www.opensolaris.org/os/licensing.
4114  * See the License for the specific language governing permissions
4115  * and limitations under the License.
4116  *
4117  * When distributing Covered Code, include this CDDL HEADER in each
4118  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4119  * If applicable, add the following below this CDDL HEADER, with the
4120  * fields enclosed by brackets "[]" replaced with your own identifying
4121  * information: Portions Copyright [yyyy] [name of copyright owner]
4122  *
4123  * CDDL HEADER END
4124  */
4125 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4126 /*	  All Rights Reserved  	*/
4127 
4128 
4129 /*
4130  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4131  *
4132  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4133  * Use is subject to license terms.
4134  */
4135 
4136 
4137 
4138 
4139 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4140 /*
4141  * CDDL HEADER START
4142  *
4143  * The contents of this file are subject to the terms of the
4144  * Common Development and Distribution License (the "License").
4145  * You may not use this file except in compliance with the License.
4146  *
4147  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4148  * or http://www.opensolaris.org/os/licensing.
4149  * See the License for the specific language governing permissions
4150  * and limitations under the License.
4151  *
4152  * When distributing Covered Code, include this CDDL HEADER in each
4153  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4154  * If applicable, add the following below this CDDL HEADER, with the
4155  * fields enclosed by brackets "[]" replaced with your own identifying
4156  * information: Portions Copyright [yyyy] [name of copyright owner]
4157  *
4158  * CDDL HEADER END
4159  */
4160 
4161 /*
4162  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4163  * Copyright 2016 Joyent, Inc.
4164  *
4165  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4166  * Use is subject to license terms.
4167  */
4168 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h" 2
4169 
4170 
4171 
4172 
4173 
4174 /*
4175  * File-system independent directory entry.
4176  */
4177 typedef struct dirent {
4178  ino_t d_ino; /* "inode number" of entry */
4179  off_t d_off; /* offset of disk directory entry */
4180  unsigned short d_reclen; /* length of this record */
4181  char d_name[1]; /* name of file */
4182 } dirent_t;
4183 # 66 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
4184 /*
4185  * transitional large file interface version AND kernel internal version
4186  */
4187 typedef struct dirent64 {
4188  ino64_t d_ino; /* "inode number" of entry */
4189  off64_t d_off; /* offset of disk directory entry */
4190  unsigned short d_reclen; /* length of this record */
4191  char d_name[1]; /* name of file */
4192 } dirent64_t;
4193 # 90 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
4194 /*
4195  * This is the maximum number of bytes that getdents(2) will store in
4196  * user-supplied dirent buffers.
4197  */
4198 
4199 
4200 
4201 
4202 /*
4203  * large file compilation environment setup
4204  *
4205  * In the LP64 compilation environment, map large file interfaces
4206  * back to native versions where possible. (This only works because
4207  * a 'struct dirent' == 'struct dirent64').
4208  */
4209 
4210 
4211 
4212 
4213 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
4214 #pragma redefine_extname getdents getdents64
4215 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
4216 # 124 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dirent.h"
4217 extern int getdents(int, struct dirent *, size_t);
4218 
4219 /* N.B.: transitional large file interface version deliberately not provided */
4220 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h" 2
4221 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4222 typedef struct {
4223  int dd_fd; /* file descriptor */
4224  int dd_loc; /* offset in block */
4225  int dd_size; /* amount of valid data */
4226  char *dd_buf; /* directory block */
4227 } DIR; /* stream data from opendir() */
4228 # 72 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4229 /* large file compilation environment setup */
4230 
4231 
4232 
4233 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4234 #pragma redefine_extname readdir readdir64
4235 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4236 
4237 
4238 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4239 #pragma redefine_extname scandir scandir64
4240 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4241 
4242 
4243 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4244 #pragma redefine_extname alphasort alphasort64
4245 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4246 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4247 /* In the LP64 compilation environment, all APIs are already large file */
4248 # 98 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4249 extern DIR *opendir(const char *);
4250 
4251 
4252 extern DIR *fdopendir(int);
4253 extern int dirfd(DIR *);
4254 
4255 
4256 extern int scandir(const char *, struct dirent *(*[]),
4257     int (*)(const struct dirent *),
4258     int (*)(const struct dirent **,
4259      const struct dirent **));
4260 extern int alphasort(const struct dirent **,
4261      const struct dirent **);
4262 
4263 extern struct dirent *readdir(DIR *);
4264 
4265 
4266 extern long telldir(DIR *);
4267 extern void seekdir(DIR *, long);
4268 
4269 extern void rewinddir(DIR *);
4270 extern int closedir(DIR *);
4271 
4272 /* transitional large file interface */
4273 
4274 
4275 extern struct dirent64 *readdir64(DIR *);
4276 
4277 extern int scandir64(const char *, struct dirent64 *(*[]),
4278    int (*)(const struct dirent64 *),
4279    int (*)(const struct dirent64 **,
4280     const struct dirent64 **));
4281 extern int alphasort64(const struct dirent64 **, const struct dirent64 **);
4282 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4283 /*
4284  * readdir_r() prototype is defined here.
4285  *
4286  * There are several variations, depending on whether compatibility with old
4287  * POSIX draft specifications or the final specification is desired and on
4288  * whether the large file compilation environment is active.  To combat a
4289  * combinatorial explosion, enabling large files implies using the final
4290  * specification (since the definition of the large file environment
4291  * considerably postdates that of the final readdir_r specification).
4292  *
4293  * In the LP64 compilation environment, all APIs are already large file,
4294  * and since there are no 64-bit applications that can have seen the
4295  * draft implementation, again, we use the final POSIX specification.
4296  */
4297 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4298 
4299 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4300 #pragma redefine_extname readdir_r readdir64_r
4301 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/dirent.h"
4302 
4303 
4304 
4305 
4306 
4307 extern int readdir_r(DIR *, struct dirent *,
4308  struct dirent **);
4309 
4310 
4311 
4312 
4313 
4314 /* transitional large file interface */
4315 extern int readdir64_r(DIR *, struct dirent64 *,
4316  struct dirent64 **);
4317 # 36 "ckentry.c" 2
4318 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4319 /*
4320  * CDDL HEADER START
4321  *
4322  * The contents of this file are subject to the terms of the
4323  * Common Development and Distribution License (the "License").
4324  * You may not use this file except in compliance with the License.
4325  *
4326  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4327  * or http://www.opensolaris.org/os/licensing.
4328  * See the License for the specific language governing permissions
4329  * and limitations under the License.
4330  *
4331  * When distributing Covered Code, include this CDDL HEADER in each
4332  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4333  * If applicable, add the following below this CDDL HEADER, with the
4334  * fields enclosed by brackets "[]" replaced with your own identifying
4335  * information: Portions Copyright [yyyy] [name of copyright owner]
4336  *
4337  * CDDL HEADER END
4338  */
4339 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4340 /*	  All Rights Reserved  	*/
4341 
4342 
4343 /*
4344  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4345  * Use is subject to license terms.
4346  *
4347  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4348  * Copyright 2016 Joyent, Inc.
4349  */
4350 # 37 "ckentry.c" 2
4351 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
4352 /*
4353  * CDDL HEADER START
4354  *
4355  * The contents of this file are subject to the terms of the
4356  * Common Development and Distribution License (the "License").
4357  * You may not use this file except in compliance with the License.
4358  *
4359  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4360  * or http://www.opensolaris.org/os/licensing.
4361  * See the License for the specific language governing permissions
4362  * and limitations under the License.
4363  *
4364  * When distributing Covered Code, include this CDDL HEADER in each
4365  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4366  * If applicable, add the following below this CDDL HEADER, with the
4367  * fields enclosed by brackets "[]" replaced with your own identifying
4368  * information: Portions Copyright [yyyy] [name of copyright owner]
4369  *
4370  * CDDL HEADER END
4371  */
4372 
4373 /*
4374  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4375  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
4376  */
4377 
4378 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
4379 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
4380 /*	All Rights Reserved	*/
4381 
4382 
4383 
4384 
4385 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4386 /*
4387  * CDDL HEADER START
4388  *
4389  * The contents of this file are subject to the terms of the
4390  * Common Development and Distribution License (the "License").
4391  * You may not use this file except in compliance with the License.
4392  *
4393  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4394  * or http://www.opensolaris.org/os/licensing.
4395  * See the License for the specific language governing permissions
4396  * and limitations under the License.
4397  *
4398  * When distributing Covered Code, include this CDDL HEADER in each
4399  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4400  * If applicable, add the following below this CDDL HEADER, with the
4401  * fields enclosed by brackets "[]" replaced with your own identifying
4402  * information: Portions Copyright [yyyy] [name of copyright owner]
4403  *
4404  * CDDL HEADER END
4405  */
4406 
4407 /*
4408  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4409  * Copyright 2016 Joyent, Inc.
4410  *
4411  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4412  * Use is subject to license terms.
4413  */
4414 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
4415 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4416 /*
4417  * CDDL HEADER START
4418  *
4419  * The contents of this file are subject to the terms of the
4420  * Common Development and Distribution License (the "License").
4421  * You may not use this file except in compliance with the License.
4422  *
4423  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4424  * or http://www.opensolaris.org/os/licensing.
4425  * See the License for the specific language governing permissions
4426  * and limitations under the License.
4427  *
4428  * When distributing Covered Code, include this CDDL HEADER in each
4429  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4430  * If applicable, add the following below this CDDL HEADER, with the
4431  * fields enclosed by brackets "[]" replaced with your own identifying
4432  * information: Portions Copyright [yyyy] [name of copyright owner]
4433  *
4434  * CDDL HEADER END
4435  */
4436 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4437 /*	  All Rights Reserved  	*/
4438 
4439 
4440 /*
4441  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4442  * Use is subject to license terms.
4443  *
4444  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4445  * Copyright 2016 Joyent, Inc.
4446  */
4447 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
4448 
4449 
4450 
4451 
4452 
4453 /*
4454  * The implementation specific header <sys/time_impl.h> includes a
4455  * definition for timestruc_t needed by the stat structure.  However,
4456  * including either <time.h>, which includes <sys/time_impl.h>, or
4457  * including <sys/time_impl.h> directly will break both X/Open and
4458  * POSIX namespace. Preceeding tag, structure, and structure member
4459  * names with underscores eliminates the namespace breakage and at the
4460  * same time, with unique type names, eliminates the possibility of
4461  * timespec_t or timestruct_t naming conflicts that could otherwise
4462  * result based on the order of inclusion of <sys/stat.h> and
4463  * <sys/time.h>.  The header <sys/time_std_impl.h> contains the
4464  * standards namespace safe versions of these definitions.
4465  */
4466 
4467 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
4468 /*
4469  * CDDL HEADER START
4470  *
4471  * The contents of this file are subject to the terms of the
4472  * Common Development and Distribution License, Version 1.0 only
4473  * (the "License").  You may not use this file except in compliance
4474  * with the License.
4475  *
4476  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4477  * or http://www.opensolaris.org/os/licensing.
4478  * See the License for the specific language governing permissions
4479  * and limitations under the License.
4480  *
4481  * When distributing Covered Code, include this CDDL HEADER in each
4482  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4483  * If applicable, add the following below this CDDL HEADER, with the
4484  * fields enclosed by brackets "[]" replaced with your own identifying
4485  * information: Portions Copyright [yyyy] [name of copyright owner]
4486  *
4487  * CDDL HEADER END
4488  */
4489 /*
4490  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4491  * Use is subject to license terms.
4492  */
4493 
4494 /*
4495  * Implementation-private.  This header should not be included
4496  * directly by an application.  The application should instead
4497  * include <time.h> which includes this header conditionally
4498  * depending on which feature test macros are defined. By default,
4499  * this header is included by <time.h>.  X/Open and POSIX
4500  * standards requirements result in this header being included
4501  * by <time.h> only under a restricted set of conditions.
4502  */
4503 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
4504 
4505 
4506 
4507 
4508 
4509 
4510 /*
4511  * stat structure, used by stat(2) and fstat(2)
4512  */
4513 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4514 /*
4515  * large file compilation environment setup
4516  */
4517 
4518 
4519 
4520 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4521 #pragma redefine_extname fstat fstat64
4522 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4523 
4524 
4525 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4526 #pragma redefine_extname stat stat64
4527 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4528 
4529 
4530 
4531 
4532 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4533 #pragma redefine_extname fstatat fstatat64
4534 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4535 
4536 
4537 
4538 
4539 
4540 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4541 #pragma redefine_extname lstat lstat64
4542 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4543 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4544 /*
4545  * In the LP64 compilation environment, map large file interfaces
4546  * back to native versions where possible.
4547  */
4548 # 211 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4549 /*
4550  * User level stat structure definitions.
4551  */
4552 # 242 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4553 struct stat {
4554  dev_t st_dev;
4555  long st_pad1[3]; /* reserved for network id */
4556  ino_t st_ino;
4557  mode_t st_mode;
4558  nlink_t st_nlink;
4559  uid_t st_uid;
4560  gid_t st_gid;
4561  dev_t st_rdev;
4562  long st_pad2[2];
4563  off_t st_size;
4564 
4565 
4566 
4567 
4568  timestruc_t st_atim;
4569  timestruc_t st_mtim;
4570  timestruc_t st_ctim;
4571 
4572 
4573 
4574 
4575 
4576  blksize_t st_blksize;
4577  blkcnt_t st_blocks;
4578  char st_fstype[16];
4579  long st_pad4[8]; /* expansion area */
4580 };
4581 
4582 
4583 
4584 /* transitional large file interface version */
4585 # 303 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4586 struct stat64 {
4587  dev_t st_dev;
4588  long st_pad1[3]; /* reserved for network id */
4589  ino64_t st_ino;
4590  mode_t st_mode;
4591  nlink_t st_nlink;
4592  uid_t st_uid;
4593  gid_t st_gid;
4594  dev_t st_rdev;
4595  long st_pad2[2];
4596  off64_t st_size;
4597 
4598  timestruc_t st_atim;
4599  timestruc_t st_mtim;
4600  timestruc_t st_ctim;
4601 
4602 
4603 
4604 
4605 
4606  blksize_t st_blksize;
4607  blkcnt64_t st_blocks;
4608  char st_fstype[16];
4609  long st_pad4[8]; /* expansion area */
4610 };
4611 # 401 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4612 /* MODE MASKS */
4613 
4614 /* de facto standard definitions */
4615 
4616 
4617 
4618 
4619 
4620 
4621 /* XENIX definitions are not relevant to Solaris */
4622 # 428 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4623 /* the following macros are for POSIX conformance */
4624 # 454 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4625 /* POSIX.4 macros */
4626 
4627 
4628 
4629 
4630 
4631 
4632 /*
4633  * A version number is included in the x86 SVR4 stat and mknod interfaces
4634  * so that SVR4 binaries can be supported.  An LP64 kernel that supports
4635  * the i386 ABI need to be aware of this too.
4636  */
4637 # 476 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4638  /* || defined(_XPG7) */
4639 /* for use with futimens() and utimensat() */
4640 # 486 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
4641 extern int fchmod(int, mode_t);
4642 
4643 
4644 extern int chmod(const char *, mode_t);
4645 extern int mkdir(const char *, mode_t);
4646 extern int mkfifo(const char *, mode_t);
4647 extern mode_t umask(mode_t);
4648 
4649 /* transitional large file interfaces */
4650 
4651 
4652 extern int fstat64(int, struct stat64 *);
4653 extern int stat64(const char *, struct stat64 *);
4654 extern int lstat64(const char *, struct stat64 *);
4655 
4656 
4657 extern int fstatat64(int, const char *, struct stat64 *, int);
4658 
4659 
4660 
4661 
4662 
4663  /* || defined(_XPG7) */
4664 extern int mkdirat(int, const char *, mode_t);
4665 extern int mkfifoat(int, const char *, mode_t);
4666 extern int mknodat(int, const char *, mode_t, dev_t);
4667 extern int fchmodat(int, const char *, mode_t, int);
4668 extern int futimens(int, const struct timespec[2]);
4669 extern int utimensat(int, const char *, const struct timespec[2], int);
4670 
4671 
4672 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 1
4673 /*
4674  * CDDL HEADER START
4675  *
4676  * The contents of this file are subject to the terms of the
4677  * Common Development and Distribution License (the "License").
4678  * You may not use this file except in compliance with the License.
4679  *
4680  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4681  * or http://www.opensolaris.org/os/licensing.
4682  * See the License for the specific language governing permissions
4683  * and limitations under the License.
4684  *
4685  * When distributing Covered Code, include this CDDL HEADER in each
4686  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4687  * If applicable, add the following below this CDDL HEADER, with the
4688  * fields enclosed by brackets "[]" replaced with your own identifying
4689  * information: Portions Copyright [yyyy] [name of copyright owner]
4690  *
4691  * CDDL HEADER END
4692  */
4693 
4694 /*
4695  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
4696  * Use is subject to license terms.
4697  */
4698 
4699 
4700 
4701 
4702 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4703 /*
4704  * CDDL HEADER START
4705  *
4706  * The contents of this file are subject to the terms of the
4707  * Common Development and Distribution License (the "License").
4708  * You may not use this file except in compliance with the License.
4709  *
4710  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4711  * or http://www.opensolaris.org/os/licensing.
4712  * See the License for the specific language governing permissions
4713  * and limitations under the License.
4714  *
4715  * When distributing Covered Code, include this CDDL HEADER in each
4716  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4717  * If applicable, add the following below this CDDL HEADER, with the
4718  * fields enclosed by brackets "[]" replaced with your own identifying
4719  * information: Portions Copyright [yyyy] [name of copyright owner]
4720  *
4721  * CDDL HEADER END
4722  */
4723 
4724 /*
4725  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4726  * Copyright 2016 Joyent, Inc.
4727  *
4728  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4729  * Use is subject to license terms.
4730  */
4731 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
4732 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4733 /*
4734  * CDDL HEADER START
4735  *
4736  * The contents of this file are subject to the terms of the
4737  * Common Development and Distribution License (the "License").
4738  * You may not use this file except in compliance 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 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4754 /*	  All Rights Reserved  	*/
4755 
4756 
4757 /*
4758  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4759  * Use is subject to license terms.
4760  *
4761  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4762  * Copyright 2016 Joyent, Inc.
4763  */
4764 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
4765 
4766 
4767 
4768 
4769 
4770 /*
4771  * The implementation specific header for <sys/stat.h>
4772  */
4773 
4774 
4775 
4776 
4777 
4778 extern int fstat(int, struct stat *);
4779 extern int stat(const char *, struct stat *);
4780 
4781 
4782 
4783 extern int fstatat(int, const char *, struct stat *, int);
4784 
4785 
4786 
4787 extern int lstat(const char *, struct stat *);
4788 extern int mknod(const char *, mode_t, dev_t);
4789 # 518 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
4790 # 38 "ckentry.c" 2
4791 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
4792 /*
4793  * CDDL HEADER START
4794  *
4795  * The contents of this file are subject to the terms of the
4796  * Common Development and Distribution License (the "License").
4797  * You may not use this file except in compliance with the License.
4798  *
4799  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4800  * or http://www.opensolaris.org/os/licensing.
4801  * See the License for the specific language governing permissions
4802  * and limitations under the License.
4803  *
4804  * When distributing Covered Code, include this CDDL HEADER in each
4805  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4806  * If applicable, add the following below this CDDL HEADER, with the
4807  * fields enclosed by brackets "[]" replaced with your own identifying
4808  * information: Portions Copyright [yyyy] [name of copyright owner]
4809  *
4810  * CDDL HEADER END
4811  */
4812 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4813 /*	  All Rights Reserved  	*/
4814 
4815 /*
4816  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
4817  * Use is subject to license terms.
4818  */
4819 
4820 
4821 
4822 
4823 #pragma ident "%Z%%M%	%I%	%E% SMI"
4824 
4825 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
4826 /*
4827  * CDDL HEADER START
4828  *
4829  * The contents of this file are subject to the terms of the
4830  * Common Development and Distribution License (the "License").
4831  * You may not use this file except in compliance with the License.
4832  *
4833  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4834  * or http://www.opensolaris.org/os/licensing.
4835  * See the License for the specific language governing permissions
4836  * and limitations under the License.
4837  *
4838  * When distributing Covered Code, include this CDDL HEADER in each
4839  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4840  * If applicable, add the following below this CDDL HEADER, with the
4841  * fields enclosed by brackets "[]" replaced with your own identifying
4842  * information: Portions Copyright [yyyy] [name of copyright owner]
4843  *
4844  * CDDL HEADER END
4845  */
4846 /*	Copyright (c) 1988 AT&T	*/
4847 /*	  All Rights Reserved  	*/
4848 
4849 
4850 /*
4851  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4852  *
4853  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
4854  * Use is subject to license terms.
4855  */
4856 /*
4857  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
4858  * Copyright 2016 Joyent, Inc.
4859  */
4860 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 2
4861 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h"
4862 extern char *errstr;
4863 
4864 struct ainfo {
4865  char *local;
4866  mode_t mode;
4867  char owner[64 +1];
4868  char group[64 +1];
4869  major_t major;
4870  minor_t minor;
4871 };
4872 
4873 struct cinfo {
4874  long cksum;
4875  fsblkcnt_t size;
4876  time_t modtime;
4877 };
4878 
4879 struct pinfo {
4880  char status;
4881  char pkg[64 +1];
4882  char editflag;
4883  char aclass[64 +1];
4884  struct pinfo
4885   *next;
4886 };
4887 
4888 struct cfent {
4889  short volno;
4890  char ftype;
4891  char pkg_class[64 +1];
4892  int pkg_class_idx;
4893  char *path;
4894  struct ainfo ainfo;
4895  struct cinfo cinfo;
4896  short npkgs;
4897  struct pinfo
4898   *pinfo;
4899 };
4900 
4901 /* averify() & cverify() error codes */
4902 # 39 "ckentry.c" 2
4903 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 1
4904 /*
4905  * CDDL HEADER START
4906  *
4907  * The contents of this file are subject to the terms of the
4908  * Common Development and Distribution License, Version 1.0 only
4909  * (the "License").  You may not use this file except in compliance
4910  * with the License.
4911  *
4912  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4913  * or http://www.opensolaris.org/os/licensing.
4914  * See the License for the specific language governing permissions
4915  * and limitations under the License.
4916  *
4917  * When distributing Covered Code, include this CDDL HEADER in each
4918  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4919  * If applicable, add the following below this CDDL HEADER, with the
4920  * fields enclosed by brackets "[]" replaced with your own identifying
4921  * information: Portions Copyright [yyyy] [name of copyright owner]
4922  *
4923  * CDDL HEADER END
4924  */
4925 /*
4926  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4927  * Use is subject to license terms.
4928  */
4929 
4930 /*
4931  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4932  *
4933  * Portions of this file developed by Garrett D'Amore are licensed
4934  * under the terms of the Common Development and Distribution License (CDDL)
4935  * version 1.0 only.  The use of subsequent versions of the License are
4936  * is specifically prohibited unless those terms are not in conflict with
4937  * version 1.0 of the License.  You can find this license on-line at
4938  * http://www.illumos.org/license/CDDL
4939  */
4940 
4941 
4942 
4943 
4944 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 1
4945 /*
4946  * CDDL HEADER START
4947  *
4948  * The contents of this file are subject to the terms of the
4949  * Common Development and Distribution License, Version 1.0 only
4950  * (the "License").  You may not use this file except in compliance
4951  * with the License.
4952  *
4953  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4954  * or http://www.opensolaris.org/os/licensing.
4955  * See the License for the specific language governing permissions
4956  * and limitations under the License.
4957  *
4958  * When distributing Covered Code, include this CDDL HEADER in each
4959  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4960  * If applicable, add the following below this CDDL HEADER, with the
4961  * fields enclosed by brackets "[]" replaced with your own identifying
4962  * information: Portions Copyright [yyyy] [name of copyright owner]
4963  *
4964  * CDDL HEADER END
4965  */
4966 /*
4967  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4968  * Copyright 2014 PALO, Richard.
4969  *
4970  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4971  * Use is subject to license terms.
4972  */
4973 
4974 /*	Copyright (c) 1988 AT&T	*/
4975 /*	  All Rights Reserved  	*/
4976 
4977 
4978 /*
4979  * An application should not include this header directly.  Instead it
4980  * should be included only through the inclusion of other Sun headers.
4981  *
4982  * The contents of this header is limited to identifiers specified in the
4983  * C Standard.  Any new identifiers specified in future amendments to the
4984  * C Standard must be placed in this header.  If these new identifiers
4985  * are required to also be in the C++ Standard "std" namespace, then for
4986  * anything other than macro definitions, corresponding "using" directives
4987  * must also be added to <locale.h>.
4988  */
4989 
4990 
4991 
4992 
4993 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4994 /*
4995  * CDDL HEADER START
4996  *
4997  * The contents of this file are subject to the terms of the
4998  * Common Development and Distribution License (the "License").
4999  * You may not use this file except in compliance with the License.
5000  *
5001  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5002  * or http://www.opensolaris.org/os/licensing.
5003  * See the License for the specific language governing permissions
5004  * and limitations under the License.
5005  *
5006  * When distributing Covered Code, include this CDDL HEADER in each
5007  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5008  * If applicable, add the following below this CDDL HEADER, with the
5009  * fields enclosed by brackets "[]" replaced with your own identifying
5010  * information: Portions Copyright [yyyy] [name of copyright owner]
5011  *
5012  * CDDL HEADER END
5013  */
5014 
5015 /*
5016  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5017  * Copyright 2016 Joyent, Inc.
5018  *
5019  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5020  * Use is subject to license terms.
5021  */
5022 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
5023 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
5024 /*
5025  * This file and its contents are supplied under the terms of the
5026  * Common Development and Distribution License ("CDDL"), version 1.0.
5027  * You may only use this file in accordance with the terms of version
5028  * 1.0 of the CDDL.
5029  *
5030  * A full copy of the text of the CDDL should have accompanied this
5031  * source.  A copy of the CDDL is also available via the Internet at
5032  * http://www.illumos.org/license/CDDL.
5033  */
5034 
5035 /*
5036  * Copyright 2014-2016 PALO, Richard.
5037  */
5038 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
5039 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
5040 struct lconv {
5041  char *decimal_point;
5042  char *thousands_sep;
5043  char *grouping;
5044  char *int_curr_symbol;
5045  char *currency_symbol;
5046  char *mon_decimal_point;
5047  char *mon_thousands_sep;
5048  char *mon_grouping;
5049  char *positive_sign;
5050  char *negative_sign;
5051  char int_frac_digits;
5052  char frac_digits;
5053  char p_cs_precedes;
5054  char p_sep_by_space;
5055  char n_cs_precedes;
5056  char n_sep_by_space;
5057  char p_sign_posn;
5058  char n_sign_posn;
5059 
5060 /*
5061  * New in IEEE Std 1003.1-2001 for alignment with the ISO/IEC 9899:1999
5062  * standard.  Namespace and binary compatibility dictate that visibility
5063  * of these new members be limited.  Visibility is limited to a strictly
5064  * conforming ANSI C environment (-Xc) or if _LCONV_C99 is defined.
5065  */
5066 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
5067 };
5068 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
5069 extern char *setlocale(int, const char *);
5070 extern struct lconv *localeconv(void);
5071 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
5072 
5073 
5074 
5075 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
5076 /*
5077  * CDDL HEADER START
5078  *
5079  * The contents of this file are subject to the terms of the
5080  * Common Development and Distribution License (the "License").
5081  * You may not use this file except in compliance with the License.
5082  *
5083  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5084  * or http://www.opensolaris.org/os/licensing.
5085  * See the License for the specific language governing permissions
5086  * and limitations under the License.
5087  *
5088  * When distributing Covered Code, include this CDDL HEADER in each
5089  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5090  * If applicable, add the following below this CDDL HEADER, with the
5091  * fields enclosed by brackets "[]" replaced with your own identifying
5092  * information: Portions Copyright [yyyy] [name of copyright owner]
5093  *
5094  * CDDL HEADER END
5095  */
5096 /*
5097  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5098  *
5099  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
5100  * Use is subject to license terms.
5101  */
5102 
5103 
5104 
5105 
5106 
5107 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
5108 /*
5109  * CDDL HEADER START
5110  *
5111  * The contents of this file are subject to the terms of the
5112  * Common Development and Distribution License (the "License").
5113  * You may not use this file except in compliance with the License.
5114  *
5115  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5116  * or http://www.opensolaris.org/os/licensing.
5117  * See the License for the specific language governing permissions
5118  * and limitations under the License.
5119  *
5120  *
5121  * When distributing Covered Code, include this CDDL HEADER in each
5122  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5123  * If applicable, add the following below this CDDL HEADER, with the
5124  * fields enclosed by brackets "[]" replaced with your own identifying
5125  * information: Portions Copyright [yyyy] [name of copyright owner]
5126  *
5127  * CDDL HEADER END
5128  */
5129 
5130 /*
5131  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
5132  * Use is subject to license terms.
5133  * Copyright 2016 Joyent, Inc.
5134  */
5135 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 2
5136 
5137 
5138 
5139 
5140 
5141 /*
5142  * wchar_t is a built-in type in standard C++ and as such is not
5143  * defined here when using standard C++. However, the GNU compiler
5144  * fixincludes utility nonetheless creates its own version of this
5145  * header for use by gcc and g++. In that version it adds a redundant
5146  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
5147  * header we need to include the following magic comment:
5148  *
5149  * we must use the C++ compiler's type
5150  *
5151  * The above comment should not be removed or changed until GNU
5152  * gcc/fixinc/inclhack.def is updated to bypass this header.
5153  */
5154 
5155 
5156 
5157 
5158 
5159 
5160 typedef long wchar_t;
5161 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h"
5162 extern char *dcgettext(const char *, const char *, const int);
5163 extern char *dgettext(const char *, const char *);
5164 extern char *gettext(const char *);
5165 extern char *textdomain(const char *);
5166 extern char *bindtextdomain(const char *, const char *);
5167 
5168 /*
5169  * LI18NUX 2000 Globalization Specification Version 1.0
5170  * with Amendment 2
5171  */
5172 extern char *dcngettext(const char *, const char *,
5173  const char *, unsigned long int, int);
5174 extern char *dngettext(const char *, const char *,
5175  const char *, unsigned long int);
5176 extern char *ngettext(const char *, const char *, unsigned long int);
5177 extern char *bind_textdomain_codeset(const char *, const char *);
5178 
5179 /* Word handling functions --- requires dynamic linking */
5180 /* Warning: these are experimental and subject to change. */
5181 extern int wdinit(void);
5182 extern int wdchkind(wchar_t);
5183 extern int wdbindf(wchar_t, wchar_t, int);
5184 extern wchar_t *wddelim(wchar_t, wchar_t, int);
5185 extern wchar_t mcfiller(void);
5186 extern int mcwrap(void);
5187 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
5188 
5189 
5190 /*
5191  * Allow global visibility for symbols defined in
5192  * C++ "std" namespace in <iso/locale_iso.h>.
5193  */
5194 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
5195 /*
5196  * These were added in POSIX 2008 as part of the newlocale() specification.
5197  */
5198 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
5199 extern locale_t duplocale(locale_t);
5200 extern void freelocale(locale_t);
5201 extern locale_t newlocale(int, const char *, locale_t);
5202 extern locale_t uselocale(locale_t);
5203 
5204 
5205 extern locale_t __global_locale(void);
5206 # 40 "ckentry.c" 2
5207 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
5208 /*
5209  * CDDL HEADER START
5210  *
5211  * The contents of this file are subject to the terms of the
5212  * Common Development and Distribution License (the "License").
5213  * You may not use this file except in compliance with the License.
5214  *
5215  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5216  * or http://www.opensolaris.org/os/licensing.
5217  * See the License for the specific language governing permissions
5218  * and limitations under the License.
5219  *
5220  * When distributing Covered Code, include this CDDL HEADER in each
5221  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5222  * If applicable, add the following below this CDDL HEADER, with the
5223  * fields enclosed by brackets "[]" replaced with your own identifying
5224  * information: Portions Copyright [yyyy] [name of copyright owner]
5225  *
5226  * CDDL HEADER END
5227  */
5228 /*
5229  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5230  *
5231  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
5232  * Use is subject to license terms.
5233  */
5234 # 41 "ckentry.c" 2
5235 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 1
5236 /*
5237  * CDDL HEADER START
5238  *
5239  * The contents of this file are subject to the terms of the
5240  * Common Development and Distribution License (the "License").
5241  * You may not use this file except in compliance with the License.
5242  *
5243  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5244  * or http://www.opensolaris.org/os/licensing.
5245  * See the License for the specific language governing permissions
5246  * and limitations under the License.
5247  *
5248  * When distributing Covered Code, include this CDDL HEADER in each
5249  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5250  * If applicable, add the following below this CDDL HEADER, with the
5251  * fields enclosed by brackets "[]" replaced with your own identifying
5252  * information: Portions Copyright [yyyy] [name of copyright owner]
5253  *
5254  * CDDL HEADER END
5255  */
5256 
5257 /*
5258  * Copyright 2014 PALO, Richard.
5259  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5260  * Copyright (c) 2013 Gary Mills
5261  *
5262  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
5263  */
5264 
5265 /*	Copyright (c) 1988 AT&T	*/
5266 /*	  All Rights Reserved  	*/
5267 
5268 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
5269 
5270 
5271 
5272 
5273 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5274 /*
5275  * CDDL HEADER START
5276  *
5277  * The contents of this file are subject to the terms of the
5278  * Common Development and Distribution License (the "License").
5279  * You may not use this file except in compliance with the License.
5280  *
5281  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5282  * or http://www.opensolaris.org/os/licensing.
5283  * See the License for the specific language governing permissions
5284  * and limitations under the License.
5285  *
5286  * When distributing Covered Code, include this CDDL HEADER in each
5287  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5288  * If applicable, add the following below this CDDL HEADER, with the
5289  * fields enclosed by brackets "[]" replaced with your own identifying
5290  * information: Portions Copyright [yyyy] [name of copyright owner]
5291  *
5292  * CDDL HEADER END
5293  */
5294 
5295 /*
5296  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5297  * Copyright 2016 Joyent, Inc.
5298  *
5299  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5300  * Use is subject to license terms.
5301  */
5302 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
5303 
5304 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
5305 /*
5306  * This file and its contents are supplied under the terms of the
5307  * Common Development and Distribution License ("CDDL"), version 1.0.
5308  * You may only use this file in accordance with the terms of version
5309  * 1.0 of the CDDL.
5310  *
5311  * A full copy of the text of the CDDL should have accompanied this
5312  * source.  A copy of the CDDL is also available via the Internet at
5313  * http://www.illumos.org/license/CDDL.
5314  */
5315 
5316 /*
5317  * Copyright 2014-2016 PALO, Richard.
5318  */
5319 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
5320 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
5321 /*
5322  * CDDL HEADER START
5323  *
5324  * The contents of this file are subject to the terms of the
5325  * Common Development and Distribution License (the "License").
5326  * You may not use this file except in compliance with the License.
5327  *
5328  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5329  * or http://www.opensolaris.org/os/licensing.
5330  * See the License for the specific language governing permissions
5331  * and limitations under the License.
5332  *
5333  * When distributing Covered Code, include this CDDL HEADER in each
5334  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5335  * If applicable, add the following below this CDDL HEADER, with the
5336  * fields enclosed by brackets "[]" replaced with your own identifying
5337  * information: Portions Copyright [yyyy] [name of copyright owner]
5338  *
5339  * CDDL HEADER END
5340  */
5341 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
5342 /*	  All Rights Reserved  	*/
5343 
5344 
5345 /*
5346  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
5347  * Use is subject to license terms.
5348  *
5349  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
5350  * Copyright 2016 Joyent, Inc.
5351  */
5352 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
5353 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
5354 /*
5355  * CDDL HEADER START
5356  *
5357  * The contents of this file are subject to the terms of the
5358  * Common Development and Distribution License (the "License").
5359  * You may not use this file except in compliance with the License.
5360  *
5361  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5362  * or http://www.opensolaris.org/os/licensing.
5363  * See the License for the specific language governing permissions
5364  * and limitations under the License.
5365  *
5366  * When distributing Covered Code, include this CDDL HEADER in each
5367  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5368  * If applicable, add the following below this CDDL HEADER, with the
5369  * fields enclosed by brackets "[]" replaced with your own identifying
5370  * information: Portions Copyright [yyyy] [name of copyright owner]
5371  *
5372  * CDDL HEADER END
5373  */
5374 
5375 /*
5376  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
5377  *	  All Rights Reserved
5378  *
5379  */
5380 
5381 /*
5382  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
5383  * Use is subject to license terms.
5384  */
5385 
5386 /*
5387  * WARNING: This is an implementation-specific header,
5388  * its contents are not guaranteed. Applications
5389  * should include <unistd.h> and not this header.
5390  */
5391 
5392 
5393 
5394 
5395 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5396 /*
5397  * CDDL HEADER START
5398  *
5399  * The contents of this file are subject to the terms of the
5400  * Common Development and Distribution License (the "License").
5401  * You may not use this file except in compliance with the License.
5402  *
5403  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5404  * or http://www.opensolaris.org/os/licensing.
5405  * See the License for the specific language governing permissions
5406  * and limitations under the License.
5407  *
5408  * When distributing Covered Code, include this CDDL HEADER in each
5409  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5410  * If applicable, add the following below this CDDL HEADER, with the
5411  * fields enclosed by brackets "[]" replaced with your own identifying
5412  * information: Portions Copyright [yyyy] [name of copyright owner]
5413  *
5414  * CDDL HEADER END
5415  */
5416 
5417 /*
5418  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5419  * Copyright 2016 Joyent, Inc.
5420  *
5421  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5422  * Use is subject to license terms.
5423  */
5424 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 2
5425 
5426 
5427 
5428 
5429 
5430 /* command names for confstr */
5431 
5432 
5433 
5434 /*
5435  * command names for large file configuration information
5436  */
5437 /* large file compilation environment configuration */
5438 
5439 
5440 
5441 
5442 /* transitional large file interface configuration */
5443 
5444 
5445 
5446 
5447 
5448 /* UNIX 98 */
5449 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5450 /* UNIX 03 */
5451 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5452 /* command names for POSIX sysconf */
5453 
5454 /* POSIX.1 names */
5455 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5456 /* SVR4 names */
5457 
5458 
5459 
5460 
5461 /* 13 reserved for SVr4-ES/MP _SC_NACLS_MAX */
5462 
5463 
5464 
5465 
5466 /* POSIX.4 names */
5467 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5468 /* XPG4 names */
5469 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5470 /* additional XSH4/XCU4 command names for sysconf */
5471 
5472 
5473 
5474 /* additional XPG4v2 (UNIX 95) command names */
5475 
5476 
5477 
5478 
5479 
5480 /* defined for XTI (XNS Issue 5) */
5481 
5482 
5483 
5484 
5485 
5486 
5487 
5488 /*
5489  * Hardware specific items
5490  * Note that not all items are supported on all architectures
5491  */
5492 # 214 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5493 /*
5494  * POSIX.1c (pthreads) names. These values are defined above
5495  * the sub-500 range. See psarc case 1995/257.
5496  */
5497 # 235 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5498 /* UNIX 98 */
5499 # 244 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5500 /* UNIX 03 */
5501 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5502 /* command names for POSIX pathconf */
5503 
5504 /* POSIX.1 names */
5505 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5506 /* POSIX.4 names */
5507 
5508 
5509 
5510 /* UNIX 03 names */
5511 # 315 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5512 /* UNIX 08 names */
5513 
5514 
5515 /*
5516  * Large File Summit names
5517  *
5518  * This value matches the MIPS ABI choice, but leaves a large gap in the
5519  * value space.
5520  */
5521 
5522 
5523 /*
5524  * Extended attributes
5525  */
5526 
5527 
5528 
5529 /*
5530  * If you add a _PC define above 101, you must change _PC_LAST (and truss).
5531  */
5532 
5533 
5534 /*
5535  * Case sensitivity values (related to _PC_CASE_BEHAVIOR)
5536  */
5537 
5538 
5539 
5540 /*
5541  * The value of 0 is returned when
5542  * ACL's are not supported
5543  */
5544 # 366 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5545 /*
5546  * Marked LEGACY in SUSv2 and removed in SUSv3. Though SUSv3 applications
5547  * should not rely on this value, it has been aligned with the current
5548  * standard to avoid confusion if used.
5549  */
5550 # 408 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5551 /* UNIX 03 names */
5552 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
5553 
5554 
5555 
5556 
5557 
5558 /* Symbolic constants for the "access" routine: */
5559 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5560 /* Symbolic constants for the "lseek" routine: */
5561 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5562 /* Path names: */
5563 
5564 
5565 
5566 
5567 /*
5568  * compile-time symbolic constants,
5569  * Support does not mean the feature is enabled.
5570  * Use pathconf/sysconf to obtain actual configuration value.
5571  */
5572 
5573 /* Values unchanged in UNIX 03 */
5574 
5575 
5576 
5577 
5578 
5579 /*
5580  * POSIX.1b compile-time symbolic constants.
5581  */
5582 # 134 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5583 /*
5584  * POSIX.1c compile-time symbolic constants.
5585  */
5586 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5587 /* New in UNIX 03 */
5588 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5589 /*
5590  * Support for the POSIX.1 mutex protocol attribute. For realtime applications
5591  * which need mutexes to support priority inheritance/ceiling.
5592  */
5593 # 187 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5594 /*
5595  * Large File Summit-related announcement macros.  The system supports both
5596  * the additional and transitional Large File Summit interfaces.  (The final
5597  * two macros provide a finer granularity breakdown of _LFS64_LARGEFILE.)
5598  */
5599 
5600 
5601 
5602 
5603 
5604 /* large file compilation environment setup */
5605 
5606 
5607 
5608 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5609 #pragma redefine_extname ftruncate ftruncate64
5610 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5611 
5612 
5613 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5614 #pragma redefine_extname lseek lseek64
5615 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5616 
5617 
5618 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5619 #pragma redefine_extname pread pread64
5620 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5621 
5622 
5623 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5624 #pragma redefine_extname pwrite pwrite64
5625 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5626 
5627 
5628 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5629 #pragma redefine_extname truncate truncate64
5630 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5631 
5632 
5633 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5634 #pragma redefine_extname lockf lockf64
5635 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5636 
5637 
5638 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5639 #pragma redefine_extname tell tell64
5640 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5641 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5642 /* In the LP64 compilation environment, the APIs are already large file */
5643 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5644 extern int access(const char *, int);
5645 
5646 extern int acct(const char *);
5647 
5648 extern unsigned alarm(unsigned);
5649 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
5650 
5651 
5652 extern int brk(void *);
5653 
5654 extern int chdir(const char *);
5655 extern int chown(const char *, uid_t, gid_t);
5656 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
5657 
5658 
5659 extern int chroot(const char *);
5660 
5661 extern int close(int);
5662 
5663 
5664 
5665 
5666 
5667 
5668 extern char *ctermid(char *);
5669 
5670 
5671 extern char *ctermid_r(char *);
5672 
5673 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
5674 
5675 extern char *cuserid(char *);
5676 
5677 extern int dup(int);
5678 extern int dup2(int, int);
5679 extern int dup3(int, int, int);
5680 
5681 
5682 
5683 
5684 extern void endusershell(void);
5685 
5686 extern int execl(const char *, const char *, ...);
5687 extern int execle(const char *, const char *, ...);
5688 extern int execlp(const char *, const char *, ...);
5689 extern int execv(const char *, char *const *);
5690 extern int execve(const char *, char *const *, char *const *);
5691 extern int execvp(const char *, char *const *);
5692 extern void _exit(int)
5693  __attribute__((__noreturn__));
5694 /*
5695  * The following fattach prototype is duplicated in <stropts.h>. The
5696  * duplication is necessitated by XPG4.2 which requires the prototype
5697  * be defined in <stropts.h>.
5698  */
5699 
5700 extern int fattach(int, const char *);
5701 
5702 
5703 extern int fchdir(int);
5704 extern int fchown(int, uid_t, gid_t);
5705 
5706 
5707 extern int fchroot(int);
5708 
5709 
5710 
5711 extern int fdatasync(int);
5712 
5713 /*
5714  * The following fdetach prototype is duplicated in <stropts.h>. The
5715  * duplication is necessitated by XPG4.2 which requires the prototype
5716  * be defined in <stropts.h>.
5717  */
5718 
5719 extern int fdetach(const char *);
5720 
5721 extern pid_t fork(void);
5722 
5723 extern pid_t fork1(void);
5724 extern pid_t forkall(void);
5725 
5726 extern long fpathconf(int, int);
5727 
5728 
5729 extern int fsync(int);
5730 
5731 
5732 
5733 
5734 extern int ftruncate(int, off_t);
5735 
5736 extern char *getcwd(char *, size_t);
5737 
5738 
5739 extern int getdtablesize(void);
5740 
5741 extern gid_t getegid(void);
5742 extern uid_t geteuid(void);
5743 extern gid_t getgid(void);
5744 extern int getgroups(int, gid_t *);
5745 
5746 extern long gethostid(void);
5747 
5748 
5749 
5750 
5751 extern int gethostname(char *, int);
5752 
5753 
5754 
5755 
5756 
5757 
5758 
5759 # 353 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5760 #pragma redefine_extname getlogin getloginx
5761 # 353 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5762 
5763 
5764 
5765 
5766 
5767 
5768 extern char *getlogin(void);
5769 # 372 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5770 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
5771 
5772 extern int getpagesize(void);
5773 
5774 extern pid_t getpgid(pid_t);
5775 
5776 extern pid_t getpid(void);
5777 extern pid_t getppid(void);
5778 extern pid_t getpgrp(void);
5779 
5780 
5781 char *gettxt(const char *, const char *);
5782 
5783 
5784 extern pid_t getsid(pid_t);
5785 
5786 extern uid_t getuid(void);
5787 
5788 extern char *getusershell(void);
5789 
5790 /*
5791  * The following ioctl prototype is duplicated in <stropts.h>. The
5792  * duplication is necessitated by XPG4.2 which requires the prototype
5793  * be defined in <stropts.h>.
5794  */
5795 
5796 extern int ioctl(int, int, ...);
5797 extern int isaexec(const char *, char *const *, char *const *);
5798 extern int issetugid(void);
5799 
5800 extern int isatty(int);
5801 
5802 extern int lchown(const char *, uid_t, gid_t);
5803 
5804 extern int link(const char *, const char *);
5805 
5806 extern offset_t llseek(int, offset_t, int);
5807 
5808 
5809 
5810 
5811 extern int lockf(int, int, off_t);
5812 
5813 extern off_t lseek(int, off_t, int);
5814 
5815 
5816 extern int nice(int);
5817 
5818 
5819 extern int mincore(caddr_t, size_t, char *);
5820 
5821 extern long pathconf(const char *, int);
5822 extern int pause(void);
5823 extern int pipe(int *);
5824 extern int pipe2(int *, int);
5825 
5826 
5827 
5828 extern ssize_t pread(int, void *, size_t, off_t);
5829 
5830 
5831 extern void profil(unsigned short *, size_t, unsigned long, unsigned int);
5832 
5833 /*
5834  * pthread_atfork() is also declared in <pthread.h> as per SUSv3. The
5835  * declarations are identical. A change to either one may also require
5836  * appropriate namespace updates in order to avoid redeclaration
5837  * warnings in the case where both prototypes are exposed via inclusion
5838  * of both <pthread.h> and <unistd.h>.
5839  */
5840 
5841 
5842 
5843 extern int pthread_atfork(void (*) (void), void (*) (void), void (*) (void));
5844 
5845 
5846 
5847 extern int ptrace(int, pid_t, int, int);
5848 
5849 
5850 
5851 
5852 extern ssize_t pwrite(int, const void *, size_t, off_t);
5853 
5854 
5855 /* per RFC 3542; This is also defined in netdb.h */
5856 extern int rcmd_af(char **, unsigned short, const char *, const char *,
5857  const char *, int *, int);
5858 
5859 extern ssize_t read(int, void *, size_t);
5860 
5861 
5862 extern ssize_t readlink(const char *, char *,
5863  size_t);
5864 
5865 
5866 
5867 
5868 
5869 
5870 extern int rename(const char *, const char *);
5871 
5872 
5873 
5874 
5875 
5876 
5877 
5878 extern int resolvepath(const char *, char *, size_t);
5879 /* per RFC 3542; This is also defined in netdb.h */
5880 extern int rexec_af(char **, unsigned short, const char *, const char *,
5881  const char *, int *, int);
5882 
5883 extern int rmdir(const char *);
5884 
5885 /* per RFC 3542; This is also defined in netdb.h */
5886 extern int rresvport_af(int *, int);
5887 
5888 
5889 
5890 
5891 extern void *sbrk(intptr_t);
5892 
5893 
5894 extern int setegid(gid_t);
5895 extern int seteuid(uid_t);
5896 
5897 extern int setgid(gid_t);
5898 
5899 extern int setgroups(int, const gid_t *);
5900 extern int sethostname(char *, int);
5901 
5902 extern int setpgid(pid_t, pid_t);
5903 
5904 extern pid_t setpgrp(void);
5905 extern int setregid(gid_t, gid_t);
5906 extern int setreuid(uid_t, uid_t);
5907 
5908 extern pid_t setsid(void);
5909 extern int setuid(uid_t);
5910 
5911 extern void setusershell(void);
5912 
5913 extern unsigned sleep(unsigned);
5914 
5915 extern int stime(const time_t *);
5916 
5917 
5918 
5919 
5920 
5921 
5922 extern int symlink(const char *, const char *);
5923 extern void sync(void);
5924 # 534 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5925 extern long sysconf(int);
5926 extern pid_t tcgetpgrp(int);
5927 extern int tcsetpgrp(int, pid_t);
5928 
5929 
5930 
5931 extern off_t tell(int);
5932 
5933 
5934 
5935 
5936 extern int truncate(const char *, off_t);
5937 
5938 extern char *ttyname(int);
5939 
5940 extern useconds_t ualarm(useconds_t, useconds_t);
5941 
5942 extern int unlink(const char *);
5943 
5944 extern char *getwd(char *);
5945 extern int usleep(useconds_t);
5946 extern pid_t vfork(void) __attribute__((__returns_twice__));
5947 #pragma unknown_control_flow(vfork)
5948 
5949 
5950 extern void vhangup(void);
5951 
5952 extern ssize_t write(int, const void *, size_t);
5953 
5954 extern void yield(void);
5955 
5956 
5957 
5958 
5959  /* || defined(_XPG7) */
5960 extern int faccessat(int, const char *, int, int);
5961 extern int fchownat(int, const char *, uid_t, gid_t, int);
5962 extern int linkat(int, const char *, int, const char *, int);
5963 extern ssize_t readlinkat(int, const char *,
5964  char *, size_t);
5965 extern int renameat(int, const char *, int, const char *);
5966 extern int symlinkat(const char *, int, const char *);
5967 extern int unlinkat(int, const char *, int);
5968 
5969 
5970 extern int get_nprocs(void);
5971 extern int get_nprocs_conf(void);
5972 
5973 
5974 /* transitional large file interface versions */
5975 
5976 
5977 extern int ftruncate64(int, off64_t);
5978 extern off64_t lseek64(int, off64_t, int);
5979 extern ssize_t pread64(int, void *, size_t, off64_t);
5980 extern ssize_t pwrite64(int, const void *, size_t, off64_t);
5981 extern off64_t tell64(int);
5982 extern int truncate64(const char *, off64_t);
5983 extern int lockf64(int, int, off64_t);
5984 
5985 
5986 /*
5987  * getlogin_r() & ttyname_r() prototypes are defined here.
5988  */
5989 
5990 /*
5991  * Previous releases of Solaris, starting at 2.3, provided definitions of
5992  * various functions as specified in POSIX.1c, Draft 6.  For some of these
5993  * functions, the final POSIX 1003.1c standard had a different number of
5994  * arguments and return values.
5995  *
5996  * The following segment of this header provides support for the standard
5997  * interfaces while supporting applications written under earlier
5998  * releases.  The application defines appropriate values of the feature
5999  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
6000  * whether it was written to expect the Draft 6 or standard versions of
6001  * these interfaces, before including this header.  This header then
6002  * provides a mapping from the source version of the interface to an
6003  * appropriate binary interface.  Such mappings permit an application
6004  * to be built from libraries and objects which have mixed expectations
6005  * of the definitions of these functions.
6006  *
6007  * For applications using the Draft 6 definitions, the binary symbol is the
6008  * same as the source symbol, and no explicit mapping is needed.  For the
6009  * standard interface, the function func() is mapped to the binary symbol
6010  * _posix_func().  The preferred mechanism for the remapping is a compiler
6011  * #pragma.  If the compiler does not provide such a #pragma, the header file
6012  * defines a static function func() which calls the _posix_func() version;
6013  * this has to be done instead of #define since POSIX specifies that an
6014  * application can #undef the symbol and still be bound to the correct
6015  * implementation.  Unfortunately, the statics confuse lint so we fallback to
6016  * #define in that case.
6017  *
6018  * NOTE: Support for the Draft 6 definitions is provided for compatibility
6019  * only.  New applications/libraries should use the standard definitions.
6020  */
6021 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6022 
6023 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6024 #pragma redefine_extname getlogin_r getloginx_r
6025 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
6026 
6027 
6028 
6029 
6030 
6031 
6032 extern char *getlogin_r(char *, int);
6033 
6034 extern char *ttyname_r(int, char *, int);
6035 
6036 
6037 
6038 
6039 
6040 
6041 extern int getentropy(void *, size_t);
6042 # 42 "ckentry.c" 2
6043 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1
6044 /*
6045  * CDDL HEADER START
6046  *
6047  * The contents of this file are subject to the terms of the
6048  * Common Development and Distribution License (the "License").
6049  * You may not use this file except in compliance with the License.
6050  *
6051  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6052  * or http://www.opensolaris.org/os/licensing.
6053  * See the License for the specific language governing permissions
6054  * and limitations under the License.
6055  *
6056  * When distributing Covered Code, include this CDDL HEADER in each
6057  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6058  * If applicable, add the following below this CDDL HEADER, with the
6059  * fields enclosed by brackets "[]" replaced with your own identifying
6060  * information: Portions Copyright [yyyy] [name of copyright owner]
6061  *
6062  * CDDL HEADER END
6063  */
6064 
6065 /*
6066  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6067  * Copyright (c) 2013 Gary Mills
6068  *
6069  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
6070  */
6071 
6072 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
6073 
6074 /*	Copyright (c) 1988 AT&T	*/
6075 /*	  All Rights Reserved  	*/
6076 
6077 
6078 
6079 
6080 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 1
6081 /*
6082  * CDDL HEADER START
6083  *
6084  * The contents of this file are subject to the terms of the
6085  * Common Development and Distribution License, Version 1.0 only
6086  * (the "License").  You may not use this file except in compliance
6087  * with the License.
6088  *
6089  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6090  * or http://www.opensolaris.org/os/licensing.
6091  * See the License for the specific language governing permissions
6092  * and limitations under the License.
6093  *
6094  * When distributing Covered Code, include this CDDL HEADER in each
6095  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6096  * If applicable, add the following below this CDDL HEADER, with the
6097  * fields enclosed by brackets "[]" replaced with your own identifying
6098  * information: Portions Copyright [yyyy] [name of copyright owner]
6099  *
6100  * CDDL HEADER END
6101  */
6102 /*
6103  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6104  * Copyright 2014 PALO, Richard.
6105  *
6106  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
6107  * Use is subject to license terms.
6108  */
6109 
6110 /*	Copyright (c) 1988 AT&T	*/
6111 /*	  All Rights Reserved  	*/
6112 
6113 
6114 /*
6115  * An application should not include this header directly.  Instead it
6116  * should be included only through the inclusion of other Sun headers.
6117  *
6118  * The contents of this header is limited to identifiers specified in the
6119  * C Standard.  Any new identifiers specified in future amendments to the
6120  * C Standard must be placed in this header.  If these new identifiers
6121  * are required to also be in the C++ Standard "std" namespace, then for
6122  * anything other than macro definitions, corresponding "using" directives
6123  * must also be added to <locale.h>.
6124  */
6125 
6126 
6127 
6128 
6129 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6130 /*
6131  * CDDL HEADER START
6132  *
6133  * The contents of this file are subject to the terms of the
6134  * Common Development and Distribution License (the "License").
6135  * You may not use this file except in compliance with the License.
6136  *
6137  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6138  * or http://www.opensolaris.org/os/licensing.
6139  * See the License for the specific language governing permissions
6140  * and limitations under the License.
6141  *
6142  * When distributing Covered Code, include this CDDL HEADER in each
6143  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6144  * If applicable, add the following below this CDDL HEADER, with the
6145  * fields enclosed by brackets "[]" replaced with your own identifying
6146  * information: Portions Copyright [yyyy] [name of copyright owner]
6147  *
6148  * CDDL HEADER END
6149  */
6150 
6151 /*
6152  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6153  * Copyright 2016 Joyent, Inc.
6154  *
6155  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6156  * Use is subject to license terms.
6157  */
6158 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
6159 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
6160 /*
6161  * This file and its contents are supplied under the terms of the
6162  * Common Development and Distribution License ("CDDL"), version 1.0.
6163  * You may only use this file in accordance with the terms of version
6164  * 1.0 of the CDDL.
6165  *
6166  * A full copy of the text of the CDDL should have accompanied this
6167  * source.  A copy of the CDDL is also available via the Internet at
6168  * http://www.illumos.org/license/CDDL.
6169  */
6170 
6171 /*
6172  * Copyright 2014-2016 PALO, Richard.
6173  */
6174 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
6175 
6176 
6177 
6178 
6179 
6180 unsigned char __mb_cur_max(void);
6181 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
6182 typedef struct {
6183  int quot;
6184  int rem;
6185 } div_t;
6186 
6187 typedef struct {
6188  long quot;
6189  long rem;
6190 } ldiv_t;
6191 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
6192 /*
6193  * wchar_t is a built-in type in standard C++ and as such is not
6194  * defined here when using standard C++. However, the GNU compiler
6195  * fixincludes utility nonetheless creates its own version of this
6196  * header for use by gcc and g++. In that version it adds a redundant
6197  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
6198  * header we need to include the following magic comment:
6199  *
6200  * we must use the C++ compiler's type
6201  *
6202  * The above comment should not be removed or changed until GNU
6203  * gcc/fixinc/inclhack.def is updated to bypass this header.
6204  */
6205 # 120 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
6206 extern void abort(void) __attribute__((__noreturn__));
6207 extern int abs(int);
6208 extern int atexit(void (*)(void));
6209 extern double atof(const char *);
6210 extern int atoi(const char *);
6211 extern long int atol(const char *);
6212 extern void *bsearch(const void *, const void *, size_t, size_t,
6213  int (*)(const void *, const void *));
6214 
6215 
6216 
6217 
6218 
6219 
6220 extern void *calloc(size_t, size_t);
6221 extern div_t div(int, int);
6222 extern void exit(int)
6223  __attribute__((__noreturn__));
6224 extern void free(void *);
6225 extern char *getenv(const char *);
6226 extern long int labs(long);
6227 extern ldiv_t ldiv(long, long);
6228 extern void *malloc(size_t);
6229 extern int mblen(const char *, size_t);
6230 extern size_t mbstowcs(wchar_t *, const char *,
6231  size_t);
6232 extern int mbtowc(wchar_t *, const char *, size_t);
6233 extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
6234 
6235 
6236 
6237 
6238 
6239 extern int rand(void);
6240 extern void *realloc(void *, size_t);
6241 extern void srand(unsigned int);
6242 extern double strtod(const char *, char **);
6243 extern long int strtol(const char *, char **, int);
6244 extern unsigned long int strtoul(const char *,
6245  char **, int);
6246 extern int system(const char *);
6247 extern int wctomb(char *, wchar_t);
6248 extern size_t wcstombs(char *, const wchar_t *,
6249  size_t);
6250 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
6251 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 1
6252 /*
6253  * CDDL HEADER START
6254  *
6255  * The contents of this file are subject to the terms of the
6256  * Common Development and Distribution License, Version 1.0 only
6257  * (the "License").  You may not use this file except in compliance
6258  * with the License.
6259  *
6260  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6261  * or http://www.opensolaris.org/os/licensing.
6262  * See the License for the specific language governing permissions
6263  * and limitations under the License.
6264  *
6265  * When distributing Covered Code, include this CDDL HEADER in each
6266  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6267  * If applicable, add the following below this CDDL HEADER, with the
6268  * fields enclosed by brackets "[]" replaced with your own identifying
6269  * information: Portions Copyright [yyyy] [name of copyright owner]
6270  *
6271  * CDDL HEADER END
6272  */
6273 /*
6274  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6275  *
6276  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6277  * Use is subject to license terms.
6278  */
6279 
6280 /*
6281  * An application should not include this header directly.  Instead it
6282  * should be included only through the inclusion of other Sun headers.
6283  *
6284  * The contents of this header is limited to identifiers specified in
6285  * the C99 standard and in conflict with the C++ implementation of the
6286  * standard header.  The C++ standard may adopt the C99 standard at
6287  * which point it is expected that the symbols included here will
6288  * become part of the C++ std namespace.
6289  */
6290 
6291 
6292 
6293 
6294 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6295 /*
6296  * CDDL HEADER START
6297  *
6298  * The contents of this file are subject to the terms of the
6299  * Common Development and Distribution License (the "License").
6300  * You may not use this file except in compliance with the License.
6301  *
6302  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6303  * or http://www.opensolaris.org/os/licensing.
6304  * See the License for the specific language governing permissions
6305  * and limitations under the License.
6306  *
6307  * When distributing Covered Code, include this CDDL HEADER in each
6308  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6309  * If applicable, add the following below this CDDL HEADER, with the
6310  * fields enclosed by brackets "[]" replaced with your own identifying
6311  * information: Portions Copyright [yyyy] [name of copyright owner]
6312  *
6313  * CDDL HEADER END
6314  */
6315 
6316 /*
6317  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6318  * Copyright 2016 Joyent, Inc.
6319  *
6320  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6321  * Use is subject to license terms.
6322  */
6323 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 2
6324 
6325 
6326 
6327 
6328 
6329 /*
6330  * The following have been added as a result of the ISO/IEC 9899:1999
6331  * standard. For a strictly conforming C application, visibility is
6332  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
6333  * For non-strictly conforming C applications, there are no restrictions
6334  * on the C namespace.
6335  */
6336 
6337 
6338 typedef struct {
6339  long long quot;
6340  long long rem;
6341 } lldiv_t;
6342 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h"
6343 extern void _Exit(int);
6344 extern float strtof(const char *, char **);
6345 extern long double strtold(const char *, char **);
6346 
6347 
6348 extern long long atoll(const char *);
6349 extern long long llabs(long long);
6350 extern lldiv_t lldiv(long long, long long);
6351 extern long long strtoll(const char *, char **,
6352  int);
6353 extern unsigned long long strtoull(const char *,
6354  char **, int);
6355 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
6356 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 1
6357 /*
6358  * This file and its contents are supplied under the terms of the
6359  * Common Development and Distribution License ("CDDL"), version 1.0.
6360  * You may only use this file in accordance with the terms of version
6361  * 1.0 of the CDDL.
6362  *
6363  * A full copy of the text of the CDDL should have accompanied this
6364  * source.  A copy of the CDDL is also available via the Internet at
6365  * http://www.illumos.org/license/CDDL.
6366  */
6367 
6368 /*
6369  * Copyright 2016 Joyent, Inc.
6370  */
6371 
6372 /*
6373  * An application should not include this header directly.  Instead it
6374  * should be included only through the inclusion of other illumos headers.
6375  *
6376  * The contents of this header is limited to identifiers specified in
6377  * the C11 standard and in conflict with the C++ implementation of the
6378  * standard header.  The C++ standard may adopt the C11 standard at
6379  * which point it is expected that the symbols included here will
6380  * become part of the C++ std namespace.
6381  */
6382 
6383 
6384 
6385 
6386 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6387 /*
6388  * CDDL HEADER START
6389  *
6390  * The contents of this file are subject to the terms of the
6391  * Common Development and Distribution License (the "License").
6392  * You may not use this file except in compliance with the License.
6393  *
6394  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6395  * or http://www.opensolaris.org/os/licensing.
6396  * See the License for the specific language governing permissions
6397  * and limitations under the License.
6398  *
6399  * When distributing Covered Code, include this CDDL HEADER in each
6400  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6401  * If applicable, add the following below this CDDL HEADER, with the
6402  * fields enclosed by brackets "[]" replaced with your own identifying
6403  * information: Portions Copyright [yyyy] [name of copyright owner]
6404  *
6405  * CDDL HEADER END
6406  */
6407 
6408 /*
6409  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6410  * Copyright 2016 Joyent, Inc.
6411  *
6412  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6413  * Use is subject to license terms.
6414  */
6415 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 2
6416 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
6417 /*
6418  * The following have been added as a result of the ISO/IEC 9899:2011
6419  * standard. For a strictly conforming C application, visibility is
6420  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
6421  * For non-strictly conforming C applications, there are no restrictions
6422  * on the C namespace.
6423  */
6424 
6425 /*
6426  * Work around fix-includes and other bad actors with using multiple headers.
6427  */
6428 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
6429 extern void *aligned_alloc(size_t, size_t);
6430 extern int at_quick_exit(void (*)(void));
6431 extern void quick_exit(int);
6432 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
6433 
6434 
6435 
6436 
6437 
6438 /*
6439  * Allow global visibility for symbols defined in
6440  * C++ "std" namespace in <iso/stdlib_iso.h>.
6441  */
6442 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6443 /*
6444  * Allow global visibility for symbols defined in
6445  * C++ "std" namespace in <iso/stdlib_c11.h>.
6446  */
6447 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6448 /* large file compilation environment setup */
6449 
6450 
6451 
6452 
6453 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6454 #pragma redefine_extname mkstemp mkstemp64
6455 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6456 
6457 
6458 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6459 #pragma redefine_extname mkstemps mkstemps64
6460 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6461 
6462 
6463 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6464 #pragma redefine_extname mkostemp mkostemp64
6465 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6466 
6467 
6468 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6469 #pragma redefine_extname mkostemps mkostemps64
6470 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6471 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6472 /* In the LP64 compilation environment, all APIs are already large file */
6473 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6474 extern int rand_r(unsigned int *);
6475 
6476 
6477 extern void _exithandle(void);
6478 
6479 
6480 
6481 
6482 extern double drand48(void);
6483 extern double erand48(unsigned short *);
6484 extern long jrand48(unsigned short *);
6485 extern void lcong48(unsigned short *);
6486 extern long lrand48(void);
6487 extern long mrand48(void);
6488 extern long nrand48(unsigned short *);
6489 extern unsigned short *seed48(unsigned short *);
6490 extern void srand48(long);
6491 extern int putenv(char *);
6492 extern void setkey(const char *);
6493 
6494 
6495 /*
6496  * swab() has historically been in <stdlib.h> as delivered from AT&T
6497  * and continues to be visible in the default compilation environment.
6498  * As of Issue 4 of the X/Open Portability Guides, swab() was declared
6499  * in <unistd.h>. As a result, with respect to X/Open namespace the
6500  * swab() declaration in this header is only visible for the XPG3
6501  * environment.
6502  */
6503 # 182 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6504 extern void swab(const char *, char *, ssize_t);
6505 
6506 
6507 
6508 
6509 
6510 extern int mkstemp(char *);
6511 
6512 extern int mkstemps(char *, int);
6513 
6514 
6515 
6516 
6517 
6518 extern int mkstemp64(char *);
6519 
6520 extern int mkstemps64(char *, int);
6521 
6522 
6523 
6524 
6525 extern char *mkdtemp(char *);
6526 
6527 
6528 
6529 extern int mkostemp(char *, int);
6530 extern int mkostemps(char *, int, int);
6531 
6532 
6533 extern int mkostemp64(char *, int);
6534 extern int mkostemps64(char *, int, int);
6535 
6536 
6537 
6538 
6539 
6540 
6541 extern long a64l(const char *);
6542 extern char *ecvt(double, int, int *, int *);
6543 extern char *fcvt(double, int, int *, int *);
6544 extern char *gcvt(double, int, char *);
6545 extern int getsubopt(char **, char *const *, char **);
6546 extern int grantpt(int);
6547 extern char *initstate(unsigned, char *, size_t);
6548 extern char *l64a(long);
6549 extern char *mktemp(char *);
6550 extern char *ptsname(int);
6551 extern long random(void);
6552 extern char *realpath(const char *, char *);
6553 extern char *setstate(const char *);
6554 extern void srandom(unsigned);
6555 extern int unlockpt(int);
6556 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
6557 
6558 extern int ttyslot(void);
6559 extern void *valloc(size_t);
6560 
6561 
6562 
6563 
6564 
6565 
6566 extern int posix_memalign(void **, size_t, size_t);
6567 extern int posix_openpt(int);
6568 extern int setenv(const char *, const char *, int);
6569 extern int unsetenv(const char *);
6570 
6571 
6572 
6573 
6574 extern char *canonicalize_file_name(const char *);
6575 extern int clearenv(void);
6576 extern void closefrom(int);
6577 extern int daemon(int, int);
6578 extern int dup2(int, int);
6579 extern int dup3(int, int, int);
6580 extern int fdwalk(int (*)(void *, int), void *);
6581 extern char *qecvt(long double, int, int *, int *);
6582 extern char *qfcvt(long double, int, int *, int *);
6583 extern char *qgcvt(long double, int, char *);
6584 extern char *getcwd(char *, size_t);
6585 extern const char *getexecname(void);
6586 # 278 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
6587 extern int getopt(int, char *const *, const char *);
6588 extern char *optarg;
6589 extern int optind, opterr, optopt;
6590 extern char *getpass(const char *);
6591 extern char *getpassphrase(const char *);
6592 extern int getpw(uid_t, char *);
6593 extern int isatty(int);
6594 extern void *memalign(size_t, size_t);
6595 extern char *ttyname(int);
6596 extern char *mkdtemp(char *);
6597 extern const char *getprogname(void);
6598 extern void setprogname(const char *);
6599 
6600 
6601 extern char *lltostr(long long, char *);
6602 extern char *ulltostr(unsigned long long, char *);
6603 
6604 
6605 
6606 
6607 /* OpenBSD compatibility functions */
6608 
6609 
6610 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 1
6611 /*
6612  * CDDL HEADER START
6613  *
6614  * The contents of this file are subject to the terms of the
6615  * Common Development and Distribution License, Version 1.0 only
6616  * (the "License").  You may not use this file except in compliance
6617  * with the License.
6618  *
6619  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6620  * or http://www.opensolaris.org/os/licensing.
6621  * See the License for the specific language governing permissions
6622  * and limitations under the License.
6623  *
6624  * When distributing Covered Code, include this CDDL HEADER in each
6625  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6626  * If applicable, add the following below this CDDL HEADER, with the
6627  * fields enclosed by brackets "[]" replaced with your own identifying
6628  * information: Portions Copyright [yyyy] [name of copyright owner]
6629  *
6630  * CDDL HEADER END
6631  */
6632 /*
6633  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6634  *
6635  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
6636  * Use is subject to license terms.
6637  */
6638 
6639 
6640 
6641 
6642 /*
6643  * This file, <inttypes.h>, is specified by the ISO C standard,
6644  * standard, ISO/IEC 9899:1999 Programming language - C and is
6645  * also defined by SUSv3.
6646  *
6647  * ISO	  International Organization for Standardization.
6648  * SUSv3  Single Unix Specification, Version 3
6649  */
6650 
6651 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6652 /*
6653  * CDDL HEADER START
6654  *
6655  * The contents of this file are subject to the terms of the
6656  * Common Development and Distribution License (the "License").
6657  * You may not use this file except in compliance with the License.
6658  *
6659  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6660  * or http://www.opensolaris.org/os/licensing.
6661  * See the License for the specific language governing permissions
6662  * and limitations under the License.
6663  *
6664  * When distributing Covered Code, include this CDDL HEADER in each
6665  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6666  * If applicable, add the following below this CDDL HEADER, with the
6667  * fields enclosed by brackets "[]" replaced with your own identifying
6668  * information: Portions Copyright [yyyy] [name of copyright owner]
6669  *
6670  * CDDL HEADER END
6671  */
6672 
6673 /*
6674  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6675  * Copyright 2016 Joyent, Inc.
6676  *
6677  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6678  * Use is subject to license terms.
6679  */
6680 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
6681 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 1
6682 /*
6683  * CDDL HEADER START
6684  *
6685  * The contents of this file are subject to the terms of the
6686  * Common Development and Distribution License, Version 1.0 only
6687  * (the "License").  You may not use this file except in compliance
6688  * with the License.
6689  *
6690  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6691  * or http://www.opensolaris.org/os/licensing.
6692  * See the License for the specific language governing permissions
6693  * and limitations under the License.
6694  *
6695  * When distributing Covered Code, include this CDDL HEADER in each
6696  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6697  * If applicable, add the following below this CDDL HEADER, with the
6698  * fields enclosed by brackets "[]" replaced with your own identifying
6699  * information: Portions Copyright [yyyy] [name of copyright owner]
6700  *
6701  * CDDL HEADER END
6702  */
6703 /*
6704  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
6705  * Use is subject to license terms.
6706  */
6707 
6708 
6709 
6710 
6711 #pragma ident "%Z%%M%	%I%	%E% SMI"
6712 
6713 /*
6714  * This header, <sys/inttypes.h>, contains (through nested inclusion) the
6715  * vast majority of the facilities specified for <inttypes.h> as defined
6716  * by the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
6717  *
6718  * Kernel/Driver developers are encouraged to include this file to access
6719  * the fixed size types, limits and utility macros. Application developers
6720  * should use the standard defined header <inttypes.h>.
6721  */
6722 
6723 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6724 /*
6725  * CDDL HEADER START
6726  *
6727  * The contents of this file are subject to the terms of the
6728  * Common Development and Distribution License (the "License").
6729  * You may not use this file except in compliance with the License.
6730  *
6731  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6732  * or http://www.opensolaris.org/os/licensing.
6733  * See the License for the specific language governing permissions
6734  * and limitations under the License.
6735  *
6736  * When distributing Covered Code, include this CDDL HEADER in each
6737  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6738  * If applicable, add the following below this CDDL HEADER, with the
6739  * fields enclosed by brackets "[]" replaced with your own identifying
6740  * information: Portions Copyright [yyyy] [name of copyright owner]
6741  *
6742  * CDDL HEADER END
6743  */
6744 
6745 /*
6746  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6747  * Copyright 2016 Joyent, Inc.
6748  *
6749  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6750  * Use is subject to license terms.
6751  */
6752 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6753 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
6754 /*
6755  * CDDL HEADER START
6756  *
6757  * The contents of this file are subject to the terms of the
6758  * Common Development and Distribution License, Version 1.0 only
6759  * (the "License").  You may not use this file except in compliance
6760  * with the License.
6761  *
6762  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6763  * or http://www.opensolaris.org/os/licensing.
6764  * See the License for the specific language governing permissions
6765  * and limitations under the License.
6766  *
6767  * When distributing Covered Code, include this CDDL HEADER in each
6768  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6769  * If applicable, add the following below this CDDL HEADER, with the
6770  * fields enclosed by brackets "[]" replaced with your own identifying
6771  * information: Portions Copyright [yyyy] [name of copyright owner]
6772  *
6773  * CDDL HEADER END
6774  */
6775 /*
6776  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6777  *
6778  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6779  * Use is subject to license terms.
6780  */
6781 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6782 
6783 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
6784 /*
6785  * CDDL HEADER START
6786  *
6787  * The contents of this file are subject to the terms of the
6788  * Common Development and Distribution License, Version 1.0 only
6789  * (the "License").  You may not use this file except in compliance
6790  * with the License.
6791  *
6792  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6793  * or http://www.opensolaris.org/os/licensing.
6794  * See the License for the specific language governing permissions
6795  * and limitations under the License.
6796  *
6797  * When distributing Covered Code, include this CDDL HEADER in each
6798  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6799  * If applicable, add the following below this CDDL HEADER, with the
6800  * fields enclosed by brackets "[]" replaced with your own identifying
6801  * information: Portions Copyright [yyyy] [name of copyright owner]
6802  *
6803  * CDDL HEADER END
6804  */
6805 /*
6806  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6807  *
6808  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6809  * Use is subject to license terms.
6810  */
6811 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6812 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
6813 /*
6814  * CDDL HEADER START
6815  *
6816  * The contents of this file are subject to the terms of the
6817  * Common Development and Distribution License, Version 1.0 only
6818  * (the "License").  You may not use this file except in compliance
6819  * with the License.
6820  *
6821  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6822  * or http://www.opensolaris.org/os/licensing.
6823  * See the License for the specific language governing permissions
6824  * and limitations under the License.
6825  *
6826  * When distributing Covered Code, include this CDDL HEADER in each
6827  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6828  * If applicable, add the following below this CDDL HEADER, with the
6829  * fields enclosed by brackets "[]" replaced with your own identifying
6830  * information: Portions Copyright [yyyy] [name of copyright owner]
6831  *
6832  * CDDL HEADER END
6833  */
6834 /*
6835  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6836  *
6837  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6838  * Use is subject to license terms.
6839  */
6840 
6841 
6842 
6843 
6844 /*
6845  * This file, <sys/int_const.h>, is part of the Sun Microsystems implementation
6846  * of <inttypes.h> as proposed in the ISO/JTC1/SC22/WG14 C committee's working
6847  * draft for the revision of the current ISO C standard, ISO/IEC 9899:1990
6848  * Programming language - C.
6849  *
6850  * Programs/Modules should not directly include this file.  Access to the
6851  * types defined in this file should be through the inclusion of one of the
6852  * following files:
6853  *
6854  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
6855  *				components of <inttypes.h>.
6856  *
6857  *	<inttypes.h>		For use by applications.
6858  *
6859  * See these files for more details.
6860  *
6861  * Use at your own risk.  This file will track the evolution of the revision
6862  * of the current ISO C standard.  As of February 1996, the committee is
6863  * squarely behind the fixed sized types.
6864  */
6865 
6866 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6867 /*
6868  * CDDL HEADER START
6869  *
6870  * The contents of this file are subject to the terms of the
6871  * Common Development and Distribution License (the "License").
6872  * You may not use this file except in compliance with the License.
6873  *
6874  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6875  * or http://www.opensolaris.org/os/licensing.
6876  * See the License for the specific language governing permissions
6877  * and limitations under the License.
6878  *
6879  * When distributing Covered Code, include this CDDL HEADER in each
6880  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6881  * If applicable, add the following below this CDDL HEADER, with the
6882  * fields enclosed by brackets "[]" replaced with your own identifying
6883  * information: Portions Copyright [yyyy] [name of copyright owner]
6884  *
6885  * CDDL HEADER END
6886  */
6887 
6888 /*
6889  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6890  * Copyright 2016 Joyent, Inc.
6891  *
6892  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6893  * Use is subject to license terms.
6894  */
6895 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 2
6896 
6897 
6898 
6899 
6900 
6901 /*
6902  * Constants
6903  *
6904  * The following macros create constants of the types defined in
6905  * <sys/int_types.h>. The intent is that:
6906  *	Constants defined using these macros have a specific size and
6907  *	signedness. The suffix used for int64_t and uint64_t (ll and ull)
6908  *	are for examples only. Implementations are permitted to use other
6909  *	suffixes.
6910  *
6911  * The "CSTYLED" comments are flags to an internal code style analysis tool
6912  * telling it to silently accept the line which follows.  This internal
6913  * standard requires a space between arguments, but the historical,
6914  * non-ANSI-C ``method'' of concatenation can't tolerate those spaces.
6915  */
6916 /* CSTYLED */
6917 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
6918 /* CSTYLED */
6919 
6920 
6921 
6922 
6923 /* CSTYLED */
6924 
6925 /* CSTYLED */
6926 
6927 /* CSTYLED */
6928 
6929 
6930 
6931 
6932 
6933 
6934 /* CSTYLED */
6935 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
6936 /* CSTYLED */
6937 
6938 /* CSTYLED */
6939 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
6940 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 1
6941 /*
6942  * CDDL HEADER START
6943  *
6944  * The contents of this file are subject to the terms of the
6945  * Common Development and Distribution License, Version 1.0 only
6946  * (the "License").  You may not use this file except in compliance
6947  * with the License.
6948  *
6949  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6950  * or http://www.opensolaris.org/os/licensing.
6951  * See the License for the specific language governing permissions
6952  * and limitations under the License.
6953  *
6954  * When distributing Covered Code, include this CDDL HEADER in each
6955  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6956  * If applicable, add the following below this CDDL HEADER, with the
6957  * fields enclosed by brackets "[]" replaced with your own identifying
6958  * information: Portions Copyright [yyyy] [name of copyright owner]
6959  *
6960  * CDDL HEADER END
6961  */
6962 /*
6963  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6964  *
6965  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6966  * Use is subject to license terms.
6967  */
6968 
6969 
6970 
6971 
6972 /*
6973  * This file, <sys/int_fmtio.h>, is part of the Sun Microsystems implementation
6974  * of <inttypes.h> as defined by the ISO C Standard, ISO/IEC 9899:1999
6975  * Programming language - C.
6976  *
6977  * ISO  International Organization for Standardization.
6978  *
6979  * Programs/Modules should not directly include this file.  Access to the
6980  * types defined in this file should be through the inclusion of one of the
6981  * following files:
6982  *
6983  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
6984  *				components of <inttypes.h>.
6985  *
6986  *	<inttypes.h>		For use by applications.
6987  *
6988  * See these files for more details.
6989  */
6990 
6991 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6992 /*
6993  * CDDL HEADER START
6994  *
6995  * The contents of this file are subject to the terms of the
6996  * Common Development and Distribution License (the "License").
6997  * You may not use this file except in compliance with the License.
6998  *
6999  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7000  * or http://www.opensolaris.org/os/licensing.
7001  * See the License for the specific language governing permissions
7002  * and limitations under the License.
7003  *
7004  * When distributing Covered Code, include this CDDL HEADER in each
7005  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7006  * If applicable, add the following below this CDDL HEADER, with the
7007  * fields enclosed by brackets "[]" replaced with your own identifying
7008  * information: Portions Copyright [yyyy] [name of copyright owner]
7009  *
7010  * CDDL HEADER END
7011  */
7012 
7013 /*
7014  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7015  * Copyright 2016 Joyent, Inc.
7016  *
7017  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7018  * Use is subject to license terms.
7019  */
7020 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 2
7021 
7022 
7023 
7024 
7025 
7026 /*
7027  * Formatted I/O
7028  *
7029  * The following macros can be used even when an implementation has not
7030  * extended the printf/scanf family of functions.
7031  *
7032  * The form of the names of the macros is either "PRI" for printf specifiers
7033  * or "SCN" for scanf specifiers, followed by the conversion specifier letter
7034  * followed by the datatype size. For example, PRId32 is the macro for
7035  * the printf d conversion specifier with the flags for 32 bit datatype.
7036  *
7037  * An example using one of these macros:
7038  *
7039  *	uint64_t u;
7040  *	printf("u = %016" PRIx64 "\n", u);
7041  *
7042  * For the purpose of example, the definitions of the printf/scanf macros
7043  * below have the values appropriate for a machine with 8 bit shorts, 16
7044  * bit shorts, 32 bit ints, 32 or 64 bit longs depending on compilation
7045  * mode, and 64 bit long longs.
7046  */
7047 
7048 /*
7049  * fprintf macros for signed integers
7050  */
7051 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
7052 /*
7053  * fprintf macros for unsigned integers
7054  */
7055 # 227 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
7056 /*
7057  * fprintf macros for pointers
7058  */
7059 # 247 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
7060 /*
7061  * fscanf macros for signed integers
7062  */
7063 # 282 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
7064 /*
7065  * fscanf macros for unsigned integers
7066  */
7067 # 349 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
7068 /*
7069  * The following macros define I/O formats for intmax_t and uintmax_t.
7070  */
7071 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
7072 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
7073 
7074 
7075 
7076 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 1
7077 /*
7078  * CDDL HEADER START
7079  *
7080  * The contents of this file are subject to the terms of the
7081  * Common Development and Distribution License, Version 1.0 only
7082  * (the "License").  You may not use this file except in compliance
7083  * with the License.
7084  *
7085  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7086  * or http://www.opensolaris.org/os/licensing.
7087  * See the License for the specific language governing permissions
7088  * and limitations under the License.
7089  *
7090  * When distributing Covered Code, include this CDDL HEADER in each
7091  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7092  * If applicable, add the following below this CDDL HEADER, with the
7093  * fields enclosed by brackets "[]" replaced with your own identifying
7094  * information: Portions Copyright [yyyy] [name of copyright owner]
7095  *
7096  * CDDL HEADER END
7097  */
7098 /*
7099  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
7100  * Use is subject to license terms.
7101  */
7102 
7103 
7104 
7105 
7106 #pragma ident "%Z%%M%	%I%	%E% SMI"
7107 
7108 /*
7109  * This header is included by <stdint.h> which was introduced by
7110  * the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
7111  * The header is a subset of the <inttypes.h> header.
7112  */
7113 
7114 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
7115 /*
7116  * CDDL HEADER START
7117  *
7118  * The contents of this file are subject to the terms of the
7119  * Common Development and Distribution License, Version 1.0 only
7120  * (the "License").  You may not use this file except in compliance
7121  * with the License.
7122  *
7123  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7124  * or http://www.opensolaris.org/os/licensing.
7125  * See the License for the specific language governing permissions
7126  * and limitations under the License.
7127  *
7128  * When distributing Covered Code, include this CDDL HEADER in each
7129  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7130  * If applicable, add the following below this CDDL HEADER, with the
7131  * fields enclosed by brackets "[]" replaced with your own identifying
7132  * information: Portions Copyright [yyyy] [name of copyright owner]
7133  *
7134  * CDDL HEADER END
7135  */
7136 /*
7137  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7138  *
7139  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7140  * Use is subject to license terms.
7141  */
7142 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
7143 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
7144 /*
7145  * CDDL HEADER START
7146  *
7147  * The contents of this file are subject to the terms of the
7148  * Common Development and Distribution License, Version 1.0 only
7149  * (the "License").  You may not use this file except in compliance
7150  * with the License.
7151  *
7152  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7153  * or http://www.opensolaris.org/os/licensing.
7154  * See the License for the specific language governing permissions
7155  * and limitations under the License.
7156  *
7157  * When distributing Covered Code, include this CDDL HEADER in each
7158  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7159  * If applicable, add the following below this CDDL HEADER, with the
7160  * fields enclosed by brackets "[]" replaced with your own identifying
7161  * information: Portions Copyright [yyyy] [name of copyright owner]
7162  *
7163  * CDDL HEADER END
7164  */
7165 /*
7166  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7167  *
7168  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7169  * Use is subject to license terms.
7170  */
7171 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
7172 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
7173 /*
7174  * CDDL HEADER START
7175  *
7176  * The contents of this file are subject to the terms of the
7177  * Common Development and Distribution License, Version 1.0 only
7178  * (the "License").  You may not use this file except in compliance
7179  * with the License.
7180  *
7181  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7182  * or http://www.opensolaris.org/os/licensing.
7183  * See the License for the specific language governing permissions
7184  * and limitations under the License.
7185  *
7186  * When distributing Covered Code, include this CDDL HEADER in each
7187  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7188  * If applicable, add the following below this CDDL HEADER, with the
7189  * fields enclosed by brackets "[]" replaced with your own identifying
7190  * information: Portions Copyright [yyyy] [name of copyright owner]
7191  *
7192  * CDDL HEADER END
7193  */
7194 /*
7195  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7196  *
7197  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7198  * Use is subject to license terms.
7199  */
7200 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
7201 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
7202 
7203 
7204 
7205 
7206 
7207 
7208 /* Inclusion of <stddef.h> breaks namespace, therefore define wchar_t */
7209 
7210 /*
7211  * wchar_t is a built-in type in standard C++ and as such is not
7212  * defined here when using standard C++. However, the GNU compiler
7213  * fixincludes utility nonetheless creates its own version of this
7214  * header for use by gcc and g++. In that version it adds a redundant
7215  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
7216  * header we need to include the following magic comment:
7217  *
7218  * we must use the C++ compiler's type
7219  *
7220  * The above comment should not be removed or changed until GNU
7221  * gcc/fixinc/inclhack.def is updated to bypass this header.
7222  */
7223 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
7224 typedef struct {
7225  intmax_t quot;
7226  intmax_t rem;
7227 } imaxdiv_t;
7228 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
7229 extern intmax_t imaxabs(intmax_t);
7230 extern imaxdiv_t imaxdiv(intmax_t, intmax_t);
7231 extern intmax_t strtoimax(const char *, char **,
7232  int);
7233 extern uintmax_t strtoumax(const char *, char **,
7234  int);
7235 extern intmax_t wcstoimax(const wchar_t *,
7236  wchar_t **, int);
7237 extern uintmax_t wcstoumax(const wchar_t *,
7238  wchar_t **, int);
7239 # 302 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
7240 extern uint32_t arc4random(void);
7241 extern void arc4random_buf(void *, size_t);
7242 extern uint32_t arc4random_uniform(uint32_t);
7243 extern void freezero(void *, size_t);
7244 extern void *recallocarray(void *, size_t, size_t, size_t);
7245 # 43 "ckentry.c" 2
7246 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
7247 /*
7248  * CDDL HEADER START
7249  *
7250  * The contents of this file are subject to the terms of the
7251  * Common Development and Distribution License (the "License").
7252  * You may not use this file except in compliance with the License.
7253  *
7254  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7255  * or http://www.opensolaris.org/os/licensing.
7256  * See the License for the specific language governing permissions
7257  * and limitations under the License.
7258  *
7259  * When distributing Covered Code, include this CDDL HEADER in each
7260  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7261  * If applicable, add the following below this CDDL HEADER, with the
7262  * fields enclosed by brackets "[]" replaced with your own identifying
7263  * information: Portions Copyright [yyyy] [name of copyright owner]
7264  *
7265  * CDDL HEADER END
7266  */
7267 
7268 /*
7269  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7270  * Use is subject to license terms.
7271  */
7272 
7273 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
7274 /* All Rights Reserved */
7275 # 38 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
7276 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7277 /*
7278  * CDDL HEADER START
7279  *
7280  * The contents of this file are subject to the terms of the
7281  * Common Development and Distribution License (the "License").
7282  * You may not use this file except in compliance with the License.
7283  *
7284  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7285  * or http://www.opensolaris.org/os/licensing.
7286  * See the License for the specific language governing permissions
7287  * and limitations under the License.
7288  *
7289  * When distributing Covered Code, include this CDDL HEADER in each
7290  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7291  * If applicable, add the following below this CDDL HEADER, with the
7292  * fields enclosed by brackets "[]" replaced with your own identifying
7293  * information: Portions Copyright [yyyy] [name of copyright owner]
7294  *
7295  * CDDL HEADER END
7296  */
7297 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7298 /*	  All Rights Reserved  	*/
7299 
7300 
7301 /*
7302  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7303  * Use is subject to license terms.
7304  *
7305  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7306  * Copyright 2016 Joyent, Inc.
7307  */
7308 # 39 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7309 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
7310 /*
7311  * CDDL HEADER START
7312  *
7313  * The contents of this file are subject to the terms of the
7314  * Common Development and Distribution License (the "License").
7315  * You may not use this file except in compliance with the License.
7316  *
7317  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7318  * or http://www.opensolaris.org/os/licensing.
7319  * See the License for the specific language governing permissions
7320  * and limitations under the License.
7321  *
7322  * When distributing Covered Code, include this CDDL HEADER in each
7323  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7324  * If applicable, add the following below this CDDL HEADER, with the
7325  * fields enclosed by brackets "[]" replaced with your own identifying
7326  * information: Portions Copyright [yyyy] [name of copyright owner]
7327  *
7328  * CDDL HEADER END
7329  */
7330 
7331 /*
7332  * Copyright (c) 2013 Gary Mills
7333  *
7334  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
7335  * Use is subject to license terms.
7336  */
7337 
7338 /*	Copyright (c) 1988 AT&T	*/
7339 /*	  All Rights Reserved  	*/
7340 # 40 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7341 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
7342 /*
7343  * CDDL HEADER START
7344  *
7345  * The contents of this file are subject to the terms of the
7346  * Common Development and Distribution License (the "License").
7347  * You may not use this file except in compliance with the License.
7348  *
7349  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7350  * or http://www.opensolaris.org/os/licensing.
7351  * See the License for the specific language governing permissions
7352  * and limitations under the License.
7353  *
7354  * When distributing Covered Code, include this CDDL HEADER in each
7355  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7356  * If applicable, add the following below this CDDL HEADER, with the
7357  * fields enclosed by brackets "[]" replaced with your own identifying
7358  * information: Portions Copyright [yyyy] [name of copyright owner]
7359  *
7360  * CDDL HEADER END
7361  */
7362 
7363 /*
7364  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7365  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
7366  */
7367 
7368 /*	Copyright (c) 1988 AT&T	*/
7369 /*	  All Rights Reserved  	*/
7370 
7371 /*
7372  * User-visible pieces of the ANSI C standard I/O package.
7373  */
7374 # 41 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7375 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 1
7376 /*
7377  * CDDL HEADER START
7378  *
7379  * The contents of this file are subject to the terms of the
7380  * Common Development and Distribution License, Version 1.0 only
7381  * (the "License").  You may not use this file except in compliance
7382  * with the License.
7383  *
7384  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7385  * or http://www.opensolaris.org/os/licensing.
7386  * See the License for the specific language governing permissions
7387  * and limitations under the License.
7388  *
7389  * When distributing Covered Code, include this CDDL HEADER in each
7390  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7391  * If applicable, add the following below this CDDL HEADER, with the
7392  * fields enclosed by brackets "[]" replaced with your own identifying
7393  * information: Portions Copyright [yyyy] [name of copyright owner]
7394  *
7395  * CDDL HEADER END
7396  */
7397 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7398 /*	  All Rights Reserved  	*/
7399 
7400 
7401 
7402 
7403 
7404 #pragma ident "%Z%%M%	%I%	%E% SMI"
7405 
7406 
7407 
7408 
7409 
7410 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
7411 /*
7412  * CDDL HEADER START
7413  *
7414  * The contents of this file are subject to the terms of the
7415  * Common Development and Distribution License (the "License").
7416  * You may not use this file except in compliance with the License.
7417  *
7418  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7419  * or http://www.opensolaris.org/os/licensing.
7420  * See the License for the specific language governing permissions
7421  * and limitations under the License.
7422  *
7423  * When distributing Covered Code, include this CDDL HEADER in each
7424  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7425  * If applicable, add the following below this CDDL HEADER, with the
7426  * fields enclosed by brackets "[]" replaced with your own identifying
7427  * information: Portions Copyright [yyyy] [name of copyright owner]
7428  *
7429  * CDDL HEADER END
7430  */
7431 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7432 /*	  All Rights Reserved  	*/
7433 
7434 
7435 /*
7436  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
7437  * Use is subject to license terms.
7438  *
7439  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
7440  * Copyright 2016 Joyent, Inc.
7441  */
7442 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 2
7443 
7444 struct pkgdev {
7445  int rdonly;
7446  int mntflg;
7447  longlong_t capacity; /* number of 512-blocks on device */
7448  char *name;
7449  char *dirname;
7450  char *pathname;
7451  char *mount;
7452  char *fstyp;
7453  char *cdevice;
7454  char *bdevice;
7455  char *norewind;
7456 };
7457 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7458 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
7459 /*
7460  * CDDL HEADER START
7461  *
7462  * The contents of this file are subject to the terms of the
7463  * Common Development and Distribution License (the "License").
7464  * You may not use this file except in compliance with the License.
7465  *
7466  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7467  * or http://www.opensolaris.org/os/licensing.
7468  * See the License for the specific language governing permissions
7469  * and limitations under the License.
7470  *
7471  * When distributing Covered Code, include this CDDL HEADER in each
7472  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7473  * If applicable, add the following below this CDDL HEADER, with the
7474  * fields enclosed by brackets "[]" replaced with your own identifying
7475  * information: Portions Copyright [yyyy] [name of copyright owner]
7476  *
7477  * CDDL HEADER END
7478  */
7479 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7480 /*	  All Rights Reserved  	*/
7481 
7482 /*
7483  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
7484  * Use is subject to license terms.
7485  */
7486 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7487 # 1 "/usr/include/openssl/bio.h" 1 3 4
7488 /* crypto/bio/bio.h */
7489 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
7490  * All rights reserved.
7491  *
7492  * This package is an SSL implementation written
7493  * by Eric Young (eay@cryptsoft.com).
7494  * The implementation was written so as to conform with Netscapes SSL.
7495  *
7496  * This library is free for commercial and non-commercial use as long as
7497  * the following conditions are aheared to.  The following conditions
7498  * apply to all code found in this distribution, be it the RC4, RSA,
7499  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
7500  * included with this distribution is covered by the same copyright terms
7501  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
7502  *
7503  * Copyright remains Eric Young's, and as such any Copyright notices in
7504  * the code are not to be removed.
7505  * If this package is used in a product, Eric Young should be given attribution
7506  * as the author of the parts of the library used.
7507  * This can be in the form of a textual message at program startup or
7508  * in documentation (online or textual) provided with the package.
7509  *
7510  * Redistribution and use in source and binary forms, with or without
7511  * modification, are permitted provided that the following conditions
7512  * are met:
7513  * 1. Redistributions of source code must retain the copyright
7514  *    notice, this list of conditions and the following disclaimer.
7515  * 2. Redistributions in binary form must reproduce the above copyright
7516  *    notice, this list of conditions and the following disclaimer in the
7517  *    documentation and/or other materials provided with the distribution.
7518  * 3. All advertising materials mentioning features or use of this software
7519  *    must display the following acknowledgement:
7520  *    "This product includes cryptographic software written by
7521  *     Eric Young (eay@cryptsoft.com)"
7522  *    The word 'cryptographic' can be left out if the rouines from the library
7523  *    being used are not cryptographic related :-).
7524  * 4. If you include any Windows specific code (or a derivative thereof) from
7525  *    the apps directory (application code) you must include an acknowledgement:
7526  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
7527  *
7528  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
7529  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7530  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7531  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
7532  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7533  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7534  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7535  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7536  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7537  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7538  * SUCH DAMAGE.
7539  *
7540  * The licence and distribution terms for any publically available version or
7541  * derivative of this code cannot be changed.  i.e. this code cannot simply be
7542  * copied and put under another distribution licence
7543  * [including the GNU Public Licence.]
7544  */
7545 
7546 
7547 
7548 
7549 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
7550 /* e_os2.h */
7551 /* ====================================================================
7552  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
7553  *
7554  * Redistribution and use in source and binary forms, with or without
7555  * modification, are permitted provided that the following conditions
7556  * are met:
7557  *
7558  * 1. Redistributions of source code must retain the above copyright
7559  *    notice, this list of conditions and the following disclaimer.
7560  *
7561  * 2. Redistributions in binary form must reproduce the above copyright
7562  *    notice, this list of conditions and the following disclaimer in
7563  *    the documentation and/or other materials provided with the
7564  *    distribution.
7565  *
7566  * 3. All advertising materials mentioning features or use of this
7567  *    software must display the following acknowledgment:
7568  *    "This product includes software developed by the OpenSSL Project
7569  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
7570  *
7571  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
7572  *    endorse or promote products derived from this software without
7573  *    prior written permission. For written permission, please contact
7574  *    openssl-core@openssl.org.
7575  *
7576  * 5. Products derived from this software may not be called "OpenSSL"
7577  *    nor may "OpenSSL" appear in their names without prior written
7578  *    permission of the OpenSSL Project.
7579  *
7580  * 6. Redistributions of any form whatsoever must retain the following
7581  *    acknowledgment:
7582  *    "This product includes software developed by the OpenSSL Project
7583  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
7584  *
7585  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
7586  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7587  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
7588  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
7589  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7590  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
7591  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
7592  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7593  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
7594  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
7595  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
7596  * OF THE POSSIBILITY OF SUCH DAMAGE.
7597  * ====================================================================
7598  *
7599  * This product includes cryptographic software written by Eric Young
7600  * (eay@cryptsoft.com).  This product includes software written by Tim
7601  * Hudson (tjh@cryptsoft.com).
7602  *
7603  */
7604 
7605 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
7606 /* opensslconf.h */
7607 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
7608 
7609 
7610 
7611 
7612 /* OpenSSL was configured with the following options: */
7613 # 108 "/usr/include/openssl/opensslconf.h" 3 4
7614 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
7615    asks for it.  This is a transient feature that is provided for those
7616    who haven't had the time to do the appropriate changes in their
7617    applications.  */
7618 # 204 "/usr/include/openssl/opensslconf.h" 3 4
7619 /* crypto/opensslconf.h.in */
7620 
7621 /* Generate 80386 code? */
7622 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
7623 # 65 "/usr/include/openssl/e_os2.h" 3 4
7624 /******************************************************************************
7625  * Detect operating systems.  This probably needs completing.
7626  * The result is that at least one OPENSSL_SYS_os macro should be defined.
7627  * However, if none is defined, Unix is assumed.
7628  **/
7629 
7630 
7631 
7632 /* ---------------------- Macintosh, before MacOS X ----------------------- */
7633 
7634 
7635 
7636 
7637 
7638 /* ---------------------- NetWare ----------------------------------------- */
7639 
7640 
7641 
7642 
7643 
7644 /* --------------------- Microsoft operating systems ---------------------- */
7645 
7646 /*
7647  * Note that MSDOS actually denotes 32-bit environments running on top of
7648  * MS-DOS, such as DJGPP one.
7649  */
7650 
7651 
7652 
7653 
7654 
7655 /*
7656  * For 32 bit environment, there seems to be the CygWin environment and then
7657  * all the others that try to do the same thing Microsoft does...
7658  */
7659 # 129 "/usr/include/openssl/e_os2.h" 3 4
7660 /* Anything that tries to look like Microsoft is "Windows" */
7661 # 138 "/usr/include/openssl/e_os2.h" 3 4
7662 /*
7663  * DLL settings.  This part is a bit tough, because it's up to the
7664  * application implementor how he or she will link the application, so it
7665  * requires some macro to be used.
7666  */
7667 # 152 "/usr/include/openssl/e_os2.h" 3 4
7668 /* ------------------------------- OpenVMS -------------------------------- */
7669 # 166 "/usr/include/openssl/e_os2.h" 3 4
7670 /* -------------------------------- OS/2 ---------------------------------- */
7671 
7672 
7673 
7674 
7675 
7676 /* -------------------------------- Unix ---------------------------------- */
7677 # 207 "/usr/include/openssl/e_os2.h" 3 4
7678 /* -------------------------------- VOS ----------------------------------- */
7679 # 218 "/usr/include/openssl/e_os2.h" 3 4
7680 /* ------------------------------ VxWorks --------------------------------- */
7681 
7682 
7683 
7684 
7685 /* -------------------------------- BeOS ---------------------------------- */
7686 # 234 "/usr/include/openssl/e_os2.h" 3 4
7687 /**
7688  * That's it for OS-specific stuff
7689  *****************************************************************************/
7690 
7691 /* Specials for I/O an exit */
7692 # 247 "/usr/include/openssl/e_os2.h" 3 4
7693 /*-
7694  * Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare
7695  * certain global symbols that, with some compilers under VMS, have to be
7696  * defined and declared explicitely with globaldef and globalref.
7697  * Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare
7698  * DLL exports and imports for compilers under Win32.  These are a little
7699  * more complicated to use.  Basically, for any library that exports some
7700  * global variables, the following code must be present in the header file
7701  * that declares them, before OPENSSL_EXTERN is used:
7702  *
7703  * #ifdef SOME_BUILD_FLAG_MACRO
7704  * # undef OPENSSL_EXTERN
7705  * # define OPENSSL_EXTERN OPENSSL_EXPORT
7706  * #endif
7707  *
7708  * The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL
7709  * have some generally sensible values, and for OPENSSL_EXTERN to have the
7710  * value OPENSSL_IMPORT.
7711  */
7712 # 282 "/usr/include/openssl/e_os2.h" 3 4
7713 /*-
7714  * Macros to allow global variables to be reached through function calls when
7715  * required (if a shared library version requires it, for example.
7716  * The way it's done allows definitions like this:
7717  *
7718  *      // in foobar.c
7719  *      OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
7720  *      // in foobar.h
7721  *      OPENSSL_DECLARE_GLOBAL(int,foobar);
7722  *      #define foobar OPENSSL_GLOBAL_REF(foobar)
7723  */
7724 # 63 "/usr/include/openssl/bio.h" 2 3 4
7725 
7726 
7727 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
7728 /*
7729  * CDDL HEADER START
7730  *
7731  * The contents of this file are subject to the terms of the
7732  * Common Development and Distribution License (the "License").
7733  * You may not use this file except in compliance with the License.
7734  *
7735  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7736  * or http://www.opensolaris.org/os/licensing.
7737  * See the License for the specific language governing permissions
7738  * and limitations under the License.
7739  *
7740  * When distributing Covered Code, include this CDDL HEADER in each
7741  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7742  * If applicable, add the following below this CDDL HEADER, with the
7743  * fields enclosed by brackets "[]" replaced with your own identifying
7744  * information: Portions Copyright [yyyy] [name of copyright owner]
7745  *
7746  * CDDL HEADER END
7747  */
7748 
7749 /*
7750  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7751  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
7752  */
7753 
7754 /*	Copyright (c) 1988 AT&T	*/
7755 /*	  All Rights Reserved  	*/
7756 
7757 /*
7758  * User-visible pieces of the ANSI C standard I/O package.
7759  */
7760 # 66 "/usr/include/openssl/bio.h" 2 3 4
7761 
7762 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1 3 4
7763 /*
7764  * CDDL HEADER START
7765  *
7766  * The contents of this file are subject to the terms of the
7767  * Common Development and Distribution License, Version 1.0 only
7768  * (the "License").  You may not use this file except in compliance
7769  * with the License.
7770  *
7771  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7772  * or http://www.opensolaris.org/os/licensing.
7773  * See the License for the specific language governing permissions
7774  * and limitations under the License.
7775  *
7776  * When distributing Covered Code, include this CDDL HEADER in each
7777  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7778  * If applicable, add the following below this CDDL HEADER, with the
7779  * fields enclosed by brackets "[]" replaced with your own identifying
7780  * information: Portions Copyright [yyyy] [name of copyright owner]
7781  *
7782  * CDDL HEADER END
7783  */
7784 /*	Copyright (c) 1988 AT&T	*/
7785 /*	  All Rights Reserved	*/
7786 
7787 /*
7788  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7789  *
7790  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7791  * Use is subject to license terms.
7792  */
7793 
7794 
7795 
7796 
7797 /*
7798  * This header defines the ISO C 1989, ISO C++ 1998, and ISO C 1999
7799  * variable argument definitions.  For legacy support, it also defines
7800  * the pre-standard variable argument definitions.
7801  *
7802  * The varargs definitions within this header are defined in terms of
7803  * implementation definitions.  These implementation definitions reside
7804  * in <sys/va_list.h>.  This organization enables protected use of
7805  * the implementation by other standard headers without introducing
7806  * names into the users' namespace.
7807  */
7808 
7809 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 1 3 4
7810 /*
7811  * CDDL HEADER START
7812  *
7813  * The contents of this file are subject to the terms of the
7814  * Common Development and Distribution License, Version 1.0 only
7815  * (the "License").  You may not use this file except in compliance
7816  * with the License.
7817  *
7818  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7819  * or http://www.opensolaris.org/os/licensing.
7820  * See the License for the specific language governing permissions
7821  * and limitations under the License.
7822  *
7823  * When distributing Covered Code, include this CDDL HEADER in each
7824  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7825  * If applicable, add the following below this CDDL HEADER, with the
7826  * fields enclosed by brackets "[]" replaced with your own identifying
7827  * information: Portions Copyright [yyyy] [name of copyright owner]
7828  *
7829  * CDDL HEADER END
7830  */
7831 /*	Copyright (c) 1988 AT&T	*/
7832 /*	  All Rights Reserved  	*/
7833 
7834 
7835 /*
7836  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7837  * Use is subject to license terms.
7838  */
7839 
7840 /*
7841  * An application should not include this header directly.  Instead it
7842  * should be included only through the inclusion of other Sun headers.
7843  *
7844  * The contents of this header is limited to identifiers specified in the
7845  * C Standard.  Any new identifiers specified in future amendments to the
7846  * C Standard must be placed in this header.  If these new identifiers
7847  * are required to also be in the C++ Standard "std" namespace, then for
7848  * anything other than macro definitions, corresponding "using" directives
7849  * must also be added to <stdarg.h>.
7850  */
7851 
7852 
7853 
7854 
7855 #pragma ident "%Z%%M%	%I%	%E% SMI"
7856 
7857 /*
7858  * This header defines the ISO C 1989 and ISO C++ 1998 variable
7859  * argument definitions.
7860  *
7861  * The varargs definitions within this header are defined in terms of
7862  * implementation definitions.  These implementation definitions reside
7863  * in <sys/va_impl.h>.  This organization enables protected use of
7864  * the implementation by other standard headers without introducing
7865  * names into the users' namespace.
7866  */
7867 
7868 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 1 3 4
7869 /*
7870  * CDDL HEADER START
7871  *
7872  * The contents of this file are subject to the terms of the
7873  * Common Development and Distribution License, Version 1.0 only
7874  * (the "License").  You may not use this file except in compliance
7875  * with the License.
7876  *
7877  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7878  * or http://www.opensolaris.org/os/licensing.
7879  * See the License for the specific language governing permissions
7880  * and limitations under the License.
7881  *
7882  * When distributing Covered Code, include this CDDL HEADER in each
7883  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7884  * If applicable, add the following below this CDDL HEADER, with the
7885  * fields enclosed by brackets "[]" replaced with your own identifying
7886  * information: Portions Copyright [yyyy] [name of copyright owner]
7887  *
7888  * CDDL HEADER END
7889  */
7890 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7891 /*	  All Rights Reserved	*/
7892 
7893 
7894 /*
7895  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7896  *
7897  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7898  * Use is subject to license terms.
7899  */
7900 
7901 
7902 
7903 
7904 /*
7905  * An application should not include this header directly.  Instead it
7906  * should be included only through the inclusion of other Sun headers,
7907  * specifically <stdarg.h> and <varargs.h>.
7908  *
7909  * This header serves two purposes.
7910  *
7911  * First, it provides a common set of definitions that implementations
7912  * of the various standards for variable argument lists may use.  These
7913  * various standards are implemented in <varargs.h>, <stdarg.h>,
7914  * <iso/stdarg_iso.h>, <iso/stdarg_c99.h>, and <sys/varargs.h>.
7915  *
7916  * Second, it provides varying implementations of the common definitions,
7917  * depending upon the compiler.
7918  */
7919 
7920 /*
7921  * The common definitions exported by this header or compilers using
7922  * this header are:
7923  *
7924  * the macro __va_start(list, name) starting the list iteration
7925  * the macro __va_arg(list, type) getting the current arg and iterating
7926  * the macro __va_copy(to, from) to bookmark the list iteration
7927  * the macro __va_end(list) to end the iteration
7928  *
7929  * In addition, the following are exported via inclusion of <sys/va_list.h>:
7930  *
7931  * the identifier __builtin_va_alist for the variable list pseudo parameter
7932  * the type __va_alist_type for the variable list pseudo parameter
7933  * the type __va_list defining the type of the variable list iterator
7934  */
7935 
7936 /*
7937  * This header uses feature macros (e.g. __BUILTIN_VA_ARG_INCR and
7938  * __BUILTIN_VA_STRUCT), compiler macros (e.g. __GNUC__), and processor
7939  * macros (e.g. __sparc) to determine the protocol appropriate to the
7940  * current compilation.  It is intended that the compilation system
7941  * define the feature, processor, and compiler macros, not the user of
7942  * the system.
7943  */
7944 
7945 /*
7946  * Many compilation systems depend upon the use of special functions
7947  * built into the the compilation system to handle variable argument
7948  * lists.  These built-in symbols may include one or more of the
7949  * following:
7950  *
7951  *      __builtin_va_alist
7952  *      __builtin_va_start
7953  *      __builtin_va_arg_incr
7954  *      __builtin_stdarg_start
7955  *      __builtin_va_end
7956  *      __builtin_va_arg
7957  *      __builtin_va_copy
7958  */
7959 
7960 /*
7961  * The following are defined in <sys/va_list.h>:
7962  *
7963  *      __va_alist_type
7964  *      __va_void()
7965  *      __va_ptr_base
7966  *      ISA definitions via inclusion of <sys/isa_defs.h>
7967  *
7968  * Inclusion of this header also makes visible the symbols in <sys/va_list.h>.
7969  * This header is included in <varargs.h>, <sys/varargs.h> and in <stdarg.h>
7970  * via inclusion of <iso/stdarg_iso.h>.
7971  */
7972 
7973 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1 3 4
7974 /*
7975  * CDDL HEADER START
7976  *
7977  * The contents of this file are subject to the terms of the
7978  * Common Development and Distribution License, Version 1.0 only
7979  * (the "License").  You may not use this file except in compliance
7980  * with the License.
7981  *
7982  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7983  * or http://www.opensolaris.org/os/licensing.
7984  * See the License for the specific language governing permissions
7985  * and limitations under the License.
7986  *
7987  * When distributing Covered Code, include this CDDL HEADER in each
7988  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7989  * If applicable, add the following below this CDDL HEADER, with the
7990  * fields enclosed by brackets "[]" replaced with your own identifying
7991  * information: Portions Copyright [yyyy] [name of copyright owner]
7992  *
7993  * CDDL HEADER END
7994  */
7995 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7996 /*	  All Rights Reserved	*/
7997 
7998 
7999 /*
8000  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8001  *
8002  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8003  * Use is subject to license terms.
8004  */
8005 # 106 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 2 3 4
8006 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 2 3 4
8007 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 3 4
8008 typedef __va_list va_list;
8009 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
8010 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 1 3 4
8011 /*
8012  * CDDL HEADER START
8013  *
8014  * The contents of this file are subject to the terms of the
8015  * Common Development and Distribution License, Version 1.0 only
8016  * (the "License").  You may not use this file except in compliance
8017  * with the License.
8018  *
8019  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8020  * or http://www.opensolaris.org/os/licensing.
8021  * See the License for the specific language governing permissions
8022  * and limitations under the License.
8023  *
8024  * When distributing Covered Code, include this CDDL HEADER in each
8025  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8026  * If applicable, add the following below this CDDL HEADER, with the
8027  * fields enclosed by brackets "[]" replaced with your own identifying
8028  * information: Portions Copyright [yyyy] [name of copyright owner]
8029  *
8030  * CDDL HEADER END
8031  */
8032 /*	Copyright (c) 1988 AT&T	*/
8033 /*	  All Rights Reserved	*/
8034 
8035 
8036 /*
8037  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
8038  * Use is subject to license terms.
8039  */
8040 
8041 
8042 
8043 
8044 #pragma ident "%Z%%M%	%I%	%E% SMI"
8045 
8046 /*
8047  * An application should not include this header directly.  Instead it
8048  * should be included only through the inclusion of other Sun headers.
8049  *
8050  * This header defines the va_copy variable argument macro, which is
8051  * new in ISO C 1999, and thus not present in ISO C 1989 and ISO C++
8052  * 1998.  Because this macro is a long-standing Solaris extension, it
8053  * is also permitted in other contexts.
8054  *
8055  * The varargs definitions within this header are defined in terms of
8056  * implementation definitions.  These implementation definitions reside
8057  * in <sys/va_list.h>.  This organization enables protected use of
8058  * the implementation by other standard headers without introducing
8059  * names into the users' namespace.
8060  */
8061 
8062 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
8063 /*
8064  * CDDL HEADER START
8065  *
8066  * The contents of this file are subject to the terms of the
8067  * Common Development and Distribution License (the "License").
8068  * You may not use this file except in compliance with the License.
8069  *
8070  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8071  * or http://www.opensolaris.org/os/licensing.
8072  * See the License for the specific language governing permissions
8073  * and limitations under the License.
8074  *
8075  * When distributing Covered Code, include this CDDL HEADER in each
8076  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8077  * If applicable, add the following below this CDDL HEADER, with the
8078  * fields enclosed by brackets "[]" replaced with your own identifying
8079  * information: Portions Copyright [yyyy] [name of copyright owner]
8080  *
8081  * CDDL HEADER END
8082  */
8083 
8084 /*
8085  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8086  * Copyright 2016 Joyent, Inc.
8087  *
8088  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8089  * Use is subject to license terms.
8090  */
8091 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 2 3 4
8092 
8093 
8094 
8095 
8096 
8097 /*
8098  * va_copy was initially a Solaris extension to provide a portable
8099  * way to perform a variable argument list ``bookmarking'' function.
8100  * It is now specified in the ISO/IEC 9899:1999 standard.
8101  */
8102 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
8103 
8104 /*
8105  * Allow global visibility for symbols defined in
8106  * C++ "std" namespace in <iso/stdarg_iso.h>.
8107  */
8108 # 68 "/usr/include/openssl/bio.h" 2 3 4
8109 
8110 # 1 "/usr/include/openssl/crypto.h" 1 3 4
8111 /* crypto/crypto.h */
8112 /* ====================================================================
8113  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
8114  *
8115  * Redistribution and use in source and binary forms, with or without
8116  * modification, are permitted provided that the following conditions
8117  * are met:
8118  *
8119  * 1. Redistributions of source code must retain the above copyright
8120  *    notice, this list of conditions and the following disclaimer.
8121  *
8122  * 2. Redistributions in binary form must reproduce the above copyright
8123  *    notice, this list of conditions and the following disclaimer in
8124  *    the documentation and/or other materials provided with the
8125  *    distribution.
8126  *
8127  * 3. All advertising materials mentioning features or use of this
8128  *    software must display the following acknowledgment:
8129  *    "This product includes software developed by the OpenSSL Project
8130  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8131  *
8132  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8133  *    endorse or promote products derived from this software without
8134  *    prior written permission. For written permission, please contact
8135  *    openssl-core@openssl.org.
8136  *
8137  * 5. Products derived from this software may not be called "OpenSSL"
8138  *    nor may "OpenSSL" appear in their names without prior written
8139  *    permission of the OpenSSL Project.
8140  *
8141  * 6. Redistributions of any form whatsoever must retain the following
8142  *    acknowledgment:
8143  *    "This product includes software developed by the OpenSSL Project
8144  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8145  *
8146  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8147  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8148  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8149  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8150  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8151  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8152  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8153  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8154  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8155  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8156  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8157  * OF THE POSSIBILITY OF SUCH DAMAGE.
8158  * ====================================================================
8159  *
8160  * This product includes cryptographic software written by Eric Young
8161  * (eay@cryptsoft.com).  This product includes software written by Tim
8162  * Hudson (tjh@cryptsoft.com).
8163  *
8164  */
8165 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8166  * All rights reserved.
8167  *
8168  * This package is an SSL implementation written
8169  * by Eric Young (eay@cryptsoft.com).
8170  * The implementation was written so as to conform with Netscapes SSL.
8171  *
8172  * This library is free for commercial and non-commercial use as long as
8173  * the following conditions are aheared to.  The following conditions
8174  * apply to all code found in this distribution, be it the RC4, RSA,
8175  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8176  * included with this distribution is covered by the same copyright terms
8177  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8178  *
8179  * Copyright remains Eric Young's, and as such any Copyright notices in
8180  * the code are not to be removed.
8181  * If this package is used in a product, Eric Young should be given attribution
8182  * as the author of the parts of the library used.
8183  * This can be in the form of a textual message at program startup or
8184  * in documentation (online or textual) provided with the package.
8185  *
8186  * Redistribution and use in source and binary forms, with or without
8187  * modification, are permitted provided that the following conditions
8188  * are met:
8189  * 1. Redistributions of source code must retain the copyright
8190  *    notice, this list of conditions and the following disclaimer.
8191  * 2. Redistributions in binary form must reproduce the above copyright
8192  *    notice, this list of conditions and the following disclaimer in the
8193  *    documentation and/or other materials provided with the distribution.
8194  * 3. All advertising materials mentioning features or use of this software
8195  *    must display the following acknowledgement:
8196  *    "This product includes cryptographic software written by
8197  *     Eric Young (eay@cryptsoft.com)"
8198  *    The word 'cryptographic' can be left out if the rouines from the library
8199  *    being used are not cryptographic related :-).
8200  * 4. If you include any Windows specific code (or a derivative thereof) from
8201  *    the apps directory (application code) you must include an acknowledgement:
8202  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8203  *
8204  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8205  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8206  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8207  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8208  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8209  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8210  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8211  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8212  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8213  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8214  * SUCH DAMAGE.
8215  *
8216  * The licence and distribution terms for any publically available version or
8217  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8218  * copied and put under another distribution licence
8219  * [including the GNU Public Licence.]
8220  */
8221 /* ====================================================================
8222  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
8223  * ECDH support in OpenSSL originally developed by
8224  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
8225  */
8226 
8227 
8228 
8229 
8230 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1 3 4
8231 /*
8232  * CDDL HEADER START
8233  *
8234  * The contents of this file are subject to the terms of the
8235  * Common Development and Distribution License (the "License").
8236  * You may not use this file except in compliance with the License.
8237  *
8238  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8239  * or http://www.opensolaris.org/os/licensing.
8240  * See the License for the specific language governing permissions
8241  * and limitations under the License.
8242  *
8243  * When distributing Covered Code, include this CDDL HEADER in each
8244  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8245  * If applicable, add the following below this CDDL HEADER, with the
8246  * fields enclosed by brackets "[]" replaced with your own identifying
8247  * information: Portions Copyright [yyyy] [name of copyright owner]
8248  *
8249  * CDDL HEADER END
8250  */
8251 
8252 /*
8253  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8254  * Copyright (c) 2013 Gary Mills
8255  *
8256  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
8257  */
8258 
8259 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
8260 
8261 /*	Copyright (c) 1988 AT&T	*/
8262 /*	  All Rights Reserved  	*/
8263 # 121 "/usr/include/openssl/crypto.h" 2 3 4
8264 
8265 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
8266 /* e_os2.h */
8267 /* ====================================================================
8268  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
8269  *
8270  * Redistribution and use in source and binary forms, with or without
8271  * modification, are permitted provided that the following conditions
8272  * are met:
8273  *
8274  * 1. Redistributions of source code must retain the above copyright
8275  *    notice, this list of conditions and the following disclaimer.
8276  *
8277  * 2. Redistributions in binary form must reproduce the above copyright
8278  *    notice, this list of conditions and the following disclaimer in
8279  *    the documentation and/or other materials provided with the
8280  *    distribution.
8281  *
8282  * 3. All advertising materials mentioning features or use of this
8283  *    software must display the following acknowledgment:
8284  *    "This product includes software developed by the OpenSSL Project
8285  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8286  *
8287  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8288  *    endorse or promote products derived from this software without
8289  *    prior written permission. For written permission, please contact
8290  *    openssl-core@openssl.org.
8291  *
8292  * 5. Products derived from this software may not be called "OpenSSL"
8293  *    nor may "OpenSSL" appear in their names without prior written
8294  *    permission of the OpenSSL Project.
8295  *
8296  * 6. Redistributions of any form whatsoever must retain the following
8297  *    acknowledgment:
8298  *    "This product includes software developed by the OpenSSL Project
8299  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8300  *
8301  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8302  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8303  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8304  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8305  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8306  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8307  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8308  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8309  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8310  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8311  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8312  * OF THE POSSIBILITY OF SUCH DAMAGE.
8313  * ====================================================================
8314  *
8315  * This product includes cryptographic software written by Eric Young
8316  * (eay@cryptsoft.com).  This product includes software written by Tim
8317  * Hudson (tjh@cryptsoft.com).
8318  *
8319  */
8320 
8321 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
8322 /* opensslconf.h */
8323 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
8324 
8325 
8326 
8327 
8328 /* OpenSSL was configured with the following options: */
8329 # 108 "/usr/include/openssl/opensslconf.h" 3 4
8330 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
8331    asks for it.  This is a transient feature that is provided for those
8332    who haven't had the time to do the appropriate changes in their
8333    applications.  */
8334 # 204 "/usr/include/openssl/opensslconf.h" 3 4
8335 /* crypto/opensslconf.h.in */
8336 
8337 /* Generate 80386 code? */
8338 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
8339 # 123 "/usr/include/openssl/crypto.h" 2 3 4
8340 
8341 
8342 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
8343 /*
8344  * CDDL HEADER START
8345  *
8346  * The contents of this file are subject to the terms of the
8347  * Common Development and Distribution License (the "License").
8348  * You may not use this file except in compliance with the License.
8349  *
8350  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8351  * or http://www.opensolaris.org/os/licensing.
8352  * See the License for the specific language governing permissions
8353  * and limitations under the License.
8354  *
8355  * When distributing Covered Code, include this CDDL HEADER in each
8356  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8357  * If applicable, add the following below this CDDL HEADER, with the
8358  * fields enclosed by brackets "[]" replaced with your own identifying
8359  * information: Portions Copyright [yyyy] [name of copyright owner]
8360  *
8361  * CDDL HEADER END
8362  */
8363 
8364 /*
8365  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
8366  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
8367  */
8368 
8369 /*	Copyright (c) 1988 AT&T	*/
8370 /*	  All Rights Reserved  	*/
8371 
8372 /*
8373  * User-visible pieces of the ANSI C standard I/O package.
8374  */
8375 # 126 "/usr/include/openssl/crypto.h" 2 3 4
8376 
8377 
8378 # 1 "/usr/include/openssl/stack.h" 1 3 4
8379 /* crypto/stack/stack.h */
8380 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8381  * All rights reserved.
8382  *
8383  * This package is an SSL implementation written
8384  * by Eric Young (eay@cryptsoft.com).
8385  * The implementation was written so as to conform with Netscapes SSL.
8386  *
8387  * This library is free for commercial and non-commercial use as long as
8388  * the following conditions are aheared to.  The following conditions
8389  * apply to all code found in this distribution, be it the RC4, RSA,
8390  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8391  * included with this distribution is covered by the same copyright terms
8392  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8393  *
8394  * Copyright remains Eric Young's, and as such any Copyright notices in
8395  * the code are not to be removed.
8396  * If this package is used in a product, Eric Young should be given attribution
8397  * as the author of the parts of the library used.
8398  * This can be in the form of a textual message at program startup or
8399  * in documentation (online or textual) provided with the package.
8400  *
8401  * Redistribution and use in source and binary forms, with or without
8402  * modification, are permitted provided that the following conditions
8403  * are met:
8404  * 1. Redistributions of source code must retain the copyright
8405  *    notice, this list of conditions and the following disclaimer.
8406  * 2. Redistributions in binary form must reproduce the above copyright
8407  *    notice, this list of conditions and the following disclaimer in the
8408  *    documentation and/or other materials provided with the distribution.
8409  * 3. All advertising materials mentioning features or use of this software
8410  *    must display the following acknowledgement:
8411  *    "This product includes cryptographic software written by
8412  *     Eric Young (eay@cryptsoft.com)"
8413  *    The word 'cryptographic' can be left out if the rouines from the library
8414  *    being used are not cryptographic related :-).
8415  * 4. If you include any Windows specific code (or a derivative thereof) from
8416  *    the apps directory (application code) you must include an acknowledgement:
8417  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8418  *
8419  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8420  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8421  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8422  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8423  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8424  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8425  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8426  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8427  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8428  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8429  * SUCH DAMAGE.
8430  *
8431  * The licence and distribution terms for any publically available version or
8432  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8433  * copied and put under another distribution licence
8434  * [including the GNU Public Licence.]
8435  */
8436 # 66 "/usr/include/openssl/stack.h" 3 4
8437 typedef struct stack_st {
8438     int num;
8439     char **data;
8440     int sorted;
8441     int num_alloc;
8442     int (*comp) (const void *, const void *);
8443 } _STACK; /* Use STACK_OF(...) instead */
8444 
8445 
8446 
8447 
8448 int sk_num(const _STACK *);
8449 void *sk_value(const _STACK *, int);
8450 
8451 void *sk_set(_STACK *, int, void *);
8452 
8453 _STACK *sk_new(int (*cmp) (const void *, const void *));
8454 _STACK *sk_new_null(void);
8455 void sk_free(_STACK *);
8456 void sk_pop_free(_STACK *st, void (*func) (void *));
8457 _STACK *sk_deep_copy(_STACK *, void *(*)(void *), void (*)(void *));
8458 int sk_insert(_STACK *sk, void *data, int where);
8459 void *sk_delete(_STACK *st, int loc);
8460 void *sk_delete_ptr(_STACK *st, void *p);
8461 int sk_find(_STACK *st, void *data);
8462 int sk_find_ex(_STACK *st, void *data);
8463 int sk_push(_STACK *st, void *data);
8464 int sk_unshift(_STACK *st, void *data);
8465 void *sk_shift(_STACK *st);
8466 void *sk_pop(_STACK *st);
8467 void sk_zero(_STACK *st);
8468 int (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *)))
8469  (const void *, const void *);
8470 _STACK *sk_dup(_STACK *st);
8471 void sk_sort(_STACK *st);
8472 int sk_is_sorted(const _STACK *st);
8473 # 129 "/usr/include/openssl/crypto.h" 2 3 4
8474 # 1 "/usr/include/openssl/safestack.h" 1 3 4
8475 /* ====================================================================
8476  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
8477  *
8478  * Redistribution and use in source and binary forms, with or without
8479  * modification, are permitted provided that the following conditions
8480  * are met:
8481  *
8482  * 1. Redistributions of source code must retain the above copyright
8483  *    notice, this list of conditions and the following disclaimer.
8484  *
8485  * 2. Redistributions in binary form must reproduce the above copyright
8486  *    notice, this list of conditions and the following disclaimer in
8487  *    the documentation and/or other materials provided with the
8488  *    distribution.
8489  *
8490  * 3. All advertising materials mentioning features or use of this
8491  *    software must display the following acknowledgment:
8492  *    "This product includes software developed by the OpenSSL Project
8493  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8494  *
8495  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8496  *    endorse or promote products derived from this software without
8497  *    prior written permission. For written permission, please contact
8498  *    openssl-core@openssl.org.
8499  *
8500  * 5. Products derived from this software may not be called "OpenSSL"
8501  *    nor may "OpenSSL" appear in their names without prior written
8502  *    permission of the OpenSSL Project.
8503  *
8504  * 6. Redistributions of any form whatsoever must retain the following
8505  *    acknowledgment:
8506  *    "This product includes software developed by the OpenSSL Project
8507  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8508  *
8509  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8510  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8511  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8512  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8513  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8514  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8515  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8516  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8517  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8518  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8519  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8520  * OF THE POSSIBILITY OF SUCH DAMAGE.
8521  * ====================================================================
8522  *
8523  * This product includes cryptographic software written by Eric Young
8524  * (eay@cryptsoft.com).  This product includes software written by Tim
8525  * Hudson (tjh@cryptsoft.com).
8526  *
8527  */
8528 
8529 
8530 
8531 
8532 # 1 "/usr/include/openssl/stack.h" 1 3 4
8533 /* crypto/stack/stack.h */
8534 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8535  * All rights reserved.
8536  *
8537  * This package is an SSL implementation written
8538  * by Eric Young (eay@cryptsoft.com).
8539  * The implementation was written so as to conform with Netscapes SSL.
8540  *
8541  * This library is free for commercial and non-commercial use as long as
8542  * the following conditions are aheared to.  The following conditions
8543  * apply to all code found in this distribution, be it the RC4, RSA,
8544  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8545  * included with this distribution is covered by the same copyright terms
8546  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8547  *
8548  * Copyright remains Eric Young's, and as such any Copyright notices in
8549  * the code are not to be removed.
8550  * If this package is used in a product, Eric Young should be given attribution
8551  * as the author of the parts of the library used.
8552  * This can be in the form of a textual message at program startup or
8553  * in documentation (online or textual) provided with the package.
8554  *
8555  * Redistribution and use in source and binary forms, with or without
8556  * modification, are permitted provided that the following conditions
8557  * are met:
8558  * 1. Redistributions of source code must retain the copyright
8559  *    notice, this list of conditions and the following disclaimer.
8560  * 2. Redistributions in binary form must reproduce the above copyright
8561  *    notice, this list of conditions and the following disclaimer in the
8562  *    documentation and/or other materials provided with the distribution.
8563  * 3. All advertising materials mentioning features or use of this software
8564  *    must display the following acknowledgement:
8565  *    "This product includes cryptographic software written by
8566  *     Eric Young (eay@cryptsoft.com)"
8567  *    The word 'cryptographic' can be left out if the rouines from the library
8568  *    being used are not cryptographic related :-).
8569  * 4. If you include any Windows specific code (or a derivative thereof) from
8570  *    the apps directory (application code) you must include an acknowledgement:
8571  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8572  *
8573  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8574  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8575  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8576  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8577  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8578  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8579  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8580  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8581  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8582  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8583  * SUCH DAMAGE.
8584  *
8585  * The licence and distribution terms for any publically available version or
8586  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8587  * copied and put under another distribution licence
8588  * [including the GNU Public Licence.]
8589  */
8590 # 59 "/usr/include/openssl/safestack.h" 2 3 4
8591 # 69 "/usr/include/openssl/safestack.h" 3 4
8592 /*
8593  * In C++ we get problems because an explicit cast is needed from (void *) we
8594  * use CHECKED_STACK_OF to ensure the correct type is passed in the macros
8595  * below.
8596  */
8597 # 102 "/usr/include/openssl/safestack.h" 3 4
8598 /* nada (obsolete in new safestack approach)*/
8599 
8600 
8601 /*-
8602  * Strings are special: normally an lhash entry will point to a single
8603  * (somewhat) mutable object. In the case of strings:
8604  *
8605  * a) Instead of a single char, there is an array of chars, NUL-terminated.
8606  * b) The string may have be immutable.
8607  *
8608  * So, they need their own declarations. Especially important for
8609  * type-checking tools, such as Deputy.
8610  *
8611  * In practice, however, it appears to be hard to have a const
8612  * string. For now, I'm settling for dealing with the fact it is a
8613  * string at all.
8614  */
8615 typedef char *OPENSSL_STRING;
8616 
8617 typedef const char *OPENSSL_CSTRING;
8618 
8619 /*
8620  * Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
8621  * STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned
8622  * above, instead of a single char each entry is a NUL-terminated array of
8623  * chars. So, we have to implement STRING specially for STACK_OF. This is
8624  * dealt with in the autogenerated macros below.
8625  */
8626 
8627 struct stack_st_OPENSSL_STRING { _STACK stack; };
8628 
8629 /*
8630  * Similarly, we sometimes use a block of characters, NOT nul-terminated.
8631  * These should also be distinguished from "normal" stacks.
8632  */
8633 typedef void *OPENSSL_BLOCK;
8634 struct stack_st_OPENSSL_BLOCK { _STACK stack; };
8635 
8636 /*
8637  * SKM_sk_... stack macros are internal to safestack.h: never use them
8638  * directly, use sk_<type>_... instead
8639  */
8640 # 211 "/usr/include/openssl/safestack.h" 3 4
8641 /*
8642  * This block of defines is updated by util/mkstack.pl, please do not touch!
8643  */
8644 # 130 "/usr/include/openssl/crypto.h" 2 3 4
8645 # 1 "/usr/include/openssl/opensslv.h" 1 3 4
8646 
8647 
8648 
8649 
8650 
8651 
8652 
8653 /*-
8654  * Numeric release version identifier:
8655  * MNNFFPPS: major minor fix patch status
8656  * The status nibble has one of the values 0 for development, 1 to e for betas
8657  * 1 to 14, and f for release.  The patch level is exactly that.
8658  * For example:
8659  * 0.9.3-dev      0x00903000
8660  * 0.9.3-beta1    0x00903001
8661  * 0.9.3-beta2-dev 0x00903002
8662  * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)
8663  * 0.9.3          0x0090300f
8664  * 0.9.3a         0x0090301f
8665  * 0.9.4          0x0090400f
8666  * 1.2.3z         0x102031af
8667  *
8668  * For continuity reasons (because 0.9.5 is already out, and is coded
8669  * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
8670  * part is slightly different, by setting the highest bit.  This means
8671  * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start
8672  * with 0x0090600S...
8673  *
8674  * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
8675  * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
8676  *  major minor fix final patch/beta)
8677  */
8678 # 41 "/usr/include/openssl/opensslv.h" 3 4
8679 /*-
8680  * The macros below are to be used for shared library (.so, .dll, ...)
8681  * versioning.  That kind of versioning works a bit differently between
8682  * operating systems.  The most usual scheme is to set a major and a minor
8683  * number, and have the runtime loader check that the major number is equal
8684  * to what it was at application link time, while the minor number has to
8685  * be greater or equal to what it was at application link time.  With this
8686  * scheme, the version number is usually part of the file name, like this:
8687  *
8688  *      libcrypto.so.0.9
8689  *
8690  * Some unixen also make a softlink with the major verson number only:
8691  *
8692  *      libcrypto.so.0
8693  *
8694  * On Tru64 and IRIX 6.x it works a little bit differently.  There, the
8695  * shared library version is stored in the file, and is actually a series
8696  * of versions, separated by colons.  The rightmost version present in the
8697  * library when linking an application is stored in the application to be
8698  * matched at run time.  When the application is run, a check is done to
8699  * see if the library version stored in the application matches any of the
8700  * versions in the version string of the library itself.
8701  * This version string can be constructed in any way, depending on what
8702  * kind of matching is desired.  However, to implement the same scheme as
8703  * the one used in the other unixen, all compatible versions, from lowest
8704  * to highest, should be part of the string.  Consecutive builds would
8705  * give the following versions strings:
8706  *
8707  *      3.0
8708  *      3.0:3.1
8709  *      3.0:3.1:3.2
8710  *      4.0
8711  *      4.0:4.1
8712  *
8713  * Notice how version 4 is completely incompatible with version, and
8714  * therefore give the breach you can see.
8715  *
8716  * There may be other schemes as well that I haven't yet discovered.
8717  *
8718  * So, here's the way it works here: first of all, the library version
8719  * number doesn't need at all to match the overall OpenSSL version.
8720  * However, it's nice and more understandable if it actually does.
8721  * The current library version is stored in the macro SHLIB_VERSION_NUMBER,
8722  * which is just a piece of text in the format "M.m.e" (Major, minor, edit).
8723  * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
8724  * we need to keep a history of version numbers, which is done in the
8725  * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and
8726  * should only keep the versions that are binary compatible with the current.
8727  */
8728 # 131 "/usr/include/openssl/crypto.h" 2 3 4
8729 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
8730 /* ====================================================================
8731  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
8732  *
8733  * Redistribution and use in source and binary forms, with or without
8734  * modification, are permitted provided that the following conditions
8735  * are met:
8736  *
8737  * 1. Redistributions of source code must retain the above copyright
8738  *    notice, this list of conditions and the following disclaimer.
8739  *
8740  * 2. Redistributions in binary form must reproduce the above copyright
8741  *    notice, this list of conditions and the following disclaimer in
8742  *    the documentation and/or other materials provided with the
8743  *    distribution.
8744  *
8745  * 3. All advertising materials mentioning features or use of this
8746  *    software must display the following acknowledgment:
8747  *    "This product includes software developed by the OpenSSL Project
8748  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8749  *
8750  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8751  *    endorse or promote products derived from this software without
8752  *    prior written permission. For written permission, please contact
8753  *    openssl-core@openssl.org.
8754  *
8755  * 5. Products derived from this software may not be called "OpenSSL"
8756  *    nor may "OpenSSL" appear in their names without prior written
8757  *    permission of the OpenSSL Project.
8758  *
8759  * 6. Redistributions of any form whatsoever must retain the following
8760  *    acknowledgment:
8761  *    "This product includes software developed by the OpenSSL Project
8762  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8763  *
8764  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8765  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8766  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8767  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8768  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8769  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8770  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8771  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8772  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8773  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8774  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8775  * OF THE POSSIBILITY OF SUCH DAMAGE.
8776  * ====================================================================
8777  *
8778  * This product includes cryptographic software written by Eric Young
8779  * (eay@cryptsoft.com).  This product includes software written by Tim
8780  * Hudson (tjh@cryptsoft.com).
8781  *
8782  */
8783 # 62 "/usr/include/openssl/ossl_typ.h" 3 4
8784 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
8785 /* e_os2.h */
8786 /* ====================================================================
8787  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
8788  *
8789  * Redistribution and use in source and binary forms, with or without
8790  * modification, are permitted provided that the following conditions
8791  * are met:
8792  *
8793  * 1. Redistributions of source code must retain the above copyright
8794  *    notice, this list of conditions and the following disclaimer.
8795  *
8796  * 2. Redistributions in binary form must reproduce the above copyright
8797  *    notice, this list of conditions and the following disclaimer in
8798  *    the documentation and/or other materials provided with the
8799  *    distribution.
8800  *
8801  * 3. All advertising materials mentioning features or use of this
8802  *    software must display the following acknowledgment:
8803  *    "This product includes software developed by the OpenSSL Project
8804  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8805  *
8806  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8807  *    endorse or promote products derived from this software without
8808  *    prior written permission. For written permission, please contact
8809  *    openssl-core@openssl.org.
8810  *
8811  * 5. Products derived from this software may not be called "OpenSSL"
8812  *    nor may "OpenSSL" appear in their names without prior written
8813  *    permission of the OpenSSL Project.
8814  *
8815  * 6. Redistributions of any form whatsoever must retain the following
8816  *    acknowledgment:
8817  *    "This product includes software developed by the OpenSSL Project
8818  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8819  *
8820  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8821  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8822  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8823  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8824  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8825  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8826  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8827  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8828  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8829  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8830  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8831  * OF THE POSSIBILITY OF SUCH DAMAGE.
8832  * ====================================================================
8833  *
8834  * This product includes cryptographic software written by Eric Young
8835  * (eay@cryptsoft.com).  This product includes software written by Tim
8836  * Hudson (tjh@cryptsoft.com).
8837  *
8838  */
8839 
8840 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
8841 /* opensslconf.h */
8842 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
8843 
8844 
8845 
8846 
8847 /* OpenSSL was configured with the following options: */
8848 # 108 "/usr/include/openssl/opensslconf.h" 3 4
8849 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
8850    asks for it.  This is a transient feature that is provided for those
8851    who haven't had the time to do the appropriate changes in their
8852    applications.  */
8853 # 204 "/usr/include/openssl/opensslconf.h" 3 4
8854 /* crypto/opensslconf.h.in */
8855 
8856 /* Generate 80386 code? */
8857 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
8858 # 63 "/usr/include/openssl/ossl_typ.h" 2 3 4
8859 # 83 "/usr/include/openssl/ossl_typ.h" 3 4
8860 typedef struct asn1_string_st ASN1_INTEGER;
8861 typedef struct asn1_string_st ASN1_ENUMERATED;
8862 typedef struct asn1_string_st ASN1_BIT_STRING;
8863 typedef struct asn1_string_st ASN1_OCTET_STRING;
8864 typedef struct asn1_string_st ASN1_PRINTABLESTRING;
8865 typedef struct asn1_string_st ASN1_T61STRING;
8866 typedef struct asn1_string_st ASN1_IA5STRING;
8867 typedef struct asn1_string_st ASN1_GENERALSTRING;
8868 typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
8869 typedef struct asn1_string_st ASN1_BMPSTRING;
8870 typedef struct asn1_string_st ASN1_UTCTIME;
8871 typedef struct asn1_string_st ASN1_TIME;
8872 typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
8873 typedef struct asn1_string_st ASN1_VISIBLESTRING;
8874 typedef struct asn1_string_st ASN1_UTF8STRING;
8875 typedef struct asn1_string_st ASN1_STRING;
8876 typedef int ASN1_BOOLEAN;
8877 typedef int ASN1_NULL;
8878 
8879 
8880 typedef struct asn1_object_st ASN1_OBJECT;
8881 
8882 typedef struct ASN1_ITEM_st ASN1_ITEM;
8883 typedef struct asn1_pctx_st ASN1_PCTX;
8884 # 120 "/usr/include/openssl/ossl_typ.h" 3 4
8885 typedef struct bignum_st BIGNUM;
8886 typedef struct bignum_ctx BN_CTX;
8887 typedef struct bn_blinding_st BN_BLINDING;
8888 typedef struct bn_mont_ctx_st BN_MONT_CTX;
8889 typedef struct bn_recp_ctx_st BN_RECP_CTX;
8890 typedef struct bn_gencb_st BN_GENCB;
8891 
8892 typedef struct buf_mem_st BUF_MEM;
8893 
8894 typedef struct evp_cipher_st EVP_CIPHER;
8895 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
8896 typedef struct env_md_st EVP_MD;
8897 typedef struct env_md_ctx_st EVP_MD_CTX;
8898 typedef struct evp_pkey_st EVP_PKEY;
8899 
8900 typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
8901 
8902 typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
8903 typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
8904 
8905 typedef struct dh_st DH;
8906 typedef struct dh_method DH_METHOD;
8907 
8908 typedef struct dsa_st DSA;
8909 typedef struct dsa_method DSA_METHOD;
8910 
8911 typedef struct rsa_st RSA;
8912 typedef struct rsa_meth_st RSA_METHOD;
8913 
8914 typedef struct rand_meth_st RAND_METHOD;
8915 
8916 typedef struct ecdh_method ECDH_METHOD;
8917 typedef struct ecdsa_method ECDSA_METHOD;
8918 
8919 typedef struct x509_st X509;
8920 typedef struct X509_algor_st X509_ALGOR;
8921 typedef struct X509_crl_st X509_CRL;
8922 typedef struct x509_crl_method_st X509_CRL_METHOD;
8923 typedef struct x509_revoked_st X509_REVOKED;
8924 typedef struct X509_name_st X509_NAME;
8925 typedef struct X509_pubkey_st X509_PUBKEY;
8926 typedef struct x509_store_st X509_STORE;
8927 typedef struct x509_store_ctx_st X509_STORE_CTX;
8928 
8929 typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
8930 
8931 typedef struct v3_ext_ctx X509V3_CTX;
8932 typedef struct conf_st CONF;
8933 
8934 typedef struct store_st STORE;
8935 typedef struct store_method_st STORE_METHOD;
8936 
8937 typedef struct ui_st UI;
8938 typedef struct ui_method_st UI_METHOD;
8939 
8940 typedef struct st_ERR_FNS ERR_FNS;
8941 
8942 typedef struct engine_st ENGINE;
8943 typedef struct ssl_st SSL;
8944 typedef struct ssl_ctx_st SSL_CTX;
8945 
8946 typedef struct comp_method_st COMP_METHOD;
8947 
8948 typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
8949 typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
8950 typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
8951 typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
8952 
8953 typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
8954 typedef struct DIST_POINT_st DIST_POINT;
8955 typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
8956 typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
8957 
8958   /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */
8959 
8960 
8961 
8962 typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
8963 /* Callback types for crypto.h */
8964 typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
8965                            int idx, long argl, void *argp);
8966 typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
8967                              int idx, long argl, void *argp);
8968 typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
8969                            void *from_d, int idx, long argl, void *argp);
8970 
8971 typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
8972 typedef struct ocsp_response_st OCSP_RESPONSE;
8973 typedef struct ocsp_responder_id_st OCSP_RESPID;
8974 # 132 "/usr/include/openssl/crypto.h" 2 3 4
8975 
8976 
8977 
8978 
8979 
8980 /*
8981  * Resolve problems on some operating systems with symbol names that clash
8982  * one way or another
8983  */
8984 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
8985 /* ====================================================================
8986  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
8987  *
8988  * Redistribution and use in source and binary forms, with or without
8989  * modification, are permitted provided that the following conditions
8990  * are met:
8991  *
8992  * 1. Redistributions of source code must retain the above copyright
8993  *    notice, this list of conditions and the following disclaimer.
8994  *
8995  * 2. Redistributions in binary form must reproduce the above copyright
8996  *    notice, this list of conditions and the following disclaimer in
8997  *    the documentation and/or other materials provided with the
8998  *    distribution.
8999  *
9000  * 3. All advertising materials mentioning features or use of this
9001  *    software must display the following acknowledgment:
9002  *    "This product includes software developed by the OpenSSL Project
9003  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9004  *
9005  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9006  *    endorse or promote products derived from this software without
9007  *    prior written permission. For written permission, please contact
9008  *    openssl-core@openssl.org.
9009  *
9010  * 5. Products derived from this software may not be called "OpenSSL"
9011  *    nor may "OpenSSL" appear in their names without prior written
9012  *    permission of the OpenSSL Project.
9013  *
9014  * 6. Redistributions of any form whatsoever must retain the following
9015  *    acknowledgment:
9016  *    "This product includes software developed by the OpenSSL Project
9017  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9018  *
9019  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9020  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9021  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9022  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9023  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9024  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9025  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9026  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9027  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9028  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9029  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9030  * OF THE POSSIBILITY OF SUCH DAMAGE.
9031  * ====================================================================
9032  *
9033  * This product includes cryptographic software written by Eric Young
9034  * (eay@cryptsoft.com).  This product includes software written by Tim
9035  * Hudson (tjh@cryptsoft.com).
9036  *
9037  */
9038 
9039 
9040 
9041 
9042 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
9043 /* e_os2.h */
9044 /* ====================================================================
9045  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
9046  *
9047  * Redistribution and use in source and binary forms, with or without
9048  * modification, are permitted provided that the following conditions
9049  * are met:
9050  *
9051  * 1. Redistributions of source code must retain the above copyright
9052  *    notice, this list of conditions and the following disclaimer.
9053  *
9054  * 2. Redistributions in binary form must reproduce the above copyright
9055  *    notice, this list of conditions and the following disclaimer in
9056  *    the documentation and/or other materials provided with the
9057  *    distribution.
9058  *
9059  * 3. All advertising materials mentioning features or use of this
9060  *    software must display the following acknowledgment:
9061  *    "This product includes software developed by the OpenSSL Project
9062  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9063  *
9064  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9065  *    endorse or promote products derived from this software without
9066  *    prior written permission. For written permission, please contact
9067  *    openssl-core@openssl.org.
9068  *
9069  * 5. Products derived from this software may not be called "OpenSSL"
9070  *    nor may "OpenSSL" appear in their names without prior written
9071  *    permission of the OpenSSL Project.
9072  *
9073  * 6. Redistributions of any form whatsoever must retain the following
9074  *    acknowledgment:
9075  *    "This product includes software developed by the OpenSSL Project
9076  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9077  *
9078  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9079  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9080  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9081  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9082  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9083  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9084  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9085  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9086  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9087  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9088  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9089  * OF THE POSSIBILITY OF SUCH DAMAGE.
9090  * ====================================================================
9091  *
9092  * This product includes cryptographic software written by Eric Young
9093  * (eay@cryptsoft.com).  This product includes software written by Tim
9094  * Hudson (tjh@cryptsoft.com).
9095  *
9096  */
9097 
9098 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
9099 /* opensslconf.h */
9100 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
9101 
9102 
9103 
9104 
9105 /* OpenSSL was configured with the following options: */
9106 # 108 "/usr/include/openssl/opensslconf.h" 3 4
9107 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
9108    asks for it.  This is a transient feature that is provided for those
9109    who haven't had the time to do the appropriate changes in their
9110    applications.  */
9111 # 204 "/usr/include/openssl/opensslconf.h" 3 4
9112 /* crypto/opensslconf.h.in */
9113 
9114 /* Generate 80386 code? */
9115 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
9116 # 59 "/usr/include/openssl/symhacks.h" 2 3 4
9117 
9118 /*
9119  * Hacks to solve the problem with linkers incapable of handling very long
9120  * symbol names.  In the case of VMS, the limit is 31 characters on VMS for
9121  * VAX.
9122  */
9123 /*
9124  * Note that this affects util/libeay.num and util/ssleay.num...  you may
9125  * change those manually, but that's not recommended, as those files are
9126  * controlled centrally and updated on Unix, and the central definition may
9127  * disagree with yours, which in turn may come with shareable library
9128  * incompatibilities.
9129  */
9130 # 481 "/usr/include/openssl/symhacks.h" 3 4
9131 /* Case insensitive linking causes problems.... */
9132 # 142 "/usr/include/openssl/crypto.h" 2 3 4
9133 
9134 
9135 
9136 
9137 
9138 /* Backward compatibility to SSLeay */
9139 /*
9140  * This is more to be used to check the correct DLL is being used in the MS
9141  * world.
9142  */
9143 
9144 
9145 /* #define SSLEAY_OPTIONS       1 no longer supported */
9146 
9147 
9148 
9149 
9150 
9151 /* Already declared in ossl_typ.h */
9152 # 174 "/usr/include/openssl/crypto.h" 3 4
9153 /* A generic structure to pass assorted data in a expandable way */
9154 typedef struct openssl_item_st {
9155     int code;
9156     void *value; /* Not used for flag attributes */
9157     size_t value_size; /* Max size of value for output, length for
9158                                  * input */
9159     size_t *value_length; /* Returned length of value for output */
9160 } OPENSSL_ITEM;
9161 
9162 /*
9163  * When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
9164  * names in cryptlib.c
9165  */
9166 # 256 "/usr/include/openssl/crypto.h" 3 4
9167 /*
9168  * Some applications as well as some parts of OpenSSL need to allocate and
9169  * deallocate locks in a dynamic fashion.  The following typedef makes this
9170  * possible in a type-safe manner.
9171  */
9172 /* struct CRYPTO_dynlock_value has to be defined by the application. */
9173 typedef struct {
9174     int references;
9175     struct CRYPTO_dynlock_value *data;
9176 } CRYPTO_dynlock;
9177 
9178 /*
9179  * The following can be used to detect memory leaks in the SSLeay library. It
9180  * used, it turns on malloc checking
9181  */
9182 
9183 
9184 
9185 
9186 
9187 
9188 /*
9189  * The following are bit values to turn on or off options connected to the
9190  * malloc checking functionality
9191  */
9192 
9193 /* Adds time to the memory checking information */
9194 
9195 /* Adds thread number to the memory checking information */
9196 
9197 
9198 
9199 
9200 /* predec of the BIO type */
9201 typedef struct bio_st BIO_dummy;
9202 
9203 struct crypto_ex_data_st {
9204     struct stack_st_void *sk;
9205     /* gcc is screwing up this data structure :-( */
9206     int dummy;
9207 };
9208 struct stack_st_void { _STACK stack; };
9209 
9210 /*
9211  * This stuff is basically class callback functions The current classes are
9212  * SSL_CTX, SSL, SSL_SESSION, and a few more
9213  */
9214 
9215 typedef struct crypto_ex_data_func_st {
9216     long argl; /* Arbitary long */
9217     void *argp; /* Arbitary void * */
9218     CRYPTO_EX_new *new_func;
9219     CRYPTO_EX_free *free_func;
9220     CRYPTO_EX_dup *dup_func;
9221 } CRYPTO_EX_DATA_FUNCS;
9222 
9223 struct stack_st_CRYPTO_EX_DATA_FUNCS { _STACK stack; };
9224 
9225 /*
9226  * Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA
9227  * entry.
9228  */
9229 # 336 "/usr/include/openssl/crypto.h" 3 4
9230 /*
9231  * Dynamically assigned indexes start from this value (don't use directly,
9232  * use via CRYPTO_ex_data_new_class).
9233  */
9234 
9235 
9236 /*
9237  * This is the default callbacks, but we can have others as well: this is
9238  * needed in Win32 where the application malloc and the library malloc may
9239  * not be the same.
9240  */
9241 # 356 "/usr/include/openssl/crypto.h" 3 4
9242 /*
9243  * Set standard debugging functions (not done by default unless CRYPTO_MDEBUG
9244  * is defined)
9245  */
9246 # 369 "/usr/include/openssl/crypto.h" 3 4
9247 int CRYPTO_mem_ctrl(int mode);
9248 int CRYPTO_is_mem_check_on(void);
9249 
9250 /* for applications */
9251 
9252 
9253 
9254 /* for library-internal use */
9255 # 396 "/usr/include/openssl/crypto.h" 3 4
9256 const char *SSLeay_version(int type);
9257 unsigned long SSLeay(void);
9258 
9259 int OPENSSL_issetugid(void);
9260 
9261 /* An opaque type representing an implementation of "ex_data" support */
9262 typedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL;
9263 /* Return an opaque pointer to the current "ex_data" implementation */
9264 const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void);
9265 /* Sets the "ex_data" implementation to be used (if it's not too late) */
9266 int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i);
9267 /* Get a new "ex_data" class, and return the corresponding "class_index" */
9268 int CRYPTO_ex_data_new_class(void);
9269 /* Within a given class, get/register a new index */
9270 int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
9271                             CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
9272                             CRYPTO_EX_free *free_func);
9273 /*
9274  * Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a
9275  * given class (invokes whatever per-class callbacks are applicable)
9276  */
9277 int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
9278 int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
9279                        CRYPTO_EX_DATA *from);
9280 void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
9281 /*
9282  * Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular
9283  * index (relative to the class type involved)
9284  */
9285 int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
9286 void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
9287 /*
9288  * This function cleans up all "ex_data" state. It mustn't be called under
9289  * potential race-conditions.
9290  */
9291 void CRYPTO_cleanup_all_ex_data(void);
9292 
9293 int CRYPTO_get_new_lockid(char *name);
9294 
9295 int CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */
9296 void CRYPTO_lock(int mode, int type, const char *file, int line);
9297 void CRYPTO_set_locking_callback(void (*func) (int mode, int type,
9298                                                const char *file, int line));
9299 void (*CRYPTO_get_locking_callback(void)) (int mode, int type,
9300                                            const char *file, int line);
9301 void CRYPTO_set_add_lock_callback(int (*func)
9302                                    (int *num, int mount, int type,
9303                                     const char *file, int line));
9304 int (*CRYPTO_get_add_lock_callback(void)) (int *num, int mount, int type,
9305                                            const char *file, int line);
9306 
9307 /* Don't use this structure directly. */
9308 typedef struct crypto_threadid_st {
9309     void *ptr;
9310     unsigned long val;
9311 } CRYPTO_THREADID;
9312 /* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
9313 void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val);
9314 void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr);
9315 int CRYPTO_THREADID_set_callback(void (*threadid_func) (CRYPTO_THREADID *));
9316 void (*CRYPTO_THREADID_get_callback(void)) (CRYPTO_THREADID *);
9317 void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
9318 int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
9319 void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
9320 unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
9321 
9322 void CRYPTO_set_id_callback(unsigned long (*func) (void));
9323 unsigned long (*CRYPTO_get_id_callback(void)) (void);
9324 unsigned long CRYPTO_thread_id(void);
9325 
9326 
9327 const char *CRYPTO_get_lock_name(int type);
9328 int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
9329                     int line);
9330 
9331 int CRYPTO_get_new_dynlockid(void);
9332 void CRYPTO_destroy_dynlockid(int i);
9333 struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
9334 void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value
9335                                         *(*dyn_create_function) (const char
9336                                                                  *file,
9337                                                                  int line));
9338 void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)
9339                                        (int mode,
9340                                         struct CRYPTO_dynlock_value *l,
9341                                         const char *file, int line));
9342 void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)
9343                                           (struct CRYPTO_dynlock_value *l,
9344                                            const char *file, int line));
9345 struct CRYPTO_dynlock_value
9346 *(*CRYPTO_get_dynlock_create_callback(void)) (const char *file, int line);
9347 void (*CRYPTO_get_dynlock_lock_callback(void)) (int mode,
9348                                                 struct CRYPTO_dynlock_value
9349                                                 *l, const char *file,
9350                                                 int line);
9351 void (*CRYPTO_get_dynlock_destroy_callback(void)) (struct CRYPTO_dynlock_value
9352                                                    *l, const char *file,
9353                                                    int line);
9354 
9355 /*
9356  * CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- call
9357  * the latter last if you need different functions
9358  */
9359 int CRYPTO_set_mem_functions(void *(*m) (size_t), void *(*r) (void *, size_t),
9360                              void (*f) (void *));
9361 int CRYPTO_set_locked_mem_functions(void *(*m) (size_t),
9362                                     void (*free_func) (void *));
9363 int CRYPTO_set_mem_ex_functions(void *(*m) (size_t, const char *, int),
9364                                 void *(*r) (void *, size_t, const char *,
9365                                             int), void (*f) (void *));
9366 int CRYPTO_set_locked_mem_ex_functions(void *(*m) (size_t, const char *, int),
9367                                        void (*free_func) (void *));
9368 int CRYPTO_set_mem_debug_functions(void (*m)
9369                                     (void *, int, const char *, int, int),
9370                                    void (*r) (void *, void *, int,
9371                                               const char *, int, int),
9372                                    void (*f) (void *, int), void (*so) (long),
9373                                    long (*go) (void));
9374 void CRYPTO_get_mem_functions(void *(**m) (size_t),
9375                               void *(**r) (void *, size_t),
9376                               void (**f) (void *));
9377 void CRYPTO_get_locked_mem_functions(void *(**m) (size_t),
9378                                      void (**f) (void *));
9379 void CRYPTO_get_mem_ex_functions(void *(**m) (size_t, const char *, int),
9380                                  void *(**r) (void *, size_t, const char *,
9381                                               int), void (**f) (void *));
9382 void CRYPTO_get_locked_mem_ex_functions(void
9383                                         *(**m) (size_t, const char *, int),
9384                                         void (**f) (void *));
9385 void CRYPTO_get_mem_debug_functions(void (**m)
9386                                      (void *, int, const char *, int, int),
9387                                     void (**r) (void *, void *, int,
9388                                                 const char *, int, int),
9389                                     void (**f) (void *, int),
9390                                     void (**so) (long), long (**go) (void));
9391 
9392 void *CRYPTO_malloc_locked(int num, const char *file, int line);
9393 void CRYPTO_free_locked(void *ptr);
9394 void *CRYPTO_malloc(int num, const char *file, int line);
9395 char *CRYPTO_strdup(const char *str, const char *file, int line);
9396 void CRYPTO_free(void *ptr);
9397 void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
9398 void *CRYPTO_realloc_clean(void *addr, int old_num, int num, const char *file,
9399                            int line);
9400 void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
9401 
9402 void OPENSSL_cleanse(void *ptr, size_t len);
9403 
9404 void CRYPTO_set_mem_debug_options(long bits);
9405 long CRYPTO_get_mem_debug_options(void);
9406 
9407 
9408 
9409 int CRYPTO_push_info_(const char *info, const char *file, int line);
9410 int CRYPTO_pop_info(void);
9411 int CRYPTO_remove_all_info(void);
9412 
9413 /*
9414  * Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro;
9415  * used as default in CRYPTO_MDEBUG compilations):
9416  */
9417 /*-
9418  * The last argument has the following significance:
9419  *
9420  * 0:   called before the actual memory allocation has taken place
9421  * 1:   called after the actual memory allocation has taken place
9422  */
9423 void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,
9424                        int before_p);
9425 void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, const char *file,
9426                         int line, int before_p);
9427 void CRYPTO_dbg_free(void *addr, int before_p);
9428 /*-
9429  * Tell the debugging code about options.  By default, the following values
9430  * apply:
9431  *
9432  * 0:                           Clear all options.
9433  * V_CRYPTO_MDEBUG_TIME (1):    Set the "Show Time" option.
9434  * V_CRYPTO_MDEBUG_THREAD (2):  Set the "Show Thread Number" option.
9435  * V_CRYPTO_MDEBUG_ALL (3):     1 + 2
9436  */
9437 void CRYPTO_dbg_set_options(long bits);
9438 long CRYPTO_dbg_get_options(void);
9439 
9440 
9441 void CRYPTO_mem_leaks_fp(FILE *);
9442 
9443 void CRYPTO_mem_leaks(struct bio_st *bio);
9444 /* unsigned long order, char *file, int line, int num_bytes, char *addr */
9445 typedef void *CRYPTO_MEM_LEAK_CB (unsigned long, const char *, int, int,
9446                                   void *);
9447 void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
9448 
9449 /* die if we have to */
9450 void OpenSSLDie(const char *file, int line, const char *assertion);
9451 
9452 
9453 unsigned long *OPENSSL_ia32cap_loc(void);
9454 
9455 int OPENSSL_isservice(void);
9456 
9457 int FIPS_mode(void);
9458 int FIPS_mode_set(int r);
9459 
9460 void OPENSSL_init(void);
9461 # 624 "/usr/include/openssl/crypto.h" 3 4
9462 /*
9463  * CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.
9464  * It takes an amount of time dependent on |len|, but independent of the
9465  * contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements
9466  * into a defined order as the return value when a != b is undefined, other
9467  * than to be non-zero.
9468  */
9469 int CRYPTO_memcmp(const volatile void *a, const volatile void *b, size_t len);
9470 
9471 /* BEGIN ERROR CODES */
9472 /*
9473  * The following lines are auto generated by the script mkerr.pl. Any changes
9474  * made after this point may be overwritten when the script is next run.
9475  */
9476 void ERR_load_CRYPTO_strings(void);
9477 
9478 /* Error codes for the CRYPTO functions. */
9479 
9480 /* Function codes. */
9481 # 654 "/usr/include/openssl/crypto.h" 3 4
9482 /* Reason codes. */
9483 # 70 "/usr/include/openssl/bio.h" 2 3 4
9484 # 83 "/usr/include/openssl/bio.h" 3 4
9485 /* These are the 'types' of BIOs */
9486 # 116 "/usr/include/openssl/bio.h" 3 4
9487 /*
9488  * BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
9489  * BIO_set_fp(in,stdin,BIO_NOCLOSE);
9490  */
9491 
9492 
9493 
9494 /*
9495  * These are used in the following macros and are passed to BIO_ctrl()
9496  */
9497 # 139 "/usr/include/openssl/bio.h" 3 4
9498 /* callback is int cb(BIO *bio,state,ret); */
9499 
9500 
9501 
9502 
9503 
9504 /* dgram BIO stuff */
9505 # 157 "/usr/include/openssl/bio.h" 3 4
9506 /* #ifdef IP_MTU_DISCOVER */
9507 
9508 /* #endif */
9509 # 196 "/usr/include/openssl/bio.h" 3 4
9510 /* modifiers */
9511 # 208 "/usr/include/openssl/bio.h" 3 4
9512 /*
9513  * "UPLINK" flag denotes file descriptors provided by application. It
9514  * defaults to 0, as most platforms don't require UPLINK interface.
9515  */
9516 
9517 
9518 
9519 /* Used in BIO_gethostbyname() */
9520 
9521 
9522 
9523 
9524 
9525 
9526 /* Mostly used in the SSL BIO */
9527 /*-
9528  * Not used anymore
9529  * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10
9530  * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20
9531  * #define BIO_FLAGS_PROTOCOL_STARTUP   0x40
9532  */
9533 
9534 
9535 
9536 /*
9537  * This is used with memory BIOs: it means we shouldn't free up or change the
9538  * data in any way.
9539  */
9540 
9541 
9542 typedef struct bio_st BIO;
9543 
9544 void BIO_set_flags(BIO *b, int flags);
9545 int BIO_test_flags(const BIO *b, int flags);
9546 void BIO_clear_flags(BIO *b, int flags);
9547 # 252 "/usr/include/openssl/bio.h" 3 4
9548 /* These are normally used internally in BIOs */
9549 
9550 
9551 
9552 
9553 
9554 /* These should be used by the application to tell why we should retry */
9555 
9556 
9557 
9558 
9559 
9560 
9561 /*
9562  * The next three are used in conjunction with the BIO_should_io_special()
9563  * condition.  After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
9564  * *reason); will walk the BIO stack and return the 'reason' for the special
9565  * and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
9566  * the code.
9567  */
9568 /*
9569  * Returned from the SSL bio when the certificate retrieval code had an error
9570  */
9571 
9572 /* Returned from the connect BIO when a connect would have blocked */
9573 
9574 /* Returned from the accept BIO when an accept would have blocked */
9575 
9576 
9577 /* These are passed by the BIO callback */
9578 
9579 
9580 
9581 
9582 
9583 
9584 
9585 /*
9586  * The callback is called before and after the underling operation, The
9587  * BIO_CB_RETURN flag indicates if it is after the call
9588  */
9589 
9590 
9591 
9592 
9593 
9594 long (*BIO_get_callback(const BIO *b)) (struct bio_st *, int, const char *,
9595                                         int, long, long);
9596 void BIO_set_callback(BIO *b,
9597                       long (*callback) (struct bio_st *, int, const char *,
9598                                         int, long, long));
9599 char *BIO_get_callback_arg(const BIO *b);
9600 void BIO_set_callback_arg(BIO *b, char *arg);
9601 
9602 const char *BIO_method_name(const BIO *b);
9603 int BIO_method_type(const BIO *b);
9604 
9605 typedef void bio_info_cb (struct bio_st *, int, const char *, int, long,
9606                           long);
9607 
9608 typedef struct bio_method_st {
9609     int type;
9610     const char *name;
9611     int (*bwrite) (BIO *, const char *, int);
9612     int (*bread) (BIO *, char *, int);
9613     int (*bputs) (BIO *, const char *);
9614     int (*bgets) (BIO *, char *, int);
9615     long (*ctrl) (BIO *, int, long, void *);
9616     int (*create) (BIO *);
9617     int (*destroy) (BIO *);
9618     long (*callback_ctrl) (BIO *, int, bio_info_cb *);
9619 } BIO_METHOD;
9620 
9621 struct bio_st {
9622     BIO_METHOD *method;
9623     /* bio, mode, argp, argi, argl, ret */
9624     long (*callback) (struct bio_st *, int, const char *, int, long, long);
9625     char *cb_arg; /* first argument for the callback */
9626     int init;
9627     int shutdown;
9628     int flags; /* extra storage */
9629     int retry_reason;
9630     int num;
9631     void *ptr;
9632     struct bio_st *next_bio; /* used by filter BIOs */
9633     struct bio_st *prev_bio; /* used by filter BIOs */
9634     int references;
9635     unsigned long num_read;
9636     unsigned long num_write;
9637     CRYPTO_EX_DATA ex_data;
9638 };
9639 
9640 struct stack_st_BIO { _STACK stack; };
9641 
9642 typedef struct bio_f_buffer_ctx_struct {
9643     /*-
9644      * Buffers are setup like this:
9645      *
9646      * <---------------------- size ----------------------->
9647      * +---------------------------------------------------+
9648      * | consumed | remaining          | free space        |
9649      * +---------------------------------------------------+
9650      * <-- off --><------- len ------->
9651      */
9652     /*- BIO *bio; *//*
9653      * this is now in the BIO struct
9654      */
9655     int ibuf_size; /* how big is the input buffer */
9656     int obuf_size; /* how big is the output buffer */
9657     char *ibuf; /* the char array */
9658     int ibuf_len; /* how many bytes are in it */
9659     int ibuf_off; /* write/read offset */
9660     char *obuf; /* the char array */
9661     int obuf_len; /* how many bytes are in it */
9662     int obuf_off; /* write/read offset */
9663 } BIO_F_BUFFER_CTX;
9664 
9665 /* Prefix and suffix callback in ASN1 BIO */
9666 typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
9667                           void *parg);
9668 # 398 "/usr/include/openssl/bio.h" 3 4
9669 /* connect BIO stuff */
9670 # 407 "/usr/include/openssl/bio.h" 3 4
9671 /*
9672  * #define BIO_CONN_get_param_hostname BIO_ctrl
9673  */
9674 # 474 "/usr/include/openssl/bio.h" 3 4
9675 /* BIO_s_connect() and BIO_s_socks4a_connect() */
9676 # 486 "/usr/include/openssl/bio.h" 3 4
9677 /* BIO_s_accept() */
9678 
9679 
9680 /* #define BIO_set_nbio(b,n)    BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
9681 # 499 "/usr/include/openssl/bio.h" 3 4
9682 /* BIO_s_accept() and BIO_s_connect() */
9683 
9684 
9685 
9686 
9687 /* BIO_s_proxy_client() */
9688 
9689 
9690 /* BIO_set_nbio(b,n) */
9691 
9692 /* BIO *BIO_get_filter_bio(BIO *bio); */
9693 # 519 "/usr/include/openssl/bio.h" 3 4
9694 /* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
9695 
9696 
9697 
9698 /* BIO_s_file() */
9699 
9700 
9701 
9702 /* BIO_s_fd() and BIO_s_file() */
9703 
9704 
9705 
9706 /*
9707  * name is cast to lose const, but might be better to route through a
9708  * function so we can do it safely
9709  */
9710 # 552 "/usr/include/openssl/bio.h" 3 4
9711 /*
9712  * WARNING WARNING, this ups the reference count on the read bio of the SSL
9713  * structure.  This is because the ssl read BIO is now pointed to by the
9714  * next_bio field in the bio.  So when you free the BIO, make sure you are
9715  * doing a BIO_free_all() to catch the underlying BIO.
9716  */
9717 # 568 "/usr/include/openssl/bio.h" 3 4
9718 /* defined in evp.h */
9719 /* #define BIO_set_md(b,md)     BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */
9720 
9721 
9722 
9723 
9724 
9725 
9726 
9727 /* For the BIO_f_buffer() type */
9728 
9729 
9730 
9731 
9732 
9733 
9734 /* Don't use the next one unless you know what you are doing :-) */
9735 # 593 "/usr/include/openssl/bio.h" 3 4
9736 /* ...pending macros have inappropriate return type */
9737 size_t BIO_ctrl_pending(BIO *b);
9738 size_t BIO_ctrl_wpending(BIO *b);
9739 
9740 
9741 
9742 
9743 
9744 /* For the BIO_f_buffer() type */
9745 
9746 
9747 /* For BIO_s_bio() */
9748 
9749 
9750 
9751 
9752 
9753 /* macros with inappropriate type -- but ...pending macros use int too: */
9754 
9755 
9756 size_t BIO_ctrl_get_write_guarantee(BIO *b);
9757 size_t BIO_ctrl_get_read_request(BIO *b);
9758 int BIO_ctrl_reset_read_request(BIO *b);
9759 
9760 /* ctrl macros for dgram */
9761 # 633 "/usr/include/openssl/bio.h" 3 4
9762 /* These two aren't currently implemented */
9763 /* int BIO_get_ex_num(BIO *bio); */
9764 /* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */
9765 int BIO_set_ex_data(BIO *bio, int idx, void *data);
9766 void *BIO_get_ex_data(BIO *bio, int idx);
9767 int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
9768                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
9769 unsigned long BIO_number_read(BIO *bio);
9770 unsigned long BIO_number_written(BIO *bio);
9771 
9772 /* For BIO_f_asn1() */
9773 int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
9774                         asn1_ps_func *prefix_free);
9775 int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
9776                         asn1_ps_func **pprefix_free);
9777 int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
9778                         asn1_ps_func *suffix_free);
9779 int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
9780                         asn1_ps_func **psuffix_free);
9781 
9782 
9783 BIO_METHOD *BIO_s_file(void);
9784 BIO *BIO_new_file(const char *filename, const char *mode);
9785 BIO *BIO_new_fp(FILE *stream, int close_flag);
9786 
9787 
9788 BIO *BIO_new(BIO_METHOD *type);
9789 int BIO_set(BIO *a, BIO_METHOD *type);
9790 int BIO_free(BIO *a);
9791 void BIO_vfree(BIO *a);
9792 int BIO_read(BIO *b, void *data, int len);
9793 int BIO_gets(BIO *bp, char *buf, int size);
9794 int BIO_write(BIO *b, const void *data, int len);
9795 int BIO_puts(BIO *bp, const char *buf);
9796 int BIO_indent(BIO *b, int indent, int max);
9797 long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
9798 long BIO_callback_ctrl(BIO *b, int cmd,
9799                        void (*fp) (struct bio_st *, int, const char *, int,
9800                                    long, long));
9801 char *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
9802 long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
9803 BIO *BIO_push(BIO *b, BIO *append);
9804 BIO *BIO_pop(BIO *b);
9805 void BIO_free_all(BIO *a);
9806 BIO *BIO_find_type(BIO *b, int bio_type);
9807 BIO *BIO_next(BIO *b);
9808 BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
9809 int BIO_get_retry_reason(BIO *bio);
9810 BIO *BIO_dup_chain(BIO *in);
9811 
9812 int BIO_nread0(BIO *bio, char **buf);
9813 int BIO_nread(BIO *bio, char **buf, int num);
9814 int BIO_nwrite0(BIO *bio, char **buf);
9815 int BIO_nwrite(BIO *bio, char **buf, int num);
9816 
9817 long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
9818                         long argl, long ret);
9819 
9820 BIO_METHOD *BIO_s_mem(void);
9821 BIO *BIO_new_mem_buf(const void *buf, int len);
9822 BIO_METHOD *BIO_s_socket(void);
9823 BIO_METHOD *BIO_s_connect(void);
9824 BIO_METHOD *BIO_s_accept(void);
9825 BIO_METHOD *BIO_s_fd(void);
9826 
9827 BIO_METHOD *BIO_s_log(void);
9828 
9829 BIO_METHOD *BIO_s_bio(void);
9830 BIO_METHOD *BIO_s_null(void);
9831 BIO_METHOD *BIO_f_null(void);
9832 BIO_METHOD *BIO_f_buffer(void);
9833 
9834 
9835 
9836 BIO_METHOD *BIO_f_nbio_test(void);
9837 
9838 BIO_METHOD *BIO_s_datagram(void);
9839 
9840 
9841 
9842 
9843 
9844 /* BIO_METHOD *BIO_f_ber(void); */
9845 
9846 int BIO_sock_should_retry(int i);
9847 int BIO_sock_non_fatal_error(int error);
9848 int BIO_dgram_non_fatal_error(int error);
9849 
9850 int BIO_fd_should_retry(int i);
9851 int BIO_fd_non_fatal_error(int error);
9852 int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
9853                 void *u, const char *s, int len);
9854 int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
9855                        void *u, const char *s, int len, int indent);
9856 int BIO_dump(BIO *b, const char *bytes, int len);
9857 int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent);
9858 
9859 int BIO_dump_fp(FILE *fp, const char *s, int len);
9860 int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
9861 
9862 int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data,
9863                    int datalen);
9864 
9865 struct hostent *BIO_gethostbyname(const char *name);
9866 /*-
9867  * We might want a thread-safe interface too:
9868  * struct hostent *BIO_gethostbyname_r(const char *name,
9869  *     struct hostent *result, void *buffer, size_t buflen);
9870  * or something similar (caller allocates a struct hostent,
9871  * pointed to by "result", and additional buffer space for the various
9872  * substructures; if the buffer does not suffice, NULL is returned
9873  * and an appropriate error code is set).
9874  */
9875 int BIO_sock_error(int sock);
9876 int BIO_socket_ioctl(int fd, long type, void *arg);
9877 int BIO_socket_nbio(int fd, int mode);
9878 int BIO_get_port(const char *str, unsigned short *port_ptr);
9879 int BIO_get_host_ip(const char *str, unsigned char *ip);
9880 int BIO_get_accept_socket(char *host_port, int mode);
9881 int BIO_accept(int sock, char **ip_port);
9882 int BIO_sock_init(void);
9883 void BIO_sock_cleanup(void);
9884 int BIO_set_tcp_ndelay(int sock, int turn_on);
9885 
9886 BIO *BIO_new_socket(int sock, int close_flag);
9887 BIO *BIO_new_dgram(int fd, int close_flag);
9888 # 771 "/usr/include/openssl/bio.h" 3 4
9889 BIO *BIO_new_fd(int fd, int close_flag);
9890 BIO *BIO_new_connect(const char *host_port);
9891 BIO *BIO_new_accept(const char *host_port);
9892 
9893 int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
9894                      BIO **bio2, size_t writebuf2);
9895 /*
9896  * If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
9897  * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
9898  * value.
9899  */
9900 
9901 void BIO_copy_next_retry(BIO *b);
9902 
9903 /*
9904  * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
9905  */
9906 
9907 
9908 
9909 
9910 
9911 
9912 int BIO_printf(BIO *bio, const char *format, ...)
9913 __attribute__((__format__(__printf__, 2, 3)));
9914 int BIO_vprintf(BIO *bio, const char *format, va_list args)
9915 __attribute__((__format__(__printf__, 2, 0)));
9916 int BIO_snprintf(char *buf, size_t n, const char *format, ...)
9917 __attribute__((__format__(__printf__, 3, 4)));
9918 int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
9919 __attribute__((__format__(__printf__, 3, 0)));
9920 
9921 
9922 /* BEGIN ERROR CODES */
9923 /*
9924  * The following lines are auto generated by the script mkerr.pl. Any changes
9925  * made after this point may be overwritten when the script is next run.
9926  */
9927 void ERR_load_BIO_strings(void);
9928 
9929 /* Error codes for the BIO functions. */
9930 
9931 /* Function codes. */
9932 # 849 "/usr/include/openssl/bio.h" 3 4
9933 /* Reason codes. */
9934 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
9935 # 1 "/usr/include/openssl/x509.h" 1 3 4
9936 /* crypto/x509/x509.h */
9937 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
9938  * All rights reserved.
9939  *
9940  * This package is an SSL implementation written
9941  * by Eric Young (eay@cryptsoft.com).
9942  * The implementation was written so as to conform with Netscapes SSL.
9943  *
9944  * This library is free for commercial and non-commercial use as long as
9945  * the following conditions are aheared to.  The following conditions
9946  * apply to all code found in this distribution, be it the RC4, RSA,
9947  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
9948  * included with this distribution is covered by the same copyright terms
9949  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
9950  *
9951  * Copyright remains Eric Young's, and as such any Copyright notices in
9952  * the code are not to be removed.
9953  * If this package is used in a product, Eric Young should be given attribution
9954  * as the author of the parts of the library used.
9955  * This can be in the form of a textual message at program startup or
9956  * in documentation (online or textual) provided with the package.
9957  *
9958  * Redistribution and use in source and binary forms, with or without
9959  * modification, are permitted provided that the following conditions
9960  * are met:
9961  * 1. Redistributions of source code must retain the copyright
9962  *    notice, this list of conditions and the following disclaimer.
9963  * 2. Redistributions in binary form must reproduce the above copyright
9964  *    notice, this list of conditions and the following disclaimer in the
9965  *    documentation and/or other materials provided with the distribution.
9966  * 3. All advertising materials mentioning features or use of this software
9967  *    must display the following acknowledgement:
9968  *    "This product includes cryptographic software written by
9969  *     Eric Young (eay@cryptsoft.com)"
9970  *    The word 'cryptographic' can be left out if the rouines from the library
9971  *    being used are not cryptographic related :-).
9972  * 4. If you include any Windows specific code (or a derivative thereof) from
9973  *    the apps directory (application code) you must include an acknowledgement:
9974  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
9975  *
9976  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
9977  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9978  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9979  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9980  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9981  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9982  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9983  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9984  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9985  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9986  * SUCH DAMAGE.
9987  *
9988  * The licence and distribution terms for any publically available version or
9989  * derivative of this code cannot be changed.  i.e. this code cannot simply be
9990  * copied and put under another distribution licence
9991  * [including the GNU Public Licence.]
9992  */
9993 /* ====================================================================
9994  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
9995  * ECDH support in OpenSSL originally developed by
9996  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
9997  */
9998 
9999 
10000 
10001 
10002 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
10003 /* e_os2.h */
10004 /* ====================================================================
10005  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
10006  *
10007  * Redistribution and use in source and binary forms, with or without
10008  * modification, are permitted provided that the following conditions
10009  * are met:
10010  *
10011  * 1. Redistributions of source code must retain the above copyright
10012  *    notice, this list of conditions and the following disclaimer.
10013  *
10014  * 2. Redistributions in binary form must reproduce the above copyright
10015  *    notice, this list of conditions and the following disclaimer in
10016  *    the documentation and/or other materials provided with the
10017  *    distribution.
10018  *
10019  * 3. All advertising materials mentioning features or use of this
10020  *    software must display the following acknowledgment:
10021  *    "This product includes software developed by the OpenSSL Project
10022  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10023  *
10024  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10025  *    endorse or promote products derived from this software without
10026  *    prior written permission. For written permission, please contact
10027  *    openssl-core@openssl.org.
10028  *
10029  * 5. Products derived from this software may not be called "OpenSSL"
10030  *    nor may "OpenSSL" appear in their names without prior written
10031  *    permission of the OpenSSL Project.
10032  *
10033  * 6. Redistributions of any form whatsoever must retain the following
10034  *    acknowledgment:
10035  *    "This product includes software developed by the OpenSSL Project
10036  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10037  *
10038  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10039  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10040  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10041  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10042  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10043  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10044  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10045  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10046  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10047  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10048  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10049  * OF THE POSSIBILITY OF SUCH DAMAGE.
10050  * ====================================================================
10051  *
10052  * This product includes cryptographic software written by Eric Young
10053  * (eay@cryptsoft.com).  This product includes software written by Tim
10054  * Hudson (tjh@cryptsoft.com).
10055  *
10056  */
10057 
10058 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
10059 /* opensslconf.h */
10060 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
10061 
10062 
10063 
10064 
10065 /* OpenSSL was configured with the following options: */
10066 # 108 "/usr/include/openssl/opensslconf.h" 3 4
10067 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
10068    asks for it.  This is a transient feature that is provided for those
10069    who haven't had the time to do the appropriate changes in their
10070    applications.  */
10071 # 204 "/usr/include/openssl/opensslconf.h" 3 4
10072 /* crypto/opensslconf.h.in */
10073 
10074 /* Generate 80386 code? */
10075 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
10076 # 68 "/usr/include/openssl/x509.h" 2 3 4
10077 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
10078 /* ====================================================================
10079  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
10080  *
10081  * Redistribution and use in source and binary forms, with or without
10082  * modification, are permitted provided that the following conditions
10083  * are met:
10084  *
10085  * 1. Redistributions of source code must retain the above copyright
10086  *    notice, this list of conditions and the following disclaimer.
10087  *
10088  * 2. Redistributions in binary form must reproduce the above copyright
10089  *    notice, this list of conditions and the following disclaimer in
10090  *    the documentation and/or other materials provided with the
10091  *    distribution.
10092  *
10093  * 3. All advertising materials mentioning features or use of this
10094  *    software must display the following acknowledgment:
10095  *    "This product includes software developed by the OpenSSL Project
10096  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10097  *
10098  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10099  *    endorse or promote products derived from this software without
10100  *    prior written permission. For written permission, please contact
10101  *    openssl-core@openssl.org.
10102  *
10103  * 5. Products derived from this software may not be called "OpenSSL"
10104  *    nor may "OpenSSL" appear in their names without prior written
10105  *    permission of the OpenSSL Project.
10106  *
10107  * 6. Redistributions of any form whatsoever must retain the following
10108  *    acknowledgment:
10109  *    "This product includes software developed by the OpenSSL Project
10110  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10111  *
10112  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10113  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10114  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10115  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10116  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10117  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10118  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10119  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10120  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10121  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10122  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10123  * OF THE POSSIBILITY OF SUCH DAMAGE.
10124  * ====================================================================
10125  *
10126  * This product includes cryptographic software written by Eric Young
10127  * (eay@cryptsoft.com).  This product includes software written by Tim
10128  * Hudson (tjh@cryptsoft.com).
10129  *
10130  */
10131 # 69 "/usr/include/openssl/x509.h" 2 3 4
10132 
10133 # 1 "/usr/include/openssl/buffer.h" 1 3 4
10134 /* crypto/buffer/buffer.h */
10135 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10136  * All rights reserved.
10137  *
10138  * This package is an SSL implementation written
10139  * by Eric Young (eay@cryptsoft.com).
10140  * The implementation was written so as to conform with Netscapes SSL.
10141  *
10142  * This library is free for commercial and non-commercial use as long as
10143  * the following conditions are aheared to.  The following conditions
10144  * apply to all code found in this distribution, be it the RC4, RSA,
10145  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10146  * included with this distribution is covered by the same copyright terms
10147  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10148  *
10149  * Copyright remains Eric Young's, and as such any Copyright notices in
10150  * the code are not to be removed.
10151  * If this package is used in a product, Eric Young should be given attribution
10152  * as the author of the parts of the library used.
10153  * This can be in the form of a textual message at program startup or
10154  * in documentation (online or textual) provided with the package.
10155  *
10156  * Redistribution and use in source and binary forms, with or without
10157  * modification, are permitted provided that the following conditions
10158  * are met:
10159  * 1. Redistributions of source code must retain the copyright
10160  *    notice, this list of conditions and the following disclaimer.
10161  * 2. Redistributions in binary form must reproduce the above copyright
10162  *    notice, this list of conditions and the following disclaimer in the
10163  *    documentation and/or other materials provided with the distribution.
10164  * 3. All advertising materials mentioning features or use of this software
10165  *    must display the following acknowledgement:
10166  *    "This product includes cryptographic software written by
10167  *     Eric Young (eay@cryptsoft.com)"
10168  *    The word 'cryptographic' can be left out if the rouines from the library
10169  *    being used are not cryptographic related :-).
10170  * 4. If you include any Windows specific code (or a derivative thereof) from
10171  *    the apps directory (application code) you must include an acknowledgement:
10172  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10173  *
10174  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10175  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10176  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10177  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10178  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10179  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10180  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10181  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10182  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10183  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10184  * SUCH DAMAGE.
10185  *
10186  * The licence and distribution terms for any publically available version or
10187  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10188  * copied and put under another distribution licence
10189  * [including the GNU Public Licence.]
10190  */
10191 
10192 
10193 
10194 
10195 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
10196 /* ====================================================================
10197  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
10198  *
10199  * Redistribution and use in source and binary forms, with or without
10200  * modification, are permitted provided that the following conditions
10201  * are met:
10202  *
10203  * 1. Redistributions of source code must retain the above copyright
10204  *    notice, this list of conditions and the following disclaimer.
10205  *
10206  * 2. Redistributions in binary form must reproduce the above copyright
10207  *    notice, this list of conditions and the following disclaimer in
10208  *    the documentation and/or other materials provided with the
10209  *    distribution.
10210  *
10211  * 3. All advertising materials mentioning features or use of this
10212  *    software must display the following acknowledgment:
10213  *    "This product includes software developed by the OpenSSL Project
10214  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10215  *
10216  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10217  *    endorse or promote products derived from this software without
10218  *    prior written permission. For written permission, please contact
10219  *    openssl-core@openssl.org.
10220  *
10221  * 5. Products derived from this software may not be called "OpenSSL"
10222  *    nor may "OpenSSL" appear in their names without prior written
10223  *    permission of the OpenSSL Project.
10224  *
10225  * 6. Redistributions of any form whatsoever must retain the following
10226  *    acknowledgment:
10227  *    "This product includes software developed by the OpenSSL Project
10228  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10229  *
10230  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10231  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10232  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10233  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10234  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10235  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10236  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10237  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10238  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10239  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10240  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10241  * OF THE POSSIBILITY OF SUCH DAMAGE.
10242  * ====================================================================
10243  *
10244  * This product includes cryptographic software written by Eric Young
10245  * (eay@cryptsoft.com).  This product includes software written by Tim
10246  * Hudson (tjh@cryptsoft.com).
10247  *
10248  */
10249 # 63 "/usr/include/openssl/buffer.h" 2 3 4
10250 
10251 
10252 
10253 
10254 
10255 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
10256 /*
10257  * CDDL HEADER START
10258  *
10259  * The contents of this file are subject to the terms of the
10260  * Common Development and Distribution License, Version 1.0 only
10261  * (the "License").  You may not use this file except in compliance
10262  * with the License.
10263  *
10264  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10265  * or http://www.opensolaris.org/os/licensing.
10266  * See the License for the specific language governing permissions
10267  * and limitations under the License.
10268  *
10269  * When distributing Covered Code, include this CDDL HEADER in each
10270  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10271  * If applicable, add the following below this CDDL HEADER, with the
10272  * fields enclosed by brackets "[]" replaced with your own identifying
10273  * information: Portions Copyright [yyyy] [name of copyright owner]
10274  *
10275  * CDDL HEADER END
10276  */
10277 /*	Copyright (c) 1988 AT&T	*/
10278 /*	  All Rights Reserved  	*/
10279 
10280 
10281 /*
10282  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
10283  * Use is subject to license terms.
10284  */
10285 
10286 
10287 
10288 
10289 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
10290 /*
10291  * CDDL HEADER START
10292  *
10293  * The contents of this file are subject to the terms of the
10294  * Common Development and Distribution License (the "License").
10295  * You may not use this file except in compliance with the License.
10296  *
10297  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10298  * or http://www.opensolaris.org/os/licensing.
10299  * See the License for the specific language governing permissions
10300  * and limitations under the License.
10301  *
10302  *
10303  * When distributing Covered Code, include this CDDL HEADER in each
10304  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10305  * If applicable, add the following below this CDDL HEADER, with the
10306  * fields enclosed by brackets "[]" replaced with your own identifying
10307  * information: Portions Copyright [yyyy] [name of copyright owner]
10308  *
10309  * CDDL HEADER END
10310  */
10311 
10312 /*
10313  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
10314  * Use is subject to license terms.
10315  * Copyright 2016 Joyent, Inc.
10316  */
10317 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
10318 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 1 3 4
10319 /*
10320  * CDDL HEADER START
10321  *
10322  * The contents of this file are subject to the terms of the
10323  * Common Development and Distribution License, Version 1.0 only
10324  * (the "License").  You may not use this file except in compliance
10325  * with the License.
10326  *
10327  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10328  * or http://www.opensolaris.org/os/licensing.
10329  * See the License for the specific language governing permissions
10330  * and limitations under the License.
10331  *
10332  * When distributing Covered Code, include this CDDL HEADER in each
10333  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10334  * If applicable, add the following below this CDDL HEADER, with the
10335  * fields enclosed by brackets "[]" replaced with your own identifying
10336  * information: Portions Copyright [yyyy] [name of copyright owner]
10337  *
10338  * CDDL HEADER END
10339  */
10340 /*	Copyright (c) 1988 AT&T	*/
10341 /*	  All Rights Reserved  	*/
10342 
10343 
10344 /*
10345  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
10346  * Use is subject to license terms.
10347  */
10348 
10349 /*
10350  * Copyright 2014 PALO, Richard.
10351  * Copyright 2016 Joyent, Inc.
10352  */
10353 
10354 /*
10355  * An application should not include this header directly.  Instead it
10356  * should be included only through the inclusion of other Sun headers.
10357  *
10358  * The contents of this header is limited to identifiers specified in the
10359  * C Standard.  Any new identifiers specified in future amendments to the
10360  * C Standard must be placed in this header.  If these new identifiers
10361  * are required to also be in the C++ Standard "std" namespace, then for
10362  * anything other than macro definitions, corresponding "using" directives
10363  * must also be added to <stddef.h.h>.
10364  */
10365 
10366 
10367 
10368 
10369 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
10370 /*
10371  * CDDL HEADER START
10372  *
10373  * The contents of this file are subject to the terms of the
10374  * Common Development and Distribution License (the "License").
10375  * You may not use this file except in compliance with the License.
10376  *
10377  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10378  * or http://www.opensolaris.org/os/licensing.
10379  * See the License for the specific language governing permissions
10380  * and limitations under the License.
10381  *
10382  *
10383  * When distributing Covered Code, include this CDDL HEADER in each
10384  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10385  * If applicable, add the following below this CDDL HEADER, with the
10386  * fields enclosed by brackets "[]" replaced with your own identifying
10387  * information: Portions Copyright [yyyy] [name of copyright owner]
10388  *
10389  * CDDL HEADER END
10390  */
10391 
10392 /*
10393  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
10394  * Use is subject to license terms.
10395  * Copyright 2016 Joyent, Inc.
10396  */
10397 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
10398 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
10399 /*
10400  * CDDL HEADER START
10401  *
10402  * The contents of this file are subject to the terms of the
10403  * Common Development and Distribution License (the "License").
10404  * You may not use this file except in compliance with the License.
10405  *
10406  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10407  * or http://www.opensolaris.org/os/licensing.
10408  * See the License for the specific language governing permissions
10409  * and limitations under the License.
10410  *
10411  * When distributing Covered Code, include this CDDL HEADER in each
10412  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10413  * If applicable, add the following below this CDDL HEADER, with the
10414  * fields enclosed by brackets "[]" replaced with your own identifying
10415  * information: Portions Copyright [yyyy] [name of copyright owner]
10416  *
10417  * CDDL HEADER END
10418  */
10419 
10420 /*
10421  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
10422  * Copyright 2016 Joyent, Inc.
10423  *
10424  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
10425  * Use is subject to license terms.
10426  */
10427 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
10428 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1 3 4
10429 /*
10430  * This file and its contents are supplied under the terms of the
10431  * Common Development and Distribution License ("CDDL"), version 1.0.
10432  * You may only use this file in accordance with the terms of version
10433  * 1.0 of the CDDL.
10434  *
10435  * A full copy of the text of the CDDL should have accompanied this
10436  * source.  A copy of the CDDL is also available via the Internet at
10437  * http://www.illumos.org/license/CDDL.
10438  */
10439 
10440 /*
10441  * Copyright 2014-2016 PALO, Richard.
10442  */
10443 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
10444 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 3 4
10445 typedef long max_align_t;
10446 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
10447 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 1 3 4
10448 /*
10449  * This file and its contents are supplied under the terms of the
10450  * Common Development and Distribution License ("CDDL"), version 1.0.
10451  * You may only use this file in accordance with the terms of version
10452  * 1.0 of the CDDL.
10453  *
10454  * A full copy of the text of the CDDL should have accompanied this
10455  * source.  A copy of the CDDL is also available via the Internet at
10456  * http://www.illumos.org/license/CDDL.
10457  */
10458 
10459 /*
10460  * Copyright 2017 Toomas Soome <tsoome@me.com>
10461  */
10462 
10463 
10464 
10465 
10466 /*
10467  * Commonly used macros and definitions.
10468  */
10469 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 3 4
10470 /*
10471  * We must not expose container_of() to userland, but we want it
10472  * to be available for early boot and for the kernel.
10473  */
10474 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
10475 
10476 /*
10477  * Allow global visibility for symbols defined in
10478  * C++ "std" namespace in <iso/stddef_iso.h>.
10479  */
10480 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 3 4
10481 /*
10482  * wchar_t is a built-in type in standard C++ and as such is not
10483  * defined here when using standard C++. However, the GNU compiler
10484  * fixincludes utility nonetheless creates its own version of this
10485  * header for use by gcc and g++. In that version it adds a redundant
10486  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
10487  * header we need to include the following magic comment:
10488  *
10489  * we must use the C++ compiler's type
10490  *
10491  * The above comment should not be removed or changed until GNU
10492  * gcc/fixinc/inclhack.def is updated to bypass this header.
10493  */
10494 # 69 "/usr/include/openssl/buffer.h" 2 3 4
10495 
10496 
10497 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1 3 4
10498 /*
10499  * CDDL HEADER START
10500  *
10501  * The contents of this file are subject to the terms of the
10502  * Common Development and Distribution License (the "License").
10503  * You may not use this file except in compliance with the License.
10504  *
10505  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10506  * or http://www.opensolaris.org/os/licensing.
10507  * See the License for the specific language governing permissions
10508  * and limitations under the License.
10509  *
10510  * When distributing Covered Code, include this CDDL HEADER in each
10511  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10512  * If applicable, add the following below this CDDL HEADER, with the
10513  * fields enclosed by brackets "[]" replaced with your own identifying
10514  * information: Portions Copyright [yyyy] [name of copyright owner]
10515  *
10516  * CDDL HEADER END
10517  */
10518 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10519 /*	  All Rights Reserved  	*/
10520 
10521 
10522 /*
10523  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
10524  * Use is subject to license terms.
10525  *
10526  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
10527  * Copyright 2016 Joyent, Inc.
10528  */
10529 # 72 "/usr/include/openssl/buffer.h" 2 3 4
10530 
10531 
10532 /* Already declared in ossl_typ.h */
10533 /* typedef struct buf_mem_st BUF_MEM; */
10534 
10535 struct buf_mem_st {
10536     size_t length; /* current number of bytes */
10537     char *data;
10538     size_t max; /* size of buffer */
10539 };
10540 
10541 BUF_MEM *BUF_MEM_new(void);
10542 void BUF_MEM_free(BUF_MEM *a);
10543 int BUF_MEM_grow(BUF_MEM *str, size_t len);
10544 int BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
10545 size_t BUF_strnlen(const char *str, size_t maxlen);
10546 char *BUF_strdup(const char *str);
10547 
10548 /*
10549  * Like strndup, but in addition, explicitly guarantees to never read past the
10550  * first |siz| bytes of |str|.
10551  */
10552 char *BUF_strndup(const char *str, size_t siz);
10553 
10554 void *BUF_memdup(const void *data, size_t siz);
10555 void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
10556 
10557 /* safe string functions */
10558 size_t BUF_strlcpy(char *dst, const char *src, size_t siz);
10559 size_t BUF_strlcat(char *dst, const char *src, size_t siz);
10560 
10561 /* BEGIN ERROR CODES */
10562 /*
10563  * The following lines are auto generated by the script mkerr.pl. Any changes
10564  * made after this point may be overwritten when the script is next run.
10565  */
10566 void ERR_load_BUF_strings(void);
10567 
10568 /* Error codes for the BUF functions. */
10569 
10570 /* Function codes. */
10571 
10572 
10573 
10574 
10575 
10576 
10577 
10578 /* Reason codes. */
10579 # 71 "/usr/include/openssl/x509.h" 2 3 4
10580 
10581 
10582 # 1 "/usr/include/openssl/evp.h" 1 3 4
10583 /* crypto/evp/evp.h */
10584 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10585  * All rights reserved.
10586  *
10587  * This package is an SSL implementation written
10588  * by Eric Young (eay@cryptsoft.com).
10589  * The implementation was written so as to conform with Netscapes SSL.
10590  *
10591  * This library is free for commercial and non-commercial use as long as
10592  * the following conditions are aheared to.  The following conditions
10593  * apply to all code found in this distribution, be it the RC4, RSA,
10594  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10595  * included with this distribution is covered by the same copyright terms
10596  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10597  *
10598  * Copyright remains Eric Young's, and as such any Copyright notices in
10599  * the code are not to be removed.
10600  * If this package is used in a product, Eric Young should be given attribution
10601  * as the author of the parts of the library used.
10602  * This can be in the form of a textual message at program startup or
10603  * in documentation (online or textual) provided with the package.
10604  *
10605  * Redistribution and use in source and binary forms, with or without
10606  * modification, are permitted provided that the following conditions
10607  * are met:
10608  * 1. Redistributions of source code must retain the copyright
10609  *    notice, this list of conditions and the following disclaimer.
10610  * 2. Redistributions in binary form must reproduce the above copyright
10611  *    notice, this list of conditions and the following disclaimer in the
10612  *    documentation and/or other materials provided with the distribution.
10613  * 3. All advertising materials mentioning features or use of this software
10614  *    must display the following acknowledgement:
10615  *    "This product includes cryptographic software written by
10616  *     Eric Young (eay@cryptsoft.com)"
10617  *    The word 'cryptographic' can be left out if the rouines from the library
10618  *    being used are not cryptographic related :-).
10619  * 4. If you include any Windows specific code (or a derivative thereof) from
10620  *    the apps directory (application code) you must include an acknowledgement:
10621  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10622  *
10623  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10624  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10625  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10626  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10627  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10628  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10629  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10630  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10631  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10632  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10633  * SUCH DAMAGE.
10634  *
10635  * The licence and distribution terms for any publically available version or
10636  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10637  * copied and put under another distribution licence
10638  * [including the GNU Public Licence.]
10639  */
10640 # 66 "/usr/include/openssl/evp.h" 3 4
10641 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
10642 /* opensslconf.h */
10643 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
10644 
10645 
10646 
10647 
10648 /* OpenSSL was configured with the following options: */
10649 # 108 "/usr/include/openssl/opensslconf.h" 3 4
10650 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
10651    asks for it.  This is a transient feature that is provided for those
10652    who haven't had the time to do the appropriate changes in their
10653    applications.  */
10654 # 204 "/usr/include/openssl/opensslconf.h" 3 4
10655 /* crypto/opensslconf.h.in */
10656 
10657 /* Generate 80386 code? */
10658 # 67 "/usr/include/openssl/evp.h" 2 3 4
10659 
10660 
10661 
10662 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
10663 /* ====================================================================
10664  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
10665  *
10666  * Redistribution and use in source and binary forms, with or without
10667  * modification, are permitted provided that the following conditions
10668  * are met:
10669  *
10670  * 1. Redistributions of source code must retain the above copyright
10671  *    notice, this list of conditions and the following disclaimer.
10672  *
10673  * 2. Redistributions in binary form must reproduce the above copyright
10674  *    notice, this list of conditions and the following disclaimer in
10675  *    the documentation and/or other materials provided with the
10676  *    distribution.
10677  *
10678  * 3. All advertising materials mentioning features or use of this
10679  *    software must display the following acknowledgment:
10680  *    "This product includes software developed by the OpenSSL Project
10681  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10682  *
10683  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10684  *    endorse or promote products derived from this software without
10685  *    prior written permission. For written permission, please contact
10686  *    openssl-core@openssl.org.
10687  *
10688  * 5. Products derived from this software may not be called "OpenSSL"
10689  *    nor may "OpenSSL" appear in their names without prior written
10690  *    permission of the OpenSSL Project.
10691  *
10692  * 6. Redistributions of any form whatsoever must retain the following
10693  *    acknowledgment:
10694  *    "This product includes software developed by the OpenSSL Project
10695  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10696  *
10697  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10698  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10699  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10700  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10701  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10702  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10703  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10704  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10705  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10706  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10707  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10708  * OF THE POSSIBILITY OF SUCH DAMAGE.
10709  * ====================================================================
10710  *
10711  * This product includes cryptographic software written by Eric Young
10712  * (eay@cryptsoft.com).  This product includes software written by Tim
10713  * Hudson (tjh@cryptsoft.com).
10714  *
10715  */
10716 # 71 "/usr/include/openssl/evp.h" 2 3 4
10717 
10718 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
10719 /* ====================================================================
10720  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
10721  *
10722  * Redistribution and use in source and binary forms, with or without
10723  * modification, are permitted provided that the following conditions
10724  * are met:
10725  *
10726  * 1. Redistributions of source code must retain the above copyright
10727  *    notice, this list of conditions and the following disclaimer.
10728  *
10729  * 2. Redistributions in binary form must reproduce the above copyright
10730  *    notice, this list of conditions and the following disclaimer in
10731  *    the documentation and/or other materials provided with the
10732  *    distribution.
10733  *
10734  * 3. All advertising materials mentioning features or use of this
10735  *    software must display the following acknowledgment:
10736  *    "This product includes software developed by the OpenSSL Project
10737  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10738  *
10739  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10740  *    endorse or promote products derived from this software without
10741  *    prior written permission. For written permission, please contact
10742  *    openssl-core@openssl.org.
10743  *
10744  * 5. Products derived from this software may not be called "OpenSSL"
10745  *    nor may "OpenSSL" appear in their names without prior written
10746  *    permission of the OpenSSL Project.
10747  *
10748  * 6. Redistributions of any form whatsoever must retain the following
10749  *    acknowledgment:
10750  *    "This product includes software developed by the OpenSSL Project
10751  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10752  *
10753  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10754  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10755  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10756  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10757  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10758  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10759  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10760  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10761  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10762  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10763  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10764  * OF THE POSSIBILITY OF SUCH DAMAGE.
10765  * ====================================================================
10766  *
10767  * This product includes cryptographic software written by Eric Young
10768  * (eay@cryptsoft.com).  This product includes software written by Tim
10769  * Hudson (tjh@cryptsoft.com).
10770  *
10771  */
10772 # 73 "/usr/include/openssl/evp.h" 2 3 4
10773 
10774 
10775 # 1 "/usr/include/openssl/bio.h" 1 3 4
10776 /* crypto/bio/bio.h */
10777 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10778  * All rights reserved.
10779  *
10780  * This package is an SSL implementation written
10781  * by Eric Young (eay@cryptsoft.com).
10782  * The implementation was written so as to conform with Netscapes SSL.
10783  *
10784  * This library is free for commercial and non-commercial use as long as
10785  * the following conditions are aheared to.  The following conditions
10786  * apply to all code found in this distribution, be it the RC4, RSA,
10787  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10788  * included with this distribution is covered by the same copyright terms
10789  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10790  *
10791  * Copyright remains Eric Young's, and as such any Copyright notices in
10792  * the code are not to be removed.
10793  * If this package is used in a product, Eric Young should be given attribution
10794  * as the author of the parts of the library used.
10795  * This can be in the form of a textual message at program startup or
10796  * in documentation (online or textual) provided with the package.
10797  *
10798  * Redistribution and use in source and binary forms, with or without
10799  * modification, are permitted provided that the following conditions
10800  * are met:
10801  * 1. Redistributions of source code must retain the copyright
10802  *    notice, this list of conditions and the following disclaimer.
10803  * 2. Redistributions in binary form must reproduce the above copyright
10804  *    notice, this list of conditions and the following disclaimer in the
10805  *    documentation and/or other materials provided with the distribution.
10806  * 3. All advertising materials mentioning features or use of this software
10807  *    must display the following acknowledgement:
10808  *    "This product includes cryptographic software written by
10809  *     Eric Young (eay@cryptsoft.com)"
10810  *    The word 'cryptographic' can be left out if the rouines from the library
10811  *    being used are not cryptographic related :-).
10812  * 4. If you include any Windows specific code (or a derivative thereof) from
10813  *    the apps directory (application code) you must include an acknowledgement:
10814  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10815  *
10816  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10817  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10818  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10819  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10820  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10821  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10822  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10823  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10824  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10825  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10826  * SUCH DAMAGE.
10827  *
10828  * The licence and distribution terms for any publically available version or
10829  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10830  * copied and put under another distribution licence
10831  * [including the GNU Public Licence.]
10832  */
10833 # 76 "/usr/include/openssl/evp.h" 2 3 4
10834 
10835 
10836 /*-
10837 #define EVP_RC2_KEY_SIZE                16
10838 #define EVP_RC4_KEY_SIZE                16
10839 #define EVP_BLOWFISH_KEY_SIZE           16
10840 #define EVP_CAST5_KEY_SIZE              16
10841 #define EVP_RC5_32_12_16_KEY_SIZE       16
10842 */
10843 
10844 
10845 
10846 
10847 
10848 
10849 /* Default PKCS#5 iteration count */
10850 
10851 
10852 # 1 "/usr/include/openssl/objects.h" 1 3 4
10853 /* crypto/objects/objects.h */
10854 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10855  * All rights reserved.
10856  *
10857  * This package is an SSL implementation written
10858  * by Eric Young (eay@cryptsoft.com).
10859  * The implementation was written so as to conform with Netscapes SSL.
10860  *
10861  * This library is free for commercial and non-commercial use as long as
10862  * the following conditions are aheared to.  The following conditions
10863  * apply to all code found in this distribution, be it the RC4, RSA,
10864  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10865  * included with this distribution is covered by the same copyright terms
10866  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10867  *
10868  * Copyright remains Eric Young's, and as such any Copyright notices in
10869  * the code are not to be removed.
10870  * If this package is used in a product, Eric Young should be given attribution
10871  * as the author of the parts of the library used.
10872  * This can be in the form of a textual message at program startup or
10873  * in documentation (online or textual) provided with the package.
10874  *
10875  * Redistribution and use in source and binary forms, with or without
10876  * modification, are permitted provided that the following conditions
10877  * are met:
10878  * 1. Redistributions of source code must retain the copyright
10879  *    notice, this list of conditions and the following disclaimer.
10880  * 2. Redistributions in binary form must reproduce the above copyright
10881  *    notice, this list of conditions and the following disclaimer in the
10882  *    documentation and/or other materials provided with the distribution.
10883  * 3. All advertising materials mentioning features or use of this software
10884  *    must display the following acknowledgement:
10885  *    "This product includes cryptographic software written by
10886  *     Eric Young (eay@cryptsoft.com)"
10887  *    The word 'cryptographic' can be left out if the rouines from the library
10888  *    being used are not cryptographic related :-).
10889  * 4. If you include any Windows specific code (or a derivative thereof) from
10890  *    the apps directory (application code) you must include an acknowledgement:
10891  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10892  *
10893  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10894  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10895  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10896  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10897  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10898  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10899  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10900  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10901  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10902  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10903  * SUCH DAMAGE.
10904  *
10905  * The licence and distribution terms for any publically available version or
10906  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10907  * copied and put under another distribution licence
10908  * [including the GNU Public Licence.]
10909  */
10910 
10911 
10912 
10913 
10914 
10915 
10916 
10917 # 1 "/usr/include/openssl/obj_mac.h" 1 3 4
10918 /* crypto/objects/obj_mac.h */
10919 
10920 /*
10921  * THIS FILE IS GENERATED FROM objects.txt by objects.pl via the following
10922  * command: perl objects.pl objects.txt obj_mac.num obj_mac.h
10923  */
10924 
10925 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
10926  * All rights reserved.
10927  *
10928  * This package is an SSL implementation written
10929  * by Eric Young (eay@cryptsoft.com).
10930  * The implementation was written so as to conform with Netscapes SSL.
10931  *
10932  * This library is free for commercial and non-commercial use as long as
10933  * the following conditions are aheared to.  The following conditions
10934  * apply to all code found in this distribution, be it the RC4, RSA,
10935  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10936  * included with this distribution is covered by the same copyright terms
10937  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10938  *
10939  * Copyright remains Eric Young's, and as such any Copyright notices in
10940  * the code are not to be removed.
10941  * If this package is used in a product, Eric Young should be given attribution
10942  * as the author of the parts of the library used.
10943  * This can be in the form of a textual message at program startup or
10944  * in documentation (online or textual) provided with the package.
10945  *
10946  * Redistribution and use in source and binary forms, with or without
10947  * modification, are permitted provided that the following conditions
10948  * are met:
10949  * 1. Redistributions of source code must retain the copyright
10950  *    notice, this list of conditions and the following disclaimer.
10951  * 2. Redistributions in binary form must reproduce the above copyright
10952  *    notice, this list of conditions and the following disclaimer in the
10953  *    documentation and/or other materials provided with the distribution.
10954  * 3. All advertising materials mentioning features or use of this software
10955  *    must display the following acknowledgement:
10956  *    "This product includes cryptographic software written by
10957  *     Eric Young (eay@cryptsoft.com)"
10958  *    The word 'cryptographic' can be left out if the rouines from the library
10959  *    being used are not cryptographic related :-).
10960  * 4. If you include any Windows specific code (or a derivative thereof) from
10961  *    the apps directory (application code) you must include an acknowledgement:
10962  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10963  *
10964  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10965  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10966  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10967  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10968  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10969  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10970  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10971  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10972  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10973  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10974  * SUCH DAMAGE.
10975  *
10976  * The licence and distribution terms for any publically available version or
10977  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10978  * copied and put under another distribution licence
10979  * [including the GNU Public Licence.]
10980  */
10981 # 66 "/usr/include/openssl/objects.h" 2 3 4
10982 # 964 "/usr/include/openssl/objects.h" 3 4
10983 # 1 "/usr/include/openssl/bio.h" 1 3 4
10984 /* crypto/bio/bio.h */
10985 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10986  * All rights reserved.
10987  *
10988  * This package is an SSL implementation written
10989  * by Eric Young (eay@cryptsoft.com).
10990  * The implementation was written so as to conform with Netscapes SSL.
10991  *
10992  * This library is free for commercial and non-commercial use as long as
10993  * the following conditions are aheared to.  The following conditions
10994  * apply to all code found in this distribution, be it the RC4, RSA,
10995  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10996  * included with this distribution is covered by the same copyright terms
10997  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10998  *
10999  * Copyright remains Eric Young's, and as such any Copyright notices in
11000  * the code are not to be removed.
11001  * If this package is used in a product, Eric Young should be given attribution
11002  * as the author of the parts of the library used.
11003  * This can be in the form of a textual message at program startup or
11004  * in documentation (online or textual) provided with the package.
11005  *
11006  * Redistribution and use in source and binary forms, with or without
11007  * modification, are permitted provided that the following conditions
11008  * are met:
11009  * 1. Redistributions of source code must retain the copyright
11010  *    notice, this list of conditions and the following disclaimer.
11011  * 2. Redistributions in binary form must reproduce the above copyright
11012  *    notice, this list of conditions and the following disclaimer in the
11013  *    documentation and/or other materials provided with the distribution.
11014  * 3. All advertising materials mentioning features or use of this software
11015  *    must display the following acknowledgement:
11016  *    "This product includes cryptographic software written by
11017  *     Eric Young (eay@cryptsoft.com)"
11018  *    The word 'cryptographic' can be left out if the rouines from the library
11019  *    being used are not cryptographic related :-).
11020  * 4. If you include any Windows specific code (or a derivative thereof) from
11021  *    the apps directory (application code) you must include an acknowledgement:
11022  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11023  *
11024  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11025  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11026  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11027  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11028  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11029  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11030  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11031  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11032  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11033  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11034  * SUCH DAMAGE.
11035  *
11036  * The licence and distribution terms for any publically available version or
11037  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11038  * copied and put under another distribution licence
11039  * [including the GNU Public Licence.]
11040  */
11041 # 965 "/usr/include/openssl/objects.h" 2 3 4
11042 # 1 "/usr/include/openssl/asn1.h" 1 3 4
11043 /* crypto/asn1/asn1.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 
11101 
11102 
11103 
11104 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1 3 4
11105 /*
11106  * CDDL HEADER START
11107  *
11108  * The contents of this file are subject to the terms of the
11109  * Common Development and Distribution License (the "License").
11110  * You may not use this file except in compliance with the License.
11111  *
11112  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11113  * or http://www.opensolaris.org/os/licensing.
11114  * See the License for the specific language governing permissions
11115  * and limitations under the License.
11116  *
11117  * When distributing Covered Code, include this CDDL HEADER in each
11118  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11119  * If applicable, add the following below this CDDL HEADER, with the
11120  * fields enclosed by brackets "[]" replaced with your own identifying
11121  * information: Portions Copyright [yyyy] [name of copyright owner]
11122  *
11123  * CDDL HEADER END
11124  */
11125 /*	Copyright (c) 1988 AT&T	*/
11126 /*	  All Rights Reserved  	*/
11127 
11128 
11129 /*
11130  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11131  *
11132  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
11133  * Use is subject to license terms.
11134  */
11135 /*
11136  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
11137  * Copyright 2016 Joyent, Inc.
11138  */
11139 # 63 "/usr/include/openssl/asn1.h" 2 3 4
11140 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
11141 /* e_os2.h */
11142 /* ====================================================================
11143  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
11144  *
11145  * Redistribution and use in source and binary forms, with or without
11146  * modification, are permitted provided that the following conditions
11147  * are met:
11148  *
11149  * 1. Redistributions of source code must retain the above copyright
11150  *    notice, this list of conditions and the following disclaimer.
11151  *
11152  * 2. Redistributions in binary form must reproduce the above copyright
11153  *    notice, this list of conditions and the following disclaimer in
11154  *    the documentation and/or other materials provided with the
11155  *    distribution.
11156  *
11157  * 3. All advertising materials mentioning features or use of this
11158  *    software must display the following acknowledgment:
11159  *    "This product includes software developed by the OpenSSL Project
11160  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11161  *
11162  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11163  *    endorse or promote products derived from this software without
11164  *    prior written permission. For written permission, please contact
11165  *    openssl-core@openssl.org.
11166  *
11167  * 5. Products derived from this software may not be called "OpenSSL"
11168  *    nor may "OpenSSL" appear in their names without prior written
11169  *    permission of the OpenSSL Project.
11170  *
11171  * 6. Redistributions of any form whatsoever must retain the following
11172  *    acknowledgment:
11173  *    "This product includes software developed by the OpenSSL Project
11174  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11175  *
11176  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11177  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11178  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11179  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11180  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11181  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11182  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11183  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11184  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11185  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11186  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11187  * OF THE POSSIBILITY OF SUCH DAMAGE.
11188  * ====================================================================
11189  *
11190  * This product includes cryptographic software written by Eric Young
11191  * (eay@cryptsoft.com).  This product includes software written by Tim
11192  * Hudson (tjh@cryptsoft.com).
11193  *
11194  */
11195 
11196 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
11197 /* opensslconf.h */
11198 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
11199 
11200 
11201 
11202 
11203 /* OpenSSL was configured with the following options: */
11204 # 108 "/usr/include/openssl/opensslconf.h" 3 4
11205 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
11206    asks for it.  This is a transient feature that is provided for those
11207    who haven't had the time to do the appropriate changes in their
11208    applications.  */
11209 # 204 "/usr/include/openssl/opensslconf.h" 3 4
11210 /* crypto/opensslconf.h.in */
11211 
11212 /* Generate 80386 code? */
11213 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
11214 # 64 "/usr/include/openssl/asn1.h" 2 3 4
11215 
11216 # 1 "/usr/include/openssl/bio.h" 1 3 4
11217 /* crypto/bio/bio.h */
11218 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11219  * All rights reserved.
11220  *
11221  * This package is an SSL implementation written
11222  * by Eric Young (eay@cryptsoft.com).
11223  * The implementation was written so as to conform with Netscapes SSL.
11224  *
11225  * This library is free for commercial and non-commercial use as long as
11226  * the following conditions are aheared to.  The following conditions
11227  * apply to all code found in this distribution, be it the RC4, RSA,
11228  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11229  * included with this distribution is covered by the same copyright terms
11230  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11231  *
11232  * Copyright remains Eric Young's, and as such any Copyright notices in
11233  * the code are not to be removed.
11234  * If this package is used in a product, Eric Young should be given attribution
11235  * as the author of the parts of the library used.
11236  * This can be in the form of a textual message at program startup or
11237  * in documentation (online or textual) provided with the package.
11238  *
11239  * Redistribution and use in source and binary forms, with or without
11240  * modification, are permitted provided that the following conditions
11241  * are met:
11242  * 1. Redistributions of source code must retain the copyright
11243  *    notice, this list of conditions and the following disclaimer.
11244  * 2. Redistributions in binary form must reproduce the above copyright
11245  *    notice, this list of conditions and the following disclaimer in the
11246  *    documentation and/or other materials provided with the distribution.
11247  * 3. All advertising materials mentioning features or use of this software
11248  *    must display the following acknowledgement:
11249  *    "This product includes cryptographic software written by
11250  *     Eric Young (eay@cryptsoft.com)"
11251  *    The word 'cryptographic' can be left out if the rouines from the library
11252  *    being used are not cryptographic related :-).
11253  * 4. If you include any Windows specific code (or a derivative thereof) from
11254  *    the apps directory (application code) you must include an acknowledgement:
11255  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11256  *
11257  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11258  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11259  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11260  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11261  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11262  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11263  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11264  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11265  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11266  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11267  * SUCH DAMAGE.
11268  *
11269  * The licence and distribution terms for any publically available version or
11270  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11271  * copied and put under another distribution licence
11272  * [including the GNU Public Licence.]
11273  */
11274 # 66 "/usr/include/openssl/asn1.h" 2 3 4
11275 
11276 # 1 "/usr/include/openssl/stack.h" 1 3 4
11277 /* crypto/stack/stack.h */
11278 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11279  * All rights reserved.
11280  *
11281  * This package is an SSL implementation written
11282  * by Eric Young (eay@cryptsoft.com).
11283  * The implementation was written so as to conform with Netscapes SSL.
11284  *
11285  * This library is free for commercial and non-commercial use as long as
11286  * the following conditions are aheared to.  The following conditions
11287  * apply to all code found in this distribution, be it the RC4, RSA,
11288  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11289  * included with this distribution is covered by the same copyright terms
11290  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11291  *
11292  * Copyright remains Eric Young's, and as such any Copyright notices in
11293  * the code are not to be removed.
11294  * If this package is used in a product, Eric Young should be given attribution
11295  * as the author of the parts of the library used.
11296  * This can be in the form of a textual message at program startup or
11297  * in documentation (online or textual) provided with the package.
11298  *
11299  * Redistribution and use in source and binary forms, with or without
11300  * modification, are permitted provided that the following conditions
11301  * are met:
11302  * 1. Redistributions of source code must retain the copyright
11303  *    notice, this list of conditions and the following disclaimer.
11304  * 2. Redistributions in binary form must reproduce the above copyright
11305  *    notice, this list of conditions and the following disclaimer in the
11306  *    documentation and/or other materials provided with the distribution.
11307  * 3. All advertising materials mentioning features or use of this software
11308  *    must display the following acknowledgement:
11309  *    "This product includes cryptographic software written by
11310  *     Eric Young (eay@cryptsoft.com)"
11311  *    The word 'cryptographic' can be left out if the rouines from the library
11312  *    being used are not cryptographic related :-).
11313  * 4. If you include any Windows specific code (or a derivative thereof) from
11314  *    the apps directory (application code) you must include an acknowledgement:
11315  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11316  *
11317  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11318  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11319  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11320  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11321  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11322  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11323  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11324  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11325  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11326  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11327  * SUCH DAMAGE.
11328  *
11329  * The licence and distribution terms for any publically available version or
11330  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11331  * copied and put under another distribution licence
11332  * [including the GNU Public Licence.]
11333  */
11334 # 68 "/usr/include/openssl/asn1.h" 2 3 4
11335 # 1 "/usr/include/openssl/safestack.h" 1 3 4
11336 /* ====================================================================
11337  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
11338  *
11339  * Redistribution and use in source and binary forms, with or without
11340  * modification, are permitted provided that the following conditions
11341  * are met:
11342  *
11343  * 1. Redistributions of source code must retain the above copyright
11344  *    notice, this list of conditions and the following disclaimer.
11345  *
11346  * 2. Redistributions in binary form must reproduce the above copyright
11347  *    notice, this list of conditions and the following disclaimer in
11348  *    the documentation and/or other materials provided with the
11349  *    distribution.
11350  *
11351  * 3. All advertising materials mentioning features or use of this
11352  *    software must display the following acknowledgment:
11353  *    "This product includes software developed by the OpenSSL Project
11354  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11355  *
11356  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11357  *    endorse or promote products derived from this software without
11358  *    prior written permission. For written permission, please contact
11359  *    openssl-core@openssl.org.
11360  *
11361  * 5. Products derived from this software may not be called "OpenSSL"
11362  *    nor may "OpenSSL" appear in their names without prior written
11363  *    permission of the OpenSSL Project.
11364  *
11365  * 6. Redistributions of any form whatsoever must retain the following
11366  *    acknowledgment:
11367  *    "This product includes software developed by the OpenSSL Project
11368  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11369  *
11370  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11371  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11372  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11373  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11374  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11375  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11376  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11377  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11378  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11379  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11380  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11381  * OF THE POSSIBILITY OF SUCH DAMAGE.
11382  * ====================================================================
11383  *
11384  * This product includes cryptographic software written by Eric Young
11385  * (eay@cryptsoft.com).  This product includes software written by Tim
11386  * Hudson (tjh@cryptsoft.com).
11387  *
11388  */
11389 # 69 "/usr/include/openssl/asn1.h" 2 3 4
11390 
11391 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
11392 /* ====================================================================
11393  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
11394  *
11395  * Redistribution and use in source and binary forms, with or without
11396  * modification, are permitted provided that the following conditions
11397  * are met:
11398  *
11399  * 1. Redistributions of source code must retain the above copyright
11400  *    notice, this list of conditions and the following disclaimer.
11401  *
11402  * 2. Redistributions in binary form must reproduce the above copyright
11403  *    notice, this list of conditions and the following disclaimer in
11404  *    the documentation and/or other materials provided with the
11405  *    distribution.
11406  *
11407  * 3. All advertising materials mentioning features or use of this
11408  *    software must display the following acknowledgment:
11409  *    "This product includes software developed by the OpenSSL Project
11410  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11411  *
11412  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11413  *    endorse or promote products derived from this software without
11414  *    prior written permission. For written permission, please contact
11415  *    openssl-core@openssl.org.
11416  *
11417  * 5. Products derived from this software may not be called "OpenSSL"
11418  *    nor may "OpenSSL" appear in their names without prior written
11419  *    permission of the OpenSSL Project.
11420  *
11421  * 6. Redistributions of any form whatsoever must retain the following
11422  *    acknowledgment:
11423  *    "This product includes software developed by the OpenSSL Project
11424  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11425  *
11426  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11427  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11428  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11429  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11430  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11431  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11432  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11433  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11434  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11435  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11436  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11437  * OF THE POSSIBILITY OF SUCH DAMAGE.
11438  * ====================================================================
11439  *
11440  * This product includes cryptographic software written by Eric Young
11441  * (eay@cryptsoft.com).  This product includes software written by Tim
11442  * Hudson (tjh@cryptsoft.com).
11443  *
11444  */
11445 # 71 "/usr/include/openssl/asn1.h" 2 3 4
11446 
11447 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
11448 /* ====================================================================
11449  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
11450  *
11451  * Redistribution and use in source and binary forms, with or without
11452  * modification, are permitted provided that the following conditions
11453  * are met:
11454  *
11455  * 1. Redistributions of source code must retain the above copyright
11456  *    notice, this list of conditions and the following disclaimer.
11457  *
11458  * 2. Redistributions in binary form must reproduce the above copyright
11459  *    notice, this list of conditions and the following disclaimer in
11460  *    the documentation and/or other materials provided with the
11461  *    distribution.
11462  *
11463  * 3. All advertising materials mentioning features or use of this
11464  *    software must display the following acknowledgment:
11465  *    "This product includes software developed by the OpenSSL Project
11466  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11467  *
11468  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11469  *    endorse or promote products derived from this software without
11470  *    prior written permission. For written permission, please contact
11471  *    openssl-core@openssl.org.
11472  *
11473  * 5. Products derived from this software may not be called "OpenSSL"
11474  *    nor may "OpenSSL" appear in their names without prior written
11475  *    permission of the OpenSSL Project.
11476  *
11477  * 6. Redistributions of any form whatsoever must retain the following
11478  *    acknowledgment:
11479  *    "This product includes software developed by the OpenSSL Project
11480  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11481  *
11482  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11483  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11484  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11485  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11486  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11487  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11488  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11489  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11490  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11491  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11492  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11493  * OF THE POSSIBILITY OF SUCH DAMAGE.
11494  * ====================================================================
11495  *
11496  * This product includes cryptographic software written by Eric Young
11497  * (eay@cryptsoft.com).  This product includes software written by Tim
11498  * Hudson (tjh@cryptsoft.com).
11499  *
11500  */
11501 # 73 "/usr/include/openssl/asn1.h" 2 3 4
11502 
11503 # 1 "/usr/include/openssl/bn.h" 1 3 4
11504 /* crypto/bn/bn.h */
11505 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
11506  * All rights reserved.
11507  *
11508  * This package is an SSL implementation written
11509  * by Eric Young (eay@cryptsoft.com).
11510  * The implementation was written so as to conform with Netscapes SSL.
11511  *
11512  * This library is free for commercial and non-commercial use as long as
11513  * the following conditions are aheared to.  The following conditions
11514  * apply to all code found in this distribution, be it the RC4, RSA,
11515  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11516  * included with this distribution is covered by the same copyright terms
11517  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11518  *
11519  * Copyright remains Eric Young's, and as such any Copyright notices in
11520  * the code are not to be removed.
11521  * If this package is used in a product, Eric Young should be given attribution
11522  * as the author of the parts of the library used.
11523  * This can be in the form of a textual message at program startup or
11524  * in documentation (online or textual) provided with the package.
11525  *
11526  * Redistribution and use in source and binary forms, with or without
11527  * modification, are permitted provided that the following conditions
11528  * are met:
11529  * 1. Redistributions of source code must retain the copyright
11530  *    notice, this list of conditions and the following disclaimer.
11531  * 2. Redistributions in binary form must reproduce the above copyright
11532  *    notice, this list of conditions and the following disclaimer in the
11533  *    documentation and/or other materials provided with the distribution.
11534  * 3. All advertising materials mentioning features or use of this software
11535  *    must display the following acknowledgement:
11536  *    "This product includes cryptographic software written by
11537  *     Eric Young (eay@cryptsoft.com)"
11538  *    The word 'cryptographic' can be left out if the rouines from the library
11539  *    being used are not cryptographic related :-).
11540  * 4. If you include any Windows specific code (or a derivative thereof) from
11541  *    the apps directory (application code) you must include an acknowledgement:
11542  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11543  *
11544  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11545  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11546  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11547  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11548  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11549  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11550  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11551  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11552  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11553  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11554  * SUCH DAMAGE.
11555  *
11556  * The licence and distribution terms for any publically available version or
11557  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11558  * copied and put under another distribution licence
11559  * [including the GNU Public Licence.]
11560  */
11561 /* ====================================================================
11562  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
11563  *
11564  * Redistribution and use in source and binary forms, with or without
11565  * modification, are permitted provided that the following conditions
11566  * are met:
11567  *
11568  * 1. Redistributions of source code must retain the above copyright
11569  *    notice, this list of conditions and the following disclaimer.
11570  *
11571  * 2. Redistributions in binary form must reproduce the above copyright
11572  *    notice, this list of conditions and the following disclaimer in
11573  *    the documentation and/or other materials provided with the
11574  *    distribution.
11575  *
11576  * 3. All advertising materials mentioning features or use of this
11577  *    software must display the following acknowledgment:
11578  *    "This product includes software developed by the OpenSSL Project
11579  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11580  *
11581  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11582  *    endorse or promote products derived from this software without
11583  *    prior written permission. For written permission, please contact
11584  *    openssl-core@openssl.org.
11585  *
11586  * 5. Products derived from this software may not be called "OpenSSL"
11587  *    nor may "OpenSSL" appear in their names without prior written
11588  *    permission of the OpenSSL Project.
11589  *
11590  * 6. Redistributions of any form whatsoever must retain the following
11591  *    acknowledgment:
11592  *    "This product includes software developed by the OpenSSL Project
11593  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11594  *
11595  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11596  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11597  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11598  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11599  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11600  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11601  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11602  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11603  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11604  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11605  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11606  * OF THE POSSIBILITY OF SUCH DAMAGE.
11607  * ====================================================================
11608  *
11609  * This product includes cryptographic software written by Eric Young
11610  * (eay@cryptsoft.com).  This product includes software written by Tim
11611  * Hudson (tjh@cryptsoft.com).
11612  *
11613  */
11614 /* ====================================================================
11615  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
11616  *
11617  * Portions of the attached software ("Contribution") are developed by
11618  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
11619  *
11620  * The Contribution is licensed pursuant to the Eric Young open source
11621  * license provided above.
11622  *
11623  * The binary polynomial arithmetic software is originally written by
11624  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
11625  *
11626  */
11627 
11628 
11629 
11630 
11631 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1 3 4
11632 /*
11633  * CDDL HEADER START
11634  *
11635  * The contents of this file are subject to the terms of the
11636  * Common Development and Distribution License (the "License").
11637  * You may not use this file except in compliance with the License.
11638  *
11639  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11640  * or http://www.opensolaris.org/os/licensing.
11641  * See the License for the specific language governing permissions
11642  * and limitations under the License.
11643  *
11644  * When distributing Covered Code, include this CDDL HEADER in each
11645  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11646  * If applicable, add the following below this CDDL HEADER, with the
11647  * fields enclosed by brackets "[]" replaced with your own identifying
11648  * information: Portions Copyright [yyyy] [name of copyright owner]
11649  *
11650  * CDDL HEADER END
11651  */
11652 
11653 /*
11654  * Copyright (c) 2013 Gary Mills
11655  *
11656  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
11657  * Use is subject to license terms.
11658  */
11659 
11660 /*	Copyright (c) 1988 AT&T	*/
11661 /*	  All Rights Reserved  	*/
11662 # 129 "/usr/include/openssl/bn.h" 2 3 4
11663 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
11664 /* e_os2.h */
11665 /* ====================================================================
11666  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
11667  *
11668  * Redistribution and use in source and binary forms, with or without
11669  * modification, are permitted provided that the following conditions
11670  * are met:
11671  *
11672  * 1. Redistributions of source code must retain the above copyright
11673  *    notice, this list of conditions and the following disclaimer.
11674  *
11675  * 2. Redistributions in binary form must reproduce the above copyright
11676  *    notice, this list of conditions and the following disclaimer in
11677  *    the documentation and/or other materials provided with the
11678  *    distribution.
11679  *
11680  * 3. All advertising materials mentioning features or use of this
11681  *    software must display the following acknowledgment:
11682  *    "This product includes software developed by the OpenSSL Project
11683  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11684  *
11685  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11686  *    endorse or promote products derived from this software without
11687  *    prior written permission. For written permission, please contact
11688  *    openssl-core@openssl.org.
11689  *
11690  * 5. Products derived from this software may not be called "OpenSSL"
11691  *    nor may "OpenSSL" appear in their names without prior written
11692  *    permission of the OpenSSL Project.
11693  *
11694  * 6. Redistributions of any form whatsoever must retain the following
11695  *    acknowledgment:
11696  *    "This product includes software developed by the OpenSSL Project
11697  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11698  *
11699  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11700  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11701  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11702  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11703  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11704  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11705  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11706  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11707  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11708  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11709  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11710  * OF THE POSSIBILITY OF SUCH DAMAGE.
11711  * ====================================================================
11712  *
11713  * This product includes cryptographic software written by Eric Young
11714  * (eay@cryptsoft.com).  This product includes software written by Tim
11715  * Hudson (tjh@cryptsoft.com).
11716  *
11717  */
11718 
11719 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
11720 /* opensslconf.h */
11721 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
11722 
11723 
11724 
11725 
11726 /* OpenSSL was configured with the following options: */
11727 # 108 "/usr/include/openssl/opensslconf.h" 3 4
11728 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
11729    asks for it.  This is a transient feature that is provided for those
11730    who haven't had the time to do the appropriate changes in their
11731    applications.  */
11732 # 204 "/usr/include/openssl/opensslconf.h" 3 4
11733 /* crypto/opensslconf.h.in */
11734 
11735 /* Generate 80386 code? */
11736 # 272 "/usr/include/openssl/opensslconf.h" 3 4
11737 /*
11738  * OpenSSL revision 1.521 from 2005-12-15 in OpenSSL_1_0_0-stable branch changed
11739  * 64 bit sparcv9 configuration from SIXTY_FOUR_BIT_LONG to BN_LLONG.
11740  */
11741 
11742 
11743 
11744 
11745 
11746 
11747 /* Should we define BN_DIV2W here? */
11748 
11749 /* Only one for the following should be defined */
11750 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
11751 # 130 "/usr/include/openssl/bn.h" 2 3 4
11752 
11753 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
11754 /*
11755  * CDDL HEADER START
11756  *
11757  * The contents of this file are subject to the terms of the
11758  * Common Development and Distribution License (the "License").
11759  * You may not use this file except in compliance with the License.
11760  *
11761  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11762  * or http://www.opensolaris.org/os/licensing.
11763  * See the License for the specific language governing permissions
11764  * and limitations under the License.
11765  *
11766  * When distributing Covered Code, include this CDDL HEADER in each
11767  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11768  * If applicable, add the following below this CDDL HEADER, with the
11769  * fields enclosed by brackets "[]" replaced with your own identifying
11770  * information: Portions Copyright [yyyy] [name of copyright owner]
11771  *
11772  * CDDL HEADER END
11773  */
11774 
11775 /*
11776  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11777  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
11778  */
11779 
11780 /*	Copyright (c) 1988 AT&T	*/
11781 /*	  All Rights Reserved  	*/
11782 
11783 /*
11784  * User-visible pieces of the ANSI C standard I/O package.
11785  */
11786 # 132 "/usr/include/openssl/bn.h" 2 3 4
11787 
11788 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
11789 /* ====================================================================
11790  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
11791  *
11792  * Redistribution and use in source and binary forms, with or without
11793  * modification, are permitted provided that the following conditions
11794  * are met:
11795  *
11796  * 1. Redistributions of source code must retain the above copyright
11797  *    notice, this list of conditions and the following disclaimer.
11798  *
11799  * 2. Redistributions in binary form must reproduce the above copyright
11800  *    notice, this list of conditions and the following disclaimer in
11801  *    the documentation and/or other materials provided with the
11802  *    distribution.
11803  *
11804  * 3. All advertising materials mentioning features or use of this
11805  *    software must display the following acknowledgment:
11806  *    "This product includes software developed by the OpenSSL Project
11807  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11808  *
11809  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11810  *    endorse or promote products derived from this software without
11811  *    prior written permission. For written permission, please contact
11812  *    openssl-core@openssl.org.
11813  *
11814  * 5. Products derived from this software may not be called "OpenSSL"
11815  *    nor may "OpenSSL" appear in their names without prior written
11816  *    permission of the OpenSSL Project.
11817  *
11818  * 6. Redistributions of any form whatsoever must retain the following
11819  *    acknowledgment:
11820  *    "This product includes software developed by the OpenSSL Project
11821  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11822  *
11823  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11824  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11825  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11826  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11827  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11828  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11829  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11830  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11831  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11832  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11833  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11834  * OF THE POSSIBILITY OF SUCH DAMAGE.
11835  * ====================================================================
11836  *
11837  * This product includes cryptographic software written by Eric Young
11838  * (eay@cryptsoft.com).  This product includes software written by Tim
11839  * Hudson (tjh@cryptsoft.com).
11840  *
11841  */
11842 # 134 "/usr/include/openssl/bn.h" 2 3 4
11843 # 1 "/usr/include/openssl/crypto.h" 1 3 4
11844 /* crypto/crypto.h */
11845 /* ====================================================================
11846  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
11847  *
11848  * Redistribution and use in source and binary forms, with or without
11849  * modification, are permitted provided that the following conditions
11850  * are met:
11851  *
11852  * 1. Redistributions of source code must retain the above copyright
11853  *    notice, this list of conditions and the following disclaimer.
11854  *
11855  * 2. Redistributions in binary form must reproduce the above copyright
11856  *    notice, this list of conditions and the following disclaimer in
11857  *    the documentation and/or other materials provided with the
11858  *    distribution.
11859  *
11860  * 3. All advertising materials mentioning features or use of this
11861  *    software must display the following acknowledgment:
11862  *    "This product includes software developed by the OpenSSL Project
11863  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11864  *
11865  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11866  *    endorse or promote products derived from this software without
11867  *    prior written permission. For written permission, please contact
11868  *    openssl-core@openssl.org.
11869  *
11870  * 5. Products derived from this software may not be called "OpenSSL"
11871  *    nor may "OpenSSL" appear in their names without prior written
11872  *    permission of the OpenSSL Project.
11873  *
11874  * 6. Redistributions of any form whatsoever must retain the following
11875  *    acknowledgment:
11876  *    "This product includes software developed by the OpenSSL Project
11877  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11878  *
11879  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11880  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11881  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11882  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11883  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11884  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11885  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11886  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11887  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11888  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11889  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11890  * OF THE POSSIBILITY OF SUCH DAMAGE.
11891  * ====================================================================
11892  *
11893  * This product includes cryptographic software written by Eric Young
11894  * (eay@cryptsoft.com).  This product includes software written by Tim
11895  * Hudson (tjh@cryptsoft.com).
11896  *
11897  */
11898 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11899  * All rights reserved.
11900  *
11901  * This package is an SSL implementation written
11902  * by Eric Young (eay@cryptsoft.com).
11903  * The implementation was written so as to conform with Netscapes SSL.
11904  *
11905  * This library is free for commercial and non-commercial use as long as
11906  * the following conditions are aheared to.  The following conditions
11907  * apply to all code found in this distribution, be it the RC4, RSA,
11908  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11909  * included with this distribution is covered by the same copyright terms
11910  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11911  *
11912  * Copyright remains Eric Young's, and as such any Copyright notices in
11913  * the code are not to be removed.
11914  * If this package is used in a product, Eric Young should be given attribution
11915  * as the author of the parts of the library used.
11916  * This can be in the form of a textual message at program startup or
11917  * in documentation (online or textual) provided with the package.
11918  *
11919  * Redistribution and use in source and binary forms, with or without
11920  * modification, are permitted provided that the following conditions
11921  * are met:
11922  * 1. Redistributions of source code must retain the copyright
11923  *    notice, this list of conditions and the following disclaimer.
11924  * 2. Redistributions in binary form must reproduce the above copyright
11925  *    notice, this list of conditions and the following disclaimer in the
11926  *    documentation and/or other materials provided with the distribution.
11927  * 3. All advertising materials mentioning features or use of this software
11928  *    must display the following acknowledgement:
11929  *    "This product includes cryptographic software written by
11930  *     Eric Young (eay@cryptsoft.com)"
11931  *    The word 'cryptographic' can be left out if the rouines from the library
11932  *    being used are not cryptographic related :-).
11933  * 4. If you include any Windows specific code (or a derivative thereof) from
11934  *    the apps directory (application code) you must include an acknowledgement:
11935  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11936  *
11937  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11938  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11939  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11940  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11941  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11942  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11943  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11944  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11945  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11946  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11947  * SUCH DAMAGE.
11948  *
11949  * The licence and distribution terms for any publically available version or
11950  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11951  * copied and put under another distribution licence
11952  * [including the GNU Public Licence.]
11953  */
11954 /* ====================================================================
11955  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
11956  * ECDH support in OpenSSL originally developed by
11957  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
11958  */
11959 # 135 "/usr/include/openssl/bn.h" 2 3 4
11960 
11961 
11962 
11963 
11964 
11965 /*
11966  * These preprocessor symbols control various aspects of the bignum headers
11967  * and library code. They're not defined by any "normal" configuration, as
11968  * they are intended for development and testing purposes. NB: defining all
11969  * three can be useful for debugging application code as well as openssl
11970  * itself. BN_DEBUG - turn on various debugging alterations to the bignum
11971  * code BN_DEBUG_RAND - uses random poisoning of unused words to trip up
11972  * mismanagement of bignum internals. You must also define BN_DEBUG.
11973  */
11974 /* #define BN_DEBUG */
11975 /* #define BN_DEBUG_RAND */
11976 
11977 
11978 
11979 
11980 
11981 
11982 
11983 /*
11984  * This next option uses the C libraries (2 word)/(1 word) function. If it is
11985  * not defined, I use my C version (which is slower). The reason for this
11986  * flag is that when the particular C compiler library routine is used, and
11987  * the library is linked with a different compiler, the library is missing.
11988  * This mostly happens when the library is built with gcc and then linked
11989  * using normal cc.  This would be a common occurrence because gcc normally
11990  * produces code that is 2 times faster than system compilers for the big
11991  * number stuff. For machines with only one compiler (or shared libraries),
11992  * this should be on.  Again this in only really a problem on machines using
11993  * "long long's", are 32bit, and are not using my assembler code.
11994  */
11995 
11996 
11997 
11998 
11999 
12000 
12001 
12002 /*
12003  * assuming long is 64bit - this is the DEC Alpha unsigned long long is only
12004  * 64 bits :-(, don't define BN_LLONG for the DEC Alpha
12005  */
12006 # 203 "/usr/include/openssl/bn.h" 3 4
12007 /*
12008  * This is where the long long data type is 64 bits, but long is 32. For
12009  * machines where there are 64bit registers, this is the mode to use. IRIX,
12010  * on R4000 and above should use this mode, along with the relevant assembler
12011  * code :-).  Do NOT define BN_LLONG.
12012  */
12013 # 265 "/usr/include/openssl/bn.h" 3 4
12014 /*
12015  * avoid leaking exponent information through timing,
12016  * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
12017  * BN_div() will call BN_div_no_branch,
12018  * BN_mod_inverse() will call BN_mod_inverse_no_branch.
12019  */
12020 # 284 "/usr/include/openssl/bn.h" 3 4
12021                                        /* used for debuging */
12022 
12023 
12024 
12025 
12026 /*
12027  * get a clone of a BIGNUM with changed flags, for *temporary* use only (the
12028  * two BIGNUMs cannot not be used in parallel!)
12029  */
12030 # 302 "/usr/include/openssl/bn.h" 3 4
12031 /* Already declared in ossl_typ.h */
12032 # 313 "/usr/include/openssl/bn.h" 3 4
12033 struct bignum_st {
12034     unsigned int *d; /* Pointer to an array of 'BN_BITS2' bit
12035                                  * chunks. */
12036     int top; /* Index of last used d +1. */
12037     /* The next are internal book keeping for bn_expand. */
12038     int dmax; /* Size of the d array. */
12039     int neg; /* one if the number is negative */
12040     int flags;
12041 };
12042 
12043 /* Used for montgomery multiplication */
12044 struct bn_mont_ctx_st {
12045     int ri; /* number of bits in R */
12046     BIGNUM RR; /* used to convert to montgomery form */
12047     BIGNUM N; /* The modulus */
12048     BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 (Ni is only
12049                                  * stored for bignum algorithm) */
12050     unsigned int n0[2]; /* least significant word(s) of Ni; (type
12051                                  * changed with 0.9.9, was "BN_ULONG n0;"
12052                                  * before) */
12053     int flags;
12054 };
12055 
12056 /*
12057  * Used for reciprocal division/mod functions It cannot be shared between
12058  * threads
12059  */
12060 struct bn_recp_ctx_st {
12061     BIGNUM N; /* the divisor */
12062     BIGNUM Nr; /* the reciprocal */
12063     int num_bits;
12064     int shift;
12065     int flags;
12066 };
12067 
12068 /* Used for slow "generation" functions. */
12069 struct bn_gencb_st {
12070     unsigned int ver; /* To handle binary (in)compatibility */
12071     void *arg; /* callback-specific data */
12072     union {
12073         /* if(ver==1) - handles old style callbacks */
12074         void (*cb_1) (int, int, void *);
12075         /* if(ver==2) - new callback style */
12076         int (*cb_2) (int, int, BN_GENCB *);
12077     } cb;
12078 };
12079 /* Wrapper function to make using BN_GENCB easier,  */
12080 int BN_GENCB_call(BN_GENCB *cb, int a, int b);
12081 /* Macro to populate a BN_GENCB structure with an "old"-style callback */
12082 
12083 
12084 
12085 
12086 
12087 /* Macro to populate a BN_GENCB structure with a "new"-style callback */
12088 # 377 "/usr/include/openssl/bn.h" 3 4
12089 /*
12090  * BN_prime_checks_for_size() returns the number of Miller-Rabin iterations
12091  * that will be done for checking that a random number is probably prime. The
12092  * error rate for accepting a composite number as prime depends on the size of
12093  * the prime |b|. The error rates used are for calculating an RSA key with 2 primes,
12094  * and so the level is what you would expect for a key of double the size of the
12095  * prime.
12096  *
12097  * This table is generated using the algorithm of FIPS PUB 186-4
12098  * Digital Signature Standard (DSS), section F.1, page 117.
12099  * (https://dx.doi.org/10.6028/NIST.FIPS.186-4)
12100  *
12101  * The following magma script was used to generate the output:
12102  * securitybits:=125;
12103  * k:=1024;
12104  * for t:=1 to 65 do
12105  *   for M:=3 to Floor(2*Sqrt(k-1)-1) do
12106  *     S:=0;
12107  *     // Sum over m
12108  *     for m:=3 to M do
12109  *       s:=0;
12110  *       // Sum over j
12111  *       for j:=2 to m do
12112  *         s+:=(RealField(32)!2)^-(j+(k-1)/j);
12113  *       end for;
12114  *       S+:=2^(m-(m-1)*t)*s;
12115  *     end for;
12116  *     A:=2^(k-2-M*t);
12117  *     B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S;
12118  *     pkt:=2.00743*Log(2)*k*2^-k*(A+B);
12119  *     seclevel:=Floor(-Log(2,pkt));
12120  *     if seclevel ge securitybits then
12121  *       printf "k: %5o, security: %o bits  (t: %o, M: %o)\n",k,seclevel,t,M;
12122  *       break;
12123  *     end if;
12124  *   end for;
12125  *   if seclevel ge securitybits then break; end if;
12126  * end for;
12127  *
12128  * It can be run online at:
12129  * http://magma.maths.usyd.edu.au/calc
12130  *
12131  * And will output:
12132  * k:  1024, security: 129 bits  (t: 6, M: 23)
12133  *
12134  * k is the number of bits of the prime, securitybits is the level we want to
12135  * reach.
12136  *
12137  * prime length | RSA key size | # MR tests | security level
12138  * -------------+--------------|------------+---------------
12139  *  (b) >= 6394 |     >= 12788 |          3 |        256 bit
12140  *  (b) >= 3747 |     >=  7494 |          3 |        192 bit
12141  *  (b) >= 1345 |     >=  2690 |          4 |        128 bit
12142  *  (b) >= 1080 |     >=  2160 |          5 |        128 bit
12143  *  (b) >=  852 |     >=  1704 |          5 |        112 bit
12144  *  (b) >=  476 |     >=   952 |          5 |         80 bit
12145  *  (b) >=  400 |     >=   800 |          6 |         80 bit
12146  *  (b) >=  347 |     >=   694 |          7 |         80 bit
12147  *  (b) >=  308 |     >=   616 |          8 |         80 bit
12148  *  (b) >=   55 |     >=   110 |         27 |         64 bit
12149  *  (b) >=    6 |     >=    12 |         34 |         64 bit
12150  */
12151 # 451 "/usr/include/openssl/bn.h" 3 4
12152 /* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
12153 # 472 "/usr/include/openssl/bn.h" 3 4
12154 const BIGNUM *BN_value_one(void);
12155 char *BN_options(void);
12156 BN_CTX *BN_CTX_new(void);
12157 
12158 void BN_CTX_init(BN_CTX *c);
12159 
12160 void BN_CTX_free(BN_CTX *c);
12161 void BN_CTX_start(BN_CTX *ctx);
12162 BIGNUM *BN_CTX_get(BN_CTX *ctx);
12163 void BN_CTX_end(BN_CTX *ctx);
12164 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
12165 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
12166 int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
12167 int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
12168 int BN_num_bits(const BIGNUM *a);
12169 int BN_num_bits_word(unsigned int);
12170 BIGNUM *BN_new(void);
12171 void BN_init(BIGNUM *);
12172 void BN_clear_free(BIGNUM *a);
12173 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
12174 void BN_swap(BIGNUM *a, BIGNUM *b);
12175 BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
12176 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
12177 BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
12178 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
12179 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12180 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12181 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12182 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12183 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
12184 int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
12185 /** BN_set_negative sets sign of a BIGNUM
12186  * \param  b  pointer to the BIGNUM object
12187  * \param  n  0 if the BIGNUM b should be positive and a value != 0 otherwise
12188  */
12189 void BN_set_negative(BIGNUM *b, int n);
12190 /** BN_is_negative returns 1 if the BIGNUM is negative
12191  * \param  a  pointer to the BIGNUM object
12192  * \return 1 if a < 0 and 0 otherwise
12193  */
12194 
12195 
12196 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
12197            BN_CTX *ctx);
12198 
12199 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
12200 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
12201                BN_CTX *ctx);
12202 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12203                      const BIGNUM *m);
12204 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
12205                BN_CTX *ctx);
12206 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12207                      const BIGNUM *m);
12208 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
12209                BN_CTX *ctx);
12210 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
12211 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
12212 int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
12213 int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
12214                   BN_CTX *ctx);
12215 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
12216 
12217 unsigned int BN_mod_word(const BIGNUM *a, unsigned int w);
12218 unsigned int BN_div_word(BIGNUM *a, unsigned int w);
12219 int BN_mul_word(BIGNUM *a, unsigned int w);
12220 int BN_add_word(BIGNUM *a, unsigned int w);
12221 int BN_sub_word(BIGNUM *a, unsigned int w);
12222 int BN_set_word(BIGNUM *a, unsigned int w);
12223 unsigned int BN_get_word(const BIGNUM *a);
12224 
12225 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
12226 void BN_free(BIGNUM *a);
12227 int BN_is_bit_set(const BIGNUM *a, int n);
12228 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
12229 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
12230 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12231 
12232 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12233                const BIGNUM *m, BN_CTX *ctx);
12234 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12235                     const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
12236 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
12237                               const BIGNUM *m, BN_CTX *ctx,
12238                               BN_MONT_CTX *in_mont);
12239 int BN_mod_exp_mont_word(BIGNUM *r, unsigned int a, const BIGNUM *p,
12240                          const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
12241 int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
12242                      const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
12243                      BN_CTX *ctx, BN_MONT_CTX *m_ctx);
12244 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12245                       const BIGNUM *m, BN_CTX *ctx);
12246 
12247 int BN_mask_bits(BIGNUM *a, int n);
12248 
12249 int BN_print_fp(FILE *fp, const BIGNUM *a);
12250 
12251 
12252 int BN_print(BIO *fp, const BIGNUM *a);
12253 
12254 
12255 
12256 int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
12257 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
12258 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
12259 void BN_clear(BIGNUM *a);
12260 BIGNUM *BN_dup(const BIGNUM *a);
12261 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
12262 int BN_set_bit(BIGNUM *a, int n);
12263 int BN_clear_bit(BIGNUM *a, int n);
12264 char *BN_bn2hex(const BIGNUM *a);
12265 char *BN_bn2dec(const BIGNUM *a);
12266 int BN_hex2bn(BIGNUM **a, const char *str);
12267 int BN_dec2bn(BIGNUM **a, const char *str);
12268 int BN_asc2bn(BIGNUM **a, const char *str);
12269 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
12270 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
12271                                                                   * -2 for
12272                                                                   * error */
12273 BIGNUM *BN_mod_inverse(BIGNUM *ret,
12274                        const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
12275 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
12276                     const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
12277 
12278 void BN_consttime_swap(unsigned int swap, BIGNUM *a, BIGNUM *b, int nwords);
12279 
12280 /* Deprecated versions */
12281 
12282 BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
12283                           const BIGNUM *add, const BIGNUM *rem,
12284                           void (*callback) (int, int, void *), void *cb_arg);
12285 int BN_is_prime(const BIGNUM *p, int nchecks,
12286                 void (*callback) (int, int, void *),
12287                 BN_CTX *ctx, void *cb_arg);
12288 int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
12289                          void (*callback) (int, int, void *), BN_CTX *ctx,
12290                          void *cb_arg, int do_trial_division);
12291 
12292 
12293 /* Newer versions */
12294 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
12295                          const BIGNUM *rem, BN_GENCB *cb);
12296 int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
12297 int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
12298                             int do_trial_division, BN_GENCB *cb);
12299 
12300 int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
12301 
12302 int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
12303                             const BIGNUM *Xp, const BIGNUM *Xp1,
12304                             const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
12305                             BN_GENCB *cb);
12306 int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
12307                               BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
12308                               BN_CTX *ctx, BN_GENCB *cb);
12309 
12310 BN_MONT_CTX *BN_MONT_CTX_new(void);
12311 void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
12312 int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12313                           BN_MONT_CTX *mont, BN_CTX *ctx);
12314 
12315 
12316 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a,
12317                        BN_MONT_CTX *mont, BN_CTX *ctx);
12318 void BN_MONT_CTX_free(BN_MONT_CTX *mont);
12319 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
12320 BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
12321 BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
12322                                     const BIGNUM *mod, BN_CTX *ctx);
12323 
12324 /* BN_BLINDING flags */
12325 
12326 
12327 
12328 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
12329 void BN_BLINDING_free(BN_BLINDING *b);
12330 int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
12331 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
12332 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
12333 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
12334 int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
12335                           BN_CTX *);
12336 
12337 unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);
12338 void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);
12339 
12340 CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);
12341 unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
12342 void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
12343 BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
12344                                       const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
12345                                       int (*bn_mod_exp) (BIGNUM *r,
12346                                                          const BIGNUM *a,
12347                                                          const BIGNUM *p,
12348                                                          const BIGNUM *m,
12349                                                          BN_CTX *ctx,
12350                                                          BN_MONT_CTX *m_ctx),
12351                                       BN_MONT_CTX *m_ctx);
12352 
12353 
12354 void BN_set_params(int mul, int high, int low, int mont);
12355 int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
12356 
12357 
12358 void BN_RECP_CTX_init(BN_RECP_CTX *recp);
12359 BN_RECP_CTX *BN_RECP_CTX_new(void);
12360 void BN_RECP_CTX_free(BN_RECP_CTX *recp);
12361 int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
12362 int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
12363                           BN_RECP_CTX *recp, BN_CTX *ctx);
12364 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12365                     const BIGNUM *m, BN_CTX *ctx);
12366 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
12367                 BN_RECP_CTX *recp, BN_CTX *ctx);
12368 
12369 
12370 
12371 /*
12372  * Functions for arithmetic over binary polynomials represented by BIGNUMs.
12373  * The BIGNUM::neg property of BIGNUMs representing binary polynomials is
12374  * ignored. Note that input arguments are not const so that their bit arrays
12375  * can be expanded to the appropriate size if needed.
12376  */
12377 
12378 /*
12379  * r = a + b
12380  */
12381 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
12382 
12383 /*
12384  * r=a mod p
12385  */
12386 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
12387 /* r = (a * b) mod p */
12388 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12389                     const BIGNUM *p, BN_CTX *ctx);
12390 /* r = (a * a) mod p */
12391 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12392 /* r = (1 / b) mod p */
12393 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
12394 /* r = (a / b) mod p */
12395 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12396                     const BIGNUM *p, BN_CTX *ctx);
12397 /* r = (a ^ b) mod p */
12398 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12399                     const BIGNUM *p, BN_CTX *ctx);
12400 /* r = sqrt(a) mod p */
12401 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12402                      BN_CTX *ctx);
12403 /* r^2 + r = a mod p */
12404 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
12405                            BN_CTX *ctx);
12406 
12407 /*-
12408  * Some functions allow for representation of the irreducible polynomials
12409  * as an unsigned int[], say p.  The irreducible f(t) is then of the form:
12410  *     t^p[0] + t^p[1] + ... + t^p[k]
12411  * where m = p[0] > p[1] > ... > p[k] = 0.
12412  */
12413 /* r = a mod p */
12414 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
12415 /* r = (a * b) mod p */
12416 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12417                         const int p[], BN_CTX *ctx);
12418 /* r = (a * a) mod p */
12419 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
12420                         BN_CTX *ctx);
12421 /* r = (1 / b) mod p */
12422 int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
12423                         BN_CTX *ctx);
12424 /* r = (a / b) mod p */
12425 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12426                         const int p[], BN_CTX *ctx);
12427 /* r = (a ^ b) mod p */
12428 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
12429                         const int p[], BN_CTX *ctx);
12430 /* r = sqrt(a) mod p */
12431 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
12432                          const int p[], BN_CTX *ctx);
12433 /* r^2 + r = a mod p */
12434 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
12435                                const int p[], BN_CTX *ctx);
12436 int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
12437 int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
12438 
12439 
12440 
12441 /*
12442  * faster mod functions for the 'NIST primes' 0 <= a < p^2
12443  */
12444 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12445 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12446 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12447 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12448 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
12449 
12450 const BIGNUM *BN_get0_nist_prime_192(void);
12451 const BIGNUM *BN_get0_nist_prime_224(void);
12452 const BIGNUM *BN_get0_nist_prime_256(void);
12453 const BIGNUM *BN_get0_nist_prime_384(void);
12454 const BIGNUM *BN_get0_nist_prime_521(void);
12455 
12456 /* library internal functions */
12457 # 788 "/usr/include/openssl/bn.h" 3 4
12458 BIGNUM *bn_expand2(BIGNUM *a, int words);
12459 
12460 BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
12461 
12462 
12463 /*-
12464  * Bignum consistency macros
12465  * There is one "API" macro, bn_fix_top(), for stripping leading zeroes from
12466  * bignum data after direct manipulations on the data. There is also an
12467  * "internal" macro, bn_check_top(), for verifying that there are no leading
12468  * zeroes. Unfortunately, some auditing is required due to the fact that
12469  * bn_fix_top() has become an overabused duct-tape because bignum data is
12470  * occasionally passed around in an inconsistent state. So the following
12471  * changes have been made to sort this out;
12472  * - bn_fix_top()s implementation has been moved to bn_correct_top()
12473  * - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and
12474  *   bn_check_top() is as before.
12475  * - if BN_DEBUG *is* defined;
12476  *   - bn_check_top() tries to pollute unused words even if the bignum 'top' is
12477  *     consistent. (ed: only if BN_DEBUG_RAND is defined)
12478  *   - bn_fix_top() maps to bn_check_top() rather than "fixing" anything.
12479  * The idea is to have debug builds flag up inconsistent bignums when they
12480  * occur. If that occurs in a bn_fix_top(), we examine the code in question; if
12481  * the use of bn_fix_top() was appropriate (ie. it follows directly after code
12482  * that manipulates the bignum) it is converted to bn_correct_top(), and if it
12483  * was not appropriate, we convert it permanently to bn_check_top() and track
12484  * down the cause of the bug. Eventually, no internal code should be using the
12485  * bn_fix_top() macro. External applications and libraries should try this with
12486  * their own code too, both in terms of building against the openssl headers
12487  * with BN_DEBUG defined *and* linking with a version of OpenSSL built with it
12488  * defined. This not only improves external code, it provides more test
12489  * coverage for openssl's own code.
12490  */
12491 # 914 "/usr/include/openssl/bn.h" 3 4
12492 unsigned int bn_mul_add_words(unsigned int *rp, const unsigned int *ap, int num,
12493                           unsigned int w);
12494 unsigned int bn_mul_words(unsigned int *rp, const unsigned int *ap, int num, unsigned int w);
12495 void bn_sqr_words(unsigned int *rp, const unsigned int *ap, int num);
12496 unsigned int bn_div_words(unsigned int h, unsigned int l, unsigned int d);
12497 unsigned int bn_add_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
12498                       int num);
12499 unsigned int bn_sub_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
12500                       int num);
12501 
12502 /* Primes from RFC 2409 */
12503 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
12504 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
12505 
12506 /* Primes from RFC 3526 */
12507 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
12508 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
12509 BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
12510 BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
12511 BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
12512 BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
12513 
12514 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
12515 
12516 /* BEGIN ERROR CODES */
12517 /*
12518  * The following lines are auto generated by the script mkerr.pl. Any changes
12519  * made after this point may be overwritten when the script is next run.
12520  */
12521 void ERR_load_BN_strings(void);
12522 
12523 /* Error codes for the BN functions. */
12524 
12525 /* Function codes. */
12526 # 991 "/usr/include/openssl/bn.h" 3 4
12527 /* Reason codes. */
12528 # 75 "/usr/include/openssl/asn1.h" 2 3 4
12529 # 132 "/usr/include/openssl/asn1.h" 3 4
12530 /* For use with d2i_ASN1_type_bytes() */
12531 # 152 "/usr/include/openssl/asn1.h" 3 4
12532 /* For use with ASN1_mbstring_copy() */
12533 # 161 "/usr/include/openssl/asn1.h" 3 4
12534     struct X509_algor_st;
12535 struct stack_st_X509_ALGOR { _STACK stack; };
12536 
12537 
12538 
12539 
12540 /*
12541  * We MUST make sure that, except for constness, asn1_ctx_st and
12542  * asn1_const_ctx are exactly the same.  Fortunately, as soon as the old ASN1
12543  * parsing macros are gone, we can throw this away as well...
12544  */
12545 typedef struct asn1_ctx_st {
12546     unsigned char *p; /* work char pointer */
12547     int eos; /* end of sequence read for indefinite
12548                                  * encoding */
12549     int error; /* error code to use when returning an error */
12550     int inf; /* constructed if 0x20, indefinite is 0x21 */
12551     int tag; /* tag from last 'get object' */
12552     int xclass; /* class from last 'get object' */
12553     long slen; /* length of last 'get object' */
12554     unsigned char *max; /* largest value of p allowed */
12555     unsigned char *q; /* temporary variable */
12556     unsigned char **pp; /* variable */
12557     int line; /* used in error processing */
12558 } ASN1_CTX;
12559 
12560 typedef struct asn1_const_ctx_st {
12561     const unsigned char *p; /* work char pointer */
12562     int eos; /* end of sequence read for indefinite
12563                                  * encoding */
12564     int error; /* error code to use when returning an error */
12565     int inf; /* constructed if 0x20, indefinite is 0x21 */
12566     int tag; /* tag from last 'get object' */
12567     int xclass; /* class from last 'get object' */
12568     long slen; /* length of last 'get object' */
12569     const unsigned char *max; /* largest value of p allowed */
12570     const unsigned char *q; /* temporary variable */
12571     const unsigned char **pp; /* variable */
12572     int line; /* used in error processing */
12573 } ASN1_const_CTX;
12574 
12575 /*
12576  * These are used internally in the ASN1_OBJECT to keep track of whether the
12577  * names and data need to be free()ed
12578  */
12579 
12580 
12581 
12582 
12583 struct asn1_object_st {
12584     const char *sn, *ln;
12585     int nid;
12586     int length;
12587     const unsigned char *data; /* data remains const after init */
12588     int flags; /* Should we free this one */
12589 };
12590 
12591 
12592 /*
12593  * This indicates that the ASN1_STRING is not a real value but just a place
12594  * holder for the location where indefinite length constructed data should be
12595  * inserted in the memory buffer
12596  */
12597 
12598 
12599 /*
12600  * This flag is used by the CMS code to indicate that a string is not
12601  * complete and is a place holder for content when it had all been accessed.
12602  * The flag will be reset when content has been written to it.
12603  */
12604 
12605 
12606 /*
12607  * This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
12608  * type.
12609  */
12610 
12611 /* This is the base type that holds just about everything :-) */
12612 struct asn1_string_st {
12613     int length;
12614     int type;
12615     unsigned char *data;
12616     /*
12617      * The value of the following field depends on the type being held.  It
12618      * is mostly being used for BIT_STRING so if the input data has a
12619      * non-zero 'unused bits' value, it will be handled correctly
12620      */
12621     long flags;
12622 };
12623 
12624 /*
12625  * ASN1_ENCODING structure: this is used to save the received encoding of an
12626  * ASN1 type. This is useful to get round problems with invalid encodings
12627  * which can break signatures.
12628  */
12629 
12630 typedef struct ASN1_ENCODING_st {
12631     unsigned char *enc; /* DER encoding */
12632     long len; /* Length of encoding */
12633     int modified; /* set to 1 if 'enc' is invalid */
12634 } ASN1_ENCODING;
12635 
12636 /* Used with ASN1 LONG type: if a long is set to this it is omitted */
12637 # 272 "/usr/include/openssl/asn1.h" 3 4
12638 typedef struct asn1_string_table_st {
12639     int nid;
12640     long minsize;
12641     long maxsize;
12642     unsigned long mask;
12643     unsigned long flags;
12644 } ASN1_STRING_TABLE;
12645 
12646 struct stack_st_ASN1_STRING_TABLE { _STACK stack; };
12647 
12648 /* size limits: this stuff is taken straight from RFC2459 */
12649 # 293 "/usr/include/openssl/asn1.h" 3 4
12650 /*
12651  * Declarations for template structures: for full definitions see asn1t.h
12652  */
12653 typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
12654 typedef struct ASN1_TLC_st ASN1_TLC;
12655 /* This is just an opaque pointer */
12656 typedef struct ASN1_VALUE_st ASN1_VALUE;
12657 
12658 /* Declare ASN1 functions: the implement macro in in asn1t.h */
12659 # 363 "/usr/include/openssl/asn1.h" 3 4
12660 typedef void *d2i_of_void(void **,const unsigned char **,long); typedef int i2d_of_void(void *,unsigned char **);
12661 
12662 /*-
12663  * The following macros and typedefs allow an ASN1_ITEM
12664  * to be embedded in a structure and referenced. Since
12665  * the ASN1_ITEM pointers need to be globally accessible
12666  * (possibly from shared libraries) they may exist in
12667  * different forms. On platforms that support it the
12668  * ASN1_ITEM structure itself will be globally exported.
12669  * Other platforms will export a function that returns
12670  * an ASN1_ITEM pointer.
12671  *
12672  * To handle both cases transparently the macros below
12673  * should be used instead of hard coding an ASN1_ITEM
12674  * pointer in a structure.
12675  *
12676  * The structure will look like this:
12677  *
12678  * typedef struct SOMETHING_st {
12679  *      ...
12680  *      ASN1_ITEM_EXP *iptr;
12681  *      ...
12682  * } SOMETHING;
12683  *
12684  * It would be initialised as e.g.:
12685  *
12686  * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
12687  *
12688  * and the actual pointer extracted with:
12689  *
12690  * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
12691  *
12692  * Finally an ASN1_ITEM pointer can be extracted from an
12693  * appropriate reference with: ASN1_ITEM_rptr(X509). This
12694  * would be used when a function takes an ASN1_ITEM * argument.
12695  *
12696  */
12697 
12698 
12699 
12700 /* ASN1_ITEM pointer exported type */
12701 typedef const ASN1_ITEM ASN1_ITEM_EXP;
12702 
12703 /* Macro to obtain ASN1_ITEM pointer from exported type */
12704 
12705 
12706 /* Macro to include ASN1_ITEM pointer from base type */
12707 # 440 "/usr/include/openssl/asn1.h" 3 4
12708 /* Parameters used by ASN1_STRING_print_ex() */
12709 
12710 /*
12711  * These determine which characters to escape: RFC2253 special characters,
12712  * control characters and MSB set characters
12713  */
12714 
12715 
12716 
12717 
12718 
12719 /*
12720  * This flag determines how we do escaping: normally RC2253 backslash only,
12721  * set this to use backslash and quote.
12722  */
12723 
12724 
12725 
12726 /* These three flags are internal use only. */
12727 
12728 /* Character is a valid PrintableString character */
12729 
12730 /* Character needs escaping if it is the first character */
12731 
12732 /* Character needs escaping if it is the last character */
12733 
12734 
12735 /*
12736  * NB the internal flags are safely reused below by flags handled at the top
12737  * level.
12738  */
12739 
12740 /*
12741  * If this is set we convert all character strings to UTF8 first
12742  */
12743 
12744 
12745 
12746 /*
12747  * If this is set we don't attempt to interpret content: just assume all
12748  * strings are 1 byte per character. This will produce some pretty odd
12749  * looking output!
12750  */
12751 
12752 
12753 
12754 /* If this is set we include the string type in the output */
12755 
12756 
12757 /*
12758  * This determines which strings to display and which to 'dump' (hex dump of
12759  * content octets or DER encoding). We can only dump non character strings or
12760  * everything. If we don't dump 'unknown' they are interpreted as character
12761  * strings with 1 octet per character and are subject to the usual escaping
12762  * options.
12763  */
12764 
12765 
12766 
12767 
12768 /*
12769  * These determine what 'dumping' does, we can dump the content octets or the
12770  * DER encoding: both use the RFC2253 #XXXXX notation.
12771  */
12772 
12773 
12774 
12775 /*
12776  * All the string flags consistent with RFC2253, escaping control characters
12777  * isn't essential in RFC2253 but it is advisable anyway.
12778  */
12779 # 519 "/usr/include/openssl/asn1.h" 3 4
12780 struct stack_st_ASN1_INTEGER { _STACK stack; };
12781 
12782 
12783 struct stack_st_ASN1_GENERALSTRING { _STACK stack; };
12784 
12785 typedef struct asn1_type_st {
12786     int type;
12787     union {
12788         char *ptr;
12789         ASN1_BOOLEAN boolean;
12790         ASN1_STRING *asn1_string;
12791         ASN1_OBJECT *object;
12792         ASN1_INTEGER *integer;
12793         ASN1_ENUMERATED *enumerated;
12794         ASN1_BIT_STRING *bit_string;
12795         ASN1_OCTET_STRING *octet_string;
12796         ASN1_PRINTABLESTRING *printablestring;
12797         ASN1_T61STRING *t61string;
12798         ASN1_IA5STRING *ia5string;
12799         ASN1_GENERALSTRING *generalstring;
12800         ASN1_BMPSTRING *bmpstring;
12801         ASN1_UNIVERSALSTRING *universalstring;
12802         ASN1_UTCTIME *utctime;
12803         ASN1_GENERALIZEDTIME *generalizedtime;
12804         ASN1_VISIBLESTRING *visiblestring;
12805         ASN1_UTF8STRING *utf8string;
12806         /*
12807          * set and sequence are left complete and still contain the set or
12808          * sequence bytes
12809          */
12810         ASN1_STRING *set;
12811         ASN1_STRING *sequence;
12812         ASN1_VALUE *asn1_value;
12813     } value;
12814 } ASN1_TYPE;
12815 
12816 struct stack_st_ASN1_TYPE { _STACK stack; };
12817 
12818 
12819 typedef struct stack_st_ASN1_TYPE ASN1_SEQUENCE_ANY;
12820 
12821 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;
12822 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;
12823 
12824 typedef struct NETSCAPE_X509_st {
12825     ASN1_OCTET_STRING *header;
12826     X509 *cert;
12827 } NETSCAPE_X509;
12828 
12829 /* This is used to contain a list of bit names */
12830 typedef struct BIT_STRING_BITNAME_st {
12831     int bitnum;
12832     const char *lname;
12833     const char *sname;
12834 } BIT_STRING_BITNAME;
12835 
12836 
12837 
12838 
12839 
12840 
12841 /* Macros for string operations */
12842 # 772 "/usr/include/openssl/asn1.h" 3 4
12843   /* for the is_set parameter to i2d_ASN1_SET */
12844 
12845 
12846 
12847 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;
12848 
12849 int ASN1_TYPE_get(ASN1_TYPE *a);
12850 void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
12851 int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
12852 int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
12853 
12854 ASN1_OBJECT *ASN1_OBJECT_new(void);
12855 void ASN1_OBJECT_free(ASN1_OBJECT *a);
12856 int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp);
12857 ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
12858                              long length);
12859 ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
12860                              long length);
12861 
12862 extern const ASN1_ITEM ASN1_OBJECT_it;
12863 
12864 struct stack_st_ASN1_OBJECT { _STACK stack; };
12865 
12866 
12867 ASN1_STRING *ASN1_STRING_new(void);
12868 void ASN1_STRING_free(ASN1_STRING *a);
12869 void ASN1_STRING_clear_free(ASN1_STRING *a);
12870 int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
12871 ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a);
12872 ASN1_STRING *ASN1_STRING_type_new(int type);
12873 int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
12874   /*
12875    * Since this is used to store all sorts of things, via macros, for now,
12876    * make its data void *
12877    */
12878 int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
12879 void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
12880 int ASN1_STRING_length(const ASN1_STRING *x);
12881 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
12882 int ASN1_STRING_type(ASN1_STRING *x);
12883 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
12884 
12885 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;
12886 int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp);
12887 ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
12888                                      const unsigned char **pp, long length);
12889 int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
12890 int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
12891 int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);
12892 int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a,
12893                           unsigned char *flags, int flags_len);
12894 
12895 
12896 int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
12897                                BIT_STRING_BITNAME *tbl, int indent);
12898 
12899 int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl);
12900 int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
12901                             BIT_STRING_BITNAME *tbl);
12902 
12903 int i2d_ASN1_BOOLEAN(int a, unsigned char **pp);
12904 int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length);
12905 
12906 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;
12907 int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp);
12908 ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp,
12909                                long length);
12910 ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
12911                                 long length);
12912 ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x);
12913 int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
12914 
12915 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;
12916 
12917 int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
12918 ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
12919 ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
12920                                int offset_day, long offset_sec);
12921 int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
12922 int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
12923 
12924 
12925 
12926 
12927 int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
12928 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
12929                                                time_t t);
12930 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
12931                                                time_t t, int offset_day,
12932                                                long offset_sec);
12933 int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
12934 int ASN1_TIME_diff(int *pday, int *psec,
12935                    const ASN1_TIME *from, const ASN1_TIME *to);
12936 
12937 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;
12938 ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a);
12939 int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
12940                           const ASN1_OCTET_STRING *b);
12941 int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
12942                           int len);
12943 
12944 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;
12945 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;
12946 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;
12947 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;
12948 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;
12949 
12950 int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
12951 int UTF8_putc(unsigned char *str, int len, unsigned long value);
12952 
12953 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;
12954 
12955 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;
12956 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;
12957 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;
12958 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;
12959 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;
12960 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;
12961 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;
12962 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;
12963 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;
12964 
12965 extern const ASN1_ITEM ASN1_OCTET_STRING_NDEF_it;
12966 
12967 ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
12968 ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
12969                          int offset_day, long offset_sec);
12970 int ASN1_TIME_check(ASN1_TIME *t);
12971 ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME
12972                                                    **out);
12973 int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
12974 
12975 int i2d_ASN1_SET(struct stack_st_OPENSSL_BLOCK *a, unsigned char **pp,
12976                  i2d_of_void *i2d, int ex_tag, int ex_class, int is_set);
12977 struct stack_st_OPENSSL_BLOCK *d2i_ASN1_SET(struct stack_st_OPENSSL_BLOCK **a,
12978                                       const unsigned char **pp,
12979                                       long length, d2i_of_void *d2i,
12980                                       void (*free_func) (OPENSSL_BLOCK),
12981                                       int ex_tag, int ex_class);
12982 
12983 
12984 int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);
12985 int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
12986 int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
12987 int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
12988 int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a);
12989 int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
12990 int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type);
12991 
12992 int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a);
12993 
12994 int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
12995 ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
12996                                 const char *sn, const char *ln);
12997 
12998 int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
12999 long ASN1_INTEGER_get(const ASN1_INTEGER *a);
13000 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
13001 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
13002 
13003 int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
13004 long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a);
13005 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai);
13006 BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn);
13007 
13008 /* General */
13009 /* given a string, return the correct type, max is the maximum length */
13010 int ASN1_PRINTABLE_type(const unsigned char *s, int max);
13011 
13012 int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass);
13013 ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
13014                             long length, int Ptag, int Pclass);
13015 unsigned long ASN1_tag2bit(int tag);
13016 /* type is one or more of the B_ASN1_ values. */
13017 ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp,
13018                                  long length, int type);
13019 
13020 /* PARSING */
13021 int asn1_Finish(ASN1_CTX *c);
13022 int asn1_const_Finish(ASN1_const_CTX *c);
13023 
13024 /* SPECIALS */
13025 int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
13026                     int *pclass, long omax);
13027 int ASN1_check_infinite_end(unsigned char **p, long len);
13028 int ASN1_const_check_infinite_end(const unsigned char **p, long len);
13029 void ASN1_put_object(unsigned char **pp, int constructed, int length,
13030                      int tag, int xclass);
13031 int ASN1_put_eoc(unsigned char **pp);
13032 int ASN1_object_size(int constructed, int length, int tag);
13033 
13034 /* Used to implement other functions */
13035 void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);
13036 # 976 "/usr/include/openssl/asn1.h" 3 4
13037 void *ASN1_item_dup(const ASN1_ITEM *it, void *x);
13038 
13039 /* ASN1 alloc/free macros for when a type is only used internally */
13040 
13041 
13042 
13043 
13044 
13045 
13046 void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
13047 
13048 
13049 
13050 
13051 
13052 
13053 
13054 void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
13055 int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x);
13056 # 1006 "/usr/include/openssl/asn1.h" 3 4
13057 int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x);
13058 int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);
13059 
13060 
13061 int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in);
13062 
13063 
13064 void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
13065 
13066 
13067 
13068 
13069 
13070 
13071 
13072 void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x);
13073 int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x);
13074 # 1034 "/usr/include/openssl/asn1.h" 3 4
13075 int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x);
13076 int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
13077 int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
13078 int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);
13079 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
13080 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);
13081 int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
13082                   unsigned char *buf, int off);
13083 int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
13084 int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
13085                     int dump);
13086 
13087 const char *ASN1_tag2str(int tag);
13088 
13089 /* Used to load and write netscape format cert */
13090 
13091 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;
13092 
13093 int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
13094 
13095 int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
13096 int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, int max_len);
13097 int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
13098                                   unsigned char *data, int len);
13099 int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num,
13100                                   unsigned char *data, int max_len);
13101 
13102 struct stack_st_OPENSSL_BLOCK *ASN1_seq_unpack(const unsigned char *buf, int len,
13103                                          d2i_of_void *d2i,
13104                                          void (*free_func) (OPENSSL_BLOCK));
13105 unsigned char *ASN1_seq_pack(struct stack_st_OPENSSL_BLOCK *safes, i2d_of_void *i2d,
13106                              unsigned char **buf, int *len);
13107 void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);
13108 void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
13109 ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d,
13110                               ASN1_OCTET_STRING **oct);
13111 
13112 
13113 
13114 
13115 
13116 
13117 ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
13118                             ASN1_OCTET_STRING **oct);
13119 
13120 void ASN1_STRING_set_default_mask(unsigned long mask);
13121 int ASN1_STRING_set_default_mask_asc(const char *p);
13122 unsigned long ASN1_STRING_get_default_mask(void);
13123 int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
13124                        int inform, unsigned long mask);
13125 int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
13126                         int inform, unsigned long mask,
13127                         long minsize, long maxsize);
13128 
13129 ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
13130                                     const unsigned char *in, int inlen,
13131                                     int inform, int nid);
13132 ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
13133 int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
13134 void ASN1_STRING_TABLE_cleanup(void);
13135 
13136 /* ASN1 template functions */
13137 
13138 /* Old API compatible functions */
13139 ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
13140 void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
13141 ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
13142                           long len, const ASN1_ITEM *it);
13143 int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
13144 int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out,
13145                        const ASN1_ITEM *it);
13146 
13147 void ASN1_add_oid_module(void);
13148 
13149 ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf);
13150 ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
13151 
13152 /* ASN1 Print flags */
13153 
13154 /* Indicate missing OPTIONAL fields */
13155 
13156 /* Mark start and end of SEQUENCE */
13157 
13158 /* Mark start and end of SEQUENCE/SET OF */
13159 
13160 /* Show the ASN1 type of primitives */
13161 
13162 /* Don't show ASN1 type of ANY */
13163 
13164 /* Don't show ASN1 type of MSTRINGs */
13165 
13166 /* Don't show field names in SEQUENCE */
13167 
13168 /* Show structure names of each SEQUENCE field */
13169 
13170 /* Don't show structure name even at top level */
13171 
13172 
13173 int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent,
13174                     const ASN1_ITEM *it, const ASN1_PCTX *pctx);
13175 ASN1_PCTX *ASN1_PCTX_new(void);
13176 void ASN1_PCTX_free(ASN1_PCTX *p);
13177 unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p);
13178 void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
13179 unsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p);
13180 void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
13181 unsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p);
13182 void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
13183 unsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p);
13184 void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
13185 unsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p);
13186 void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
13187 
13188 BIO_METHOD *BIO_f_asn1(void);
13189 
13190 BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
13191 
13192 int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
13193                         const ASN1_ITEM *it);
13194 int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
13195                               const char *hdr, const ASN1_ITEM *it);
13196 int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
13197                      int ctype_nid, int econt_nid,
13198                      struct stack_st_X509_ALGOR *mdalgs, const ASN1_ITEM *it);
13199 ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
13200 int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
13201 int SMIME_text(BIO *in, BIO *out);
13202 
13203 /* BEGIN ERROR CODES */
13204 /*
13205  * The following lines are auto generated by the script mkerr.pl. Any changes
13206  * made after this point may be overwritten when the script is next run.
13207  */
13208 
13209 void ERR_load_ASN1_strings(void);
13210 
13211 /* Error codes for the ASN1 functions. */
13212 
13213 /* Function codes. */
13214 # 1298 "/usr/include/openssl/asn1.h" 3 4
13215 /* Reason codes. */
13216 # 966 "/usr/include/openssl/objects.h" 2 3 4
13217 # 984 "/usr/include/openssl/objects.h" 3 4
13218 typedef struct obj_name_st {
13219     int type;
13220     int alias;
13221     const char *name;
13222     const char *data;
13223 } OBJ_NAME;
13224 
13225 
13226 
13227 int OBJ_NAME_init(void);
13228 int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
13229                        int (*cmp_func) (const char *, const char *),
13230                        void (*free_func) (const char *, int, const char *));
13231 const char *OBJ_NAME_get(const char *name, int type);
13232 int OBJ_NAME_add(const char *name, int type, const char *data);
13233 int OBJ_NAME_remove(const char *name, int type);
13234 void OBJ_NAME_cleanup(int type); /* -1 for everything */
13235 void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg),
13236                      void *arg);
13237 void OBJ_NAME_do_all_sorted(int type,
13238                             void (*fn) (const OBJ_NAME *, void *arg),
13239                             void *arg);
13240 
13241 ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o);
13242 ASN1_OBJECT *OBJ_nid2obj(int n);
13243 const char *OBJ_nid2ln(int n);
13244 const char *OBJ_nid2sn(int n);
13245 int OBJ_obj2nid(const ASN1_OBJECT *o);
13246 ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name);
13247 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
13248 int OBJ_txt2nid(const char *s);
13249 int OBJ_ln2nid(const char *s);
13250 int OBJ_sn2nid(const char *s);
13251 int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
13252 const void *OBJ_bsearch_(const void *key, const void *base, int num, int size,
13253                          int (*cmp) (const void *, const void *));
13254 const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
13255                             int size,
13256                             int (*cmp) (const void *, const void *),
13257                             int flags);
13258 # 1035 "/usr/include/openssl/objects.h" 3 4
13259 /*-
13260  * Unsolved problem: if a type is actually a pointer type, like
13261  * nid_triple is, then its impossible to get a const where you need
13262  * it. Consider:
13263  *
13264  * typedef int nid_triple[3];
13265  * const void *a_;
13266  * const nid_triple const *a = a_;
13267  *
13268  * The assignement discards a const because what you really want is:
13269  *
13270  * const int const * const *a = a_;
13271  *
13272  * But if you do that, you lose the fact that a is an array of 3 ints,
13273  * which breaks comparison functions.
13274  *
13275  * Thus we end up having to cast, sadly, or unpack the
13276  * declarations. Or, as I finally did in this case, delcare nid_triple
13277  * to be a struct, which it should have been in the first place.
13278  *
13279  * Ben, August 2008.
13280  *
13281  * Also, strictly speaking not all types need be const, but handling
13282  * the non-constness means a lot of complication, and in practice
13283  * comparison routines do always not touch their arguments.
13284  */
13285 # 1104 "/usr/include/openssl/objects.h" 3 4
13286 int OBJ_new_nid(int num);
13287 int OBJ_add_object(const ASN1_OBJECT *obj);
13288 int OBJ_create(const char *oid, const char *sn, const char *ln);
13289 void OBJ_cleanup(void);
13290 int OBJ_create_objects(BIO *in);
13291 
13292 int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);
13293 int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
13294 int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
13295 void OBJ_sigid_free(void);
13296 
13297 extern int obj_cleanup_defer;
13298 void check_defer(int nid);
13299 
13300 /* BEGIN ERROR CODES */
13301 /*
13302  * The following lines are auto generated by the script mkerr.pl. Any changes
13303  * made after this point may be overwritten when the script is next run.
13304  */
13305 void ERR_load_OBJ_strings(void);
13306 
13307 /* Error codes for the OBJ functions. */
13308 
13309 /* Function codes. */
13310 # 1136 "/usr/include/openssl/objects.h" 3 4
13311 /* Reason codes. */
13312 # 95 "/usr/include/openssl/evp.h" 2 3 4
13313 # 125 "/usr/include/openssl/evp.h" 3 4
13314 /*
13315  * Type needs to be a bit field Sub-type needs to be for variations on the
13316  * method, as in, can it do arbitrary encryption....
13317  */
13318 struct evp_pkey_st {
13319     int type;
13320     int save_type;
13321     int references;
13322     const EVP_PKEY_ASN1_METHOD *ameth;
13323     ENGINE *engine;
13324     union {
13325         char *ptr;
13326 
13327         struct rsa_st *rsa; /* RSA */
13328 
13329 
13330         struct dsa_st *dsa; /* DSA */
13331 
13332 
13333         struct dh_st *dh; /* DH */
13334 
13335 
13336         struct ec_key_st *ec; /* ECC */
13337 
13338     } pkey;
13339     int save_parameters;
13340     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
13341 } /* EVP_PKEY */ ;
13342 
13343 
13344 
13345 
13346 
13347 
13348 
13349 struct env_md_st {
13350     int type;
13351     int pkey_type;
13352     int md_size;
13353     unsigned long flags;
13354     int (*init) (EVP_MD_CTX *ctx);
13355     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
13356     int (*final) (EVP_MD_CTX *ctx, unsigned char *md);
13357     int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from);
13358     int (*cleanup) (EVP_MD_CTX *ctx);
13359     /* FIXME: prototype these some day */
13360     int (*sign) (int type, const unsigned char *m, unsigned int m_length,
13361                  unsigned char *sigret, unsigned int *siglen, void *key);
13362     int (*verify) (int type, const unsigned char *m, unsigned int m_length,
13363                    const unsigned char *sigbuf, unsigned int siglen,
13364                    void *key);
13365     int required_pkey_type[5]; /* EVP_PKEY_xxx */
13366     int block_size;
13367     int ctx_size; /* how big does the ctx->md_data need to be */
13368     /* control function */
13369     int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
13370 } /* EVP_MD */ ;
13371 
13372 typedef int evp_sign_method(int type, const unsigned char *m,
13373                             unsigned int m_length, unsigned char *sigret,
13374                             unsigned int *siglen, void *key);
13375 typedef int evp_verify_method(int type, const unsigned char *m,
13376                               unsigned int m_length,
13377                               const unsigned char *sigbuf,
13378                               unsigned int siglen, void *key);
13379 
13380 /* digest can only handle a single block */
13381 
13382 
13383 /*
13384  * digest is a "clone" digest used
13385  * which is a copy of an existing
13386  * one for a specific public key type.
13387  * EVP_dss1() etc
13388  */
13389 
13390 
13391 /* Digest uses EVP_PKEY_METHOD for signing instead of MD specific signing */
13392 
13393 
13394 
13395 /* DigestAlgorithmIdentifier flags... */
13396 
13397 
13398 
13399 /* NULL or absent parameter accepted. Use NULL */
13400 
13401 
13402 
13403 /* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */
13404 
13405 
13406 
13407 /* Custom handling via ctrl */
13408 
13409 
13410 
13411 /* Note if suitable for use in FIPS mode */
13412 
13413 
13414 /* Digest ctrls */
13415 
13416 
13417 
13418 
13419 /* Minimum Algorithm specific ctrl value */
13420 # 268 "/usr/include/openssl/evp.h" 3 4
13421 struct env_md_ctx_st {
13422     const EVP_MD *digest;
13423     ENGINE *engine; /* functional reference if 'digest' is
13424                                  * ENGINE-provided */
13425     unsigned long flags;
13426     void *md_data;
13427     /* Public key context for sign/verify */
13428     EVP_PKEY_CTX *pctx;
13429     /* Update function: usually copied from EVP_MD */
13430     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
13431 } /* EVP_MD_CTX */ ;
13432 
13433 /* values for EVP_MD_CTX flags */
13434 
13435 
13436 
13437 
13438 
13439 
13440 
13441 /*
13442  * FIPS and pad options are ignored in 1.0.0, definitions are here so we
13443  * don't accidentally reuse the values for other purposes.
13444  */
13445 
13446 
13447 
13448 
13449 /*
13450  * The following PAD options are also currently ignored in 1.0.0, digest
13451  * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*()
13452  * instead.
13453  */
13454 
13455 
13456 
13457 
13458 
13459 
13460 
13461 struct evp_cipher_st {
13462     int nid;
13463     int block_size;
13464     /* Default value for variable length ciphers */
13465     int key_len;
13466     int iv_len;
13467     /* Various flags */
13468     unsigned long flags;
13469     /* init key */
13470     int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key,
13471                  const unsigned char *iv, int enc);
13472     /* encrypt/decrypt data */
13473     int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out,
13474                       const unsigned char *in, size_t inl);
13475     /* cleanup ctx */
13476     int (*cleanup) (EVP_CIPHER_CTX *);
13477     /* how big ctx->cipher_data needs to be */
13478     int ctx_size;
13479     /* Populate a ASN1_TYPE with parameters */
13480     int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
13481     /* Get parameters from a ASN1_TYPE */
13482     int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
13483     /* Miscellaneous operations */
13484     int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr);
13485     /* Application data */
13486     void *app_data;
13487 } /* EVP_CIPHER */ ;
13488 
13489 /* Values for cipher flags */
13490 
13491 /* Modes for ciphers */
13492 # 351 "/usr/include/openssl/evp.h" 3 4
13493 /* Set if variable length cipher */
13494 
13495 /* Set if the iv handling should be done by the cipher itself */
13496 
13497 /* Set if the cipher's init() function should be called if key is NULL */
13498 
13499 /* Call ctrl() to init cipher parameters */
13500 
13501 /* Don't use standard key length function */
13502 
13503 /* Don't use standard block padding */
13504 
13505 /* cipher handles random key generation */
13506 
13507 /* cipher has its own additional copying logic */
13508 
13509 /* Allow use default ASN1 get/set iv */
13510 
13511 /* Buffer length in bits not bytes: CFB1 mode only */
13512 
13513 /* Note if suitable for use in FIPS mode */
13514 
13515 /* Allow non FIPS cipher in FIPS mode */
13516 
13517 /*
13518  * Cipher handles any and all padding logic as well as finalisation.
13519  */
13520 
13521 
13522 
13523 
13524 /*
13525  * Cipher context flag to indicate we can handle wrap mode: if allowed in
13526  * older applications it could overflow buffers.
13527  */
13528 
13529 
13530 
13531 /* ctrl() values */
13532 # 410 "/usr/include/openssl/evp.h" 3 4
13533 /*
13534  * AEAD cipher deduces payload length and returns number of bytes required to
13535  * store MAC and eventual padding. Subsequent call to EVP_Cipher even
13536  * appends/verifies MAC.
13537  */
13538 
13539 /* Used by composite AEAD ciphers, no-op in GCM, CCM... */
13540 
13541 /* Set the GCM invocation field, decrypt only */
13542 
13543 
13544 
13545 
13546 
13547 
13548 
13549 /* RFC 5246 defines additional data to be 13 bytes in length */
13550 
13551 
13552 typedef struct {
13553     unsigned char *out;
13554     const unsigned char *inp;
13555     size_t len;
13556     unsigned int interleave;
13557 } EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM;
13558 
13559 /* GCM TLS constants */
13560 /* Length of fixed part of IV derived from PRF */
13561 
13562 /* Length of explicit part of IV part of TLS records */
13563 
13564 /* Length of tag for TLS */
13565 
13566 
13567 typedef struct evp_cipher_info_st {
13568     const EVP_CIPHER *cipher;
13569     unsigned char iv[16];
13570 } EVP_CIPHER_INFO;
13571 
13572 struct evp_cipher_ctx_st {
13573     const EVP_CIPHER *cipher;
13574     ENGINE *engine; /* functional reference if 'cipher' is
13575                                  * ENGINE-provided */
13576     int encrypt; /* encrypt or decrypt */
13577     int buf_len; /* number we have left */
13578     unsigned char oiv[16]; /* original iv */
13579     unsigned char iv[16]; /* working iv */
13580     unsigned char buf[32]; /* saved partial block */
13581     int num; /* used by cfb/ofb/ctr mode */
13582     void *app_data; /* application stuff */
13583     int key_len; /* May change for variable length cipher */
13584     unsigned long flags; /* Various flags */
13585     void *cipher_data; /* per EVP data */
13586     int final_used;
13587     int block_mask;
13588     unsigned char final[32]; /* possible final block */
13589 } /* EVP_CIPHER_CTX */ ;
13590 
13591 typedef struct evp_Encode_Ctx_st {
13592     /* number saved in a partial encode/decode */
13593     int num;
13594     /*
13595      * The length is either the output line length (in input bytes) or the
13596      * shortest input line length that is ok.  Once decoding begins, the
13597      * length is adjusted up each time a longer line is decoded
13598      */
13599     int length;
13600     /* data to encode */
13601     unsigned char enc_data[80];
13602     /* number read on current line */
13603     int line_num;
13604     int expect_nl;
13605 } EVP_ENCODE_CTX;
13606 
13607 /* Password based encryption function */
13608 typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass,
13609                               int passlen, ASN1_TYPE *param,
13610                               const EVP_CIPHER *cipher, const EVP_MD *md,
13611                               int en_de);
13612 # 510 "/usr/include/openssl/evp.h" 3 4
13613 /* Add some extra combinations */
13614 
13615 
13616 
13617 
13618 
13619 int EVP_MD_type(const EVP_MD *md);
13620 
13621 
13622 int EVP_MD_pkey_type(const EVP_MD *md);
13623 int EVP_MD_size(const EVP_MD *md);
13624 int EVP_MD_block_size(const EVP_MD *md);
13625 unsigned long EVP_MD_flags(const EVP_MD *md);
13626 
13627 const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
13628 
13629 
13630 
13631 
13632 int EVP_CIPHER_nid(const EVP_CIPHER *cipher);
13633 
13634 int EVP_CIPHER_block_size(const EVP_CIPHER *cipher);
13635 int EVP_CIPHER_key_length(const EVP_CIPHER *cipher);
13636 int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher);
13637 unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher);
13638 
13639 
13640 const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);
13641 int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx);
13642 int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx);
13643 int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx);
13644 int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx);
13645 int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
13646 void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
13647 void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);
13648 
13649 unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx);
13650 # 574 "/usr/include/openssl/evp.h" 3 4
13651 int EVP_Cipher(EVP_CIPHER_CTX *c,
13652                unsigned char *out, const unsigned char *in, unsigned int inl);
13653 # 586 "/usr/include/openssl/evp.h" 3 4
13654 void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
13655 int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
13656 EVP_MD_CTX *EVP_MD_CTX_create(void);
13657 void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
13658 int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
13659 void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
13660 void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
13661 int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
13662 int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
13663 int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
13664 int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
13665 int EVP_Digest(const void *data, size_t count,
13666                unsigned char *md, unsigned int *size, const EVP_MD *type,
13667                ENGINE *impl);
13668 
13669 int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in);
13670 int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
13671 int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
13672 
13673 int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);
13674 int EVP_read_pw_string_min(char *buf, int minlen, int maxlen,
13675                            const char *prompt, int verify);
13676 void EVP_set_pw_prompt(const char *prompt);
13677 char *EVP_get_pw_prompt(void);
13678 
13679 int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
13680                    const unsigned char *salt, const unsigned char *data,
13681                    int datal, int count, unsigned char *key,
13682                    unsigned char *iv);
13683 
13684 void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
13685 void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
13686 int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);
13687 
13688 int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13689                     const unsigned char *key, const unsigned char *iv);
13690 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13691                        ENGINE *impl, const unsigned char *key,
13692                        const unsigned char *iv);
13693 int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
13694                       const unsigned char *in, int inl);
13695 int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
13696 int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
13697 
13698 int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13699                     const unsigned char *key, const unsigned char *iv);
13700 int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13701                        ENGINE *impl, const unsigned char *key,
13702                        const unsigned char *iv);
13703 int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
13704                       const unsigned char *in, int inl);
13705 int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
13706 int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
13707 
13708 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13709                    const unsigned char *key, const unsigned char *iv,
13710                    int enc);
13711 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13712                       ENGINE *impl, const unsigned char *key,
13713                       const unsigned char *iv, int enc);
13714 int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
13715                      const unsigned char *in, int inl);
13716 int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
13717 int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
13718 
13719 int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
13720                   EVP_PKEY *pkey);
13721 
13722 int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
13723                     unsigned int siglen, EVP_PKEY *pkey);
13724 
13725 int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
13726                        const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
13727 int EVP_DigestSignFinal(EVP_MD_CTX *ctx,
13728                         unsigned char *sigret, size_t *siglen);
13729 
13730 int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
13731                          const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
13732 int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx,
13733                           const unsigned char *sig, size_t siglen);
13734 
13735 int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
13736                  const unsigned char *ek, int ekl, const unsigned char *iv,
13737                  EVP_PKEY *priv);
13738 int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
13739 
13740 int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
13741                  unsigned char **ek, int *ekl, unsigned char *iv,
13742                  EVP_PKEY **pubk, int npubk);
13743 int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
13744 
13745 void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
13746 void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
13747                       const unsigned char *in, int inl);
13748 void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
13749 int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
13750 
13751 void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
13752 int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
13753                      const unsigned char *in, int inl);
13754 int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
13755                     char *out, int *outl);
13756 int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
13757 
13758 void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
13759 int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
13760 EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
13761 void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a);
13762 int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
13763 int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
13764 int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
13765 int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
13766 
13767 
13768 BIO_METHOD *BIO_f_md(void);
13769 BIO_METHOD *BIO_f_base64(void);
13770 BIO_METHOD *BIO_f_cipher(void);
13771 BIO_METHOD *BIO_f_reliable(void);
13772 void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
13773                     const unsigned char *i, int enc);
13774 
13775 
13776 const EVP_MD *EVP_md_null(void);
13777 
13778 const EVP_MD *EVP_md2(void);
13779 
13780 
13781 const EVP_MD *EVP_md4(void);
13782 
13783 
13784 const EVP_MD *EVP_md5(void);
13785 
13786 
13787 const EVP_MD *EVP_sha(void);
13788 const EVP_MD *EVP_sha1(void);
13789 const EVP_MD *EVP_dss(void);
13790 const EVP_MD *EVP_dss1(void);
13791 const EVP_MD *EVP_ecdsa(void);
13792 
13793 
13794 const EVP_MD *EVP_sha224(void);
13795 const EVP_MD *EVP_sha256(void);
13796 
13797 
13798 const EVP_MD *EVP_sha384(void);
13799 const EVP_MD *EVP_sha512(void);
13800 
13801 
13802 
13803 
13804 
13805 const EVP_MD *EVP_ripemd160(void);
13806 
13807 
13808 
13809 
13810 const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */
13811 
13812 const EVP_CIPHER *EVP_des_ecb(void);
13813 const EVP_CIPHER *EVP_des_ede(void);
13814 const EVP_CIPHER *EVP_des_ede3(void);
13815 const EVP_CIPHER *EVP_des_ede_ecb(void);
13816 const EVP_CIPHER *EVP_des_ede3_ecb(void);
13817 const EVP_CIPHER *EVP_des_cfb64(void);
13818 
13819 const EVP_CIPHER *EVP_des_cfb1(void);
13820 const EVP_CIPHER *EVP_des_cfb8(void);
13821 const EVP_CIPHER *EVP_des_ede_cfb64(void);
13822 
13823 
13824 
13825 
13826 
13827 const EVP_CIPHER *EVP_des_ede3_cfb64(void);
13828 
13829 const EVP_CIPHER *EVP_des_ede3_cfb1(void);
13830 const EVP_CIPHER *EVP_des_ede3_cfb8(void);
13831 const EVP_CIPHER *EVP_des_ofb(void);
13832 const EVP_CIPHER *EVP_des_ede_ofb(void);
13833 const EVP_CIPHER *EVP_des_ede3_ofb(void);
13834 const EVP_CIPHER *EVP_des_cbc(void);
13835 const EVP_CIPHER *EVP_des_ede_cbc(void);
13836 const EVP_CIPHER *EVP_des_ede3_cbc(void);
13837 const EVP_CIPHER *EVP_desx_cbc(void);
13838 const EVP_CIPHER *EVP_des_ede3_wrap(void);
13839 /*
13840  * This should now be supported through the dev_crypto ENGINE. But also, why
13841  * are rc4 and md5 declarations made here inside a "NO_DES" precompiler
13842  * branch?
13843  */
13844 # 785 "/usr/include/openssl/evp.h" 3 4
13845 const EVP_CIPHER *EVP_rc4(void);
13846 const EVP_CIPHER *EVP_rc4_40(void);
13847 
13848 const EVP_CIPHER *EVP_rc4_hmac_md5(void);
13849 # 799 "/usr/include/openssl/evp.h" 3 4
13850 const EVP_CIPHER *EVP_rc2_ecb(void);
13851 const EVP_CIPHER *EVP_rc2_cbc(void);
13852 const EVP_CIPHER *EVP_rc2_40_cbc(void);
13853 const EVP_CIPHER *EVP_rc2_64_cbc(void);
13854 const EVP_CIPHER *EVP_rc2_cfb64(void);
13855 
13856 const EVP_CIPHER *EVP_rc2_ofb(void);
13857 
13858 
13859 const EVP_CIPHER *EVP_bf_ecb(void);
13860 const EVP_CIPHER *EVP_bf_cbc(void);
13861 const EVP_CIPHER *EVP_bf_cfb64(void);
13862 
13863 const EVP_CIPHER *EVP_bf_ofb(void);
13864 
13865 
13866 const EVP_CIPHER *EVP_cast5_ecb(void);
13867 const EVP_CIPHER *EVP_cast5_cbc(void);
13868 const EVP_CIPHER *EVP_cast5_cfb64(void);
13869 
13870 const EVP_CIPHER *EVP_cast5_ofb(void);
13871 # 829 "/usr/include/openssl/evp.h" 3 4
13872 const EVP_CIPHER *EVP_aes_128_ecb(void);
13873 const EVP_CIPHER *EVP_aes_128_cbc(void);
13874 const EVP_CIPHER *EVP_aes_128_cfb1(void);
13875 const EVP_CIPHER *EVP_aes_128_cfb8(void);
13876 const EVP_CIPHER *EVP_aes_128_cfb128(void);
13877 
13878 const EVP_CIPHER *EVP_aes_128_ofb(void);
13879 const EVP_CIPHER *EVP_aes_128_ctr(void);
13880 const EVP_CIPHER *EVP_aes_128_ccm(void);
13881 const EVP_CIPHER *EVP_aes_128_gcm(void);
13882 const EVP_CIPHER *EVP_aes_128_xts(void);
13883 const EVP_CIPHER *EVP_aes_128_wrap(void);
13884 const EVP_CIPHER *EVP_aes_192_ecb(void);
13885 const EVP_CIPHER *EVP_aes_192_cbc(void);
13886 const EVP_CIPHER *EVP_aes_192_cfb1(void);
13887 const EVP_CIPHER *EVP_aes_192_cfb8(void);
13888 const EVP_CIPHER *EVP_aes_192_cfb128(void);
13889 
13890 const EVP_CIPHER *EVP_aes_192_ofb(void);
13891 const EVP_CIPHER *EVP_aes_192_ctr(void);
13892 const EVP_CIPHER *EVP_aes_192_ccm(void);
13893 const EVP_CIPHER *EVP_aes_192_gcm(void);
13894 const EVP_CIPHER *EVP_aes_192_wrap(void);
13895 const EVP_CIPHER *EVP_aes_256_ecb(void);
13896 const EVP_CIPHER *EVP_aes_256_cbc(void);
13897 const EVP_CIPHER *EVP_aes_256_cfb1(void);
13898 const EVP_CIPHER *EVP_aes_256_cfb8(void);
13899 const EVP_CIPHER *EVP_aes_256_cfb128(void);
13900 
13901 const EVP_CIPHER *EVP_aes_256_ofb(void);
13902 const EVP_CIPHER *EVP_aes_256_ctr(void);
13903 const EVP_CIPHER *EVP_aes_256_ccm(void);
13904 const EVP_CIPHER *EVP_aes_256_gcm(void);
13905 const EVP_CIPHER *EVP_aes_256_xts(void);
13906 const EVP_CIPHER *EVP_aes_256_wrap(void);
13907 
13908 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void);
13909 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void);
13910 
13911 
13912 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void);
13913 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void);
13914 
13915 
13916 
13917 const EVP_CIPHER *EVP_camellia_128_ecb(void);
13918 const EVP_CIPHER *EVP_camellia_128_cbc(void);
13919 const EVP_CIPHER *EVP_camellia_128_cfb1(void);
13920 const EVP_CIPHER *EVP_camellia_128_cfb8(void);
13921 const EVP_CIPHER *EVP_camellia_128_cfb128(void);
13922 
13923 const EVP_CIPHER *EVP_camellia_128_ofb(void);
13924 const EVP_CIPHER *EVP_camellia_192_ecb(void);
13925 const EVP_CIPHER *EVP_camellia_192_cbc(void);
13926 const EVP_CIPHER *EVP_camellia_192_cfb1(void);
13927 const EVP_CIPHER *EVP_camellia_192_cfb8(void);
13928 const EVP_CIPHER *EVP_camellia_192_cfb128(void);
13929 
13930 const EVP_CIPHER *EVP_camellia_192_ofb(void);
13931 const EVP_CIPHER *EVP_camellia_256_ecb(void);
13932 const EVP_CIPHER *EVP_camellia_256_cbc(void);
13933 const EVP_CIPHER *EVP_camellia_256_cfb1(void);
13934 const EVP_CIPHER *EVP_camellia_256_cfb8(void);
13935 const EVP_CIPHER *EVP_camellia_256_cfb128(void);
13936 
13937 const EVP_CIPHER *EVP_camellia_256_ofb(void);
13938 # 905 "/usr/include/openssl/evp.h" 3 4
13939 void OPENSSL_add_all_algorithms_noconf(void);
13940 void OPENSSL_add_all_algorithms_conf(void);
13941 # 916 "/usr/include/openssl/evp.h" 3 4
13942 void OpenSSL_add_all_ciphers(void);
13943 void OpenSSL_add_all_digests(void);
13944 
13945 
13946 
13947 
13948 int EVP_add_cipher(const EVP_CIPHER *cipher);
13949 int EVP_add_digest(const EVP_MD *digest);
13950 
13951 const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
13952 const EVP_MD *EVP_get_digestbyname(const char *name);
13953 void EVP_cleanup(void);
13954 
13955 void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph,
13956                                    const char *from, const char *to, void *x),
13957                        void *arg);
13958 void EVP_CIPHER_do_all_sorted(void (*fn)
13959                                (const EVP_CIPHER *ciph, const char *from,
13960                                 const char *to, void *x), void *arg);
13961 
13962 void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph,
13963                                const char *from, const char *to, void *x),
13964                    void *arg);
13965 void EVP_MD_do_all_sorted(void (*fn)
13966                            (const EVP_MD *ciph, const char *from,
13967                             const char *to, void *x), void *arg);
13968 
13969 int EVP_PKEY_decrypt_old(unsigned char *dec_key,
13970                          const unsigned char *enc_key, int enc_key_len,
13971                          EVP_PKEY *private_key);
13972 int EVP_PKEY_encrypt_old(unsigned char *enc_key,
13973                          const unsigned char *key, int key_len,
13974                          EVP_PKEY *pub_key);
13975 int EVP_PKEY_type(int type);
13976 int EVP_PKEY_id(const EVP_PKEY *pkey);
13977 int EVP_PKEY_base_id(const EVP_PKEY *pkey);
13978 int EVP_PKEY_bits(EVP_PKEY *pkey);
13979 int EVP_PKEY_size(EVP_PKEY *pkey);
13980 int EVP_PKEY_set_type(EVP_PKEY *pkey, int type);
13981 int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
13982 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
13983 void *EVP_PKEY_get0(EVP_PKEY *pkey);
13984 
13985 
13986 struct rsa_st;
13987 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key);
13988 struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
13989 
13990 
13991 struct dsa_st;
13992 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key);
13993 struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
13994 
13995 
13996 struct dh_st;
13997 int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key);
13998 struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
13999 
14000 
14001 struct ec_key_st;
14002 int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);
14003 struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
14004 
14005 
14006 EVP_PKEY *EVP_PKEY_new(void);
14007 void EVP_PKEY_free(EVP_PKEY *pkey);
14008 
14009 EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
14010                         long length);
14011 int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);
14012 
14013 EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
14014                          long length);
14015 EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,
14016                              long length);
14017 int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp);
14018 
14019 int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
14020 int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
14021 int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);
14022 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
14023 
14024 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
14025 
14026 int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
14027                           int indent, ASN1_PCTX *pctx);
14028 int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
14029                            int indent, ASN1_PCTX *pctx);
14030 int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
14031                           int indent, ASN1_PCTX *pctx);
14032 
14033 int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
14034 
14035 int EVP_CIPHER_type(const EVP_CIPHER *ctx);
14036 
14037 /* calls methods */
14038 int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
14039 int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
14040 
14041 /* These are used by EVP_CIPHER methods */
14042 int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
14043 int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
14044 
14045 /* PKCS5 password based encryption */
14046 int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
14047                        ASN1_TYPE *param, const EVP_CIPHER *cipher,
14048                        const EVP_MD *md, int en_de);
14049 int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
14050                            const unsigned char *salt, int saltlen, int iter,
14051                            int keylen, unsigned char *out);
14052 int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
14053                       const unsigned char *salt, int saltlen, int iter,
14054                       const EVP_MD *digest, int keylen, unsigned char *out);
14055 int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
14056                           ASN1_TYPE *param, const EVP_CIPHER *cipher,
14057                           const EVP_MD *md, int en_de);
14058 
14059 void PKCS5_PBE_add(void);
14060 
14061 int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
14062                        ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
14063 
14064 /* PBE type */
14065 
14066 /* Can appear as the outermost AlgorithmIdentifier */
14067 
14068 /* Is an PRF type OID */
14069 
14070 
14071 int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
14072                          int md_nid, EVP_PBE_KEYGEN *keygen);
14073 int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
14074                     EVP_PBE_KEYGEN *keygen);
14075 int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid,
14076                  EVP_PBE_KEYGEN **pkeygen);
14077 void EVP_PBE_cleanup(void);
14078 # 1064 "/usr/include/openssl/evp.h" 3 4
14079 int EVP_PKEY_asn1_get_count(void);
14080 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
14081 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
14082 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
14083                                                    const char *str, int len);
14084 int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
14085 int EVP_PKEY_asn1_add_alias(int to, int from);
14086 int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
14087                             int *ppkey_flags, const char **pinfo,
14088                             const char **ppem_str,
14089                             const EVP_PKEY_ASN1_METHOD *ameth);
14090 
14091 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(EVP_PKEY *pkey);
14092 EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,
14093                                         const char *pem_str,
14094                                         const char *info);
14095 void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
14096                         const EVP_PKEY_ASN1_METHOD *src);
14097 void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
14098 void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
14099                               int (*pub_decode) (EVP_PKEY *pk,
14100                                                  X509_PUBKEY *pub),
14101                               int (*pub_encode) (X509_PUBKEY *pub,
14102                                                  const EVP_PKEY *pk),
14103                               int (*pub_cmp) (const EVP_PKEY *a,
14104                                               const EVP_PKEY *b),
14105                               int (*pub_print) (BIO *out,
14106                                                 const EVP_PKEY *pkey,
14107                                                 int indent, ASN1_PCTX *pctx),
14108                               int (*pkey_size) (const EVP_PKEY *pk),
14109                               int (*pkey_bits) (const EVP_PKEY *pk));
14110 void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
14111                                int (*priv_decode) (EVP_PKEY *pk,
14112                                                    PKCS8_PRIV_KEY_INFO
14113                                                    *p8inf),
14114                                int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8,
14115                                                    const EVP_PKEY *pk),
14116                                int (*priv_print) (BIO *out,
14117                                                   const EVP_PKEY *pkey,
14118                                                   int indent,
14119                                                   ASN1_PCTX *pctx));
14120 void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
14121                              int (*param_decode) (EVP_PKEY *pkey,
14122                                                   const unsigned char **pder,
14123                                                   int derlen),
14124                              int (*param_encode) (const EVP_PKEY *pkey,
14125                                                   unsigned char **pder),
14126                              int (*param_missing) (const EVP_PKEY *pk),
14127                              int (*param_copy) (EVP_PKEY *to,
14128                                                 const EVP_PKEY *from),
14129                              int (*param_cmp) (const EVP_PKEY *a,
14130                                                const EVP_PKEY *b),
14131                              int (*param_print) (BIO *out,
14132                                                  const EVP_PKEY *pkey,
14133                                                  int indent,
14134                                                  ASN1_PCTX *pctx));
14135 
14136 void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
14137                             void (*pkey_free) (EVP_PKEY *pkey));
14138 void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
14139                             int (*pkey_ctrl) (EVP_PKEY *pkey, int op,
14140                                               long arg1, void *arg2));
14141 void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
14142                             int (*item_verify) (EVP_MD_CTX *ctx,
14143                                                 const ASN1_ITEM *it,
14144                                                 void *asn,
14145                                                 X509_ALGOR *a,
14146                                                 ASN1_BIT_STRING *sig,
14147                                                 EVP_PKEY *pkey),
14148                             int (*item_sign) (EVP_MD_CTX *ctx,
14149                                               const ASN1_ITEM *it,
14150                                               void *asn,
14151                                               X509_ALGOR *alg1,
14152                                               X509_ALGOR *alg2,
14153                                               ASN1_BIT_STRING *sig));
14154 # 1185 "/usr/include/openssl/evp.h" 3 4
14155 /* Used by GOST key encryption in TLS */
14156 # 1199 "/usr/include/openssl/evp.h" 3 4
14157 /*
14158  * Method handles all operations: don't assume any digest related defaults.
14159  */
14160 
14161 
14162 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
14163 EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);
14164 void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
14165                              const EVP_PKEY_METHOD *meth);
14166 void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src);
14167 void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
14168 int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
14169 
14170 EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
14171 EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
14172 EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
14173 void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
14174 
14175 int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
14176                       int cmd, int p1, void *p2);
14177 int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
14178                           const char *value);
14179 
14180 int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);
14181 void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);
14182 
14183 EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
14184                                const unsigned char *key, int keylen);
14185 
14186 void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
14187 void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx);
14188 EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
14189 
14190 EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
14191 
14192 void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
14193 void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
14194 
14195 int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
14196 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
14197                   unsigned char *sig, size_t *siglen,
14198                   const unsigned char *tbs, size_t tbslen);
14199 int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
14200 int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
14201                     const unsigned char *sig, size_t siglen,
14202                     const unsigned char *tbs, size_t tbslen);
14203 int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
14204 int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
14205                             unsigned char *rout, size_t *routlen,
14206                             const unsigned char *sig, size_t siglen);
14207 int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
14208 int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
14209                      unsigned char *out, size_t *outlen,
14210                      const unsigned char *in, size_t inlen);
14211 int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
14212 int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
14213                      unsigned char *out, size_t *outlen,
14214                      const unsigned char *in, size_t inlen);
14215 
14216 int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
14217 int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
14218 int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
14219 
14220 typedef int EVP_PKEY_gen_cb (EVP_PKEY_CTX *ctx);
14221 
14222 int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
14223 int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
14224 int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
14225 int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
14226 
14227 void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
14228 EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
14229 
14230 int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
14231 
14232 void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
14233                             int (*init) (EVP_PKEY_CTX *ctx));
14234 
14235 void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth,
14236                             int (*copy) (EVP_PKEY_CTX *dst,
14237                                          EVP_PKEY_CTX *src));
14238 
14239 void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth,
14240                                void (*cleanup) (EVP_PKEY_CTX *ctx));
14241 
14242 void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth,
14243                                 int (*paramgen_init) (EVP_PKEY_CTX *ctx),
14244                                 int (*paramgen) (EVP_PKEY_CTX *ctx,
14245                                                  EVP_PKEY *pkey));
14246 
14247 void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth,
14248                               int (*keygen_init) (EVP_PKEY_CTX *ctx),
14249                               int (*keygen) (EVP_PKEY_CTX *ctx,
14250                                              EVP_PKEY *pkey));
14251 
14252 void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth,
14253                             int (*sign_init) (EVP_PKEY_CTX *ctx),
14254                             int (*sign) (EVP_PKEY_CTX *ctx,
14255                                          unsigned char *sig, size_t *siglen,
14256                                          const unsigned char *tbs,
14257                                          size_t tbslen));
14258 
14259 void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth,
14260                               int (*verify_init) (EVP_PKEY_CTX *ctx),
14261                               int (*verify) (EVP_PKEY_CTX *ctx,
14262                                              const unsigned char *sig,
14263                                              size_t siglen,
14264                                              const unsigned char *tbs,
14265                                              size_t tbslen));
14266 
14267 void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth,
14268                                       int (*verify_recover_init) (EVP_PKEY_CTX
14269                                                                   *ctx),
14270                                       int (*verify_recover) (EVP_PKEY_CTX
14271                                                              *ctx,
14272                                                              unsigned char
14273                                                              *sig,
14274                                                              size_t *siglen,
14275                                                              const unsigned
14276                                                              char *tbs,
14277                                                              size_t tbslen));
14278 
14279 void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth,
14280                                int (*signctx_init) (EVP_PKEY_CTX *ctx,
14281                                                     EVP_MD_CTX *mctx),
14282                                int (*signctx) (EVP_PKEY_CTX *ctx,
14283                                                unsigned char *sig,
14284                                                size_t *siglen,
14285                                                EVP_MD_CTX *mctx));
14286 
14287 void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth,
14288                                  int (*verifyctx_init) (EVP_PKEY_CTX *ctx,
14289                                                         EVP_MD_CTX *mctx),
14290                                  int (*verifyctx) (EVP_PKEY_CTX *ctx,
14291                                                    const unsigned char *sig,
14292                                                    int siglen,
14293                                                    EVP_MD_CTX *mctx));
14294 
14295 void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth,
14296                                int (*encrypt_init) (EVP_PKEY_CTX *ctx),
14297                                int (*encryptfn) (EVP_PKEY_CTX *ctx,
14298                                                  unsigned char *out,
14299                                                  size_t *outlen,
14300                                                  const unsigned char *in,
14301                                                  size_t inlen));
14302 
14303 void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth,
14304                                int (*decrypt_init) (EVP_PKEY_CTX *ctx),
14305                                int (*decrypt) (EVP_PKEY_CTX *ctx,
14306                                                unsigned char *out,
14307                                                size_t *outlen,
14308                                                const unsigned char *in,
14309                                                size_t inlen));
14310 
14311 void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth,
14312                               int (*derive_init) (EVP_PKEY_CTX *ctx),
14313                               int (*derive) (EVP_PKEY_CTX *ctx,
14314                                              unsigned char *key,
14315                                              size_t *keylen));
14316 
14317 void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
14318                             int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
14319                                          void *p2),
14320                             int (*ctrl_str) (EVP_PKEY_CTX *ctx,
14321                                              const char *type,
14322                                              const char *value));
14323 
14324 void EVP_PKEY_meth_get_init(EVP_PKEY_METHOD *pmeth,
14325                             int (**pinit) (EVP_PKEY_CTX *ctx));
14326 
14327 void EVP_PKEY_meth_get_copy(EVP_PKEY_METHOD *pmeth,
14328                             int (**pcopy) (EVP_PKEY_CTX *dst,
14329                                            EVP_PKEY_CTX *src));
14330 
14331 void EVP_PKEY_meth_get_cleanup(EVP_PKEY_METHOD *pmeth,
14332                                void (**pcleanup) (EVP_PKEY_CTX *ctx));
14333 
14334 void EVP_PKEY_meth_get_paramgen(EVP_PKEY_METHOD *pmeth,
14335                                 int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
14336                                 int (**pparamgen) (EVP_PKEY_CTX *ctx,
14337                                                    EVP_PKEY *pkey));
14338 
14339 void EVP_PKEY_meth_get_keygen(EVP_PKEY_METHOD *pmeth,
14340                               int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
14341                               int (**pkeygen) (EVP_PKEY_CTX *ctx,
14342                                                EVP_PKEY *pkey));
14343 
14344 void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
14345                             int (**psign_init) (EVP_PKEY_CTX *ctx),
14346                             int (**psign) (EVP_PKEY_CTX *ctx,
14347                                            unsigned char *sig, size_t *siglen,
14348                                            const unsigned char *tbs,
14349                                            size_t tbslen));
14350 
14351 void EVP_PKEY_meth_get_verify(EVP_PKEY_METHOD *pmeth,
14352                               int (**pverify_init) (EVP_PKEY_CTX *ctx),
14353                               int (**pverify) (EVP_PKEY_CTX *ctx,
14354                                                const unsigned char *sig,
14355                                                size_t siglen,
14356                                                const unsigned char *tbs,
14357                                                size_t tbslen));
14358 
14359 void EVP_PKEY_meth_get_verify_recover(EVP_PKEY_METHOD *pmeth,
14360                                       int (**pverify_recover_init) (EVP_PKEY_CTX
14361                                                                     *ctx),
14362                                       int (**pverify_recover) (EVP_PKEY_CTX
14363                                                                *ctx,
14364                                                                unsigned char
14365                                                                *sig,
14366                                                                size_t *siglen,
14367                                                                const unsigned
14368                                                                char *tbs,
14369                                                                size_t tbslen));
14370 
14371 void EVP_PKEY_meth_get_signctx(EVP_PKEY_METHOD *pmeth,
14372                                int (**psignctx_init) (EVP_PKEY_CTX *ctx,
14373                                                       EVP_MD_CTX *mctx),
14374                                int (**psignctx) (EVP_PKEY_CTX *ctx,
14375                                                  unsigned char *sig,
14376                                                  size_t *siglen,
14377                                                  EVP_MD_CTX *mctx));
14378 
14379 void EVP_PKEY_meth_get_verifyctx(EVP_PKEY_METHOD *pmeth,
14380                                  int (**pverifyctx_init) (EVP_PKEY_CTX *ctx,
14381                                                           EVP_MD_CTX *mctx),
14382                                  int (**pverifyctx) (EVP_PKEY_CTX *ctx,
14383                                                      const unsigned char *sig,
14384                                                      int siglen,
14385                                                      EVP_MD_CTX *mctx));
14386 
14387 void EVP_PKEY_meth_get_encrypt(EVP_PKEY_METHOD *pmeth,
14388                                int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
14389                                int (**pencryptfn) (EVP_PKEY_CTX *ctx,
14390                                                    unsigned char *out,
14391                                                    size_t *outlen,
14392                                                    const unsigned char *in,
14393                                                    size_t inlen));
14394 
14395 void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
14396                                int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
14397                                int (**pdecrypt) (EVP_PKEY_CTX *ctx,
14398                                                  unsigned char *out,
14399                                                  size_t *outlen,
14400                                                  const unsigned char *in,
14401                                                  size_t inlen));
14402 
14403 void EVP_PKEY_meth_get_derive(EVP_PKEY_METHOD *pmeth,
14404                               int (**pderive_init) (EVP_PKEY_CTX *ctx),
14405                               int (**pderive) (EVP_PKEY_CTX *ctx,
14406                                                unsigned char *key,
14407                                                size_t *keylen));
14408 
14409 void EVP_PKEY_meth_get_ctrl(EVP_PKEY_METHOD *pmeth,
14410                             int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
14411                                            void *p2),
14412                             int (**pctrl_str) (EVP_PKEY_CTX *ctx,
14413                                                const char *type,
14414                                                const char *value));
14415 
14416 void EVP_add_alg_module(void);
14417 
14418 /* BEGIN ERROR CODES */
14419 /*
14420  * The following lines are auto generated by the script mkerr.pl. Any changes
14421  * made after this point may be overwritten when the script is next run.
14422  */
14423 
14424 void ERR_load_EVP_strings(void);
14425 
14426 /* Error codes for the EVP functions. */
14427 
14428 /* Function codes. */
14429 # 1554 "/usr/include/openssl/evp.h" 3 4
14430 /* Reason codes. */
14431 # 74 "/usr/include/openssl/x509.h" 2 3 4
14432 
14433 
14434 # 1 "/usr/include/openssl/bio.h" 1 3 4
14435 /* crypto/bio/bio.h */
14436 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14437  * All rights reserved.
14438  *
14439  * This package is an SSL implementation written
14440  * by Eric Young (eay@cryptsoft.com).
14441  * The implementation was written so as to conform with Netscapes SSL.
14442  *
14443  * This library is free for commercial and non-commercial use as long as
14444  * the following conditions are aheared to.  The following conditions
14445  * apply to all code found in this distribution, be it the RC4, RSA,
14446  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14447  * included with this distribution is covered by the same copyright terms
14448  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14449  *
14450  * Copyright remains Eric Young's, and as such any Copyright notices in
14451  * the code are not to be removed.
14452  * If this package is used in a product, Eric Young should be given attribution
14453  * as the author of the parts of the library used.
14454  * This can be in the form of a textual message at program startup or
14455  * in documentation (online or textual) provided with the package.
14456  *
14457  * Redistribution and use in source and binary forms, with or without
14458  * modification, are permitted provided that the following conditions
14459  * are met:
14460  * 1. Redistributions of source code must retain the copyright
14461  *    notice, this list of conditions and the following disclaimer.
14462  * 2. Redistributions in binary form must reproduce the above copyright
14463  *    notice, this list of conditions and the following disclaimer in the
14464  *    documentation and/or other materials provided with the distribution.
14465  * 3. All advertising materials mentioning features or use of this software
14466  *    must display the following acknowledgement:
14467  *    "This product includes cryptographic software written by
14468  *     Eric Young (eay@cryptsoft.com)"
14469  *    The word 'cryptographic' can be left out if the rouines from the library
14470  *    being used are not cryptographic related :-).
14471  * 4. If you include any Windows specific code (or a derivative thereof) from
14472  *    the apps directory (application code) you must include an acknowledgement:
14473  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14474  *
14475  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14476  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14477  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14478  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14479  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14480  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14481  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14482  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14483  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14484  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14485  * SUCH DAMAGE.
14486  *
14487  * The licence and distribution terms for any publically available version or
14488  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14489  * copied and put under another distribution licence
14490  * [including the GNU Public Licence.]
14491  */
14492 # 77 "/usr/include/openssl/x509.h" 2 3 4
14493 
14494 # 1 "/usr/include/openssl/stack.h" 1 3 4
14495 /* crypto/stack/stack.h */
14496 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14497  * All rights reserved.
14498  *
14499  * This package is an SSL implementation written
14500  * by Eric Young (eay@cryptsoft.com).
14501  * The implementation was written so as to conform with Netscapes SSL.
14502  *
14503  * This library is free for commercial and non-commercial use as long as
14504  * the following conditions are aheared to.  The following conditions
14505  * apply to all code found in this distribution, be it the RC4, RSA,
14506  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14507  * included with this distribution is covered by the same copyright terms
14508  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14509  *
14510  * Copyright remains Eric Young's, and as such any Copyright notices in
14511  * the code are not to be removed.
14512  * If this package is used in a product, Eric Young should be given attribution
14513  * as the author of the parts of the library used.
14514  * This can be in the form of a textual message at program startup or
14515  * in documentation (online or textual) provided with the package.
14516  *
14517  * Redistribution and use in source and binary forms, with or without
14518  * modification, are permitted provided that the following conditions
14519  * are met:
14520  * 1. Redistributions of source code must retain the copyright
14521  *    notice, this list of conditions and the following disclaimer.
14522  * 2. Redistributions in binary form must reproduce the above copyright
14523  *    notice, this list of conditions and the following disclaimer in the
14524  *    documentation and/or other materials provided with the distribution.
14525  * 3. All advertising materials mentioning features or use of this software
14526  *    must display the following acknowledgement:
14527  *    "This product includes cryptographic software written by
14528  *     Eric Young (eay@cryptsoft.com)"
14529  *    The word 'cryptographic' can be left out if the rouines from the library
14530  *    being used are not cryptographic related :-).
14531  * 4. If you include any Windows specific code (or a derivative thereof) from
14532  *    the apps directory (application code) you must include an acknowledgement:
14533  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14534  *
14535  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14536  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14537  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14538  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14539  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14540  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14541  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14542  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14543  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14544  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14545  * SUCH DAMAGE.
14546  *
14547  * The licence and distribution terms for any publically available version or
14548  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14549  * copied and put under another distribution licence
14550  * [including the GNU Public Licence.]
14551  */
14552 # 79 "/usr/include/openssl/x509.h" 2 3 4
14553 # 1 "/usr/include/openssl/asn1.h" 1 3 4
14554 /* crypto/asn1/asn1.h */
14555 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14556  * All rights reserved.
14557  *
14558  * This package is an SSL implementation written
14559  * by Eric Young (eay@cryptsoft.com).
14560  * The implementation was written so as to conform with Netscapes SSL.
14561  *
14562  * This library is free for commercial and non-commercial use as long as
14563  * the following conditions are aheared to.  The following conditions
14564  * apply to all code found in this distribution, be it the RC4, RSA,
14565  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14566  * included with this distribution is covered by the same copyright terms
14567  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14568  *
14569  * Copyright remains Eric Young's, and as such any Copyright notices in
14570  * the code are not to be removed.
14571  * If this package is used in a product, Eric Young should be given attribution
14572  * as the author of the parts of the library used.
14573  * This can be in the form of a textual message at program startup or
14574  * in documentation (online or textual) provided with the package.
14575  *
14576  * Redistribution and use in source and binary forms, with or without
14577  * modification, are permitted provided that the following conditions
14578  * are met:
14579  * 1. Redistributions of source code must retain the copyright
14580  *    notice, this list of conditions and the following disclaimer.
14581  * 2. Redistributions in binary form must reproduce the above copyright
14582  *    notice, this list of conditions and the following disclaimer in the
14583  *    documentation and/or other materials provided with the distribution.
14584  * 3. All advertising materials mentioning features or use of this software
14585  *    must display the following acknowledgement:
14586  *    "This product includes cryptographic software written by
14587  *     Eric Young (eay@cryptsoft.com)"
14588  *    The word 'cryptographic' can be left out if the rouines from the library
14589  *    being used are not cryptographic related :-).
14590  * 4. If you include any Windows specific code (or a derivative thereof) from
14591  *    the apps directory (application code) you must include an acknowledgement:
14592  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14593  *
14594  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14595  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14596  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14597  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14598  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14599  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14600  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14601  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14602  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14603  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14604  * SUCH DAMAGE.
14605  *
14606  * The licence and distribution terms for any publically available version or
14607  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14608  * copied and put under another distribution licence
14609  * [including the GNU Public Licence.]
14610  */
14611 # 80 "/usr/include/openssl/x509.h" 2 3 4
14612 # 1 "/usr/include/openssl/safestack.h" 1 3 4
14613 /* ====================================================================
14614  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
14615  *
14616  * Redistribution and use in source and binary forms, with or without
14617  * modification, are permitted provided that the following conditions
14618  * are met:
14619  *
14620  * 1. Redistributions of source code must retain the above copyright
14621  *    notice, this list of conditions and the following disclaimer.
14622  *
14623  * 2. Redistributions in binary form must reproduce the above copyright
14624  *    notice, this list of conditions and the following disclaimer in
14625  *    the documentation and/or other materials provided with the
14626  *    distribution.
14627  *
14628  * 3. All advertising materials mentioning features or use of this
14629  *    software must display the following acknowledgment:
14630  *    "This product includes software developed by the OpenSSL Project
14631  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14632  *
14633  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14634  *    endorse or promote products derived from this software without
14635  *    prior written permission. For written permission, please contact
14636  *    openssl-core@openssl.org.
14637  *
14638  * 5. Products derived from this software may not be called "OpenSSL"
14639  *    nor may "OpenSSL" appear in their names without prior written
14640  *    permission of the OpenSSL Project.
14641  *
14642  * 6. Redistributions of any form whatsoever must retain the following
14643  *    acknowledgment:
14644  *    "This product includes software developed by the OpenSSL Project
14645  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14646  *
14647  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14648  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14649  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14650  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14651  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14652  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14653  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14654  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14655  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14656  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14657  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14658  * OF THE POSSIBILITY OF SUCH DAMAGE.
14659  * ====================================================================
14660  *
14661  * This product includes cryptographic software written by Eric Young
14662  * (eay@cryptsoft.com).  This product includes software written by Tim
14663  * Hudson (tjh@cryptsoft.com).
14664  *
14665  */
14666 # 81 "/usr/include/openssl/x509.h" 2 3 4
14667 
14668 
14669 # 1 "/usr/include/openssl/ec.h" 1 3 4
14670 /* crypto/ec/ec.h */
14671 /*
14672  * Originally written by Bodo Moeller for the OpenSSL project.
14673  */
14674 /**
14675  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
14676  * \author Originally written by Bodo Moeller for the OpenSSL project
14677  */
14678 /* ====================================================================
14679  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
14680  *
14681  * Redistribution and use in source and binary forms, with or without
14682  * modification, are permitted provided that the following conditions
14683  * are met:
14684  *
14685  * 1. Redistributions of source code must retain the above copyright
14686  *    notice, this list of conditions and the following disclaimer.
14687  *
14688  * 2. Redistributions in binary form must reproduce the above copyright
14689  *    notice, this list of conditions and the following disclaimer in
14690  *    the documentation and/or other materials provided with the
14691  *    distribution.
14692  *
14693  * 3. All advertising materials mentioning features or use of this
14694  *    software must display the following acknowledgment:
14695  *    "This product includes software developed by the OpenSSL Project
14696  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14697  *
14698  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14699  *    endorse or promote products derived from this software without
14700  *    prior written permission. For written permission, please contact
14701  *    openssl-core@openssl.org.
14702  *
14703  * 5. Products derived from this software may not be called "OpenSSL"
14704  *    nor may "OpenSSL" appear in their names without prior written
14705  *    permission of the OpenSSL Project.
14706  *
14707  * 6. Redistributions of any form whatsoever must retain the following
14708  *    acknowledgment:
14709  *    "This product includes software developed by the OpenSSL Project
14710  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14711  *
14712  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14713  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14714  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14715  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14716  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14717  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14718  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14719  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14720  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14721  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14722  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14723  * OF THE POSSIBILITY OF SUCH DAMAGE.
14724  * ====================================================================
14725  *
14726  * This product includes cryptographic software written by Eric Young
14727  * (eay@cryptsoft.com).  This product includes software written by Tim
14728  * Hudson (tjh@cryptsoft.com).
14729  *
14730  */
14731 /* ====================================================================
14732  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
14733  *
14734  * Portions of the attached software ("Contribution") are developed by
14735  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
14736  *
14737  * The Contribution is licensed pursuant to the OpenSSL open source
14738  * license provided above.
14739  *
14740  * The elliptic curve binary polynomial software is originally written by
14741  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
14742  *
14743  */
14744 
14745 
14746 
14747 
14748 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
14749 /* opensslconf.h */
14750 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
14751 
14752 
14753 
14754 
14755 /* OpenSSL was configured with the following options: */
14756 # 108 "/usr/include/openssl/opensslconf.h" 3 4
14757 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
14758    asks for it.  This is a transient feature that is provided for those
14759    who haven't had the time to do the appropriate changes in their
14760    applications.  */
14761 # 204 "/usr/include/openssl/opensslconf.h" 3 4
14762 /* crypto/opensslconf.h.in */
14763 
14764 /* Generate 80386 code? */
14765 # 80 "/usr/include/openssl/ec.h" 2 3 4
14766 
14767 
14768 
14769 
14770 
14771 # 1 "/usr/include/openssl/asn1.h" 1 3 4
14772 /* crypto/asn1/asn1.h */
14773 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14774  * All rights reserved.
14775  *
14776  * This package is an SSL implementation written
14777  * by Eric Young (eay@cryptsoft.com).
14778  * The implementation was written so as to conform with Netscapes SSL.
14779  *
14780  * This library is free for commercial and non-commercial use as long as
14781  * the following conditions are aheared to.  The following conditions
14782  * apply to all code found in this distribution, be it the RC4, RSA,
14783  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14784  * included with this distribution is covered by the same copyright terms
14785  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14786  *
14787  * Copyright remains Eric Young's, and as such any Copyright notices in
14788  * the code are not to be removed.
14789  * If this package is used in a product, Eric Young should be given attribution
14790  * as the author of the parts of the library used.
14791  * This can be in the form of a textual message at program startup or
14792  * in documentation (online or textual) provided with the package.
14793  *
14794  * Redistribution and use in source and binary forms, with or without
14795  * modification, are permitted provided that the following conditions
14796  * are met:
14797  * 1. Redistributions of source code must retain the copyright
14798  *    notice, this list of conditions and the following disclaimer.
14799  * 2. Redistributions in binary form must reproduce the above copyright
14800  *    notice, this list of conditions and the following disclaimer in the
14801  *    documentation and/or other materials provided with the distribution.
14802  * 3. All advertising materials mentioning features or use of this software
14803  *    must display the following acknowledgement:
14804  *    "This product includes cryptographic software written by
14805  *     Eric Young (eay@cryptsoft.com)"
14806  *    The word 'cryptographic' can be left out if the rouines from the library
14807  *    being used are not cryptographic related :-).
14808  * 4. If you include any Windows specific code (or a derivative thereof) from
14809  *    the apps directory (application code) you must include an acknowledgement:
14810  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14811  *
14812  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14813  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14814  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14815  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14816  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14817  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14818  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14819  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14820  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14821  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14822  * SUCH DAMAGE.
14823  *
14824  * The licence and distribution terms for any publically available version or
14825  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14826  * copied and put under another distribution licence
14827  * [including the GNU Public Licence.]
14828  */
14829 # 86 "/usr/include/openssl/ec.h" 2 3 4
14830 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
14831 /* ====================================================================
14832  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
14833  *
14834  * Redistribution and use in source and binary forms, with or without
14835  * modification, are permitted provided that the following conditions
14836  * are met:
14837  *
14838  * 1. Redistributions of source code must retain the above copyright
14839  *    notice, this list of conditions and the following disclaimer.
14840  *
14841  * 2. Redistributions in binary form must reproduce the above copyright
14842  *    notice, this list of conditions and the following disclaimer in
14843  *    the documentation and/or other materials provided with the
14844  *    distribution.
14845  *
14846  * 3. All advertising materials mentioning features or use of this
14847  *    software must display the following acknowledgment:
14848  *    "This product includes software developed by the OpenSSL Project
14849  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14850  *
14851  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14852  *    endorse or promote products derived from this software without
14853  *    prior written permission. For written permission, please contact
14854  *    openssl-core@openssl.org.
14855  *
14856  * 5. Products derived from this software may not be called "OpenSSL"
14857  *    nor may "OpenSSL" appear in their names without prior written
14858  *    permission of the OpenSSL Project.
14859  *
14860  * 6. Redistributions of any form whatsoever must retain the following
14861  *    acknowledgment:
14862  *    "This product includes software developed by the OpenSSL Project
14863  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14864  *
14865  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14866  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14867  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14868  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14869  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14870  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14871  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14872  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14873  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14874  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14875  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14876  * OF THE POSSIBILITY OF SUCH DAMAGE.
14877  * ====================================================================
14878  *
14879  * This product includes cryptographic software written by Eric Young
14880  * (eay@cryptsoft.com).  This product includes software written by Tim
14881  * Hudson (tjh@cryptsoft.com).
14882  *
14883  */
14884 # 87 "/usr/include/openssl/ec.h" 2 3 4
14885 
14886 # 1 "/usr/include/openssl/bn.h" 1 3 4
14887 /* crypto/bn/bn.h */
14888 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
14889  * All rights reserved.
14890  *
14891  * This package is an SSL implementation written
14892  * by Eric Young (eay@cryptsoft.com).
14893  * The implementation was written so as to conform with Netscapes SSL.
14894  *
14895  * This library is free for commercial and non-commercial use as long as
14896  * the following conditions are aheared to.  The following conditions
14897  * apply to all code found in this distribution, be it the RC4, RSA,
14898  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14899  * included with this distribution is covered by the same copyright terms
14900  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14901  *
14902  * Copyright remains Eric Young's, and as such any Copyright notices in
14903  * the code are not to be removed.
14904  * If this package is used in a product, Eric Young should be given attribution
14905  * as the author of the parts of the library used.
14906  * This can be in the form of a textual message at program startup or
14907  * in documentation (online or textual) provided with the package.
14908  *
14909  * Redistribution and use in source and binary forms, with or without
14910  * modification, are permitted provided that the following conditions
14911  * are met:
14912  * 1. Redistributions of source code must retain the copyright
14913  *    notice, this list of conditions and the following disclaimer.
14914  * 2. Redistributions in binary form must reproduce the above copyright
14915  *    notice, this list of conditions and the following disclaimer in the
14916  *    documentation and/or other materials provided with the distribution.
14917  * 3. All advertising materials mentioning features or use of this software
14918  *    must display the following acknowledgement:
14919  *    "This product includes cryptographic software written by
14920  *     Eric Young (eay@cryptsoft.com)"
14921  *    The word 'cryptographic' can be left out if the rouines from the library
14922  *    being used are not cryptographic related :-).
14923  * 4. If you include any Windows specific code (or a derivative thereof) from
14924  *    the apps directory (application code) you must include an acknowledgement:
14925  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14926  *
14927  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14928  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14929  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14930  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14931  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14932  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14933  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14934  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14935  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14936  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14937  * SUCH DAMAGE.
14938  *
14939  * The licence and distribution terms for any publically available version or
14940  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14941  * copied and put under another distribution licence
14942  * [including the GNU Public Licence.]
14943  */
14944 /* ====================================================================
14945  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
14946  *
14947  * Redistribution and use in source and binary forms, with or without
14948  * modification, are permitted provided that the following conditions
14949  * are met:
14950  *
14951  * 1. Redistributions of source code must retain the above copyright
14952  *    notice, this list of conditions and the following disclaimer.
14953  *
14954  * 2. Redistributions in binary form must reproduce the above copyright
14955  *    notice, this list of conditions and the following disclaimer in
14956  *    the documentation and/or other materials provided with the
14957  *    distribution.
14958  *
14959  * 3. All advertising materials mentioning features or use of this
14960  *    software must display the following acknowledgment:
14961  *    "This product includes software developed by the OpenSSL Project
14962  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14963  *
14964  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14965  *    endorse or promote products derived from this software without
14966  *    prior written permission. For written permission, please contact
14967  *    openssl-core@openssl.org.
14968  *
14969  * 5. Products derived from this software may not be called "OpenSSL"
14970  *    nor may "OpenSSL" appear in their names without prior written
14971  *    permission of the OpenSSL Project.
14972  *
14973  * 6. Redistributions of any form whatsoever must retain the following
14974  *    acknowledgment:
14975  *    "This product includes software developed by the OpenSSL Project
14976  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14977  *
14978  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14979  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14980  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14981  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14982  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14983  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14984  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14985  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14986  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14987  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14988  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14989  * OF THE POSSIBILITY OF SUCH DAMAGE.
14990  * ====================================================================
14991  *
14992  * This product includes cryptographic software written by Eric Young
14993  * (eay@cryptsoft.com).  This product includes software written by Tim
14994  * Hudson (tjh@cryptsoft.com).
14995  *
14996  */
14997 /* ====================================================================
14998  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
14999  *
15000  * Portions of the attached software ("Contribution") are developed by
15001  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
15002  *
15003  * The Contribution is licensed pursuant to the Eric Young open source
15004  * license provided above.
15005  *
15006  * The binary polynomial arithmetic software is originally written by
15007  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
15008  *
15009  */
15010 # 89 "/usr/include/openssl/ec.h" 2 3 4
15011 # 103 "/usr/include/openssl/ec.h" 3 4
15012 /** Enum for the point conversion form as defined in X9.62 (ECDSA)
15013  *  for the encoding of a elliptic curve point (x,y) */
15014 typedef enum {
15015         /** the point is encoded as z||x, where the octet z specifies
15016          *  which solution of the quadratic equation y is  */
15017     POINT_CONVERSION_COMPRESSED = 2,
15018         /** the point is encoded as z||x||y, where z is the octet 0x04  */
15019     POINT_CONVERSION_UNCOMPRESSED = 4,
15020         /** the point is encoded as z||x||y, where the octet z specifies
15021          *  which solution of the quadratic equation y is  */
15022     POINT_CONVERSION_HYBRID = 6
15023 } point_conversion_form_t;
15024 
15025 typedef struct ec_method_st EC_METHOD;
15026 
15027 typedef struct ec_group_st
15028     /*-
15029      EC_METHOD *meth;
15030      -- field definition
15031      -- curve coefficients
15032      -- optional generator with associated information (order, cofactor)
15033      -- optional extra data (precomputed table for fast computation of multiples of generator)
15034      -- ASN1 stuff
15035     */
15036     EC_GROUP;
15037 
15038 typedef struct ec_point_st EC_POINT;
15039 
15040 /********************************************************************/
15041 /*               EC_METHODs for curves over GF(p)                   */
15042 /********************************************************************/
15043 
15044 /** Returns the basic GFp ec methods which provides the basis for the
15045  *  optimized methods.
15046  *  \return  EC_METHOD object
15047  */
15048 const EC_METHOD *EC_GFp_simple_method(void);
15049 
15050 /** Returns GFp methods using montgomery multiplication.
15051  *  \return  EC_METHOD object
15052  */
15053 const EC_METHOD *EC_GFp_mont_method(void);
15054 
15055 /** Returns GFp methods using optimized methods for NIST recommended curves
15056  *  \return  EC_METHOD object
15057  */
15058 const EC_METHOD *EC_GFp_nist_method(void);
15059 # 169 "/usr/include/openssl/ec.h" 3 4
15060 /********************************************************************/
15061 /*           EC_METHOD for curves over GF(2^m)                      */
15062 /********************************************************************/
15063 
15064 /** Returns the basic GF2m ec method
15065  *  \return  EC_METHOD object
15066  */
15067 const EC_METHOD *EC_GF2m_simple_method(void);
15068 
15069 
15070 
15071 /********************************************************************/
15072 /*                   EC_GROUP functions                             */
15073 /********************************************************************/
15074 
15075 /** Creates a new EC_GROUP object
15076  *  \param   meth  EC_METHOD to use
15077  *  \return  newly created EC_GROUP object or NULL in case of an error.
15078  */
15079 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
15080 
15081 /** Frees a EC_GROUP object
15082  *  \param  group  EC_GROUP object to be freed.
15083  */
15084 void EC_GROUP_free(EC_GROUP *group);
15085 
15086 /** Clears and frees a EC_GROUP object
15087  *  \param  group  EC_GROUP object to be cleared and freed.
15088  */
15089 void EC_GROUP_clear_free(EC_GROUP *group);
15090 
15091 /** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.
15092  *  \param  dst  destination EC_GROUP object
15093  *  \param  src  source EC_GROUP object
15094  *  \return 1 on success and 0 if an error occurred.
15095  */
15096 int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
15097 
15098 /** Creates a new EC_GROUP object and copies the copies the content
15099  *  form src to the newly created EC_KEY object
15100  *  \param  src  source EC_GROUP object
15101  *  \return newly created EC_GROUP object or NULL in case of an error.
15102  */
15103 EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
15104 
15105 /** Returns the EC_METHOD of the EC_GROUP object.
15106  *  \param  group  EC_GROUP object
15107  *  \return EC_METHOD used in this EC_GROUP object.
15108  */
15109 const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);
15110 
15111 /** Returns the field type of the EC_METHOD.
15112  *  \param  meth  EC_METHOD object
15113  *  \return NID of the underlying field type OID.
15114  */
15115 int EC_METHOD_get_field_type(const EC_METHOD *meth);
15116 
15117 /** Sets the generator and it's order/cofactor of a EC_GROUP object.
15118  *  \param  group      EC_GROUP object
15119  *  \param  generator  EC_POINT object with the generator.
15120  *  \param  order      the order of the group generated by the generator.
15121  *  \param  cofactor   the index of the sub-group generated by the generator
15122  *                     in the group of all points on the elliptic curve.
15123  *  \return 1 on success and 0 if an error occured
15124  */
15125 int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
15126                            const BIGNUM *order, const BIGNUM *cofactor);
15127 
15128 /** Returns the generator of a EC_GROUP object.
15129  *  \param  group  EC_GROUP object
15130  *  \return the currently used generator (possibly NULL).
15131  */
15132 const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
15133 
15134 /** Returns the montgomery data for order(Generator)
15135  *  \param  group  EC_GROUP object
15136  *  \return the currently used generator (possibly NULL).
15137 */
15138 BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group);
15139 
15140 /** Gets the order of a EC_GROUP
15141  *  \param  group  EC_GROUP object
15142  *  \param  order  BIGNUM to which the order is copied
15143  *  \param  ctx    BN_CTX object (optional)
15144  *  \return 1 on success and 0 if an error occured
15145  */
15146 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
15147 
15148 /** Gets the cofactor of a EC_GROUP
15149  *  \param  group     EC_GROUP object
15150  *  \param  cofactor  BIGNUM to which the cofactor is copied
15151  *  \param  ctx       BN_CTX object (optional)
15152  *  \return 1 on success and 0 if an error occured
15153  */
15154 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
15155                           BN_CTX *ctx);
15156 
15157 /** Sets the name of a EC_GROUP object
15158  *  \param  group  EC_GROUP object
15159  *  \param  nid    NID of the curve name OID
15160  */
15161 void EC_GROUP_set_curve_name(EC_GROUP *group, int nid);
15162 
15163 /** Returns the curve name of a EC_GROUP object
15164  *  \param  group  EC_GROUP object
15165  *  \return NID of the curve name OID or 0 if not set.
15166  */
15167 int EC_GROUP_get_curve_name(const EC_GROUP *group);
15168 
15169 void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
15170 int EC_GROUP_get_asn1_flag(const EC_GROUP *group);
15171 
15172 void EC_GROUP_set_point_conversion_form(EC_GROUP *group,
15173                                         point_conversion_form_t form);
15174 point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
15175 
15176 unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x);
15177 size_t EC_GROUP_get_seed_len(const EC_GROUP *);
15178 size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
15179 
15180 /** Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b
15181  *  \param  group  EC_GROUP object
15182  *  \param  p      BIGNUM with the prime number
15183  *  \param  a      BIGNUM with parameter a of the equation
15184  *  \param  b      BIGNUM with parameter b of the equation
15185  *  \param  ctx    BN_CTX object (optional)
15186  *  \return 1 on success and 0 if an error occured
15187  */
15188 int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
15189                            const BIGNUM *b, BN_CTX *ctx);
15190 
15191 /** Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b
15192  *  \param  group  EC_GROUP object
15193  *  \param  p      BIGNUM for the prime number
15194  *  \param  a      BIGNUM for parameter a of the equation
15195  *  \param  b      BIGNUM for parameter b of the equation
15196  *  \param  ctx    BN_CTX object (optional)
15197  *  \return 1 on success and 0 if an error occured
15198  */
15199 int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
15200                            BIGNUM *b, BN_CTX *ctx);
15201 
15202 
15203 /** Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
15204  *  \param  group  EC_GROUP object
15205  *  \param  p      BIGNUM with the polynomial defining the underlying field
15206  *  \param  a      BIGNUM with parameter a of the equation
15207  *  \param  b      BIGNUM with parameter b of the equation
15208  *  \param  ctx    BN_CTX object (optional)
15209  *  \return 1 on success and 0 if an error occured
15210  */
15211 int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
15212                             const BIGNUM *b, BN_CTX *ctx);
15213 
15214 /** Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
15215  *  \param  group  EC_GROUP object
15216  *  \param  p      BIGNUM for the polynomial defining the underlying field
15217  *  \param  a      BIGNUM for parameter a of the equation
15218  *  \param  b      BIGNUM for parameter b of the equation
15219  *  \param  ctx    BN_CTX object (optional)
15220  *  \return 1 on success and 0 if an error occured
15221  */
15222 int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
15223                             BIGNUM *b, BN_CTX *ctx);
15224 
15225 /** Returns the number of bits needed to represent a field element
15226  *  \param  group  EC_GROUP object
15227  *  \return number of bits needed to represent a field element
15228  */
15229 int EC_GROUP_get_degree(const EC_GROUP *group);
15230 
15231 /** Checks whether the parameter in the EC_GROUP define a valid ec group
15232  *  \param  group  EC_GROUP object
15233  *  \param  ctx    BN_CTX object (optional)
15234  *  \return 1 if group is a valid ec group and 0 otherwise
15235  */
15236 int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
15237 
15238 /** Checks whether the discriminant of the elliptic curve is zero or not
15239  *  \param  group  EC_GROUP object
15240  *  \param  ctx    BN_CTX object (optional)
15241  *  \return 1 if the discriminant is not zero and 0 otherwise
15242  */
15243 int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);
15244 
15245 /** Compares two EC_GROUP objects
15246  *  \param  a    first EC_GROUP object
15247  *  \param  b    second EC_GROUP object
15248  *  \param  ctx  BN_CTX object (optional)
15249  *  \return 0 if both groups are equal and 1 otherwise
15250  */
15251 int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);
15252 
15253 /*
15254  * EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() after
15255  * choosing an appropriate EC_METHOD
15256  */
15257 
15258 /** Creates a new EC_GROUP object with the specified parameters defined
15259  *  over GFp (defined by the equation y^2 = x^3 + a*x + b)
15260  *  \param  p    BIGNUM with the prime number
15261  *  \param  a    BIGNUM with the parameter a of the equation
15262  *  \param  b    BIGNUM with the parameter b of the equation
15263  *  \param  ctx  BN_CTX object (optional)
15264  *  \return newly created EC_GROUP object with the specified parameters
15265  */
15266 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
15267                                  const BIGNUM *b, BN_CTX *ctx);
15268 
15269 /** Creates a new EC_GROUP object with the specified parameters defined
15270  *  over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b)
15271  *  \param  p    BIGNUM with the polynomial defining the underlying field
15272  *  \param  a    BIGNUM with the parameter a of the equation
15273  *  \param  b    BIGNUM with the parameter b of the equation
15274  *  \param  ctx  BN_CTX object (optional)
15275  *  \return newly created EC_GROUP object with the specified parameters
15276  */
15277 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
15278                                   const BIGNUM *b, BN_CTX *ctx);
15279 
15280 /** Creates a EC_GROUP object with a curve specified by a NID
15281  *  \param  nid  NID of the OID of the curve name
15282  *  \return newly created EC_GROUP object with specified curve or NULL
15283  *          if an error occurred
15284  */
15285 EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
15286 
15287 /********************************************************************/
15288 /*               handling of internal curves                        */
15289 /********************************************************************/
15290 
15291 typedef struct {
15292     int nid;
15293     const char *comment;
15294 } EC_builtin_curve;
15295 
15296 /*
15297  * EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all
15298  * available curves or zero if a error occurred. In case r ist not zero
15299  * nitems EC_builtin_curve structures are filled with the data of the first
15300  * nitems internal groups
15301  */
15302 size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
15303 
15304 const char *EC_curve_nid2nist(int nid);
15305 int EC_curve_nist2nid(const char *name);
15306 
15307 /********************************************************************/
15308 /*                    EC_POINT functions                            */
15309 /********************************************************************/
15310 
15311 /** Creates a new EC_POINT object for the specified EC_GROUP
15312  *  \param  group  EC_GROUP the underlying EC_GROUP object
15313  *  \return newly created EC_POINT object or NULL if an error occurred
15314  */
15315 EC_POINT *EC_POINT_new(const EC_GROUP *group);
15316 
15317 /** Frees a EC_POINT object
15318  *  \param  point  EC_POINT object to be freed
15319  */
15320 void EC_POINT_free(EC_POINT *point);
15321 
15322 /** Clears and frees a EC_POINT object
15323  *  \param  point  EC_POINT object to be cleared and freed
15324  */
15325 void EC_POINT_clear_free(EC_POINT *point);
15326 
15327 /** Copies EC_POINT object
15328  *  \param  dst  destination EC_POINT object
15329  *  \param  src  source EC_POINT object
15330  *  \return 1 on success and 0 if an error occured
15331  */
15332 int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
15333 
15334 /** Creates a new EC_POINT object and copies the content of the supplied
15335  *  EC_POINT
15336  *  \param  src    source EC_POINT object
15337  *  \param  group  underlying the EC_GROUP object
15338  *  \return newly created EC_POINT object or NULL if an error occurred
15339  */
15340 EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
15341 
15342 /** Returns the EC_METHOD used in EC_POINT object
15343  *  \param  point  EC_POINT object
15344  *  \return the EC_METHOD used
15345  */
15346 const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
15347 
15348 /** Sets a point to infinity (neutral element)
15349  *  \param  group  underlying EC_GROUP object
15350  *  \param  point  EC_POINT to set to infinity
15351  *  \return 1 on success and 0 if an error occured
15352  */
15353 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
15354 
15355 /** Sets the jacobian projective coordinates of a EC_POINT over GFp
15356  *  \param  group  underlying EC_GROUP object
15357  *  \param  p      EC_POINT object
15358  *  \param  x      BIGNUM with the x-coordinate
15359  *  \param  y      BIGNUM with the y-coordinate
15360  *  \param  z      BIGNUM with the z-coordinate
15361  *  \param  ctx    BN_CTX object (optional)
15362  *  \return 1 on success and 0 if an error occured
15363  */
15364 int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group,
15365                                              EC_POINT *p, const BIGNUM *x,
15366                                              const BIGNUM *y, const BIGNUM *z,
15367                                              BN_CTX *ctx);
15368 
15369 /** Gets the jacobian projective coordinates of a EC_POINT over GFp
15370  *  \param  group  underlying EC_GROUP object
15371  *  \param  p      EC_POINT object
15372  *  \param  x      BIGNUM for the x-coordinate
15373  *  \param  y      BIGNUM for the y-coordinate
15374  *  \param  z      BIGNUM for the z-coordinate
15375  *  \param  ctx    BN_CTX object (optional)
15376  *  \return 1 on success and 0 if an error occured
15377  */
15378 int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
15379                                              const EC_POINT *p, BIGNUM *x,
15380                                              BIGNUM *y, BIGNUM *z,
15381                                              BN_CTX *ctx);
15382 
15383 /** Sets the affine coordinates of a EC_POINT over GFp
15384  *  \param  group  underlying EC_GROUP object
15385  *  \param  p      EC_POINT object
15386  *  \param  x      BIGNUM with the x-coordinate
15387  *  \param  y      BIGNUM with the y-coordinate
15388  *  \param  ctx    BN_CTX object (optional)
15389  *  \return 1 on success and 0 if an error occured
15390  */
15391 int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
15392                                         const BIGNUM *x, const BIGNUM *y,
15393                                         BN_CTX *ctx);
15394 
15395 /** Gets the affine coordinates of a EC_POINT over GFp
15396  *  \param  group  underlying EC_GROUP object
15397  *  \param  p      EC_POINT object
15398  *  \param  x      BIGNUM for the x-coordinate
15399  *  \param  y      BIGNUM for the y-coordinate
15400  *  \param  ctx    BN_CTX object (optional)
15401  *  \return 1 on success and 0 if an error occured
15402  */
15403 int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
15404                                         const EC_POINT *p, BIGNUM *x,
15405                                         BIGNUM *y, BN_CTX *ctx);
15406 
15407 /** Sets the x9.62 compressed coordinates of a EC_POINT over GFp
15408  *  \param  group  underlying EC_GROUP object
15409  *  \param  p      EC_POINT object
15410  *  \param  x      BIGNUM with x-coordinate
15411  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
15412  *  \param  ctx    BN_CTX object (optional)
15413  *  \return 1 on success and 0 if an error occured
15414  */
15415 int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,
15416                                             EC_POINT *p, const BIGNUM *x,
15417                                             int y_bit, BN_CTX *ctx);
15418 
15419 /** Sets the affine coordinates of a EC_POINT over GF2m
15420  *  \param  group  underlying EC_GROUP object
15421  *  \param  p      EC_POINT object
15422  *  \param  x      BIGNUM with the x-coordinate
15423  *  \param  y      BIGNUM with the y-coordinate
15424  *  \param  ctx    BN_CTX object (optional)
15425  *  \return 1 on success and 0 if an error occured
15426  */
15427 int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,
15428                                          const BIGNUM *x, const BIGNUM *y,
15429                                          BN_CTX *ctx);
15430 
15431 /** Gets the affine coordinates of a EC_POINT over GF2m
15432  *  \param  group  underlying EC_GROUP object
15433  *  \param  p      EC_POINT object
15434  *  \param  x      BIGNUM for the x-coordinate
15435  *  \param  y      BIGNUM for the y-coordinate
15436  *  \param  ctx    BN_CTX object (optional)
15437  *  \return 1 on success and 0 if an error occured
15438  */
15439 int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
15440                                          const EC_POINT *p, BIGNUM *x,
15441                                          BIGNUM *y, BN_CTX *ctx);
15442 
15443 /** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m
15444  *  \param  group  underlying EC_GROUP object
15445  *  \param  p      EC_POINT object
15446  *  \param  x      BIGNUM with x-coordinate
15447  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
15448  *  \param  ctx    BN_CTX object (optional)
15449  *  \return 1 on success and 0 if an error occured
15450  */
15451 int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
15452                                              EC_POINT *p, const BIGNUM *x,
15453                                              int y_bit, BN_CTX *ctx);
15454 
15455 /** Encodes a EC_POINT object to a octet string
15456  *  \param  group  underlying EC_GROUP object
15457  *  \param  p      EC_POINT object
15458  *  \param  form   point conversion form
15459  *  \param  buf    memory buffer for the result. If NULL the function returns
15460  *                 required buffer size.
15461  *  \param  len    length of the memory buffer
15462  *  \param  ctx    BN_CTX object (optional)
15463  *  \return the length of the encoded octet string or 0 if an error occurred
15464  */
15465 size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
15466                           point_conversion_form_t form,
15467                           unsigned char *buf, size_t len, BN_CTX *ctx);
15468 
15469 /** Decodes a EC_POINT from a octet string
15470  *  \param  group  underlying EC_GROUP object
15471  *  \param  p      EC_POINT object
15472  *  \param  buf    memory buffer with the encoded ec point
15473  *  \param  len    length of the encoded ec point
15474  *  \param  ctx    BN_CTX object (optional)
15475  *  \return 1 on success and 0 if an error occured
15476  */
15477 int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
15478                        const unsigned char *buf, size_t len, BN_CTX *ctx);
15479 
15480 /* other interfaces to point2oct/oct2point: */
15481 BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
15482                           point_conversion_form_t form, BIGNUM *, BN_CTX *);
15483 EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
15484                             EC_POINT *, BN_CTX *);
15485 char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
15486                          point_conversion_form_t form, BN_CTX *);
15487 EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
15488                              EC_POINT *, BN_CTX *);
15489 
15490 /********************************************************************/
15491 /*         functions for doing EC_POINT arithmetic                  */
15492 /********************************************************************/
15493 
15494 /** Computes the sum of two EC_POINT
15495  *  \param  group  underlying EC_GROUP object
15496  *  \param  r      EC_POINT object for the result (r = a + b)
15497  *  \param  a      EC_POINT object with the first summand
15498  *  \param  b      EC_POINT object with the second summand
15499  *  \param  ctx    BN_CTX object (optional)
15500  *  \return 1 on success and 0 if an error occured
15501  */
15502 int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
15503                  const EC_POINT *b, BN_CTX *ctx);
15504 
15505 /** Computes the double of a EC_POINT
15506  *  \param  group  underlying EC_GROUP object
15507  *  \param  r      EC_POINT object for the result (r = 2 * a)
15508  *  \param  a      EC_POINT object
15509  *  \param  ctx    BN_CTX object (optional)
15510  *  \return 1 on success and 0 if an error occured
15511  */
15512 int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
15513                  BN_CTX *ctx);
15514 
15515 /** Computes the inverse of a EC_POINT
15516  *  \param  group  underlying EC_GROUP object
15517  *  \param  a      EC_POINT object to be inverted (it's used for the result as well)
15518  *  \param  ctx    BN_CTX object (optional)
15519  *  \return 1 on success and 0 if an error occured
15520  */
15521 int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
15522 
15523 /** Checks whether the point is the neutral element of the group
15524  *  \param  group  the underlying EC_GROUP object
15525  *  \param  p      EC_POINT object
15526  *  \return 1 if the point is the neutral element and 0 otherwise
15527  */
15528 int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);
15529 
15530 /** Checks whether the point is on the curve
15531  *  \param  group  underlying EC_GROUP object
15532  *  \param  point  EC_POINT object to check
15533  *  \param  ctx    BN_CTX object (optional)
15534  *  \return 1 if point if on the curve and 0 otherwise
15535  */
15536 int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
15537                          BN_CTX *ctx);
15538 
15539 /** Compares two EC_POINTs
15540  *  \param  group  underlying EC_GROUP object
15541  *  \param  a      first EC_POINT object
15542  *  \param  b      second EC_POINT object
15543  *  \param  ctx    BN_CTX object (optional)
15544  *  \return 0 if both points are equal and a value != 0 otherwise
15545  */
15546 int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,
15547                  BN_CTX *ctx);
15548 
15549 int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx);
15550 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
15551                           EC_POINT *points[], BN_CTX *ctx);
15552 
15553 /** Computes r = generator * n sum_{i=0}^{num-1} p[i] * m[i]
15554  *  \param  group  underlying EC_GROUP object
15555  *  \param  r      EC_POINT object for the result
15556  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
15557  *  \param  num    number futher summands
15558  *  \param  p      array of size num of EC_POINT objects
15559  *  \param  m      array of size num of BIGNUM objects
15560  *  \param  ctx    BN_CTX object (optional)
15561  *  \return 1 on success and 0 if an error occured
15562  */
15563 int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
15564                   size_t num, const EC_POINT *p[], const BIGNUM *m[],
15565                   BN_CTX *ctx);
15566 
15567 /** Computes r = generator * n + q * m
15568  *  \param  group  underlying EC_GROUP object
15569  *  \param  r      EC_POINT object for the result
15570  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
15571  *  \param  q      EC_POINT object with the first factor of the second summand
15572  *  \param  m      BIGNUM with the second factor of the second summand
15573  *  \param  ctx    BN_CTX object (optional)
15574  *  \return 1 on success and 0 if an error occured
15575  */
15576 int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
15577                  const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
15578 
15579 /** Stores multiples of generator for faster point multiplication
15580  *  \param  group  EC_GROUP object
15581  *  \param  ctx    BN_CTX object (optional)
15582  *  \return 1 on success and 0 if an error occured
15583  */
15584 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
15585 
15586 /** Reports whether a precomputation has been done
15587  *  \param  group  EC_GROUP object
15588  *  \return 1 if a pre-computation has been done and 0 otherwise
15589  */
15590 int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
15591 
15592 /********************************************************************/
15593 /*                       ASN1 stuff                                 */
15594 /********************************************************************/
15595 
15596 /*
15597  * EC_GROUP_get_basis_type() returns the NID of the basis type used to
15598  * represent the field elements
15599  */
15600 int EC_GROUP_get_basis_type(const EC_GROUP *);
15601 
15602 int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
15603 int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
15604                                    unsigned int *k2, unsigned int *k3);
15605 
15606 
15607 
15608 
15609 typedef struct ecpk_parameters_st ECPKPARAMETERS;
15610 
15611 EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
15612 int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
15613 # 731 "/usr/include/openssl/ec.h" 3 4
15614 int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
15615 
15616 
15617 int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
15618 
15619 
15620 /********************************************************************/
15621 /*                      EC_KEY functions                            */
15622 /********************************************************************/
15623 
15624 typedef struct ec_key_st EC_KEY;
15625 
15626 /* some values for the encoding_flag */
15627 
15628 
15629 
15630 /* some values for the flags field */
15631 
15632 
15633 
15634 /** Creates a new EC_KEY object.
15635  *  \return EC_KEY object or NULL if an error occurred.
15636  */
15637 EC_KEY *EC_KEY_new(void);
15638 
15639 int EC_KEY_get_flags(const EC_KEY *key);
15640 
15641 void EC_KEY_set_flags(EC_KEY *key, int flags);
15642 
15643 void EC_KEY_clear_flags(EC_KEY *key, int flags);
15644 
15645 /** Creates a new EC_KEY object using a named curve as underlying
15646  *  EC_GROUP object.
15647  *  \param  nid  NID of the named curve.
15648  *  \return EC_KEY object or NULL if an error occurred.
15649  */
15650 EC_KEY *EC_KEY_new_by_curve_name(int nid);
15651 
15652 /** Frees a EC_KEY object.
15653  *  \param  key  EC_KEY object to be freed.
15654  */
15655 void EC_KEY_free(EC_KEY *key);
15656 
15657 /** Copies a EC_KEY object.
15658  *  \param  dst  destination EC_KEY object
15659  *  \param  src  src EC_KEY object
15660  *  \return dst or NULL if an error occurred.
15661  */
15662 EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
15663 
15664 /** Creates a new EC_KEY object and copies the content from src to it.
15665  *  \param  src  the source EC_KEY object
15666  *  \return newly created EC_KEY object or NULL if an error occurred.
15667  */
15668 EC_KEY *EC_KEY_dup(const EC_KEY *src);
15669 
15670 /** Increases the internal reference count of a EC_KEY object.
15671  *  \param  key  EC_KEY object
15672  *  \return 1 on success and 0 if an error occurred.
15673  */
15674 int EC_KEY_up_ref(EC_KEY *key);
15675 
15676 /** Returns the EC_GROUP object of a EC_KEY object
15677  *  \param  key  EC_KEY object
15678  *  \return the EC_GROUP object (possibly NULL).
15679  */
15680 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
15681 
15682 /** Sets the EC_GROUP of a EC_KEY object.
15683  *  \param  key    EC_KEY object
15684  *  \param  group  EC_GROUP to use in the EC_KEY object (note: the EC_KEY
15685  *                 object will use an own copy of the EC_GROUP).
15686  *  \return 1 on success and 0 if an error occurred.
15687  */
15688 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
15689 
15690 /** Returns the private key of a EC_KEY object.
15691  *  \param  key  EC_KEY object
15692  *  \return a BIGNUM with the private key (possibly NULL).
15693  */
15694 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
15695 
15696 /** Sets the private key of a EC_KEY object.
15697  *  \param  key  EC_KEY object
15698  *  \param  prv  BIGNUM with the private key (note: the EC_KEY object
15699  *               will use an own copy of the BIGNUM).
15700  *  \return 1 on success and 0 if an error occurred.
15701  */
15702 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
15703 
15704 /** Returns the public key of a EC_KEY object.
15705  *  \param  key  the EC_KEY object
15706  *  \return a EC_POINT object with the public key (possibly NULL)
15707  */
15708 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
15709 
15710 /** Sets the public key of a EC_KEY object.
15711  *  \param  key  EC_KEY object
15712  *  \param  pub  EC_POINT object with the public key (note: the EC_KEY object
15713  *               will use an own copy of the EC_POINT object).
15714  *  \return 1 on success and 0 if an error occurred.
15715  */
15716 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
15717 
15718 unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
15719 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
15720 point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);
15721 void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform);
15722 /* functions to set/get method specific data  */
15723 void *EC_KEY_get_key_method_data(EC_KEY *key,
15724                                  void *(*dup_func) (void *),
15725                                  void (*free_func) (void *),
15726                                  void (*clear_free_func) (void *));
15727 /** Sets the key method data of an EC_KEY object, if none has yet been set.
15728  *  \param  key              EC_KEY object
15729  *  \param  data             opaque data to install.
15730  *  \param  dup_func         a function that duplicates |data|.
15731  *  \param  free_func        a function that frees |data|.
15732  *  \param  clear_free_func  a function that wipes and frees |data|.
15733  *  \return the previously set data pointer, or NULL if |data| was inserted.
15734  */
15735 void *EC_KEY_insert_key_method_data(EC_KEY *key, void *data,
15736                                     void *(*dup_func) (void *),
15737                                     void (*free_func) (void *),
15738                                     void (*clear_free_func) (void *));
15739 /* wrapper functions for the underlying EC_GROUP object */
15740 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
15741 
15742 /** Creates a table of pre-computed multiples of the generator to
15743  *  accelerate further EC_KEY operations.
15744  *  \param  key  EC_KEY object
15745  *  \param  ctx  BN_CTX object (optional)
15746  *  \return 1 on success and 0 if an error occurred.
15747  */
15748 int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
15749 
15750 /** Creates a new ec private (and optional a new public) key.
15751  *  \param  key  EC_KEY object
15752  *  \return 1 on success and 0 if an error occurred.
15753  */
15754 int EC_KEY_generate_key(EC_KEY *key);
15755 
15756 /** Verifies that a private and/or public key is valid.
15757  *  \param  key  the EC_KEY object
15758  *  \return 1 on success and 0 otherwise.
15759  */
15760 int EC_KEY_check_key(const EC_KEY *key);
15761 
15762 /** Sets a public key from affine coordindates performing
15763  *  neccessary NIST PKV tests.
15764  *  \param  key  the EC_KEY object
15765  *  \param  x    public key x coordinate
15766  *  \param  y    public key y coordinate
15767  *  \return 1 on success and 0 otherwise.
15768  */
15769 int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
15770                                              BIGNUM *y);
15771 
15772 /********************************************************************/
15773 /*        de- and encoding functions for SEC1 ECPrivateKey          */
15774 /********************************************************************/
15775 
15776 /** Decodes a private key from a memory buffer.
15777  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
15778  *  \param  in   pointer to memory with the DER encoded private key
15779  *  \param  len  length of the DER encoded private key
15780  *  \return the decoded private key or NULL if an error occurred.
15781  */
15782 EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len);
15783 
15784 /** Encodes a private key object and stores the result in a buffer.
15785  *  \param  key  the EC_KEY object to encode
15786  *  \param  out  the buffer for the result (if NULL the function returns number
15787  *               of bytes needed).
15788  *  \return 1 on success and 0 if an error occurred.
15789  */
15790 int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out);
15791 
15792 /********************************************************************/
15793 /*        de- and encoding functions for EC parameters              */
15794 /********************************************************************/
15795 
15796 /** Decodes ec parameter from a memory buffer.
15797  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
15798  *  \param  in   pointer to memory with the DER encoded ec parameters
15799  *  \param  len  length of the DER encoded ec parameters
15800  *  \return a EC_KEY object with the decoded parameters or NULL if an error
15801  *          occurred.
15802  */
15803 EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len);
15804 
15805 /** Encodes ec parameter and stores the result in a buffer.
15806  *  \param  key  the EC_KEY object with ec paramters to encode
15807  *  \param  out  the buffer for the result (if NULL the function returns number
15808  *               of bytes needed).
15809  *  \return 1 on success and 0 if an error occurred.
15810  */
15811 int i2d_ECParameters(EC_KEY *key, unsigned char **out);
15812 
15813 /********************************************************************/
15814 /*         de- and encoding functions for EC public key             */
15815 /*         (octet string, not DER -- hence 'o2i' and 'i2o')         */
15816 /********************************************************************/
15817 
15818 /** Decodes a ec public key from a octet string.
15819  *  \param  key  a pointer to a EC_KEY object which should be used
15820  *  \param  in   memory buffer with the encoded public key
15821  *  \param  len  length of the encoded public key
15822  *  \return EC_KEY object with decoded public key or NULL if an error
15823  *          occurred.
15824  */
15825 EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len);
15826 
15827 /** Encodes a ec public key in an octet string.
15828  *  \param  key  the EC_KEY object with the public key
15829  *  \param  out  the buffer for the result (if NULL the function returns number
15830  *               of bytes needed).
15831  *  \return 1 on success and 0 if an error occurred
15832  */
15833 int i2o_ECPublicKey(EC_KEY *key, unsigned char **out);
15834 
15835 
15836 /** Prints out the ec parameters on human readable form.
15837  *  \param  bp   BIO object to which the information is printed
15838  *  \param  key  EC_KEY object
15839  *  \return 1 on success and 0 if an error occurred
15840  */
15841 int ECParameters_print(BIO *bp, const EC_KEY *key);
15842 
15843 /** Prints out the contents of a EC_KEY object
15844  *  \param  bp   BIO object to which the information is printed
15845  *  \param  key  EC_KEY object
15846  *  \param  off  line offset
15847  *  \return 1 on success and 0 if an error occurred
15848  */
15849 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
15850 
15851 
15852 
15853 /** Prints out the ec parameters on human readable form.
15854  *  \param  fp   file descriptor to which the information is printed
15855  *  \param  key  EC_KEY object
15856  *  \return 1 on success and 0 if an error occurred
15857  */
15858 int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
15859 
15860 /** Prints out the contents of a EC_KEY object
15861  *  \param  fp   file descriptor to which the information is printed
15862  *  \param  key  EC_KEY object
15863  *  \param  off  line offset
15864  *  \return 1 on success and 0 if an error occurred
15865  */
15866 int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
15867 # 1067 "/usr/include/openssl/ec.h" 3 4
15868 /* KDF types */
15869 
15870 
15871 
15872 /* BEGIN ERROR CODES */
15873 /*
15874  * The following lines are auto generated by the script mkerr.pl. Any changes
15875  * made after this point may be overwritten when the script is next run.
15876  */
15877 
15878 void ERR_load_EC_strings(void);
15879 
15880 /* Error codes for the EC functions. */
15881 
15882 /* Function codes. */
15883 # 1227 "/usr/include/openssl/ec.h" 3 4
15884 /* Reason codes. */
15885 # 84 "/usr/include/openssl/x509.h" 2 3 4
15886 
15887 
15888 
15889 # 1 "/usr/include/openssl/ecdsa.h" 1 3 4
15890 /* crypto/ecdsa/ecdsa.h */
15891 /**
15892  * \file   crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
15893  * \author Written by Nils Larsch for the OpenSSL project
15894  */
15895 /* ====================================================================
15896  * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
15897  *
15898  * Redistribution and use in source and binary forms, with or without
15899  * modification, are permitted provided that the following conditions
15900  * are met:
15901  *
15902  * 1. Redistributions of source code must retain the above copyright
15903  *    notice, this list of conditions and the following disclaimer.
15904  *
15905  * 2. Redistributions in binary form must reproduce the above copyright
15906  *    notice, this list of conditions and the following disclaimer in
15907  *    the documentation and/or other materials provided with the
15908  *    distribution.
15909  *
15910  * 3. All advertising materials mentioning features or use of this
15911  *    software must display the following acknowledgment:
15912  *    "This product includes software developed by the OpenSSL Project
15913  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
15914  *
15915  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15916  *    endorse or promote products derived from this software without
15917  *    prior written permission. For written permission, please contact
15918  *    licensing@OpenSSL.org.
15919  *
15920  * 5. Products derived from this software may not be called "OpenSSL"
15921  *    nor may "OpenSSL" appear in their names without prior written
15922  *    permission of the OpenSSL Project.
15923  *
15924  * 6. Redistributions of any form whatsoever must retain the following
15925  *    acknowledgment:
15926  *    "This product includes software developed by the OpenSSL Project
15927  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
15928  *
15929  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15930  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15931  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15932  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15933  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15934  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15935  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15936  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15937  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15938  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15939  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15940  * OF THE POSSIBILITY OF SUCH DAMAGE.
15941  * ====================================================================
15942  *
15943  * This product includes cryptographic software written by Eric Young
15944  * (eay@cryptsoft.com).  This product includes software written by Tim
15945  * Hudson (tjh@cryptsoft.com).
15946  *
15947  */
15948 
15949 
15950 
15951 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
15952 /* opensslconf.h */
15953 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
15954 
15955 
15956 
15957 
15958 /* OpenSSL was configured with the following options: */
15959 # 108 "/usr/include/openssl/opensslconf.h" 3 4
15960 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
15961    asks for it.  This is a transient feature that is provided for those
15962    who haven't had the time to do the appropriate changes in their
15963    applications.  */
15964 # 204 "/usr/include/openssl/opensslconf.h" 3 4
15965 /* crypto/opensslconf.h.in */
15966 
15967 /* Generate 80386 code? */
15968 # 63 "/usr/include/openssl/ecdsa.h" 2 3 4
15969 
15970 
15971 
15972 
15973 
15974 # 1 "/usr/include/openssl/ec.h" 1 3 4
15975 /* crypto/ec/ec.h */
15976 /*
15977  * Originally written by Bodo Moeller for the OpenSSL project.
15978  */
15979 /**
15980  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
15981  * \author Originally written by Bodo Moeller for the OpenSSL project
15982  */
15983 /* ====================================================================
15984  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
15985  *
15986  * Redistribution and use in source and binary forms, with or without
15987  * modification, are permitted provided that the following conditions
15988  * are met:
15989  *
15990  * 1. Redistributions of source code must retain the above copyright
15991  *    notice, this list of conditions and the following disclaimer.
15992  *
15993  * 2. Redistributions in binary form must reproduce the above copyright
15994  *    notice, this list of conditions and the following disclaimer in
15995  *    the documentation and/or other materials provided with the
15996  *    distribution.
15997  *
15998  * 3. All advertising materials mentioning features or use of this
15999  *    software must display the following acknowledgment:
16000  *    "This product includes software developed by the OpenSSL Project
16001  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16002  *
16003  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16004  *    endorse or promote products derived from this software without
16005  *    prior written permission. For written permission, please contact
16006  *    openssl-core@openssl.org.
16007  *
16008  * 5. Products derived from this software may not be called "OpenSSL"
16009  *    nor may "OpenSSL" appear in their names without prior written
16010  *    permission of the OpenSSL Project.
16011  *
16012  * 6. Redistributions of any form whatsoever must retain the following
16013  *    acknowledgment:
16014  *    "This product includes software developed by the OpenSSL Project
16015  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16016  *
16017  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16018  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16020  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16021  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16022  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16023  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16024  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16025  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16026  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16027  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16028  * OF THE POSSIBILITY OF SUCH DAMAGE.
16029  * ====================================================================
16030  *
16031  * This product includes cryptographic software written by Eric Young
16032  * (eay@cryptsoft.com).  This product includes software written by Tim
16033  * Hudson (tjh@cryptsoft.com).
16034  *
16035  */
16036 /* ====================================================================
16037  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16038  *
16039  * Portions of the attached software ("Contribution") are developed by
16040  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16041  *
16042  * The Contribution is licensed pursuant to the OpenSSL open source
16043  * license provided above.
16044  *
16045  * The elliptic curve binary polynomial software is originally written by
16046  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16047  *
16048  */
16049 # 69 "/usr/include/openssl/ecdsa.h" 2 3 4
16050 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
16051 /* ====================================================================
16052  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
16053  *
16054  * Redistribution and use in source and binary forms, with or without
16055  * modification, are permitted provided that the following conditions
16056  * are met:
16057  *
16058  * 1. Redistributions of source code must retain the above copyright
16059  *    notice, this list of conditions and the following disclaimer.
16060  *
16061  * 2. Redistributions in binary form must reproduce the above copyright
16062  *    notice, this list of conditions and the following disclaimer in
16063  *    the documentation and/or other materials provided with the
16064  *    distribution.
16065  *
16066  * 3. All advertising materials mentioning features or use of this
16067  *    software must display the following acknowledgment:
16068  *    "This product includes software developed by the OpenSSL Project
16069  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16070  *
16071  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16072  *    endorse or promote products derived from this software without
16073  *    prior written permission. For written permission, please contact
16074  *    openssl-core@openssl.org.
16075  *
16076  * 5. Products derived from this software may not be called "OpenSSL"
16077  *    nor may "OpenSSL" appear in their names without prior written
16078  *    permission of the OpenSSL Project.
16079  *
16080  * 6. Redistributions of any form whatsoever must retain the following
16081  *    acknowledgment:
16082  *    "This product includes software developed by the OpenSSL Project
16083  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16084  *
16085  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16086  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16087  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16088  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16089  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16090  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16091  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16092  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16093  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16094  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16095  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16096  * OF THE POSSIBILITY OF SUCH DAMAGE.
16097  * ====================================================================
16098  *
16099  * This product includes cryptographic software written by Eric Young
16100  * (eay@cryptsoft.com).  This product includes software written by Tim
16101  * Hudson (tjh@cryptsoft.com).
16102  *
16103  */
16104 # 70 "/usr/include/openssl/ecdsa.h" 2 3 4
16105 
16106 # 1 "/usr/include/openssl/bn.h" 1 3 4
16107 /* crypto/bn/bn.h */
16108 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
16109  * All rights reserved.
16110  *
16111  * This package is an SSL implementation written
16112  * by Eric Young (eay@cryptsoft.com).
16113  * The implementation was written so as to conform with Netscapes SSL.
16114  *
16115  * This library is free for commercial and non-commercial use as long as
16116  * the following conditions are aheared to.  The following conditions
16117  * apply to all code found in this distribution, be it the RC4, RSA,
16118  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16119  * included with this distribution is covered by the same copyright terms
16120  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16121  *
16122  * Copyright remains Eric Young's, and as such any Copyright notices in
16123  * the code are not to be removed.
16124  * If this package is used in a product, Eric Young should be given attribution
16125  * as the author of the parts of the library used.
16126  * This can be in the form of a textual message at program startup or
16127  * in documentation (online or textual) provided with the package.
16128  *
16129  * Redistribution and use in source and binary forms, with or without
16130  * modification, are permitted provided that the following conditions
16131  * are met:
16132  * 1. Redistributions of source code must retain the copyright
16133  *    notice, this list of conditions and the following disclaimer.
16134  * 2. Redistributions in binary form must reproduce the above copyright
16135  *    notice, this list of conditions and the following disclaimer in the
16136  *    documentation and/or other materials provided with the distribution.
16137  * 3. All advertising materials mentioning features or use of this software
16138  *    must display the following acknowledgement:
16139  *    "This product includes cryptographic software written by
16140  *     Eric Young (eay@cryptsoft.com)"
16141  *    The word 'cryptographic' can be left out if the rouines from the library
16142  *    being used are not cryptographic related :-).
16143  * 4. If you include any Windows specific code (or a derivative thereof) from
16144  *    the apps directory (application code) you must include an acknowledgement:
16145  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16146  *
16147  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16148  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16149  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16150  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16151  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16152  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16153  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16154  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16155  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16156  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16157  * SUCH DAMAGE.
16158  *
16159  * The licence and distribution terms for any publically available version or
16160  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16161  * copied and put under another distribution licence
16162  * [including the GNU Public Licence.]
16163  */
16164 /* ====================================================================
16165  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
16166  *
16167  * Redistribution and use in source and binary forms, with or without
16168  * modification, are permitted provided that the following conditions
16169  * are met:
16170  *
16171  * 1. Redistributions of source code must retain the above copyright
16172  *    notice, this list of conditions and the following disclaimer.
16173  *
16174  * 2. Redistributions in binary form must reproduce the above copyright
16175  *    notice, this list of conditions and the following disclaimer in
16176  *    the documentation and/or other materials provided with the
16177  *    distribution.
16178  *
16179  * 3. All advertising materials mentioning features or use of this
16180  *    software must display the following acknowledgment:
16181  *    "This product includes software developed by the OpenSSL Project
16182  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16183  *
16184  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16185  *    endorse or promote products derived from this software without
16186  *    prior written permission. For written permission, please contact
16187  *    openssl-core@openssl.org.
16188  *
16189  * 5. Products derived from this software may not be called "OpenSSL"
16190  *    nor may "OpenSSL" appear in their names without prior written
16191  *    permission of the OpenSSL Project.
16192  *
16193  * 6. Redistributions of any form whatsoever must retain the following
16194  *    acknowledgment:
16195  *    "This product includes software developed by the OpenSSL Project
16196  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16197  *
16198  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16199  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16200  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16201  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16202  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16203  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16204  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16205  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16206  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16207  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16208  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16209  * OF THE POSSIBILITY OF SUCH DAMAGE.
16210  * ====================================================================
16211  *
16212  * This product includes cryptographic software written by Eric Young
16213  * (eay@cryptsoft.com).  This product includes software written by Tim
16214  * Hudson (tjh@cryptsoft.com).
16215  *
16216  */
16217 /* ====================================================================
16218  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16219  *
16220  * Portions of the attached software ("Contribution") are developed by
16221  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16222  *
16223  * The Contribution is licensed pursuant to the Eric Young open source
16224  * license provided above.
16225  *
16226  * The binary polynomial arithmetic software is originally written by
16227  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16228  *
16229  */
16230 # 72 "/usr/include/openssl/ecdsa.h" 2 3 4
16231 
16232 
16233 
16234 
16235 
16236 
16237 typedef struct ECDSA_SIG_st {
16238     BIGNUM *r;
16239     BIGNUM *s;
16240 } ECDSA_SIG;
16241 
16242 /** Allocates and initialize a ECDSA_SIG structure
16243  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
16244  */
16245 ECDSA_SIG *ECDSA_SIG_new(void);
16246 
16247 /** frees a ECDSA_SIG structure
16248  *  \param  sig  pointer to the ECDSA_SIG structure
16249  */
16250 void ECDSA_SIG_free(ECDSA_SIG *sig);
16251 
16252 /** DER encode content of ECDSA_SIG object (note: this function modifies *pp
16253  *  (*pp += length of the DER encoded signature)).
16254  *  \param  sig  pointer to the ECDSA_SIG object
16255  *  \param  pp   pointer to a unsigned char pointer for the output or NULL
16256  *  \return the length of the DER encoded ECDSA_SIG object or 0
16257  */
16258 int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
16259 
16260 /** Decodes a DER encoded ECDSA signature (note: this function changes *pp
16261  *  (*pp += len)).
16262  *  \param  sig  pointer to ECDSA_SIG pointer (may be NULL)
16263  *  \param  pp   memory buffer with the DER encoded signature
16264  *  \param  len  length of the buffer
16265  *  \return pointer to the decoded ECDSA_SIG structure (or NULL)
16266  */
16267 ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);
16268 
16269 /** Computes the ECDSA signature of the given hash value using
16270  *  the supplied private key and returns the created signature.
16271  *  \param  dgst      pointer to the hash value
16272  *  \param  dgst_len  length of the hash value
16273  *  \param  eckey     EC_KEY object containing a private EC key
16274  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
16275  */
16276 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len,
16277                          EC_KEY *eckey);
16278 
16279 /** Computes ECDSA signature of a given hash value using the supplied
16280  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
16281  *  \param  dgst     pointer to the hash value to sign
16282  *  \param  dgstlen  length of the hash value
16283  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
16284  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
16285  *                   see ECDSA_sign_setup
16286  *  \param  eckey    EC_KEY object containing a private EC key
16287  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
16288  */
16289 ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen,
16290                             const BIGNUM *kinv, const BIGNUM *rp,
16291                             EC_KEY *eckey);
16292 
16293 /** Verifies that the supplied signature is a valid ECDSA
16294  *  signature of the supplied hash value using the supplied public key.
16295  *  \param  dgst      pointer to the hash value
16296  *  \param  dgst_len  length of the hash value
16297  *  \param  sig       ECDSA_SIG structure
16298  *  \param  eckey     EC_KEY object containing a public EC key
16299  *  \return 1 if the signature is valid, 0 if the signature is invalid
16300  *          and -1 on error
16301  */
16302 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
16303                     const ECDSA_SIG *sig, EC_KEY *eckey);
16304 
16305 const ECDSA_METHOD *ECDSA_OpenSSL(void);
16306 
16307 /** Sets the default ECDSA method
16308  *  \param  meth  new default ECDSA_METHOD
16309  */
16310 void ECDSA_set_default_method(const ECDSA_METHOD *meth);
16311 
16312 /** Returns the default ECDSA method
16313  *  \return pointer to ECDSA_METHOD structure containing the default method
16314  */
16315 const ECDSA_METHOD *ECDSA_get_default_method(void);
16316 
16317 /** Sets method to be used for the ECDSA operations
16318  *  \param  eckey  EC_KEY object
16319  *  \param  meth   new method
16320  *  \return 1 on success and 0 otherwise
16321  */
16322 int ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth);
16323 
16324 /** Returns the maximum length of the DER encoded signature
16325  *  \param  eckey  EC_KEY object
16326  *  \return numbers of bytes required for the DER encoded signature
16327  */
16328 int ECDSA_size(const EC_KEY *eckey);
16329 
16330 /** Precompute parts of the signing operation
16331  *  \param  eckey  EC_KEY object containing a private EC key
16332  *  \param  ctx    BN_CTX object (optional)
16333  *  \param  kinv   BIGNUM pointer for the inverse of k
16334  *  \param  rp     BIGNUM pointer for x coordinate of k * generator
16335  *  \return 1 on success and 0 otherwise
16336  */
16337 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp);
16338 
16339 /** Computes ECDSA signature of a given hash value using the supplied
16340  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
16341  *  \param  type     this parameter is ignored
16342  *  \param  dgst     pointer to the hash value to sign
16343  *  \param  dgstlen  length of the hash value
16344  *  \param  sig      memory for the DER encoded created signature
16345  *  \param  siglen   pointer to the length of the returned signature
16346  *  \param  eckey    EC_KEY object containing a private EC key
16347  *  \return 1 on success and 0 otherwise
16348  */
16349 int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,
16350                unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
16351 
16352 /** Computes ECDSA signature of a given hash value using the supplied
16353  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
16354  *  \param  type     this parameter is ignored
16355  *  \param  dgst     pointer to the hash value to sign
16356  *  \param  dgstlen  length of the hash value
16357  *  \param  sig      buffer to hold the DER encoded signature
16358  *  \param  siglen   pointer to the length of the returned signature
16359  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
16360  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
16361  *                   see ECDSA_sign_setup
16362  *  \param  eckey    EC_KEY object containing a private EC key
16363  *  \return 1 on success and 0 otherwise
16364  */
16365 int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen,
16366                   unsigned char *sig, unsigned int *siglen,
16367                   const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey);
16368 
16369 /** Verifies that the given signature is valid ECDSA signature
16370  *  of the supplied hash value using the specified public key.
16371  *  \param  type     this parameter is ignored
16372  *  \param  dgst     pointer to the hash value
16373  *  \param  dgstlen  length of the hash value
16374  *  \param  sig      pointer to the DER encoded signature
16375  *  \param  siglen   length of the DER encoded signature
16376  *  \param  eckey    EC_KEY object containing a public EC key
16377  *  \return 1 if the signature is valid, 0 if the signature is invalid
16378  *          and -1 on error
16379  */
16380 int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen,
16381                  const unsigned char *sig, int siglen, EC_KEY *eckey);
16382 
16383 /* the standard ex_data functions */
16384 int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
16385                            *new_func, CRYPTO_EX_dup *dup_func,
16386                            CRYPTO_EX_free *free_func);
16387 int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg);
16388 void *ECDSA_get_ex_data(EC_KEY *d, int idx);
16389 
16390 /** Allocates and initialize a ECDSA_METHOD structure
16391  *  \param ecdsa_method pointer to ECDSA_METHOD to copy.  (May be NULL)
16392  *  \return pointer to a ECDSA_METHOD structure or NULL if an error occurred
16393  */
16394 
16395 ECDSA_METHOD *ECDSA_METHOD_new(const ECDSA_METHOD *ecdsa_method);
16396 
16397 /** frees a ECDSA_METHOD structure
16398  *  \param  ecdsa_method  pointer to the ECDSA_METHOD structure
16399  */
16400 void ECDSA_METHOD_free(ECDSA_METHOD *ecdsa_method);
16401 
16402 /**  Sets application specific data in the ECDSA_METHOD
16403  *   \param  ecdsa_method pointer to existing ECDSA_METHOD
16404  *   \param  app application specific data to set
16405  */
16406 
16407 void ECDSA_METHOD_set_app_data(ECDSA_METHOD *ecdsa_method, void *app);
16408 
16409 /** Returns application specific data from a ECDSA_METHOD structure
16410  *  \param ecdsa_method pointer to ECDSA_METHOD structure
16411  *  \return pointer to application specific data.
16412  */
16413 
16414 void *ECDSA_METHOD_get_app_data(ECDSA_METHOD *ecdsa_method);
16415 
16416 /**  Set the ECDSA_do_sign function in the ECDSA_METHOD
16417  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
16418  *   \param  ecdsa_do_sign a funtion of type ECDSA_do_sign
16419  */
16420 
16421 void ECDSA_METHOD_set_sign(ECDSA_METHOD *ecdsa_method,
16422                            ECDSA_SIG *(*ecdsa_do_sign) (const unsigned char
16423                                                         *dgst, int dgst_len,
16424                                                         const BIGNUM *inv,
16425                                                         const BIGNUM *rp,
16426                                                         EC_KEY *eckey));
16427 
16428 /**  Set the  ECDSA_sign_setup function in the ECDSA_METHOD
16429  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
16430  *   \param  ecdsa_sign_setup a funtion of type ECDSA_sign_setup
16431  */
16432 
16433 void ECDSA_METHOD_set_sign_setup(ECDSA_METHOD *ecdsa_method,
16434                                  int (*ecdsa_sign_setup) (EC_KEY *eckey,
16435                                                           BN_CTX *ctx,
16436                                                           BIGNUM **kinv,
16437                                                           BIGNUM **r));
16438 
16439 /**  Set the ECDSA_do_verify function in the ECDSA_METHOD
16440  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
16441  *   \param  ecdsa_do_verify a funtion of type ECDSA_do_verify
16442  */
16443 
16444 void ECDSA_METHOD_set_verify(ECDSA_METHOD *ecdsa_method,
16445                              int (*ecdsa_do_verify) (const unsigned char
16446                                                      *dgst, int dgst_len,
16447                                                      const ECDSA_SIG *sig,
16448                                                      EC_KEY *eckey));
16449 
16450 void ECDSA_METHOD_set_flags(ECDSA_METHOD *ecdsa_method, int flags);
16451 
16452 /**  Set the flags field in the ECDSA_METHOD
16453  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
16454  *   \param  flags flags value to set
16455  */
16456 
16457 void ECDSA_METHOD_set_name(ECDSA_METHOD *ecdsa_method, char *name);
16458 
16459 /**  Set the name field in the ECDSA_METHOD
16460  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
16461  *   \param  name name to set
16462  */
16463 
16464 /* BEGIN ERROR CODES */
16465 /*
16466  * The following lines are auto generated by the script mkerr.pl. Any changes
16467  * made after this point may be overwritten when the script is next run.
16468  */
16469 void ERR_load_ECDSA_strings(void);
16470 
16471 /* Error codes for the ECDSA functions. */
16472 
16473 /* Function codes. */
16474 
16475 
16476 
16477 
16478 
16479 
16480 
16481 /* Reason codes. */
16482 # 88 "/usr/include/openssl/x509.h" 2 3 4
16483 
16484 
16485 
16486 # 1 "/usr/include/openssl/ecdh.h" 1 3 4
16487 /* crypto/ecdh/ecdh.h */
16488 /* ====================================================================
16489  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16490  *
16491  * The Elliptic Curve Public-Key Crypto Library (ECC Code) included
16492  * herein is developed by SUN MICROSYSTEMS, INC., and is contributed
16493  * to the OpenSSL project.
16494  *
16495  * The ECC Code is licensed pursuant to the OpenSSL open source
16496  * license provided below.
16497  *
16498  * The ECDH software is originally written by Douglas Stebila of
16499  * Sun Microsystems Laboratories.
16500  *
16501  */
16502 /* ====================================================================
16503  * Copyright (c) 2000-2002 The OpenSSL Project.  All rights reserved.
16504  *
16505  * Redistribution and use in source and binary forms, with or without
16506  * modification, are permitted provided that the following conditions
16507  * are met:
16508  *
16509  * 1. Redistributions of source code must retain the above copyright
16510  *    notice, this list of conditions and the following disclaimer.
16511  *
16512  * 2. Redistributions in binary form must reproduce the above copyright
16513  *    notice, this list of conditions and the following disclaimer in
16514  *    the documentation and/or other materials provided with the
16515  *    distribution.
16516  *
16517  * 3. All advertising materials mentioning features or use of this
16518  *    software must display the following acknowledgment:
16519  *    "This product includes software developed by the OpenSSL Project
16520  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
16521  *
16522  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16523  *    endorse or promote products derived from this software without
16524  *    prior written permission. For written permission, please contact
16525  *    licensing@OpenSSL.org.
16526  *
16527  * 5. Products derived from this software may not be called "OpenSSL"
16528  *    nor may "OpenSSL" appear in their names without prior written
16529  *    permission of the OpenSSL Project.
16530  *
16531  * 6. Redistributions of any form whatsoever must retain the following
16532  *    acknowledgment:
16533  *    "This product includes software developed by the OpenSSL Project
16534  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
16535  *
16536  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16537  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16538  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16539  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16540  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16541  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16542  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16543  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16544  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16545  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16546  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16547  * OF THE POSSIBILITY OF SUCH DAMAGE.
16548  * ====================================================================
16549  *
16550  * This product includes cryptographic software written by Eric Young
16551  * (eay@cryptsoft.com).  This product includes software written by Tim
16552  * Hudson (tjh@cryptsoft.com).
16553  *
16554  */
16555 
16556 
16557 
16558 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
16559 /* opensslconf.h */
16560 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
16561 
16562 
16563 
16564 
16565 /* OpenSSL was configured with the following options: */
16566 # 108 "/usr/include/openssl/opensslconf.h" 3 4
16567 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
16568    asks for it.  This is a transient feature that is provided for those
16569    who haven't had the time to do the appropriate changes in their
16570    applications.  */
16571 # 204 "/usr/include/openssl/opensslconf.h" 3 4
16572 /* crypto/opensslconf.h.in */
16573 
16574 /* Generate 80386 code? */
16575 # 73 "/usr/include/openssl/ecdh.h" 2 3 4
16576 
16577 
16578 
16579 
16580 
16581 # 1 "/usr/include/openssl/ec.h" 1 3 4
16582 /* crypto/ec/ec.h */
16583 /*
16584  * Originally written by Bodo Moeller for the OpenSSL project.
16585  */
16586 /**
16587  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
16588  * \author Originally written by Bodo Moeller for the OpenSSL project
16589  */
16590 /* ====================================================================
16591  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
16592  *
16593  * Redistribution and use in source and binary forms, with or without
16594  * modification, are permitted provided that the following conditions
16595  * are met:
16596  *
16597  * 1. Redistributions of source code must retain the above copyright
16598  *    notice, this list of conditions and the following disclaimer.
16599  *
16600  * 2. Redistributions in binary form must reproduce the above copyright
16601  *    notice, this list of conditions and the following disclaimer in
16602  *    the documentation and/or other materials provided with the
16603  *    distribution.
16604  *
16605  * 3. All advertising materials mentioning features or use of this
16606  *    software must display the following acknowledgment:
16607  *    "This product includes software developed by the OpenSSL Project
16608  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16609  *
16610  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16611  *    endorse or promote products derived from this software without
16612  *    prior written permission. For written permission, please contact
16613  *    openssl-core@openssl.org.
16614  *
16615  * 5. Products derived from this software may not be called "OpenSSL"
16616  *    nor may "OpenSSL" appear in their names without prior written
16617  *    permission of the OpenSSL Project.
16618  *
16619  * 6. Redistributions of any form whatsoever must retain the following
16620  *    acknowledgment:
16621  *    "This product includes software developed by the OpenSSL Project
16622  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16623  *
16624  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16625  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16626  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16627  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16628  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16629  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16630  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16631  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16632  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16633  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16634  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16635  * OF THE POSSIBILITY OF SUCH DAMAGE.
16636  * ====================================================================
16637  *
16638  * This product includes cryptographic software written by Eric Young
16639  * (eay@cryptsoft.com).  This product includes software written by Tim
16640  * Hudson (tjh@cryptsoft.com).
16641  *
16642  */
16643 /* ====================================================================
16644  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16645  *
16646  * Portions of the attached software ("Contribution") are developed by
16647  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16648  *
16649  * The Contribution is licensed pursuant to the OpenSSL open source
16650  * license provided above.
16651  *
16652  * The elliptic curve binary polynomial software is originally written by
16653  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16654  *
16655  */
16656 # 79 "/usr/include/openssl/ecdh.h" 2 3 4
16657 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
16658 /* ====================================================================
16659  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
16660  *
16661  * Redistribution and use in source and binary forms, with or without
16662  * modification, are permitted provided that the following conditions
16663  * are met:
16664  *
16665  * 1. Redistributions of source code must retain the above copyright
16666  *    notice, this list of conditions and the following disclaimer.
16667  *
16668  * 2. Redistributions in binary form must reproduce the above copyright
16669  *    notice, this list of conditions and the following disclaimer in
16670  *    the documentation and/or other materials provided with the
16671  *    distribution.
16672  *
16673  * 3. All advertising materials mentioning features or use of this
16674  *    software must display the following acknowledgment:
16675  *    "This product includes software developed by the OpenSSL Project
16676  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16677  *
16678  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16679  *    endorse or promote products derived from this software without
16680  *    prior written permission. For written permission, please contact
16681  *    openssl-core@openssl.org.
16682  *
16683  * 5. Products derived from this software may not be called "OpenSSL"
16684  *    nor may "OpenSSL" appear in their names without prior written
16685  *    permission of the OpenSSL Project.
16686  *
16687  * 6. Redistributions of any form whatsoever must retain the following
16688  *    acknowledgment:
16689  *    "This product includes software developed by the OpenSSL Project
16690  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16691  *
16692  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16693  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16694  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16695  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16696  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16697  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16698  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16699  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16700  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16701  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16702  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16703  * OF THE POSSIBILITY OF SUCH DAMAGE.
16704  * ====================================================================
16705  *
16706  * This product includes cryptographic software written by Eric Young
16707  * (eay@cryptsoft.com).  This product includes software written by Tim
16708  * Hudson (tjh@cryptsoft.com).
16709  *
16710  */
16711 # 80 "/usr/include/openssl/ecdh.h" 2 3 4
16712 
16713 # 1 "/usr/include/openssl/bn.h" 1 3 4
16714 /* crypto/bn/bn.h */
16715 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
16716  * All rights reserved.
16717  *
16718  * This package is an SSL implementation written
16719  * by Eric Young (eay@cryptsoft.com).
16720  * The implementation was written so as to conform with Netscapes SSL.
16721  *
16722  * This library is free for commercial and non-commercial use as long as
16723  * the following conditions are aheared to.  The following conditions
16724  * apply to all code found in this distribution, be it the RC4, RSA,
16725  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16726  * included with this distribution is covered by the same copyright terms
16727  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16728  *
16729  * Copyright remains Eric Young's, and as such any Copyright notices in
16730  * the code are not to be removed.
16731  * If this package is used in a product, Eric Young should be given attribution
16732  * as the author of the parts of the library used.
16733  * This can be in the form of a textual message at program startup or
16734  * in documentation (online or textual) provided with the package.
16735  *
16736  * Redistribution and use in source and binary forms, with or without
16737  * modification, are permitted provided that the following conditions
16738  * are met:
16739  * 1. Redistributions of source code must retain the copyright
16740  *    notice, this list of conditions and the following disclaimer.
16741  * 2. Redistributions in binary form must reproduce the above copyright
16742  *    notice, this list of conditions and the following disclaimer in the
16743  *    documentation and/or other materials provided with the distribution.
16744  * 3. All advertising materials mentioning features or use of this software
16745  *    must display the following acknowledgement:
16746  *    "This product includes cryptographic software written by
16747  *     Eric Young (eay@cryptsoft.com)"
16748  *    The word 'cryptographic' can be left out if the rouines from the library
16749  *    being used are not cryptographic related :-).
16750  * 4. If you include any Windows specific code (or a derivative thereof) from
16751  *    the apps directory (application code) you must include an acknowledgement:
16752  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16753  *
16754  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16755  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16756  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16757  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16758  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16759  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16760  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16761  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16762  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16763  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16764  * SUCH DAMAGE.
16765  *
16766  * The licence and distribution terms for any publically available version or
16767  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16768  * copied and put under another distribution licence
16769  * [including the GNU Public Licence.]
16770  */
16771 /* ====================================================================
16772  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
16773  *
16774  * Redistribution and use in source and binary forms, with or without
16775  * modification, are permitted provided that the following conditions
16776  * are met:
16777  *
16778  * 1. Redistributions of source code must retain the above copyright
16779  *    notice, this list of conditions and the following disclaimer.
16780  *
16781  * 2. Redistributions in binary form must reproduce the above copyright
16782  *    notice, this list of conditions and the following disclaimer in
16783  *    the documentation and/or other materials provided with the
16784  *    distribution.
16785  *
16786  * 3. All advertising materials mentioning features or use of this
16787  *    software must display the following acknowledgment:
16788  *    "This product includes software developed by the OpenSSL Project
16789  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16790  *
16791  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16792  *    endorse or promote products derived from this software without
16793  *    prior written permission. For written permission, please contact
16794  *    openssl-core@openssl.org.
16795  *
16796  * 5. Products derived from this software may not be called "OpenSSL"
16797  *    nor may "OpenSSL" appear in their names without prior written
16798  *    permission of the OpenSSL Project.
16799  *
16800  * 6. Redistributions of any form whatsoever must retain the following
16801  *    acknowledgment:
16802  *    "This product includes software developed by the OpenSSL Project
16803  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16804  *
16805  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16806  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16807  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16808  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16809  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16810  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16811  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16812  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16813  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16814  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16815  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16816  * OF THE POSSIBILITY OF SUCH DAMAGE.
16817  * ====================================================================
16818  *
16819  * This product includes cryptographic software written by Eric Young
16820  * (eay@cryptsoft.com).  This product includes software written by Tim
16821  * Hudson (tjh@cryptsoft.com).
16822  *
16823  */
16824 /* ====================================================================
16825  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16826  *
16827  * Portions of the attached software ("Contribution") are developed by
16828  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16829  *
16830  * The Contribution is licensed pursuant to the Eric Young open source
16831  * license provided above.
16832  *
16833  * The binary polynomial arithmetic software is originally written by
16834  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16835  *
16836  */
16837 # 82 "/usr/include/openssl/ecdh.h" 2 3 4
16838 # 90 "/usr/include/openssl/ecdh.h" 3 4
16839 const ECDH_METHOD *ECDH_OpenSSL(void);
16840 
16841 void ECDH_set_default_method(const ECDH_METHOD *);
16842 const ECDH_METHOD *ECDH_get_default_method(void);
16843 int ECDH_set_method(EC_KEY *, const ECDH_METHOD *);
16844 
16845 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
16846                      EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen,
16847                                                  void *out, size_t *outlen));
16848 
16849 int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
16850                           *new_func, CRYPTO_EX_dup *dup_func,
16851                           CRYPTO_EX_free *free_func);
16852 int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg);
16853 void *ECDH_get_ex_data(EC_KEY *d, int idx);
16854 
16855 int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
16856                    const unsigned char *Z, size_t Zlen,
16857                    const unsigned char *sinfo, size_t sinfolen,
16858                    const EVP_MD *md);
16859 
16860 /* BEGIN ERROR CODES */
16861 /*
16862  * The following lines are auto generated by the script mkerr.pl. Any changes
16863  * made after this point may be overwritten when the script is next run.
16864  */
16865 void ERR_load_ECDH_strings(void);
16866 
16867 /* Error codes for the ECDH functions. */
16868 
16869 /* Function codes. */
16870 
16871 
16872 
16873 
16874 /* Reason codes. */
16875 # 92 "/usr/include/openssl/x509.h" 2 3 4
16876 
16877 
16878 
16879 
16880 # 1 "/usr/include/openssl/rsa.h" 1 3 4
16881 /* crypto/rsa/rsa.h */
16882 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
16883  * All rights reserved.
16884  *
16885  * This package is an SSL implementation written
16886  * by Eric Young (eay@cryptsoft.com).
16887  * The implementation was written so as to conform with Netscapes SSL.
16888  *
16889  * This library is free for commercial and non-commercial use as long as
16890  * the following conditions are aheared to.  The following conditions
16891  * apply to all code found in this distribution, be it the RC4, RSA,
16892  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16893  * included with this distribution is covered by the same copyright terms
16894  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16895  *
16896  * Copyright remains Eric Young's, and as such any Copyright notices in
16897  * the code are not to be removed.
16898  * If this package is used in a product, Eric Young should be given attribution
16899  * as the author of the parts of the library used.
16900  * This can be in the form of a textual message at program startup or
16901  * in documentation (online or textual) provided with the package.
16902  *
16903  * Redistribution and use in source and binary forms, with or without
16904  * modification, are permitted provided that the following conditions
16905  * are met:
16906  * 1. Redistributions of source code must retain the copyright
16907  *    notice, this list of conditions and the following disclaimer.
16908  * 2. Redistributions in binary form must reproduce the above copyright
16909  *    notice, this list of conditions and the following disclaimer in the
16910  *    documentation and/or other materials provided with the distribution.
16911  * 3. All advertising materials mentioning features or use of this software
16912  *    must display the following acknowledgement:
16913  *    "This product includes cryptographic software written by
16914  *     Eric Young (eay@cryptsoft.com)"
16915  *    The word 'cryptographic' can be left out if the rouines from the library
16916  *    being used are not cryptographic related :-).
16917  * 4. If you include any Windows specific code (or a derivative thereof) from
16918  *    the apps directory (application code) you must include an acknowledgement:
16919  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16920  *
16921  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16922  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16923  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16924  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16925  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16926  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16927  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16928  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16929  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16930  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16931  * SUCH DAMAGE.
16932  *
16933  * The licence and distribution terms for any publically available version or
16934  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16935  * copied and put under another distribution licence
16936  * [including the GNU Public Licence.]
16937  */
16938 
16939 
16940 
16941 
16942 # 1 "/usr/include/openssl/asn1.h" 1 3 4
16943 /* crypto/asn1/asn1.h */
16944 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
16945  * All rights reserved.
16946  *
16947  * This package is an SSL implementation written
16948  * by Eric Young (eay@cryptsoft.com).
16949  * The implementation was written so as to conform with Netscapes SSL.
16950  *
16951  * This library is free for commercial and non-commercial use as long as
16952  * the following conditions are aheared to.  The following conditions
16953  * apply to all code found in this distribution, be it the RC4, RSA,
16954  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16955  * included with this distribution is covered by the same copyright terms
16956  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16957  *
16958  * Copyright remains Eric Young's, and as such any Copyright notices in
16959  * the code are not to be removed.
16960  * If this package is used in a product, Eric Young should be given attribution
16961  * as the author of the parts of the library used.
16962  * This can be in the form of a textual message at program startup or
16963  * in documentation (online or textual) provided with the package.
16964  *
16965  * Redistribution and use in source and binary forms, with or without
16966  * modification, are permitted provided that the following conditions
16967  * are met:
16968  * 1. Redistributions of source code must retain the copyright
16969  *    notice, this list of conditions and the following disclaimer.
16970  * 2. Redistributions in binary form must reproduce the above copyright
16971  *    notice, this list of conditions and the following disclaimer in the
16972  *    documentation and/or other materials provided with the distribution.
16973  * 3. All advertising materials mentioning features or use of this software
16974  *    must display the following acknowledgement:
16975  *    "This product includes cryptographic software written by
16976  *     Eric Young (eay@cryptsoft.com)"
16977  *    The word 'cryptographic' can be left out if the rouines from the library
16978  *    being used are not cryptographic related :-).
16979  * 4. If you include any Windows specific code (or a derivative thereof) from
16980  *    the apps directory (application code) you must include an acknowledgement:
16981  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16982  *
16983  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16984  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16985  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16986  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16987  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16988  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16989  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16990  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16991  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16992  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16993  * SUCH DAMAGE.
16994  *
16995  * The licence and distribution terms for any publically available version or
16996  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16997  * copied and put under another distribution licence
16998  * [including the GNU Public Licence.]
16999  */
17000 # 63 "/usr/include/openssl/rsa.h" 2 3 4
17001 
17002 
17003 # 1 "/usr/include/openssl/bio.h" 1 3 4
17004 /* crypto/bio/bio.h */
17005 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17006  * All rights reserved.
17007  *
17008  * This package is an SSL implementation written
17009  * by Eric Young (eay@cryptsoft.com).
17010  * The implementation was written so as to conform with Netscapes SSL.
17011  *
17012  * This library is free for commercial and non-commercial use as long as
17013  * the following conditions are aheared to.  The following conditions
17014  * apply to all code found in this distribution, be it the RC4, RSA,
17015  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17016  * included with this distribution is covered by the same copyright terms
17017  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17018  *
17019  * Copyright remains Eric Young's, and as such any Copyright notices in
17020  * the code are not to be removed.
17021  * If this package is used in a product, Eric Young should be given attribution
17022  * as the author of the parts of the library used.
17023  * This can be in the form of a textual message at program startup or
17024  * in documentation (online or textual) provided with the package.
17025  *
17026  * Redistribution and use in source and binary forms, with or without
17027  * modification, are permitted provided that the following conditions
17028  * are met:
17029  * 1. Redistributions of source code must retain the copyright
17030  *    notice, this list of conditions and the following disclaimer.
17031  * 2. Redistributions in binary form must reproduce the above copyright
17032  *    notice, this list of conditions and the following disclaimer in the
17033  *    documentation and/or other materials provided with the distribution.
17034  * 3. All advertising materials mentioning features or use of this software
17035  *    must display the following acknowledgement:
17036  *    "This product includes cryptographic software written by
17037  *     Eric Young (eay@cryptsoft.com)"
17038  *    The word 'cryptographic' can be left out if the rouines from the library
17039  *    being used are not cryptographic related :-).
17040  * 4. If you include any Windows specific code (or a derivative thereof) from
17041  *    the apps directory (application code) you must include an acknowledgement:
17042  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17043  *
17044  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17045  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17046  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17047  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17048  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17049  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17050  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17051  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17052  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17053  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17054  * SUCH DAMAGE.
17055  *
17056  * The licence and distribution terms for any publically available version or
17057  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17058  * copied and put under another distribution licence
17059  * [including the GNU Public Licence.]
17060  */
17061 # 66 "/usr/include/openssl/rsa.h" 2 3 4
17062 
17063 # 1 "/usr/include/openssl/crypto.h" 1 3 4
17064 /* crypto/crypto.h */
17065 /* ====================================================================
17066  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
17067  *
17068  * Redistribution and use in source and binary forms, with or without
17069  * modification, are permitted provided that the following conditions
17070  * are met:
17071  *
17072  * 1. Redistributions of source code must retain the above copyright
17073  *    notice, this list of conditions and the following disclaimer.
17074  *
17075  * 2. Redistributions in binary form must reproduce the above copyright
17076  *    notice, this list of conditions and the following disclaimer in
17077  *    the documentation and/or other materials provided with the
17078  *    distribution.
17079  *
17080  * 3. All advertising materials mentioning features or use of this
17081  *    software must display the following acknowledgment:
17082  *    "This product includes software developed by the OpenSSL Project
17083  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17084  *
17085  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17086  *    endorse or promote products derived from this software without
17087  *    prior written permission. For written permission, please contact
17088  *    openssl-core@openssl.org.
17089  *
17090  * 5. Products derived from this software may not be called "OpenSSL"
17091  *    nor may "OpenSSL" appear in their names without prior written
17092  *    permission of the OpenSSL Project.
17093  *
17094  * 6. Redistributions of any form whatsoever must retain the following
17095  *    acknowledgment:
17096  *    "This product includes software developed by the OpenSSL Project
17097  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17098  *
17099  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17100  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17101  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17102  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17103  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17104  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17105  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17106  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17107  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17108  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17109  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17110  * OF THE POSSIBILITY OF SUCH DAMAGE.
17111  * ====================================================================
17112  *
17113  * This product includes cryptographic software written by Eric Young
17114  * (eay@cryptsoft.com).  This product includes software written by Tim
17115  * Hudson (tjh@cryptsoft.com).
17116  *
17117  */
17118 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17119  * All rights reserved.
17120  *
17121  * This package is an SSL implementation written
17122  * by Eric Young (eay@cryptsoft.com).
17123  * The implementation was written so as to conform with Netscapes SSL.
17124  *
17125  * This library is free for commercial and non-commercial use as long as
17126  * the following conditions are aheared to.  The following conditions
17127  * apply to all code found in this distribution, be it the RC4, RSA,
17128  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17129  * included with this distribution is covered by the same copyright terms
17130  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17131  *
17132  * Copyright remains Eric Young's, and as such any Copyright notices in
17133  * the code are not to be removed.
17134  * If this package is used in a product, Eric Young should be given attribution
17135  * as the author of the parts of the library used.
17136  * This can be in the form of a textual message at program startup or
17137  * in documentation (online or textual) provided with the package.
17138  *
17139  * Redistribution and use in source and binary forms, with or without
17140  * modification, are permitted provided that the following conditions
17141  * are met:
17142  * 1. Redistributions of source code must retain the copyright
17143  *    notice, this list of conditions and the following disclaimer.
17144  * 2. Redistributions in binary form must reproduce the above copyright
17145  *    notice, this list of conditions and the following disclaimer in the
17146  *    documentation and/or other materials provided with the distribution.
17147  * 3. All advertising materials mentioning features or use of this software
17148  *    must display the following acknowledgement:
17149  *    "This product includes cryptographic software written by
17150  *     Eric Young (eay@cryptsoft.com)"
17151  *    The word 'cryptographic' can be left out if the rouines from the library
17152  *    being used are not cryptographic related :-).
17153  * 4. If you include any Windows specific code (or a derivative thereof) from
17154  *    the apps directory (application code) you must include an acknowledgement:
17155  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17156  *
17157  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17158  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17159  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17160  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17161  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17162  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17163  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17164  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17165  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17166  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17167  * SUCH DAMAGE.
17168  *
17169  * The licence and distribution terms for any publically available version or
17170  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17171  * copied and put under another distribution licence
17172  * [including the GNU Public Licence.]
17173  */
17174 /* ====================================================================
17175  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
17176  * ECDH support in OpenSSL originally developed by
17177  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
17178  */
17179 # 68 "/usr/include/openssl/rsa.h" 2 3 4
17180 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
17181 /* ====================================================================
17182  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
17183  *
17184  * Redistribution and use in source and binary forms, with or without
17185  * modification, are permitted provided that the following conditions
17186  * are met:
17187  *
17188  * 1. Redistributions of source code must retain the above copyright
17189  *    notice, this list of conditions and the following disclaimer.
17190  *
17191  * 2. Redistributions in binary form must reproduce the above copyright
17192  *    notice, this list of conditions and the following disclaimer in
17193  *    the documentation and/or other materials provided with the
17194  *    distribution.
17195  *
17196  * 3. All advertising materials mentioning features or use of this
17197  *    software must display the following acknowledgment:
17198  *    "This product includes software developed by the OpenSSL Project
17199  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17200  *
17201  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17202  *    endorse or promote products derived from this software without
17203  *    prior written permission. For written permission, please contact
17204  *    openssl-core@openssl.org.
17205  *
17206  * 5. Products derived from this software may not be called "OpenSSL"
17207  *    nor may "OpenSSL" appear in their names without prior written
17208  *    permission of the OpenSSL Project.
17209  *
17210  * 6. Redistributions of any form whatsoever must retain the following
17211  *    acknowledgment:
17212  *    "This product includes software developed by the OpenSSL Project
17213  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17214  *
17215  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17216  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17217  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17218  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17219  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17220  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17221  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17222  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17223  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17224  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17225  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17226  * OF THE POSSIBILITY OF SUCH DAMAGE.
17227  * ====================================================================
17228  *
17229  * This product includes cryptographic software written by Eric Young
17230  * (eay@cryptsoft.com).  This product includes software written by Tim
17231  * Hudson (tjh@cryptsoft.com).
17232  *
17233  */
17234 # 69 "/usr/include/openssl/rsa.h" 2 3 4
17235 
17236 # 1 "/usr/include/openssl/bn.h" 1 3 4
17237 /* crypto/bn/bn.h */
17238 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
17239  * All rights reserved.
17240  *
17241  * This package is an SSL implementation written
17242  * by Eric Young (eay@cryptsoft.com).
17243  * The implementation was written so as to conform with Netscapes SSL.
17244  *
17245  * This library is free for commercial and non-commercial use as long as
17246  * the following conditions are aheared to.  The following conditions
17247  * apply to all code found in this distribution, be it the RC4, RSA,
17248  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17249  * included with this distribution is covered by the same copyright terms
17250  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17251  *
17252  * Copyright remains Eric Young's, and as such any Copyright notices in
17253  * the code are not to be removed.
17254  * If this package is used in a product, Eric Young should be given attribution
17255  * as the author of the parts of the library used.
17256  * This can be in the form of a textual message at program startup or
17257  * in documentation (online or textual) provided with the package.
17258  *
17259  * Redistribution and use in source and binary forms, with or without
17260  * modification, are permitted provided that the following conditions
17261  * are met:
17262  * 1. Redistributions of source code must retain the copyright
17263  *    notice, this list of conditions and the following disclaimer.
17264  * 2. Redistributions in binary form must reproduce the above copyright
17265  *    notice, this list of conditions and the following disclaimer in the
17266  *    documentation and/or other materials provided with the distribution.
17267  * 3. All advertising materials mentioning features or use of this software
17268  *    must display the following acknowledgement:
17269  *    "This product includes cryptographic software written by
17270  *     Eric Young (eay@cryptsoft.com)"
17271  *    The word 'cryptographic' can be left out if the rouines from the library
17272  *    being used are not cryptographic related :-).
17273  * 4. If you include any Windows specific code (or a derivative thereof) from
17274  *    the apps directory (application code) you must include an acknowledgement:
17275  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17276  *
17277  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17278  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17279  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17280  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17281  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17282  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17283  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17284  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17285  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17286  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17287  * SUCH DAMAGE.
17288  *
17289  * The licence and distribution terms for any publically available version or
17290  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17291  * copied and put under another distribution licence
17292  * [including the GNU Public Licence.]
17293  */
17294 /* ====================================================================
17295  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
17296  *
17297  * Redistribution and use in source and binary forms, with or without
17298  * modification, are permitted provided that the following conditions
17299  * are met:
17300  *
17301  * 1. Redistributions of source code must retain the above copyright
17302  *    notice, this list of conditions and the following disclaimer.
17303  *
17304  * 2. Redistributions in binary form must reproduce the above copyright
17305  *    notice, this list of conditions and the following disclaimer in
17306  *    the documentation and/or other materials provided with the
17307  *    distribution.
17308  *
17309  * 3. All advertising materials mentioning features or use of this
17310  *    software must display the following acknowledgment:
17311  *    "This product includes software developed by the OpenSSL Project
17312  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17313  *
17314  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17315  *    endorse or promote products derived from this software without
17316  *    prior written permission. For written permission, please contact
17317  *    openssl-core@openssl.org.
17318  *
17319  * 5. Products derived from this software may not be called "OpenSSL"
17320  *    nor may "OpenSSL" appear in their names without prior written
17321  *    permission of the OpenSSL Project.
17322  *
17323  * 6. Redistributions of any form whatsoever must retain the following
17324  *    acknowledgment:
17325  *    "This product includes software developed by the OpenSSL Project
17326  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17327  *
17328  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17329  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17330  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17331  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17332  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17333  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17334  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17335  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17336  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17337  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17338  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17339  * OF THE POSSIBILITY OF SUCH DAMAGE.
17340  * ====================================================================
17341  *
17342  * This product includes cryptographic software written by Eric Young
17343  * (eay@cryptsoft.com).  This product includes software written by Tim
17344  * Hudson (tjh@cryptsoft.com).
17345  *
17346  */
17347 /* ====================================================================
17348  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
17349  *
17350  * Portions of the attached software ("Contribution") are developed by
17351  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
17352  *
17353  * The Contribution is licensed pursuant to the Eric Young open source
17354  * license provided above.
17355  *
17356  * The binary polynomial arithmetic software is originally written by
17357  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
17358  *
17359  */
17360 # 71 "/usr/include/openssl/rsa.h" 2 3 4
17361 # 81 "/usr/include/openssl/rsa.h" 3 4
17362 /* Declared already in ossl_typ.h */
17363 /* typedef struct rsa_st RSA; */
17364 /* typedef struct rsa_meth_st RSA_METHOD; */
17365 
17366 struct rsa_meth_st {
17367     const char *name;
17368     int (*rsa_pub_enc) (int flen, const unsigned char *from,
17369                         unsigned char *to, RSA *rsa, int padding);
17370     int (*rsa_pub_dec) (int flen, const unsigned char *from,
17371                         unsigned char *to, RSA *rsa, int padding);
17372     int (*rsa_priv_enc) (int flen, const unsigned char *from,
17373                          unsigned char *to, RSA *rsa, int padding);
17374     int (*rsa_priv_dec) (int flen, const unsigned char *from,
17375                          unsigned char *to, RSA *rsa, int padding);
17376     /* Can be null */
17377     int (*rsa_mod_exp) (BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
17378     /* Can be null */
17379     int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
17380                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
17381     /* called at new */
17382     int (*init) (RSA *rsa);
17383     /* called at free */
17384     int (*finish) (RSA *rsa);
17385     /* RSA_METHOD_FLAG_* things */
17386     int flags;
17387     /* may be needed! */
17388     char *app_data;
17389     /*
17390      * New sign and verify functions: some libraries don't allow arbitrary
17391      * data to be signed/verified: this allows them to be used. Note: for
17392      * this to work the RSA_public_decrypt() and RSA_private_encrypt() should
17393      * *NOT* be used RSA_sign(), RSA_verify() should be used instead. Note:
17394      * for backwards compatibility this functionality is only enabled if the
17395      * RSA_FLAG_SIGN_VER option is set in 'flags'.
17396      */
17397     int (*rsa_sign) (int type,
17398                      const unsigned char *m, unsigned int m_length,
17399                      unsigned char *sigret, unsigned int *siglen,
17400                      const RSA *rsa);
17401     int (*rsa_verify) (int dtype, const unsigned char *m,
17402                        unsigned int m_length, const unsigned char *sigbuf,
17403                        unsigned int siglen, const RSA *rsa);
17404     /*
17405      * If this callback is NULL, the builtin software RSA key-gen will be
17406      * used. This is for behavioural compatibility whilst the code gets
17407      * rewired, but one day it would be nice to assume there are no such
17408      * things as "builtin software" implementations.
17409      */
17410     int (*rsa_keygen) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
17411 };
17412 
17413 struct rsa_st {
17414     /*
17415      * The first parameter is used to pickup errors where this is passed
17416      * instead of aEVP_PKEY, it is set to 0
17417      */
17418     int pad;
17419     long version;
17420     const RSA_METHOD *meth;
17421     /* functional reference if 'meth' is ENGINE-provided */
17422     ENGINE *engine;
17423     BIGNUM *n;
17424     BIGNUM *e;
17425     BIGNUM *d;
17426     BIGNUM *p;
17427     BIGNUM *q;
17428     BIGNUM *dmp1;
17429     BIGNUM *dmq1;
17430     BIGNUM *iqmp;
17431     /* be careful using this if the RSA structure is shared */
17432     CRYPTO_EX_DATA ex_data;
17433     int references;
17434     int flags;
17435     /* Used to cache montgomery values */
17436     BN_MONT_CTX *_method_mod_n;
17437     BN_MONT_CTX *_method_mod_p;
17438     BN_MONT_CTX *_method_mod_q;
17439     /*
17440      * all BIGNUM values are actually in the following data, if it is not
17441      * NULL
17442      */
17443     char *bignum_data;
17444     BN_BLINDING *blinding;
17445     BN_BLINDING *mt_blinding;
17446 };
17447 # 176 "/usr/include/openssl/rsa.h" 3 4
17448 /* exponent limit enforced for "large" modulus only */
17449 # 190 "/usr/include/openssl/rsa.h" 3 4
17450 /*
17451  * This flag means the private key operations will be handled by rsa_mod_exp
17452  * and that they do not depend on the private key components being present:
17453  * for example a key stored in external hardware. Without this flag
17454  * bn_mod_exp gets called when private key components are absent.
17455  */
17456 
17457 
17458 /*
17459  * This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify
17460  * functions.
17461  */
17462 
17463 
17464 /*
17465  * new with 0.9.6j and 0.9.7b; the built-in
17466  * RSA implementation now uses blinding by
17467  * default (ignoring RSA_FLAG_BLINDING),
17468  * but other engines might not need it
17469  */
17470 
17471 /*
17472  * new with 0.9.8f; the built-in RSA
17473  * implementation now uses constant time
17474  * operations by default in private key operations,
17475  * e.g., constant time modular exponentiation,
17476  * modular inverse without leaking branches,
17477  * division without leaking branches. This
17478  * flag disables these constant time
17479  * operations and results in faster RSA
17480  * private key operations.
17481  */
17482 # 312 "/usr/include/openssl/rsa.h" 3 4
17483 /* EVP_PKEY_ only */
17484 
17485 
17486 
17487 
17488 
17489 
17490 
17491 RSA *RSA_new(void);
17492 RSA *RSA_new_method(ENGINE *engine);
17493 int RSA_size(const RSA *rsa);
17494 
17495 /* Deprecated version */
17496 
17497 RSA *RSA_generate_key(int bits, unsigned long e, void
17498                        (*callback) (int, int, void *), void *cb_arg);
17499 
17500 
17501 /* New version */
17502 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
17503 
17504 int RSA_check_key(const RSA *);
17505         /* next 4 return -1 on error */
17506 int RSA_public_encrypt(int flen, const unsigned char *from,
17507                        unsigned char *to, RSA *rsa, int padding);
17508 int RSA_private_encrypt(int flen, const unsigned char *from,
17509                         unsigned char *to, RSA *rsa, int padding);
17510 int RSA_public_decrypt(int flen, const unsigned char *from,
17511                        unsigned char *to, RSA *rsa, int padding);
17512 int RSA_private_decrypt(int flen, const unsigned char *from,
17513                         unsigned char *to, RSA *rsa, int padding);
17514 void RSA_free(RSA *r);
17515 /* "up" the RSA object's reference count */
17516 int RSA_up_ref(RSA *r);
17517 
17518 int RSA_flags(const RSA *r);
17519 
17520 void RSA_set_default_method(const RSA_METHOD *meth);
17521 const RSA_METHOD *RSA_get_default_method(void);
17522 const RSA_METHOD *RSA_get_method(const RSA *rsa);
17523 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
17524 
17525 /* This function needs the memory locking malloc callbacks to be installed */
17526 int RSA_memory_lock(RSA *r);
17527 
17528 /* these are the actual SSLeay RSA functions */
17529 const RSA_METHOD *RSA_PKCS1_SSLeay(void);
17530 
17531 const RSA_METHOD *RSA_null_method(void);
17532 
17533 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;
17534 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;
17535 
17536 typedef struct rsa_pss_params_st {
17537     X509_ALGOR *hashAlgorithm;
17538     X509_ALGOR *maskGenAlgorithm;
17539     ASN1_INTEGER *saltLength;
17540     ASN1_INTEGER *trailerField;
17541 } RSA_PSS_PARAMS;
17542 
17543 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;
17544 
17545 typedef struct rsa_oaep_params_st {
17546     X509_ALGOR *hashFunc;
17547     X509_ALGOR *maskGenFunc;
17548     X509_ALGOR *pSourceFunc;
17549 } RSA_OAEP_PARAMS;
17550 
17551 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;
17552 
17553 
17554 int RSA_print_fp(FILE *fp, const RSA *r, int offset);
17555 
17556 
17557 
17558 int RSA_print(BIO *bp, const RSA *r, int offset);
17559 
17560 
17561 
17562 int i2d_RSA_NET(const RSA *a, unsigned char **pp,
17563                 int (*cb) (char *buf, int len, const char *prompt,
17564                            int verify), int sgckey);
17565 RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
17566                  int (*cb) (char *buf, int len, const char *prompt,
17567                             int verify), int sgckey);
17568 
17569 int i2d_Netscape_RSA(const RSA *a, unsigned char **pp,
17570                      int (*cb) (char *buf, int len, const char *prompt,
17571                                 int verify));
17572 RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length,
17573                       int (*cb) (char *buf, int len, const char *prompt,
17574                                  int verify));
17575 
17576 
17577 /*
17578  * The following 2 functions sign and verify a X509_SIG ASN1 object inside
17579  * PKCS#1 padded RSA encryption
17580  */
17581 int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
17582              unsigned char *sigret, unsigned int *siglen, RSA *rsa);
17583 int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
17584                const unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
17585 
17586 /*
17587  * The following 2 function sign and verify a ASN1_OCTET_STRING object inside
17588  * PKCS#1 padded RSA encryption
17589  */
17590 int RSA_sign_ASN1_OCTET_STRING(int type,
17591                                const unsigned char *m, unsigned int m_length,
17592                                unsigned char *sigret, unsigned int *siglen,
17593                                RSA *rsa);
17594 int RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m,
17595                                  unsigned int m_length, unsigned char *sigbuf,
17596                                  unsigned int siglen, RSA *rsa);
17597 
17598 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
17599 void RSA_blinding_off(RSA *rsa);
17600 BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
17601 
17602 int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
17603                                  const unsigned char *f, int fl);
17604 int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
17605                                    const unsigned char *f, int fl,
17606                                    int rsa_len);
17607 int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
17608                                  const unsigned char *f, int fl);
17609 int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
17610                                    const unsigned char *f, int fl,
17611                                    int rsa_len);
17612 int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,
17613                long seedlen, const EVP_MD *dgst);
17614 int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
17615                                const unsigned char *f, int fl,
17616                                const unsigned char *p, int pl);
17617 int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
17618                                  const unsigned char *f, int fl, int rsa_len,
17619                                  const unsigned char *p, int pl);
17620 int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
17621                                     const unsigned char *from, int flen,
17622                                     const unsigned char *param, int plen,
17623                                     const EVP_MD *md, const EVP_MD *mgf1md);
17624 int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
17625                                       const unsigned char *from, int flen,
17626                                       int num, const unsigned char *param,
17627                                       int plen, const EVP_MD *md,
17628                                       const EVP_MD *mgf1md);
17629 int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
17630                            const unsigned char *f, int fl);
17631 int RSA_padding_check_SSLv23(unsigned char *to, int tlen,
17632                              const unsigned char *f, int fl, int rsa_len);
17633 int RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f,
17634                          int fl);
17635 int RSA_padding_check_none(unsigned char *to, int tlen,
17636                            const unsigned char *f, int fl, int rsa_len);
17637 int RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f,
17638                          int fl);
17639 int RSA_padding_check_X931(unsigned char *to, int tlen,
17640                            const unsigned char *f, int fl, int rsa_len);
17641 int RSA_X931_hash_id(int nid);
17642 
17643 int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
17644                          const EVP_MD *Hash, const unsigned char *EM,
17645                          int sLen);
17646 int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
17647                               const unsigned char *mHash, const EVP_MD *Hash,
17648                               int sLen);
17649 
17650 int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
17651                               const EVP_MD *Hash, const EVP_MD *mgf1Hash,
17652                               const unsigned char *EM, int sLen);
17653 
17654 int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
17655                                    const unsigned char *mHash,
17656                                    const EVP_MD *Hash, const EVP_MD *mgf1Hash,
17657                                    int sLen);
17658 
17659 int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
17660                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
17661 int RSA_set_ex_data(RSA *r, int idx, void *arg);
17662 void *RSA_get_ex_data(const RSA *r, int idx);
17663 
17664 RSA *RSAPublicKey_dup(RSA *rsa);
17665 RSA *RSAPrivateKey_dup(RSA *rsa);
17666 
17667 /*
17668  * If this flag is set the RSA method is FIPS compliant and can be used in
17669  * FIPS mode. This is set in the validated module method. If an application
17670  * sets this flag in its own methods it is its responsibility to ensure the
17671  * result is compliant.
17672  */
17673 
17674 
17675 
17676 /*
17677  * If this flag is set the operations normally disabled in FIPS mode are
17678  * permitted it is then the applications responsibility to ensure that the
17679  * usage is compliant.
17680  */
17681 
17682 
17683 /*
17684  * Application has decided PRNG is good enough to generate a key: don't
17685  * check.
17686  */
17687 
17688 
17689 /* BEGIN ERROR CODES */
17690 /*
17691  * The following lines are auto generated by the script mkerr.pl. Any changes
17692  * made after this point may be overwritten when the script is next run.
17693  */
17694 void ERR_load_RSA_strings(void);
17695 
17696 /* Error codes for the RSA functions. */
17697 
17698 /* Function codes. */
17699 # 592 "/usr/include/openssl/rsa.h" 3 4
17700 /* Reason codes. */
17701 # 97 "/usr/include/openssl/x509.h" 2 3 4
17702 
17703 
17704 # 1 "/usr/include/openssl/dsa.h" 1 3 4
17705 /* crypto/dsa/dsa.h */
17706 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17707  * All rights reserved.
17708  *
17709  * This package is an SSL implementation written
17710  * by Eric Young (eay@cryptsoft.com).
17711  * The implementation was written so as to conform with Netscapes SSL.
17712  *
17713  * This library is free for commercial and non-commercial use as long as
17714  * the following conditions are aheared to.  The following conditions
17715  * apply to all code found in this distribution, be it the RC4, RSA,
17716  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17717  * included with this distribution is covered by the same copyright terms
17718  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17719  *
17720  * Copyright remains Eric Young's, and as such any Copyright notices in
17721  * the code are not to be removed.
17722  * If this package is used in a product, Eric Young should be given attribution
17723  * as the author of the parts of the library used.
17724  * This can be in the form of a textual message at program startup or
17725  * in documentation (online or textual) provided with the package.
17726  *
17727  * Redistribution and use in source and binary forms, with or without
17728  * modification, are permitted provided that the following conditions
17729  * are met:
17730  * 1. Redistributions of source code must retain the copyright
17731  *    notice, this list of conditions and the following disclaimer.
17732  * 2. Redistributions in binary form must reproduce the above copyright
17733  *    notice, this list of conditions and the following disclaimer in the
17734  *    documentation and/or other materials provided with the distribution.
17735  * 3. All advertising materials mentioning features or use of this software
17736  *    must display the following acknowledgement:
17737  *    "This product includes cryptographic software written by
17738  *     Eric Young (eay@cryptsoft.com)"
17739  *    The word 'cryptographic' can be left out if the rouines from the library
17740  *    being used are not cryptographic related :-).
17741  * 4. If you include any Windows specific code (or a derivative thereof) from
17742  *    the apps directory (application code) you must include an acknowledgement:
17743  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17744  *
17745  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17746  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17747  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17748  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17749  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17750  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17751  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17752  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17753  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17754  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17755  * SUCH DAMAGE.
17756  *
17757  * The licence and distribution terms for any publically available version or
17758  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17759  * copied and put under another distribution licence
17760  * [including the GNU Public Licence.]
17761  */
17762 
17763 /*
17764  * The DSS routines are based on patches supplied by
17765  * Steven Schoch <schoch@sheba.arc.nasa.gov>.  He basically did the
17766  * work and I have just tweaked them a little to fit into my
17767  * stylistic vision for SSLeay :-) */
17768 
17769 
17770 
17771 
17772 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
17773 /* e_os2.h */
17774 /* ====================================================================
17775  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
17776  *
17777  * Redistribution and use in source and binary forms, with or without
17778  * modification, are permitted provided that the following conditions
17779  * are met:
17780  *
17781  * 1. Redistributions of source code must retain the above copyright
17782  *    notice, this list of conditions and the following disclaimer.
17783  *
17784  * 2. Redistributions in binary form must reproduce the above copyright
17785  *    notice, this list of conditions and the following disclaimer in
17786  *    the documentation and/or other materials provided with the
17787  *    distribution.
17788  *
17789  * 3. All advertising materials mentioning features or use of this
17790  *    software must display the following acknowledgment:
17791  *    "This product includes software developed by the OpenSSL Project
17792  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17793  *
17794  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17795  *    endorse or promote products derived from this software without
17796  *    prior written permission. For written permission, please contact
17797  *    openssl-core@openssl.org.
17798  *
17799  * 5. Products derived from this software may not be called "OpenSSL"
17800  *    nor may "OpenSSL" appear in their names without prior written
17801  *    permission of the OpenSSL Project.
17802  *
17803  * 6. Redistributions of any form whatsoever must retain the following
17804  *    acknowledgment:
17805  *    "This product includes software developed by the OpenSSL Project
17806  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17807  *
17808  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17809  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17810  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17811  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17812  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17813  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17814  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17815  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17816  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17817  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17818  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17819  * OF THE POSSIBILITY OF SUCH DAMAGE.
17820  * ====================================================================
17821  *
17822  * This product includes cryptographic software written by Eric Young
17823  * (eay@cryptsoft.com).  This product includes software written by Tim
17824  * Hudson (tjh@cryptsoft.com).
17825  *
17826  */
17827 
17828 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
17829 /* opensslconf.h */
17830 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
17831 
17832 
17833 
17834 
17835 /* OpenSSL was configured with the following options: */
17836 # 108 "/usr/include/openssl/opensslconf.h" 3 4
17837 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
17838    asks for it.  This is a transient feature that is provided for those
17839    who haven't had the time to do the appropriate changes in their
17840    applications.  */
17841 # 204 "/usr/include/openssl/opensslconf.h" 3 4
17842 /* crypto/opensslconf.h.in */
17843 
17844 /* Generate 80386 code? */
17845 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
17846 # 69 "/usr/include/openssl/dsa.h" 2 3 4
17847 
17848 
17849 
17850 
17851 
17852 
17853 # 1 "/usr/include/openssl/bio.h" 1 3 4
17854 /* crypto/bio/bio.h */
17855 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17856  * All rights reserved.
17857  *
17858  * This package is an SSL implementation written
17859  * by Eric Young (eay@cryptsoft.com).
17860  * The implementation was written so as to conform with Netscapes SSL.
17861  *
17862  * This library is free for commercial and non-commercial use as long as
17863  * the following conditions are aheared to.  The following conditions
17864  * apply to all code found in this distribution, be it the RC4, RSA,
17865  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17866  * included with this distribution is covered by the same copyright terms
17867  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17868  *
17869  * Copyright remains Eric Young's, and as such any Copyright notices in
17870  * the code are not to be removed.
17871  * If this package is used in a product, Eric Young should be given attribution
17872  * as the author of the parts of the library used.
17873  * This can be in the form of a textual message at program startup or
17874  * in documentation (online or textual) provided with the package.
17875  *
17876  * Redistribution and use in source and binary forms, with or without
17877  * modification, are permitted provided that the following conditions
17878  * are met:
17879  * 1. Redistributions of source code must retain the copyright
17880  *    notice, this list of conditions and the following disclaimer.
17881  * 2. Redistributions in binary form must reproduce the above copyright
17882  *    notice, this list of conditions and the following disclaimer in the
17883  *    documentation and/or other materials provided with the distribution.
17884  * 3. All advertising materials mentioning features or use of this software
17885  *    must display the following acknowledgement:
17886  *    "This product includes cryptographic software written by
17887  *     Eric Young (eay@cryptsoft.com)"
17888  *    The word 'cryptographic' can be left out if the rouines from the library
17889  *    being used are not cryptographic related :-).
17890  * 4. If you include any Windows specific code (or a derivative thereof) from
17891  *    the apps directory (application code) you must include an acknowledgement:
17892  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17893  *
17894  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17895  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17896  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17897  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17898  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17899  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17900  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17901  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17902  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17903  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17904  * SUCH DAMAGE.
17905  *
17906  * The licence and distribution terms for any publically available version or
17907  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17908  * copied and put under another distribution licence
17909  * [including the GNU Public Licence.]
17910  */
17911 # 76 "/usr/include/openssl/dsa.h" 2 3 4
17912 
17913 # 1 "/usr/include/openssl/crypto.h" 1 3 4
17914 /* crypto/crypto.h */
17915 /* ====================================================================
17916  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
17917  *
17918  * Redistribution and use in source and binary forms, with or without
17919  * modification, are permitted provided that the following conditions
17920  * are met:
17921  *
17922  * 1. Redistributions of source code must retain the above copyright
17923  *    notice, this list of conditions and the following disclaimer.
17924  *
17925  * 2. Redistributions in binary form must reproduce the above copyright
17926  *    notice, this list of conditions and the following disclaimer in
17927  *    the documentation and/or other materials provided with the
17928  *    distribution.
17929  *
17930  * 3. All advertising materials mentioning features or use of this
17931  *    software must display the following acknowledgment:
17932  *    "This product includes software developed by the OpenSSL Project
17933  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17934  *
17935  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17936  *    endorse or promote products derived from this software without
17937  *    prior written permission. For written permission, please contact
17938  *    openssl-core@openssl.org.
17939  *
17940  * 5. Products derived from this software may not be called "OpenSSL"
17941  *    nor may "OpenSSL" appear in their names without prior written
17942  *    permission of the OpenSSL Project.
17943  *
17944  * 6. Redistributions of any form whatsoever must retain the following
17945  *    acknowledgment:
17946  *    "This product includes software developed by the OpenSSL Project
17947  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17948  *
17949  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17950  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17951  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17952  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17953  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17954  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17955  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17956  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17957  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17958  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17959  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17960  * OF THE POSSIBILITY OF SUCH DAMAGE.
17961  * ====================================================================
17962  *
17963  * This product includes cryptographic software written by Eric Young
17964  * (eay@cryptsoft.com).  This product includes software written by Tim
17965  * Hudson (tjh@cryptsoft.com).
17966  *
17967  */
17968 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17969  * All rights reserved.
17970  *
17971  * This package is an SSL implementation written
17972  * by Eric Young (eay@cryptsoft.com).
17973  * The implementation was written so as to conform with Netscapes SSL.
17974  *
17975  * This library is free for commercial and non-commercial use as long as
17976  * the following conditions are aheared to.  The following conditions
17977  * apply to all code found in this distribution, be it the RC4, RSA,
17978  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17979  * included with this distribution is covered by the same copyright terms
17980  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17981  *
17982  * Copyright remains Eric Young's, and as such any Copyright notices in
17983  * the code are not to be removed.
17984  * If this package is used in a product, Eric Young should be given attribution
17985  * as the author of the parts of the library used.
17986  * This can be in the form of a textual message at program startup or
17987  * in documentation (online or textual) provided with the package.
17988  *
17989  * Redistribution and use in source and binary forms, with or without
17990  * modification, are permitted provided that the following conditions
17991  * are met:
17992  * 1. Redistributions of source code must retain the copyright
17993  *    notice, this list of conditions and the following disclaimer.
17994  * 2. Redistributions in binary form must reproduce the above copyright
17995  *    notice, this list of conditions and the following disclaimer in the
17996  *    documentation and/or other materials provided with the distribution.
17997  * 3. All advertising materials mentioning features or use of this software
17998  *    must display the following acknowledgement:
17999  *    "This product includes cryptographic software written by
18000  *     Eric Young (eay@cryptsoft.com)"
18001  *    The word 'cryptographic' can be left out if the rouines from the library
18002  *    being used are not cryptographic related :-).
18003  * 4. If you include any Windows specific code (or a derivative thereof) from
18004  *    the apps directory (application code) you must include an acknowledgement:
18005  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18006  *
18007  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18008  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18009  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18010  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18011  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18012  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18013  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18014  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18015  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18016  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18017  * SUCH DAMAGE.
18018  *
18019  * The licence and distribution terms for any publically available version or
18020  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18021  * copied and put under another distribution licence
18022  * [including the GNU Public Licence.]
18023  */
18024 /* ====================================================================
18025  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
18026  * ECDH support in OpenSSL originally developed by
18027  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
18028  */
18029 # 78 "/usr/include/openssl/dsa.h" 2 3 4
18030 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
18031 /* ====================================================================
18032  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
18033  *
18034  * Redistribution and use in source and binary forms, with or without
18035  * modification, are permitted provided that the following conditions
18036  * are met:
18037  *
18038  * 1. Redistributions of source code must retain the above copyright
18039  *    notice, this list of conditions and the following disclaimer.
18040  *
18041  * 2. Redistributions in binary form must reproduce the above copyright
18042  *    notice, this list of conditions and the following disclaimer in
18043  *    the documentation and/or other materials provided with the
18044  *    distribution.
18045  *
18046  * 3. All advertising materials mentioning features or use of this
18047  *    software must display the following acknowledgment:
18048  *    "This product includes software developed by the OpenSSL Project
18049  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18050  *
18051  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18052  *    endorse or promote products derived from this software without
18053  *    prior written permission. For written permission, please contact
18054  *    openssl-core@openssl.org.
18055  *
18056  * 5. Products derived from this software may not be called "OpenSSL"
18057  *    nor may "OpenSSL" appear in their names without prior written
18058  *    permission of the OpenSSL Project.
18059  *
18060  * 6. Redistributions of any form whatsoever must retain the following
18061  *    acknowledgment:
18062  *    "This product includes software developed by the OpenSSL Project
18063  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18064  *
18065  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18066  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18067  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18068  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18069  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18070  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18071  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18072  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18073  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18074  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18075  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18076  * OF THE POSSIBILITY OF SUCH DAMAGE.
18077  * ====================================================================
18078  *
18079  * This product includes cryptographic software written by Eric Young
18080  * (eay@cryptsoft.com).  This product includes software written by Tim
18081  * Hudson (tjh@cryptsoft.com).
18082  *
18083  */
18084 # 79 "/usr/include/openssl/dsa.h" 2 3 4
18085 
18086 
18087 # 1 "/usr/include/openssl/bn.h" 1 3 4
18088 /* crypto/bn/bn.h */
18089 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
18090  * All rights reserved.
18091  *
18092  * This package is an SSL implementation written
18093  * by Eric Young (eay@cryptsoft.com).
18094  * The implementation was written so as to conform with Netscapes SSL.
18095  *
18096  * This library is free for commercial and non-commercial use as long as
18097  * the following conditions are aheared to.  The following conditions
18098  * apply to all code found in this distribution, be it the RC4, RSA,
18099  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18100  * included with this distribution is covered by the same copyright terms
18101  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18102  *
18103  * Copyright remains Eric Young's, and as such any Copyright notices in
18104  * the code are not to be removed.
18105  * If this package is used in a product, Eric Young should be given attribution
18106  * as the author of the parts of the library used.
18107  * This can be in the form of a textual message at program startup or
18108  * in documentation (online or textual) provided with the package.
18109  *
18110  * Redistribution and use in source and binary forms, with or without
18111  * modification, are permitted provided that the following conditions
18112  * are met:
18113  * 1. Redistributions of source code must retain the copyright
18114  *    notice, this list of conditions and the following disclaimer.
18115  * 2. Redistributions in binary form must reproduce the above copyright
18116  *    notice, this list of conditions and the following disclaimer in the
18117  *    documentation and/or other materials provided with the distribution.
18118  * 3. All advertising materials mentioning features or use of this software
18119  *    must display the following acknowledgement:
18120  *    "This product includes cryptographic software written by
18121  *     Eric Young (eay@cryptsoft.com)"
18122  *    The word 'cryptographic' can be left out if the rouines from the library
18123  *    being used are not cryptographic related :-).
18124  * 4. If you include any Windows specific code (or a derivative thereof) from
18125  *    the apps directory (application code) you must include an acknowledgement:
18126  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18127  *
18128  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18129  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18130  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18131  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18132  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18133  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18134  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18135  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18136  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18137  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18138  * SUCH DAMAGE.
18139  *
18140  * The licence and distribution terms for any publically available version or
18141  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18142  * copied and put under another distribution licence
18143  * [including the GNU Public Licence.]
18144  */
18145 /* ====================================================================
18146  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
18147  *
18148  * Redistribution and use in source and binary forms, with or without
18149  * modification, are permitted provided that the following conditions
18150  * are met:
18151  *
18152  * 1. Redistributions of source code must retain the above copyright
18153  *    notice, this list of conditions and the following disclaimer.
18154  *
18155  * 2. Redistributions in binary form must reproduce the above copyright
18156  *    notice, this list of conditions and the following disclaimer in
18157  *    the documentation and/or other materials provided with the
18158  *    distribution.
18159  *
18160  * 3. All advertising materials mentioning features or use of this
18161  *    software must display the following acknowledgment:
18162  *    "This product includes software developed by the OpenSSL Project
18163  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18164  *
18165  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18166  *    endorse or promote products derived from this software without
18167  *    prior written permission. For written permission, please contact
18168  *    openssl-core@openssl.org.
18169  *
18170  * 5. Products derived from this software may not be called "OpenSSL"
18171  *    nor may "OpenSSL" appear in their names without prior written
18172  *    permission of the OpenSSL Project.
18173  *
18174  * 6. Redistributions of any form whatsoever must retain the following
18175  *    acknowledgment:
18176  *    "This product includes software developed by the OpenSSL Project
18177  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18178  *
18179  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18180  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18181  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18182  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18183  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18184  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18185  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18186  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18187  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18188  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18189  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18190  * OF THE POSSIBILITY OF SUCH DAMAGE.
18191  * ====================================================================
18192  *
18193  * This product includes cryptographic software written by Eric Young
18194  * (eay@cryptsoft.com).  This product includes software written by Tim
18195  * Hudson (tjh@cryptsoft.com).
18196  *
18197  */
18198 /* ====================================================================
18199  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
18200  *
18201  * Portions of the attached software ("Contribution") are developed by
18202  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
18203  *
18204  * The Contribution is licensed pursuant to the Eric Young open source
18205  * license provided above.
18206  *
18207  * The binary polynomial arithmetic software is originally written by
18208  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
18209  *
18210  */
18211 # 82 "/usr/include/openssl/dsa.h" 2 3 4
18212 
18213 # 1 "/usr/include/openssl/dh.h" 1 3 4
18214 /* crypto/dh/dh.h */
18215 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18216  * All rights reserved.
18217  *
18218  * This package is an SSL implementation written
18219  * by Eric Young (eay@cryptsoft.com).
18220  * The implementation was written so as to conform with Netscapes SSL.
18221  *
18222  * This library is free for commercial and non-commercial use as long as
18223  * the following conditions are aheared to.  The following conditions
18224  * apply to all code found in this distribution, be it the RC4, RSA,
18225  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18226  * included with this distribution is covered by the same copyright terms
18227  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18228  *
18229  * Copyright remains Eric Young's, and as such any Copyright notices in
18230  * the code are not to be removed.
18231  * If this package is used in a product, Eric Young should be given attribution
18232  * as the author of the parts of the library used.
18233  * This can be in the form of a textual message at program startup or
18234  * in documentation (online or textual) provided with the package.
18235  *
18236  * Redistribution and use in source and binary forms, with or without
18237  * modification, are permitted provided that the following conditions
18238  * are met:
18239  * 1. Redistributions of source code must retain the copyright
18240  *    notice, this list of conditions and the following disclaimer.
18241  * 2. Redistributions in binary form must reproduce the above copyright
18242  *    notice, this list of conditions and the following disclaimer in the
18243  *    documentation and/or other materials provided with the distribution.
18244  * 3. All advertising materials mentioning features or use of this software
18245  *    must display the following acknowledgement:
18246  *    "This product includes cryptographic software written by
18247  *     Eric Young (eay@cryptsoft.com)"
18248  *    The word 'cryptographic' can be left out if the rouines from the library
18249  *    being used are not cryptographic related :-).
18250  * 4. If you include any Windows specific code (or a derivative thereof) from
18251  *    the apps directory (application code) you must include an acknowledgement:
18252  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18253  *
18254  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18255  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18256  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18257  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18258  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18259  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18260  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18261  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18262  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18263  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18264  * SUCH DAMAGE.
18265  *
18266  * The licence and distribution terms for any publically available version or
18267  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18268  * copied and put under another distribution licence
18269  * [including the GNU Public Licence.]
18270  */
18271 
18272 
18273 
18274 
18275 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
18276 /* e_os2.h */
18277 /* ====================================================================
18278  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
18279  *
18280  * Redistribution and use in source and binary forms, with or without
18281  * modification, are permitted provided that the following conditions
18282  * are met:
18283  *
18284  * 1. Redistributions of source code must retain the above copyright
18285  *    notice, this list of conditions and the following disclaimer.
18286  *
18287  * 2. Redistributions in binary form must reproduce the above copyright
18288  *    notice, this list of conditions and the following disclaimer in
18289  *    the documentation and/or other materials provided with the
18290  *    distribution.
18291  *
18292  * 3. All advertising materials mentioning features or use of this
18293  *    software must display the following acknowledgment:
18294  *    "This product includes software developed by the OpenSSL Project
18295  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18296  *
18297  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18298  *    endorse or promote products derived from this software without
18299  *    prior written permission. For written permission, please contact
18300  *    openssl-core@openssl.org.
18301  *
18302  * 5. Products derived from this software may not be called "OpenSSL"
18303  *    nor may "OpenSSL" appear in their names without prior written
18304  *    permission of the OpenSSL Project.
18305  *
18306  * 6. Redistributions of any form whatsoever must retain the following
18307  *    acknowledgment:
18308  *    "This product includes software developed by the OpenSSL Project
18309  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18310  *
18311  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18312  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18313  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18314  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18315  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18316  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18317  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18318  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18319  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18320  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18321  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18322  * OF THE POSSIBILITY OF SUCH DAMAGE.
18323  * ====================================================================
18324  *
18325  * This product includes cryptographic software written by Eric Young
18326  * (eay@cryptsoft.com).  This product includes software written by Tim
18327  * Hudson (tjh@cryptsoft.com).
18328  *
18329  */
18330 
18331 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
18332 /* opensslconf.h */
18333 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
18334 
18335 
18336 
18337 
18338 /* OpenSSL was configured with the following options: */
18339 # 108 "/usr/include/openssl/opensslconf.h" 3 4
18340 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
18341    asks for it.  This is a transient feature that is provided for those
18342    who haven't had the time to do the appropriate changes in their
18343    applications.  */
18344 # 204 "/usr/include/openssl/opensslconf.h" 3 4
18345 /* crypto/opensslconf.h.in */
18346 
18347 /* Generate 80386 code? */
18348 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
18349 # 63 "/usr/include/openssl/dh.h" 2 3 4
18350 
18351 
18352 
18353 
18354 
18355 
18356 # 1 "/usr/include/openssl/bio.h" 1 3 4
18357 /* crypto/bio/bio.h */
18358 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18359  * All rights reserved.
18360  *
18361  * This package is an SSL implementation written
18362  * by Eric Young (eay@cryptsoft.com).
18363  * The implementation was written so as to conform with Netscapes SSL.
18364  *
18365  * This library is free for commercial and non-commercial use as long as
18366  * the following conditions are aheared to.  The following conditions
18367  * apply to all code found in this distribution, be it the RC4, RSA,
18368  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18369  * included with this distribution is covered by the same copyright terms
18370  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18371  *
18372  * Copyright remains Eric Young's, and as such any Copyright notices in
18373  * the code are not to be removed.
18374  * If this package is used in a product, Eric Young should be given attribution
18375  * as the author of the parts of the library used.
18376  * This can be in the form of a textual message at program startup or
18377  * in documentation (online or textual) provided with the package.
18378  *
18379  * Redistribution and use in source and binary forms, with or without
18380  * modification, are permitted provided that the following conditions
18381  * are met:
18382  * 1. Redistributions of source code must retain the copyright
18383  *    notice, this list of conditions and the following disclaimer.
18384  * 2. Redistributions in binary form must reproduce the above copyright
18385  *    notice, this list of conditions and the following disclaimer in the
18386  *    documentation and/or other materials provided with the distribution.
18387  * 3. All advertising materials mentioning features or use of this software
18388  *    must display the following acknowledgement:
18389  *    "This product includes cryptographic software written by
18390  *     Eric Young (eay@cryptsoft.com)"
18391  *    The word 'cryptographic' can be left out if the rouines from the library
18392  *    being used are not cryptographic related :-).
18393  * 4. If you include any Windows specific code (or a derivative thereof) from
18394  *    the apps directory (application code) you must include an acknowledgement:
18395  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18396  *
18397  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18398  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18399  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18400  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18401  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18402  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18403  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18404  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18405  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18406  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18407  * SUCH DAMAGE.
18408  *
18409  * The licence and distribution terms for any publically available version or
18410  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18411  * copied and put under another distribution licence
18412  * [including the GNU Public Licence.]
18413  */
18414 # 70 "/usr/include/openssl/dh.h" 2 3 4
18415 
18416 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
18417 /* ====================================================================
18418  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
18419  *
18420  * Redistribution and use in source and binary forms, with or without
18421  * modification, are permitted provided that the following conditions
18422  * are met:
18423  *
18424  * 1. Redistributions of source code must retain the above copyright
18425  *    notice, this list of conditions and the following disclaimer.
18426  *
18427  * 2. Redistributions in binary form must reproduce the above copyright
18428  *    notice, this list of conditions and the following disclaimer in
18429  *    the documentation and/or other materials provided with the
18430  *    distribution.
18431  *
18432  * 3. All advertising materials mentioning features or use of this
18433  *    software must display the following acknowledgment:
18434  *    "This product includes software developed by the OpenSSL Project
18435  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18436  *
18437  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18438  *    endorse or promote products derived from this software without
18439  *    prior written permission. For written permission, please contact
18440  *    openssl-core@openssl.org.
18441  *
18442  * 5. Products derived from this software may not be called "OpenSSL"
18443  *    nor may "OpenSSL" appear in their names without prior written
18444  *    permission of the OpenSSL Project.
18445  *
18446  * 6. Redistributions of any form whatsoever must retain the following
18447  *    acknowledgment:
18448  *    "This product includes software developed by the OpenSSL Project
18449  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18450  *
18451  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18452  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18453  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18454  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18455  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18456  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18457  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18458  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18459  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18460  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18461  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18462  * OF THE POSSIBILITY OF SUCH DAMAGE.
18463  * ====================================================================
18464  *
18465  * This product includes cryptographic software written by Eric Young
18466  * (eay@cryptsoft.com).  This product includes software written by Tim
18467  * Hudson (tjh@cryptsoft.com).
18468  *
18469  */
18470 # 72 "/usr/include/openssl/dh.h" 2 3 4
18471 
18472 # 1 "/usr/include/openssl/bn.h" 1 3 4
18473 /* crypto/bn/bn.h */
18474 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
18475  * All rights reserved.
18476  *
18477  * This package is an SSL implementation written
18478  * by Eric Young (eay@cryptsoft.com).
18479  * The implementation was written so as to conform with Netscapes SSL.
18480  *
18481  * This library is free for commercial and non-commercial use as long as
18482  * the following conditions are aheared to.  The following conditions
18483  * apply to all code found in this distribution, be it the RC4, RSA,
18484  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18485  * included with this distribution is covered by the same copyright terms
18486  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18487  *
18488  * Copyright remains Eric Young's, and as such any Copyright notices in
18489  * the code are not to be removed.
18490  * If this package is used in a product, Eric Young should be given attribution
18491  * as the author of the parts of the library used.
18492  * This can be in the form of a textual message at program startup or
18493  * in documentation (online or textual) provided with the package.
18494  *
18495  * Redistribution and use in source and binary forms, with or without
18496  * modification, are permitted provided that the following conditions
18497  * are met:
18498  * 1. Redistributions of source code must retain the copyright
18499  *    notice, this list of conditions and the following disclaimer.
18500  * 2. Redistributions in binary form must reproduce the above copyright
18501  *    notice, this list of conditions and the following disclaimer in the
18502  *    documentation and/or other materials provided with the distribution.
18503  * 3. All advertising materials mentioning features or use of this software
18504  *    must display the following acknowledgement:
18505  *    "This product includes cryptographic software written by
18506  *     Eric Young (eay@cryptsoft.com)"
18507  *    The word 'cryptographic' can be left out if the rouines from the library
18508  *    being used are not cryptographic related :-).
18509  * 4. If you include any Windows specific code (or a derivative thereof) from
18510  *    the apps directory (application code) you must include an acknowledgement:
18511  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18512  *
18513  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18514  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18515  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18516  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18517  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18518  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18519  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18520  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18521  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18522  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18523  * SUCH DAMAGE.
18524  *
18525  * The licence and distribution terms for any publically available version or
18526  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18527  * copied and put under another distribution licence
18528  * [including the GNU Public Licence.]
18529  */
18530 /* ====================================================================
18531  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
18532  *
18533  * Redistribution and use in source and binary forms, with or without
18534  * modification, are permitted provided that the following conditions
18535  * are met:
18536  *
18537  * 1. Redistributions of source code must retain the above copyright
18538  *    notice, this list of conditions and the following disclaimer.
18539  *
18540  * 2. Redistributions in binary form must reproduce the above copyright
18541  *    notice, this list of conditions and the following disclaimer in
18542  *    the documentation and/or other materials provided with the
18543  *    distribution.
18544  *
18545  * 3. All advertising materials mentioning features or use of this
18546  *    software must display the following acknowledgment:
18547  *    "This product includes software developed by the OpenSSL Project
18548  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18549  *
18550  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18551  *    endorse or promote products derived from this software without
18552  *    prior written permission. For written permission, please contact
18553  *    openssl-core@openssl.org.
18554  *
18555  * 5. Products derived from this software may not be called "OpenSSL"
18556  *    nor may "OpenSSL" appear in their names without prior written
18557  *    permission of the OpenSSL Project.
18558  *
18559  * 6. Redistributions of any form whatsoever must retain the following
18560  *    acknowledgment:
18561  *    "This product includes software developed by the OpenSSL Project
18562  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18563  *
18564  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18565  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18566  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18567  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18568  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18569  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18570  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18571  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18572  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18573  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18574  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18575  * OF THE POSSIBILITY OF SUCH DAMAGE.
18576  * ====================================================================
18577  *
18578  * This product includes cryptographic software written by Eric Young
18579  * (eay@cryptsoft.com).  This product includes software written by Tim
18580  * Hudson (tjh@cryptsoft.com).
18581  *
18582  */
18583 /* ====================================================================
18584  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
18585  *
18586  * Portions of the attached software ("Contribution") are developed by
18587  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
18588  *
18589  * The Contribution is licensed pursuant to the Eric Young open source
18590  * license provided above.
18591  *
18592  * The binary polynomial arithmetic software is originally written by
18593  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
18594  *
18595  */
18596 # 74 "/usr/include/openssl/dh.h" 2 3 4
18597 # 82 "/usr/include/openssl/dh.h" 3 4
18598 /*
18599  * new with 0.9.7h; the built-in DH
18600  * implementation now uses constant time
18601  * modular exponentiation for secret exponents
18602  * by default. This flag causes the
18603  * faster variable sliding window method to
18604  * be used for all exponents.
18605  */
18606 
18607 
18608 /*
18609  * If this flag is set the DH method is FIPS compliant and can be used in
18610  * FIPS mode. This is set in the validated module method. If an application
18611  * sets this flag in its own methods it is its reposibility to ensure the
18612  * result is compliant.
18613  */
18614 
18615 
18616 
18617 /*
18618  * If this flag is set the operations normally disabled in FIPS mode are
18619  * permitted it is then the applications responsibility to ensure that the
18620  * usage is compliant.
18621  */
18622 
18623 
18624 
18625 
18626 
18627 
18628 
18629 /* Already defined in ossl_typ.h */
18630 /* typedef struct dh_st DH; */
18631 /* typedef struct dh_method DH_METHOD; */
18632 
18633 struct dh_method {
18634     const char *name;
18635     /* Methods here */
18636     int (*generate_key) (DH *dh);
18637     int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
18638     /* Can be null */
18639     int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
18640                        const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
18641                        BN_MONT_CTX *m_ctx);
18642     int (*init) (DH *dh);
18643     int (*finish) (DH *dh);
18644     int flags;
18645     char *app_data;
18646     /* If this is non-NULL, it will be used to generate parameters */
18647     int (*generate_params) (DH *dh, int prime_len, int generator,
18648                             BN_GENCB *cb);
18649 };
18650 
18651 struct dh_st {
18652     /*
18653      * This first argument is used to pick up errors when a DH is passed
18654      * instead of a EVP_PKEY
18655      */
18656     int pad;
18657     int version;
18658     BIGNUM *p;
18659     BIGNUM *g;
18660     long length; /* optional */
18661     BIGNUM *pub_key; /* g^x % p */
18662     BIGNUM *priv_key; /* x */
18663     int flags;
18664     BN_MONT_CTX *method_mont_p;
18665     /* Place holders if we want to do X9.42 DH */
18666     BIGNUM *q;
18667     BIGNUM *j;
18668     unsigned char *seed;
18669     int seedlen;
18670     BIGNUM *counter;
18671     int references;
18672     CRYPTO_EX_DATA ex_data;
18673     const DH_METHOD *meth;
18674     ENGINE *engine;
18675 };
18676 
18677 
18678 /* #define DH_GENERATOR_3       3 */
18679 
18680 
18681 /* DH_check error codes */
18682 # 174 "/usr/include/openssl/dh.h" 3 4
18683 /* DH_check_pub_key error codes */
18684 
18685 
18686 
18687 
18688 /*
18689  * primes p where (p-1)/2 is prime too are called "safe"; we define this for
18690  * backward compatibility:
18691  */
18692 # 209 "/usr/include/openssl/dh.h" 3 4
18693 DH *DHparams_dup(DH *);
18694 
18695 const DH_METHOD *DH_OpenSSL(void);
18696 
18697 void DH_set_default_method(const DH_METHOD *meth);
18698 const DH_METHOD *DH_get_default_method(void);
18699 int DH_set_method(DH *dh, const DH_METHOD *meth);
18700 DH *DH_new_method(ENGINE *engine);
18701 
18702 DH *DH_new(void);
18703 void DH_free(DH *dh);
18704 int DH_up_ref(DH *dh);
18705 int DH_size(const DH *dh);
18706 int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
18707                         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
18708 int DH_set_ex_data(DH *d, int idx, void *arg);
18709 void *DH_get_ex_data(DH *d, int idx);
18710 
18711 /* Deprecated version */
18712 
18713 DH *DH_generate_parameters(int prime_len, int generator,
18714                            void (*callback) (int, int, void *), void *cb_arg);
18715 
18716 
18717 /* New version */
18718 int DH_generate_parameters_ex(DH *dh, int prime_len, int generator,
18719                               BN_GENCB *cb);
18720 
18721 int DH_check(const DH *dh, int *codes);
18722 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes);
18723 int DH_generate_key(DH *dh);
18724 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
18725 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh);
18726 DH *d2i_DHparams(DH **a, const unsigned char **pp, long length);
18727 int i2d_DHparams(const DH *a, unsigned char **pp);
18728 DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length);
18729 int i2d_DHxparams(const DH *a, unsigned char **pp);
18730 
18731 int DHparams_print_fp(FILE *fp, const DH *x);
18732 
18733 
18734 int DHparams_print(BIO *bp, const DH *x);
18735 
18736 
18737 
18738 
18739 /* RFC 5114 parameters */
18740 DH *DH_get_1024_160(void);
18741 DH *DH_get_2048_224(void);
18742 DH *DH_get_2048_256(void);
18743 
18744 
18745 /* RFC2631 KDF */
18746 int DH_KDF_X9_42(unsigned char *out, size_t outlen,
18747                  const unsigned char *Z, size_t Zlen,
18748                  ASN1_OBJECT *key_oid,
18749                  const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
18750 # 357 "/usr/include/openssl/dh.h" 3 4
18751 /* KDF types */
18752 
18753 
18754 
18755 /* BEGIN ERROR CODES */
18756 /*
18757  * The following lines are auto generated by the script mkerr.pl. Any changes
18758  * made after this point may be overwritten when the script is next run.
18759  */
18760 void ERR_load_DH_strings(void);
18761 
18762 /* Error codes for the DH functions. */
18763 
18764 /* Function codes. */
18765 # 392 "/usr/include/openssl/dh.h" 3 4
18766 /* Reason codes. */
18767 # 84 "/usr/include/openssl/dsa.h" 2 3 4
18768 # 92 "/usr/include/openssl/dsa.h" 3 4
18769 /*
18770  * new with 0.9.7h; the built-in DSA implementation now uses constant time
18771  * modular exponentiation for secret exponents by default. This flag causes
18772  * the faster variable sliding window method to be used for all exponents.
18773  */
18774 
18775 
18776 /*
18777  * If this flag is set the DSA method is FIPS compliant and can be used in
18778  * FIPS mode. This is set in the validated module method. If an application
18779  * sets this flag in its own methods it is its reposibility to ensure the
18780  * result is compliant.
18781  */
18782 
18783 
18784 
18785 /*
18786  * If this flag is set the operations normally disabled in FIPS mode are
18787  * permitted it is then the applications responsibility to ensure that the
18788  * usage is compliant.
18789  */
18790 
18791 
18792 
18793 
18794 
18795 
18796 
18797 /* Already defined in ossl_typ.h */
18798 /* typedef struct dsa_st DSA; */
18799 /* typedef struct dsa_method DSA_METHOD; */
18800 
18801 typedef struct DSA_SIG_st {
18802     BIGNUM *r;
18803     BIGNUM *s;
18804 } DSA_SIG;
18805 
18806 struct dsa_method {
18807     const char *name;
18808     DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa);
18809     int (*dsa_sign_setup) (DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
18810                            BIGNUM **rp);
18811     int (*dsa_do_verify) (const unsigned char *dgst, int dgst_len,
18812                           DSA_SIG *sig, DSA *dsa);
18813     int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
18814                         BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
18815                         BN_MONT_CTX *in_mont);
18816     /* Can be null */
18817     int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
18818                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
18819     int (*init) (DSA *dsa);
18820     int (*finish) (DSA *dsa);
18821     int flags;
18822     char *app_data;
18823     /* If this is non-NULL, it is used to generate DSA parameters */
18824     int (*dsa_paramgen) (DSA *dsa, int bits,
18825                          const unsigned char *seed, int seed_len,
18826                          int *counter_ret, unsigned long *h_ret,
18827                          BN_GENCB *cb);
18828     /* If this is non-NULL, it is used to generate DSA keys */
18829     int (*dsa_keygen) (DSA *dsa);
18830 };
18831 
18832 struct dsa_st {
18833     /*
18834      * This first variable is used to pick up errors where a DSA is passed
18835      * instead of of a EVP_PKEY
18836      */
18837     int pad;
18838     long version;
18839     int write_params;
18840     BIGNUM *p;
18841     BIGNUM *q; /* == 20 */
18842     BIGNUM *g;
18843     BIGNUM *pub_key; /* y public key */
18844     BIGNUM *priv_key; /* x private key */
18845     BIGNUM *kinv; /* Signing pre-calc */
18846     BIGNUM *r; /* Signing pre-calc */
18847     int flags;
18848     /* Normally used to cache montgomery values */
18849     BN_MONT_CTX *method_mont_p;
18850     int references;
18851     CRYPTO_EX_DATA ex_data;
18852     const DSA_METHOD *meth;
18853     /* functional reference if 'meth' is ENGINE-provided */
18854     ENGINE *engine;
18855 };
18856 # 187 "/usr/include/openssl/dsa.h" 3 4
18857 DSA *DSAparams_dup(DSA *x);
18858 DSA_SIG *DSA_SIG_new(void);
18859 void DSA_SIG_free(DSA_SIG *a);
18860 int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
18861 DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length);
18862 
18863 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
18864 int DSA_do_verify(const unsigned char *dgst, int dgst_len,
18865                   DSA_SIG *sig, DSA *dsa);
18866 
18867 const DSA_METHOD *DSA_OpenSSL(void);
18868 
18869 void DSA_set_default_method(const DSA_METHOD *);
18870 const DSA_METHOD *DSA_get_default_method(void);
18871 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
18872 
18873 DSA *DSA_new(void);
18874 DSA *DSA_new_method(ENGINE *engine);
18875 void DSA_free(DSA *r);
18876 /* "up" the DSA object's reference count */
18877 int DSA_up_ref(DSA *r);
18878 int DSA_size(const DSA *);
18879         /* next 4 return -1 on error */
18880 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
18881 int DSA_sign(int type, const unsigned char *dgst, int dlen,
18882              unsigned char *sig, unsigned int *siglen, DSA *dsa);
18883 int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
18884                const unsigned char *sigbuf, int siglen, DSA *dsa);
18885 int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
18886                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
18887 int DSA_set_ex_data(DSA *d, int idx, void *arg);
18888 void *DSA_get_ex_data(DSA *d, int idx);
18889 
18890 DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
18891 DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
18892 DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
18893 
18894 /* Deprecated version */
18895 
18896 DSA *DSA_generate_parameters(int bits,
18897                              unsigned char *seed, int seed_len,
18898                              int *counter_ret, unsigned long *h_ret, void
18899                               (*callback) (int, int, void *), void *cb_arg);
18900 
18901 
18902 /* New version */
18903 int DSA_generate_parameters_ex(DSA *dsa, int bits,
18904                                const unsigned char *seed, int seed_len,
18905                                int *counter_ret, unsigned long *h_ret,
18906                                BN_GENCB *cb);
18907 
18908 int DSA_generate_key(DSA *a);
18909 int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
18910 int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
18911 int i2d_DSAparams(const DSA *a, unsigned char **pp);
18912 
18913 
18914 int DSAparams_print(BIO *bp, const DSA *x);
18915 int DSA_print(BIO *bp, const DSA *x, int off);
18916 
18917 
18918 int DSAparams_print_fp(FILE *fp, const DSA *x);
18919 int DSA_print_fp(FILE *bp, const DSA *x, int off);
18920 
18921 
18922 
18923 /*
18924  * Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only
18925  * have one value here we set the number of checks to 64 which is the 128 bit
18926  * security level that is the highest level and valid for creating a 3072 bit
18927  * DSA key.
18928  */
18929 
18930 
18931 
18932 
18933 /*
18934  * Convert DSA structure (key or just parameters) into DH structure (be
18935  * careful to avoid small subgroup attacks when using this!)
18936  */
18937 DH *DSA_dup_DH(const DSA *r);
18938 # 278 "/usr/include/openssl/dsa.h" 3 4
18939 /* BEGIN ERROR CODES */
18940 /*
18941  * The following lines are auto generated by the script mkerr.pl. Any changes
18942  * made after this point may be overwritten when the script is next run.
18943  */
18944 void ERR_load_DSA_strings(void);
18945 
18946 /* Error codes for the DSA functions. */
18947 
18948 /* Function codes. */
18949 # 316 "/usr/include/openssl/dsa.h" 3 4
18950 /* Reason codes. */
18951 # 100 "/usr/include/openssl/x509.h" 2 3 4
18952 
18953 
18954 # 1 "/usr/include/openssl/dh.h" 1 3 4
18955 /* crypto/dh/dh.h */
18956 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18957  * All rights reserved.
18958  *
18959  * This package is an SSL implementation written
18960  * by Eric Young (eay@cryptsoft.com).
18961  * The implementation was written so as to conform with Netscapes SSL.
18962  *
18963  * This library is free for commercial and non-commercial use as long as
18964  * the following conditions are aheared to.  The following conditions
18965  * apply to all code found in this distribution, be it the RC4, RSA,
18966  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18967  * included with this distribution is covered by the same copyright terms
18968  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18969  *
18970  * Copyright remains Eric Young's, and as such any Copyright notices in
18971  * the code are not to be removed.
18972  * If this package is used in a product, Eric Young should be given attribution
18973  * as the author of the parts of the library used.
18974  * This can be in the form of a textual message at program startup or
18975  * in documentation (online or textual) provided with the package.
18976  *
18977  * Redistribution and use in source and binary forms, with or without
18978  * modification, are permitted provided that the following conditions
18979  * are met:
18980  * 1. Redistributions of source code must retain the copyright
18981  *    notice, this list of conditions and the following disclaimer.
18982  * 2. Redistributions in binary form must reproduce the above copyright
18983  *    notice, this list of conditions and the following disclaimer in the
18984  *    documentation and/or other materials provided with the distribution.
18985  * 3. All advertising materials mentioning features or use of this software
18986  *    must display the following acknowledgement:
18987  *    "This product includes cryptographic software written by
18988  *     Eric Young (eay@cryptsoft.com)"
18989  *    The word 'cryptographic' can be left out if the rouines from the library
18990  *    being used are not cryptographic related :-).
18991  * 4. If you include any Windows specific code (or a derivative thereof) from
18992  *    the apps directory (application code) you must include an acknowledgement:
18993  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18994  *
18995  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18996  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18997  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18998  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18999  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19000  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19001  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19002  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19003  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19004  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19005  * SUCH DAMAGE.
19006  *
19007  * The licence and distribution terms for any publically available version or
19008  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19009  * copied and put under another distribution licence
19010  * [including the GNU Public Licence.]
19011  */
19012 # 103 "/usr/include/openssl/x509.h" 2 3 4
19013 
19014 
19015 
19016 
19017 # 1 "/usr/include/openssl/sha.h" 1 3 4
19018 /* crypto/sha/sha.h */
19019 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19020  * All rights reserved.
19021  *
19022  * This package is an SSL implementation written
19023  * by Eric Young (eay@cryptsoft.com).
19024  * The implementation was written so as to conform with Netscapes SSL.
19025  *
19026  * This library is free for commercial and non-commercial use as long as
19027  * the following conditions are aheared to.  The following conditions
19028  * apply to all code found in this distribution, be it the RC4, RSA,
19029  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19030  * included with this distribution is covered by the same copyright terms
19031  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19032  *
19033  * Copyright remains Eric Young's, and as such any Copyright notices in
19034  * the code are not to be removed.
19035  * If this package is used in a product, Eric Young should be given attribution
19036  * as the author of the parts of the library used.
19037  * This can be in the form of a textual message at program startup or
19038  * in documentation (online or textual) provided with the package.
19039  *
19040  * Redistribution and use in source and binary forms, with or without
19041  * modification, are permitted provided that the following conditions
19042  * are met:
19043  * 1. Redistributions of source code must retain the copyright
19044  *    notice, this list of conditions and the following disclaimer.
19045  * 2. Redistributions in binary form must reproduce the above copyright
19046  *    notice, this list of conditions and the following disclaimer in the
19047  *    documentation and/or other materials provided with the distribution.
19048  * 3. All advertising materials mentioning features or use of this software
19049  *    must display the following acknowledgement:
19050  *    "This product includes cryptographic software written by
19051  *     Eric Young (eay@cryptsoft.com)"
19052  *    The word 'cryptographic' can be left out if the rouines from the library
19053  *    being used are not cryptographic related :-).
19054  * 4. If you include any Windows specific code (or a derivative thereof) from
19055  *    the apps directory (application code) you must include an acknowledgement:
19056  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19057  *
19058  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19059  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19060  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19061  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19062  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19063  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19064  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19065  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19066  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19067  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19068  * SUCH DAMAGE.
19069  *
19070  * The licence and distribution terms for any publically available version or
19071  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19072  * copied and put under another distribution licence
19073  * [including the GNU Public Licence.]
19074  */
19075 
19076 
19077 
19078 
19079 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
19080 /* e_os2.h */
19081 /* ====================================================================
19082  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
19083  *
19084  * Redistribution and use in source and binary forms, with or without
19085  * modification, are permitted provided that the following conditions
19086  * are met:
19087  *
19088  * 1. Redistributions of source code must retain the above copyright
19089  *    notice, this list of conditions and the following disclaimer.
19090  *
19091  * 2. Redistributions in binary form must reproduce the above copyright
19092  *    notice, this list of conditions and the following disclaimer in
19093  *    the documentation and/or other materials provided with the
19094  *    distribution.
19095  *
19096  * 3. All advertising materials mentioning features or use of this
19097  *    software must display the following acknowledgment:
19098  *    "This product includes software developed by the OpenSSL Project
19099  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19100  *
19101  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19102  *    endorse or promote products derived from this software without
19103  *    prior written permission. For written permission, please contact
19104  *    openssl-core@openssl.org.
19105  *
19106  * 5. Products derived from this software may not be called "OpenSSL"
19107  *    nor may "OpenSSL" appear in their names without prior written
19108  *    permission of the OpenSSL Project.
19109  *
19110  * 6. Redistributions of any form whatsoever must retain the following
19111  *    acknowledgment:
19112  *    "This product includes software developed by the OpenSSL Project
19113  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19114  *
19115  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19116  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19117  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19118  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19119  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19120  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19121  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19122  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19123  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19124  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19125  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19126  * OF THE POSSIBILITY OF SUCH DAMAGE.
19127  * ====================================================================
19128  *
19129  * This product includes cryptographic software written by Eric Young
19130  * (eay@cryptsoft.com).  This product includes software written by Tim
19131  * Hudson (tjh@cryptsoft.com).
19132  *
19133  */
19134 
19135 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
19136 /* opensslconf.h */
19137 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
19138 
19139 
19140 
19141 
19142 /* OpenSSL was configured with the following options: */
19143 # 108 "/usr/include/openssl/opensslconf.h" 3 4
19144 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
19145    asks for it.  This is a transient feature that is provided for those
19146    who haven't had the time to do the appropriate changes in their
19147    applications.  */
19148 # 204 "/usr/include/openssl/opensslconf.h" 3 4
19149 /* crypto/opensslconf.h.in */
19150 
19151 /* Generate 80386 code? */
19152 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
19153 # 63 "/usr/include/openssl/sha.h" 2 3 4
19154 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
19155 /*
19156  * CDDL HEADER START
19157  *
19158  * The contents of this file are subject to the terms of the
19159  * Common Development and Distribution License, Version 1.0 only
19160  * (the "License").  You may not use this file except in compliance
19161  * with the License.
19162  *
19163  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19164  * or http://www.opensolaris.org/os/licensing.
19165  * See the License for the specific language governing permissions
19166  * and limitations under the License.
19167  *
19168  * When distributing Covered Code, include this CDDL HEADER in each
19169  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19170  * If applicable, add the following below this CDDL HEADER, with the
19171  * fields enclosed by brackets "[]" replaced with your own identifying
19172  * information: Portions Copyright [yyyy] [name of copyright owner]
19173  *
19174  * CDDL HEADER END
19175  */
19176 /*	Copyright (c) 1988 AT&T	*/
19177 /*	  All Rights Reserved  	*/
19178 
19179 
19180 /*
19181  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
19182  * Use is subject to license terms.
19183  */
19184 # 64 "/usr/include/openssl/sha.h" 2 3 4
19185 # 77 "/usr/include/openssl/sha.h" 3 4
19186 /*-
19187  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
19188  * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then !
19189  * ! SHA_LONG_LOG2 has to be defined along.                        !
19190  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
19191  */
19192 # 100 "/usr/include/openssl/sha.h" 3 4
19193 typedef struct SHAstate_st {
19194     unsigned int h0, h1, h2, h3, h4;
19195     unsigned int Nl, Nh;
19196     unsigned int data[16];
19197     unsigned int num;
19198 } SHA_CTX;
19199 
19200 
19201 
19202 
19203 
19204 int SHA_Init(SHA_CTX *c);
19205 int SHA_Update(SHA_CTX *c, const void *data, size_t len);
19206 int SHA_Final(unsigned char *md, SHA_CTX *c);
19207 unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md);
19208 void SHA_Transform(SHA_CTX *c, const unsigned char *data);
19209 
19210 
19211 
19212 
19213 
19214 int SHA1_Init(SHA_CTX *c);
19215 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
19216 int SHA1_Final(unsigned char *md, SHA_CTX *c);
19217 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
19218 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
19219 # 134 "/usr/include/openssl/sha.h" 3 4
19220 typedef struct SHA256state_st {
19221     unsigned int h[8];
19222     unsigned int Nl, Nh;
19223     unsigned int data[16];
19224     unsigned int num, md_len;
19225 } SHA256_CTX;
19226 
19227 
19228 
19229 
19230 
19231 
19232 int SHA224_Init(SHA256_CTX *c);
19233 int SHA224_Update(SHA256_CTX *c, const void *data, size_t len);
19234 int SHA224_Final(unsigned char *md, SHA256_CTX *c);
19235 unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md);
19236 int SHA256_Init(SHA256_CTX *c);
19237 int SHA256_Update(SHA256_CTX *c, const void *data, size_t len);
19238 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
19239 unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);
19240 void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
19241 
19242 
19243 
19244 
19245 
19246 
19247 /*
19248  * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64
19249  * being exactly 64-bit wide. See Implementation Notes in sha512.c
19250  * for further details.
19251  */
19252 /*
19253  * SHA-512 treats input data as a
19254  * contiguous array of 64 bit
19255  * wide big-endian values.
19256  */
19257 # 183 "/usr/include/openssl/sha.h" 3 4
19258 typedef struct SHA512state_st {
19259     unsigned long long h[8];
19260     unsigned long long Nl, Nh;
19261     union {
19262         unsigned long long d[16];
19263         unsigned char p[(16*8)];
19264     } u;
19265     unsigned int num, md_len;
19266 } SHA512_CTX;
19267 
19268 
19269 
19270 
19271 
19272 
19273 
19274 int SHA384_Init(SHA512_CTX *c);
19275 int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
19276 int SHA384_Final(unsigned char *md, SHA512_CTX *c);
19277 unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);
19278 int SHA512_Init(SHA512_CTX *c);
19279 int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);
19280 int SHA512_Final(unsigned char *md, SHA512_CTX *c);
19281 unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
19282 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
19283 # 108 "/usr/include/openssl/x509.h" 2 3 4
19284 
19285 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
19286 /* ====================================================================
19287  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
19288  *
19289  * Redistribution and use in source and binary forms, with or without
19290  * modification, are permitted provided that the following conditions
19291  * are met:
19292  *
19293  * 1. Redistributions of source code must retain the above copyright
19294  *    notice, this list of conditions and the following disclaimer.
19295  *
19296  * 2. Redistributions in binary form must reproduce the above copyright
19297  *    notice, this list of conditions and the following disclaimer in
19298  *    the documentation and/or other materials provided with the
19299  *    distribution.
19300  *
19301  * 3. All advertising materials mentioning features or use of this
19302  *    software must display the following acknowledgment:
19303  *    "This product includes software developed by the OpenSSL Project
19304  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19305  *
19306  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19307  *    endorse or promote products derived from this software without
19308  *    prior written permission. For written permission, please contact
19309  *    openssl-core@openssl.org.
19310  *
19311  * 5. Products derived from this software may not be called "OpenSSL"
19312  *    nor may "OpenSSL" appear in their names without prior written
19313  *    permission of the OpenSSL Project.
19314  *
19315  * 6. Redistributions of any form whatsoever must retain the following
19316  *    acknowledgment:
19317  *    "This product includes software developed by the OpenSSL Project
19318  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19319  *
19320  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19321  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19322  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19323  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19324  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19325  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19326  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19327  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19328  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19329  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19330  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19331  * OF THE POSSIBILITY OF SUCH DAMAGE.
19332  * ====================================================================
19333  *
19334  * This product includes cryptographic software written by Eric Young
19335  * (eay@cryptsoft.com).  This product includes software written by Tim
19336  * Hudson (tjh@cryptsoft.com).
19337  *
19338  */
19339 # 110 "/usr/include/openssl/x509.h" 2 3 4
19340 # 137 "/usr/include/openssl/x509.h" 3 4
19341 typedef struct X509_objects_st {
19342     int nid;
19343     int (*a2i) (void);
19344     int (*i2a) (void);
19345 } X509_OBJECTS;
19346 
19347 struct X509_algor_st {
19348     ASN1_OBJECT *algorithm;
19349     ASN1_TYPE *parameter;
19350 } /* X509_ALGOR */ ;
19351 
19352 
19353 
19354 typedef struct stack_st_X509_ALGOR X509_ALGORS;
19355 
19356 typedef struct X509_val_st {
19357     ASN1_TIME *notBefore;
19358     ASN1_TIME *notAfter;
19359 } X509_VAL;
19360 
19361 struct X509_pubkey_st {
19362     X509_ALGOR *algor;
19363     ASN1_BIT_STRING *public_key;
19364     EVP_PKEY *pkey;
19365 };
19366 
19367 typedef struct X509_sig_st {
19368     X509_ALGOR *algor;
19369     ASN1_OCTET_STRING *digest;
19370 } X509_SIG;
19371 
19372 typedef struct X509_name_entry_st {
19373     ASN1_OBJECT *object;
19374     ASN1_STRING *value;
19375     int set;
19376     int size; /* temp variable */
19377 } X509_NAME_ENTRY;
19378 
19379 struct stack_st_X509_NAME_ENTRY { _STACK stack; };
19380 
19381 
19382 /* we always keep X509_NAMEs in 2 forms. */
19383 struct X509_name_st {
19384     struct stack_st_X509_NAME_ENTRY *entries;
19385     int modified; /* true if 'bytes' needs to be built */
19386 
19387     BUF_MEM *bytes;
19388 
19389 
19390 
19391 /*      unsigned long hash; Keep the hash around for lookups */
19392     unsigned char *canon_enc;
19393     int canon_enclen;
19394 } /* X509_NAME */ ;
19395 
19396 struct stack_st_X509_NAME { _STACK stack; };
19397 
19398 
19399 
19400 typedef struct X509_extension_st {
19401     ASN1_OBJECT *object;
19402     ASN1_BOOLEAN critical;
19403     ASN1_OCTET_STRING *value;
19404 } X509_EXTENSION;
19405 
19406 typedef struct stack_st_X509_EXTENSION X509_EXTENSIONS;
19407 
19408 struct stack_st_X509_EXTENSION { _STACK stack; };
19409 
19410 
19411 /* a sequence of these are used */
19412 typedef struct x509_attributes_st {
19413     ASN1_OBJECT *object;
19414     int single; /* 0 for a set, 1 for a single item (which is
19415                                  * wrong) */
19416     union {
19417         char *ptr;
19418         /*
19419          * 0
19420          */ struct stack_st_ASN1_TYPE *set;
19421         /*
19422          * 1
19423          */ ASN1_TYPE *single;
19424     } value;
19425 } X509_ATTRIBUTE;
19426 
19427 struct stack_st_X509_ATTRIBUTE { _STACK stack; };
19428 
19429 
19430 typedef struct X509_req_info_st {
19431     ASN1_ENCODING enc;
19432     ASN1_INTEGER *version;
19433     X509_NAME *subject;
19434     X509_PUBKEY *pubkey;
19435     /*  d=2 hl=2 l=  0 cons: cont: 00 */
19436     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
19437 } X509_REQ_INFO;
19438 
19439 typedef struct X509_req_st {
19440     X509_REQ_INFO *req_info;
19441     X509_ALGOR *sig_alg;
19442     ASN1_BIT_STRING *signature;
19443     int references;
19444 } X509_REQ;
19445 
19446 typedef struct x509_cinf_st {
19447     ASN1_INTEGER *version; /* [ 0 ] default of v1 */
19448     ASN1_INTEGER *serialNumber;
19449     X509_ALGOR *signature;
19450     X509_NAME *issuer;
19451     X509_VAL *validity;
19452     X509_NAME *subject;
19453     X509_PUBKEY *key;
19454     ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */
19455     ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */
19456     struct stack_st_X509_EXTENSION *extensions; /* [ 3 ] optional in v3 */
19457     ASN1_ENCODING enc;
19458 } X509_CINF;
19459 
19460 /*
19461  * This stuff is certificate "auxiliary info" it contains details which are
19462  * useful in certificate stores and databases. When used this is tagged onto
19463  * the end of the certificate itself
19464  */
19465 
19466 typedef struct x509_cert_aux_st {
19467     struct stack_st_ASN1_OBJECT *trust; /* trusted uses */
19468     struct stack_st_ASN1_OBJECT *reject; /* rejected uses */
19469     ASN1_UTF8STRING *alias; /* "friendly name" */
19470     ASN1_OCTET_STRING *keyid; /* key id of private key */
19471     struct stack_st_X509_ALGOR *other; /* other unspecified info */
19472 } X509_CERT_AUX;
19473 
19474 struct x509_st {
19475     X509_CINF *cert_info;
19476     X509_ALGOR *sig_alg;
19477     ASN1_BIT_STRING *signature;
19478     int valid;
19479     int references;
19480     char *name;
19481     CRYPTO_EX_DATA ex_data;
19482     /* These contain copies of various extension values */
19483     long ex_pathlen;
19484     long ex_pcpathlen;
19485     unsigned long ex_flags;
19486     unsigned long ex_kusage;
19487     unsigned long ex_xkusage;
19488     unsigned long ex_nscert;
19489     ASN1_OCTET_STRING *skid;
19490     AUTHORITY_KEYID *akid;
19491     X509_POLICY_CACHE *policy_cache;
19492     struct stack_st_DIST_POINT *crldp;
19493     struct stack_st_GENERAL_NAME *altname;
19494     NAME_CONSTRAINTS *nc;
19495 
19496 
19497 
19498 
19499 
19500     unsigned char sha1_hash[20];
19501 
19502     X509_CERT_AUX *aux;
19503 } /* X509 */ ;
19504 
19505 struct stack_st_X509 { _STACK stack; };
19506 
19507 
19508 /* This is used for a table of trust checking functions */
19509 
19510 typedef struct x509_trust_st {
19511     int trust;
19512     int flags;
19513     int (*check_trust) (struct x509_trust_st *, X509 *, int);
19514     char *name;
19515     int arg1;
19516     void *arg2;
19517 } X509_TRUST;
19518 
19519 struct stack_st_X509_TRUST { _STACK stack; };
19520 
19521 typedef struct x509_cert_pair_st {
19522     X509 *forward;
19523     X509 *reverse;
19524 } X509_CERT_PAIR;
19525 
19526 /* standard trust ids */
19527 # 335 "/usr/include/openssl/x509.h" 3 4
19528 /* Keep these up to date! */
19529 
19530 
19531 
19532 /* trust_flags values */
19533 
19534 
19535 
19536 /* check_trust return codes */
19537 
19538 
19539 
19540 
19541 
19542 /* Flags for X509_print_ex() */
19543 # 366 "/usr/include/openssl/x509.h" 3 4
19544 /* Flags specific to X509_NAME_print_ex() */
19545 
19546 /* The field separator information */
19547 # 381 "/usr/include/openssl/x509.h" 3 4
19548 /* How the field name is shown */
19549 # 392 "/usr/include/openssl/x509.h" 3 4
19550 /*
19551  * This determines if we dump fields we don't recognise: RFC2253 requires
19552  * this.
19553  */
19554 
19555 
19556 
19557 
19558 
19559 
19560 /* Complete set of RFC2253 flags */
19561 
19562 
19563 
19564 
19565 
19566 
19567 
19568 /* readable oneline form */
19569 
19570 
19571 
19572 
19573 
19574 
19575 
19576 /* readable multiline form */
19577 # 427 "/usr/include/openssl/x509.h" 3 4
19578 struct x509_revoked_st {
19579     ASN1_INTEGER *serialNumber;
19580     ASN1_TIME *revocationDate;
19581     struct stack_st_X509_EXTENSION /* optional */ *extensions;
19582     /* Set up if indirect CRL */
19583     struct stack_st_GENERAL_NAME *issuer;
19584     /* Revocation reason */
19585     int reason;
19586     int sequence; /* load sequence */
19587 };
19588 
19589 struct stack_st_X509_REVOKED { _STACK stack; };
19590 
19591 
19592 typedef struct X509_crl_info_st {
19593     ASN1_INTEGER *version;
19594     X509_ALGOR *sig_alg;
19595     X509_NAME *issuer;
19596     ASN1_TIME *lastUpdate;
19597     ASN1_TIME *nextUpdate;
19598     struct stack_st_X509_REVOKED *revoked;
19599     struct stack_st_X509_EXTENSION /* [0] */ *extensions;
19600     ASN1_ENCODING enc;
19601 } X509_CRL_INFO;
19602 
19603 struct X509_crl_st {
19604     /* actual signature */
19605     X509_CRL_INFO *crl;
19606     X509_ALGOR *sig_alg;
19607     ASN1_BIT_STRING *signature;
19608     int references;
19609     int flags;
19610     /* Copies of various extensions */
19611     AUTHORITY_KEYID *akid;
19612     ISSUING_DIST_POINT *idp;
19613     /* Convenient breakdown of IDP */
19614     int idp_flags;
19615     int idp_reasons;
19616     /* CRL and base CRL numbers for delta processing */
19617     ASN1_INTEGER *crl_number;
19618     ASN1_INTEGER *base_crl_number;
19619 
19620     unsigned char sha1_hash[20];
19621 
19622     struct stack_st_GENERAL_NAMES *issuers;
19623     const X509_CRL_METHOD *meth;
19624     void *meth_data;
19625 } /* X509_CRL */ ;
19626 
19627 struct stack_st_X509_CRL { _STACK stack; };
19628 
19629 
19630 typedef struct private_key_st {
19631     int version;
19632     /* The PKCS#8 data types */
19633     X509_ALGOR *enc_algor;
19634     ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */
19635     /* When decrypted, the following will not be NULL */
19636     EVP_PKEY *dec_pkey;
19637     /* used to encrypt and decrypt */
19638     int key_length;
19639     char *key_data;
19640     int key_free; /* true if we should auto free key_data */
19641     /* expanded version of 'enc_algor' */
19642     EVP_CIPHER_INFO cipher;
19643     int references;
19644 } X509_PKEY;
19645 
19646 
19647 typedef struct X509_info_st {
19648     X509 *x509;
19649     X509_CRL *crl;
19650     X509_PKEY *x_pkey;
19651     EVP_CIPHER_INFO enc_cipher;
19652     int enc_len;
19653     char *enc_data;
19654     int references;
19655 } X509_INFO;
19656 
19657 struct stack_st_X509_INFO { _STACK stack; };
19658 
19659 
19660 /*
19661  * The next 2 structures and their 8 routines were sent to me by Pat Richard
19662  * <patr@x509.com> and are used to manipulate Netscapes spki structures -
19663  * useful if you are writing a CA web page
19664  */
19665 typedef struct Netscape_spkac_st {
19666     X509_PUBKEY *pubkey;
19667     ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */
19668 } NETSCAPE_SPKAC;
19669 
19670 typedef struct Netscape_spki_st {
19671     NETSCAPE_SPKAC *spkac; /* signed public key and challenge */
19672     X509_ALGOR *sig_algor;
19673     ASN1_BIT_STRING *signature;
19674 } NETSCAPE_SPKI;
19675 
19676 /* Netscape certificate sequence structure */
19677 typedef struct Netscape_certificate_sequence {
19678     ASN1_OBJECT *type;
19679     struct stack_st_X509 *certs;
19680 } NETSCAPE_CERT_SEQUENCE;
19681 
19682 /*- Unused (and iv length is wrong)
19683 typedef struct CBCParameter_st
19684         {
19685         unsigned char iv[8];
19686         } CBC_PARAM;
19687 */
19688 
19689 /* Password based encryption structure */
19690 
19691 typedef struct PBEPARAM_st {
19692     ASN1_OCTET_STRING *salt;
19693     ASN1_INTEGER *iter;
19694 } PBEPARAM;
19695 
19696 /* Password based encryption V2 structures */
19697 
19698 typedef struct PBE2PARAM_st {
19699     X509_ALGOR *keyfunc;
19700     X509_ALGOR *encryption;
19701 } PBE2PARAM;
19702 
19703 typedef struct PBKDF2PARAM_st {
19704 /* Usually OCTET STRING but could be anything */
19705     ASN1_TYPE *salt;
19706     ASN1_INTEGER *iter;
19707     ASN1_INTEGER *keylength;
19708     X509_ALGOR *prf;
19709 } PBKDF2PARAM;
19710 
19711 /* PKCS#8 private key info structure */
19712 
19713 struct pkcs8_priv_key_info_st {
19714     /* Flag for various broken formats */
19715     int broken;
19716 
19717 
19718 
19719 
19720 
19721     ASN1_INTEGER *version;
19722     X509_ALGOR *pkeyalg;
19723     /* Should be OCTET STRING but some are broken */
19724     ASN1_TYPE *pkey;
19725     struct stack_st_X509_ATTRIBUTE *attributes;
19726 };
19727 
19728 
19729 
19730 
19731 
19732 # 1 "/usr/include/openssl/x509_vfy.h" 1 3 4
19733 /* crypto/x509/x509_vfy.h */
19734 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19735  * All rights reserved.
19736  *
19737  * This package is an SSL implementation written
19738  * by Eric Young (eay@cryptsoft.com).
19739  * The implementation was written so as to conform with Netscapes SSL.
19740  *
19741  * This library is free for commercial and non-commercial use as long as
19742  * the following conditions are aheared to.  The following conditions
19743  * apply to all code found in this distribution, be it the RC4, RSA,
19744  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19745  * included with this distribution is covered by the same copyright terms
19746  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19747  *
19748  * Copyright remains Eric Young's, and as such any Copyright notices in
19749  * the code are not to be removed.
19750  * If this package is used in a product, Eric Young should be given attribution
19751  * as the author of the parts of the library used.
19752  * This can be in the form of a textual message at program startup or
19753  * in documentation (online or textual) provided with the package.
19754  *
19755  * Redistribution and use in source and binary forms, with or without
19756  * modification, are permitted provided that the following conditions
19757  * are met:
19758  * 1. Redistributions of source code must retain the copyright
19759  *    notice, this list of conditions and the following disclaimer.
19760  * 2. Redistributions in binary form must reproduce the above copyright
19761  *    notice, this list of conditions and the following disclaimer in the
19762  *    documentation and/or other materials provided with the distribution.
19763  * 3. All advertising materials mentioning features or use of this software
19764  *    must display the following acknowledgement:
19765  *    "This product includes cryptographic software written by
19766  *     Eric Young (eay@cryptsoft.com)"
19767  *    The word 'cryptographic' can be left out if the rouines from the library
19768  *    being used are not cryptographic related :-).
19769  * 4. If you include any Windows specific code (or a derivative thereof) from
19770  *    the apps directory (application code) you must include an acknowledgement:
19771  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19772  *
19773  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19774  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19775  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19776  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19777  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19778  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19779  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19780  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19781  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19782  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19783  * SUCH DAMAGE.
19784  *
19785  * The licence and distribution terms for any publically available version or
19786  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19787  * copied and put under another distribution licence
19788  * [including the GNU Public Licence.]
19789  */
19790 # 70 "/usr/include/openssl/x509_vfy.h" 3 4
19791 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
19792 /* opensslconf.h */
19793 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
19794 
19795 
19796 
19797 
19798 /* OpenSSL was configured with the following options: */
19799 # 108 "/usr/include/openssl/opensslconf.h" 3 4
19800 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
19801    asks for it.  This is a transient feature that is provided for those
19802    who haven't had the time to do the appropriate changes in their
19803    applications.  */
19804 # 204 "/usr/include/openssl/opensslconf.h" 3 4
19805 /* crypto/opensslconf.h.in */
19806 
19807 /* Generate 80386 code? */
19808 # 71 "/usr/include/openssl/x509_vfy.h" 2 3 4
19809 
19810 # 1 "/usr/include/openssl/lhash.h" 1 3 4
19811 /* crypto/lhash/lhash.h */
19812 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19813  * All rights reserved.
19814  *
19815  * This package is an SSL implementation written
19816  * by Eric Young (eay@cryptsoft.com).
19817  * The implementation was written so as to conform with Netscapes SSL.
19818  *
19819  * This library is free for commercial and non-commercial use as long as
19820  * the following conditions are aheared to.  The following conditions
19821  * apply to all code found in this distribution, be it the RC4, RSA,
19822  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19823  * included with this distribution is covered by the same copyright terms
19824  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19825  *
19826  * Copyright remains Eric Young's, and as such any Copyright notices in
19827  * the code are not to be removed.
19828  * If this package is used in a product, Eric Young should be given attribution
19829  * as the author of the parts of the library used.
19830  * This can be in the form of a textual message at program startup or
19831  * in documentation (online or textual) provided with the package.
19832  *
19833  * Redistribution and use in source and binary forms, with or without
19834  * modification, are permitted provided that the following conditions
19835  * are met:
19836  * 1. Redistributions of source code must retain the copyright
19837  *    notice, this list of conditions and the following disclaimer.
19838  * 2. Redistributions in binary form must reproduce the above copyright
19839  *    notice, this list of conditions and the following disclaimer in the
19840  *    documentation and/or other materials provided with the distribution.
19841  * 3. All advertising materials mentioning features or use of this software
19842  *    must display the following acknowledgement:
19843  *    "This product includes cryptographic software written by
19844  *     Eric Young (eay@cryptsoft.com)"
19845  *    The word 'cryptographic' can be left out if the rouines from the library
19846  *    being used are not cryptographic related :-).
19847  * 4. If you include any Windows specific code (or a derivative thereof) from
19848  *    the apps directory (application code) you must include an acknowledgement:
19849  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19850  *
19851  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19852  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19853  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19854  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19855  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19856  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19857  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19858  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19859  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19860  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19861  * SUCH DAMAGE.
19862  *
19863  * The licence and distribution terms for any publically available version or
19864  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19865  * copied and put under another distribution licence
19866  * [including the GNU Public Licence.]
19867  */
19868 
19869 /*
19870  * Header for dynamic hash table routines Author - Eric Young
19871  */
19872 
19873 
19874 
19875 
19876 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
19877 /* e_os2.h */
19878 /* ====================================================================
19879  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
19880  *
19881  * Redistribution and use in source and binary forms, with or without
19882  * modification, are permitted provided that the following conditions
19883  * are met:
19884  *
19885  * 1. Redistributions of source code must retain the above copyright
19886  *    notice, this list of conditions and the following disclaimer.
19887  *
19888  * 2. Redistributions in binary form must reproduce the above copyright
19889  *    notice, this list of conditions and the following disclaimer in
19890  *    the documentation and/or other materials provided with the
19891  *    distribution.
19892  *
19893  * 3. All advertising materials mentioning features or use of this
19894  *    software must display the following acknowledgment:
19895  *    "This product includes software developed by the OpenSSL Project
19896  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19897  *
19898  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19899  *    endorse or promote products derived from this software without
19900  *    prior written permission. For written permission, please contact
19901  *    openssl-core@openssl.org.
19902  *
19903  * 5. Products derived from this software may not be called "OpenSSL"
19904  *    nor may "OpenSSL" appear in their names without prior written
19905  *    permission of the OpenSSL Project.
19906  *
19907  * 6. Redistributions of any form whatsoever must retain the following
19908  *    acknowledgment:
19909  *    "This product includes software developed by the OpenSSL Project
19910  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19911  *
19912  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19913  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19914  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19915  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19916  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19917  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19918  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19919  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19920  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19921  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19922  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19923  * OF THE POSSIBILITY OF SUCH DAMAGE.
19924  * ====================================================================
19925  *
19926  * This product includes cryptographic software written by Eric Young
19927  * (eay@cryptsoft.com).  This product includes software written by Tim
19928  * Hudson (tjh@cryptsoft.com).
19929  *
19930  */
19931 
19932 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
19933 /* opensslconf.h */
19934 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
19935 
19936 
19937 
19938 
19939 /* OpenSSL was configured with the following options: */
19940 # 108 "/usr/include/openssl/opensslconf.h" 3 4
19941 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
19942    asks for it.  This is a transient feature that is provided for those
19943    who haven't had the time to do the appropriate changes in their
19944    applications.  */
19945 # 204 "/usr/include/openssl/opensslconf.h" 3 4
19946 /* crypto/opensslconf.h.in */
19947 
19948 /* Generate 80386 code? */
19949 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
19950 # 67 "/usr/include/openssl/lhash.h" 2 3 4
19951 
19952 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
19953 /*
19954  * CDDL HEADER START
19955  *
19956  * The contents of this file are subject to the terms of the
19957  * Common Development and Distribution License (the "License").
19958  * You may not use this file except in compliance with the License.
19959  *
19960  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19961  * or http://www.opensolaris.org/os/licensing.
19962  * See the License for the specific language governing permissions
19963  * and limitations under the License.
19964  *
19965  * When distributing Covered Code, include this CDDL HEADER in each
19966  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19967  * If applicable, add the following below this CDDL HEADER, with the
19968  * fields enclosed by brackets "[]" replaced with your own identifying
19969  * information: Portions Copyright [yyyy] [name of copyright owner]
19970  *
19971  * CDDL HEADER END
19972  */
19973 
19974 /*
19975  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
19976  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
19977  */
19978 
19979 /*	Copyright (c) 1988 AT&T	*/
19980 /*	  All Rights Reserved  	*/
19981 
19982 /*
19983  * User-visible pieces of the ANSI C standard I/O package.
19984  */
19985 # 69 "/usr/include/openssl/lhash.h" 2 3 4
19986 
19987 
19988 
19989 # 1 "/usr/include/openssl/bio.h" 1 3 4
19990 /* crypto/bio/bio.h */
19991 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19992  * All rights reserved.
19993  *
19994  * This package is an SSL implementation written
19995  * by Eric Young (eay@cryptsoft.com).
19996  * The implementation was written so as to conform with Netscapes SSL.
19997  *
19998  * This library is free for commercial and non-commercial use as long as
19999  * the following conditions are aheared to.  The following conditions
20000  * apply to all code found in this distribution, be it the RC4, RSA,
20001  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20002  * included with this distribution is covered by the same copyright terms
20003  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20004  *
20005  * Copyright remains Eric Young's, and as such any Copyright notices in
20006  * the code are not to be removed.
20007  * If this package is used in a product, Eric Young should be given attribution
20008  * as the author of the parts of the library used.
20009  * This can be in the form of a textual message at program startup or
20010  * in documentation (online or textual) provided with the package.
20011  *
20012  * Redistribution and use in source and binary forms, with or without
20013  * modification, are permitted provided that the following conditions
20014  * are met:
20015  * 1. Redistributions of source code must retain the copyright
20016  *    notice, this list of conditions and the following disclaimer.
20017  * 2. Redistributions in binary form must reproduce the above copyright
20018  *    notice, this list of conditions and the following disclaimer in the
20019  *    documentation and/or other materials provided with the distribution.
20020  * 3. All advertising materials mentioning features or use of this software
20021  *    must display the following acknowledgement:
20022  *    "This product includes cryptographic software written by
20023  *     Eric Young (eay@cryptsoft.com)"
20024  *    The word 'cryptographic' can be left out if the rouines from the library
20025  *    being used are not cryptographic related :-).
20026  * 4. If you include any Windows specific code (or a derivative thereof) from
20027  *    the apps directory (application code) you must include an acknowledgement:
20028  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20029  *
20030  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20031  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20032  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20033  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20034  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20035  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20036  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20037  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20038  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20039  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20040  * SUCH DAMAGE.
20041  *
20042  * The licence and distribution terms for any publically available version or
20043  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20044  * copied and put under another distribution licence
20045  * [including the GNU Public Licence.]
20046  */
20047 # 73 "/usr/include/openssl/lhash.h" 2 3 4
20048 
20049 
20050 
20051 
20052 
20053 
20054 typedef struct lhash_node_st {
20055     void *data;
20056     struct lhash_node_st *next;
20057 
20058     unsigned long hash;
20059 
20060 } LHASH_NODE;
20061 
20062 typedef int (*LHASH_COMP_FN_TYPE) (const void *, const void *);
20063 typedef unsigned long (*LHASH_HASH_FN_TYPE) (const void *);
20064 typedef void (*LHASH_DOALL_FN_TYPE) (void *);
20065 typedef void (*LHASH_DOALL_ARG_FN_TYPE) (void *, void *);
20066 
20067 /*
20068  * Macros for declaring and implementing type-safe wrappers for LHASH
20069  * callbacks. This way, callbacks can be provided to LHASH structures without
20070  * function pointer casting and the macro-defined callbacks provide
20071  * per-variable casting before deferring to the underlying type-specific
20072  * callbacks. NB: It is possible to place a "static" in front of both the
20073  * DECLARE and IMPLEMENT macros if the functions are strictly internal.
20074  */
20075 
20076 /* First: "hash" functions */
20077 # 110 "/usr/include/openssl/lhash.h" 3 4
20078 /* Second: "compare" functions */
20079 # 120 "/usr/include/openssl/lhash.h" 3 4
20080 /* Third: "doall" functions */
20081 # 129 "/usr/include/openssl/lhash.h" 3 4
20082 /* Fourth: "doall_arg" functions */
20083 # 139 "/usr/include/openssl/lhash.h" 3 4
20084 typedef struct lhash_st {
20085     LHASH_NODE **b;
20086     LHASH_COMP_FN_TYPE comp;
20087     LHASH_HASH_FN_TYPE hash;
20088     unsigned int num_nodes;
20089     unsigned int num_alloc_nodes;
20090     unsigned int p;
20091     unsigned int pmax;
20092     unsigned long up_load; /* load times 256 */
20093     unsigned long down_load; /* load times 256 */
20094     unsigned long num_items;
20095     unsigned long num_expands;
20096     unsigned long num_expand_reallocs;
20097     unsigned long num_contracts;
20098     unsigned long num_contract_reallocs;
20099     unsigned long num_hash_calls;
20100     unsigned long num_comp_calls;
20101     unsigned long num_insert;
20102     unsigned long num_replace;
20103     unsigned long num_delete;
20104     unsigned long num_no_delete;
20105     unsigned long num_retrieve;
20106     unsigned long num_retrieve_miss;
20107     unsigned long num_hash_comps;
20108     int error;
20109 } _LHASH; /* Do not use _LHASH directly, use LHASH_OF
20110                                  * and friends */
20111 
20112 
20113 
20114 /*
20115  * Indicates a malloc() error in the last call, this is only bad in
20116  * lh_insert().
20117  */
20118 
20119 
20120 _LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c);
20121 void lh_free(_LHASH *lh);
20122 void *lh_insert(_LHASH *lh, void *data);
20123 void *lh_delete(_LHASH *lh, const void *data);
20124 void *lh_retrieve(_LHASH *lh, const void *data);
20125 void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func);
20126 void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg);
20127 unsigned long lh_strhash(const char *c);
20128 unsigned long lh_num_items(const _LHASH *lh);
20129 
20130 
20131 void lh_stats(const _LHASH *lh, FILE *out);
20132 void lh_node_stats(const _LHASH *lh, FILE *out);
20133 void lh_node_usage_stats(const _LHASH *lh, FILE *out);
20134 
20135 
20136 
20137 void lh_stats_bio(const _LHASH *lh, BIO *out);
20138 void lh_node_stats_bio(const _LHASH *lh, BIO *out);
20139 void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
20140 
20141 
20142 /* Type checking... */
20143 # 206 "/usr/include/openssl/lhash.h" 3 4
20144 /* Define wrapper functions. */
20145 # 233 "/usr/include/openssl/lhash.h" 3 4
20146 struct lhash_st_OPENSSL_STRING { int dummy; };
20147 struct lhash_st_OPENSSL_CSTRING { int dummy; };
20148 # 73 "/usr/include/openssl/x509_vfy.h" 2 3 4
20149 
20150 # 1 "/usr/include/openssl/bio.h" 1 3 4
20151 /* crypto/bio/bio.h */
20152 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20153  * All rights reserved.
20154  *
20155  * This package is an SSL implementation written
20156  * by Eric Young (eay@cryptsoft.com).
20157  * The implementation was written so as to conform with Netscapes SSL.
20158  *
20159  * This library is free for commercial and non-commercial use as long as
20160  * the following conditions are aheared to.  The following conditions
20161  * apply to all code found in this distribution, be it the RC4, RSA,
20162  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20163  * included with this distribution is covered by the same copyright terms
20164  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20165  *
20166  * Copyright remains Eric Young's, and as such any Copyright notices in
20167  * the code are not to be removed.
20168  * If this package is used in a product, Eric Young should be given attribution
20169  * as the author of the parts of the library used.
20170  * This can be in the form of a textual message at program startup or
20171  * in documentation (online or textual) provided with the package.
20172  *
20173  * Redistribution and use in source and binary forms, with or without
20174  * modification, are permitted provided that the following conditions
20175  * are met:
20176  * 1. Redistributions of source code must retain the copyright
20177  *    notice, this list of conditions and the following disclaimer.
20178  * 2. Redistributions in binary form must reproduce the above copyright
20179  *    notice, this list of conditions and the following disclaimer in the
20180  *    documentation and/or other materials provided with the distribution.
20181  * 3. All advertising materials mentioning features or use of this software
20182  *    must display the following acknowledgement:
20183  *    "This product includes cryptographic software written by
20184  *     Eric Young (eay@cryptsoft.com)"
20185  *    The word 'cryptographic' can be left out if the rouines from the library
20186  *    being used are not cryptographic related :-).
20187  * 4. If you include any Windows specific code (or a derivative thereof) from
20188  *    the apps directory (application code) you must include an acknowledgement:
20189  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20190  *
20191  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20192  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20193  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20194  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20195  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20196  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20197  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20198  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20199  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20200  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20201  * SUCH DAMAGE.
20202  *
20203  * The licence and distribution terms for any publically available version or
20204  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20205  * copied and put under another distribution licence
20206  * [including the GNU Public Licence.]
20207  */
20208 # 75 "/usr/include/openssl/x509_vfy.h" 2 3 4
20209 # 1 "/usr/include/openssl/crypto.h" 1 3 4
20210 /* crypto/crypto.h */
20211 /* ====================================================================
20212  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
20213  *
20214  * Redistribution and use in source and binary forms, with or without
20215  * modification, are permitted provided that the following conditions
20216  * are met:
20217  *
20218  * 1. Redistributions of source code must retain the above copyright
20219  *    notice, this list of conditions and the following disclaimer.
20220  *
20221  * 2. Redistributions in binary form must reproduce the above copyright
20222  *    notice, this list of conditions and the following disclaimer in
20223  *    the documentation and/or other materials provided with the
20224  *    distribution.
20225  *
20226  * 3. All advertising materials mentioning features or use of this
20227  *    software must display the following acknowledgment:
20228  *    "This product includes software developed by the OpenSSL Project
20229  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20230  *
20231  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20232  *    endorse or promote products derived from this software without
20233  *    prior written permission. For written permission, please contact
20234  *    openssl-core@openssl.org.
20235  *
20236  * 5. Products derived from this software may not be called "OpenSSL"
20237  *    nor may "OpenSSL" appear in their names without prior written
20238  *    permission of the OpenSSL Project.
20239  *
20240  * 6. Redistributions of any form whatsoever must retain the following
20241  *    acknowledgment:
20242  *    "This product includes software developed by the OpenSSL Project
20243  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20244  *
20245  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20246  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20247  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20248  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20249  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20250  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20251  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20252  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20253  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20254  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20255  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20256  * OF THE POSSIBILITY OF SUCH DAMAGE.
20257  * ====================================================================
20258  *
20259  * This product includes cryptographic software written by Eric Young
20260  * (eay@cryptsoft.com).  This product includes software written by Tim
20261  * Hudson (tjh@cryptsoft.com).
20262  *
20263  */
20264 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20265  * All rights reserved.
20266  *
20267  * This package is an SSL implementation written
20268  * by Eric Young (eay@cryptsoft.com).
20269  * The implementation was written so as to conform with Netscapes SSL.
20270  *
20271  * This library is free for commercial and non-commercial use as long as
20272  * the following conditions are aheared to.  The following conditions
20273  * apply to all code found in this distribution, be it the RC4, RSA,
20274  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20275  * included with this distribution is covered by the same copyright terms
20276  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20277  *
20278  * Copyright remains Eric Young's, and as such any Copyright notices in
20279  * the code are not to be removed.
20280  * If this package is used in a product, Eric Young should be given attribution
20281  * as the author of the parts of the library used.
20282  * This can be in the form of a textual message at program startup or
20283  * in documentation (online or textual) provided with the package.
20284  *
20285  * Redistribution and use in source and binary forms, with or without
20286  * modification, are permitted provided that the following conditions
20287  * are met:
20288  * 1. Redistributions of source code must retain the copyright
20289  *    notice, this list of conditions and the following disclaimer.
20290  * 2. Redistributions in binary form must reproduce the above copyright
20291  *    notice, this list of conditions and the following disclaimer in the
20292  *    documentation and/or other materials provided with the distribution.
20293  * 3. All advertising materials mentioning features or use of this software
20294  *    must display the following acknowledgement:
20295  *    "This product includes cryptographic software written by
20296  *     Eric Young (eay@cryptsoft.com)"
20297  *    The word 'cryptographic' can be left out if the rouines from the library
20298  *    being used are not cryptographic related :-).
20299  * 4. If you include any Windows specific code (or a derivative thereof) from
20300  *    the apps directory (application code) you must include an acknowledgement:
20301  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20302  *
20303  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20304  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20305  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20306  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20307  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20308  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20309  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20310  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20311  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20312  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20313  * SUCH DAMAGE.
20314  *
20315  * The licence and distribution terms for any publically available version or
20316  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20317  * copied and put under another distribution licence
20318  * [including the GNU Public Licence.]
20319  */
20320 /* ====================================================================
20321  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
20322  * ECDH support in OpenSSL originally developed by
20323  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
20324  */
20325 # 76 "/usr/include/openssl/x509_vfy.h" 2 3 4
20326 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
20327 /* ====================================================================
20328  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
20329  *
20330  * Redistribution and use in source and binary forms, with or without
20331  * modification, are permitted provided that the following conditions
20332  * are met:
20333  *
20334  * 1. Redistributions of source code must retain the above copyright
20335  *    notice, this list of conditions and the following disclaimer.
20336  *
20337  * 2. Redistributions in binary form must reproduce the above copyright
20338  *    notice, this list of conditions and the following disclaimer in
20339  *    the documentation and/or other materials provided with the
20340  *    distribution.
20341  *
20342  * 3. All advertising materials mentioning features or use of this
20343  *    software must display the following acknowledgment:
20344  *    "This product includes software developed by the OpenSSL Project
20345  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20346  *
20347  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20348  *    endorse or promote products derived from this software without
20349  *    prior written permission. For written permission, please contact
20350  *    openssl-core@openssl.org.
20351  *
20352  * 5. Products derived from this software may not be called "OpenSSL"
20353  *    nor may "OpenSSL" appear in their names without prior written
20354  *    permission of the OpenSSL Project.
20355  *
20356  * 6. Redistributions of any form whatsoever must retain the following
20357  *    acknowledgment:
20358  *    "This product includes software developed by the OpenSSL Project
20359  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20360  *
20361  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20362  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20363  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20364  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20365  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20366  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20367  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20368  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20369  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20370  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20371  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20372  * OF THE POSSIBILITY OF SUCH DAMAGE.
20373  * ====================================================================
20374  *
20375  * This product includes cryptographic software written by Eric Young
20376  * (eay@cryptsoft.com).  This product includes software written by Tim
20377  * Hudson (tjh@cryptsoft.com).
20378  *
20379  */
20380 # 77 "/usr/include/openssl/x509_vfy.h" 2 3 4
20381 # 92 "/usr/include/openssl/x509_vfy.h" 3 4
20382 typedef struct x509_file_st {
20383     int num_paths; /* number of paths to files or directories */
20384     int num_alloced;
20385     char **paths; /* the list of paths or directories */
20386     int *path_type;
20387 } X509_CERT_FILE_CTX;
20388 
20389 /*******************************/
20390 /*-
20391 SSL_CTX -> X509_STORE
20392                 -> X509_LOOKUP
20393                         ->X509_LOOKUP_METHOD
20394                 -> X509_LOOKUP
20395                         ->X509_LOOKUP_METHOD
20396 
20397 SSL     -> X509_STORE_CTX
20398                 ->X509_STORE
20399 
20400 The X509_STORE holds the tables etc for verification stuff.
20401 A X509_STORE_CTX is used while validating a single certificate.
20402 The X509_STORE has X509_LOOKUPs for looking up certs.
20403 The X509_STORE then calls a function to actually verify the
20404 certificate chain.
20405 */
20406 
20407 
20408 
20409 
20410 
20411 
20412 
20413 typedef struct x509_object_st {
20414     /* one of the above types */
20415     int type;
20416     union {
20417         char *ptr;
20418         X509 *x509;
20419         X509_CRL *crl;
20420         EVP_PKEY *pkey;
20421     } data;
20422 } X509_OBJECT;
20423 
20424 typedef struct x509_lookup_st X509_LOOKUP;
20425 
20426 struct stack_st_X509_LOOKUP { _STACK stack; };
20427 struct stack_st_X509_OBJECT { _STACK stack; };
20428 
20429 /* This is a static that defines the function interface */
20430 typedef struct x509_lookup_method_st {
20431     const char *name;
20432     int (*new_item) (X509_LOOKUP *ctx);
20433     void (*free) (X509_LOOKUP *ctx);
20434     int (*init) (X509_LOOKUP *ctx);
20435     int (*shutdown) (X509_LOOKUP *ctx);
20436     int (*ctrl) (X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
20437                  char **ret);
20438     int (*get_by_subject) (X509_LOOKUP *ctx, int type, X509_NAME *name,
20439                            X509_OBJECT *ret);
20440     int (*get_by_issuer_serial) (X509_LOOKUP *ctx, int type, X509_NAME *name,
20441                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
20442     int (*get_by_fingerprint) (X509_LOOKUP *ctx, int type,
20443                                unsigned char *bytes, int len,
20444                                X509_OBJECT *ret);
20445     int (*get_by_alias) (X509_LOOKUP *ctx, int type, char *str, int len,
20446                          X509_OBJECT *ret);
20447 } X509_LOOKUP_METHOD;
20448 
20449 typedef struct X509_VERIFY_PARAM_ID_st X509_VERIFY_PARAM_ID;
20450 
20451 /*
20452  * This structure hold all parameters associated with a verify operation by
20453  * including an X509_VERIFY_PARAM structure in related structures the
20454  * parameters used can be customized
20455  */
20456 
20457 typedef struct X509_VERIFY_PARAM_st {
20458     char *name;
20459     time_t check_time; /* Time to use */
20460     unsigned long inh_flags; /* Inheritance flags */
20461     unsigned long flags; /* Various verify flags */
20462     int purpose; /* purpose to check untrusted certificates */
20463     int trust; /* trust setting to check */
20464     int depth; /* Verify depth */
20465     struct stack_st_ASN1_OBJECT *policies; /* Permissible policies */
20466     X509_VERIFY_PARAM_ID *id; /* opaque ID data */
20467 } X509_VERIFY_PARAM;
20468 
20469 struct stack_st_X509_VERIFY_PARAM { _STACK stack; };
20470 
20471 /*
20472  * This is used to hold everything.  It is used for all certificate
20473  * validation.  Once we have a certificate chain, the 'verify' function is
20474  * then called to actually check the cert chain.
20475  */
20476 struct x509_store_st {
20477     /* The following is a cache of trusted certs */
20478     int cache; /* if true, stash any hits */
20479     struct stack_st_X509_OBJECT *objs; /* Cache of all objects */
20480     /* These are external lookup methods */
20481     struct stack_st_X509_LOOKUP *get_cert_methods;
20482     X509_VERIFY_PARAM *param;
20483     /* Callbacks for various operations */
20484     /* called to verify a certificate */
20485     int (*verify) (X509_STORE_CTX *ctx);
20486     /* error callback */
20487     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
20488     /* get issuers cert from ctx */
20489     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
20490     /* check issued */
20491     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
20492     /* Check revocation status of chain */
20493     int (*check_revocation) (X509_STORE_CTX *ctx);
20494     /* retrieve CRL */
20495     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
20496     /* Check CRL validity */
20497     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
20498     /* Check certificate against CRL */
20499     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
20500     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
20501     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
20502     int (*cleanup) (X509_STORE_CTX *ctx);
20503     CRYPTO_EX_DATA ex_data;
20504     int references;
20505 } /* X509_STORE */ ;
20506 
20507 int X509_STORE_set_depth(X509_STORE *store, int depth);
20508 
20509 
20510 
20511 
20512 /* This is the functions plus an instance of the local variables. */
20513 struct x509_lookup_st {
20514     int init; /* have we been started */
20515     int skip; /* don't use us. */
20516     X509_LOOKUP_METHOD *method; /* the functions */
20517     char *method_data; /* method data */
20518     X509_STORE *store_ctx; /* who owns us */
20519 } /* X509_LOOKUP */ ;
20520 
20521 /*
20522  * This is a used when verifying cert chains.  Since the gathering of the
20523  * cert chain can take some time (and have to be 'retried', this needs to be
20524  * kept and passed around.
20525  */
20526 struct x509_store_ctx_st { /* X509_STORE_CTX */
20527     X509_STORE *ctx;
20528     /* used when looking up certs */
20529     int current_method;
20530     /* The following are set by the caller */
20531     /* The cert to check */
20532     X509 *cert;
20533     /* chain of X509s - untrusted - passed in */
20534     struct stack_st_X509 *untrusted;
20535     /* set of CRLs passed in */
20536     struct stack_st_X509_CRL *crls;
20537     X509_VERIFY_PARAM *param;
20538     /* Other info for use with get_issuer() */
20539     void *other_ctx;
20540     /* Callbacks for various operations */
20541     /* called to verify a certificate */
20542     int (*verify) (X509_STORE_CTX *ctx);
20543     /* error callback */
20544     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
20545     /* get issuers cert from ctx */
20546     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
20547     /* check issued */
20548     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
20549     /* Check revocation status of chain */
20550     int (*check_revocation) (X509_STORE_CTX *ctx);
20551     /* retrieve CRL */
20552     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
20553     /* Check CRL validity */
20554     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
20555     /* Check certificate against CRL */
20556     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
20557     int (*check_policy) (X509_STORE_CTX *ctx);
20558     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
20559     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
20560     int (*cleanup) (X509_STORE_CTX *ctx);
20561     /* The following is built up */
20562     /* if 0, rebuild chain */
20563     int valid;
20564     /* index of last untrusted cert */
20565     int last_untrusted;
20566     /* chain of X509s - built up and trusted */
20567     struct stack_st_X509 *chain;
20568     /* Valid policy tree */
20569     X509_POLICY_TREE *tree;
20570     /* Require explicit policy value */
20571     int explicit_policy;
20572     /* When something goes wrong, this is why */
20573     int error_depth;
20574     int error;
20575     X509 *current_cert;
20576     /* cert currently being tested as valid issuer */
20577     X509 *current_issuer;
20578     /* current CRL */
20579     X509_CRL *current_crl;
20580     /* score of current CRL */
20581     int current_crl_score;
20582     /* Reason mask */
20583     unsigned int current_reasons;
20584     /* For CRL path validation: parent context */
20585     X509_STORE_CTX *parent;
20586     CRYPTO_EX_DATA ex_data;
20587 } /* X509_STORE_CTX */ ;
20588 
20589 void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
20590 # 345 "/usr/include/openssl/x509_vfy.h" 3 4
20591 /* These are 'informational' when looking for issuer cert */
20592 # 377 "/usr/include/openssl/x509_vfy.h" 3 4
20593 /* Suite B mode algorithm violation */
20594 
20595 
20596 
20597 
20598 
20599 
20600 
20601 /* Host, email and IP check errors */
20602 
20603 
20604 
20605 
20606 /* Caller error */
20607 
20608 /* Issuer lookup error */
20609 
20610 
20611 
20612 
20613 /* Certificate verify flags */
20614 
20615 /* Send issuer+subject checks to verify_cb */
20616 
20617 /* Use check time instead of current time */
20618 
20619 /* Lookup CRLs */
20620 
20621 /* Lookup CRLs for whole chain */
20622 
20623 /* Ignore unhandled critical extensions */
20624 
20625 /* Disable workarounds for broken certificates */
20626 
20627 /* Enable proxy certificate validation */
20628 
20629 /* Enable policy checking */
20630 
20631 /* Policy variable require-explicit-policy */
20632 
20633 /* Policy variable inhibit-any-policy */
20634 
20635 /* Policy variable inhibit-policy-mapping */
20636 
20637 /* Notify callback that policy is OK */
20638 
20639 /* Extended CRL features such as indirect CRLs, alternate CRL signing keys */
20640 
20641 /* Delta CRL support */
20642 
20643 /* Check selfsigned CA signature */
20644 
20645 /* Use trusted store first */
20646 
20647 /* Suite B 128 bit only mode: not normally used */
20648 
20649 /* Suite B 192 bit only mode */
20650 
20651 /* Suite B 128 bit mode allowing 192 bit algorithms */
20652 
20653 
20654 /* Allow partial chains if at least one certificate is in trusted store */
20655 
20656 /*
20657  * If the initial chain is not trusted, do not attempt to build an alternative
20658  * chain. Alternate chain checking was introduced in 1.0.2b. Setting this flag
20659  * will force the behaviour to match that of previous versions.
20660  */
20661 # 453 "/usr/include/openssl/x509_vfy.h" 3 4
20662 /* Internal use: mask of policy related options */
20663 
20664 
20665 
20666 
20667 
20668 int X509_OBJECT_idx_by_subject(struct stack_st_X509_OBJECT *h, int type,
20669                                X509_NAME *name);
20670 X509_OBJECT *X509_OBJECT_retrieve_by_subject(struct stack_st_X509_OBJECT *h,
20671                                              int type, X509_NAME *name);
20672 X509_OBJECT *X509_OBJECT_retrieve_match(struct stack_st_X509_OBJECT *h,
20673                                         X509_OBJECT *x);
20674 void X509_OBJECT_up_ref_count(X509_OBJECT *a);
20675 void X509_OBJECT_free_contents(X509_OBJECT *a);
20676 X509_STORE *X509_STORE_new(void);
20677 void X509_STORE_free(X509_STORE *v);
20678 
20679 struct stack_st_X509 *X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm);
20680 struct stack_st_X509_CRL *X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm);
20681 int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);
20682 int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
20683 int X509_STORE_set_trust(X509_STORE *ctx, int trust);
20684 int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);
20685 
20686 void X509_STORE_set_verify_cb(X509_STORE *ctx,
20687                               int (*verify_cb) (int, X509_STORE_CTX *));
20688 
20689 void X509_STORE_set_lookup_crls_cb(X509_STORE *ctx,
20690                                    struct stack_st_X509_CRL *(*cb) (X509_STORE_CTX
20691                                                               *ctx,
20692                                                               X509_NAME *nm));
20693 
20694 X509_STORE_CTX *X509_STORE_CTX_new(void);
20695 
20696 int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
20697 
20698 void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
20699 int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
20700                         X509 *x509, struct stack_st_X509 *chain);
20701 void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, struct stack_st_X509 *sk);
20702 void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
20703 
20704 X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx);
20705 
20706 X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);
20707 
20708 X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);
20709 X509_LOOKUP_METHOD *X509_LOOKUP_file(void);
20710 
20711 int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
20712 int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
20713 
20714 int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name,
20715                               X509_OBJECT *ret);
20716 
20717 int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
20718                      long argl, char **ret);
20719 
20720 
20721 int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
20722 int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
20723 int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
20724 
20725 
20726 X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
20727 void X509_LOOKUP_free(X509_LOOKUP *ctx);
20728 int X509_LOOKUP_init(X509_LOOKUP *ctx);
20729 int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name,
20730                            X509_OBJECT *ret);
20731 int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name,
20732                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
20733 int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type,
20734                                unsigned char *bytes, int len,
20735                                X509_OBJECT *ret);
20736 int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len,
20737                          X509_OBJECT *ret);
20738 int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
20739 
20740 
20741 int X509_STORE_load_locations(X509_STORE *ctx,
20742                               const char *file, const char *dir);
20743 int X509_STORE_set_default_paths(X509_STORE *ctx);
20744 
20745 
20746 int X509_STORE_CTX_get_ex_new_index(long argl, void *argp,
20747                                     CRYPTO_EX_new *new_func,
20748                                     CRYPTO_EX_dup *dup_func,
20749                                     CRYPTO_EX_free *free_func);
20750 int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data);
20751 void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx);
20752 int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
20753 void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);
20754 int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
20755 X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
20756 X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);
20757 X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);
20758 X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);
20759 struct stack_st_X509 *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
20760 struct stack_st_X509 *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);
20761 void X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x);
20762 void X509_STORE_CTX_set_chain(X509_STORE_CTX *c, struct stack_st_X509 *sk);
20763 void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, struct stack_st_X509_CRL *sk);
20764 int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
20765 int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
20766 int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
20767                                    int purpose, int trust);
20768 void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
20769 void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
20770                              time_t t);
20771 void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
20772                                   int (*verify_cb) (int, X509_STORE_CTX *));
20773 
20774 X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);
20775 int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);
20776 
20777 X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
20778 void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
20779 int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
20780 
20781 /* X509_VERIFY_PARAM functions */
20782 
20783 X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);
20784 void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);
20785 int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,
20786                               const X509_VERIFY_PARAM *from);
20787 int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,
20788                            const X509_VERIFY_PARAM *from);
20789 int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);
20790 int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,
20791                                 unsigned long flags);
20792 int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
20793                                   unsigned long flags);
20794 unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);
20795 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
20796 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
20797 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
20798 void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);
20799 int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,
20800                                   ASN1_OBJECT *policy);
20801 int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param,
20802                                     struct stack_st_ASN1_OBJECT *policies);
20803 
20804 int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param,
20805                                 const char *name, size_t namelen);
20806 int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param,
20807                                 const char *name, size_t namelen);
20808 void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
20809                                      unsigned int flags);
20810 char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *);
20811 int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
20812                                  const char *email, size_t emaillen);
20813 int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
20814                               const unsigned char *ip, size_t iplen);
20815 int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param,
20816                                   const char *ipasc);
20817 
20818 int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
20819 const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param);
20820 
20821 int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
20822 int X509_VERIFY_PARAM_get_count(void);
20823 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id);
20824 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
20825 void X509_VERIFY_PARAM_table_cleanup(void);
20826 
20827 int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
20828                       struct stack_st_X509 *certs,
20829                       struct stack_st_ASN1_OBJECT *policy_oids, unsigned int flags);
20830 
20831 void X509_policy_tree_free(X509_POLICY_TREE *tree);
20832 
20833 int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
20834 X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree,
20835                                                int i);
20836 
20837 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_policies(const
20838                                                            X509_POLICY_TREE
20839                                                            *tree);
20840 
20841 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_user_policies(const
20842                                                                 X509_POLICY_TREE
20843                                                                 *tree);
20844 
20845 int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
20846 
20847 X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level,
20848                                               int i);
20849 
20850 const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
20851 
20852 struct stack_st_POLICYQUALINFO *X509_policy_node_get0_qualifiers(const
20853                                                            X509_POLICY_NODE
20854                                                            *node);
20855 const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE
20856                                                      *node);
20857 # 582 "/usr/include/openssl/x509.h" 2 3 4
20858 # 1 "/usr/include/openssl/pkcs7.h" 1 3 4
20859 /* crypto/pkcs7/pkcs7.h */
20860 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20861  * All rights reserved.
20862  *
20863  * This package is an SSL implementation written
20864  * by Eric Young (eay@cryptsoft.com).
20865  * The implementation was written so as to conform with Netscapes SSL.
20866  *
20867  * This library is free for commercial and non-commercial use as long as
20868  * the following conditions are aheared to.  The following conditions
20869  * apply to all code found in this distribution, be it the RC4, RSA,
20870  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20871  * included with this distribution is covered by the same copyright terms
20872  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20873  *
20874  * Copyright remains Eric Young's, and as such any Copyright notices in
20875  * the code are not to be removed.
20876  * If this package is used in a product, Eric Young should be given attribution
20877  * as the author of the parts of the library used.
20878  * This can be in the form of a textual message at program startup or
20879  * in documentation (online or textual) provided with the package.
20880  *
20881  * Redistribution and use in source and binary forms, with or without
20882  * modification, are permitted provided that the following conditions
20883  * are met:
20884  * 1. Redistributions of source code must retain the copyright
20885  *    notice, this list of conditions and the following disclaimer.
20886  * 2. Redistributions in binary form must reproduce the above copyright
20887  *    notice, this list of conditions and the following disclaimer in the
20888  *    documentation and/or other materials provided with the distribution.
20889  * 3. All advertising materials mentioning features or use of this software
20890  *    must display the following acknowledgement:
20891  *    "This product includes cryptographic software written by
20892  *     Eric Young (eay@cryptsoft.com)"
20893  *    The word 'cryptographic' can be left out if the rouines from the library
20894  *    being used are not cryptographic related :-).
20895  * 4. If you include any Windows specific code (or a derivative thereof) from
20896  *    the apps directory (application code) you must include an acknowledgement:
20897  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20898  *
20899  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20900  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20901  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20902  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20903  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20904  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20905  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20906  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20907  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20908  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20909  * SUCH DAMAGE.
20910  *
20911  * The licence and distribution terms for any publically available version or
20912  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20913  * copied and put under another distribution licence
20914  * [including the GNU Public Licence.]
20915  */
20916 
20917 
20918 
20919 
20920 # 1 "/usr/include/openssl/asn1.h" 1 3 4
20921 /* crypto/asn1/asn1.h */
20922 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20923  * All rights reserved.
20924  *
20925  * This package is an SSL implementation written
20926  * by Eric Young (eay@cryptsoft.com).
20927  * The implementation was written so as to conform with Netscapes SSL.
20928  *
20929  * This library is free for commercial and non-commercial use as long as
20930  * the following conditions are aheared to.  The following conditions
20931  * apply to all code found in this distribution, be it the RC4, RSA,
20932  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20933  * included with this distribution is covered by the same copyright terms
20934  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20935  *
20936  * Copyright remains Eric Young's, and as such any Copyright notices in
20937  * the code are not to be removed.
20938  * If this package is used in a product, Eric Young should be given attribution
20939  * as the author of the parts of the library used.
20940  * This can be in the form of a textual message at program startup or
20941  * in documentation (online or textual) provided with the package.
20942  *
20943  * Redistribution and use in source and binary forms, with or without
20944  * modification, are permitted provided that the following conditions
20945  * are met:
20946  * 1. Redistributions of source code must retain the copyright
20947  *    notice, this list of conditions and the following disclaimer.
20948  * 2. Redistributions in binary form must reproduce the above copyright
20949  *    notice, this list of conditions and the following disclaimer in the
20950  *    documentation and/or other materials provided with the distribution.
20951  * 3. All advertising materials mentioning features or use of this software
20952  *    must display the following acknowledgement:
20953  *    "This product includes cryptographic software written by
20954  *     Eric Young (eay@cryptsoft.com)"
20955  *    The word 'cryptographic' can be left out if the rouines from the library
20956  *    being used are not cryptographic related :-).
20957  * 4. If you include any Windows specific code (or a derivative thereof) from
20958  *    the apps directory (application code) you must include an acknowledgement:
20959  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20960  *
20961  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20962  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20963  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20964  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20965  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20966  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20967  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20968  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20969  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20970  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20971  * SUCH DAMAGE.
20972  *
20973  * The licence and distribution terms for any publically available version or
20974  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20975  * copied and put under another distribution licence
20976  * [including the GNU Public Licence.]
20977  */
20978 # 63 "/usr/include/openssl/pkcs7.h" 2 3 4
20979 # 1 "/usr/include/openssl/bio.h" 1 3 4
20980 /* crypto/bio/bio.h */
20981 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20982  * All rights reserved.
20983  *
20984  * This package is an SSL implementation written
20985  * by Eric Young (eay@cryptsoft.com).
20986  * The implementation was written so as to conform with Netscapes SSL.
20987  *
20988  * This library is free for commercial and non-commercial use as long as
20989  * the following conditions are aheared to.  The following conditions
20990  * apply to all code found in this distribution, be it the RC4, RSA,
20991  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20992  * included with this distribution is covered by the same copyright terms
20993  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20994  *
20995  * Copyright remains Eric Young's, and as such any Copyright notices in
20996  * the code are not to be removed.
20997  * If this package is used in a product, Eric Young should be given attribution
20998  * as the author of the parts of the library used.
20999  * This can be in the form of a textual message at program startup or
21000  * in documentation (online or textual) provided with the package.
21001  *
21002  * Redistribution and use in source and binary forms, with or without
21003  * modification, are permitted provided that the following conditions
21004  * are met:
21005  * 1. Redistributions of source code must retain the copyright
21006  *    notice, this list of conditions and the following disclaimer.
21007  * 2. Redistributions in binary form must reproduce the above copyright
21008  *    notice, this list of conditions and the following disclaimer in the
21009  *    documentation and/or other materials provided with the distribution.
21010  * 3. All advertising materials mentioning features or use of this software
21011  *    must display the following acknowledgement:
21012  *    "This product includes cryptographic software written by
21013  *     Eric Young (eay@cryptsoft.com)"
21014  *    The word 'cryptographic' can be left out if the rouines from the library
21015  *    being used are not cryptographic related :-).
21016  * 4. If you include any Windows specific code (or a derivative thereof) from
21017  *    the apps directory (application code) you must include an acknowledgement:
21018  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
21019  *
21020  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
21021  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21022  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21023  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21024  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21025  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21026  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21027  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21028  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21029  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21030  * SUCH DAMAGE.
21031  *
21032  * The licence and distribution terms for any publically available version or
21033  * derivative of this code cannot be changed.  i.e. this code cannot simply be
21034  * copied and put under another distribution licence
21035  * [including the GNU Public Licence.]
21036  */
21037 # 64 "/usr/include/openssl/pkcs7.h" 2 3 4
21038 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
21039 /* e_os2.h */
21040 /* ====================================================================
21041  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
21042  *
21043  * Redistribution and use in source and binary forms, with or without
21044  * modification, are permitted provided that the following conditions
21045  * are met:
21046  *
21047  * 1. Redistributions of source code must retain the above copyright
21048  *    notice, this list of conditions and the following disclaimer.
21049  *
21050  * 2. Redistributions in binary form must reproduce the above copyright
21051  *    notice, this list of conditions and the following disclaimer in
21052  *    the documentation and/or other materials provided with the
21053  *    distribution.
21054  *
21055  * 3. All advertising materials mentioning features or use of this
21056  *    software must display the following acknowledgment:
21057  *    "This product includes software developed by the OpenSSL Project
21058  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21059  *
21060  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21061  *    endorse or promote products derived from this software without
21062  *    prior written permission. For written permission, please contact
21063  *    openssl-core@openssl.org.
21064  *
21065  * 5. Products derived from this software may not be called "OpenSSL"
21066  *    nor may "OpenSSL" appear in their names without prior written
21067  *    permission of the OpenSSL Project.
21068  *
21069  * 6. Redistributions of any form whatsoever must retain the following
21070  *    acknowledgment:
21071  *    "This product includes software developed by the OpenSSL Project
21072  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21073  *
21074  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21075  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21076  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21077  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21078  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21079  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21080  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21081  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21082  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21083  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21084  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21085  * OF THE POSSIBILITY OF SUCH DAMAGE.
21086  * ====================================================================
21087  *
21088  * This product includes cryptographic software written by Eric Young
21089  * (eay@cryptsoft.com).  This product includes software written by Tim
21090  * Hudson (tjh@cryptsoft.com).
21091  *
21092  */
21093 
21094 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
21095 /* opensslconf.h */
21096 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
21097 
21098 
21099 
21100 
21101 /* OpenSSL was configured with the following options: */
21102 # 108 "/usr/include/openssl/opensslconf.h" 3 4
21103 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
21104    asks for it.  This is a transient feature that is provided for those
21105    who haven't had the time to do the appropriate changes in their
21106    applications.  */
21107 # 204 "/usr/include/openssl/opensslconf.h" 3 4
21108 /* crypto/opensslconf.h.in */
21109 
21110 /* Generate 80386 code? */
21111 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
21112 # 65 "/usr/include/openssl/pkcs7.h" 2 3 4
21113 
21114 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
21115 /* ====================================================================
21116  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
21117  *
21118  * Redistribution and use in source and binary forms, with or without
21119  * modification, are permitted provided that the following conditions
21120  * are met:
21121  *
21122  * 1. Redistributions of source code must retain the above copyright
21123  *    notice, this list of conditions and the following disclaimer.
21124  *
21125  * 2. Redistributions in binary form must reproduce the above copyright
21126  *    notice, this list of conditions and the following disclaimer in
21127  *    the documentation and/or other materials provided with the
21128  *    distribution.
21129  *
21130  * 3. All advertising materials mentioning features or use of this
21131  *    software must display the following acknowledgment:
21132  *    "This product includes software developed by the OpenSSL Project
21133  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21134  *
21135  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21136  *    endorse or promote products derived from this software without
21137  *    prior written permission. For written permission, please contact
21138  *    openssl-core@openssl.org.
21139  *
21140  * 5. Products derived from this software may not be called "OpenSSL"
21141  *    nor may "OpenSSL" appear in their names without prior written
21142  *    permission of the OpenSSL Project.
21143  *
21144  * 6. Redistributions of any form whatsoever must retain the following
21145  *    acknowledgment:
21146  *    "This product includes software developed by the OpenSSL Project
21147  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21148  *
21149  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21150  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21151  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21152  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21153  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21154  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21155  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21156  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21157  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21158  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21159  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21160  * OF THE POSSIBILITY OF SUCH DAMAGE.
21161  * ====================================================================
21162  *
21163  * This product includes cryptographic software written by Eric Young
21164  * (eay@cryptsoft.com).  This product includes software written by Tim
21165  * Hudson (tjh@cryptsoft.com).
21166  *
21167  */
21168 # 67 "/usr/include/openssl/pkcs7.h" 2 3 4
21169 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
21170 /* ====================================================================
21171  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
21172  *
21173  * Redistribution and use in source and binary forms, with or without
21174  * modification, are permitted provided that the following conditions
21175  * are met:
21176  *
21177  * 1. Redistributions of source code must retain the above copyright
21178  *    notice, this list of conditions and the following disclaimer.
21179  *
21180  * 2. Redistributions in binary form must reproduce the above copyright
21181  *    notice, this list of conditions and the following disclaimer in
21182  *    the documentation and/or other materials provided with the
21183  *    distribution.
21184  *
21185  * 3. All advertising materials mentioning features or use of this
21186  *    software must display the following acknowledgment:
21187  *    "This product includes software developed by the OpenSSL Project
21188  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21189  *
21190  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
21191  *    endorse or promote products derived from this software without
21192  *    prior written permission. For written permission, please contact
21193  *    openssl-core@openssl.org.
21194  *
21195  * 5. Products derived from this software may not be called "OpenSSL"
21196  *    nor may "OpenSSL" appear in their names without prior written
21197  *    permission of the OpenSSL Project.
21198  *
21199  * 6. Redistributions of any form whatsoever must retain the following
21200  *    acknowledgment:
21201  *    "This product includes software developed by the OpenSSL Project
21202  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
21203  *
21204  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
21205  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21206  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21207  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
21208  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21209  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21210  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21211  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21212  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21213  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21214  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
21215  * OF THE POSSIBILITY OF SUCH DAMAGE.
21216  * ====================================================================
21217  *
21218  * This product includes cryptographic software written by Eric Young
21219  * (eay@cryptsoft.com).  This product includes software written by Tim
21220  * Hudson (tjh@cryptsoft.com).
21221  *
21222  */
21223 # 68 "/usr/include/openssl/pkcs7.h" 2 3 4
21224 # 79 "/usr/include/openssl/pkcs7.h" 3 4
21225 /*-
21226 Encryption_ID           DES-CBC
21227 Digest_ID               MD5
21228 Digest_Encryption_ID    rsaEncryption
21229 Key_Encryption_ID       rsaEncryption
21230 */
21231 
21232 typedef struct pkcs7_issuer_and_serial_st {
21233     X509_NAME *issuer;
21234     ASN1_INTEGER *serial;
21235 } PKCS7_ISSUER_AND_SERIAL;
21236 
21237 typedef struct pkcs7_signer_info_st {
21238     ASN1_INTEGER *version; /* version 1 */
21239     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
21240     X509_ALGOR *digest_alg;
21241     struct stack_st_X509_ATTRIBUTE *auth_attr; /* [ 0 ] */
21242     X509_ALGOR *digest_enc_alg;
21243     ASN1_OCTET_STRING *enc_digest;
21244     struct stack_st_X509_ATTRIBUTE *unauth_attr; /* [ 1 ] */
21245     /* The private key to sign with */
21246     EVP_PKEY *pkey;
21247 } PKCS7_SIGNER_INFO;
21248 
21249 struct stack_st_PKCS7_SIGNER_INFO { _STACK stack; };
21250 
21251 
21252 typedef struct pkcs7_recip_info_st {
21253     ASN1_INTEGER *version; /* version 0 */
21254     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
21255     X509_ALGOR *key_enc_algor;
21256     ASN1_OCTET_STRING *enc_key;
21257     X509 *cert; /* get the pub-key from this */
21258 } PKCS7_RECIP_INFO;
21259 
21260 struct stack_st_PKCS7_RECIP_INFO { _STACK stack; };
21261 
21262 
21263 typedef struct pkcs7_signed_st {
21264     ASN1_INTEGER *version; /* version 1 */
21265     struct stack_st_X509_ALGOR *md_algs; /* md used */
21266     struct stack_st_X509 *cert; /* [ 0 ] */
21267     struct stack_st_X509_CRL *crl; /* [ 1 ] */
21268     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
21269     struct pkcs7_st *contents;
21270 } PKCS7_SIGNED;
21271 /*
21272  * The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about
21273  * merging the two
21274  */
21275 
21276 typedef struct pkcs7_enc_content_st {
21277     ASN1_OBJECT *content_type;
21278     X509_ALGOR *algorithm;
21279     ASN1_OCTET_STRING *enc_data; /* [ 0 ] */
21280     const EVP_CIPHER *cipher;
21281 } PKCS7_ENC_CONTENT;
21282 
21283 typedef struct pkcs7_enveloped_st {
21284     ASN1_INTEGER *version; /* version 0 */
21285     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
21286     PKCS7_ENC_CONTENT *enc_data;
21287 } PKCS7_ENVELOPE;
21288 
21289 typedef struct pkcs7_signedandenveloped_st {
21290     ASN1_INTEGER *version; /* version 1 */
21291     struct stack_st_X509_ALGOR *md_algs; /* md used */
21292     struct stack_st_X509 *cert; /* [ 0 ] */
21293     struct stack_st_X509_CRL *crl; /* [ 1 ] */
21294     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
21295     PKCS7_ENC_CONTENT *enc_data;
21296     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
21297 } PKCS7_SIGN_ENVELOPE;
21298 
21299 typedef struct pkcs7_digest_st {
21300     ASN1_INTEGER *version; /* version 0 */
21301     X509_ALGOR *md; /* md used */
21302     struct pkcs7_st *contents;
21303     ASN1_OCTET_STRING *digest;
21304 } PKCS7_DIGEST;
21305 
21306 typedef struct pkcs7_encrypted_st {
21307     ASN1_INTEGER *version; /* version 0 */
21308     PKCS7_ENC_CONTENT *enc_data;
21309 } PKCS7_ENCRYPT;
21310 
21311 typedef struct pkcs7_st {
21312     /*
21313      * The following is non NULL if it contains ASN1 encoding of this
21314      * structure
21315      */
21316     unsigned char *asn1;
21317     long length;
21318 
21319 
21320 
21321     int state; /* used during processing */
21322     int detached;
21323     ASN1_OBJECT *type;
21324     /* content as defined by the type */
21325     /*
21326      * all encryption/message digests are applied to the 'contents', leaving
21327      * out the 'type' field.
21328      */
21329     union {
21330         char *ptr;
21331         /* NID_pkcs7_data */
21332         ASN1_OCTET_STRING *data;
21333         /* NID_pkcs7_signed */
21334         PKCS7_SIGNED *sign;
21335         /* NID_pkcs7_enveloped */
21336         PKCS7_ENVELOPE *enveloped;
21337         /* NID_pkcs7_signedAndEnveloped */
21338         PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
21339         /* NID_pkcs7_digest */
21340         PKCS7_DIGEST *digest;
21341         /* NID_pkcs7_encrypted */
21342         PKCS7_ENCRYPT *encrypted;
21343         /* Anything else */
21344         ASN1_TYPE *other;
21345     } d;
21346 } PKCS7;
21347 
21348 struct stack_st_PKCS7 { _STACK stack; };
21349 
21350 
21351 # 227 "/usr/include/openssl/pkcs7.h" 3 4
21352 /* S/MIME related flags */
21353 # 246 "/usr/include/openssl/pkcs7.h" 3 4
21354 /* Flags: for compatibility with older code */
21355 # 258 "/usr/include/openssl/pkcs7.h" 3 4
21356 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;
21357 
21358 int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
21359                                    const EVP_MD *type, unsigned char *md,
21360                                    unsigned int *len);
21361 
21362 PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
21363 int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7);
21364 
21365 PKCS7 *PKCS7_dup(PKCS7 *p7);
21366 PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
21367 int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7);
21368 int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
21369 int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
21370 
21371 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;
21372 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;
21373 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;
21374 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;
21375 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;
21376 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;
21377 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;
21378 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;
21379 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;
21380 
21381 extern const ASN1_ITEM PKCS7_ATTR_SIGN_it;
21382 extern const ASN1_ITEM PKCS7_ATTR_VERIFY_it;
21383 
21384 int i2d_PKCS7_NDEF(PKCS7 *a, unsigned char **out);
21385 int PKCS7_print_ctx(BIO *out, PKCS7 *x, int indent, const ASN1_PCTX *pctx);
21386 
21387 long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
21388 
21389 int PKCS7_set_type(PKCS7 *p7, int type);
21390 int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
21391 int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
21392 int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
21393                           const EVP_MD *dgst);
21394 int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
21395 int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
21396 int PKCS7_add_certificate(PKCS7 *p7, X509 *x509);
21397 int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
21398 int PKCS7_content_new(PKCS7 *p7, int nid);
21399 int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
21400                      BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
21401 int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
21402                           X509 *x509);
21403 
21404 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
21405 int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
21406 BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
21407 
21408 PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
21409                                        EVP_PKEY *pkey, const EVP_MD *dgst);
21410 X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
21411 int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
21412 struct stack_st_PKCS7_SIGNER_INFO *PKCS7_get_signer_info(PKCS7 *p7);
21413 
21414 PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
21415 void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
21416                                  X509_ALGOR **pdig, X509_ALGOR **psig);
21417 void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
21418 int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
21419 int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
21420 int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
21421 int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
21422 
21423 PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
21424 ASN1_OCTET_STRING *PKCS7_digest_from_attributes(struct stack_st_X509_ATTRIBUTE *sk);
21425 int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,
21426                                void *data);
21427 int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
21428                         void *value);
21429 ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid);
21430 ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid);
21431 int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
21432                                 struct stack_st_X509_ATTRIBUTE *sk);
21433 int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
21434                          struct stack_st_X509_ATTRIBUTE *sk);
21435 
21436 PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, struct stack_st_X509 *certs,
21437                   BIO *data, int flags);
21438 
21439 PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
21440                                          X509 *signcert, EVP_PKEY *pkey,
21441                                          const EVP_MD *md, int flags);
21442 
21443 int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
21444 int PKCS7_verify(PKCS7 *p7, struct stack_st_X509 *certs, X509_STORE *store,
21445                  BIO *indata, BIO *out, int flags);
21446 struct stack_st_X509 *PKCS7_get0_signers(PKCS7 *p7, struct stack_st_X509 *certs,
21447                                    int flags);
21448 PKCS7 *PKCS7_encrypt(struct stack_st_X509 *certs, BIO *in, const EVP_CIPHER *cipher,
21449                      int flags);
21450 int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
21451                   int flags);
21452 
21453 int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
21454                               struct stack_st_X509_ALGOR *cap);
21455 struct stack_st_X509_ALGOR *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
21456 int PKCS7_simple_smimecap(struct stack_st_X509_ALGOR *sk, int nid, int arg);
21457 
21458 int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
21459 int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
21460 int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
21461                              const unsigned char *md, int mdlen);
21462 
21463 int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
21464 PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
21465 
21466 BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
21467 
21468 /* BEGIN ERROR CODES */
21469 /*
21470  * The following lines are auto generated by the script mkerr.pl. Any changes
21471  * made after this point may be overwritten when the script is next run.
21472  */
21473 void ERR_load_PKCS7_strings(void);
21474 
21475 /* Error codes for the PKCS7 functions. */
21476 
21477 /* Function codes. */
21478 # 421 "/usr/include/openssl/pkcs7.h" 3 4
21479 /* Reason codes. */
21480 # 583 "/usr/include/openssl/x509.h" 2 3 4
21481 # 592 "/usr/include/openssl/x509.h" 3 4
21482 /* #define      X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */
21483 # 608 "/usr/include/openssl/x509.h" 3 4
21484 void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
21485 X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
21486                                      int (*crl_free) (X509_CRL *crl),
21487                                      int (*crl_lookup) (X509_CRL *crl,
21488                                                         X509_REVOKED **ret,
21489                                                         ASN1_INTEGER *ser,
21490                                                         X509_NAME *issuer),
21491                                      int (*crl_verify) (X509_CRL *crl,
21492                                                         EVP_PKEY *pk));
21493 void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
21494 
21495 void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
21496 void *X509_CRL_get_meth_data(X509_CRL *crl);
21497 
21498 /*
21499  * This one is only used so that a binary form can output, as in
21500  * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf)
21501  */
21502 
21503 
21504 const char *X509_verify_cert_error_string(long n);
21505 
21506 
21507 int X509_verify(X509 *a, EVP_PKEY *r);
21508 
21509 int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
21510 int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);
21511 int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);
21512 
21513 NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len);
21514 char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
21515 EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
21516 int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
21517 
21518 int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
21519 
21520 int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
21521 int X509_signature_print(BIO *bp, X509_ALGOR *alg, ASN1_STRING *sig);
21522 
21523 int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
21524 int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
21525 int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert);
21526 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
21527 int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
21528 int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
21529 int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
21530 int X509_CRL_http_nbio(OCSP_REQ_CTX *rctx, X509_CRL **pcrl);
21531 int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
21532 
21533 int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
21534                        unsigned char *md, unsigned int *len);
21535 int X509_digest(const X509 *data, const EVP_MD *type,
21536                 unsigned char *md, unsigned int *len);
21537 int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,
21538                     unsigned char *md, unsigned int *len);
21539 int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
21540                     unsigned char *md, unsigned int *len);
21541 int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
21542                      unsigned char *md, unsigned int *len);
21543 
21544 
21545 
21546 X509 *d2i_X509_fp(FILE *fp, X509 **x509);
21547 int i2d_X509_fp(FILE *fp, X509 *x509);
21548 X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);
21549 int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl);
21550 X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);
21551 int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req);
21552 
21553 RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);
21554 int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa);
21555 RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);
21556 int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa);
21557 RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
21558 int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa);
21559 
21560 
21561 DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
21562 int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa);
21563 DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
21564 int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa);
21565 
21566 
21567 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
21568 int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
21569 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
21570 int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
21571 
21572 X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);
21573 int i2d_PKCS8_fp(FILE *fp, X509_SIG *p8);
21574 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
21575                                                 PKCS8_PRIV_KEY_INFO **p8inf);
21576 int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf);
21577 int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key);
21578 int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey);
21579 EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
21580 int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey);
21581 EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
21582 
21583 
21584 
21585 X509 *d2i_X509_bio(BIO *bp, X509 **x509);
21586 int i2d_X509_bio(BIO *bp, X509 *x509);
21587 X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
21588 int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl);
21589 X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);
21590 int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req);
21591 
21592 RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);
21593 int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa);
21594 RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
21595 int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa);
21596 RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
21597 int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa);
21598 
21599 
21600 DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
21601 int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa);
21602 DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
21603 int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);
21604 
21605 
21606 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
21607 int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);
21608 EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
21609 int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);
21610 
21611 X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);
21612 int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8);
21613 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
21614                                                  PKCS8_PRIV_KEY_INFO **p8inf);
21615 int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf);
21616 int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key);
21617 int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey);
21618 EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
21619 int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey);
21620 EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
21621 
21622 
21623 X509 *X509_dup(X509 *x509);
21624 X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);
21625 X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex);
21626 X509_CRL *X509_CRL_dup(X509_CRL *crl);
21627 X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev);
21628 X509_REQ *X509_REQ_dup(X509_REQ *req);
21629 X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
21630 int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,
21631                     void *pval);
21632 void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
21633                      X509_ALGOR *algor);
21634 void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
21635 int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
21636 
21637 X509_NAME *X509_NAME_dup(X509_NAME *xn);
21638 X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
21639 
21640 int X509_cmp_time(const ASN1_TIME *s, time_t *t);
21641 int X509_cmp_current_time(const ASN1_TIME *s);
21642 ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
21643 ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
21644                             int offset_day, long offset_sec, time_t *t);
21645 ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj);
21646 
21647 const char *X509_get_default_cert_area(void);
21648 const char *X509_get_default_cert_dir(void);
21649 const char *X509_get_default_cert_file(void);
21650 const char *X509_get_default_cert_dir_env(void);
21651 const char *X509_get_default_cert_file_env(void);
21652 const char *X509_get_default_private_dir(void);
21653 
21654 X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
21655 X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey);
21656 
21657 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;
21658 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;
21659 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;
21660 
21661 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;
21662 
21663 int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
21664 EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key);
21665 int X509_get_pubkey_parameters(EVP_PKEY *pkey, struct stack_st_X509 *chain);
21666 int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp);
21667 EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length);
21668 
21669 int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);
21670 RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length);
21671 
21672 
21673 int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp);
21674 DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
21675 
21676 
21677 int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp);
21678 EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length);
21679 
21680 
21681 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;
21682 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;
21683 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;
21684 
21685 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;
21686 X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
21687 
21688 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;
21689 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;
21690 
21691 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;
21692 
21693 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;
21694 
21695 int X509_NAME_set(X509_NAME **xn, X509_NAME *name);
21696 
21697 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;
21698 
21699 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;
21700 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;
21701 
21702 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;
21703 
21704 int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
21705                           CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
21706 int X509_set_ex_data(X509 *r, int idx, void *arg);
21707 void *X509_get_ex_data(X509 *r, int idx);
21708 int i2d_X509_AUX(X509 *a, unsigned char **pp);
21709 X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length);
21710 
21711 int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
21712 
21713 void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
21714                          const X509 *x);
21715 int X509_get_signature_nid(const X509 *x);
21716 
21717 int X509_alias_set1(X509 *x, unsigned char *name, int len);
21718 int X509_keyid_set1(X509 *x, unsigned char *id, int len);
21719 unsigned char *X509_alias_get0(X509 *x, int *len);
21720 unsigned char *X509_keyid_get0(X509 *x, int *len);
21721 int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
21722                                                                 int);
21723 int X509_TRUST_set(int *t, int trust);
21724 int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
21725 int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj);
21726 void X509_trust_clear(X509 *x);
21727 void X509_reject_clear(X509 *x);
21728 
21729 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;
21730 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;
21731 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;
21732 
21733 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
21734 int X509_CRL_get0_by_serial(X509_CRL *crl,
21735                             X509_REVOKED **ret, ASN1_INTEGER *serial);
21736 int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
21737 
21738 X509_PKEY *X509_PKEY_new(void);
21739 void X509_PKEY_free(X509_PKEY *a);
21740 int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp);
21741 X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp,
21742                          long length);
21743 
21744 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;
21745 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;
21746 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;
21747 
21748 
21749 X509_INFO *X509_INFO_new(void);
21750 void X509_INFO_free(X509_INFO *a);
21751 char *X509_NAME_oneline(X509_NAME *a, char *buf, int size);
21752 
21753 int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,
21754                 ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey);
21755 
21756 int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
21757                 unsigned char *md, unsigned int *len);
21758 
21759 int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1,
21760               X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
21761               char *data, EVP_PKEY *pkey, const EVP_MD *type);
21762 
21763 int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data,
21764                      unsigned char *md, unsigned int *len);
21765 
21766 int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,
21767                      ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey);
21768 
21769 int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1,
21770                    X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data,
21771                    EVP_PKEY *pkey, const EVP_MD *type);
21772 int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
21773                        X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
21774                        void *asn, EVP_MD_CTX *ctx);
21775 
21776 
21777 int X509_set_version(X509 *x, long version);
21778 int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
21779 ASN1_INTEGER *X509_get_serialNumber(X509 *x);
21780 int X509_set_issuer_name(X509 *x, X509_NAME *name);
21781 X509_NAME *X509_get_issuer_name(X509 *a);
21782 int X509_set_subject_name(X509 *x, X509_NAME *name);
21783 X509_NAME *X509_get_subject_name(X509 *a);
21784 int X509_set_notBefore(X509 *x, const ASN1_TIME *tm);
21785 int X509_set_notAfter(X509 *x, const ASN1_TIME *tm);
21786 int X509_set_pubkey(X509 *x, EVP_PKEY *pkey);
21787 EVP_PKEY *X509_get_pubkey(X509 *x);
21788 ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);
21789 int X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ );
21790 
21791 int X509_REQ_set_version(X509_REQ *x, long version);
21792 int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
21793 int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
21794 EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
21795 int X509_REQ_extension_nid(int nid);
21796 int *X509_REQ_get_extension_nids(void);
21797 void X509_REQ_set_extension_nids(int *nids);
21798 struct stack_st_X509_EXTENSION *X509_REQ_get_extensions(X509_REQ *req);
21799 int X509_REQ_add_extensions_nid(X509_REQ *req, struct stack_st_X509_EXTENSION *exts,
21800                                 int nid);
21801 int X509_REQ_add_extensions(X509_REQ *req, struct stack_st_X509_EXTENSION *exts);
21802 int X509_REQ_get_attr_count(const X509_REQ *req);
21803 int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);
21804 int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj,
21805                              int lastpos);
21806 X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
21807 X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
21808 int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
21809 int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
21810                               const ASN1_OBJECT *obj, int type,
21811                               const unsigned char *bytes, int len);
21812 int X509_REQ_add1_attr_by_NID(X509_REQ *req,
21813                               int nid, int type,
21814                               const unsigned char *bytes, int len);
21815 int X509_REQ_add1_attr_by_txt(X509_REQ *req,
21816                               const char *attrname, int type,
21817                               const unsigned char *bytes, int len);
21818 
21819 int X509_CRL_set_version(X509_CRL *x, long version);
21820 int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
21821 int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
21822 int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
21823 int X509_CRL_sort(X509_CRL *crl);
21824 
21825 int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
21826 int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
21827 
21828 X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer,
21829                         EVP_PKEY *skey, const EVP_MD *md, unsigned int flags);
21830 
21831 int X509_REQ_check_private_key(X509_REQ *x509, EVP_PKEY *pkey);
21832 
21833 int X509_check_private_key(X509 *x509, EVP_PKEY *pkey);
21834 int X509_chain_check_suiteb(int *perror_depth,
21835                             X509 *x, struct stack_st_X509 *chain,
21836                             unsigned long flags);
21837 int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags);
21838 struct stack_st_X509 *X509_chain_up_ref(struct stack_st_X509 *chain);
21839 
21840 int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
21841 unsigned long X509_issuer_and_serial_hash(X509 *a);
21842 
21843 int X509_issuer_name_cmp(const X509 *a, const X509 *b);
21844 unsigned long X509_issuer_name_hash(X509 *a);
21845 
21846 int X509_subject_name_cmp(const X509 *a, const X509 *b);
21847 unsigned long X509_subject_name_hash(X509 *x);
21848 
21849 
21850 unsigned long X509_issuer_name_hash_old(X509 *a);
21851 unsigned long X509_subject_name_hash_old(X509 *x);
21852 
21853 
21854 int X509_cmp(const X509 *a, const X509 *b);
21855 int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
21856 unsigned long X509_NAME_hash(X509_NAME *x);
21857 unsigned long X509_NAME_hash_old(X509_NAME *x);
21858 
21859 int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
21860 int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
21861 
21862 int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
21863                      unsigned long cflag);
21864 int X509_print_fp(FILE *bp, X509 *x);
21865 int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
21866 int X509_REQ_print_fp(FILE *bp, X509_REQ *req);
21867 int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent,
21868                           unsigned long flags);
21869 
21870 
21871 
21872 int X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
21873 int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent,
21874                        unsigned long flags);
21875 int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
21876                   unsigned long cflag);
21877 int X509_print(BIO *bp, X509 *x);
21878 int X509_ocspid_print(BIO *bp, X509 *x);
21879 int X509_CERT_AUX_print(BIO *bp, X509_CERT_AUX *x, int indent);
21880 int X509_CRL_print(BIO *bp, X509_CRL *x);
21881 int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
21882                       unsigned long cflag);
21883 int X509_REQ_print(BIO *bp, X509_REQ *req);
21884 
21885 
21886 int X509_NAME_entry_count(X509_NAME *name);
21887 int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);
21888 int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
21889                               char *buf, int len);
21890 
21891 /*
21892  * NOTE: you should be passsing -1, not 0 as lastpos.  The functions that use
21893  * lastpos, search after that position on.
21894  */
21895 int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
21896 int X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
21897                                int lastpos);
21898 X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
21899 X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
21900 int X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne,
21901                         int loc, int set);
21902 int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type,
21903                                unsigned char *bytes, int len, int loc,
21904                                int set);
21905 int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
21906                                unsigned char *bytes, int len, int loc,
21907                                int set);
21908 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
21909                                                const char *field, int type,
21910                                                const unsigned char *bytes,
21911                                                int len);
21912 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
21913                                                int type, unsigned char *bytes,
21914                                                int len);
21915 int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
21916                                const unsigned char *bytes, int len, int loc,
21917                                int set);
21918 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
21919                                                ASN1_OBJECT *obj, int type,
21920                                                const unsigned char *bytes,
21921                                                int len);
21922 int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj);
21923 int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
21924                              const unsigned char *bytes, int len);
21925 ASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
21926 ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
21927 
21928 int X509v3_get_ext_count(const struct stack_st_X509_EXTENSION *x);
21929 int X509v3_get_ext_by_NID(const struct stack_st_X509_EXTENSION *x,
21930                           int nid, int lastpos);
21931 int X509v3_get_ext_by_OBJ(const struct stack_st_X509_EXTENSION *x,
21932                           ASN1_OBJECT *obj, int lastpos);
21933 int X509v3_get_ext_by_critical(const struct stack_st_X509_EXTENSION *x,
21934                                int crit, int lastpos);
21935 X509_EXTENSION *X509v3_get_ext(const struct stack_st_X509_EXTENSION *x, int loc);
21936 X509_EXTENSION *X509v3_delete_ext(struct stack_st_X509_EXTENSION *x, int loc);
21937 struct stack_st_X509_EXTENSION *X509v3_add_ext(struct stack_st_X509_EXTENSION **x,
21938                                          X509_EXTENSION *ex, int loc);
21939 
21940 int X509_get_ext_count(X509 *x);
21941 int X509_get_ext_by_NID(X509 *x, int nid, int lastpos);
21942 int X509_get_ext_by_OBJ(X509 *x, ASN1_OBJECT *obj, int lastpos);
21943 int X509_get_ext_by_critical(X509 *x, int crit, int lastpos);
21944 X509_EXTENSION *X509_get_ext(X509 *x, int loc);
21945 X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
21946 int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
21947 void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
21948 int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
21949                       unsigned long flags);
21950 
21951 int X509_CRL_get_ext_count(X509_CRL *x);
21952 int X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos);
21953 int X509_CRL_get_ext_by_OBJ(X509_CRL *x, ASN1_OBJECT *obj, int lastpos);
21954 int X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos);
21955 X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc);
21956 X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
21957 int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
21958 void *X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx);
21959 int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
21960                           unsigned long flags);
21961 
21962 int X509_REVOKED_get_ext_count(X509_REVOKED *x);
21963 int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos);
21964 int X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x, ASN1_OBJECT *obj,
21965                                 int lastpos);
21966 int X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos);
21967 X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc);
21968 X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
21969 int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
21970 void *X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx);
21971 int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
21972                               unsigned long flags);
21973 
21974 X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
21975                                              int nid, int crit,
21976                                              ASN1_OCTET_STRING *data);
21977 X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
21978                                              ASN1_OBJECT *obj, int crit,
21979                                              ASN1_OCTET_STRING *data);
21980 int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj);
21981 int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
21982 int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
21983 ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);
21984 ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
21985 int X509_EXTENSION_get_critical(X509_EXTENSION *ex);
21986 
21987 int X509at_get_attr_count(const struct stack_st_X509_ATTRIBUTE *x);
21988 int X509at_get_attr_by_NID(const struct stack_st_X509_ATTRIBUTE *x, int nid,
21989                            int lastpos);
21990 int X509at_get_attr_by_OBJ(const struct stack_st_X509_ATTRIBUTE *sk,
21991                            ASN1_OBJECT *obj, int lastpos);
21992 X509_ATTRIBUTE *X509at_get_attr(const struct stack_st_X509_ATTRIBUTE *x, int loc);
21993 X509_ATTRIBUTE *X509at_delete_attr(struct stack_st_X509_ATTRIBUTE *x, int loc);
21994 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr(struct stack_st_X509_ATTRIBUTE **x,
21995                                            X509_ATTRIBUTE *attr);
21996 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_OBJ(struct stack_st_X509_ATTRIBUTE
21997                                                   **x, const ASN1_OBJECT *obj,
21998                                                   int type,
21999                                                   const unsigned char *bytes,
22000                                                   int len);
22001 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_NID(struct stack_st_X509_ATTRIBUTE
22002                                                   **x, int nid, int type,
22003                                                   const unsigned char *bytes,
22004                                                   int len);
22005 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_txt(struct stack_st_X509_ATTRIBUTE
22006                                                   **x, const char *attrname,
22007                                                   int type,
22008                                                   const unsigned char *bytes,
22009                                                   int len);
22010 void *X509at_get0_data_by_OBJ(struct stack_st_X509_ATTRIBUTE *x, ASN1_OBJECT *obj,
22011                               int lastpos, int type);
22012 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
22013                                              int atrtype, const void *data,
22014                                              int len);
22015 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
22016                                              const ASN1_OBJECT *obj,
22017                                              int atrtype, const void *data,
22018                                              int len);
22019 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
22020                                              const char *atrname, int type,
22021                                              const unsigned char *bytes,
22022                                              int len);
22023 int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);
22024 int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,
22025                              const void *data, int len);
22026 void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype,
22027                                void *data);
22028 int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr);
22029 ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
22030 ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
22031 
22032 int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
22033 int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);
22034 int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj,
22035                              int lastpos);
22036 X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
22037 X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
22038 int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
22039 int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
22040                               const ASN1_OBJECT *obj, int type,
22041                               const unsigned char *bytes, int len);
22042 int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
22043                               int nid, int type,
22044                               const unsigned char *bytes, int len);
22045 int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
22046                               const char *attrname, int type,
22047                               const unsigned char *bytes, int len);
22048 
22049 int X509_verify_cert(X509_STORE_CTX *ctx);
22050 
22051 /* lookup a cert from a X509 STACK */
22052 X509 *X509_find_by_issuer_and_serial(struct stack_st_X509 *sk, X509_NAME *name,
22053                                      ASN1_INTEGER *serial);
22054 X509 *X509_find_by_subject(struct stack_st_X509 *sk, X509_NAME *name);
22055 
22056 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;
22057 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;
22058 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;
22059 
22060 int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
22061                          const unsigned char *salt, int saltlen);
22062 
22063 X509_ALGOR *PKCS5_pbe_set(int alg, int iter,
22064                           const unsigned char *salt, int saltlen);
22065 X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
22066                            unsigned char *salt, int saltlen);
22067 X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
22068                               unsigned char *salt, int saltlen,
22069                               unsigned char *aiv, int prf_nid);
22070 
22071 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
22072                              int prf_nid, int keylen);
22073 
22074 /* PKCS#8 utilities */
22075 
22076 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;
22077 
22078 EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8);
22079 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey);
22080 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken);
22081 PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);
22082 
22083 int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,
22084                     int version, int ptype, void *pval,
22085                     unsigned char *penc, int penclen);
22086 int PKCS8_pkey_get0(ASN1_OBJECT **ppkalg,
22087                     const unsigned char **pk, int *ppklen,
22088                     X509_ALGOR **pa, PKCS8_PRIV_KEY_INFO *p8);
22089 
22090 int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
22091                            int ptype, void *pval,
22092                            unsigned char *penc, int penclen);
22093 int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
22094                            const unsigned char **pk, int *ppklen,
22095                            X509_ALGOR **pa, X509_PUBKEY *pub);
22096 
22097 int X509_check_trust(X509 *x, int id, int flags);
22098 int X509_TRUST_get_count(void);
22099 X509_TRUST *X509_TRUST_get0(int idx);
22100 int X509_TRUST_get_by_id(int id);
22101 int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int),
22102                    char *name, int arg1, void *arg2);
22103 void X509_TRUST_cleanup(void);
22104 int X509_TRUST_get_flags(X509_TRUST *xp);
22105 char *X509_TRUST_get0_name(X509_TRUST *xp);
22106 int X509_TRUST_get_trust(X509_TRUST *xp);
22107 
22108 /* BEGIN ERROR CODES */
22109 /*
22110  * The following lines are auto generated by the script mkerr.pl. Any changes
22111  * made after this point may be overwritten when the script is next run.
22112  */
22113 
22114 void ERR_load_X509_strings(void);
22115 
22116 /* Error codes for the X509 functions. */
22117 
22118 /* Function codes. */
22119 # 1291 "/usr/include/openssl/x509.h" 3 4
22120 /* Reason codes. */
22121 # 45 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
22122 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 1
22123 /*
22124  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
22125  *
22126  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22127  * Use is subject to license terms.
22128  */
22129 
22130 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
22131 /*	  All Rights Reserved  	*/
22132 
22133 /*
22134  * BIND 4.9.3:
22135  *
22136  * Copyright (c) 1980, 1983, 1988, 1993
22137  *	The Regents of the University of California.  All rights reserved.
22138  *
22139  * Redistribution and use in source and binary forms, with or without
22140  * modification, are permitted provided that the following conditions
22141  * are met:
22142  * 1. Redistributions of source code must retain the above copyright
22143  *    notice, this list of conditions and the following disclaimer.
22144  * 2. Redistributions in binary form must reproduce the above copyright
22145  *    notice, this list of conditions and the following disclaimer in the
22146  *    documentation and/or other materials provided with the distribution.
22147  * 3. All advertising materials mentioning features or use of this software
22148  *    must display the following acknowledgement:
22149  *	This product includes software developed by the University of
22150  *	California, Berkeley and its contributors.
22151  * 4. Neither the name of the University nor the names of its contributors
22152  *    may be used to endorse or promote products derived from this software
22153  *    without specific prior written permission.
22154  *
22155  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22156  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22157  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22158  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22159  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22160  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22161  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22162  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22163  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22164  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22165  * SUCH DAMAGE.
22166  * -
22167  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
22168  *
22169  * Permission to use, copy, modify, and distribute this software for any
22170  * purpose with or without fee is hereby granted, provided that the above
22171  * copyright notice and this permission notice appear in all copies, and that
22172  * the name of Digital Equipment Corporation not be used in advertising or
22173  * publicity pertaining to distribution of the document or software without
22174  * specific, written prior permission.
22175  *
22176  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
22177  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
22178  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
22179  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
22180  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
22181  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
22182  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22183  * SOFTWARE.
22184  * --Copyright--
22185  *
22186  * End BIND 4.9.3
22187  */
22188 
22189 /*
22190  * Structures returned by network data base library.
22191  * All addresses are supplied in host order, and
22192  * returned in network order (suitable for use in system calls).
22193  */
22194 
22195 
22196 
22197 
22198 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
22199 /*
22200  * CDDL HEADER START
22201  *
22202  * The contents of this file are subject to the terms of the
22203  * Common Development and Distribution License (the "License").
22204  * You may not use this file except in compliance with the License.
22205  *
22206  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22207  * or http://www.opensolaris.org/os/licensing.
22208  * See the License for the specific language governing permissions
22209  * and limitations under the License.
22210  *
22211  * When distributing Covered Code, include this CDDL HEADER in each
22212  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22213  * If applicable, add the following below this CDDL HEADER, with the
22214  * fields enclosed by brackets "[]" replaced with your own identifying
22215  * information: Portions Copyright [yyyy] [name of copyright owner]
22216  *
22217  * CDDL HEADER END
22218  */
22219 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22220 /*	  All Rights Reserved  	*/
22221 
22222 
22223 /*
22224  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22225  * Use is subject to license terms.
22226  *
22227  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
22228  * Copyright 2016 Joyent, Inc.
22229  */
22230 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
22231 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
22232 /*
22233  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22234  * Use is subject to license terms.
22235  *
22236  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
22237  */
22238 /*
22239  * Copyright (c) 1982, 1986 Regents of the University of California.
22240  * All rights reserved.
22241  *
22242  * Redistribution and use in source and binary forms are permitted
22243  * provided that this notice is preserved and that due credit is given
22244  * to the University of California at Berkeley. The name of the University
22245  * may not be used to endorse or promote products derived from this
22246  * software without specific prior written permission. This software
22247  * is provided ``as is'' without express or implied warranty.
22248  */
22249 
22250 /*
22251  * Constants and structures defined by the internet system,
22252  * according to following documents
22253  *
22254  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
22255  *	http://www.iana.org/assignments/protocol-numbers
22256  *	http://www.iana.org/assignments/port-numbers
22257  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
22258  *
22259  */
22260 
22261 
22262 
22263 
22264 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
22265 /*
22266  * CDDL HEADER START
22267  *
22268  * The contents of this file are subject to the terms of the
22269  * Common Development and Distribution License (the "License").
22270  * You may not use this file except in compliance with the License.
22271  *
22272  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22273  * or http://www.opensolaris.org/os/licensing.
22274  * See the License for the specific language governing permissions
22275  * and limitations under the License.
22276  *
22277  * When distributing Covered Code, include this CDDL HEADER in each
22278  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22279  * If applicable, add the following below this CDDL HEADER, with the
22280  * fields enclosed by brackets "[]" replaced with your own identifying
22281  * information: Portions Copyright [yyyy] [name of copyright owner]
22282  *
22283  * CDDL HEADER END
22284  */
22285 
22286 /*
22287  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
22288  * Copyright 2016 Joyent, Inc.
22289  *
22290  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
22291  * Use is subject to license terms.
22292  */
22293 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
22294 
22295 
22296 
22297 
22298 
22299 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
22300 /*
22301  * CDDL HEADER START
22302  *
22303  * The contents of this file are subject to the terms of the
22304  * Common Development and Distribution License (the "License").
22305  * You may not use this file except in compliance with the License.
22306  *
22307  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22308  * or http://www.opensolaris.org/os/licensing.
22309  * See the License for the specific language governing permissions
22310  * and limitations under the License.
22311  *
22312  * When distributing Covered Code, include this CDDL HEADER in each
22313  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22314  * If applicable, add the following below this CDDL HEADER, with the
22315  * fields enclosed by brackets "[]" replaced with your own identifying
22316  * information: Portions Copyright [yyyy] [name of copyright owner]
22317  *
22318  * CDDL HEADER END
22319  */
22320 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22321 /*	  All Rights Reserved  	*/
22322 
22323 
22324 /*
22325  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22326  * Use is subject to license terms.
22327  *
22328  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
22329  * Copyright 2016 Joyent, Inc.
22330  */
22331 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
22332 
22333 
22334 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
22335 /*
22336  * CDDL HEADER START
22337  *
22338  * The contents of this file are subject to the terms of the
22339  * Common Development and Distribution License (the "License").
22340  * You may not use this file except in compliance with the License.
22341  *
22342  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22343  * or http://www.opensolaris.org/os/licensing.
22344  * See the License for the specific language governing permissions
22345  * and limitations under the License.
22346  *
22347  * When distributing Covered Code, include this CDDL HEADER in each
22348  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22349  * If applicable, add the following below this CDDL HEADER, with the
22350  * fields enclosed by brackets "[]" replaced with your own identifying
22351  * information: Portions Copyright [yyyy] [name of copyright owner]
22352  *
22353  * CDDL HEADER END
22354  */
22355 /*
22356  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22357  * Use is subject to license terms.
22358  */
22359 
22360 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
22361 /*	  All Rights Reserved	*/
22362 
22363 /*
22364  * Portions of this source code were derived from Berkeley 4.3 BSD
22365  * under license from the Regents of the University of California.
22366  */
22367 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h"
22368 typedef uint16_t sa_family_t;
22369 
22370 
22371 /*
22372  * Structure used by kernel to store most
22373  * addresses.
22374  */
22375 struct sockaddr {
22376  sa_family_t sa_family; /* address family */
22377  char sa_data[14]; /* up to 14 bytes of direct address */
22378 };
22379 
22380 
22381 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h" 1
22382 /*
22383  * CDDL HEADER START
22384  *
22385  * The contents of this file are subject to the terms of the
22386  * Common Development and Distribution License (the "License").
22387  * You may not use this file except in compliance with the License.
22388  *
22389  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22390  * or http://www.opensolaris.org/os/licensing.
22391  * See the License for the specific language governing permissions
22392  * and limitations under the License.
22393  *
22394  * When distributing Covered Code, include this CDDL HEADER in each
22395  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22396  * If applicable, add the following below this CDDL HEADER, with the
22397  * fields enclosed by brackets "[]" replaced with your own identifying
22398  * information: Portions Copyright [yyyy] [name of copyright owner]
22399  *
22400  * CDDL HEADER END
22401  */
22402 /*
22403  * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
22404  */
22405 
22406 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
22407 /*	  All Rights Reserved  	*/
22408 
22409 /*
22410  * University Copyright- Copyright (c) 1982, 1986, 1988
22411  * The Regents of the University of California
22412  * All Rights Reserved
22413  *
22414  * University Acknowledgment- Portions of this document are derived from
22415  * software developed by the University of California, Berkeley, and its
22416  * contributors.
22417  */
22418 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
22419 /*
22420  * Definitions for UNIX IPC domain.
22421  */
22422 struct sockaddr_un {
22423  sa_family_t sun_family; /* AF_UNIX */
22424  char sun_path[108]; /* path name (gag) */
22425 };
22426 
22427 
22428 
22429 /*
22430  * NOTE: If we ever go to BSD-style sun_len + sun_family, this macro needs to
22431  * change.
22432  *
22433  * Also, include a strlen() prototype, and we have to protect it w.r.t.
22434  * UNIX{98,03}.  And because there's strlen, we need size_t as well.
22435  */
22436 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
22437 extern size_t strlen(const char *);
22438 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
22439 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if_dl.h" 1
22440 /*
22441  * Copyright 1993-2003 Sun Microsystems, Inc.  All rights reserved.
22442  * Use is subject to license terms.
22443  */
22444 /*
22445  * Copyright (c) 1990, 1993
22446  *	The Regents of the University of California.  All rights reserved.
22447  *
22448  * Redistribution and use in source and binary forms, with or without
22449  * modification, are permitted provided that the following conditions
22450  * are met:
22451  * 1. Redistributions of source code must retain the above copyright
22452  *    notice, this list of conditions and the following disclaimer.
22453  * 2. Redistributions in binary form must reproduce the above copyright
22454  *    notice, this list of conditions and the following disclaimer in the
22455  *    documentation and/or other materials provided with the distribution.
22456  * 3. All advertising materials mentioning features or use of this software
22457  *    must display the following acknowledgement:
22458  *	This product includes software developed by the University of
22459  *	California, Berkeley and its contributors.
22460  * 4. Neither the name of the University nor the names of its contributors
22461  *    may be used to endorse or promote products derived from this software
22462  *    without specific prior written permission.
22463  *
22464  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22465  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22466  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22467  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22468  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22469  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22470  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22471  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22472  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22473  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22474  * SUCH DAMAGE.
22475  */
22476 
22477 
22478 
22479 
22480 #pragma ident "%Z%%M%	%I%	%E% SMI"
22481 /* from UCB 8.1 (Berkeley) 6/10/93 */
22482 
22483 
22484 
22485 
22486 
22487 /*
22488  * A Link-Level Sockaddr may specify the interface in one of two
22489  * ways: either by means of a system-provided index number (computed
22490  * anew and possibly differently on every reboot), or by a human-readable
22491  * string such as "il0" (for managerial convenience).
22492  *
22493  * Census taking actions, such as something akin to SIOCGCONF would return
22494  * both the index and the human name.
22495  *
22496  * High volume transactions (such as giving a link-level ``from'' address
22497  * in a recvfrom or recvmsg call) may be likely only to provide the indexed
22498  * form, (which requires fewer copy operations and less space).
22499  *
22500  * The form and interpretation  of the link-level address is purely a matter
22501  * of convention between the device driver and its consumers; however, it is
22502  * expected that all drivers for an interface of a given if_type will agree.
22503  */
22504 
22505 /*
22506  * Structure of a Link-Level sockaddr:
22507  */
22508 struct sockaddr_dl {
22509  ushort_t sdl_family; /* AF_LINK */
22510  ushort_t sdl_index; /* if != 0, system given index for interface */
22511  uchar_t sdl_type; /* interface type */
22512  uchar_t sdl_nlen; /* interface name length, no trailing 0 reqd. */
22513  uchar_t sdl_alen; /* link level address length */
22514  uchar_t sdl_slen; /* link layer selector length */
22515  char sdl_data[244]; /* contains both if name and ll address */
22516 };
22517 
22518 
22519 
22520 
22521 extern char *_link_ntoa(const unsigned char *, char *, int, int);
22522 extern unsigned char *_link_aton(const char *, int *);
22523 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
22524 
22525 
22526 
22527 /*
22528  * sockaddr_storage:
22529  * Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
22530  * structures. Has sufficient size and alignment for those sockaddrs.
22531  */
22532 
22533 /*
22534  * Desired maximum size, alignment size and related types.
22535  */
22536 
22537 
22538 /*
22539  * To represent desired sockaddr max alignment for platform, a
22540  * type is chosen which may depend on implementation platform architecture.
22541  * Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
22542  * We desire to force up to (but no more than) 64-bit (8 byte) alignment,
22543  * on platforms where it is possible to do so. (e.g not possible on ia32).
22544  * For all currently supported platforms by our implementation
22545  * in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
22546  * type "double" is suitable for that intent.
22547  *
22548  * Note: Type "double" is chosen over the more obvious integer type int64_t.
22549  *   int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
22550  */
22551 typedef double sockaddr_maxalign_t;
22552 
22553 
22554 
22555 /*
22556  * Definitions used for sockaddr_storage structure paddings design.
22557  */
22558 
22559 
22560 
22561 
22562 struct sockaddr_storage {
22563  sa_family_t ss_family; /* Address family */
22564  /* Following fields are implementation specific */
22565  char _ss_pad1[((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t))];
22566  sockaddr_maxalign_t _ss_align;
22567  char _ss_pad2[(256 - (sizeof (sa_family_t)+ ((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t)) + (sizeof (sockaddr_maxalign_t))))];
22568 };
22569 
22570 
22571 /*
22572  * To be compatible with the Linux interfaces used, this structure is
22573  * placed in socket_impl.h so that an include for <sys/socket.h> will
22574  * pickup this structure. This structure is for use with PF_PACKET
22575  * sockets.
22576  */
22577 struct sockaddr_ll {
22578  uint16_t sll_family;
22579  uint16_t sll_protocol;
22580  int32_t sll_ifindex;
22581  uint16_t sll_hatype;
22582  uint8_t sll_pkttype;
22583  uint8_t sll_halen;
22584  uint8_t sll_addr[8];
22585 };
22586 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
22587 
22588 
22589 
22590 
22591 
22592 /*
22593  * The socklen definitions are reproduced here from sys/socket.h so as to
22594  * not introduce that namespace into existing users of netinet/in.h.
22595  */
22596 
22597 
22598 
22599 typedef uint32_t socklen_t;
22600 
22601 
22602 
22603 
22604 
22605 typedef void *Psocklen_t;
22606 
22607 
22608 
22609 
22610 
22611 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 1
22612 /*
22613  * CDDL HEADER START
22614  *
22615  * The contents of this file are subject to the terms of the
22616  * Common Development and Distribution License (the "License").
22617  * You may not use this file except in compliance with the License.
22618  *
22619  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22620  * or http://www.opensolaris.org/os/licensing.
22621  * See the License for the specific language governing permissions
22622  * and limitations under the License.
22623  *
22624  * When distributing Covered Code, include this CDDL HEADER in each
22625  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22626  * If applicable, add the following below this CDDL HEADER, with the
22627  * fields enclosed by brackets "[]" replaced with your own identifying
22628  * information: Portions Copyright [yyyy] [name of copyright owner]
22629  *
22630  * CDDL HEADER END
22631  */
22632 /*
22633  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22634  * Use is subject to license terms.
22635  */
22636 
22637 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22638 /*	  All Rights Reserved  	*/
22639 
22640 
22641 
22642 
22643 
22644 /*
22645  * For source compatibility
22646  */
22647 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
22648 /*
22649  * CDDL HEADER START
22650  *
22651  * The contents of this file are subject to the terms of the
22652  * Common Development and Distribution License (the "License").
22653  * You may not use this file except in compliance with the License.
22654  *
22655  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22656  * or http://www.opensolaris.org/os/licensing.
22657  * See the License for the specific language governing permissions
22658  * and limitations under the License.
22659  *
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 /*
22671  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
22672  * Use is subject to license terms.
22673  * Copyright 2016 Joyent, Inc.
22674  */
22675 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
22676 
22677 
22678 
22679 
22680 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h" 1
22681 /*
22682  * CDDL HEADER START
22683  *
22684  * The contents of this file are subject to the terms of the
22685  * Common Development and Distribution License, Version 1.0 only
22686  * (the "License").  You may not use this file except in compliance
22687  * with the License.
22688  *
22689  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22690  * or http://www.opensolaris.org/os/licensing.
22691  * See the License for the specific language governing permissions
22692  * and limitations under the License.
22693  *
22694  * When distributing Covered Code, include this CDDL HEADER in each
22695  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22696  * If applicable, add the following below this CDDL HEADER, with the
22697  * fields enclosed by brackets "[]" replaced with your own identifying
22698  * information: Portions Copyright [yyyy] [name of copyright owner]
22699  *
22700  * CDDL HEADER END
22701  */
22702 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22703 /*	  All Rights Reserved  	*/
22704 
22705 
22706 /*
22707  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
22708  *
22709  * Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
22710  * All rights reserved.
22711  */
22712 
22713 /*
22714  * Copyright 2015, Joyent, Inc.
22715  */
22716 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
22717 /*
22718  * Structure of file descriptor/event pairs supplied in
22719  * the poll arrays.
22720  */
22721 typedef struct pollfd {
22722  int fd; /* file desc to poll */
22723  short events; /* events of interest on fd */
22724  short revents; /* events that occurred on fd */
22725 } pollfd_t;
22726 
22727 typedef unsigned long nfds_t;
22728 
22729 /*
22730  * Testable select events
22731  */
22732 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
22733 /*
22734  * Non-testable poll events (may not be specified in events field,
22735  * but may be returned in revents field).
22736  */
22737 
22738 
22739 
22740 
22741 /*
22742  * These events will never be specified in revents, but may be specified in
22743  * events to control /dev/poll behavior.
22744  */
22745 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
22746 int poll(struct pollfd *, nfds_t, int);
22747 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
22748 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/strmdep.h" 1
22749 /*
22750  * CDDL HEADER START
22751  *
22752  * The contents of this file are subject to the terms of the
22753  * Common Development and Distribution License, Version 1.0 only
22754  * (the "License").  You may not use this file except in compliance
22755  * with the License.
22756  *
22757  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22758  * or http://www.opensolaris.org/os/licensing.
22759  * See the License for the specific language governing permissions
22760  * and limitations under the License.
22761  *
22762  * When distributing Covered Code, include this CDDL HEADER in each
22763  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22764  * If applicable, add the following below this CDDL HEADER, with the
22765  * fields enclosed by brackets "[]" replaced with your own identifying
22766  * information: Portions Copyright [yyyy] [name of copyright owner]
22767  *
22768  * CDDL HEADER END
22769  */
22770 /*
22771  * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
22772  * All rights reserved.
22773  */
22774 
22775 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22776 /*	  All Rights Reserved  	*/
22777 
22778 
22779 
22780 
22781 
22782 #pragma ident "%Z%%M%	%I%	%E% SMI"
22783 
22784 
22785 
22786 
22787 
22788 /*
22789  * This file contains all machine-dependent declarations
22790  * in STREAMS.
22791  */
22792 
22793 /*
22794  * Copy data from one data buffer to another.
22795  * The addresses must be word aligned - if not, use bcopy!
22796  */
22797 
22798 
22799 /*
22800  * save the address of the calling function on the 3b2 to
22801  * enable tracking of who is allocating message blocks
22802  */
22803 
22804 
22805 /*
22806  * macro to check pointer alignment
22807  * (true if alignment is sufficient for worst case)
22808  */
22809 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
22810 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
22811 /*
22812  * CDDL HEADER START
22813  *
22814  * The contents of this file are subject to the terms of the
22815  * Common Development and Distribution License (the "License").
22816  * You may not use this file except in compliance with the License.
22817  *
22818  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22819  * or http://www.opensolaris.org/os/licensing.
22820  * See the License for the specific language governing permissions
22821  * and limitations under the License.
22822  *
22823  * When distributing Covered Code, include this CDDL HEADER in each
22824  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22825  * If applicable, add the following below this CDDL HEADER, with the
22826  * fields enclosed by brackets "[]" replaced with your own identifying
22827  * information: Portions Copyright [yyyy] [name of copyright owner]
22828  *
22829  * CDDL HEADER END
22830  */
22831 /*
22832  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22833  * Use is subject to license terms.
22834  */
22835 
22836 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
22837 /*	  All Rights Reserved  	*/
22838 
22839 /*
22840  * Portions of this source code were derived from Berkeley 4.3 BSD
22841  * under license from the Regents of the University of California.
22842  */
22843 
22844 
22845 
22846 
22847 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
22848 /*
22849  * CDDL HEADER START
22850  *
22851  * The contents of this file are subject to the terms of the
22852  * Common Development and Distribution License (the "License").
22853  * You may not use this file except in compliance with the License.
22854  *
22855  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22856  * or http://www.opensolaris.org/os/licensing.
22857  * See the License for the specific language governing permissions
22858  * and limitations under the License.
22859  *
22860  * When distributing Covered Code, include this CDDL HEADER in each
22861  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22862  * If applicable, add the following below this CDDL HEADER, with the
22863  * fields enclosed by brackets "[]" replaced with your own identifying
22864  * information: Portions Copyright [yyyy] [name of copyright owner]
22865  *
22866  * CDDL HEADER END
22867  */
22868 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22869 /*	  All Rights Reserved  	*/
22870 
22871 
22872 /*
22873  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22874  * Use is subject to license terms.
22875  *
22876  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
22877  * Copyright 2016 Joyent, Inc.
22878  */
22879 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 2
22880 
22881 
22882 
22883 
22884 
22885 /*
22886  * The credential is an opaque kernel private data structure defined in
22887  * <sys/cred_impl.h>.
22888  */
22889 
22890 typedef struct cred cred_t;
22891 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
22892 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 1
22893 /*
22894  * CDDL HEADER START
22895  *
22896  * The contents of this file are subject to the terms of the
22897  * Common Development and Distribution License, Version 1.0 only
22898  * (the "License").  You may not use this file except in compliance
22899  * with the License.
22900  *
22901  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22902  * or http://www.opensolaris.org/os/licensing.
22903  * See the License for the specific language governing permissions
22904  * and limitations under the License.
22905  *
22906  * When distributing Covered Code, include this CDDL HEADER in each
22907  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22908  * If applicable, add the following below this CDDL HEADER, with the
22909  * fields enclosed by brackets "[]" replaced with your own identifying
22910  * information: Portions Copyright [yyyy] [name of copyright owner]
22911  *
22912  * CDDL HEADER END
22913  */
22914 /*
22915  * Copyright (c) 1991-1998 by Sun Microsystems, Inc.
22916  * All rights reserved.
22917  */
22918 
22919 /*
22920  * t_lock.h:	Prototypes for disp_locks, plus include files
22921  *		that describe the interfaces to kernel synch.
22922  *		objects.
22923  */
22924 
22925 
22926 
22927 
22928 #pragma ident "%Z%%M%	%I%	%E% SMI"
22929 
22930 
22931 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 1
22932 /*
22933  * CDDL HEADER START
22934  *
22935  * The contents of this file are subject to the terms of the
22936  * Common Development and Distribution License (the "License").
22937  * You may not use this file except in compliance with the License.
22938  *
22939  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22940  * or http://www.opensolaris.org/os/licensing.
22941  * See the License for the specific language governing permissions
22942  * and limitations under the License.
22943  *
22944  * When distributing Covered Code, include this CDDL HEADER in each
22945  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22946  * If applicable, add the following below this CDDL HEADER, with the
22947  * fields enclosed by brackets "[]" replaced with your own identifying
22948  * information: Portions Copyright [yyyy] [name of copyright owner]
22949  *
22950  * CDDL HEADER END
22951  */
22952 /*
22953  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
22954  * Use is subject to license terms.
22955  * Copyright 2016 Joyent, Inc.
22956  */
22957 
22958 
22959 
22960 
22961 #pragma ident "%Z%%M%	%I%	%E% SMI"
22962 
22963 
22964 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
22965 /*
22966  * CDDL HEADER START
22967  *
22968  * The contents of this file are subject to the terms of the
22969  * Common Development and Distribution License (the "License").
22970  * You may not use this file except in compliance with the License.
22971  *
22972  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22973  * or http://www.opensolaris.org/os/licensing.
22974  * See the License for the specific language governing permissions
22975  * and limitations under the License.
22976  *
22977  * When distributing Covered Code, include this CDDL HEADER in each
22978  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22979  * If applicable, add the following below this CDDL HEADER, with the
22980  * fields enclosed by brackets "[]" replaced with your own identifying
22981  * information: Portions Copyright [yyyy] [name of copyright owner]
22982  *
22983  * CDDL HEADER END
22984  */
22985 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22986 /*	  All Rights Reserved  	*/
22987 
22988 
22989 /*
22990  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22991  * Use is subject to license terms.
22992  *
22993  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
22994  * Copyright 2016 Joyent, Inc.
22995  */
22996 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
22997 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
22998 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22999 /*	  All Rights Reserved  	*/
23000 
23001 
23002 /*
23003  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
23004  * All rights reserved.  The Berkeley software License Agreement
23005  * specifies the terms and conditions for redistribution.
23006  */
23007 
23008 /*
23009  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23010  *
23011  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23012  * Use is subject to license terms.
23013  *
23014  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23015  */
23016 
23017 /*
23018  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
23019  */
23020 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
23021 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
23022 typedef lock_t disp_lock_t; /* dispatcher lock type */
23023 
23024 /*
23025  * SPIN_LOCK() macro indicates whether lock is implemented as a spin lock or
23026  * an adaptive mutex, depending on what interrupt levels use it.
23027  */
23028 
23029 
23030 /*
23031  * Macro to control loops which spin on a lock and then check state
23032  * periodically.  Its passed an integer, and returns a boolean value
23033  * that if true indicates its a good time to get the scheduler lock and
23034  * check the state of the current owner of the lock.
23035  */
23036 
23037 
23038 /*
23039  * Externs for CLOCK_LOCK and clock resolution
23040  */
23041 extern volatile uint32_t hres_lock;
23042 extern hrtime_t hrtime_base;
23043 extern int clock_res;
23044 
23045 
23046 
23047 /*
23048  * The definitions of the symbolic interrupt levels:
23049  *
23050  *   CLOCK_LEVEL =>  The level at which one must be to block the clock.
23051  *
23052  *   LOCK_LEVEL  =>  The highest level at which one may block (and thus the
23053  *                   highest level at which one may acquire adaptive locks)
23054  *                   Also the highest level at which one may be preempted.
23055  *
23056  *   DISP_LEVEL  =>  The level at which one must be to perform dispatcher
23057  *                   operations.
23058  *
23059  * The constraints on the platform:
23060  *
23061  *  - CLOCK_LEVEL must be less than or equal to LOCK_LEVEL
23062  *  - LOCK_LEVEL must be less than DISP_LEVEL
23063  *  - DISP_LEVEL should be as close to LOCK_LEVEL as possible
23064  *
23065  * Note that LOCK_LEVEL and CLOCK_LEVEL have historically always been equal;
23066  * changing this relationship is probably possible but not advised.
23067  *
23068  */
23069 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
23070 /*
23071  * The following mask is for the cpu_intr_actv bits corresponding to
23072  * high-level PILs. It should equal:
23073  * ((((1 << PIL_MAX + 1) - 1) >> LOCK_LEVEL + 1) << LOCK_LEVEL + 1)
23074  */
23075 
23076 
23077 /*
23078  * The semaphore code depends on being able to represent a lock plus
23079  * owner in a single 32-bit word.  (Mutexes used to have a similar
23080  * dependency, but no longer.)  Thus the owner must contain at most
23081  * 24 significant bits.  At present only threads and semaphores
23082  * must be aware of this vile constraint.  Different ISAs may handle this
23083  * differently depending on their capabilities (e.g. compare-and-swap)
23084  * and limitations (e.g. constraints on alignment and/or KERNELBASE).
23085  */
23086 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23087 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
23088 /*
23089  * CDDL HEADER START
23090  *
23091  * The contents of this file are subject to the terms of the
23092  * Common Development and Distribution License (the "License").
23093  * You may not use this file except in compliance with the License.
23094  *
23095  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23096  * or http://www.opensolaris.org/os/licensing.
23097  * See the License for the specific language governing permissions
23098  * and limitations under the License.
23099  *
23100  * When distributing Covered Code, include this CDDL HEADER in each
23101  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23102  * If applicable, add the following below this CDDL HEADER, with the
23103  * fields enclosed by brackets "[]" replaced with your own identifying
23104  * information: Portions Copyright [yyyy] [name of copyright owner]
23105  *
23106  * CDDL HEADER END
23107  */
23108 
23109 /*
23110  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
23111  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
23112  */
23113 
23114 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
23115 /*	  All Rights Reserved  	*/
23116 
23117 /*
23118  * University Copyright- Copyright (c) 1982, 1986, 1988
23119  * The Regents of the University of California
23120  * All Rights Reserved
23121  *
23122  * University Acknowledgment- Portions of this document are derived from
23123  * software developed by the University of California, Berkeley, and its
23124  * contributors.
23125  */
23126 
23127 
23128 
23129 
23130 
23131 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23132 /*
23133  * CDDL HEADER START
23134  *
23135  * The contents of this file are subject to the terms of the
23136  * Common Development and Distribution License (the "License").
23137  * You may not use this file except in compliance with the License.
23138  *
23139  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23140  * or http://www.opensolaris.org/os/licensing.
23141  * See the License for the specific language governing permissions
23142  * and limitations under the License.
23143  *
23144  * When distributing Covered Code, include this CDDL HEADER in each
23145  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23146  * If applicable, add the following below this CDDL HEADER, with the
23147  * fields enclosed by brackets "[]" replaced with your own identifying
23148  * information: Portions Copyright [yyyy] [name of copyright owner]
23149  *
23150  * CDDL HEADER END
23151  */
23152 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23153 /*	  All Rights Reserved  	*/
23154 
23155 
23156 /*
23157  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23158  * Use is subject to license terms.
23159  *
23160  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23161  * Copyright 2016 Joyent, Inc.
23162  */
23163 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
23164 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
23165 /*
23166  * CDDL HEADER START
23167  *
23168  * The contents of this file are subject to the terms of the
23169  * Common Development and Distribution License (the "License").
23170  * You may not use this file except in compliance with the License.
23171  *
23172  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23173  * or http://www.opensolaris.org/os/licensing.
23174  * See the License for the specific language governing permissions
23175  * and limitations under the License.
23176  *
23177  *
23178  * When distributing Covered Code, include this CDDL HEADER in each
23179  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23180  * If applicable, add the following below this CDDL HEADER, with the
23181  * fields enclosed by brackets "[]" replaced with your own identifying
23182  * information: Portions Copyright [yyyy] [name of copyright owner]
23183  *
23184  * CDDL HEADER END
23185  */
23186 
23187 /*
23188  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23189  * Use is subject to license terms.
23190  * Copyright 2016 Joyent, Inc.
23191  */
23192 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
23193 
23194 
23195 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
23196 /*
23197  * This file and its contents are supplied under the terms of the
23198  * Common Development and Distribution License ("CDDL"), version 1.0.
23199  * You may only use this file in accordance with the terms of version
23200  * 1.0 of the CDDL.
23201  *
23202  * A full copy of the text of the CDDL should have accompanied this
23203  * source.  A copy of the CDDL is also available via the Internet at
23204  * http://www.illumos.org/license/CDDL.
23205  */
23206 
23207 /*
23208  * Copyright 2014-2016 PALO, Richard.
23209  */
23210 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
23211 
23212 
23213 
23214 
23215 
23216 /*
23217  * Fundamental variables; don't change too often.
23218  */
23219 
23220 /*
23221  * _POSIX_VDISABLE has historically been defined in <sys/param.h> since
23222  * an early merge with AT&T source.  It has also historically been defined
23223  * in <sys/termios.h>. The POSIX standard, IEEE Std. 1003.1-1988 initially
23224  * required the existence of _POSIX_VDISABLE in <sys/termios.h>.
23225  * Subsequent versions of the IEEE Standard as well as the X/Open
23226  * specifications required that _POSIX_VDISABLE be defined in <unistd.h>
23227  * while still allowing for it's existence in other headers.  With the
23228  * introduction of XPG6, _POSIX_VDISABLE can only be defined in <unistd.h>.
23229  */
23230 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23231     /* compatibility purposes only	*/
23232     /* and will be removed in a	*/
23233     /* later release		*/
23234 
23235 /*
23236  * These define the maximum and minimum allowable values of the
23237  * configurable parameter NGROUPS_MAX.
23238  */
23239 
23240 
23241 
23242 
23243 /*
23244  * NGROUPS_MAX_DEFAULT: *MUST* match NGROUPS_MAX value in limits.h.
23245  */
23246 
23247 
23248 /*
23249  * Default process priority.  Keep it in sync with limits.h.
23250  */
23251 
23252 
23253 /*
23254  * Fundamental constants of the implementation--cannot be changed easily.
23255  */
23256 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23257 /* REMOTE -- whether machine is primary, secondary, or regular */
23258 
23259 
23260 
23261 /*
23262  * MAXPATHLEN defines the longest permissible path length,
23263  * including the terminating null, after expanding symbolic links.
23264  * TYPICALMAXPATHLEN is used in a few places as an optimization
23265  * with a local buffer on the stack to avoid kmem_alloc().
23266  * MAXSYMLINKS defines the maximum number of symbolic links
23267  * that may be expanded in a path name. It should be set high
23268  * enough to allow all legitimate uses, but halt infinite loops
23269  * reasonably quickly.
23270  * MAXNAMELEN is the length (including the terminating null) of
23271  * the longest permissible file (component) name.
23272  */
23273 
23274 
23275 
23276 
23277 
23278 /*
23279  * MAXLINKNAMELEN defines the longest possible permitted datalink name,
23280  * including the terminating NUL.  Note that this must not be larger
23281  * than related networking constants such as LIFNAMSIZ.
23282  */
23283 
23284 
23285 
23286 
23287 
23288 
23289 /*
23290  * The following are defined to be the same as
23291  * defined in /usr/include/limits.h.  They are
23292  * needed for pipe and FIFO compatibility.
23293  */
23294 # 220 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23295 /* macros replacing interleaving functions */
23296 
23297 
23298 
23299 /*
23300  * File system parameters and macros.
23301  *
23302  * The file system is made out of blocks of at most MAXBSIZE units,
23303  * with smaller units (fragments) only in the last direct block.
23304  * MAXBSIZE primarily determines the size of buffers in the buffer
23305  * pool. It may be made larger without any effect on existing
23306  * file systems; however making it smaller make make some file
23307  * systems unmountable.
23308  *
23309  * Note that the blocked devices are assumed to have DEV_BSIZE
23310  * "sectors" and that fragments must be some multiple of this size.
23311  */
23312 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23313 /*	64 bit versions of btodb and dbtob */
23314 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23315 /*
23316  * Size of arg list passed in by user.
23317  */
23318 # 287 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23319 /*
23320  * Scale factor for scaled integers used to count
23321  * %cpu time and load averages.
23322  */
23323 
23324 
23325 
23326 /*
23327  * Delay units are in microseconds.
23328  *
23329  * XXX	These macros are not part of the DDI!
23330  */
23331 # 317 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23332 /*
23333  * The following is to free utilities from machine dependencies within
23334  * an architecture. Must be included after definition of DEV_BSIZE.
23335  */
23336 # 471 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
23337 /*
23338  * The following are assorted machine dependent values which can be
23339  * obtained in a machine independent manner through sysconf(2) or
23340  * sysinfo(2). In order to guarantee that these provide the expected
23341  * value at all times, the System Private interface (leading underscore)
23342  * is used.
23343  */
23344 
23345 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
23346 /*
23347  * CDDL HEADER START
23348  *
23349  * The contents of this file are subject to the terms of the
23350  * Common Development and Distribution License (the "License").
23351  * You may not use this file except in compliance with the License.
23352  *
23353  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23354  * or http://www.opensolaris.org/os/licensing.
23355  * See the License for the specific language governing permissions
23356  * and limitations under the License.
23357  *
23358  * When distributing Covered Code, include this CDDL HEADER in each
23359  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23360  * If applicable, add the following below this CDDL HEADER, with the
23361  * fields enclosed by brackets "[]" replaced with your own identifying
23362  * information: Portions Copyright [yyyy] [name of copyright owner]
23363  *
23364  * CDDL HEADER END
23365  */
23366 
23367 /*
23368  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
23369  *	  All Rights Reserved
23370  *
23371  */
23372 
23373 /*
23374  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23375  * Use is subject to license terms.
23376  */
23377 
23378 /*
23379  * WARNING: This is an implementation-specific header,
23380  * its contents are not guaranteed. Applications
23381  * should include <unistd.h> and not this header.
23382  */
23383 # 480 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
23384 
23385 
23386 
23387 
23388 
23389 
23390 extern long _sysconf(int); /* System Private interface to sysconf() */
23391 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23392 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 1
23393 /*
23394  * CDDL HEADER START
23395  *
23396  * The contents of this file are subject to the terms of the
23397  * Common Development and Distribution License (the "License").
23398  * You may not use this file except in compliance with the License.
23399  *
23400  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23401  * or http://www.opensolaris.org/os/licensing.
23402  * See the License for the specific language governing permissions
23403  * and limitations under the License.
23404  *
23405  * When distributing Covered Code, include this CDDL HEADER in each
23406  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23407  * If applicable, add the following below this CDDL HEADER, with the
23408  * fields enclosed by brackets "[]" replaced with your own identifying
23409  * information: Portions Copyright [yyyy] [name of copyright owner]
23410  *
23411  * CDDL HEADER END
23412  */
23413 /*
23414  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
23415  */
23416 
23417 
23418 
23419 
23420 
23421 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23422 /*
23423  * CDDL HEADER START
23424  *
23425  * The contents of this file are subject to the terms of the
23426  * Common Development and Distribution License (the "License").
23427  * You may not use this file except in compliance with the License.
23428  *
23429  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23430  * or http://www.opensolaris.org/os/licensing.
23431  * See the License for the specific language governing permissions
23432  * and limitations under the License.
23433  *
23434  * When distributing Covered Code, include this CDDL HEADER in each
23435  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23436  * If applicable, add the following below this CDDL HEADER, with the
23437  * fields enclosed by brackets "[]" replaced with your own identifying
23438  * information: Portions Copyright [yyyy] [name of copyright owner]
23439  *
23440  * CDDL HEADER END
23441  */
23442 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23443 /*	  All Rights Reserved  	*/
23444 
23445 
23446 /*
23447  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23448  * Use is subject to license terms.
23449  *
23450  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23451  * Copyright 2016 Joyent, Inc.
23452  */
23453 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 2
23454 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h"
23455 /*
23456  * Public interface to mutual exclusion locks.  See mutex(9F) for details.
23457  *
23458  * The basic mutex type is MUTEX_ADAPTIVE, which is expected to be used
23459  * in almost all of the kernel.  MUTEX_SPIN provides interrupt blocking
23460  * and must be used in interrupt handlers above LOCK_LEVEL.  The iblock
23461  * cookie argument to mutex_init() encodes the interrupt level to block.
23462  * The iblock cookie must be NULL for adaptive locks.
23463  *
23464  * MUTEX_DEFAULT is the type usually specified (except in drivers) to
23465  * mutex_init().  It is identical to MUTEX_ADAPTIVE.
23466  *
23467  * MUTEX_DRIVER is always used by drivers.  mutex_init() converts this to
23468  * either MUTEX_ADAPTIVE or MUTEX_SPIN depending on the iblock cookie.
23469  *
23470  * Mutex statistics can be gathered on the fly, without rebooting or
23471  * recompiling the kernel, via the lockstat driver (lockstat(7D)).
23472  */
23473 typedef enum {
23474  MUTEX_ADAPTIVE = 0, /* spin if owner is running, otherwise block */
23475  MUTEX_SPIN = 1, /* block interrupts and spin */
23476  MUTEX_DRIVER = 4, /* driver (DDI) mutex */
23477  MUTEX_DEFAULT = 6 /* kernel default mutex */
23478 } kmutex_type_t;
23479 
23480 typedef struct mutex {
23481 
23482 
23483 
23484  void *_opaque[2];
23485 
23486 } kmutex_t;
23487 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23488 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 1
23489 /*
23490  * CDDL HEADER START
23491  *
23492  * The contents of this file are subject to the terms of the
23493  * Common Development and Distribution License (the "License").
23494  * You may not use this file except in compliance with the License.
23495  *
23496  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23497  * or http://www.opensolaris.org/os/licensing.
23498  * See the License for the specific language governing permissions
23499  * and limitations under the License.
23500  *
23501  * When distributing Covered Code, include this CDDL HEADER in each
23502  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23503  * If applicable, add the following below this CDDL HEADER, with the
23504  * fields enclosed by brackets "[]" replaced with your own identifying
23505  * information: Portions Copyright [yyyy] [name of copyright owner]
23506  *
23507  * CDDL HEADER END
23508  */
23509 /*
23510  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23511  * Use is subject to license terms.
23512  */
23513 
23514 /*
23515  * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
23516  */
23517 
23518 
23519 
23520 
23521 /*
23522  * Public interface to readers/writer locks.  See rwlock(9F) for details.
23523  */
23524 
23525 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23526 /*
23527  * CDDL HEADER START
23528  *
23529  * The contents of this file are subject to the terms of the
23530  * Common Development and Distribution License (the "License").
23531  * You may not use this file except in compliance with the License.
23532  *
23533  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23534  * or http://www.opensolaris.org/os/licensing.
23535  * See the License for the specific language governing permissions
23536  * and limitations under the License.
23537  *
23538  * When distributing Covered Code, include this CDDL HEADER in each
23539  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23540  * If applicable, add the following below this CDDL HEADER, with the
23541  * fields enclosed by brackets "[]" replaced with your own identifying
23542  * information: Portions Copyright [yyyy] [name of copyright owner]
23543  *
23544  * CDDL HEADER END
23545  */
23546 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23547 /*	  All Rights Reserved  	*/
23548 
23549 
23550 /*
23551  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23552  * Use is subject to license terms.
23553  *
23554  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23555  * Copyright 2016 Joyent, Inc.
23556  */
23557 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 2
23558 
23559 
23560 
23561 
23562 
23563 
23564 
23565 typedef enum {
23566  RW_DRIVER = 2, /* driver (DDI) rwlock */
23567  RW_DEFAULT = 4 /* kernel default rwlock */
23568 } krw_type_t;
23569 
23570 typedef enum {
23571  RW_WRITER,
23572  RW_READER,
23573  RW_READER_STARVEWRITER
23574 } krw_t;
23575 
23576 typedef struct _krwlock {
23577  void *_opaque[1];
23578 } krwlock_t;
23579 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23580 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h" 1
23581 /*
23582  * CDDL HEADER START
23583  *
23584  * The contents of this file are subject to the terms of the
23585  * Common Development and Distribution License, Version 1.0 only
23586  * (the "License").  You may not use this file except in compliance
23587  * with the License.
23588  *
23589  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23590  * or http://www.opensolaris.org/os/licensing.
23591  * See the License for the specific language governing permissions
23592  * and limitations under the License.
23593  *
23594  * When distributing Covered Code, include this CDDL HEADER in each
23595  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23596  * If applicable, add the following below this CDDL HEADER, with the
23597  * fields enclosed by brackets "[]" replaced with your own identifying
23598  * information: Portions Copyright [yyyy] [name of copyright owner]
23599  *
23600  * CDDL HEADER END
23601  */
23602 /*
23603  * Copyright (c) 1993-1998 by Sun Microsystems, Inc.
23604  * All rights reserved.
23605  */
23606 
23607 
23608 
23609 
23610 #pragma ident "%Z%%M%	%I%	%E% SMI"
23611 
23612 /*
23613  * Public interface to semaphores.  See semaphore(9F) for details.
23614  */
23615 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h"
23616 typedef enum {
23617  SEMA_DEFAULT,
23618  SEMA_DRIVER
23619 } ksema_type_t;
23620 
23621 typedef struct _ksema {
23622  void * _opaque[2]; /* 2 words on 4 byte alignment */
23623 } ksema_t;
23624 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23625 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 1
23626 /*
23627  * CDDL HEADER START
23628  *
23629  * The contents of this file are subject to the terms of the
23630  * Common Development and Distribution License (the "License").
23631  * You may not use this file except in compliance with the License.
23632  *
23633  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23634  * or http://www.opensolaris.org/os/licensing.
23635  * See the License for the specific language governing permissions
23636  * and limitations under the License.
23637  *
23638  * When distributing Covered Code, include this CDDL HEADER in each
23639  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23640  * If applicable, add the following below this CDDL HEADER, with the
23641  * fields enclosed by brackets "[]" replaced with your own identifying
23642  * information: Portions Copyright [yyyy] [name of copyright owner]
23643  *
23644  * CDDL HEADER END
23645  */
23646 /*
23647  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23648  * Use is subject to license terms.
23649  */
23650 
23651 /*
23652  * Copyright (c) 2012 by Delphix. All rights reserved.
23653  */
23654 
23655 /*
23656  * condvar.h:
23657  *
23658  * definitions for thread synchronization primitives: condition variables
23659  * This is the public part of the interface to condition variables. The
23660  * private (implementation-specific) part is in <arch>/sys/condvar_impl.h.
23661  */
23662 
23663 
23664 
23665 
23666 
23667 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23668 /*
23669  * CDDL HEADER START
23670  *
23671  * The contents of this file are subject to the terms of the
23672  * Common Development and Distribution License (the "License").
23673  * You may not use this file except in compliance with the License.
23674  *
23675  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23676  * or http://www.opensolaris.org/os/licensing.
23677  * See the License for the specific language governing permissions
23678  * and limitations under the License.
23679  *
23680  * When distributing Covered Code, include this CDDL HEADER in each
23681  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23682  * If applicable, add the following below this CDDL HEADER, with the
23683  * fields enclosed by brackets "[]" replaced with your own identifying
23684  * information: Portions Copyright [yyyy] [name of copyright owner]
23685  *
23686  * CDDL HEADER END
23687  */
23688 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23689 /*	  All Rights Reserved  	*/
23690 
23691 
23692 /*
23693  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23694  * Use is subject to license terms.
23695  *
23696  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23697  * Copyright 2016 Joyent, Inc.
23698  */
23699 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
23700 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
23701 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23702 /*	  All Rights Reserved  	*/
23703 
23704 
23705 /*
23706  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
23707  * All rights reserved.  The Berkeley software License Agreement
23708  * specifies the terms and conditions for redistribution.
23709  */
23710 
23711 /*
23712  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
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  */
23719 
23720 /*
23721  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
23722  */
23723 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
23724 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h"
23725 /*
23726  * Condtion variables.
23727  */
23728 
23729 typedef struct _kcondvar {
23730  ushort_t _opaque;
23731 } kcondvar_t;
23732 
23733 typedef enum {
23734  CV_DEFAULT,
23735  CV_DRIVER
23736 } kcv_type_t;
23737 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23738 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h"
23739 /*
23740  * Mutual exclusion locks described in common/sys/mutex.h.
23741  *
23742  * Semaphores described in common/sys/semaphore.h.
23743  *
23744  * Readers/Writer locks described in common/sys/rwlock.h.
23745  *
23746  * Condition variables described in common/sys/condvar.h
23747  */
23748 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
23749 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 1
23750 /*
23751  * CDDL HEADER START
23752  *
23753  * The contents of this file are subject to the terms of the
23754  * Common Development and Distribution License, Version 1.0 only
23755  * (the "License").  You may not use this file except in compliance
23756  * with the License.
23757  *
23758  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23759  * or http://www.opensolaris.org/os/licensing.
23760  * See the License for the specific language governing permissions
23761  * and limitations under the License.
23762  *
23763  * When distributing Covered Code, include this CDDL HEADER in each
23764  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23765  * If applicable, add the following below this CDDL HEADER, with the
23766  * fields enclosed by brackets "[]" replaced with your own identifying
23767  * information: Portions Copyright [yyyy] [name of copyright owner]
23768  *
23769  * CDDL HEADER END
23770  */
23771 /*
23772  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
23773  * Use is subject to license terms.
23774  */
23775 
23776 
23777 
23778 
23779 #pragma ident "%Z%%M%	%I%	%E% SMI"
23780 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
23781 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
23782 /*
23783  * CDDL HEADER START
23784  *
23785  * The contents of this file are subject to the terms of the
23786  * Common Development and Distribution License (the "License").
23787  * You may not use this file except in compliance with the License.
23788  *
23789  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23790  * or http://www.opensolaris.org/os/licensing.
23791  * See the License for the specific language governing permissions
23792  * and limitations under the License.
23793  *
23794  *
23795  * When distributing Covered Code, include this CDDL HEADER in each
23796  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23797  * If applicable, add the following below this CDDL HEADER, with the
23798  * fields enclosed by brackets "[]" replaced with your own identifying
23799  * information: Portions Copyright [yyyy] [name of copyright owner]
23800  *
23801  * CDDL HEADER END
23802  */
23803 
23804 /*
23805  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23806  * Use is subject to license terms.
23807  * Copyright 2016 Joyent, Inc.
23808  */
23809 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 2
23810 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
23811 /*
23812  * XXX	Ick.  This type needs to be visible outside the above guard because
23813  * the proc structure is visible outside the _KERNEL | _KMEMUSER guard.
23814  * If we can make proc internals less visible, (which we obviously should)
23815  * then this can be invisible too.
23816  */
23817 typedef unsigned int model_t;
23818 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
23819 
23820 
23821 
23822 
23823 
23824 /*
23825  * Data queue.
23826  *
23827  * NOTE: The *only* public fields are documented in queue(9S).
23828  *       Everything else is implementation-private.
23829  *
23830  * The locking rules for the queue_t structure are extremely subtle and vary
23831  * widely depending on the field in question.  As such, each field is
23832  * annotated according to the following legend:
23833  *
23834  *   Q9S: The field is documented in queue(9S) and may be accessed without
23835  *        locks by a STREAMS module when inside an entry point (e.g., put(9E)).
23836  *        However, no fields can be directly modified unless q_lock is held
23837  *        (which is not possible in a DDI compliant STREAMS module), with the
23838  *        following exceptions:
23839  *
23840  *	   - q_ptr: can be modified as per the rules of the STREAMS module.
23841  *		    The STREAMS framework ignores q_ptr and thus imposes *no*
23842  *		    locking rules on it.
23843  *         - q_qinfo: can be modified before qprocson().
23844  *
23845  *	   - q_minpsz, q_maxpsz, q_hiwat, q_lowat: can be modified as per the
23846  *		    rules of the STREAMS module.  The STREAMS framework never
23847  *		    modifies these fields, and is tolerant of temporarily
23848  *		    stale field values.
23849  *
23850  *	  In general, the STREAMS framework employs one of the following
23851  *	  techniques to ensure STREAMS modules can safely access Q9S fields:
23852  *
23853  *	   - The field is only modified by the framework when the stream is
23854  *	     locked with strlock() (q_next).
23855  *
23856  *	   - The field is modified by the framework, but the modifies are
23857  *	     atomic, and temporarily stale values are harmless (q_count,
23858  *	     q_first, q_last).
23859  *
23860  *	   - The field is modified by the framework, but the field's visible
23861  *	     values are either constant or directly under the control
23862  *	     of the STREAMS module itself (q_flag).
23863  *
23864  *   QLK: The field must be accessed or modified under q_lock, except when
23865  *        the stream has been locked with strlock().  If multiple q_locks must
23866  *        be acquired, q_locks at higher addresses must be taken first.
23867  *
23868  *   STR: The field can be accessed without a lock, but must be modified under
23869  *	  strlock().
23870  *
23871  *   SQLK: The field must be accessed or modified under SQLOCK().
23872  *
23873  *   NOLK: The field can be accessed without a lock, but can only be modified
23874  *	   when the queue_t is not known to any other threads.
23875  *
23876  *   SVLK: The field must be accessed or modified under the service_queue lock.
23877  *         Note that service_lock must be taken after any needed q_locks,
23878  *	   and that no other lock should be taken while service_lock is held.
23879  *
23880  * In addition, it is always acceptable to modify a field that is not yet
23881  * known to any other threads -- and other special case exceptions exist in
23882  * the code.  Also, q_lock is used with q_wait to implement a stream head
23883  * monitor for reads and writes.
23884  */
23885 typedef struct queue {
23886  struct qinit *q_qinfo; /* Q9S: Q processing procedure  */
23887  struct msgb *q_first; /* Q9S: first message in Q	*/
23888  struct msgb *q_last; /* Q9S: last message in Q	*/
23889  struct queue *q_next; /* Q9S: next Q in stream	*/
23890  struct queue *q_link; /* SVLK: next Q for scheduling	*/
23891  void *q_ptr; /* Q9S: module-specific data	*/
23892  size_t q_count; /* Q9S: number of bytes on Q	*/
23893  uint_t q_flag; /* Q9S: Q state			*/
23894  ssize_t q_minpsz; /* Q9S: smallest packet OK on Q */
23895  ssize_t q_maxpsz; /* Q9S: largest packet OK on Q	*/
23896  size_t q_hiwat; /* Q9S: Q high water mark	*/
23897  size_t q_lowat; /* Q9S: Q low water mark	*/
23898  struct qband *q_bandp; /* QLK: band flow information	*/
23899  kmutex_t q_lock; /* NOLK: structure lock		*/
23900  struct stdata *q_stream; /* NOLK: stream backpointer	*/
23901  struct syncq *q_syncq; /* NOLK: associated syncq 	*/
23902  unsigned char q_nband; /* QLK: number of bands		*/
23903  kcondvar_t q_wait; /* NOLK: read/write sleep CV	*/
23904  struct queue *q_nfsrv; /* STR: next Q with svc routine */
23905  ushort_t q_draining; /* QLK: Q is draining		*/
23906  short q_struiot; /* QLK: sync streams Q UIO mode	*/
23907  clock_t q_qtstamp; /* QLK: when Q was enabled	*/
23908  size_t q_mblkcnt; /* QLK: mblk count		*/
23909  uint_t q_syncqmsgs; /* QLK: syncq message count	*/
23910  size_t q_rwcnt; /* QLK: # threads in rwnext()	*/
23911  pri_t q_spri; /* QLK: Q scheduling priority	*/
23912 
23913  /*
23914 	 * Syncq scheduling
23915 	 */
23916  struct msgb *q_sqhead; /* QLK: first syncq message	*/
23917  struct msgb *q_sqtail; /* QLK: last syncq message 	*/
23918  struct queue *q_sqnext; /* SQLK: next Q on syncq list	*/
23919  struct queue *q_sqprev; /* SQLK: prev Q on syncq list 	*/
23920  uint_t q_sqflags; /* SQLK: syncq flags		*/
23921  clock_t q_sqtstamp; /* SQLK: when Q was scheduled for sq */
23922 
23923  /*
23924 	 * NOLK: Reference to the queue's module's implementation
23925 	 * structure. This will be NULL for queues associated with drivers.
23926 	 */
23927  struct fmodsw_impl *q_fp;
23928 } queue_t;
23929 
23930 /*
23931  * Queue flags; unused flags not documented in queue(9S) can be recycled.
23932  */
23933 # 169 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
23934 /*	UNUSED		0x00000200	   was QHLIST			*/
23935 /* 	UNUSED 		0x00000400	   was QUNSAFE			*/
23936 
23937 
23938 
23939 
23940 
23941 
23942      /* all MT type flags		*/
23943 
23944 
23945 
23946 
23947 
23948 
23949 /*	UNUSED		0x00400000	   was QHOT			*/
23950 /*	UNUSED		0x00800000	   was QNEXTHOT			*/
23951 /* 	UNUSED		0x01000000	   was _QNEXTLESS		*/
23952 
23953 
23954 
23955 
23956      /* direct interface to/from sockfs */
23957 
23958 /* queue sqflags (protected by SQLOCK). */
23959 
23960 
23961      /* This is also noted by the	*/
23962      /* q_draining field, but this one is */
23963      /* protected by SQLOCK */
23964 
23965 /*
23966  * Structure that describes the separate information
23967  * for each priority band in the queue.
23968  */
23969 typedef struct qband {
23970  struct qband *qb_next; /* next band's info */
23971  size_t qb_count; /* number of bytes in band */
23972  struct msgb *qb_first; /* beginning of band's data */
23973  struct msgb *qb_last; /* end of band's data */
23974  size_t qb_hiwat; /* high water mark for band */
23975  size_t qb_lowat; /* low water mark for band */
23976  uint_t qb_flag; /* see below */
23977  size_t qb_mblkcnt; /* mblk counter for runaway msgs */
23978 } qband_t;
23979 
23980 /*
23981  * qband flags
23982  */
23983 
23984 
23985 
23986 
23987 /*
23988  * Maximum number of bands.
23989  */
23990 
23991 
23992 /*
23993  * Fields that can be manipulated through strqset() and strqget().
23994  */
23995 typedef enum qfields {
23996  QHIWAT = 0, /* q_hiwat or qb_hiwat */
23997  QLOWAT = 1, /* q_lowat or qb_lowat */
23998  QMAXPSZ = 2, /* q_maxpsz */
23999  QMINPSZ = 3, /* q_minpsz */
24000  QCOUNT = 4, /* q_count or qb_count */
24001  QFIRST = 5, /* q_first or qb_first */
24002  QLAST = 6, /* q_last or qb_last */
24003  QFLAG = 7, /* q_flag or qb_flag */
24004  QSTRUIOT = 8, /* q_struiot */
24005  QBAD = 9
24006 } qfields_t;
24007 
24008 /*
24009  * Module information structure
24010  */
24011 struct module_info {
24012  ushort_t mi_idnum; /* module id number */
24013  char *mi_idname; /* module name */
24014  ssize_t mi_minpsz; /* min packet size accepted */
24015  ssize_t mi_maxpsz; /* max packet size accepted */
24016  size_t mi_hiwat; /* hi-water mark */
24017  size_t mi_lowat; /* lo-water mark */
24018 };
24019 
24020 /*
24021  * queue information structure (with Synchronous STREAMS extensions)
24022  */
24023 struct qinit {
24024  int (*qi_putp)(); /* put procedure */
24025  int (*qi_srvp)(); /* service procedure */
24026  int (*qi_qopen)(); /* called on startup */
24027  int (*qi_qclose)(); /* called on finish */
24028  int (*qi_qadmin)(); /* for future use */
24029  struct module_info *qi_minfo; /* module information structure */
24030  struct module_stat *qi_mstat; /* module statistics structure */
24031  int (*qi_rwp)(); /* r/w procedure */
24032  int (*qi_infop)(); /* information procedure */
24033  int qi_struiot; /* stream uio type for struio() */
24034 };
24035 
24036 /*
24037  * Values for qi_struiot and q_struiot:
24038  */
24039 
24040 
24041 
24042 
24043 /*
24044  * Streamtab (used in cdevsw and fmodsw to point to module or driver)
24045  */
24046 struct streamtab {
24047  struct qinit *st_rdinit;
24048  struct qinit *st_wrinit;
24049  struct qinit *st_muxrinit;
24050  struct qinit *st_muxwinit;
24051 };
24052 
24053 /*
24054  * Structure sent to mux drivers to indicate a link.
24055  */
24056 struct linkblk {
24057  queue_t *l_qtop; /* lowest level write queue of upper stream */
24058     /* (set to NULL for persistent links) */
24059  queue_t *l_qbot; /* highest level write queue of lower stream */
24060  int l_index; /* index for lower stream. */
24061 };
24062 
24063 /*
24064  * Esballoc data buffer freeing routine
24065  */
24066 typedef struct free_rtn {
24067  void (*free_func)();
24068  caddr_t free_arg;
24069 } frtn_t;
24070 
24071 /*
24072  * Data block descriptor
24073  *
24074  * NOTE: db_base, db_lim, db_ref and db_type are the *only* public fields,
24075  * as described in datab(9S).  Everything else is implementation-private.
24076  */
24077 
24078 
24079 
24080 typedef struct datab {
24081  frtn_t *db_frtnp;
24082  unsigned char *db_base;
24083  unsigned char *db_lim;
24084  unsigned char db_ref;
24085  unsigned char db_type;
24086  unsigned char db_flags;
24087  unsigned char db_struioflag;
24088  pid_t db_cpid; /* cached pid, needs verification */
24089  void *db_cache; /* kmem cache descriptor */
24090  struct msgb *db_mblk;
24091  void (*db_free)(struct msgb *, struct datab *);
24092  void (*db_lastfree)(struct msgb *, struct datab *);
24093  intptr_t db_cksumstart;
24094  intptr_t db_cksumend;
24095  intptr_t db_cksumstuff;
24096  union {
24097   double enforce_alignment;
24098   unsigned char data[8];
24099   struct {
24100    union {
24101     uint32_t u32;
24102     uint16_t u16;
24103    } cksum_val; /* used to store calculated cksum */
24104    uint16_t flags;
24105    uint16_t pad;
24106   } cksum;
24107   /*
24108 		 * Union used for future extensions (pointer to data ?).
24109 		 */
24110  } db_struioun;
24111  struct fthdr *db_fthdr;
24112  cred_t *db_credp; /* credential */
24113 } dblk_t;
24114 
24115 
24116 
24117 
24118 /*
24119  * Accessor macros for private dblk_t fields (the rest are in <sys/strsun.h>).
24120  */
24121 
24122 
24123 
24124 /*
24125  * Used by GLDv2 to store the TCI information.
24126  */
24127 
24128 
24129 /*
24130  * Message block descriptor
24131  */
24132 typedef struct msgb {
24133  struct msgb *b_next;
24134  struct msgb *b_prev;
24135  struct msgb *b_cont;
24136  unsigned char *b_rptr;
24137  unsigned char *b_wptr;
24138  struct datab *b_datap;
24139  unsigned char b_band;
24140  unsigned char b_tag;
24141  unsigned short b_flag;
24142  queue_t *b_queue; /* for sync queues */
24143 } mblk_t;
24144 
24145 /*
24146  * bcache descriptor
24147  */
24148 typedef struct bcache {
24149  kmutex_t mutex;
24150  struct kmem_cache *buffer_cache;
24151  struct kmem_cache *dblk_cache;
24152  int alloc;
24153  int destroy;
24154  size_t size;
24155  uint_t align;
24156 } bcache_t;
24157 
24158 /*
24159  * db_flags values (all implementation private!)
24160  */
24161 
24162 
24163 
24164 
24165 /*
24166  * db_struioflag values:
24167  */
24168 
24169 
24170 
24171 
24172 
24173 
24174 /*
24175  * Message flags.  These are interpreted by the stream head.
24176  */
24177 
24178 
24179     /* write side of stream */
24180 
24181 /*	UNUSED		0x08	   was MSGNOGET (can be recycled) */
24182 
24183 
24184 
24185 
24186 /*
24187  * Streams message types.
24188  */
24189 
24190 /*
24191  * Data and protocol messages (regular and priority)
24192  */
24193 
24194 
24195 
24196 
24197 /*
24198  * Control messages (regular and priority)
24199  */
24200 # 445 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24201 /*
24202  * Control messages (high priority; go to head of queue)
24203  */
24204 # 468 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24205 /*
24206  * Queue message class definitions.
24207  */
24208 
24209 
24210 
24211 /*
24212  *  IOCTL structure - this structure is the format of the M_IOCTL message type.
24213  */
24214 # 488 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24215 struct iocblk {
24216  int ioc_cmd; /* ioctl command type */
24217  cred_t *ioc_cr; /* full credentials */
24218  uint_t ioc_id; /* ioctl id */
24219  size_t ioc_count; /* count of bytes in data field */
24220  int ioc_error; /* error code */
24221  int ioc_rval; /* return value  */
24222  int ioc_fill1;
24223  uint_t ioc_flag; /* see below */
24224  int ioc_filler[2]; /* reserved for future use */
24225 };
24226 
24227 
24228 typedef struct iocblk *IOCP;
24229 
24230 /* {ioc,cp}_flags values */
24231 
24232 
24233 
24234 
24235 
24236 
24237 
24238 /*
24239  *	Is the ioctl data formatted for our native model?
24240  */
24241 
24242 
24243 
24244 /*
24245  * structure for the M_COPYIN and M_COPYOUT message types.
24246  */
24247 # 531 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24248 struct copyreq {
24249  int cq_cmd; /* ioctl command (from ioc_cmd) */
24250  cred_t *cq_cr; /* full credentials */
24251  uint_t cq_id; /* ioctl id (from ioc_id) */
24252  caddr_t cq_addr; /* address to copy data to/from */
24253  size_t cq_size; /* number of bytes to copy */
24254  uint_t cq_flag; /* must be zero */
24255  mblk_t *cq_private; /* private state information */
24256  int cq_filler[4]; /* reserved for future use */
24257 };
24258 
24259 
24260 /*
24261  * structure for the M_IOCDATA message type.
24262  */
24263 # 557 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24264 struct copyresp {
24265  int cp_cmd; /* ioctl command (from ioc_cmd) */
24266  cred_t *cp_cr; /* full credentials */
24267  uint_t cp_id; /* ioctl id (from ioc_id) */
24268  caddr_t cp_rval; /* status of request: 0 -> success */
24269      /* 		non-zero -> failure */
24270  size_t cp_pad1;
24271  uint_t cp_pad2;
24272  mblk_t *cp_private; /* private state information */
24273  uint_t cp_flag; /* datamodel IOC_ flags; see above */
24274  int cp_filler[3];
24275 };
24276 
24277 
24278 /*
24279  * Since these structures are all intended to travel in the same message
24280  * at different stages of a STREAMS ioctl, this union is used to determine
24281  * the message size in strdoioctl().
24282  */
24283 union ioctypes {
24284  struct iocblk iocblk;
24285  struct copyreq copyreq;
24286  struct copyresp copyresp;
24287 };
24288 
24289 /*
24290  * Options structure for M_SETOPTS message.  This is sent upstream
24291  * by a module or driver to set stream head options.
24292  */
24293 struct stroptions {
24294  uint_t so_flags; /* options to set */
24295  short so_readopt; /* read option */
24296  ushort_t so_wroff; /* write offset */
24297  ssize_t so_minpsz; /* minimum read packet size */
24298  ssize_t so_maxpsz; /* maximum read packet size */
24299  size_t so_hiwat; /* read queue high water mark */
24300  size_t so_lowat; /* read queue low water mark */
24301  unsigned char so_band; /* band for water marks */
24302  ushort_t so_erropt; /* error option */
24303  ssize_t so_maxblk; /* maximum message block size */
24304  ushort_t so_copyopt; /* copy options (see stropts.h) */
24305  ushort_t so_tail; /* space available at the end */
24306 };
24307 
24308 /* flags for stream options set message */
24309 # 673 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
24310 /*
24311  * Miscellaneous parameters and flags.
24312  */
24313 
24314 /*
24315  * Values for stream flag in open to indicate module open, clone open,
24316  * and the return value for failure.
24317  */
24318 
24319 
24320 
24321 
24322 /*
24323  * Priority definitions for block allocation.
24324  */
24325 
24326 
24327 
24328 
24329 /*
24330  * Value for packet size that denotes infinity
24331  */
24332 
24333 
24334 /*
24335  * Flags for flushq()
24336  */
24337 
24338 
24339 
24340 /*
24341  * Flag for transparent ioctls
24342  */
24343 
24344 
24345 /*
24346  * Stream head default high/low water marks
24347  */
24348 
24349 
24350 
24351 /*
24352  * qwriter perimeter types
24353  */
24354 
24355 
24356 
24357 /*
24358  * Definitions of Streams macros and function interfaces.
24359  */
24360 
24361 /*
24362  * canenable - check if queue can be enabled by putq().
24363  */
24364 
24365 
24366 /*
24367  * Test if data block type is one of the data messages (i.e. not a control
24368  * message).
24369  */
24370 
24371 
24372 
24373 
24374 
24375 
24376 
24377 /*
24378  * Extract queue class of message block.
24379  */
24380 
24381 
24382 /*
24383  * Align address on next lower word boundary.
24384  */
24385 
24386 
24387 /*
24388  * Find the max size of data block.
24389  */
24390 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
24391 
24392 /*
24393  * Symbols such as htonl() are required to be exposed through this file,
24394  * per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
24395  */
24396 
24397 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 1
24398 /*
24399  * CDDL HEADER START
24400  *
24401  * The contents of this file are subject to the terms of the
24402  * Common Development and Distribution License (the "License").
24403  * You may not use this file except in compliance with the License.
24404  *
24405  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24406  * or http://www.opensolaris.org/os/licensing.
24407  * See the License for the specific language governing permissions
24408  * and limitations under the License.
24409  *
24410  * When distributing Covered Code, include this CDDL HEADER in each
24411  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24412  * If applicable, add the following below this CDDL HEADER, with the
24413  * fields enclosed by brackets "[]" replaced with your own identifying
24414  * information: Portions Copyright [yyyy] [name of copyright owner]
24415  *
24416  * CDDL HEADER END
24417  */
24418 
24419 /*
24420  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24421  * Use is subject to license terms.
24422  */
24423 
24424 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
24425 /*	  All Rights Reserved  	*/
24426 
24427 /*
24428  * University Copyright- Copyright (c) 1982, 1986, 1988
24429  * The Regents of the University of California
24430  * All Rights Reserved
24431  *
24432  * University Acknowledgment- Portions of this document are derived from
24433  * software developed by the University of California, Berkeley, and its
24434  * contributors.
24435  */
24436 
24437 
24438 
24439 
24440 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
24441 /*
24442  * CDDL HEADER START
24443  *
24444  * The contents of this file are subject to the terms of the
24445  * Common Development and Distribution License (the "License").
24446  * You may not use this file except in compliance with the License.
24447  *
24448  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24449  * or http://www.opensolaris.org/os/licensing.
24450  * See the License for the specific language governing permissions
24451  * and limitations under the License.
24452  *
24453  *
24454  * When distributing Covered Code, include this CDDL HEADER in each
24455  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24456  * If applicable, add the following below this CDDL HEADER, with the
24457  * fields enclosed by brackets "[]" replaced with your own identifying
24458  * information: Portions Copyright [yyyy] [name of copyright owner]
24459  *
24460  * CDDL HEADER END
24461  */
24462 
24463 /*
24464  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24465  * Use is subject to license terms.
24466  * Copyright 2016 Joyent, Inc.
24467  */
24468 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
24469 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
24470 /*
24471  * CDDL HEADER START
24472  *
24473  * The contents of this file are subject to the terms of the
24474  * Common Development and Distribution License, Version 1.0 only
24475  * (the "License").  You may not use this file except in compliance
24476  * with the License.
24477  *
24478  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24479  * or http://www.opensolaris.org/os/licensing.
24480  * See the License for the specific language governing permissions
24481  * and limitations under the License.
24482  *
24483  * When distributing Covered Code, include this CDDL HEADER in each
24484  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24485  * If applicable, add the following below this CDDL HEADER, with the
24486  * fields enclosed by brackets "[]" replaced with your own identifying
24487  * information: Portions Copyright [yyyy] [name of copyright owner]
24488  *
24489  * CDDL HEADER END
24490  */
24491 /*
24492  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24493  *
24494  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24495  * Use is subject to license terms.
24496  */
24497 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
24498 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24499 /*
24500  * macros for conversion between host and (internet) network byte order
24501  */
24502 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24503 typedef uint16_t in_port_t;
24504 
24505 
24506 
24507 
24508 typedef uint32_t in_addr_t;
24509 
24510 
24511 
24512 extern uint32_t htonl(uint32_t);
24513 extern uint16_t htons(uint16_t);
24514 extern uint32_t ntohl(uint32_t);
24515 extern uint16_t ntohs(uint16_t);
24516 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24517 extern uint64_t htonll(uint64_t);
24518 extern uint64_t ntohll(uint64_t);
24519 
24520 
24521 
24522 
24523 
24524 
24525 /*
24526  * Macros to reverse byte order
24527  */
24528 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24529 /*
24530  * Macros to convert from a specific byte order to/from native byte order
24531  */
24532 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24533 /*
24534  * Macros to read unaligned values from a specific byte order to
24535  * native byte order
24536  */
24537 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24538 /*
24539  * Macros to write unaligned values from native byte order to a specific byte
24540  * order.
24541  */
24542 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
24543 
24544 
24545 
24546 
24547 
24548 
24549 
24550 /*
24551  * Note: IPv4 address data structures usage conventions.
24552  * The "in_addr_t" type below (required by Unix standards)
24553  * is NOT a typedef of "struct in_addr" and violates the usual
24554  * conventions where "struct <name>" and <name>_t are corresponding
24555  * typedefs.
24556  * To minimize confusion, kernel data structures/usage prefers use
24557  * of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
24558  * The user level APIs continue to follow the historic popular
24559  * practice of using "struct in_addr".
24560  */
24561 
24562 
24563 
24564 
24565 
24566 
24567 
24568 typedef uint32_t ipaddr_t;
24569 
24570 
24571 
24572 
24573 struct in6_addr {
24574  union {
24575   /*
24576 		 * Note: Static initalizers of "union" type assume
24577 		 * the constant on the RHS is the type of the first member
24578 		 * of union.
24579 		 * To make static initializers (and efficient usage) work,
24580 		 * the order of members exposed to user and kernel view of
24581 		 * this data structure is different.
24582 		 * User environment sees specified uint8_t type as first
24583 		 * member whereas kernel sees most efficient type as
24584 		 * first member.
24585 		 */
24586 
24587 
24588 
24589 
24590   uint8_t _S6_u8[16]; /* IPv6 address */
24591   uint32_t _S6_u32[4]; /* IPv6 address */
24592 
24593   uint32_t __S6_align; /* Align on 32 bit boundary */
24594  } _S6_un;
24595 };
24596 
24597 
24598 
24599 
24600 
24601 
24602 
24603 typedef struct in6_addr in6_addr_t;
24604 # 144 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24605 /*
24606  * Protocols
24607  *
24608  * Some of these constant names are copied for the DTrace IP provider in
24609  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
24610  * in sync.
24611  */
24612 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24613       /* Transmission Protocol */
24614 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24615 /*
24616  * Port/socket numbers: network standard functions
24617  *
24618  * Entries should exist here for each port number compiled into an ON
24619  * component, such as snoop.
24620  */
24621 # 208 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24622 /*
24623  * Port/socket numbers: host specific functions
24624  */
24625 # 229 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24626 /*
24627  * Internet Key Exchange (IKE) ports
24628  */
24629 
24630 
24631 
24632 /*
24633  * UNIX TCP sockets
24634  */
24635 
24636 
24637 
24638 
24639 
24640 
24641 /*
24642  * UNIX UDP sockets
24643  */
24644 
24645 
24646 
24647 
24648 
24649 
24650 
24651 /*
24652  * DHCPv6 UDP ports
24653  */
24654 
24655 
24656 
24657 
24658 
24659 /*
24660  * Ports < IPPORT_RESERVED are reserved for
24661  * privileged processes (e.g. root).
24662  * Ports > IPPORT_USERRESERVED are reserved
24663  * for servers, not necessarily privileged.
24664  */
24665 
24666 
24667 
24668 /*
24669  * Link numbers
24670  */
24671 
24672 
24673 
24674 
24675 /*
24676  * IPv4 Internet address
24677  *	This definition contains obsolete fields for compatibility
24678  *	with SunOS 3.x and 4.2bsd.  The presence of subnets renders
24679  *	divisions into fixed fields misleading at best.  New code
24680  *	should use only the s_addr field.
24681  */
24682 # 293 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24683 struct in_addr {
24684  union {
24685   struct { uint8_t s_b1, s_b2, s_b3, s_b4; } S_un_b;
24686   struct { uint16_t s_w1, s_w2; } S_un_w;
24687 
24688   uint32_t S_addr;
24689 
24690 
24691 
24692  } S_un;
24693 
24694 
24695 
24696 
24697 
24698 
24699 };
24700 
24701 /*
24702  * Definitions of bits in internet address integers.
24703  * On subnets, the decomposition of addresses to host and net parts
24704  * is done according to subnet mask, not the masks here.
24705  *
24706  * Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
24707  * IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
24708  * obsolete". IN_MULTICAST macro should be used to test if a address
24709  * is a multicast address.
24710  */
24711 # 348 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24712 /*
24713  * We have removed CLASS E checks from the kernel
24714  * But we preserve these defines for userland in order
24715  * to avoid compile  breakage of some 3rd party piece of software
24716  */
24717 # 369 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24718 /* Scoped IPv4 prefixes (in host byte-order) */
24719 # 379 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24720 /* RFC 3927 IPv4 link local address (i in host byte-order) */
24721 
24722 
24723 /* Well known 6to4 Relay Router Anycast address defined in RFC 3068 */
24724 
24725 
24726 
24727 
24728 
24729 
24730 /*
24731  * Define a macro to stuff the loopback address into an Internet address
24732  */
24733 
24734 
24735 
24736 
24737 
24738 
24739 /*
24740  * IPv4 Socket address.
24741  */
24742 struct sockaddr_in {
24743  sa_family_t sin_family;
24744  in_port_t sin_port;
24745  struct in_addr sin_addr;
24746 
24747  char sin_zero[8];
24748 
24749 
24750 
24751 };
24752 
24753 
24754 /*
24755  * IPv6 socket address.
24756  */
24757 struct sockaddr_in6 {
24758  sa_family_t sin6_family;
24759  in_port_t sin6_port;
24760  uint32_t sin6_flowinfo;
24761  struct in6_addr sin6_addr;
24762  uint32_t sin6_scope_id; /* Depends on scope of sin6_addr */
24763  uint32_t __sin6_src_id; /* Impl. specific - UDP replies */
24764 };
24765 
24766 /*
24767  * Macros for accessing the traffic class and flow label fields from
24768  * sin6_flowinfo.
24769  * These are designed to be applied to a 32-bit value.
24770  */
24771 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24772 /* masks */
24773 
24774 
24775 
24776 
24777 
24778 /*
24779  * Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
24780  * use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
24781  * only. They need to be different for User/Kernel versions because union
24782  * component data structure is defined differently (it is identical at
24783  * binary representation level).
24784  *
24785  * const struct in6_addr IN6ADDR_ANY_INIT;
24786  * const struct in6_addr IN6ADDR_LOOPBACK_INIT;
24787  */
24788 # 478 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24789 /*
24790  * RFC 2553 specifies the following macros. Their type is defined
24791  * as "int" in the RFC but they only have boolean significance
24792  * (zero or non-zero). For the purposes of our comment notation,
24793  * we assume a hypothetical type "bool" defined as follows to
24794  * write the prototypes assumed for macros in our comments better.
24795  *
24796  * typedef int bool;
24797  */
24798 
24799 /*
24800  * IN6 macros used to test for special IPv6 addresses
24801  * (Mostly from spec)
24802  *
24803  * bool  IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
24804  * bool  IN6_IS_ADDR_LOOPBACK    (const struct in6_addr *);
24805  * bool  IN6_IS_ADDR_MULTICAST   (const struct in6_addr *);
24806  * bool  IN6_IS_ADDR_LINKLOCAL   (const struct in6_addr *);
24807  * bool  IN6_IS_ADDR_SITELOCAL   (const struct in6_addr *);
24808  * bool  IN6_IS_ADDR_V4MAPPED    (const struct in6_addr *);
24809  * bool  IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
24810  * bool  IN6_IS_ADDR_V4COMPAT    (const struct in6_addr *);
24811  * bool  IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
24812  * bool  IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
24813  * bool  IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
24814  * bool  IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
24815  * bool  IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
24816  * bool  IN6_IS_ADDR_MC_GLOBAL   (const struct in6_addr *);
24817  * bool  IN6_IS_ADDR_6TO4	 (const struct in6_addr *); -- Not from RFC2553
24818  * bool  IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
24819  *	     const struct in6_addr *);			    -- Not from RFC2553
24820  * bool  IN6_IS_ADDR_LINKSCOPE	 (const struct in6addr  *); -- Not from RFC2553
24821  */
24822 # 568 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24823 /*
24824  * IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
24825  * Note: This macro is currently NOT defined in RFC2553 specification
24826  * and not a standard macro that portable applications should use.
24827  */
24828 # 587 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24829 /* Exclude loopback and unspecified address */
24830 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24831 /*
24832  * Note:
24833  * IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
24834  * specification and not a standard macro that portable applications
24835  * should use.
24836  */
24837 # 660 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24838 /*
24839  * The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
24840  * RFC, and shouldn't be used by portable applications.  It is used to see
24841  * if an address is a solicited-node multicast address, which is prefixed
24842  * with ff02:0:0:0:0:1:ff00::/104.
24843  */
24844 # 680 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24845 /*
24846  * Macros to a) test for 6to4 IPv6 address, and b) to test if two
24847  * 6to4 addresses have the same /48 prefix, and, hence, are from the
24848  * same 6to4 site.
24849  */
24850 # 699 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24851 /*
24852  * IN6_IS_ADDR_LINKSCOPE
24853  * Identifies an address as being either link-local, link-local multicast or
24854  * node-local multicast.  All types of addresses are considered to be unique
24855  * within the scope of a given link.
24856  */
24857 
24858 
24859 
24860 
24861 /*
24862  * Useful utility macros for operations with IPv6 addresses
24863  * Note: These macros are NOT defined in the RFC2553 or any other
24864  * standard specification and are not standard macros that portable
24865  * applications should use.
24866  */
24867 
24868 /*
24869  * IN6_V4MAPPED_TO_INADDR
24870  * IN6_V4MAPPED_TO_IPADDR
24871  *	Assign a IPv4-Mapped IPv6 address to an IPv4 address.
24872  *	Note: These macros are NOT defined in RFC2553 or any other standard
24873  *	specification and are not macros that portable applications should
24874  *	use.
24875  *
24876  * void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
24877  * void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
24878  *
24879  */
24880 
24881 
24882 
24883 
24884 
24885 /*
24886  * IN6_INADDR_TO_V4MAPPED
24887  * IN6_IPADDR_TO_V4MAPPED
24888  *	Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
24889  *	address.
24890  *	Note: These macros are NOT defined in RFC2553 or any other standard
24891  *	specification and are not macros that portable applications should
24892  *	use.
24893  *
24894  * void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
24895  * void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
24896  *
24897  */
24898 # 770 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24899 /*
24900  * IN6_6TO4_TO_V4ADDR
24901  *	Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
24902  *      address.
24903  *	Note: This macro is NOT defined in RFC2553 or any other standard
24904  *	specification and is not a macro that portable applications should
24905  *	use.
24906  *	Note: we don't use the IPADDR form of the macro because we need
24907  *	to do a bytewise copy; the V4ADDR in the 6to4 address is not
24908  *	32-bit aligned.
24909  *
24910  * void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
24911  *
24912  */
24913 
24914 
24915 
24916 
24917 
24918 
24919 /*
24920  * IN6_V4ADDR_TO_6TO4
24921  *	Given an IPv4 address and an IPv6 address for output, a 6to4 address
24922  *	will be created from the IPv4 Address.
24923  *	Note:  This method for creating 6to4 addresses is not standardized
24924  *	outside of Solaris.  The newly created 6to4 address will be of the form
24925  *	2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
24926  *	HOSTID will equal 1.
24927  *
24928  * void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
24929  *
24930  */
24931 # 828 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24932 /*
24933  * IN6_ARE_ADDR_EQUAL (defined in RFC2292)
24934  *	 Compares if IPv6 addresses are equal.
24935  * Note: Compares in order of high likelyhood of a miss so we minimize
24936  * compares. (Current heuristic order, compare in reverse order of
24937  * uint32_t units)
24938  *
24939  * bool  IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
24940  *			    const struct in6_addr *);
24941  */
24942 
24943 
24944 
24945 
24946 
24947 
24948 /*
24949  * IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
24950  *	Compares if prefixed parts of IPv6 addresses are equal.
24951  *
24952  * uint32_t IN6_MASK_FROM_PREFIX(int, int);
24953  * bool     IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
24954  *				       const struct in6_addr *,
24955  *				       int);
24956  */
24957 # 879 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24958 /*
24959  * Options for use with [gs]etsockopt at the IP level.
24960  *
24961  * Note: Some of the IP_ namespace has conflict with and
24962  * and is exposed through <xti.h>. (It also requires exposing
24963  * options not implemented). The options with potential
24964  * for conflicts use #ifndef guards.
24965  */
24966 # 919 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24967 /*
24968  * IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
24969  * is used to differentiate b/w the two.
24970  */
24971 
24972 
24973 
24974 
24975 
24976 /*
24977  * Different preferences that can be requested from IPSEC protocols.
24978  */
24979 
24980 
24981 
24982 
24983 /*
24984  * This can be used with the setsockopt() call to set per socket security
24985  * options. When the application uses per-socket API, we will reflect
24986  * the request on both outbound and inbound packets.
24987  */
24988 
24989 typedef struct ipsec_req {
24990  uint_t ipsr_ah_req; /* AH request */
24991  uint_t ipsr_esp_req; /* ESP request */
24992  uint_t ipsr_self_encap_req; /* Self-Encap request */
24993  uint8_t ipsr_auth_alg; /* Auth algs for AH */
24994  uint8_t ipsr_esp_alg; /* Encr algs for ESP */
24995  uint8_t ipsr_esp_auth_alg; /* Auth algs for ESP */
24996 } ipsec_req_t;
24997 
24998 /*
24999  * MCAST_* options are protocol-independent.  The actual definitions
25000  * are with the v6 options below; this comment is here to note the
25001  * namespace usage.
25002  *
25003  * #define	MCAST_JOIN_GROUP	0x29
25004  * #define	MCAST_LEAVE_GROUP	0x2a
25005  * #define	MCAST_BLOCK_SOURCE	0x2b
25006  * #define	MCAST_UNBLOCK_SOURCE	0x2c
25007  * #define	MCAST_JOIN_SOURCE_GROUP	0x2d
25008  * #define	MCAST_LEAVE_SOURCE_GROUP 0x2e
25009  */
25010 
25011 
25012 /*
25013  * SunOS private (potentially not portable) IP_ option names
25014  */
25015 
25016 
25017 
25018 /* can be reused		0x44 */
25019 
25020 
25021 /*
25022  * Option values and names (when !_XPG5) shared with <xti_inet.h>
25023  */
25024 # 988 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25025 /*
25026  * The following option values are reserved by <xti_inet.h>
25027  *
25028  * T_IP_OPTIONS	0x107	 -  IP per-packet options
25029  * T_IP_TOS	0x108	 -  IP per packet type of service
25030  */
25031 
25032 /*
25033  * Default value constants for multicast attributes controlled by
25034  * IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
25035  */
25036 
25037 
25038 
25039 
25040 /*
25041  * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
25042  */
25043 struct ip_mreq {
25044  struct in_addr imr_multiaddr; /* IP multicast address of group */
25045  struct in_addr imr_interface; /* local IP address of interface */
25046 };
25047 
25048 /*
25049  * Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
25050  * IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
25051  */
25052 struct ip_mreq_source {
25053  struct in_addr imr_multiaddr; /* IP address of group */
25054  struct in_addr imr_sourceaddr; /* IP address of source */
25055  struct in_addr imr_interface; /* IP address of interface */
25056 };
25057 
25058 /*
25059  * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
25060  * IPv6 addresses.
25061  */
25062 struct ipv6_mreq {
25063  struct in6_addr ipv6mr_multiaddr; /* IPv6 multicast addr */
25064  unsigned int ipv6mr_interface; /* interface index */
25065 };
25066 
25067 /*
25068  * Use #pragma pack() construct to force 32-bit alignment on amd64.
25069  * This is needed to keep the structure size and offsets consistent
25070  * between a 32-bit app and the 64-bit amd64 kernel in structures
25071  * where 64-bit alignment would create gaps (in this case, structures
25072  * which have a uint32_t followed by a struct sockaddr_storage).
25073  */
25074 
25075 
25076 
25077 
25078 /*
25079  * Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
25080  */
25081 struct group_req {
25082  uint32_t gr_interface; /* interface index */
25083  struct sockaddr_storage gr_group; /* group address */
25084 };
25085 
25086 /*
25087  * Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
25088  * MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
25089  */
25090 struct group_source_req {
25091  uint32_t gsr_interface; /* interface index */
25092  struct sockaddr_storage gsr_group; /* group address */
25093  struct sockaddr_storage gsr_source; /* source address */
25094 };
25095 
25096 /*
25097  * Argument for SIOC[GS]MSFILTER ioctls
25098  */
25099 struct group_filter {
25100  uint32_t gf_interface; /* interface index */
25101  struct sockaddr_storage gf_group; /* multicast address */
25102  uint32_t gf_fmode; /* filter mode */
25103  uint32_t gf_numsrc; /* number of sources */
25104  struct sockaddr_storage gf_slist[1]; /* source address */
25105 };
25106 # 1078 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25107 /*
25108  * Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
25109  */
25110 struct ip_msfilter {
25111  struct in_addr imsf_multiaddr; /* IP multicast address of group */
25112  struct in_addr imsf_interface; /* local IP address of interface */
25113  uint32_t imsf_fmode; /* filter mode */
25114  uint32_t imsf_numsrc; /* number of sources in src_list */
25115  struct in_addr imsf_slist[1]; /* start of source list */
25116 };
25117 
25118 
25119 
25120 
25121 
25122 /*
25123  * Multicast source filter manipulation functions in libsocket;
25124  * defined in RFC 3678.
25125  */
25126 int setsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t,
25127    uint_t, struct sockaddr_storage *);
25128 
25129 int getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t *,
25130    uint_t *, struct sockaddr_storage *);
25131 
25132 int setipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t,
25133    uint32_t, struct in_addr *);
25134 
25135 int getipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t *,
25136    uint32_t *, struct in_addr *);
25137 
25138 /*
25139  * Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
25140  */
25141 
25142 
25143 
25144 /*
25145  * Argument struct for IP_PKTINFO option
25146  */
25147 typedef struct in_pktinfo {
25148  unsigned int ipi_ifindex; /* send/recv interface index */
25149  struct in_addr ipi_spec_dst; /* matched source address */
25150  struct in_addr ipi_addr; /* src/dst address in IP hdr */
25151 } in_pktinfo_t;
25152 
25153 /*
25154  * Argument struct for IPV6_PKTINFO option
25155  */
25156 struct in6_pktinfo {
25157  struct in6_addr ipi6_addr; /* src/dst IPv6 address */
25158  unsigned int ipi6_ifindex; /* send/recv interface index */
25159 };
25160 
25161 /*
25162  * Argument struct for IPV6_MTUINFO option
25163  */
25164 struct ip6_mtuinfo {
25165  struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
25166  uint32_t ip6m_mtu; /* path MTU in host byte order */
25167 };
25168 
25169 /*
25170  * IPv6 routing header types
25171  */
25172 
25173 
25174 extern socklen_t inet6_rth_space(int type, int segments);
25175 extern void *inet6_rth_init(void *bp, socklen_t bp_len, int type, int segments);
25176 extern int inet6_rth_add(void *bp, const struct in6_addr *addr);
25177 extern int inet6_rth_reverse(const void *in, void *out);
25178 extern int inet6_rth_segments(const void *bp);
25179 extern struct in6_addr *inet6_rth_getaddr(const void *bp, int index);
25180 
25181 extern int inet6_opt_init(void *extbuf, socklen_t extlen);
25182 extern int inet6_opt_append(void *extbuf, socklen_t extlen, int offset,
25183  uint8_t type, socklen_t len, uint_t align, void **databufp);
25184 extern int inet6_opt_finish(void *extbuf, socklen_t extlen, int offset);
25185 extern int inet6_opt_set_val(void *databuf, int offset, void *val,
25186  socklen_t vallen);
25187 extern int inet6_opt_next(void *extbuf, socklen_t extlen, int offset,
25188  uint8_t *typep, socklen_t *lenp, void **databufp);
25189 extern int inet6_opt_find(void *extbufp, socklen_t extlen, int offset,
25190  uint8_t type, socklen_t *lenp, void **databufp);
25191 extern int inet6_opt_get_val(void *databuf, int offset, void *val,
25192  socklen_t vallen);
25193 
25194 
25195 /*
25196  * Argument structure for IP_ADD_PROXY_ADDR.
25197  * Note that this is an unstable, experimental interface. It may change
25198  * later. Don't use it unless you know what it is.
25199  */
25200 typedef struct {
25201  struct in_addr in_prefix_addr;
25202  unsigned int in_prefix_len;
25203 } in_prefix_t;
25204 
25205 
25206 
25207 /*
25208  * IPv6 options
25209  */
25210 
25211      /* packets. */
25212      /* argument type: uint_t */
25213 
25214      /* multicast packets. */
25215      /* argument type: struct in6_addr */
25216 
25217      /* multicast packets. */
25218      /* argument type: uint_t */
25219 
25220      /* multicast packets on same socket. */
25221      /* argument type: uint_t */
25222 
25223      /* argument type: struct ipv6_mreq */
25224 
25225      /* argument type: struct ipv6_mreq */
25226 
25227 /*
25228  * Other XPG6 constants.
25229  */
25230 
25231      /* decimal notation. */
25232 
25233      /* standard colon-hex notation. */
25234 
25235 
25236 
25237 
25238 
25239 /*
25240  * IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP are being kept
25241  * for backward compatibility. They have the same meaning as IPV6_JOIN_GROUP
25242  * and IPV6_LEAVE_GROUP respectively.
25243  */
25244 
25245      /* argument type: struct ipv6_mreq */
25246 
25247      /* argument type: struct ipv6_mreq */
25248 
25249 
25250      /* arg type: "struct in6_pktingo" - */
25251 
25252 
25253 
25254 
25255      /* the routing header */
25256 
25257 
25258      /* the routing header */
25259 
25260 
25261 
25262 
25263 /*
25264  * This options exists for backwards compatability and should no longer be
25265  * used.  Use IPV6_RECVDSTOPTS instead.
25266  */
25267 
25268 
25269 
25270 
25271 /*
25272  * enable/disable IPV6_RTHDRDSTOPTS.  Now obsolete.  IPV6_RECVDSTOPTS enables
25273  * the receipt of both headers.
25274  */
25275 # 1259 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25276 /*
25277  * enable/disable receipt of both both IPV6_DSTOPTS headers.
25278  */
25279 
25280 
25281 /*
25282  * protocol-independent multicast membership options.
25283  */
25284 
25285 
25286 
25287 
25288 
25289 
25290 
25291 /* 32Bit field for IPV6_SRC_PREFERENCES */
25292 # 1295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
25293 /*
25294  * SunOS private (potentially not portable) IPV6_ option names
25295  */
25296 
25297 
25298      /* unspecified (all zeros) */
25299 
25300 /*
25301  * Miscellaneous IPv6 constants.
25302  */
25303 
25304 
25305 
25306 
25307 /*
25308  * Extern declarations for pre-defined global const variables
25309  */
25310 
25311 
25312 
25313 extern const struct in6_addr in6addr_any;
25314 extern const struct in6_addr in6addr_loopback;
25315 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
25316 
25317 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 1
25318 /*
25319  * CDDL HEADER START
25320  *
25321  * The contents of this file are subject to the terms of the
25322  * Common Development and Distribution License (the "License").
25323  * You may not use this file except in compliance with the License.
25324  *
25325  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25326  * or http://www.opensolaris.org/os/licensing.
25327  * See the License for the specific language governing permissions
25328  * and limitations under the License.
25329  *
25330  * When distributing Covered Code, include this CDDL HEADER in each
25331  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25332  * If applicable, add the following below this CDDL HEADER, with the
25333  * fields enclosed by brackets "[]" replaced with your own identifying
25334  * information: Portions Copyright [yyyy] [name of copyright owner]
25335  *
25336  * CDDL HEADER END
25337  */
25338 /*
25339  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25340  *
25341  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
25342  */
25343 
25344 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
25345 /*	  All Rights Reserved	*/
25346 
25347 /*
25348  * University Copyright- Copyright (c) 1982, 1986, 1988
25349  * The Regents of the University of California
25350  * All Rights Reserved
25351  *
25352  * University Acknowledgment- Portions of this document are derived from
25353  * software developed by the University of California, Berkeley, and its
25354  * contributors.
25355  */
25356 
25357 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
25358 
25359 
25360 
25361 
25362 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
25363 /*
25364  * CDDL HEADER START
25365  *
25366  * The contents of this file are subject to the terms of the
25367  * Common Development and Distribution License (the "License").
25368  * You may not use this file except in compliance with the License.
25369  *
25370  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25371  * or http://www.opensolaris.org/os/licensing.
25372  * See the License for the specific language governing permissions
25373  * and limitations under the License.
25374  *
25375  * When distributing Covered Code, include this CDDL HEADER in each
25376  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25377  * If applicable, add the following below this CDDL HEADER, with the
25378  * fields enclosed by brackets "[]" replaced with your own identifying
25379  * information: Portions Copyright [yyyy] [name of copyright owner]
25380  *
25381  * CDDL HEADER END
25382  */
25383 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25384 /*	  All Rights Reserved  	*/
25385 
25386 
25387 /*
25388  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25389  * Use is subject to license terms.
25390  *
25391  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
25392  * Copyright 2016 Joyent, Inc.
25393  */
25394 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25395 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 1
25396 /*
25397  * CDDL HEADER START
25398  *
25399  * The contents of this file are subject to the terms of the
25400  * Common Development and Distribution License (the "License").
25401  * You may not use this file except in compliance with the License.
25402  *
25403  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25404  * or http://www.opensolaris.org/os/licensing.
25405  * See the License for the specific language governing permissions
25406  * and limitations under the License.
25407  *
25408  * When distributing Covered Code, include this CDDL HEADER in each
25409  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25410  * If applicable, add the following below this CDDL HEADER, with the
25411  * fields enclosed by brackets "[]" replaced with your own identifying
25412  * information: Portions Copyright [yyyy] [name of copyright owner]
25413  *
25414  * CDDL HEADER END
25415  */
25416 /*
25417  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25418  *
25419  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
25420  * Use is subject to license terms.
25421  *
25422  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
25423  * Copyright (c) 2015, Joyent, Inc.  All rights reserved.
25424  */
25425 
25426 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25427 /*	  All Rights Reserved  	*/
25428 
25429 /*
25430  * University Copyright- Copyright (c) 1982, 1986, 1988
25431  * The Regents of the University of California
25432  * All Rights Reserved
25433  *
25434  * University Acknowledgment- Portions of this document are derived from
25435  * software developed by the University of California, Berkeley, and its
25436  * contributors.
25437  */
25438 
25439 
25440 
25441 
25442 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
25443 /*
25444  * CDDL HEADER START
25445  *
25446  * The contents of this file are subject to the terms of the
25447  * Common Development and Distribution License (the "License").
25448  * You may not use this file except in compliance with the License.
25449  *
25450  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25451  * or http://www.opensolaris.org/os/licensing.
25452  * See the License for the specific language governing permissions
25453  * and limitations under the License.
25454  *
25455  * When distributing Covered Code, include this CDDL HEADER in each
25456  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25457  * If applicable, add the following below this CDDL HEADER, with the
25458  * fields enclosed by brackets "[]" replaced with your own identifying
25459  * information: Portions Copyright [yyyy] [name of copyright owner]
25460  *
25461  * CDDL HEADER END
25462  */
25463 
25464 /*
25465  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
25466  * Copyright 2016 Joyent, Inc.
25467  *
25468  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25469  * Use is subject to license terms.
25470  */
25471 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
25472 
25473 
25474 
25475 
25476 
25477 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
25478 /*
25479  * CDDL HEADER START
25480  *
25481  * The contents of this file are subject to the terms of the
25482  * Common Development and Distribution License (the "License").
25483  * You may not use this file except in compliance with the License.
25484  *
25485  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25486  * or http://www.opensolaris.org/os/licensing.
25487  * See the License for the specific language governing permissions
25488  * and limitations under the License.
25489  *
25490  * When distributing Covered Code, include this CDDL HEADER in each
25491  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25492  * If applicable, add the following below this CDDL HEADER, with the
25493  * fields enclosed by brackets "[]" replaced with your own identifying
25494  * information: Portions Copyright [yyyy] [name of copyright owner]
25495  *
25496  * CDDL HEADER END
25497  */
25498 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25499 /*	  All Rights Reserved  	*/
25500 
25501 
25502 /*
25503  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25504  * Use is subject to license terms.
25505  *
25506  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
25507  * Copyright 2016 Joyent, Inc.
25508  */
25509 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
25510 
25511 /*
25512  * I/O parameter information.  A uio structure describes the I/O which
25513  * is to be performed by an operation.  Typically the data movement will
25514  * be performed by a routine such as uiomove(), which updates the uio
25515  * structure to reflect what was done.
25516  */
25517 
25518 
25519 
25520 
25521 
25522 
25523 
25524 typedef struct iovec {
25525  caddr_t iov_base;
25526 
25527 
25528 
25529  long iov_len;
25530 
25531 } iovec_t;
25532 # 90 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25533 /*
25534  * Segment flag values.
25535  */
25536 typedef enum uio_seg { UIO_USERSPACE, UIO_SYSSPACE, UIO_USERISPACE } uio_seg_t;
25537 
25538 typedef struct uio {
25539  iovec_t *uio_iov; /* pointer to array of iovecs */
25540  int uio_iovcnt; /* number of iovecs */
25541  lloff_t _uio_offset; /* file offset */
25542  uio_seg_t uio_segflg; /* address space (kernel or user) */
25543  uint16_t uio_fmode; /* file mode flags */
25544  uint16_t uio_extflg; /* extended flags */
25545  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
25546  ssize_t uio_resid; /* residual count */
25547 } uio_t;
25548 
25549 /*
25550  * Extended uio_t uioa_t used for asynchronous uio.
25551  *
25552  * Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
25553  *	 as there isn't a formal definition of IOV_MAX for the kernel.
25554  */
25555 
25556 
25557 typedef struct uioa_page_s { /* locked uio_iov state */
25558  int uioa_pfncnt; /* count of pfn_t(s) in *uioa_ppp */
25559  void **uioa_ppp; /* page_t or pfn_t arrary */
25560  caddr_t uioa_base; /* address base */
25561  size_t uioa_len; /* span length */
25562 } uioa_page_t;
25563 
25564 typedef struct uioa_s {
25565  iovec_t *uio_iov; /* pointer to array of iovecs */
25566  int uio_iovcnt; /* number of iovecs */
25567  lloff_t _uio_offset; /* file offset */
25568  uio_seg_t uio_segflg; /* address space (kernel or user) */
25569  uint16_t uio_fmode; /* file mode flags */
25570  uint16_t uio_extflg; /* extended flags */
25571  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
25572  ssize_t uio_resid; /* residual count */
25573  /*
25574 	 * uioa extended members.
25575 	 */
25576  uint32_t uioa_state; /* state of asynch i/o */
25577  ssize_t uioa_mbytes; /* bytes that have been uioamove()ed */
25578  uioa_page_t *uioa_lcur; /* pointer into uioa_locked[] */
25579  void **uioa_lppp; /* pointer into lcur->uioa_ppp[] */
25580  void *uioa_hwst[4]; /* opaque hardware state */
25581  uioa_page_t uioa_locked[16]; /* Per iov locked pages */
25582 } uioa_t;
25583 
25584 /*
25585  * uio extensions
25586  *
25587  * PSARC 2009/478: Copy Reduction Interfaces
25588  */
25589 typedef enum xuio_type {
25590  UIOTYPE_ASYNCIO,
25591  UIOTYPE_ZEROCOPY
25592 } xuio_type_t;
25593 
25594 typedef struct xuio {
25595  uio_t xu_uio; /* Embedded UIO structure */
25596 
25597  /* Extended uio fields */
25598  enum xuio_type xu_type; /* What kind of uio structure? */
25599  union {
25600   /* Async I/O Support, intend to replace uioa_t. */
25601   struct {
25602    uint32_t xu_a_state; /* state of async i/o */
25603    /* bytes that have been uioamove()ed */
25604    ssize_t xu_a_mbytes;
25605    uioa_page_t *xu_a_lcur; /* pointer into uioa_locked[] */
25606    /* pointer into lcur->uioa_ppp[] */
25607    void **xu_a_lppp;
25608    void *xu_a_hwst[4]; /* opaque hardware state */
25609    /* Per iov locked pages */
25610    uioa_page_t xu_a_locked[16];
25611   } xu_aio;
25612 
25613   /*
25614 		 * Copy Reduction Support -- facilate loaning / returning of
25615 		 * filesystem cache buffers.
25616 		 */
25617   struct {
25618    int xu_zc_rw; /* read or write buffer */
25619    void *xu_zc_priv; /* fs specific */
25620   } xu_zc;
25621  } xu_ext;
25622 } xuio_t;
25623 # 207 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25624 /*
25625  * I/O direction.
25626  */
25627 typedef enum uio_rw { UIO_READ, UIO_WRITE } uio_rw_t;
25628 
25629 /*
25630  * uio_extflg: extended flags
25631  *
25632  * NOTE: This flag will be used in uiomove to determine if non-temporal
25633  * access, ie, access bypassing caches, should be used.  Filesystems that
25634  * don't initialize this field could experience suboptimal performance due to
25635  * the random data the field contains.
25636  *
25637  * NOTE: This flag is also used by uioasync callers to pass an extended
25638  * uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
25639  * consumers of a uioa_t require the uio_extflg to be initialized.
25640  */
25641 
25642 
25643 
25644 
25645 
25646 
25647 /*
25648  * Global uioasync capability shadow state.
25649  */
25650 typedef struct uioasync_s {
25651  boolean_t enabled; /* Is uioasync enabled? */
25652  size_t mincnt; /* Minimum byte count for use of */
25653 } uioasync_t;
25654 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25655 extern ssize_t readv(int, const struct iovec *, int);
25656 extern ssize_t writev(int, const struct iovec *, int);
25657 
25658 /*
25659  * When in the large file compilation environment,
25660  * map preadv/pwritev to their 64 bit offset versions
25661  */
25662 
25663 
25664 
25665 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25666 #pragma redefine_extname preadv preadv64
25667 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25668 
25669 
25670 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25671 #pragma redefine_extname pwritev pwritev64
25672 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25673 
25674 
25675 
25676 
25677 
25678 
25679 
25680 /* In the LP64 compilation environment, the APIs are already large file */
25681 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25682 extern ssize_t preadv(int, const struct iovec *, int, off_t);
25683 extern ssize_t pwritev(int, const struct iovec *, int, off_t);
25684 
25685 /*
25686  * preadv64 and pwritev64 should be defined when:
25687  * - Using the transitional compilation environment, and not
25688  *     the large file compilation environment.
25689  */
25690 
25691 
25692 extern ssize_t preadv64(int, const struct iovec *, int, off64_t);
25693 extern ssize_t pwritev64(int, const struct iovec *, int, off64_t);
25694 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25695 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
25696 /*
25697  * CDDL HEADER START
25698  *
25699  * The contents of this file are subject to the terms of the
25700  * Common Development and Distribution License (the "License").
25701  * You may not use this file except in compliance with the License.
25702  *
25703  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25704  * or http://www.opensolaris.org/os/licensing.
25705  * See the License for the specific language governing permissions
25706  * and limitations under the License.
25707  *
25708  * When distributing Covered Code, include this CDDL HEADER in each
25709  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25710  * If applicable, add the following below this CDDL HEADER, with the
25711  * fields enclosed by brackets "[]" replaced with your own identifying
25712  * information: Portions Copyright [yyyy] [name of copyright owner]
25713  *
25714  * CDDL HEADER END
25715  */
25716 
25717 /*
25718  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
25719  * Copyright 2016 Joyent, Inc.
25720  *
25721  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25722  * Use is subject to license terms.
25723  */
25724 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25725 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
25726 /*
25727  * CDDL HEADER START
25728  *
25729  * The contents of this file are subject to the terms of the
25730  * Common Development and Distribution License (the "License").
25731  * You may not use this file except in compliance with the License.
25732  *
25733  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25734  * or http://www.opensolaris.org/os/licensing.
25735  * See the License for the specific language governing permissions
25736  * and limitations under the License.
25737  *
25738  * When distributing Covered Code, include this CDDL HEADER in each
25739  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25740  * If applicable, add the following below this CDDL HEADER, with the
25741  * fields enclosed by brackets "[]" replaced with your own identifying
25742  * information: Portions Copyright [yyyy] [name of copyright owner]
25743  *
25744  * CDDL HEADER END
25745  */
25746 /*
25747  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25748  * Use is subject to license terms.
25749  */
25750 
25751 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
25752 /*	  All Rights Reserved	*/
25753 
25754 /*
25755  * Portions of this source code were derived from Berkeley 4.3 BSD
25756  * under license from the Regents of the University of California.
25757  */
25758 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25759 
25760 
25761 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h" 1
25762 /*
25763  * CDDL HEADER START
25764  *
25765  * The contents of this file are subject to the terms of the
25766  * Common Development and Distribution License, Version 1.0 only
25767  * (the "License").  You may not use this file except in compliance
25768  * with the License.
25769  *
25770  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25771  * or http://www.opensolaris.org/os/licensing.
25772  * See the License for the specific language governing permissions
25773  * and limitations under the License.
25774  *
25775  * When distributing Covered Code, include this CDDL HEADER in each
25776  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25777  * If applicable, add the following below this CDDL HEADER, with the
25778  * fields enclosed by brackets "[]" replaced with your own identifying
25779  * information: Portions Copyright [yyyy] [name of copyright owner]
25780  *
25781  * CDDL HEADER END
25782  */
25783 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25784 /*	  All Rights Reserved  	*/
25785 
25786 
25787 /*
25788  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25789  *
25790  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
25791  * Use is subject to license terms.
25792  */
25793 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
25794 struct netconfig {
25795  char *nc_netid; /* network identifier		*/
25796  unsigned int nc_semantics; /* defined below		*/
25797  unsigned int nc_flag; /* defined below		*/
25798  char *nc_protofmly; /* protocol family name		*/
25799  char *nc_proto; /* protocol name		*/
25800  char *nc_device; /* device name for network id	*/
25801  unsigned int nc_nlookups; /* # of entries in nc_lookups	*/
25802  char **nc_lookups; /* list of lookup directories	*/
25803  unsigned int nc_unused[8]; /* borrowed for lockd etc.	*/
25804 };
25805 
25806 typedef struct {
25807  struct netconfig **nc_head;
25808  struct netconfig **nc_curr;
25809 } NCONF_HANDLE;
25810 
25811 /*
25812  *	Values of nc_semantics
25813  */
25814 
25815 
25816 
25817 
25818 
25819 /*
25820  * NOT FOR PUBLIC USE, Solaris internal only.
25821  * This value of nc_semantics is strictly for use of Remote Direct
25822  * Memory Access provider interfaces in Solaris only and not for
25823  * general use. Do not use this value for general purpose user or
25824  * kernel programming. If used the behavior is undefined.
25825  * This is a PRIVATE interface to be used by Solaris kRPC only.
25826  */
25827 
25828 
25829 /*
25830  *	Values of nc_flag
25831  */
25832 
25833 
25834 
25835 
25836 
25837 /*
25838  *	Values of nc_protofmly
25839  */
25840 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
25841 /*
25842  * NOT FOR PUBLIC USE, Solaris internal only.
25843  * This value of nc_semantics is strictly for use of Remote Direct
25844  * Memory Access provider interfaces in Solaris only and not for
25845  * general use. Do not use this value for general purpose user or
25846  * kernel programming. If used the behavior is undefined.
25847  * This is a PRIVATE interface to be used by Solaris kRPC only.
25848  */
25849 
25850 
25851 /*
25852  *	Values for nc_proto
25853  */
25854 
25855 
25856 
25857 
25858 
25859 
25860 /*
25861  * 	Values for nc_proto for "rdma" protofmly
25862  */
25863 
25864 
25865 
25866 
25867 extern void *setnetconfig(void);
25868 extern int endnetconfig(void *);
25869 extern struct netconfig *getnetconfig(void *);
25870 extern struct netconfig *getnetconfigent(const char *);
25871 extern void freenetconfigent(struct netconfig *);
25872 extern void *setnetpath(void);
25873 extern int endnetpath(void *);
25874 extern struct netconfig *getnetpath(void *);
25875 extern void nc_perror(const char *);
25876 extern char *nc_sperror(void);
25877 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25878 
25879 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
25880 /*
25881  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25882  * Use is subject to license terms.
25883  *
25884  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
25885  */
25886 /*
25887  * Copyright (c) 1982, 1986 Regents of the University of California.
25888  * All rights reserved.
25889  *
25890  * Redistribution and use in source and binary forms are permitted
25891  * provided that this notice is preserved and that due credit is given
25892  * to the University of California at Berkeley. The name of the University
25893  * may not be used to endorse or promote products derived from this
25894  * software without specific prior written permission. This software
25895  * is provided ``as is'' without express or implied warranty.
25896  */
25897 
25898 /*
25899  * Constants and structures defined by the internet system,
25900  * according to following documents
25901  *
25902  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
25903  *	http://www.iana.org/assignments/protocol-numbers
25904  *	http://www.iana.org/assignments/port-numbers
25905  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
25906  *
25907  */
25908 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25909 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25910 /*
25911  * Definitions related to sockets: types, address families, options.
25912  */
25913 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25914 /*
25915  * Types
25916  */
25917 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25918 /*
25919  * Flags for socket() and accept4()
25920  */
25921 
25922 
25923 
25924 
25925 /*
25926  * Option flags per-socket.
25927  */
25928 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25929 /*
25930  * Socket options are passed using a signed integer, but it is also rare
25931  * for more than one to ever be passed at the same time with setsockopt
25932  * and only one at a time can be retrieved with getsockopt.
25933  *
25934  * Since the lower numbers cannot be renumbered for compatibility reasons,
25935  * it would seem that we need to start a new number space (0x40000000 -
25936  * 0x7fffffff) for those that don't need to be stored as a bit flag
25937  * somewhere. This limits the flag options to 30 but that seems to be
25938  * plenty, anyway. 0x40000000 is reserved for future use.
25939  */
25940 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25941 /*
25942  * N.B.: The following definition is present only for compatibility
25943  * with release 3.0.  It will disappear in later releases.
25944  */
25945 
25946 
25947 /*
25948  * Additional options, not kept in so_options.
25949  */
25950 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25951 /* "Socket"-level control message types: */
25952 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25953 /*
25954  * Socket filter options
25955  */
25956 
25957 
25958 
25959 
25960 
25961 /*
25962  * Structure returned by FIL_LIST
25963  */
25964 struct fil_info {
25965  int fi_flags; /* see below (FILF_*) */
25966  int fi_pos; /* position (0 is bottom) */
25967  char fi_name[32]; /* filter name */
25968 };
25969 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25970 /*
25971  * Structure used for manipulating linger option.
25972  */
25973 struct linger {
25974  int l_onoff; /* option on/off */
25975  int l_linger; /* linger time */
25976 };
25977 
25978 /*
25979  * Levels for (get/set)sockopt() that don't apply to a specific protocol.
25980  */
25981 
25982 
25983 
25984 
25985 
25986 
25987 
25988 /*
25989  * Address families.
25990  *
25991  * Some of these constant names are copied for the DTrace IP provider in
25992  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
25993  * in sync.
25994  */
25995 # 300 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25996 /*
25997  * Protocol families, same as address families for now.
25998  */
25999 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26000 /*
26001  * Maximum queue length specifiable by listen.
26002  */
26003 
26004 
26005 /*
26006  * Message header for recvmsg and sendmsg calls.
26007  */
26008 struct msghdr {
26009  void *msg_name; /* optional address */
26010  socklen_t msg_namelen; /* size of address */
26011  struct iovec *msg_iov; /* scatter/gather array */
26012  int msg_iovlen; /* # elements in msg_iov */
26013 
26014 
26015 
26016 
26017 
26018 
26019  caddr_t msg_accrights; /* access rights sent/received */
26020  int msg_accrightslen;
26021 
26022 };
26023 # 412 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26024 /* Added for XPGv2 compliance */
26025 
26026 
26027 
26028 
26029 
26030      /* with left over data */
26031 /* End of XPGv2 compliance */
26032 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26033 /* Added for XPGv2 compliance */
26034 
26035 
26036 
26037 
26038 struct cmsghdr {
26039  socklen_t cmsg_len; /* data byte count, including hdr */
26040  int cmsg_level; /* originating protocol */
26041  int cmsg_type; /* protocol-specific type */
26042 };
26043 # 528 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
26044 extern int accept(int, struct sockaddr *, Psocklen_t);
26045 extern int accept4(int, struct sockaddr *, Psocklen_t, int);
26046 extern int bind(int, const struct sockaddr *, socklen_t);
26047 extern int connect(int, const struct sockaddr *, socklen_t);
26048 extern int getpeername(int, struct sockaddr *, Psocklen_t);
26049 extern int getsockname(int, struct sockaddr *, Psocklen_t);
26050 extern int getsockopt(int, int, int, void *, Psocklen_t);
26051 extern int listen(int, int); /* XXX - fixme???  where do I go */
26052 extern int socketpair(int, int, int, int *);
26053 extern ssize_t recv(int, void *, size_t, int);
26054 extern ssize_t recvfrom(int, void *, size_t, int,
26055  struct sockaddr *, Psocklen_t);
26056 extern ssize_t recvmsg(int, struct msghdr *, int);
26057 extern ssize_t send(int, const void *, size_t, int);
26058 extern ssize_t sendmsg(int, const struct msghdr *, int);
26059 extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
26060  socklen_t);
26061 extern int setsockopt(int, int, int, const void *, socklen_t);
26062 extern int shutdown(int, int);
26063 extern int socket(int, int, int);
26064 
26065 
26066 extern int sockatmark(int);
26067 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
26068 
26069 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
26070 /*
26071  * CDDL HEADER START
26072  *
26073  * The contents of this file are subject to the terms of the
26074  * Common Development and Distribution License (the "License").
26075  * You may not use this file except in compliance with the License.
26076  *
26077  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26078  * or http://www.opensolaris.org/os/licensing.
26079  * See the License for the specific language governing permissions
26080  * and limitations under the License.
26081  *
26082  * When distributing Covered Code, include this CDDL HEADER in each
26083  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26084  * If applicable, add the following below this CDDL HEADER, with the
26085  * fields enclosed by brackets "[]" replaced with your own identifying
26086  * information: Portions Copyright [yyyy] [name of copyright owner]
26087  *
26088  * CDDL HEADER END
26089  */
26090 
26091 /*
26092  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
26093  * Copyright 2016 Joyent, Inc.
26094  *
26095  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
26096  * Use is subject to license terms.
26097  */
26098 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
26099 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
26100 struct hostent {
26101  char *h_name; /* official name of host */
26102  char **h_aliases; /* alias list */
26103  int h_addrtype; /* host address type */
26104  int h_length; /* length of address */
26105  char **h_addr_list; /* list of addresses from name server */
26106 
26107 };
26108 
26109 
26110 /*
26111  * addrinfo introduced with IPv6 for Protocol-Independent Hostname
26112  * and Service Name Translation.
26113  */
26114 
26115 
26116 struct addrinfo {
26117  int ai_flags; /* AI_PASSIVE, AI_CANONNAME, ... */
26118  int ai_family; /* PF_xxx */
26119  int ai_socktype; /* SOCK_xxx */
26120  int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
26121 
26122 
26123 
26124  socklen_t ai_addrlen;
26125  char *ai_canonname; /* canonical name for hostname */
26126  struct sockaddr *ai_addr; /* binary address */
26127  struct addrinfo *ai_next; /* next structure in linked list */
26128 };
26129 
26130 /*
26131  * The flag 0x8000 is currently reserved for private use between libnsl and
26132  * libsocket. See lib/libsocket/inet/getaddrinfo.c for more information.
26133  */
26134 /* addrinfo flags */
26135 
26136 
26137 
26138 
26139 
26140 /* getipnodebyname() flags */
26141 
26142 
26143 
26144 
26145 
26146 /*
26147  * These were defined in RFC 2553 but not SUSv3
26148  * or RFC 3493 which obsoleted 2553.
26149  */
26150 
26151 
26152 
26153 /* addrinfo errors */
26154 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
26155 /* getnameinfo flags */
26156 
26157 
26158 
26159 
26160 
26161 
26162 
26163 /* Not listed in any standards document */
26164 
26165 
26166 
26167 /* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */
26168 
26169 
26170 
26171 
26172 
26173 /*
26174  * Scope delimit character
26175  */
26176 
26177 
26178 
26179 /*
26180  * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
26181  * and algorithms.
26182  */
26183 
26184 typedef struct ipsecalgent {
26185  char **a_names; /* algorithm names */
26186  int a_proto_num; /* protocol number */
26187  int a_alg_num; /* algorithm number */
26188  char *a_mech_name; /* encryption framework mechanism name */
26189  int *a_block_sizes; /* supported block sizes */
26190  int *a_key_sizes; /* supported key sizes */
26191  int a_key_increment; /* key size increment */
26192  int *a_mech_params; /* mechanism specific parameters */
26193  int a_alg_flags; /* algorithm flags */
26194 } ipsecalgent_t;
26195 
26196 /* well-known IPsec protocol numbers */
26197 
26198 
26199 
26200 
26201 
26202 /*
26203  * Assumption here is that a network number
26204  * fits in 32 bits -- probably a poor one.
26205  */
26206 struct netent {
26207  char *n_name; /* official name of net */
26208  char **n_aliases; /* alias list */
26209  int n_addrtype; /* net address type */
26210  in_addr_t n_net; /* network # */
26211 };
26212 
26213 struct protoent {
26214  char *p_name; /* official protocol name */
26215  char **p_aliases; /* alias list */
26216  int p_proto; /* protocol # */
26217 };
26218 
26219 struct servent {
26220  char *s_name; /* official service name */
26221  char **s_aliases; /* alias list */
26222  int s_port; /* port # */
26223  char *s_proto; /* protocol to use */
26224 };
26225 
26226 
26227 struct hostent *gethostbyname_r
26228  (const char *, struct hostent *, char *, int, int *h_errnop);
26229 struct hostent *gethostbyaddr_r
26230  (const char *, int, int, struct hostent *, char *, int, int *h_errnop);
26231 struct hostent *getipnodebyname(const char *, int, int, int *);
26232 struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
26233 void freehostent(struct hostent *);
26234 struct hostent *gethostent_r(struct hostent *, char *, int, int *h_errnop);
26235 
26236 struct servent *getservbyname_r
26237  (const char *name, const char *, struct servent *, char *, int);
26238 struct servent *getservbyport_r
26239  (int port, const char *, struct servent *, char *, int);
26240 struct servent *getservent_r(struct servent *, char *, int);
26241 
26242 struct netent *getnetbyname_r
26243  (const char *, struct netent *, char *, int);
26244 struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int);
26245 struct netent *getnetent_r(struct netent *, char *, int);
26246 
26247 struct protoent *getprotobyname_r
26248  (const char *, struct protoent *, char *, int);
26249 struct protoent *getprotobynumber_r
26250  (int, struct protoent *, char *, int);
26251 struct protoent *getprotoent_r(struct protoent *, char *, int);
26252 
26253 int getnetgrent_r(char **, char **, char **, char *, int);
26254 int innetgr(const char *, const char *, const char *, const char *);
26255 
26256 
26257 /* Old interfaces that return a pointer to a static area;  MT-unsafe */
26258 struct hostent *gethostbyname(const char *);
26259 struct hostent *gethostent(void);
26260 struct netent *getnetbyaddr(in_addr_t, int);
26261 struct netent *getnetbyname(const char *);
26262 struct netent *getnetent(void);
26263 struct protoent *getprotobyname(const char *);
26264 struct protoent *getprotobynumber(int);
26265 struct protoent *getprotoent(void);
26266 struct servent *getservbyname(const char *, const char *);
26267 struct servent *getservbyport(int, const char *);
26268 struct servent *getservent(void);
26269 
26270 /* gethostbyaddr() second argument is a size_t only in unix95/unix98 */
26271 
26272 struct hostent *gethostbyaddr(const void *, socklen_t, int);
26273 
26274 
26275 
26276 
26277 
26278 int endhostent(void);
26279 int endnetent(void);
26280 int endprotoent(void);
26281 int endservent(void);
26282 int sethostent(int);
26283 int setnetent(int);
26284 int setprotoent(int);
26285 int setservent(int);
26286 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
26287 int getaddrinfo(const char *,
26288    const char *,
26289    const struct addrinfo *,
26290    struct addrinfo **);
26291 void freeaddrinfo(struct addrinfo *);
26292 const char *gai_strerror(int);
26293 int getnameinfo(const struct sockaddr *,
26294    socklen_t, char *, socklen_t,
26295    char *, socklen_t, int);
26296 
26297 
26298 
26299 int getnetgrent(char **, char **, char **);
26300 int setnetgrent(const char *);
26301 int endnetgrent(void);
26302 int rcmd(char **, unsigned short,
26303  const char *, const char *, const char *, int *);
26304 int rcmd_af(char **, unsigned short,
26305  const char *, const char *, const char *, int *, int);
26306 int rresvport_af(int *, int);
26307 int rresvport_addr(int *, struct sockaddr_storage *);
26308 int rexec(char **, unsigned short,
26309  const char *, const char *, const char *, int *);
26310 int rexec_af(char **, unsigned short,
26311  const char *, const char *, const char *, int *, int);
26312 int rresvport(int *);
26313 int ruserok(const char *, int, const char *, const char *);
26314 /* BIND */
26315 struct hostent *gethostbyname2(const char *, int);
26316 void herror(const char *);
26317 const char *hstrerror(int);
26318 /* End BIND */
26319 
26320 /* IPsec algorithm prototype definitions */
26321 struct ipsecalgent *getipsecalgbyname(const char *, int, int *);
26322 struct ipsecalgent *getipsecalgbynum(int, int, int *);
26323 int getipsecprotobyname(const char *doi_name);
26324 char *getipsecprotobynum(int doi_domain);
26325 void freeipsecalgent(struct ipsecalgent *ptr);
26326 /* END IPsec algorithm prototype definitions */
26327 
26328 
26329 
26330 /*
26331  * Error return codes from gethostbyname() and gethostbyaddr()
26332  * (when using the resolver)
26333  */
26334 
26335 extern int h_errno;
26336 # 377 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
26337 /*
26338  * Error return codes from gethostbyname() and gethostbyaddr()
26339  * (left in extern int h_errno).
26340  */
26341 # 389 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
26342 /* BIND */
26343 
26344 
26345 /* End BIND */
26346 # 46 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
26347 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 1
26348 /*
26349  * CDDL HEADER START
26350  *
26351  * The contents of this file are subject to the terms of the
26352  * Common Development and Distribution License, Version 1.0 only
26353  * (the "License").  You may not use this file except in compliance
26354  * with the License.
26355  *
26356  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26357  * or http://www.opensolaris.org/os/licensing.
26358  * See the License for the specific language governing permissions
26359  * and limitations under the License.
26360  *
26361  * When distributing Covered Code, include this CDDL HEADER in each
26362  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26363  * If applicable, add the following below this CDDL HEADER, with the
26364  * fields enclosed by brackets "[]" replaced with your own identifying
26365  * information: Portions Copyright [yyyy] [name of copyright owner]
26366  *
26367  * CDDL HEADER END
26368  */
26369 /*
26370  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
26371  * Use is subject to license terms.
26372  */
26373 
26374 
26375 
26376 
26377 #pragma ident "%Z%%M%	%I%	%E% SMI"
26378 
26379 
26380 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
26381 /*
26382  * CDDL HEADER START
26383  *
26384  * The contents of this file are subject to the terms of the
26385  * Common Development and Distribution License (the "License").
26386  * You may not use this file except in compliance with the License.
26387  *
26388  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26389  * or http://www.opensolaris.org/os/licensing.
26390  * See the License for the specific language governing permissions
26391  * and limitations under the License.
26392  *
26393  * When distributing Covered Code, include this CDDL HEADER in each
26394  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26395  * If applicable, add the following below this CDDL HEADER, with the
26396  * fields enclosed by brackets "[]" replaced with your own identifying
26397  * information: Portions Copyright [yyyy] [name of copyright owner]
26398  *
26399  * CDDL HEADER END
26400  */
26401 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26402 /*	  All Rights Reserved  	*/
26403 
26404 
26405 /*
26406  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26407  * Use is subject to license terms.
26408  *
26409  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
26410  * Copyright 2016 Joyent, Inc.
26411  */
26412 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
26413 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
26414 /*
26415  * CDDL HEADER START
26416  *
26417  * The contents of this file are subject to the terms of the
26418  * Common Development and Distribution License, Version 1.0 only
26419  * (the "License").  You may not use this file except in compliance
26420  * with the License.
26421  *
26422  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26423  * or http://www.opensolaris.org/os/licensing.
26424  * See the License for the specific language governing permissions
26425  * and limitations under the License.
26426  *
26427  * When distributing Covered Code, include this CDDL HEADER in each
26428  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26429  * If applicable, add the following below this CDDL HEADER, with the
26430  * fields enclosed by brackets "[]" replaced with your own identifying
26431  * information: Portions Copyright [yyyy] [name of copyright owner]
26432  *
26433  * CDDL HEADER END
26434  */
26435 /*
26436  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
26437  * Use is subject to license terms.
26438  */
26439 
26440 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
26441 /*	  All Rights Reserved  	*/
26442 
26443 /*
26444  * University Copyright- Copyright (c) 1982, 1986, 1988
26445  * The Regents of the University of California
26446  * All Rights Reserved
26447  *
26448  * University Acknowledgment- Portions of this document are derived from
26449  * software developed by the University of California, Berkeley, and its
26450  * contributors.
26451  */
26452 
26453 
26454 
26455 
26456 #pragma ident "%Z%%M%	%I%	%E% SMI"
26457 
26458 
26459 
26460 
26461 
26462 /*
26463  * Error codes
26464  */
26465 # 102 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26466 /* Filesystem Quotas */
26467 
26468 
26469 /* Convergent Error Returns */
26470 # 116 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26471 /* Interprocess Robust Locks */
26472 
26473 
26474 
26475 /* stream problems */
26476 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26477 /* Interprocess Robust Locks */
26478 # 148 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26479 /* shared library problems */
26480 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26481 /* BSD Networking Software */
26482  /* argument errors */
26483 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26484     /* protocol family */
26485 
26486 
26487  /* operational errors */
26488 
26489 
26490 
26491     /* of reset */
26492 
26493 
26494 
26495 
26496 
26497 /* XENIX has 135 - 142 */
26498 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
26499 /* SUN Network File System */
26500 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
26501 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 1
26502 /*
26503  * CDDL HEADER START
26504  *
26505  * The contents of this file are subject to the terms of the
26506  * Common Development and Distribution License, Version 1.0 only
26507  * (the "License").  You may not use this file except in compliance
26508  * with the License.
26509  *
26510  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26511  * or http://www.opensolaris.org/os/licensing.
26512  * See the License for the specific language governing permissions
26513  * and limitations under the License.
26514  *
26515  * When distributing Covered Code, include this CDDL HEADER in each
26516  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26517  * If applicable, add the following below this CDDL HEADER, with the
26518  * fields enclosed by brackets "[]" replaced with your own identifying
26519  * information: Portions Copyright [yyyy] [name of copyright owner]
26520  *
26521  * CDDL HEADER END
26522  */
26523 /*
26524  * Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
26525  * Use is subject to license terms.
26526  */
26527 
26528 
26529 
26530 
26531 #pragma ident "%Z%%M%	%I%	%E% SMI"
26532 
26533 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
26534 /*
26535  * CDDL HEADER START
26536  *
26537  * The contents of this file are subject to the terms of the
26538  * Common Development and Distribution License (the "License").
26539  * You may not use this file except in compliance with the License.
26540  *
26541  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26542  * or http://www.opensolaris.org/os/licensing.
26543  * See the License for the specific language governing permissions
26544  * and limitations under the License.
26545  *
26546  * When distributing Covered Code, include this CDDL HEADER in each
26547  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26548  * If applicable, add the following below this CDDL HEADER, with the
26549  * fields enclosed by brackets "[]" replaced with your own identifying
26550  * information: Portions Copyright [yyyy] [name of copyright owner]
26551  *
26552  * CDDL HEADER END
26553  */
26554 
26555 /*
26556  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
26557  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
26558  */
26559 
26560 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
26561 /*	  All Rights Reserved  	*/
26562 
26563 /*
26564  * University Copyright- Copyright (c) 1982, 1986, 1988
26565  * The Regents of the University of California
26566  * All Rights Reserved
26567  *
26568  * University Acknowledgment- Portions of this document are derived from
26569  * software developed by the University of California, Berkeley, and its
26570  * contributors.
26571  */
26572 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 2
26573 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h"
26574 typedef struct {
26575  char hostname[256];
26576  ushort_t port;
26577 } url_hport_t;
26578 
26579 typedef struct {
26580  boolean_t https;
26581  url_hport_t hport;
26582  char abspath[1024];
26583 } url_t;
26584 
26585 extern int url_parse_hostport(const char *, url_hport_t *, ushort_t);
26586 extern int url_parse(const char *, url_t *);
26587 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
26588 
26589 
26590 
26591 
26592 
26593 /* State information returned by http_conn_info() */
26594 typedef struct {
26595  url_t uri; /* URI last loaded */
26596  url_hport_t proxy; /* proxy, if any being used */
26597  boolean_t keepalive; /* Keepalive setting being used */
26598  uint_t read_timeout; /* Timeout to use for socket reads */
26599 } http_conninfo_t;
26600 
26601 
26602 /* Structure for version of the http file */
26603 typedef struct {
26604  uint_t maj_ver; /* Major version */
26605  uint_t min_ver; /* Minor version */
26606  uint_t micro_ver; /* Micro version */
26607 } boot_http_ver_t;
26608 
26609 /* Internal Libhttp errors */
26610 
26611 
26612 
26613     /* necessarily the underlying transport */
26614     /* connection). */
26615 
26616     /* error. */
26617 
26618 
26619 
26620     /* No matching entry */
26621 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h"
26622 /* Sources of errors */
26623 
26624 
26625 
26626 
26627 
26628 
26629 
26630 typedef struct {
26631  uint_t code; /* status code */
26632  char *statusmsg; /* status message */
26633  uint_t nresphdrs; /* number of response headers */
26634 } http_respinfo_t;
26635 
26636 
26637 typedef void *http_handle_t;
26638 
26639 boot_http_ver_t const *http_get_version(void);
26640 void http_set_p12_format(int);
26641 void http_set_verbose(boolean_t);
26642 int http_set_cipher_list(const char *);
26643 http_handle_t http_srv_init(const url_t *);
26644 int http_set_proxy(http_handle_t, const url_hport_t *);
26645 int http_set_keepalive(http_handle_t, boolean_t);
26646 int http_set_socket_read_timeout(http_handle_t, uint_t);
26647 int http_set_basic_auth(http_handle_t, const char *, const char *);
26648 int http_set_random_file(http_handle_t, const char *);
26649 int http_set_certificate_authority_file(const char *);
26650 int http_set_client_certificate_file(http_handle_t, const char *);
26651 int http_set_password(http_handle_t, const char *);
26652 int http_set_key_file_password(http_handle_t, const char *);
26653 int http_set_private_key_file(http_handle_t, const char *);
26654 
26655 int http_srv_connect(http_handle_t);
26656 int http_head_request(http_handle_t, const char *);
26657 int http_get_request(http_handle_t, const char *);
26658 int http_get_range_request(http_handle_t, const char *, offset_t, offset_t);
26659 void http_free_respinfo(http_respinfo_t *);
26660 int http_process_headers(http_handle_t, http_respinfo_t **);
26661 int http_process_part_headers(http_handle_t, http_respinfo_t **);
26662 char *http_get_header_value(http_handle_t, const char *);
26663 char *http_get_response_header(http_handle_t, uint_t);
26664 int http_read_body(http_handle_t, char *, size_t);
26665 int http_srv_disconnect(http_handle_t);
26666 int http_srv_close(http_handle_t);
26667 http_conninfo_t *http_get_conn_info(http_handle_t);
26668 int http_conn_is_https(http_handle_t, boolean_t *);
26669 ulong_t http_get_lasterr(http_handle_t, uint_t *);
26670 void http_decode_err(ulong_t, int *, int *, int *);
26671 char const *http_errorstr(uint_t, ulong_t);
26672 # 47 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
26673 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
26674 /*
26675  * CDDL HEADER START
26676  *
26677  * The contents of this file are subject to the terms of the
26678  * Common Development and Distribution License (the "License").
26679  * You may not use this file except in compliance with the License.
26680  *
26681  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26682  * or http://www.opensolaris.org/os/licensing.
26683  * See the License for the specific language governing permissions
26684  * and limitations under the License.
26685  *
26686  * When distributing Covered Code, include this CDDL HEADER in each
26687  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26688  * If applicable, add the following below this CDDL HEADER, with the
26689  * fields enclosed by brackets "[]" replaced with your own identifying
26690  * information: Portions Copyright [yyyy] [name of copyright owner]
26691  *
26692  * CDDL HEADER END
26693  */
26694 
26695 /*
26696  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
26697  * Use is subject to license terms.
26698  */
26699 
26700 
26701 
26702 
26703 
26704 /*
26705  * Module:	pkgerr.h
26706  * Description:
26707  *
26708  *   Implements error routines to handle the creation,
26709  *   management, and destruction of error objects, which
26710  *   hold error messages and codes returned from libpkg
26711  *   routines that support the objects defined herein.
26712  */
26713 
26714 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
26715 /*
26716  * CDDL HEADER START
26717  *
26718  * The contents of this file are subject to the terms of the
26719  * Common Development and Distribution License (the "License").
26720  * You may not use this file except in compliance with the License.
26721  *
26722  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26723  * or http://www.opensolaris.org/os/licensing.
26724  * See the License for the specific language governing permissions
26725  * and limitations under the License.
26726  *
26727  * When distributing Covered Code, include this CDDL HEADER in each
26728  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26729  * If applicable, add the following below this CDDL HEADER, with the
26730  * fields enclosed by brackets "[]" replaced with your own identifying
26731  * information: Portions Copyright [yyyy] [name of copyright owner]
26732  *
26733  * CDDL HEADER END
26734  */
26735 
26736 /*
26737  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
26738  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
26739  */
26740 
26741 /*	Copyright (c) 1988 AT&T	*/
26742 /*	  All Rights Reserved  	*/
26743 
26744 /*
26745  * User-visible pieces of the ANSI C standard I/O package.
26746  */
26747 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 2
26748 
26749 
26750 
26751 
26752 
26753 /*
26754  * Public Definitions
26755  */
26756 
26757 typedef enum {
26758  PKGERR_OK = 0,
26759  PKGERR_EXIST,
26760  PKGERR_READ,
26761  PKGERR_CORRUPT,
26762  PKGERR_PARSE,
26763  PKGERR_BADPASS,
26764  PKGERR_BADALIAS,
26765  PKGERR_INTERNAL,
26766  PKGERR_UNSUP,
26767  PKGERR_NOALIAS,
26768  PKGERR_NOALIASMATCH,
26769  PKGERR_MULTIPLE,
26770  PKGERR_INCOMPLETE,
26771  PKGERR_NOPRIVKEY,
26772  PKGERR_NOPUBKEY,
26773  PKGERR_NOCACERT,
26774  PKGERR_NOMEM,
26775  PKGERR_CHAIN,
26776  PKGERR_LOCKED,
26777  PKGERR_WRITE,
26778  PKGERR_UNLOCK,
26779  PKGERR_TIME,
26780  PKGERR_DUPLICATE,
26781  PKGERR_WEB,
26782  PKGERR_VERIFY
26783 } PKG_ERR_CODE;
26784 
26785 /*
26786  * Public Structures
26787  */
26788 
26789 /* external reference to PKG_ERR object (contents private) */
26790 typedef PKG_ERR_CODE pkg_err_t;
26791 
26792 typedef struct _pkg_err_struct PKG_ERR;
26793 
26794 /*
26795  * Public Methods
26796  */
26797 
26798 PKG_ERR *pkgerr_new();
26799 void pkgerr_add(PKG_ERR *, PKG_ERR_CODE, char *, ...);
26800 void pkgerr_clear(PKG_ERR *);
26801 int pkgerr_dump(PKG_ERR *, FILE *);
26802 int pkgerr_num(PKG_ERR *);
26803 char *pkgerr_get(PKG_ERR *, int);
26804 void pkgerr_free(PKG_ERR *);
26805 # 48 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
26806 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 1
26807 /*
26808  * CDDL HEADER START
26809  *
26810  * The contents of this file are subject to the terms of the
26811  * Common Development and Distribution License (the "License").
26812  * You may not use this file except in compliance with the License.
26813  *
26814  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26815  * or http://www.opensolaris.org/os/licensing.
26816  * See the License for the specific language governing permissions
26817  * and limitations under the License.
26818  *
26819  * When distributing Covered Code, include this CDDL HEADER in each
26820  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26821  * If applicable, add the following below this CDDL HEADER, with the
26822  * fields enclosed by brackets "[]" replaced with your own identifying
26823  * information: Portions Copyright [yyyy] [name of copyright owner]
26824  *
26825  * CDDL HEADER END
26826  */
26827 
26828 /*
26829  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
26830  * Use is subject to license terms.
26831  */
26832 
26833 
26834 
26835 
26836 
26837 /*
26838  * Module:	keystore.h
26839  * Description:	This module contains the structure definitions for processing
26840  *		package keystore files.
26841  */
26842 
26843 
26844 
26845 
26846 
26847 # 1 "/usr/include/openssl/evp.h" 1 3 4
26848 /* crypto/evp/evp.h */
26849 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
26850  * All rights reserved.
26851  *
26852  * This package is an SSL implementation written
26853  * by Eric Young (eay@cryptsoft.com).
26854  * The implementation was written so as to conform with Netscapes SSL.
26855  *
26856  * This library is free for commercial and non-commercial use as long as
26857  * the following conditions are aheared to.  The following conditions
26858  * apply to all code found in this distribution, be it the RC4, RSA,
26859  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
26860  * included with this distribution is covered by the same copyright terms
26861  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
26862  *
26863  * Copyright remains Eric Young's, and as such any Copyright notices in
26864  * the code are not to be removed.
26865  * If this package is used in a product, Eric Young should be given attribution
26866  * as the author of the parts of the library used.
26867  * This can be in the form of a textual message at program startup or
26868  * in documentation (online or textual) provided with the package.
26869  *
26870  * Redistribution and use in source and binary forms, with or without
26871  * modification, are permitted provided that the following conditions
26872  * are met:
26873  * 1. Redistributions of source code must retain the copyright
26874  *    notice, this list of conditions and the following disclaimer.
26875  * 2. Redistributions in binary form must reproduce the above copyright
26876  *    notice, this list of conditions and the following disclaimer in the
26877  *    documentation and/or other materials provided with the distribution.
26878  * 3. All advertising materials mentioning features or use of this software
26879  *    must display the following acknowledgement:
26880  *    "This product includes cryptographic software written by
26881  *     Eric Young (eay@cryptsoft.com)"
26882  *    The word 'cryptographic' can be left out if the rouines from the library
26883  *    being used are not cryptographic related :-).
26884  * 4. If you include any Windows specific code (or a derivative thereof) from
26885  *    the apps directory (application code) you must include an acknowledgement:
26886  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
26887  *
26888  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
26889  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26890  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26891  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26892  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26893  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26894  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26895  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26896  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26897  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26898  * SUCH DAMAGE.
26899  *
26900  * The licence and distribution terms for any publically available version or
26901  * derivative of this code cannot be changed.  i.e. this code cannot simply be
26902  * copied and put under another distribution licence
26903  * [including the GNU Public Licence.]
26904  */
26905 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
26906 # 1 "/usr/include/openssl/x509.h" 1 3 4
26907 /* crypto/x509/x509.h */
26908 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
26909  * All rights reserved.
26910  *
26911  * This package is an SSL implementation written
26912  * by Eric Young (eay@cryptsoft.com).
26913  * The implementation was written so as to conform with Netscapes SSL.
26914  *
26915  * This library is free for commercial and non-commercial use as long as
26916  * the following conditions are aheared to.  The following conditions
26917  * apply to all code found in this distribution, be it the RC4, RSA,
26918  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
26919  * included with this distribution is covered by the same copyright terms
26920  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
26921  *
26922  * Copyright remains Eric Young's, and as such any Copyright notices in
26923  * the code are not to be removed.
26924  * If this package is used in a product, Eric Young should be given attribution
26925  * as the author of the parts of the library used.
26926  * This can be in the form of a textual message at program startup or
26927  * in documentation (online or textual) provided with the package.
26928  *
26929  * Redistribution and use in source and binary forms, with or without
26930  * modification, are permitted provided that the following conditions
26931  * are met:
26932  * 1. Redistributions of source code must retain the copyright
26933  *    notice, this list of conditions and the following disclaimer.
26934  * 2. Redistributions in binary form must reproduce the above copyright
26935  *    notice, this list of conditions and the following disclaimer in the
26936  *    documentation and/or other materials provided with the distribution.
26937  * 3. All advertising materials mentioning features or use of this software
26938  *    must display the following acknowledgement:
26939  *    "This product includes cryptographic software written by
26940  *     Eric Young (eay@cryptsoft.com)"
26941  *    The word 'cryptographic' can be left out if the rouines from the library
26942  *    being used are not cryptographic related :-).
26943  * 4. If you include any Windows specific code (or a derivative thereof) from
26944  *    the apps directory (application code) you must include an acknowledgement:
26945  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
26946  *
26947  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
26948  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26949  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26950  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26951  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26952  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26953  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26954  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26955  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26956  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26957  * SUCH DAMAGE.
26958  *
26959  * The licence and distribution terms for any publically available version or
26960  * derivative of this code cannot be changed.  i.e. this code cannot simply be
26961  * copied and put under another distribution licence
26962  * [including the GNU Public Licence.]
26963  */
26964 /* ====================================================================
26965  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
26966  * ECDH support in OpenSSL originally developed by
26967  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
26968  */
26969 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
26970 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
26971 /*
26972  * CDDL HEADER START
26973  *
26974  * The contents of this file are subject to the terms of the
26975  * Common Development and Distribution License (the "License").
26976  * You may not use this file except in compliance with the License.
26977  *
26978  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26979  * or http://www.opensolaris.org/os/licensing.
26980  * See the License for the specific language governing permissions
26981  * and limitations under the License.
26982  *
26983  * When distributing Covered Code, include this CDDL HEADER in each
26984  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26985  * If applicable, add the following below this CDDL HEADER, with the
26986  * fields enclosed by brackets "[]" replaced with your own identifying
26987  * information: Portions Copyright [yyyy] [name of copyright owner]
26988  *
26989  * CDDL HEADER END
26990  */
26991 
26992 /*
26993  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
26994  * Use is subject to license terms.
26995  */
26996 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
26997 
26998 /* keystore structures */
26999 
27000 /* this opaque type represents a keystore */
27001 typedef void *keystore_handle_t;
27002 
27003 /* flags passed to open_keystore */
27004 
27005 /* opens keystore read-only.  Attempts to modify results in an error */
27006 
27007 
27008 /* opens keystore read-write */
27009 
27010 
27011 /*
27012  * tells open_keystore to fall back to app-generic paths in the case that
27013  * the app-specific paths do not exist.
27014  */
27015 
27016 
27017 /*
27018  * tells open_keystore to use the app-specific paths no matter what,
27019  * failing if they cannot be used for any reason.
27020  */
27021 
27022 
27023 /* masks off various types of flags */
27024 
27025 
27026 
27027 /* default is read-only, soft */
27028 
27029 
27030 
27031 /*
27032  * possible encoding formats used by the library, used
27033  * by print_cert
27034  */
27035 typedef enum {
27036  KEYSTORE_FORMAT_PEM,
27037  KEYSTORE_FORMAT_DER,
27038  KEYSTORE_FORMAT_TEXT
27039 } keystore_encoding_format_t;
27040 
27041 /*
27042  * structure passed back to password callback for determining how
27043  * to prompt for passphrase, and where to record errors
27044  */
27045 typedef struct {
27046  PKG_ERR *err;
27047 } keystore_passphrase_data;
27048 
27049 
27050 /* max length of a passphrase.  One could use a short story! */
27051 
27052 
27053 /* callback for collecting passphrase when open_keystore() is called */
27054 typedef int keystore_passphrase_cb(char *, int, int, void *);
27055 
27056 /* names of the individual files within the keystore path */
27057 
27058 
27059 
27060 
27061 /* keystore.c */
27062 extern int open_keystore(PKG_ERR *, char *, char *,
27063     keystore_passphrase_cb, long flags, keystore_handle_t *);
27064 
27065 extern int print_certs(PKG_ERR *, keystore_handle_t, char *,
27066     keystore_encoding_format_t, FILE *);
27067 
27068 extern int check_cert(PKG_ERR *, X509 *);
27069 
27070 extern int check_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *);
27071 
27072 extern int print_cert(PKG_ERR *, X509 *,
27073     keystore_encoding_format_t, char *, boolean_t, FILE *);
27074 
27075 extern int close_keystore(PKG_ERR *, keystore_handle_t,
27076     keystore_passphrase_cb);
27077 
27078 extern int merge_ca_cert(PKG_ERR *, X509 *, keystore_handle_t);
27079 extern int merge_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *,
27080     char *, keystore_handle_t);
27081 
27082 extern int delete_cert_and_keys(PKG_ERR *, keystore_handle_t,
27083     char *);
27084 
27085 extern int find_key_cert_pair(PKG_ERR *, keystore_handle_t,
27086     char *, EVP_PKEY **, X509 **);
27087 
27088 extern int find_ca_certs(PKG_ERR *, keystore_handle_t,
27089     struct stack_st_X509 **);
27090 
27091 extern int find_cl_certs(PKG_ERR *, keystore_handle_t,
27092     struct stack_st_X509 **);
27093 # 49 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
27094 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
27095 /*
27096  * CDDL HEADER START
27097  *
27098  * The contents of this file are subject to the terms of the
27099  * Common Development and Distribution License (the "License").
27100  * You may not use this file except in compliance with the License.
27101  *
27102  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27103  * or http://www.opensolaris.org/os/licensing.
27104  * See the License for the specific language governing permissions
27105  * and limitations under the License.
27106  *
27107  * When distributing Covered Code, include this CDDL HEADER in each
27108  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27109  * If applicable, add the following below this CDDL HEADER, with the
27110  * fields enclosed by brackets "[]" replaced with your own identifying
27111  * information: Portions Copyright [yyyy] [name of copyright owner]
27112  *
27113  * CDDL HEADER END
27114  */
27115 
27116 /*
27117  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
27118  * Use is subject to license terms.
27119  */
27120 # 35 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h"
27121 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
27122 /*
27123  * CDDL HEADER START
27124  *
27125  * The contents of this file are subject to the terms of the
27126  * Common Development and Distribution License (the "License").
27127  * You may not use this file except in compliance with the License.
27128  *
27129  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27130  * or http://www.opensolaris.org/os/licensing.
27131  * See the License for the specific language governing permissions
27132  * and limitations under the License.
27133  *
27134  * When distributing Covered Code, include this CDDL HEADER in each
27135  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27136  * If applicable, add the following below this CDDL HEADER, with the
27137  * fields enclosed by brackets "[]" replaced with your own identifying
27138  * information: Portions Copyright [yyyy] [name of copyright owner]
27139  *
27140  * CDDL HEADER END
27141  */
27142 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
27143 /*	  All Rights Reserved  	*/
27144 
27145 /*
27146  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
27147  * Use is subject to license terms.
27148  */
27149 # 36 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 2
27150 
27151 struct mergstat {
27152  unsigned setuid:1; /* pkgmap entry has setuid */
27153  unsigned setgid:1; /* ... and/or setgid bit set */
27154  unsigned contchg:1; /* contents of the files different */
27155  unsigned attrchg:1; /* attributes are different */
27156  unsigned shared:1; /* > 1 pkg associated with this */
27157  unsigned osetuid:1; /* installed set[ug]id process ... */
27158  unsigned osetgid:1; /* ... being overwritten by pkg. */
27159  unsigned rogue:1; /* conflicting file not owned by a package */
27160  unsigned dir2nondir:1; /* was a directory & now a non-directory */
27161  unsigned replace:1; /* merge makes no sense for this object pair */
27162  unsigned denied:1; /* for some reason this was not allowed in */
27163  unsigned preloaded:1; /* already checked in a prior pkg op */
27164  unsigned processed:1; /* already installed or removed */
27165  unsigned parentsyml2dir:1;
27166  /* parent directory changed from symlink to a directory */
27167 };
27168 
27169 /*
27170  * This is information required by pkgadd for fast operation. A
27171  * cfextra struct is tagged to each cfent structure requiring
27172  * processing. This is how we avoid some unneeded repetition. The
27173  * entries incorporating the word 'local' refer to the path that
27174  * gets us to the delivered package file. In other words, to install
27175  * a file we usually copy from 'local' to 'path' below. In the case
27176  * of a link, where no actual copying takes place, local is the source
27177  * of the link. Note that environment variables are not evaluated in
27178  * the locals unless they are links since the literal path is how
27179  * pkgadd finds the entry under the reloc directory.
27180  */
27181 struct cfextra {
27182  struct cfent cf_ent; /* basic contents file entry */
27183  struct mergstat mstat; /* merge status for installs */
27184  uint32_t fsys_value; /* fstab[] entry index */
27185  uint32_t fsys_base; /* actual base filesystem in fs_tab[] */
27186  char *client_path; /* the client-relative path */
27187  char *server_path; /* the server-relative path */
27188  char *map_path; /* as read from the pkgmap */
27189  char *client_local; /* client_relative local */
27190  char *server_local; /* server relative local */
27191 };
27192 # 50 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
27193 
27194 /*
27195  * The contents database file interface.
27196  */
27197 
27198 typedef struct pkg_server *PKGserver;
27199 
27200 /* Some commands modify the internal database: add them here */
27201 # 82 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27202 typedef enum {
27203  INVALID, /* Not initialized */
27204  NEVER, /* Don't start, does check if it is running. */
27205  FLUSH_LOG, /* Run it once to incorporate the log. */
27206  RUN_ONCE, /* Run until the current client stops. */
27207  TIMEOUT, /* Run until a timeout occurs. */
27208  PERMANENT, /* Run until it is externally terminated. */
27209  DEFAULTMODE = TIMEOUT /* The default mode, must come last */
27210 } start_mode_t;
27211 
27212 typedef struct pkgcmd {
27213  int cmd;
27214  char buf[1];
27215 } pkgcmd_t;
27216 
27217 typedef struct pkgfilter {
27218  int cmd;
27219  int len;
27220  char buf[1];
27221 } pkgfilter_t;
27222 
27223 /*
27224  * Virtual File Protocol definitions
27225  */
27226 
27227 /*
27228  * flags associated with virtual file protocol operations; note that these flags
27229  * may only occupy the low order 16 bits of the 32-bit unsigned flag.
27230  */
27231 
27232 typedef unsigned long VFPFLAGS_T;
27233 # 121 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27234 /* virtual file protocol object */
27235 
27236 typedef struct _vfp VFP_T;
27237 
27238 /* structure behind the virtual file protocol object */
27239 
27240 struct _vfp {
27241  FILE *_vfpFile; /* -> opened FILE */
27242  char *_vfpCurr; /* -> current byte to read/write */
27243  char *_vfpHighWater; /* -> last byte modified */
27244  char *_vfpEnd; /* -> last data byte */
27245  char *_vfpPath; /* -> path associated with FILE */
27246  char *_vfpStart; /* -> first data byte */
27247  void *_vfpExtra; /* undefined */
27248  size_t _vfpSize; /* size of mapped/allocated area */
27249  size_t _vfpMapSize; /* # mapped bytes */
27250  VFPFLAGS_T _vfpFlags; /* flags associated with vfp/data */
27251  int _vfpOverflow; /* non-zero if buffer write overflow */
27252  blkcnt_t _vfpCkStBlocks; /* checkpoint # blocks */
27253  dev_t _vfpCkDev; /* checkpoint device i.d. */
27254  ino_t _vfpCkIno; /* checkpoint inode # */
27255  off_t _vfpCkSize; /* checkpoint size */
27256  time_t _vfpCkMtime; /* checkpoint modification time */
27257 };
27258 
27259 /*
27260  * get highest modified byte (length) contained in vfp
27261  *
27262  * determine number of bytes to write - it will be the highest of:
27263  *  -- the current pointer into the file - this is updated whenever
27264  *	the location of the file is changed by a single byte
27265  *  -- the last "high water mark" - the last known location that
27266  *	was written to the file - updated only when the location
27267  *	of the file is directly changed - e.g. vfpSetCurrCharPtr,
27268  *	vfpTruncate, vfpRewind.
27269  * this reduces the "bookkeeping" that needs to be done to know
27270  * how many bytes to write out to the file - typically a file is
27271  * written sequentially so the current file pointer is sufficient
27272  * to determine how many bytes to write out.
27273  */
27274 # 169 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27275 /*
27276  * increment current pointer by specified delta
27277  * if the delta exceeds the buffer size, set pointer to buffer end
27278  */
27279 # 185 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27280 /* get the path associated with the vfp */
27281 
27282 
27283 /* get a string from the vfp into a fixed size buffer */
27284 # 207 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27285 /* get number of bytes remaining to read */
27286 
27287 
27288 
27289 
27290 /* get number of bytes remaining to write */
27291 
27292 
27293 
27294 
27295 /* put current character and increment to next */
27296 
27297 
27298 
27299 
27300 
27301 
27302 /* put integer to current character and increment */
27303 
27304 
27305 /* put long to current character and increment */
27306 
27307 
27308 /* get current character and increment to next */
27309 
27310 
27311 /* get current character - do not increment */
27312 
27313 
27314 /* get pointer to current character */
27315 
27316 
27317 /* increment current character pointer */
27318 
27319 
27320 /* decrement current character pointer */
27321 
27322 
27323 /* get pointer to first data byte in buffer */
27324 
27325 
27326 /* get pointer to last data byte in buffer */
27327 
27328 
27329 /* set pointer to current character */
27330 
27331 
27332 
27333 
27334 
27335 
27336 /* set pointer to last data byte in buffer */
27337 # 267 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27338 /* seek to end of file - one past last data byte in file */
27339 
27340 
27341 /* get number of bytes between current char and specified char */
27342 
27343 
27344 
27345 /* put string to current character and increment */
27346 # 284 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27347 /* put fixed number of bytes to current character and increment */
27348 # 298 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27349 /* put format one arg to current character and increment */
27350 
27351 
27352 
27353 
27354 
27355 
27356 
27357 struct dm_buf {
27358  char *text_buffer; /* start of allocated buffer */
27359  int offset; /* number of bytes into the text_buffer */
27360  int allocation; /* size of buffer in bytes */
27361 };
27362 
27363 /* This structure is used to hold a dynamically growing string */
27364 
27365 struct dstr {
27366  char *pc;
27367  int len;
27368  int max;
27369 };
27370 
27371 /* setmapmode() defines */
27372 # 330 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27373 /* max length for printed attributes */
27374 
27375 
27376 /*
27377  * These three defines indicate that the prototype file contains a '?'
27378  * meaning do not specify this data in the pkgmap entry.
27379  */
27380 # 366 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27381 /* Settings for network admin defaults */
27382 # 377 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
27383 /* package header magic tokens */
27384 
27385 
27386 
27387 /* name of security files */
27388 
27389 
27390 
27391 
27392 
27393 
27394 /*
27395  * The next three mean that no mode, owner or group was specified or that the
27396  * one specified is invalid for some reason. Sometimes this is an error in
27397  * which case it is generally converted to CUR* with a warning. Other times
27398  * it means "look it up" by stating the existing file system object pointred
27399  * to in the prototype file.
27400  */
27401 
27402 
27403 
27404 
27405 /* string comparitor abbreviators */
27406 
27407 
27408 
27409 
27410 
27411 
27412 extern FILE *epopen(char *cmd, char *mode);
27413 extern char **gpkglist(char *dir, char **pkg, char **catg);
27414 extern int is_not_valid_length(char **category);
27415 extern int is_not_valid_category(char **category, char *progname);
27416 extern int is_same_CATEGORY(char **category, char *installed_category);
27417 extern char **get_categories(char *catg_arg);
27418 
27419 extern void pkglist_cont(char *keyword);
27420 extern char **pkgalias(char *pkg);
27421 extern char *get_prog_name(void);
27422 extern char *set_prog_name(char *name);
27423 extern int averify(int fix, char *ftype, char *path, struct ainfo *ainfo);
27424 extern int ckparam(char *param, char *value);
27425 extern int ckvolseq(char *dir, int part, int nparts);
27426 extern int cverify(int fix, char *ftype, char *path, struct cinfo *cinfo,
27427    int allow_checksum);
27428 extern unsigned long compute_checksum(int *r_cksumerr, char *a_path);
27429 extern int fverify(int fix, char *ftype, char *path, struct ainfo *ainfo,
27430       struct cinfo *cinfo);
27431 extern char *getErrbufAddr(void);
27432 extern int getErrbufSize(void);
27433 extern char *getErrstr(void);
27434 extern void setErrstr(char *errstr);
27435 extern int devtype(char *alias, struct pkgdev *devp);
27436 extern int ds_totread; /* total number of parts read */
27437 extern int ds_close(int pkgendflg);
27438 extern int ds_findpkg(char *device, char *pkg);
27439 extern int ds_getinfo(char *string);
27440 extern int ds_getpkg(char *device, int n, char *dstdir);
27441 extern int ds_ginit(char *device);
27442 extern boolean_t ds_fd_open(void);
27443 extern int ds_init(char *device, char **pkg, char *norewind);
27444 extern int BIO_ds_dump_header(PKG_ERR *, BIO *);
27445 extern int BIO_ds_dump(PKG_ERR *, char *, BIO *);
27446 extern int BIO_dump_cmd(char *cmd, BIO *bio);
27447 extern int ds_next(char *, char *);
27448 extern int ds_readbuf(char *device);
27449 extern int epclose(FILE *pp);
27450 extern int esystem(char *cmd, int ifd, int ofd);
27451 extern int e_ExecCmdArray(int *r_status, char **r_results,
27452    char *a_inputFile, char *a_cmd, char **a_args);
27453 extern int e_ExecCmdList(int *r_status, char **r_results,
27454    char *a_inputFile, char *a_cmd, ...);
27455 extern int gpkgmap(struct cfent *ept, FILE *fp);
27456 extern int gpkgmapvfp(struct cfent *ept, VFP_T *fpv);
27457 extern void setmapmode(int mode_no);
27458 extern int isFdRemote(int a_fd);
27459 extern int isFstypeRemote(char *a_fstype);
27460 extern int isPathRemote(char *a_path);
27461 extern int iscpio(char *path, int *iscomp);
27462 extern int isdir(char *path);
27463 extern int isfile(char *dir, char *file);
27464 extern int fmkdir(char *a_path, int a_mode);
27465 extern int pkgexecl(char *filein, char *fileout, char *uname, char *gname,
27466    ...);
27467 extern int pkgexecv(char *filein, char *fileout, char *uname, char *gname,
27468    char *arg[]);
27469 extern int pkghead(char *device);
27470 extern int pkgmount(struct pkgdev *devp, char *pkg, int part, int nparts,
27471    int getvolflg);
27472 extern int pkgtrans(char *device1, char *device2, char **pkg,
27473    int options, keystore_handle_t, char *);
27474 extern int pkgumount(struct pkgdev *devp);
27475 extern int ppkgmap(struct cfent *ept, FILE *fp);
27476 extern int putcfile(struct cfent *ept, FILE *fp);
27477 extern int putcvfpfile(struct cfent *ept, VFP_T *vfp);
27478 extern int rrmdir(char *path);
27479 extern void set_memalloc_failure_func(void (*)(int));
27480 extern void *xmalloc(size_t size);
27481 extern void *xrealloc(void *ptr, size_t size);
27482 extern char *xstrdup(char *str);
27483 extern void set_passphrase_prompt(char *);
27484 extern void set_passphrase_passarg(char *);
27485 extern int pkg_passphrase_cb(char *, int, int, void *);
27486 
27487 extern int srchcfile(struct cfent *ept, char *path, PKGserver server);
27488 extern struct group *cgrgid(gid_t gid);
27489 extern struct group *cgrnam(char *nam);
27490 extern struct passwd *cpwnam(char *nam);
27491 extern struct passwd *cpwuid(uid_t uid);
27492 extern struct group *clgrgid(gid_t gid);
27493 extern struct group *clgrnam(char *nam);
27494 extern struct passwd *clpwnam(char *nam);
27495 extern struct passwd *clpwuid(uid_t uid);
27496 extern void basepath(char *path, char *basedir, char *ir);
27497 extern void canonize(char *file);
27498 extern void canonize_slashes(char *file);
27499 extern void checksum_off(void);
27500 extern void checksum_on(void);
27501 extern void cvtpath(char *path, char *copy);
27502 extern void ds_order(char *list[]);
27503 extern void ds_putinfo(char *buf, size_t);
27504 extern void ds_skiptoend(char *device);
27505 extern void ecleanup(void);
27506 /*PRINTFLIKE1*/
27507 extern void logerr(char *fmt, ...);
27508 extern int mappath(int flag, char *path);
27509 extern int mapvar(int flag, char *varname);
27510 /*PRINTFLIKE1*/
27511 extern void progerr(char *fmt, ...);
27512 extern void pkgerr(PKG_ERR *);
27513 extern void rpterr(void);
27514 extern void tputcfent(struct cfent *ept, FILE *fp);
27515 extern void set_nonABI_symlinks(void);
27516 extern int nonABI_symlinks(void);
27517 extern void disable_attribute_check(void);
27518 extern int get_disable_attribute_check(void);
27519 
27520 /* security.c */
27521 extern void sec_init(void);
27522 extern char *get_subject_display_name(X509 *);
27523 extern char *get_issuer_display_name(X509 *);
27524 extern char *get_serial_num(X509 *);
27525 extern char *get_fingerprint(X509 *, const EVP_MD *);
27526 extern int get_cert_chain(PKG_ERR *, X509 *, struct stack_st_X509 *,
27527     struct stack_st_X509 *, struct stack_st_X509 **);
27528 
27529 /* pkgstr.c */
27530 void pkgstrConvertUllToTimeString_r(unsigned long long a_time,
27531    char *a_buf, int a_bufLen);
27532 char *pkgstrConvertPathToBasename(char *a_path);
27533 char *pkgstrConvertPathToDirname(char *a_path);
27534 char *pkgstrDup(char *a_str);
27535 char *pkgstrLocatePathBasename(char *a_path);
27536 void pkgstrScaleNumericString(char *a_buf, unsigned long long scale);
27537 void pkgstrAddToken(char **a_old, char *a_new, char a_separator);
27538 boolean_t pkgstrContainsToken(char *a_string, char *a_token,
27539    char *a_separators);
27540 void pkgstrExpandTokens(char **a_old, char *a_string,
27541    char a_separator, char *a_separators);
27542 char *pkgstrGetToken(char *r_sep, char *a_string, int a_index,
27543    char *a_separators);
27544 void pkgstrGetToken_r(char *r_sep, char *a_string, int a_index,
27545    char *a_separators, char *a_buf, int a_bufLen);
27546 unsigned long pkgstrNumTokens(char *a_string, char *a_separators);
27547 char *pkgstrPrintf(char *a_format, ...);
27548 void pkgstrPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
27549 void pkgstrRemoveToken(char **r_string, char *a_token,
27550    char *a_separators, int a_index);
27551 void pkgstrRemoveLeadingWhitespace(char **a_str);
27552 /* vfpops.c */
27553 extern int vfpCheckpointFile(VFP_T **r_destVfp, VFP_T **a_vfp,
27554    char *a_path);
27555 extern int vfpCheckpointOpen(VFP_T **a_cvfp, VFP_T **r_vfp, char *a_path,
27556    char *a_mode, VFPFLAGS_T a_flags);
27557 extern int vfpClearModified(VFP_T *a_vfp);
27558 extern int vfpClose(VFP_T **r_vfp);
27559 extern int vfpGetModified(VFP_T *a_vfp);
27560 extern int vfpOpen(VFP_T **r_vfp, char *a_path, char *a_mode,
27561    VFPFLAGS_T a_flags);
27562 extern void vfpRewind(VFP_T *a_vfp);
27563 extern ssize_t vfpSafePwrite(int a_fildes, void *a_buf,
27564    size_t a_nbyte, off_t a_offset);
27565 extern ssize_t vfpSafeWrite(int a_fildes, void *a_buf, size_t a_nbyte);
27566 extern int vfpSetFlags(VFP_T *a_vfp, VFPFLAGS_T a_flags);
27567 extern int vfpSetModified(VFP_T *a_vfp);
27568 extern int vfpSetSize(VFP_T *a_vfp, size_t a_size);
27569 extern void vfpTruncate(VFP_T *a_vfp);
27570 extern int vfpWriteToFile(VFP_T *a_vfp, char *a_path);
27571 
27572 /* handlelocalfs.c */
27573 boolean_t enable_local_fs(void);
27574 boolean_t restore_local_fs(void);
27575 
27576 /* pkgserv.c */
27577 extern PKGserver pkgopenserver(const char *, const char *, boolean_t);
27578 extern void pkgcloseserver(PKGserver);
27579 extern int pkgcmd(PKGserver, void *, size_t, char **, size_t *,
27580     int *);
27581 extern boolean_t pkgsync_needed(const char *, const char *, boolean_t);
27582 extern int pkgsync(const char *, const char *, boolean_t);
27583 extern int pkgservercommitfile(VFP_T *, PKGserver);
27584 extern int pkgopenfilter(PKGserver server, const char *pkginst);
27585 extern void pkgclosefilter(PKGserver);
27586 extern char *pkggetentry(PKGserver, int *, int *);
27587 extern char *pkggetentry_named(PKGserver, const char *, int *,
27588     int *);
27589 extern void pkgserversetmode(start_mode_t);
27590 extern start_mode_t pkgservergetmode(void);
27591 extern start_mode_t pkgparsemode(const char *);
27592 extern char *pkgmodeargument(start_mode_t);
27593 # 44 "ckentry.c" 2
27594 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
27595 /*
27596  * CDDL HEADER START
27597  *
27598  * The contents of this file are subject to the terms of the
27599  * Common Development and Distribution License (the "License").
27600  * You may not use this file except in compliance with the License.
27601  *
27602  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27603  * or http://www.opensolaris.org/os/licensing.
27604  * See the License for the specific language governing permissions
27605  * and limitations under the License.
27606  *
27607  * When distributing Covered Code, include this CDDL HEADER in each
27608  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27609  * If applicable, add the following below this CDDL HEADER, with the
27610  * fields enclosed by brackets "[]" replaced with your own identifying
27611  * information: Portions Copyright [yyyy] [name of copyright owner]
27612  *
27613  * CDDL HEADER END
27614  */
27615 
27616 /*
27617  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
27618  * Use is subject to license terms.
27619  */
27620 
27621 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
27622 /* All Rights Reserved */
27623 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
27624 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
27625 /*
27626  * CDDL HEADER START
27627  *
27628  * The contents of this file are subject to the terms of the
27629  * Common Development and Distribution License (the "License").
27630  * You may not use this file except in compliance with the License.
27631  *
27632  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27633  * or http://www.opensolaris.org/os/licensing.
27634  * See the License for the specific language governing permissions
27635  * and limitations under the License.
27636  *
27637  * When distributing Covered Code, include this CDDL HEADER in each
27638  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27639  * If applicable, add the following below this CDDL HEADER, with the
27640  * fields enclosed by brackets "[]" replaced with your own identifying
27641  * information: Portions Copyright [yyyy] [name of copyright owner]
27642  *
27643  * CDDL HEADER END
27644  */
27645 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
27646 /*	  All Rights Reserved  	*/
27647 
27648 
27649 /*
27650  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
27651  * Use is subject to license terms.
27652  *
27653  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
27654  * Copyright 2016 Joyent, Inc.
27655  */
27656 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
27657 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
27658 /*
27659  * CDDL HEADER START
27660  *
27661  * The contents of this file are subject to the terms of the
27662  * Common Development and Distribution License (the "License").
27663  * You may not use this file except in compliance with the License.
27664  *
27665  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27666  * or http://www.opensolaris.org/os/licensing.
27667  * See the License for the specific language governing permissions
27668  * and limitations under the License.
27669  *
27670  * When distributing Covered Code, include this CDDL HEADER in each
27671  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27672  * If applicable, add the following below this CDDL HEADER, with the
27673  * fields enclosed by brackets "[]" replaced with your own identifying
27674  * information: Portions Copyright [yyyy] [name of copyright owner]
27675  *
27676  * CDDL HEADER END
27677  */
27678 
27679 /*
27680  * Copyright (c) 2013 Gary Mills
27681  *
27682  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
27683  * Use is subject to license terms.
27684  */
27685 
27686 /*	Copyright (c) 1988 AT&T	*/
27687 /*	  All Rights Reserved  	*/
27688 # 40 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
27689 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
27690 /*
27691  * CDDL HEADER START
27692  *
27693  * The contents of this file are subject to the terms of the
27694  * Common Development and Distribution License (the "License").
27695  * You may not use this file except in compliance with the License.
27696  *
27697  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27698  * or http://www.opensolaris.org/os/licensing.
27699  * See the License for the specific language governing permissions
27700  * and limitations under the License.
27701  *
27702  * When distributing Covered Code, include this CDDL HEADER in each
27703  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27704  * If applicable, add the following below this CDDL HEADER, with the
27705  * fields enclosed by brackets "[]" replaced with your own identifying
27706  * information: Portions Copyright [yyyy] [name of copyright owner]
27707  *
27708  * CDDL HEADER END
27709  */
27710 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
27711 /*	  All Rights Reserved  	*/
27712 
27713 /*
27714  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
27715  * Use is subject to license terms.
27716  */
27717 # 41 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 2
27718 
27719 /* Settings for procedure scripts */
27720 
27721 
27722 
27723 
27724 
27725 
27726 /* Settings for class action scripts */
27727 
27728 
27729 
27730 
27731 
27732 /* Settings for non-privileged scripts */
27733 # 64 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
27734 /* Settings for admin "rscriptalt" option */
27735 # 80 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h"
27736 /* Additional cfent/cfextra codes. */
27737 
27738 
27739 
27740 /* This holds admin file data. */
27741 struct admin {
27742  char *mail;
27743  char *instance;
27744  char *partial;
27745  char *runlevel;
27746  char *idepend;
27747  char *rdepend;
27748  char *space;
27749  char *setuid;
27750  char *conflict;
27751  char *action;
27752  char *networktimeout;
27753  char *networkretries;
27754  char *authentication;
27755  char *keystore;
27756  char *proxy;
27757  char *basedir;
27758  char *rscriptalt;
27759 };
27760 
27761 /*
27762  * This table details the status of all filesystems available to the target
27763  * host.
27764  */
27765 struct fstable {
27766  char *name; /* name of filesystem, (mount point) */
27767  int namlen; /* The length of the name (mountpoint) */
27768  fsblkcnt_t bsize; /* fundamental file system block size */
27769  fsblkcnt_t frsize; /* file system fragment size */
27770  fsblkcnt_t bfree; /* total # of free blocks */
27771  fsblkcnt_t bused; /* total # of used blocks */
27772  fsblkcnt_t ffree; /* total # of free file nodes */
27773  fsblkcnt_t fused; /* total # of used file nodes */
27774  char *fstype; /* type of filesystem - nfs, lo, ... */
27775  char *remote_name; /* client's mounted filesystem */
27776  unsigned writeable:1; /* access permission */
27777  unsigned write_tested:1; /* access permission fully tested */
27778  unsigned remote:1; /* on a remote filesystem */
27779  unsigned mounted:1; /* actually mounted right now */
27780  unsigned srvr_map:1; /* use server_map() */
27781  unsigned cl_mounted:1; /* mounted in client space */
27782  unsigned mnt_failed:1; /* attempt to loopback mount failed */
27783  unsigned served:1; /* filesystem comes from a server */
27784 };
27785 # 45 "ckentry.c" 2
27786 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 1
27787 /*
27788  * CDDL HEADER START
27789  *
27790  * The contents of this file are subject to the terms of the
27791  * Common Development and Distribution License (the "License").
27792  * You may not use this file except in compliance with the License.
27793  *
27794  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27795  * or http://www.opensolaris.org/os/licensing.
27796  * See the License for the specific language governing permissions
27797  * and limitations under the License.
27798  *
27799  * When distributing Covered Code, include this CDDL HEADER in each
27800  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27801  * If applicable, add the following below this CDDL HEADER, with the
27802  * fields enclosed by brackets "[]" replaced with your own identifying
27803  * information: Portions Copyright [yyyy] [name of copyright owner]
27804  *
27805  * CDDL HEADER END
27806  */
27807 
27808 /*
27809  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
27810  * Use is subject to license terms.
27811  */
27812 
27813 
27814 
27815 
27816 
27817 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
27818 /*
27819  * CDDL HEADER START
27820  *
27821  * The contents of this file are subject to the terms of the
27822  * Common Development and Distribution License (the "License").
27823  * You may not use this file except in compliance with the License.
27824  *
27825  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27826  * or http://www.opensolaris.org/os/licensing.
27827  * See the License for the specific language governing permissions
27828  * and limitations under the License.
27829  *
27830  * When distributing Covered Code, include this CDDL HEADER in each
27831  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27832  * If applicable, add the following below this CDDL HEADER, with the
27833  * fields enclosed by brackets "[]" replaced with your own identifying
27834  * information: Portions Copyright [yyyy] [name of copyright owner]
27835  *
27836  * CDDL HEADER END
27837  */
27838 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
27839 /*	  All Rights Reserved  	*/
27840 
27841 
27842 /*
27843  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
27844  * Use is subject to license terms.
27845  *
27846  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
27847  * Copyright 2016 Joyent, Inc.
27848  */
27849 # 32 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
27850 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h" 1
27851 /*
27852  * CDDL HEADER START
27853  *
27854  * The contents of this file are subject to the terms of the
27855  * Common Development and Distribution License (the "License").
27856  * You may not use this file except in compliance with the License.
27857  *
27858  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27859  * or http://www.opensolaris.org/os/licensing.
27860  * See the License for the specific language governing permissions
27861  * and limitations under the License.
27862  *
27863  * When distributing Covered Code, include this CDDL HEADER in each
27864  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27865  * If applicable, add the following below this CDDL HEADER, with the
27866  * fields enclosed by brackets "[]" replaced with your own identifying
27867  * information: Portions Copyright [yyyy] [name of copyright owner]
27868  *
27869  * CDDL HEADER END
27870  */
27871 
27872 /*
27873  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27874  *
27875  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
27876  * Use is subject to license terms.
27877  * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
27878  * Copyright 2016 Toomas Soome <tsoome@me.com>
27879  */
27880 
27881 
27882 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
27883 /*	  All Rights Reserved  	*/
27884 
27885 
27886 
27887 
27888 
27889 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 1
27890 /*
27891  * CDDL HEADER START
27892  *
27893  * The contents of this file are subject to the terms of the
27894  * Common Development and Distribution License (the "License").
27895  * You may not use this file except in compliance with the License.
27896  *
27897  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27898  * or http://www.opensolaris.org/os/licensing.
27899  * See the License for the specific language governing permissions
27900  * and limitations under the License.
27901  *
27902  * When distributing Covered Code, include this CDDL HEADER in each
27903  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27904  * If applicable, add the following below this CDDL HEADER, with the
27905  * fields enclosed by brackets "[]" replaced with your own identifying
27906  * information: Portions Copyright [yyyy] [name of copyright owner]
27907  *
27908  * CDDL HEADER END
27909  */
27910 
27911 /*
27912  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
27913  * Use is subject to license terms.
27914  */
27915 
27916 
27917 
27918 
27919 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
27920 /*
27921  * CDDL HEADER START
27922  *
27923  * The contents of this file are subject to the terms of the
27924  * Common Development and Distribution License (the "License").
27925  * You may not use this file except in compliance with the License.
27926  *
27927  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27928  * or http://www.opensolaris.org/os/licensing.
27929  * See the License for the specific language governing permissions
27930  * and limitations under the License.
27931  *
27932  *
27933  * When distributing Covered Code, include this CDDL HEADER in each
27934  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27935  * If applicable, add the following below this CDDL HEADER, with the
27936  * fields enclosed by brackets "[]" replaced with your own identifying
27937  * information: Portions Copyright [yyyy] [name of copyright owner]
27938  *
27939  * CDDL HEADER END
27940  */
27941 
27942 /*
27943  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
27944  * Use is subject to license terms.
27945  * Copyright 2016 Joyent, Inc.
27946  */
27947 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
27948 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 1
27949 /*
27950  * CDDL HEADER START
27951  *
27952  * The contents of this file are subject to the terms of the
27953  * Common Development and Distribution License (the "License").
27954  * You may not use this file except in compliance with the License.
27955  *
27956  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27957  * or http://www.opensolaris.org/os/licensing.
27958  * See the License for the specific language governing permissions
27959  * and limitations under the License.
27960  *
27961  * When distributing Covered Code, include this CDDL HEADER in each
27962  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27963  * If applicable, add the following below this CDDL HEADER, with the
27964  * fields enclosed by brackets "[]" replaced with your own identifying
27965  * information: Portions Copyright [yyyy] [name of copyright owner]
27966  *
27967  * CDDL HEADER END
27968  */
27969 /*
27970  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
27971  * Use is subject to license terms.
27972  * Copyright 2015 Nexenta Systems, Inc.
27973  */
27974 
27975 
27976 
27977 
27978 #pragma ident "%Z%%M%	%I%	%E% SMI"
27979 
27980 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
27981 /*
27982  * CDDL HEADER START
27983  *
27984  * The contents of this file are subject to the terms of the
27985  * Common Development and Distribution License, Version 1.0 only
27986  * (the "License").  You may not use this file except in compliance
27987  * with the License.
27988  *
27989  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27990  * or http://www.opensolaris.org/os/licensing.
27991  * See the License for the specific language governing permissions
27992  * and limitations under the License.
27993  *
27994  * When distributing Covered Code, include this CDDL HEADER in each
27995  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27996  * If applicable, add the following below this CDDL HEADER, with the
27997  * fields enclosed by brackets "[]" replaced with your own identifying
27998  * information: Portions Copyright [yyyy] [name of copyright owner]
27999  *
28000  * CDDL HEADER END
28001  */
28002 /*
28003  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28004  *
28005  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
28006  * Use is subject to license terms.
28007  */
28008 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types32.h" 2
28009 
28010 
28011 
28012 
28013 
28014 /*
28015  * Interoperability types for programs. Used for:
28016  *
28017  * Crossing between 32-bit and 64-bit domains.
28018  *
28019  * On disk data formats such as filesystem meta data
28020  * and disk label.
28021  *
28022  * Note: Applications should never include this
28023  *       header file.
28024  */
28025 typedef uint32_t caddr32_t;
28026 typedef int32_t daddr32_t;
28027 typedef int32_t off32_t;
28028 typedef uint32_t ino32_t;
28029 typedef int32_t blkcnt32_t;
28030 typedef uint32_t fsblkcnt32_t;
28031 typedef uint32_t fsfilcnt32_t;
28032 typedef int32_t id32_t;
28033 typedef uint32_t major32_t;
28034 typedef uint32_t minor32_t;
28035 typedef int32_t key32_t;
28036 typedef uint32_t mode32_t;
28037 typedef uint32_t uid32_t;
28038 typedef uint32_t gid32_t;
28039 typedef uint32_t nlink32_t;
28040 typedef uint32_t dev32_t;
28041 typedef int32_t pid32_t;
28042 typedef uint32_t size32_t;
28043 typedef int32_t ssize32_t;
28044 typedef int32_t time32_t;
28045 typedef int32_t clock32_t;
28046 typedef uint32_t uintptr32_t;
28047 typedef int32_t intptr32_t;
28048 
28049 struct timeval32 {
28050  time32_t tv_sec; /* seconds */
28051  int32_t tv_usec; /* and microseconds */
28052 };
28053 
28054 typedef struct timespec32 {
28055  time32_t tv_sec; /* seconds */
28056  int32_t tv_nsec; /* and nanoseconds */
28057 } timespec32_t;
28058 
28059 typedef struct timespec32 timestruc32_t;
28060 
28061 typedef struct itimerspec32 {
28062  struct timespec32 it_interval;
28063  struct timespec32 it_value;
28064 } itimerspec32_t;
28065 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
28066 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
28067 /*
28068  * CDDL HEADER START
28069  *
28070  * The contents of this file are subject to the terms of the
28071  * Common Development and Distribution License (the "License").
28072  * You may not use this file except in compliance with the License.
28073  *
28074  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28075  * or http://www.opensolaris.org/os/licensing.
28076  * See the License for the specific language governing permissions
28077  * and limitations under the License.
28078  *
28079  *
28080  * When distributing Covered Code, include this CDDL HEADER in each
28081  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28082  * If applicable, add the following below this CDDL HEADER, with the
28083  * fields enclosed by brackets "[]" replaced with your own identifying
28084  * information: Portions Copyright [yyyy] [name of copyright owner]
28085  *
28086  * CDDL HEADER END
28087  */
28088 
28089 /*
28090  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
28091  * Use is subject to license terms.
28092  * Copyright 2016 Joyent, Inc.
28093  */
28094 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h" 2
28095 
28096 
28097 
28098 
28099 
28100 /*
28101  * Miscellaneous defines
28102  */
28103 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
28104 /*
28105  * Reserve two cylinders on SCSI disks.
28106  * One is for the backup disk label and the other is for the deviceid.
28107  *
28108  * IPI disks only reserve one cylinder, but they will go away soon.
28109  * CDROMs do not reserve any cylinders.
28110  */
28111 
28112 
28113 /*
28114  * Format of a Sun disk label.
28115  * Resides in cylinder 0, head 0, sector 0.
28116  *
28117  * sizeof (struct dk_label) should be 512 (the current sector size),
28118  * but should the sector size increase, this structure should remain
28119  * at the beginning of the sector.
28120  */
28121 
28122 
28123 
28124 
28125 
28126 
28127 
28128 typedef daddr_t blkaddr_t;
28129 typedef daddr32_t blkaddr32_t;
28130 
28131 
28132 
28133 /*
28134  * partition headers:  section 1
28135  * Returned in struct dk_allmap by ioctl DKIOC[SG]APART (dkio(7I))
28136  */
28137 struct dk_map {
28138  blkaddr_t dkl_cylno; /* starting cylinder */
28139  blkaddr_t dkl_nblk; /* number of blocks;  if == 0, */
28140      /* partition is undefined */
28141 };
28142 
28143 /*
28144  * partition headers:  section 1
28145  * Fixed size for on-disk dk_label
28146  */
28147 struct dk_map32 {
28148  blkaddr32_t dkl_cylno; /* starting cylinder */
28149  blkaddr32_t dkl_nblk; /* number of blocks;  if == 0, */
28150      /* partition is undefined */
28151 };
28152 
28153 /*
28154  * partition headers:  section 2,
28155  * brought over from AT&T SVr4 vtoc structure.
28156  */
28157 struct dk_map2 {
28158  uint16_t p_tag; /* ID tag of partition */
28159  uint16_t p_flag; /* permission flag */
28160 };
28161 
28162 struct dkl_partition {
28163  uint16_t p_tag; /* ID tag of partition */
28164  uint16_t p_flag; /* permision flags */
28165  blkaddr32_t p_start; /* start sector no of partition */
28166  blkaddr32_t p_size; /* # of blocks in partition */
28167 };
28168 
28169 
28170 /*
28171  * VTOC inclusions from AT&T SVr4
28172  * Fixed sized types for on-disk VTOC
28173  */
28174 
28175 struct dk_vtoc {
28176 
28177  uint32_t v_bootinfo[3]; /* info for mboot (unsupported) */
28178  uint32_t v_sanity; /* to verify vtoc sanity */
28179  uint32_t v_version; /* layout version */
28180  char v_volume[8]; /* volume name */
28181  uint16_t v_sectorsz; /* sector size in bytes */
28182  uint16_t v_nparts; /* number of partitions */
28183  uint32_t v_reserved[10]; /* free space */
28184  struct dkl_partition v_part[16]; /* partition headers */
28185  time32_t timestamp[16]; /* partition timestamp (unsupported) */
28186  char v_asciilabel[128]; /* for compatibility    */
28187 # 154 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
28188 };
28189 
28190 /*
28191  * define the amount of disk label padding needed to make
28192  * the entire structure occupy 512 bytes.
28193  */
28194 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
28195 struct dk_label {
28196 
28197  struct dk_vtoc dkl_vtoc; /* vtoc inclusions from AT&T SVr4 */
28198  uint32_t dkl_pcyl; /* # of physical cylinders */
28199  uint32_t dkl_ncyl; /* # of data cylinders */
28200  uint16_t dkl_acyl; /* # of alternate cylinders */
28201  uint16_t dkl_bcyl; /* cyl offset (for fixed head area) */
28202  uint32_t dkl_nhead; /* # of heads */
28203  uint32_t dkl_nsect; /* # of data sectors per track */
28204  uint16_t dkl_intrlv; /* interleave factor */
28205  uint16_t dkl_skew; /* skew factor */
28206  uint16_t dkl_apc; /* alternates per cyl (SCSI only)   */
28207  uint16_t dkl_rpm; /* revolutions per minute */
28208  uint16_t dkl_write_reinstruct; /* # sectors to skip, writes */
28209  uint16_t dkl_read_reinstruct; /* # sectors to skip, reads  */
28210  uint16_t dkl_extra[4]; /* for compatible expansion */
28211  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 */
28212 # 217 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
28213  uint16_t dkl_magic; /* identifies this label format */
28214  uint16_t dkl_cksum; /* xor checksum of sector */
28215 };
28216 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/dklabel.h"
28217 struct fk_label { /* DOS floppy label */
28218  uchar_t fkl_type;
28219  uchar_t fkl_magich;
28220  uchar_t fkl_magicl;
28221  uchar_t filler;
28222 };
28223 
28224 /*
28225  * Layout of stored fabricated device id  (on-disk)
28226  */
28227 
28228 
28229 
28230 
28231 
28232 struct dk_devid {
28233  uchar_t dkd_rev_hi; /* revision (MSB) */
28234  uchar_t dkd_rev_lo; /* revision (LSB) */
28235  uchar_t dkd_flags; /* flags (not used yet) */
28236  uchar_t dkd_devid[((512) - ((sizeof (uchar_t) * 7)))]; /* devid stored here */
28237  uchar_t dkd_checksum3; /* checksum (MSB) */
28238  uchar_t dkd_checksum2;
28239  uchar_t dkd_checksum1;
28240  uchar_t dkd_checksum0; /* checksum (LSB) */
28241 };
28242 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h" 2
28243 
28244 
28245 
28246 
28247 
28248 /*
28249  *	Note:  the VTOC is not implemented fully, nor in the manner
28250  *	that AT&T implements it.  AT&T puts the vtoc structure
28251  *	into a sector, usually the second sector (pdsector is first).
28252  *
28253  *	Sun incorporates the tag, flag, version, and volume vtoc fields into
28254  *	its Disk Label, which already has some vtoc-equivalent fields.
28255  *	Upon reading the vtoc with read_vtoc(), the following exceptions
28256  *	occur:
28257  *		v_bootinfo [all]	returned as zero
28258  *		v_sanity		returned as VTOC_SANE
28259  *						if Disk Label was sane
28260  *		v_sectorsz		returned as 512
28261  *		v_reserved [all]	retunred as zero
28262  *		timestamp [all]		returned as zero
28263  *
28264  *	See  dklabel.h, read_vtoc(), and write_vtoc().
28265  */
28266 
28267 
28268      /* (from dkio.h) */
28269 
28270 
28271 
28272 
28273 
28274 /*
28275  * Partition identification tags
28276  */
28277 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h"
28278 /* Tags for EFI/GPT labels */
28279 
28280 
28281 
28282 
28283 
28284 
28285 /*
28286  * Partition permission flags
28287  */
28288 
28289 
28290 
28291 /*
28292  * error codes for reading & writing vtoc
28293  */
28294 
28295 
28296 
28297 
28298 
28299 
28300 
28301 struct partition {
28302  ushort_t p_tag; /* ID tag of partition */
28303  ushort_t p_flag; /* permission flags */
28304  daddr_t p_start; /* start sector no of partition */
28305  long p_size; /* # of blocks in partition */
28306 };
28307 
28308 struct vtoc {
28309  unsigned long v_bootinfo[3]; /* info needed by mboot (unsupported) */
28310  unsigned long v_sanity; /* to verify vtoc sanity */
28311  unsigned long v_version; /* layout version */
28312  char v_volume[8]; /* volume name */
28313  ushort_t v_sectorsz; /* sector size in bytes */
28314  ushort_t v_nparts; /* number of partitions */
28315  unsigned long v_reserved[10]; /* free space */
28316  struct partition v_part[16]; /* partition headers */
28317  time_t timestamp[16]; /* partition timestamp (unsupported) */
28318  char v_asciilabel[128]; /* for compatibility */
28319 };
28320 
28321 struct extpartition {
28322  ushort_t p_tag; /* ID tag of partition */
28323  ushort_t p_flag; /* permission flags */
28324  ushort_t p_pad[2];
28325  diskaddr_t p_start; /* start sector no of partition */
28326  diskaddr_t p_size; /* # of blocks in partition */
28327 };
28328 
28329 
28330 struct extvtoc {
28331  uint64_t v_bootinfo[3]; /* info needed by mboot (unsupported) */
28332  uint64_t v_sanity; /* to verify vtoc sanity */
28333  uint64_t v_version; /* layout version */
28334  char v_volume[8]; /* volume name */
28335  ushort_t v_sectorsz; /* sector size in bytes */
28336  ushort_t v_nparts; /* number of partitions */
28337  ushort_t pad[2];
28338  uint64_t v_reserved[10];
28339  struct extpartition v_part[16]; /* partition headers */
28340  uint64_t timestamp[16]; /* partition timestamp (unsupported) */
28341  char v_asciilabel[128]; /* for compatibility */
28342 };
28343 # 334 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/vtoc.h"
28344 /*
28345  * These defines are the mode parameter for the checksum routines.
28346  */
28347 
28348 
28349 
28350 extern int read_vtoc(int, struct vtoc *);
28351 extern int write_vtoc(int, struct vtoc *);
28352 extern int read_extvtoc(int, struct extvtoc *);
28353 extern int write_extvtoc(int, struct extvtoc *);
28354 # 33 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28355 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
28356 /*
28357  * CDDL HEADER START
28358  *
28359  * The contents of this file are subject to the terms of the
28360  * Common Development and Distribution License (the "License").
28361  * You may not use this file except in compliance with the License.
28362  *
28363  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28364  * or http://www.opensolaris.org/os/licensing.
28365  * See the License for the specific language governing permissions
28366  * and limitations under the License.
28367  *
28368  * When distributing Covered Code, include this CDDL HEADER in each
28369  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28370  * If applicable, add the following below this CDDL HEADER, with the
28371  * fields enclosed by brackets "[]" replaced with your own identifying
28372  * information: Portions Copyright [yyyy] [name of copyright owner]
28373  *
28374  * CDDL HEADER END
28375  */
28376 
28377 /*
28378  * Copyright (c) 2013 Gary Mills
28379  *
28380  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
28381  * Use is subject to license terms.
28382  */
28383 
28384 /*	Copyright (c) 1988 AT&T	*/
28385 /*	  All Rights Reserved  	*/
28386 # 34 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28387 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
28388 /*
28389  * CDDL HEADER START
28390  *
28391  * The contents of this file are subject to the terms of the
28392  * Common Development and Distribution License (the "License").
28393  * You may not use this file except in compliance with the License.
28394  *
28395  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28396  * or http://www.opensolaris.org/os/licensing.
28397  * See the License for the specific language governing permissions
28398  * and limitations under the License.
28399  *
28400  * When distributing Covered Code, include this CDDL HEADER in each
28401  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28402  * If applicable, add the following below this CDDL HEADER, with the
28403  * fields enclosed by brackets "[]" replaced with your own identifying
28404  * information: Portions Copyright [yyyy] [name of copyright owner]
28405  *
28406  * CDDL HEADER END
28407  */
28408 
28409 /*
28410  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28411  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
28412  */
28413 
28414 /*	Copyright (c) 1988 AT&T	*/
28415 /*	  All Rights Reserved  	*/
28416 
28417 /*
28418  * User-visible pieces of the ANSI C standard I/O package.
28419  */
28420 # 35 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28421 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
28422 /*
28423  * CDDL HEADER START
28424  *
28425  * The contents of this file are subject to the terms of the
28426  * Common Development and Distribution License (the "License").
28427  * You may not use this file except in compliance with the License.
28428  *
28429  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28430  * or http://www.opensolaris.org/os/licensing.
28431  * See the License for the specific language governing permissions
28432  * and limitations under the License.
28433  *
28434  * When distributing Covered Code, include this CDDL HEADER in each
28435  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28436  * If applicable, add the following below this CDDL HEADER, with the
28437  * fields enclosed by brackets "[]" replaced with your own identifying
28438  * information: Portions Copyright [yyyy] [name of copyright owner]
28439  *
28440  * CDDL HEADER END
28441  */
28442 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28443 /*	  All Rights Reserved  	*/
28444 
28445 /*
28446  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
28447  * Use is subject to license terms.
28448  */
28449 # 36 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28450 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
28451 /*
28452  * CDDL HEADER START
28453  *
28454  * The contents of this file are subject to the terms of the
28455  * Common Development and Distribution License, Version 1.0 only
28456  * (the "License").  You may not use this file except in compliance
28457  * with the License.
28458  *
28459  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28460  * or http://www.opensolaris.org/os/licensing.
28461  * See the License for the specific language governing permissions
28462  * and limitations under the License.
28463  *
28464  * When distributing Covered Code, include this CDDL HEADER in each
28465  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28466  * If applicable, add the following below this CDDL HEADER, with the
28467  * fields enclosed by brackets "[]" replaced with your own identifying
28468  * information: Portions Copyright [yyyy] [name of copyright owner]
28469  *
28470  * CDDL HEADER END
28471  */
28472 /*
28473  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28474  */
28475 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28476 /*	  All Rights Reserved  	*/
28477 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h"
28478 struct pkginfo {
28479  char *pkginst;
28480  char *name;
28481  char *arch;
28482  char *version;
28483  char *vendor;
28484  char *basedir;
28485  char *catg;
28486  char status;
28487 };
28488 
28489 extern char *pkgdir;
28490 
28491 extern char *pkgparam(char *, char *);
28492 extern int pkginfo(struct pkginfo *, char *, ...),
28493   pkgnmchk(char *, char *, int);
28494 # 37 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28495 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/valtools.h" 1
28496 /*
28497  * CDDL HEADER START
28498  *
28499  * The contents of this file are subject to the terms of the
28500  * Common Development and Distribution License, Version 1.0 only
28501  * (the "License").  You may not use this file except in compliance
28502  * 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 
28522 
28523 
28524 #pragma ident "%Z%%M%	%I%	%E% SMI"
28525 
28526 
28527 
28528 
28529 
28530 struct _choice_ {
28531  char *token;
28532  char *text;
28533  struct _choice_ *next;
28534 };
28535 
28536 struct _menu_ {
28537  char *label;
28538  int attr;
28539  short longest;
28540  short nchoices;
28541  struct _choice_
28542   *choice;
28543  char **invis;
28544 };
28545 
28546 typedef struct _menu_ CKMENU;
28547 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28548 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
28549 /*
28550  * CDDL HEADER START
28551  *
28552  * The contents of this file are subject to the terms of the
28553  * Common Development and Distribution License (the "License").
28554  * You may not use this file except in compliance with the License.
28555  *
28556  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28557  * or http://www.opensolaris.org/os/licensing.
28558  * See the License for the specific language governing permissions
28559  * and limitations under the License.
28560  *
28561  * When distributing Covered Code, include this CDDL HEADER in each
28562  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28563  * If applicable, add the following below this CDDL HEADER, with the
28564  * fields enclosed by brackets "[]" replaced with your own identifying
28565  * information: Portions Copyright [yyyy] [name of copyright owner]
28566  *
28567  * CDDL HEADER END
28568  */
28569 
28570 /*
28571  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
28572  * Use is subject to license terms.
28573  */
28574 
28575 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28576 /* All Rights Reserved */
28577 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h" 2
28578 # 47 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libadm.h"
28579 /*
28580  * ckdate.c
28581  */
28582 extern int ckdate_err (char *fmt, char *error);
28583 extern int ckdate_hlp (char *fmt, char *help);
28584 extern int ckdate_val (char *fmt, char *input);
28585 extern int ckdate (char *date, char *fmt, char *defstr, char *error, char *help, char *prompt);
28586 
28587 
28588 /*
28589  * ckgid.c
28590  */
28591 extern int ckgid_dsp (void);
28592 extern int ckgid_val (char *grpnm);
28593 extern int ckgrpfile (void);
28594 extern void ckgid_err (int disp, char *error);
28595 extern void ckgid_hlp (int disp, char *help);
28596 extern int ckgid (char *gid, short disp, char *defstr, char *error, char *help, char *prompt);
28597 
28598 
28599 /*
28600  * ckint.c
28601  */
28602 extern int ckint_val (char *value, short base);
28603 extern void ckint_err (short base, char *error);
28604 extern void ckint_hlp (short base, char *help);
28605 extern int ckint (long *intval, short base, char *defstr, char *error, char *help, char *prompt);
28606 
28607 
28608 /*
28609  * ckitem.c
28610  */
28611 extern CKMENU *allocmenu (char *label, int attr);
28612 extern void ckitem_err (CKMENU *menup, char *error);
28613 extern void ckitem_hlp (CKMENU *menup, char *help);
28614 extern int ckitem (CKMENU *menup, char *item[], short max, char *defstr, char *error, char *help, char *prompt);
28615 
28616 
28617 extern int setitem (CKMENU *menup, char *choice);
28618 extern int setinvis (CKMENU *menup, char *choice);
28619 extern void printmenu (CKMENU *menup);
28620 
28621 /*
28622  * ckkeywd.c
28623  */
28624 extern int ckkeywd (char *strval, char *keyword[], char *defstr, char *error, char *help, char *prompt);
28625 
28626 
28627 /*
28628  * ckpath.c
28629  */
28630 extern int ckpath_stx (int pflags);
28631 extern int ckpath_val (char *path, int pflags);
28632 extern void ckpath_err (int pflags, char *error, char *input);
28633 extern void ckpath_hlp (int pflags, char *help);
28634 extern int ckpath (char *pathval, int pflags, char *defstr, char *error, char *help, char *prompt);
28635 
28636 
28637 /*
28638  * ckrange.c
28639  */
28640 extern void ckrange_err (long lower, long upper, int base, char *error);
28641 
28642 extern void ckrange_hlp (long lower, long upper, int base, char *help);
28643 extern int ckrange_val (long lower, long upper, int base, char *input);
28644 
28645 extern int ckrange (long *rngval, long lower, long upper, short base, char *defstr, char *error, char *help, char *prompt);
28646 
28647 
28648 
28649 /*
28650  * ckstr.c
28651  */
28652 extern int ckstr_val (char *regexp[], int length, char *input);
28653 extern void ckstr_err (char *regexp[], int length, char *error, char *input);
28654 
28655 extern void ckstr_hlp (char *regexp[], int length, char *help);
28656 extern int ckstr (char *strval, char *regexp[], int length, char *defstr, char *error, char *help, char *prompt);
28657 
28658 
28659 
28660 /*
28661  * cktime.c
28662  */
28663 extern int cktime_val (char *fmt, char *input);
28664 extern int cktime_err (char *fmt, char *error);
28665 extern int cktime_hlp (char *fmt, char *help);
28666 extern int fmtcheck (char *fmt);
28667 extern int cktime (char *tod, char *fmt, char *defstr, char *error, char *help, char *prompt);
28668 
28669 
28670 /*
28671  * ckuid.c
28672  */
28673 extern int ckuid_dsp (void);
28674 extern int ckuid_val (char *usrnm);
28675 extern int ckpwdfile (void);
28676 extern void ckuid_err (short disp, char *error);
28677 extern void ckuid_hlp (int disp, char *help);
28678 extern int ckuid (char *uid, short disp, char *defstr, char *error, char *help, char *prompt);
28679 
28680 
28681 /*
28682  * ckyorn.c
28683  */
28684 extern int ckyorn_val (char *str);
28685 extern void ckyorn_err (char *error);
28686 extern void ckyorn_hlp (char *help);
28687 extern int ckyorn (char *yorn, char *defstr, char *error, char *help, char *prompt);
28688 
28689 
28690 /*
28691  * devattr.c
28692  */
28693 extern char *devattr (char *device, char *attribute);
28694 
28695 /*
28696  * devreserv.c
28697  */
28698 extern char *_rsvtabpath (void);
28699 extern int _openlkfile (void);
28700 extern int _closelkfile (void);
28701 extern int unreserv (long key, char *device);
28702 extern char **devreserv (long key, char **rsvlst[]);
28703 extern int devfree (long key, char *device);
28704 extern struct reservdev **reservdev (void);
28705 
28706 /*
28707  * devtab.c
28708  */
28709 extern void _setdevtab (void);
28710 extern void _enddevtab (void);
28711 extern char *_devtabpath (void);
28712 extern int _opendevtab (char *mode);
28713 extern int _validalias (char *alias);
28714 extern struct devtabent *_getdevtabent (void);
28715 extern void _freedevtabent (struct devtabent *ent);
28716 extern struct devtabent *_getdevrec (char *device);
28717 
28718 /*
28719  * dgrpent.c
28720  */
28721 extern void _setdgrptab (void);
28722 extern void _enddgrptab (void);
28723 extern char *_dgrptabpath (void);
28724 extern int _opendgrptab (char *mode);
28725 extern struct dgrptabent *_getdgrptabent (void);
28726 extern void _freedgrptabent (struct dgrptabent *ent);
28727 extern struct dgrptabent *_getdgrprec (char *dgroup);
28728 
28729 /*
28730  * fulldevnm.c
28731  */
28732 extern char *getfullblkname (char *cp);
28733 extern char *getfullrawname (char *cp);
28734 
28735 /*
28736  * getdev.c
28737  */
28738 extern char **getdev (char **devices, char **criteria, int options);
28739 
28740 /*
28741  * getdgrp.c
28742  */
28743 extern char **getdgrp (char **dgroups, char **criteria, int options);
28744 
28745 /*
28746  * getinput.c
28747  */
28748 extern int getinput (char *s);
28749 
28750 /*
28751  * getvol.c
28752  */
28753 extern int getvol (char *device, char *label, int options, char *prompt);
28754 
28755 extern int _getvol (char *device, char *label, int options, char *prompt, char *norewind);
28756 
28757 extern void doremovecmd (char *device, int echo);
28758 
28759 /*
28760  * listdev.c
28761  */
28762 extern char **listdev (char *device);
28763 
28764 /*
28765  * listdgrp.c
28766  */
28767 extern char **listdgrp (char *dgroup);
28768 
28769 /*
28770  * memory.c
28771  */
28772 extern long sysmem (void);
28773 extern long asysmem (void);
28774 
28775 /*
28776  * pkginfo.c
28777  */
28778 extern int pkginfo (struct pkginfo *info, char *pkginst, ...);
28779 extern int fpkginfo (struct pkginfo *info, char *pkginst);
28780 extern char *fpkginst (char *pkg, ...);
28781 
28782 /*
28783  * pkgnmchk.c
28784  */
28785 extern int pkgnmchk (register char *pkg, register char *spec, int presvr4flg);
28786 
28787 extern void set_ABI_namelngth (void);
28788 extern int get_ABI_namelngth (void);
28789 
28790 /*
28791  * pkgparam.c
28792  */
28793 extern char *fpkgparam (FILE *fp, char *param);
28794 extern char *pkgparam (char *pkg, char *param);
28795 extern void set_PKGpaths (char *path);
28796 extern char *get_PKGLOC (void);
28797 extern char *get_PKGADM (void);
28798 extern void set_PKGADM(char *newpath);
28799 extern void set_PKGLOC(char *newpath);
28800 
28801 /*
28802  * putdev.c
28803  */
28804 extern int _putdevtabrec (FILE *stream, struct devtabent *rec);
28805 extern int _adddevtabrec (char *alias, char **attrval);
28806 extern int _moddevtabrec (char *device, char **attrval);
28807 extern int _rmdevtabrec (char *device);
28808 extern int _rmdevtabattrs (char *device, char **attributes, char ***notfounds);
28809 
28810 
28811 /*
28812  * putdgrp.c
28813  */
28814 extern int _putdgrptabrec (FILE *stream, struct dgrptabent *rec);
28815 extern int _adddgrptabrec (char *dgrp, char **members);
28816 extern int _rmdgrptabrec (char *dgrp);
28817 extern int _rmdgrpmems (char *dgrp, char **mems, char ***notfounds);
28818 
28819 /*
28820  * puterror.c
28821  */
28822 extern void puterror (FILE *fp, char *defmesg, char *error);
28823 
28824 /*
28825  * puthelp.c
28826  */
28827 extern void puthelp (FILE *fp, char *defmesg, char *help);
28828 
28829 /*
28830  * putprmpt.c
28831  */
28832 extern void putprmpt (FILE *fp, char *prompt, char *choices[], char *defstr);
28833 
28834 
28835 /*
28836  * puttext.c
28837  */
28838 extern int puttext (FILE *fp, char *str, int lmarg, int rmarg);
28839 
28840 /*
28841  * rdwr_vtoc.c
28842  */
28843 extern int read_vtoc (int fd, struct vtoc *vtoc);
28844 extern int write_vtoc (int fd, struct vtoc *vtoc);
28845 # 46 "ckentry.c" 2
28846 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 1
28847 /*
28848  * CDDL HEADER START
28849  *
28850  * The contents of this file are subject to the terms of the
28851  * Common Development and Distribution License (the "License").
28852  * You may not use this file except in compliance with the License.
28853  *
28854  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28855  * or http://www.opensolaris.org/os/licensing.
28856  * See the License for the specific language governing permissions
28857  * and limitations under the License.
28858  *
28859  * When distributing Covered Code, include this CDDL HEADER in each
28860  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28861  * If applicable, add the following below this CDDL HEADER, with the
28862  * fields enclosed by brackets "[]" replaced with your own identifying
28863  * information: Portions Copyright [yyyy] [name of copyright owner]
28864  *
28865  * CDDL HEADER END
28866  */
28867 
28868 /*
28869  * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
28870  */
28871 # 34 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
28872 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
28873 /*
28874  * CDDL HEADER START
28875  *
28876  * The contents of this file are subject to the terms of the
28877  * Common Development and Distribution License (the "License").
28878  * You may not use this file except in compliance with the License.
28879  *
28880  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28881  * or http://www.opensolaris.org/os/licensing.
28882  * See the License for the specific language governing permissions
28883  * and limitations under the License.
28884  *
28885  * When distributing Covered Code, include this CDDL HEADER in each
28886  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28887  * If applicable, add the following below this CDDL HEADER, with the
28888  * fields enclosed by brackets "[]" replaced with your own identifying
28889  * information: Portions Copyright [yyyy] [name of copyright owner]
28890  *
28891  * CDDL HEADER END
28892  */
28893 
28894 /*
28895  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28896  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
28897  */
28898 
28899 /*	Copyright (c) 1988 AT&T	*/
28900 /*	  All Rights Reserved  	*/
28901 
28902 /*
28903  * User-visible pieces of the ANSI C standard I/O package.
28904  */
28905 # 35 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
28906 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 1
28907 /*
28908  * CDDL HEADER START
28909  *
28910  * The contents of this file are subject to the terms of the
28911  * Common Development and Distribution License (the "License").
28912  * You may not use this file except in compliance with the License.
28913  *
28914  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28915  * or http://www.opensolaris.org/os/licensing.
28916  * See the License for the specific language governing permissions
28917  * and limitations under the License.
28918  *
28919  * When distributing Covered Code, include this CDDL HEADER in each
28920  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28921  * If applicable, add the following below this CDDL HEADER, with the
28922  * fields enclosed by brackets "[]" replaced with your own identifying
28923  * information: Portions Copyright [yyyy] [name of copyright owner]
28924  *
28925  * CDDL HEADER END
28926  */
28927 
28928 /*
28929  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28930  *
28931  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
28932  * Use is subject to license terms.
28933  */
28934 
28935 /*	Copyright (c) 1988 AT&T	*/
28936 /*	  All Rights Reserved  	*/
28937 
28938 
28939 
28940 
28941 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
28942 /*
28943  * CDDL HEADER START
28944  *
28945  * The contents of this file are subject to the terms of the
28946  * Common Development and Distribution License (the "License").
28947  * You may not use this file except in compliance with the License.
28948  *
28949  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28950  * or http://www.opensolaris.org/os/licensing.
28951  * See the License for the specific language governing permissions
28952  * and limitations under the License.
28953  *
28954  * When distributing Covered Code, include this CDDL HEADER in each
28955  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28956  * If applicable, add the following below this CDDL HEADER, with the
28957  * fields enclosed by brackets "[]" replaced with your own identifying
28958  * information: Portions Copyright [yyyy] [name of copyright owner]
28959  *
28960  * CDDL HEADER END
28961  */
28962 
28963 /*
28964  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
28965  * Copyright 2016 Joyent, Inc.
28966  *
28967  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
28968  * Use is subject to license terms.
28969  */
28970 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
28971 
28972 
28973 
28974 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
28975 /*
28976  * CDDL HEADER START
28977  *
28978  * The contents of this file are subject to the terms of the
28979  * Common Development and Distribution License (the "License").
28980  * You may not use this file except in compliance with the License.
28981  *
28982  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
28983  * or http://www.opensolaris.org/os/licensing.
28984  * See the License for the specific language governing permissions
28985  * and limitations under the License.
28986  *
28987  * When distributing Covered Code, include this CDDL HEADER in each
28988  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
28989  * If applicable, add the following below this CDDL HEADER, with the
28990  * fields enclosed by brackets "[]" replaced with your own identifying
28991  * information: Portions Copyright [yyyy] [name of copyright owner]
28992  *
28993  * CDDL HEADER END
28994  */
28995 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28996 /*	  All Rights Reserved  	*/
28997 
28998 
28999 /*
29000  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
29001  * Use is subject to license terms.
29002  *
29003  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
29004  * Copyright 2016 Joyent, Inc.
29005  */
29006 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
29007 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 1
29008 /*
29009  * CDDL HEADER START
29010  *
29011  * The contents of this file are subject to the terms of the
29012  * Common Development and Distribution License (the "License").
29013  * You may not use this file except in compliance with the License.
29014  *
29015  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29016  * or http://www.opensolaris.org/os/licensing.
29017  * See the License for the specific language governing permissions
29018  * and limitations under the License.
29019  *
29020  * When distributing Covered Code, include this CDDL HEADER in each
29021  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29022  * If applicable, add the following below this CDDL HEADER, with the
29023  * fields enclosed by brackets "[]" replaced with your own identifying
29024  * information: Portions Copyright [yyyy] [name of copyright owner]
29025  *
29026  * CDDL HEADER END
29027  */
29028 
29029 /*
29030  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
29031  */
29032 
29033 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
29034 /*	  All Rights Reserved  	*/
29035 
29036 /*
29037  * University Copyright- Copyright (c) 1982, 1986, 1988
29038  * The Regents of the University of California
29039  * All Rights Reserved
29040  *
29041  * University Acknowledgment- Portions of this document are derived from
29042  * software developed by the University of California, Berkeley, and its
29043  * contributors.
29044  */
29045 
29046 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
29047 /* Copyright 2015, Joyent, Inc. */
29048 
29049 
29050 
29051 
29052 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
29053 /*
29054  * CDDL HEADER START
29055  *
29056  * The contents of this file are subject to the terms of the
29057  * Common Development and Distribution License (the "License").
29058  * You may not use this file except in compliance with the License.
29059  *
29060  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29061  * or http://www.opensolaris.org/os/licensing.
29062  * See the License for the specific language governing permissions
29063  * and limitations under the License.
29064  *
29065  * When distributing Covered Code, include this CDDL HEADER in each
29066  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29067  * If applicable, add the following below this CDDL HEADER, with the
29068  * fields enclosed by brackets "[]" replaced with your own identifying
29069  * information: Portions Copyright [yyyy] [name of copyright owner]
29070  *
29071  * CDDL HEADER END
29072  */
29073 
29074 /*
29075  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
29076  * Copyright 2016 Joyent, Inc.
29077  *
29078  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
29079  * Use is subject to license terms.
29080  */
29081 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 2
29082 
29083 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
29084 /*
29085  * CDDL HEADER START
29086  *
29087  * The contents of this file are subject to the terms of the
29088  * Common Development and Distribution License (the "License").
29089  * You may not use this file except in compliance with the License.
29090  *
29091  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29092  * or http://www.opensolaris.org/os/licensing.
29093  * See the License for the specific language governing permissions
29094  * and limitations under the License.
29095  *
29096  * When distributing Covered Code, include this CDDL HEADER in each
29097  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29098  * If applicable, add the following below this CDDL HEADER, with the
29099  * fields enclosed by brackets "[]" replaced with your own identifying
29100  * information: Portions Copyright [yyyy] [name of copyright owner]
29101  *
29102  * CDDL HEADER END
29103  */
29104 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
29105 /*	  All Rights Reserved  	*/
29106 
29107 
29108 /*
29109  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
29110  * Use is subject to license terms.
29111  *
29112  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
29113  * Copyright 2016 Joyent, Inc.
29114  */
29115 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h" 2
29116 
29117 
29118 
29119 
29120 
29121 /*
29122  * Flag values accessible to open(2) and fcntl(2)
29123  * The first five can only be set (exclusively) by open(2).
29124  */
29125 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
29126     /* defines read/write file integrity */
29127 
29128 
29129 
29130 
29131 
29132 
29133 /*
29134  * Flag values accessible only to open(2).
29135  */
29136 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
29137 /*
29138  * fcntl(2) requests
29139  *
29140  * N.B.: values are not necessarily assigned sequentially below.
29141  */
29142 
29143 
29144 
29145 
29146 
29147 
29148 
29149 /*
29150  * Applications that read /dev/mem must be built like the kernel.  A
29151  * new symbol "_KMEMUSER" is defined for this purpose.
29152  */
29153 # 128 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
29154      /* EINVAL is fildes matches arg1 */
29155 # 137 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
29156 /*
29157  * Numbers 20-22 have been removed and should not be reused.
29158  */
29159 
29160 
29161 
29162 
29163 
29164     /* manager */
29165 
29166 /*
29167  * Commands that refer to flock structures.  The argument types differ between
29168  * the large and small file environments; therefore, the #defined values must
29169  * as well.
29170  * The NBMAND forms are private and should not be used.
29171  * The FLOCK forms are also private and should not be used.
29172  */
29173 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
29174 /* ILP32 large file application compilation environment version */
29175 # 190 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
29176 /*
29177  * transitional large file interface version
29178  * These are only valid in a 32 bit application compiled with large files
29179  * option, for source compatibility, the 64-bit versions are mapped back
29180  * to the native versions.
29181  */
29182 # 233 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
29183 /*
29184  * File segment locking set data type - information passed to system by user.
29185  */
29186 
29187 /* regular version, for both small and large file compilation environment */
29188 typedef struct flock {
29189  short l_type;
29190  short l_whence;
29191  off_t l_start;
29192  off_t l_len; /* len == 0 means until end of file */
29193  int l_sysid;
29194  pid_t l_pid;
29195  long l_pad[4]; /* reserve area */
29196 } flock_t;
29197 # 264 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
29198 /* transitional large file interface version */
29199 
29200 
29201 
29202 typedef struct flock64 {
29203  short l_type;
29204  short l_whence;
29205  off64_t l_start;
29206  off64_t l_len; /* len == 0 means until end of file */
29207  int l_sysid;
29208  pid_t l_pid;
29209  long l_pad[4]; /* reserve area */
29210 } flock64_t;
29211 # 328 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
29212 /*
29213  * File segment locking types.
29214  */
29215 
29216 
29217 
29218 
29219 
29220 /*
29221  * POSIX constants
29222  */
29223 
29224 /* Mask for file access modes */
29225 
29226 
29227 
29228 /*
29229  * DIRECTIO
29230  */
29231 
29232 
29233 
29234 
29235 /*
29236  * File share reservation type
29237  */
29238 typedef struct fshare {
29239  short f_access;
29240  short f_deny;
29241  int f_id;
29242 } fshare_t;
29243 
29244 /*
29245  * f_access values
29246  */
29247 
29248 
29249 
29250 
29251 
29252 
29253 /*
29254  * f_deny values
29255  */
29256 # 381 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
29257 /*
29258  * Special flags for functions such as openat(), fstatat()....
29259  */
29260 
29261 
29262  /* || defined(_XPG7) */
29263 # 396 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/fcntl.h"
29264 /* advice for posix_fadvise */
29265 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h" 2
29266 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29267 /* large file compilation environment setup */
29268 
29269 
29270 
29271 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29272 #pragma redefine_extname open open64
29273 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29274 
29275 
29276 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29277 #pragma redefine_extname creat creat64
29278 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29279 
29280 
29281 
29282 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29283 #pragma redefine_extname posix_fadvise posix_fadvise64
29284 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29285 
29286 
29287 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29288 #pragma redefine_extname posix_fallocate posix_fallocate64
29289 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29290 
29291 
29292 
29293 
29294 
29295 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29296 #pragma redefine_extname openat openat64
29297 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29298 
29299 
29300 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29301 #pragma redefine_extname attropen attropen64
29302 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29303 # 131 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fcntl.h"
29304 extern int fcntl(int, int, ...);
29305 extern int open(const char *, int, ...);
29306 extern int creat(const char *, mode_t);
29307 
29308 extern int posix_fadvise(int, off_t, off_t, int);
29309 extern int posix_fallocate(int, off_t, off_t);
29310 
29311 
29312 
29313 extern int openat(int, const char *, int, ...);
29314 extern int attropen(const char *, const char *, int, ...);
29315 
29316 
29317 extern int directio(int, int);
29318 
29319 
29320 /* transitional large file interface versions */
29321 
29322 
29323 extern int open64(const char *, int, ...);
29324 extern int creat64(const char *, mode_t);
29325 
29326 extern int posix_fadvise64(int, off64_t, off64_t, int);
29327 extern int posix_fallocate64(int, off64_t, off64_t);
29328 
29329 
29330 
29331 extern int openat64(int, const char *, int, ...);
29332 extern int attropen64(const char *, const char *, int, ...);
29333 # 36 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
29334 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
29335 /*
29336  * CDDL HEADER START
29337  *
29338  * The contents of this file are subject to the terms of the
29339  * Common Development and Distribution License (the "License").
29340  * You may not use this file except in compliance with the License.
29341  *
29342  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29343  * or http://www.opensolaris.org/os/licensing.
29344  * See the License for the specific language governing permissions
29345  * and limitations under the License.
29346  *
29347  * When distributing Covered Code, include this CDDL HEADER in each
29348  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29349  * If applicable, add the following below this CDDL HEADER, with the
29350  * fields enclosed by brackets "[]" replaced with your own identifying
29351  * information: Portions Copyright [yyyy] [name of copyright owner]
29352  *
29353  * CDDL HEADER END
29354  */
29355 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
29356 /*	  All Rights Reserved  	*/
29357 
29358 
29359 /*
29360  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
29361  * Use is subject to license terms.
29362  *
29363  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
29364  * Copyright 2016 Joyent, Inc.
29365  */
29366 # 37 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
29367 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
29368 /*
29369  * CDDL HEADER START
29370  *
29371  * The contents of this file are subject to the terms of the
29372  * Common Development and Distribution License (the "License").
29373  * You may not use this file except in compliance with the License.
29374  *
29375  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29376  * or http://www.opensolaris.org/os/licensing.
29377  * See the License for the specific language governing permissions
29378  * and limitations under the License.
29379  *
29380  * When distributing Covered Code, include this CDDL HEADER in each
29381  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29382  * If applicable, add the following below this CDDL HEADER, with the
29383  * fields enclosed by brackets "[]" replaced with your own identifying
29384  * information: Portions Copyright [yyyy] [name of copyright owner]
29385  *
29386  * CDDL HEADER END
29387  */
29388 
29389 /*
29390  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
29391  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
29392  */
29393 
29394 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
29395 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
29396 /*	All Rights Reserved	*/
29397 # 38 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
29398 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
29399 /*
29400  * CDDL HEADER START
29401  *
29402  * The contents of this file are subject to the terms of the
29403  * Common Development and Distribution License (the "License").
29404  * You may not use this file except in compliance with the License.
29405  *
29406  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29407  * or http://www.opensolaris.org/os/licensing.
29408  * See the License for the specific language governing permissions
29409  * and limitations under the License.
29410  *
29411  * When distributing Covered Code, include this CDDL HEADER in each
29412  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29413  * If applicable, add the following below this CDDL HEADER, with the
29414  * fields enclosed by brackets "[]" replaced with your own identifying
29415  * information: Portions Copyright [yyyy] [name of copyright owner]
29416  *
29417  * CDDL HEADER END
29418  */
29419 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
29420 /*	  All Rights Reserved  	*/
29421 
29422 /*
29423  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
29424  * Use is subject to license terms.
29425  */
29426 # 39 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
29427 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkginfo.h" 1
29428 /*
29429  * CDDL HEADER START
29430  *
29431  * The contents of this file are subject to the terms of the
29432  * Common Development and Distribution License, Version 1.0 only
29433  * (the "License").  You may not use this file except in compliance
29434  * with the License.
29435  *
29436  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29437  * or http://www.opensolaris.org/os/licensing.
29438  * See the License for the specific language governing permissions
29439  * and limitations under the License.
29440  *
29441  * When distributing Covered Code, include this CDDL HEADER in each
29442  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29443  * If applicable, add the following below this CDDL HEADER, with the
29444  * fields enclosed by brackets "[]" replaced with your own identifying
29445  * information: Portions Copyright [yyyy] [name of copyright owner]
29446  *
29447  * CDDL HEADER END
29448  */
29449 /*
29450  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
29451  */
29452 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
29453 /*	  All Rights Reserved  	*/
29454 # 40 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
29455 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
29456 /*
29457  * CDDL HEADER START
29458  *
29459  * The contents of this file are subject to the terms of the
29460  * Common Development and Distribution License (the "License").
29461  * You may not use this file except in compliance with the License.
29462  *
29463  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29464  * or http://www.opensolaris.org/os/licensing.
29465  * See the License for the specific language governing permissions
29466  * and limitations under the License.
29467  *
29468  * When distributing Covered Code, include this CDDL HEADER in each
29469  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29470  * If applicable, add the following below this CDDL HEADER, with the
29471  * fields enclosed by brackets "[]" replaced with your own identifying
29472  * information: Portions Copyright [yyyy] [name of copyright owner]
29473  *
29474  * CDDL HEADER END
29475  */
29476 
29477 /*
29478  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
29479  * Use is subject to license terms.
29480  */
29481 
29482 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
29483 /* All Rights Reserved */
29484 # 41 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
29485 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
29486 /*
29487  * CDDL HEADER START
29488  *
29489  * The contents of this file are subject to the terms of the
29490  * Common Development and Distribution License (the "License").
29491  * You may not use this file except in compliance with the License.
29492  *
29493  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29494  * or http://www.opensolaris.org/os/licensing.
29495  * See the License for the specific language governing permissions
29496  * and limitations under the License.
29497  *
29498  * When distributing Covered Code, include this CDDL HEADER in each
29499  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29500  * If applicable, add the following below this CDDL HEADER, with the
29501  * fields enclosed by brackets "[]" replaced with your own identifying
29502  * information: Portions Copyright [yyyy] [name of copyright owner]
29503  *
29504  * CDDL HEADER END
29505  */
29506 
29507 /*
29508  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
29509  * Use is subject to license terms.
29510  */
29511 # 42 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
29512 # 1 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/install.h" 1
29513 /*
29514  * CDDL HEADER START
29515  *
29516  * The contents of this file are subject to the terms of the
29517  * Common Development and Distribution License (the "License").
29518  * You may not use this file except in compliance with the License.
29519  *
29520  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
29521  * or http://www.opensolaris.org/os/licensing.
29522  * See the License for the specific language governing permissions
29523  * and limitations under the License.
29524  *
29525  * When distributing Covered Code, include this CDDL HEADER in each
29526  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
29527  * If applicable, add the following below this CDDL HEADER, with the
29528  * fields enclosed by brackets "[]" replaced with your own identifying
29529  * information: Portions Copyright [yyyy] [name of copyright owner]
29530  *
29531  * CDDL HEADER END
29532  */
29533 
29534 /*
29535  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
29536  * Use is subject to license terms.
29537  */
29538 
29539 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
29540 /* All Rights Reserved */
29541 # 43 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h" 2
29542 
29543 
29544 
29545 
29546 
29547 /* signal handler function definition */
29548 
29549 typedef void (sighdlrFunc_t)(int);
29550 
29551 /* maximum parameter length */
29552 
29553 
29554 
29555 /* flag for check_applicability */
29556 
29557 typedef unsigned long CAF_T;
29558 
29559 /* flags for check_applicability */
29560 
29561 
29562 
29563 
29564 
29565 /* path to the request file in the package directory */
29566 
29567 
29568 
29569 /* path to the copyright file in the package directory */
29570 
29571 
29572 
29573 /* path to the depend file in the package directory */
29574 
29575 
29576 
29577 /*
29578  * name of environment variable set to non-global zone name being installed:
29579  * pkgadd/pkginstall expects this name and passes it on to any scripts that
29580  * are run if it is set.
29581  */
29582 
29583 
29584 
29585 /*
29586  * name of environment variable set to indicate this package should be installed
29587  * in the current zone only - see PSARC/2004/789 - New Pkginfo(4) attributes
29588  * for zones
29589  */
29590 
29591 
29592 
29593 /*
29594  * name of environment variable set to indicate this package should be installed
29595  * in all zones, and only from the global zone - see PSARC/2003/460
29596  */
29597 
29598 
29599 
29600 /*
29601  * name of environment variable set to indicate this package should be installed
29602  * hollow (db update only) when installed in nonglobal zone - see PSARC/2003/460
29603  */
29604 
29605 
29606 
29607 /*
29608  * General purpose return codes used for functions which don't return a basic
29609  * success or failure. For those functions wherein a yes/no result is
29610  * possible, then 1 means OK and 0 means FAIL.
29611  */
29612 
29613 
29614 
29615 
29616 /* These are the file status indicators for the contents file */
29617 # 128 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
29618 /* control bits for pkgdbmerg() */
29619 
29620 
29621 
29622 /* control bits for file verification by class */
29623 
29624 
29625 
29626 
29627 /* control bit for path type to pass to CAS */
29628 
29629 
29630 
29631 /* findscripts() argument */
29632 
29633 
29634 
29635 struct cl_attr {
29636  char name[64 +1]; /* name of class */
29637  char *inst_script; /* install class action script */
29638  char *rem_script; /* remove class action script */
29639  unsigned src_verify:3; /* source verification level */
29640  unsigned dst_verify:4; /* destination verification level */
29641  unsigned relpath_2_CAS:1; /* CAS gets relative paths */
29642 };
29643 
29644 
29645 
29646 
29647 
29648 
29649 
29650 /* Common quit declaration used across many package commands */
29651 extern void quit(int) __attribute__((__noreturn__));
29652 
29653 
29654 /* listmgr.c */
29655 extern int bl_create (int count_per_block, int struct_size, char *desc);
29656 
29657 extern char *bl_next_avail (int list_handle);
29658 extern char *bl_get_record (int list_handle, int recno);
29659 extern void bl_free (int list_handle);
29660 extern int ar_create (int count_per_block, int struct_size, char *desc);
29661 
29662 extern char **ar_next_avail (int list_handle);
29663 extern char **ar_get_head (int list_handle);
29664 extern int ar_delete (int list_handle, int index);
29665 extern void ar_free (int list_handle);
29666 
29667 /* doulimit.c */
29668 extern int set_ulimit (char *script, char *err_msg);
29669 extern int clr_ulimit (void);
29670 extern int assign_ulimit (char *fslimit);
29671 
29672 /* dryrun.c */
29673 extern void set_continue_not_ok (void);
29674 extern int continue_is_ok (void);
29675 extern int in_dryrun_mode (void);
29676 extern int in_continue_mode (void);
29677 extern void init_dryrunfile (char *dr_dir);
29678 extern void init_contfile (char *cn_dir);
29679 extern void set_dr_exitmsg (char *value);
29680 extern void set_dr_info (int type, int value);
29681 extern void write_dryrun_file (struct cfextra **extlist);
29682 
29683 /* instvol.c */
29684 extern void regfiles_free (void);
29685 
29686 /* lockinst.c */
29687 extern int lockinst (char *util_name, char *pkg_name, char *place);
29688 extern void lockupd (char *place);
29689 extern void unlockinst (void);
29690 
29691 extern char *pathdup (char *s);
29692 extern char *pathalloc (int n);
29693 extern char *fixpath (char *path);
29694 extern char *get_info_basedir (void);
29695 extern char *get_basedir (void);
29696 extern char *get_client_basedir (void);
29697 extern int set_basedirs (int reloc, char *adm_basedir, char *pkginst, int nointeract);
29698 
29699 extern int eval_path (char **server_ptr, char **client_ptr, char **map_ptr, char *path);
29700 
29701 extern int get_orig_offset (void);
29702 extern char *get_inst_root (void);
29703 extern char *get_mount_point (uint32_t n);
29704 extern char *get_remote_path (uint32_t n);
29705 extern void set_env_cbdir (void);
29706 extern int set_inst_root (char *path);
29707 extern void put_path_params (void);
29708 extern int mkpath (char *p);
29709 extern void mkbasedir (int flag, char *path);
29710 extern int is_an_inst_root (void);
29711 extern int is_a_basedir (void);
29712 extern int is_a_cl_basedir (void);
29713 extern int is_relocatable (void);
29714 extern char *orig_path (char *path);
29715 extern char *orig_path_ptr (char *path);
29716 extern char *qreason (int caller, int retcode, int started, int includeZonename);
29717 
29718 extern char *qstrdup (char *s);
29719 extern char *srcpath (char *d, char *p, int part, int nparts);
29720 extern char *trans_srcp_pi (char *local_path);
29721 extern int copyf (char *from, char *to, time_t mytime);
29722 extern int copyFile (int, int, char *, char *, struct stat *, long);
29723 extern int openLocal (char *a_path, int a_oflag, char *a_tmpdir);
29724 extern int dockdeps (char *depfile, int removeFlag, boolean_t a_preinstallCheck);
29725 
29726 extern int finalck (struct cfent *ept, int attrchg, int contchg, boolean_t a_warning);
29727 
29728 
29729 /* dockdeps.c */
29730 extern void setUpdate (void);
29731 extern int isUpdate (void);
29732 
29733 /* mntinfo.c */
29734 extern int get_mntinfo (int map_client, char *vfstab_file);
29735 extern uint32_t fsys (char *path);
29736 extern struct fstable *get_fs_entry (uint32_t n);
29737 extern int mount_client (void);
29738 extern int unmount_client (void);
29739 extern uint32_t resolved_fsys (char *path);
29740 extern char *get_server_host (uint32_t n);
29741 extern char *server_map (char *path, uint32_t fsys_value);
29742 extern int use_srvr_map (char *path, uint32_t *fsys_value);
29743 extern int use_srvr_map_n (uint32_t n);
29744 extern int is_fs_writeable (char *path, uint32_t *fsys_value);
29745 extern int is_remote_fs (char *path, uint32_t *fsys_value);
29746 extern int is_served (char *path, uint32_t *fsys_value);
29747 extern int is_mounted (char *path, uint32_t *fsys_value);
29748 extern int is_fs_writeable_n (uint32_t n);
29749 extern int is_remote_fs_n (uint32_t n);
29750 extern int is_served_n (uint32_t n);
29751 extern int is_mounted_n (uint32_t n);
29752 extern fsblkcnt_t get_blk_size_n (uint32_t n);
29753 extern fsblkcnt_t get_frag_size_n (uint32_t n);
29754 extern fsblkcnt_t get_blk_used_n (uint32_t n);
29755 extern fsblkcnt_t get_blk_free_n (uint32_t n);
29756 extern fsblkcnt_t get_inode_used_n (uint32_t n);
29757 extern fsblkcnt_t get_inode_free_n (uint32_t n);
29758 extern void set_blk_used_n (uint32_t n, fsblkcnt_t value);
29759 extern char *get_source_name_n (uint32_t n);
29760 extern char *get_fs_name_n (uint32_t n);
29761 extern int load_fsentry (struct fstable *fs_entry, char *name, char *fstype, char *remote_name);
29762 
29763 extern int isreloc (char *pkginstdir);
29764 extern int is_local_host (char *hostname);
29765 extern void fs_tab_free (void);
29766 
29767 /* pkgdbmerg.c */
29768 extern int pkgdbmerg (PKGserver server, VFP_T *tmpvfp, struct cfextra **extlist);
29769 
29770 extern int files_installed (void);
29771 
29772 /* ocfile.c */
29773 extern int trunc_tcfile (int fd);
29774 extern int ocfile (PKGserver *serverp, VFP_T **tmpvfp, fsblkcnt_t map_blks);
29775 
29776 extern int swapcfile (PKGserver server, VFP_T **a_tmpvfp, char *pkginst, int dbchg);
29777 
29778 extern int set_cfdir (char *cfdir);
29779 extern int socfile (PKGserver *server, boolean_t quiet);
29780 extern int relslock (void);
29781 extern int pkgWlock (int verbose);
29782 extern int iscfile (void);
29783 extern int vcfile (void);
29784 
29785 extern fsblkcnt_t nblk (fsblkcnt_t size, ulong_t bsize, ulong_t frsize);
29786 
29787 extern struct cfent **procmap (VFP_T *vfp, int mapflag, char *ir);
29788 extern void repl_cfent (struct cfent *new, struct cfent *old);
29789 extern struct cfextra **pkgobjmap (VFP_T *vfp, int mapflag, char *ir);
29790 extern void pkgobjinit (void);
29791 extern int seed_pkgobjmap (struct cfextra *ext_entry, char *path, char *local);
29792 
29793 extern int init_pkgobjspace (void);
29794 
29795 /* eptstat.c */
29796 extern void pinfo_free (void);
29797 extern struct pinfo *eptstat (struct cfent *entry, char *pkg, char c);
29798 
29799 /* echo.c */
29800 /*PRINTFLIKE1*/
29801 extern void echo (char *a_fmt, ...);
29802 /*PRINTFLIKE1*/
29803 extern void echoDebug (char *a_fmt, ...);
29804 extern boolean_t echoGetFlag (void);
29805 extern boolean_t echoDebugGetFlag (void);
29806 extern boolean_t echoSetFlag (boolean_t a_debugFlag);
29807 extern boolean_t echoDebugSetFlag (boolean_t a_debugFlag);
29808 
29809 /* ptext.c */
29810 /*PRINTFLIKE2*/
29811 extern void ptext (FILE *fp, char *fmt, ...);
29812 
29813 /* putparam.c */
29814 extern void putparam (char *param, char *value);
29815 extern void getuserlocale (void);
29816 extern void putuserlocale (void);
29817 extern void putConditionInfo (char *, char *);
29818 
29819 /* setadmin.c */
29820 extern void setadminFile (char *file);
29821 extern char *setadminSetting (char *a_paramName, char *a_paramValue);
29822 
29823 extern char *set_keystore_admin (void);
29824 extern boolean_t get_proxy_port_admin (char **, ushort_t *);
29825 extern boolean_t check_keystore_admin (char **);
29826 extern int web_ck_retries (void);
29827 extern int web_ck_timeout (void);
29828 extern int web_ck_authentication (void);
29829 
29830 /* setlist.c */
29831 extern char *cl_iscript (int idx);
29832 extern char *cl_rscript (int idx);
29833 extern void find_CAS (int CAS_type, char *bin_ptr, char *inst_ptr);
29834 extern int setlist (struct cl_attr ***plist, char *slist);
29835 extern void addlist (struct cl_attr ***plist, char *item);
29836 extern char *cl_nam (int cl_idx);
29837 extern char *flex_device(char *device_name, int dev_ok);
29838 extern int cl_getn (void);
29839 extern int cl_idx (char *cl_nam);
29840 extern void cl_sets (char *slist);
29841 extern void cl_setl (struct cl_attr **cl_lst);
29842 extern void cl_putl (char *parm_name, struct cl_attr **list);
29843 extern int cl_deliscript (int i);
29844 extern unsigned cl_svfy (int i);
29845 extern unsigned cl_dvfy (int i);
29846 extern unsigned cl_pthrel (int i);
29847 
29848 /* passwd.c */
29849 extern int pkg_passphrase_cb (char *, int, int, void *);
29850 extern void set_passarg (char *);
29851 extern void set_prompt (char *);
29852 
29853 /* fixpath.c */
29854 extern void export_client_env(char *);
29855 extern void set_partial_inst(void);
29856 extern int is_partial_inst(void);
29857 extern void set_depend_pkginfo_DB(boolean_t a_setting);
29858 extern boolean_t is_depend_pkginfo_DB(void);
29859 extern void disable_spool_create(void);
29860 extern int is_spool_create(void);
29861 
29862 /* open_package_datastream.c */
29863 extern boolean_t open_package_datastream(int a_argc, char **a_argv,
29864     char *a_spoolto, char *a_device,
29865     int *r_repeat, char **r_idsName,
29866     char *a_tmpdir, struct pkgdev *a_pkgdev,
29867     int a_optind);
29868 
29869 /* setup_temporary_directory.c */
29870 extern boolean_t setup_temporary_directory(char **r_dirname,
29871     char *a_tmpdir, char *a_suffix);
29872 
29873 /* unpack_package_from_stream.c */
29874 extern boolean_t unpack_package_from_stream(char *a_idsName,
29875     char *a_pkginst, char *a_tempDir);
29876 
29877 /* pkgops.c */
29878 
29879 extern boolean_t pkgAddPackageToGzonlyList(char *a_pkgInst,
29880     char *a_rootPath);
29881 extern void pkgAddThisZonePackage(char *a_pkgInst);
29882 extern boolean_t pkgRemovePackageFromGzonlyList(char *a_rootPath,
29883     char *a_pkgInst);
29884 extern FILE *pkgOpenInGzOnlyFile(char *a_rootPath);
29885 extern void pkginfoFree(struct pkginfo **r_info);
29886 extern boolean_t pkginfoIsPkgInstalled(struct pkginfo **r_pinfo,
29887     char *a_pkgInst);
29888 extern boolean_t pkgIsPkgInGzOnly(char *a_rootPath, char *a_pkgInst);
29889 extern boolean_t pkgIsPkgInGzOnlyFP(FILE *a_fp, char *a_pkgInst);
29890 extern boolean_t pkginfoParamTruth(FILE *a_fp, char *a_param,
29891     char *a_value, boolean_t a_default);
29892 extern int pkgGetPackageList(char ***r_pkgList, char **a_argv,
29893     int a_optind, char *a_categories,
29894     char **a_categoryList, struct pkgdev *a_pkgdev);
29895 extern void pkgLocateHighestInst(char *r_path, int r_pathLen,
29896     char *r_pkgInst, int r_pkgInstLen,
29897     char *a_rootPath, char *a_pkgInst);
29898 extern boolean_t pkgPackageIsThisZone(char *a_pkgInst);
29899 extern char *pkgGetGzOnlyPath(void);
29900 extern boolean_t pkgTestInstalled(char *a_packageName, char *a_rootPath);
29901 
29902 /* depchk.c */
29903 
29904 struct depckErrorRecord {
29905  int ier_numZones;
29906  char *ier_packageName;
29907  char **ier_zones;
29908  char **ier_values;
29909 };
29910 
29911 typedef struct depckErrorRecord depckErrorRecord_t;
29912 
29913 struct depckError {
29914  int er_numEntries;
29915  depckErrorRecord_t *er_theEntries;
29916 };
29917 
29918 typedef struct depckError depckError_t;
29919 
29920 typedef int (depcklFunc_t)(char *a_msg, char *a_pkg);
29921 
29922 /*
29923  * ignore_values:
29924  *	== NULL - record one message for each instance of "name" found
29925  *	== "" - record multiple instances
29926  *	!= "" - record multiple instances if value not in ignore_values
29927  */
29928 
29929 struct depckl_struct {
29930  char *name;
29931  char *ignore_values;
29932  char **err_msg;
29933  depcklFunc_t *depcklFunc;
29934  depckError_t *record;
29935 };
29936 
29937 typedef struct depckl_struct depckl_t;
29938 
29939 extern int depchkReportErrors(depckl_t *depckl);
29940 extern void depchkRecordError(depckError_t *a_erc,
29941     char *a_pkginst, char *a_zoneName,
29942     char *a_value);
29943 
29944 /* log.c */
29945 
29946 /* types of log messages we recognize */
29947 typedef enum {
29948  LOG_MSG_ERR,
29949  LOG_MSG_WRN,
29950  LOG_MSG_INFO,
29951  LOG_MSG_DEBUG
29952 } LogMsgType;
29953 
29954 /*PRINTFLIKE2*/
29955 extern void log_msg(LogMsgType, const char *, ...);
29956 extern void log_set_verbose(boolean_t);
29957 extern boolean_t log_get_verbose(void);
29958 
29959 /*
29960  * typedef for the 'ckreturn' function
29961  */
29962 typedef void (ckreturnFunc_t)(int a_retcode);
29963 
29964 /* sml.c */
29965 
29966 /* null reference to SML_TAG object */
29967 
29968 
29969 
29970 /* null reference to SML_TAG * object */
29971 
29972 
29973 
29974 /* is reference to SML_TAG object valid? */
29975 
29976 
29977 
29978 /* is indirect reference to SML_TAG object valid? */
29979 
29980 
29981 
29982 
29983 /* definitions for sml passed from pkginstall to pkgcond */
29984 # 505 "/home/git3/dehawe/titanic_53/usr/src/cmd/svr4pkg/hdrs/libinst.h"
29985 typedef struct _sml_tag_struct SML_TAG;
29986 typedef struct _sml_parameter_struct SML_PARAM;
29987 
29988 struct _sml_tag_struct {
29989  char *name; /* tag name */
29990  int params_num; /* # params in *params */
29991  SML_PARAM *params; /* tag parameters */
29992  int tags_num; /* # subtags in *tags */
29993  SML_TAG *tags; /* tag subtags */
29994 };
29995 
29996 struct _sml_parameter_struct {
29997  char *name; /* tag name */
29998  char *value; /* parameters */
29999 };
30000 
30001 SML_TAG *smlAddTag(SML_TAG **r_tag, int a_index,
30002    SML_TAG *a_subTag);
30003 boolean_t smlFstatCompareEq(struct stat *statbuf,
30004     SML_TAG *tag, char *path);
30005 char *smlConvertTagToString(SML_TAG *tag);
30006 /*PRINTFLIKE2*/
30007 void smlDbgPrintTag(SML_TAG *a_tag, char *a_format, ...);
30008 void smlDelTag(SML_TAG *tag, SML_TAG *sub_tag);
30009 void smlDelParam(SML_TAG *tag, char *name);
30010 SML_TAG *smlDup(SML_TAG *tag);
30011 boolean_t smlFindAndDelTag(SML_TAG *tag, char *findTag);
30012 void smlFreeTag(SML_TAG *tag);
30013 char *smlGetElementName(SML_TAG *a_tag);
30014 int smlGetNumParams(SML_TAG *a_tag);
30015 char *smlGetParam(SML_TAG *tag, char *name);
30016 /*PRINTFLIKE2*/
30017 char *smlGetParamF(SML_TAG *tag, char *format, ...);
30018 void smlGetParam_r(SML_TAG *tag, char *name, char *buf,
30019    int bufLen);
30020 char *smlGetParamByTag(SML_TAG *tag, int index,
30021    char *tagName, char *parmName);
30022 char *smlGetParamByTagParam(SML_TAG *tag, int index,
30023    char *tagName, char *parmName, char *parmValue,
30024    char *parmReturn);
30025 char *smlGetParamName(SML_TAG *tag, int index);
30026 SML_TAG *smlGetTag(SML_TAG *tag, int index);
30027 SML_TAG *smlGetTagByName(SML_TAG *tag, int index, char *name);
30028 SML_TAG *smlGetTagByTagParam(SML_TAG *tag, int index,
30029    char *tagName, char *paramName, char *paramValue);
30030 boolean_t smlGetVerbose(void);
30031 int smlLoadTagFromFile(SML_TAG **r_tag, char *a_fileName);
30032 SML_TAG *smlNewTag(char *name);
30033 boolean_t smlParamEq(SML_TAG *tag, char *findTag,
30034    char *findParam, char *str);
30035 /*PRINTFLIKE4*/
30036 boolean_t smlParamEqF(SML_TAG *tag, char *findTag, char *findParam,
30037    char *format, ...);
30038 void smlPrintTag(SML_TAG *tag);
30039 int smlReadOneTag(SML_TAG **r_tag, char *a_str);
30040 int smlConvertStringToTag(SML_TAG **r_tag, char *str);
30041 void smlSetFileStatInfo(SML_TAG **tag,
30042     struct stat *statbuf, char *path);
30043 void smlSetParam(SML_TAG *tag, char *name, char *value);
30044 /*PRINTFLIKE3*/
30045 void smlSetParamF(SML_TAG *tag, char *name, char *format, ...);
30046 void smlSetVerbose(boolean_t a_setting);
30047 int smlWriteTagToFd(SML_TAG *tag, int fd);
30048 int smlWriteTagToFile(SML_TAG *tag, char *filename);
30049 /*PRINTFLIKE3*/
30050 void sml_strPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
30051 /*PRINTFLIKE1*/
30052 char *sml_strPrintf(char *a_format, ...);
30053 char *sml_XmlEncodeString(char *a_plainTextString);
30054 char *sml_XmlDecodeString(char *a_xmlEncodedString);
30055 # 47 "ckentry.c" 2
30056 
30057 extern int Lflag, lflag, aflag, cflag, fflag, qflag, nflag, xflag, vflag;
30058 extern char *basedir, *device, pkgspool[];
30059 # 58 "ckentry.c"
30060 static char *findspool(struct cfent *ept);
30061 static int xdir(int maptyp, VFP_T *vfp, PKGserver server, char *dirname);
30062 
30063 int
30064 ckentry(int envflag, int maptyp, struct cfent *ept, VFP_T *vfp,
30065     PKGserver server)
30066 {
30067  int a_err, c_err,
30068   errflg;
30069  char *path;
30070  char *ir = get_inst_root();
30071 
30072  if (ept->ftype != 'i') {
30073   if (envflag)
30074    mappath(2, ept->path);
30075   if (!device)
30076    basepath(ept->path, maptyp ? 0 : basedir, ir);
30077  }
30078  canonize(ept->path);
30079  if (strchr("sl", ept->ftype)) {
30080   if (envflag) /* -e option */
30081    mappath(2, ept->ainfo.local);
30082   if (!(ept->ainfo.local[0] != '/')) { /* Absolute Path */
30083    if (!device) {
30084     if (ept->ftype == 'l') /* Hard Link */
30085      basepath(ept->ainfo.local, 0, ir);
30086    }
30087   }
30088   if (!(ept->ainfo.local[0] != '/')) /* Absolute Path */
30089    canonize(ept->ainfo.local);
30090  }
30091  if (envflag) {
30092   if (!strchr("isl", ept->ftype)) {
30093    mapvar(2, ept->ainfo.owner);
30094    mapvar(2, ept->ainfo.group);
30095   }
30096  }
30097 
30098  if (lflag) {
30099   tputcfent(ept, (&__iob[1]));
30100   return (0);
30101  } else if (Lflag)
30102   return (putcfile(ept, (&__iob[1])));
30103 
30104  errflg = 0;
30105  if (device) {
30106   if (strchr("dxslcbp", ept->ftype))
30107    return (0);
30108   if ((path = findspool(ept)) == 0) {
30109    logerr(gettext("ERROR: unable to locate spooled object <%s>"), ept->path);
30110    return (-1);
30111   }
30112 
30113   /*
30114 		 * If the package file attributes are to be sync'd up with
30115 		 * the pkgmap, we fix the attributes here.
30116 		 */
30117   if (fflag) {
30118    a_err = 0;
30119    /* Clear dangerous bits. */
30120    ept->ainfo.mode = (ept->ainfo.mode & 0x1FF);
30121    /*
30122 			 * Make sure the file is readable by the world and
30123 			 * writeable by root.
30124 			 */
30125    ept->ainfo.mode |= 0644;
30126    if (!strchr("in", ept->ftype)) {
30127     /* Set the safe attributes. */
30128     if (a_err = averify(fflag, &ept->ftype,
30129         path, &ept->ainfo)) {
30130      errflg++;
30131      if (!qflag || (a_err != 0x0001)) {
30132       logerr(gettext("ERROR: %s"),
30133           ept->path);
30134       logerr(getErrbufAddr());
30135      }
30136      if (a_err == 0x0001)
30137       return (-1);
30138     }
30139    }
30140   }
30141   /* Report invalid modtimes by passing cverify a -1 */
30142   c_err = cverify((!fflag ? (-1) : fflag), &ept->ftype, path,
30143    &ept->cinfo, 1);
30144   if (c_err) {
30145    logerr(gettext("ERROR: %s"), path);
30146    logerr(getErrbufAddr());
30147    return (-1);
30148   }
30149  } else {
30150   a_err = 0;
30151   if (aflag && !strchr("in", ept->ftype)) {
30152    /* validate attributes */
30153    if (a_err = averify(fflag, &ept->ftype, ept->path,
30154        &ept->ainfo)) {
30155     errflg++;
30156     if (!qflag || (a_err != 0x0001)) {
30157      logerr(gettext("ERROR: %s"),
30158          ept->path);
30159      logerr(getErrbufAddr());
30160      if (maptyp && ept->pinfo->status ==
30161          '%')
30162       logerr(gettext("It is remote and may be available from the network."));
30163     }
30164     if (a_err == 0x0001)
30165      return (-1);
30166    }
30167   }
30168   if (cflag && strchr("fev", ept->ftype) &&
30169       (!nflag || ept->ftype != 'v') && /* bug # 1082144 */
30170       (!nflag || ept->ftype != 'e')) {
30171    /* validate contents */
30172    /* Report invalid modtimes by passing cverify a -1 */
30173    if (c_err = cverify((!fflag ? (-1) : fflag),
30174     &ept->ftype, ept->path, &ept->cinfo, 1)) {
30175     errflg++;
30176     if (!qflag || (c_err != 0x0001)) {
30177      if (!a_err)
30178       logerr(gettext("ERROR: %s"),
30179           ept->path);
30180      logerr(getErrbufAddr());
30181      if (maptyp && ept->pinfo->status ==
30182          '%')
30183       logerr(gettext("It is remote and may be available from the network."));
30184     }
30185     if (c_err == 0x0001)
30186      return (-1);
30187    }
30188   }
30189   if (xflag && (ept->ftype == 'x')) {
30190    /* must do verbose here since ept->path will change */
30191    path = strdup(ept->path);
30192    if (xdir(maptyp, vfp, server, path))
30193     errflg++;
30194    (void) strcpy(ept->path, path);
30195    free(path);
30196   }
30197  }
30198  if (vflag)
30199   (void) fprintf((&__iob[2]), "%s\n", ept->path);
30200  return (errflg);
30201 }
30202 
30203 static int
30204 xdir(int maptyp, VFP_T *vfp, PKGserver server, char *dirname)
30205 {
30206  DIR *dirfp;
30207  char badpath[1024];
30208  int dirfound;
30209  int errflg;
30210  int len;
30211  int n;
30212  struct cfent mine;
30213  struct dirent *drp;
30214  struct pinfo *pinfo;
30215  void *pos;
30216 
30217  if (!maptyp)
30218   pos = ((vfp)->_vfpCurr); /* get current position in file */
30219 
30220  if ((dirfp = opendir(dirname)) == 0) {
30221   progerr(gettext("unable to open directory <%s>"), dirname);
30222   return (-1);
30223  }
30224  len = strlen(dirname);
30225 
30226  errflg = 0;
30227  (void) memset((char *)&mine, '\0', sizeof (struct cfent));
30228  while ((drp = readdir(dirfp)) != 0) {
30229   if (strcmp(drp->d_name, ".") == 0 ||
30230       strcmp(drp->d_name, "..") == 0)
30231    continue;
30232   (void) snprintf(badpath, sizeof (badpath), "%s/%s",
30233       dirname, drp->d_name);
30234   if (!maptyp) {
30235    dirfound = 0;
30236    while ((n = (gpkgmapvfp((&mine), (vfp)))) != 0) {
30237     if (n < 0) {
30238      char *errstr = getErrstr();
30239      logerr(gettext("ERROR: garbled entry"));
30240      logerr(gettext("pathname: %s"),
30241          (mine.path && *mine.path) ?
30242          mine.path : "Unknown");
30243      logerr(gettext("problem: %s"),
30244          (errstr && *errstr) ? errstr :
30245          "Unknown");
30246      exit(99);
30247     }
30248     if (strncmp(mine.path, dirname, len) ||
30249         (mine.path[len] != '/'))
30250      break;
30251     if (strcmp(drp->d_name, &mine.path[len+1]) ==
30252         0) {
30253      dirfound++;
30254      break;
30255     }
30256    }
30257 
30258    ((vfp)->_vfpCurr) = pos;
30259 
30260    if (dirfound)
30261     continue;
30262   } else {
30263    if (srchcfile(&mine, badpath, server) == 1) {
30264     while ((pinfo = mine.pinfo) != 0) {
30265      mine.pinfo = pinfo->next;
30266      free((char *)pinfo);
30267     }
30268     continue;
30269    }
30270   }
30271 
30272   if (fflag) {
30273    if (unlink(badpath)) {
30274     errflg++;
30275     logerr(gettext("ERROR: %s"), badpath);
30276     logerr(gettext("unable to remove hidden file"));
30277    }
30278   } else {
30279    errflg++;
30280    logerr(gettext("ERROR: %s"), badpath);
30281    logerr(gettext("ERROR: hidden file in exclusive directory"));
30282   }
30283  }
30284 
30285  (void) closedir(dirfp);
30286  return (errflg);
30287 }
30288 
30289 static char *
30290 findspool(struct cfent *ept)
30291 {
30292  static char path[2*1024 +1];
30293  char host[1024 +1];
30294 
30295  (void) strcpy(host, pkgspool);
30296  if (ept->ftype == 'i') {
30297   if (strcmp(ept->path, "pkginfo"))
30298    (void) strcat(host, "/install");
30299  } else if (ept->path[0] == '/') {
30300   (void) strcat(host, "/root");
30301  } else {
30302   (void) strcat(host, "/reloc");
30303  }
30304 
30305  (void) snprintf(path, sizeof (path), "%s/%s", host,
30306   ept->path + (ept->path[0] == '/'));
30307 
30308  if (access(path, 0) == 0) {
30309   return (path);
30310  }
30311 
30312  if ((ept->ftype != 'i') && (ept->volno > 0)) {
30313   (void) snprintf(path, sizeof (path),
30314     "%s.%d/%s", host, ept->volno,
30315    ept->path + (ept->path[0] == '/'));
30316   if (access(path, 0) == 0) {
30317    return (path);
30318   }
30319  }
30320  return (0);
30321 }
30322